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
|
---|---|---|---|---|---|---|---|---|---|---|---|
3,400 | find_plugin | eloqsql/build_O3/libmariadb/libmariadb/ma_client_plugin.c | static struct st_mysql_client_plugin *find_plugin(const char *name, int type)
{
struct st_client_plugin_int *p;
int plugin_nr= get_plugin_nr(type);
DBUG_ASSERT(initialized);
if (plugin_nr == -1)
return 0;
if (!name)
return plugin_list[plugin_nr]->plugin;
for (p= plugin_list[plugin_nr]; p; p= p->next)
{
if (strcmp(p->plugin->name, name) == 0)
return p->plugin;
}
return NULL;
} | O3 | c | find_plugin:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
leaq 0x12df2(%rip), %rax # 0x3f630
xorl %r15d, %r15d
cmpl %esi, (%r15,%rax)
je 0x2c853
addq $0x8, %r15
cmpq $0x30, %r15
jne 0x2c841
jmp 0x2c889
addq 0x2274e(%rip), %r15 # 0x4efa8
testq %rbx, %rbx
je 0x2c87d
movq (%r15), %r15
testq %r15, %r15
je 0x2c886
movq 0x10(%r15), %r14
movq 0x8(%r14), %rdi
movq %rbx, %rsi
callq 0x13640
testl %eax, %eax
jne 0x2c85f
jmp 0x2c889
movq (%r15), %rax
movq 0x10(%rax), %r14
jmp 0x2c889
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| find_plugin:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rdi
xor r14d, r14d
lea rax, valid_plugins
xor r15d, r15d
loc_2C841:
cmp [r15+rax], esi
jz short loc_2C853
add r15, 8
cmp r15, 30h ; '0'
jnz short loc_2C841
jmp short loc_2C889
loc_2C853:
add r15, cs:plugin_list_ptr
test rbx, rbx
jz short loc_2C87D
loc_2C85F:
mov r15, [r15]
test r15, r15
jz short loc_2C886
mov r14, [r15+10h]
mov rdi, [r14+8]
mov rsi, rbx
call _strcmp
test eax, eax
jnz short loc_2C85F
jmp short loc_2C889
loc_2C87D:
mov rax, [r15]
mov r14, [rax+10h]
jmp short loc_2C889
loc_2C886:
xor r14d, r14d
loc_2C889:
mov rax, r14
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long find_plugin(long long a1, int a2)
{
long long v2; // r14
long long v3; // r15
_QWORD *v4; // r15
v2 = 0LL;
v3 = 0LL;
while ( valid_plugins[v3] != a2 )
{
v3 += 2LL;
if ( v3 == 12 )
return v2;
}
v4 = (_QWORD *)((char *)plugin_list + v3 * 4);
if ( !a1 )
return *(_QWORD *)(*v4 + 16LL);
while ( 1 )
{
v4 = (_QWORD *)*v4;
if ( !v4 )
break;
v2 = v4[2];
if ( !(unsigned int)strcmp(*(_QWORD *)(v2 + 8), a1) )
return v2;
}
return 0LL;
}
| find_plugin:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
XOR R14D,R14D
LEA RAX,[0x13f630]
XOR R15D,R15D
LAB_0012c841:
CMP dword ptr [R15 + RAX*0x1],ESI
JZ 0x0012c853
ADD R15,0x8
CMP R15,0x30
JNZ 0x0012c841
JMP 0x0012c889
LAB_0012c853:
ADD R15,qword ptr [0x0014efa8]
TEST RBX,RBX
JZ 0x0012c87d
LAB_0012c85f:
MOV R15,qword ptr [R15]
TEST R15,R15
JZ 0x0012c886
MOV R14,qword ptr [R15 + 0x10]
MOV RDI,qword ptr [R14 + 0x8]
MOV RSI,RBX
CALL 0x00113640
TEST EAX,EAX
JNZ 0x0012c85f
JMP 0x0012c889
LAB_0012c87d:
MOV RAX,qword ptr [R15]
MOV R14,qword ptr [RAX + 0x10]
JMP 0x0012c889
LAB_0012c886:
XOR R14D,R14D
LAB_0012c889:
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
long find_plugin(char *param_1,int param_2)
{
int iVar1;
long lVar2;
long *plVar3;
lVar2 = 0;
do {
if (*(int *)((long)&valid_plugins + lVar2) == param_2) {
plVar3 = (long *)(PTR_plugin_list_0014efa8 + lVar2);
if (param_1 == (char *)0x0) {
return *(long *)(*plVar3 + 0x10);
}
do {
plVar3 = (long *)*plVar3;
if (plVar3 == (long *)0x0) {
return 0;
}
lVar2 = plVar3[2];
iVar1 = strcmp(*(char **)(lVar2 + 8),param_1);
} while (iVar1 != 0);
return lVar2;
}
lVar2 = lVar2 + 8;
} while (lVar2 != 0x30);
return 0;
}
|
|
3,401 | Create_func_trt_trx_sees<Item_func_trt_trx_sees>::create_native(THD*, st_mysql_const_lex_string const*, List<Item>*) | eloqsql/plugin/versioning/versioning.cc | virtual Item *create_native(THD *thd, const LEX_CSTRING *name,
List<Item> *item_list)
{
Item *func= NULL;
int arg_count= 0;
if (item_list != NULL)
arg_count= item_list->elements;
switch (arg_count) {
case 2:
{
Item *param_1= item_list->pop();
Item *param_2= item_list->pop();
func= new (thd->mem_root) Item_func_trt_trx_seesX(thd, param_1, param_2);
break;
}
default:
my_error(ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT, MYF(0), name->str);
break;
}
return func;
} | O0 | cpp | Create_func_trt_trx_sees<Item_func_trt_trx_sees>::create_native(THD*, st_mysql_const_lex_string const*, List<Item>*):
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0xfd1b
movq -0x20(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
subl $0x2, %eax
jne 0xfdce
jmp 0xfd29
movq -0x20(%rbp), %rdi
callq 0xe700
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rdi
callq 0xe700
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rsi
movq %rsi, -0x80(%rbp)
movl $0xb8, %edi
callq 0xe3d0
movq %rax, %rcx
movq %rcx, -0x78(%rbp)
movb $0x0, -0x51(%rbp)
xorl %eax, %eax
cmpq $0x0, %rcx
movq %rax, -0x70(%rbp)
je 0xfda1
movq -0x78(%rbp), %rdi
movq -0x80(%rbp), %rax
movq %rdi, -0x48(%rbp)
movq %rax, -0x50(%rbp)
movb $0x1, -0x51(%rbp)
movq -0x10(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq -0x40(%rbp), %rcx
callq 0xe140
jmp 0xfd97
movq -0x78(%rbp), %rax
movq %rax, -0x70(%rbp)
jmp 0xfda1
movq -0x70(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0xfdef
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
testb $0x1, -0x51(%rbp)
jne 0xfdbf
jmp 0xfdcc
movq -0x48(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0xe580
jmp 0xfdfc
movq 0xa0db(%rip), %rax # 0x19eb0
movq (%rax), %rax
movq (%rax), %rcx
movq -0x18(%rbp), %rax
movq (%rax), %rdx
movl $0x62e, %edi # imm = 0x62E
xorl %eax, %eax
movl %eax, %esi
movb $0x0, %al
callq *%rcx
movq -0x28(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
movq -0x60(%rbp), %rdi
callq 0xe730
nopw %cs:(%rax,%rax)
nop
| _ZN24Create_func_trt_trx_seesI22Item_func_trt_trx_seesE13create_nativeEP3THDPK25st_mysql_const_lex_stringP4ListI4ItemE:
push rbp
mov rbp, rsp
sub rsp, 80h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], 0
mov [rbp+var_2C], 0
cmp [rbp+var_20], 0
jz short loc_FD1B
mov rax, [rbp+var_20]
mov eax, [rax+10h]
mov [rbp+var_2C], eax
loc_FD1B:
mov eax, [rbp+var_2C]
sub eax, 2
jnz loc_FDCE
jmp short $+2
loc_FD29:
mov rdi, [rbp+var_20]
call __ZN4ListI4ItemE3popEv; List<Item>::pop(void)
mov [rbp+var_38], rax
mov rdi, [rbp+var_20]
call __ZN4ListI4ItemE3popEv; List<Item>::pop(void)
mov [rbp+var_40], rax
mov rax, [rbp+var_10]
mov rsi, [rax+28h]
mov [rbp+var_80], rsi
mov edi, 0B8h
call __ZN4ItemnwEmP11st_mem_root; Item::operator new(ulong,st_mem_root *)
mov rcx, rax
mov [rbp+var_78], rcx
mov [rbp+var_51], 0
xor eax, eax
cmp rcx, 0
mov [rbp+var_70], rax
jz short loc_FDA1
mov rdi, [rbp+var_78]
mov rax, [rbp+var_80]
mov [rbp+var_48], rdi
mov [rbp+var_50], rax
mov [rbp+var_51], 1
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_38]
mov rcx, [rbp+var_40]
call __ZN22Item_func_trt_trx_seesC1EP3THDP4ItemS3_; Item_func_trt_trx_sees::Item_func_trt_trx_sees(THD *,Item *,Item *)
jmp short $+2
loc_FD97:
mov rax, [rbp+var_78]
mov [rbp+var_70], rax
jmp short $+2
loc_FDA1:
mov rax, [rbp+var_70]
mov [rbp+var_28], rax
jmp short loc_FDEF
mov rcx, rax
mov eax, edx
mov [rbp+var_60], rcx
mov [rbp+var_64], eax
test [rbp+var_51], 1
jnz short loc_FDBF
jmp short loc_FDCC
loc_FDBF:
mov rdi, [rbp+var_48]
mov rsi, [rbp+var_50]
call __ZN4ItemdlEPvP11st_mem_root; Item::operator delete(void *,st_mem_root *)
loc_FDCC:
jmp short loc_FDFC
loc_FDCE:
mov rax, cs:my_print_error_service_ptr
mov rax, [rax]
mov rcx, [rax]
mov rax, [rbp+var_18]
mov rdx, [rax]
mov edi, 62Eh
xor eax, eax
mov esi, eax
mov al, 0
call rcx
loc_FDEF:
mov rax, [rbp+var_28]
add rsp, 80h
pop rbp
retn
loc_FDFC:
mov rdi, [rbp+var_60]
call __Unwind_Resume
| long long Create_func_trt_trx_sees<Item_func_trt_trx_sees>::create_native(
long long a1,
long long a2,
_QWORD *a3,
long long a4)
{
long long v5; // [rsp+8h] [rbp-78h]
long long v6; // [rsp+10h] [rbp-70h]
long long v7; // [rsp+40h] [rbp-40h]
long long v8; // [rsp+48h] [rbp-38h]
int v9; // [rsp+54h] [rbp-2Ch]
long long v10; // [rsp+58h] [rbp-28h]
v10 = 0LL;
v9 = 0;
if ( a4 )
v9 = *(_DWORD *)(a4 + 16);
if ( v9 == 2 )
{
v8 = List<Item>::pop(a4);
v7 = List<Item>::pop(a4);
v5 = Item::operator new(184LL);
v6 = 0LL;
if ( v5 )
{
Item_func_trt_trx_sees::Item_func_trt_trx_sees(v5, a2, v8, v7);
return v5;
}
return v6;
}
else
{
((void ( *)(long long, _QWORD, _QWORD))*my_print_error_service)(1582LL, 0LL, *a3);
}
return v10;
}
| create_native:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
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],0x0
MOV dword ptr [RBP + -0x2c],0x0
CMP qword ptr [RBP + -0x20],0x0
JZ 0x0010fd1b
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0x10]
MOV dword ptr [RBP + -0x2c],EAX
LAB_0010fd1b:
MOV EAX,dword ptr [RBP + -0x2c]
SUB EAX,0x2
JNZ 0x0010fdce
JMP 0x0010fd29
LAB_0010fd29:
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x0010e700
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x0010e700
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x80],RSI
MOV EDI,0xb8
CALL 0x0010e3d0
MOV RCX,RAX
MOV qword ptr [RBP + -0x78],RCX
MOV byte ptr [RBP + -0x51],0x0
XOR EAX,EAX
CMP RCX,0x0
MOV qword ptr [RBP + -0x70],RAX
JZ 0x0010fda1
MOV RDI,qword ptr [RBP + -0x78]
MOV RAX,qword ptr [RBP + -0x80]
MOV qword ptr [RBP + -0x48],RDI
MOV qword ptr [RBP + -0x50],RAX
MOV byte ptr [RBP + -0x51],0x1
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x40]
LAB_0010fd90:
CALL 0x0010e140
LAB_0010fd95:
JMP 0x0010fd97
LAB_0010fd97:
MOV RAX,qword ptr [RBP + -0x78]
MOV qword ptr [RBP + -0x70],RAX
JMP 0x0010fda1
LAB_0010fda1:
MOV RAX,qword ptr [RBP + -0x70]
MOV qword ptr [RBP + -0x28],RAX
JMP 0x0010fdef
LAB_0010fdce:
MOV RAX,qword ptr [0x00119eb0]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RAX]
MOV EDI,0x62e
XOR EAX,EAX
MOV ESI,EAX
MOV AL,0x0
CALL RCX
LAB_0010fdef:
MOV RAX,qword ptr [RBP + -0x28]
ADD RSP,0x80
POP RBP
RET
|
/* Create_func_trt_trx_sees<Item_func_trt_trx_sees>::create_native(THD*, st_mysql_const_lex_string
const*, List<Item>*) */
Item_func_trt_trx_sees * __thiscall
Create_func_trt_trx_sees<Item_func_trt_trx_sees>::create_native
(Create_func_trt_trx_sees<Item_func_trt_trx_sees> *this,THD *param_1,
st_mysql_const_lex_string *param_2,List *param_3)
{
Item *pIVar1;
Item *pIVar2;
Item_func_trt_trx_sees *this_00;
Item_func_trt_trx_sees *local_78;
int local_34;
Item_func_trt_trx_sees *local_30;
local_30 = (Item_func_trt_trx_sees *)0x0;
local_34 = 0;
if (param_3 != (List *)0x0) {
local_34 = *(int *)(param_3 + 0x10);
}
if (local_34 == 2) {
pIVar1 = (Item *)List<Item>::pop((List<Item> *)param_3);
pIVar2 = (Item *)List<Item>::pop((List<Item> *)param_3);
this_00 = (Item_func_trt_trx_sees *)Item::operator_new(0xb8,*(st_mem_root **)(param_1 + 0x28));
local_78 = (Item_func_trt_trx_sees *)0x0;
if (this_00 != (Item_func_trt_trx_sees *)0x0) {
/* try { // try from 0010fd90 to 0010fd94 has its CatchHandler @ 0010fdab */
Item_func_trt_trx_sees::Item_func_trt_trx_sees(this_00,param_1,pIVar1,pIVar2);
local_78 = this_00;
}
local_30 = local_78;
}
else {
(*(code *)**(int8 **)PTR_my_print_error_service_00119eb0)(0x62e,0,*(int8 *)param_2);
}
return local_30;
}
|
|
3,402 | my_strxfrm_desc_and_reverse | eloqsql/strings/ctype-simple.c | void
my_strxfrm_desc_and_reverse(uchar *str, uchar *strend,
uint flags, uint level)
{
if (flags & (MY_STRXFRM_DESC_LEVEL1 << level))
{
if (flags & (MY_STRXFRM_REVERSE_LEVEL1 << level))
{
for (strend--; str <= strend;)
{
uchar tmp= *str;
*str++= ~*strend;
*strend--= ~tmp;
}
}
else
{
for (; str < strend; str++)
*str= ~*str;
}
}
else if (flags & (MY_STRXFRM_REVERSE_LEVEL1 << level))
{
for (strend--; str < strend;)
{
uchar tmp= *str;
*str++= *strend;
*strend--= tmp;
}
}
} | O3 | c | my_strxfrm_desc_and_reverse:
pushq %rbp
movq %rsp, %rbp
movl %edx, %r8d
shrl %cl, %r8d
movl $0x10000, %eax # imm = 0x10000
shll %cl, %eax
btl $0x8, %r8d
jae 0x7ad98
testl %edx, %eax
je 0x7adcb
decq %rsi
cmpq %rdi, %rsi
jb 0x7adda
incq %rdi
movb -0x1(%rdi), %al
movb (%rsi), %cl
notb %cl
movb %cl, -0x1(%rdi)
notb %al
movb %al, (%rsi)
decq %rsi
leaq 0x1(%rdi), %rax
cmpq %rsi, %rdi
movq %rax, %rdi
jbe 0x7ad79
jmp 0x7adda
testl %edx, %eax
setne %al
decq %rsi
cmpq %rdi, %rsi
seta %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x7adda
incq %rdi
movb -0x1(%rdi), %al
movb (%rsi), %cl
movb %cl, -0x1(%rdi)
movb %al, (%rsi)
decq %rsi
leaq 0x1(%rdi), %rax
cmpq %rsi, %rdi
movq %rax, %rdi
jb 0x7adb0
jmp 0x7adda
cmpq %rsi, %rdi
jae 0x7adda
notb (%rdi)
incq %rdi
cmpq %rsi, %rdi
jne 0x7add0
popq %rbp
retq
| my_strxfrm_desc_and_reverse:
push rbp
mov rbp, rsp
mov r8d, edx
shr r8d, cl
mov eax, 10000h
shl eax, cl
bt r8d, 8
jnb short loc_7AD98
test eax, edx
jz short loc_7ADCB
dec rsi
cmp rsi, rdi
jb short loc_7ADDA
inc rdi
loc_7AD79:
mov al, [rdi-1]
mov cl, [rsi]
not cl
mov [rdi-1], cl
not al
mov [rsi], al
dec rsi
lea rax, [rdi+1]
cmp rdi, rsi
mov rdi, rax
jbe short loc_7AD79
jmp short loc_7ADDA
loc_7AD98:
test eax, edx
setnz al
dec rsi
cmp rsi, rdi
setnbe cl
and cl, al
cmp cl, 1
jnz short loc_7ADDA
inc rdi
loc_7ADB0:
mov al, [rdi-1]
mov cl, [rsi]
mov [rdi-1], cl
mov [rsi], al
dec rsi
lea rax, [rdi+1]
cmp rdi, rsi
mov rdi, rax
jb short loc_7ADB0
jmp short loc_7ADDA
loc_7ADCB:
cmp rdi, rsi
jnb short loc_7ADDA
loc_7ADD0:
not byte ptr [rdi]
inc rdi
cmp rdi, rsi
jnz short loc_7ADD0
loc_7ADDA:
pop rbp
retn
| char my_strxfrm_desc_and_reverse(_BYTE *a1, _BYTE *a2, unsigned int a3, char a4)
{
int v4; // eax
_BYTE *v5; // rsi
_BYTE *v6; // rdi
char v7; // al
_BYTE *v9; // rsi
_BYTE *v10; // rdi
char v11; // al
v4 = 0x10000 << a4;
if ( ((a3 >> a4) & 0x100) != 0 )
{
if ( (a3 & v4) != 0 )
{
v5 = a2 - 1;
if ( v5 >= a1 )
{
v6 = a1 + 1;
do
{
v7 = *(v6 - 1);
*(v6 - 1) = ~*v5;
*v5-- = ~v7;
LOBYTE(v4) = (_BYTE)v6 + 1;
}
while ( v6++ <= v5 );
}
}
else if ( a1 < a2 )
{
do
{
*a1 = ~*a1;
++a1;
}
while ( a1 != a2 );
}
}
else
{
LOBYTE(v4) = (a3 & v4) != 0;
v9 = a2 - 1;
if ( ((unsigned __int8)v4 & (v9 > a1)) == 1 )
{
v10 = a1 + 1;
do
{
v11 = *(v10 - 1);
*(v10 - 1) = *v9;
*v9-- = v11;
LOBYTE(v4) = (_BYTE)v10 + 1;
}
while ( v10++ < v9 );
}
}
return v4;
}
| my_strxfrm_desc_and_reverse:
PUSH RBP
MOV RBP,RSP
MOV R8D,EDX
SHR R8D,CL
MOV EAX,0x10000
SHL EAX,CL
BT R8D,0x8
JNC 0x0017ad98
TEST EAX,EDX
JZ 0x0017adcb
DEC RSI
CMP RSI,RDI
JC 0x0017adda
INC RDI
LAB_0017ad79:
MOV AL,byte ptr [RDI + -0x1]
MOV CL,byte ptr [RSI]
NOT CL
MOV byte ptr [RDI + -0x1],CL
NOT AL
MOV byte ptr [RSI],AL
DEC RSI
LEA RAX,[RDI + 0x1]
CMP RDI,RSI
MOV RDI,RAX
JBE 0x0017ad79
JMP 0x0017adda
LAB_0017ad98:
TEST EAX,EDX
SETNZ AL
DEC RSI
CMP RSI,RDI
SETA CL
AND CL,AL
CMP CL,0x1
JNZ 0x0017adda
INC RDI
LAB_0017adb0:
MOV AL,byte ptr [RDI + -0x1]
MOV CL,byte ptr [RSI]
MOV byte ptr [RDI + -0x1],CL
MOV byte ptr [RSI],AL
DEC RSI
LEA RAX,[RDI + 0x1]
CMP RDI,RSI
MOV RDI,RAX
JC 0x0017adb0
JMP 0x0017adda
LAB_0017adcb:
CMP RDI,RSI
JNC 0x0017adda
LAB_0017add0:
NOT byte ptr [RDI]
INC RDI
CMP RDI,RSI
JNZ 0x0017add0
LAB_0017adda:
POP RBP
RET
|
void my_strxfrm_desc_and_reverse(byte *param_1,byte *param_2,uint param_3,byte param_4)
{
byte bVar1;
uint uVar2;
byte *pbVar3;
bool bVar4;
uVar2 = 0x10000 << (param_4 & 0x1f);
if (((param_3 >> (param_4 & 0x1f)) >> 8 & 1) == 0) {
param_2 = param_2 + -1;
if (param_1 < param_2 && (uVar2 & param_3) != 0) {
pbVar3 = param_1 + 1;
do {
bVar1 = pbVar3[-1];
pbVar3[-1] = *param_2;
*param_2 = bVar1;
param_2 = param_2 + -1;
bVar4 = pbVar3 < param_2;
pbVar3 = pbVar3 + 1;
} while (bVar4);
}
}
else if ((uVar2 & param_3) == 0) {
if (param_1 < param_2) {
do {
*param_1 = ~*param_1;
param_1 = param_1 + 1;
} while (param_1 != param_2);
}
}
else {
param_2 = param_2 + -1;
if (param_1 <= param_2) {
pbVar3 = param_1 + 1;
do {
bVar1 = pbVar3[-1];
pbVar3[-1] = ~*param_2;
*param_2 = ~bVar1;
param_2 = param_2 + -1;
bVar4 = pbVar3 <= param_2;
pbVar3 = pbVar3 + 1;
} while (bVar4);
}
}
return;
}
|
|
3,403 | ggml_graph_compute_secondary_thread | ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu.c | static thread_ret_t ggml_graph_compute_secondary_thread(void* data) {
struct ggml_compute_state * state = (struct ggml_compute_state *) data;
struct ggml_threadpool * threadpool = state->threadpool;
ggml_thread_apply_priority(threadpool->prio);
if (ggml_thread_cpumask_is_valid(state->cpumask)) {
ggml_thread_apply_affinity(state->cpumask);
}
while (true) {
// Check if we need to sleep
while (threadpool->pause) {
GGML_PRINT_DEBUG("thread #%d inside pause loop\n", state->ith);
ggml_mutex_lock_shared(&threadpool->mutex);
if (threadpool->pause) {
ggml_cond_wait(&threadpool->cond, &threadpool->mutex);
}
GGML_PRINT_DEBUG("thread #%d resuming after wait\n", state->ith);
ggml_mutex_unlock_shared(&threadpool->mutex);
}
// This needs to be checked for after the cond_wait
if (threadpool->stop) break;
// Check if there is new work
// The main thread is the only one that can dispatch new work
ggml_graph_compute_check_for_work(state);
if (state->pending) {
state->pending = false;
ggml_graph_compute_thread(state);
}
}
return (thread_ret_t) 0;
} | O0 | c | ggml_graph_compute_secondary_thread:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq 0x210(%rax), %rax
movq %rax, (%rsp)
movq (%rsp), %rax
movl 0x120(%rax), %edi
callq 0x14b70
movq 0x8(%rsp), %rdi
addq $0x8, %rdi
callq 0x14c70
testb $0x1, %al
jne 0x14ad6
jmp 0x14ae4
movq 0x8(%rsp), %rdi
addq $0x8, %rdi
callq 0x14cc0
jmp 0x14ae6
jmp 0x14ae8
movq (%rsp), %rax
testb $0x1, 0x105(%rax)
je 0x14b27
movq (%rsp), %rdi
callq 0x102f0
movq (%rsp), %rax
testb $0x1, 0x105(%rax)
je 0x14b1c
movq (%rsp), %rdi
addq $0x28, %rdi
movq (%rsp), %rsi
callq 0x103e0
movq (%rsp), %rdi
callq 0xf940
jmp 0x14ae8
movq (%rsp), %rax
testb $0x1, 0x104(%rax)
je 0x14b36
jmp 0x14b66
movq 0x8(%rsp), %rdi
callq 0x14e00
movq 0x8(%rsp), %rax
testb $0x1, 0x20c(%rax)
je 0x14b64
movq 0x8(%rsp), %rax
movb $0x0, 0x20c(%rax)
movq 0x8(%rsp), %rdi
callq 0x14430
jmp 0x14ae6
xorl %eax, %eax
addq $0x18, %rsp
retq
nopl (%rax)
| ggml_graph_compute_secondary_thread:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov rax, [rsp+18h+var_8]
mov [rsp+18h+var_10], rax
mov rax, [rsp+18h+var_10]
mov rax, [rax+210h]
mov [rsp+18h+var_18], rax
mov rax, [rsp+18h+var_18]
mov edi, [rax+120h]
call ggml_thread_apply_priority
mov rdi, [rsp+18h+var_10]
add rdi, 8
call ggml_thread_cpumask_is_valid
test al, 1
jnz short loc_14AD6
jmp short loc_14AE4
loc_14AD6:
mov rdi, [rsp+18h+var_10]
add rdi, 8
call ggml_thread_apply_affinity
loc_14AE4:
jmp short $+2
loc_14AE6:
jmp short $+2
loc_14AE8:
mov rax, [rsp+18h+var_18]
test byte ptr [rax+105h], 1
jz short loc_14B27
mov rdi, [rsp+18h+var_18]
call _pthread_mutex_lock
mov rax, [rsp+18h+var_18]
test byte ptr [rax+105h], 1
jz short loc_14B1C
mov rdi, [rsp+18h+var_18]
add rdi, 28h ; '('
mov rsi, [rsp+18h+var_18]
call _pthread_cond_wait
loc_14B1C:
mov rdi, [rsp+18h+var_18]
call _pthread_mutex_unlock
jmp short loc_14AE8
loc_14B27:
mov rax, [rsp+18h+var_18]
test byte ptr [rax+104h], 1
jz short loc_14B36
jmp short loc_14B66
loc_14B36:
mov rdi, [rsp+18h+var_10]
call ggml_graph_compute_check_for_work
mov rax, [rsp+18h+var_10]
test byte ptr [rax+20Ch], 1
jz short loc_14B64
mov rax, [rsp+18h+var_10]
mov byte ptr [rax+20Ch], 0
mov rdi, [rsp+18h+var_10]
call ggml_graph_compute_thread
loc_14B64:
jmp short loc_14AE6
loc_14B66:
xor eax, eax
add rsp, 18h
retn
| long long ggml_graph_compute_secondary_thread(long long a1)
{
long long v2; // [rsp+0h] [rbp-18h]
v2 = *(_QWORD *)(a1 + 528);
ggml_thread_apply_priority(*(unsigned int *)(v2 + 288));
if ( (ggml_thread_cpumask_is_valid(a1 + 8) & 1) != 0 )
ggml_thread_apply_affinity(a1 + 8);
while ( 1 )
{
while ( (*(_BYTE *)(v2 + 261) & 1) != 0 )
{
pthread_mutex_lock(v2);
if ( (*(_BYTE *)(v2 + 261) & 1) != 0 )
pthread_cond_wait(v2 + 40, v2);
pthread_mutex_unlock(v2);
}
if ( (*(_BYTE *)(v2 + 260) & 1) != 0 )
break;
ggml_graph_compute_check_for_work(a1);
if ( (*(_BYTE *)(a1 + 524) & 1) != 0 )
{
*(_BYTE *)(a1 + 524) = 0;
ggml_graph_compute_thread(a1);
}
}
return 0LL;
}
| ggml_graph_compute_secondary_thread:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX + 0x210]
MOV qword ptr [RSP],RAX
MOV RAX,qword ptr [RSP]
MOV EDI,dword ptr [RAX + 0x120]
CALL 0x00114b70
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x8
CALL 0x00114c70
TEST AL,0x1
JNZ 0x00114ad6
JMP 0x00114ae4
LAB_00114ad6:
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x8
CALL 0x00114cc0
LAB_00114ae4:
JMP 0x00114ae6
LAB_00114ae6:
JMP 0x00114ae8
LAB_00114ae8:
MOV RAX,qword ptr [RSP]
TEST byte ptr [RAX + 0x105],0x1
JZ 0x00114b27
MOV RDI,qword ptr [RSP]
CALL 0x001102f0
MOV RAX,qword ptr [RSP]
TEST byte ptr [RAX + 0x105],0x1
JZ 0x00114b1c
MOV RDI,qword ptr [RSP]
ADD RDI,0x28
MOV RSI,qword ptr [RSP]
CALL 0x001103e0
LAB_00114b1c:
MOV RDI,qword ptr [RSP]
CALL 0x0010f940
JMP 0x00114ae8
LAB_00114b27:
MOV RAX,qword ptr [RSP]
TEST byte ptr [RAX + 0x104],0x1
JZ 0x00114b36
JMP 0x00114b66
LAB_00114b36:
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x00114e00
MOV RAX,qword ptr [RSP + 0x8]
TEST byte ptr [RAX + 0x20c],0x1
JZ 0x00114b64
MOV RAX,qword ptr [RSP + 0x8]
MOV byte ptr [RAX + 0x20c],0x0
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x00114430
LAB_00114b64:
JMP 0x00114ae6
LAB_00114b66:
XOR EAX,EAX
ADD RSP,0x18
RET
|
int8 ggml_graph_compute_secondary_thread(long param_1)
{
pthread_mutex_t *__mutex;
ulong uVar1;
__mutex = *(pthread_mutex_t **)(param_1 + 0x210);
ggml_thread_apply_priority(*(int4 *)((long)__mutex + 0x120));
uVar1 = ggml_thread_cpumask_is_valid(param_1 + 8);
if ((uVar1 & 1) != 0) {
ggml_thread_apply_affinity(param_1 + 8);
}
while( true ) {
while ((*(byte *)((long)__mutex + 0x105) & 1) != 0) {
pthread_mutex_lock(__mutex);
if ((*(byte *)((long)__mutex + 0x105) & 1) != 0) {
pthread_cond_wait((pthread_cond_t *)(__mutex + 1),__mutex);
}
pthread_mutex_unlock(__mutex);
}
if ((*(byte *)((long)__mutex + 0x104) & 1) != 0) break;
ggml_graph_compute_check_for_work(param_1);
if ((*(byte *)(param_1 + 0x20c) & 1) != 0) {
*(int1 *)(param_1 + 0x20c) = 0;
ggml_graph_compute_thread(param_1);
}
}
return 0;
}
|
|
3,404 | rw_pr_rdlock | eloqsql/mysys/thr_rwlock.c | int rw_pr_rdlock(rw_pr_lock_t *rwlock)
{
pthread_mutex_lock(&rwlock->lock);
/*
The fact that we were able to acquire 'lock' mutex means
that there are no active writers and we can acquire rd-lock.
Increment active readers counter to prevent requests for
wr-lock from succeeding and unlock mutex.
*/
rwlock->active_readers++;
pthread_mutex_unlock(&rwlock->lock);
return 0;
} | O0 | c | rw_pr_rdlock:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x24410
movq -0x8(%rbp), %rax
movl 0x58(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x58(%rax)
movq -0x8(%rbp), %rdi
callq 0x24200
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| rw_pr_rdlock:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]
call _pthread_mutex_lock
mov rax, [rbp+var_8]
mov ecx, [rax+58h]
add ecx, 1
mov [rax+58h], ecx
mov rdi, [rbp+var_8]
call _pthread_mutex_unlock
xor eax, eax
add rsp, 10h
pop rbp
retn
| long long rw_pr_rdlock(long long a1)
{
pthread_mutex_lock(a1);
++*(_DWORD *)(a1 + 88);
pthread_mutex_unlock(a1);
return 0LL;
}
| rw_pr_rdlock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00124410
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x58]
ADD ECX,0x1
MOV dword ptr [RAX + 0x58],ECX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00124200
XOR EAX,EAX
ADD RSP,0x10
POP RBP
RET
|
int8 rw_pr_rdlock(pthread_mutex_t *param_1)
{
pthread_mutex_lock(param_1);
*(int *)((long)param_1 + 0x58) = *(int *)((long)param_1 + 0x58) + 1;
pthread_mutex_unlock(param_1);
return 0;
}
|
|
3,405 | ac_str_extend | alca/libalca/utils.c | char *ac_str_extend(char *str, char c)
{
size_t len = 1;
char *newStr = NULL;
if (!str)
newStr = ac_alloc(len + 1);
else
{
len = strlen(str) + 1;
newStr = ac_realloc(str, len + 1);
}
newStr[len - 1] = c;
newStr[len] = '\0';
return newStr;
} | O0 | c | ac_str_extend:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq $0x1, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x940e
movq -0x18(%rbp), %rax
addq $0x1, %rax
movl %eax, %edi
callq 0x7890
movq %rax, -0x20(%rbp)
jmp 0x9436
movq -0x8(%rbp), %rdi
callq 0x7400
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
addq $0x1, %rax
movl %eax, %esi
callq 0x79b0
movq %rax, -0x20(%rbp)
movb -0x9(%rbp), %dl
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
subq $0x1, %rcx
movb %dl, (%rax,%rcx)
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x20(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nop
| ac_str_extend:
push rbp
mov rbp, rsp
sub rsp, 20h
mov al, sil
mov [rbp+var_8], rdi
mov [rbp+var_9], al
mov [rbp+var_18], 1
mov [rbp+var_20], 0
cmp [rbp+var_8], 0
jnz short loc_940E
mov rax, [rbp+var_18]
add rax, 1
mov edi, eax
call _ac_alloc
mov [rbp+var_20], rax
jmp short loc_9436
loc_940E:
mov rdi, [rbp+var_8]
call _strlen
add rax, 1
mov [rbp+var_18], rax
mov rdi, [rbp+var_8]
mov rax, [rbp+var_18]
add rax, 1
mov esi, eax
call _ac_realloc
mov [rbp+var_20], rax
loc_9436:
mov dl, [rbp+var_9]
mov rax, [rbp+var_20]
mov rcx, [rbp+var_18]
sub rcx, 1
mov [rax+rcx], dl
mov rax, [rbp+var_20]
mov rcx, [rbp+var_18]
mov byte ptr [rax+rcx], 0
mov rax, [rbp+var_20]
add rsp, 20h
pop rbp
retn
| long long ac_str_extend(long long a1, char a2)
{
long long v2; // rax
long long v4; // [rsp+0h] [rbp-20h]
long long v5; // [rsp+8h] [rbp-18h]
v5 = 1LL;
if ( a1 )
{
v2 = strlen(a1);
v5 = v2 + 1;
v4 = ac_realloc(a1, (unsigned int)(v2 + 2));
}
else
{
v4 = ac_alloc(2LL);
}
*(_BYTE *)(v4 + v5 - 1) = a2;
*(_BYTE *)(v4 + v5) = 0;
return v4;
}
| ac_str_extend:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV AL,SIL
MOV qword ptr [RBP + -0x8],RDI
MOV byte ptr [RBP + -0x9],AL
MOV qword ptr [RBP + -0x18],0x1
MOV qword ptr [RBP + -0x20],0x0
CMP qword ptr [RBP + -0x8],0x0
JNZ 0x0010940e
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
MOV EDI,EAX
CALL 0x00107890
MOV qword ptr [RBP + -0x20],RAX
JMP 0x00109436
LAB_0010940e:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00107400
ADD RAX,0x1
MOV qword ptr [RBP + -0x18],RAX
MOV RDI,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
MOV ESI,EAX
CALL 0x001079b0
MOV qword ptr [RBP + -0x20],RAX
LAB_00109436:
MOV DL,byte ptr [RBP + -0x9]
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x18]
SUB RCX,0x1
MOV byte ptr [RAX + RCX*0x1],DL
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX + RCX*0x1],0x0
MOV RAX,qword ptr [RBP + -0x20]
ADD RSP,0x20
POP RBP
RET
|
long ac_str_extend(char *param_1,int1 param_2)
{
size_t sVar1;
int8 local_28;
int8 local_20;
local_20 = 1;
if (param_1 == (char *)0x0) {
local_28 = ac_alloc(2);
}
else {
sVar1 = strlen(param_1);
local_20 = sVar1 + 1;
local_28 = ac_realloc(param_1,(int)local_20 + 1);
}
*(int1 *)(local_28 + local_20 + -1) = param_2;
*(int1 *)(local_28 + local_20) = 0;
return local_28;
}
|
|
3,406 | my_casedn_8bit | eloqsql/strings/ctype-simple.c | size_t my_casedn_8bit(CHARSET_INFO * cs, const char *src, size_t srclen,
char *dst, size_t dstlen __attribute__((unused)))
{
const char *end= src + srclen;
register const uchar *map=cs->to_lower;
DBUG_ASSERT(srclen <= dstlen);
for ( ; src != end ; src++)
*dst++= (char) map[(uchar) *src];
return srclen;
} | O3 | c | my_casedn_8bit:
movq %rdx, %rax
testq %rdx, %rdx
je 0x3859c
pushq %rbp
movq %rsp, %rbp
movq 0x48(%rdi), %rdx
xorl %edi, %edi
movzbl (%rsi,%rdi), %r8d
movb (%rdx,%r8), %r8b
movb %r8b, (%rcx,%rdi)
incq %rdi
cmpq %rdi, %rax
jne 0x38586
popq %rbp
retq
| my_casedn_8bit:
mov rax, rdx
test rdx, rdx
jz short locret_3859C
push rbp
mov rbp, rsp
mov rdx, [rdi+48h]
xor edi, edi
loc_38586:
movzx r8d, byte ptr [rsi+rdi]
mov r8b, [rdx+r8]
mov [rcx+rdi], r8b
inc rdi
cmp rax, rdi
jnz short loc_38586
pop rbp
locret_3859C:
retn
| long long my_casedn_8bit(long long a1, long long a2, long long a3, long long a4)
{
long long result; // rax
long long v5; // rdx
long long v6; // rdi
result = a3;
if ( a3 )
{
v5 = *(_QWORD *)(a1 + 72);
v6 = 0LL;
do
{
*(_BYTE *)(a4 + v6) = *(_BYTE *)(v5 + *(unsigned __int8 *)(a2 + v6));
++v6;
}
while ( result != v6 );
}
return result;
}
| my_casedn_8bit:
MOV RAX,RDX
TEST RDX,RDX
JZ 0x0013859c
PUSH RBP
MOV RBP,RSP
MOV RDX,qword ptr [RDI + 0x48]
XOR EDI,EDI
LAB_00138586:
MOVZX R8D,byte ptr [RSI + RDI*0x1]
MOV R8B,byte ptr [RDX + R8*0x1]
MOV byte ptr [RCX + RDI*0x1],R8B
INC RDI
CMP RAX,RDI
JNZ 0x00138586
POP RBP
LAB_0013859c:
RET
|
void my_casedn_8bit(long param_1,long param_2,long param_3,long param_4)
{
long lVar1;
long lVar2;
if (param_3 != 0) {
lVar1 = *(long *)(param_1 + 0x48);
lVar2 = 0;
do {
*(int1 *)(param_4 + lVar2) = *(int1 *)(lVar1 + (ulong)*(byte *)(param_2 + lVar2));
lVar2 = lVar2 + 1;
} while (param_3 != lVar2);
}
return;
}
|
|
3,407 | ring_buffer<int>::push_back(int const&) | monkey531[P]llama/common/sampling.cpp | void push_back(const T & value) {
if (sz == capacity) {
// advance the start when buffer is full
first = (first + 1) % capacity;
} else {
sz++;
}
data[pos] = value;
pos = (pos + 1) % capacity;
} | O0 | cpp | ring_buffer<int>::push_back(int const&):
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rcx
movq %rcx, 0x10(%rsp)
movq 0x8(%rcx), %rax
cmpq (%rcx), %rax
jne 0x1cdb4e
movq 0x10(%rsp), %rcx
movq 0x10(%rcx), %rax
addq $0x1, %rax
xorl %edx, %edx
divq (%rcx)
movq 0x10(%rsp), %rax
movq %rdx, 0x10(%rax)
jmp 0x1cdb5f
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rax)
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
movl (%rcx), %ecx
movl %ecx, 0xc(%rsp)
movq %rax, %rdi
addq $0x20, %rdi
movq 0x18(%rax), %rsi
callq 0x1c5a40
movl 0xc(%rsp), %edx
movq 0x10(%rsp), %rcx
movl %edx, (%rax)
movq 0x18(%rcx), %rax
addq $0x1, %rax
xorl %edx, %edx
divq (%rcx)
movq 0x10(%rsp), %rax
movq %rdx, 0x18(%rax)
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
nop
| _ZN11ring_bufferIiE9push_backERKi:
sub rsp, 28h
mov [rsp+28h+var_8], rdi
mov [rsp+28h+var_10], rsi
mov rcx, [rsp+28h+var_8]
mov [rsp+28h+var_18], rcx
mov rax, [rcx+8]
cmp rax, [rcx]
jnz short loc_1CDB4E
mov rcx, [rsp+28h+var_18]
mov rax, [rcx+10h]
add rax, 1
xor edx, edx
div qword ptr [rcx]
mov rax, [rsp+28h+var_18]
mov [rax+10h], rdx
jmp short loc_1CDB5F
loc_1CDB4E:
mov rax, [rsp+28h+var_18]
mov rcx, [rax+8]
add rcx, 1
mov [rax+8], rcx
loc_1CDB5F:
mov rax, [rsp+28h+var_18]
mov rcx, [rsp+28h+var_10]
mov ecx, [rcx]
mov [rsp+28h+var_1C], ecx
mov rdi, rax
add rdi, 20h ; ' '
mov rsi, [rax+18h]
call _ZNSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)
mov edx, [rsp+28h+var_1C]
mov rcx, [rsp+28h+var_18]
mov [rax], edx
mov rax, [rcx+18h]
add rax, 1
xor edx, edx
div qword ptr [rcx]
mov rax, [rsp+28h+var_18]
mov [rax+18h], rdx
add rsp, 28h
retn
| _QWORD * ring_buffer<int>::push_back(_QWORD *a1, int *a2)
{
_QWORD *result; // rax
int v3; // [rsp+Ch] [rbp-1Ch]
if ( a1[1] == *a1 )
a1[2] = (unsigned long long)(a1[2] + 1LL) % *a1;
else
++a1[1];
v3 = *a2;
*(_DWORD *)std::vector<int>::operator[](a1 + 4, a1[3]) = v3;
result = a1;
a1[3] = (unsigned long long)(a1[3] + 1LL) % *a1;
return result;
}
| max_size:
PUSH RAX
MOV qword ptr [RSP],RDI
MOV RDI,qword ptr [RSP]
CALL 0x001cdb20
POP RCX
RET
|
/* __gnu_cxx::new_allocator<std::__cxx11::regex_traits<char>::_RegexMask>::max_size() const */
void __gnu_cxx::new_allocator<std::__cxx11::regex_traits<char>::_RegexMask>::max_size(void)
{
_M_max_size();
return;
}
|
|
3,408 | google::protobuf::Reflection::MapEnd(google::protobuf::Message*, google::protobuf::FieldDescriptor const*) const | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/generated_message_reflection.cc | MapIterator Reflection::MapEnd(Message* message,
const FieldDescriptor* field) const {
USAGE_CHECK(IsMapFieldInApi(field), "MapEnd", "Field is not a map field.");
MapIterator iter(message, field);
GetRaw<MapFieldBase>(*message, field).MapEnd(&iter);
return iter;
} | O0 | cpp | google::protobuf::Reflection::MapEnd(google::protobuf::Message*, google::protobuf::FieldDescriptor const*) const:
subq $0x58, %rsp
movq %rdi, 0x8(%rsp)
movq %rdi, %rax
movq %rax, 0x10(%rsp)
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movq %rcx, 0x38(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x38(%rsp), %rdi
callq 0x109740
testb $0x1, %al
jne 0x113a3d
movq 0x18(%rsp), %rax
movq (%rax), %rdi
movq 0x38(%rsp), %rsi
leaq 0xdeeec(%rip), %rdx # 0x1f291d
leaq 0xdee96(%rip), %rcx # 0x1f28ce
callq 0x10bc60
movq 0x8(%rsp), %rdi
movb $0x0, 0x37(%rsp)
movq 0x40(%rsp), %rsi
movq 0x38(%rsp), %rdx
callq 0x11df40
movq 0x18(%rsp), %rdi
movq 0x40(%rsp), %rsi
movq 0x38(%rsp), %rdx
callq 0x118840
movq %rax, (%rsp)
jmp 0x113a70
movq 0x8(%rsp), %rsi
movq (%rsp), %rdi
movq (%rdi), %rax
movq 0x30(%rax), %rax
callq *%rax
jmp 0x113a84
movb $0x1, 0x37(%rsp)
testb $0x1, 0x37(%rsp)
jne 0x113ab6
jmp 0x113aac
movq 0x8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
callq 0x11e0c0
jmp 0x113ac0
movq 0x8(%rsp), %rdi
callq 0x11e0c0
movq 0x10(%rsp), %rax
addq $0x58, %rsp
retq
movq 0x28(%rsp), %rdi
callq 0x13750
nopw (%rax,%rax)
| _ZNK6google8protobuf10Reflection6MapEndEPNS0_7MessageEPKNS0_15FieldDescriptorE:
sub rsp, 58h
mov [rsp+58h+var_50], rdi
mov rax, rdi
mov [rsp+58h+var_48], rax
mov [rsp+58h+var_8], rdi
mov [rsp+58h+var_10], rsi
mov [rsp+58h+var_18], rdx
mov [rsp+58h+var_20], rcx
mov rax, [rsp+58h+var_10]
mov [rsp+58h+var_40], rax
mov rdi, [rsp+58h+var_20]; this
call _ZN6google8protobuf12_GLOBAL__N_115IsMapFieldInApiEPKNS0_15FieldDescriptorE_0; google::protobuf::`anonymous namespace'::IsMapFieldInApi(google::protobuf::FieldDescriptor const*)
test al, 1
jnz short loc_113A3D
mov rax, [rsp+58h+var_40]
mov rdi, [rax]; this
mov rsi, [rsp+58h+var_20]; google::protobuf::Descriptor *
lea rdx, aMapend; "\"MapEnd\""
lea rcx, aFieldIsNotAMap; "Field is not a map field."
call _ZN6google8protobuf12_GLOBAL__N_126ReportReflectionUsageErrorEPKNS0_10DescriptorEPKNS0_15FieldDescriptorEPKcS9_; google::protobuf::`anonymous namespace'::ReportReflectionUsageError(google::protobuf::Descriptor const*,google::protobuf::FieldDescriptor const*,char const*,char const*)
loc_113A3D:
mov rdi, [rsp+58h+var_50]; this
mov [rsp+58h+var_21], 0
mov rsi, [rsp+58h+var_18]; google::protobuf::Message *
mov rdx, [rsp+58h+var_20]; google::protobuf::FieldDescriptor *
call _ZN6google8protobuf11MapIteratorC2EPNS0_7MessageEPKNS0_15FieldDescriptorE; google::protobuf::MapIterator::MapIterator(google::protobuf::Message *,google::protobuf::FieldDescriptor const*)
mov rdi, [rsp+58h+var_40]
mov rsi, [rsp+58h+var_18]
mov rdx, [rsp+58h+var_20]
call _ZNK6google8protobuf10Reflection6GetRawINS0_8internal12MapFieldBaseEEERKT_RKNS0_7MessageEPKNS0_15FieldDescriptorE; google::protobuf::Reflection::GetRaw<google::protobuf::internal::MapFieldBase>(google::protobuf::Message const&,google::protobuf::FieldDescriptor const*)
mov [rsp+58h+var_58], rax
jmp short $+2
loc_113A70:
mov rsi, [rsp+58h+var_50]
mov rdi, [rsp+58h+var_58]
mov rax, [rdi]
mov rax, [rax+30h]
call rax
jmp short $+2
loc_113A84:
mov [rsp+58h+var_21], 1
test [rsp+58h+var_21], 1
jnz short loc_113AB6
jmp short loc_113AAC
mov rdi, [rsp+arg_0]; this
mov rcx, rax
mov eax, edx
mov [rsp+arg_20], rcx
mov [rsp+arg_1C], eax
call _ZN6google8protobuf11MapIteratorD2Ev; google::protobuf::MapIterator::~MapIterator()
jmp short loc_113AC0
loc_113AAC:
mov rdi, [rsp+58h+var_50]; this
call _ZN6google8protobuf11MapIteratorD2Ev; google::protobuf::MapIterator::~MapIterator()
loc_113AB6:
mov rax, [rsp+58h+var_48]
add rsp, 58h
retn
loc_113AC0:
mov rdi, [rsp+arg_20]
call __Unwind_Resume
| google::protobuf::Reflection * google::protobuf::Reflection::MapEnd(
google::protobuf::Reflection *this,
google::protobuf::_anonymous_namespace_ **a2,
const google::protobuf::FieldDescriptor *a3,
const google::protobuf::Descriptor *a4)
{
const char *v4; // r8
int v5; // ecx
int v6; // r8d
int v7; // r9d
long long v9; // [rsp+0h] [rbp-58h]
if ( (google::protobuf::`anonymous namespace'::IsMapFieldInApi(
(google::protobuf::Descriptor **)a4,
(const google::protobuf::FieldDescriptor *)a2) & 1) == 0 )
google::protobuf::`anonymous namespace'::ReportReflectionUsageError(
*a2,
a4,
(const google::protobuf::FieldDescriptor *)"\"MapEnd\"",
"Field is not a map field.",
v4);
google::protobuf::MapIterator::MapIterator(this, a3, a4);
v9 = google::protobuf::Reflection::GetRaw<google::protobuf::internal::MapFieldBase>(
(_DWORD)a2,
(_DWORD)a3,
(_DWORD)a4,
v5,
v6,
v7);
(*(void ( **)(long long, google::protobuf::Reflection *))(*(_QWORD *)v9 + 48LL))(v9, this);
return this;
}
| __cxx_global_var_init:
PUSH RAX
LEA RDI,[0x37d170]
CALL 0x001136a0
MOV RDI,qword ptr [0x0037bff0]
LEA RSI,[0x37d170]
LEA RDX,[0x37c428]
CALL 0x001133c0
POP RAX
RET
|
int8 __cxx_global_var_init(void)
{
int8 in_RAX;
std::ios_base::Init::Init((Init *)&std::__ioinit);
__cxa_atexit(PTR__Init_0037bff0,&std::__ioinit,&__dso_handle);
return in_RAX;
}
|
|
3,409 | nglog::ErrnoLogMessage::~ErrnoLogMessage() | ng-log[P]ng-log/src/logging.cc | ErrnoLogMessage::~ErrnoLogMessage() {
// Don't access errno directly because it may have been altered
// while streaming the message.
stream() << ": " << StrError(preserved_errno()) << " [" << preserved_errno()
<< "]";
} | O0 | cpp | nglog::ErrnoLogMessage::~ErrnoLogMessage():
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x48(%rbp)
callq 0x148f0
movq %rax, %rdi
leaq 0x3c091(%rip), %rsi # 0x51de4
callq 0x9700
movq %rax, -0x40(%rbp)
jmp 0x15d5e
movq -0x48(%rbp), %rdi
callq 0x153d0
movl %eax, %esi
leaq -0x38(%rbp), %rdi
callq 0x15e30
jmp 0x15d74
movq -0x40(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x9610
movq %rax, -0x50(%rbp)
jmp 0x15d87
movq -0x50(%rbp), %rdi
leaq 0x3bd4b(%rip), %rsi # 0x51add
callq 0x9700
movq %rax, -0x58(%rbp)
jmp 0x15d9d
movq -0x48(%rbp), %rdi
callq 0x153d0
movq -0x58(%rbp), %rdi
movl %eax, %esi
callq 0x9d10
movq %rax, -0x60(%rbp)
jmp 0x15db7
movq -0x60(%rbp), %rdi
leaq 0x3c03b(%rip), %rsi # 0x51dfd
callq 0x9700
jmp 0x15dc9
leaq -0x38(%rbp), %rdi
callq 0x9ee8
movq -0x48(%rbp), %rdi
callq 0x150a0
addq $0x60, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x15e04
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x9ee8
movq -0x48(%rbp), %rdi
callq 0x150a0
jmp 0x15e0f
jmp 0x15e11
movq -0x10(%rbp), %rdi
callq 0x9d40
movq %rax, %rdi
callq 0xcb90
nopw %cs:(%rax,%rax)
| _ZN5nglog15ErrnoLogMessageD2Ev:
push rbp; Alternative name is 'nglog::ErrnoLogMessage::~ErrnoLogMessage()'
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]; this
mov [rbp+var_48], rdi
call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void)
mov rdi, rax
lea rsi, aRunningDuratio+1Ah; ": "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_40], rax
jmp short $+2
loc_15D5E:
mov rdi, [rbp+var_48]; this
call _ZNK5nglog10LogMessage15preserved_errnoEv; nglog::LogMessage::preserved_errno(void)
mov esi, eax
lea rdi, [rbp+var_38]
call _ZN5nglog8StrErrorB5cxx11Ei; nglog::StrError(int)
jmp short $+2
loc_15D74:
mov rdi, [rbp+var_40]
lea rsi, [rbp+var_38]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov [rbp+var_50], rax
jmp short $+2
loc_15D87:
mov rdi, [rbp+var_50]
lea rsi, asc_51ADD; " ["
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_58], rax
jmp short $+2
loc_15D9D:
mov rdi, [rbp+var_48]; this
call _ZNK5nglog10LogMessage15preserved_errnoEv; nglog::LogMessage::preserved_errno(void)
mov rdi, [rbp+var_58]
mov esi, eax
call __ZNSolsEi; std::ostream::operator<<(int)
mov [rbp+var_60], rax
jmp short $+2
loc_15DB7:
mov rdi, [rbp+var_60]
lea rsi, aLogLineFormatI+16h; "]"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_15DC9:
lea rdi, [rbp+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rdi, [rbp+var_48]; this
call _ZN5nglog10LogMessageD2Ev; nglog::LogMessage::~LogMessage()
add rsp, 60h
pop rbp
retn
mov rcx, rax
mov eax, edx
mov [rbp+var_10], rcx
mov [rbp+var_14], eax
jmp short loc_15E04
mov rcx, rax
mov eax, edx
mov [rbp+var_10], rcx
mov [rbp+var_14], eax
lea rdi, [rbp+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_15E04:
mov rdi, [rbp+var_48]; this
call _ZN5nglog10LogMessageD2Ev; nglog::LogMessage::~LogMessage()
jmp short $+2
loc_15E0F:
jmp short $+2
loc_15E11:
mov rdi, [rbp+var_10]
call __Unwind_Resume
mov rdi, rax
call __clang_call_terminate
| void nglog::ErrnoLogMessage::~ErrnoLogMessage(nglog::ErrnoLogMessage *this)
{
long long v1; // rax
unsigned int v2; // eax
unsigned int v3; // eax
long long v4; // [rsp+0h] [rbp-60h]
long long v5; // [rsp+8h] [rbp-58h]
long long v6; // [rsp+10h] [rbp-50h]
long long v7; // [rsp+20h] [rbp-40h]
_BYTE v8[36]; // [rsp+28h] [rbp-38h] BYREF
nglog::LogMessage *v9; // [rsp+58h] [rbp-8h]
v9 = this;
v1 = nglog::LogMessage::stream(this);
v7 = std::operator<<<std::char_traits<char>>(v1, ": ");
v2 = nglog::LogMessage::preserved_errno(this);
nglog::StrError[abi:cxx11](v8, v2);
v6 = std::operator<<<char>(v7, v8);
v5 = std::operator<<<std::char_traits<char>>(v6, " [");
v3 = nglog::LogMessage::preserved_errno(this);
v4 = std::ostream::operator<<(v5, v3);
std::operator<<<std::char_traits<char>>(v4, "]");
std::string::~string(v8);
nglog::LogMessage::~LogMessage(this);
}
| ~ErrnoLogMessage:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x48],RDI
CALL 0x001148f0
MOV RDI,RAX
LAB_00115d4c:
LEA RSI,[0x151de4]
CALL 0x00109700
MOV qword ptr [RBP + -0x40],RAX
JMP 0x00115d5e
LAB_00115d5e:
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x001153d0
MOV ESI,EAX
LEA RDI,[RBP + -0x38]
CALL 0x00115e30
JMP 0x00115d74
LAB_00115d74:
MOV RDI,qword ptr [RBP + -0x40]
LEA RSI,[RBP + -0x38]
CALL 0x00109610
MOV qword ptr [RBP + -0x50],RAX
JMP 0x00115d87
LAB_00115d87:
MOV RDI,qword ptr [RBP + -0x50]
LEA RSI,[0x151add]
CALL 0x00109700
MOV qword ptr [RBP + -0x58],RAX
JMP 0x00115d9d
LAB_00115d9d:
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x001153d0
MOV RDI,qword ptr [RBP + -0x58]
MOV ESI,EAX
CALL 0x00109d10
MOV qword ptr [RBP + -0x60],RAX
JMP 0x00115db7
LAB_00115db7:
MOV RDI,qword ptr [RBP + -0x60]
LEA RSI,[0x151dfd]
CALL 0x00109700
LAB_00115dc7:
JMP 0x00115dc9
LAB_00115dc9:
LEA RDI,[RBP + -0x38]
CALL 0x00109ee8
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x001150a0
ADD RSP,0x60
POP RBP
RET
|
/* nglog::ErrnoLogMessage::~ErrnoLogMessage() */
void __thiscall nglog::ErrnoLogMessage::~ErrnoLogMessage(ErrnoLogMessage *this)
{
int iVar1;
ostream *poVar2;
nglog local_40 [48];
ErrnoLogMessage *local_10;
local_10 = this;
poVar2 = (ostream *)LogMessage::stream((LogMessage *)this);
/* try { // try from 00115d4c to 00115d71 has its CatchHandler @ 00115de1 */
poVar2 = std::operator<<(poVar2,": ");
iVar1 = LogMessage::preserved_errno((LogMessage *)this);
StrError_abi_cxx11_(local_40,iVar1);
/* try { // try from 00115d74 to 00115dc6 has its CatchHandler @ 00115def */
poVar2 = std::operator<<(poVar2,(string *)local_40);
poVar2 = std::operator<<(poVar2," [");
iVar1 = LogMessage::preserved_errno((LogMessage *)this);
poVar2 = (ostream *)std::ostream::operator<<(poVar2,iVar1);
std::operator<<(poVar2,"]");
std::__cxx11::string::~string((string *)local_40);
LogMessage::~LogMessage((LogMessage *)this);
return;
}
|
|
3,410 | nglog::ErrnoLogMessage::~ErrnoLogMessage() | ng-log[P]ng-log/src/logging.cc | ErrnoLogMessage::~ErrnoLogMessage() {
// Don't access errno directly because it may have been altered
// while streaming the message.
stream() << ": " << StrError(preserved_errno()) << " [" << preserved_errno()
<< "]";
} | O3 | cpp | nglog::ErrnoLogMessage::~ErrnoLogMessage():
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movl $0x7538, %r14d # imm = 0x7538
addq 0x8(%rdi), %r14
leaq 0x17a87(%rip), %rsi # 0x23d04
movl $0x2, %edx
movq %r14, %rdi
callq 0x7600
movq 0x8(%rbx), %rax
movl (%rax), %esi
leaq 0x8(%rsp), %rdi
callq 0xc34d
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r14, %rdi
callq 0x7600
movq %rax, %r14
leaq 0x17747(%rip), %rsi # 0x239fd
movl $0x2, %edx
movq %rax, %rdi
callq 0x7600
movq 0x8(%rbx), %rax
movl (%rax), %esi
movq %r14, %rdi
callq 0x7990
leaq 0x17a45(%rip), %rsi # 0x23d1d
movl $0x1, %edx
movq %rax, %rdi
callq 0x7600
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc300
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8efc
movq %rbx, %rdi
callq 0xb98e
addq $0x28, %rsp
popq %rbx
popq %r14
retq
jmp 0xc312
movq %rax, %r14
jmp 0xc335
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc335
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8efc
movq %rbx, %rdi
callq 0xb98e
movq %r14, %rdi
callq 0x79b0
movq %rax, %rdi
callq 0x9717
| _ZN5nglog15ErrnoLogMessageD2Ev:
push r14; Alternative name is 'nglog::ErrnoLogMessage::~ErrnoLogMessage()'
push rbx
sub rsp, 28h
mov rbx, rdi
mov r14d, 7538h
add r14, [rdi+8]
lea rsi, aRunningDuratio+1Ah; ": "
mov edx, 2
mov rdi, r14
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rax, [rbx+8]
mov esi, [rax]
lea rdi, [rsp+38h+var_30]
call _ZN5nglog8StrErrorB5cxx11Ei; nglog::StrError(int)
mov rsi, [rsp+38h+var_30]
mov rdx, [rsp+38h+var_28]
mov rdi, r14
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov r14, rax
lea rsi, asc_239FD; " ["
mov edx, 2
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rax, [rbx+8]
mov esi, [rax]
mov rdi, r14
call __ZNSolsEi; std::ostream::operator<<(int)
lea rsi, aLogLineFormatI+16h; "]"
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)
lea rax, [rsp+38h+var_20]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_C300
mov rsi, [rsp+38h+var_20]
inc rsi; unsigned __int64
call _ZdlPvm; operator delete(void *,ulong)
loc_C300:
mov rdi, rbx; this
call _ZN5nglog10LogMessageD2Ev; nglog::LogMessage::~LogMessage()
add rsp, 28h
pop rbx
pop r14
retn
jmp short $+2
loc_C312:
mov r14, rax
jmp short loc_C335
mov r14, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_C335
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call _ZdlPvm; operator delete(void *,ulong)
loc_C335:
mov rdi, rbx; this
call _ZN5nglog10LogMessageD2Ev; nglog::LogMessage::~LogMessage()
mov rdi, r14
call __Unwind_Resume
mov rdi, rax
call __clang_call_terminate
| void nglog::ErrnoLogMessage::~ErrnoLogMessage(nglog::ErrnoLogMessage *this)
{
long long v1; // r14
long long v2; // r14
long long v3; // rax
void *v4[2]; // [rsp+8h] [rbp-30h] BYREF
long long v5; // [rsp+18h] [rbp-20h] BYREF
v1 = *((_QWORD *)this + 1) + 30008LL;
std::__ostream_insert<char,std::char_traits<char>>(v1, ": ", 2LL);
nglog::StrError[abi:cxx11](v4, **((unsigned int **)this + 1));
v2 = std::__ostream_insert<char,std::char_traits<char>>(v1, v4[0], v4[1]);
std::__ostream_insert<char,std::char_traits<char>>(v2, " [", 2LL);
v3 = std::ostream::operator<<(v2, **((unsigned int **)this + 1));
std::__ostream_insert<char,std::char_traits<char>>(v3, "]", 1LL);
if ( v4[0] != &v5 )
operator delete(v4[0]);
nglog::LogMessage::~LogMessage(this);
}
| ~ErrnoLogMessage:
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV RBX,RDI
MOV R14D,0x7538
ADD R14,qword ptr [RDI + 0x8]
LAB_0010c276:
LEA RSI,[0x123d04]
MOV EDX,0x2
MOV RDI,R14
CALL 0x00107600
MOV RAX,qword ptr [RBX + 0x8]
MOV ESI,dword ptr [RAX]
LAB_0010c290:
LEA RDI,[RSP + 0x8]
CALL 0x0010c34d
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_0010c2a4:
MOV RDI,R14
CALL 0x00107600
MOV R14,RAX
LEA RSI,[0x1239fd]
MOV EDX,0x2
MOV RDI,RAX
CALL 0x00107600
MOV RAX,qword ptr [RBX + 0x8]
MOV ESI,dword ptr [RAX]
MOV RDI,R14
CALL 0x00107990
LEA RSI,[0x123d1d]
MOV EDX,0x1
MOV RDI,RAX
CALL 0x00107600
LAB_0010c2e5:
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0010c300
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00108efc
LAB_0010c300:
MOV RDI,RBX
CALL 0x0010b98e
ADD RSP,0x28
POP RBX
POP R14
RET
|
/* nglog::ErrnoLogMessage::~ErrnoLogMessage() */
void __thiscall nglog::ErrnoLogMessage::~ErrnoLogMessage(ErrnoLogMessage *this)
{
long lVar1;
ostream *poVar2;
long *local_30;
long local_28;
long local_20 [2];
lVar1 = *(long *)(this + 8);
/* try { // try from 0010c276 to 0010c289 has its CatchHandler @ 0010c312 */
std::__ostream_insert<char,std::char_traits<char>>((ostream *)(lVar1 + 0x7538),": ",2);
/* try { // try from 0010c290 to 0010c299 has its CatchHandler @ 0010c310 */
StrError_abi_cxx11_((nglog *)&local_30,**(int **)(this + 8));
/* try { // try from 0010c2a4 to 0010c2e4 has its CatchHandler @ 0010c317 */
poVar2 = std::__ostream_insert<char,std::char_traits<char>>
((ostream *)(lVar1 + 0x7538),(char *)local_30,local_28);
std::__ostream_insert<char,std::char_traits<char>>(poVar2," [",2);
poVar2 = (ostream *)std::ostream::operator<<(poVar2,**(int **)(this + 8));
std::__ostream_insert<char,std::char_traits<char>>(poVar2,"]",1);
if (local_30 != local_20) {
operator_delete(local_30,local_20[0] + 1);
}
LogMessage::~LogMessage((LogMessage *)this);
return;
}
|
|
3,411 | my_thread_global_reinit | eloqsql/mysys/my_thr_init.c | void my_thread_global_reinit(void)
{
struct st_my_thread_var *tmp;
DBUG_ASSERT(my_thread_global_init_done);
#ifdef HAVE_PSI_INTERFACE
my_init_mysys_psi_keys();
#endif
my_thread_destroy_common_mutex();
my_thread_init_common_mutex();
my_thread_destroy_internal_mutex();
my_thread_init_internal_mutex();
tmp= my_thread_var;
DBUG_ASSERT(tmp);
my_thread_destory_thr_mutex(tmp);
my_thread_init_thr_mutex(tmp);
} | O0 | c | my_thread_global_reinit:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
jmp 0xfc81a
callq 0xf94a0
callq 0xfc6c0
callq 0xfc860
callq 0xfc770
callq 0xfc930
callq 0xfc990
movq %rax, -0x8(%rbp)
jmp 0xfc83e
movq -0x8(%rbp), %rdi
callq 0xfc9b0
movq -0x8(%rbp), %rdi
callq 0xfc9e0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_thread_global_reinit:
push rbp
mov rbp, rsp
sub rsp, 10h
jmp short $+2
loc_FC81A:
call my_init_mysys_psi_keys
call my_thread_destroy_common_mutex
call my_thread_init_common_mutex
call my_thread_destroy_internal_mutex
call my_thread_init_internal_mutex
call _my_thread_var
mov [rbp+var_8], rax
jmp short $+2
loc_FC83E:
mov rdi, [rbp+var_8]
call my_thread_destory_thr_mutex
mov rdi, [rbp+var_8]
call my_thread_init_thr_mutex
add rsp, 10h
pop rbp
retn
| long long my_thread_global_reinit(long long a1, const char *a2)
{
long long v3; // [rsp+8h] [rbp-8h]
my_init_mysys_psi_keys();
my_thread_destroy_common_mutex();
my_thread_init_common_mutex();
my_thread_destroy_internal_mutex();
my_thread_init_internal_mutex();
v3 = my_thread_var(a1, a2);
my_thread_destory_thr_mutex(v3);
return my_thread_init_thr_mutex(v3);
}
| my_thread_global_reinit:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
JMP 0x001fc81a
LAB_001fc81a:
CALL 0x001f94a0
CALL 0x001fc6c0
CALL 0x001fc860
CALL 0x001fc770
CALL 0x001fc930
CALL 0x001fc990
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001fc83e
LAB_001fc83e:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001fc9b0
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001fc9e0
ADD RSP,0x10
POP RBP
RET
|
void my_thread_global_reinit(void)
{
int8 uVar1;
my_init_mysys_psi_keys();
my_thread_destroy_common_mutex();
my_thread_init_common_mutex();
my_thread_destroy_internal_mutex();
my_thread_init_internal_mutex();
uVar1 = _my_thread_var();
my_thread_destory_thr_mutex(uVar1);
my_thread_init_thr_mutex(uVar1);
return;
}
|
|
3,412 | common_kv_cache_dump_view_seqs(llama_kv_cache_view const&, int) | llama.cpp/common/common.cpp | void common_kv_cache_dump_view_seqs(const llama_kv_cache_view & view, int row_size) {
static const char slot_chars[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
printf("=== Dumping KV cache. total cells %d, max sequences per cell %d, populated cells %d, total tokens in cache %d, largest empty slot=%d @ %d\n",
view.n_cells, view.n_seq_max, view.used_cells, view.token_count, view.max_contiguous, view.max_contiguous_idx);
std::unordered_map<llama_seq_id, size_t> seqs;
llama_kv_cache_view_cell * c_curr = view.cells;
llama_seq_id * cs_curr = view.cells_sequences;
for (int i = 0; i < view.n_cells; i++, c_curr++, cs_curr += view.n_seq_max) {
for (int j = 0; j < view.n_seq_max; j++) {
if (cs_curr[j] < 0) { continue; }
if (seqs.find(cs_curr[j]) == seqs.end()) {
if (seqs.size() + 1 >= sizeof(slot_chars)) { break; }
const size_t sz = seqs.size();
seqs[cs_curr[j]] = sz;
}
}
if (seqs.size() + 1 >= sizeof(slot_chars)) { break; }
}
printf("=== Sequence legend: ");
for (const auto & it : seqs) {
printf("%zu=%d, ", it.second, it.first);
}
printf("'+'=other sequence ids");
c_curr = view.cells;
cs_curr = view.cells_sequences;
for (int i = 0; i < view.n_cells; i++, c_curr++, cs_curr += view.n_seq_max) {
if (i % row_size == 0) {
printf("\n%5d: ", i);
}
for (int j = 0; j < view.n_seq_max; j++) {
if (cs_curr[j] >= 0) {
const auto & it = seqs.find(cs_curr[j]);
putchar(it != seqs.end() ? int(slot_chars[it->second]) : '+');
} else {
putchar('.');
}
}
putchar(' ');
}
printf("\n=== Done dumping\n");
} | O3 | cpp | common_kv_cache_dump_view_seqs(llama_kv_cache_view const&, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %esi, 0x14(%rsp)
movq %rdi, %r14
movl (%rdi), %esi
movl 0x4(%rdi), %edx
movl 0xc(%rdi), %ecx
movl 0x8(%rdi), %r8d
movl 0x10(%rdi), %r9d
movl 0x14(%rdi), %eax
movl %eax, (%rsp)
leaq 0x2ada3(%rip), %rdi # 0x1250ea
movq $0x0, 0x18(%rsp)
xorl %eax, %eax
callq 0x200d0
leaq 0x50(%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)
cmpl $0x0, (%r14)
jle 0xfa40a
movq 0x20(%r14), %rbp
movl 0x4(%r14), %eax
leaq 0x20(%rsp), %r15
xorl %ebx, %ebx
testl %eax, %eax
jle 0xfa3e6
movq %rbp, %r12
xorl %r13d, %r13d
cmpl $0x0, (%r12)
js 0xfa3d1
movq %r15, %rdi
movq %r12, %rsi
callq 0xfbf4a
testq %rax, %rax
jne 0xfa3d1
movq 0x38(%rsp), %rbx
leaq -0x3e(%rbx), %rax
cmpq $-0x3f, %rax
jb 0xfa3e6
movq %r15, %rdi
movq %r12, %rsi
callq 0xfbfc2
movq %rbx, (%rax)
incq %r13
movslq 0x4(%r14), %rax
addq $0x4, %r12
cmpq %rax, %r13
jl 0xfa39d
movq 0x38(%rsp), %rbx
leaq -0x3e(%rbx), %rax
cmpq $-0x3f, %rax
jb 0xfa40a
movq 0x18(%rsp), %rcx
incl %ecx
movslq 0x4(%r14), %rax
leaq (%rbp,%rax,4), %rbp
movq %rcx, 0x18(%rsp)
cmpl (%r14), %ecx
jl 0xfa393
leaq 0x2ad64(%rip), %rdi # 0x125175
xorl %eax, %eax
callq 0x200d0
movq 0x30(%rsp), %rbx
testq %rbx, %rbx
je 0xfa442
leaq 0x2ad62(%rip), %r15 # 0x12518b
movq 0x10(%rbx), %rsi
movl 0x8(%rbx), %edx
movq %r15, %rdi
xorl %eax, %eax
callq 0x200d0
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0xfa429
leaq 0x2ad4b(%rip), %rdi # 0x125194
xorl %eax, %eax
callq 0x200d0
cmpl $0x0, (%r14)
jle 0xfa4f2
movq 0x20(%r14), %r15
leaq 0x20(%rsp), %r12
xorl %ebp, %ebp
movl %ebp, %eax
cltd
idivl 0x14(%rsp)
testl %edx, %edx
jne 0xfa480
leaq 0x2ac6c(%rip), %rdi # 0x1250e3
movl %ebp, %esi
xorl %eax, %eax
callq 0x200d0
cmpl $0x0, 0x4(%r14)
jle 0xfa4d5
movq %r15, %r13
xorl %ebx, %ebx
cmpl $0x0, (%r13)
js 0xfa4b4
movq %r12, %rdi
movq %r13, %rsi
callq 0xfbf4a
testq %rax, %rax
je 0xfa4bb
movq 0x10(%rax), %rax
leaq 0x2b072(%rip), %rcx # 0x125520
movsbl (%rax,%rcx), %edi
jmp 0xfa4c0
movl $0x2e, %edi
jmp 0xfa4c0
movl $0x2b, %edi
callq 0x21320
incq %rbx
movslq 0x4(%r14), %rax
addq $0x4, %r13
cmpq %rax, %rbx
jl 0xfa48c
movl $0x20, %edi
callq 0x21320
incl %ebp
movslq 0x4(%r14), %rax
leaq (%r15,%rax,4), %r15
cmpl (%r14), %ebp
jl 0xfa465
leaq 0x2afca(%rip), %rdi # 0x1254c3
callq 0x21120
leaq 0x20(%rsp), %rdi
callq 0xfacd2
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xfa51b
jmp 0xfa51b
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xfacd2
movq %rbx, %rdi
callq 0x20b00
| _Z30common_kv_cache_dump_view_seqsRK19llama_kv_cache_viewi:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov [rsp+88h+var_74], esi
mov r14, rdi
mov esi, [rdi]
mov edx, [rdi+4]
mov ecx, [rdi+0Ch]
mov r8d, [rdi+8]
mov r9d, [rdi+10h]
mov eax, [rdi+14h]
mov [rsp+88h+var_88], eax
lea rdi, aDumpingKvCache_0; "=== Dumping KV cache. total cells %d, m"...
mov [rsp+88h+var_70], 0
xor eax, eax
call _printf
lea rax, [rsp+88h+var_38]
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
cmp dword ptr [r14], 0
jle loc_FA40A
mov rbp, [r14+20h]
mov eax, [r14+4]
lea r15, [rsp+88h+var_68]
xor ebx, ebx
loc_FA393:
test eax, eax
jle short loc_FA3E6
mov r12, rbp
xor r13d, r13d
loc_FA39D:
cmp dword ptr [r12], 0
js short loc_FA3D1
mov rdi, r15
mov rsi, r12
call _ZNSt10_HashtableIiSt4pairIKimESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEE4findERS1_; std::_Hashtable<int,std::pair<int const,ulong>,std::allocator<std::pair<int const,ulong>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::find(int const&)
test rax, rax
jnz short loc_FA3D1
mov rbx, [rsp+88h+var_50]
lea rax, [rbx-3Eh]
cmp rax, 0FFFFFFFFFFFFFFC1h
jb short loc_FA3E6
mov rdi, r15
mov rsi, r12
call _ZNSt8__detail9_Map_baseIiSt4pairIKimESaIS3_ENS_10_Select1stESt8equal_toIiESt4hashIiENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb0ELb0ELb1EEELb1EEixERS2_; std::__detail::_Map_base<int,std::pair<int const,ulong>,std::allocator<std::pair<int const,ulong>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[](int const&)
mov [rax], rbx
loc_FA3D1:
inc r13
movsxd rax, dword ptr [r14+4]
add r12, 4
cmp r13, rax
jl short loc_FA39D
mov rbx, [rsp+88h+var_50]
loc_FA3E6:
lea rax, [rbx-3Eh]
cmp rax, 0FFFFFFFFFFFFFFC1h
jb short loc_FA40A
mov rcx, [rsp+88h+var_70]
inc ecx
movsxd rax, dword ptr [r14+4]
lea rbp, [rbp+rax*4+0]
mov [rsp+88h+var_70], rcx
cmp ecx, [r14]
jl short loc_FA393
loc_FA40A:
lea rdi, aSequenceLegend; "=== Sequence legend: "
xor eax, eax
call _printf
mov rbx, [rsp+88h+var_58]
test rbx, rbx
jz short loc_FA442
lea r15, aZuD; "%zu=%d, "
loc_FA429:
mov rsi, [rbx+10h]
mov edx, [rbx+8]
mov rdi, r15
xor eax, eax
call _printf
mov rbx, [rbx]
test rbx, rbx
jnz short loc_FA429
loc_FA442:
lea rdi, aOtherSequenceI; "'+'=other sequence ids"
xor eax, eax
call _printf
cmp dword ptr [r14], 0
jle loc_FA4F2
mov r15, [r14+20h]
lea r12, [rsp+88h+var_68]
xor ebp, ebp
loc_FA465:
mov eax, ebp
cdq
idiv [rsp+88h+var_74]
test edx, edx
jnz short loc_FA480
lea rdi, a5d; "\n%5d: "
mov esi, ebp
xor eax, eax
call _printf
loc_FA480:
cmp dword ptr [r14+4], 0
jle short loc_FA4D5
mov r13, r15
xor ebx, ebx
loc_FA48C:
cmp dword ptr [r13+0], 0
js short loc_FA4B4
mov rdi, r12
mov rsi, r13
call _ZNSt10_HashtableIiSt4pairIKimESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEE4findERS1_; std::_Hashtable<int,std::pair<int const,ulong>,std::allocator<std::pair<int const,ulong>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::find(int const&)
test rax, rax
jz short loc_FA4BB
mov rax, [rax+10h]
lea rcx, _ZZ30common_kv_cache_dump_view_seqsRK19llama_kv_cache_viewiE10slot_chars; "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabc"...
movsx edi, byte ptr [rax+rcx]
jmp short loc_FA4C0
loc_FA4B4:
mov edi, 2Eh ; '.'
jmp short loc_FA4C0
loc_FA4BB:
mov edi, 2Bh ; '+'
loc_FA4C0:
call _putchar
inc rbx
movsxd rax, dword ptr [r14+4]
add r13, 4
cmp rbx, rax
jl short loc_FA48C
loc_FA4D5:
mov edi, 20h ; ' '
call _putchar
inc ebp
movsxd rax, dword ptr [r14+4]
lea r15, [r15+rax*4]
cmp ebp, [r14]
jl loc_FA465
loc_FA4F2:
lea rdi, aDoneDumping; "\n=== Done dumping"
call _puts
lea rdi, [rsp+88h+var_68]
call _ZNSt10_HashtableIiSt4pairIKimESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<int,std::pair<int const,ulong>,std::allocator<std::pair<int const,ulong>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable()
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_FA51B
jmp short $+2
loc_FA51B:
mov rbx, rax
lea rdi, [rsp+arg_18]
call _ZNSt10_HashtableIiSt4pairIKimESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<int,std::pair<int const,ulong>,std::allocator<std::pair<int const,ulong>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable()
mov rdi, rbx
call __Unwind_Resume
| long long common_kv_cache_dump_view_seqs(long long a1, int a2)
{
int *v3; // rbp
long long v4; // rax
long long v5; // rbx
int *v6; // r12
long long v7; // r13
long long *i; // rbx
int *v9; // r15
int v10; // ebp
int *v11; // r13
long long v12; // rbx
long long v13; // rax
long long v14; // rdi
int v16; // [rsp+18h] [rbp-70h]
_QWORD v17[2]; // [rsp+20h] [rbp-68h] BYREF
__int128 v18; // [rsp+30h] [rbp-58h]
int v19; // [rsp+40h] [rbp-48h]
__int128 v20; // [rsp+48h] [rbp-40h] BYREF
v16 = 0;
printf(
"=== Dumping KV cache. total cells %d, max sequences per cell %d, populated cells %d, total tokens in cache %d, large"
"st empty slot=%d @ %d\n",
*(_DWORD *)a1,
*(_DWORD *)(a1 + 4),
*(_DWORD *)(a1 + 12),
*(_DWORD *)(a1 + 8),
*(_DWORD *)(a1 + 16),
*(_DWORD *)(a1 + 20));
v17[0] = (char *)&v20 + 8;
v17[1] = 1LL;
v18 = 0LL;
v19 = 1065353216;
v20 = 0LL;
if ( *(int *)a1 > 0 )
{
v3 = *(int **)(a1 + 32);
LODWORD(v4) = *(_DWORD *)(a1 + 4);
v5 = 0LL;
do
{
if ( (int)v4 > 0 )
{
v6 = v3;
v7 = 0LL;
do
{
if ( *v6 >= 0
&& !std::_Hashtable<int,std::pair<int const,unsigned long>,std::allocator<std::pair<int const,unsigned long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::find(
v17,
v6) )
{
v5 = *((_QWORD *)&v18 + 1);
if ( (unsigned long long)(*((_QWORD *)&v18 + 1) - 62LL) < 0xFFFFFFFFFFFFFFC1LL )
goto LABEL_11;
*(_QWORD *)std::__detail::_Map_base<int,std::pair<int const,unsigned long>,std::allocator<std::pair<int const,unsigned long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[](
v17,
v6) = v5;
}
++v7;
++v6;
}
while ( v7 < *(int *)(a1 + 4) );
v5 = *((_QWORD *)&v18 + 1);
}
LABEL_11:
if ( (unsigned long long)(v5 - 62) < 0xFFFFFFFFFFFFFFC1LL )
break;
v4 = *(int *)(a1 + 4);
v3 += v4;
++v16;
}
while ( v16 < *(_DWORD *)a1 );
}
printf("=== Sequence legend: ");
for ( i = (long long *)v18; i; i = (long long *)*i )
printf("%zu=%d, ", i[2], *((_DWORD *)i + 2));
printf("'+'=other sequence ids");
if ( *(int *)a1 > 0 )
{
v9 = *(int **)(a1 + 32);
v10 = 0;
do
{
if ( !(v10 % a2) )
printf("\n%5d: ", v10);
if ( *(int *)(a1 + 4) > 0 )
{
v11 = v9;
v12 = 0LL;
do
{
if ( *v11 < 0 )
{
v14 = 46LL;
}
else
{
v13 = std::_Hashtable<int,std::pair<int const,unsigned long>,std::allocator<std::pair<int const,unsigned long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::find(
v17,
v11);
if ( v13 )
v14 = (unsigned int)common_kv_cache_dump_view_seqs(llama_kv_cache_view const&,int)::slot_chars[*(_QWORD *)(v13 + 16)];
else
v14 = 43LL;
}
putchar(v14);
++v12;
++v11;
}
while ( v12 < *(int *)(a1 + 4) );
}
putchar(32LL);
++v10;
v9 += *(int *)(a1 + 4);
}
while ( v10 < *(_DWORD *)a1 );
}
puts("\n=== Done dumping");
return std::_Hashtable<int,std::pair<int const,unsigned long>,std::allocator<std::pair<int const,unsigned long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable(v17);
}
| common_kv_cache_dump_view_seqs:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV dword ptr [RSP + 0x14],ESI
MOV R14,RDI
MOV ESI,dword ptr [RDI]
MOV EDX,dword ptr [RDI + 0x4]
MOV ECX,dword ptr [RDI + 0xc]
MOV R8D,dword ptr [RDI + 0x8]
MOV R9D,dword ptr [RDI + 0x10]
MOV EAX,dword ptr [RDI + 0x14]
MOV dword ptr [RSP],EAX
LEA RDI,[0x2250ea]
MOV qword ptr [RSP + 0x18],0x0
XOR EAX,EAX
CALL 0x001200d0
LEA RAX,[RSP + 0x50]
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
CMP dword ptr [R14],0x0
JLE 0x001fa40a
MOV RBP,qword ptr [R14 + 0x20]
MOV EAX,dword ptr [R14 + 0x4]
LEA R15,[RSP + 0x20]
XOR EBX,EBX
LAB_001fa393:
TEST EAX,EAX
JLE 0x001fa3e6
MOV R12,RBP
XOR R13D,R13D
LAB_001fa39d:
CMP dword ptr [R12],0x0
JS 0x001fa3d1
LAB_001fa3a4:
MOV RDI,R15
MOV RSI,R12
CALL 0x001fbf4a
TEST RAX,RAX
JNZ 0x001fa3d1
MOV RBX,qword ptr [RSP + 0x38]
LEA RAX,[RBX + -0x3e]
CMP RAX,-0x3f
JC 0x001fa3e6
LAB_001fa3c3:
MOV RDI,R15
MOV RSI,R12
CALL 0x001fbfc2
MOV qword ptr [RAX],RBX
LAB_001fa3d1:
INC R13
MOVSXD RAX,dword ptr [R14 + 0x4]
ADD R12,0x4
CMP R13,RAX
JL 0x001fa39d
MOV RBX,qword ptr [RSP + 0x38]
LAB_001fa3e6:
LEA RAX,[RBX + -0x3e]
CMP RAX,-0x3f
JC 0x001fa40a
MOV RCX,qword ptr [RSP + 0x18]
INC ECX
MOVSXD RAX,dword ptr [R14 + 0x4]
LEA RBP,[RBP + RAX*0x4]
MOV qword ptr [RSP + 0x18],RCX
CMP ECX,dword ptr [R14]
JL 0x001fa393
LAB_001fa40a:
LEA RDI,[0x225175]
XOR EAX,EAX
CALL 0x001200d0
MOV RBX,qword ptr [RSP + 0x30]
TEST RBX,RBX
JZ 0x001fa442
LEA R15,[0x22518b]
LAB_001fa429:
MOV RSI,qword ptr [RBX + 0x10]
MOV EDX,dword ptr [RBX + 0x8]
MOV RDI,R15
XOR EAX,EAX
CALL 0x001200d0
MOV RBX,qword ptr [RBX]
TEST RBX,RBX
JNZ 0x001fa429
LAB_001fa442:
LEA RDI,[0x225194]
XOR EAX,EAX
CALL 0x001200d0
CMP dword ptr [R14],0x0
JLE 0x001fa4f2
MOV R15,qword ptr [R14 + 0x20]
LEA R12,[RSP + 0x20]
XOR EBP,EBP
LAB_001fa465:
MOV EAX,EBP
CDQ
IDIV dword ptr [RSP + 0x14]
TEST EDX,EDX
JNZ 0x001fa480
LEA RDI,[0x2250e3]
MOV ESI,EBP
XOR EAX,EAX
CALL 0x001200d0
LAB_001fa480:
CMP dword ptr [R14 + 0x4],0x0
JLE 0x001fa4d5
MOV R13,R15
XOR EBX,EBX
LAB_001fa48c:
CMP dword ptr [R13],0x0
JS 0x001fa4b4
LAB_001fa493:
MOV RDI,R12
MOV RSI,R13
CALL 0x001fbf4a
LAB_001fa49e:
TEST RAX,RAX
JZ 0x001fa4bb
MOV RAX,qword ptr [RAX + 0x10]
LEA RCX,[0x225520]
MOVSX EDI,byte ptr [RAX + RCX*0x1]
JMP 0x001fa4c0
LAB_001fa4b4:
MOV EDI,0x2e
JMP 0x001fa4c0
LAB_001fa4bb:
MOV EDI,0x2b
LAB_001fa4c0:
CALL 0x00121320
INC RBX
MOVSXD RAX,dword ptr [R14 + 0x4]
ADD R13,0x4
CMP RBX,RAX
JL 0x001fa48c
LAB_001fa4d5:
MOV EDI,0x20
CALL 0x00121320
INC EBP
MOVSXD RAX,dword ptr [R14 + 0x4]
LEA R15,[R15 + RAX*0x4]
CMP EBP,dword ptr [R14]
JL 0x001fa465
LAB_001fa4f2:
LEA RDI,[0x2254c3]
CALL 0x00121120
LEA RDI,[RSP + 0x20]
CALL 0x001facd2
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* common_kv_cache_dump_view_seqs(llama_kv_cache_view const&, int) */
void common_kv_cache_dump_view_seqs(llama_kv_cache_view *param_1,int param_2)
{
int8 *puVar1;
long lVar2;
long *plVar3;
ulong uVar4;
int iVar5;
long lVar6;
uint uVar7;
int *piVar8;
int *piVar9;
long lVar10;
int8 *local_68;
int8 local_60;
int8 *local_58;
long lStack_50;
int4 local_48;
int8 local_40;
int8 uStack_38;
iVar5 = 0;
printf("=== Dumping KV cache. total cells %d, max sequences per cell %d, populated cells %d, total tokens in cache %d, largest empty slot=%d @ %d\n"
,(ulong)*(uint *)param_1,(ulong)*(uint *)(param_1 + 4),(ulong)*(uint *)(param_1 + 0xc),
(ulong)*(uint *)(param_1 + 8),(ulong)*(uint *)(param_1 + 0x10),
*(int4 *)(param_1 + 0x14));
local_68 = &uStack_38;
local_60 = 1;
local_58 = (int8 *)0x0;
lStack_50 = 0;
local_48 = 0x3f800000;
local_40 = 0;
uStack_38 = 0;
if (0 < *(int *)param_1) {
piVar8 = *(int **)(param_1 + 0x20);
uVar4 = (ulong)*(uint *)(param_1 + 4);
lVar6 = 0;
do {
if (0 < (int)uVar4) {
lVar10 = 0;
piVar9 = piVar8;
do {
/* try { // try from 001fa3a4 to 001fa3ae has its CatchHandler @ 001fa519 */
if ((-1 < *piVar9) &&
(lVar2 = std::
_Hashtable<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>
::find((_Hashtable<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>
*)&local_68,piVar9), lVar6 = lStack_50, lVar2 == 0)) {
if (lStack_50 - 0x3eU < 0xffffffffffffffc1) break;
/* try { // try from 001fa3c3 to 001fa3cd has its CatchHandler @ 001fa517 */
plVar3 = (long *)std::__detail::
_Map_base<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>
::operator[]((_Map_base<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>
*)&local_68,piVar9);
*plVar3 = lVar6;
}
lVar10 = lVar10 + 1;
piVar9 = piVar9 + 1;
lVar6 = lStack_50;
} while (lVar10 < *(int *)(param_1 + 4));
}
if (lVar6 - 0x3eU < 0xffffffffffffffc1) break;
iVar5 = iVar5 + 1;
uVar4 = (ulong)*(int *)(param_1 + 4);
piVar8 = piVar8 + uVar4;
} while (iVar5 < *(int *)param_1);
}
printf("=== Sequence legend: ");
for (puVar1 = local_58; puVar1 != (int8 *)0x0; puVar1 = (int8 *)*puVar1) {
printf("%zu=%d, ",puVar1[2],(ulong)*(uint *)(puVar1 + 1));
}
printf("\'+\'=other sequence ids");
if (0 < *(int *)param_1) {
piVar8 = *(int **)(param_1 + 0x20);
uVar7 = 0;
do {
if ((int)uVar7 % param_2 == 0) {
printf("\n%5d: ",(ulong)uVar7);
}
if (0 < *(int *)(param_1 + 4)) {
lVar6 = 0;
piVar9 = piVar8;
do {
if (*piVar9 < 0) {
iVar5 = 0x2e;
}
else {
/* try { // try from 001fa493 to 001fa49d has its CatchHandler @ 001fa51b */
lVar10 = std::
_Hashtable<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>
::find((_Hashtable<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>
*)&local_68,piVar9);
if (lVar10 == 0) {
iVar5 = 0x2b;
}
else {
iVar5 = (int)"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
[*(long *)(lVar10 + 0x10)];
}
}
putchar(iVar5);
lVar6 = lVar6 + 1;
piVar9 = piVar9 + 1;
} while (lVar6 < *(int *)(param_1 + 4));
}
putchar(0x20);
uVar7 = uVar7 + 1;
piVar8 = piVar8 + *(int *)(param_1 + 4);
} while ((int)uVar7 < *(int *)param_1);
}
puts("\n=== Done dumping");
std::
_Hashtable<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>
::~_Hashtable((_Hashtable<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>
*)&local_68);
return;
}
|
|
3,413 | mi_calc_blob_length | eloqsql/storage/myisam/mi_dynrec.c | ulong _mi_calc_blob_length(uint length, const uchar *pos)
{
switch (length) {
case 1:
return (uint) (uchar) *pos;
case 2:
return (uint) uint2korr(pos);
case 3:
return uint3korr(pos);
case 4:
return uint4korr(pos);
default:
break;
}
return 0; /* Impossible */
} | O0 | c | mi_calc_blob_length:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
movl -0xc(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x20(%rbp)
subl $0x3, %eax
ja 0xab142
movq -0x20(%rbp), %rax
leaq 0xae2a6(%rip), %rcx # 0x15938c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %eax
movq %rax, -0x8(%rbp)
jmp 0xab14c
movq -0x18(%rbp), %rax
movzwl (%rax), %eax
movl %eax, %eax
movq %rax, -0x8(%rbp)
jmp 0xab14c
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
movq -0x18(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x18(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movl %eax, %eax
movq %rax, -0x8(%rbp)
jmp 0xab14c
movq -0x18(%rbp), %rax
movl (%rax), %eax
movq %rax, -0x8(%rbp)
jmp 0xab14c
jmp 0xab144
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _mi_calc_blob_length:
push rbp
mov rbp, rsp
mov [rbp+var_C], edi
mov [rbp+var_18], rsi
mov eax, [rbp+var_C]
dec eax; switch 4 cases
mov ecx, eax
mov [rbp+var_20], rcx
sub eax, 3
ja short def_AB0ED; jumptable 00000000000AB0ED default case
mov rax, [rbp+var_20]
lea rcx, jpt_AB0ED
movsxd rax, ds:(jpt_AB0ED - 15938Ch)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_AB0EF:
mov rax, [rbp+var_18]; jumptable 00000000000AB0ED case 1
movzx eax, byte ptr [rax]
mov eax, eax
mov [rbp+var_8], rax
jmp short loc_AB14C
loc_AB0FE:
mov rax, [rbp+var_18]; jumptable 00000000000AB0ED case 2
movzx eax, word ptr [rax]
mov eax, eax
mov [rbp+var_8], rax
jmp short loc_AB14C
loc_AB10D:
mov rax, [rbp+var_18]; jumptable 00000000000AB0ED case 3
movzx eax, byte ptr [rax]
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+1]
shl ecx, 8
or eax, ecx
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+2]
shl ecx, 10h
or eax, ecx
mov eax, eax
mov [rbp+var_8], rax
jmp short loc_AB14C
loc_AB136:
mov rax, [rbp+var_18]; jumptable 00000000000AB0ED case 4
mov eax, [rax]
mov [rbp+var_8], rax
jmp short loc_AB14C
def_AB0ED:
jmp short $+2; jumptable 00000000000AB0ED default case
loc_AB144:
mov [rbp+var_8], 0
loc_AB14C:
mov rax, [rbp+var_8]
pop rbp
retn
| long long mi_calc_blob_length(int a1, unsigned __int8 *a2)
{
long long v3; // [rsp+18h] [rbp-8h]
switch ( a1 )
{
case 1:
v3 = *a2;
break;
case 2:
v3 = *(unsigned __int16 *)a2;
break;
case 3:
v3 = (a2[2] << 16) | (unsigned int)*(unsigned __int16 *)a2;
break;
case 4:
v3 = *(unsigned int *)a2;
break;
default:
v3 = 0LL;
break;
}
return v3;
}
| _mi_calc_blob_length:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0xc],EDI
MOV qword ptr [RBP + -0x18],RSI
MOV EAX,dword ptr [RBP + -0xc]
DEC EAX
MOV ECX,EAX
MOV qword ptr [RBP + -0x20],RCX
SUB EAX,0x3
JA 0x001ab142
MOV RAX,qword ptr [RBP + -0x20]
LEA RCX,[0x25938c]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
MOV EAX,EAX
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001ab14c
caseD_2:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,word ptr [RAX]
MOV EAX,EAX
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001ab14c
caseD_3:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x1]
SHL ECX,0x8
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x2]
SHL ECX,0x10
OR EAX,ECX
MOV EAX,EAX
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001ab14c
caseD_4:
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001ab14c
default:
JMP 0x001ab144
LAB_001ab144:
MOV qword ptr [RBP + -0x8],0x0
LAB_001ab14c:
MOV RAX,qword ptr [RBP + -0x8]
POP RBP
RET
|
uint _mi_calc_blob_length(int4 param_1,uint *param_2)
{
uint uVar1;
switch(param_1) {
case 1:
uVar1 = (uint)(byte)*param_2;
break;
case 2:
uVar1 = (uint)(ushort)*param_2;
break;
case 3:
uVar1 = (uint)(uint3)*param_2;
break;
case 4:
uVar1 = *param_2;
break;
default:
uVar1 = 0;
}
return uVar1;
}
|
|
3,414 | LefDefParser::lefiLayer::addDcTableEntry() | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiLayer.cpp | void
lefiLayer::addDcTableEntry()
{
lefiLayerDensity *density;
density = dccurrents_[numDccurrents_ - 1];
density->addTableEntry(numNums_, nums_);
numNums_ = 0;
numAllocated_ = 0;
nums_ = 0;
} | O0 | cpp | LefDefParser::lefiLayer::addDcTableEntry():
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq 0x390(%rax), %rcx
movl 0x388(%rax), %edx
subl $0x1, %edx
movslq %edx, %rdx
movq (%rcx,%rdx,8), %rcx
movq %rcx, 0x8(%rsp)
movq 0x8(%rsp), %rdi
movl 0x398(%rax), %esi
movq 0x3a0(%rax), %rdx
callq 0x1b000
movq (%rsp), %rax
movl $0x0, 0x398(%rax)
movl $0x0, 0x39c(%rax)
movq $0x0, 0x3a0(%rax)
addq $0x18, %rsp
retq
nopl (%rax)
| _ZN12LefDefParser9lefiLayer15addDcTableEntryEv:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov rax, [rsp+18h+var_8]
mov [rsp+18h+var_18], rax
mov rcx, [rax+390h]
mov edx, [rax+388h]
sub edx, 1
movsxd rdx, edx
mov rcx, [rcx+rdx*8]
mov [rsp+18h+var_10], rcx
mov rdi, [rsp+18h+var_10]; this
mov esi, [rax+398h]; int
mov rdx, [rax+3A0h]; double *
call _ZN12LefDefParser16lefiLayerDensity13addTableEntryEiPd; LefDefParser::lefiLayerDensity::addTableEntry(int,double *)
mov rax, [rsp+18h+var_18]
mov dword ptr [rax+398h], 0
mov dword ptr [rax+39Ch], 0
mov qword ptr [rax+3A0h], 0
add rsp, 18h
retn
| LefDefParser::lefiLayer * LefDefParser::lefiLayer::addDcTableEntry(LefDefParser::lefiLayer *this)
{
LefDefParser::lefiLayer *result; // rax
LefDefParser::lefiLayerDensity::addTableEntry(
*(LefDefParser::lefiLayerDensity **)(*((_QWORD *)this + 114) + 8LL * (*((_DWORD *)this + 226) - 1)),
*((_DWORD *)this + 230),
*((double **)this + 116));
result = this;
*((_DWORD *)this + 230) = 0;
*((_DWORD *)this + 231) = 0;
*((_QWORD *)this + 116) = 0LL;
return result;
}
| addDcTableEntry:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP],RAX
MOV RCX,qword ptr [RAX + 0x390]
MOV EDX,dword ptr [RAX + 0x388]
SUB EDX,0x1
MOVSXD RDX,EDX
MOV RCX,qword ptr [RCX + RDX*0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RDI,qword ptr [RSP + 0x8]
MOV ESI,dword ptr [RAX + 0x398]
MOV RDX,qword ptr [RAX + 0x3a0]
CALL 0x0011b000
MOV RAX,qword ptr [RSP]
MOV dword ptr [RAX + 0x398],0x0
MOV dword ptr [RAX + 0x39c],0x0
MOV qword ptr [RAX + 0x3a0],0x0
ADD RSP,0x18
RET
|
/* LefDefParser::lefiLayer::addDcTableEntry() */
void __thiscall LefDefParser::lefiLayer::addDcTableEntry(lefiLayer *this)
{
lefiLayerDensity::addTableEntry
(*(lefiLayerDensity **)
(*(long *)(this + 0x390) + (long)(*(int *)(this + 0x388) + -1) * 8),
*(int *)(this + 0x398),*(double **)(this + 0x3a0));
*(int4 *)(this + 0x398) = 0;
*(int4 *)(this + 0x39c) = 0;
*(int8 *)(this + 0x3a0) = 0;
return;
}
|
|
3,415 | ftxui::Event::Character(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>) | Andrewchistyakov[P]flashcards_lyc/build_O1/_deps/ftxui-src/src/ftxui/component/event.cpp | Event Event::Character(std::string input) {
Event event;
event.input_ = std::move(input);
event.type_ = Type::Character;
return event;
} | O1 | cpp | ftxui::Event::Character(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>):
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %eax, %eax
movq %rax, (%rdi)
movabsq $0x300000000, %rcx # imm = 0x300000000
movq %rcx, 0x8(%rdi)
movl $0x1, %ebp
movl %ebp, 0x10(%rdi)
movw $0x0, 0x14(%rdi)
movb %al, 0x16(%rdi)
movq %rax, 0x18(%rdi)
addq $0x20, %rdi
leaq 0x30(%rbx), %rcx
movq %rcx, 0x20(%rbx)
movq %rax, 0x28(%rbx)
movb %al, 0x30(%rbx)
callq 0xb500
movl %ebp, 0x8(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
| _ZN5ftxui5Event9CharacterENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push rbx
push rax
mov rbx, rdi
xor eax, eax
mov [rdi], rax
mov rcx, 300000000h
mov [rdi+8], rcx
mov ebp, 1
mov [rdi+10h], ebp
mov word ptr [rdi+14h], 0
mov [rdi+16h], al
mov [rdi+18h], rax
add rdi, 20h ; ' '
lea rcx, [rbx+30h]
mov [rbx+20h], rcx
mov [rbx+28h], rax
mov [rbx+30h], al
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov [rbx+8], ebp
mov rax, rbx
add rsp, 8
pop rbx
pop rbp
retn
| long long ftxui::Event::Character(long long a1, long long a2)
{
*(_QWORD *)a1 = 0LL;
*(_QWORD *)(a1 + 8) = 0x300000000LL;
*(_DWORD *)(a1 + 16) = 1;
*(_WORD *)(a1 + 20) = 0;
*(_BYTE *)(a1 + 22) = 0;
*(_QWORD *)(a1 + 24) = 0LL;
*(_QWORD *)(a1 + 32) = a1 + 48;
*(_QWORD *)(a1 + 40) = 0LL;
*(_BYTE *)(a1 + 48) = 0;
std::string::operator=(a1 + 32, a2);
*(_DWORD *)(a1 + 8) = 1;
return a1;
}
| Character:
PUSH RBP
PUSH RBX
PUSH RAX
MOV RBX,RDI
XOR EAX,EAX
MOV qword ptr [RDI],RAX
MOV RCX,0x300000000
MOV qword ptr [RDI + 0x8],RCX
MOV EBP,0x1
MOV dword ptr [RDI + 0x10],EBP
MOV word ptr [RDI + 0x14],0x0
MOV byte ptr [RDI + 0x16],AL
MOV qword ptr [RDI + 0x18],RAX
ADD RDI,0x20
LEA RCX,[RBX + 0x30]
MOV qword ptr [RBX + 0x20],RCX
MOV qword ptr [RBX + 0x28],RAX
MOV byte ptr [RBX + 0x30],AL
CALL 0x0010b500
MOV dword ptr [RBX + 0x8],EBP
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP RBP
RET
|
/* ftxui::Event::Character(std::__cxx11::string) */
Event * __thiscall ftxui::Event::Character(Event *this,string *param_2)
{
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0x300000000;
*(int4 *)(this + 0x10) = 1;
*(int2 *)(this + 0x14) = 0;
this[0x16] = (Event)0x0;
*(int8 *)(this + 0x18) = 0;
*(Event **)(this + 0x20) = this + 0x30;
*(int8 *)(this + 0x28) = 0;
this[0x30] = (Event)0x0;
std::__cxx11::string::operator=((string *)(this + 0x20),param_2);
*(int4 *)(this + 8) = 1;
return this;
}
|
|
3,416 | OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::VertexDescriptor::finalize() | NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/unorderedSubset.cpp | bool UnorderedSubset::VertexDescriptor::finalize() {
if (!isValid)
return false;
// Test for valid face size assignments while converting the sizes
// to offsets. Also detect if the faces are all the same size -- in
// which case, ignore the explicit assignments:
if (hasFaceSizes) {
int size0 = faceSizeOffsets[0];
bool sameSizes = true;
int sum = 0;
for (int i = 0; i < numFaces; ++i) {
int faceSize = faceSizeOffsets[i];
if ((faceSize < 3) || (faceSize > Vtr::VALENCE_LIMIT)) {
isValid = false;
return false;
}
sameSizes &= (faceSize == size0);
faceSizeOffsets[i] = sum;
sum += faceSize;
}
faceSizeOffsets[numFaces] = sum;
// No need to make use of explicit face sizes and offsets:
if (sameSizes)
hasFaceSizes = false;
}
return (isFinallized = true);
} | O2 | cpp | OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::VertexDescriptor::finalize():
movb 0x8(%rdi), %dl
testb $0x1, %dl
jne 0xba535
xorl %eax, %eax
retq
testb $0x8, %dl
je 0xba595
movq 0x10(%rdi), %rax
movl (%rax), %esi
movzwl 0x4(%rdi), %edx
xorl %r8d, %r8d
movb $0x1, %cl
xorl %r9d, %r9d
cmpq %r8, %rdx
je 0xba580
movl (%rax,%r8,4), %r10d
leal -0x3(%r10), %r11d
cmpl $0xfffc, %r11d # imm = 0xFFFC
ja 0xba59c
cmpl %esi, %r10d
sete %r11b
testb %cl, %cl
setne %cl
andb %r11b, %cl
movl %r9d, (%rax,%r8,4)
addl %r9d, %r10d
incq %r8
movl %r10d, %r9d
jmp 0xba54c
movl %r9d, (%rax,%rdx,4)
movl 0x8(%rdi), %eax
movl %eax, %edx
andb $-0x9, %dl
movzbl %dl, %edx
testb $0x1, %cl
cmovel %eax, %edx
orb $0x4, %dl
movb $0x1, %al
jmp 0xba5a4
movb 0x8(%rdi), %dl
andb $-0x2, %dl
xorl %eax, %eax
movb %dl, 0x8(%rdi)
retq
| _ZN10OpenSubdiv6v3_6_03Tmr15UnorderedSubset16VertexDescriptor8finalizeEv:
mov dl, [rdi+8]
test dl, 1
jnz short loc_BA535
xor eax, eax
retn
loc_BA535:
test dl, 8
jz short loc_BA595
mov rax, [rdi+10h]
mov esi, [rax]
movzx edx, word ptr [rdi+4]
xor r8d, r8d
mov cl, 1
xor r9d, r9d
loc_BA54C:
cmp rdx, r8
jz short loc_BA580
mov r10d, [rax+r8*4]
lea r11d, [r10-3]
cmp r11d, 0FFFCh
ja short loc_BA59C
cmp r10d, esi
setz r11b
test cl, cl
setnz cl
and cl, r11b
mov [rax+r8*4], r9d
add r10d, r9d
inc r8
mov r9d, r10d
jmp short loc_BA54C
loc_BA580:
mov [rax+rdx*4], r9d
mov eax, [rdi+8]
mov edx, eax
and dl, 0F7h
movzx edx, dl
test cl, 1
cmovz edx, eax
loc_BA595:
or dl, 4
mov al, 1
jmp short loc_BA5A4
loc_BA59C:
mov dl, [rdi+8]
and dl, 0FEh
xor eax, eax
loc_BA5A4:
mov [rdi+8], dl
retn
| char OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::VertexDescriptor::finalize(
OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::VertexDescriptor *this)
{
char v1; // dl
char result; // al
int *v3; // rax
int v4; // esi
long long v5; // rdx
long long v6; // r8
bool v7; // cl
int v8; // r9d
int v9; // r10d
int v10; // eax
char v11; // dl
v1 = *((_BYTE *)this + 8);
if ( (v1 & 1) == 0 )
return 0;
if ( (v1 & 8) != 0 )
{
v3 = (int *)*((_QWORD *)this + 2);
v4 = *v3;
v5 = *((unsigned __int16 *)this + 2);
v6 = 0LL;
v7 = 1;
v8 = 0;
while ( v5 != v6 )
{
v9 = v3[v6];
if ( (unsigned int)(v9 - 3) > 0xFFFC )
{
v11 = *((_BYTE *)this + 8) & 0xFE;
result = 0;
goto LABEL_12;
}
v7 &= v9 == v4;
v3[v6++] = v8;
v8 += v9;
}
v3[v5] = v8;
v10 = *((_DWORD *)this + 2);
v1 = v10 & 0xF7;
if ( !v7 )
v1 = v10;
}
v11 = v1 | 4;
result = 1;
LABEL_12:
*((_BYTE *)this + 8) = v11;
return result;
}
| finalize:
MOV DL,byte ptr [RDI + 0x8]
TEST DL,0x1
JNZ 0x001ba535
XOR EAX,EAX
RET
LAB_001ba535:
TEST DL,0x8
JZ 0x001ba595
MOV RAX,qword ptr [RDI + 0x10]
MOV ESI,dword ptr [RAX]
MOVZX EDX,word ptr [RDI + 0x4]
XOR R8D,R8D
MOV CL,0x1
XOR R9D,R9D
LAB_001ba54c:
CMP RDX,R8
JZ 0x001ba580
MOV R10D,dword ptr [RAX + R8*0x4]
LEA R11D,[R10 + -0x3]
CMP R11D,0xfffc
JA 0x001ba59c
CMP R10D,ESI
SETZ R11B
TEST CL,CL
SETNZ CL
AND CL,R11B
MOV dword ptr [RAX + R8*0x4],R9D
ADD R10D,R9D
INC R8
MOV R9D,R10D
JMP 0x001ba54c
LAB_001ba580:
MOV dword ptr [RAX + RDX*0x4],R9D
MOV EAX,dword ptr [RDI + 0x8]
MOV EDX,EAX
AND DL,0xf7
MOVZX EDX,DL
TEST CL,0x1
CMOVZ EDX,EAX
LAB_001ba595:
OR DL,0x4
MOV AL,0x1
JMP 0x001ba5a4
LAB_001ba59c:
MOV DL,byte ptr [RDI + 0x8]
AND DL,0xfe
XOR EAX,EAX
LAB_001ba5a4:
MOV byte ptr [RDI + 0x8],DL
RET
|
/* OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::VertexDescriptor::finalize() */
int8 __thiscall
OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::VertexDescriptor::finalize(VertexDescriptor *this)
{
ushort uVar1;
int iVar2;
int iVar3;
int *piVar4;
bool bVar5;
int8 uVar6;
VertexDescriptor VVar7;
ulong uVar8;
int iVar9;
VVar7 = this[8];
if (((byte)VVar7 & 1) == 0) {
return 0;
}
if (((byte)VVar7 & 8) != 0) {
piVar4 = *(int **)(this + 0x10);
iVar2 = *piVar4;
uVar1 = *(ushort *)(this + 4);
bVar5 = true;
iVar9 = 0;
for (uVar8 = 0; uVar1 != uVar8; uVar8 = uVar8 + 1) {
iVar3 = piVar4[uVar8];
if (0xfffc < iVar3 - 3U) {
VVar7 = (VertexDescriptor)((byte)this[8] & 0xfe);
uVar6 = 0;
goto LAB_001ba5a4;
}
bVar5 = (bool)(bVar5 & iVar3 == iVar2);
piVar4[uVar8] = iVar9;
iVar9 = iVar3 + iVar9;
}
piVar4[uVar1] = iVar9;
VVar7 = (VertexDescriptor)((byte)SUB41(*(int4 *)(this + 8),0) & 0xf7);
if (!bVar5) {
VVar7 = SUB41(*(int4 *)(this + 8),0);
}
}
VVar7 = (VertexDescriptor)((byte)VVar7 | 4);
uVar6 = 1;
LAB_001ba5a4:
this[8] = VVar7;
return uVar6;
}
|
|
3,417 | get_func_name | bluesky950520[P]quickjs/quickjs.c | static const char *get_func_name(JSContext *ctx, JSValue func)
{
JSProperty *pr;
JSShapeProperty *prs;
JSValue val;
if (JS_VALUE_GET_TAG(func) != JS_TAG_OBJECT)
return NULL;
prs = find_own_property(&pr, JS_VALUE_GET_OBJ(func), JS_ATOM_name);
if (!prs)
return NULL;
if ((prs->flags & JS_PROP_TMASK) != JS_PROP_NORMAL)
return NULL;
val = pr->u.value;
if (JS_VALUE_GET_TAG(val) != JS_TAG_STRING)
return NULL;
return JS_ToCString(ctx, val);
} | O1 | c | get_func_name:
movq %rsi, -0x8(%rsp)
cmpl $-0x1, %edx
jne 0x43356
movq -0x8(%rsp), %rcx
movq 0x18(%rcx), %rdx
movl 0x20(%rdx), %eax
notl %eax
orl $-0x38, %eax
cltq
movl (%rdx,%rax,4), %r9d
testl %r9d, %r9d
je 0x4332f
addq $0x40, %rdx
xorl %eax, %eax
movl $0x3ffffff, %r8d # imm = 0x3FFFFFF
movl %r9d, %r9d
leaq (%rdx,%r9,8), %rsi
addq $-0x8, %rsi
cmpl $0x37, 0x4(%rsi)
je 0x4331f
movl (%rsi), %r9d
movl $0x0, %esi
andl %r8d, %r9d
jne 0x432ff
jmp 0x43333
decq %r9
shlq $0x4, %r9
addq 0x20(%rcx), %r9
movq %r9, %rax
jmp 0x43333
xorl %eax, %eax
xorl %esi, %esi
testq %rsi, %rsi
je 0x43356
cmpl $0x3fffffff, (%rsi) # imm = 0x3FFFFFFF
ja 0x43356
movq 0x8(%rax), %rcx
cmpl $-0x7, %ecx
jne 0x43356
movq (%rax), %rdx
xorl %esi, %esi
xorl %r8d, %r8d
jmp 0x20bf7
xorl %eax, %eax
retq
| get_func_name:
mov [rsp+var_8], rsi
cmp edx, 0FFFFFFFFh
jnz short loc_43356
mov rcx, [rsp+var_8]
mov rdx, [rcx+18h]
mov eax, [rdx+20h]
not eax
or eax, 0FFFFFFC8h
cdqe
mov r9d, [rdx+rax*4]
test r9d, r9d
jz short loc_4332F
add rdx, 40h ; '@'
xor eax, eax
mov r8d, 3FFFFFFh
loc_432FF:
mov r9d, r9d
lea rsi, [rdx+r9*8]
add rsi, 0FFFFFFFFFFFFFFF8h
cmp dword ptr [rsi+4], 37h ; '7'
jz short loc_4331F
mov r9d, [rsi]
mov esi, 0
and r9d, r8d
jnz short loc_432FF
jmp short loc_43333
loc_4331F:
dec r9
shl r9, 4
add r9, [rcx+20h]
mov rax, r9
jmp short loc_43333
loc_4332F:
xor eax, eax
xor esi, esi
loc_43333:
test rsi, rsi
jz short loc_43356
cmp dword ptr [rsi], 3FFFFFFFh
ja short loc_43356
mov rcx, [rax+8]
cmp ecx, 0FFFFFFF9h
jnz short loc_43356
mov rdx, [rax]
xor esi, esi
xor r8d, r8d
jmp JS_ToCStringLen2
loc_43356:
xor eax, eax
retn
| long long get_func_name(long long a1, long long a2, int a3)
{
long long v3; // rdx
unsigned int v4; // r9d
long long v5; // rdx
long long *v6; // rax
int *v7; // rsi
int v8; // r9d
long long v9; // rcx
if ( a3 != -1 )
return 0LL;
v3 = *(_QWORD *)(a2 + 24);
v4 = *(_DWORD *)(v3 + 4LL * (int)(~*(_BYTE *)(v3 + 32) | 0xFFFFFFC8));
if ( v4 )
{
v5 = v3 + 64;
v6 = 0LL;
while ( 1 )
{
v7 = (int *)(v5 + 8LL * v4 - 8);
if ( v7[1] == 55 )
break;
v8 = *v7;
v7 = 0LL;
v4 = v8 & 0x3FFFFFF;
if ( !v4 )
goto LABEL_9;
}
v6 = (long long *)(*(_QWORD *)(a2 + 32) + 16 * (v4 - 1LL));
}
else
{
v6 = 0LL;
v7 = 0LL;
}
LABEL_9:
if ( v7 && (unsigned int)*v7 <= 0x3FFFFFFF && (v9 = v6[1], (_DWORD)v9 == -7) )
return JS_ToCStringLen2(a1, 0LL, *v6, v9, 0);
else
return 0LL;
}
| |||
3,418 | get_func_name | bluesky950520[P]quickjs/quickjs.c | static const char *get_func_name(JSContext *ctx, JSValue func)
{
JSProperty *pr;
JSShapeProperty *prs;
JSValue val;
if (JS_VALUE_GET_TAG(func) != JS_TAG_OBJECT)
return NULL;
prs = find_own_property(&pr, JS_VALUE_GET_OBJ(func), JS_ATOM_name);
if (!prs)
return NULL;
if ((prs->flags & JS_PROP_TMASK) != JS_PROP_NORMAL)
return NULL;
val = pr->u.value;
if (JS_VALUE_GET_TAG(val) != JS_TAG_STRING)
return NULL;
return JS_ToCString(ctx, val);
} | O2 | c | get_func_name:
cmpl $-0x1, %edx
jne 0x3af58
movq 0x18(%rsi), %rax
movl 0x20(%rax), %ecx
notl %ecx
orl $-0x38, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %ecx
movl $0x3ffffff, %edx # imm = 0x3FFFFFF
testl %ecx, %ecx
je 0x3af58
movl %ecx, %ecx
cmpl $0x37, 0x3c(%rax,%rcx,8)
je 0x3af32
movl 0x38(%rax,%rcx,8), %ecx
andl %edx, %ecx
jmp 0x3af1d
cmpl $0x3fffffff, 0x38(%rax,%rcx,8) # imm = 0x3FFFFFFF
ja 0x3af58
decq %rcx
shlq $0x4, %rcx
addq 0x20(%rsi), %rcx
movq 0x8(%rcx), %rdx
cmpl $-0x7, %edx
jne 0x3af58
movq (%rcx), %rsi
jmp 0x1aa0d
xorl %eax, %eax
retq
| get_func_name:
cmp edx, 0FFFFFFFFh
jnz short loc_3AF58
mov rax, [rsi+18h]
mov ecx, [rax+20h]
not ecx
or ecx, 0FFFFFFC8h
movsxd rcx, ecx
mov ecx, [rax+rcx*4]
mov edx, 3FFFFFFh
loc_3AF1D:
test ecx, ecx
jz short loc_3AF58
mov ecx, ecx
cmp dword ptr [rax+rcx*8+3Ch], 37h ; '7'
jz short loc_3AF32
mov ecx, [rax+rcx*8+38h]
and ecx, edx
jmp short loc_3AF1D
loc_3AF32:
cmp dword ptr [rax+rcx*8+38h], 3FFFFFFFh
ja short loc_3AF58
dec rcx
shl rcx, 4
add rcx, [rsi+20h]
mov rdx, [rcx+8]
cmp edx, 0FFFFFFF9h
jnz short loc_3AF58
mov rsi, [rcx]
jmp JS_ToCString_0
loc_3AF58:
xor eax, eax
retn
| long long get_func_name(long long a1, long long a2, int a3)
{
long long v3; // rax
unsigned int i; // ecx
long long *v5; // rcx
long long v6; // rdx
if ( a3 == -1 )
{
v3 = *(_QWORD *)(a2 + 24);
for ( i = *(_DWORD *)(v3 + 4LL * (int)(~*(_BYTE *)(v3 + 32) | 0xFFFFFFC8));
i;
i = *(_DWORD *)(v3 + 8LL * i + 56) & 0x3FFFFFF )
{
if ( *(_DWORD *)(v3 + 8LL * i + 60) == 55 )
{
if ( *(_DWORD *)(v3 + 8LL * i + 56) <= 0x3FFFFFFFu )
{
v5 = (long long *)(*(_QWORD *)(a2 + 32) + 16 * (i - 1LL));
v6 = v5[1];
if ( (_DWORD)v6 == -7 )
return JS_ToCString_0(a1, *v5, v6);
}
return 0LL;
}
}
}
return 0LL;
}
| get_func_name:
CMP EDX,-0x1
JNZ 0x0013af58
MOV RAX,qword ptr [RSI + 0x18]
MOV ECX,dword ptr [RAX + 0x20]
NOT ECX
OR ECX,0xffffffc8
MOVSXD RCX,ECX
MOV ECX,dword ptr [RAX + RCX*0x4]
MOV EDX,0x3ffffff
LAB_0013af1d:
TEST ECX,ECX
JZ 0x0013af58
MOV ECX,ECX
CMP dword ptr [RAX + RCX*0x8 + 0x3c],0x37
JZ 0x0013af32
MOV ECX,dword ptr [RAX + RCX*0x8 + 0x38]
AND ECX,EDX
JMP 0x0013af1d
LAB_0013af32:
CMP dword ptr [RAX + RCX*0x8 + 0x38],0x3fffffff
JA 0x0013af58
DEC RCX
SHL RCX,0x4
ADD RCX,qword ptr [RSI + 0x20]
MOV RDX,qword ptr [RCX + 0x8]
CMP EDX,-0x7
JNZ 0x0013af58
MOV RSI,qword ptr [RCX]
JMP 0x0011aa0d
LAB_0013af58:
XOR EAX,EAX
RET
|
int8 get_func_name(int8 param_1,long param_2,int param_3)
{
long lVar1;
int8 uVar2;
uint uVar3;
ulong uVar4;
int8 *puVar5;
if (param_3 == -1) {
lVar1 = *(long *)(param_2 + 0x18);
uVar3 = *(uint *)(lVar1 + (long)(int)(~*(uint *)(lVar1 + 0x20) | 0xffffffc8) * 4);
while (uVar3 != 0) {
uVar4 = (ulong)uVar3;
if (*(int *)(lVar1 + 0x3c + uVar4 * 8) == 0x37) {
if (0x3fffffff < *(uint *)(lVar1 + 0x38 + uVar4 * 8)) {
return 0;
}
puVar5 = (int8 *)((uVar4 - 1) * 0x10 + *(long *)(param_2 + 0x20));
if ((int)puVar5[1] != -7) {
return 0;
}
uVar2 = JS_ToCString(param_1,*puVar5);
return uVar2;
}
uVar3 = *(uint *)(lVar1 + 0x38 + uVar4 * 8) & 0x3ffffff;
}
}
return 0;
}
|
|
3,419 | fill_buffer | eloqsql/storage/maria/ma_packrec.c | static void fill_buffer(MARIA_BIT_BUFF *bit_buff)
{
if (bit_buff->pos >= bit_buff->end)
{
bit_buff->error= 1;
bit_buff->current_byte=0;
return;
}
#if BITS_SAVED == 64
bit_buff->current_byte= ((((uint) ((uchar) bit_buff->pos[7]))) |
(((uint) ((uchar) bit_buff->pos[6])) << 8) |
(((uint) ((uchar) bit_buff->pos[5])) << 16) |
(((uint) ((uchar) bit_buff->pos[4])) << 24) |
((ulonglong)
((((uint) ((uchar) bit_buff->pos[3]))) |
(((uint) ((uchar) bit_buff->pos[2])) << 8) |
(((uint) ((uchar) bit_buff->pos[1])) << 16) |
(((uint) ((uchar) bit_buff->pos[0])) << 24)) << 32));
bit_buff->pos+=8;
#else
#if BITS_SAVED == 32
bit_buff->current_byte= (((uint) ((uchar) bit_buff->pos[3])) |
(((uint) ((uchar) bit_buff->pos[2])) << 8) |
(((uint) ((uchar) bit_buff->pos[1])) << 16) |
(((uint) ((uchar) bit_buff->pos[0])) << 24));
bit_buff->pos+=4;
#else
bit_buff->current_byte= (uint) (((uint) ((uchar) bit_buff->pos[1])) |
(((uint) ((uchar) bit_buff->pos[0])) << 8));
bit_buff->pos+=2;
#endif
#endif
} | O0 | c | fill_buffer:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jb 0x3aa71
movq -0x8(%rbp), %rax
movl $0x1, 0x28(%rax)
movq -0x8(%rbp), %rax
movl $0x0, (%rax)
jmp 0x3aac5
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movzbl 0x3(%rax), %ecx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movzbl 0x2(%rax), %eax
shll $0x8, %eax
orl %eax, %ecx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movzbl 0x1(%rax), %eax
shll $0x10, %eax
orl %eax, %ecx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movzbl (%rax), %eax
shll $0x18, %eax
orl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rcx
addq $0x4, %rcx
movq %rcx, 0x8(%rax)
popq %rbp
retq
nopw (%rax,%rax)
| fill_buffer:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov rcx, [rbp+var_8]
cmp rax, [rcx+10h]
jb short loc_3AA71
mov rax, [rbp+var_8]
mov dword ptr [rax+28h], 1
mov rax, [rbp+var_8]
mov dword ptr [rax], 0
jmp short loc_3AAC5
loc_3AA71:
mov rax, [rbp+var_8]
mov rax, [rax+8]
movzx ecx, byte ptr [rax+3]
mov rax, [rbp+var_8]
mov rax, [rax+8]
movzx eax, byte ptr [rax+2]
shl eax, 8
or ecx, eax
mov rax, [rbp+var_8]
mov rax, [rax+8]
movzx eax, byte ptr [rax+1]
shl eax, 10h
or ecx, eax
mov rax, [rbp+var_8]
mov rax, [rax+8]
movzx eax, byte ptr [rax]
shl eax, 18h
or ecx, eax
mov rax, [rbp+var_8]
mov [rax], ecx
mov rax, [rbp+var_8]
mov rcx, [rax+8]
add rcx, 4
mov [rax+8], rcx
loc_3AAC5:
pop rbp
retn
| long long fill_buffer(long long a1)
{
long long result; // rax
if ( *(_QWORD *)(a1 + 8) < *(_QWORD *)(a1 + 16) )
{
*(_DWORD *)a1 = _byteswap_ulong(**(_DWORD **)(a1 + 8));
result = a1;
*(_QWORD *)(a1 + 8) += 4LL;
}
else
{
*(_DWORD *)(a1 + 40) = 1;
result = a1;
*(_DWORD *)a1 = 0;
}
return result;
}
| fill_buffer:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RCX + 0x10]
JC 0x0013aa71
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x28],0x1
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX],0x0
JMP 0x0013aac5
LAB_0013aa71:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOVZX ECX,byte ptr [RAX + 0x3]
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOVZX EAX,byte ptr [RAX + 0x2]
SHL EAX,0x8
OR ECX,EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOVZX EAX,byte ptr [RAX + 0x1]
SHL EAX,0x10
OR ECX,EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOVZX EAX,byte ptr [RAX]
SHL EAX,0x18
OR ECX,EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x8]
ADD RCX,0x4
MOV qword ptr [RAX + 0x8],RCX
LAB_0013aac5:
POP RBP
RET
|
void fill_buffer(int4 *param_1)
{
if (*(ulong *)(param_1 + 2) < *(ulong *)(param_1 + 4)) {
*param_1 = CONCAT13(**(int1 **)(param_1 + 2),
CONCAT12(*(int1 *)(*(long *)(param_1 + 2) + 1),
CONCAT11(*(int1 *)(*(long *)(param_1 + 2) + 2),
*(int1 *)(*(long *)(param_1 + 2) + 3))));
*(long *)(param_1 + 2) = *(long *)(param_1 + 2) + 4;
}
else {
param_1[10] = 1;
*param_1 = 0;
}
return;
}
|
|
3,420 | fill_buffer | eloqsql/storage/maria/ma_packrec.c | static void fill_buffer(MARIA_BIT_BUFF *bit_buff)
{
if (bit_buff->pos >= bit_buff->end)
{
bit_buff->error= 1;
bit_buff->current_byte=0;
return;
}
#if BITS_SAVED == 64
bit_buff->current_byte= ((((uint) ((uchar) bit_buff->pos[7]))) |
(((uint) ((uchar) bit_buff->pos[6])) << 8) |
(((uint) ((uchar) bit_buff->pos[5])) << 16) |
(((uint) ((uchar) bit_buff->pos[4])) << 24) |
((ulonglong)
((((uint) ((uchar) bit_buff->pos[3]))) |
(((uint) ((uchar) bit_buff->pos[2])) << 8) |
(((uint) ((uchar) bit_buff->pos[1])) << 16) |
(((uint) ((uchar) bit_buff->pos[0])) << 24)) << 32));
bit_buff->pos+=8;
#else
#if BITS_SAVED == 32
bit_buff->current_byte= (((uint) ((uchar) bit_buff->pos[3])) |
(((uint) ((uchar) bit_buff->pos[2])) << 8) |
(((uint) ((uchar) bit_buff->pos[1])) << 16) |
(((uint) ((uchar) bit_buff->pos[0])) << 24));
bit_buff->pos+=4;
#else
bit_buff->current_byte= (uint) (((uint) ((uchar) bit_buff->pos[1])) |
(((uint) ((uchar) bit_buff->pos[0])) << 8));
bit_buff->pos+=2;
#endif
#endif
} | O3 | c | fill_buffer:
movq 0x8(%rdi), %rcx
cmpq 0x10(%rdi), %rcx
jae 0x3b6f9
pushq %rbp
movq %rsp, %rbp
movl (%rcx), %eax
bswapl %eax
addq $0x4, %rcx
movq %rcx, 0x8(%rdi)
popq %rbp
jmp 0x3b702
movl $0x1, 0x28(%rdi)
xorl %eax, %eax
movl %eax, (%rdi)
retq
| fill_buffer:
mov rcx, [rdi+8]
cmp rcx, [rdi+10h]
jnb short loc_3B6F9
push rbp
mov rbp, rsp
mov eax, [rcx]
bswap eax
add rcx, 4
mov [rdi+8], rcx
pop rbp
jmp short loc_3B702
loc_3B6F9:
mov dword ptr [rdi+28h], 1
xor eax, eax
loc_3B702:
mov [rdi], eax
retn
| long long fill_buffer(long long a1)
{
unsigned int *v1; // rcx
long long result; // rax
v1 = *(unsigned int **)(a1 + 8);
if ( (unsigned long long)v1 >= *(_QWORD *)(a1 + 16) )
{
*(_DWORD *)(a1 + 40) = 1;
result = 0LL;
}
else
{
result = _byteswap_ulong(*v1);
*(_QWORD *)(a1 + 8) = v1 + 1;
}
*(_DWORD *)a1 = result;
return result;
}
| fill_buffer:
MOV RCX,qword ptr [RDI + 0x8]
CMP RCX,qword ptr [RDI + 0x10]
JNC 0x0013b6f9
PUSH RBP
MOV RBP,RSP
MOV EAX,dword ptr [RCX]
BSWAP EAX
ADD RCX,0x4
MOV qword ptr [RDI + 0x8],RCX
POP RBP
JMP 0x0013b702
LAB_0013b6f9:
MOV dword ptr [RDI + 0x28],0x1
XOR EAX,EAX
LAB_0013b702:
MOV dword ptr [RDI],EAX
RET
|
void fill_buffer(uint *param_1)
{
uint *puVar1;
uint uVar2;
puVar1 = *(uint **)(param_1 + 2);
if (puVar1 < *(uint **)(param_1 + 4)) {
uVar2 = *puVar1;
uVar2 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;
*(uint **)(param_1 + 2) = puVar1 + 1;
}
else {
param_1[10] = 1;
uVar2 = 0;
}
*param_1 = uVar2;
return;
}
|
|
3,421 | my_numchars_utf16 | eloqsql/strings/ctype-ucs2.c | static size_t
my_numchars_utf16(CHARSET_INFO *cs,
const char *b, const char *e)
{
size_t nchars= 0;
for ( ; ; nchars++)
{
size_t charlen= my_ismbchar(cs, b, e);
if (!charlen)
break;
b+= charlen;
}
return nchars;
} | O0 | c | my_numchars_utf16:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x5b820
movl %eax, %eax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x580ec
jmp 0x58106
movq -0x28(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x580cc
movq -0x20(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
| my_numchars_utf16:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], 0
loc_580CC:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
call my_ismbchar_1
mov eax, eax
mov [rbp+var_28], rax
cmp [rbp+var_28], 0
jnz short loc_580EC
jmp short loc_58106
loc_580EC:
mov rax, [rbp+var_28]
add rax, [rbp+var_10]
mov [rbp+var_10], rax
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
jmp short loc_580CC
loc_58106:
mov rax, [rbp+var_20]
add rsp, 30h
pop rbp
retn
| long long my_numchars_utf16(long long a1, long long a2, long long a3)
{
unsigned int v3; // eax
long long i; // [rsp+10h] [rbp-20h]
for ( i = 0LL; ; ++i )
{
v3 = my_ismbchar_1(a1, a2, a3);
if ( !v3 )
break;
a2 += v3;
}
return i;
}
| my_numchars_utf16:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],0x0
LAB_001580cc:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x0015b820
MOV EAX,EAX
MOV qword ptr [RBP + -0x28],RAX
CMP qword ptr [RBP + -0x28],0x0
JNZ 0x001580ec
JMP 0x00158106
LAB_001580ec:
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001580cc
LAB_00158106:
MOV RAX,qword ptr [RBP + -0x20]
ADD RSP,0x30
POP RBP
RET
|
long my_numchars_utf16(int8 param_1,long param_2,int8 param_3)
{
uint uVar1;
int8 local_28;
int8 local_18;
local_28 = 0;
local_18 = param_2;
while( true ) {
uVar1 = my_ismbchar(param_1,local_18,param_3);
if ((ulong)uVar1 == 0) break;
local_18 = (ulong)uVar1 + local_18;
local_28 = local_28 + 1;
}
return local_28;
}
|
|
3,422 | google::protobuf::internal::SerializeMessageNoTable(google::protobuf::MessageLite const*, google::protobuf::internal::ArrayOutput*) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/generated_message_util.cc | void SerializeMessageNoTable(const MessageLite* msg, ArrayOutput* output) {
io::ArrayOutputStream array_stream(output->ptr, INT_MAX);
io::CodedOutputStream o(&array_stream);
o.SetSerializationDeterministic(output->is_deterministic);
msg->SerializeWithCachedSizes(&o);
output->ptr += o.ByteCount();
} | O0 | cpp | google::protobuf::internal::SerializeMessageNoTable(google::protobuf::MessageLite const*, google::protobuf::internal::ArrayOutput*):
subq $0xa8, %rsp
movq %rdi, 0xa0(%rsp)
movq %rsi, 0x98(%rsp)
movq 0x98(%rsp), %rax
movq (%rax), %rsi
leaq 0x78(%rsp), %rdi
movq %rdi, 0x10(%rsp)
movl $0x7fffffff, %edx # imm = 0x7FFFFFFF
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
callq 0x1f05e0
movq 0x10(%rsp), %rsi
leaq 0x28(%rsp), %rdi
callq 0x1e9c40
jmp 0x1e942c
movq 0x98(%rsp), %rax
movzbl 0x8(%rax), %esi
andl $0x1, %esi
leaq 0x28(%rsp), %rdi
callq 0x398a0
jmp 0x1e9447
movq 0xa0(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x1e9be0
jmp 0x1e945b
leaq 0x28(%rsp), %rdi
callq 0xd3550
movl %eax, 0xc(%rsp)
jmp 0x1e946b
movl 0xc(%rsp), %edx
movq 0x98(%rsp), %rax
movq (%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, (%rax)
leaq 0x28(%rsp), %rdi
callq 0x1ed610
leaq 0x78(%rsp), %rdi
callq 0x1e9cb0
addq $0xa8, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
jmp 0x1e94c7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x1ed610
leaq 0x78(%rsp), %rdi
callq 0x1e9cb0
movq 0x20(%rsp), %rdi
callq 0x21700
nopl (%rax,%rax)
| _ZN6google8protobuf8internal23SerializeMessageNoTableEPKNS0_11MessageLiteEPNS1_11ArrayOutputE:
sub rsp, 0A8h
mov [rsp+0A8h+var_8], rdi
mov [rsp+0A8h+var_10], rsi
mov rax, [rsp+0A8h+var_10]
mov rsi, [rax]; void *
lea rdi, [rsp+0A8h+var_30]; this
mov [rsp+0A8h+var_98], rdi
mov edx, 7FFFFFFFh; int
mov ecx, 0FFFFFFFFh; int
call _ZN6google8protobuf2io17ArrayOutputStreamC2EPvii; google::protobuf::io::ArrayOutputStream::ArrayOutputStream(void *,int,int)
mov rsi, [rsp+0A8h+var_98]
lea rdi, [rsp+0A8h+var_80]
call _ZN6google8protobuf2io17CodedOutputStreamC2INS1_17ArrayOutputStreamEvEEPT_; google::protobuf::io::CodedOutputStream::CodedOutputStream<google::protobuf::io::ArrayOutputStream,void>(google::protobuf::io::ArrayOutputStream *)
jmp short $+2
loc_1E942C:
mov rax, [rsp+0A8h+var_10]
movzx esi, byte ptr [rax+8]
and esi, 1; bool
lea rdi, [rsp+0A8h+var_80]; this
call _ZN6google8protobuf2io17CodedOutputStream29SetSerializationDeterministicEb; google::protobuf::io::CodedOutputStream::SetSerializationDeterministic(bool)
jmp short $+2
loc_1E9447:
mov rdi, [rsp+0A8h+var_8]; this
lea rsi, [rsp+0A8h+var_80]; google::protobuf::io::CodedOutputStream *
call _ZNK6google8protobuf11MessageLite24SerializeWithCachedSizesEPNS0_2io17CodedOutputStreamE; google::protobuf::MessageLite::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream *)
jmp short $+2
loc_1E945B:
lea rdi, [rsp+0A8h+var_80]; this
call _ZNK6google8protobuf2io17CodedOutputStream9ByteCountEv; google::protobuf::io::CodedOutputStream::ByteCount(void)
mov [rsp+0A8h+var_9C], eax
jmp short $+2
loc_1E946B:
mov edx, [rsp+0A8h+var_9C]
mov rax, [rsp+0A8h+var_10]
mov rcx, [rax]
movsxd rdx, edx
add rcx, rdx
mov [rax], rcx
lea rdi, [rsp+0A8h+var_80]; this
call _ZN6google8protobuf2io17CodedOutputStreamD2Ev; google::protobuf::io::CodedOutputStream::~CodedOutputStream()
lea rdi, [rsp+0A8h+var_30]; this
call _ZN6google8protobuf2io17ArrayOutputStreamD2Ev; google::protobuf::io::ArrayOutputStream::~ArrayOutputStream()
add rsp, 0A8h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_18], rcx
mov [rsp+arg_14], eax
jmp short loc_1E94C7
mov rcx, rax
mov eax, edx
mov [rsp+arg_18], rcx
mov [rsp+arg_14], eax
lea rdi, [rsp+arg_20]; this
call _ZN6google8protobuf2io17CodedOutputStreamD2Ev; google::protobuf::io::CodedOutputStream::~CodedOutputStream()
loc_1E94C7:
lea rdi, [rsp+arg_70]; this
call _ZN6google8protobuf2io17ArrayOutputStreamD2Ev; google::protobuf::io::ArrayOutputStream::~ArrayOutputStream()
mov rdi, [rsp+arg_18]
call __Unwind_Resume
| void google::protobuf::internal::SerializeMessageNoTable(google::protobuf::MessageLite *a1, void **a2)
{
int v2; // [rsp+Ch] [rbp-9Ch]
unsigned __int8 *v3[10]; // [rsp+28h] [rbp-80h] BYREF
_BYTE v4[32]; // [rsp+78h] [rbp-30h] BYREF
void **v5; // [rsp+98h] [rbp-10h]
google::protobuf::MessageLite *v6; // [rsp+A0h] [rbp-8h]
v6 = a1;
v5 = a2;
google::protobuf::io::ArrayOutputStream::ArrayOutputStream(
(google::protobuf::io::ArrayOutputStream *)v4,
*a2,
0x7FFFFFFF,
-1);
google::protobuf::io::CodedOutputStream::CodedOutputStream<google::protobuf::io::ArrayOutputStream,void>(v3, v4);
google::protobuf::io::CodedOutputStream::SetSerializationDeterministic(
(google::protobuf::io::CodedOutputStream *)v3,
(_BYTE)v5[1] & 1);
google::protobuf::MessageLite::SerializeWithCachedSizes(v6, (google::protobuf::io::CodedOutputStream *)v3);
v2 = google::protobuf::io::CodedOutputStream::ByteCount(v3);
*v5 = (char *)*v5 + v2;
google::protobuf::io::CodedOutputStream::~CodedOutputStream((google::protobuf::io::CodedOutputStream *)v3);
google::protobuf::io::ArrayOutputStream::~ArrayOutputStream((google::protobuf::io::ArrayOutputStream *)v4);
}
| |||
3,423 | google::protobuf::internal::SerializeMessageNoTable(google::protobuf::MessageLite const*, google::protobuf::internal::ArrayOutput*) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/generated_message_util.cc | void SerializeMessageNoTable(const MessageLite* msg, ArrayOutput* output) {
io::ArrayOutputStream array_stream(output->ptr, INT_MAX);
io::CodedOutputStream o(&array_stream);
o.SetSerializationDeterministic(output->is_deterministic);
msg->SerializeWithCachedSizes(&o);
output->ptr += o.ByteCount();
} | O3 | cpp | google::protobuf::internal::SerializeMessageNoTable(google::protobuf::MessageLite const*, google::protobuf::internal::ArrayOutput*):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rsi
leaq 0x68(%rsp), %r12
movq %r12, %rdi
movl $0x7fffffff, %edx # imm = 0x7FFFFFFF
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
callq 0xfc41e
leaq 0x186683(%rip), %rax # 0x2805a9
movb (%rax), %al
andb $0x1, %al
leaq 0x28(%rsp), %r15
movq %r15, -0x10(%r15)
movq %r15, -0x8(%r15)
movq %r12, 0x20(%r15)
movw $0x0, 0x28(%r15)
movb %al, 0x2a(%r15)
movb $0x0, 0x2b(%r15)
movq %r15, 0x30(%r15)
movq (%r12), %rax
movq %r12, %rdi
callq *0x20(%rax)
movq %rax, 0x38(%r15)
movq (%r12), %rax
leaq 0x10(%rsp), %rsi
leaq 0xc(%rsp), %rdx
movq %r12, %rdi
callq *0x10(%rax)
testb %al, %al
je 0xf9ff4
movl 0xc(%rsp), %eax
testl %eax, %eax
jle 0xf9ff4
movq 0x10(%rsp), %rcx
leaq (%r15,%rax), %rdx
xorl %esi, %esi
cmpl $0x11, %eax
leaq -0x10(%rcx,%rax), %rax
cmovbq %rdx, %rax
cmovbq %rcx, %rsi
cmovaeq %rcx, %r15
movq %rax, 0x18(%rsp)
movq %rsi, 0x20(%rsp)
movq %r15, 0x58(%rsp)
movb 0x8(%rbx), %al
leaq 0x18(%rsp), %rdx
movb %al, 0x3a(%rdx)
movq (%r14), %rax
movq %r14, %rdi
movq %r15, %rsi
callq *0x60(%rax)
leaq 0x18(%rsp), %rdi
movq %rax, 0x40(%rdi)
movq %rax, %rsi
callq 0xfafd4
leaq 0x18(%rsp), %rdi
subl 0x48(%rdi), %eax
cltq
addq %rax, (%rbx)
callq 0xfb684
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x58(%rsp), %r15
jmp 0xf9fab
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0xfb684
movq %rbx, %rdi
callq 0x1f860
| _ZN6google8protobuf8internal23SerializeMessageNoTableEPKNS0_11MessageLiteEPNS1_11ArrayOutputE:
push r15
push r14
push r12
push rbx
sub rsp, 88h
mov rbx, rsi
mov r14, rdi
mov rsi, [rsi]; void *
lea r12, [rsp+0A8h+var_40]
mov rdi, r12; this
mov edx, 7FFFFFFFh; int
mov ecx, 0FFFFFFFFh; int
call _ZN6google8protobuf2io17ArrayOutputStreamC2EPvii; google::protobuf::io::ArrayOutputStream::ArrayOutputStream(void *,int,int)
lea rax, _ZN6google8protobuf2io17CodedOutputStream36default_serialization_deterministic_E; google::protobuf::io::CodedOutputStream::default_serialization_deterministic_
mov al, [rax]
and al, 1
lea r15, [rsp+0A8h+var_80]
mov [r15-10h], r15
mov [r15-8], r15
mov [r15+20h], r12
mov word ptr [r15+28h], 0
mov [r15+2Ah], al
mov byte ptr [r15+2Bh], 0
mov [r15+30h], r15
mov rax, [r12]
mov rdi, r12
call qword ptr [rax+20h]
mov [r15+38h], rax
mov rax, [r12]
lea rsi, [rsp+0A8h+var_98]
lea rdx, [rsp+0A8h+var_9C]
mov rdi, r12
call qword ptr [rax+10h]
test al, al
jz short loc_F9FF4
mov eax, [rsp+0A8h+var_9C]
test eax, eax
jle short loc_F9FF4
mov rcx, [rsp+0A8h+var_98]
lea rdx, [r15+rax]
xor esi, esi
cmp eax, 11h
lea rax, [rcx+rax-10h]
cmovb rax, rdx
cmovb rsi, rcx
cmovnb r15, rcx
mov [rsp+0A8h+var_90], rax
mov [rsp+0A8h+var_88], rsi
mov [rsp+0A8h+var_50], r15
loc_F9FAB:
mov al, [rbx+8]
lea rdx, [rsp+0A8h+var_90]
mov [rdx+3Ah], al
mov rax, [r14]
mov rdi, r14
mov rsi, r15
call qword ptr [rax+60h]
lea rdi, [rsp+0A8h+var_90]; this
mov [rdi+40h], rax
mov rsi, rax; unsigned __int8 *
call _ZNK6google8protobuf2io19EpsCopyOutputStream9ByteCountEPh; google::protobuf::io::EpsCopyOutputStream::ByteCount(uchar *)
lea rdi, [rsp+0A8h+var_90]; this
sub eax, [rdi+48h]
cdqe
add [rbx], rax
call _ZN6google8protobuf2io17CodedOutputStreamD2Ev; google::protobuf::io::CodedOutputStream::~CodedOutputStream()
add rsp, 88h
pop rbx
pop r12
pop r14
pop r15
retn
loc_F9FF4:
mov r15, [rsp+0A8h+var_50]
jmp short loc_F9FAB
mov rbx, rax
lea rdi, [rsp+arg_10]; this
call _ZN6google8protobuf2io17CodedOutputStreamD2Ev; google::protobuf::io::CodedOutputStream::~CodedOutputStream()
mov rdi, rbx
call __Unwind_Resume
| void google::protobuf::internal::SerializeMessageNoTable(long long a1, long long a2)
{
unsigned __int8 *v3; // r15
unsigned __int8 *v4; // rsi
unsigned __int8 *v5; // rax
int v6; // eax
int v7; // [rsp+Ch] [rbp-9Ch] BYREF
unsigned __int8 *v8; // [rsp+10h] [rbp-98h] BYREF
unsigned __int8 *v9; // [rsp+18h] [rbp-90h] BYREF
unsigned __int8 *v10; // [rsp+20h] [rbp-88h]
_BYTE v11[32]; // [rsp+28h] [rbp-80h] BYREF
_QWORD *v12; // [rsp+48h] [rbp-60h]
__int16 v13; // [rsp+50h] [rbp-58h]
char v14; // [rsp+52h] [rbp-56h]
char v15; // [rsp+53h] [rbp-55h]
unsigned __int8 *v16; // [rsp+58h] [rbp-50h]
long long v17; // [rsp+60h] [rbp-48h]
_QWORD v18[8]; // [rsp+68h] [rbp-40h] BYREF
google::protobuf::io::ArrayOutputStream::ArrayOutputStream(
(google::protobuf::io::ArrayOutputStream *)v18,
*(void **)a2,
0x7FFFFFFF,
-1);
v3 = v11;
v9 = v11;
v10 = v11;
v12 = v18;
v13 = 0;
v14 = google::protobuf::io::CodedOutputStream::default_serialization_deterministic_ & 1;
v15 = 0;
v16 = v11;
v17 = (*(long long ( **)(_QWORD *))(v18[0] + 32LL))(v18);
if ( (*(unsigned __int8 ( **)(_QWORD *, unsigned __int8 **, int *))(v18[0] + 16LL))(v18, &v8, &v7) && v7 > 0 )
{
v4 = 0LL;
v5 = &v8[v7 - 16];
if ( (unsigned int)v7 >= 0x11 )
{
v3 = v8;
}
else
{
v5 = &v11[v7];
v4 = v8;
}
v9 = v5;
v10 = v4;
v16 = v3;
}
else
{
v3 = v16;
}
v14 = *(_BYTE *)(a2 + 8);
v16 = (unsigned __int8 *)(*(long long ( **)(long long, unsigned __int8 *))(*(_QWORD *)a1 + 96LL))(a1, v3);
v6 = google::protobuf::io::EpsCopyOutputStream::ByteCount((google::protobuf::io::EpsCopyOutputStream *)&v9, v16);
*(_QWORD *)a2 += v6 - (int)v17;
google::protobuf::io::CodedOutputStream::~CodedOutputStream((google::protobuf::io::CodedOutputStream *)&v9);
}
| SerializeMessageNoTable:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x88
MOV RBX,RSI
MOV R14,RDI
MOV RSI,qword ptr [RSI]
LEA R12,[RSP + 0x68]
MOV RDI,R12
MOV EDX,0x7fffffff
MOV ECX,0xffffffff
CALL 0x001fc41e
LEA RAX,[0x3805a9]
MOV AL,byte ptr [RAX]
AND AL,0x1
LEA R15,[RSP + 0x28]
MOV qword ptr [R15 + -0x10],R15
MOV qword ptr [R15 + -0x8],R15
MOV qword ptr [R15 + 0x20],R12
MOV word ptr [R15 + 0x28],0x0
MOV byte ptr [R15 + 0x2a],AL
MOV byte ptr [R15 + 0x2b],0x0
MOV qword ptr [R15 + 0x30],R15
MOV RAX,qword ptr [R12]
MOV RDI,R12
CALL qword ptr [RAX + 0x20]
MOV qword ptr [R15 + 0x38],RAX
MOV RAX,qword ptr [R12]
LEA RSI,[RSP + 0x10]
LEA RDX,[RSP + 0xc]
MOV RDI,R12
CALL qword ptr [RAX + 0x10]
TEST AL,AL
JZ 0x001f9ff4
MOV EAX,dword ptr [RSP + 0xc]
TEST EAX,EAX
JLE 0x001f9ff4
MOV RCX,qword ptr [RSP + 0x10]
LEA RDX,[R15 + RAX*0x1]
XOR ESI,ESI
CMP EAX,0x11
LEA RAX,[RCX + RAX*0x1 + -0x10]
CMOVC RAX,RDX
CMOVC RSI,RCX
CMOVNC R15,RCX
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x20],RSI
MOV qword ptr [RSP + 0x58],R15
LAB_001f9fab:
MOV AL,byte ptr [RBX + 0x8]
LEA RDX,[RSP + 0x18]
MOV byte ptr [RDX + 0x3a],AL
MOV RAX,qword ptr [R14]
LAB_001f9fb9:
MOV RDI,R14
MOV RSI,R15
CALL qword ptr [RAX + 0x60]
LEA RDI,[RSP + 0x18]
MOV qword ptr [RDI + 0x40],RAX
MOV RSI,RAX
CALL 0x001fafd4
LAB_001f9fd3:
LEA RDI,[RSP + 0x18]
SUB EAX,dword ptr [RDI + 0x48]
CDQE
ADD qword ptr [RBX],RAX
CALL 0x001fb684
ADD RSP,0x88
POP RBX
POP R12
POP R14
POP R15
RET
LAB_001f9ff4:
MOV R15,qword ptr [RSP + 0x58]
JMP 0x001f9fab
|
/* google::protobuf::internal::SerializeMessageNoTable(google::protobuf::MessageLite const*,
google::protobuf::internal::ArrayOutput*) */
void google::protobuf::internal::SerializeMessageNoTable(MessageLite *param_1,ArrayOutput *param_2)
{
char cVar1;
int iVar2;
uint local_9c;
int1 *local_98;
int1 *local_90;
int1 *local_88;
int1 local_80 [32];
ArrayOutputStream *local_60;
int2 local_58;
ArrayOutput local_56;
int1 local_55;
uchar *local_50;
int8 local_48;
long local_40 [4];
io::ArrayOutputStream::ArrayOutputStream
((ArrayOutputStream *)local_40,*(void **)param_2,0x7fffffff,-1);
local_56 = (ArrayOutput)(io::CodedOutputStream::default_serialization_deterministic_ & 1);
local_58 = 0;
local_55 = 0;
local_90 = local_80;
local_88 = local_80;
local_60 = (ArrayOutputStream *)local_40;
local_50 = local_80;
local_48 = (**(code **)(local_40[0] + 0x20))((ArrayOutputStream *)local_40);
cVar1 = (**(code **)(local_40[0] + 0x10))((ArrayOutputStream *)local_40,&local_98,&local_9c);
if ((cVar1 != '\0') && (0 < (int)local_9c)) {
local_90 = local_98 + -0x10;
if (local_9c < 0x11) {
local_90 = local_80;
}
local_90 = local_90 + local_9c;
local_88 = local_98;
local_50 = local_80;
if (local_9c >= 0x11) {
local_88 = (int1 *)0x0;
local_50 = local_98;
}
}
local_56 = param_2[8];
/* try { // try from 001f9fb9 to 001f9fd2 has its CatchHandler @ 001f9ffb */
local_50 = (uchar *)(**(code **)(*(long *)param_1 + 0x60))(param_1,local_50);
iVar2 = io::EpsCopyOutputStream::ByteCount((EpsCopyOutputStream *)&local_90,local_50);
*(long *)param_2 = *(long *)param_2 + (long)(iVar2 - (int)local_48);
io::CodedOutputStream::~CodedOutputStream((CodedOutputStream *)&local_90);
return;
}
|
|
3,424 | get_changed_storage | corpus-core[P]colibri-stateless/src/chains/eth/verifier/call_ctx.h | static changed_storage_t* get_changed_storage(evmone_context_t* ctx, const address_t addr, const bytes32_t key) {
changed_account_t* account = get_changed_account(ctx, addr);
if (!account) return NULL;
for (changed_storage_t* s = account->storage; s != NULL; s = s->next) {
if (memcmp(s->key, key, 32) == 0)
return s;
}
return NULL;
} | O3 | c | get_changed_storage:
pushq %rbx
movq %rdx, %rbx
callq 0x2a314
testq %rax, %rax
je 0x2ab7c
movq 0x50(%rax), %rax
testq %rax, %rax
je 0x2ab7c
movdqu (%rbx), %xmm0
movdqu 0x10(%rbx), %xmm1
movdqu (%rax), %xmm2
pcmpeqb %xmm0, %xmm2
movdqu 0x10(%rax), %xmm3
pcmpeqb %xmm1, %xmm3
pand %xmm2, %xmm3
pmovmskb %xmm3, %ecx
cmpl $0xffff, %ecx # imm = 0xFFFF
je 0x2ab7e
movq 0x40(%rax), %rax
testq %rax, %rax
jne 0x2ab52
xorl %eax, %eax
popq %rbx
retq
| get_changed_storage:
push rbx
mov rbx, rdx
call get_changed_account
test rax, rax
jz short loc_2AB7C
mov rax, [rax+50h]
test rax, rax
jz short loc_2AB7C
movdqu xmm0, xmmword ptr [rbx]
movdqu xmm1, xmmword ptr [rbx+10h]
loc_2AB52:
movdqu xmm2, xmmword ptr [rax]
pcmpeqb xmm2, xmm0
movdqu xmm3, xmmword ptr [rax+10h]
pcmpeqb xmm3, xmm1
pand xmm3, xmm2
pmovmskb ecx, xmm3
cmp ecx, 0FFFFh
jz short loc_2AB7E
mov rax, [rax+40h]
test rax, rax
jnz short loc_2AB52
loc_2AB7C:
xor eax, eax
loc_2AB7E:
pop rbx
retn
| const __m128i * get_changed_storage(long long a1, const __m128i *a2, const __m128i *a3)
{
const __m128i *changed_account; // rax
const __m128i *result; // rax
__m128i v6; // xmm0
__m128i v7; // xmm1
changed_account = get_changed_account(a1, a2);
if ( !changed_account )
return 0LL;
result = (const __m128i *)changed_account[5].m128i_i64[0];
if ( !result )
return 0LL;
v6 = _mm_loadu_si128(a3);
v7 = _mm_loadu_si128(a3 + 1);
while ( _mm_movemask_epi8(_mm_and_si128(_mm_cmpeq_epi8(_mm_loadu_si128(result + 1), v7), _mm_cmpeq_epi8(_mm_loadu_si128(result), v6))) != 0xFFFF )
{
result = (const __m128i *)result[4].m128i_i64[0];
if ( !result )
return 0LL;
}
return result;
}
| get_changed_storage:
PUSH RBX
MOV RBX,RDX
CALL 0x0012a314
TEST RAX,RAX
JZ 0x0012ab7c
MOV RAX,qword ptr [RAX + 0x50]
TEST RAX,RAX
JZ 0x0012ab7c
MOVDQU XMM0,xmmword ptr [RBX]
MOVDQU XMM1,xmmword ptr [RBX + 0x10]
LAB_0012ab52:
MOVDQU XMM2,xmmword ptr [RAX]
PCMPEQB XMM2,XMM0
MOVDQU XMM3,xmmword ptr [RAX + 0x10]
PCMPEQB XMM3,XMM1
PAND XMM3,XMM2
PMOVMSKB ECX,XMM3
CMP ECX,0xffff
JZ 0x0012ab7e
MOV RAX,qword ptr [RAX + 0x40]
TEST RAX,RAX
JNZ 0x0012ab52
LAB_0012ab7c:
XOR EAX,EAX
LAB_0012ab7e:
POP RBX
RET
|
char * get_changed_storage(int8 param_1,int8 param_2,char *param_3)
{
long lVar1;
char *pcVar2;
int1 auVar3 [16];
int1 auVar4 [16];
lVar1 = get_changed_account();
if ((lVar1 != 0) && (pcVar2 = *(char **)(lVar1 + 0x50), pcVar2 != (char *)0x0)) {
do {
auVar3[0] = -(*pcVar2 == *param_3);
auVar3[1] = -(pcVar2[1] == param_3[1]);
auVar3[2] = -(pcVar2[2] == param_3[2]);
auVar3[3] = -(pcVar2[3] == param_3[3]);
auVar3[4] = -(pcVar2[4] == param_3[4]);
auVar3[5] = -(pcVar2[5] == param_3[5]);
auVar3[6] = -(pcVar2[6] == param_3[6]);
auVar3[7] = -(pcVar2[7] == param_3[7]);
auVar3[8] = -(pcVar2[8] == param_3[8]);
auVar3[9] = -(pcVar2[9] == param_3[9]);
auVar3[10] = -(pcVar2[10] == param_3[10]);
auVar3[0xb] = -(pcVar2[0xb] == param_3[0xb]);
auVar3[0xc] = -(pcVar2[0xc] == param_3[0xc]);
auVar3[0xd] = -(pcVar2[0xd] == param_3[0xd]);
auVar3[0xe] = -(pcVar2[0xe] == param_3[0xe]);
auVar3[0xf] = -(pcVar2[0xf] == param_3[0xf]);
auVar4[0] = -(pcVar2[0x10] == param_3[0x10]);
auVar4[1] = -(pcVar2[0x11] == param_3[0x11]);
auVar4[2] = -(pcVar2[0x12] == param_3[0x12]);
auVar4[3] = -(pcVar2[0x13] == param_3[0x13]);
auVar4[4] = -(pcVar2[0x14] == param_3[0x14]);
auVar4[5] = -(pcVar2[0x15] == param_3[0x15]);
auVar4[6] = -(pcVar2[0x16] == param_3[0x16]);
auVar4[7] = -(pcVar2[0x17] == param_3[0x17]);
auVar4[8] = -(pcVar2[0x18] == param_3[0x18]);
auVar4[9] = -(pcVar2[0x19] == param_3[0x19]);
auVar4[10] = -(pcVar2[0x1a] == param_3[0x1a]);
auVar4[0xb] = -(pcVar2[0x1b] == param_3[0x1b]);
auVar4[0xc] = -(pcVar2[0x1c] == param_3[0x1c]);
auVar4[0xd] = -(pcVar2[0x1d] == param_3[0x1d]);
auVar4[0xe] = -(pcVar2[0x1e] == param_3[0x1e]);
auVar4[0xf] = -(pcVar2[0x1f] == param_3[0x1f]);
auVar4 = auVar4 & auVar3;
if ((ushort)((ushort)(SUB161(auVar4 >> 7,0) & 1) | (ushort)(SUB161(auVar4 >> 0xf,0) & 1) << 1
| (ushort)(SUB161(auVar4 >> 0x17,0) & 1) << 2 |
(ushort)(SUB161(auVar4 >> 0x1f,0) & 1) << 3 |
(ushort)(SUB161(auVar4 >> 0x27,0) & 1) << 4 |
(ushort)(SUB161(auVar4 >> 0x2f,0) & 1) << 5 |
(ushort)(SUB161(auVar4 >> 0x37,0) & 1) << 6 |
(ushort)(SUB161(auVar4 >> 0x3f,0) & 1) << 7 |
(ushort)(SUB161(auVar4 >> 0x47,0) & 1) << 8 |
(ushort)(SUB161(auVar4 >> 0x4f,0) & 1) << 9 |
(ushort)(SUB161(auVar4 >> 0x57,0) & 1) << 10 |
(ushort)(SUB161(auVar4 >> 0x5f,0) & 1) << 0xb |
(ushort)(SUB161(auVar4 >> 0x67,0) & 1) << 0xc |
(ushort)(SUB161(auVar4 >> 0x6f,0) & 1) << 0xd |
(ushort)(SUB161(auVar4 >> 0x77,0) & 1) << 0xe |
(ushort)(byte)(auVar4[0xf] >> 7) << 0xf) == 0xffff) {
return pcVar2;
}
pcVar2 = *(char **)(pcVar2 + 0x40);
} while (pcVar2 != (char *)0x0);
}
return (char *)0x0;
}
|
|
3,425 | func_uni_big5_onechar | eloqsql/strings/ctype-big5.c | static int func_uni_big5_onechar(int code){
if ((code>=0x00A2)&&(code<=0x00F7))
return(tab_uni_big50[code-0x00A2]);
if ((code>=0x02C7)&&(code<=0x0451))
return(tab_uni_big51[code-0x02C7]);
if ((code>=0x2013)&&(code<=0x22BF))
return(tab_uni_big52[code-0x2013]);
if ((code>=0x2460)&&(code<=0x2642))
return(tab_uni_big53[code-0x2460]);
if ((code>=0x3000)&&(code<=0x3129))
return(tab_uni_big54[code-0x3000]);
if ((code>=0x32A3)&&(code<=0x32A3))
return(tab_uni_big55[code-0x32A3]);
if ((code>=0x338E)&&(code<=0x33D5))
return(tab_uni_big56[code-0x338E]);
if ((code>=0x4E00)&&(code<=0x9483))
return(tab_uni_big57[code-0x4E00]);
if ((code>=0x9577)&&(code<=0x9FA4))
return(tab_uni_big58[code-0x9577]);
if ((code>=0xFA0C)&&(code<=0xFA0D))
return(tab_uni_big59[code-0xFA0C]);
if ((code>=0xFE30)&&(code<=0xFFFD))
return(tab_uni_big510[code-0xFE30]);
return(0);
} | O0 | c | func_uni_big5_onechar:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
cmpl $0xa2, -0x8(%rbp)
jl 0x34ae7
cmpl $0xf7, -0x8(%rbp)
jg 0x34ae7
movl -0x8(%rbp), %eax
subl $0xa2, %eax
movslq %eax, %rcx
leaq 0x54575(%rip), %rax # 0x89050
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x34cc5
cmpl $0x2c7, -0x8(%rbp) # imm = 0x2C7
jl 0x34b17
cmpl $0x451, -0x8(%rbp) # imm = 0x451
jg 0x34b17
movl -0x8(%rbp), %eax
subl $0x2c7, %eax # imm = 0x2C7
movslq %eax, %rcx
leaq 0x545f5(%rip), %rax # 0x89100
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x34cc5
cmpl $0x2013, -0x8(%rbp) # imm = 0x2013
jl 0x34b47
cmpl $0x22bf, -0x8(%rbp) # imm = 0x22BF
jg 0x34b47
movl -0x8(%rbp), %eax
subl $0x2013, %eax # imm = 0x2013
movslq %eax, %rcx
leaq 0x548e5(%rip), %rax # 0x89420
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x34cc5
cmpl $0x2460, -0x8(%rbp) # imm = 0x2460
jl 0x34b77
cmpl $0x2642, -0x8(%rbp) # imm = 0x2642
jg 0x34b77
movl -0x8(%rbp), %eax
subl $0x2460, %eax # imm = 0x2460
movslq %eax, %rcx
leaq 0x54e15(%rip), %rax # 0x89980
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x34cc5
cmpl $0x3000, -0x8(%rbp) # imm = 0x3000
jl 0x34ba7
cmpl $0x3129, -0x8(%rbp) # imm = 0x3129
jg 0x34ba7
movl -0x8(%rbp), %eax
subl $0x3000, %eax # imm = 0x3000
movslq %eax, %rcx
leaq 0x551b5(%rip), %rax # 0x89d50
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x34cc5
cmpl $0x32a3, -0x8(%rbp) # imm = 0x32A3
jl 0x34bd7
cmpl $0x32a3, -0x8(%rbp) # imm = 0x32A3
jg 0x34bd7
movl -0x8(%rbp), %eax
subl $0x32a3, %eax # imm = 0x32A3
movslq %eax, %rcx
leaq 0x553d9(%rip), %rax # 0x89fa4
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x34cc5
cmpl $0x338e, -0x8(%rbp) # imm = 0x338E
jl 0x34c07
cmpl $0x33d5, -0x8(%rbp) # imm = 0x33D5
jg 0x34c07
movl -0x8(%rbp), %eax
subl $0x338e, %eax # imm = 0x338E
movslq %eax, %rcx
leaq 0x553b5(%rip), %rax # 0x89fb0
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x34cc5
cmpl $0x4e00, -0x8(%rbp) # imm = 0x4E00
jl 0x34c37
cmpl $0x9483, -0x8(%rbp) # imm = 0x9483
jg 0x34c37
movl -0x8(%rbp), %eax
subl $0x4e00, %eax # imm = 0x4E00
movslq %eax, %rcx
leaq 0x55415(%rip), %rax # 0x8a040
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x34cc5
cmpl $0x9577, -0x8(%rbp) # imm = 0x9577
jl 0x34c64
cmpl $0x9fa4, -0x8(%rbp) # imm = 0x9FA4
jg 0x34c64
movl -0x8(%rbp), %eax
subl $0x9577, %eax # imm = 0x9577
movslq %eax, %rcx
leaq 0x5e0f5(%rip), %rax # 0x92d50
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x34cc5
cmpl $0xfa0c, -0x8(%rbp) # imm = 0xFA0C
jl 0x34c91
cmpl $0xfa0d, -0x8(%rbp) # imm = 0xFA0D
jg 0x34c91
movl -0x8(%rbp), %eax
subl $0xfa0c, %eax # imm = 0xFA0C
movslq %eax, %rcx
leaq 0x5f524(%rip), %rax # 0x941ac
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x34cc5
cmpl $0xfe30, -0x8(%rbp) # imm = 0xFE30
jl 0x34cbe
cmpl $0xfffd, -0x8(%rbp) # imm = 0xFFFD
jg 0x34cbe
movl -0x8(%rbp), %eax
subl $0xfe30, %eax # imm = 0xFE30
movslq %eax, %rcx
leaq 0x5f4fb(%rip), %rax # 0x941b0
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x34cc5
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
| func_uni_big5_onechar:
push rbp
mov rbp, rsp
mov [rbp+var_8], edi
cmp [rbp+var_8], 0A2h
jl short loc_34AE7
cmp [rbp+var_8], 0F7h
jg short loc_34AE7
mov eax, [rbp+var_8]
sub eax, 0A2h
movsxd rcx, eax
lea rax, tab_uni_big50
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_4], eax
jmp loc_34CC5
loc_34AE7:
cmp [rbp+var_8], 2C7h
jl short loc_34B17
cmp [rbp+var_8], 451h
jg short loc_34B17
mov eax, [rbp+var_8]
sub eax, 2C7h
movsxd rcx, eax
lea rax, tab_uni_big51
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_4], eax
jmp loc_34CC5
loc_34B17:
cmp [rbp+var_8], 2013h
jl short loc_34B47
cmp [rbp+var_8], 22BFh
jg short loc_34B47
mov eax, [rbp+var_8]
sub eax, 2013h
movsxd rcx, eax
lea rax, tab_uni_big52
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_4], eax
jmp loc_34CC5
loc_34B47:
cmp [rbp+var_8], 2460h
jl short loc_34B77
cmp [rbp+var_8], 2642h
jg short loc_34B77
mov eax, [rbp+var_8]
sub eax, 2460h
movsxd rcx, eax
lea rax, tab_uni_big53
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_4], eax
jmp loc_34CC5
loc_34B77:
cmp [rbp+var_8], 3000h
jl short loc_34BA7
cmp [rbp+var_8], 3129h
jg short loc_34BA7
mov eax, [rbp+var_8]
sub eax, 3000h
movsxd rcx, eax
lea rax, tab_uni_big54
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_4], eax
jmp loc_34CC5
loc_34BA7:
cmp [rbp+var_8], 32A3h
jl short loc_34BD7
cmp [rbp+var_8], 32A3h
jg short loc_34BD7
mov eax, [rbp+var_8]
sub eax, 32A3h
movsxd rcx, eax
lea rax, tab_uni_big55
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_4], eax
jmp loc_34CC5
loc_34BD7:
cmp [rbp+var_8], 338Eh
jl short loc_34C07
cmp [rbp+var_8], 33D5h
jg short loc_34C07
mov eax, [rbp+var_8]
sub eax, 338Eh
movsxd rcx, eax
lea rax, tab_uni_big56
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_4], eax
jmp loc_34CC5
loc_34C07:
cmp [rbp+var_8], 4E00h
jl short loc_34C37
cmp [rbp+var_8], 9483h
jg short loc_34C37
mov eax, [rbp+var_8]
sub eax, 4E00h
movsxd rcx, eax
lea rax, tab_uni_big57
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_4], eax
jmp loc_34CC5
loc_34C37:
cmp [rbp+var_8], 9577h
jl short loc_34C64
cmp [rbp+var_8], 9FA4h
jg short loc_34C64
mov eax, [rbp+var_8]
sub eax, 9577h
movsxd rcx, eax
lea rax, tab_uni_big58
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_4], eax
jmp short loc_34CC5
loc_34C64:
cmp [rbp+var_8], 0FA0Ch
jl short loc_34C91
cmp [rbp+var_8], 0FA0Dh
jg short loc_34C91
mov eax, [rbp+var_8]
sub eax, 0FA0Ch
movsxd rcx, eax
lea rax, tab_uni_big59
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_4], eax
jmp short loc_34CC5
loc_34C91:
cmp [rbp+var_8], 0FE30h
jl short loc_34CBE
cmp [rbp+var_8], 0FFFDh
jg short loc_34CBE
mov eax, [rbp+var_8]
sub eax, 0FE30h
movsxd rcx, eax
lea rax, tab_uni_big510
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_4], eax
jmp short loc_34CC5
loc_34CBE:
mov [rbp+var_4], 0
loc_34CC5:
mov eax, [rbp+var_4]
pop rbp
retn
| long long func_uni_big5_onechar(int a1)
{
if ( a1 < 162 || a1 > 247 )
{
if ( a1 < 711 || a1 > 1105 )
{
if ( a1 < 8211 || a1 > 8895 )
{
if ( a1 < 9312 || a1 > 9794 )
{
if ( a1 < 12288 || a1 > 12585 )
{
if ( a1 == 12963 )
{
return tab_uni_big55;
}
else if ( a1 < 13198 || a1 > 13269 )
{
if ( a1 < 19968 || a1 > 38019 )
{
if ( a1 < 38263 || a1 > 40868 )
{
if ( a1 < 64012 || a1 > 64013 )
{
if ( a1 < 65072 || a1 > 65533 )
return 0;
else
return tab_uni_big510[a1 - 65072];
}
else
{
return tab_uni_big59[a1 - 64012];
}
}
else
{
return tab_uni_big58[a1 - 38263];
}
}
else
{
return tab_uni_big57[a1 - 19968];
}
}
else
{
return tab_uni_big56[a1 - 13198];
}
}
else
{
return tab_uni_big54[a1 - 12288];
}
}
else
{
return tab_uni_big53[a1 - 9312];
}
}
else
{
return tab_uni_big52[a1 - 8211];
}
}
else
{
return tab_uni_big51[a1 - 711];
}
}
else
{
return tab_uni_big50[a1 - 162];
}
}
| func_uni_big5_onechar:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x8],EDI
CMP dword ptr [RBP + -0x8],0xa2
JL 0x00134ae7
CMP dword ptr [RBP + -0x8],0xf7
JG 0x00134ae7
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0xa2
MOVSXD RCX,EAX
LEA RAX,[0x189050]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00134cc5
LAB_00134ae7:
CMP dword ptr [RBP + -0x8],0x2c7
JL 0x00134b17
CMP dword ptr [RBP + -0x8],0x451
JG 0x00134b17
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0x2c7
MOVSXD RCX,EAX
LEA RAX,[0x189100]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00134cc5
LAB_00134b17:
CMP dword ptr [RBP + -0x8],0x2013
JL 0x00134b47
CMP dword ptr [RBP + -0x8],0x22bf
JG 0x00134b47
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0x2013
MOVSXD RCX,EAX
LEA RAX,[0x189420]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00134cc5
LAB_00134b47:
CMP dword ptr [RBP + -0x8],0x2460
JL 0x00134b77
CMP dword ptr [RBP + -0x8],0x2642
JG 0x00134b77
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0x2460
MOVSXD RCX,EAX
LEA RAX,[0x189980]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00134cc5
LAB_00134b77:
CMP dword ptr [RBP + -0x8],0x3000
JL 0x00134ba7
CMP dword ptr [RBP + -0x8],0x3129
JG 0x00134ba7
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0x3000
MOVSXD RCX,EAX
LEA RAX,[0x189d50]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00134cc5
LAB_00134ba7:
CMP dword ptr [RBP + -0x8],0x32a3
JL 0x00134bd7
CMP dword ptr [RBP + -0x8],0x32a3
JG 0x00134bd7
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0x32a3
MOVSXD RCX,EAX
LEA RAX,[0x189fa4]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00134cc5
LAB_00134bd7:
CMP dword ptr [RBP + -0x8],0x338e
JL 0x00134c07
CMP dword ptr [RBP + -0x8],0x33d5
JG 0x00134c07
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0x338e
MOVSXD RCX,EAX
LEA RAX,[0x189fb0]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00134cc5
LAB_00134c07:
CMP dword ptr [RBP + -0x8],0x4e00
JL 0x00134c37
CMP dword ptr [RBP + -0x8],0x9483
JG 0x00134c37
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0x4e00
MOVSXD RCX,EAX
LEA RAX,[0x18a040]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00134cc5
LAB_00134c37:
CMP dword ptr [RBP + -0x8],0x9577
JL 0x00134c64
CMP dword ptr [RBP + -0x8],0x9fa4
JG 0x00134c64
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0x9577
MOVSXD RCX,EAX
LEA RAX,[0x192d50]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00134cc5
LAB_00134c64:
CMP dword ptr [RBP + -0x8],0xfa0c
JL 0x00134c91
CMP dword ptr [RBP + -0x8],0xfa0d
JG 0x00134c91
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0xfa0c
MOVSXD RCX,EAX
LEA RAX,[0x1941ac]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00134cc5
LAB_00134c91:
CMP dword ptr [RBP + -0x8],0xfe30
JL 0x00134cbe
CMP dword ptr [RBP + -0x8],0xfffd
JG 0x00134cbe
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0xfe30
MOVSXD RCX,EAX
LEA RAX,[0x1941b0]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00134cc5
LAB_00134cbe:
MOV dword ptr [RBP + -0x4],0x0
LAB_00134cc5:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int2 func_uni_big5_onechar(int param_1)
{
int2 uVar1;
if ((param_1 < 0xa2) || (0xf7 < param_1)) {
if ((param_1 < 0x2c7) || (0x451 < param_1)) {
if ((param_1 < 0x2013) || (0x22bf < param_1)) {
if ((param_1 < 0x2460) || (0x2642 < param_1)) {
if ((param_1 < 0x3000) || (0x3129 < param_1)) {
if ((param_1 < 0x32a3) || (0x32a3 < param_1)) {
if ((param_1 < 0x338e) || (0x33d5 < param_1)) {
if ((param_1 < 0x4e00) || (0x9483 < param_1)) {
if ((param_1 < 0x9577) || (0x9fa4 < param_1)) {
if ((param_1 < 0xfa0c) || (0xfa0d < param_1)) {
if ((param_1 < 0xfe30) || (0xfffd < param_1)) {
uVar1 = 0;
}
else {
uVar1 = *(int2 *)(tab_uni_big510 + (long)(param_1 + -0xfe30) * 2);
}
}
else {
uVar1 = *(int2 *)((long)&tab_uni_big59 + (long)(param_1 + -0xfa0c) * 2);
}
}
else {
uVar1 = *(int2 *)(tab_uni_big58 + (long)(param_1 + -0x9577) * 2);
}
}
else {
uVar1 = *(int2 *)(tab_uni_big57 + (long)(param_1 + -0x4e00) * 2);
}
}
else {
uVar1 = *(int2 *)(tab_uni_big56 + (long)(param_1 + -0x338e) * 2);
}
}
else {
uVar1 = (&tab_uni_big55)[param_1 + -0x32a3];
}
}
else {
uVar1 = *(int2 *)(tab_uni_big54 + (long)(param_1 + -0x3000) * 2);
}
}
else {
uVar1 = *(int2 *)(tab_uni_big53 + (long)(param_1 + -0x2460) * 2);
}
}
else {
uVar1 = *(int2 *)(tab_uni_big52 + (long)(param_1 + -0x2013) * 2);
}
}
else {
uVar1 = *(int2 *)(tab_uni_big51 + (long)(param_1 + -0x2c7) * 2);
}
}
else {
uVar1 = *(int2 *)(tab_uni_big50 + (long)(param_1 + -0xa2) * 2);
}
return uVar1;
}
|
|
3,426 | pfs_unlock_mutex_v1 | eloqsql/storage/perfschema/pfs.cc | void pfs_unlock_mutex_v1(PSI_mutex *mutex)
{
PFS_mutex *pfs_mutex= reinterpret_cast<PFS_mutex*> (mutex);
assert(pfs_mutex != NULL);
/*
Note that this code is still protected by the instrumented mutex,
and therefore is thread safe. See inline_mysql_mutex_unlock().
*/
/* Always update the instrumented state */
pfs_mutex->m_owner= NULL;
pfs_mutex->m_last_locked= 0;
#ifdef LATER_WL2333
/*
See WL#2333: SHOW ENGINE ... LOCK STATUS.
PFS_mutex::m_lock_stat is not exposed in user visible tables
currently, so there is no point spending time computing it.
*/
if (! pfs_mutex->m_enabled)
return;
if (! pfs_mutex->m_timed)
return;
ulonglong locked_time;
locked_time= get_timer_pico_value(wait_timer) - pfs_mutex->m_last_locked;
pfs_mutex->m_mutex_stat.m_lock_stat.aggregate_value(locked_time);
#endif
} | O0 | cpp | pfs_unlock_mutex_v1:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq $0x0, 0x40(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x48(%rax)
popq %rbp
retq
nopw (%rax,%rax)
| pfs_unlock_mutex_v1:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov qword ptr [rax+40h], 0
mov rax, [rbp+var_10]
mov qword ptr [rax+48h], 0
pop rbp
retn
| long long pfs_unlock_mutex_v1(long long a1)
{
long long result; // rax
*(_QWORD *)(a1 + 64) = 0LL;
result = a1;
*(_QWORD *)(a1 + 72) = 0LL;
return result;
}
| pfs_unlock_mutex_v1:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x40],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x48],0x0
POP RBP
RET
|
void pfs_unlock_mutex_v1(long param_1)
{
*(int8 *)(param_1 + 0x40) = 0;
*(int8 *)(param_1 + 0x48) = 0;
return;
}
|
|
3,427 | 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;
} | O0 | c | my_strtoull:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0x343ae
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x30, %eax
jl 0x34346
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x39, %eax
jle 0x34348
jmp 0x343ae
movabsq $0x1999999999999999, %rax # imm = 0x1999999999999999
cmpq %rax, -0x28(%rbp)
ja 0x34379
imulq $0xa, -0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
movsbl (%rcx), %ecx
subl $0x30, %ecx
movslq %ecx, %rdx
movq $-0x1, %rcx
subq %rdx, %rcx
cmpq %rcx, %rax
jbe 0x34385
movq -0x20(%rbp), %rax
movl $0x22, (%rax)
jmp 0x343ae
imulq $0xa, -0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
movsbq (%rcx), %rcx
addq %rcx, %rax
subq $0x30, %rax
movq %rax, -0x28(%rbp)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x34320
movq -0x30(%rbp), %rax
cmpq -0x8(%rbp), %rax
jne 0x343c2
movq -0x20(%rbp), %rax
movl $0x22, (%rax)
movq -0x30(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_strtoull:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], 0
mov rax, [rbp+var_8]
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
add rax, [rbp+var_10]
mov [rbp+var_38], rax
loc_34320:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_38]
jnb loc_343AE
mov rax, [rbp+var_30]
movsx eax, byte ptr [rax]
cmp eax, 30h ; '0'
jl short loc_34346
mov rax, [rbp+var_30]
movsx eax, byte ptr [rax]
cmp eax, 39h ; '9'
jle short loc_34348
loc_34346:
jmp short loc_343AE
loc_34348:
mov rax, 1999999999999999h
cmp [rbp+var_28], rax
ja short loc_34379
imul rax, [rbp+var_28], 0Ah
mov rcx, [rbp+var_30]
movsx ecx, byte ptr [rcx]
sub ecx, 30h ; '0'
movsxd rdx, ecx
mov rcx, 0FFFFFFFFFFFFFFFFh
sub rcx, rdx
cmp rax, rcx
jbe short loc_34385
loc_34379:
mov rax, [rbp+var_20]
mov dword ptr [rax], 22h ; '"'
jmp short loc_343AE
loc_34385:
imul rax, [rbp+var_28], 0Ah
mov rcx, [rbp+var_30]
movsx rcx, byte ptr [rcx]
add rax, rcx
sub rax, 30h ; '0'
mov [rbp+var_28], rax
mov rax, [rbp+var_30]
add rax, 1
mov [rbp+var_30], rax
jmp loc_34320
loc_343AE:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_8]
jnz short loc_343C2
mov rax, [rbp+var_20]
mov dword ptr [rax], 22h ; '"'
loc_343C2:
mov rcx, [rbp+var_30]
mov rax, [rbp+var_18]
mov [rax], rcx
mov rax, [rbp+var_28]
pop rbp
retn
| unsigned long long my_strtoull(char *a1, long long a2, char **a3, _DWORD *a4)
{
char *i; // [rsp+8h] [rbp-30h]
unsigned long long v6; // [rsp+10h] [rbp-28h]
v6 = 0LL;
for ( i = a1; i < &a1[a2] && *i >= 48 && *i <= 57; ++i )
{
if ( v6 > 0x1999999999999999LL || 10 * v6 > -1LL - (*i - 48) )
{
*a4 = 34;
break;
}
v6 = *i + 10 * v6 - 48;
}
if ( i == a1 )
*a4 = 34;
*a3 = i;
return v6;
}
| my_strtoull:
PUSH RBP
MOV RBP,RSP
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],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x38],RAX
LAB_00134320:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x38]
JNC 0x001343ae
MOV RAX,qword ptr [RBP + -0x30]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x30
JL 0x00134346
MOV RAX,qword ptr [RBP + -0x30]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x39
JLE 0x00134348
LAB_00134346:
JMP 0x001343ae
LAB_00134348:
MOV RAX,0x1999999999999999
CMP qword ptr [RBP + -0x28],RAX
JA 0x00134379
IMUL RAX,qword ptr [RBP + -0x28],0xa
MOV RCX,qword ptr [RBP + -0x30]
MOVSX ECX,byte ptr [RCX]
SUB ECX,0x30
MOVSXD RDX,ECX
MOV RCX,-0x1
SUB RCX,RDX
CMP RAX,RCX
JBE 0x00134385
LAB_00134379:
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX],0x22
JMP 0x001343ae
LAB_00134385:
IMUL RAX,qword ptr [RBP + -0x28],0xa
MOV RCX,qword ptr [RBP + -0x30]
MOVSX RCX,byte ptr [RCX]
ADD RAX,RCX
SUB RAX,0x30
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
JMP 0x00134320
LAB_001343ae:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x8]
JNZ 0x001343c2
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX],0x22
LAB_001343c2:
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x28]
POP RBP
RET
|
ulong my_strtoull(char *param_1,long param_2,int8 *param_3,int4 *param_4)
{
ulong uVar1;
char *local_38;
ulong local_30;
local_30 = 0;
local_38 = param_1;
while( true ) {
if (((param_1 + param_2 <= local_38) || (*local_38 < '0')) || ('9' < *local_38))
goto LAB_001343ae;
if ((0x1999999999999999 < local_30) ||
(uVar1 = -(long)(*local_38 + -0x30) - 1, uVar1 <= local_30 * 10 && local_30 * 10 - uVar1 != 0
)) break;
local_30 = (local_30 * 10 + (long)*local_38) - 0x30;
local_38 = local_38 + 1;
}
*param_4 = 0x22;
LAB_001343ae:
if (local_38 == param_1) {
*param_4 = 0x22;
}
*param_3 = local_38;
return local_30;
}
|
|
3,428 | psi_cond_timedwait | eloqsql/mysys/my_thr_init.c | ATTRIBUTE_COLD int psi_cond_timedwait(mysql_cond_t *that, mysql_mutex_t *mutex,
const struct timespec *abstime,
const char *file, uint line)
{
PSI_cond_locker_state state;
PSI_cond_locker *locker= PSI_COND_CALL(start_cond_wait)
(&state, that->m_psi, mutex->m_psi, PSI_COND_TIMEDWAIT, file, line);
int result= my_cond_timedwait(&that->m_cond, &mutex->m_mutex, abstime);
if (psi_likely(locker))
PSI_COND_CALL(end_cond_wait)(locker, result);
return result;
} | O0 | c | psi_cond_timedwait:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
leaq 0x1a725d(%rip), %rax # 0x1ce530
movq (%rax), %rax
movq 0x1c0(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x30(%rcx), %rsi
movq -0x10(%rbp), %rcx
movq 0x40(%rcx), %rdx
movq -0x20(%rbp), %r8
movl -0x24(%rbp), %r9d
leaq -0x60(%rbp), %rdi
movl $0x1, %ecx
callq *%rax
movq %rax, -0x68(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x244c0
movl %eax, -0x6c(%rbp)
cmpq $0x0, -0x68(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x27347
leaq 0x1a71fc(%rip), %rax # 0x1ce530
movq (%rax), %rax
movq 0x1c8(%rax), %rax
movq -0x68(%rbp), %rdi
movl -0x6c(%rbp), %esi
callq *%rax
movl -0x6c(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
| psi_cond_timedwait:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_24], r8d
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+1C0h]
mov rcx, [rbp+var_8]
mov rsi, [rcx+30h]
mov rcx, [rbp+var_10]
mov rdx, [rcx+40h]
mov r8, [rbp+var_20]
mov r9d, [rbp+var_24]
lea rdi, [rbp+var_60]
mov ecx, 1
call rax
mov [rbp+var_68], rax
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
call _pthread_cond_timedwait
mov [rbp+var_6C], eax
cmp [rbp+var_68], 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_27347
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+1C8h]
mov rdi, [rbp+var_68]
mov esi, [rbp+var_6C]
call rax
loc_27347:
mov eax, [rbp+var_6C]
add rsp, 70h
pop rbp
retn
| long long psi_cond_timedwait(long long a1, long long a2, long long a3, long long a4, unsigned int a5)
{
unsigned int v6; // [rsp+4h] [rbp-6Ch]
long long v7; // [rsp+8h] [rbp-68h]
_BYTE v8[60]; // [rsp+10h] [rbp-60h] BYREF
unsigned int v9; // [rsp+4Ch] [rbp-24h]
long long v10; // [rsp+50h] [rbp-20h]
long long v11; // [rsp+58h] [rbp-18h]
long long v12; // [rsp+60h] [rbp-10h]
long long v13; // [rsp+68h] [rbp-8h]
v13 = a1;
v12 = a2;
v11 = a3;
v10 = a4;
v9 = a5;
v7 = ((long long ( *)(_BYTE *, _QWORD, _QWORD, long long, long long, _QWORD))PSI_server[56])(
v8,
*(_QWORD *)(a1 + 48),
*(_QWORD *)(a2 + 64),
1LL,
a4,
a5);
v6 = pthread_cond_timedwait(v13, v12, v11);
if ( v7 )
((void ( *)(long long, _QWORD))PSI_server[57])(v7, v6);
return v6;
}
| psi_cond_timedwait:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
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 dword ptr [RBP + -0x24],R8D
LEA RAX,[0x2ce530]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x1c0]
MOV RCX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RCX + 0x30]
MOV RCX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RCX + 0x40]
MOV R8,qword ptr [RBP + -0x20]
MOV R9D,dword ptr [RBP + -0x24]
LEA RDI,[RBP + -0x60]
MOV ECX,0x1
CALL RAX
MOV qword ptr [RBP + -0x68],RAX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x001244c0
MOV dword ptr [RBP + -0x6c],EAX
CMP qword ptr [RBP + -0x68],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x00127347
LEA RAX,[0x2ce530]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x1c8]
MOV RDI,qword ptr [RBP + -0x68]
MOV ESI,dword ptr [RBP + -0x6c]
CALL RAX
LAB_00127347:
MOV EAX,dword ptr [RBP + -0x6c]
ADD RSP,0x70
POP RBP
RET
|
int psi_cond_timedwait(pthread_cond_t *param_1,pthread_mutex_t *param_2,timespec *param_3,
int8 param_4,int4 param_5)
{
int iVar1;
long lVar2;
int1 local_68 [60];
int4 local_2c;
int8 local_28;
timespec *local_20;
pthread_mutex_t *local_18;
pthread_cond_t *local_10;
local_2c = param_5;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
lVar2 = (**(code **)(PSI_server + 0x1c0))
(local_68,param_1[1].__align,*(int8 *)((long)param_2 + 0x40),1,param_4,
param_5);
iVar1 = pthread_cond_timedwait(local_10,local_18,local_20);
if (lVar2 != 0) {
(**(code **)(PSI_server + 0x1c8))(lVar2,iVar1);
}
return iVar1;
}
|
|
3,429 | psi_cond_timedwait | eloqsql/mysys/my_thr_init.c | ATTRIBUTE_COLD int psi_cond_timedwait(mysql_cond_t *that, mysql_mutex_t *mutex,
const struct timespec *abstime,
const char *file, uint line)
{
PSI_cond_locker_state state;
PSI_cond_locker *locker= PSI_COND_CALL(start_cond_wait)
(&state, that->m_psi, mutex->m_psi, PSI_COND_TIMEDWAIT, file, line);
int result= my_cond_timedwait(&that->m_cond, &mutex->m_mutex, abstime);
if (psi_likely(locker))
PSI_COND_CALL(end_cond_wait)(locker, result);
return result;
} | O3 | c | psi_cond_timedwait:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r8d, %r9d
movq %rcx, %r8
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
leaq 0x2caa1d(%rip), %r13 # 0x2ef468
movq (%r13), %rax
movq 0x30(%rdi), %rsi
movq 0x40(%r15), %rdx
leaq -0x60(%rbp), %rdi
pushq $0x1
popq %rcx
callq *0x1c0(%rax)
movq %rax, %rbx
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x244e0
movl %eax, %r14d
testq %rbx, %rbx
jne 0x24a8f
movl %r14d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r13), %rax
movq %rbx, %rdi
movl %r14d, %esi
callq *0x1c8(%rax)
jmp 0x24a7d
| psi_cond_timedwait:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r9d, r8d
mov r8, rcx
mov r14, rdx
mov r15, rsi
mov r12, rdi
lea r13, PSI_server
mov rax, [r13+0]
mov rsi, [rdi+30h]
mov rdx, [r15+40h]
lea rdi, [rbp+var_60]
push 1
pop rcx
call qword ptr [rax+1C0h]
mov rbx, rax
mov rdi, r12
mov rsi, r15
mov rdx, r14
call _pthread_cond_timedwait
mov r14d, eax
test rbx, rbx
jnz short loc_24A8F
loc_24A7D:
mov eax, r14d
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_24A8F:
mov rax, [r13+0]
mov rdi, rbx
mov esi, r14d
call qword ptr [rax+1C8h]
jmp short loc_24A7D
| long long psi_cond_timedwait(long long a1, long long a2, long long a3, long long a4, unsigned int a5)
{
long long v6; // rbx
unsigned int v7; // r14d
_BYTE v9[96]; // [rsp+0h] [rbp-60h] BYREF
v6 = ((long long ( *)(_BYTE *, _QWORD, _QWORD, long long, long long, _QWORD))PSI_server[56])(
v9,
*(_QWORD *)(a1 + 48),
*(_QWORD *)(a2 + 64),
1LL,
a4,
a5);
v7 = pthread_cond_timedwait(a1, a2, a3);
if ( v6 )
((void ( *)(long long, _QWORD))PSI_server[57])(v6, v7);
return v7;
}
| psi_cond_timedwait:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R9D,R8D
MOV R8,RCX
MOV R14,RDX
MOV R15,RSI
MOV R12,RDI
LEA R13,[0x3ef468]
MOV RAX,qword ptr [R13]
MOV RSI,qword ptr [RDI + 0x30]
MOV RDX,qword ptr [R15 + 0x40]
LEA RDI,[RBP + -0x60]
PUSH 0x1
POP RCX
CALL qword ptr [RAX + 0x1c0]
MOV RBX,RAX
MOV RDI,R12
MOV RSI,R15
MOV RDX,R14
CALL 0x001244e0
MOV R14D,EAX
TEST RBX,RBX
JNZ 0x00124a8f
LAB_00124a7d:
MOV EAX,R14D
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00124a8f:
MOV RAX,qword ptr [R13]
MOV RDI,RBX
MOV ESI,R14D
CALL qword ptr [RAX + 0x1c8]
JMP 0x00124a7d
|
int psi_cond_timedwait(pthread_cond_t *param_1,pthread_mutex_t *param_2,timespec *param_3,
int8 param_4,int4 param_5)
{
int iVar1;
long lVar2;
int1 local_68 [56];
lVar2 = (**(code **)(PSI_server + 0x1c0))
(local_68,param_1[1].__align,*(int8 *)((long)param_2 + 0x40),1,param_4,
param_5);
iVar1 = pthread_cond_timedwait(param_1,param_2,param_3);
if (lVar2 != 0) {
(**(code **)(PSI_server + 0x1c8))(lVar2,iVar1);
}
return iVar1;
}
|
|
3,430 | mysql_commit_start_internal | eloqsql/libmariadb/libmariadb/mariadb_async.c | static void
mysql_commit_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_commit,
(parms->mysql),
parms->mysql,
my_bool,
r_my_bool)
} | O0 | c | mysql_commit_start_internal:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x21b40
movb %al, -0x11(%rbp)
movb -0x11(%rbp), %cl
movq -0x20(%rbp), %rax
movb %cl, 0x8(%rax)
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| mysql_commit_start_internal:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+480h]
mov rax, [rax+28h]
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov rdi, [rax]
call mysql_commit
mov [rbp+var_11], al
mov cl, [rbp+var_11]
mov rax, [rbp+var_20]
mov [rax+8], cl
mov rax, [rbp+var_20]
mov dword ptr [rax], 0
add rsp, 20h
pop rbp
retn
| long long mysql_commit_start_internal(long long *a1)
{
long long result; // rax
long long v2; // [rsp+0h] [rbp-20h]
v2 = *(_QWORD *)(*(_QWORD *)(*a1 + 1152) + 40LL);
*(_BYTE *)(v2 + 8) = mysql_commit(*a1);
result = v2;
*(_DWORD *)v2 = 0;
return result;
}
| mysql_commit_start_internal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
CALL 0x00121b40
MOV byte ptr [RBP + -0x11],AL
MOV CL,byte ptr [RBP + -0x11]
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x8],CL
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX],0x0
ADD RSP,0x20
POP RBP
RET
|
void mysql_commit_start_internal(long *param_1)
{
int4 *puVar1;
int1 uVar2;
puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28);
uVar2 = mysql_commit(*param_1);
*(int1 *)(puVar1 + 2) = uVar2;
*puVar1 = 0;
return;
}
|
|
3,431 | nlohmann::json_abi_v3_11_3::detail::type_error nlohmann::json_abi_v3_11_3::detail::type_error::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>*) | monkey531[P]llama/common/json.hpp | static type_error create(int id_, const std::string& what_arg, BasicJsonContext context)
{
const std::string w = concat(exception::name("type_error", id_), exception::diagnostics(context), what_arg);
return {id_, w.c_str()};
} | O2 | cpp | nlohmann::json_abi_v3_11_3::detail::type_error nlohmann::json_abi_v3_11_3::detail::type_error::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 0x6d6e3(%rip), %rsi # 0xb3212
leaq 0x28(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x283ac
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
movl %ebp, %edx
callq 0x40676
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x449f0
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rsi
leaq 0x8(%rsp), %rdx
movq %r14, %rcx
callq 0x4060d
leaq 0x8(%rsp), %rdi
callq 0x25478
leaq 0x48(%rsp), %rdi
callq 0x25478
leaq 0x28(%rsp), %rdi
callq 0x25478
movq 0x68(%rsp), %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x4604a
leaq 0x68(%rsp), %rdi
callq 0x25478
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
jmp 0x45beb
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x25478
jmp 0x45bd7
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x25478
jmp 0x45be6
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x25478
jmp 0x45bf5
movq %rax, %rbx
movq %rbx, %rdi
callq 0x251e0
| _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_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, aTypeError; "type_error"
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_36detail10type_errorC2EiPKc; nlohmann::json_abi_v3_11_3::detail::type_error::type_error(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_45BEB
mov rbx, rax
lea rdi, [rsp+arg_0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_45BD7
mov rbx, rax
loc_45BD7:
lea rdi, [rsp+arg_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_45BE6
mov rbx, rax
loc_45BE6:
lea rdi, [rsp+arg_20]; void *
loc_45BEB:
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_45BF5
mov rbx, rax
loc_45BF5:
mov rdi, rbx
call __Unwind_Resume
| nlohmann::json_abi_v3_11_3::detail::type_error * ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
nlohmann::json_abi_v3_11_3::detail::type_error *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)"type_error");
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::type_error::type_error(this, a2, v8[0]);
std::string::~string(v8);
return this;
}
| _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_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_00145b28:
LEA RSI,[0x1b3212]
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x7]
CALL 0x001283ac
LAB_00145b3e:
LEA RDI,[RSP + 0x48]
LEA RSI,[RSP + 0x28]
MOV EDX,EBP
CALL 0x00140676
LAB_00145b4f:
LEA RDI,[RSP + 0x8]
MOV RSI,R15
CALL 0x001449f0
LAB_00145b5c:
LEA RDI,[RSP + 0x68]
LEA RSI,[RSP + 0x48]
LEA RDX,[RSP + 0x8]
MOV RCX,R14
CALL 0x0014060d
LEA RDI,[RSP + 0x8]
CALL 0x00125478
LEA RDI,[RSP + 0x48]
CALL 0x00125478
LEA RDI,[RSP + 0x28]
CALL 0x00125478
MOV RDX,qword ptr [RSP + 0x68]
LAB_00145b96:
MOV RDI,RBX
MOV ESI,EBP
CALL 0x0014604a
LAB_00145ba0:
LEA RDI,[RSP + 0x68]
CALL 0x00125478
MOV RAX,RBX
ADD RSP,0x88
POP RBX
POP R14
POP R15
POP RBP
RET
|
type_error *
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(type_error *param_1,int param_2,string *param_3)
{
allocator local_a1;
string local_a0 [32];
string local_80 [32];
exception local_60 [32];
char *local_40 [4];
/* try { // try from 00145b28 to 00145b3d has its CatchHandler @ 00145bf2 */
std::__cxx11::string::string<std::allocator<char>>(local_80,"type_error",&local_a1);
/* try { // try from 00145b3e to 00145b4e has its CatchHandler @ 00145be3 */
nlohmann::json_abi_v3_11_3::detail::exception::name(local_60,local_80,param_2);
/* try { // try from 00145b4f to 00145b5b has its CatchHandler @ 00145bd4 */
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 00145b5c to 00145b72 has its CatchHandler @ 00145bc5 */
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,local_a0,param_3);
std::__cxx11::string::~string(local_a0);
std::__cxx11::string::~string((string *)local_60);
std::__cxx11::string::~string(local_80);
/* try { // try from 00145b96 to 00145b9f has its CatchHandler @ 00145bbb */
nlohmann::json_abi_v3_11_3::detail::type_error::type_error(param_1,param_2,local_40[0]);
std::__cxx11::string::~string((string *)local_40);
return param_1;
}
|
|
3,432 | int2str | eloqsql/strings/int2str.c | char *
int2str(register long int val, register char *dst, register int radix,
int upcase)
{
char buffer[65];
register char *p;
long int new_val;
const char *dig_vec= upcase ? _dig_vec_upper : _dig_vec_lower;
ulong uval= (ulong) val;
if (radix < 0)
{
if (radix < -36 || radix > -2)
return NullS;
if (val < 0)
{
*dst++ = '-';
/* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */
uval = (ulong)0 - uval;
}
radix = -radix;
}
else if (radix > 36 || radix < 2)
return NullS;
/*
The slightly contorted code which follows is due to the fact that
few machines directly support unsigned long / and %. Certainly
the VAX C compiler generates a subroutine call. In the interests
of efficiency (hollow laugh) I let this happen for the first digit
only; after that "val" will be in range so that signed integer
division will do. Sorry 'bout that. CHECK THE CODE PRODUCED BY
YOUR C COMPILER. The first % and / should be unsigned, the second
% and / signed, but C compilers tend to be extraordinarily
sensitive to minor details of style. This works on a VAX, that's
all I claim for it.
*/
p = &buffer[sizeof(buffer)-1];
*p = '\0';
new_val= uval / (ulong) radix;
*--p = dig_vec[(uchar) (uval- (ulong) new_val*(ulong) radix)];
val = new_val;
#ifdef HAVE_LDIV
while (val != 0)
{
ldiv_t res;
res=ldiv(val,radix);
*--p = dig_vec[res.rem];
val= res.quot;
}
#else
while (val != 0)
{
new_val=val/radix;
*--p = dig_vec[(uchar) (val-new_val*radix)];
val= new_val;
}
#endif
while ((*dst++ = *p++) != 0) ;
return dst-1;
} | O3 | c | int2str:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rsi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x28(%rbp)
testl %ecx, %ecx
jne 0x78f08
leaq 0x28188a(%rip), %r15 # 0x2fa790
jmp 0x78f0f
leaq 0x281851(%rip), %r15 # 0x2fa760
testl %edx, %edx
js 0x78f1d
leal -0x25(%rdx), %eax
cmpl $-0x23, %eax
jb 0x78f25
jmp 0x78f39
leal 0x1(%rdx), %eax
cmpl $-0x23, %eax
jae 0x78f29
xorl %ebx, %ebx
jmp 0x78f8e
testq %rdi, %rdi
jns 0x78f37
movb $0x2d, (%rbx)
incq %rbx
negq %rdi
negl %edx
leaq -0x31(%rbp), %r12
movb $0x0, 0x1(%r12)
movl %edx, %r14d
movq %rdi, %rax
xorl %edx, %edx
divq %r14
movzbl %dl, %ecx
movb (%r15,%rcx), %cl
movb %cl, (%r12)
cmpq %r14, %rdi
jb 0x78f7a
movq %rax, %rdi
movq %r14, %rsi
callq 0x26140
movb (%r15,%rdx), %cl
movb %cl, -0x1(%r12)
decq %r12
testq %rax, %rax
jne 0x78f5e
decq %rbx
movb (%r12), %al
incq %r12
movb %al, 0x1(%rbx)
incq %rbx
testb %al, %al
jne 0x78f7d
movq %fs:0x28, %rax
cmpq -0x28(%rbp), %rax
jne 0x78fad
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x263a0
| int2str:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 50h
mov rbx, rsi
mov rax, fs:28h
mov [rbp+var_28], rax
test ecx, ecx
jnz short loc_78F08
lea r15, _dig_vec_lower; "0123456789abcdefghijklmnopqrstuvwxyz"
jmp short loc_78F0F
loc_78F08:
lea r15, _dig_vec_upper; "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
loc_78F0F:
test edx, edx
js short loc_78F1D
lea eax, [rdx-25h]
cmp eax, 0FFFFFFDDh
jb short loc_78F25
jmp short loc_78F39
loc_78F1D:
lea eax, [rdx+1]
cmp eax, 0FFFFFFDDh
jnb short loc_78F29
loc_78F25:
xor ebx, ebx
jmp short loc_78F8E
loc_78F29:
test rdi, rdi
jns short loc_78F37
mov byte ptr [rbx], 2Dh ; '-'
inc rbx
neg rdi
loc_78F37:
neg edx
loc_78F39:
lea r12, [rbp+var_31]
mov byte ptr [r12+1], 0
mov r14d, edx
mov rax, rdi
xor edx, edx
div r14
movzx ecx, dl
mov cl, [r15+rcx]
mov [r12], cl
cmp rdi, r14
jb short loc_78F7A
loc_78F5E:
mov rdi, rax
mov rsi, r14
call _ldiv
mov cl, [r15+rdx]
mov [r12-1], cl
dec r12
test rax, rax
jnz short loc_78F5E
loc_78F7A:
dec rbx
loc_78F7D:
mov al, [r12]
inc r12
mov [rbx+1], al
inc rbx
test al, al
jnz short loc_78F7D
loc_78F8E:
mov rax, fs:28h
cmp rax, [rbp+var_28]
jnz short loc_78FAD
mov rax, rbx
add rsp, 50h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_78FAD:
call ___stack_chk_fail
| _BYTE * int2str(unsigned long long a1, _BYTE *a2, unsigned int a3, int a4)
{
_BYTE *v4; // rbx
const char *v5; // r15
_BYTE *v6; // rbx
char *v7; // r12
long long v8; // r14
unsigned long long v9; // rax
long long v10; // rdx
char v11; // al
_BYTE v13[9]; // [rsp+3Fh] [rbp-31h] BYREF
unsigned long long v14; // [rsp+48h] [rbp-28h]
v4 = a2;
v14 = __readfsqword(0x28u);
if ( a4 )
v5 = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
else
v5 = "0123456789abcdefghijklmnopqrstuvwxyz";
if ( (a3 & 0x80000000) != 0 )
{
if ( a3 + 1 >= 0xFFFFFFDD )
{
if ( (a1 & 0x8000000000000000LL) != 0LL )
{
*a2 = 45;
v4 = a2 + 1;
a1 = -(long long)a1;
}
a3 = -a3;
goto LABEL_12;
}
return 0LL;
}
if ( a3 - 37 < 0xFFFFFFDD )
return 0LL;
LABEL_12:
v7 = v13;
v13[1] = 0;
v8 = a3;
v9 = a1 / a3;
v13[0] = v5[(unsigned __int8)(a1 % a3)];
if ( a1 >= a3 )
{
do
{
v9 = ldiv(v9, v8);
*--v7 = v5[v10];
}
while ( v9 );
}
v6 = v4 - 1;
do
{
v11 = *v7++;
*++v6 = v11;
}
while ( v11 );
return v6;
}
| int2str:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x50
MOV RBX,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
TEST ECX,ECX
JNZ 0x00178f08
LEA R15,[0x3fa790]
JMP 0x00178f0f
LAB_00178f08:
LEA R15,[0x3fa760]
LAB_00178f0f:
TEST EDX,EDX
JS 0x00178f1d
LEA EAX,[RDX + -0x25]
CMP EAX,-0x23
JC 0x00178f25
JMP 0x00178f39
LAB_00178f1d:
LEA EAX,[RDX + 0x1]
CMP EAX,-0x23
JNC 0x00178f29
LAB_00178f25:
XOR EBX,EBX
JMP 0x00178f8e
LAB_00178f29:
TEST RDI,RDI
JNS 0x00178f37
MOV byte ptr [RBX],0x2d
INC RBX
NEG RDI
LAB_00178f37:
NEG EDX
LAB_00178f39:
LEA R12,[RBP + -0x31]
MOV byte ptr [R12 + 0x1],0x0
MOV R14D,EDX
MOV RAX,RDI
XOR EDX,EDX
DIV R14
MOVZX ECX,DL
MOV CL,byte ptr [R15 + RCX*0x1]
MOV byte ptr [R12],CL
CMP RDI,R14
JC 0x00178f7a
LAB_00178f5e:
MOV RDI,RAX
MOV RSI,R14
CALL 0x00126140
MOV CL,byte ptr [R15 + RDX*0x1]
MOV byte ptr [R12 + -0x1],CL
DEC R12
TEST RAX,RAX
JNZ 0x00178f5e
LAB_00178f7a:
DEC RBX
LAB_00178f7d:
MOV AL,byte ptr [R12]
INC R12
MOV byte ptr [RBX + 0x1],AL
INC RBX
TEST AL,AL
JNZ 0x00178f7d
LAB_00178f8e:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x28]
JNZ 0x00178fad
MOV RAX,RBX
ADD RSP,0x50
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00178fad:
CALL 0x001263a0
|
int1 * int2str(ulong param_1,int1 *param_2,uint param_3,int param_4)
{
char cVar1;
ulong __numer;
char *pcVar2;
ulong __denom;
char *pcVar3;
long in_FS_OFFSET;
ldiv_t lVar4;
char local_3a [10];
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
if (param_4 == 0) {
pcVar3 = "0123456789abcdefghijklmnopqrstuvwxyz";
}
else {
pcVar3 = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
}
if ((int)param_3 < 0) {
if (param_3 + 1 < 0xffffffdd) goto LAB_00178f25;
if ((long)param_1 < 0) {
*param_2 = 0x2d;
param_2 = param_2 + 1;
param_1 = -param_1;
}
param_3 = -param_3;
}
else if (param_3 - 0x25 < 0xffffffdd) {
LAB_00178f25:
param_2 = (int1 *)0x0;
goto LAB_00178f8e;
}
pcVar2 = local_3a + 1;
local_3a[2] = 0;
__denom = (ulong)param_3;
__numer = param_1 / __denom;
local_3a[1] = pcVar3[param_1 % __denom & 0xff];
if (__denom <= param_1) {
do {
lVar4 = ldiv(__numer,__denom);
__numer = lVar4.quot;
pcVar2[-1] = pcVar3[lVar4.rem];
pcVar2 = pcVar2 + -1;
} while (__numer != 0);
}
param_2 = param_2 + -1;
do {
cVar1 = *pcVar2;
pcVar2 = pcVar2 + 1;
param_2[1] = cVar1;
param_2 = param_2 + 1;
} while (cVar1 != '\0');
LAB_00178f8e:
if (*(long *)(in_FS_OFFSET + 0x28) != local_30) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return param_2;
}
|
|
3,433 | get_internal_charset | eloqsql/mysys/charset.c | static CHARSET_INFO *
get_internal_charset(MY_CHARSET_LOADER *loader, uint cs_number, myf flags)
{
char buf[FN_REFLEN];
struct charset_info_st *cs;
DBUG_ASSERT(cs_number < array_elements(all_charsets));
if ((cs= (struct charset_info_st*) all_charsets[cs_number]))
{
if (cs->state & MY_CS_READY) /* if CS is already initialized */
{
my_collation_statistics_inc_use_count(cs_number);
return cs;
}
/*
To make things thread safe we are not allowing other threads to interfere
while we may changing the cs_info_table
*/
mysql_mutex_lock(&THR_LOCK_charset);
if (!(cs->state & (MY_CS_COMPILED|MY_CS_LOADED))) /* if CS is not in memory */
{
MY_CHARSET_LOADER loader;
strxmov(get_charsets_dir(buf), cs->cs_name.str, ".xml", NullS);
my_charset_loader_init_mysys(&loader);
my_read_charset_file(&loader, buf, flags);
}
if (cs->state & MY_CS_AVAILABLE)
{
if (!(cs->state & MY_CS_READY))
{
if (!simple_8bit_charset_data_is_full(cs))
{
CHARSET_INFO *refcs= find_charset_data_inheritance_source(cs);
if (refcs)
inherit_charset_data(cs, refcs);
}
if (!simple_8bit_collation_data_is_full(cs))
{
CHARSET_INFO *refcl= find_collation_data_inheritance_source(cs, flags);
if (refcl)
inherit_collation_data(cs, refcl);
}
if (my_ci_init_charset(cs, loader) ||
my_ci_init_collation(cs, loader))
{
cs= NULL;
}
else
cs->state|= MY_CS_READY;
}
my_collation_statistics_inc_use_count(cs_number);
}
else
cs= NULL;
mysql_mutex_unlock(&THR_LOCK_charset);
}
return cs;
} | O0 | c | get_internal_charset:
pushq %rbp
movq %rsp, %rbp
subq $0x300, %rsp # imm = 0x300
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x2d0(%rbp)
movl %esi, -0x2d4(%rbp)
movq %rdx, -0x2e0(%rbp)
jmp 0xdbd9e
movl -0x2d4(%rbp), %eax
movl %eax, %ecx
leaq 0xb9e5d3(%rip), %rax # 0xc7a380
movq (%rax,%rcx,8), %rax
movq %rax, -0x2e8(%rbp)
cmpq $0x0, %rax
je 0xdbfa7
movq -0x2e8(%rbp), %rax
movl 0xc(%rax), %eax
andl $0x100, %eax # imm = 0x100
cmpl $0x0, %eax
je 0xdbdf4
movl -0x2d4(%rbp), %edi
callq 0xdd700
movq -0x2e8(%rbp), %rax
movq %rax, -0x2c8(%rbp)
jmp 0xdbfb5
leaq 0xba73a5(%rip), %rdi # 0xc831a0
leaq 0x77eec(%rip), %rsi # 0x153cee
movl $0x36b, %edx # imm = 0x36B
callq 0xdd730
movq -0x2e8(%rbp), %rax
movl 0xc(%rax), %eax
andl $0x9, %eax
cmpl $0x0, %eax
jne 0xdbe70
leaq -0x210(%rbp), %rdi
callq 0xdb3e0
movq %rax, %rdi
movq -0x2e8(%rbp), %rax
movq 0x10(%rax), %rsi
leaq 0x77e92(%rip), %rdx # 0x153cd1
xorl %eax, %eax
movl %eax, %ecx
movb $0x0, %al
callq 0x14de60
leaq -0x2c0(%rbp), %rdi
callq 0xdad40
leaq -0x210(%rbp), %rsi
movq -0x2e0(%rbp), %rdx
leaq -0x2c0(%rbp), %rdi
callq 0xdd280
movq -0x2e8(%rbp), %rax
movl 0xc(%rax), %eax
andl $0x200, %eax # imm = 0x200
cmpl $0x0, %eax
je 0xdbf90
movq -0x2e8(%rbp), %rax
movl 0xc(%rax), %eax
andl $0x100, %eax # imm = 0x100
cmpl $0x0, %eax
jne 0xdbf83
movq -0x2e8(%rbp), %rdi
callq 0xdd1a0
cmpb $0x0, %al
jne 0xdbee2
movq -0x2e8(%rbp), %rdi
callq 0xdd7a0
movq %rax, -0x2f0(%rbp)
cmpq $0x0, -0x2f0(%rbp)
je 0xdbee0
movq -0x2e8(%rbp), %rdi
movq -0x2f0(%rbp), %rsi
callq 0xdd7e0
jmp 0xdbee2
movq -0x2e8(%rbp), %rdi
callq 0xdd200
cmpb $0x0, %al
jne 0xdbf2b
movq -0x2e8(%rbp), %rdi
movq -0x2e0(%rbp), %rsi
callq 0xdd860
movq %rax, -0x2f8(%rbp)
cmpq $0x0, -0x2f8(%rbp)
je 0xdbf29
movq -0x2e8(%rbp), %rdi
movq -0x2f8(%rbp), %rsi
callq 0xdd970
jmp 0xdbf2b
movq -0x2e8(%rbp), %rdi
movq -0x2d0(%rbp), %rsi
callq 0xdd9b0
movsbl %al, %eax
cmpl $0x0, %eax
jne 0xdbf61
movq -0x2e8(%rbp), %rdi
movq -0x2d0(%rbp), %rsi
callq 0xdda00
movsbl %al, %eax
cmpl $0x0, %eax
je 0xdbf6e
movq $0x0, -0x2e8(%rbp)
jmp 0xdbf81
movq -0x2e8(%rbp), %rax
movl 0xc(%rax), %ecx
orl $0x100, %ecx # imm = 0x100
movl %ecx, 0xc(%rax)
jmp 0xdbf83
movl -0x2d4(%rbp), %edi
callq 0xdd700
jmp 0xdbf9b
movq $0x0, -0x2e8(%rbp)
leaq 0xba71fe(%rip), %rdi # 0xc831a0
callq 0xdda50
movq -0x2e8(%rbp), %rax
movq %rax, -0x2c8(%rbp)
movq -0x2c8(%rbp), %rax
movq %rax, -0x300(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0xdbfe5
movq -0x300(%rbp), %rax
addq $0x300, %rsp # imm = 0x300
popq %rbp
retq
callq 0x2a250
nopw (%rax,%rax)
| get_internal_charset:
push rbp
mov rbp, rsp
sub rsp, 300h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_2D0], rdi
mov [rbp+var_2D4], esi
mov [rbp+var_2E0], rdx
jmp short $+2
loc_DBD9E:
mov eax, [rbp+var_2D4]
mov ecx, eax
lea rax, all_charsets
mov rax, [rax+rcx*8]
mov [rbp+var_2E8], rax
cmp rax, 0
jz loc_DBFA7
mov rax, [rbp+var_2E8]
mov eax, [rax+0Ch]
and eax, 100h
cmp eax, 0
jz short loc_DBDF4
mov edi, [rbp+var_2D4]
call my_collation_statistics_inc_use_count
mov rax, [rbp+var_2E8]
mov [rbp+var_2C8], rax
jmp loc_DBFB5
loc_DBDF4:
lea rdi, THR_LOCK_charset
lea rsi, aWorkspaceLlm4b_34; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 36Bh
call inline_mysql_mutex_lock_22
mov rax, [rbp+var_2E8]
mov eax, [rax+0Ch]
and eax, 9
cmp eax, 0
jnz short loc_DBE70
lea rdi, [rbp+var_210]
call get_charsets_dir
mov rdi, rax
mov rax, [rbp+var_2E8]
mov rsi, [rax+10h]
lea rdx, aIndexXml+5; ".xml"
xor eax, eax
mov ecx, eax
mov al, 0
call strxmov
lea rdi, [rbp+var_2C0]
call my_charset_loader_init_mysys
lea rsi, [rbp+var_210]
mov rdx, [rbp+var_2E0]
lea rdi, [rbp+var_2C0]
call my_read_charset_file
loc_DBE70:
mov rax, [rbp+var_2E8]
mov eax, [rax+0Ch]
and eax, 200h
cmp eax, 0
jz loc_DBF90
mov rax, [rbp+var_2E8]
mov eax, [rax+0Ch]
and eax, 100h
cmp eax, 0
jnz loc_DBF83
mov rdi, [rbp+var_2E8]
call simple_8bit_charset_data_is_full
cmp al, 0
jnz short loc_DBEE2
mov rdi, [rbp+var_2E8]
call find_charset_data_inheritance_source
mov [rbp+var_2F0], rax
cmp [rbp+var_2F0], 0
jz short loc_DBEE0
mov rdi, [rbp+var_2E8]
mov rsi, [rbp+var_2F0]
call inherit_charset_data
loc_DBEE0:
jmp short $+2
loc_DBEE2:
mov rdi, [rbp+var_2E8]
call simple_8bit_collation_data_is_full
cmp al, 0
jnz short loc_DBF2B
mov rdi, [rbp+var_2E8]
mov rsi, [rbp+var_2E0]
call find_collation_data_inheritance_source
mov [rbp+var_2F8], rax
cmp [rbp+var_2F8], 0
jz short loc_DBF29
mov rdi, [rbp+var_2E8]
mov rsi, [rbp+var_2F8]
call inherit_collation_data
loc_DBF29:
jmp short $+2
loc_DBF2B:
mov rdi, [rbp+var_2E8]
mov rsi, [rbp+var_2D0]
call my_ci_init_charset
movsx eax, al
cmp eax, 0
jnz short loc_DBF61
mov rdi, [rbp+var_2E8]
mov rsi, [rbp+var_2D0]
call my_ci_init_collation
movsx eax, al
cmp eax, 0
jz short loc_DBF6E
loc_DBF61:
mov [rbp+var_2E8], 0
jmp short loc_DBF81
loc_DBF6E:
mov rax, [rbp+var_2E8]
mov ecx, [rax+0Ch]
or ecx, 100h
mov [rax+0Ch], ecx
loc_DBF81:
jmp short $+2
loc_DBF83:
mov edi, [rbp+var_2D4]
call my_collation_statistics_inc_use_count
jmp short loc_DBF9B
loc_DBF90:
mov [rbp+var_2E8], 0
loc_DBF9B:
lea rdi, THR_LOCK_charset
call inline_mysql_mutex_unlock_23
loc_DBFA7:
mov rax, [rbp+var_2E8]
mov [rbp+var_2C8], rax
loc_DBFB5:
mov rax, [rbp+var_2C8]
mov [rbp+var_300], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_DBFE5
mov rax, [rbp+var_300]
add rsp, 300h
pop rbp
retn
loc_DBFE5:
call ___stack_chk_fail
| long long get_internal_charset(long long a1, unsigned int a2, long long a3)
{
int charsets_dir; // eax
int v4; // r8d
int v5; // r9d
long long collation_data_inheritance_source; // [rsp+8h] [rbp-2F8h]
long long charset_data_inheritance_source; // [rsp+10h] [rbp-2F0h]
long long v9; // [rsp+18h] [rbp-2E8h]
_BYTE v12[176]; // [rsp+40h] [rbp-2C0h] BYREF
_BYTE v13[520]; // [rsp+F0h] [rbp-210h] BYREF
unsigned long long v14; // [rsp+2F8h] [rbp-8h]
v14 = __readfsqword(0x28u);
v9 = all_charsets[a2];
if ( !v9 )
return v9;
if ( (*(_DWORD *)(v9 + 12) & 0x100) == 0 )
{
inline_mysql_mutex_lock_22(&THR_LOCK_charset, "/workspace/llm4binary/github2025/eloqsql/mysys/charset.c", 875LL);
if ( (*(_DWORD *)(v9 + 12) & 9) == 0 )
{
charsets_dir = get_charsets_dir((long long)v13);
strxmov(charsets_dir, *(_QWORD *)(v9 + 16), (unsigned int)".xml", 0, v4, v5);
my_charset_loader_init_mysys((long long)v12);
my_read_charset_file(v12, v13, a3);
}
if ( (*(_DWORD *)(v9 + 12) & 0x200) != 0 )
{
if ( (*(_DWORD *)(v9 + 12) & 0x100) == 0 )
{
if ( !(unsigned __int8)simple_8bit_charset_data_is_full(v9) )
{
charset_data_inheritance_source = find_charset_data_inheritance_source(v9);
if ( charset_data_inheritance_source )
inherit_charset_data(v9, charset_data_inheritance_source);
}
if ( !(unsigned __int8)simple_8bit_collation_data_is_full(v9) )
{
collation_data_inheritance_source = find_collation_data_inheritance_source(v9, a3);
if ( collation_data_inheritance_source )
inherit_collation_data(v9, collation_data_inheritance_source);
}
if ( (unsigned __int8)my_ci_init_charset(v9, a1) || (unsigned __int8)my_ci_init_collation(v9, a1) )
v9 = 0LL;
else
*(_DWORD *)(v9 + 12) |= 0x100u;
}
my_collation_statistics_inc_use_count(a2);
}
else
{
v9 = 0LL;
}
inline_mysql_mutex_unlock_23(&THR_LOCK_charset);
return v9;
}
my_collation_statistics_inc_use_count(a2);
return v9;
}
| get_internal_charset:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x300
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x2d0],RDI
MOV dword ptr [RBP + -0x2d4],ESI
MOV qword ptr [RBP + -0x2e0],RDX
JMP 0x001dbd9e
LAB_001dbd9e:
MOV EAX,dword ptr [RBP + -0x2d4]
MOV ECX,EAX
LEA RAX,[0xd7a380]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x2e8],RAX
CMP RAX,0x0
JZ 0x001dbfa7
MOV RAX,qword ptr [RBP + -0x2e8]
MOV EAX,dword ptr [RAX + 0xc]
AND EAX,0x100
CMP EAX,0x0
JZ 0x001dbdf4
MOV EDI,dword ptr [RBP + -0x2d4]
CALL 0x001dd700
MOV RAX,qword ptr [RBP + -0x2e8]
MOV qword ptr [RBP + -0x2c8],RAX
JMP 0x001dbfb5
LAB_001dbdf4:
LEA RDI,[0xd831a0]
LEA RSI,[0x253cee]
MOV EDX,0x36b
CALL 0x001dd730
MOV RAX,qword ptr [RBP + -0x2e8]
MOV EAX,dword ptr [RAX + 0xc]
AND EAX,0x9
CMP EAX,0x0
JNZ 0x001dbe70
LEA RDI,[RBP + -0x210]
CALL 0x001db3e0
MOV RDI,RAX
MOV RAX,qword ptr [RBP + -0x2e8]
MOV RSI,qword ptr [RAX + 0x10]
LEA RDX,[0x253cd1]
XOR EAX,EAX
MOV ECX,EAX
MOV AL,0x0
CALL 0x0024de60
LEA RDI,[RBP + -0x2c0]
CALL 0x001dad40
LEA RSI,[RBP + -0x210]
MOV RDX,qword ptr [RBP + -0x2e0]
LEA RDI,[RBP + -0x2c0]
CALL 0x001dd280
LAB_001dbe70:
MOV RAX,qword ptr [RBP + -0x2e8]
MOV EAX,dword ptr [RAX + 0xc]
AND EAX,0x200
CMP EAX,0x0
JZ 0x001dbf90
MOV RAX,qword ptr [RBP + -0x2e8]
MOV EAX,dword ptr [RAX + 0xc]
AND EAX,0x100
CMP EAX,0x0
JNZ 0x001dbf83
MOV RDI,qword ptr [RBP + -0x2e8]
CALL 0x001dd1a0
CMP AL,0x0
JNZ 0x001dbee2
MOV RDI,qword ptr [RBP + -0x2e8]
CALL 0x001dd7a0
MOV qword ptr [RBP + -0x2f0],RAX
CMP qword ptr [RBP + -0x2f0],0x0
JZ 0x001dbee0
MOV RDI,qword ptr [RBP + -0x2e8]
MOV RSI,qword ptr [RBP + -0x2f0]
CALL 0x001dd7e0
LAB_001dbee0:
JMP 0x001dbee2
LAB_001dbee2:
MOV RDI,qword ptr [RBP + -0x2e8]
CALL 0x001dd200
CMP AL,0x0
JNZ 0x001dbf2b
MOV RDI,qword ptr [RBP + -0x2e8]
MOV RSI,qword ptr [RBP + -0x2e0]
CALL 0x001dd860
MOV qword ptr [RBP + -0x2f8],RAX
CMP qword ptr [RBP + -0x2f8],0x0
JZ 0x001dbf29
MOV RDI,qword ptr [RBP + -0x2e8]
MOV RSI,qword ptr [RBP + -0x2f8]
CALL 0x001dd970
LAB_001dbf29:
JMP 0x001dbf2b
LAB_001dbf2b:
MOV RDI,qword ptr [RBP + -0x2e8]
MOV RSI,qword ptr [RBP + -0x2d0]
CALL 0x001dd9b0
MOVSX EAX,AL
CMP EAX,0x0
JNZ 0x001dbf61
MOV RDI,qword ptr [RBP + -0x2e8]
MOV RSI,qword ptr [RBP + -0x2d0]
CALL 0x001dda00
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x001dbf6e
LAB_001dbf61:
MOV qword ptr [RBP + -0x2e8],0x0
JMP 0x001dbf81
LAB_001dbf6e:
MOV RAX,qword ptr [RBP + -0x2e8]
MOV ECX,dword ptr [RAX + 0xc]
OR ECX,0x100
MOV dword ptr [RAX + 0xc],ECX
LAB_001dbf81:
JMP 0x001dbf83
LAB_001dbf83:
MOV EDI,dword ptr [RBP + -0x2d4]
CALL 0x001dd700
JMP 0x001dbf9b
LAB_001dbf90:
MOV qword ptr [RBP + -0x2e8],0x0
LAB_001dbf9b:
LEA RDI,[0xd831a0]
CALL 0x001dda50
LAB_001dbfa7:
MOV RAX,qword ptr [RBP + -0x2e8]
MOV qword ptr [RBP + -0x2c8],RAX
LAB_001dbfb5:
MOV RAX,qword ptr [RBP + -0x2c8]
MOV qword ptr [RBP + -0x300],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001dbfe5
MOV RAX,qword ptr [RBP + -0x300]
ADD RSP,0x300
POP RBP
RET
LAB_001dbfe5:
CALL 0x0012a250
|
long get_internal_charset(int8 param_1,uint param_2,int8 param_3)
{
char cVar1;
int8 uVar2;
long lVar3;
long in_FS_OFFSET;
long local_2f0;
int1 local_2c8 [176];
int1 local_218 [520];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_2f0 = (&all_charsets)[param_2];
if (local_2f0 != 0) {
if ((*(uint *)(local_2f0 + 0xc) & 0x100) == 0) {
inline_mysql_mutex_lock
(THR_LOCK_charset,"/workspace/llm4binary/github2025/eloqsql/mysys/charset.c",0x36b);
if ((*(uint *)(local_2f0 + 0xc) & 9) == 0) {
uVar2 = get_charsets_dir(local_218);
strxmov(uVar2,*(int8 *)(local_2f0 + 0x10),".xml",0);
my_charset_loader_init_mysys(local_2c8);
my_read_charset_file(local_2c8,local_218,param_3);
}
if ((*(uint *)(local_2f0 + 0xc) & 0x200) == 0) {
local_2f0 = 0;
}
else {
if ((*(uint *)(local_2f0 + 0xc) & 0x100) == 0) {
cVar1 = simple_8bit_charset_data_is_full(local_2f0);
if ((cVar1 == '\0') &&
(lVar3 = find_charset_data_inheritance_source(local_2f0), lVar3 != 0)) {
inherit_charset_data(local_2f0,lVar3);
}
cVar1 = simple_8bit_collation_data_is_full(local_2f0);
if ((cVar1 == '\0') &&
(lVar3 = find_collation_data_inheritance_source(local_2f0,param_3), lVar3 != 0)) {
inherit_collation_data(local_2f0,lVar3);
}
cVar1 = my_ci_init_charset(local_2f0,param_1);
if ((cVar1 == '\0') && (cVar1 = my_ci_init_collation(local_2f0,param_1), cVar1 == '\0')) {
*(uint *)(local_2f0 + 0xc) = *(uint *)(local_2f0 + 0xc) | 0x100;
}
else {
local_2f0 = 0;
}
}
my_collation_statistics_inc_use_count(param_2);
}
inline_mysql_mutex_unlock(THR_LOCK_charset);
}
else {
my_collation_statistics_inc_use_count(param_2);
}
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_2f0;
}
|
|
3,434 | testing::internal::JsonUnitTestResultPrinter::OutputJsonKey(std::ostream*, 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&, 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&, bool) | giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest.cc | void JsonUnitTestResultPrinter::OutputJsonKey(std::ostream* stream,
const std::string& element_name,
const std::string& name,
const std::string& value,
const std::string& indent,
bool comma) {
const std::vector<std::string>& allowed_names =
GetReservedOutputAttributesForElement(element_name);
GTEST_CHECK_(std::find(allowed_names.begin(), allowed_names.end(), name) !=
allowed_names.end())
<< "Key \"" << name << "\" is not allowed for value \"" << element_name
<< "\".";
*stream << indent << "\"" << name << "\": \"" << EscapeJson(value) << "\"";
if (comma) *stream << ",\n";
} | O1 | cpp | testing::internal::JsonUnitTestResultPrinter::OutputJsonKey(std::ostream*, 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&, 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&, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r9d, 0xc(%rsp)
movq %r8, %r12
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r13
movq %rdi, %rbx
leaq 0x30(%rsp), %rbp
movq %rbp, %rdi
callq 0x26444
movq (%rbp), %rdi
movq 0x8(%rbp), %rsi
movq %r15, %rdx
callq 0x3b4aa
cmpq 0x38(%rsp), %rax
jne 0x293d7
leaq 0x193d2(%rip), %rdx # 0x4270d
leaq 0x10(%rsp), %rdi
movl $0x3, %esi
movl $0x122d, %ecx # imm = 0x122D
callq 0x16e72
movq 0x2fc92(%rip), %rdi # 0x58fe8
leaq 0x1a0a3(%rip), %rsi # 0x43400
movl $0x65, %edx
callq 0x85b0
movq 0x2fc7a(%rip), %rdi # 0x58fe8
leaq 0x1a2d8(%rip), %rsi # 0x4364d
movl $0x5, %edx
callq 0x85b0
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq 0x2fc5b(%rip), %rdi # 0x58fe8
callq 0x85b0
movq %rax, %rbp
leaq 0x1a2b7(%rip), %rsi # 0x43653
movl $0x1c, %edx
movq %rax, %rdi
callq 0x85b0
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq %rbp, %rdi
callq 0x85b0
leaq 0x1a2b0(%rip), %rsi # 0x43670
movl $0x2, %edx
movq %rax, %rdi
callq 0x85b0
leaq 0x10(%rsp), %rdi
callq 0x16fb4
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq %rbx, %rdi
callq 0x85b0
movq %rax, %r12
leaq 0x1a2f9(%rip), %rsi # 0x436eb
movl $0x1, %edx
movq %rax, %rdi
callq 0x85b0
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %r12, %rdi
callq 0x85b0
movq %rax, %r15
leaq 0x1a2d0(%rip), %rsi # 0x436e8
movl $0x4, %edx
movq %rax, %rdi
callq 0x85b0
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x29118
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %r15, %rdi
callq 0x85b0
leaq 0x1a2a0(%rip), %rsi # 0x436eb
movl $0x1, %edx
movq %rax, %rdi
callq 0x85b0
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x29473
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x84e0
cmpb $0x0, 0xc(%rsp)
je 0x2948e
leaq 0x1a244(%rip), %rsi # 0x436c5
movl $0x2, %edx
movq %rbx, %rdi
callq 0x85b0
leaq 0x30(%rsp), %rdi
callq 0x3244c
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x294dc
jmp 0x294dc
jmp 0x294dc
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x294df
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x84e0
jmp 0x294df
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x16fb4
jmp 0x294df
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x3244c
movq %rbx, %rdi
callq 0x8990
nop
| _ZN7testing8internal25JsonUnitTestResultPrinter13OutputJsonKeyEPSoRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_SA_SA_b:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov [rsp+78h+var_6C], r9d
mov r12, r8
mov r14, rcx
mov r15, rdx
mov r13, rsi
mov rbx, rdi
lea rbp, [rsp+78h+var_48]
mov rdi, rbp
call _ZN7testingL37GetReservedOutputAttributesForElementERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::GetReservedOutputAttributesForElement(std::string const&)
mov rdi, [rbp+0]
mov rsi, [rbp+8]
mov rdx, r15
call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS7_SaIS7_EEEENS0_5__ops16_Iter_equals_valIS8_EEET_SH_SH_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>,__gnu_cxx::__ops::_Iter_equals_val<std::string const>>(__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>,__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>,__gnu_cxx::__ops::_Iter_equals_val<std::string const>,std::random_access_iterator_tag)
cmp rax, [rsp+78h+var_40]
jnz loc_293D7
lea rdx, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdi, [rsp+78h+var_68]
mov esi, 3
mov ecx, 122Dh
call _ZN7testing8internal8GTestLogC2ENS0_16GTestLogSeverityEPKci; testing::internal::GTestLog::GTestLog(testing::internal::GTestLogSeverity,char const*,int)
mov rdi, cs:_ZSt4cerr_ptr
lea rsi, aConditionStdFi; "Condition std::find(allowed_names.begin"...
mov edx, 65h ; 'e'
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, cs:_ZSt4cerr_ptr
lea rsi, aKey; "Key \""
mov edx, 5
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rsi, [r15]
mov rdx, [r15+8]
mov rdi, cs:_ZSt4cerr_ptr
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rbp, rax
lea rsi, aIsNotAllowedFo_0; "\" is not allowed for value \""
mov edx, 1Ch
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 rsi, [r13+0]
mov rdx, [r13+8]
mov rdi, rbp
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, asc_43670; "\"."
mov edx, 2
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rdi, [rsp+78h+var_68]; this
call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog()
loc_293D7:
mov rsi, [r12]
mov rdx, [r12+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 r12, rax
lea rsi, aMessage+0Fh; "\""
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 rsi, [r15]
mov rdx, [r15+8]
mov rdi, r12
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov r15, rax
lea rsi, aMessage+0Ch; "\": \""
mov edx, 4
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)
lea rdi, [rsp+78h+var_68]; int
mov rsi, r14; int
call _ZN7testing8internal25JsonUnitTestResultPrinter10EscapeJsonERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::JsonUnitTestResultPrinter::EscapeJson(std::string const&)
mov rsi, qword ptr [rsp+78h+var_68]
mov rdx, [rsp+78h+var_60]
mov rdi, r15
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, aMessage+0Fh; "\""
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)
lea rax, [rsp+78h+var_58]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_29473
mov rsi, [rsp+78h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_29473:
cmp byte ptr [rsp+78h+var_6C], 0
jz short loc_2948E
lea rsi, asc_436C4+1; ",\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)
loc_2948E:
lea rdi, [rsp+78h+var_48]; void *
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_294DC
jmp short loc_294DC
jmp short loc_294DC
mov rbx, rax
lea rax, [rsp+arg_18]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_294DF
mov rsi, [rsp+arg_18]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_294DF
mov rbx, rax
lea rdi, [rsp+arg_8]; this
call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog()
jmp short loc_294DF
loc_294DC:
mov rbx, rax
loc_294DF:
lea rdi, [rsp+arg_28]; void *
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, rbx
call __Unwind_Resume
| void testing::internal::JsonUnitTestResultPrinter::OutputJsonKey(
long long a1,
long long *a2,
_QWORD *a3,
_QWORD *a4,
_QWORD *a5,
char a6)
{
long long v9; // rax
long long v10; // rbp
long long v11; // rax
long long v12; // rdx
long long v13; // rcx
long long v14; // r12
long long v15; // r15
long long v16; // rax
int v18[2]; // [rsp+10h] [rbp-68h] BYREF
long long v19; // [rsp+18h] [rbp-60h]
long long v20; // [rsp+20h] [rbp-58h] BYREF
long long v21; // [rsp+30h] [rbp-48h] BYREF
long long v22; // [rsp+38h] [rbp-40h]
testing::GetReservedOutputAttributesForElement((long long)&v21, a2);
v9 = std::__find_if<__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>,__gnu_cxx::__ops::_Iter_equals_val<std::string const>>(
v21,
v22,
a3);
if ( v9 == v22 )
{
testing::internal::GTestLog::GTestLog(
v18,
3,
"/workspace/llm4binary/github/2025_star3/giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest.cc",
4653);
std::__ostream_insert<char,std::char_traits<char>>(
&std::cerr,
"Condition std::find(allowed_names.begin(), allowed_names.end(), name) != allowed_names.end() failed. ",
101LL);
std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, "Key \"", 5LL);
v10 = std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, *a3, a3[1]);
std::__ostream_insert<char,std::char_traits<char>>(v10, "\" is not allowed for value \"", 28LL);
v11 = std::__ostream_insert<char,std::char_traits<char>>(v10, *a2, a2[1]);
std::__ostream_insert<char,std::char_traits<char>>(v11, "\".", 2LL);
testing::internal::GTestLog::~GTestLog((testing::internal::GTestLog *)v18, (long long)"\".", v12, v13);
}
v14 = std::__ostream_insert<char,std::char_traits<char>>(a1, *a5, a5[1]);
std::__ostream_insert<char,std::char_traits<char>>(v14, "\"", 1LL);
v15 = std::__ostream_insert<char,std::char_traits<char>>(v14, *a3, a3[1]);
std::__ostream_insert<char,std::char_traits<char>>(v15, "\": \"", 4LL);
testing::internal::JsonUnitTestResultPrinter::EscapeJson((long long)v18, a4);
v16 = std::__ostream_insert<char,std::char_traits<char>>(v15, *(_QWORD *)v18, v19);
std::__ostream_insert<char,std::char_traits<char>>(v16, "\"", 1LL);
if ( *(long long **)v18 != &v20 )
operator delete(*(void **)v18, v20 + 1);
if ( a6 )
std::__ostream_insert<char,std::char_traits<char>>(a1, ",\n", 2LL);
std::vector<std::string>::~vector(&v21);
}
| OutputJsonKey:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV dword ptr [RSP + 0xc],R9D
MOV R12,R8
MOV R14,RCX
MOV R15,RDX
MOV R13,RSI
MOV RBX,RDI
LEA RBP,[RSP + 0x30]
MOV RDI,RBP
CALL 0x00126444
MOV RDI,qword ptr [RBP]
MOV RSI,qword ptr [RBP + 0x8]
LAB_00129321:
MOV RDX,R15
CALL 0x0013b4aa
CMP RAX,qword ptr [RSP + 0x38]
JNZ 0x001293d7
LAB_00129334:
LEA RDX,[0x14270d]
LEA RDI,[RSP + 0x10]
MOV ESI,0x3
MOV ECX,0x122d
CALL 0x00116e72
LAB_0012934f:
MOV RDI,qword ptr [0x00158fe8]
LEA RSI,[0x143400]
MOV EDX,0x65
CALL 0x001085b0
MOV RDI,qword ptr [0x00158fe8]
LEA RSI,[0x14364d]
MOV EDX,0x5
CALL 0x001085b0
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
MOV RDI,qword ptr [0x00158fe8]
CALL 0x001085b0
MOV RBP,RAX
LEA RSI,[0x143653]
MOV EDX,0x1c
MOV RDI,RAX
CALL 0x001085b0
MOV RSI,qword ptr [R13]
MOV RDX,qword ptr [R13 + 0x8]
MOV RDI,RBP
CALL 0x001085b0
LEA RSI,[0x143670]
MOV EDX,0x2
MOV RDI,RAX
CALL 0x001085b0
LEA RDI,[RSP + 0x10]
CALL 0x00116fb4
LAB_001293d7:
MOV RSI,qword ptr [R12]
MOV RDX,qword ptr [R12 + 0x8]
LAB_001293e0:
MOV RDI,RBX
CALL 0x001085b0
MOV R12,RAX
LEA RSI,[0x1436eb]
MOV EDX,0x1
MOV RDI,RAX
CALL 0x001085b0
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
MOV RDI,R12
CALL 0x001085b0
MOV R15,RAX
LEA RSI,[0x1436e8]
MOV EDX,0x4
MOV RDI,RAX
CALL 0x001085b0
LAB_00129425:
LEA RDI,[RSP + 0x10]
MOV RSI,R14
CALL 0x00129118
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x18]
LAB_0012943c:
MOV RDI,R15
CALL 0x001085b0
LEA RSI,[0x1436eb]
MOV EDX,0x1
MOV RDI,RAX
CALL 0x001085b0
LEA RAX,[RSP + 0x20]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00129473
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x001084e0
LAB_00129473:
CMP byte ptr [RSP + 0xc],0x0
JZ 0x0012948e
LAB_0012947a:
LEA RSI,[0x1436c5]
MOV EDX,0x2
MOV RDI,RBX
CALL 0x001085b0
LAB_0012948e:
LEA RDI,[RSP + 0x30]
CALL 0x0013244c
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* testing::internal::JsonUnitTestResultPrinter::OutputJsonKey(std::ostream*, std::__cxx11::string
const&, std::__cxx11::string const&, std::__cxx11::string const&, std::__cxx11::string const&,
bool) */
void testing::internal::JsonUnitTestResultPrinter::OutputJsonKey
(ostream *param_1,string *param_2,string *param_3,string *param_4,string *param_5,
bool param_6)
{
long lVar1;
ostream *poVar2;
long *local_68;
long local_60;
long local_58 [2];
int8 local_48;
long local_40;
GetReservedOutputAttributesForElement((testing *)&local_48,param_2);
/* try { // try from 00129321 to 00129328 has its CatchHandler @ 001294ab */
lVar1 = std::
__find_if<__gnu_cxx::__normal_iterator<std::__cxx11::string_const*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>,__gnu_cxx::__ops::_Iter_equals_val<std::__cxx11::string_const>>
(local_48,local_40,param_3);
if (lVar1 == local_40) {
/* try { // try from 00129334 to 0012934e has its CatchHandler @ 001294a7 */
GTestLog::GTestLog((GTestLog *)&local_68,3,
"/workspace/llm4binary/github/2025_star3/giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest.cc"
,0x122d);
/* try { // try from 0012934f to 001293cc has its CatchHandler @ 001294cd */
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)PTR_cerr_00158fe8,
"Condition std::find(allowed_names.begin(), allowed_names.end(), name) != allowed_names.end() failed. "
,0x65);
std::__ostream_insert<char,std::char_traits<char>>((ostream *)PTR_cerr_00158fe8,"Key \"",5);
poVar2 = std::__ostream_insert<char,std::char_traits<char>>
((ostream *)PTR_cerr_00158fe8,*(char **)param_3,*(long *)(param_3 + 8));
std::__ostream_insert<char,std::char_traits<char>>(poVar2,"\" is not allowed for value \"",0x1c)
;
poVar2 = std::__ostream_insert<char,std::char_traits<char>>
(poVar2,*(char **)param_2,*(long *)(param_2 + 8));
std::__ostream_insert<char,std::char_traits<char>>(poVar2,"\".",2);
GTestLog::~GTestLog((GTestLog *)&local_68);
}
/* try { // try from 001293e0 to 00129424 has its CatchHandler @ 001294dc */
poVar2 = std::__ostream_insert<char,std::char_traits<char>>
(param_1,*(char **)param_5,*(long *)(param_5 + 8));
std::__ostream_insert<char,std::char_traits<char>>(poVar2,"\"",1);
poVar2 = std::__ostream_insert<char,std::char_traits<char>>
(poVar2,*(char **)param_3,*(long *)(param_3 + 8));
std::__ostream_insert<char,std::char_traits<char>>(poVar2,"\": \"",4);
/* try { // try from 00129425 to 00129431 has its CatchHandler @ 001294a9 */
EscapeJson((JsonUnitTestResultPrinter *)&local_68,param_4);
/* try { // try from 0012943c to 00129457 has its CatchHandler @ 001294ad */
poVar2 = std::__ostream_insert<char,std::char_traits<char>>(poVar2,(char *)local_68,local_60);
std::__ostream_insert<char,std::char_traits<char>>(poVar2,"\"",1);
if (local_68 != local_58) {
operator_delete(local_68,local_58[0] + 1);
}
if (param_6) {
/* try { // try from 0012947a to 0012948d has its CatchHandler @ 001294dc */
std::__ostream_insert<char,std::char_traits<char>>(param_1,",\n",2);
}
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_48);
return;
}
|
|
3,435 | dach_link_equals_str | xtate/src/util-data/data-chain.c | bool dach_link_equals_str(DataLink *link, const char *rhs) {
assert(link);
if (link->link_type != LinkType_String &&
link->link_type != LinkType_Binary)
return false;
assert(link->value_data);
const unsigned char *lhs = link->value_data;
size_t lhs_length = link->data_len;
size_t rhs_length = strlen(rhs);
if (lhs_length != rhs_length)
return false;
return memcmp(lhs, rhs, rhs_length) == 0;
} | O3 | c | dach_link_equals_str:
cmpl $0x1, 0x30(%rdi)
ja 0x4fda6
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl 0x34(%rdi), %r15d
movq %rsi, %rdi
callq 0x15470
cmpq %r15, %rax
jne 0x4fda9
addq $0x48, %r14
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x15710
testl %eax, %eax
sete %al
jmp 0x4fdab
xorl %eax, %eax
retq
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
| dach_link_equals_str:
cmp dword ptr [rdi+30h], 1
ja short loc_4FDA6
push r15
push r14
push rbx
mov rbx, rsi
mov r14, rdi
mov r15d, [rdi+34h]
mov rdi, rsi
call _strlen
cmp rax, r15
jnz short loc_4FDA9
add r14, 48h ; 'H'
mov rdi, r14
mov rsi, rbx
mov rdx, r15
call _bcmp
test eax, eax
setz al
jmp short loc_4FDAB
loc_4FDA6:
xor eax, eax
retn
loc_4FDA9:
xor eax, eax
loc_4FDAB:
pop rbx
pop r14
pop r15
retn
| bool dach_link_equals_str(long long a1, long long a2)
{
long long v2; // r15
if ( *(_DWORD *)(a1 + 48) > 1u )
return 0;
v2 = *(unsigned int *)(a1 + 52);
return strlen(a2) == v2 && (unsigned int)bcmp(a1 + 72, a2, v2) == 0;
}
| dach_link_equals_str:
CMP dword ptr [RDI + 0x30],0x1
JA 0x0014fda6
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RSI
MOV R14,RDI
MOV R15D,dword ptr [RDI + 0x34]
MOV RDI,RSI
CALL 0x00115470
CMP RAX,R15
JNZ 0x0014fda9
ADD R14,0x48
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R15
CALL 0x00115710
TEST EAX,EAX
SETZ AL
JMP 0x0014fdab
LAB_0014fda6:
XOR EAX,EAX
RET
LAB_0014fda9:
XOR EAX,EAX
LAB_0014fdab:
POP RBX
POP R14
POP R15
RET
|
int8 dach_link_equals_str(long param_1,char *param_2)
{
uint uVar1;
int iVar2;
size_t sVar3;
int4 extraout_var;
int8 uVar4;
if (*(uint *)(param_1 + 0x30) < 2) {
uVar1 = *(uint *)(param_1 + 0x34);
sVar3 = strlen(param_2);
if (sVar3 == uVar1) {
iVar2 = bcmp((void *)(param_1 + 0x48),param_2,(ulong)uVar1);
uVar4 = CONCAT71((int7)(CONCAT44(extraout_var,iVar2) >> 8),iVar2 == 0);
}
else {
uVar4 = 0;
}
return uVar4;
}
return 0;
}
|
|
3,436 | ma_set_fatal_error | eloqsql/storage/maria/ma_info.c | void _ma_set_fatal_error(MARIA_HA *info, int error)
{
MARIA_SHARE *share= info->s;
_ma_print_error(info, error,
(share->state.changed & STATE_CRASHED_PRINTED) == 0);
maria_mark_crashed_share(share);
share->state.changed|= STATE_CRASHED_PRINTED;
my_errno= error;
DBUG_ASSERT(!maria_assert_if_crashed_table);
} | O3 | c | ma_set_fatal_error:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
movq (%rdi), %r14
xorl %edx, %edx
btl $0xb, 0x170(%r14)
setae %dl
callq 0x4108a
orl $0x802, 0x170(%r14) # imm = 0x802
callq 0xa2f56
movl %ebx, (%rax)
popq %rbx
popq %r14
popq %rbp
retq
| _ma_set_fatal_error:
push rbp
mov rbp, rsp
push r14
push rbx
mov ebx, esi
mov r14, [rdi]
xor edx, edx
bt dword ptr [r14+170h], 0Bh
setnb dl
call _ma_print_error
or dword ptr [r14+170h], 802h
call _my_thread_var
mov [rax], ebx
pop rbx
pop r14
pop rbp
retn
| int * ma_set_fatal_error(_DWORD *a1, int a2, long long a3, long long a4, long long a5, int a6)
{
long long v6; // r14
int *result; // rax
v6 = *(_QWORD *)a1;
ma_print_error(a1, a2, !_bittest((const signed __int32 *)(*(_QWORD *)a1 + 368LL), 0xBu), a4, a5, a6);
*(_DWORD *)(v6 + 368) |= 0x802u;
result = (int *)my_thread_var(a1);
*result = a2;
return result;
}
| _ma_set_fatal_error:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV EBX,ESI
MOV R14,qword ptr [RDI]
XOR EDX,EDX
BT dword ptr [R14 + 0x170],0xb
SETNC DL
CALL 0x0014108a
OR dword ptr [R14 + 0x170],0x802
CALL 0x001a2f56
MOV dword ptr [RAX],EBX
POP RBX
POP R14
POP RBP
RET
|
void _ma_set_fatal_error(long *param_1,int4 param_2)
{
uint *puVar1;
long lVar2;
int4 *puVar3;
lVar2 = *param_1;
_ma_print_error(param_1,param_2,(*(uint *)(lVar2 + 0x170) >> 0xb & 1) == 0);
puVar1 = (uint *)(lVar2 + 0x170);
*puVar1 = *puVar1 | 0x802;
puVar3 = (int4 *)_my_thread_var();
*puVar3 = param_2;
return;
}
|
|
3,437 | inline_mysql_cond_init | eloqsql/include/mysql/psi/mysql_thread.h | static inline int inline_mysql_cond_init(
#ifdef HAVE_PSI_COND_INTERFACE
PSI_cond_key key,
#endif
mysql_cond_t *that,
const pthread_condattr_t *attr)
{
#ifdef HAVE_PSI_COND_INTERFACE
that->m_psi= PSI_COND_CALL(init_cond)(key, &that->m_cond);
#else
that->m_psi= NULL;
#endif
return pthread_cond_init(&that->m_cond, attr);
} | O0 | c | inline_mysql_cond_init:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq 0x24a1be(%rip), %rax # 0x301fb8
movq (%rax), %rax
movq 0x60(%rax), %rax
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
callq *%rax
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x604a0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| inline_mysql_cond_init:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+60h]
mov edi, [rbp+var_4]
mov rsi, [rbp+var_10]
call rax
mov rcx, rax
mov rax, [rbp+var_10]
mov [rax+30h], rcx
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call _pthread_cond_init
add rsp, 20h
pop rbp
retn
| long long inline_mysql_cond_init(unsigned int a1, long long a2, long long a3)
{
*(_QWORD *)(a2 + 48) = (*((long long ( **)(_QWORD, long long))PSI_server + 12))(a1, a2);
return pthread_cond_init(a2, a3);
}
| inline_mysql_cond_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
LEA RAX,[0x401fb8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x60]
MOV EDI,dword ptr [RBP + -0x4]
MOV RSI,qword ptr [RBP + -0x10]
CALL RAX
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x30],RCX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x001604a0
ADD RSP,0x20
POP RBP
RET
|
void inline_mysql_cond_init(int4 param_1,pthread_cond_t *param_2,pthread_condattr_t *param_3)
{
longlong lVar1;
lVar1 = (**(code **)(PSI_server + 0x60))(param_1,param_2);
param_2[1].__align = lVar1;
pthread_cond_init(param_2,param_3);
return;
}
|
|
3,438 | ggml_backend_registry::register_device(ggml_backend_device*) | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend-reg.cpp | void register_device(ggml_backend_dev_t device) {
#ifndef NDEBUG
GGML_LOG_DEBUG("%s: registered device %s (%s)\n", __func__, ggml_backend_dev_name(device), ggml_backend_dev_description(device));
#endif
devices.push_back(device);
} | O3 | cpp | ggml_backend_registry::register_device(ggml_backend_device*):
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, 0x8(%rsp)
movq %rsi, %rdi
callq 0x68e0
movq %rax, %r15
movq %r14, %rdi
callq 0x6760
leaq 0x3906(%rip), %rsi # 0xc266
leaq 0x391e(%rip), %rdx # 0xc285
movl $0x1, %edi
movq %r15, %rcx
movq %rax, %r8
xorl %eax, %eax
callq 0x6220
movq 0x20(%rbx), %rsi
cmpq 0x28(%rbx), %rsi
je 0x898d
movq %r14, (%rsi)
addq $0x8, 0x20(%rbx)
jmp 0x899e
addq $0x18, %rbx
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x6490
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
| _ZN21ggml_backend_registry15register_deviceEP19ggml_backend_device:
push r15
push r14
push rbx
sub rsp, 10h
mov r14, rsi
mov rbx, rdi
mov [rsp+28h+var_20], rsi
mov rdi, rsi
call _ggml_backend_dev_name
mov r15, rax
mov rdi, r14
call _ggml_backend_dev_description
lea rsi, aSRegisteredDev; "%s: registered device %s (%s)\n"
lea rdx, aRegisterDevice; "register_device"
mov edi, 1
mov rcx, r15
mov r8, rax
xor eax, eax
call _ggml_log_internal
mov rsi, [rbx+20h]
cmp rsi, [rbx+28h]
jz short loc_898D
mov [rsi], r14
add qword ptr [rbx+20h], 8
jmp short loc_899E
loc_898D:
add rbx, 18h
lea rdx, [rsp+28h+var_20]
mov rdi, rbx
call __ZNSt6vectorIP19ggml_backend_deviceSaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_; std::vector<ggml_backend_device *>::_M_realloc_insert<ggml_backend_device * const&>(__gnu_cxx::__normal_iterator<ggml_backend_device **,std::vector<ggml_backend_device *>>,ggml_backend_device * const&)
loc_899E:
add rsp, 10h
pop rbx
pop r14
pop r15
retn
| long long ggml_backend_registry::register_device(long long a1, long long a2)
{
const char *v3; // r15
const char *v4; // rax
long long result; // rax
_QWORD *v6; // rsi
_QWORD v7[4]; // [rsp+8h] [rbp-20h] BYREF
v7[0] = a2;
v3 = (const char *)ggml_backend_dev_name(a2);
v4 = (const char *)ggml_backend_dev_description(a2);
result = ggml_log_internal(1LL, "%s: registered device %s (%s)\n", "register_device", v3, v4);
v6 = *(_QWORD **)(a1 + 32);
if ( v6 == *(_QWORD **)(a1 + 40) )
return std::vector<ggml_backend_device *>::_M_realloc_insert<ggml_backend_device * const&>(a1 + 24, v6, v7);
*v6 = a2;
*(_QWORD *)(a1 + 32) += 8LL;
return result;
}
| register_device:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV R14,RSI
MOV RBX,RDI
MOV qword ptr [RSP + 0x8],RSI
MOV RDI,RSI
CALL 0x001068e0
MOV R15,RAX
MOV RDI,R14
CALL 0x00106760
LEA RSI,[0x10c266]
LEA RDX,[0x10c285]
MOV EDI,0x1
MOV RCX,R15
MOV R8,RAX
XOR EAX,EAX
CALL 0x00106220
MOV RSI,qword ptr [RBX + 0x20]
CMP RSI,qword ptr [RBX + 0x28]
JZ 0x0010898d
MOV qword ptr [RSI],R14
ADD qword ptr [RBX + 0x20],0x8
JMP 0x0010899e
LAB_0010898d:
ADD RBX,0x18
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
CALL 0x00106490
LAB_0010899e:
ADD RSP,0x10
POP RBX
POP R14
POP R15
RET
|
/* ggml_backend_registry::register_device(ggml_backend_device*) */
void __thiscall
ggml_backend_registry::register_device(ggml_backend_registry *this,ggml_backend_device *param_1)
{
int8 *puVar1;
int8 uVar2;
int8 uVar3;
ggml_backend_device *local_20;
local_20 = param_1;
uVar2 = ggml_backend_dev_name(param_1);
uVar3 = ggml_backend_dev_description(param_1);
ggml_log_internal(1,"%s: registered device %s (%s)\n","register_device",uVar2,uVar3);
puVar1 = *(int8 **)(this + 0x20);
if (puVar1 == *(int8 **)(this + 0x28)) {
std::vector<ggml_backend_device*,std::allocator<ggml_backend_device*>>::
_M_realloc_insert<ggml_backend_device*const&>
((vector<ggml_backend_device*,std::allocator<ggml_backend_device*>> *)(this + 0x18),
puVar1,&local_20);
}
else {
*puVar1 = param_1;
*(long *)(this + 0x20) = *(long *)(this + 0x20) + 8;
}
return;
}
|
|
3,439 | facebook::yoga::StyleValuePool_store_keywords_Test::~StyleValuePool_store_keywords_Test() | yoga-mod/tests/StyleValuePoolTest.cpp | TEST(StyleValuePool, store_keywords) {
StyleValuePool pool;
StyleValueHandle handleMaxContent;
StyleValueHandle handleFitContent;
StyleValueHandle handleStretch;
pool.store(handleMaxContent, StyleSizeLength::ofMaxContent());
pool.store(handleFitContent, StyleSizeLength::ofFitContent());
pool.store(handleStretch, StyleSizeLength::ofStretch());
EXPECT_EQ(pool.getSize(handleMaxContent), StyleSizeLength::ofMaxContent());
EXPECT_EQ(pool.getSize(handleFitContent), StyleSizeLength::ofFitContent());
EXPECT_EQ(pool.getSize(handleStretch), StyleSizeLength::ofStretch());
} | O0 | cpp | facebook::yoga::StyleValuePool_store_keywords_Test::~StyleValuePool_store_keywords_Test():
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
callq 0xbc680
movq -0x10(%rbp), %rdi
movl $0x10, %esi
callq 0x354d0
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
| _ZN8facebook4yoga34StyleValuePool_store_keywords_TestD0Ev:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]; this
mov [rbp+var_10], rdi
call _ZN8facebook4yoga34StyleValuePool_store_keywords_TestD2Ev; facebook::yoga::StyleValuePool_store_keywords_Test::~StyleValuePool_store_keywords_Test()
mov rdi, [rbp+var_10]; void *
mov esi, 10h; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
add rsp, 10h
pop rbp
retn
| void facebook::yoga::StyleValuePool_store_keywords_Test::~StyleValuePool_store_keywords_Test(
facebook::yoga::StyleValuePool_store_keywords_Test *this)
{
facebook::yoga::StyleValuePool_store_keywords_Test::~StyleValuePool_store_keywords_Test(this);
operator delete(this, 0x10uLL);
}
| ~StyleValuePool_store_keywords_Test:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RDI
CALL 0x001bc680
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x10
CALL 0x001354d0
ADD RSP,0x10
POP RBP
RET
|
/* facebook::yoga::StyleValuePool_store_keywords_Test::~StyleValuePool_store_keywords_Test() */
void __thiscall
facebook::yoga::StyleValuePool_store_keywords_Test::~StyleValuePool_store_keywords_Test
(StyleValuePool_store_keywords_Test *this)
{
~StyleValuePool_store_keywords_Test(this);
operator_delete(this,0x10);
return;
}
|
|
3,440 | translog_write_variable_record_chunk3_page | eloqsql/storage/maria/ma_loghandler.c | static my_bool
translog_write_variable_record_chunk3_page(struct st_translog_parts *parts,
uint16 length,
TRANSLOG_ADDRESS *horizon,
struct st_buffer_cursor *cursor)
{
LEX_CUSTRING *part;
uchar chunk3_header[1 + 2];
DBUG_ENTER("translog_write_variable_record_chunk3_page");
if (translog_chaser_page_next(horizon, cursor))
DBUG_RETURN(1);
if (length == 0)
{
/* It was call to write page header only (no data for chunk 3) */
DBUG_PRINT("info", ("It is a call to make page header only"));
DBUG_RETURN(0);
}
DBUG_ASSERT(parts->current != 0); /* first part is left for header */
part= parts->parts + (--parts->current);
parts->total_record_length+= (translog_size_t) (part->length= 1 + 2);
part->str= chunk3_header;
/* Puts chunk type */
*chunk3_header= (uchar) (TRANSLOG_CHUNK_LNGTH);
/* Puts chunk length */
int2store(chunk3_header + 1, length);
translog_write_parts_on_page(horizon, cursor, length + 1 + 2, parts);
DBUG_RETURN(0);
} | O3 | c | translog_write_variable_record_chunk3_page:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %rbx
movq %rdx, %r15
movl %esi, %r12d
movq %rdi, %r14
movq %rdx, %rdi
movq %rcx, %rsi
callq 0x6b5d7
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
jne 0x6b3b7
testw %r12w, %r12w
jne 0x6b3c4
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movzwl %r12w, %edx
movq 0x10(%r14), %rax
movl 0x8(%r14), %ecx
decl %ecx
movl %ecx, 0x8(%r14)
shlq $0x4, %rcx
movq $0x3, 0x8(%rax,%rcx)
addl $0x3, 0x4(%r14)
leaq -0x23(%rbp), %rsi
movq %rsi, (%rax,%rcx)
movb $-0x40, (%rsi)
movw %r12w, 0x1(%rsi)
addl $0x3, %edx
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rcx
callq 0x2c644
jmp 0x6b3b5
| translog_write_variable_record_chunk3_page:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 10h
mov rbx, rcx
mov r15, rdx
mov r12d, esi
mov r14, rdi
mov rdi, rdx
mov rsi, rcx
call translog_chaser_page_next
mov ecx, eax
mov al, 1
test cl, cl
jnz short loc_6B3B7
test r12w, r12w
jnz short loc_6B3C4
loc_6B3B5:
xor eax, eax
loc_6B3B7:
add rsp, 10h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_6B3C4:
movzx edx, r12w
mov rax, [r14+10h]
mov ecx, [r14+8]
dec ecx
mov [r14+8], ecx
shl rcx, 4
mov qword ptr [rax+rcx+8], 3
add dword ptr [r14+4], 3
lea rsi, [rbp+var_23]
mov [rax+rcx], rsi
mov byte ptr [rsi], 0C0h
mov [rsi+1], r12w
add edx, 3
mov rdi, r15
mov rsi, rbx
mov rcx, r14
call translog_write_parts_on_page
jmp short loc_6B3B5
| char translog_write_variable_record_chunk3_page(long long a1, unsigned __int16 a2, _QWORD *a3, long long a4)
{
char v6; // cl
char result; // al
long long v8; // rax
long long v9; // rcx
char v10; // [rsp+Dh] [rbp-23h] BYREF
unsigned __int16 v11; // [rsp+Eh] [rbp-22h]
v6 = translog_chaser_page_next(a3, a4);
result = 1;
if ( !v6 )
{
if ( a2 )
{
v8 = *(_QWORD *)(a1 + 16);
v9 = (unsigned int)(*(_DWORD *)(a1 + 8) - 1);
*(_DWORD *)(a1 + 8) = v9;
v9 *= 16LL;
*(_QWORD *)(v8 + v9 + 8) = 3LL;
*(_DWORD *)(a1 + 4) += 3;
*(_QWORD *)(v8 + v9) = &v10;
v10 = -64;
v11 = a2;
translog_write_parts_on_page(a3, a4, a2 + 3, a1);
}
return 0;
}
return result;
}
| translog_write_variable_record_chunk3_page:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV RBX,RCX
MOV R15,RDX
MOV R12D,ESI
MOV R14,RDI
MOV RDI,RDX
MOV RSI,RCX
CALL 0x0016b5d7
MOV ECX,EAX
MOV AL,0x1
TEST CL,CL
JNZ 0x0016b3b7
TEST R12W,R12W
JNZ 0x0016b3c4
LAB_0016b3b5:
XOR EAX,EAX
LAB_0016b3b7:
ADD RSP,0x10
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0016b3c4:
MOVZX EDX,R12W
MOV RAX,qword ptr [R14 + 0x10]
MOV ECX,dword ptr [R14 + 0x8]
DEC ECX
MOV dword ptr [R14 + 0x8],ECX
SHL RCX,0x4
MOV qword ptr [RAX + RCX*0x1 + 0x8],0x3
ADD dword ptr [R14 + 0x4],0x3
LEA RSI,[RBP + -0x23]
MOV qword ptr [RAX + RCX*0x1],RSI
MOV byte ptr [RSI],0xc0
MOV word ptr [RSI + 0x1],R12W
ADD EDX,0x3
MOV RDI,R15
MOV RSI,RBX
MOV RCX,R14
CALL 0x0012c644
JMP 0x0016b3b5
|
int8
translog_write_variable_record_chunk3_page
(long param_1,ushort param_2,int8 param_3,int8 param_4)
{
long lVar1;
char cVar2;
int8 uVar3;
uint uVar4;
long lVar5;
int1 local_2b;
ushort local_2a;
cVar2 = translog_chaser_page_next(param_3,param_4);
uVar3 = 1;
if (cVar2 == '\0') {
if (param_2 != 0) {
lVar1 = *(long *)(param_1 + 0x10);
uVar4 = *(int *)(param_1 + 8) - 1;
*(uint *)(param_1 + 8) = uVar4;
lVar5 = (ulong)uVar4 * 0x10;
*(int8 *)(lVar1 + 8 + lVar5) = 3;
*(int *)(param_1 + 4) = *(int *)(param_1 + 4) + 3;
*(int1 **)(lVar1 + lVar5) = &local_2b;
local_2b = 0xc0;
local_2a = param_2;
translog_write_parts_on_page(param_3,param_4,param_2 + 3,param_1);
}
uVar3 = 0;
}
return uVar3;
}
|
|
3,441 | js_create_array_iterator | bluesky950520[P]quickjs/quickjs.c | static JSValue js_create_array_iterator(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv, int magic)
{
JSValue enum_obj, arr;
JSArrayIteratorData *it;
JSIteratorKindEnum kind;
int class_id;
kind = magic & 3;
if (magic & 4) {
/* string iterator case */
arr = JS_ToStringCheckObject(ctx, this_val);
class_id = JS_CLASS_STRING_ITERATOR;
} else {
arr = JS_ToObject(ctx, this_val);
class_id = JS_CLASS_ARRAY_ITERATOR;
}
if (JS_IsException(arr))
goto fail;
enum_obj = JS_NewObjectClass(ctx, class_id);
if (JS_IsException(enum_obj))
goto fail;
it = js_malloc(ctx, sizeof(*it));
if (!it)
goto fail1;
it->obj = arr;
it->kind = kind;
it->idx = 0;
JS_SetOpaqueInternal(enum_obj, it);
return enum_obj;
fail1:
JS_FreeValue(ctx, enum_obj);
fail:
JS_FreeValue(ctx, arr);
return JS_EXCEPTION;
} | O1 | c | js_create_array_iterator:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %ebx
movq %rdi, %r14
testb $0x4, %bl
jne 0x4237e
callq 0x26ddd
movq %rax, %r15
movq %rdx, %r12
movl $0x2c, %ecx
jmp 0x4238e
callq 0x425ff
movq %rax, %r15
movq %rdx, %r12
movl $0x2d, %ecx
cmpl $0x6, %r12d
je 0x423b7
movq 0x40(%r14), %rax
movl %ecx, %edx
shll $0x4, %edx
movq (%rax,%rdx), %rsi
movq 0x8(%rax,%rdx), %rdx
movq %r14, %rdi
callq 0x20f05
movq %rdx, %r13
cmpl $0x6, %r13d
jne 0x423e3
movq 0x18(%r14), %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x1d8c6
movl $0x6, %r13d
xorl %ebp, %ebp
movq %rbp, %rax
movq %r13, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbp
movl $0x18, %esi
movq %r14, %rdi
callq 0xede6
testq %rax, %rax
je 0x42412
andl $0x3, %ebx
movq %r15, (%rax)
movq %r12, 0x8(%rax)
movl %ebx, 0x10(%rax)
movl $0x0, 0x14(%rax)
movq %rax, 0x30(%rbp)
jmp 0x423ce
movq 0x18(%r14), %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0x1d8c6
jmp 0x423b7
| js_create_array_iterator:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov ebx, r9d
mov r14, rdi
test bl, 4
jnz short loc_4237E
call JS_ToObject
mov r15, rax
mov r12, rdx
mov ecx, 2Ch ; ','
jmp short loc_4238E
loc_4237E:
call JS_ToStringCheckObject
mov r15, rax
mov r12, rdx
mov ecx, 2Dh ; '-'
loc_4238E:
cmp r12d, 6
jz short loc_423B7
mov rax, [r14+40h]
mov edx, ecx
shl edx, 4
mov rsi, [rax+rdx]
mov rdx, [rax+rdx+8]
mov rdi, r14
call JS_NewObjectProtoClass
mov r13, rdx
cmp r13d, 6
jnz short loc_423E3
loc_423B7:
mov rdi, [r14+18h]
mov rsi, r15
mov rdx, r12
call JS_FreeValueRT
mov r13d, 6
xor ebp, ebp
loc_423CE:
mov rax, rbp
mov rdx, r13
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_423E3:
mov rbp, rax
mov esi, 18h
mov rdi, r14
call js_malloc
test rax, rax
jz short loc_42412
and ebx, 3
mov [rax], r15
mov [rax+8], r12
mov [rax+10h], ebx
mov dword ptr [rax+14h], 0
mov [rbp+30h], rax
jmp short loc_423CE
loc_42412:
mov rdi, [r14+18h]
mov rsi, rbp
mov rdx, r13
call JS_FreeValueRT
jmp short loc_423B7
| long long js_create_array_iterator(
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 v14; // bl
_DWORD *v15; // r15
long long v16; // rdx
long long v17; // r12
unsigned int v18; // ecx
long long v19; // rdx
long long v20; // rax
long long v21; // rdx
long long v22; // r13
long long v23; // rbp
_QWORD *v25; // rax
v14 = a6;
if ( (a6 & 4) != 0 )
{
v15 = (_DWORD *)JS_ToStringCheckObject(a1);
v17 = v19;
v18 = 45;
}
else
{
v15 = JS_ToObject(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
v17 = v16;
v18 = 44;
}
if ( (_DWORD)v17 != 6 )
{
v20 = JS_NewObjectProtoClass(
a1,
*(_QWORD *)(*(_QWORD *)(a1 + 64) + 16 * v18),
*(_QWORD *)(*(_QWORD *)(a1 + 64) + 16 * v18 + 8LL),
v18);
v22 = v21;
if ( (_DWORD)v21 != 6 )
{
v23 = v20;
v25 = (_QWORD *)js_malloc(a1, 24LL);
if ( v25 )
{
*v25 = v15;
v25[1] = v17;
v25[2] = v14 & 3;
*(_QWORD *)(v23 + 48) = v25;
return v23;
}
JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)v23, v22);
}
}
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v15, v17);
return 0LL;
}
| js_create_array_iterator:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV EBX,R9D
MOV R14,RDI
TEST BL,0x4
JNZ 0x0014237e
CALL 0x00126ddd
MOV R15,RAX
MOV R12,RDX
MOV ECX,0x2c
JMP 0x0014238e
LAB_0014237e:
CALL 0x001425ff
MOV R15,RAX
MOV R12,RDX
MOV ECX,0x2d
LAB_0014238e:
CMP R12D,0x6
JZ 0x001423b7
MOV RAX,qword ptr [R14 + 0x40]
MOV EDX,ECX
SHL EDX,0x4
MOV RSI,qword ptr [RAX + RDX*0x1]
MOV RDX,qword ptr [RAX + RDX*0x1 + 0x8]
MOV RDI,R14
CALL 0x00120f05
MOV R13,RDX
CMP R13D,0x6
JNZ 0x001423e3
LAB_001423b7:
MOV RDI,qword ptr [R14 + 0x18]
MOV RSI,R15
MOV RDX,R12
CALL 0x0011d8c6
MOV R13D,0x6
XOR EBP,EBP
LAB_001423ce:
MOV RAX,RBP
MOV RDX,R13
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001423e3:
MOV RBP,RAX
MOV ESI,0x18
MOV RDI,R14
CALL 0x0010ede6
TEST RAX,RAX
JZ 0x00142412
AND EBX,0x3
MOV qword ptr [RAX],R15
MOV qword ptr [RAX + 0x8],R12
MOV dword ptr [RAX + 0x10],EBX
MOV dword ptr [RAX + 0x14],0x0
MOV qword ptr [RBP + 0x30],RAX
JMP 0x001423ce
LAB_00142412:
MOV RDI,qword ptr [R14 + 0x18]
MOV RSI,RBP
MOV RDX,R13
CALL 0x0011d8c6
JMP 0x001423b7
|
int1 [16] js_create_array_iterator(long param_1)
{
int1 (*pauVar1) [16];
int iVar2;
uint in_R9D;
int1 auVar3 [16];
int1 auVar4 [16];
if ((in_R9D & 4) == 0) {
auVar3 = JS_ToObject();
iVar2 = 0x2c;
}
else {
auVar3 = JS_ToStringCheckObject();
iVar2 = 0x2d;
}
if (auVar3._8_4_ != 6) {
auVar4 = JS_NewObjectProtoClass
(param_1,*(int8 *)
(*(long *)(param_1 + 0x40) + (ulong)(uint)(iVar2 << 4)),
*(int8 *)(*(long *)(param_1 + 0x40) + 8 + (ulong)(uint)(iVar2 << 4)));
if (auVar4._8_4_ != 6) {
pauVar1 = (int1 (*) [16])js_malloc(param_1,0x18);
if (pauVar1 != (int1 (*) [16])0x0) {
*pauVar1 = auVar3;
*(uint *)pauVar1[1] = in_R9D & 3;
*(int4 *)(pauVar1[1] + 4) = 0;
*(int1 (**) [16])(auVar4._0_8_ + 0x30) = pauVar1;
return auVar4;
}
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar4._0_8_,auVar4._8_8_);
}
}
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar3._0_8_,auVar3._8_8_);
return ZEXT816(6) << 0x40;
}
|
|
3,442 | Utils::startsWithDot(std::filesystem::__cxx11::path const&) | shubhamoy[P]dir2txt/src/Utils.cpp | bool startsWithDot(const std::filesystem::path& path) {
std::string name = path.filename().string();
return !name.empty() && name[0] == '.';
} | O0 | cpp | Utils::startsWithDot(std::filesystem::__cxx11::path const&):
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rsi
leaq -0x50(%rbp), %rdi
movq %rdi, -0x68(%rbp)
callq 0x5fe60
movq -0x68(%rbp), %rsi
leaq -0x28(%rbp), %rdi
callq 0x5ff60
jmp 0x8a55f
leaq -0x50(%rbp), %rdi
callq 0xbd30
leaq -0x28(%rbp), %rdi
callq 0x13a10
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x69(%rbp)
jne 0x8a5a0
xorl %eax, %eax
movl %eax, %esi
leaq -0x28(%rbp), %rdi
callq 0x1d110
movq %rax, -0x78(%rbp)
jmp 0x8a590
movq -0x78(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2e, %eax
sete %al
movb %al, -0x69(%rbp)
movb -0x69(%rbp), %al
movb %al, -0x79(%rbp)
leaq -0x28(%rbp), %rdi
callq 0xb6c0
movb -0x79(%rbp), %al
andb $0x1, %al
addq $0x80, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0xbd30
jmp 0x8a5e9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x28(%rbp), %rdi
callq 0xb6c0
movq -0x58(%rbp), %rdi
callq 0xa6c0
nopw %cs:(%rax,%rax)
| _ZN5Utils13startsWithDotERKNSt10filesystem7__cxx114pathE:
push rbp
mov rbp, rsp
sub rsp, 80h
mov [rbp+var_8], rdi
mov rsi, [rbp+var_8]
lea rdi, [rbp+var_50]; this
mov [rbp+var_68], rdi
call _ZNKSt10filesystem7__cxx114path8filenameEv; std::filesystem::__cxx11::path::filename(void)
mov rsi, [rbp+var_68]
lea rdi, [rbp+var_28]; this
call _ZNKSt10filesystem7__cxx114path6stringEv; std::filesystem::__cxx11::path::string(void)
jmp short $+2
loc_8A55F:
lea rdi, [rbp+var_50]; this
call _ZNSt10filesystem7__cxx114pathD2Ev; std::filesystem::__cxx11::path::~path()
lea rdi, [rbp+var_28]
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
mov cl, al
xor eax, eax
test cl, 1
mov [rbp+var_69], al
jnz short loc_8A5A0
xor eax, eax
mov esi, eax
lea rdi, [rbp+var_28]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov [rbp+var_78], rax
jmp short $+2
loc_8A590:
mov rax, [rbp+var_78]
movsx eax, byte ptr [rax]
cmp eax, 2Eh ; '.'
setz al
mov [rbp+var_69], al
loc_8A5A0:
mov al, [rbp+var_69]
mov [rbp+var_79], al
lea rdi, [rbp+var_28]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov al, [rbp+var_79]
and al, 1
add rsp, 80h
pop rbp
retn
mov rcx, rax
mov eax, edx
mov [rbp+var_58], rcx
mov [rbp+var_5C], eax
lea rdi, [rbp+var_50]; this
call _ZNSt10filesystem7__cxx114pathD2Ev; std::filesystem::__cxx11::path::~path()
jmp short loc_8A5E9
mov rcx, rax
mov eax, edx
mov [rbp+var_58], rcx
mov [rbp+var_5C], eax
lea rdi, [rbp+var_28]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_8A5E9:
mov rdi, [rbp+var_58]
call __Unwind_Resume
| bool Utils::startsWithDot(Utils *this, const std::filesystem::__cxx11::path *a2)
{
bool v3; // [rsp+17h] [rbp-69h]
_BYTE v4[40]; // [rsp+30h] [rbp-50h] BYREF
_BYTE v5[32]; // [rsp+58h] [rbp-28h] BYREF
Utils *v6; // [rsp+78h] [rbp-8h]
v6 = this;
std::filesystem::__cxx11::path::filename((std::filesystem::__cxx11::path *)v4, this);
std::filesystem::__cxx11::path::string((std::filesystem::__cxx11::path *)v5, (long long)v4);
std::filesystem::__cxx11::path::~path((std::filesystem::__cxx11::path *)v4);
v3 = 0;
if ( !std::string::empty((long long)v5) )
v3 = *(_BYTE *)std::string::operator[]((long long)v5, 0LL) == 46;
std::string::~string(v5);
return v3;
}
| startsWithDot:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV qword ptr [RBP + -0x8],RDI
MOV RSI,qword ptr [RBP + -0x8]
LEA RDI,[RBP + -0x50]
MOV qword ptr [RBP + -0x68],RDI
CALL 0x0015fe60
MOV RSI,qword ptr [RBP + -0x68]
LAB_0018a554:
LEA RDI,[RBP + -0x28]
CALL 0x0015ff60
JMP 0x0018a55f
LAB_0018a55f:
LEA RDI,[RBP + -0x50]
CALL 0x0010bd30
LEA RDI,[RBP + -0x28]
CALL 0x00113a10
MOV CL,AL
XOR EAX,EAX
TEST CL,0x1
MOV byte ptr [RBP + -0x69],AL
JNZ 0x0018a5a0
LAB_0018a57d:
XOR EAX,EAX
MOV ESI,EAX
LEA RDI,[RBP + -0x28]
CALL 0x0011d110
LAB_0018a58a:
MOV qword ptr [RBP + -0x78],RAX
JMP 0x0018a590
LAB_0018a590:
MOV RAX,qword ptr [RBP + -0x78]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2e
SETZ AL
MOV byte ptr [RBP + -0x69],AL
LAB_0018a5a0:
MOV AL,byte ptr [RBP + -0x69]
MOV byte ptr [RBP + -0x79],AL
LEA RDI,[RBP + -0x28]
CALL 0x0010b6c0
MOV AL,byte ptr [RBP + -0x79]
AND AL,0x1
ADD RSP,0x80
POP RBP
RET
|
/* Utils::startsWithDot(std::filesystem::__cxx11::path const&) */
bool Utils::startsWithDot(path *param_1)
{
uint uVar1;
char *pcVar2;
bool local_71;
path local_58 [40];
string local_30 [32];
path *local_10;
local_10 = param_1;
std::filesystem::__cxx11::path::filename();
/* try { // try from 0018a554 to 0018a55c has its CatchHandler @ 0018a5bd */
std::filesystem::__cxx11::path::string();
std::filesystem::__cxx11::path::~path(local_58);
uVar1 = std::__cxx11::string::empty(local_30);
local_71 = false;
if ((uVar1 & 1) == 0) {
/* try { // try from 0018a57d to 0018a589 has its CatchHandler @ 0018a5d4 */
pcVar2 = (char *)std::__cxx11::string::operator[](local_30,0);
local_71 = *pcVar2 == '.';
}
std::__cxx11::string::~string(local_30);
return local_71;
}
|
|
3,443 | my_casedn_utf8mb4 | eloqsql/strings/ctype-utf8.c | static size_t
my_casedn_utf8mb4(CHARSET_INFO *cs,
const char *src, size_t srclen,
char *dst, size_t dstlen)
{
my_wc_t wc;
int srcres, dstres;
const char *srcend= src + srclen;
char *dstend= dst + dstlen, *dst0= dst;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
DBUG_ASSERT(src != dst || cs->casedn_multiply == 1);
while ((src < srcend) &&
(srcres= my_mb_wc_utf8mb4(cs, &wc,
(uchar*) src, (uchar*) srcend)) > 0)
{
my_tolower_utf8mb4(uni_plane, &wc);
if ((dstres= my_wc_mb_utf8mb4(cs, wc, (uchar*) dst, (uchar*) dstend)) <= 0)
break;
src+= srcres;
dst+= dstres;
}
return (size_t) (dst - dst0);
} | O3 | c | my_casedn_utf8mb4:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, -0x38(%rbp)
movq %rcx, %r13
movq %rcx, -0x30(%rbp)
testq %rdx, %rdx
jle 0x5460e
movq %rdx, %r15
movq %rsi, %r12
addq %rsi, %r15
movq -0x30(%rbp), %r13
addq %r13, -0x38(%rbp)
movq 0x78(%rdi), %r14
leaq -0x40(%rbp), %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x575f2
testl %eax, %eax
jle 0x5460e
movl %eax, %ebx
movq -0x40(%rbp), %rsi
cmpq (%r14), %rsi
ja 0x545ef
movq 0x8(%r14), %rax
movq %rsi, %rcx
shrq $0x8, %rcx
movq (%rax,%rcx,8), %rax
testq %rax, %rax
je 0x545ef
movzbl %sil, %ecx
leaq (%rcx,%rcx,2), %rcx
movl 0x4(%rax,%rcx,4), %esi
movq %rsi, -0x40(%rbp)
movq %r13, %rdx
movq -0x38(%rbp), %rcx
callq 0x542e1
testl %eax, %eax
jle 0x5460e
movl %ebx, %ecx
addq %rcx, %r12
movl %eax, %eax
addq %rax, %r13
cmpq %r15, %r12
jb 0x545ad
subq -0x30(%rbp), %r13
movq %r13, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_casedn_utf8mb4:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rbp+var_38], r8
mov r13, rcx
mov [rbp+var_30], rcx
test rdx, rdx
jle short loc_5460E
mov r15, rdx
mov r12, rsi
add r15, rsi
mov r13, [rbp+var_30]
add [rbp+var_38], r13
mov r14, [rdi+78h]
loc_545AD:
lea rdi, [rbp+var_40]
mov rsi, r12
mov rdx, r15
call my_mb_wc_utf8mb4_quick_0
test eax, eax
jle short loc_5460E
mov ebx, eax
mov rsi, [rbp+var_40]
cmp rsi, [r14]
ja short loc_545EF
mov rax, [r14+8]
mov rcx, rsi
shr rcx, 8
mov rax, [rax+rcx*8]
test rax, rax
jz short loc_545EF
movzx ecx, sil
lea rcx, [rcx+rcx*2]
mov esi, [rax+rcx*4+4]
mov [rbp+var_40], rsi
loc_545EF:
mov rdx, r13
mov rcx, [rbp+var_38]
call my_wc_mb_utf8mb4
test eax, eax
jle short loc_5460E
mov ecx, ebx
add r12, rcx
mov eax, eax
add r13, rax
cmp r12, r15
jb short loc_545AD
loc_5460E:
sub r13, [rbp+var_30]
mov rax, r13
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| _BYTE * my_casedn_utf8mb4(long long a1, unsigned long long a2, long long a3, _BYTE *a4, unsigned long long a5)
{
_BYTE *v5; // r13
unsigned long long v6; // r12
unsigned long long v7; // r15
unsigned long long *v8; // r14
int v9; // eax
unsigned int v10; // ebx
unsigned long long v11; // rsi
long long v12; // rax
int v13; // eax
unsigned long long v15; // [rsp+0h] [rbp-40h] BYREF
unsigned long long v16; // [rsp+8h] [rbp-38h]
_BYTE *v17; // [rsp+10h] [rbp-30h]
v16 = a5;
v5 = a4;
v17 = a4;
if ( a3 > 0 )
{
v6 = a2;
v7 = a2 + a3;
v5 = v17;
v16 += (unsigned long long)v17;
v8 = *(unsigned long long **)(a1 + 120);
do
{
v9 = my_mb_wc_utf8mb4_quick_0(&v15, v6, v7);
if ( v9 <= 0 )
break;
v10 = v9;
v11 = v15;
if ( v15 <= *v8 )
{
v12 = *(_QWORD *)(v8[1] + 8 * (v15 >> 8));
if ( v12 )
{
v11 = *(unsigned int *)(v12 + 12LL * (unsigned __int8)v15 + 4);
v15 = v11;
}
}
v13 = my_wc_mb_utf8mb4((long long)&v15, v11, v5, v16);
if ( v13 <= 0 )
break;
v6 += v10;
v5 += (unsigned int)v13;
}
while ( v6 < v7 );
}
return (_BYTE *)(v5 - v17);
}
| my_casedn_utf8mb4:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RBP + -0x38],R8
MOV R13,RCX
MOV qword ptr [RBP + -0x30],RCX
TEST RDX,RDX
JLE 0x0015460e
MOV R15,RDX
MOV R12,RSI
ADD R15,RSI
MOV R13,qword ptr [RBP + -0x30]
ADD qword ptr [RBP + -0x38],R13
MOV R14,qword ptr [RDI + 0x78]
LAB_001545ad:
LEA RDI,[RBP + -0x40]
MOV RSI,R12
MOV RDX,R15
CALL 0x001575f2
TEST EAX,EAX
JLE 0x0015460e
MOV EBX,EAX
MOV RSI,qword ptr [RBP + -0x40]
CMP RSI,qword ptr [R14]
JA 0x001545ef
MOV RAX,qword ptr [R14 + 0x8]
MOV RCX,RSI
SHR RCX,0x8
MOV RAX,qword ptr [RAX + RCX*0x8]
TEST RAX,RAX
JZ 0x001545ef
MOVZX ECX,SIL
LEA RCX,[RCX + RCX*0x2]
MOV ESI,dword ptr [RAX + RCX*0x4 + 0x4]
MOV qword ptr [RBP + -0x40],RSI
LAB_001545ef:
MOV RDX,R13
MOV RCX,qword ptr [RBP + -0x38]
CALL 0x001542e1
TEST EAX,EAX
JLE 0x0015460e
MOV ECX,EBX
ADD R12,RCX
MOV EAX,EAX
ADD R13,RAX
CMP R12,R15
JC 0x001545ad
LAB_0015460e:
SUB R13,qword ptr [RBP + -0x30]
MOV RAX,R13
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long my_casedn_utf8mb4(long param_1,ulong param_2,long param_3,long param_4,long param_5)
{
ulong *puVar1;
long lVar2;
uint uVar3;
uint uVar4;
ulong uVar5;
ulong local_48;
long local_40;
long local_38;
local_38 = param_4;
if (0 < param_3) {
uVar5 = param_3 + param_2;
local_40 = param_5 + param_4;
puVar1 = *(ulong **)(param_1 + 0x78);
do {
uVar3 = my_mb_wc_utf8mb4_quick(&local_48,param_2,uVar5);
if ((int)uVar3 < 1) break;
if ((local_48 <= *puVar1) && (lVar2 = *(long *)(puVar1[1] + (local_48 >> 8) * 8), lVar2 != 0))
{
local_48 = (ulong)*(uint *)(lVar2 + 4 + (local_48 & 0xff) * 0xc);
}
uVar4 = my_wc_mb_utf8mb4();
if ((int)uVar4 < 1) break;
param_2 = param_2 + uVar3;
param_4 = param_4 + (ulong)uVar4;
} while (param_2 < uVar5);
}
return param_4 - local_38;
}
|
|
3,444 | test_bug28934 | eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c | static int test_bug28934(MYSQL *mysql)
{
my_bool error= 0;
MYSQL_BIND bind[5];
MYSQL_STMT *stmt;
int rc, cnt;
rc= mysql_query(mysql, "drop table if exists t1");
check_mysql_rc(rc, mysql);
rc= mysql_query(mysql, "create table t1(id int)");
check_mysql_rc(rc, mysql);
rc= mysql_query(mysql, "insert into t1 values(1),(2),(3),(4),(5)");
check_mysql_rc(rc, mysql);
stmt= mysql_stmt_init(mysql);
FAIL_IF(!stmt, mysql_error(mysql));
rc= mysql_stmt_prepare(stmt, SL("select * from t1 where id in(?,?,?,?,?)"));
check_stmt_rc(rc, stmt);
memset (&bind, '\0', sizeof (bind));
for (cnt= 0; cnt < 5; cnt++)
{
bind[cnt].buffer_type= MYSQL_TYPE_LONG;
bind[cnt].buffer= (char*)&cnt;
bind[cnt].buffer_length= 0;
}
rc= mysql_stmt_bind_param(stmt, bind);
check_stmt_rc(rc, stmt);
stmt->param_count=2;
error= mysql_stmt_execute(stmt);
FAIL_UNLESS(error != 0, "Error expected");
mysql_stmt_close(stmt);
rc= mysql_query(mysql, "drop table t1");
check_mysql_rc(rc, mysql);
return OK;
} | O0 | c | test_bug28934:
pushq %rbp
movq %rsp, %rbp
subq $0x2a0, %rsp # imm = 0x2A0
movq %rdi, -0x10(%rbp)
movb $0x0, -0x11(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x427e4(%rip), %rsi # 0x664d2
callq 0x38a70
movl %eax, -0x25c(%rbp)
cmpl $0x0, -0x25c(%rbp)
je 0x23d5d
movl -0x25c(%rbp), %eax
movl %eax, -0x26c(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3c3f0
movq %rax, -0x268(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3c3c0
movl -0x26c(%rbp), %esi
movq -0x268(%rbp), %rdx
movl %eax, %ecx
leaq 0x41998(%rip), %rdi # 0x656d5
leaq 0x42329(%rip), %r8 # 0x6606d
movl $0x58d, %r9d # imm = 0x58D
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x240d0
jmp 0x23d5f
movq -0x10(%rbp), %rdi
leaq 0x449fd(%rip), %rsi # 0x68767
callq 0x38a70
movl %eax, -0x25c(%rbp)
cmpl $0x0, -0x25c(%rbp)
je 0x23dd9
movl -0x25c(%rbp), %eax
movl %eax, -0x27c(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3c3f0
movq %rax, -0x278(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3c3c0
movl -0x27c(%rbp), %esi
movq -0x278(%rbp), %rdx
movl %eax, %ecx
leaq 0x4191c(%rip), %rdi # 0x656d5
leaq 0x422ad(%rip), %r8 # 0x6606d
movl $0x58f, %r9d # imm = 0x58F
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x240d0
jmp 0x23ddb
movq -0x10(%rbp), %rdi
leaq 0x44999(%rip), %rsi # 0x6877f
callq 0x38a70
movl %eax, -0x25c(%rbp)
cmpl $0x0, -0x25c(%rbp)
je 0x23e55
movl -0x25c(%rbp), %eax
movl %eax, -0x28c(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3c3f0
movq %rax, -0x288(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3c3c0
movl -0x28c(%rbp), %esi
movq -0x288(%rbp), %rdx
movl %eax, %ecx
leaq 0x418a0(%rip), %rdi # 0x656d5
leaq 0x42231(%rip), %r8 # 0x6606d
movl $0x592, %r9d # imm = 0x592
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x240d0
jmp 0x23e57
movq -0x10(%rbp), %rdi
callq 0x44950
movq %rax, -0x258(%rbp)
cmpq $0x0, -0x258(%rbp)
jne 0x23ea3
movq -0x10(%rbp), %rdi
callq 0x3c3f0
movq %rax, %rsi
leaq 0x4170c(%rip), %rdi # 0x65590
leaq 0x421e2(%rip), %rdx # 0x6606d
movl $0x595, %ecx # imm = 0x595
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x240d0
jmp 0x23ea5
movq -0x258(%rbp), %rdi
leaq 0x448f5(%rip), %rsi # 0x687a8
movl $0x27, %edx
callq 0x45070
movl %eax, -0x25c(%rbp)
cmpl $0x0, -0x25c(%rbp)
je 0x23f01
movq -0x258(%rbp), %rdi
callq 0x43fd0
movq %rax, %rsi
leaq 0x416ae(%rip), %rdi # 0x65590
leaq 0x42184(%rip), %rdx # 0x6606d
movl $0x597, %ecx # imm = 0x597
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x240d0
jmp 0x23f03
leaq -0x250(%rbp), %rdi
xorl %esi, %esi
movl $0x230, %edx # imm = 0x230
callq 0x14260
movl $0x0, -0x260(%rbp)
cmpl $0x5, -0x260(%rbp)
jge 0x23f93
movslq -0x260(%rbp), %rcx
leaq -0x250(%rbp), %rax
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movl $0x3, 0x60(%rax)
movslq -0x260(%rbp), %rcx
leaq -0x250(%rbp), %rax
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
leaq -0x260(%rbp), %rcx
movq %rcx, 0x10(%rax)
movslq -0x260(%rbp), %rcx
leaq -0x250(%rbp), %rax
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movq $0x0, 0x40(%rax)
movl -0x260(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x260(%rbp)
jmp 0x23f20
movq -0x258(%rbp), %rdi
leaq -0x250(%rbp), %rsi
callq 0x432c0
movsbl %al, %eax
movl %eax, -0x25c(%rbp)
cmpl $0x0, -0x25c(%rbp)
je 0x23fed
movq -0x258(%rbp), %rdi
callq 0x43fd0
movq %rax, %rsi
leaq 0x415c2(%rip), %rdi # 0x65590
leaq 0x42098(%rip), %rdx # 0x6606d
movl $0x5a1, %ecx # imm = 0x5A1
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x240d0
jmp 0x23fef
movq -0x258(%rbp), %rax
movl $0x2, 0x64(%rax)
movq -0x258(%rbp), %rdi
callq 0x46580
movb %al, -0x11(%rbp)
movsbl -0x11(%rbp), %eax
cmpl $0x0, %eax
jne 0x24042
leaq 0x41574(%rip), %rdi # 0x65590
leaq 0x43766(%rip), %rsi # 0x67789
leaq 0x42043(%rip), %rdx # 0x6606d
movl $0x5a5, %ecx # imm = 0x5A5
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x240d0
jmp 0x24044
movq -0x258(%rbp), %rdi
callq 0x43eb0
movq -0x10(%rbp), %rdi
leaq 0x431ae(%rip), %rsi # 0x67209
callq 0x38a70
movl %eax, -0x25c(%rbp)
cmpl $0x0, -0x25c(%rbp)
je 0x240c7
movl -0x25c(%rbp), %eax
movl %eax, -0x29c(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3c3f0
movq %rax, -0x298(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3c3c0
movl -0x29c(%rbp), %esi
movq -0x298(%rbp), %rdx
movl %eax, %ecx
leaq 0x4162b(%rip), %rdi # 0x656d5
leaq 0x41fbc(%rip), %r8 # 0x6606d
movl $0x5a9, %r9d # imm = 0x5A9
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x240d0
jmp 0x240c9
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x2a0, %rsp # imm = 0x2A0
popq %rbp
retq
nopl (%rax)
| test_bug28934:
push rbp
mov rbp, rsp
sub rsp, 2A0h
mov [rbp+var_10], rdi
mov [rbp+var_11], 0
mov rdi, [rbp+var_10]
lea rsi, aDropTableIfExi; "drop table if exists t1"
call mysql_query
mov [rbp+var_25C], eax
cmp [rbp+var_25C], 0
jz short loc_23D5D
mov eax, [rbp+var_25C]
mov [rbp+var_26C], eax
mov rdi, [rbp+var_10]
call mysql_error
mov [rbp+var_268], rax
mov rdi, [rbp+var_10]
call mysql_errno
mov esi, [rbp+var_26C]
mov rdx, [rbp+var_268]
mov ecx, eax
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov r9d, 58Dh
mov al, 0
call diag
mov [rbp+var_4], 1
jmp loc_240D0
loc_23D5D:
jmp short $+2
loc_23D5F:
mov rdi, [rbp+var_10]
lea rsi, aCreateTableT1I_3; "create table t1(id int)"
call mysql_query
mov [rbp+var_25C], eax
cmp [rbp+var_25C], 0
jz short loc_23DD9
mov eax, [rbp+var_25C]
mov [rbp+var_27C], eax
mov rdi, [rbp+var_10]
call mysql_error
mov [rbp+var_278], rax
mov rdi, [rbp+var_10]
call mysql_errno
mov esi, [rbp+var_27C]
mov rdx, [rbp+var_278]
mov ecx, eax
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov r9d, 58Fh
mov al, 0
call diag
mov [rbp+var_4], 1
jmp loc_240D0
loc_23DD9:
jmp short $+2
loc_23DDB:
mov rdi, [rbp+var_10]
lea rsi, aInsertIntoT1Va_11; "insert into t1 values(1),(2),(3),(4),(5"...
call mysql_query
mov [rbp+var_25C], eax
cmp [rbp+var_25C], 0
jz short loc_23E55
mov eax, [rbp+var_25C]
mov [rbp+var_28C], eax
mov rdi, [rbp+var_10]
call mysql_error
mov [rbp+var_288], rax
mov rdi, [rbp+var_10]
call mysql_errno
mov esi, [rbp+var_28C]
mov rdx, [rbp+var_288]
mov ecx, eax
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov r9d, 592h
mov al, 0
call diag
mov [rbp+var_4], 1
jmp loc_240D0
loc_23E55:
jmp short $+2
loc_23E57:
mov rdi, [rbp+var_10]
call mysql_stmt_init
mov [rbp+var_258], rax
cmp [rbp+var_258], 0
jnz short loc_23EA3
mov rdi, [rbp+var_10]
call mysql_error
mov rsi, rax
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 595h
mov al, 0
call diag
mov [rbp+var_4], 1
jmp loc_240D0
loc_23EA3:
jmp short $+2
loc_23EA5:
mov rdi, [rbp+var_258]
lea rsi, aSelectFromT1Wh; "select * from t1 where id in(?,?,?,?,?)"
mov edx, 27h ; '''
call mysql_stmt_prepare
mov [rbp+var_25C], eax
cmp [rbp+var_25C], 0
jz short loc_23F01
mov rdi, [rbp+var_258]
call mysql_stmt_error
mov rsi, rax
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 597h
mov al, 0
call diag
mov [rbp+var_4], 1
jmp loc_240D0
loc_23F01:
jmp short $+2
loc_23F03:
lea rdi, [rbp+var_250]
xor esi, esi
mov edx, 230h
call _memset
mov [rbp+var_260], 0
loc_23F20:
cmp [rbp+var_260], 5
jge short loc_23F93
movsxd rcx, [rbp+var_260]
lea rax, [rbp+var_250]
imul rcx, 70h ; 'p'
add rax, rcx
mov dword ptr [rax+60h], 3
movsxd rcx, [rbp+var_260]
lea rax, [rbp+var_250]
imul rcx, 70h ; 'p'
add rax, rcx
lea rcx, [rbp+var_260]
mov [rax+10h], rcx
movsxd rcx, [rbp+var_260]
lea rax, [rbp+var_250]
imul rcx, 70h ; 'p'
add rax, rcx
mov qword ptr [rax+40h], 0
mov eax, [rbp+var_260]
add eax, 1
mov [rbp+var_260], eax
jmp short loc_23F20
loc_23F93:
mov rdi, [rbp+var_258]
lea rsi, [rbp+var_250]
call mysql_stmt_bind_param
movsx eax, al
mov [rbp+var_25C], eax
cmp [rbp+var_25C], 0
jz short loc_23FED
mov rdi, [rbp+var_258]
call mysql_stmt_error
mov rsi, rax
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 5A1h
mov al, 0
call diag
mov [rbp+var_4], 1
jmp loc_240D0
loc_23FED:
jmp short $+2
loc_23FEF:
mov rax, [rbp+var_258]
mov dword ptr [rax+64h], 2
mov rdi, [rbp+var_258]
call mysql_stmt_execute
mov [rbp+var_11], al
movsx eax, [rbp+var_11]
cmp eax, 0
jnz short loc_24042
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aNoErrorExpecte+3; "Error expected"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 5A5h
mov al, 0
call diag
mov [rbp+var_4], 1
jmp loc_240D0
loc_24042:
jmp short $+2
loc_24044:
mov rdi, [rbp+var_258]
call mysql_stmt_close
mov rdi, [rbp+var_10]
lea rsi, aDropTableT1_0; "drop table t1"
call mysql_query
mov [rbp+var_25C], eax
cmp [rbp+var_25C], 0
jz short loc_240C7
mov eax, [rbp+var_25C]
mov [rbp+var_29C], eax
mov rdi, [rbp+var_10]
call mysql_error
mov [rbp+var_298], rax
mov rdi, [rbp+var_10]
call mysql_errno
mov esi, [rbp+var_29C]
mov rdx, [rbp+var_298]
mov ecx, eax
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov r9d, 5A9h
mov al, 0
call diag
mov [rbp+var_4], 1
jmp short loc_240D0
loc_240C7:
jmp short $+2
loc_240C9:
mov [rbp+var_4], 0
loc_240D0:
mov eax, [rbp+var_4]
add rsp, 2A0h
pop rbp
retn
| long long test_bug28934(long long a1)
{
int v1; // eax
int v2; // eax
int v3; // eax
int v4; // eax
int v5; // r8d
int v6; // r9d
int v7; // eax
int v8; // r8d
int v9; // r9d
char v10; // al
int v11; // eax
int v12; // r8d
int v13; // r9d
int v14; // r8d
int v15; // r9d
int v16; // eax
int v18; // [rsp+4h] [rbp-29Ch]
int v19; // [rsp+8h] [rbp-298h]
int v20; // [rsp+18h] [rbp-288h]
int v21; // [rsp+28h] [rbp-278h]
int v22; // [rsp+38h] [rbp-268h]
int i; // [rsp+40h] [rbp-260h] BYREF
int v24; // [rsp+44h] [rbp-25Ch]
long long v25; // [rsp+48h] [rbp-258h]
_OWORD v26[35]; // [rsp+50h] [rbp-250h] BYREF
char v27; // [rsp+28Fh] [rbp-11h]
long long v28; // [rsp+290h] [rbp-10h]
v28 = a1;
v27 = 0;
v24 = mysql_query(a1, "drop table if exists t1");
if ( v24 )
{
v22 = mysql_error(v28);
v1 = mysql_errno(v28);
diag(
(unsigned int)"Error (%d): %s (%d) in %s line %d",
v24,
v22,
v1,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
1421);
return 1;
}
else
{
v24 = mysql_query(v28, "create table t1(id int)");
if ( v24 )
{
v21 = mysql_error(v28);
v2 = mysql_errno(v28);
diag(
(unsigned int)"Error (%d): %s (%d) in %s line %d",
v24,
v21,
v2,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
1423);
return 1;
}
else
{
v24 = mysql_query(v28, "insert into t1 values(1),(2),(3),(4),(5)");
if ( v24 )
{
v20 = mysql_error(v28);
v3 = mysql_errno(v28);
diag(
(unsigned int)"Error (%d): %s (%d) in %s line %d",
v24,
v20,
v3,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
1426);
return 1;
}
else
{
v25 = mysql_stmt_init(v28);
if ( v25 )
{
v24 = mysql_stmt_prepare(v25, "select * from t1 where id in(?,?,?,?,?)", 39LL);
if ( v24 )
{
v7 = mysql_stmt_error(v25);
diag(
(unsigned int)"Error: %s (%s: %d)",
v7,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
1431,
v8,
v9);
return 1;
}
else
{
memset(v26, 0LL, sizeof(v26));
for ( i = 0; i < 5; ++i )
{
LODWORD(v26[7 * i + 6]) = 3;
*(_QWORD *)&v26[7 * i + 1] = &i;
*(_QWORD *)&v26[7 * i + 4] = 0LL;
}
v10 = mysql_stmt_bind_param(v25, v26);
v24 = v10;
if ( v10 )
{
v11 = mysql_stmt_error(v25);
diag(
(unsigned int)"Error: %s (%s: %d)",
v11,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
1441,
v12,
v13);
return 1;
}
else
{
*(_DWORD *)(v25 + 100) = 2;
v27 = mysql_stmt_execute(v25);
if ( v27 )
{
mysql_stmt_close(v25);
v24 = mysql_query(v28, "drop table t1");
if ( v24 )
{
v18 = v24;
v19 = mysql_error(v28);
v16 = mysql_errno(v28);
diag(
(unsigned int)"Error (%d): %s (%d) in %s line %d",
v18,
v19,
v16,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
1449);
return 1;
}
else
{
return 0;
}
}
else
{
diag(
(unsigned int)"Error: %s (%s: %d)",
(unsigned int)"Error expected",
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
1445,
v14,
v15);
return 1;
}
}
}
}
else
{
v4 = mysql_error(v28);
diag(
(unsigned int)"Error: %s (%s: %d)",
v4,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
1429,
v5,
v6);
return 1;
}
}
}
}
}
| test_bug28934:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x2a0
MOV qword ptr [RBP + -0x10],RDI
MOV byte ptr [RBP + -0x11],0x0
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x1664d2]
CALL 0x00138a70
MOV dword ptr [RBP + -0x25c],EAX
CMP dword ptr [RBP + -0x25c],0x0
JZ 0x00123d5d
MOV EAX,dword ptr [RBP + -0x25c]
MOV dword ptr [RBP + -0x26c],EAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013c3f0
MOV qword ptr [RBP + -0x268],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013c3c0
MOV ESI,dword ptr [RBP + -0x26c]
MOV RDX,qword ptr [RBP + -0x268]
MOV ECX,EAX
LEA RDI,[0x1656d5]
LEA R8,[0x16606d]
MOV R9D,0x58d
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001240d0
LAB_00123d5d:
JMP 0x00123d5f
LAB_00123d5f:
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x168767]
CALL 0x00138a70
MOV dword ptr [RBP + -0x25c],EAX
CMP dword ptr [RBP + -0x25c],0x0
JZ 0x00123dd9
MOV EAX,dword ptr [RBP + -0x25c]
MOV dword ptr [RBP + -0x27c],EAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013c3f0
MOV qword ptr [RBP + -0x278],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013c3c0
MOV ESI,dword ptr [RBP + -0x27c]
MOV RDX,qword ptr [RBP + -0x278]
MOV ECX,EAX
LEA RDI,[0x1656d5]
LEA R8,[0x16606d]
MOV R9D,0x58f
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001240d0
LAB_00123dd9:
JMP 0x00123ddb
LAB_00123ddb:
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x16877f]
CALL 0x00138a70
MOV dword ptr [RBP + -0x25c],EAX
CMP dword ptr [RBP + -0x25c],0x0
JZ 0x00123e55
MOV EAX,dword ptr [RBP + -0x25c]
MOV dword ptr [RBP + -0x28c],EAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013c3f0
MOV qword ptr [RBP + -0x288],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013c3c0
MOV ESI,dword ptr [RBP + -0x28c]
MOV RDX,qword ptr [RBP + -0x288]
MOV ECX,EAX
LEA RDI,[0x1656d5]
LEA R8,[0x16606d]
MOV R9D,0x592
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001240d0
LAB_00123e55:
JMP 0x00123e57
LAB_00123e57:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00144950
MOV qword ptr [RBP + -0x258],RAX
CMP qword ptr [RBP + -0x258],0x0
JNZ 0x00123ea3
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013c3f0
MOV RSI,RAX
LEA RDI,[0x165590]
LEA RDX,[0x16606d]
MOV ECX,0x595
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001240d0
LAB_00123ea3:
JMP 0x00123ea5
LAB_00123ea5:
MOV RDI,qword ptr [RBP + -0x258]
LEA RSI,[0x1687a8]
MOV EDX,0x27
CALL 0x00145070
MOV dword ptr [RBP + -0x25c],EAX
CMP dword ptr [RBP + -0x25c],0x0
JZ 0x00123f01
MOV RDI,qword ptr [RBP + -0x258]
CALL 0x00143fd0
MOV RSI,RAX
LEA RDI,[0x165590]
LEA RDX,[0x16606d]
MOV ECX,0x597
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001240d0
LAB_00123f01:
JMP 0x00123f03
LAB_00123f03:
LEA RDI,[RBP + -0x250]
XOR ESI,ESI
MOV EDX,0x230
CALL 0x00114260
MOV dword ptr [RBP + -0x260],0x0
LAB_00123f20:
CMP dword ptr [RBP + -0x260],0x5
JGE 0x00123f93
MOVSXD RCX,dword ptr [RBP + -0x260]
LEA RAX,[RBP + -0x250]
IMUL RCX,RCX,0x70
ADD RAX,RCX
MOV dword ptr [RAX + 0x60],0x3
MOVSXD RCX,dword ptr [RBP + -0x260]
LEA RAX,[RBP + -0x250]
IMUL RCX,RCX,0x70
ADD RAX,RCX
LEA RCX,[RBP + -0x260]
MOV qword ptr [RAX + 0x10],RCX
MOVSXD RCX,dword ptr [RBP + -0x260]
LEA RAX,[RBP + -0x250]
IMUL RCX,RCX,0x70
ADD RAX,RCX
MOV qword ptr [RAX + 0x40],0x0
MOV EAX,dword ptr [RBP + -0x260]
ADD EAX,0x1
MOV dword ptr [RBP + -0x260],EAX
JMP 0x00123f20
LAB_00123f93:
MOV RDI,qword ptr [RBP + -0x258]
LEA RSI,[RBP + -0x250]
CALL 0x001432c0
MOVSX EAX,AL
MOV dword ptr [RBP + -0x25c],EAX
CMP dword ptr [RBP + -0x25c],0x0
JZ 0x00123fed
MOV RDI,qword ptr [RBP + -0x258]
CALL 0x00143fd0
MOV RSI,RAX
LEA RDI,[0x165590]
LEA RDX,[0x16606d]
MOV ECX,0x5a1
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001240d0
LAB_00123fed:
JMP 0x00123fef
LAB_00123fef:
MOV RAX,qword ptr [RBP + -0x258]
MOV dword ptr [RAX + 0x64],0x2
MOV RDI,qword ptr [RBP + -0x258]
CALL 0x00146580
MOV byte ptr [RBP + -0x11],AL
MOVSX EAX,byte ptr [RBP + -0x11]
CMP EAX,0x0
JNZ 0x00124042
LEA RDI,[0x165590]
LEA RSI,[0x167789]
LEA RDX,[0x16606d]
MOV ECX,0x5a5
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001240d0
LAB_00124042:
JMP 0x00124044
LAB_00124044:
MOV RDI,qword ptr [RBP + -0x258]
CALL 0x00143eb0
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x167209]
CALL 0x00138a70
MOV dword ptr [RBP + -0x25c],EAX
CMP dword ptr [RBP + -0x25c],0x0
JZ 0x001240c7
MOV EAX,dword ptr [RBP + -0x25c]
MOV dword ptr [RBP + -0x29c],EAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013c3f0
MOV qword ptr [RBP + -0x298],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013c3c0
MOV ESI,dword ptr [RBP + -0x29c]
MOV RDX,qword ptr [RBP + -0x298]
MOV ECX,EAX
LEA RDI,[0x1656d5]
LEA R8,[0x16606d]
MOV R9D,0x5a9
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001240d0
LAB_001240c7:
JMP 0x001240c9
LAB_001240c9:
MOV dword ptr [RBP + -0x4],0x0
LAB_001240d0:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x2a0
POP RBP
RET
|
int4 test_bug28934(int8 param_1)
{
char cVar1;
int iVar2;
int4 uVar3;
int8 uVar4;
int local_268;
int local_264;
long local_260;
int1 local_258 [16];
long alStack_248 [10];
int8 auStack_1f8 [59];
char local_19;
int8 local_18;
int4 local_c;
local_19 = 0;
local_18 = param_1;
iVar2 = mysql_query(param_1,"drop table if exists t1");
local_264 = iVar2;
if (iVar2 == 0) {
iVar2 = mysql_query(local_18,"create table t1(id int)");
local_264 = iVar2;
if (iVar2 == 0) {
iVar2 = mysql_query(local_18,"insert into t1 values(1),(2),(3),(4),(5)");
local_264 = iVar2;
if (iVar2 == 0) {
local_260 = mysql_stmt_init(local_18);
if (local_260 == 0) {
uVar4 = mysql_error(local_18);
diag("Error: %s (%s: %d)",uVar4,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
0x595);
local_c = 1;
}
else {
local_264 = mysql_stmt_prepare(local_260,"select * from t1 where id in(?,?,?,?,?)",0x27);
if (local_264 == 0) {
memset(local_258,0,0x230);
for (local_268 = 0; local_268 < 5; local_268 = local_268 + 1) {
*(int4 *)(auStack_1f8 + (long)local_268 * 0xe) = 3;
alStack_248[(long)local_268 * 0xe] = (long)&local_268;
auStack_1f8[(long)local_268 * 0xe + -4] = 0;
}
cVar1 = mysql_stmt_bind_param(local_260,local_258);
local_264 = (int)cVar1;
if (local_264 == 0) {
*(int4 *)(local_260 + 100) = 2;
local_19 = mysql_stmt_execute(local_260);
if (local_19 == '\0') {
diag("Error: %s (%s: %d)","Error expected",
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c"
,0x5a5);
local_c = 1;
}
else {
mysql_stmt_close(local_260);
iVar2 = mysql_query(local_18,"drop table t1");
if (iVar2 == 0) {
local_c = 0;
}
else {
local_264 = iVar2;
uVar4 = mysql_error(local_18);
uVar3 = mysql_errno(local_18);
diag("Error (%d): %s (%d) in %s line %d",iVar2,uVar4,uVar3,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c"
,0x5a9);
local_c = 1;
}
}
}
else {
uVar4 = mysql_stmt_error(local_260);
diag("Error: %s (%s: %d)",uVar4,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c"
,0x5a1);
local_c = 1;
}
}
else {
uVar4 = mysql_stmt_error(local_260);
diag("Error: %s (%s: %d)",uVar4,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c"
,0x597);
local_c = 1;
}
}
}
else {
uVar4 = mysql_error(local_18);
uVar3 = mysql_errno(local_18);
diag("Error (%d): %s (%d) in %s line %d",iVar2,uVar4,uVar3,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
0x592);
local_c = 1;
}
}
else {
uVar4 = mysql_error(local_18);
uVar3 = mysql_errno(local_18);
diag("Error (%d): %s (%d) in %s line %d",iVar2,uVar4,uVar3,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",0x58f
);
local_c = 1;
}
}
else {
uVar4 = mysql_error(local_18);
uVar3 = mysql_errno(local_18);
diag("Error (%d): %s (%d) in %s line %d",iVar2,uVar4,uVar3,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",0x58d);
local_c = 1;
}
return local_c;
}
|
|
3,445 | LefDefParser::lefwSpacing(char const*, char const*, double, char const*) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp | int
lefwSpacing(const char *layerName1,
const char *layerName2,
double minSpace,
const char *stack)
{ // optioanl
lefwObsoleteNum = LEFW_SPACING;
if (!lefwFile)
return LEFW_UNINITIALIZED;
if (lefwState != LEFW_SPACING_START &&
lefwState != LEFW_SPACING)
return LEFW_BAD_ORDER;
if (!layerName1 || layerName1 == 0 || *layerName1 == 0)
return LEFW_BAD_DATA;
if (!layerName2 || layerName2 == 0 || *layerName2 == 0)
return LEFW_BAD_DATA;
if (lefwWriteEncrypt) {
encPrint(lefwFile, (char*) " SAMENET %s %s %.11g ",
layerName1, layerName2, minSpace);
if (stack && strcmp(stack, "STACK") == 0)
encPrint(lefwFile, (char*) "STACK ");
encPrint(lefwFile, (char*) ";\n");
} else {
fprintf(lefwFile, " SAMENET %s %s %.11g ", layerName1, layerName2,
minSpace);
if (stack && strcmp(stack, "STACK") == 0)
fprintf(lefwFile, "STACK ");
fprintf(lefwFile, ";\n");
}
lefwLines++;
lefwState = LEFW_SPACING;
return LEFW_OK;
} | O3 | cpp | LefDefParser::lefwSpacing(char const*, char const*, double, char const*):
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rdi, %rdx
movl $0x43, 0x148d8(%rip) # 0x24d48
leaq 0x14989(%rip), %r15 # 0x24e00
movq (%r15), %rdi
testq %rdi, %rdi
je 0x1050b
movq %rsi, %rcx
leaq 0x14bc3(%rip), %r14 # 0x25050
movl (%r14), %esi
cmpl $0x43, %esi
je 0x1049f
movl $0x2, %eax
cmpl $0xd, %esi
jne 0x10510
movl $0x3, %eax
testq %rdx, %rdx
je 0x10510
testq %rcx, %rcx
je 0x10510
cmpb $0x0, (%rdx)
je 0x10510
cmpb $0x0, (%rcx)
je 0x10510
cmpb $0x1, 0x14c2d(%rip) # 0x250ec
jne 0x10516
leaq 0xb004(%rip), %rsi # 0x1b4cc
movb $0x1, %al
callq 0x18c35
testq %rbx, %rbx
je 0x104f8
leaq 0x9ed7(%rip), %rsi # 0x1a3b2
movq %rbx, %rdi
callq 0x10e0
testl %eax, %eax
jne 0x104f8
movq (%r15), %rdi
leaq 0xaff3(%rip), %rsi # 0x1b4e4
xorl %eax, %eax
callq 0x18c35
movq (%r15), %rdi
leaq 0x9d0e(%rip), %rsi # 0x1a210
xorl %eax, %eax
callq 0x18c35
jmp 0x1056e
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
retq
leaq 0xafaf(%rip), %rsi # 0x1b4cc
movb $0x1, %al
callq 0x10f0
testq %rbx, %rbx
je 0x10555
leaq 0x9e82(%rip), %rsi # 0x1a3b2
movq %rbx, %rdi
callq 0x10e0
testl %eax, %eax
jne 0x10555
movq (%r15), %rcx
leaq 0xaf9e(%rip), %rdi # 0x1b4e4
movl $0x6, %esi
movl $0x1, %edx
callq 0x1110
movq (%r15), %rcx
leaq 0x9cb1(%rip), %rdi # 0x1a210
movl $0x2, %esi
movl $0x1, %edx
callq 0x1110
leaq 0x14ad7(%rip), %rax # 0x2504c
incl (%rax)
movl $0x43, (%r14)
xorl %eax, %eax
jmp 0x10510
| _ZN12LefDefParser11lefwSpacingEPKcS1_dS1_:
push r15
push r14
push rbx
mov rbx, rdx
mov rdx, rdi
mov cs:_ZN12LefDefParserL15lefwObsoleteNumE, 43h ; 'C'; LefDefParser::lefwObsoleteNum
lea r15, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [r15]
test rdi, rdi
jz loc_1050B
mov rcx, rsi
lea r14, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState
mov esi, [r14]
cmp esi, 43h ; 'C'
jz short loc_1049F
mov eax, 2
cmp esi, 0Dh
jnz short loc_10510
loc_1049F:
mov eax, 3
test rdx, rdx
jz short loc_10510
test rcx, rcx
jz short loc_10510
cmp byte ptr [rdx], 0
jz short loc_10510
cmp byte ptr [rcx], 0
jz short loc_10510
cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 1; LefDefParser::lefwWriteEncrypt
jnz short loc_10516
lea rsi, aSamenetSS11g; " SAMENET %s %s %.11g "
mov al, 1
call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...)
test rbx, rbx
jz short loc_104F8
lea rsi, aStack+1; "STACK"
mov rdi, rbx
call _strcmp
test eax, eax
jnz short loc_104F8
mov rdi, [r15]
lea rsi, aStack_0; "STACK "
xor eax, eax
call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...)
loc_104F8:
mov rdi, [r15]
lea rsi, aDividercharS+11h; ";\n"
xor eax, eax
call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...)
jmp short loc_1056E
loc_1050B:
mov eax, 1
loc_10510:
pop rbx
pop r14
pop r15
retn
loc_10516:
lea rsi, aSamenetSS11g; " SAMENET %s %s %.11g "
mov al, 1
call _fprintf
test rbx, rbx
jz short loc_10555
lea rsi, aStack+1; "STACK"
mov rdi, rbx
call _strcmp
test eax, eax
jnz short loc_10555
mov rcx, [r15]
lea rdi, aStack_0; "STACK "
mov esi, 6
mov edx, 1
call _fwrite
loc_10555:
mov rcx, [r15]
lea rdi, aDividercharS+11h; ";\n"
mov esi, 2
mov edx, 1
call _fwrite
loc_1056E:
lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines
inc dword ptr [rax]
mov dword ptr [r14], 43h ; 'C'
xor eax, eax
jmp short loc_10510
| long long LefDefParser::lefwSpacing(
LefDefParser *this,
const char *a2,
const char *a3,
double a4,
const char *a5,
int a6,
int a7)
{
long long result; // rax
int v9; // edx
int v10; // ecx
int v11; // r8d
int v12; // r9d
LefDefParser::lefwObsoleteNum = 67;
if ( !*(_QWORD *)&LefDefParser::lefwFile )
return 1LL;
if ( LefDefParser::lefwState == 67 || (result = 2LL, LefDefParser::lefwState == 13) )
{
result = 3LL;
if ( this )
{
if ( a2 && *(_BYTE *)this && *a2 )
{
if ( LefDefParser::lefwWriteEncrypt == 1 )
{
LefDefParser::encPrint(
LefDefParser::lefwFile,
(unsigned int)" SAMENET %s %s %.11g ",
(_DWORD)this,
(_DWORD)a2,
a6,
a7);
if ( a3 )
{
if ( !(unsigned int)strcmp(a3, "STACK") )
LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)"STACK ", v9, v10, v11, v12);
}
LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)";\n", v9, v10, v11, v12);
}
else
{
fprintf(*(_QWORD *)&LefDefParser::lefwFile, " SAMENET %s %s %.11g ", (const char *)this, a2, a4);
if ( a3 && !(unsigned int)strcmp(a3, "STACK") )
fwrite("STACK ", 6LL, 1LL, *(_QWORD *)&LefDefParser::lefwFile);
fwrite(";\n", 2LL, 1LL, *(_QWORD *)&LefDefParser::lefwFile);
}
++LefDefParser::lefwLines;
LefDefParser::lefwState = 67;
return 0LL;
}
}
}
return result;
}
| lefwSpacing:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDX
MOV RDX,RDI
MOV dword ptr [0x00124d48],0x43
LEA R15,[0x124e00]
MOV RDI,qword ptr [R15]
TEST RDI,RDI
JZ 0x0011050b
MOV RCX,RSI
LEA R14,[0x125050]
MOV ESI,dword ptr [R14]
CMP ESI,0x43
JZ 0x0011049f
MOV EAX,0x2
CMP ESI,0xd
JNZ 0x00110510
LAB_0011049f:
MOV EAX,0x3
TEST RDX,RDX
JZ 0x00110510
TEST RCX,RCX
JZ 0x00110510
CMP byte ptr [RDX],0x0
JZ 0x00110510
CMP byte ptr [RCX],0x0
JZ 0x00110510
CMP byte ptr [0x001250ec],0x1
JNZ 0x00110516
LEA RSI,[0x11b4cc]
MOV AL,0x1
CALL 0x00118c35
TEST RBX,RBX
JZ 0x001104f8
LEA RSI,[0x11a3b2]
MOV RDI,RBX
CALL 0x001010e0
TEST EAX,EAX
JNZ 0x001104f8
MOV RDI,qword ptr [R15]
LEA RSI,[0x11b4e4]
XOR EAX,EAX
CALL 0x00118c35
LAB_001104f8:
MOV RDI,qword ptr [R15]
LEA RSI,[0x11a210]
XOR EAX,EAX
CALL 0x00118c35
JMP 0x0011056e
LAB_0011050b:
MOV EAX,0x1
LAB_00110510:
POP RBX
POP R14
POP R15
RET
LAB_00110516:
LEA RSI,[0x11b4cc]
MOV AL,0x1
CALL 0x001010f0
TEST RBX,RBX
JZ 0x00110555
LEA RSI,[0x11a3b2]
MOV RDI,RBX
CALL 0x001010e0
TEST EAX,EAX
JNZ 0x00110555
MOV RCX,qword ptr [R15]
LEA RDI,[0x11b4e4]
MOV ESI,0x6
MOV EDX,0x1
CALL 0x00101110
LAB_00110555:
MOV RCX,qword ptr [R15]
LEA RDI,[0x11a210]
MOV ESI,0x2
MOV EDX,0x1
CALL 0x00101110
LAB_0011056e:
LEA RAX,[0x12504c]
INC dword ptr [RAX]
MOV dword ptr [R14],0x43
XOR EAX,EAX
JMP 0x00110510
|
/* LefDefParser::lefwSpacing(char const*, char const*, double, char const*) */
int8 LefDefParser::lefwSpacing(char *param_1,char *param_2,double param_3,char *param_4)
{
int iVar1;
int8 uVar2;
lefwObsoleteNum = 0x43;
if (lefwFile == (_IO_FILE *)0x0) {
uVar2 = 1;
}
else if ((((lefwState == 0x43) || (uVar2 = 2, lefwState == 0xd)) &&
(uVar2 = 3, param_1 != (char *)0x0)) &&
(((param_2 != (char *)0x0 && (*param_1 != '\0')) && (*param_2 != '\0')))) {
if (lefwWriteEncrypt == '\x01') {
encPrint(lefwFile," SAMENET %s %s %.11g ");
if (param_4 != (char *)0x0) {
iVar1 = strcmp(param_4,"STACK");
if (iVar1 == 0) {
encPrint(lefwFile,"STACK ");
}
}
encPrint(lefwFile,";\n");
}
else {
fprintf(lefwFile," SAMENET %s %s %.11g ");
if (param_4 != (char *)0x0) {
iVar1 = strcmp(param_4,"STACK");
if (iVar1 == 0) {
fwrite("STACK ",6,1,lefwFile);
}
}
fwrite(";\n",2,1,lefwFile);
}
lefwLines = lefwLines + 1;
lefwState = 0x43;
uVar2 = 0;
}
return uVar2;
}
|
|
3,446 | glfwPlatformRestoreWindow | untodesu[P]riteg/build_O3/_deps/glfw-src/src/x11_window.c | void _glfwPlatformRestoreWindow(_GLFWwindow* window)
{
if (window->x11.overrideRedirect)
{
// Override-redirect windows cannot be iconified or restored, as those
// tasks are performed by the window manager
_glfwInputError(GLFW_PLATFORM_ERROR,
"X11: Iconification of full screen windows requires a WM that supports EWMH full screen");
return;
}
if (_glfwPlatformWindowIconified(window))
{
XMapWindow(_glfw.x11.display, window->x11.handle);
waitForVisibilityNotify(window);
}
else if (_glfwPlatformWindowVisible(window))
{
if (_glfw.x11.NET_WM_STATE &&
_glfw.x11.NET_WM_STATE_MAXIMIZED_VERT &&
_glfw.x11.NET_WM_STATE_MAXIMIZED_HORZ)
{
sendEventToWM(window,
_glfw.x11.NET_WM_STATE,
_NET_WM_STATE_REMOVE,
_glfw.x11.NET_WM_STATE_MAXIMIZED_VERT,
_glfw.x11.NET_WM_STATE_MAXIMIZED_HORZ,
1, 0);
}
}
XFlush(_glfw.x11.display);
} | O3 | c | glfwPlatformRestoreWindow:
cmpl $0x0, 0x358(%rdi)
je 0x232d6
leaq 0x6290f(%rip), %rsi # 0x85bd9
movl $0x10008, %edi # imm = 0x10008
xorl %eax, %eax
jmp 0x18e91
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rdi, %rbx
movq 0x348(%rdi), %rdi
callq 0x23894
cmpl $0x3, %eax
jne 0x23322
leaq 0x85336(%rip), %rax # 0xa8638
movq 0x1fec0(%rax), %rdi
movq 0x348(%rbx), %rsi
callq 0xc9a0
movq %rbx, %rdi
callq 0x23419
jmp 0x233db
leaq 0x8530f(%rip), %r15 # 0xa8638
movq 0x1fec0(%r15), %rdi
movq 0x348(%rbx), %rsi
leaq 0x8(%rsp), %r14
movq %r14, %rdx
callq 0xcf20
cmpl $0x2, 0x5c(%r14)
jne 0x233db
movq 0x20440(%r15), %r14
movq 0x20458(%r15), %r12
testq %r14, %r14
setne %al
testq %r12, %r12
setne %cl
andb %al, %cl
movq 0x20460(%r15), %r13
testq %r13, %r13
setne %al
andb %cl, %al
cmpb $0x1, %al
jne 0x233db
movq 0x348(%rbx), %rbp
leaq 0x8(%rsp), %rbx
movl $0xc0, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0xc470
movl $0x21, (%rbx)
movq %rbp, 0x20(%rbx)
movl $0x20, 0x30(%rbx)
movq %r14, 0x28(%rbx)
movq %r12, 0x40(%rbx)
movq %r13, 0x48(%rbx)
movq $0x1, 0x50(%rbx)
movq 0x1fec0(%r15), %rdi
movq 0x1fed0(%r15), %rsi
movl $0x180000, %ecx # imm = 0x180000
xorl %edx, %edx
movq %rbx, %r8
callq 0xc1c0
leaq 0x85256(%rip), %rax # 0xa8638
movq 0x1fec0(%rax), %rdi
callq 0xcce0
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _glfwPlatformRestoreWindow:
cmp dword ptr [rdi+358h], 0
jz short loc_232D6
lea rsi, aX11Iconificati; "X11: Iconification of full screen windo"...
mov edi, 10008h
xor eax, eax
jmp _glfwInputError
loc_232D6:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0C8h
mov rbx, rdi
mov rdi, [rdi+348h]
call getWindowState
cmp eax, 3
jnz short loc_23322
lea rax, _glfw
mov rdi, [rax+1FEC0h]
mov rsi, [rbx+348h]
call _XMapWindow
mov rdi, rbx
call waitForVisibilityNotify
jmp loc_233DB
loc_23322:
lea r15, _glfw
mov rdi, [r15+1FEC0h]
mov rsi, [rbx+348h]
lea r14, [rsp+0F8h+var_F0]
mov rdx, r14
call _XGetWindowAttributes
cmp dword ptr [r14+5Ch], 2
jnz loc_233DB
mov r14, qword ptr ds:loc_20440[r15]
mov r12, [r15+20458h]
test r14, r14
setnz al
test r12, r12
setnz cl
and cl, al
mov r13, [r15+20460h]
test r13, r13
setnz al
and al, cl
cmp al, 1
jnz short loc_233DB
mov rbp, [rbx+348h]
lea rbx, [rsp+0F8h+var_F0]
mov edx, 0C0h
mov rdi, rbx
xor esi, esi
call _memset
mov dword ptr [rbx], 21h ; '!'
mov [rbx+20h], rbp
mov dword ptr [rbx+30h], 20h ; ' '
mov [rbx+28h], r14
mov [rbx+40h], r12
mov [rbx+48h], r13
mov qword ptr [rbx+50h], 1
mov rdi, [r15+1FEC0h]
mov rsi, [r15+1FED0h]
mov ecx, 180000h
xor edx, edx
mov r8, rbx
call _XSendEvent
loc_233DB:
lea rax, _glfw
mov rdi, [rax+1FEC0h]
call _XFlush
add rsp, 0C8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long ( * glfwPlatformRestoreWindow(long long a1))(_QWORD, _QWORD)
{
long long v2; // r14
long long v3; // r12
long long v4; // r13
long long v5; // rbp
_DWORD v6[8]; // [rsp+0h] [rbp-F0h] BYREF
long long v7; // [rsp+20h] [rbp-D0h]
long long v8; // [rsp+28h] [rbp-C8h]
int v9; // [rsp+30h] [rbp-C0h]
long long v10; // [rsp+40h] [rbp-B0h]
long long v11; // [rsp+48h] [rbp-A8h]
long long v12; // [rsp+50h] [rbp-A0h]
int v13; // [rsp+5Ch] [rbp-94h]
if ( *(_DWORD *)(a1 + 856) )
return glfwInputError(
0x10008u,
(long long)"X11: Iconification of full screen windows requires a WM that supports EWMH full screen");
if ( (unsigned int)getWindowState(*(_QWORD *)(a1 + 840)) == 3 )
{
XMapWindow(*(_QWORD *)&glfw[32688], *(_QWORD *)(a1 + 840));
waitForVisibilityNotify(a1);
}
else
{
XGetWindowAttributes(*(_QWORD *)&glfw[32688], *(_QWORD *)(a1 + 840), v6);
if ( v13 == 2 )
{
v2 = *(_QWORD *)((char *)&loc_20440 + (_QWORD)glfw);
v3 = *(_QWORD *)&glfw[33046];
v4 = *(_QWORD *)&glfw[33048];
if ( v2 != 0 && v3 != 0 && v4 != 0 )
{
v5 = *(_QWORD *)(a1 + 840);
memset(v6, 0LL, 192LL);
v6[0] = 33;
v7 = v5;
v9 = 32;
v8 = v2;
v10 = v3;
v11 = v4;
v12 = 1LL;
XSendEvent(*(_QWORD *)&glfw[32688], *(_QWORD *)&glfw[32692], 0LL, 1572864LL, v6);
}
}
}
return (long long ( *)(_QWORD, _QWORD))XFlush(*(_QWORD *)&glfw[32688]);
}
| _glfwPlatformRestoreWindow:
CMP dword ptr [RDI + 0x358],0x0
JZ 0x001232d6
LEA RSI,[0x185bd9]
MOV EDI,0x10008
XOR EAX,EAX
JMP 0x00118e91
LAB_001232d6:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xc8
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x348]
CALL 0x00123894
CMP EAX,0x3
JNZ 0x00123322
LEA RAX,[0x1a8638]
MOV RDI,qword ptr [RAX + 0x1fec0]
MOV RSI,qword ptr [RBX + 0x348]
CALL 0x0010c9a0
MOV RDI,RBX
CALL 0x00123419
JMP 0x001233db
LAB_00123322:
LEA R15,[0x1a8638]
MOV RDI,qword ptr [R15 + 0x1fec0]
MOV RSI,qword ptr [RBX + 0x348]
LEA R14,[RSP + 0x8]
MOV RDX,R14
CALL 0x0010cf20
CMP dword ptr [R14 + 0x5c],0x2
JNZ 0x001233db
MOV R14,qword ptr [R15 + 0x20440]
MOV R12,qword ptr [R15 + 0x20458]
TEST R14,R14
SETNZ AL
TEST R12,R12
SETNZ CL
AND CL,AL
MOV R13,qword ptr [R15 + 0x20460]
TEST R13,R13
SETNZ AL
AND AL,CL
CMP AL,0x1
JNZ 0x001233db
MOV RBP,qword ptr [RBX + 0x348]
LEA RBX,[RSP + 0x8]
MOV EDX,0xc0
MOV RDI,RBX
XOR ESI,ESI
CALL 0x0010c470
MOV dword ptr [RBX],0x21
MOV qword ptr [RBX + 0x20],RBP
MOV dword ptr [RBX + 0x30],0x20
MOV qword ptr [RBX + 0x28],R14
MOV qword ptr [RBX + 0x40],R12
MOV qword ptr [RBX + 0x48],R13
MOV qword ptr [RBX + 0x50],0x1
MOV RDI,qword ptr [R15 + 0x1fec0]
MOV RSI,qword ptr [R15 + 0x1fed0]
MOV ECX,0x180000
XOR EDX,EDX
MOV R8,RBX
CALL 0x0010c1c0
LAB_001233db:
LEA RAX,[0x1a8638]
MOV RDI,qword ptr [RAX + 0x1fec0]
CALL 0x0010cce0
ADD RSP,0xc8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void _glfwPlatformRestoreWindow(long param_1)
{
int8 uVar1;
long lVar2;
long lVar3;
long lVar4;
int iVar5;
int4 local_f0 [8];
int8 local_d0;
long local_c8;
int4 local_c0;
long local_b0;
long local_a8;
int8 local_a0;
int local_94;
if (*(int *)(param_1 + 0x358) != 0) {
_glfwInputError(0x10008,
"X11: Iconification of full screen windows requires a WM that supports EWMH full screen"
);
return;
}
iVar5 = getWindowState(*(int8 *)(param_1 + 0x348));
if (iVar5 == 3) {
XMapWindow(DAT_001c84f8,*(int8 *)(param_1 + 0x348));
waitForVisibilityNotify(param_1);
}
else {
XGetWindowAttributes(DAT_001c84f8,*(int8 *)(param_1 + 0x348),local_f0);
lVar4 = DAT_001c8a98;
lVar3 = DAT_001c8a90;
lVar2 = DAT_001c8a78;
if (local_94 == 2) {
if (DAT_001c8a98 != 0 && (DAT_001c8a90 != 0 && DAT_001c8a78 != 0)) {
uVar1 = *(int8 *)(param_1 + 0x348);
memset(local_f0,0,0xc0);
local_f0[0] = 0x21;
local_c0 = 0x20;
local_c8 = lVar2;
local_b0 = lVar3;
local_a8 = lVar4;
local_a0 = 1;
local_d0 = uVar1;
XSendEvent(DAT_001c84f8,DAT_001c8508,0,0x180000,local_f0);
}
}
}
XFlush(DAT_001c84f8);
return;
}
|
|
3,447 | google::protobuf::OneofDescriptorProto::InternalSwap(google::protobuf::OneofDescriptorProto*) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc | void OneofDescriptorProto::InternalSwap(OneofDescriptorProto* other) {
using std::swap;
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&_impl_.name_, lhs_arena,
&other->_impl_.name_, rhs_arena
);
swap(_impl_.options_, other->_impl_.options_);
} | O0 | cpp | google::protobuf::OneofDescriptorProto::InternalSwap(google::protobuf::OneofDescriptorProto*):
subq $0x78, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x80180
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rdi
callq 0x80180
movq (%rsp), %rcx
movq %rax, 0x8(%rsp)
addq $0x8, %rcx
movq 0x18(%rsp), %rax
addq $0x8, %rax
movq %rcx, 0x30(%rsp)
movq %rax, 0x28(%rsp)
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0xde020
movq (%rsp), %rax
addq $0x10, %rax
movq %rax, 0x50(%rsp)
movl $0x0, 0x4c(%rsp)
movq 0x50(%rsp), %rdi
movslq 0x4c(%rsp), %rax
shlq $0x2, %rax
addq %rax, %rdi
movq 0x18(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x40(%rsp)
movl $0x0, 0x3c(%rsp)
movq 0x40(%rsp), %rsi
movslq 0x3c(%rsp), %rax
shlq $0x2, %rax
addq %rax, %rsi
callq 0xd5790
movq (%rsp), %rsi
addq $0x10, %rsi
addq $0x8, %rsi
movq 0x10(%rsp), %rdx
movq 0x18(%rsp), %rcx
addq $0x10, %rcx
addq $0x8, %rcx
movq 0x8(%rsp), %rax
movq %rsi, 0x70(%rsp)
movq %rdx, 0x68(%rsp)
movq %rcx, 0x60(%rsp)
movq %rax, 0x58(%rsp)
movq 0x60(%rsp), %rdi
movq 0x70(%rsp), %rsi
callq 0xde4b0
movq (%rsp), %rdi
addq $0x10, %rdi
addq $0x10, %rdi
movq 0x18(%rsp), %rsi
addq $0x10, %rsi
addq $0x10, %rsi
callq 0xd7910
addq $0x78, %rsp
retq
nopw %cs:(%rax,%rax)
| _ZN6google8protobuf20OneofDescriptorProto12InternalSwapEPS1_:
sub rsp, 78h
mov [rsp+78h+var_58], rdi
mov [rsp+78h+var_60], rsi
mov rdi, [rsp+78h+var_58]; this
mov [rsp+78h+var_78], rdi
call _ZNK6google8protobuf11MessageLite21GetArenaForAllocationEv; google::protobuf::MessageLite::GetArenaForAllocation(void)
mov [rsp+78h+var_68], rax
mov rdi, [rsp+78h+var_60]; this
call _ZNK6google8protobuf11MessageLite21GetArenaForAllocationEv; google::protobuf::MessageLite::GetArenaForAllocation(void)
mov rcx, [rsp+78h+var_78]
mov [rsp+78h+var_70], rax
add rcx, 8
mov rax, [rsp+78h+var_60]
add rax, 8
mov [rsp+78h+var_48], rcx
mov [rsp+78h+var_50], rax
mov rdi, [rsp+78h+var_48]
mov rsi, [rsp+78h+var_50]
call _ZSt4swapIlENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_
mov rax, [rsp+78h+var_78]
add rax, 10h
mov [rsp+78h+var_28], rax
mov [rsp+78h+var_2C], 0
mov rdi, [rsp+78h+var_28]
movsxd rax, [rsp+78h+var_2C]
shl rax, 2
add rdi, rax
mov rax, [rsp+78h+var_60]
add rax, 10h
mov [rsp+78h+var_38], rax
mov [rsp+78h+var_3C], 0
mov rsi, [rsp+78h+var_38]
movsxd rax, [rsp+78h+var_3C]
shl rax, 2
add rsi, rax
call _ZSt4swapIjENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_
mov rsi, [rsp+78h+var_78]
add rsi, 10h
add rsi, 8
mov rdx, [rsp+78h+var_68]
mov rcx, [rsp+78h+var_60]
add rcx, 10h
add rcx, 8
mov rax, [rsp+78h+var_70]
mov [rsp+78h+var_8], rsi
mov [rsp+78h+var_10], rdx
mov [rsp+78h+var_18], rcx
mov [rsp+78h+var_20], rax
mov rdi, [rsp+78h+var_18]
mov rsi, [rsp+78h+var_8]
call _ZSt4swapIN6google8protobuf8internal15TaggedStringPtrEENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS7_ESt18is_move_assignableIS7_EEE5valueEvE4typeERS7_SG_
mov rdi, [rsp+78h+var_78]
add rdi, 10h
add rdi, 10h
mov rsi, [rsp+78h+var_60]
add rsi, 10h
add rsi, 10h
call _ZSt4swapIPN6google8protobuf12OneofOptionsEENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS7_ESt18is_move_assignableIS7_EEE5valueEvE4typeERS7_SG_
add rsp, 78h
retn
| long long google::protobuf::OneofDescriptorProto::InternalSwap(
google::protobuf::OneofDescriptorProto *this,
google::protobuf::OneofDescriptorProto *a2)
{
google::protobuf::MessageLite::GetArenaForAllocation(this);
google::protobuf::MessageLite::GetArenaForAllocation(a2);
std::swap<long>((char *)this + 8, (char *)a2 + 8);
std::swap<unsigned int>((char *)this + 16, (char *)a2 + 16);
std::swap<google::protobuf::internal::TaggedStringPtr>((char *)a2 + 24, (char *)this + 24);
return std::swap<google::protobuf::OneofOptions *>((char *)this + 32, (char *)a2 + 32);
}
| InternalSwap:
SUB RSP,0x78
MOV qword ptr [RSP + 0x20],RDI
MOV qword ptr [RSP + 0x18],RSI
MOV RDI,qword ptr [RSP + 0x20]
MOV qword ptr [RSP],RDI
CALL 0x00180180
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00180180
MOV RCX,qword ptr [RSP]
MOV qword ptr [RSP + 0x8],RAX
ADD RCX,0x8
MOV RAX,qword ptr [RSP + 0x18]
ADD RAX,0x8
MOV qword ptr [RSP + 0x30],RCX
MOV qword ptr [RSP + 0x28],RAX
MOV RDI,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x001de020
MOV RAX,qword ptr [RSP]
ADD RAX,0x10
MOV qword ptr [RSP + 0x50],RAX
MOV dword ptr [RSP + 0x4c],0x0
MOV RDI,qword ptr [RSP + 0x50]
MOVSXD RAX,dword ptr [RSP + 0x4c]
SHL RAX,0x2
ADD RDI,RAX
MOV RAX,qword ptr [RSP + 0x18]
ADD RAX,0x10
MOV qword ptr [RSP + 0x40],RAX
MOV dword ptr [RSP + 0x3c],0x0
MOV RSI,qword ptr [RSP + 0x40]
MOVSXD RAX,dword ptr [RSP + 0x3c]
SHL RAX,0x2
ADD RSI,RAX
CALL 0x001d5790
MOV RSI,qword ptr [RSP]
ADD RSI,0x10
ADD RSI,0x8
MOV RDX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RSP + 0x18]
ADD RCX,0x10
ADD RCX,0x8
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x70],RSI
MOV qword ptr [RSP + 0x68],RDX
MOV qword ptr [RSP + 0x60],RCX
MOV qword ptr [RSP + 0x58],RAX
MOV RDI,qword ptr [RSP + 0x60]
MOV RSI,qword ptr [RSP + 0x70]
CALL 0x001de4b0
MOV RDI,qword ptr [RSP]
ADD RDI,0x10
ADD RDI,0x10
MOV RSI,qword ptr [RSP + 0x18]
ADD RSI,0x10
ADD RSI,0x10
CALL 0x001d7910
ADD RSP,0x78
RET
|
/* google::protobuf::OneofDescriptorProto::InternalSwap(google::protobuf::OneofDescriptorProto*) */
void __thiscall
google::protobuf::OneofDescriptorProto::InternalSwap
(OneofDescriptorProto *this,OneofDescriptorProto *param_1)
{
MessageLite::GetArenaForAllocation((MessageLite *)this);
MessageLite::GetArenaForAllocation((MessageLite *)param_1);
std::swap<long>((long *)(this + 8),(long *)(param_1 + 8));
std::swap<unsigned_int>((uint *)(this + 0x10),(uint *)(param_1 + 0x10));
std::swap<google::protobuf::internal::TaggedStringPtr>
((TaggedStringPtr *)(param_1 + 0x18),(TaggedStringPtr *)(this + 0x18));
std::swap<google::protobuf::OneofOptions*>
((OneofOptions **)(this + 0x20),(OneofOptions **)(param_1 + 0x20));
return;
}
|
|
3,448 | my_dir | eloqsql/mysys/my_lib.c | MY_DIR *my_dir(const char *path, myf MyFlags)
{
MY_DIR_HANDLE *dirh;
FILEINFO finfo;
DIR *dirp;
struct dirent *dp;
char tmp_path[FN_REFLEN + 2], *tmp_file;
char dirent_tmp[sizeof(struct dirent)+_POSIX_PATH_MAX+1];
DBUG_ENTER("my_dir");
DBUG_PRINT("my",("path: '%s' MyFlags: %lu",path,MyFlags));
tmp_file= directory_file_name(tmp_path, path);
if (!(dirp= opendir(tmp_path)))
{
my_errno= errno;
goto err_open;
}
if (!(dirh= my_malloc(key_memory_MY_DIR, sizeof(*dirh),
MYF(MyFlags | MY_ZEROFILL))))
goto err_alloc;
if (my_init_dynamic_array(key_memory_MY_DIR, &dirh->array, sizeof(FILEINFO),
ENTRIES_START_SIZE, ENTRIES_INCREMENT,
MYF(MyFlags)))
goto error;
init_alloc_root(key_memory_MY_DIR, &dirh->root, NAMES_START_SIZE,
NAMES_START_SIZE, MYF(MyFlags));
dp= (struct dirent*) dirent_tmp;
while (!(READDIR(dirp,(struct dirent*) dirent_tmp,dp)))
{
MY_STAT statbuf, *mystat= 0;
if (dp->d_name[0] == '.' &&
(dp->d_name[1] == '\0' ||
(dp->d_name[1] == '.' && dp->d_name[2] == '\0')))
continue; /* . or .. */
if (MyFlags & MY_WANT_STAT)
{
mystat= &statbuf;
bzero(mystat, sizeof(*mystat));
(void) strmov(tmp_file, dp->d_name);
(void) my_stat(tmp_path, mystat, MyFlags);
if (!(mystat->st_mode & MY_S_IREAD))
continue;
}
if (!(finfo.name= strdup_root(&dirh->root, dp->d_name)))
goto error;
if (mystat &&
!((mystat= memdup_root(&dirh->root, mystat, sizeof(*mystat)))))
goto error;
finfo.mystat= mystat;
if (push_dynamic(&dirh->array, (uchar*)&finfo))
goto error;
}
(void) closedir(dirp);
if (MyFlags & MY_WANT_SORT)
sort_dynamic(&dirh->array, (qsort_cmp) comp_names);
dirh->dir.dir_entry= dynamic_element(&dirh->array, 0, FILEINFO *);
dirh->dir.number_of_files= dirh->array.elements;
DBUG_RETURN(&dirh->dir);
error:
my_dirend(&dirh->dir);
err_alloc:
(void) closedir(dirp);
err_open:
if (MyFlags & (MY_FAE | MY_WME))
my_error(EE_DIR, MYF(ME_BELL), path, my_errno);
DBUG_RETURN(NULL);
} | O0 | c | my_dir:
pushq %rbp
movq %rsp, %rbp
subq $0x530, %rsp # imm = 0x530
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x440(%rbp)
movq %rsi, -0x448(%rbp)
jmp 0x697e8
leaq -0x210(%rbp), %rdi
movq -0x440(%rbp), %rsi
callq 0x69b90
movq %rax, -0x478(%rbp)
leaq -0x210(%rbp), %rdi
callq 0x26500
movq %rax, -0x468(%rbp)
cmpq $0x0, %rax
jne 0x6983a
callq 0x26050
movl (%rax), %eax
movl %eax, -0x514(%rbp)
callq 0x5ea40
movl -0x514(%rbp), %ecx
movl %ecx, (%rax)
jmp 0x69b0b
leaq 0x3a9353(%rip), %rax # 0x412b94
movl (%rax), %edi
movq -0x448(%rbp), %rdx
orq $0x20, %rdx
movl $0x78, %esi
callq 0x5d530
movq %rax, -0x450(%rbp)
cmpq $0x0, %rax
jne 0x6986a
jmp 0x69aff
leaq 0x3a9323(%rip), %rax # 0x412b94
movl (%rax), %edi
movq -0x450(%rbp), %rsi
addq $0x10, %rsi
movq -0x448(%rbp), %rax
movl $0x10, %edx
xorl %ecx, %ecx
movl $0x200, %r8d # imm = 0x200
movl $0x1000, %r9d # imm = 0x1000
movq %rax, (%rsp)
callq 0x5c260
cmpb $0x0, %al
je 0x698aa
jmp 0x69af3
leaq 0x3a92e3(%rip), %rax # 0x412b94
movl (%rax), %edi
movq -0x450(%rbp), %rsi
addq $0x38, %rsi
movq -0x448(%rbp), %r8
movl $0x8000, %ecx # imm = 0x8000
movq %rcx, %rdx
callq 0x6c7a0
leaq -0x430(%rbp), %rax
movq %rax, -0x470(%rbp)
movq -0x468(%rbp), %rdi
callq 0x261f0
movq %rax, -0x470(%rbp)
cmpq $0x0, %rax
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x69907
jmp 0x69a6c
movq $0x0, -0x510(%rbp)
movq -0x470(%rbp), %rax
movsbl 0x13(%rax), %eax
cmpl $0x2e, %eax
jne 0x69954
movq -0x470(%rbp), %rax
movsbl 0x14(%rax), %eax
cmpl $0x0, %eax
je 0x69952
movq -0x470(%rbp), %rax
movsbl 0x14(%rax), %eax
cmpl $0x2e, %eax
jne 0x69954
movq -0x470(%rbp), %rax
movsbl 0x15(%rax), %eax
cmpl $0x0, %eax
jne 0x69954
jmp 0x698e0
movq -0x448(%rbp), %rax
andq $0x4000, %rax # imm = 0x4000
cmpq $0x0, %rax
je 0x699d4
leaq -0x508(%rbp), %rax
movq %rax, -0x510(%rbp)
movq -0x510(%rbp), %rdi
xorl %esi, %esi
movl $0x90, %edx
callq 0x261c0
movq -0x478(%rbp), %rdi
movq -0x470(%rbp), %rsi
addq $0x13, %rsi
callq 0x26330
leaq -0x210(%rbp), %rdi
movq -0x510(%rbp), %rsi
movq -0x448(%rbp), %rdx
callq 0x69c00
movq -0x510(%rbp), %rax
movl 0x18(%rax), %eax
andl $0x100, %eax # imm = 0x100
cmpl $0x0, %eax
jne 0x699d2
jmp 0x698e0
jmp 0x699d4
movq -0x450(%rbp), %rdi
addq $0x38, %rdi
movq -0x470(%rbp), %rsi
addq $0x13, %rsi
callq 0x6d2d0
movq %rax, -0x460(%rbp)
cmpq $0x0, %rax
jne 0x69a01
jmp 0x69af3
cmpq $0x0, -0x510(%rbp)
je 0x69a39
movq -0x450(%rbp), %rdi
addq $0x38, %rdi
movq -0x510(%rbp), %rsi
movl $0x90, %edx
callq 0x6d370
movq %rax, -0x510(%rbp)
cmpq $0x0, %rax
jne 0x69a39
jmp 0x69af3
movq -0x510(%rbp), %rax
movq %rax, -0x458(%rbp)
movq -0x450(%rbp), %rdi
addq $0x10, %rdi
leaq -0x460(%rbp), %rsi
callq 0x5c390
cmpb $0x0, %al
je 0x69a67
jmp 0x69af3
jmp 0x698e0
movq -0x468(%rbp), %rdi
callq 0x26560
movq -0x448(%rbp), %rax
andq $0x2000, %rax # imm = 0x2000
cmpq $0x0, %rax
je 0x69aba
movq -0x450(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x450(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, %esi
movq -0x450(%rbp), %rax
movl 0x24(%rax), %eax
movl %eax, %edx
leaq 0x23b(%rip), %rcx # 0x69cf0
callq 0x6add0
movq -0x450(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x450(%rbp), %rax
movq %rcx, (%rax)
movq -0x450(%rbp), %rax
movl 0x18(%rax), %ecx
movq -0x450(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x450(%rbp), %rax
movq %rax, -0x438(%rbp)
jmp 0x69b56
movq -0x450(%rbp), %rdi
callq 0x69770
movq -0x468(%rbp), %rdi
callq 0x26560
movq -0x448(%rbp), %rax
andq $0x18, %rax
cmpq $0x0, %rax
je 0x69b49
movq -0x440(%rbp), %rax
movq %rax, -0x520(%rbp)
callq 0x5ea40
movq -0x520(%rbp), %rdx
movl (%rax), %ecx
movl $0xc, %edi
movl $0x4, %esi
movb $0x0, %al
callq 0x68f20
jmp 0x69b4b
movq $0x0, -0x438(%rbp)
movq -0x438(%rbp), %rax
movq %rax, -0x528(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x69b86
movq -0x528(%rbp), %rax
addq $0x530, %rsp # imm = 0x530
popq %rbp
retq
callq 0x26360
nopl (%rax,%rax)
| my_dir:
push rbp
mov rbp, rsp
sub rsp, 530h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_440], rdi
mov [rbp+var_448], rsi
jmp short $+2
loc_697E8:
lea rdi, [rbp+var_210]
mov rsi, [rbp+var_440]
call directory_file_name
mov [rbp+var_478], rax
lea rdi, [rbp+var_210]
call _opendir
mov [rbp+var_468], rax
cmp rax, 0
jnz short loc_6983A
call ___errno_location
mov eax, [rax]
mov [rbp+var_514], eax
call _my_thread_var
mov ecx, [rbp+var_514]
mov [rax], ecx
jmp loc_69B0B
loc_6983A:
lea rax, key_memory_MY_DIR
mov edi, [rax]
mov rdx, [rbp+var_448]
or rdx, 20h
mov esi, 78h ; 'x'
call my_malloc
mov [rbp+var_450], rax
cmp rax, 0
jnz short loc_6986A
jmp loc_69AFF
loc_6986A:
lea rax, key_memory_MY_DIR
mov edi, [rax]
mov rsi, [rbp+var_450]
add rsi, 10h
mov rax, [rbp+var_448]
mov edx, 10h
xor ecx, ecx
mov r8d, 200h
mov r9d, 1000h
mov [rsp+530h+var_530], rax
call init_dynamic_array2
cmp al, 0
jz short loc_698AA
jmp loc_69AF3
loc_698AA:
lea rax, key_memory_MY_DIR
mov edi, [rax]
mov rsi, [rbp+var_450]
add rsi, 38h ; '8'
mov r8, [rbp+var_448]
mov ecx, 8000h
mov rdx, rcx
call init_alloc_root
lea rax, [rbp+var_430]
mov [rbp+var_470], rax
loc_698E0:
mov rdi, [rbp+var_468]
call _readdir64
mov [rbp+var_470], rax
cmp rax, 0
setnz al
xor al, 0FFh
xor al, 0FFh
test al, 1
jnz short loc_69907
jmp loc_69A6C
loc_69907:
mov [rbp+var_510], 0
mov rax, [rbp+var_470]
movsx eax, byte ptr [rax+13h]
cmp eax, 2Eh ; '.'
jnz short loc_69954
mov rax, [rbp+var_470]
movsx eax, byte ptr [rax+14h]
cmp eax, 0
jz short loc_69952
mov rax, [rbp+var_470]
movsx eax, byte ptr [rax+14h]
cmp eax, 2Eh ; '.'
jnz short loc_69954
mov rax, [rbp+var_470]
movsx eax, byte ptr [rax+15h]
cmp eax, 0
jnz short loc_69954
loc_69952:
jmp short loc_698E0
loc_69954:
mov rax, [rbp+var_448]
and rax, 4000h
cmp rax, 0
jz short loc_699D4
lea rax, [rbp+var_508]
mov [rbp+var_510], rax
mov rdi, [rbp+var_510]
xor esi, esi
mov edx, 90h
call _memset
mov rdi, [rbp+var_478]
mov rsi, [rbp+var_470]
add rsi, 13h
call _stpcpy
lea rdi, [rbp+var_210]
mov rsi, [rbp+var_510]
mov rdx, [rbp+var_448]
call my_stat
mov rax, [rbp+var_510]
mov eax, [rax+18h]
and eax, 100h
cmp eax, 0
jnz short loc_699D2
jmp loc_698E0
loc_699D2:
jmp short $+2
loc_699D4:
mov rdi, [rbp+var_450]
add rdi, 38h ; '8'
mov rsi, [rbp+var_470]
add rsi, 13h
call strdup_root
mov [rbp+var_460], rax
cmp rax, 0
jnz short loc_69A01
jmp loc_69AF3
loc_69A01:
cmp [rbp+var_510], 0
jz short loc_69A39
mov rdi, [rbp+var_450]
add rdi, 38h ; '8'
mov rsi, [rbp+var_510]
mov edx, 90h
call memdup_root
mov [rbp+var_510], rax
cmp rax, 0
jnz short loc_69A39
jmp loc_69AF3
loc_69A39:
mov rax, [rbp+var_510]
mov [rbp+var_458], rax
mov rdi, [rbp+var_450]
add rdi, 10h
lea rsi, [rbp+var_460]
call insert_dynamic
cmp al, 0
jz short loc_69A67
jmp loc_69AF3
loc_69A67:
jmp loc_698E0
loc_69A6C:
mov rdi, [rbp+var_468]
call _closedir
mov rax, [rbp+var_448]
and rax, 2000h
cmp rax, 0
jz short loc_69ABA
mov rax, [rbp+var_450]
mov rdi, [rax+10h]
mov rax, [rbp+var_450]
mov eax, [rax+18h]
mov esi, eax
mov rax, [rbp+var_450]
mov eax, [rax+24h]
mov edx, eax
lea rcx, comp_names
call my_qsort
loc_69ABA:
mov rax, [rbp+var_450]
mov rcx, [rax+10h]
mov rax, [rbp+var_450]
mov [rax], rcx
mov rax, [rbp+var_450]
mov ecx, [rax+18h]
mov rax, [rbp+var_450]
mov [rax+8], ecx
mov rax, [rbp+var_450]
mov [rbp+var_438], rax
jmp short loc_69B56
loc_69AF3:
mov rdi, [rbp+var_450]
call my_dirend
loc_69AFF:
mov rdi, [rbp+var_468]
call _closedir
loc_69B0B:
mov rax, [rbp+var_448]
and rax, 18h
cmp rax, 0
jz short loc_69B49
mov rax, [rbp+var_440]
mov [rbp+var_520], rax
call _my_thread_var
mov rdx, [rbp+var_520]
mov ecx, [rax]
mov edi, 0Ch
mov esi, 4
mov al, 0
call my_error
loc_69B49:
jmp short $+2
loc_69B4B:
mov [rbp+var_438], 0
loc_69B56:
mov rax, [rbp+var_438]
mov [rbp+var_528], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_69B86
mov rax, [rbp+var_528]
add rsp, 530h
pop rbp
retn
loc_69B86:
call ___stack_chk_fail
| long long my_dir(long long a1, long long a2)
{
unsigned int *v2; // rax
long long v4; // [rsp+10h] [rbp-520h]
int v5; // [rsp+1Ch] [rbp-514h]
_BYTE *v6; // [rsp+20h] [rbp-510h]
_BYTE v7[24]; // [rsp+28h] [rbp-508h] BYREF
__int16 v8; // [rsp+40h] [rbp-4F0h]
long long v9; // [rsp+B8h] [rbp-478h]
char *v10; // [rsp+C0h] [rbp-470h]
long long v11; // [rsp+C8h] [rbp-468h]
_QWORD v12[2]; // [rsp+D0h] [rbp-460h] BYREF
long long v13; // [rsp+E0h] [rbp-450h]
long long v14; // [rsp+E8h] [rbp-448h]
long long v15; // [rsp+F0h] [rbp-440h]
char v17; // [rsp+100h] [rbp-430h] BYREF
_BYTE v18[520]; // [rsp+320h] [rbp-210h] BYREF
unsigned long long v19; // [rsp+528h] [rbp-8h]
v19 = __readfsqword(0x28u);
v15 = a1;
v14 = a2;
v9 = directory_file_name(v18, a1);
v11 = opendir(v18);
if ( !v11 )
{
v5 = *(_DWORD *)__errno_location();
*(_DWORD *)my_thread_var() = v5;
LABEL_24:
if ( (v14 & 0x18) != 0 )
{
v4 = v15;
v2 = (unsigned int *)my_thread_var();
my_error(0xCu, 4LL, v4, *v2);
}
return 0LL;
}
v13 = my_malloc(key_memory_MY_DIR, 0x78uLL, (unsigned int)v14 | 0x20);
if ( !v13 )
{
LABEL_23:
closedir(v11);
goto LABEL_24;
}
if ( init_dynamic_array2(key_memory_MY_DIR, v13 + 16, 0x10u, 0LL, 0x200u, 4096, v14) )
{
LABEL_22:
my_dirend(v13);
goto LABEL_23;
}
init_alloc_root(key_memory_MY_DIR, v13 + 56, 0x8000LL, 0x8000LL, v14);
v10 = &v17;
while ( 1 )
{
v10 = (char *)readdir64(v11);
if ( !v10 )
break;
v6 = 0LL;
if ( v10[19] != 46 || v10[20] && (v10[20] != 46 || v10[21]) )
{
if ( (v14 & 0x4000) == 0
|| (v6 = v7, memset(v7, 0LL, 144LL), stpcpy(v9, v10 + 19), my_stat(v18, v7, v14), (v8 & 0x100) != 0) )
{
v12[0] = strdup_root(v13 + 56, v10 + 19);
if ( !v12[0] )
goto LABEL_22;
if ( v6 )
{
v6 = (_BYTE *)memdup_root(v13 + 56, v6, 144LL);
if ( !v6 )
goto LABEL_22;
}
v12[1] = v6;
if ( insert_dynamic(v13 + 16, (long long)v12) )
goto LABEL_22;
}
}
}
closedir(v11);
if ( (v14 & 0x2000) != 0 )
my_qsort(*(_QWORD *)(v13 + 16), *(unsigned int *)(v13 + 24), *(unsigned int *)(v13 + 36), comp_names);
*(_QWORD *)v13 = *(_QWORD *)(v13 + 16);
*(_DWORD *)(v13 + 8) = *(_DWORD *)(v13 + 24);
return v13;
}
| my_dir:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x530
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x440],RDI
MOV qword ptr [RBP + -0x448],RSI
JMP 0x001697e8
LAB_001697e8:
LEA RDI,[RBP + -0x210]
MOV RSI,qword ptr [RBP + -0x440]
CALL 0x00169b90
MOV qword ptr [RBP + -0x478],RAX
LEA RDI,[RBP + -0x210]
CALL 0x00126500
MOV qword ptr [RBP + -0x468],RAX
CMP RAX,0x0
JNZ 0x0016983a
CALL 0x00126050
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x514],EAX
CALL 0x0015ea40
MOV ECX,dword ptr [RBP + -0x514]
MOV dword ptr [RAX],ECX
JMP 0x00169b0b
LAB_0016983a:
LEA RAX,[0x512b94]
MOV EDI,dword ptr [RAX]
MOV RDX,qword ptr [RBP + -0x448]
OR RDX,0x20
MOV ESI,0x78
CALL 0x0015d530
MOV qword ptr [RBP + -0x450],RAX
CMP RAX,0x0
JNZ 0x0016986a
JMP 0x00169aff
LAB_0016986a:
LEA RAX,[0x512b94]
MOV EDI,dword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x450]
ADD RSI,0x10
MOV RAX,qword ptr [RBP + -0x448]
MOV EDX,0x10
XOR ECX,ECX
MOV R8D,0x200
MOV R9D,0x1000
MOV qword ptr [RSP],RAX
CALL 0x0015c260
CMP AL,0x0
JZ 0x001698aa
JMP 0x00169af3
LAB_001698aa:
LEA RAX,[0x512b94]
MOV EDI,dword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x450]
ADD RSI,0x38
MOV R8,qword ptr [RBP + -0x448]
MOV ECX,0x8000
MOV RDX,RCX
CALL 0x0016c7a0
LEA RAX,[RBP + -0x430]
MOV qword ptr [RBP + -0x470],RAX
LAB_001698e0:
MOV RDI,qword ptr [RBP + -0x468]
CALL 0x001261f0
MOV qword ptr [RBP + -0x470],RAX
CMP RAX,0x0
SETNZ AL
XOR AL,0xff
XOR AL,0xff
TEST AL,0x1
JNZ 0x00169907
JMP 0x00169a6c
LAB_00169907:
MOV qword ptr [RBP + -0x510],0x0
MOV RAX,qword ptr [RBP + -0x470]
MOVSX EAX,byte ptr [RAX + 0x13]
CMP EAX,0x2e
JNZ 0x00169954
MOV RAX,qword ptr [RBP + -0x470]
MOVSX EAX,byte ptr [RAX + 0x14]
CMP EAX,0x0
JZ 0x00169952
MOV RAX,qword ptr [RBP + -0x470]
MOVSX EAX,byte ptr [RAX + 0x14]
CMP EAX,0x2e
JNZ 0x00169954
MOV RAX,qword ptr [RBP + -0x470]
MOVSX EAX,byte ptr [RAX + 0x15]
CMP EAX,0x0
JNZ 0x00169954
LAB_00169952:
JMP 0x001698e0
LAB_00169954:
MOV RAX,qword ptr [RBP + -0x448]
AND RAX,0x4000
CMP RAX,0x0
JZ 0x001699d4
LEA RAX,[RBP + -0x508]
MOV qword ptr [RBP + -0x510],RAX
MOV RDI,qword ptr [RBP + -0x510]
XOR ESI,ESI
MOV EDX,0x90
CALL 0x001261c0
MOV RDI,qword ptr [RBP + -0x478]
MOV RSI,qword ptr [RBP + -0x470]
ADD RSI,0x13
CALL 0x00126330
LEA RDI,[RBP + -0x210]
MOV RSI,qword ptr [RBP + -0x510]
MOV RDX,qword ptr [RBP + -0x448]
CALL 0x00169c00
MOV RAX,qword ptr [RBP + -0x510]
MOV EAX,dword ptr [RAX + 0x18]
AND EAX,0x100
CMP EAX,0x0
JNZ 0x001699d2
JMP 0x001698e0
LAB_001699d2:
JMP 0x001699d4
LAB_001699d4:
MOV RDI,qword ptr [RBP + -0x450]
ADD RDI,0x38
MOV RSI,qword ptr [RBP + -0x470]
ADD RSI,0x13
CALL 0x0016d2d0
MOV qword ptr [RBP + -0x460],RAX
CMP RAX,0x0
JNZ 0x00169a01
JMP 0x00169af3
LAB_00169a01:
CMP qword ptr [RBP + -0x510],0x0
JZ 0x00169a39
MOV RDI,qword ptr [RBP + -0x450]
ADD RDI,0x38
MOV RSI,qword ptr [RBP + -0x510]
MOV EDX,0x90
CALL 0x0016d370
MOV qword ptr [RBP + -0x510],RAX
CMP RAX,0x0
JNZ 0x00169a39
JMP 0x00169af3
LAB_00169a39:
MOV RAX,qword ptr [RBP + -0x510]
MOV qword ptr [RBP + -0x458],RAX
MOV RDI,qword ptr [RBP + -0x450]
ADD RDI,0x10
LEA RSI,[RBP + -0x460]
CALL 0x0015c390
CMP AL,0x0
JZ 0x00169a67
JMP 0x00169af3
LAB_00169a67:
JMP 0x001698e0
LAB_00169a6c:
MOV RDI,qword ptr [RBP + -0x468]
CALL 0x00126560
MOV RAX,qword ptr [RBP + -0x448]
AND RAX,0x2000
CMP RAX,0x0
JZ 0x00169aba
MOV RAX,qword ptr [RBP + -0x450]
MOV RDI,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x450]
MOV EAX,dword ptr [RAX + 0x18]
MOV ESI,EAX
MOV RAX,qword ptr [RBP + -0x450]
MOV EAX,dword ptr [RAX + 0x24]
MOV EDX,EAX
LEA RCX,[0x169cf0]
CALL 0x0016add0
LAB_00169aba:
MOV RAX,qword ptr [RBP + -0x450]
MOV RCX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x450]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x450]
MOV ECX,dword ptr [RAX + 0x18]
MOV RAX,qword ptr [RBP + -0x450]
MOV dword ptr [RAX + 0x8],ECX
MOV RAX,qword ptr [RBP + -0x450]
MOV qword ptr [RBP + -0x438],RAX
JMP 0x00169b56
LAB_00169af3:
MOV RDI,qword ptr [RBP + -0x450]
CALL 0x00169770
LAB_00169aff:
MOV RDI,qword ptr [RBP + -0x468]
CALL 0x00126560
LAB_00169b0b:
MOV RAX,qword ptr [RBP + -0x448]
AND RAX,0x18
CMP RAX,0x0
JZ 0x00169b49
MOV RAX,qword ptr [RBP + -0x440]
MOV qword ptr [RBP + -0x520],RAX
CALL 0x0015ea40
MOV RDX,qword ptr [RBP + -0x520]
MOV ECX,dword ptr [RAX]
MOV EDI,0xc
MOV ESI,0x4
MOV AL,0x0
CALL 0x00168f20
LAB_00169b49:
JMP 0x00169b4b
LAB_00169b4b:
MOV qword ptr [RBP + -0x438],0x0
LAB_00169b56:
MOV RAX,qword ptr [RBP + -0x438]
MOV qword ptr [RBP + -0x528],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00169b86
MOV RAX,qword ptr [RBP + -0x528]
ADD RSP,0x530
POP RBP
RET
LAB_00169b86:
CALL 0x00126360
|
int8 * my_dir(int8 param_1,ulong param_2)
{
int iVar1;
int8 uVar2;
char cVar3;
int *piVar4;
int4 *puVar5;
long in_FS_OFFSET;
int1 *local_518;
int1 local_510 [24];
uint local_4f8;
char *local_480;
dirent64 *local_478;
DIR *local_470;
long local_468;
int1 *local_460;
int8 *local_458;
ulong local_450;
int8 local_448;
int8 *local_440;
dirent64 local_438;
char local_218 [520];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_450 = param_2;
local_448 = param_1;
local_480 = (char *)directory_file_name(local_218,param_1);
local_470 = opendir(local_218);
if (local_470 == (DIR *)0x0) {
piVar4 = __errno_location();
iVar1 = *piVar4;
piVar4 = (int *)_my_thread_var();
*piVar4 = iVar1;
}
else {
local_458 = (int8 *)my_malloc(key_memory_MY_DIR,0x78,local_450 | 0x20);
if (local_458 != (int8 *)0x0) {
cVar3 = init_dynamic_array2(key_memory_MY_DIR,local_458 + 2,0x10,0,0x200,0x1000,local_450);
if (cVar3 == '\0') {
init_alloc_root(key_memory_MY_DIR,local_458 + 7,0x8000,0x8000,local_450);
local_478 = &local_438;
LAB_001698e0:
do {
do {
local_478 = readdir64(local_470);
if (local_478 == (dirent64 *)0x0) {
closedir(local_470);
if ((local_450 & 0x2000) != 0) {
my_qsort(local_458[2],*(int4 *)(local_458 + 3),
*(int4 *)((long)local_458 + 0x24),comp_names);
}
*local_458 = local_458[2];
*(int4 *)(local_458 + 1) = *(int4 *)(local_458 + 3);
local_440 = local_458;
goto LAB_00169b56;
}
local_518 = (int1 *)0x0;
} while ((local_478->d_name[0] == '.') &&
((local_478->d_name[1] == '\0' ||
((local_478->d_name[1] == '.' && (local_478->d_name[2] == '\0'))))));
if ((local_450 & 0x4000) != 0) {
local_518 = local_510;
memset(local_518,0,0x90);
stpcpy(local_480,local_478->d_name);
my_stat(local_218,local_518,local_450);
if ((local_4f8 & 0x100) == 0) goto LAB_001698e0;
}
local_468 = strdup_root(local_458 + 7,local_478->d_name);
if ((local_468 == 0) ||
((local_518 != (int1 *)0x0 &&
(local_518 = (int1 *)memdup_root(local_458 + 7,local_518,0x90),
local_518 == (int1 *)0x0)))) break;
local_460 = local_518;
cVar3 = insert_dynamic(local_458 + 2);
if (cVar3 != '\0') break;
} while( true );
}
my_dirend(local_458);
}
closedir(local_470);
}
uVar2 = local_448;
if ((local_450 & 0x18) != 0) {
puVar5 = (int4 *)_my_thread_var();
my_error(0xc,4,uVar2,*puVar5);
}
local_440 = (int8 *)0x0;
LAB_00169b56:
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_440;
}
|
|
3,449 | mysql_fetch_row | eloqsql/libmariadb/libmariadb/mariadb_lib.c | MYSQL_ROW STDCALL
mysql_fetch_row(MYSQL_RES *res)
{
if (!res)
return 0;
if (res->handle)
{
if (res->handle->status != MYSQL_STATUS_USE_RESULT &&
res->handle->status != MYSQL_STATUS_GET_RESULT)
return 0;
}
if (!res->data)
{ /* Unbufferred fetch */
if (!res->eof && res->handle)
{
if (!(res->handle->methods->db_read_one_row(res->handle,res->field_count,res->row, res->lengths)))
{
res->row_count++;
return(res->current_row=res->row);
}
res->eof=1;
res->handle->status=MYSQL_STATUS_READY;
/* Don't clear handle in mysql_free_results */
res->handle=0;
}
return((MYSQL_ROW) NULL);
}
{
MYSQL_ROW tmp;
if (!res->data_cursor)
{
return(res->current_row=(MYSQL_ROW) NULL);
}
tmp = res->data_cursor->data;
res->data_cursor = res->data_cursor->next;
return(res->current_row=tmp);
}
} | O3 | c | mysql_fetch_row:
testq %rdi, %rdi
je 0x1b449
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x78(%rdi), %rdi
testq %rdi, %rdi
je 0x1b428
movl 0x488(%rdi), %eax
decl %eax
cmpl $0x1, %eax
ja 0x1b49c
cmpq $0x0, 0x18(%rbx)
je 0x1b44c
movq 0x20(%rbx), %rax
testq %rax, %rax
je 0x1b494
movq (%rax), %rcx
movq 0x8(%rax), %rax
movq %rcx, 0x20(%rbx)
movq %rax, 0x68(%rbx)
jmp 0x1b49e
xorl %eax, %eax
retq
xorl %eax, %eax
testq %rdi, %rdi
je 0x1b49e
cmpb $0x0, 0x80(%rbx)
jne 0x1b49e
movq 0x4d0(%rdi), %rax
movl 0x8(%rbx), %esi
movq 0x60(%rbx), %rdx
movq 0x70(%rbx), %rcx
callq *0x30(%rax)
testl %eax, %eax
je 0x1b4a5
movb $0x1, 0x80(%rbx)
movq 0x78(%rbx), %rax
movl $0x0, 0x488(%rax)
movq $0x0, 0x78(%rbx)
jmp 0x1b49c
movq $0x0, 0x68(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
incq (%rbx)
movq 0x60(%rbx), %rax
jmp 0x1b443
| mysql_fetch_row:
test rdi, rdi
jz short loc_1B449
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
mov rdi, [rdi+78h]
test rdi, rdi
jz short loc_1B428
mov eax, [rdi+488h]
dec eax
cmp eax, 1
ja short loc_1B49C
loc_1B428:
cmp qword ptr [rbx+18h], 0
jz short loc_1B44C
mov rax, [rbx+20h]
test rax, rax
jz short loc_1B494
mov rcx, [rax]
mov rax, [rax+8]
mov [rbx+20h], rcx
loc_1B443:
mov [rbx+68h], rax
jmp short loc_1B49E
loc_1B449:
xor eax, eax
retn
loc_1B44C:
xor eax, eax
test rdi, rdi
jz short loc_1B49E
cmp byte ptr [rbx+80h], 0
jnz short loc_1B49E
mov rax, [rdi+4D0h]
mov esi, [rbx+8]
mov rdx, [rbx+60h]
mov rcx, [rbx+70h]
call qword ptr [rax+30h]
test eax, eax
jz short loc_1B4A5
mov byte ptr [rbx+80h], 1
mov rax, [rbx+78h]
mov dword ptr [rax+488h], 0
mov qword ptr [rbx+78h], 0
jmp short loc_1B49C
loc_1B494:
mov qword ptr [rbx+68h], 0
loc_1B49C:
xor eax, eax
loc_1B49E:
add rsp, 8
pop rbx
pop rbp
retn
loc_1B4A5:
inc qword ptr [rbx]
mov rax, [rbx+60h]
jmp short loc_1B443
| long long mysql_fetch_row(long long a1)
{
long long v2; // rdi
long long *v3; // rax
long long v4; // rcx
long long result; // rax
if ( !a1 )
return 0LL;
v2 = *(_QWORD *)(a1 + 120);
if ( v2 && (unsigned int)(*(_DWORD *)(v2 + 1160) - 1) > 1 )
return 0LL;
if ( *(_QWORD *)(a1 + 24) )
{
v3 = *(long long **)(a1 + 32);
if ( v3 )
{
v4 = *v3;
result = v3[1];
*(_QWORD *)(a1 + 32) = v4;
LABEL_7:
*(_QWORD *)(a1 + 104) = result;
return result;
}
*(_QWORD *)(a1 + 104) = 0LL;
return 0LL;
}
result = 0LL;
if ( v2 && !*(_BYTE *)(a1 + 128) )
{
if ( !(*(unsigned int ( **)(long long, _QWORD, _QWORD, _QWORD))(*(_QWORD *)(v2 + 1232) + 48LL))(
v2,
*(unsigned int *)(a1 + 8),
*(_QWORD *)(a1 + 96),
*(_QWORD *)(a1 + 112)) )
{
++*(_QWORD *)a1;
result = *(_QWORD *)(a1 + 96);
goto LABEL_7;
}
*(_BYTE *)(a1 + 128) = 1;
*(_DWORD *)(*(_QWORD *)(a1 + 120) + 1160LL) = 0;
*(_QWORD *)(a1 + 120) = 0LL;
return 0LL;
}
return result;
}
| mysql_fetch_row:
TEST RDI,RDI
JZ 0x0011b449
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x78]
TEST RDI,RDI
JZ 0x0011b428
MOV EAX,dword ptr [RDI + 0x488]
DEC EAX
CMP EAX,0x1
JA 0x0011b49c
LAB_0011b428:
CMP qword ptr [RBX + 0x18],0x0
JZ 0x0011b44c
MOV RAX,qword ptr [RBX + 0x20]
TEST RAX,RAX
JZ 0x0011b494
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBX + 0x20],RCX
LAB_0011b443:
MOV qword ptr [RBX + 0x68],RAX
JMP 0x0011b49e
LAB_0011b449:
XOR EAX,EAX
RET
LAB_0011b44c:
XOR EAX,EAX
TEST RDI,RDI
JZ 0x0011b49e
CMP byte ptr [RBX + 0x80],0x0
JNZ 0x0011b49e
MOV RAX,qword ptr [RDI + 0x4d0]
MOV ESI,dword ptr [RBX + 0x8]
MOV RDX,qword ptr [RBX + 0x60]
MOV RCX,qword ptr [RBX + 0x70]
CALL qword ptr [RAX + 0x30]
TEST EAX,EAX
JZ 0x0011b4a5
MOV byte ptr [RBX + 0x80],0x1
MOV RAX,qword ptr [RBX + 0x78]
MOV dword ptr [RAX + 0x488],0x0
MOV qword ptr [RBX + 0x78],0x0
JMP 0x0011b49c
LAB_0011b494:
MOV qword ptr [RBX + 0x68],0x0
LAB_0011b49c:
XOR EAX,EAX
LAB_0011b49e:
ADD RSP,0x8
POP RBX
POP RBP
RET
LAB_0011b4a5:
INC qword ptr [RBX]
MOV RAX,qword ptr [RBX + 0x60]
JMP 0x0011b443
|
long mysql_fetch_row(long *param_1)
{
long *plVar1;
int iVar2;
long lVar3;
if (param_1 == (long *)0x0) {
return 0;
}
lVar3 = param_1[0xf];
if ((lVar3 == 0) || (*(int *)(lVar3 + 0x488) - 1U < 2)) {
if (param_1[3] == 0) {
if (lVar3 == 0) {
return 0;
}
if ((char)param_1[0x10] != '\0') {
return 0;
}
iVar2 = (**(code **)(*(long *)(lVar3 + 0x4d0) + 0x30))
(lVar3,(int)param_1[1],param_1[0xc],param_1[0xe]);
if (iVar2 == 0) {
*param_1 = *param_1 + 1;
lVar3 = param_1[0xc];
goto LAB_0011b443;
}
*(int1 *)(param_1 + 0x10) = 1;
*(int4 *)(param_1[0xf] + 0x488) = 0;
param_1[0xf] = 0;
}
else {
plVar1 = (long *)param_1[4];
if (plVar1 != (long *)0x0) {
lVar3 = plVar1[1];
param_1[4] = *plVar1;
LAB_0011b443:
param_1[0xd] = lVar3;
return lVar3;
}
param_1[0xd] = 0;
}
}
return 0;
}
|
|
3,450 | my_b_cache_read | eloqsql/mysys/mf_iocache.c | int _my_b_cache_read(IO_CACHE *info, uchar *Buffer, size_t Count)
{
size_t length= 0, diff_length, left_length= 0, max_length;
my_off_t pos_in_file;
DBUG_ENTER("_my_b_cache_read");
/* pos_in_file always point on where info->buffer was read */
pos_in_file=info->pos_in_file+ (size_t) (info->read_end - info->buffer);
/*
Whenever a function which operates on IO_CACHE flushes/writes
some part of the IO_CACHE to disk it will set the property
"seek_not_done" to indicate this to other functions operating
on the IO_CACHE.
*/
if (info->seek_not_done)
{
if ((mysql_file_seek(info->file, pos_in_file, MY_SEEK_SET, MYF(0))
!= MY_FILEPOS_ERROR))
{
/* No error, reset seek_not_done flag. */
info->seek_not_done= 0;
if (info->next_file_user)
{
IO_CACHE *c;
for (c= info->next_file_user;
c!= info;
c= c->next_file_user)
{
c->seek_not_done= 1;
}
}
}
else
{
/*
If the seek failed and the error number is ESPIPE, it is because
info->file is a pipe or socket or FIFO. We never should have tried
to seek on that. See Bugs#25807 and #22828 for more info.
*/
DBUG_ASSERT(my_errno != ESPIPE);
info->error= -1;
DBUG_RETURN(1);
}
}
/*
Calculate, how much we are within a IO_SIZE block. Ideally this
should be zero.
*/
diff_length= (size_t) (pos_in_file & (IO_SIZE-1));
/*
If more than a block plus the rest of the current block is wanted,
we do read directly, without filling the buffer.
*/
if (Count >= (size_t) (IO_SIZE+(IO_SIZE-diff_length)))
{ /* Fill first intern buffer */
size_t read_length;
if (info->end_of_file <= pos_in_file)
{
/* End of file. Return, what we did copy from the buffer. */
info->error= (int) left_length;
info->seek_not_done=1;
DBUG_RETURN(1);
}
/*
Crop the wanted count to a multiple of IO_SIZE and subtract,
what we did already read from a block. That way, the read will
end aligned with a block.
*/
length= IO_ROUND_DN(Count) - diff_length;
if ((read_length= mysql_file_read(info->file,Buffer, length, info->myflags))
!= length)
{
/*
If we didn't get, what we wanted, we either return -1 for a read
error, or (it's end of file), how much we got in total.
*/
info->error= (read_length == (size_t) -1 ? -1 :
(int) (read_length+left_length));
info->seek_not_done=1;
DBUG_RETURN(1);
}
Count-=length;
Buffer+=length;
pos_in_file+=length;
left_length+=length;
diff_length=0;
}
/*
At this point, we want less than one and a partial block.
We will read a full cache, minus the number of bytes, we are
within a block already. So we will reach new alignment.
*/
max_length= info->read_length-diff_length;
/* We will not read past end of file. */
if (info->type != READ_FIFO &&
max_length > (info->end_of_file - pos_in_file))
max_length= (size_t) (info->end_of_file - pos_in_file);
/*
If there is nothing left to read,
we either are done, or we failed to fulfill the request.
Otherwise, we read max_length into the cache.
*/
if (!max_length)
{
if (Count)
{
/* We couldn't fulfil the request. Return, how much we got. */
info->error= (int) left_length;
DBUG_RETURN(1);
}
else
{
info->error= 0;
if (length == 0) /* nothing was read */
DBUG_RETURN(0); /* EOF */
length= 0; /* non-zero size read was done */
}
}
else
{
if (info->next_file_user)
{
IO_CACHE *c;
for (c= info->next_file_user;
c!= info;
c= c->next_file_user)
{
c->seek_not_done= 1;
}
}
if ((length= mysql_file_read(info->file,info->buffer, max_length,
info->myflags)) < Count ||
length == (size_t) -1)
{
/*
We got an read error, or less than requested (end of file).
If not a read error, copy, what we got.
*/
if (length != (size_t) -1)
memcpy(Buffer, info->buffer, length);
info->pos_in_file= pos_in_file;
/* For a read error, return -1, otherwise, what we got in total. */
info->error= length == (size_t) -1 ? -1 : (int) (length+left_length);
info->read_pos=info->read_end=info->buffer;
info->seek_not_done=1;
DBUG_RETURN(1);
}
}
/*
Count is the remaining number of bytes requested.
length is the amount of data in the cache.
Read Count bytes from the cache.
*/
info->read_pos=info->buffer+Count;
info->read_end=info->buffer+length;
info->pos_in_file=pos_in_file;
if (Count)
memcpy(Buffer, info->buffer, Count);
DBUG_RETURN(0);
} | O3 | c | my_b_cache_read:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdx, %r13
movq %rsi, %r12
movq %rdi, %rbx
movq 0x18(%rdi), %r14
subq 0x20(%rdi), %r14
addq (%rdi), %r14
cmpl $0x0, 0xe0(%rdi)
je 0x51c89
movl 0xd4(%rbx), %r15d
leaq 0x2de238(%rip), %rax # 0x32fe50
movq (%rax), %rax
leaq -0xa0(%rbp), %rdi
movl %r15d, %esi
movl $0x8, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x51ed3
movl %r15d, %edi
movq %r14, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x5af50
cmpq $-0x1, %rax
je 0x51e39
movl $0x0, 0xe0(%rbx)
movq 0xd8(%rbx), %rax
testq %rax, %rax
sete %cl
cmpq %rbx, %rax
sete %dl
orb %cl, %dl
jne 0x51c89
movl $0x1, 0xe0(%rax)
movq 0xd8(%rax), %rax
cmpq %rbx, %rax
jne 0x51c73
movl %r14d, %eax
andl $0xfff, %eax # imm = 0xFFF
movl $0x2000, %ecx # imm = 0x2000
subq %rax, %rcx
cmpq %r13, %rcx
jbe 0x51db6
xorl %ecx, %ecx
movq 0xf0(%rbx), %r15
subq %rax, %r15
cmpl $0x4, 0xb0(%rbx)
je 0x51cc5
movq 0x8(%rbx), %rax
subq %r14, %rax
cmpq %rax, %r15
cmovaeq %rax, %r15
testq %r15, %r15
je 0x51e52
movq %rcx, -0x48(%rbp)
movq %r13, -0x38(%rbp)
movq %r12, -0x40(%rbp)
movq 0xd8(%rbx), %rax
testq %rax, %rax
sete %cl
cmpq %rbx, %rax
sete %dl
orb %cl, %dl
jne 0x51d07
movl $0x1, 0xe0(%rax)
movq 0xd8(%rax), %rax
cmpq %rbx, %rax
jne 0x51cf1
movl 0xd4(%rbx), %r13d
movq 0x20(%rbx), %r12
movq 0xf8(%rbx), %rax
movq %rax, -0x30(%rbp)
leaq 0x2de12c(%rip), %rax # 0x32fe50
movq (%rax), %rax
leaq -0xa0(%rbp), %rdi
movl %r13d, %esi
movl $0x6, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x51eff
movl %r13d, %edi
movq %r12, %rsi
movq %r15, %rdx
movq -0x30(%rbp), %rcx
callq 0x5ad50
movq %rax, %r12
movq -0x38(%rbp), %rdx
cmpq %rdx, %r12
setae %al
cmpq $-0x1, %r12
setne %cl
testb %cl, %al
jne 0x51e5f
cmpq $-0x1, %r12
je 0x51d89
movq 0x20(%rbx), %rsi
movq -0x40(%rbp), %rdi
movq %r12, %rdx
callq 0x282c0
movq -0x48(%rbp), %rcx
addl %r12d, %ecx
cmpq $-0x1, %r12
movq %r14, (%rbx)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmovnel %ecx, %eax
movl %eax, 0xe4(%rbx)
movq 0x20(%rbx), %rax
movq %rax, 0x18(%rbx)
movq %rax, 0x10(%rbx)
jmp 0x51e8e
cmpq %r14, 0x8(%rbx)
jbe 0x51e45
movq %r13, -0x38(%rbp)
movl %r13d, %r15d
andl $0xfffff000, %r15d # imm = 0xFFFFF000
subq %rax, %r15
movl 0xd4(%rbx), %r13d
movq 0xf8(%rbx), %rax
movq %rax, -0x30(%rbp)
leaq 0x2de066(%rip), %rax # 0x32fe50
movq (%rax), %rax
leaq -0xa0(%rbp), %rdi
movl %r13d, %esi
movl $0x6, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x51f72
movl %r13d, %edi
movq %r12, %rsi
movq %r15, %rdx
movq -0x30(%rbp), %rcx
callq 0x5ad50
cmpq %r15, %rax
movq -0x38(%rbp), %r13
jne 0x51e88
movq %r15, %rcx
subq %r15, %r13
addq %r15, %r12
addq %r15, %r14
xorl %eax, %eax
jmp 0x51ca4
movl $0xffffffff, 0xe4(%rbx) # imm = 0xFFFFFFFF
jmp 0x51e98
movq $0x1, 0xe0(%rbx)
jmp 0x51e98
testq %r13, %r13
je 0x51eb0
movl %ecx, 0xe4(%rbx)
jmp 0x51e98
movq 0x20(%rbx), %rsi
leaq (%rsi,%rdx), %rax
movq %rax, 0x10(%rbx)
addq %rsi, %r12
movq %r12, 0x18(%rbx)
movq %r14, (%rbx)
xorl %r15d, %r15d
testq %rdx, %rdx
je 0x51e9e
movq -0x40(%rbp), %rdi
callq 0x282c0
jmp 0x51e9e
movl %eax, 0xe4(%rbx)
movl $0x1, 0xe0(%rbx)
movl $0x1, %r15d
movl %r15d, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x0, 0xe4(%rbx)
xorl %r15d, %r15d
testq %rcx, %rcx
je 0x51e9e
movq 0x20(%rbx), %rax
movq %rax, 0x10(%rbx)
movq %rax, 0x18(%rbx)
movq %r14, (%rbx)
jmp 0x51e9e
movq %r13, -0x38(%rbp)
movq %r12, %r13
leaq -0x58(%rbp), %r12
movq %rax, %rdi
movl %r15d, %esi
movq %r14, %rdx
movq %r12, %rcx
callq 0x29e49
movq (%r12), %rax
movq %r13, %r12
movq -0x38(%rbp), %r13
jmp 0x51c48
movq %rax, %rcx
leaq 0x2ddf47(%rip), %rax # 0x32fe50
movq (%rax), %rax
leaq 0x40b60(%rip), %rdx # 0x92a73
movq %rcx, -0x50(%rbp)
movq %rcx, %rdi
movq %r15, %rsi
movl $0x2eb, %ecx # imm = 0x2EB
callq *0x210(%rax)
movl %r13d, %edi
movq %r12, %rsi
movq %r15, %rdx
movq -0x30(%rbp), %r13
movq %r13, %rcx
callq 0x5ad50
movq %rax, %r12
xorl %esi, %esi
testq %rax, %rax
cmovneq %rsi, %r15
cmpq $-0x1, %rax
cmovneq %rax, %rsi
testb $0x6, %r13b
cmovneq %r15, %rsi
leaq 0x2ddef0(%rip), %rax # 0x32fe50
movq (%rax), %rax
movq -0x50(%rbp), %rdi
callq *0x218(%rax)
jmp 0x51d5a
movq %rax, %rcx
leaq 0x2dded4(%rip), %rax # 0x32fe50
movq (%rax), %rax
leaq 0x40aed(%rip), %rdx # 0x92a73
movq %rcx, -0x48(%rbp)
movq %rcx, %rdi
movq %r15, %rsi
movl $0x2ab, %ecx # imm = 0x2AB
callq *0x210(%rax)
movl %r13d, %edi
movq %r12, -0x40(%rbp)
movq %r12, %rsi
movq %r15, %rdx
movq -0x30(%rbp), %r12
movq %r12, %rcx
callq 0x5ad50
movq %rax, %r13
xorl %esi, %esi
testq %rax, %rax
movl $0x0, %eax
cmoveq %r15, %rax
cmpq $-0x1, %r13
cmovneq %r13, %rsi
testb $0x6, %r12b
cmovneq %rax, %rsi
leaq 0x2dde74(%rip), %rax # 0x32fe50
movq (%rax), %rax
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %r12
callq *0x218(%rax)
movq %r13, %rax
jmp 0x51e1d
| _my_b_cache_read:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 78h
mov r13, rdx
mov r12, rsi
mov rbx, rdi
mov r14, [rdi+18h]
sub r14, [rdi+20h]
add r14, [rdi]
cmp dword ptr [rdi+0E0h], 0
jz short loc_51C89
mov r15d, [rbx+0D4h]
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_A0]
mov esi, r15d
mov edx, 8
call qword ptr [rax+158h]
test rax, rax
jnz loc_51ED3
mov edi, r15d
mov rsi, r14
xor edx, edx
xor ecx, ecx
call my_seek
loc_51C48:
cmp rax, 0FFFFFFFFFFFFFFFFh
jz loc_51E39
mov dword ptr [rbx+0E0h], 0
mov rax, [rbx+0D8h]
test rax, rax
setz cl
cmp rax, rbx
setz dl
or dl, cl
jnz short loc_51C89
loc_51C73:
mov dword ptr [rax+0E0h], 1
mov rax, [rax+0D8h]
cmp rax, rbx
jnz short loc_51C73
loc_51C89:
mov eax, r14d
and eax, 0FFFh
mov ecx, 2000h
sub rcx, rax
cmp rcx, r13
jbe loc_51DB6
xor ecx, ecx
loc_51CA4:
mov r15, [rbx+0F0h]
sub r15, rax
cmp dword ptr [rbx+0B0h], 4
jz short loc_51CC5
mov rax, [rbx+8]
sub rax, r14
cmp r15, rax
cmovnb r15, rax
loc_51CC5:
test r15, r15
jz loc_51E52
mov [rbp+var_48], rcx
mov [rbp+var_38], r13
mov [rbp+var_40], r12
mov rax, [rbx+0D8h]
test rax, rax
setz cl
cmp rax, rbx
setz dl
or dl, cl
jnz short loc_51D07
loc_51CF1:
mov dword ptr [rax+0E0h], 1
mov rax, [rax+0D8h]
cmp rax, rbx
jnz short loc_51CF1
loc_51D07:
mov r13d, [rbx+0D4h]
mov r12, [rbx+20h]
mov rax, [rbx+0F8h]
mov [rbp+var_30], rax
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_A0]
mov esi, r13d
mov edx, 6
call qword ptr [rax+158h]
test rax, rax
jnz loc_51EFF
mov edi, r13d
mov rsi, r12
mov rdx, r15
mov rcx, [rbp+var_30]
call my_read
mov r12, rax
loc_51D5A:
mov rdx, [rbp+var_38]
cmp r12, rdx
setnb al
cmp r12, 0FFFFFFFFFFFFFFFFh
setnz cl
test al, cl
jnz loc_51E5F
cmp r12, 0FFFFFFFFFFFFFFFFh
jz short loc_51D89
mov rsi, [rbx+20h]
mov rdi, [rbp+var_40]
mov rdx, r12
call _memcpy
loc_51D89:
mov rcx, [rbp+var_48]
add ecx, r12d
cmp r12, 0FFFFFFFFFFFFFFFFh
mov [rbx], r14
mov eax, 0FFFFFFFFh
cmovnz eax, ecx
mov [rbx+0E4h], eax
mov rax, [rbx+20h]
mov [rbx+18h], rax
mov [rbx+10h], rax
jmp loc_51E8E
loc_51DB6:
cmp [rbx+8], r14
jbe loc_51E45
mov [rbp+var_38], r13
mov r15d, r13d
and r15d, 0FFFFF000h
sub r15, rax
mov r13d, [rbx+0D4h]
mov rax, [rbx+0F8h]
mov [rbp+var_30], rax
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_A0]
mov esi, r13d
mov edx, 6
call qword ptr [rax+158h]
test rax, rax
jnz loc_51F72
mov edi, r13d
mov rsi, r12
mov rdx, r15
mov rcx, [rbp+var_30]
call my_read
loc_51E1D:
cmp rax, r15
mov r13, [rbp+var_38]
jnz short loc_51E88
mov rcx, r15
sub r13, r15
add r12, r15
add r14, r15
xor eax, eax
jmp loc_51CA4
loc_51E39:
mov dword ptr [rbx+0E4h], 0FFFFFFFFh
jmp short loc_51E98
loc_51E45:
mov qword ptr [rbx+0E0h], 1
jmp short loc_51E98
loc_51E52:
test r13, r13
jz short loc_51EB0
mov [rbx+0E4h], ecx
jmp short loc_51E98
loc_51E5F:
mov rsi, [rbx+20h]
lea rax, [rsi+rdx]
mov [rbx+10h], rax
add r12, rsi
mov [rbx+18h], r12
mov [rbx], r14
xor r15d, r15d
test rdx, rdx
jz short loc_51E9E
mov rdi, [rbp+var_40]
call _memcpy
jmp short loc_51E9E
loc_51E88:
mov [rbx+0E4h], eax
loc_51E8E:
mov dword ptr [rbx+0E0h], 1
loc_51E98:
mov r15d, 1
loc_51E9E:
mov eax, r15d
add rsp, 78h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_51EB0:
mov dword ptr [rbx+0E4h], 0
xor r15d, r15d
test rcx, rcx
jz short loc_51E9E
mov rax, [rbx+20h]
mov [rbx+10h], rax
mov [rbx+18h], rax
mov [rbx], r14
jmp short loc_51E9E
loc_51ED3:
mov [rbp+var_38], r13
mov r13, r12
lea r12, [rbp+var_58]
mov rdi, rax
mov esi, r15d
mov rdx, r14
mov rcx, r12
call _my_b_cache_read_cold_1
mov rax, [r12]
mov r12, r13
mov r13, [rbp+var_38]
jmp loc_51C48
loc_51EFF:
mov rcx, rax
lea rax, PSI_server
mov rax, [rax]
lea rdx, aWorkspaceLlm4b_9; "/workspace/llm4binary/github2025/eloqsq"...
mov [rbp+var_50], rcx
mov rdi, rcx
mov rsi, r15
mov ecx, 2EBh
call qword ptr [rax+210h]
mov edi, r13d
mov rsi, r12
mov rdx, r15
mov r13, [rbp+var_30]
mov rcx, r13
call my_read
mov r12, rax
xor esi, esi
test rax, rax
cmovnz r15, rsi
cmp rax, 0FFFFFFFFFFFFFFFFh
cmovnz rsi, rax
test r13b, 6
cmovnz rsi, r15
lea rax, PSI_server
mov rax, [rax]
mov rdi, [rbp+var_50]
call qword ptr [rax+218h]
jmp loc_51D5A
loc_51F72:
mov rcx, rax
lea rax, PSI_server
mov rax, [rax]
lea rdx, aWorkspaceLlm4b_9; "/workspace/llm4binary/github2025/eloqsq"...
mov [rbp+var_48], rcx
mov rdi, rcx
mov rsi, r15
mov ecx, 2ABh
call qword ptr [rax+210h]
mov edi, r13d
mov [rbp+var_40], r12
mov rsi, r12
mov rdx, r15
mov r12, [rbp+var_30]
mov rcx, r12
call my_read
mov r13, rax
xor esi, esi
test rax, rax
mov eax, 0
cmovz rax, r15
cmp r13, 0FFFFFFFFFFFFFFFFh
cmovnz rsi, r13
test r12b, 6
cmovnz rsi, rax
lea rax, PSI_server
mov rax, [rax]
mov rdi, [rbp+var_48]
mov r12, [rbp+var_40]
call qword ptr [rax+218h]
mov rax, r13
jmp loc_51E1D
| long long my_b_cache_read(long long a1, long long a2, unsigned long long a3)
{
long long v4; // r12
unsigned long long v5; // r14
unsigned int v6; // r15d
long long v7; // rax
long long v8; // rax
long long v9; // rax
unsigned long long v10; // rax
long long v11; // rcx
unsigned long long v12; // r15
long long v13; // rax
unsigned int v14; // r13d
long long v15; // r12
long long v16; // rax
unsigned long long v17; // r12
unsigned long long v18; // rdx
int v19; // ecx
int v20; // eax
long long v21; // rax
unsigned long long v22; // r15
unsigned int v23; // r13d
long long v24; // rax
long long v25; // rax
long long v26; // rsi
unsigned int v27; // r15d
long long v29; // rax
char v30; // r12
long long v31; // r13
long long v32; // rsi
long long v33; // rax
_BYTE v34[72]; // [rsp+0h] [rbp-A0h] BYREF
long long v35; // [rsp+48h] [rbp-58h] BYREF
long long v36; // [rsp+50h] [rbp-50h]
long long v37; // [rsp+58h] [rbp-48h]
long long v38; // [rsp+60h] [rbp-40h]
unsigned long long v39; // [rsp+68h] [rbp-38h]
long long v40; // [rsp+70h] [rbp-30h]
v4 = a2;
v5 = *(_QWORD *)a1 + *(_QWORD *)(a1 + 24) - *(_QWORD *)(a1 + 32);
if ( *(_DWORD *)(a1 + 224) )
{
v6 = *(_DWORD *)(a1 + 212);
v7 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v34, v6, 8LL);
if ( v7 )
{
v39 = a3;
my_b_cache_read_cold_1(v7, v6, v5, &v35);
v8 = v35;
a3 = v39;
}
else
{
v8 = my_seek(v6, v5, 0LL, 0LL);
}
if ( v8 == -1 )
{
*(_DWORD *)(a1 + 228) = -1;
return 1;
}
*(_DWORD *)(a1 + 224) = 0;
v9 = *(_QWORD *)(a1 + 216);
if ( v9 != 0 && v9 != a1 )
{
do
{
*(_DWORD *)(v9 + 224) = 1;
v9 = *(_QWORD *)(v9 + 216);
}
while ( v9 != a1 );
}
}
v10 = v5 & 0xFFF;
if ( 0x2000 - v10 <= a3 )
{
if ( *(_QWORD *)(a1 + 8) <= v5 )
{
*(_QWORD *)(a1 + 224) = 1LL;
return 1;
}
v39 = a3;
v22 = ((unsigned int)a3 & 0xFFFFF000) - v10;
v23 = *(_DWORD *)(a1 + 212);
v40 = *(_QWORD *)(a1 + 248);
v24 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v34, v23, 6LL);
if ( v24 )
{
v37 = v24;
((void ( *)(long long, unsigned long long, const char *, long long))PSI_server[66])(
v24,
v22,
"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",
683LL);
v38 = a2;
v30 = v40;
v31 = my_read(v23, a2, v22, v40);
v32 = 0LL;
v33 = 0LL;
if ( !v31 )
v33 = v22;
if ( v31 != -1 )
v32 = v31;
if ( (v30 & 6) != 0 )
v32 = v33;
v4 = v38;
((void ( *)(long long, long long))PSI_server[67])(v37, v32);
v25 = v31;
}
else
{
v25 = my_read(v23, a2, v22, v40);
}
if ( v25 != v22 )
{
*(_DWORD *)(a1 + 228) = v25;
LABEL_35:
*(_DWORD *)(a1 + 224) = 1;
return 1;
}
v11 = v22;
a3 = v39 - v22;
v4 += v22;
v5 += v22;
v10 = 0LL;
}
else
{
v11 = 0LL;
}
v12 = *(_QWORD *)(a1 + 240) - v10;
if ( *(_DWORD *)(a1 + 176) != 4 && v12 >= *(_QWORD *)(a1 + 8) - v5 )
v12 = *(_QWORD *)(a1 + 8) - v5;
if ( !v12 )
{
if ( !a3 )
{
*(_DWORD *)(a1 + 228) = 0;
v27 = 0;
if ( v11 )
{
v29 = *(_QWORD *)(a1 + 32);
*(_QWORD *)(a1 + 16) = v29;
*(_QWORD *)(a1 + 24) = v29;
*(_QWORD *)a1 = v5;
}
return v27;
}
*(_DWORD *)(a1 + 228) = v11;
return 1;
}
v37 = v11;
v39 = a3;
v38 = v4;
v13 = *(_QWORD *)(a1 + 216);
if ( v13 != 0 && v13 != a1 )
{
do
{
*(_DWORD *)(v13 + 224) = 1;
v13 = *(_QWORD *)(v13 + 216);
}
while ( v13 != a1 );
}
v14 = *(_DWORD *)(a1 + 212);
v15 = *(_QWORD *)(a1 + 32);
v40 = *(_QWORD *)(a1 + 248);
v16 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v34, v14, 6LL);
if ( v16 )
{
v36 = v16;
((void ( *)(long long, unsigned long long, const char *, long long))PSI_server[66])(
v16,
v12,
"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",
747LL);
v17 = my_read(v14, v15, v12, v40);
((void ( *)(long long))PSI_server[67])(v36);
}
else
{
v17 = my_read(v14, v15, v12, v40);
}
v18 = v39;
if ( v17 == -1LL || v17 < v39 )
{
if ( v17 != -1LL )
memcpy(v38, *(_QWORD *)(a1 + 32), v17);
v19 = v17 + v37;
*(_QWORD *)a1 = v5;
v20 = -1;
if ( v17 != -1LL )
v20 = v19;
*(_DWORD *)(a1 + 228) = v20;
v21 = *(_QWORD *)(a1 + 32);
*(_QWORD *)(a1 + 24) = v21;
*(_QWORD *)(a1 + 16) = v21;
goto LABEL_35;
}
v26 = *(_QWORD *)(a1 + 32);
*(_QWORD *)(a1 + 16) = v26 + v39;
*(_QWORD *)(a1 + 24) = v26 + v17;
*(_QWORD *)a1 = v5;
v27 = 0;
if ( v18 )
memcpy(v38, v26, v18);
return v27;
}
| _my_b_cache_read:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x78
MOV R13,RDX
MOV R12,RSI
MOV RBX,RDI
MOV R14,qword ptr [RDI + 0x18]
SUB R14,qword ptr [RDI + 0x20]
ADD R14,qword ptr [RDI]
CMP dword ptr [RDI + 0xe0],0x0
JZ 0x00151c89
MOV R15D,dword ptr [RBX + 0xd4]
LEA RAX,[0x42fe50]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0xa0]
MOV ESI,R15D
MOV EDX,0x8
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x00151ed3
MOV EDI,R15D
MOV RSI,R14
XOR EDX,EDX
XOR ECX,ECX
CALL 0x0015af50
LAB_00151c48:
CMP RAX,-0x1
JZ 0x00151e39
MOV dword ptr [RBX + 0xe0],0x0
MOV RAX,qword ptr [RBX + 0xd8]
TEST RAX,RAX
SETZ CL
CMP RAX,RBX
SETZ DL
OR DL,CL
JNZ 0x00151c89
LAB_00151c73:
MOV dword ptr [RAX + 0xe0],0x1
MOV RAX,qword ptr [RAX + 0xd8]
CMP RAX,RBX
JNZ 0x00151c73
LAB_00151c89:
MOV EAX,R14D
AND EAX,0xfff
MOV ECX,0x2000
SUB RCX,RAX
CMP RCX,R13
JBE 0x00151db6
XOR ECX,ECX
LAB_00151ca4:
MOV R15,qword ptr [RBX + 0xf0]
SUB R15,RAX
CMP dword ptr [RBX + 0xb0],0x4
JZ 0x00151cc5
MOV RAX,qword ptr [RBX + 0x8]
SUB RAX,R14
CMP R15,RAX
CMOVNC R15,RAX
LAB_00151cc5:
TEST R15,R15
JZ 0x00151e52
MOV qword ptr [RBP + -0x48],RCX
MOV qword ptr [RBP + -0x38],R13
MOV qword ptr [RBP + -0x40],R12
MOV RAX,qword ptr [RBX + 0xd8]
TEST RAX,RAX
SETZ CL
CMP RAX,RBX
SETZ DL
OR DL,CL
JNZ 0x00151d07
LAB_00151cf1:
MOV dword ptr [RAX + 0xe0],0x1
MOV RAX,qword ptr [RAX + 0xd8]
CMP RAX,RBX
JNZ 0x00151cf1
LAB_00151d07:
MOV R13D,dword ptr [RBX + 0xd4]
MOV R12,qword ptr [RBX + 0x20]
MOV RAX,qword ptr [RBX + 0xf8]
MOV qword ptr [RBP + -0x30],RAX
LEA RAX,[0x42fe50]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0xa0]
MOV ESI,R13D
MOV EDX,0x6
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x00151eff
MOV EDI,R13D
MOV RSI,R12
MOV RDX,R15
MOV RCX,qword ptr [RBP + -0x30]
CALL 0x0015ad50
MOV R12,RAX
LAB_00151d5a:
MOV RDX,qword ptr [RBP + -0x38]
CMP R12,RDX
SETNC AL
CMP R12,-0x1
SETNZ CL
TEST AL,CL
JNZ 0x00151e5f
CMP R12,-0x1
JZ 0x00151d89
MOV RSI,qword ptr [RBX + 0x20]
MOV RDI,qword ptr [RBP + -0x40]
MOV RDX,R12
CALL 0x001282c0
LAB_00151d89:
MOV RCX,qword ptr [RBP + -0x48]
ADD ECX,R12D
CMP R12,-0x1
MOV qword ptr [RBX],R14
MOV EAX,0xffffffff
CMOVNZ EAX,ECX
MOV dword ptr [RBX + 0xe4],EAX
MOV RAX,qword ptr [RBX + 0x20]
MOV qword ptr [RBX + 0x18],RAX
MOV qword ptr [RBX + 0x10],RAX
JMP 0x00151e8e
LAB_00151db6:
CMP qword ptr [RBX + 0x8],R14
JBE 0x00151e45
MOV qword ptr [RBP + -0x38],R13
MOV R15D,R13D
AND R15D,0xfffff000
SUB R15,RAX
MOV R13D,dword ptr [RBX + 0xd4]
MOV RAX,qword ptr [RBX + 0xf8]
MOV qword ptr [RBP + -0x30],RAX
LEA RAX,[0x42fe50]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0xa0]
MOV ESI,R13D
MOV EDX,0x6
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x00151f72
MOV EDI,R13D
MOV RSI,R12
MOV RDX,R15
MOV RCX,qword ptr [RBP + -0x30]
CALL 0x0015ad50
LAB_00151e1d:
CMP RAX,R15
MOV R13,qword ptr [RBP + -0x38]
JNZ 0x00151e88
MOV RCX,R15
SUB R13,R15
ADD R12,R15
ADD R14,R15
XOR EAX,EAX
JMP 0x00151ca4
LAB_00151e39:
MOV dword ptr [RBX + 0xe4],0xffffffff
JMP 0x00151e98
LAB_00151e45:
MOV qword ptr [RBX + 0xe0],0x1
JMP 0x00151e98
LAB_00151e52:
TEST R13,R13
JZ 0x00151eb0
MOV dword ptr [RBX + 0xe4],ECX
JMP 0x00151e98
LAB_00151e5f:
MOV RSI,qword ptr [RBX + 0x20]
LEA RAX,[RSI + RDX*0x1]
MOV qword ptr [RBX + 0x10],RAX
ADD R12,RSI
MOV qword ptr [RBX + 0x18],R12
MOV qword ptr [RBX],R14
XOR R15D,R15D
TEST RDX,RDX
JZ 0x00151e9e
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x001282c0
JMP 0x00151e9e
LAB_00151e88:
MOV dword ptr [RBX + 0xe4],EAX
LAB_00151e8e:
MOV dword ptr [RBX + 0xe0],0x1
LAB_00151e98:
MOV R15D,0x1
LAB_00151e9e:
MOV EAX,R15D
ADD RSP,0x78
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00151eb0:
MOV dword ptr [RBX + 0xe4],0x0
XOR R15D,R15D
TEST RCX,RCX
JZ 0x00151e9e
MOV RAX,qword ptr [RBX + 0x20]
MOV qword ptr [RBX + 0x10],RAX
MOV qword ptr [RBX + 0x18],RAX
MOV qword ptr [RBX],R14
JMP 0x00151e9e
LAB_00151ed3:
MOV qword ptr [RBP + -0x38],R13
MOV R13,R12
LEA R12,[RBP + -0x58]
MOV RDI,RAX
MOV ESI,R15D
MOV RDX,R14
MOV RCX,R12
CALL 0x00129e49
MOV RAX,qword ptr [R12]
MOV R12,R13
MOV R13,qword ptr [RBP + -0x38]
JMP 0x00151c48
LAB_00151eff:
MOV RCX,RAX
LEA RAX,[0x42fe50]
MOV RAX,qword ptr [RAX]
LEA RDX,[0x192a73]
MOV qword ptr [RBP + -0x50],RCX
MOV RDI,RCX
MOV RSI,R15
MOV ECX,0x2eb
CALL qword ptr [RAX + 0x210]
MOV EDI,R13D
MOV RSI,R12
MOV RDX,R15
MOV R13,qword ptr [RBP + -0x30]
MOV RCX,R13
CALL 0x0015ad50
MOV R12,RAX
XOR ESI,ESI
TEST RAX,RAX
CMOVNZ R15,RSI
CMP RAX,-0x1
CMOVNZ RSI,RAX
TEST R13B,0x6
CMOVNZ RSI,R15
LEA RAX,[0x42fe50]
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RBP + -0x50]
CALL qword ptr [RAX + 0x218]
JMP 0x00151d5a
LAB_00151f72:
MOV RCX,RAX
LEA RAX,[0x42fe50]
MOV RAX,qword ptr [RAX]
LEA RDX,[0x192a73]
MOV qword ptr [RBP + -0x48],RCX
MOV RDI,RCX
MOV RSI,R15
MOV ECX,0x2ab
CALL qword ptr [RAX + 0x210]
MOV EDI,R13D
MOV qword ptr [RBP + -0x40],R12
MOV RSI,R12
MOV RDX,R15
MOV R12,qword ptr [RBP + -0x30]
MOV RCX,R12
CALL 0x0015ad50
MOV R13,RAX
XOR ESI,ESI
TEST RAX,RAX
MOV EAX,0x0
CMOVZ RAX,R15
CMP R13,-0x1
CMOVNZ RSI,R13
TEST R12B,0x6
CMOVNZ RSI,RAX
LEA RAX,[0x42fe50]
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RBP + -0x48]
MOV R12,qword ptr [RBP + -0x40]
CALL qword ptr [RAX + 0x218]
MOV RAX,R13
JMP 0x00151e1d
|
int8 _my_b_cache_read(ulong *param_1,void *param_2,ulong param_3)
{
int4 uVar1;
void *__src;
ulong uVar2;
int iVar3;
long lVar4;
ulong *puVar5;
ulong uVar6;
long lVar7;
long lVar8;
ulong uVar9;
long lVar10;
ulong uVar11;
ulong uVar12;
int1 local_a8 [72];
long local_60;
long local_58;
long local_50;
void *local_48;
ulong local_40;
ulong local_38;
uVar11 = (param_1[3] - param_1[4]) + *param_1;
if ((int)param_1[0x1c] != 0) {
uVar1 = *(int4 *)((long)param_1 + 0xd4);
lVar4 = (**(code **)(PSI_server + 0x158))(local_a8,uVar1,8);
if (lVar4 == 0) {
local_60 = my_seek(uVar1,uVar11,0,0);
}
else {
local_40 = param_3;
_my_b_cache_read_cold_1(lVar4,uVar1,uVar11,&local_60);
param_3 = local_40;
}
if (local_60 == -1) {
*(int4 *)((long)param_1 + 0xe4) = 0xffffffff;
return 1;
}
*(int4 *)(param_1 + 0x1c) = 0;
puVar5 = (ulong *)param_1[0x1b];
if (puVar5 != param_1 && puVar5 != (ulong *)0x0) {
do {
*(int4 *)(puVar5 + 0x1c) = 1;
puVar5 = (ulong *)puVar5[0x1b];
} while (puVar5 != param_1);
}
}
uVar12 = (ulong)((uint)uVar11 & 0xfff);
if (param_3 < 0x2000 - uVar12) {
lVar4 = 0;
}
else {
if (param_1[1] <= uVar11) {
param_1[0x1c] = 1;
return 1;
}
lVar4 = ((uint)param_3 & 0xfffff000) - uVar12;
uVar1 = *(int4 *)((long)param_1 + 0xd4);
local_38 = param_1[0x1f];
local_40 = param_3;
local_50 = (**(code **)(PSI_server + 0x158))(local_a8,uVar1,6);
if (local_50 == 0) {
lVar7 = my_read(uVar1,param_2,lVar4,local_38);
}
else {
(**(code **)(PSI_server + 0x210))
(local_50,lVar4,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x2ab)
;
uVar12 = local_38;
local_48 = param_2;
lVar7 = my_read(uVar1,param_2,lVar4,local_38);
param_2 = local_48;
lVar8 = 0;
if (lVar7 == 0) {
lVar8 = lVar4;
}
lVar10 = 0;
if (lVar7 != -1) {
lVar10 = lVar7;
}
if ((uVar12 & 6) != 0) {
lVar10 = lVar8;
}
(**(code **)(PSI_server + 0x218))(local_50,lVar10);
}
if (lVar7 != lVar4) {
*(int *)((long)param_1 + 0xe4) = (int)lVar7;
goto LAB_00151e8e;
}
param_3 = local_40 - lVar4;
param_2 = (void *)((long)param_2 + lVar4);
uVar11 = uVar11 + lVar4;
uVar12 = 0;
}
uVar12 = param_1[0x1e] - uVar12;
if (((int)param_1[0x16] != 4) && (param_1[1] - uVar11 <= uVar12)) {
uVar12 = param_1[1] - uVar11;
}
if (uVar12 == 0) {
if (param_3 != 0) {
*(int *)((long)param_1 + 0xe4) = (int)lVar4;
return 1;
}
*(int4 *)((long)param_1 + 0xe4) = 0;
if (lVar4 != 0) {
param_1[2] = param_1[4];
param_1[3] = param_1[4];
*param_1 = uVar11;
return 0;
}
return 0;
}
puVar5 = (ulong *)param_1[0x1b];
if (puVar5 != param_1 && puVar5 != (ulong *)0x0) {
do {
*(int4 *)(puVar5 + 0x1c) = 1;
puVar5 = (ulong *)puVar5[0x1b];
} while (puVar5 != param_1);
}
uVar1 = *(int4 *)((long)param_1 + 0xd4);
uVar6 = param_1[4];
local_38 = param_1[0x1f];
local_50 = lVar4;
local_48 = param_2;
local_40 = param_3;
lVar4 = (**(code **)(PSI_server + 0x158))(local_a8,uVar1,6);
if (lVar4 == 0) {
uVar6 = my_read(uVar1,uVar6,uVar12,local_38);
}
else {
local_58 = lVar4;
(**(code **)(PSI_server + 0x210))
(lVar4,uVar12,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x2eb);
uVar2 = local_38;
uVar6 = my_read(uVar1,uVar6,uVar12,local_38);
if (uVar6 != 0) {
uVar12 = 0;
}
uVar9 = 0;
if (uVar6 != 0xffffffffffffffff) {
uVar9 = uVar6;
}
if ((uVar2 & 6) != 0) {
uVar9 = uVar12;
}
(**(code **)(PSI_server + 0x218))(local_58,uVar9);
}
if (local_40 <= uVar6 && uVar6 != 0xffffffffffffffff) {
__src = (void *)param_1[4];
param_1[2] = (long)__src + local_40;
param_1[3] = uVar6 + (long)__src;
*param_1 = uVar11;
if (local_40 != 0) {
memcpy(local_48,__src,local_40);
return 0;
}
return 0;
}
if (uVar6 != 0xffffffffffffffff) {
memcpy(local_48,(void *)param_1[4],uVar6);
}
*param_1 = uVar11;
iVar3 = -1;
if (uVar6 != 0xffffffffffffffff) {
iVar3 = (int)local_50 + (int)uVar6;
}
*(int *)((long)param_1 + 0xe4) = iVar3;
param_1[3] = param_1[4];
param_1[2] = param_1[4];
LAB_00151e8e:
*(int4 *)(param_1 + 0x1c) = 1;
return 1;
}
|
|
3,451 | js_set_difference | bluesky950520[P]quickjs/quickjs.c | static JSValue js_set_difference(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue newset, item, iter, keys, has, next, rv;
JSMapState *s, *t;
JSMapRecord *mr;
int64_t size;
BOOL done;
int ok;
has = JS_UNDEFINED;
iter = JS_UNDEFINED;
keys = JS_UNDEFINED;
next = JS_UNDEFINED;
newset = JS_UNDEFINED;
s = JS_GetOpaque2(ctx, this_val, JS_CLASS_SET);
if (!s)
goto exception;
// order matters!
if (js_setlike_get_size(ctx, argv[0], &size) < 0)
goto exception;
if (js_setlike_get_has(ctx, argv[0], &has) < 0)
goto exception;
if (js_setlike_get_keys(ctx, argv[0], &keys) < 0)
goto exception;
if (s->record_count > size) {
iter = JS_Call(ctx, keys, argv[0], 0, NULL);
if (JS_IsException(iter))
goto exception;
next = JS_GetProperty(ctx, iter, JS_ATOM_next);
if (JS_IsException(next))
goto exception;
newset = js_map_constructor(ctx, JS_UNDEFINED, 1, &this_val, MAGIC_SET);
if (JS_IsException(newset))
goto exception;
t = JS_GetOpaque(newset, JS_CLASS_SET);
for (;;) {
item = JS_IteratorNext(ctx, iter, next, 0, NULL, &done);
if (JS_IsException(item))
goto exception;
if (done) // item is JS_UNDEFINED
break;
item = map_normalize_key(ctx, item);
mr = map_find_record(ctx, t, item);
if (mr)
map_delete_record(ctx->rt, t, mr);
JS_FreeValue(ctx, item);
}
} else {
iter = js_create_map_iterator(ctx, this_val, 0, NULL, MAGIC_SET);
if (JS_IsException(iter))
goto exception;
newset = js_map_constructor(ctx, JS_UNDEFINED, 0, NULL, MAGIC_SET);
if (JS_IsException(newset))
goto exception;
t = JS_GetOpaque(newset, JS_CLASS_SET);
for (;;) {
item = js_map_iterator_next(ctx, iter, 0, NULL, &done, MAGIC_SET);
if (JS_IsException(item))
goto exception;
if (done) // item is JS_UNDEFINED
break;
rv = JS_Call(ctx, has, argv[0], 1, &item);
ok = JS_ToBoolFree(ctx, rv); // returns -1 if rv is JS_EXCEPTION
if (ok == 0) {
item = map_normalize_key(ctx, item);
if (map_find_record(ctx, t, item)) {
JS_FreeValue(ctx, item); // no duplicates
} else if ((mr = map_add_record(ctx, t, item))) {
mr->value = JS_UNDEFINED;
} else {
JS_FreeValue(ctx, item);
goto exception;
}
} else {
JS_FreeValue(ctx, item);
if (ok < 0)
goto exception;
}
}
}
goto fini;
exception:
JS_FreeValue(ctx, newset);
newset = JS_EXCEPTION;
fini:
JS_FreeValue(ctx, has);
JS_FreeValue(ctx, keys);
JS_FreeValue(ctx, iter);
JS_FreeValue(ctx, next);
return newset;
} | O2 | c | js_set_difference:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %r8, %rbp
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
andl $0x0, 0x60(%rsp)
movq %rsi, 0x88(%rsp)
movq %rdx, 0x90(%rsp)
pushq $0x3
popq %r14
movq %r14, 0x68(%rsp)
andl $0x0, 0x70(%rsp)
movq %r14, 0x78(%rsp)
pushq $0x24
popq %rcx
callq 0x24db7
testq %rax, %rax
je 0x4959f
movq %rax, %r13
movq (%rbp), %rsi
movq 0x8(%rbp), %rdx
leaq 0x80(%rsp), %rcx
movq %rbx, %rdi
callq 0x49feb
testl %eax, %eax
js 0x4959f
movq (%rbp), %rsi
movq 0x8(%rbp), %rdx
leaq 0x60(%rsp), %rcx
movq %rbx, %rdi
callq 0x4a07f
testl %eax, %eax
js 0x4959f
movq (%rbp), %rsi
movq 0x8(%rbp), %rdx
leaq 0x70(%rsp), %rcx
movq %rbx, %rdi
callq 0x4a108
testl %eax, %eax
js 0x4959f
movl 0x18(%r13), %eax
cmpq %rax, 0x80(%rsp)
jge 0x4963b
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
movq (%rbp), %rcx
movq 0x8(%rbp), %r8
andq $0x0, (%rsp)
movq $0x0, 0x10(%rsp)
movq %rbx, %rdi
xorl %r9d, %r9d
callq 0x25a66
movq %rax, %r13
movq %rdx, %rbp
cmpl $0x6, %ebp
jne 0x49677
movq %r14, 0x20(%rsp)
jmp 0x495b3
movq $0x0, 0x10(%rsp)
movq %r14, 0x20(%rsp)
xorl %r13d, %r13d
movq %r14, %rbp
xorl %r12d, %r12d
xorl %r15d, %r15d
shlq $0x20, %r15
movl %r12d, %esi
orq %r15, %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x1bbce
pushq $0x6
popq %r14
xorl %r12d, %r12d
xorl %r15d, %r15d
movq 0x60(%rsp), %rsi
movq 0x68(%rsp), %rdx
movq %rbx, %rdi
callq 0x1bbce
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
movq %rbx, %rdi
callq 0x1bbce
movq %rbx, %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x1bbce
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
movq 0x20(%rsp), %rdx
callq 0x1bbce
shlq $0x20, %r15
movl %r12d, %eax
orq %r15, %rax
movq %r14, %rdx
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x1
popq %r9
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x48662
movq %rax, %r13
movq %rdx, 0x18(%rsp)
cmpl $0x6, %edx
jne 0x496f5
movq $0x0, 0x10(%rsp)
movq %r14, 0x20(%rsp)
xorl %r12d, %r12d
xorl %r15d, %r15d
jmp 0x49995
pushq $0x6b
popq %rcx
movq %rbx, %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x1ebf3
movq %rax, 0x10(%rsp)
movq %rdx, 0x20(%rsp)
cmpl $0x6, %edx
je 0x495b3
pushq $0x3
popq %rdx
leaq 0x88(%rsp), %r8
pushq $0x1
popq %rcx
movq %rbx, %rdi
xorl %esi, %esi
movl %ecx, %r9d
callq 0x32eee
movq %rax, %r12
movq %rdx, %r14
movq %rax, %r15
shrq $0x20, %r15
movl %r14d, %eax
cmpq $0x6, %rax
je 0x495b9
cmpl $-0x1, %eax
jne 0x498b6
cmpw $0x24, 0x6(%r12)
jne 0x498b6
movq 0x30(%r12), %rax
movq %rax, 0x48(%rsp)
jmp 0x498bf
movq $0x0, 0x10(%rsp)
pushq $0x3
popq %rdx
pushq $0x1
popq %r9
movq %rbx, %rdi
xorl %esi, %esi
movq %rdx, 0x20(%rsp)
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x32eee
movq %rax, %r12
movq %rdx, %r14
movq %rax, %r15
shrq $0x20, %r15
movl %r14d, %eax
cmpq $0x6, %rax
je 0x49995
cmpl $-0x1, %eax
jne 0x4974d
cmpw $0x24, 0x6(%r12)
jne 0x4974d
movq 0x30(%r12), %rax
movq %rax, 0x50(%rsp)
jmp 0x49756
movq $0x0, 0x50(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x58(%rsp)
pushq $0x3
popq %rax
movq %rax, 0x20(%rsp)
movq $0x0, 0x10(%rsp)
movq %r13, 0x28(%rsp)
movl $0x1, (%rsp)
movq %rbx, %rdi
movq %r13, %rsi
movq 0x18(%rsp), %rdx
leaq 0x34(%rsp), %r9
callq 0x4a191
movq %rax, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
cmpl $0x6, %edx
je 0x49995
cmpl $0x0, 0x34(%rsp)
jne 0x499a4
movq (%rbp), %rcx
movq 0x8(%rbp), %r8
leaq 0x38(%rsp), %rax
movq %rax, (%rsp)
movq %rbx, %rdi
movq 0x48(%rsp), %rsi
movq 0x58(%rsp), %rdx
pushq $0x1
popq %r9
callq 0x25a66
movq %rbx, %rdi
movq %rax, %rsi
callq 0x209aa
movq 0x38(%rsp), %rdx
movq 0x40(%rsp), %rcx
testl %eax, %eax
je 0x4981e
movl %eax, %r13d
movq %rbx, %rdi
movq %rdx, %rsi
movq %rcx, %rdx
callq 0x1bbce
testl %r13d, %r13d
movq 0x28(%rsp), %r13
jns 0x49780
jmp 0x49995
movl %ecx, %eax
xorq $0x7, %rax
movq %rdx, %rsi
movabsq $0x7fffffffffffffff, %rdi # imm = 0x7FFFFFFFFFFFFFFF
andq %rdi, %rsi
orq %rax, %rsi
movl $0x0, %esi
cmoveq %rsi, %rdx
movl $0x0, %eax
movq %rax, 0x10(%rsp)
cmoveq %rsi, %rcx
movq %rdx, 0x38(%rsp)
movq %rcx, 0x40(%rsp)
movq %rbx, %rdi
movq 0x50(%rsp), %r13
movq %r13, %rsi
callq 0x413bd
movq 0x38(%rsp), %rdx
movq 0x40(%rsp), %rcx
movq %rbx, %rdi
testq %rax, %rax
je 0x4988f
movq %rdx, %rsi
movq %rcx, %rdx
callq 0x1bbce
movq 0x28(%rsp), %r13
jmp 0x49780
movq %r13, %rsi
callq 0x41441
testq %rax, %rax
movq 0x28(%rsp), %r13
je 0x499ae
andl $0x0, 0x40(%rax)
movq $0x3, 0x48(%rax)
jmp 0x49780
movq $0x0, 0x48(%rsp)
movq %r13, 0x28(%rsp)
movq %rbp, 0x18(%rsp)
movq %r12, 0x58(%rsp)
andq $0x0, (%rsp)
leaq 0x34(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %rbx, %rdi
movq %r13, %rsi
movq %rbp, %rdx
movq 0x10(%rsp), %rcx
movq 0x20(%rsp), %r8
xorl %r9d, %r9d
callq 0x3d47c
movq %rax, %rbp
movq %rdx, %r13
movq %rax, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
movl %r13d, %eax
cmpq $0x6, %rax
je 0x49990
cmpl $0x0, 0x34(%rsp)
jne 0x4999f
xorq $0x7, %rax
movq %rbp, %rcx
movabsq $0x7fffffffffffffff, %rdx # imm = 0x7FFFFFFFFFFFFFFF
andq %rdx, %rcx
orq %rax, %rcx
jne 0x4993a
xorl %ebp, %ebp
xorl %r13d, %r13d
movq 0x48(%rsp), %r12
movq %rbp, 0x38(%rsp)
movq %r13, 0x40(%rsp)
movq %rbx, %rdi
movq %r12, %rsi
movq %rbp, %rdx
movq %r13, %rcx
callq 0x413bd
testq %rax, %rax
je 0x4996e
movq 0x18(%rbx), %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x4871e
movq %rbx, %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0x1bbce
movq 0x28(%rsp), %r13
movq 0x18(%rsp), %rbp
movq 0x58(%rsp), %r12
jmp 0x498ce
movq 0x28(%rsp), %r13
movq 0x18(%rsp), %rbp
jmp 0x495b9
movq 0x28(%rsp), %r13
movq 0x18(%rsp), %rbp
jmp 0x495d8
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdx
movq %rbx, %rdi
callq 0x1bbce
movq $0x0, 0x10(%rsp)
jmp 0x49995
| js_set_difference:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 98h
mov rbp, r8
mov r15, rdx
mov r12, rsi
mov rbx, rdi
and dword ptr [rsp+0C8h+var_68], 0
mov [rsp+0C8h+var_40], rsi
mov [rsp+0C8h+var_38], rdx
push 3
pop r14
mov [rsp+0C8h+var_60], r14
and dword ptr [rsp+0C8h+var_58], 0
mov [rsp+0C8h+var_50], r14
push 24h ; '$'
pop rcx
call JS_GetOpaque2
test rax, rax
jz loc_4959F
mov r13, rax
mov rsi, [rbp+0]
mov rdx, [rbp+8]
lea rcx, [rsp+0C8h+var_48]
mov rdi, rbx
call js_setlike_get_size
test eax, eax
js loc_4959F
mov rsi, [rbp+0]
mov rdx, [rbp+8]
lea rcx, [rsp+0C8h+var_68]
mov rdi, rbx
call js_setlike_get_has
test eax, eax
js short loc_4959F
mov rsi, [rbp+0]
mov rdx, [rbp+8]
lea rcx, [rsp+0C8h+var_58]
mov rdi, rbx
call js_setlike_get_keys
test eax, eax
js short loc_4959F
mov eax, [r13+18h]
cmp [rsp+0C8h+var_48], rax
jge loc_4963B
mov rsi, [rsp+0C8h+var_58]
mov rdx, [rsp+0C8h+var_50]
mov rcx, [rbp+0]
mov r8, [rbp+8]
and [rsp+0C8h+var_C8], 0
mov [rsp+0C8h+var_B8], 0
mov rdi, rbx
xor r9d, r9d
call JS_Call
mov r13, rax
mov rbp, rdx
cmp ebp, 6
jnz loc_49677
mov [rsp+0C8h+var_A8], r14
jmp short loc_495B3
loc_4959F:
mov [rsp+0C8h+var_B8], 0
mov [rsp+0C8h+var_A8], r14
xor r13d, r13d
mov rbp, r14
loc_495B3:
xor r12d, r12d
xor r15d, r15d
loc_495B9:
shl r15, 20h
mov esi, r12d
or rsi, r15
mov rdi, rbx
mov rdx, r14
call JS_FreeValue
push 6
pop r14
xor r12d, r12d
xor r15d, r15d
loc_495D8:
mov rsi, [rsp+0C8h+var_68]
mov rdx, [rsp+0C8h+var_60]
mov rdi, rbx
call JS_FreeValue
mov rsi, [rsp+0C8h+var_58]
mov rdx, [rsp+0C8h+var_50]
mov rdi, rbx
call JS_FreeValue
mov rdi, rbx
mov rsi, r13
mov rdx, rbp
call JS_FreeValue
mov rdi, rbx
mov rsi, [rsp+0C8h+var_B8]
mov rdx, [rsp+0C8h+var_A8]
call JS_FreeValue
shl r15, 20h
mov eax, r12d
or rax, r15
mov rdx, r14
add rsp, 98h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_4963B:
push 1
pop r9
mov rdi, rbx
mov rsi, r12
mov rdx, r15
call js_create_map_iterator
mov r13, rax
mov [rsp+0C8h+var_B0], rdx
cmp edx, 6
jnz loc_496F5
mov [rsp+0C8h+var_B8], 0
mov [rsp+0C8h+var_A8], r14
xor r12d, r12d
xor r15d, r15d
jmp loc_49995
loc_49677:
push 6Bh ; 'k'
pop rcx
mov rdi, rbx
mov rsi, r13
mov rdx, rbp
call JS_GetProperty
mov [rsp+0C8h+var_B8], rax
mov [rsp+0C8h+var_A8], rdx
cmp edx, 6
jz loc_495B3
push 3
pop rdx
lea r8, [rsp+0C8h+var_40]
push 1
pop rcx
mov rdi, rbx
xor esi, esi
mov r9d, ecx
call js_map_constructor
mov r12, rax
mov r14, rdx
mov r15, rax
shr r15, 20h
mov eax, r14d
cmp rax, 6
jz loc_495B9
cmp eax, 0FFFFFFFFh
jnz loc_498B6
cmp word ptr [r12+6], 24h ; '$'
jnz loc_498B6
mov rax, [r12+30h]
mov [rsp+0C8h+var_80], rax
jmp loc_498BF
loc_496F5:
mov [rsp+0C8h+var_B8], 0
push 3
pop rdx
push 1
pop r9
mov rdi, rbx
xor esi, esi
mov [rsp+0C8h+var_A8], rdx
xor ecx, ecx
xor r8d, r8d
call js_map_constructor
mov r12, rax
mov r14, rdx
mov r15, rax
shr r15, 20h
mov eax, r14d
cmp rax, 6
jz loc_49995
cmp eax, 0FFFFFFFFh
jnz short loc_4974D
cmp word ptr [r12+6], 24h ; '$'
jnz short loc_4974D
mov rax, [r12+30h]
mov [rsp+0C8h+var_78], rax
jmp short loc_49756
loc_4974D:
mov [rsp+0C8h+var_78], 0
loc_49756:
mov rax, [rsp+0C8h+var_68]
mov [rsp+0C8h+var_80], rax
mov rax, [rsp+0C8h+var_60]
mov [rsp+0C8h+var_70], rax
push 3
pop rax
mov [rsp+0C8h+var_A8], rax
mov [rsp+0C8h+var_B8], 0
mov [rsp+0C8h+var_A0], r13
loc_49780:
mov dword ptr [rsp+0C8h+var_C8], 1
mov rdi, rbx
mov rsi, r13
mov rdx, [rsp+0C8h+var_B0]
lea r9, [rsp+0C8h+var_94]
call js_map_iterator_next
mov [rsp+0C8h+var_90], rax
mov [rsp+0C8h+var_88], rdx
cmp edx, 6
jz loc_49995
cmp [rsp+0C8h+var_94], 0
jnz loc_499A4
mov rcx, [rbp+0]
mov r8, [rbp+8]
lea rax, [rsp+0C8h+var_90]
mov [rsp+0C8h+var_C8], rax
mov rdi, rbx
mov rsi, [rsp+0C8h+var_80]
mov rdx, [rsp+0C8h+var_70]
push 1
pop r9
call JS_Call
mov rdi, rbx
mov rsi, rax
call JS_ToBoolFree
mov rdx, [rsp+0C8h+var_90]
mov rcx, [rsp+0C8h+var_88]
test eax, eax
jz short loc_4981E
mov r13d, eax
mov rdi, rbx
mov rsi, rdx
mov rdx, rcx
call JS_FreeValue
test r13d, r13d
mov r13, [rsp+0C8h+var_A0]
jns loc_49780
jmp loc_49995
loc_4981E:
mov eax, ecx
xor rax, 7
mov rsi, rdx
mov rdi, 7FFFFFFFFFFFFFFFh
and rsi, rdi
or rsi, rax
mov esi, 0
cmovz rdx, rsi
mov eax, 0
mov [rsp+0C8h+var_B8], rax
cmovz rcx, rsi
mov [rsp+0C8h+var_90], rdx
mov [rsp+0C8h+var_88], rcx
mov rdi, rbx
mov r13, [rsp+0C8h+var_78]
mov rsi, r13
call map_find_record
mov rdx, [rsp+0C8h+var_90]
mov rcx, [rsp+0C8h+var_88]
mov rdi, rbx
test rax, rax
jz short loc_4988F
mov rsi, rdx
mov rdx, rcx
call JS_FreeValue
mov r13, [rsp+0C8h+var_A0]
jmp loc_49780
loc_4988F:
mov rsi, r13
call map_add_record
test rax, rax
mov r13, [rsp+0C8h+var_A0]
jz loc_499AE
and dword ptr [rax+40h], 0
mov qword ptr [rax+48h], 3
jmp loc_49780
loc_498B6:
mov [rsp+0C8h+var_80], 0
loc_498BF:
mov [rsp+0C8h+var_A0], r13
mov [rsp+0C8h+var_B0], rbp
mov [rsp+0C8h+var_70], r12
loc_498CE:
and [rsp+0C8h+var_C8], 0
lea rax, [rsp+0C8h+var_94]
mov [rsp+0C8h+var_C0], rax
mov rdi, rbx
mov rsi, r13
mov rdx, rbp
mov rcx, [rsp+0C8h+var_B8]
mov r8, [rsp+0C8h+var_A8]
xor r9d, r9d
call JS_IteratorNext
mov rbp, rax
mov r13, rdx
mov [rsp+0C8h+var_90], rax
mov [rsp+0C8h+var_88], rdx
mov eax, r13d
cmp rax, 6
jz short loc_49990
cmp [rsp+0C8h+var_94], 0
jnz loc_4999F
xor rax, 7
mov rcx, rbp
mov rdx, 7FFFFFFFFFFFFFFFh
and rcx, rdx
or rcx, rax
jnz short loc_4993A
xor ebp, ebp
xor r13d, r13d
loc_4993A:
mov r12, [rsp+0C8h+var_80]
mov [rsp+0C8h+var_90], rbp
mov [rsp+0C8h+var_88], r13
mov rdi, rbx
mov rsi, r12
mov rdx, rbp
mov rcx, r13
call map_find_record
test rax, rax
jz short loc_4996E
mov rdi, [rbx+18h]
mov rsi, r12
mov rdx, rax
call map_delete_record
loc_4996E:
mov rdi, rbx
mov rsi, rbp
mov rdx, r13
call JS_FreeValue
mov r13, [rsp+0C8h+var_A0]
mov rbp, [rsp+0C8h+var_B0]
mov r12, [rsp+0C8h+var_70]
jmp loc_498CE
loc_49990:
mov r13, [rsp+0C8h+var_A0]
loc_49995:
mov rbp, [rsp+0C8h+var_B0]
jmp loc_495B9
loc_4999F:
mov r13, [rsp+0C8h+var_A0]
loc_499A4:
mov rbp, [rsp+0C8h+var_B0]
jmp loc_495D8
loc_499AE:
mov rsi, [rsp+0C8h+var_90]
mov rdx, [rsp+0C8h+var_88]
mov rdi, rbx
call JS_FreeValue
mov [rsp+0C8h+var_B8], 0
jmp short loc_49995
| unsigned long long js_set_difference(
long long a1,
_DWORD *a2,
long long a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
double a8,
double a9,
__m128 a10,
__m128 a11,
long long a12,
_QWORD *a13)
{
long long v15; // r14
long long Opaque2; // rax
long long v17; // r13
long long v18; // rcx
long long v19; // r8
long long v20; // rax
unsigned long long v21; // rdx
unsigned long long map_iterator; // r13
unsigned long long v23; // rbp
unsigned long long v24; // r12
unsigned long long v25; // r15
double v27; // xmm4_8
double v28; // xmm5_8
unsigned long long v29; // rdx
double v30; // xmm4_8
double v31; // xmm5_8
long long v32; // rdx
long long v33; // rdx
long long v34; // rdx
int v35; // ecx
int v36; // r8d
long long v37; // rdx
long long v38; // rax
long long v39; // rdx
int v40; // eax
_DWORD *v41; // rdx
long long v42; // rcx
int v43; // r13d
bool v44; // sf
long long v45; // rax
long long v46; // r13
_QWORD *v47; // rax
long long v48; // rdx
_DWORD *v49; // r12
long long record; // rax
long long Property; // [rsp+10h] [rbp-B8h]
unsigned long long v52; // [rsp+18h] [rbp-B0h]
long long v53; // [rsp+20h] [rbp-A8h]
unsigned long long v54; // [rsp+28h] [rbp-A0h]
unsigned long long v55; // [rsp+28h] [rbp-A0h]
int v56; // [rsp+34h] [rbp-94h] BYREF
long long v57; // [rsp+38h] [rbp-90h] BYREF
long long v58; // [rsp+40h] [rbp-88h]
_DWORD *v59; // [rsp+48h] [rbp-80h]
long long v60; // [rsp+50h] [rbp-78h]
long long i; // [rsp+58h] [rbp-70h]
_DWORD *v62; // [rsp+60h] [rbp-68h] BYREF
long long v63; // [rsp+68h] [rbp-60h]
long long v64; // [rsp+70h] [rbp-58h] BYREF
long long v65; // [rsp+78h] [rbp-50h]
long long v66; // [rsp+80h] [rbp-48h] BYREF
long long v67[8]; // [rsp+88h] [rbp-40h] BYREF
LODWORD(v62) = 0;
v67[0] = (long long)a2;
v67[1] = a3;
v15 = 3LL;
v63 = 3LL;
LODWORD(v64) = 0;
v65 = 3LL;
Opaque2 = JS_GetOpaque2(a1, (long long)a2, a3, 0x24u);
if ( !Opaque2
|| (v17 = Opaque2, (int)js_setlike_get_size(a1, *a13, a13[1], &v66) < 0)
|| (int)js_setlike_get_has(a1, *a13, a13[1], &v62) < 0
|| (int)js_setlike_get_keys(a1, *a13, a13[1], &v64) < 0 )
{
Property = 0LL;
v53 = 3LL;
map_iterator = 0LL;
v23 = 3LL;
goto LABEL_9;
}
if ( v66 >= *(unsigned int *)(v17 + 24) )
{
map_iterator = js_create_map_iterator(a1, a2, a3, v18, v19, 1);
v52 = v29;
if ( (_DWORD)v29 == 6 )
{
Property = 0LL;
v53 = 3LL;
LODWORD(v24) = 0;
v25 = 0LL;
}
else
{
Property = 0LL;
v53 = 3LL;
v24 = js_map_constructor(a1, 0LL, 3LL, 0, 0LL, 1u, a4, a5, a6, a7, v27, v28, a10, a11);
v15 = v34;
v25 = HIDWORD(v24);
if ( (unsigned int)v34 != 6LL )
{
if ( (_DWORD)v34 == -1 && *(_WORD *)(v24 + 6) == 36 )
v60 = *(_QWORD *)(v24 + 48);
else
v60 = 0LL;
v59 = v62;
i = v63;
v53 = 3LL;
Property = 0LL;
v54 = map_iterator;
while ( 1 )
{
v57 = js_map_iterator_next(a1, map_iterator, v52, v35, v36, (unsigned int)&v56, 1);
v58 = v37;
if ( (_DWORD)v37 == 6 )
break;
if ( v56 )
goto LABEL_50;
v38 = JS_Call(a1, (int)v59, i, *a13, a13[1], 1, (long long)&v57);
v40 = JS_ToBoolFree(a1, v38, v39);
v41 = (_DWORD *)v57;
v42 = v58;
if ( v40 )
{
v43 = v40;
JS_FreeValue(a1, v57, v58);
v44 = v43 < 0;
map_iterator = v54;
if ( v44 )
break;
}
else
{
v45 = (unsigned int)v58 ^ 7LL;
if ( !(v45 | v57 & 0x7FFFFFFFFFFFFFFFLL) )
v41 = 0LL;
Property = 0LL;
if ( !(v45 | v57 & 0x7FFFFFFFFFFFFFFFLL) )
v42 = 0LL;
v57 = (long long)v41;
v58 = v42;
v46 = v60;
if ( map_find_record(a1, v60, v41, v42, (__m128d)a4) )
{
JS_FreeValue(a1, v57, v58);
map_iterator = v54;
}
else
{
v47 = map_add_record(a1, v46, (_DWORD *)v57, v58);
map_iterator = v54;
if ( !v47 )
{
JS_FreeValue(a1, v57, v58);
Property = 0LL;
break;
}
*((_DWORD *)v47 + 16) = 0;
v47[9] = 3LL;
}
}
}
}
}
LABEL_48:
v23 = v52;
goto LABEL_10;
}
Property = 0LL;
v20 = JS_Call(a1, v64, v65, *a13, a13[1], 0, 0LL);
map_iterator = v20;
v23 = v21;
if ( (_DWORD)v21 == 6 )
{
v53 = 3LL;
LABEL_9:
LODWORD(v24) = 0;
v25 = 0LL;
LABEL_10:
JS_FreeValue(a1, (v25 << 32) | (unsigned int)v24, v15);
LODWORD(v24) = 0;
v25 = 0LL;
goto LABEL_11;
}
Property = JS_GetProperty(a1, v20, v21, 107);
v53 = v32;
if ( (_DWORD)v32 == 6 )
goto LABEL_9;
v24 = js_map_constructor(a1, 0LL, 3LL, 1, v67, 1u, a4, a5, a6, a7, v30, v31, a10, a11);
v15 = v33;
v25 = HIDWORD(v24);
if ( (unsigned int)v33 == 6LL )
goto LABEL_10;
if ( (_DWORD)v33 == -1 && *(_WORD *)(v24 + 6) == 36 )
v59 = *(_DWORD **)(v24 + 48);
else
v59 = 0LL;
v55 = map_iterator;
v52 = v23;
for ( i = v24; ; LODWORD(v24) = i )
{
v23 = JS_IteratorNext(a1, map_iterator, v23, Property, v53, 0, 0LL, &v56);
map_iterator = v48;
v57 = v23;
v58 = v48;
if ( (unsigned int)v48 == 6LL )
{
map_iterator = v55;
goto LABEL_48;
}
if ( v56 )
break;
if ( !((unsigned int)v48 ^ 7LL | v23 & 0x7FFFFFFFFFFFFFFFLL) )
{
v23 = 0LL;
map_iterator = 0LL;
}
v49 = v59;
v57 = v23;
v58 = map_iterator;
record = map_find_record(a1, (long long)v59, (_DWORD *)v23, map_iterator, (__m128d)a4);
if ( record )
map_delete_record(*(_QWORD *)(a1 + 24), v49, record);
JS_FreeValue(a1, v23, map_iterator);
LODWORD(map_iterator) = v55;
LODWORD(v23) = v52;
}
map_iterator = v55;
LABEL_50:
v23 = v52;
LABEL_11:
JS_FreeValue(a1, (long long)v62, v63);
JS_FreeValue(a1, v64, v65);
JS_FreeValue(a1, map_iterator, v23);
JS_FreeValue(a1, Property, v53);
return (v25 << 32) | (unsigned int)v24;
}
| js_set_difference:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x98
MOV RBP,R8
MOV R15,RDX
MOV R12,RSI
MOV RBX,RDI
AND dword ptr [RSP + 0x60],0x0
MOV qword ptr [RSP + 0x88],RSI
MOV qword ptr [RSP + 0x90],RDX
PUSH 0x3
POP R14
MOV qword ptr [RSP + 0x68],R14
AND dword ptr [RSP + 0x70],0x0
MOV qword ptr [RSP + 0x78],R14
PUSH 0x24
POP RCX
CALL 0x00124db7
TEST RAX,RAX
JZ 0x0014959f
MOV R13,RAX
MOV RSI,qword ptr [RBP]
MOV RDX,qword ptr [RBP + 0x8]
LEA RCX,[RSP + 0x80]
MOV RDI,RBX
CALL 0x00149feb
TEST EAX,EAX
JS 0x0014959f
MOV RSI,qword ptr [RBP]
MOV RDX,qword ptr [RBP + 0x8]
LEA RCX,[RSP + 0x60]
MOV RDI,RBX
CALL 0x0014a07f
TEST EAX,EAX
JS 0x0014959f
MOV RSI,qword ptr [RBP]
MOV RDX,qword ptr [RBP + 0x8]
LEA RCX,[RSP + 0x70]
MOV RDI,RBX
CALL 0x0014a108
TEST EAX,EAX
JS 0x0014959f
MOV EAX,dword ptr [R13 + 0x18]
CMP qword ptr [RSP + 0x80],RAX
JGE 0x0014963b
MOV RSI,qword ptr [RSP + 0x70]
MOV RDX,qword ptr [RSP + 0x78]
MOV RCX,qword ptr [RBP]
MOV R8,qword ptr [RBP + 0x8]
AND qword ptr [RSP],0x0
MOV qword ptr [RSP + 0x10],0x0
MOV RDI,RBX
XOR R9D,R9D
CALL 0x00125a66
MOV R13,RAX
MOV RBP,RDX
CMP EBP,0x6
JNZ 0x00149677
MOV qword ptr [RSP + 0x20],R14
JMP 0x001495b3
LAB_0014959f:
MOV qword ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x20],R14
XOR R13D,R13D
MOV RBP,R14
LAB_001495b3:
XOR R12D,R12D
XOR R15D,R15D
LAB_001495b9:
SHL R15,0x20
MOV ESI,R12D
OR RSI,R15
MOV RDI,RBX
MOV RDX,R14
CALL 0x0011bbce
PUSH 0x6
POP R14
XOR R12D,R12D
XOR R15D,R15D
LAB_001495d8:
MOV RSI,qword ptr [RSP + 0x60]
MOV RDX,qword ptr [RSP + 0x68]
MOV RDI,RBX
CALL 0x0011bbce
MOV RSI,qword ptr [RSP + 0x70]
MOV RDX,qword ptr [RSP + 0x78]
MOV RDI,RBX
CALL 0x0011bbce
MOV RDI,RBX
MOV RSI,R13
MOV RDX,RBP
CALL 0x0011bbce
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x20]
CALL 0x0011bbce
SHL R15,0x20
MOV EAX,R12D
OR RAX,R15
MOV RDX,R14
ADD RSP,0x98
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0014963b:
PUSH 0x1
POP R9
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R15
CALL 0x00148662
MOV R13,RAX
MOV qword ptr [RSP + 0x18],RDX
CMP EDX,0x6
JNZ 0x001496f5
MOV qword ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x20],R14
XOR R12D,R12D
XOR R15D,R15D
JMP 0x00149995
LAB_00149677:
PUSH 0x6b
POP RCX
MOV RDI,RBX
MOV RSI,R13
MOV RDX,RBP
CALL 0x0011ebf3
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x20],RDX
CMP EDX,0x6
JZ 0x001495b3
PUSH 0x3
POP RDX
LEA R8,[RSP + 0x88]
PUSH 0x1
POP RCX
MOV RDI,RBX
XOR ESI,ESI
MOV R9D,ECX
CALL 0x00132eee
MOV R12,RAX
MOV R14,RDX
MOV R15,RAX
SHR R15,0x20
MOV EAX,R14D
CMP RAX,0x6
JZ 0x001495b9
CMP EAX,-0x1
JNZ 0x001498b6
CMP word ptr [R12 + 0x6],0x24
JNZ 0x001498b6
MOV RAX,qword ptr [R12 + 0x30]
MOV qword ptr [RSP + 0x48],RAX
JMP 0x001498bf
LAB_001496f5:
MOV qword ptr [RSP + 0x10],0x0
PUSH 0x3
POP RDX
PUSH 0x1
POP R9
MOV RDI,RBX
XOR ESI,ESI
MOV qword ptr [RSP + 0x20],RDX
XOR ECX,ECX
XOR R8D,R8D
CALL 0x00132eee
MOV R12,RAX
MOV R14,RDX
MOV R15,RAX
SHR R15,0x20
MOV EAX,R14D
CMP RAX,0x6
JZ 0x00149995
CMP EAX,-0x1
JNZ 0x0014974d
CMP word ptr [R12 + 0x6],0x24
JNZ 0x0014974d
MOV RAX,qword ptr [R12 + 0x30]
MOV qword ptr [RSP + 0x50],RAX
JMP 0x00149756
LAB_0014974d:
MOV qword ptr [RSP + 0x50],0x0
LAB_00149756:
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x48],RAX
MOV RAX,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0x58],RAX
PUSH 0x3
POP RAX
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x28],R13
LAB_00149780:
MOV dword ptr [RSP],0x1
MOV RDI,RBX
MOV RSI,R13
MOV RDX,qword ptr [RSP + 0x18]
LEA R9,[RSP + 0x34]
CALL 0x0014a191
MOV qword ptr [RSP + 0x38],RAX
MOV qword ptr [RSP + 0x40],RDX
CMP EDX,0x6
JZ 0x00149995
CMP dword ptr [RSP + 0x34],0x0
JNZ 0x001499a4
MOV RCX,qword ptr [RBP]
MOV R8,qword ptr [RBP + 0x8]
LEA RAX,[RSP + 0x38]
MOV qword ptr [RSP],RAX
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x48]
MOV RDX,qword ptr [RSP + 0x58]
PUSH 0x1
POP R9
CALL 0x00125a66
MOV RDI,RBX
MOV RSI,RAX
CALL 0x001209aa
MOV RDX,qword ptr [RSP + 0x38]
MOV RCX,qword ptr [RSP + 0x40]
TEST EAX,EAX
JZ 0x0014981e
MOV R13D,EAX
MOV RDI,RBX
MOV RSI,RDX
MOV RDX,RCX
CALL 0x0011bbce
TEST R13D,R13D
MOV R13,qword ptr [RSP + 0x28]
JNS 0x00149780
JMP 0x00149995
LAB_0014981e:
MOV EAX,ECX
XOR RAX,0x7
MOV RSI,RDX
MOV RDI,0x7fffffffffffffff
AND RSI,RDI
OR RSI,RAX
MOV ESI,0x0
CMOVZ RDX,RSI
MOV EAX,0x0
MOV qword ptr [RSP + 0x10],RAX
CMOVZ RCX,RSI
MOV qword ptr [RSP + 0x38],RDX
MOV qword ptr [RSP + 0x40],RCX
MOV RDI,RBX
MOV R13,qword ptr [RSP + 0x50]
MOV RSI,R13
CALL 0x001413bd
MOV RDX,qword ptr [RSP + 0x38]
MOV RCX,qword ptr [RSP + 0x40]
MOV RDI,RBX
TEST RAX,RAX
JZ 0x0014988f
MOV RSI,RDX
MOV RDX,RCX
CALL 0x0011bbce
MOV R13,qword ptr [RSP + 0x28]
JMP 0x00149780
LAB_0014988f:
MOV RSI,R13
CALL 0x00141441
TEST RAX,RAX
MOV R13,qword ptr [RSP + 0x28]
JZ 0x001499ae
AND dword ptr [RAX + 0x40],0x0
MOV qword ptr [RAX + 0x48],0x3
JMP 0x00149780
LAB_001498b6:
MOV qword ptr [RSP + 0x48],0x0
LAB_001498bf:
MOV qword ptr [RSP + 0x28],R13
MOV qword ptr [RSP + 0x18],RBP
MOV qword ptr [RSP + 0x58],R12
LAB_001498ce:
AND qword ptr [RSP],0x0
LEA RAX,[RSP + 0x34]
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,RBX
MOV RSI,R13
MOV RDX,RBP
MOV RCX,qword ptr [RSP + 0x10]
MOV R8,qword ptr [RSP + 0x20]
XOR R9D,R9D
CALL 0x0013d47c
MOV RBP,RAX
MOV R13,RDX
MOV qword ptr [RSP + 0x38],RAX
MOV qword ptr [RSP + 0x40],RDX
MOV EAX,R13D
CMP RAX,0x6
JZ 0x00149990
CMP dword ptr [RSP + 0x34],0x0
JNZ 0x0014999f
XOR RAX,0x7
MOV RCX,RBP
MOV RDX,0x7fffffffffffffff
AND RCX,RDX
OR RCX,RAX
JNZ 0x0014993a
XOR EBP,EBP
XOR R13D,R13D
LAB_0014993a:
MOV R12,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x38],RBP
MOV qword ptr [RSP + 0x40],R13
MOV RDI,RBX
MOV RSI,R12
MOV RDX,RBP
MOV RCX,R13
CALL 0x001413bd
TEST RAX,RAX
JZ 0x0014996e
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R12
MOV RDX,RAX
CALL 0x0014871e
LAB_0014996e:
MOV RDI,RBX
MOV RSI,RBP
MOV RDX,R13
CALL 0x0011bbce
MOV R13,qword ptr [RSP + 0x28]
MOV RBP,qword ptr [RSP + 0x18]
MOV R12,qword ptr [RSP + 0x58]
JMP 0x001498ce
LAB_00149990:
MOV R13,qword ptr [RSP + 0x28]
LAB_00149995:
MOV RBP,qword ptr [RSP + 0x18]
JMP 0x001495b9
LAB_0014999f:
MOV R13,qword ptr [RSP + 0x28]
LAB_001499a4:
MOV RBP,qword ptr [RSP + 0x18]
JMP 0x001495d8
LAB_001499ae:
MOV RSI,qword ptr [RSP + 0x38]
MOV RDX,qword ptr [RSP + 0x40]
MOV RDI,RBX
CALL 0x0011bbce
MOV qword ptr [RSP + 0x10],0x0
JMP 0x00149995
|
int1 [16]
js_set_difference(long param_1,int8 param_2,int8 param_3,int8 param_4,
int8 *param_5)
{
int1 auVar1 [16];
int iVar2;
long lVar3;
int8 uVar4;
ulong uVar5;
ulong uVar7;
int1 auVar8 [16];
int1 auVar9 [16];
int1 auVar10 [16];
int1 auVar11 [16];
int8 local_b8;
int8 local_a8;
int local_94;
int1 local_90 [16];
int8 local_80;
int8 local_78;
ulong local_70;
int4 local_68;
int4 uStack_64;
ulong local_60;
int4 local_58;
int4 uStack_54;
int8 local_50;
long local_48;
int8 local_40;
int8 local_38;
ulong uVar6;
local_68 = 0;
local_60 = 3;
local_58 = 0;
local_50 = 3;
local_40 = param_2;
local_38 = param_3;
lVar3 = JS_GetOpaque2();
if ((((lVar3 == 0) ||
(iVar2 = js_setlike_get_size(param_1,*param_5,param_5[1],&local_48), iVar2 < 0)) ||
(iVar2 = js_setlike_get_has(param_1,*param_5,param_5[1],&local_68), iVar2 < 0)) ||
(iVar2 = js_setlike_get_keys(param_1,*param_5,param_5[1],&local_58), iVar2 < 0)) {
auVar9 = ZEXT816(3) << 0x40;
auVar8 = ZEXT816(3) << 0x40;
}
else {
if ((long)(ulong)*(uint *)(lVar3 + 0x18) <= local_48) {
auVar8 = js_create_map_iterator(param_1,param_2,param_3);
auVar11._8_8_ = local_90._8_8_;
auVar11._0_8_ = local_90._0_8_;
if (auVar8._8_4_ == 6) {
auVar10 = ZEXT816(3) << 0x40;
uVar7 = 0;
auVar9 = ZEXT816(3) << 0x40;
}
else {
auVar10 = js_map_constructor(param_1,0,3,0,0,1);
uVar5 = auVar10._0_8_;
uVar7 = uVar5 >> 0x20;
auVar9 = ZEXT816(3) << 0x40;
auVar11 = local_90;
if ((auVar10._8_8_ & 0xffffffff) != 6) {
if ((auVar10._8_4_ == -1) && (*(short *)(uVar5 + 6) == 0x24)) {
local_78 = *(int8 *)(uVar5 + 0x30);
}
else {
local_78 = 0;
}
local_80 = CONCAT44(uStack_64,local_68);
local_70 = local_60;
do {
while( true ) {
auVar11 = js_map_iterator_next(param_1,auVar8._0_8_,auVar8._8_8_);
auVar9 = ZEXT816(3) << 0x40;
if (auVar11._8_4_ == 6) goto LAB_001495b9;
auVar9 = ZEXT816(3) << 0x40;
if (local_94 != 0) goto LAB_001495d8;
local_90 = auVar11;
uVar4 = JS_Call(param_1,local_80,local_70,*param_5,param_5[1],1,local_90);
iVar2 = JS_ToBoolFree(param_1,uVar4);
uVar4 = local_78;
if (iVar2 != 0) break;
if ((local_90 & (int1 [16])0x7fffffffffffffff) == (int1 [16])0x0 &&
(local_90._8_8_ & 0xffffffff) == 7) {
local_90 = ZEXT816(0);
}
lVar3 = map_find_record(param_1,local_78);
if (lVar3 == 0) {
lVar3 = map_add_record(param_1,uVar4);
if (lVar3 == 0) {
JS_FreeValue(param_1,local_90._0_8_,local_90._8_8_);
auVar9 = ZEXT816(3) << 0x40;
auVar11 = local_90;
goto LAB_001495b9;
}
*(int4 *)(lVar3 + 0x40) = 0;
*(int8 *)(lVar3 + 0x48) = 3;
}
else {
JS_FreeValue(param_1,local_90._0_8_,local_90._8_8_);
}
}
JS_FreeValue(param_1,local_90._0_8_,local_90._8_8_);
auVar11 = local_90;
} while (-1 < iVar2);
}
}
goto LAB_001495b9;
}
auVar8 = JS_Call(param_1,CONCAT44(uStack_54,local_58),local_50,*param_5,param_5[1],0,0);
if (auVar8._8_4_ == 6) {
auVar9 = ZEXT816(3) << 0x40;
}
else {
auVar9 = JS_GetProperty(param_1,auVar8._0_8_,auVar8._8_8_,0x6b);
if (auVar9._8_4_ != 6) {
auVar10 = js_map_constructor(param_1,0,3,1,&local_40,1);
auVar1._8_8_ = local_90._8_8_;
auVar1._0_8_ = local_90._0_8_;
uVar6 = auVar10._8_8_;
uVar5 = auVar10._0_8_;
uVar7 = uVar5 >> 0x20;
auVar11 = local_90;
if ((uVar6 & 0xffffffff) != 6) {
local_70 = uVar5;
if ((auVar10._8_4_ == -1) && (*(short *)(uVar5 + 6) == 0x24)) {
local_80 = *(int8 *)(uVar5 + 0x30);
local_90 = auVar1;
}
else {
local_80 = 0;
}
while( true ) {
auVar10._8_8_ = uVar6;
auVar10._0_8_ = local_70;
auVar11 = JS_IteratorNext(param_1,auVar8._0_8_,auVar8._8_8_,auVar9._0_8_,auVar9._8_8_,0,
0,&local_94);
uVar4 = local_80;
uVar5 = auVar11._8_8_ & 0xffffffff;
if (uVar5 == 6) break;
if (local_94 != 0) goto LAB_001495d8;
if ((auVar11 & (int1 [16])0x7fffffffffffffff) == (int1 [16])0x0 &&
uVar5 == 7) {
auVar11 = ZEXT816(0);
}
local_90 = auVar11;
lVar3 = map_find_record(param_1,local_80,auVar11._0_8_,auVar11._8_8_);
if (lVar3 != 0) {
map_delete_record(*(int8 *)(param_1 + 0x18),uVar4,lVar3);
}
JS_FreeValue(param_1,auVar11._0_8_,auVar11._8_8_);
}
}
goto LAB_001495b9;
}
}
}
auVar11._8_8_ = local_90._8_8_;
auVar11._0_8_ = local_90._0_8_;
auVar10 = ZEXT816(3) << 0x40;
uVar7 = 0;
LAB_001495b9:
local_90 = auVar11;
JS_FreeValue(param_1,auVar10._0_8_ & 0xffffffff | uVar7 << 0x20,auVar10._8_8_);
auVar10 = ZEXT816(6) << 0x40;
uVar7 = 0;
auVar11 = local_90;
LAB_001495d8:
local_a8 = auVar9._8_8_;
local_b8 = auVar9._0_8_;
local_90 = auVar11;
JS_FreeValue(param_1,CONCAT44(uStack_64,local_68),local_60);
JS_FreeValue(param_1,CONCAT44(uStack_54,local_58),local_50);
JS_FreeValue(param_1,auVar8._0_8_,auVar8._8_8_);
JS_FreeValue(param_1,local_b8,local_a8);
auVar8._0_8_ = auVar10._0_8_ & 0xffffffff | uVar7 << 0x20;
auVar8._8_8_ = auVar10._8_8_;
return auVar8;
}
|
|
3,452 | PtrToSegment | seiftnesse[P]memoryallocator/src/custom_alloc_util.c | segment_t *PtrToSegment(void *ptr) {
if (!ptr) {
HEAP_LOG("Cannot convert NULL pointer to segment\n");
return NULL;
}
// Calculate segment address based on alignment and metadata size
uintptr_t addr = (uintptr_t) ptr;
addr &= ~(ALIGNMENT - 1); // Round down to alignment boundary
addr -= sizeof(segment_t);
segment_t *s = (segment_t *) addr;
// Verify segment is valid
if (debug_mode && s->magic != SEGMENT_MAGIC) {
HEAP_LOG("CRITICAL: Invalid magic number in segment at %p (ptr=%p)\n", s, ptr);
return NULL;
}
HEAP_LOG("User pointer %p converted to segment %p\n", ptr, s);
return s;
} | O3 | c | PtrToSegment:
testq %rdi, %rdi
je 0x2861
movq %rdi, %rax
andq $-0x10, %rax
addq $-0x30, %rax
leaq 0x41038dd(%rip), %rcx # 0x4106130
cmpl $0x0, (%rcx)
je 0x2863
cmpl $0xcafebafe, 0x28(%rax) # imm = 0xCAFEBAFE
je 0x2863
xorl %eax, %eax
retq
| PtrToSegment:
test rdi, rdi
jz short loc_2861
mov rax, rdi
and rax, 0FFFFFFFFFFFFFFF0h
add rax, 0FFFFFFFFFFFFFFD0h
lea rcx, debug_mode
cmp dword ptr [rcx], 0
jz short locret_2863
cmp dword ptr [rax+28h], 0CAFEBAFEh
jz short locret_2863
loc_2861:
xor eax, eax
locret_2863:
retn
| unsigned long long PtrToSegment(long long a1)
{
unsigned long long result; // rax
if ( !a1 )
return 0LL;
result = (a1 & 0xFFFFFFFFFFFFFFF0LL) - 48;
if ( debug_mode )
{
if ( *(_DWORD *)((char *)&qword_28 + (a1 & 0xFFFFFFFFFFFFFFF0LL) - 48) != -889275650 )
return 0LL;
}
return result;
}
| PtrToSegment:
TEST RDI,RDI
JZ 0x00102861
MOV RAX,RDI
AND RAX,-0x10
ADD RAX,-0x30
LEA RCX,[0x4206130]
CMP dword ptr [RCX],0x0
JZ 0x00102863
CMP dword ptr [RAX + 0x28],0xcafebafe
JZ 0x00102863
LAB_00102861:
XOR EAX,EAX
LAB_00102863:
RET
|
long PtrToSegment(ulong param_1)
{
long lVar1;
if (param_1 != 0) {
lVar1 = (param_1 & 0xfffffffffffffff0) - 0x30;
if (debug_mode == 0) {
return lVar1;
}
if (*(int *)((param_1 & 0xfffffffffffffff0) - 8) == -0x35014502) {
return lVar1;
}
}
return 0;
}
|
|
3,453 | decimal2ulonglong | eloqsql/strings/decimal.c | int decimal2ulonglong(const decimal_t *from, ulonglong *to)
{
dec1 *buf=from->buf;
ulonglong x=0;
int intg, frac;
if (from->sign)
{
*to= 0;
return E_DEC_OVERFLOW;
}
for (intg=from->intg; intg > 0; intg-=DIG_PER_DEC1)
{
/*
Check that the decimal is bigger than any possible integer.
Do it before we do the x*=DIB_BASE to avoid integer
overflow.
*/
if (unlikely (
x >= ULONGLONG_MAX/DIG_BASE &&
(x > ULONGLONG_MAX/DIG_BASE ||
*buf > (dec1) (ULONGLONG_MAX%DIG_BASE))))
{
*to=ULONGLONG_MAX;
return E_DEC_OVERFLOW;
}
x=x*DIG_BASE + *buf++;
}
*to=x;
for (frac=from->frac; unlikely(frac > 0); frac-=DIG_PER_DEC1)
if (*buf++)
return E_DEC_TRUNCATED;
return E_DEC_OK;
} | O3 | c | decimal2ulonglong:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
cmpb $0x0, 0xc(%rdi)
je 0x6013b
xorl %r11d, %r11d
movq %r11, (%rsi)
movl $0x2, %eax
jmp 0x601a2
movq 0x10(%rdi), %rcx
movl (%rdi), %edx
xorl %eax, %eax
testl %edx, %edx
jle 0x60195
movabsq $0x44b82fa08, %r8 # imm = 0x44B82FA08
addl $0x9, %edx
xorl %r9d, %r9d
leaq 0x1(%r8), %r10
cmpq %r8, %r9
jbe 0x60178
movq $-0x1, %r11
cmpq %r10, %r9
jne 0x60131
movl (%rcx), %ebx
cmpl $0x2a4ae5ff, %ebx # imm = 0x2A4AE5FF
jle 0x6017a
jmp 0x60131
movl (%rcx), %ebx
imulq $0x3b9aca00, %r9, %r11 # imm = 0x3B9ACA00
addq $0x4, %rcx
movslq %ebx, %r9
addq %r11, %r9
addl $-0x9, %edx
cmpl $0x9, %edx
jg 0x6015b
jmp 0x60198
xorl %r9d, %r9d
movq %r9, (%rsi)
movl 0x4(%rdi), %edx
testl %edx, %edx
jg 0x601a5
popq %rbx
popq %rbp
retq
addl $0x9, %edx
cmpl $0x0, (%rcx)
jne 0x601bb
addq $0x4, %rcx
addl $-0x9, %edx
cmpl $0x9, %edx
jle 0x601a2
jmp 0x601a8
movl $0x1, %eax
jmp 0x601a2
| decimal2ulonglong:
push rbp
mov rbp, rsp
push rbx
cmp byte ptr [rdi+0Ch], 0
jz short loc_6013B
xor r11d, r11d
loc_60131:
mov [rsi], r11
mov eax, 2
jmp short loc_601A2
loc_6013B:
mov rcx, [rdi+10h]
mov edx, [rdi]
xor eax, eax
test edx, edx
jle short loc_60195
mov r8, 44B82FA08h
add edx, 9
xor r9d, r9d
lea r10, [r8+1]
loc_6015B:
cmp r9, r8
jbe short loc_60178
mov r11, 0FFFFFFFFFFFFFFFFh
cmp r9, r10
jnz short loc_60131
mov ebx, [rcx]
cmp ebx, 2A4AE5FFh
jle short loc_6017A
jmp short loc_60131
loc_60178:
mov ebx, [rcx]
loc_6017A:
imul r11, r9, 3B9ACA00h
add rcx, 4
movsxd r9, ebx
add r9, r11
add edx, 0FFFFFFF7h
cmp edx, 9
jg short loc_6015B
jmp short loc_60198
loc_60195:
xor r9d, r9d
loc_60198:
mov [rsi], r9
mov edx, [rdi+4]
test edx, edx
jg short loc_601A5
loc_601A2:
pop rbx
pop rbp
retn
loc_601A5:
add edx, 9
loc_601A8:
cmp dword ptr [rcx], 0
jnz short loc_601BB
add rcx, 4
add edx, 0FFFFFFF7h
cmp edx, 9
jle short loc_601A2
jmp short loc_601A8
loc_601BB:
mov eax, 1
jmp short loc_601A2
| long long decimal2ulonglong(long long a1, _QWORD *a2)
{
long long v2; // r11
long long result; // rax
int *v4; // rcx
int v5; // edx
unsigned long long v6; // r9
int v7; // ebx
int v8; // edx
int v9; // edx
if ( *(_BYTE *)(a1 + 12) )
{
v2 = 0LL;
LABEL_3:
*a2 = v2;
return 2LL;
}
else
{
v4 = *(int **)(a1 + 16);
result = 0LL;
if ( *(int *)a1 > 0 )
{
v5 = *(_DWORD *)a1 + 9;
v6 = 0LL;
while ( 1 )
{
if ( v6 <= 0x44B82FA08LL )
{
v7 = *v4;
}
else
{
v2 = -1LL;
if ( v6 != 0x44B82FA09LL )
goto LABEL_3;
v7 = *v4;
if ( *v4 > 709551615 )
goto LABEL_3;
}
++v4;
v6 = 1000000000 * v6 + v7;
v5 -= 9;
if ( v5 <= 9 )
goto LABEL_14;
}
}
v6 = 0LL;
LABEL_14:
*a2 = v6;
v8 = *(_DWORD *)(a1 + 4);
if ( v8 > 0 )
{
v9 = v8 + 9;
while ( !*v4 )
{
++v4;
v9 -= 9;
if ( v9 <= 9 )
return result;
}
return 1LL;
}
}
return result;
}
| decimal2ulonglong:
PUSH RBP
MOV RBP,RSP
PUSH RBX
CMP byte ptr [RDI + 0xc],0x0
JZ 0x0016013b
XOR R11D,R11D
LAB_00160131:
MOV qword ptr [RSI],R11
MOV EAX,0x2
JMP 0x001601a2
LAB_0016013b:
MOV RCX,qword ptr [RDI + 0x10]
MOV EDX,dword ptr [RDI]
XOR EAX,EAX
TEST EDX,EDX
JLE 0x00160195
MOV R8,0x44b82fa08
ADD EDX,0x9
XOR R9D,R9D
LEA R10,[R8 + 0x1]
LAB_0016015b:
CMP R9,R8
JBE 0x00160178
MOV R11,-0x1
CMP R9,R10
JNZ 0x00160131
MOV EBX,dword ptr [RCX]
CMP EBX,0x2a4ae5ff
JLE 0x0016017a
JMP 0x00160131
LAB_00160178:
MOV EBX,dword ptr [RCX]
LAB_0016017a:
IMUL R11,R9,0x3b9aca00
ADD RCX,0x4
MOVSXD R9,EBX
ADD R9,R11
ADD EDX,-0x9
CMP EDX,0x9
JG 0x0016015b
JMP 0x00160198
LAB_00160195:
XOR R9D,R9D
LAB_00160198:
MOV qword ptr [RSI],R9
MOV EDX,dword ptr [RDI + 0x4]
TEST EDX,EDX
JG 0x001601a5
LAB_001601a2:
POP RBX
POP RBP
RET
LAB_001601a5:
ADD EDX,0x9
LAB_001601a8:
CMP dword ptr [RCX],0x0
JNZ 0x001601bb
ADD RCX,0x4
ADD EDX,-0x9
CMP EDX,0x9
JLE 0x001601a2
JMP 0x001601a8
LAB_001601bb:
MOV EAX,0x1
JMP 0x001601a2
|
int8 decimal2ulonglong(int *param_1,ulong *param_2)
{
int8 uVar1;
int *piVar2;
int iVar3;
int iVar4;
ulong uVar5;
ulong uVar6;
if ((char)param_1[3] == '\0') {
piVar2 = *(int **)(param_1 + 4);
uVar1 = 0;
if (*param_1 < 1) {
uVar5 = 0;
}
else {
iVar3 = *param_1 + 9;
uVar5 = 0;
do {
if (uVar5 < 0x44b82fa09) {
iVar4 = *piVar2;
}
else {
uVar6 = 0xffffffffffffffff;
if ((uVar5 != 0x44b82fa09) || (iVar4 = *piVar2, 0x2a4ae5ff < iVar4)) goto LAB_00160131;
}
piVar2 = piVar2 + 1;
uVar5 = (long)iVar4 + uVar5 * 1000000000;
iVar3 = iVar3 + -9;
} while (9 < iVar3);
}
*param_2 = uVar5;
if (0 < param_1[1]) {
iVar3 = param_1[1] + 9;
do {
if (*piVar2 != 0) {
return 1;
}
piVar2 = piVar2 + 1;
iVar3 = iVar3 + -9;
} while (9 < iVar3);
}
}
else {
uVar6 = 0;
LAB_00160131:
*param_2 = uVar6;
uVar1 = 2;
}
return uVar1;
}
|
|
3,454 | common_sampler_sample_and_accept_n(common_sampler*, llama_context*, std::vector<int, std::allocator<int>> const&, bool) | monkey531[P]llama/common/sampling.cpp | std::vector<llama_token> common_sampler_sample_and_accept_n(struct common_sampler * gsmpl, struct llama_context * ctx, const llama_tokens & draft, bool grammar_first) {
std::vector<int> idxs(draft.size() + 1);
for (size_t i = 0; i < idxs.size(); ++i) {
idxs[i] = i;
}
return common_sampler_sample_and_accept_n(gsmpl, ctx, idxs, draft, grammar_first);
} | O3 | cpp | common_sampler_sample_and_accept_n(common_sampler*, llama_context*, std::vector<int, std::allocator<int>> const&, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r8d, %ebp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq 0x8(%rcx), %rsi
subq (%rcx), %rsi
sarq $0x2, %rsi
incq %rsi
leaq 0x10(%rsp), %r13
leaq 0xf(%rsp), %rdx
movq %r13, %rdi
callq 0x798d2
movq (%r13), %rax
movq 0x8(%r13), %rdx
subq %rax, %rdx
je 0xd01f0
sarq $0x2, %rdx
cmpq $0x1, %rdx
adcq $0x0, %rdx
leaq 0x1(%rdx), %rcx
andq $-0x2, %rcx
decq %rdx
movq %rdx, %xmm0
pshufd $0x44, %xmm0, %xmm0 # xmm0 = xmm0[0,1,0,1]
movdqa 0x20552(%rip), %xmm1 # 0xf06d0
xorl %edx, %edx
movdqa 0x181c8(%rip), %xmm2 # 0xe8350
pxor %xmm2, %xmm0
pcmpeqd %xmm3, %xmm3
movdqa 0x26f78(%rip), %xmm4 # 0xf7110
movdqa %xmm1, %xmm5
pxor %xmm2, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm0, %xmm6
pcmpeqd %xmm0, %xmm5
pshufd $0xf5, %xmm5, %xmm7 # xmm7 = xmm5[1,1,3,3]
pand %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm5 # xmm5 = xmm6[1,1,3,3]
por %xmm7, %xmm5
movd %xmm5, %esi
notl %esi
testb $0x1, %sil
je 0xd01cd
movl %edx, (%rax,%rdx,4)
pxor %xmm3, %xmm5
pextrw $0x4, %xmm5, %esi
testb $0x1, %sil
je 0xd01e3
leal 0x1(%rdx), %esi
movl %esi, 0x4(%rax,%rdx,4)
addq $0x2, %rdx
paddq %xmm4, %xmm1
cmpq %rdx, %rcx
jne 0xd0198
movzbl %bpl, %r9d
leaq 0x10(%rsp), %rcx
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %r8
callq 0xcff71
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xd0221
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x1b8c0
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xd024d
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x1b8c0
movq %rbx, %rdi
callq 0x1bf90
| _Z34common_sampler_sample_and_accept_nP14common_samplerP13llama_contextRKSt6vectorIiSaIiEEb:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov ebp, r8d
mov r14, rcx
mov r15, rdx
mov r12, rsi
mov rbx, rdi
mov rsi, [rcx+8]
sub rsi, [rcx]
sar rsi, 2
inc rsi
lea r13, [rsp+58h+var_48]
lea rdx, [rsp+58h+var_49]
mov rdi, r13
call _ZNSt6vectorIiSaIiEEC2EmRKS0_; std::vector<int>::vector(ulong,std::allocator<int> const&)
mov rax, [r13+0]
mov rdx, [r13+8]
sub rdx, rax
jz loc_D01F0
sar rdx, 2
cmp rdx, 1
adc rdx, 0
lea rcx, [rdx+1]
and rcx, 0FFFFFFFFFFFFFFFEh
dec rdx
movq xmm0, rdx
pshufd xmm0, xmm0, 44h ; 'D'
movdqa xmm1, cs:xmmword_F06D0
xor edx, edx
movdqa xmm2, cs:xmmword_E8350
pxor xmm0, xmm2
pcmpeqd xmm3, xmm3
movdqa xmm4, cs:xmmword_F7110
loc_D0198:
movdqa xmm5, xmm1
pxor xmm5, xmm2
movdqa xmm6, xmm5
pcmpgtd xmm6, xmm0
pcmpeqd xmm5, xmm0
pshufd xmm7, xmm5, 0F5h
pand xmm7, xmm6
pshufd xmm5, xmm6, 0F5h
por xmm5, xmm7
movd esi, xmm5
not esi
test sil, 1
jz short loc_D01CD
mov [rax+rdx*4], edx
loc_D01CD:
pxor xmm5, xmm3
pextrw esi, xmm5, 4
test sil, 1
jz short loc_D01E3
lea esi, [rdx+1]
mov [rax+rdx*4+4], esi
loc_D01E3:
add rdx, 2
paddq xmm1, xmm4
cmp rcx, rdx
jnz short loc_D0198
loc_D01F0:
movzx r9d, bpl
lea rcx, [rsp+58h+var_48]
mov rdi, rbx
mov rsi, r12
mov rdx, r15
mov r8, r14
call _Z34common_sampler_sample_and_accept_nP14common_samplerP13llama_contextRKSt6vectorIiSaIiEES7_b; common_sampler_sample_and_accept_n(common_sampler *,llama_context *,std::vector<int> const&,std::vector<int> const&,bool)
mov rdi, [rsp+58h+var_48]; void *
test rdi, rdi
jz short loc_D0221
mov rsi, [rsp+58h+var_38]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_D0221:
mov rax, rbx
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, [rsp+arg_8]; void *
test rdi, rdi
jz short loc_D024D
mov rsi, [rsp+arg_18]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_D024D:
mov rdi, rbx
call __Unwind_Resume
| long long * common_sampler_sample_and_accept_n(
long long *a1,
_QWORD *a2,
long long a3,
long long *a4,
unsigned __int8 a5)
{
_DWORD *v8; // rax
long long v9; // rdx
unsigned long long v10; // rcx
__m128i v11; // xmm0
__m128i si128; // xmm1
long long v13; // rdx
__m128i v14; // xmm2
__m128i v15; // xmm0
__m128i v16; // xmm4
__m128i v17; // xmm5
__m128i v18; // xmm6
__m128i v19; // xmm5
void *v21; // [rsp+10h] [rbp-48h] BYREF
_BYTE *v22; // [rsp+18h] [rbp-40h]
long long v23; // [rsp+20h] [rbp-38h]
std::vector<int>::vector((long long)&v21, ((a4[1] - *a4) >> 2) + 1);
v8 = v21;
if ( v22 != v21 )
{
v9 = ((v22 - (_BYTE *)v21) >> 2 == 0) + ((v22 - (_BYTE *)v21) >> 2);
v10 = (v9 + 1) & 0xFFFFFFFFFFFFFFFELL;
v11 = _mm_shuffle_epi32((__m128i)(unsigned long long)(v9 - 1), 68);
si128 = _mm_load_si128((const __m128i *)&xmmword_F06D0);
v13 = 0LL;
v14 = _mm_load_si128((const __m128i *)&xmmword_E8350);
v15 = _mm_xor_si128(v11, v14);
v16 = _mm_load_si128((const __m128i *)&xmmword_F7110);
do
{
v17 = _mm_xor_si128(si128, v14);
v18 = _mm_cmpgt_epi32(v17, v15);
v19 = _mm_or_si128(
_mm_shuffle_epi32(v18, 245),
_mm_and_si128(_mm_shuffle_epi32(_mm_cmpeq_epi32(v17, v15), 245), v18));
if ( (~_mm_cvtsi128_si32(v19) & 1) != 0 )
v8[v13] = v13;
if ( (_mm_extract_epi16(_mm_xor_si128(v19, (__m128i)-1LL), 4) & 1) != 0 )
v8[v13 + 1] = v13 + 1;
v13 += 2LL;
si128 = _mm_add_epi64(si128, v16);
}
while ( v10 != v13 );
}
common_sampler_sample_and_accept_n(a1, a2, a3, &v21, a4, a5);
if ( v21 )
operator delete(v21, v23 - (_QWORD)v21);
return a1;
}
| common_sampler_sample_and_accept_n:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV EBP,R8D
MOV R14,RCX
MOV R15,RDX
MOV R12,RSI
MOV RBX,RDI
MOV RSI,qword ptr [RCX + 0x8]
SUB RSI,qword ptr [RCX]
SAR RSI,0x2
INC RSI
LEA R13,[RSP + 0x10]
LEA RDX,[RSP + 0xf]
MOV RDI,R13
CALL 0x001798d2
MOV RAX,qword ptr [R13]
MOV RDX,qword ptr [R13 + 0x8]
SUB RDX,RAX
JZ 0x001d01f0
SAR RDX,0x2
CMP RDX,0x1
ADC RDX,0x0
LEA RCX,[RDX + 0x1]
AND RCX,-0x2
DEC RDX
MOVQ XMM0,RDX
PSHUFD XMM0,XMM0,0x44
MOVDQA XMM1,xmmword ptr [0x001f06d0]
XOR EDX,EDX
MOVDQA XMM2,xmmword ptr [0x001e8350]
PXOR XMM0,XMM2
PCMPEQD XMM3,XMM3
MOVDQA XMM4,xmmword ptr [0x001f7110]
LAB_001d0198:
MOVDQA XMM5,XMM1
PXOR XMM5,XMM2
MOVDQA XMM6,XMM5
PCMPGTD XMM6,XMM0
PCMPEQD XMM5,XMM0
PSHUFD XMM7,XMM5,0xf5
PAND XMM7,XMM6
PSHUFD XMM5,XMM6,0xf5
POR XMM5,XMM7
MOVD ESI,XMM5
NOT ESI
TEST SIL,0x1
JZ 0x001d01cd
MOV dword ptr [RAX + RDX*0x4],EDX
LAB_001d01cd:
PXOR XMM5,XMM3
PEXTRW ESI,XMM5,0x4
TEST SIL,0x1
JZ 0x001d01e3
LEA ESI,[RDX + 0x1]
MOV dword ptr [RAX + RDX*0x4 + 0x4],ESI
LAB_001d01e3:
ADD RDX,0x2
PADDQ XMM1,XMM4
CMP RCX,RDX
JNZ 0x001d0198
LAB_001d01f0:
MOVZX R9D,BPL
LEA RCX,[RSP + 0x10]
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R15
MOV R8,R14
CALL 0x001cff71
LAB_001d020a:
MOV RDI,qword ptr [RSP + 0x10]
TEST RDI,RDI
JZ 0x001d0221
MOV RSI,qword ptr [RSP + 0x20]
SUB RSI,RDI
CALL 0x0011b8c0
LAB_001d0221:
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* common_sampler_sample_and_accept_n(common_sampler*, llama_context*, std::vector<int,
std::allocator<int> > const&, bool) */
common_sampler *
common_sampler_sample_and_accept_n
(common_sampler *param_1,llama_context *param_2,vector *param_3,bool param_4)
{
int1 auVar1 [16];
long lVar2;
long lVar3;
int7 in_register_00000009;
long lVar4;
long lVar5;
ulong uVar6;
int1 auVar7 [16];
int1 auVar8 [16];
int1 auVar9 [16];
void *local_48;
long local_40;
long local_38;
std::vector<int,std::allocator<int>>::vector
((ulong)&local_48,
(allocator *)
((((long *)CONCAT71(in_register_00000009,param_4))[1] -
*(long *)CONCAT71(in_register_00000009,param_4) >> 2) + 1));
lVar3 = _UNK_001f7118;
lVar2 = _DAT_001f7110;
auVar1 = _DAT_001e8350;
if (local_40 - (long)local_48 != 0) {
lVar4 = local_40 - (long)local_48 >> 2;
lVar4 = lVar4 + (ulong)(lVar4 == 0);
lVar5 = lVar4 + -1;
auVar7._8_4_ = (int)lVar5;
auVar7._0_8_ = lVar5;
auVar7._12_4_ = (int)((ulong)lVar5 >> 0x20);
uVar6 = 0;
auVar7 = auVar7 ^ _DAT_001e8350;
auVar8 = _DAT_001f06d0;
do {
auVar9 = auVar8 ^ auVar1;
if ((bool)(~(auVar9._4_4_ == auVar7._4_4_ && auVar7._0_4_ < auVar9._0_4_ ||
auVar7._4_4_ < auVar9._4_4_) & 1)) {
*(int *)((long)local_48 + uVar6 * 4) = (int)uVar6;
}
if ((auVar9._12_4_ != auVar7._12_4_ || auVar9._8_4_ <= auVar7._8_4_) &&
auVar9._12_4_ <= auVar7._12_4_) {
*(int *)((long)local_48 + uVar6 * 4 + 4) = (int)uVar6 + 1;
}
uVar6 = uVar6 + 2;
lVar5 = auVar8._8_8_;
auVar8._0_8_ = auVar8._0_8_ + lVar2;
auVar8._8_8_ = lVar5 + lVar3;
} while ((lVar4 + 1U & 0xfffffffffffffffe) != uVar6);
}
/* try { // try from 001d01f0 to 001d0209 has its CatchHandler @ 001d0233 */
common_sampler_sample_and_accept_n(param_1,param_2,param_3,(vector *)&local_48,param_4);
if (local_48 != (void *)0x0) {
operator_delete(local_48,local_38 - (long)local_48);
}
return param_1;
}
|
|
3,455 | minja::Parser::parseMathUnaryPlusMinus() | monkey531[P]llama/common/minja.hpp | std::shared_ptr<Expression> parseMathUnaryPlusMinus() {
static std::regex unary_plus_minus_tok(R"(\+|-(?![}%#]\}))");
auto op_str = consumeToken(unary_plus_minus_tok);
auto expr = parseExpansion();
if (!expr) throw std::runtime_error("Expected expr of 'unary plus/minus/expansion' expression");
if (!op_str.empty()) {
auto op = op_str == "+" ? UnaryOpExpr::Op::Plus : UnaryOpExpr::Op::Minus;
return std::make_shared<UnaryOpExpr>(get_location(), std::move(expr), op);
}
return expr;
} | O2 | cpp | minja::Parser::parseMathUnaryPlusMinus():
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x9b2f6(%rip), %rax # 0x1032e0
movb (%rax), %al
testb %al, %al
je 0x680c5
leaq 0x9b2c5(%rip), %rdx # 0x1032c0
leaq 0x30(%rsp), %rdi
pushq $0x1
popq %rcx
movq %r14, %rsi
callq 0x63d7c
movq %rsp, %rdi
movq %r14, %rsi
callq 0x68236
movq (%rsp), %rax
testq %rax, %rax
je 0x6811a
cmpq $0x0, 0x38(%rsp)
je 0x6808f
leaq 0x4fe22(%rip), %rsi # 0xb7e54
leaq 0x30(%rsp), %rdi
callq 0x2b7fb
xorb $0x1, %al
movzbl %al, %eax
movl %eax, 0x14(%rsp)
leaq 0x18(%rsp), %rdi
movq %r14, %rsi
callq 0x63958
leaq 0x50(%rsp), %rdi
leaq 0x18(%rsp), %rsi
movq %rsp, %rdx
leaq 0x14(%rsp), %rcx
callq 0x683fe
leaq 0x58(%rsp), %rdi
movaps -0x8(%rdi), %xmm0
andq $0x0, (%rdi)
movups %xmm0, (%rbx)
andq $0x0, -0x8(%rdi)
callq 0x52fe0
leaq 0x20(%rsp), %rdi
callq 0x52fe0
jmp 0x680a6
movq %rax, (%rbx)
movq 0x8(%rsp), %rax
andq $0x0, 0x8(%rsp)
movq %rax, 0x8(%rbx)
andq $0x0, (%rsp)
leaq 0x8(%rsp), %rdi
callq 0x52fe0
leaq 0x30(%rsp), %rdi
callq 0x254d8
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r14
retq
leaq 0x9b214(%rip), %rdi # 0x1032e0
callq 0x252e0
testl %eax, %eax
je 0x67ff4
leaq 0x9b1e0(%rip), %rdi # 0x1032c0
leaq 0x4f1d7(%rip), %rsi # 0xb72be
pushq $0x10
popq %rdx
callq 0x49b32
leaq -0x1e39e(%rip), %rdi # 0x49d58
leaq 0x9b1c3(%rip), %rsi # 0x1032c0
leaq 0x9a974(%rip), %rdx # 0x102a78
callq 0x24900
leaq 0x9b1d0(%rip), %rdi # 0x1032e0
callq 0x246d0
jmp 0x67ff4
pushq $0x10
popq %rdi
callq 0x244f0
movq %rax, %r14
leaq 0x4f27c(%rip), %rsi # 0xb73a8
movq %rax, %rdi
callq 0x24370
movq 0x99ead(%rip), %rsi # 0x101fe8
movq 0x99e06(%rip), %rdx # 0x101f48
movq %r14, %rdi
callq 0x251c0
movq %rax, %rbx
leaq 0x9b18c(%rip), %rdi # 0x1032e0
callq 0x246c0
jmp 0x68195
jmp 0x68179
movq %rax, %rbx
movq %r14, %rdi
callq 0x24780
jmp 0x6817c
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x52fe0
jmp 0x6817c
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x52fe0
jmp 0x6818b
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x254d8
movq %rbx, %rdi
callq 0x25250
nop
| _ZN5minja6Parser23parseMathUnaryPlusMinusEv:
push r14
push rbx
sub rsp, 68h
mov r14, rsi
mov rbx, rdi
lea rax, _ZGVZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; `guard variable for'minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok
mov al, [rax]
test al, al
jz loc_680C5
loc_67FF4:
lea rdx, _ZZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok
lea rdi, [rsp+78h+var_48]
push 1
pop rcx
mov rsi, r14
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
mov rdi, rsp; this
mov rsi, r14
call _ZN5minja6Parser14parseExpansionEv; minja::Parser::parseExpansion(void)
mov rax, [rsp+78h+var_78]
test rax, rax
jz loc_6811A
cmp [rsp+78h+var_40], 0
jz short loc_6808F
lea rsi, aSRN_0+0Bh; "+"
lea rdi, [rsp+78h+var_48]
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
xor al, 1
movzx eax, al
mov [rsp+78h+var_64], eax
lea rdi, [rsp+78h+var_60]; this
mov rsi, r14
call _ZNK5minja6Parser12get_locationEv; minja::Parser::get_location(void)
lea rdi, [rsp+78h+var_28]
lea rsi, [rsp+78h+var_60]
mov rdx, rsp
lea rcx, [rsp+78h+var_64]
call _ZSt11make_sharedIN5minja11UnaryOpExprEJNS0_8LocationESt10shared_ptrINS0_10ExpressionEERNS1_2OpEEES3_IT_EDpOT0_; std::make_shared<minja::UnaryOpExpr,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op &>(minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op &)
lea rdi, [rsp+78h+var_20]
movaps xmm0, xmmword ptr [rdi-8]
and qword ptr [rdi], 0
movups xmmword ptr [rbx], xmm0
and qword ptr [rdi-8], 0
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+78h+var_58]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_680A6
loc_6808F:
mov [rbx], rax
mov rax, [rsp+78h+var_70]
and [rsp+78h+var_70], 0
mov [rbx+8], rax
and [rsp+78h+var_78], 0
loc_680A6:
lea rdi, [rsp+78h+var_70]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+78h+var_48]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rax, rbx
add rsp, 68h
pop rbx
pop r14
retn
loc_680C5:
lea rdi, _ZGVZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_67FF4
lea rdi, _ZZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok
lea rsi, asc_B72BE; "\\+|-(?![}%#]\\})"
push 10h
pop rdx
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type)
lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc
lea rsi, _ZZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_67FF4
loc_6811A:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aExpectedExprOf; "Expected expr of 'unary plus/minus/expa"...
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
mov rbx, rax
lea rdi, _ZGVZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_68195
jmp short loc_68179
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_6817C
mov rbx, rax
lea rdi, [rsp+78h+var_58]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_6817C
loc_68179:
mov rbx, rax
loc_6817C:
lea rdi, [rsp+78h+var_70]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_6818B
mov rbx, rax
loc_6818B:
lea rdi, [rsp+78h+var_48]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_68195:
mov rdi, rbx
call __Unwind_Resume
| minja::Parser * minja::Parser::parseMathUnaryPlusMinus(minja::Parser *this, _QWORD *a2)
{
__int128 v2; // xmm0
long long v3; // rax
std::runtime_error *exception; // r14
long long v6; // [rsp+0h] [rbp-78h] BYREF
long long v7; // [rsp+8h] [rbp-70h] BYREF
BOOL v8; // [rsp+14h] [rbp-64h] BYREF
_BYTE v9[8]; // [rsp+18h] [rbp-60h] BYREF
long long v10; // [rsp+20h] [rbp-58h] BYREF
_QWORD v11[4]; // [rsp+30h] [rbp-48h] BYREF
_OWORD v12[2]; // [rsp+50h] [rbp-28h] BYREF
if ( !(_BYTE)`guard variable for'minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok[abi:cxx11],
(long long)"\\+|-(?![}%#]\\})",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok[abi:cxx11]);
}
minja::Parser::consumeToken(
v11,
(long long)a2,
(long long)&minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok[abi:cxx11],
1u);
minja::Parser::parseExpansion((minja::Parser *)&v6);
if ( !v6 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected expr of 'unary plus/minus/expansion' expression");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( v11[1] )
{
v8 = !std::operator==<char>((long long)v11);
minja::Parser::get_location((minja::Parser *)v9, a2);
std::make_shared<minja::UnaryOpExpr,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op &>(
v12,
v9,
&v6,
&v8);
v2 = v12[0];
*((_QWORD *)&v12[0] + 1) = 0LL;
*(_OWORD *)this = v2;
*(_QWORD *)&v12[0] = 0LL;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)v12 + 1);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v10);
}
else
{
*(_QWORD *)this = v6;
v3 = v7;
v7 = 0LL;
*((_QWORD *)this + 1) = v3;
v6 = 0LL;
}
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v7);
std::string::~string(v11);
return this;
}
| parseMathUnaryPlusMinus:
PUSH R14
PUSH RBX
SUB RSP,0x68
MOV R14,RSI
MOV RBX,RDI
LEA RAX,[0x2032e0]
MOV AL,byte ptr [RAX]
TEST AL,AL
JZ 0x001680c5
LAB_00167ff4:
LEA RDX,[0x2032c0]
LEA RDI,[RSP + 0x30]
PUSH 0x1
POP RCX
MOV RSI,R14
CALL 0x00163d7c
LAB_0016800b:
MOV RDI,RSP
MOV RSI,R14
CALL 0x00168236
MOV RAX,qword ptr [RSP]
TEST RAX,RAX
JZ 0x0016811a
CMP qword ptr [RSP + 0x38],0x0
JZ 0x0016808f
LEA RSI,[0x1b7e54]
LEA RDI,[RSP + 0x30]
CALL 0x0012b7fb
XOR AL,0x1
MOVZX EAX,AL
MOV dword ptr [RSP + 0x14],EAX
LAB_00168045:
LEA RDI,[RSP + 0x18]
MOV RSI,R14
CALL 0x00163958
LAB_00168052:
LEA RDI,[RSP + 0x50]
LEA RSI,[RSP + 0x18]
MOV RDX,RSP
LEA RCX,[RSP + 0x14]
CALL 0x001683fe
LEA RDI,[RSP + 0x58]
MOVAPS XMM0,xmmword ptr [RDI + -0x8]
AND qword ptr [RDI],0x0
MOVUPS xmmword ptr [RBX],XMM0
AND qword ptr [RDI + -0x8],0x0
CALL 0x00152fe0
LEA RDI,[RSP + 0x20]
CALL 0x00152fe0
JMP 0x001680a6
LAB_0016808f:
MOV qword ptr [RBX],RAX
MOV RAX,qword ptr [RSP + 0x8]
AND qword ptr [RSP + 0x8],0x0
MOV qword ptr [RBX + 0x8],RAX
AND qword ptr [RSP],0x0
LAB_001680a6:
LEA RDI,[RSP + 0x8]
CALL 0x00152fe0
LEA RDI,[RSP + 0x30]
CALL 0x001254d8
MOV RAX,RBX
ADD RSP,0x68
POP RBX
POP R14
RET
LAB_001680c5:
LEA RDI,[0x2032e0]
CALL 0x001252e0
TEST EAX,EAX
JZ 0x00167ff4
LAB_001680d9:
LEA RDI,[0x2032c0]
LEA RSI,[0x1b72be]
PUSH 0x10
POP RDX
CALL 0x00149b32
LAB_001680ef:
LEA RDI,[0x149d58]
LEA RSI,[0x2032c0]
LEA RDX,[0x202a78]
CALL 0x00124900
LEA RDI,[0x2032e0]
CALL 0x001246d0
JMP 0x00167ff4
LAB_0016811a:
PUSH 0x10
POP RDI
CALL 0x001244f0
MOV R14,RAX
LAB_00168125:
LEA RSI,[0x1b73a8]
MOV RDI,RAX
CALL 0x00124370
LAB_00168134:
MOV RSI,qword ptr [0x00201fe8]
MOV RDX,qword ptr [0x00201f48]
MOV RDI,R14
CALL 0x001251c0
|
/* minja::Parser::parseMathUnaryPlusMinus() */
void minja::Parser::parseMathUnaryPlusMinus(void)
{
long lVar1;
bool bVar2;
int iVar3;
runtime_error *this;
long *in_RDI;
long local_78;
long local_70;
uint local_64;
shared_ptr local_60 [8];
__shared_count<(__gnu_cxx::_Lock_policy)2> local_58 [16];
string local_48 [8];
long local_40;
long local_28;
long alStack_20 [2];
if (parseMathUnaryPlusMinus()::unary_plus_minus_tok_abi_cxx11_ == '\0') {
iVar3 = __cxa_guard_acquire(&parseMathUnaryPlusMinus()::unary_plus_minus_tok_abi_cxx11_);
if (iVar3 != 0) {
/* try { // try from 001680d9 to 001680ee has its CatchHandler @ 0016814a */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
((basic_regex<char,std::__cxx11::regex_traits<char>> *)
parseMathUnaryPlusMinus()::unary_plus_minus_tok_abi_cxx11_,"\\+|-(?![}%#]\\})",0x10
);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
parseMathUnaryPlusMinus()::unary_plus_minus_tok_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&parseMathUnaryPlusMinus()::unary_plus_minus_tok_abi_cxx11_);
}
}
consumeToken(local_48);
/* try { // try from 0016800b to 00168015 has its CatchHandler @ 00168188 */
parseExpansion();
lVar1 = local_70;
if (local_78 != 0) {
if (local_40 == 0) {
*in_RDI = local_78;
local_70 = 0;
in_RDI[1] = lVar1;
local_78 = 0;
}
else {
bVar2 = std::operator==(local_48,"+");
local_64 = (uint)!bVar2;
/* try { // try from 00168045 to 00168051 has its CatchHandler @ 00168179 */
get_location();
/* try { // try from 00168052 to 00168068 has its CatchHandler @ 0016816a */
std::
make_shared<minja::UnaryOpExpr,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op&>
((Location *)&local_28,local_60,(Op *)&local_78);
lVar1 = alStack_20[0];
alStack_20[0] = 0;
*in_RDI = local_28;
in_RDI[1] = lVar1;
local_28 = 0;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)alStack_20);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_58);
}
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_70);
std::__cxx11::string::~string(local_48);
return;
}
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00168125 to 00168133 has its CatchHandler @ 0016815d */
std::runtime_error::runtime_error
(this,"Expected expr of \'unary plus/minus/expansion\' expression");
/* try { // try from 00168134 to 00168149 has its CatchHandler @ 0016815b */
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_00201fe8,PTR__runtime_error_00201f48);
}
|
|
3,456 | u64toa_radix_reverse | bluesky950520[P]quickjs/tests/test_conv.c | size_t u64toa_radix_reverse(char buf[minimum_length(65)], uint64_t n, unsigned base)
{
if (likely(n < 0x100000000))
return u32toa_radix_reverse(buf, n, base);
#ifdef USE_SPECIAL_RADIX_10
if (likely(base == 10))
return u64toa_reverse(buf, n);
#endif
char *end;
size_t len = 0;
while (n >= base) {
uint32_t quo = n % base;
n /= base;
buf[len++] = digits36[quo];
}
buf[len++] = digits36[n];
buf[len] = '\0';
for (end = buf + len - 1; buf < end;) {
char c = *buf;
*buf++ = *end;
*end-- = c;
}
return len;
} | O0 | c | u64toa_radix_reverse:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movl %edx, 0x1c(%rsp)
movabsq $0x100000000, %rax # imm = 0x100000000
cmpq %rax, 0x20(%rsp)
setb %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x4754
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rax
movl %eax, %esi
movl 0x1c(%rsp), %edx
callq 0x45b0
movq %rax, 0x30(%rsp)
jmp 0x488e
cmpl $0xa, 0x1c(%rsp)
sete %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x4786
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x3cc0
movq %rax, 0x30(%rsp)
jmp 0x488e
movq $0x0, 0x8(%rsp)
movq 0x20(%rsp), %rax
movl 0x1c(%rsp), %ecx
cmpq %rcx, %rax
jb 0x47f1
movq 0x20(%rsp), %rax
movl 0x1c(%rsp), %ecx
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, 0x4(%rsp)
movl 0x1c(%rsp), %eax
movl %eax, %ecx
movq 0x20(%rsp), %rax
xorl %edx, %edx
divq %rcx
movq %rax, 0x20(%rsp)
movl 0x4(%rsp), %eax
movl %eax, %ecx
leaq 0x884d(%rip), %rax # 0xd020
movb (%rax,%rcx), %dl
movq 0x28(%rsp), %rax
movq 0x8(%rsp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, 0x8(%rsp)
movb %dl, (%rax,%rcx)
jmp 0x478f
movq 0x20(%rsp), %rcx
leaq 0x8823(%rip), %rax # 0xd020
movb (%rax,%rcx), %dl
movq 0x28(%rsp), %rax
movq 0x8(%rsp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, 0x8(%rsp)
movb %dl, (%rax,%rcx)
movq 0x28(%rsp), %rax
movq 0x8(%rsp), %rcx
movb $0x0, (%rax,%rcx)
movq 0x28(%rsp), %rax
addq 0x8(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x10(%rsp)
movq 0x28(%rsp), %rax
cmpq 0x10(%rsp), %rax
jae 0x4884
movq 0x28(%rsp), %rax
movb (%rax), %al
movb %al, 0x3(%rsp)
movq 0x10(%rsp), %rax
movb (%rax), %cl
movq 0x28(%rsp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x28(%rsp)
movb %cl, (%rax)
movb 0x3(%rsp), %cl
movq 0x10(%rsp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, 0x10(%rsp)
movb %cl, (%rax)
jmp 0x483a
movq 0x8(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nopl (%rax,%rax)
| u64toa_radix_reverse:
sub rsp, 38h
mov [rsp+38h+var_10], rdi
mov [rsp+38h+var_18], rsi
mov [rsp+38h+var_1C], edx
mov rax, 100000000h
cmp [rsp+38h+var_18], rax
setb al
xor al, 0FFh
xor al, 0FFh
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_4754
mov rdi, [rsp+38h+var_10]
mov rax, [rsp+38h+var_18]
mov esi, eax
mov edx, [rsp+38h+var_1C]
call u32toa_radix_reverse
mov [rsp+38h+var_8], rax
jmp loc_488E
loc_4754:
cmp [rsp+38h+var_1C], 0Ah
setz al
xor al, 0FFh
xor al, 0FFh
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_4786
mov rdi, [rsp+38h+var_10]
mov rsi, [rsp+38h+var_18]
call u64toa_reverse
mov [rsp+38h+var_8], rax
jmp loc_488E
loc_4786:
mov [rsp+38h+var_30], 0
loc_478F:
mov rax, [rsp+38h+var_18]
mov ecx, [rsp+38h+var_1C]
cmp rax, rcx
jb short loc_47F1
mov rax, [rsp+38h+var_18]
mov ecx, [rsp+38h+var_1C]
xor edx, edx
div rcx
mov eax, edx
mov [rsp+38h+var_34], eax
mov eax, [rsp+38h+var_1C]
mov ecx, eax
mov rax, [rsp+38h+var_18]
xor edx, edx
div rcx
mov [rsp+38h+var_18], rax
mov eax, [rsp+38h+var_34]
mov ecx, eax
lea rax, digits36; "0123456789abcdefghijklmnopqrstuvwxyz"
mov dl, [rax+rcx]
mov rax, [rsp+38h+var_10]
mov rcx, [rsp+38h+var_30]
mov rsi, rcx
add rsi, 1
mov [rsp+38h+var_30], rsi
mov [rax+rcx], dl
jmp short loc_478F
loc_47F1:
mov rcx, [rsp+38h+var_18]
lea rax, digits36; "0123456789abcdefghijklmnopqrstuvwxyz"
mov dl, [rax+rcx]
mov rax, [rsp+38h+var_10]
mov rcx, [rsp+38h+var_30]
mov rsi, rcx
add rsi, 1
mov [rsp+38h+var_30], rsi
mov [rax+rcx], dl
mov rax, [rsp+38h+var_10]
mov rcx, [rsp+38h+var_30]
mov byte ptr [rax+rcx], 0
mov rax, [rsp+38h+var_10]
add rax, [rsp+38h+var_30]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rsp+38h+var_28], rax
loc_483A:
mov rax, [rsp+38h+var_10]
cmp rax, [rsp+38h+var_28]
jnb short loc_4884
mov rax, [rsp+38h+var_10]
mov al, [rax]
mov [rsp+38h+var_35], al
mov rax, [rsp+38h+var_28]
mov cl, [rax]
mov rax, [rsp+38h+var_10]
mov rdx, rax
add rdx, 1
mov [rsp+38h+var_10], rdx
mov [rax], cl
mov cl, [rsp+38h+var_35]
mov rax, [rsp+38h+var_28]
mov rdx, rax
add rdx, 0FFFFFFFFFFFFFFFFh
mov [rsp+38h+var_28], rdx
mov [rax], cl
jmp short loc_483A
loc_4884:
mov rax, [rsp+38h+var_30]
mov [rsp+38h+var_8], rax
loc_488E:
mov rax, [rsp+38h+var_8]
add rsp, 38h
retn
| long long u64toa_radix_reverse(char *a1, unsigned long long a2, unsigned int a3)
{
long long v3; // rcx
long long v4; // rcx
char *v5; // rax
char *v6; // rax
char v8; // [rsp+3h] [rbp-35h]
int v9; // [rsp+4h] [rbp-34h]
long long v10; // [rsp+8h] [rbp-30h]
long long v11; // [rsp+8h] [rbp-30h]
char *i; // [rsp+10h] [rbp-28h]
unsigned long long v13; // [rsp+20h] [rbp-18h]
char *v14; // [rsp+28h] [rbp-10h]
v14 = a1;
v13 = a2;
if ( a2 < 0x100000000LL )
return u32toa_radix_reverse(a1, a2, a3);
if ( a3 == 10 )
return u64toa_reverse(a1, a2);
v10 = 0LL;
while ( v13 >= a3 )
{
v9 = v13 % a3;
v13 /= a3;
v3 = v10++;
a1[v3] = digits36[v9];
}
v4 = v10;
v11 = v10 + 1;
a1[v4] = digits36[v13];
a1[v11] = 0;
for ( i = &a1[v11 - 1]; v14 < i; --i )
{
v8 = *v14;
v5 = v14++;
*v5 = *i;
v6 = i;
*v6 = v8;
}
return v11;
}
| u64toa_radix_reverse:
SUB RSP,0x38
MOV qword ptr [RSP + 0x28],RDI
MOV qword ptr [RSP + 0x20],RSI
MOV dword ptr [RSP + 0x1c],EDX
MOV RAX,0x100000000
CMP qword ptr [RSP + 0x20],RAX
SETC AL
XOR AL,0xff
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x00104754
MOV RDI,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RSP + 0x20]
MOV ESI,EAX
MOV EDX,dword ptr [RSP + 0x1c]
CALL 0x001045b0
MOV qword ptr [RSP + 0x30],RAX
JMP 0x0010488e
LAB_00104754:
CMP dword ptr [RSP + 0x1c],0xa
SETZ AL
XOR AL,0xff
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x00104786
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP + 0x20]
CALL 0x00103cc0
MOV qword ptr [RSP + 0x30],RAX
JMP 0x0010488e
LAB_00104786:
MOV qword ptr [RSP + 0x8],0x0
LAB_0010478f:
MOV RAX,qword ptr [RSP + 0x20]
MOV ECX,dword ptr [RSP + 0x1c]
CMP RAX,RCX
JC 0x001047f1
MOV RAX,qword ptr [RSP + 0x20]
MOV ECX,dword ptr [RSP + 0x1c]
XOR EDX,EDX
DIV RCX
MOV EAX,EDX
MOV dword ptr [RSP + 0x4],EAX
MOV EAX,dword ptr [RSP + 0x1c]
MOV ECX,EAX
MOV RAX,qword ptr [RSP + 0x20]
XOR EDX,EDX
DIV RCX
MOV qword ptr [RSP + 0x20],RAX
MOV EAX,dword ptr [RSP + 0x4]
MOV ECX,EAX
LEA RAX,[0x10d020]
MOV DL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RSP + 0x28]
MOV RCX,qword ptr [RSP + 0x8]
MOV RSI,RCX
ADD RSI,0x1
MOV qword ptr [RSP + 0x8],RSI
MOV byte ptr [RAX + RCX*0x1],DL
JMP 0x0010478f
LAB_001047f1:
MOV RCX,qword ptr [RSP + 0x20]
LEA RAX,[0x10d020]
MOV DL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RSP + 0x28]
MOV RCX,qword ptr [RSP + 0x8]
MOV RSI,RCX
ADD RSI,0x1
MOV qword ptr [RSP + 0x8],RSI
MOV byte ptr [RAX + RCX*0x1],DL
MOV RAX,qword ptr [RSP + 0x28]
MOV RCX,qword ptr [RSP + 0x8]
MOV byte ptr [RAX + RCX*0x1],0x0
MOV RAX,qword ptr [RSP + 0x28]
ADD RAX,qword ptr [RSP + 0x8]
ADD RAX,-0x1
MOV qword ptr [RSP + 0x10],RAX
LAB_0010483a:
MOV RAX,qword ptr [RSP + 0x28]
CMP RAX,qword ptr [RSP + 0x10]
JNC 0x00104884
MOV RAX,qword ptr [RSP + 0x28]
MOV AL,byte ptr [RAX]
MOV byte ptr [RSP + 0x3],AL
MOV RAX,qword ptr [RSP + 0x10]
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RSP + 0x28]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RSP + 0x28],RDX
MOV byte ptr [RAX],CL
MOV CL,byte ptr [RSP + 0x3]
MOV RAX,qword ptr [RSP + 0x10]
MOV RDX,RAX
ADD RDX,-0x1
MOV qword ptr [RSP + 0x10],RDX
MOV byte ptr [RAX],CL
JMP 0x0010483a
LAB_00104884:
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x30],RAX
LAB_0010488e:
MOV RAX,qword ptr [RSP + 0x30]
ADD RSP,0x38
RET
|
long u64toa_radix_reverse(int1 *param_1,ulong param_2,uint param_3)
{
int1 uVar1;
ulong uVar2;
long local_30;
int1 *local_28;
ulong local_18;
int1 *local_10;
long local_8;
if (param_2 < 0x100000000) {
local_8 = u32toa_radix_reverse(param_1,param_2 & 0xffffffff,param_3);
}
else if (param_3 == 10) {
local_8 = u64toa_reverse(param_1,param_2);
}
else {
local_30 = 0;
local_18 = param_2;
while (param_3 <= local_18) {
uVar2 = local_18 % (ulong)param_3;
local_18 = local_18 / param_3;
param_1[local_30] = "?0123456789abcdefghijklmnopqrstuvwxyz"[uVar2 + 1];
local_30 = local_30 + 1;
}
local_8 = local_30 + 1;
param_1[local_30] = "?0123456789abcdefghijklmnopqrstuvwxyz"[local_18 + 1];
param_1[local_8] = 0;
local_28 = param_1 + local_8;
local_10 = param_1;
while (local_28 = local_28 + -1, local_10 < local_28) {
uVar1 = *local_10;
*local_10 = *local_28;
*local_28 = uVar1;
local_10 = local_10 + 1;
}
}
return local_8;
}
|
|
3,457 | my_hash_init2 | eloqsql/mysys/hash.c | my_bool
my_hash_init2(PSI_memory_key psi_key, HASH *hash, uint growth_size,
CHARSET_INFO *charset, ulong size, size_t key_offset,
size_t key_length, my_hash_get_key get_key,
my_hash_function hash_function,
void (*free_element)(void*), uint flags)
{
my_bool res;
DBUG_ENTER("my_hash_init2");
DBUG_PRINT("enter",("hash:%p size: %u", hash, (uint) size));
hash->records=0;
hash->key_offset=key_offset;
hash->key_length=key_length;
hash->blength=1;
hash->get_key=get_key;
hash->hash_function= hash_function ? hash_function : my_hash_sort;
hash->free=free_element;
hash->flags=flags;
hash->charset=charset;
res= init_dynamic_array2(psi_key, &hash->array, sizeof(HASH_LINK), NULL, size,
growth_size, MYF((flags & HASH_THREAD_SPECIFIC ?
MY_THREAD_SPECIFIC : 0)));
DBUG_RETURN(res);
} | O3 | c | my_hash_init2:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edx, %eax
movl 0x30(%rbp), %edx
movq 0x28(%rbp), %r10
movq 0x20(%rbp), %r11
movq 0x18(%rbp), %rbx
movq 0x10(%rbp), %r14
movq $0x0, 0x18(%rsi)
movq %r9, (%rsi)
movq %r14, 0x8(%rsi)
movq $0x1, 0x10(%rsi)
movq %rbx, 0x50(%rsi)
testq %r11, %r11
jne 0x4bccc
leaq -0x7c(%rip), %r11 # 0x4bc50
movq %r11, 0x58(%rsi)
movq %r10, 0x60(%rsi)
movl %edx, 0x20(%rsi)
movq %rcx, 0x68(%rsi)
addq $0x28, %rsi
andl $0x2, %edx
shll $0xf, %edx
movq %rdx, (%rsp)
movl $0x10, %edx
xorl %ecx, %ecx
movl %eax, %r9d
callq 0x466c0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
| my_hash_init2:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 10h
mov eax, edx
mov edx, [rbp+arg_20]
mov r10, [rbp+arg_18]
mov r11, [rbp+arg_10]
mov rbx, [rbp+arg_8]
mov r14, [rbp+arg_0]
mov qword ptr [rsi+18h], 0
mov [rsi], r9
mov [rsi+8], r14
mov qword ptr [rsi+10h], 1
mov [rsi+50h], rbx
test r11, r11
jnz short loc_4BCCC
lea r11, my_hash_sort
loc_4BCCC:
mov [rsi+58h], r11
mov [rsi+60h], r10
mov [rsi+20h], edx
mov [rsi+68h], rcx
add rsi, 28h ; '('
and edx, 2
shl edx, 0Fh
mov [rsp+20h+var_20], rdx
mov edx, 10h
xor ecx, ecx
mov r9d, eax
call init_dynamic_array2
add rsp, 10h
pop rbx
pop r14
pop rbp
retn
| long long my_hash_init2(
long long a1,
long long a2,
unsigned int a3,
long long a4,
unsigned int a5,
long long a6,
long long a7,
long long a8,
long long ( *a9)(long long a1, long long a2, long long a3),
long long a10,
int a11)
{
long long ( *v11)(long long, long long, long long); // r11
v11 = a9;
*(_QWORD *)(a2 + 24) = 0LL;
*(_QWORD *)a2 = a6;
*(_QWORD *)(a2 + 8) = a7;
*(_QWORD *)(a2 + 16) = 1LL;
*(_QWORD *)(a2 + 80) = a8;
if ( !a9 )
v11 = my_hash_sort;
*(_QWORD *)(a2 + 88) = v11;
*(_QWORD *)(a2 + 96) = a10;
*(_DWORD *)(a2 + 32) = a11;
*(_QWORD *)(a2 + 104) = a4;
return init_dynamic_array2(a1, a2 + 40, 0x10u, 0LL, a5, a3, (unsigned __int8)(a11 & 2) << 15);
}
| my_hash_init2:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV EAX,EDX
MOV EDX,dword ptr [RBP + 0x30]
MOV R10,qword ptr [RBP + 0x28]
MOV R11,qword ptr [RBP + 0x20]
MOV RBX,qword ptr [RBP + 0x18]
MOV R14,qword ptr [RBP + 0x10]
MOV qword ptr [RSI + 0x18],0x0
MOV qword ptr [RSI],R9
MOV qword ptr [RSI + 0x8],R14
MOV qword ptr [RSI + 0x10],0x1
MOV qword ptr [RSI + 0x50],RBX
TEST R11,R11
JNZ 0x0014bccc
LEA R11,[0x14bc50]
LAB_0014bccc:
MOV qword ptr [RSI + 0x58],R11
MOV qword ptr [RSI + 0x60],R10
MOV dword ptr [RSI + 0x20],EDX
MOV qword ptr [RSI + 0x68],RCX
ADD RSI,0x28
AND EDX,0x2
SHL EDX,0xf
MOV qword ptr [RSP],RDX
MOV EDX,0x10
XOR ECX,ECX
MOV R9D,EAX
CALL 0x001466c0
ADD RSP,0x10
POP RBX
POP R14
POP RBP
RET
|
void my_hash_init2(int8 param_1,int8 *param_2,int4 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
code *param_9,int8 param_10,uint param_11)
{
param_2[3] = 0;
*param_2 = param_6;
param_2[1] = param_7;
param_2[2] = 1;
param_2[10] = param_8;
if (param_9 == (code *)0x0) {
param_9 = my_hash_sort;
}
param_2[0xb] = param_9;
param_2[0xc] = param_10;
*(uint *)(param_2 + 4) = param_11;
param_2[0xd] = param_4;
init_dynamic_array2(param_1,param_2 + 5,0x10,0,param_5,param_3,(param_11 & 2) << 0xf);
return;
}
|
|
3,458 | minja::Parser::parseValueExpression()::'lambda'()::operator()() const | monkey531[P]llama/common/./minja.hpp | std::shared_ptr<Expression> parseValueExpression() {
auto parseValue = [&]() -> std::shared_ptr<Expression> {
auto location = get_location();
auto constant = parseConstant();
if (constant) return std::make_shared<LiteralExpr>(location, *constant);
static std::regex null_regex(R"(null\b)");
if (!consumeToken(null_regex).empty()) return std::make_shared<LiteralExpr>(location, Value());
auto identifier = parseIdentifier();
if (identifier) return identifier;
auto braced = parseBracedExpressionOrArray();
if (braced) return braced;
auto array = parseArray();
if (array) return array;
auto dictionary = parseDictionary();
if (dictionary) return dictionary;
throw std::runtime_error("Expected value expression");
};
auto value = parseValue();
while (it != end && consumeSpaces() && peekSymbols({ "[", "." })) {
if (!consumeToken("[").empty()) {
std::shared_ptr<Expression> index;
if (!consumeToken(":").empty()) {
auto slice_end = parseExpression();
index = std::make_shared<SliceExpr>(slice_end->location, nullptr, std::move(slice_end));
} else {
auto slice_start = parseExpression();
if (!consumeToken(":").empty()) {
consumeSpaces();
if (peekSymbols({ "]" })) {
index = std::make_shared<SliceExpr>(slice_start->location, std::move(slice_start), nullptr);
} else {
auto slice_end = parseExpression();
index = std::make_shared<SliceExpr>(slice_start->location, std::move(slice_start), std::move(slice_end));
}
} else {
index = std::move(slice_start);
}
}
if (!index) throw std::runtime_error("Empty index in subscript");
if (consumeToken("]").empty()) throw std::runtime_error("Expected closing bracket in subscript");
value = std::make_shared<SubscriptExpr>(value->location, std::move(value), std::move(index));
} else if (!consumeToken(".").empty()) {
auto identifier = parseIdentifier();
if (!identifier) throw std::runtime_error("Expected identifier in subscript");
consumeSpaces();
if (peekSymbols({ "(" })) {
auto callParams = parseCallArgs();
value = std::make_shared<MethodCallExpr>(identifier->location, std::move(value), std::move(identifier), std::move(callParams));
} else {
auto key = std::make_shared<LiteralExpr>(identifier->location, Value(identifier->get_name()));
value = std::make_shared<SubscriptExpr>(identifier->location, std::move(value), std::move(key));
}
}
consumeSpaces();
}
if (peekSymbols({ "(" })) {
auto location = get_location();
auto callParams = parseCallArgs();
value = std::make_shared<CallExpr>(location, std::move(value), std::move(callParams));
}
return value;
} | O3 | cpp | minja::Parser::parseValueExpression()::'lambda'()::operator()() const:
pushq %r15
pushq %r14
pushq %rbx
subq $0xa0, %rsp
movq %rdi, %rbx
movq (%rsi), %r14
movq (%r14), %rax
movq %rax, 0x28(%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x30(%rsp)
testq %rax, %rax
je 0x41b49
movq 0xae465(%rip), %rcx # 0xeffa0
cmpb $0x0, (%rcx)
je 0x41b45
incl 0x8(%rax)
jmp 0x41b49
lock
incl 0x8(%rax)
movq 0x20(%r14), %rax
subq 0x10(%r14), %rax
movq %rax, 0x38(%rsp)
leaq 0x40(%rsp), %rdi
movq %r14, %rsi
callq 0x425fe
movq 0x40(%rsp), %r8
testq %r8, %r8
je 0x41bc2
leaq 0x58(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x50(%rsp), %rsi
movq %rsp, %rdx
leaq 0x28(%rsp), %rcx
callq 0x4f258
movaps 0x50(%rsp), %xmm0
movups %xmm0, (%rbx)
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x41ba3
callq 0x2f80e
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x41bb2
callq 0x2f80e
movq %rbx, %rax
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %r15
retq
movb 0xaf338(%rip), %al # 0xf0f00
testb %al, %al
je 0x41dc6
leaq 0xaf309(%rip), %rdx # 0xf0ee0
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
movl $0x1, %ecx
callq 0x2fd6a
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
movq -0x8(%rax), %r15
cmpq %rax, %rdi
je 0x41c08
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x186a0
testq %r15, %r15
je 0x41cee
leaq 0x90(%rsp), %r14
xorl %r15d, %r15d
movq %r15, 0x8(%r14)
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%r14)
movaps %xmm0, -0x30(%r14)
movaps %xmm0, -0x20(%r14)
movaps %xmm0, -0x10(%r14)
movb $0x0, (%r14)
movq %r14, %rdi
movl $0x1, %esi
callq 0x3d970
movq %r14, %rdi
movl $0x1, %esi
callq 0x3d970
leaq 0x8(%rsp), %rdi
movq %r15, -0x8(%rdi)
movq %rsp, %rsi
leaq 0x18(%rsp), %rdx
leaq 0x28(%rsp), %rcx
leaq 0x50(%rsp), %r8
callq 0x5611a
movaps (%rsp), %xmm0
xorl %eax, %eax
movq %rax, 0x8(%rsp)
movups %xmm0, (%rbx)
movq %rax, (%rsp)
movq %r14, %rdi
xorl %esi, %esi
callq 0x3d970
movq %r14, %rdi
callq 0x4a5c0
movq 0x88(%rsp), %rdi
testq %rdi, %rdi
je 0x41cab
callq 0x2f80e
movq 0x78(%rsp), %rdi
testq %rdi, %rdi
je 0x41cba
callq 0x2f80e
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x41cc9
callq 0x2f80e
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x41b94
movq 0xae2c2(%rip), %rax # 0xeffa0
cmpb $0x0, (%rax)
je 0x41d16
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0x41d20
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0x303fe
movq 0x50(%rsp), %rax
testq %rax, %rax
je 0x41d34
movq %rax, (%rbx)
movq 0x58(%rsp), %rax
movq %rax, 0x8(%rbx)
jmp 0x41b94
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0x41b94
movq (%rdi), %rax
callq *0x18(%rax)
jmp 0x41b94
movq %rsp, %rdi
movq %r14, %rsi
callq 0x42996
movq (%rsp), %rax
testq %rax, %rax
je 0x41d56
movq %rax, (%rbx)
movq 0x8(%rsp), %rax
movq %rax, 0x8(%rbx)
jmp 0x41dae
leaq 0x18(%rsp), %rdi
movq %r14, %rsi
callq 0x42ef6
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0x41d7b
movq %rax, (%rbx)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rbx)
jmp 0x41d9f
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4351c
cmpq $0x0, (%rbx)
je 0x41e1d
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x41d9f
callq 0x2f80e
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x41dae
callq 0x2f80e
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x41b94
callq 0x2f80e
jmp 0x41b94
leaq 0xaf133(%rip), %rdi # 0xf0f00
callq 0x18be0
testl %eax, %eax
je 0x41bd0
leaq 0xaf0ff(%rip), %rdi # 0xf0ee0
leaq 0x7560d(%rip), %rsi # 0xb73f5
movl $0x10, %edx
callq 0x2f87e
leaq -0x12513(%rip), %rdi # 0x2f8e6
leaq 0xaf0e0(%rip), %rsi # 0xf0ee0
leaq 0xae891(%rip), %rdx # 0xf0698
callq 0x185d0
leaq 0xaf0ed(%rip), %rdi # 0xf0f00
callq 0x18450
jmp 0x41bd0
movl $0x10, %edi
callq 0x18360
movq %rax, %r15
leaq 0x755cb(%rip), %rsi # 0xb73fc
movq %rax, %rdi
callq 0x18270
movq 0xae1b0(%rip), %rsi # 0xefff0
movq 0xae139(%rip), %rdx # 0xeff80
movq %r15, %rdi
callq 0x18b30
movq %rax, %r14
leaq 0xaf0a7(%rip), %rdi # 0xf0f00
callq 0x18440
jmp 0x41ed2
movq %rax, %r14
jmp 0x41e70
movq %rax, %r14
movq %r15, %rdi
callq 0x18500
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x41e83
callq 0x2f80e
jmp 0x41e83
movq %rax, %r14
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x41e97
callq 0x2f80e
jmp 0x41e97
movq %rax, %r14
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x41eab
callq 0x2f80e
jmp 0x41eab
movq %rax, %r14
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x41ed2
callq 0x2f80e
jmp 0x41ed2
jmp 0x41ecf
movq %rax, %r14
leaq 0x50(%rsp), %rdi
callq 0x3d8e4
jmp 0x41ed2
jmp 0x41ecf
movq %rax, %r14
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x41ee6
callq 0x2f80e
jmp 0x41ee6
movq %rax, %r14
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x41ef5
callq 0x2f80e
movq %r14, %rdi
callq 0x18b90
nop
| _ZZN5minja6Parser20parseValueExpressionEvENKUlvE_clEv:
push r15
push r14
push rbx
sub rsp, 0A0h
mov rbx, rdi
mov r14, [rsi]
mov rax, [r14]
mov [rsp+0B8h+var_90], rax
mov rax, [r14+8]
mov [rsp+0B8h+var_88], rax
test rax, rax
jz short loc_41B49
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_41B45
inc dword ptr [rax+8]
jmp short loc_41B49
loc_41B45:
lock inc dword ptr [rax+8]
loc_41B49:
mov rax, [r14+20h]
sub rax, [r14+10h]
mov [rsp+0B8h+var_80], rax
lea rdi, [rsp+0B8h+var_78]; this
mov rsi, r14
call _ZN5minja6Parser13parseConstantEv; minja::Parser::parseConstant(void)
mov r8, [rsp+0B8h+var_78]
test r8, r8
jz short loc_41BC2
lea rdi, [rsp+0B8h+var_68+8]
mov qword ptr [rdi-8], 0
lea rsi, [rsp+0B8h+var_68]
mov rdx, rsp
lea rcx, [rsp+0B8h+var_90]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IN5minja11LiteralExprESaIS5_EJRNS4_8LocationERNS4_5ValueEEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::LiteralExpr,std::allocator<minja::LiteralExpr>,minja::Location &,minja::Value &>(minja::LiteralExpr *&,std::_Sp_alloc_shared_tag<std::allocator<minja::LiteralExpr>>,minja::Location &,minja::Value &)
movaps xmm0, [rsp+0B8h+var_68]
movups xmmword ptr [rbx], xmm0
loc_41B94:
mov rdi, [rsp+0B8h+var_70]
test rdi, rdi
jz short loc_41BA3
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_41BA3:
mov rdi, [rsp+0B8h+var_88]
test rdi, rdi
jz short loc_41BB2
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_41BB2:
mov rax, rbx
add rsp, 0A0h
pop rbx
pop r14
pop r15
retn
loc_41BC2:
mov al, cs:_ZGVZZN5minja6Parser20parseValueExpressionEvENKUlvE_clEvE10null_regexB5cxx11; `guard variable for'minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator() const(void)::null_regex
test al, al
jz loc_41DC6
loc_41BD0:
lea rdx, _ZZZN5minja6Parser20parseValueExpressionEvENKUlvE_clEvE10null_regexB5cxx11; minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator() const(void)::null_regex
lea rdi, [rsp+0B8h+var_68]
mov rsi, r14
mov ecx, 1
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
lea rax, [rsp+0B8h+var_58]
mov rdi, [rax-10h]; void *
mov r15, [rax-8]
cmp rdi, rax
jz short loc_41C08
mov rsi, [rsp+0B8h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_41C08:
test r15, r15
jz loc_41CEE
lea r14, [rsp+0B8h+var_28]
xor r15d, r15d
mov [r14+8], r15
xorps xmm0, xmm0
movaps xmmword ptr [r14-40h], xmm0
movaps xmmword ptr [r14-30h], xmm0
movaps xmmword ptr [r14-20h], xmm0
movaps xmmword ptr [r14-10h], xmm0
mov byte ptr [r14], 0
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
lea rdi, [rsp+0B8h+var_B0]
mov [rdi-8], r15
mov rsi, rsp
lea rdx, [rsp+0B8h+var_A0]
lea rcx, [rsp+0B8h+var_90]
lea r8, [rsp+0B8h+var_68]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IN5minja11LiteralExprESaIS5_EJRNS4_8LocationENS4_5ValueEEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::LiteralExpr,std::allocator<minja::LiteralExpr>,minja::Location &,minja::Value>(minja::LiteralExpr *&,std::_Sp_alloc_shared_tag<std::allocator<minja::LiteralExpr>>,minja::Location &,minja::Value &&)
movaps xmm0, xmmword ptr [rsp]
xor eax, eax
mov [rsp+0B8h+var_B0], rax
movups xmmword ptr [rbx], xmm0
mov [rsp+0B8h+var_B8], rax
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [rsp+0B8h+var_30]
test rdi, rdi
jz short loc_41CAB
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_41CAB:
mov rdi, [rsp+0B8h+var_40]
test rdi, rdi
jz short loc_41CBA
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_41CBA:
mov rdi, [rsp+0B8h+var_50]
test rdi, rdi
jz short loc_41CC9
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_41CC9:
mov rdi, qword ptr [rsp+0B8h+var_68+8]
test rdi, rdi
jz loc_41B94
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_41D16
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_41D20
loc_41CEE:
lea rdi, [rsp+0B8h+var_68]; this
mov rsi, r14
call _ZN5minja6Parser15parseIdentifierEv; minja::Parser::parseIdentifier(void)
mov rax, qword ptr [rsp+0B8h+var_68]
test rax, rax
jz short loc_41D34
mov [rbx], rax
mov rax, qword ptr [rsp+0B8h+var_68+8]
mov [rbx+8], rax
jmp loc_41B94
loc_41D16:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_41D20:
cmp eax, 1
jnz loc_41B94
mov rax, [rdi]
call qword ptr [rax+18h]
jmp loc_41B94
loc_41D34:
mov rdi, rsp; this
mov rsi, r14
call _ZN5minja6Parser28parseBracedExpressionOrArrayEv; minja::Parser::parseBracedExpressionOrArray(void)
mov rax, [rsp+0B8h+var_B8]
test rax, rax
jz short loc_41D56
mov [rbx], rax
mov rax, [rsp+0B8h+var_B0]
mov [rbx+8], rax
jmp short loc_41DAE
loc_41D56:
lea rdi, [rsp+0B8h+var_A0]; this
mov rsi, r14
call _ZN5minja6Parser10parseArrayEv; minja::Parser::parseArray(void)
mov rax, [rsp+0B8h+var_A0]
test rax, rax
jz short loc_41D7B
mov [rbx], rax
mov rax, [rsp+0B8h+var_98]
mov [rbx+8], rax
jmp short loc_41D9F
loc_41D7B:
mov rdi, rbx; this
mov rsi, r14
call _ZN5minja6Parser15parseDictionaryEv; minja::Parser::parseDictionary(void)
cmp qword ptr [rbx], 0
jz loc_41E1D
mov rdi, [rsp+0B8h+var_98]
test rdi, rdi
jz short loc_41D9F
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_41D9F:
mov rdi, [rsp+0B8h+var_B0]
test rdi, rdi
jz short loc_41DAE
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_41DAE:
mov rdi, qword ptr [rsp+0B8h+var_68+8]
test rdi, rdi
jz loc_41B94
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp loc_41B94
loc_41DC6:
lea rdi, _ZGVZZN5minja6Parser20parseValueExpressionEvENKUlvE_clEvE10null_regexB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_41BD0
lea rdi, _ZZZN5minja6Parser20parseValueExpressionEvENKUlvE_clEvE10null_regexB5cxx11; minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator() const(void)::null_regex
lea rsi, aNullB; "null\\b"
mov edx, 10h
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type)
lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc
lea rsi, _ZZZN5minja6Parser20parseValueExpressionEvENKUlvE_clEvE10null_regexB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZZN5minja6Parser20parseValueExpressionEvENKUlvE_clEvE10null_regexB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_41BD0
loc_41E1D:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aExpectedValueE; "Expected value expression"
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, r15; void *
call ___cxa_throw
mov r14, rax
lea rdi, _ZGVZZN5minja6Parser20parseValueExpressionEvENKUlvE_clEvE10null_regexB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_41ED2
mov r14, rax
jmp short loc_41E70
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
loc_41E70:
mov rdi, [rbx+8]
test rdi, rdi
jz short loc_41E83
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp short loc_41E83
mov r14, rax
loc_41E83:
mov rdi, [rsp+0B8h+var_98]
test rdi, rdi
jz short loc_41E97
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp short loc_41E97
mov r14, rax
loc_41E97:
mov rdi, [rsp+0B8h+var_B0]
test rdi, rdi
jz short loc_41EAB
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp short loc_41EAB
mov r14, rax
loc_41EAB:
mov rdi, qword ptr [rsp+0B8h+var_68+8]
test rdi, rdi
jz short loc_41ED2
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp short loc_41ED2
jmp short loc_41ECF
mov r14, rax
lea rdi, [rsp+0B8h+var_68]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp short loc_41ED2
jmp short $+2
loc_41ECF:
mov r14, rax
loc_41ED2:
mov rdi, [rsp+0B8h+var_70]
test rdi, rdi
jz short loc_41EE6
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp short loc_41EE6
mov r14, rax
loc_41EE6:
mov rdi, [rsp+0B8h+var_88]
test rdi, rdi
jz short loc_41EF5
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_41EF5:
mov rdi, r14
call __Unwind_Resume
| minja::Parser * minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator()(
minja::Parser *this,
long long **a2)
{
long long *v3; // r14
volatile signed __int32 *v4; // rax
long long v6; // r15
__int128 v7; // xmm0
long long v8; // rdi
signed __int32 v9; // eax
std::runtime_error *exception; // r15
__int128 v11; // [rsp+0h] [rbp-B8h] BYREF
long long v12; // [rsp+18h] [rbp-A0h] BYREF
volatile signed __int32 *v13; // [rsp+20h] [rbp-98h]
long long v14; // [rsp+28h] [rbp-90h] BYREF
volatile signed __int32 *v15; // [rsp+30h] [rbp-88h]
long long v16; // [rsp+38h] [rbp-80h]
long long v17; // [rsp+40h] [rbp-78h] BYREF
volatile signed __int32 *v18; // [rsp+48h] [rbp-70h]
__int128 v19; // [rsp+50h] [rbp-68h] BYREF
__int128 v20; // [rsp+60h] [rbp-58h] BYREF
__int128 v21; // [rsp+70h] [rbp-48h]
__int128 v22; // [rsp+80h] [rbp-38h]
char v23[8]; // [rsp+90h] [rbp-28h] BYREF
long long v24; // [rsp+98h] [rbp-20h]
v3 = *a2;
v14 = **a2;
v4 = (volatile signed __int32 *)v3[1];
v15 = v4;
if ( v4 )
{
if ( _libc_single_threaded )
++*((_DWORD *)v4 + 2);
else
_InterlockedIncrement(v4 + 2);
}
v16 = v3[4] - v3[2];
minja::Parser::parseConstant((minja::Parser *)&v17);
if ( v17 )
{
*(_QWORD *)&v19 = 0LL;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::LiteralExpr,std::allocator<minja::LiteralExpr>,minja::Location &,minja::Value &>(
(char *)&v19 + 8,
&v19,
&v11,
&v14);
*(_OWORD *)this = v19;
}
else
{
if ( !(_BYTE)`guard variable for'minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator() const(void)::null_regex[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator() const(void)::null_regex[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator() const(void)::null_regex[abi:cxx11],
"null\\b",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator() const(void)::null_regex[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator() const(void)::null_regex[abi:cxx11]);
}
minja::Parser::consumeToken(
(long long)&v19,
(long long)v3,
(long long)&minja::Parser::parseValueExpression(void)::{lambda(void)#1}::operator() const(void)::null_regex[abi:cxx11],
1u);
v6 = *((_QWORD *)&v19 + 1);
if ( (__int128 *)v19 != &v20 )
operator delete((void *)v19, v20 + 1);
if ( v6 )
{
v24 = 0LL;
v19 = 0LL;
v20 = 0LL;
v21 = 0LL;
v22 = 0LL;
v23[0] = 0;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v23);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v23);
*(_QWORD *)&v11 = 0LL;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::LiteralExpr,std::allocator<minja::LiteralExpr>,minja::Location &,minja::Value>(
(char *)&v11 + 8,
&v11,
&v12,
&v14,
&v19);
v7 = v11;
*((_QWORD *)&v11 + 1) = 0LL;
*(_OWORD *)this = v7;
*(_QWORD *)&v11 = 0LL;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v23);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v23);
if ( *((_QWORD *)&v22 + 1) )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v22 + 1));
if ( *((_QWORD *)&v21 + 1) )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v21 + 1));
if ( *((_QWORD *)&v20 + 1) )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v20 + 1));
v8 = *((_QWORD *)&v19 + 1);
if ( *((_QWORD *)&v19 + 1) )
{
if ( _libc_single_threaded )
{
v9 = *(_DWORD *)(*((_QWORD *)&v19 + 1) + 12LL);
*(_DWORD *)(*((_QWORD *)&v19 + 1) + 12LL) = v9 - 1;
}
else
{
v9 = _InterlockedExchangeAdd((volatile signed __int32 *)(*((_QWORD *)&v19 + 1) + 12LL), 0xFFFFFFFF);
}
if ( v9 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v8 + 24LL))(v8, 0LL);
}
}
else
{
minja::Parser::parseIdentifier((minja::Parser *)&v19, v3);
if ( (_QWORD)v19 )
{
*(_OWORD *)this = v19;
}
else
{
minja::Parser::parseBracedExpressionOrArray((minja::Parser *)&v11);
if ( (_QWORD)v11 )
{
*(_OWORD *)this = v11;
}
else
{
minja::Parser::parseArray((minja::Parser *)&v12);
if ( v12 )
{
*(_QWORD *)this = v12;
*((_QWORD *)this + 1) = v13;
}
else
{
minja::Parser::parseDictionary(this);
if ( !*(_QWORD *)this )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected value expression");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( v13 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v13);
}
if ( *((_QWORD *)&v11 + 1) )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v11 + 1));
}
if ( *((_QWORD *)&v19 + 1) )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v19 + 1));
}
}
}
if ( v18 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v18);
if ( v15 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v15);
return this;
}
| operator():
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0xa0
MOV RBX,RDI
MOV R14,qword ptr [RSI]
MOV RAX,qword ptr [R14]
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [R14 + 0x8]
MOV qword ptr [RSP + 0x30],RAX
TEST RAX,RAX
JZ 0x00141b49
MOV RCX,qword ptr [0x001effa0]
CMP byte ptr [RCX],0x0
JZ 0x00141b45
INC dword ptr [RAX + 0x8]
JMP 0x00141b49
LAB_00141b45:
INC.LOCK dword ptr [RAX + 0x8]
LAB_00141b49:
MOV RAX,qword ptr [R14 + 0x20]
SUB RAX,qword ptr [R14 + 0x10]
MOV qword ptr [RSP + 0x38],RAX
LAB_00141b56:
LEA RDI,[RSP + 0x40]
MOV RSI,R14
CALL 0x001425fe
MOV R8,qword ptr [RSP + 0x40]
TEST R8,R8
JZ 0x00141bc2
LEA RDI,[RSP + 0x58]
MOV qword ptr [RDI + -0x8],0x0
LAB_00141b7a:
LEA RSI,[RSP + 0x50]
MOV RDX,RSP
LEA RCX,[RSP + 0x28]
CALL 0x0014f258
MOVAPS XMM0,xmmword ptr [RSP + 0x50]
MOVUPS xmmword ptr [RBX],XMM0
LAB_00141b94:
MOV RDI,qword ptr [RSP + 0x48]
TEST RDI,RDI
JZ 0x00141ba3
CALL 0x0012f80e
LAB_00141ba3:
MOV RDI,qword ptr [RSP + 0x30]
TEST RDI,RDI
JZ 0x00141bb2
CALL 0x0012f80e
LAB_00141bb2:
MOV RAX,RBX
ADD RSP,0xa0
POP RBX
POP R14
POP R15
RET
LAB_00141bc2:
MOV AL,byte ptr [0x001f0f00]
TEST AL,AL
JZ 0x00141dc6
LAB_00141bd0:
LEA RDX,[0x1f0ee0]
LEA RDI,[RSP + 0x50]
MOV RSI,R14
MOV ECX,0x1
CALL 0x0012fd6a
LEA RAX,[RSP + 0x60]
MOV RDI,qword ptr [RAX + -0x10]
MOV R15,qword ptr [RAX + -0x8]
CMP RDI,RAX
JZ 0x00141c08
MOV RSI,qword ptr [RSP + 0x60]
INC RSI
CALL 0x001186a0
LAB_00141c08:
TEST R15,R15
JZ 0x00141cee
LEA R14,[RSP + 0x90]
XOR R15D,R15D
MOV qword ptr [R14 + 0x8],R15
XORPS XMM0,XMM0
MOVAPS xmmword ptr [R14 + -0x40],XMM0
MOVAPS xmmword ptr [R14 + -0x30],XMM0
MOVAPS xmmword ptr [R14 + -0x20],XMM0
MOVAPS xmmword ptr [R14 + -0x10],XMM0
MOV byte ptr [R14],0x0
MOV RDI,R14
MOV ESI,0x1
CALL 0x0013d970
MOV RDI,R14
MOV ESI,0x1
CALL 0x0013d970
LEA RDI,[RSP + 0x8]
MOV qword ptr [RDI + -0x8],R15
LAB_00141c5e:
MOV RSI,RSP
LEA RDX,[RSP + 0x18]
LEA RCX,[RSP + 0x28]
LEA R8,[RSP + 0x50]
CALL 0x0015611a
MOVAPS XMM0,xmmword ptr [RSP]
XOR EAX,EAX
MOV qword ptr [RSP + 0x8],RAX
MOVUPS xmmword ptr [RBX],XMM0
MOV qword ptr [RSP],RAX
MOV RDI,R14
XOR ESI,ESI
CALL 0x0013d970
MOV RDI,R14
CALL 0x0014a5c0
MOV RDI,qword ptr [RSP + 0x88]
TEST RDI,RDI
JZ 0x00141cab
CALL 0x0012f80e
LAB_00141cab:
MOV RDI,qword ptr [RSP + 0x78]
TEST RDI,RDI
JZ 0x00141cba
CALL 0x0012f80e
LAB_00141cba:
MOV RDI,qword ptr [RSP + 0x68]
TEST RDI,RDI
JZ 0x00141cc9
CALL 0x0012f80e
LAB_00141cc9:
MOV RDI,qword ptr [RSP + 0x58]
TEST RDI,RDI
JZ 0x00141b94
MOV RAX,qword ptr [0x001effa0]
CMP byte ptr [RAX],0x0
JZ 0x00141d16
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x00141d20
LAB_00141cee:
LEA RDI,[RSP + 0x50]
MOV RSI,R14
CALL 0x001303fe
LAB_00141cfb:
MOV RAX,qword ptr [RSP + 0x50]
TEST RAX,RAX
JZ 0x00141d34
MOV qword ptr [RBX],RAX
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RBX + 0x8],RAX
JMP 0x00141b94
LAB_00141d16:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_00141d20:
CMP EAX,0x1
JNZ 0x00141b94
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
JMP 0x00141b94
LAB_00141d34:
MOV RDI,RSP
MOV RSI,R14
CALL 0x00142996
MOV RAX,qword ptr [RSP]
TEST RAX,RAX
JZ 0x00141d56
MOV qword ptr [RBX],RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RBX + 0x8],RAX
JMP 0x00141dae
LAB_00141d56:
LEA RDI,[RSP + 0x18]
MOV RSI,R14
CALL 0x00142ef6
MOV RAX,qword ptr [RSP + 0x18]
TEST RAX,RAX
JZ 0x00141d7b
MOV qword ptr [RBX],RAX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RBX + 0x8],RAX
JMP 0x00141d9f
LAB_00141d7b:
MOV RDI,RBX
MOV RSI,R14
CALL 0x0014351c
CMP qword ptr [RBX],0x0
JZ 0x00141e1d
MOV RDI,qword ptr [RSP + 0x20]
TEST RDI,RDI
JZ 0x00141d9f
CALL 0x0012f80e
LAB_00141d9f:
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x00141dae
CALL 0x0012f80e
LAB_00141dae:
MOV RDI,qword ptr [RSP + 0x58]
TEST RDI,RDI
JZ 0x00141b94
CALL 0x0012f80e
JMP 0x00141b94
LAB_00141dc6:
LEA RDI,[0x1f0f00]
CALL 0x00118be0
TEST EAX,EAX
JZ 0x00141bd0
LAB_00141dda:
LEA RDI,[0x1f0ee0]
LEA RSI,[0x1b73f5]
MOV EDX,0x10
CALL 0x0012f87e
LAB_00141df2:
LEA RDI,[0x12f8e6]
LEA RSI,[0x1f0ee0]
LEA RDX,[0x1f0698]
CALL 0x001185d0
LEA RDI,[0x1f0f00]
CALL 0x00118450
JMP 0x00141bd0
LAB_00141e1d:
MOV EDI,0x10
CALL 0x00118360
MOV R15,RAX
LAB_00141e2a:
LEA RSI,[0x1b73fc]
MOV RDI,RAX
CALL 0x00118270
LAB_00141e39:
MOV RSI,qword ptr [0x001efff0]
MOV RDX,qword ptr [0x001eff80]
MOV RDI,R15
CALL 0x00118b30
|
/* minja::Parser::parseValueExpression()::{lambda()#1}::TEMPNAMEPLACEHOLDERVALUE() const */
_lambda___1_ * __thiscall
minja::Parser::parseValueExpression()::{lambda()#1}::operator()(_lambda___1_ *this)
{
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Var1;
int8 *puVar2;
int iVar3;
runtime_error *this_00;
long *in_RSI;
bool bVar4;
long local_b8;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *ap_Stack_b0 [2];
long local_a0;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_98;
int8 local_90;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_88;
long local_80;
long local_78;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_70;
long *local_68;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_60;
long local_58;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_50;
int8 local_48;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_40;
int8 local_38;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_30;
data local_28 [8];
int8 local_20;
puVar2 = (int8 *)*in_RSI;
local_90 = *puVar2;
local_88 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)puVar2[1];
if (local_88 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
if (*PTR___libc_single_threaded_001effa0 == '\0') {
LOCK();
*(int *)(local_88 + 8) = *(int *)(local_88 + 8) + 1;
UNLOCK();
}
else {
*(int *)(local_88 + 8) = *(int *)(local_88 + 8) + 1;
}
}
local_80 = puVar2[4] - puVar2[2];
/* try { // try from 00141b56 to 00141b62 has its CatchHandler @ 00141ee3 */
parseConstant();
if (local_78 == 0) {
if (operator()()::null_regex_abi_cxx11_ == '\0') {
iVar3 = __cxa_guard_acquire(&operator()()::null_regex_abi_cxx11_);
if (iVar3 != 0) {
/* try { // try from 00141dda to 00141df1 has its CatchHandler @ 00141e4f */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
((basic_regex<char,std::__cxx11::regex_traits<char>> *)
operator()()::null_regex_abi_cxx11_,"null\\b",0x10);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
operator()()::null_regex_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&operator()()::null_regex_abi_cxx11_);
}
}
/* try { // try from 00141bd0 to 00141be8 has its CatchHandler @ 00141ecd */
consumeToken(&local_68,puVar2,operator()()::null_regex_abi_cxx11_,1);
p_Var1 = p_Stack_60;
if (local_68 != &local_58) {
operator_delete(local_68,local_58 + 1);
}
if (p_Var1 == (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
/* try { // try from 00141cee to 00141cfa has its CatchHandler @ 00141ebc */
parseIdentifier();
if (local_68 == (long *)0x0) {
/* try { // try from 00141d34 to 00141d3e has its CatchHandler @ 00141ea8 */
parseBracedExpressionOrArray();
if (local_b8 == 0) {
/* try { // try from 00141d56 to 00141d62 has its CatchHandler @ 00141e94 */
parseArray();
if (local_a0 == 0) {
/* try { // try from 00141d7b to 00141d85 has its CatchHandler @ 00141e80 */
parseDictionary();
if (*(long *)this == 0) {
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00141e2a to 00141e38 has its CatchHandler @ 00141e65 */
std::runtime_error::runtime_error(this_00,"Expected value expression");
/* try { // try from 00141e39 to 00141e4e has its CatchHandler @ 00141e60 */
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_001efff0,PTR__runtime_error_001eff80);
}
if (local_98 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_98);
}
}
else {
*(long *)this = local_a0;
*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 8) = local_98;
}
if (ap_Stack_b0[0] != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(ap_Stack_b0[0]);
}
}
else {
*(long *)this = local_b8;
*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 8) = ap_Stack_b0[0];
}
if (p_Stack_60 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_60);
}
}
else {
*(long **)this = local_68;
*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 8) = p_Stack_60;
}
}
else {
local_20 = 0;
local_68 = (long *)0x0;
p_Stack_60 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0;
local_58 = 0;
p_Stack_50 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0;
local_48 = 0;
p_Stack_40 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0;
local_38 = 0;
p_Stack_30 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0;
local_28[0] = (data)0x0;
bVar4 = SUB81(local_28,0);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar4);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar4);
local_b8 = 0;
/* try { // try from 00141c5e to 00141c74 has its CatchHandler @ 00141ebe */
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::
__shared_count<minja::LiteralExpr,std::allocator<minja::LiteralExpr>,minja::Location&,minja::Value>
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)ap_Stack_b0,&local_b8,&local_a0,
&local_90,&local_68);
p_Var1 = ap_Stack_b0[0];
ap_Stack_b0[0] = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0;
*(long *)this = local_b8;
*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 8) = p_Var1;
local_b8 = 0;
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar4);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_28);
if (p_Stack_30 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_30);
}
if (p_Stack_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_40);
}
if (p_Stack_50 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_50);
}
if (p_Stack_60 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
if (*PTR___libc_single_threaded_001effa0 == '\0') {
LOCK();
p_Var1 = p_Stack_60 + 0xc;
iVar3 = *(int *)p_Var1;
*(int *)p_Var1 = *(int *)p_Var1 + -1;
UNLOCK();
}
else {
iVar3 = *(int *)(p_Stack_60 + 0xc);
*(int *)(p_Stack_60 + 0xc) = iVar3 + -1;
}
if (iVar3 == 1) {
(**(code **)(*(long *)p_Stack_60 + 0x18))();
}
}
}
}
else {
local_68 = (long *)0x0;
/* try { // try from 00141b7a to 00141b8b has its CatchHandler @ 00141ecf */
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::
__shared_count<minja::LiteralExpr,std::allocator<minja::LiteralExpr>,minja::Location&,minja::Value&>
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&p_Stack_60,&local_68,&local_b8,
&local_90);
*(long **)this = local_68;
*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 8) = p_Stack_60;
}
if (local_70 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_70);
}
if (local_88 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_88);
}
return this;
}
|
|
3,459 | testing::internal::PrettyUnitTestResultPrinter::OnTestIterationEnd(testing::UnitTest const&, int) | giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest.cc | void PrettyUnitTestResultPrinter::OnTestIterationEnd(const UnitTest& unit_test,
int /*iteration*/) {
ColoredPrintf(GTestColor::kGreen, "[==========] ");
printf("%s from %s ran.",
FormatTestCount(unit_test.test_to_run_count()).c_str(),
FormatTestSuiteCount(unit_test.test_suite_to_run_count()).c_str());
if (GTEST_FLAG_GET(print_time)) {
printf(" (%s ms total)",
internal::StreamableToString(unit_test.elapsed_time()).c_str());
}
printf("\n");
ColoredPrintf(GTestColor::kGreen, "[ PASSED ] ");
printf("%s.\n", FormatTestCount(unit_test.successful_test_count()).c_str());
const int skipped_test_count = unit_test.skipped_test_count();
if (skipped_test_count > 0) {
ColoredPrintf(GTestColor::kGreen, "[ SKIPPED ] ");
printf("%s, listed below:\n", FormatTestCount(skipped_test_count).c_str());
PrintSkippedTests(unit_test);
}
if (!unit_test.Passed()) {
PrintFailedTests(unit_test);
PrintFailedTestSuites(unit_test);
}
int num_disabled = unit_test.reportable_disabled_test_count();
if (num_disabled && !GTEST_FLAG_GET(also_run_disabled_tests)) {
if (unit_test.Passed()) {
printf("\n"); // Add a spacer if no FAILURE banner is displayed.
}
ColoredPrintf(GTestColor::kYellow, " YOU HAVE %d DISABLED %s\n\n",
num_disabled, num_disabled == 1 ? "TEST" : "TESTS");
}
// Ensure that Google Test output is printed before, e.g., heapchecker output.
fflush(stdout);
} | O1 | cpp | testing::internal::PrettyUnitTestResultPrinter::OnTestIterationEnd(testing::UnitTest const&, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
leaq 0x1fa41(%rip), %rsi # 0x43227
xorl %ebp, %ebp
movl $0x2, %edi
xorl %eax, %eax
callq 0x22582
movq 0x40(%rbx), %rdi
callq 0x1cc5a
leaq 0x1ea0a(%rip), %rdx # 0x4220e
leaq 0x1ee0f(%rip), %rcx # 0x4261a
leaq 0x8(%rsp), %rdi
movl %eax, %esi
callq 0x22db0
movq 0x40(%rbx), %rcx
movq 0xb8(%rcx), %rax
movq 0xc0(%rcx), %rcx
cmpq %rcx, %rax
je 0x23842
xorl %ebp, %ebp
movq (%rax), %rdx
movzbl 0x70(%rdx), %edx
addl %edx, %ebp
addq $0x8, %rax
cmpq %rcx, %rax
jne 0x23830
movq 0x8(%rsp), %r14
leaq 0x209fe(%rip), %rdx # 0x4424c
leaq 0x20a02(%rip), %rcx # 0x44257
leaq 0x28(%rsp), %rdi
movl %ebp, %esi
callq 0x22db0
leaq 0x38(%rsp), %r15
movq -0x10(%r15), %rdx
leaq 0x1faed(%rip), %rdi # 0x4335e
movq %r14, %rsi
xorl %eax, %eax
callq 0x8080
movq -0x10(%r15), %rdi
cmpq %r15, %rdi
je 0x23891
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x84e0
leaq 0x18(%rsp), %r15
movq -0x10(%r15), %rdi
cmpq %r15, %rdi
je 0x238ac
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x84e0
cmpb $0x1, 0x35e3e(%rip) # 0x596f1
jne 0x238fb
movq 0x40(%rbx), %rax
movq 0x2a0(%rax), %rax
leaq 0x28(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x34b04
movq (%r14), %rsi
leaq 0x1fa8f(%rip), %rdi # 0x4336e
xorl %eax, %eax
callq 0x8080
movq (%r14), %rdi
cmpq %r15, %rdi
je 0x238fb
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x84e0
movl $0xa, %edi
callq 0x8790
leaq 0x1fa71(%rip), %rsi # 0x4337d
movl $0x2, %edi
xorl %eax, %eax
callq 0x22582
movq 0x40(%rbx), %rdi
callq 0x1c860
leaq 0x1e8e6(%rip), %rdx # 0x4220e
leaq 0x1eceb(%rip), %rcx # 0x4261a
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movl %eax, %esi
callq 0x22db0
movq (%r14), %rsi
leaq 0x1f8a5(%rip), %rdi # 0x431ed
xorl %eax, %eax
callq 0x8080
movq (%r14), %rdi
cmpq %r15, %rdi
je 0x23964
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x84e0
movq 0x40(%rbx), %rdi
callq 0x1c8e6
testl %eax, %eax
jle 0x239d1
movl %eax, %ebp
leaq 0x1f924(%rip), %rsi # 0x4329e
movl $0x2, %edi
xorl %eax, %eax
callq 0x22582
leaq 0x1e881(%rip), %rdx # 0x4220e
leaq 0x1ec86(%rip), %rcx # 0x4261a
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movl %ebp, %esi
callq 0x22db0
movq (%r14), %rsi
leaq 0x1f932(%rip), %rdi # 0x432df
xorl %eax, %eax
callq 0x8080
movq (%r14), %rdi
cmpq %r15, %rdi
je 0x239c9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x84e0
movq %rbx, %rdi
callq 0x23648
movq 0x40(%rbx), %rdi
callq 0x34b6e
testb %al, %al
jne 0x239ee
movq %rbx, %rdi
callq 0x232d6
movq %rbx, %rdi
callq 0x23530
movq 0x40(%rbx), %r14
movq %r14, %rdi
callq 0x1ca1a
testl %eax, %eax
je 0x23a49
cmpb $0x0, 0x35c7e(%rip) # 0x59683
jne 0x23a49
movl %eax, %ebx
movq %r14, %rdi
callq 0x34b6e
testb %al, %al
je 0x23a1f
movl $0xa, %edi
callq 0x8790
cmpl $0x1, %ebx
leaq 0x1f8df(%rip), %rax # 0x43308
leaq 0x1f8dd(%rip), %rcx # 0x4330d
cmoveq %rax, %rcx
leaq 0x1f950(%rip), %rsi # 0x4338b
movl $0x3, %edi
movl %ebx, %edx
xorl %eax, %eax
callq 0x22582
movq 0x35530(%rip), %rax # 0x58f80
movq (%rax), %rdi
callq 0x8600
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x23a81
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x84e0
movq %rbx, %rdi
callq 0x8990
nop
| _ZN7testing8internal27PrettyUnitTestResultPrinter18OnTestIterationEndERKNS_8UnitTestEi:
push rbp
push r15
push r14
push rbx
sub rsp, 48h
mov rbx, rsi
lea rsi, asc_43227; "[==========] "
xor ebp, ebp
mov edi, 2
xor eax, eax
call _ZN7testing8internalL13ColoredPrintfENS0_12_GLOBAL__N_110GTestColorEPKcz; testing::internal::ColoredPrintf(testing::internal::`anonymous namespace'::GTestColor,char const*,...)
mov rdi, [rbx+40h]; this
call _ZNK7testing8internal12UnitTestImpl17test_to_run_countEv; testing::internal::UnitTestImpl::test_to_run_count(void)
lea rdx, aDeathtestPasse+36h; int
lea rcx, aAlsoRunDisable+12h; int
lea rdi, [rsp+68h+var_60]; int
mov esi, eax; int
call _ZN7testingL19FormatCountableNounB5cxx11EiPKcS1_; testing::FormatCountableNoun(int,char const*,char const*)
mov rcx, [rbx+40h]
mov rax, [rcx+0B8h]
mov rcx, [rcx+0C0h]
cmp rax, rcx
jz short loc_23842
xor ebp, ebp
loc_23830:
mov rdx, [rax]
movzx edx, byte ptr [rdx+70h]
add ebp, edx
add rax, 8
cmp rax, rcx
jnz short loc_23830
loc_23842:
mov r14, qword ptr [rsp+68h+var_60]
lea rdx, aTestSuite; "test suite"
lea rcx, aTestSuites; "test suites"
lea rdi, [rsp+68h+var_40]; int
mov esi, ebp; int
call _ZN7testingL19FormatCountableNounB5cxx11EiPKcS1_; testing::FormatCountableNoun(int,char const*,char const*)
lea r15, [rsp+68h+var_30]
mov rdx, [r15-10h]
lea rdi, aSFromSRan; "%s from %s ran."
mov rsi, r14
xor eax, eax
call _printf
mov rdi, [r15-10h]; void *
cmp rdi, r15
jz short loc_23891
mov rsi, [rsp+68h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_23891:
lea r15, [rsp+68h+var_50]
mov rdi, [r15-10h]; void *
cmp rdi, r15
jz short loc_238AC
mov rsi, [rsp+68h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_238AC:
cmp cs:_ZN7testing22FLAGS_gtest_print_timeE, 1; testing::FLAGS_gtest_print_time
jnz short loc_238FB
mov rax, [rbx+40h]
mov rax, [rax+2A0h]
lea rsi, [rsp+68h+var_40]
mov [rsi], rax
lea r14, [rsp+68h+var_60]
mov rdi, r14
call _ZN7testing8internal18StreamableToStringIlEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; testing::internal::StreamableToString<long>(long const&)
mov rsi, [r14]
lea rdi, aSMsTotal; " (%s ms total)"
xor eax, eax
call _printf
mov rdi, [r14]; void *
cmp rdi, r15
jz short loc_238FB
mov rsi, [rsp+68h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_238FB:
mov edi, 0Ah
call _putchar
lea rsi, aPassed; "[ PASSED ] "
mov edi, 2
xor eax, eax
call _ZN7testing8internalL13ColoredPrintfENS0_12_GLOBAL__N_110GTestColorEPKcz; testing::internal::ColoredPrintf(testing::internal::`anonymous namespace'::GTestColor,char const*,...)
mov rdi, [rbx+40h]; this
call _ZNK7testing8internal12UnitTestImpl21successful_test_countEv; testing::internal::UnitTestImpl::successful_test_count(void)
lea rdx, aDeathtestPasse+36h; int
lea rcx, aAlsoRunDisable+12h; int
lea r14, [rsp+68h+var_60]
mov rdi, r14; int
mov esi, eax; int
call _ZN7testingL19FormatCountableNounB5cxx11EiPKcS1_; testing::FormatCountableNoun(int,char const*,char const*)
mov rsi, [r14]
lea rdi, aNoteThisIsTest+1Fh; "%s.\n"
xor eax, eax
call _printf
mov rdi, [r14]; void *
cmp rdi, r15
jz short loc_23964
mov rsi, [rsp+68h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_23964:
mov rdi, [rbx+40h]; this
call _ZNK7testing8internal12UnitTestImpl18skipped_test_countEv; testing::internal::UnitTestImpl::skipped_test_count(void)
test eax, eax
jle short loc_239D1
mov ebp, eax
lea rsi, aSkipped_0; "[ SKIPPED ] "
mov edi, 2
xor eax, eax
call _ZN7testing8internalL13ColoredPrintfENS0_12_GLOBAL__N_110GTestColorEPKcz; testing::internal::ColoredPrintf(testing::internal::`anonymous namespace'::GTestColor,char const*,...)
lea rdx, aDeathtestPasse+36h; int
lea rcx, aAlsoRunDisable+12h; int
lea r14, [rsp+68h+var_60]
mov rdi, r14; int
mov esi, ebp; int
call _ZN7testingL19FormatCountableNounB5cxx11EiPKcS1_; testing::FormatCountableNoun(int,char const*,char const*)
mov rsi, [r14]
lea rdi, aSListedBelow; "%s, listed below:\n"
xor eax, eax
call _printf
mov rdi, [r14]; void *
cmp rdi, r15
jz short loc_239C9
mov rsi, [rsp+68h+var_50]
inc rsi; testing::UnitTest *
call __ZdlPvm; operator delete(void *,ulong)
loc_239C9:
mov rdi, rbx; this
call _ZN7testing8internal27PrettyUnitTestResultPrinter17PrintSkippedTestsERKNS_8UnitTestE; testing::internal::PrettyUnitTestResultPrinter::PrintSkippedTests(testing::UnitTest const&)
loc_239D1:
mov rdi, [rbx+40h]; this
call _ZNK7testing8internal12UnitTestImpl6PassedEv; testing::internal::UnitTestImpl::Passed(void)
test al, al
jnz short loc_239EE
mov rdi, rbx; this
call _ZN7testing8internal27PrettyUnitTestResultPrinter16PrintFailedTestsERKNS_8UnitTestE; testing::internal::PrettyUnitTestResultPrinter::PrintFailedTests(testing::UnitTest const&)
mov rdi, rbx; this
call _ZN7testing8internal27PrettyUnitTestResultPrinter21PrintFailedTestSuitesERKNS_8UnitTestE; testing::internal::PrettyUnitTestResultPrinter::PrintFailedTestSuites(testing::UnitTest const&)
loc_239EE:
mov r14, [rbx+40h]
mov rdi, r14; this
call _ZNK7testing8internal12UnitTestImpl30reportable_disabled_test_countEv; testing::internal::UnitTestImpl::reportable_disabled_test_count(void)
test eax, eax
jz short loc_23A49
cmp cs:_ZN7testing35FLAGS_gtest_also_run_disabled_testsE, 0; testing::FLAGS_gtest_also_run_disabled_tests
jnz short loc_23A49
mov ebx, eax
mov rdi, r14; this
call _ZNK7testing8internal12UnitTestImpl6PassedEv; testing::internal::UnitTestImpl::Passed(void)
test al, al
jz short loc_23A1F
mov edi, 0Ah
call _putchar
loc_23A1F:
cmp ebx, 1
lea rax, aTest_0; "TEST"
lea rcx, aTests; "TESTS"
cmovz rcx, rax
lea rsi, aYouHaveDDisabl; " YOU HAVE %d DISABLED %s\n\n"
mov edi, 3
mov edx, ebx
xor eax, eax
call _ZN7testing8internalL13ColoredPrintfENS0_12_GLOBAL__N_110GTestColorEPKcz; testing::internal::ColoredPrintf(testing::internal::`anonymous namespace'::GTestColor,char const*,...)
loc_23A49:
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
retn
mov rbx, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_23A81
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_23A81:
mov rdi, rbx
call __Unwind_Resume
| long long testing::internal::PrettyUnitTestResultPrinter::OnTestIterationEnd(
testing::internal::PrettyUnitTestResultPrinter *this,
testing::internal::UnitTestImpl **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)
{
int v15; // ebp
int v16; // eax
testing::internal::UnitTestImpl *v17; // rcx
long long v18; // rax
long long v19; // rcx
const char *v20; // r14
long long v21; // rdx
long long v22; // rcx
long long v23; // r8
long long v24; // r9
__m128 v25; // xmm4
__m128 v26; // xmm5
int v27; // eax
const testing::UnitTest *v28; // rsi
int v29; // eax
long long v30; // rdx
long long v31; // rcx
long long v32; // r8
long long v33; // r9
__m128 v34; // xmm4
__m128 v35; // xmm5
int v36; // ebp
double v37; // xmm4_8
double v38; // xmm5_8
double v39; // xmm4_8
double v40; // xmm5_8
double v41; // xmm4_8
double v42; // xmm5_8
testing::internal::UnitTestImpl *v43; // r14
unsigned int v44; // eax
unsigned int v45; // ebx
long long v46; // r8
long long v47; // r9
__m128 v48; // xmm4
__m128 v49; // xmm5
const char *v50; // rcx
char v52; // [rsp+0h] [rbp-68h]
char v53; // [rsp+0h] [rbp-68h]
char v54; // [rsp+0h] [rbp-68h]
int v55[2]; // [rsp+8h] [rbp-60h] BYREF
_QWORD v56[2]; // [rsp+18h] [rbp-50h] BYREF
char *v57; // [rsp+28h] [rbp-40h] BYREF
long long v58; // [rsp+38h] [rbp-30h] BYREF
v15 = 0;
testing::internal::ColoredPrintf(
2,
(long long)"[==========] ",
a3,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v52);
v16 = testing::internal::UnitTestImpl::test_to_run_count(a2[8]);
testing::FormatCountableNoun[abi:cxx11]((long long)v55, v16, "test", "tests");
v17 = a2[8];
v18 = *((_QWORD *)v17 + 23);
v19 = *((_QWORD *)v17 + 24);
if ( v18 != v19 )
{
v15 = 0;
do
{
v15 += *(unsigned __int8 *)(*(_QWORD *)v18 + 112LL);
v18 += 8LL;
}
while ( v18 != v19 );
}
v20 = *(const char **)v55;
testing::FormatCountableNoun[abi:cxx11]((long long)&v57, v15, "test suite", "test suites");
printf("%s from %s ran.", v20, v57);
if ( v57 != (char *)&v58 )
operator delete(v57, v58 + 1);
if ( *(_QWORD **)v55 != v56 )
operator delete(*(void **)v55, v56[0] + 1LL);
if ( testing::FLAGS_gtest_print_time == 1 )
{
v57 = (char *)*((_QWORD *)a2[8] + 84);
testing::internal::StreamableToString<long>(v55);
printf(" (%s ms total)", *(const char **)v55);
if ( *(_QWORD **)v55 != v56 )
operator delete(*(void **)v55, v56[0] + 1LL);
}
putchar(10LL);
testing::internal::ColoredPrintf(
2,
(long long)"[ PASSED ] ",
v21,
v22,
v23,
v24,
a7,
a8,
a9,
a10,
v25,
v26,
a13,
a14,
v53);
v27 = testing::internal::UnitTestImpl::successful_test_count(a2[8]);
testing::FormatCountableNoun[abi:cxx11]((long long)v55, v27, "test", "tests");
v28 = *(const testing::UnitTest **)v55;
printf("%s.\n", *(const char **)v55);
if ( *(_QWORD **)v55 != v56 )
{
v28 = (const testing::UnitTest *)(v56[0] + 1LL);
operator delete(*(void **)v55, v56[0] + 1LL);
}
v29 = testing::internal::UnitTestImpl::skipped_test_count(a2[8]);
if ( v29 > 0 )
{
v36 = v29;
testing::internal::ColoredPrintf(
2,
(long long)"[ SKIPPED ] ",
v30,
v31,
v32,
v33,
a7,
a8,
a9,
a10,
v34,
v35,
a13,
a14,
v54);
testing::FormatCountableNoun[abi:cxx11]((long long)v55, v36, "test", "tests");
v28 = *(const testing::UnitTest **)v55;
printf("%s, listed below:\n", *(const char **)v55);
if ( *(_QWORD **)v55 != v56 )
{
v28 = (const testing::UnitTest *)(v56[0] + 1LL);
operator delete(*(void **)v55, v56[0] + 1LL);
}
testing::internal::PrettyUnitTestResultPrinter::PrintSkippedTests(a2, v28, a7, a8, a9, a10, v37, v38, a13, a14);
}
if ( !(unsigned __int8)testing::internal::UnitTestImpl::Passed(a2[8]) )
{
testing::internal::PrettyUnitTestResultPrinter::PrintFailedTests(a2, v28, a7, a8, a9, a10, v39, v40, a13, a14);
testing::internal::PrettyUnitTestResultPrinter::PrintFailedTestSuites(
(testing::internal::PrettyUnitTestResultPrinter *)a2,
v28,
a7,
a8,
a9,
a10,
v41,
v42,
a13,
a14);
}
v43 = a2[8];
v44 = testing::internal::UnitTestImpl::reportable_disabled_test_count(v43);
if ( v44 && !testing::FLAGS_gtest_also_run_disabled_tests )
{
v45 = v44;
if ( (unsigned __int8)testing::internal::UnitTestImpl::Passed(v43) )
putchar(10LL);
v50 = "TESTS";
if ( v45 == 1 )
v50 = "TEST";
testing::internal::ColoredPrintf(
3,
(long long)" YOU HAVE %d DISABLED %s\n\n",
v45,
(long long)v50,
v46,
v47,
a7,
a8,
a9,
a10,
v48,
v49,
a13,
a14,
v54);
}
return fflush(stdout);
}
| OnTestIterationEnd:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV RBX,RSI
LEA RSI,[0x143227]
XOR EBP,EBP
MOV EDI,0x2
XOR EAX,EAX
CALL 0x00122582
MOV RDI,qword ptr [RBX + 0x40]
CALL 0x0011cc5a
LEA RDX,[0x14220e]
LEA RCX,[0x14261a]
LEA RDI,[RSP + 0x8]
MOV ESI,EAX
CALL 0x00122db0
MOV RCX,qword ptr [RBX + 0x40]
MOV RAX,qword ptr [RCX + 0xb8]
MOV RCX,qword ptr [RCX + 0xc0]
CMP RAX,RCX
JZ 0x00123842
XOR EBP,EBP
LAB_00123830:
MOV RDX,qword ptr [RAX]
MOVZX EDX,byte ptr [RDX + 0x70]
ADD EBP,EDX
ADD RAX,0x8
CMP RAX,RCX
JNZ 0x00123830
LAB_00123842:
MOV R14,qword ptr [RSP + 0x8]
LAB_00123847:
LEA RDX,[0x14424c]
LEA RCX,[0x144257]
LEA RDI,[RSP + 0x28]
MOV ESI,EBP
CALL 0x00122db0
LAB_00123861:
LEA R15,[RSP + 0x38]
MOV RDX,qword ptr [R15 + -0x10]
LEA RDI,[0x14335e]
MOV RSI,R14
XOR EAX,EAX
CALL 0x00108080
MOV RDI,qword ptr [R15 + -0x10]
CMP RDI,R15
JZ 0x00123891
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x001084e0
LAB_00123891:
LEA R15,[RSP + 0x18]
MOV RDI,qword ptr [R15 + -0x10]
CMP RDI,R15
JZ 0x001238ac
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001084e0
LAB_001238ac:
CMP byte ptr [0x001596f1],0x1
JNZ 0x001238fb
MOV RAX,qword ptr [RBX + 0x40]
MOV RAX,qword ptr [RAX + 0x2a0]
LEA RSI,[RSP + 0x28]
MOV qword ptr [RSI],RAX
LEA R14,[RSP + 0x8]
MOV RDI,R14
CALL 0x00134b04
MOV RSI,qword ptr [R14]
LEA RDI,[0x14336e]
XOR EAX,EAX
CALL 0x00108080
MOV RDI,qword ptr [R14]
CMP RDI,R15
JZ 0x001238fb
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001084e0
LAB_001238fb:
MOV EDI,0xa
CALL 0x00108790
LEA RSI,[0x14337d]
MOV EDI,0x2
XOR EAX,EAX
CALL 0x00122582
MOV RDI,qword ptr [RBX + 0x40]
CALL 0x0011c860
LEA RDX,[0x14220e]
LEA RCX,[0x14261a]
LEA R14,[RSP + 0x8]
MOV RDI,R14
MOV ESI,EAX
CALL 0x00122db0
MOV RSI,qword ptr [R14]
LEA RDI,[0x1431ed]
XOR EAX,EAX
CALL 0x00108080
MOV RDI,qword ptr [R14]
CMP RDI,R15
JZ 0x00123964
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001084e0
LAB_00123964:
MOV RDI,qword ptr [RBX + 0x40]
CALL 0x0011c8e6
TEST EAX,EAX
JLE 0x001239d1
MOV EBP,EAX
LEA RSI,[0x14329e]
MOV EDI,0x2
XOR EAX,EAX
CALL 0x00122582
LEA RDX,[0x14220e]
LEA RCX,[0x14261a]
LEA R14,[RSP + 0x8]
MOV RDI,R14
MOV ESI,EBP
CALL 0x00122db0
MOV RSI,qword ptr [R14]
LEA RDI,[0x1432df]
XOR EAX,EAX
CALL 0x00108080
MOV RDI,qword ptr [R14]
CMP RDI,R15
JZ 0x001239c9
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001084e0
LAB_001239c9:
MOV RDI,RBX
CALL 0x00123648
LAB_001239d1:
MOV RDI,qword ptr [RBX + 0x40]
CALL 0x00134b6e
TEST AL,AL
JNZ 0x001239ee
MOV RDI,RBX
CALL 0x001232d6
MOV RDI,RBX
CALL 0x00123530
LAB_001239ee:
MOV R14,qword ptr [RBX + 0x40]
MOV RDI,R14
CALL 0x0011ca1a
TEST EAX,EAX
JZ 0x00123a49
CMP byte ptr [0x00159683],0x0
JNZ 0x00123a49
MOV EBX,EAX
MOV RDI,R14
CALL 0x00134b6e
TEST AL,AL
JZ 0x00123a1f
MOV EDI,0xa
CALL 0x00108790
LAB_00123a1f:
CMP EBX,0x1
LEA RAX,[0x143308]
LEA RCX,[0x14330d]
CMOVZ RCX,RAX
LEA RSI,[0x14338b]
MOV EDI,0x3
MOV EDX,EBX
XOR EAX,EAX
CALL 0x00122582
LAB_00123a49:
MOV RAX,qword ptr [0x00158f80]
MOV RDI,qword ptr [RAX]
CALL 0x00108600
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* testing::internal::PrettyUnitTestResultPrinter::OnTestIterationEnd(testing::UnitTest const&, int)
*/
void testing::internal::PrettyUnitTestResultPrinter::OnTestIterationEnd
(UnitTest *param_1,int param_2)
{
long *plVar1;
UnitTestImpl *this;
long *plVar2;
char cVar3;
uint uVar4;
int iVar5;
long *plVar6;
char *pcVar7;
uint uVar8;
int4 in_register_00000034;
UnitTest *pUVar9;
long *local_60 [2];
long local_50 [2];
long *local_40 [2];
long local_30 [2];
pUVar9 = (UnitTest *)CONCAT44(in_register_00000034,param_2);
uVar8 = 0;
ColoredPrintf(2,"[==========] ");
uVar4 = UnitTestImpl::test_to_run_count(*(UnitTestImpl **)(pUVar9 + 0x40));
FormatCountableNoun_abi_cxx11_((int)local_60,(char *)(ulong)uVar4,"test");
plVar2 = local_60[0];
plVar6 = *(long **)(*(long *)(pUVar9 + 0x40) + 0xb8);
plVar1 = *(long **)(*(long *)(pUVar9 + 0x40) + 0xc0);
if (plVar6 != plVar1) {
uVar8 = 0;
do {
uVar8 = uVar8 + *(byte *)(*plVar6 + 0x70);
plVar6 = plVar6 + 1;
} while (plVar6 != plVar1);
}
/* try { // try from 00123847 to 00123860 has its CatchHandler @ 00123a63 */
FormatCountableNoun_abi_cxx11_((int)local_40,(char *)(ulong)uVar8,"test suite");
printf("%s from %s ran.",plVar2,local_40[0]);
if (local_40[0] != local_30) {
operator_delete(local_40[0],local_30[0] + 1);
}
if (local_60[0] != local_50) {
operator_delete(local_60[0],local_50[0] + 1);
}
if (FLAGS_gtest_print_time == '\x01') {
local_40[0] = *(long **)(*(long *)(pUVar9 + 0x40) + 0x2a0);
StreamableToString<long>((long *)local_60);
printf(" (%s ms total)",local_60[0]);
if (local_60[0] != local_50) {
operator_delete(local_60[0],local_50[0] + 1);
}
}
putchar(10);
ColoredPrintf(2,"[ PASSED ] ");
uVar4 = UnitTestImpl::successful_test_count(*(UnitTestImpl **)(pUVar9 + 0x40));
FormatCountableNoun_abi_cxx11_((int)local_60,(char *)(ulong)uVar4,"test");
printf("%s.\n",local_60[0]);
if (local_60[0] != local_50) {
operator_delete(local_60[0],local_50[0] + 1);
}
uVar4 = UnitTestImpl::skipped_test_count(*(UnitTestImpl **)(pUVar9 + 0x40));
if (0 < (int)uVar4) {
ColoredPrintf(2,"[ SKIPPED ] ");
FormatCountableNoun_abi_cxx11_((int)local_60,(char *)(ulong)uVar4,"test");
printf("%s, listed below:\n",local_60[0]);
if (local_60[0] != local_50) {
operator_delete(local_60[0],local_50[0] + 1);
}
PrintSkippedTests(pUVar9);
}
cVar3 = UnitTestImpl::Passed(*(UnitTestImpl **)(pUVar9 + 0x40));
if (cVar3 == '\0') {
PrintFailedTests(pUVar9);
PrintFailedTestSuites(pUVar9);
}
this = *(UnitTestImpl **)(pUVar9 + 0x40);
iVar5 = UnitTestImpl::reportable_disabled_test_count(this);
if ((iVar5 != 0) && (FLAGS_gtest_also_run_disabled_tests == '\0')) {
cVar3 = UnitTestImpl::Passed(this);
if (cVar3 != '\0') {
putchar(10);
}
pcVar7 = "TESTS";
if (iVar5 == 1) {
pcVar7 = "TEST";
}
ColoredPrintf(3," YOU HAVE %d DISABLED %s\n\n",iVar5,pcVar7);
}
fflush(*(FILE **)PTR_stdout_00158f80);
return;
}
|
|
3,460 | rak_string_inplace_concat | fabiosvm[P]rak/src/string.c | void rak_string_inplace_concat(RakString *str1, RakString *str2, RakError *err)
{
if (rak_string_is_empty(str2)) return;
int len1 = rak_string_len(str1);
int len2 = rak_string_len(str2);
int len = len1 + len2;
rak_string_ensure_capacity(str1, len, err);
if (!rak_is_ok(err)) return;
memcpy(&str1->slice.data[len1], rak_string_chars(str2), len2);
str1->slice.len = len;
} | O1 | c | rak_string_inplace_concat:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movslq 0xc(%rsi), %r14
testq %r14, %r14
je 0x8370
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
movslq 0xc(%rdi), %r13
leal (%r14,%r13), %ebp
movl %ebp, %esi
callq 0x8206
cmpb $0x1, (%r12)
jne 0x8370
addq 0x10(%rbx), %r13
movq 0x10(%r15), %rsi
movq %r13, %rdi
movq %r14, %rdx
callq 0x2110
movl %ebp, 0xc(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| rak_string_inplace_concat:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
movsxd r14, dword ptr [rsi+0Ch]
test r14, r14
jz short loc_8370
mov r12, rdx
mov r15, rsi
mov rbx, rdi
movsxd r13, dword ptr [rdi+0Ch]
lea ebp, [r14+r13]
mov esi, ebp
call rak_string_ensure_capacity
cmp byte ptr [r12], 1
jnz short loc_8370
add r13, [rbx+10h]
mov rsi, [r15+10h]
mov rdi, r13
mov rdx, r14
call _memcpy
mov [rbx+0Ch], ebp
loc_8370:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long rak_string_inplace_concat(long long a1, long long a2, _BYTE *a3)
{
long long v3; // r14
long long v5; // r13
long long result; // rax
v3 = *(int *)(a2 + 12);
if ( *(_DWORD *)(a2 + 12) )
{
v5 = *(int *)(a1 + 12);
result = rak_string_ensure_capacity(a1, (int)v3 + (int)v5, a3);
if ( *a3 == 1 )
{
result = memcpy(*(_QWORD *)(a1 + 16) + v5, *(_QWORD *)(a2 + 16), v3);
*(_DWORD *)(a1 + 12) = v3 + v5;
}
}
return result;
}
| rak_string_inplace_concat:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOVSXD R14,dword ptr [RSI + 0xc]
TEST R14,R14
JZ 0x00108370
MOV R12,RDX
MOV R15,RSI
MOV RBX,RDI
MOVSXD R13,dword ptr [RDI + 0xc]
LEA EBP,[R14 + R13*0x1]
MOV ESI,EBP
CALL 0x00108206
CMP byte ptr [R12],0x1
JNZ 0x00108370
ADD R13,qword ptr [RBX + 0x10]
MOV RSI,qword ptr [R15 + 0x10]
MOV RDI,R13
MOV RDX,R14
CALL 0x00102110
MOV dword ptr [RBX + 0xc],EBP
LAB_00108370:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void rak_string_inplace_concat(long param_1,long param_2,char *param_3)
{
int iVar1;
int iVar2;
int iVar3;
iVar1 = *(int *)(param_2 + 0xc);
if ((long)iVar1 != 0) {
iVar2 = *(int *)(param_1 + 0xc);
iVar3 = iVar1 + iVar2;
rak_string_ensure_capacity(param_1,iVar3);
if (*param_3 == '\x01') {
memcpy((void *)((long)iVar2 + *(long *)(param_1 + 0x10)),*(void **)(param_2 + 0x10),
(long)iVar1);
*(int *)(param_1 + 0xc) = iVar3;
}
}
return;
}
|
|
3,461 | rak_string_inplace_concat | fabiosvm[P]rak/src/string.c | void rak_string_inplace_concat(RakString *str1, RakString *str2, RakError *err)
{
if (rak_string_is_empty(str2)) return;
int len1 = rak_string_len(str1);
int len2 = rak_string_len(str2);
int len = len1 + len2;
rak_string_ensure_capacity(str1, len, err);
if (!rak_is_ok(err)) return;
memcpy(&str1->slice.data[len1], rak_string_chars(str2), len2);
str1->slice.len = len;
} | O3 | c | rak_string_inplace_concat:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movslq 0xc(%rsi), %r14
testq %r14, %r14
je 0x80c8
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
movslq 0xc(%rdi), %r13
leal (%r14,%r13), %ebp
movl %ebp, %esi
callq 0x7f5e
cmpb $0x1, (%r12)
jne 0x80c8
addq 0x10(%rbx), %r13
movq 0x10(%r15), %rsi
movq %r13, %rdi
movq %r14, %rdx
callq 0x2100
movl %ebp, 0xc(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| rak_string_inplace_concat:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
movsxd r14, dword ptr [rsi+0Ch]
test r14, r14
jz short loc_80C8
mov r12, rdx
mov r15, rsi
mov rbx, rdi
movsxd r13, dword ptr [rdi+0Ch]
lea ebp, [r14+r13]
mov esi, ebp
call rak_string_ensure_capacity
cmp byte ptr [r12], 1
jnz short loc_80C8
add r13, [rbx+10h]
mov rsi, [r15+10h]
mov rdi, r13
mov rdx, r14
call _memcpy
mov [rbx+0Ch], ebp
loc_80C8:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long rak_string_inplace_concat(long long a1, long long a2, _BYTE *a3)
{
long long v3; // r14
long long v5; // r13
long long result; // rax
v3 = *(int *)(a2 + 12);
if ( *(_DWORD *)(a2 + 12) )
{
v5 = *(int *)(a1 + 12);
result = rak_string_ensure_capacity(a1, (int)v3 + (int)v5, a3);
if ( *a3 == 1 )
{
result = memcpy(*(_QWORD *)(a1 + 16) + v5, *(_QWORD *)(a2 + 16), v3);
*(_DWORD *)(a1 + 12) = v3 + v5;
}
}
return result;
}
| rak_string_inplace_concat:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOVSXD R14,dword ptr [RSI + 0xc]
TEST R14,R14
JZ 0x001080c8
MOV R12,RDX
MOV R15,RSI
MOV RBX,RDI
MOVSXD R13,dword ptr [RDI + 0xc]
LEA EBP,[R14 + R13*0x1]
MOV ESI,EBP
CALL 0x00107f5e
CMP byte ptr [R12],0x1
JNZ 0x001080c8
ADD R13,qword ptr [RBX + 0x10]
MOV RSI,qword ptr [R15 + 0x10]
MOV RDI,R13
MOV RDX,R14
CALL 0x00102100
MOV dword ptr [RBX + 0xc],EBP
LAB_001080c8:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void rak_string_inplace_concat(long param_1,long param_2,char *param_3)
{
int iVar1;
int iVar2;
int iVar3;
iVar1 = *(int *)(param_2 + 0xc);
if ((long)iVar1 != 0) {
iVar2 = *(int *)(param_1 + 0xc);
iVar3 = iVar1 + iVar2;
rak_string_ensure_capacity(param_1,iVar3);
if (*param_3 == '\x01') {
memcpy((void *)((long)iVar2 + *(long *)(param_1 + 0x10)),*(void **)(param_2 + 0x10),
(long)iVar1);
*(int *)(param_1 + 0xc) = iVar3;
}
}
return;
}
|
|
3,462 | my_wc_mb_latin1 | eloqsql/strings/ctype-latin1.c | static
int my_wc_mb_latin1(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc,
uchar *str,
uchar *end __attribute__((unused)))
{
const uchar *pl;
if (str >= end)
return MY_CS_TOOSMALL;
if (wc > 0xFFFF)
return MY_CS_ILUNI;
pl= uni_to_cs[wc >> 8];
str[0]= pl ? pl[wc & 0xFF] : '\0';
return (!str[0] && wc) ? MY_CS_ILUNI : 1;
} | O0 | c | my_wc_mb_latin1:
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 0x5156a
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x515f1
cmpq $0xffff, -0x18(%rbp) # imm = 0xFFFF
jbe 0x5157d
movl $0x0, -0x4(%rbp)
jmp 0x515f1
movq -0x18(%rbp), %rcx
shrq $0x8, %rcx
leaq 0x18bd24(%rip), %rax # 0x1dd2b0
movq (%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x515b3
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rcx
andq $0xff, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x34(%rbp)
jmp 0x515ba
xorl %eax, %eax
movl %eax, -0x34(%rbp)
jmp 0x515ba
movl -0x34(%rbp), %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movq -0x20(%rbp), %rcx
xorl %eax, %eax
cmpb $0x0, (%rcx)
movb %al, -0x35(%rbp)
jne 0x515de
cmpq $0x0, -0x18(%rbp)
setne %al
movb %al, -0x35(%rbp)
movb -0x35(%rbp), %dl
movl $0x1, %eax
xorl %ecx, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_wc_mb_latin1:
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_5156A
mov [rbp+var_4], 0FFFFFF9Bh
jmp loc_515F1
loc_5156A:
cmp [rbp+var_18], 0FFFFh
jbe short loc_5157D
mov [rbp+var_4], 0
jmp short loc_515F1
loc_5157D:
mov rcx, [rbp+var_18]
shr rcx, 8
lea rax, uni_to_cs
mov rax, [rax+rcx*8]
mov [rbp+var_30], rax
cmp [rbp+var_30], 0
jz short loc_515B3
mov rax, [rbp+var_30]
mov rcx, [rbp+var_18]
and rcx, 0FFh
movzx eax, byte ptr [rax+rcx]
mov [rbp+var_34], eax
jmp short loc_515BA
loc_515B3:
xor eax, eax
mov [rbp+var_34], eax
jmp short $+2
loc_515BA:
mov eax, [rbp+var_34]
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov rcx, [rbp+var_20]
xor eax, eax
cmp byte ptr [rcx], 0
mov [rbp+var_35], al
jnz short loc_515DE
cmp [rbp+var_18], 0
setnz al
mov [rbp+var_35], al
loc_515DE:
mov dl, [rbp+var_35]
mov eax, 1
xor ecx, ecx
test dl, 1
cmovnz eax, ecx
mov [rbp+var_4], eax
loc_515F1:
mov eax, [rbp+var_4]
pop rbp
retn
| long long my_wc_mb_latin1(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4)
{
bool v5; // [rsp+1h] [rbp-35h]
char v6; // [rsp+2h] [rbp-34h]
long long v7; // [rsp+6h] [rbp-30h]
if ( (unsigned long long)a3 < a4 )
{
if ( a2 <= 0xFFFF )
{
v7 = (long long)*(&uni_to_cs + (a2 >> 8));
if ( v7 )
v6 = *(_BYTE *)(v7 + (unsigned __int8)a2);
else
v6 = 0;
*a3 = v6;
v5 = 0;
if ( !*a3 )
v5 = a2 != 0;
return !v5;
}
else
{
return 0;
}
}
else
{
return (unsigned int)-101;
}
}
| my_wc_mb_latin1:
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 0x0015156a
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x001515f1
LAB_0015156a:
CMP qword ptr [RBP + -0x18],0xffff
JBE 0x0015157d
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001515f1
LAB_0015157d:
MOV RCX,qword ptr [RBP + -0x18]
SHR RCX,0x8
LEA RAX,[0x2dd2b0]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x30],RAX
CMP qword ptr [RBP + -0x30],0x0
JZ 0x001515b3
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x18]
AND RCX,0xff
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV dword ptr [RBP + -0x34],EAX
JMP 0x001515ba
LAB_001515b3:
XOR EAX,EAX
MOV dword ptr [RBP + -0x34],EAX
JMP 0x001515ba
LAB_001515ba:
MOV EAX,dword ptr [RBP + -0x34]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV RCX,qword ptr [RBP + -0x20]
XOR EAX,EAX
CMP byte ptr [RCX],0x0
MOV byte ptr [RBP + -0x35],AL
JNZ 0x001515de
CMP qword ptr [RBP + -0x18],0x0
SETNZ AL
MOV byte ptr [RBP + -0x35],AL
LAB_001515de:
MOV DL,byte ptr [RBP + -0x35]
MOV EAX,0x1
XOR ECX,ECX
TEST DL,0x1
CMOVNZ EAX,ECX
MOV dword ptr [RBP + -0x4],EAX
LAB_001515f1:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
uint my_wc_mb_latin1(int8 param_1,ulong param_2,char *param_3,char *param_4)
{
char cVar1;
uint local_c;
if (param_3 < param_4) {
if (param_2 < 0x10000) {
if (*(long *)(uni_to_cs + (param_2 >> 8) * 8) == 0) {
cVar1 = '\0';
}
else {
cVar1 = *(char *)(*(long *)(uni_to_cs + (param_2 >> 8) * 8) + (param_2 & 0xff));
}
*param_3 = cVar1;
local_c = (uint)(*param_3 != '\0' || param_2 == 0);
}
else {
local_c = 0;
}
}
else {
local_c = 0xffffff9b;
}
return local_c;
}
|
|
3,463 | testing::internal::DefaultGlobalTestPartResultReporter::ReportTestPartResult(testing::TestPartResult const&) | seiftnesse[P]memoryallocator/build_O2/_deps/googletest-src/googletest/src/gtest.cc | void DefaultGlobalTestPartResultReporter::ReportTestPartResult(
const TestPartResult& result) {
unit_test_->current_test_result()->AddTestPartResult(result);
unit_test_->listeners()->repeater()->OnTestPartResult(result);
} | O2 | cpp | testing::internal::DefaultGlobalTestPartResultReporter::ReportTestPartResult(testing::TestPartResult const&):
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rax
movq 0x170(%rax), %rdi
testq %rdi, %rdi
je 0x18091
addq $0x90, %rdi
jmp 0x180af
movq 0x168(%rax), %rdi
testq %rdi, %rdi
je 0x180a6
addq $0x88, %rdi
jmp 0x180af
addq $0x178, %rax # imm = 0x178
movq %rax, %rdi
addq $0x38, %rdi
movq %rbx, %rsi
callq 0x27010
movq 0x8(%r14), %rax
movq 0x1f8(%rax), %rdi
movq (%rdi), %rax
movq 0x50(%rax), %rax
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rax
nop
| _ZN7testing8internal35DefaultGlobalTestPartResultReporter20ReportTestPartResultERKNS_14TestPartResultE:
push r14
push rbx
push rax
mov rbx, rsi
mov r14, rdi
mov rax, [rdi+8]
mov rdi, [rax+170h]
test rdi, rdi
jz short loc_18091
add rdi, 90h
jmp short loc_180AF
loc_18091:
mov rdi, [rax+168h]
test rdi, rdi
jz short loc_180A6
add rdi, 88h
jmp short loc_180AF
loc_180A6:
add rax, 178h
mov rdi, rax
loc_180AF:
add rdi, 38h ; '8'
mov rsi, rbx
call _ZNSt6vectorIN7testing14TestPartResultESaIS1_EE9push_backERKS1_; std::vector<testing::TestPartResult>::push_back(testing::TestPartResult const&)
mov rax, [r14+8]
mov rdi, [rax+1F8h]
mov rax, [rdi]
mov rax, [rax+50h]
mov rsi, rbx
add rsp, 8
pop rbx
pop r14
jmp rax
| long long testing::internal::DefaultGlobalTestPartResultReporter::ReportTestPartResult(
testing::internal::DefaultGlobalTestPartResultReporter *this,
const testing::TestPartResult *a2)
{
long long v3; // rax
long long v4; // rdi
long long v5; // rdi
long long v6; // rdi
v3 = *((_QWORD *)this + 1);
v4 = *(_QWORD *)(v3 + 368);
if ( v4 )
{
v5 = v4 + 144;
}
else
{
v6 = *(_QWORD *)(v3 + 360);
if ( v6 )
v5 = v6 + 136;
else
v5 = v3 + 376;
}
std::vector<testing::TestPartResult>::push_back((testing::TestPartResultArray *)(v5 + 56), a2);
return (*(long long ( **)(_QWORD, const testing::TestPartResult *))(**(_QWORD **)(*((_QWORD *)this + 1) + 504LL)
+ 80LL))(
*(_QWORD *)(*((_QWORD *)this + 1) + 504LL),
a2);
}
| ReportTestPartResult:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
MOV RAX,qword ptr [RDI + 0x8]
MOV RDI,qword ptr [RAX + 0x170]
TEST RDI,RDI
JZ 0x00118091
ADD RDI,0x90
JMP 0x001180af
LAB_00118091:
MOV RDI,qword ptr [RAX + 0x168]
TEST RDI,RDI
JZ 0x001180a6
ADD RDI,0x88
JMP 0x001180af
LAB_001180a6:
ADD RAX,0x178
MOV RDI,RAX
LAB_001180af:
ADD RDI,0x38
MOV RSI,RBX
CALL 0x00127010
MOV RAX,qword ptr [R14 + 0x8]
MOV RDI,qword ptr [RAX + 0x1f8]
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0x50]
MOV RSI,RBX
ADD RSP,0x8
POP RBX
POP R14
JMP RAX
|
/* testing::internal::DefaultGlobalTestPartResultReporter::ReportTestPartResult(testing::TestPartResult
const&) */
void __thiscall
testing::internal::DefaultGlobalTestPartResultReporter::ReportTestPartResult
(DefaultGlobalTestPartResultReporter *this,TestPartResult *param_1)
{
long lVar1;
lVar1 = *(long *)(this + 8);
if (*(long *)(lVar1 + 0x170) == 0) {
if (*(long *)(lVar1 + 0x168) == 0) {
lVar1 = lVar1 + 0x178;
}
else {
lVar1 = *(long *)(lVar1 + 0x168) + 0x88;
}
}
else {
lVar1 = *(long *)(lVar1 + 0x170) + 0x90;
}
std::vector<testing::TestPartResult,std::allocator<testing::TestPartResult>>::push_back
((vector<testing::TestPartResult,std::allocator<testing::TestPartResult>> *)
(lVar1 + 0x38),param_1);
/* WARNING: Could not recover jumptable at 0x001180d7. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(**(long **)(*(long *)(this + 8) + 0x1f8) + 0x50))
(*(long **)(*(long *)(this + 8) + 0x1f8),param_1);
return;
}
|
|
3,464 | evmone_compat::aligned_alloc(unsigned long, unsigned long) | corpus-core[P]colibri-stateless/build_O0/_deps/evmone_external-src/lib/evmone/aligned_alloc_fallback.hpp | inline void* aligned_alloc(size_t alignment, size_t size) {
// Platform-specific implementations
void* ptr = nullptr;
#if defined(_WIN32) || defined(_MSC_VER)
// Windows implementation using _aligned_malloc
ptr = _aligned_malloc(size, alignment);
#elif defined(__APPLE__) || defined(__ANDROID__) || defined(ANDROID)
// Apple/Android implementation using posix_memalign
if (posix_memalign(&ptr, alignment, size) != 0) {
return nullptr;
}
#else
// Standard C11 implementation
return std::aligned_alloc(alignment, size);
#endif
return ptr;
} | O0 | cpp | evmone_compat::aligned_alloc(unsigned long, unsigned long):
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x234c0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| _ZN13evmone_compat13aligned_allocEmm:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], 0
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
call _aligned_alloc
add rsp, 20h
pop rbp
retn
| long long evmone_compat::aligned_alloc(evmone_compat *this, long long a2)
{
return aligned_alloc(this, a2);
}
| aligned_alloc:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],0x0
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x001234c0
ADD RSP,0x20
POP RBP
RET
|
/* evmone_compat::aligned_alloc(unsigned long, unsigned long) */
void evmone_compat::aligned_alloc(ulong param_1,ulong param_2)
{
::aligned_alloc(param_1,param_2);
return;
}
|
|
3,465 | strlength | eloqsql/mysys/mf_format.c | size_t strlength(const char *str)
{
reg1 const char * pos;
reg2 const char * found;
DBUG_ENTER("strlength");
pos= found= str;
while (*pos)
{
if (*pos != ' ')
{
while (*++pos && *pos != ' ') {};
if (!*pos)
{
found=pos; /* String ends here */
break;
}
}
found=pos;
while (*++pos == ' ') {};
}
DBUG_RETURN((size_t) (found - str));
} | O3 | c | strlength:
pushq %rbp
movq %rsp, %rbp
movb (%rdi), %dl
movq %rdi, %rax
movq %rdi, %rcx
cmpb $0x20, %dl
je 0x94b19
movzbl %dl, %edx
testl %edx, %edx
je 0x94b32
movzbl 0x1(%rcx), %eax
incq %rcx
testl %eax, %eax
je 0x94b2f
cmpl $0x20, %eax
jne 0x94b09
movq %rcx, %rsi
movb 0x1(%rsi), %dl
incq %rsi
cmpb $0x20, %dl
je 0x94b1c
movq %rcx, %rax
movq %rsi, %rcx
jmp 0x94afd
movq %rcx, %rax
subq %rdi, %rax
popq %rbp
retq
nop
| strlength:
push rbp
mov rbp, rsp
mov dl, [rdi]
mov rax, rdi
mov rcx, rdi
loc_94AFD:
cmp dl, 20h ; ' '
jz short loc_94B19
movzx edx, dl
test edx, edx
jz short loc_94B32
loc_94B09:
movzx eax, byte ptr [rcx+1]
inc rcx
test eax, eax
jz short loc_94B2F
cmp eax, 20h ; ' '
jnz short loc_94B09
loc_94B19:
mov rsi, rcx
loc_94B1C:
mov dl, [rsi+1]
inc rsi
cmp dl, 20h ; ' '
jz short loc_94B1C
mov rax, rcx
mov rcx, rsi
jmp short loc_94AFD
loc_94B2F:
mov rax, rcx
loc_94B32:
sub rax, rdi
pop rbp
retn
| long long strlength(_BYTE *a1)
{
char v1; // dl
_BYTE *v2; // rax
_BYTE *v3; // rcx
int v4; // eax
_BYTE *v5; // rsi
v1 = *a1;
v2 = a1;
v3 = a1;
while ( v1 == 32 )
{
LABEL_6:
v5 = v3;
do
v1 = *++v5;
while ( v1 == 32 );
v2 = v3;
v3 = v5;
}
if ( v1 )
{
while ( 1 )
{
v4 = (unsigned __int8)*++v3;
if ( !v4 )
break;
if ( v4 == 32 )
goto LABEL_6;
}
v2 = v3;
}
return v2 - a1;
}
| strlength:
PUSH RBP
MOV RBP,RSP
MOV DL,byte ptr [RDI]
MOV RAX,RDI
MOV RCX,RDI
LAB_00194afd:
CMP DL,0x20
JZ 0x00194b19
MOVZX EDX,DL
TEST EDX,EDX
JZ 0x00194b32
LAB_00194b09:
MOVZX EAX,byte ptr [RCX + 0x1]
INC RCX
TEST EAX,EAX
JZ 0x00194b2f
CMP EAX,0x20
JNZ 0x00194b09
LAB_00194b19:
MOV RSI,RCX
LAB_00194b1c:
MOV DL,byte ptr [RSI + 0x1]
INC RSI
CMP DL,0x20
JZ 0x00194b1c
MOV RAX,RCX
MOV RCX,RSI
JMP 0x00194afd
LAB_00194b2f:
MOV RAX,RCX
LAB_00194b32:
SUB RAX,RDI
POP RBP
RET
|
long strlength(char *param_1)
{
char *pcVar1;
char *pcVar2;
char *pcVar3;
char cVar4;
char *pcVar5;
cVar4 = *param_1;
pcVar3 = param_1;
pcVar5 = param_1;
do {
pcVar2 = pcVar5;
if (cVar4 != ' ') {
if (cVar4 == '\0') {
LAB_00194b32:
return (long)pcVar3 - (long)param_1;
}
do {
pcVar1 = pcVar5 + 1;
pcVar3 = pcVar5 + 1;
if (*pcVar1 == '\0') goto LAB_00194b32;
pcVar5 = pcVar3;
pcVar2 = pcVar3;
} while (*pcVar1 != ' ');
}
do {
pcVar3 = pcVar2;
cVar4 = pcVar5[1];
pcVar5 = pcVar5 + 1;
pcVar2 = pcVar3;
} while (cVar4 == ' ');
} while( true );
}
|
|
3,466 | LefDefParser::lefiViaRule::addViaName(char const*) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiViaRule.cpp | void
lefiViaRule::addViaName(const char *name)
{
// Add one of possibly many via names
int len = strlen(name) + 1;
if (numVias_ == viasAllocated_) {
int i;
char **nn;
if (viasAllocated_ == 0)
viasAllocated_ = 2;
else
viasAllocated_ *= 2;
nn = (char**) lefMalloc(sizeof(char*) * viasAllocated_);
for (i = 0; i < numVias_; i++)
nn[i] = vias_[i];
lefFree((char*) (vias_));
vias_ = nn;
}
vias_[numVias_] = (char*) lefMalloc(len);
strcpy(vias_[numVias_], CASE(name));
numVias_ += 1;
} | O3 | cpp | LefDefParser::lefiViaRule::addViaName(char const*):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x20e0
movq %rax, %r15
movl 0x1c8(%rbx), %eax
cmpl 0x1cc(%rbx), %eax
jne 0x2d869
leal (%rax,%rax), %ecx
testl %eax, %eax
movl $0x2, %eax
cmovnel %ecx, %eax
movl %eax, 0x1cc(%rbx)
movslq %eax, %rdi
shlq $0x3, %rdi
callq 0x30c15
movq %rax, %r12
movslq 0x1c8(%rbx), %rax
testq %rax, %rax
jle 0x2d856
xorl %ecx, %ecx
movq 0x1d0(%rbx), %rdx
movq (%rdx,%rcx,8), %rdx
movq %rdx, (%r12,%rcx,8)
incq %rcx
cmpq %rcx, %rax
jne 0x2d83f
movq 0x1d0(%rbx), %rdi
callq 0x322d0
movq %r12, 0x1d0(%rbx)
incl %r15d
movslq %r15d, %rdi
callq 0x30c15
movq 0x1d0(%rbx), %rcx
movslq 0x1c8(%rbx), %rdx
movq %rax, (%rcx,%rdx,8)
movq 0x1d0(%rbx), %rax
movq (%rax,%rdx,8), %r15
movq %r14, %rdi
callq 0x33e9a
movq %r15, %rdi
movq %rax, %rsi
callq 0x21d0
incl 0x1c8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| _ZN12LefDefParser11lefiViaRule10addViaNameEPKc:
push r15
push r14
push r12
push rbx
push rax
mov r14, rsi
mov rbx, rdi
mov rdi, rsi
call _strlen
mov r15, rax
mov eax, [rbx+1C8h]
cmp eax, [rbx+1CCh]
jnz short loc_2D869
lea ecx, [rax+rax]
test eax, eax
mov eax, 2
cmovnz eax, ecx
mov [rbx+1CCh], eax
movsxd rdi, eax
shl rdi, 3; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov r12, rax
movsxd rax, dword ptr [rbx+1C8h]
test rax, rax
jle short loc_2D856
xor ecx, ecx
loc_2D83F:
mov rdx, [rbx+1D0h]
mov rdx, [rdx+rcx*8]
mov [r12+rcx*8], rdx
inc rcx
cmp rax, rcx
jnz short loc_2D83F
loc_2D856:
mov rdi, [rbx+1D0h]; this
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
mov [rbx+1D0h], r12
loc_2D869:
inc r15d
movsxd rdi, r15d; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov rcx, [rbx+1D0h]
movsxd rdx, dword ptr [rbx+1C8h]
mov [rcx+rdx*8], rax
mov rax, [rbx+1D0h]
mov r15, [rax+rdx*8]
mov rdi, r14; this
call _ZN12LefDefParser4CASEEPKc; LefDefParser::CASE(char const*)
mov rdi, r15
mov rsi, rax
call _strcpy
inc dword ptr [rbx+1C8h]
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
| long long LefDefParser::lefiViaRule::addViaName(LefDefParser::lefiViaRule *this, char *a2)
{
int v2; // r15d
int v3; // eax
int v4; // ecx
bool v5; // zf
int v6; // eax
long long v7; // r12
long long v8; // rax
long long i; // rcx
long long v10; // rax
long long v11; // rdx
long long v12; // r15
long long v13; // rax
long long result; // rax
v2 = strlen(a2);
v3 = *((_DWORD *)this + 114);
if ( v3 == *((_DWORD *)this + 115) )
{
v4 = 2 * v3;
v5 = v3 == 0;
v6 = 2;
if ( !v5 )
v6 = v4;
*((_DWORD *)this + 115) = v6;
v7 = LefDefParser::lefMalloc((LefDefParser *)(8LL * v6), (unsigned long long)a2);
v8 = *((int *)this + 114);
if ( v8 > 0 )
{
for ( i = 0LL; i != v8; ++i )
*(_QWORD *)(v7 + 8 * i) = *(_QWORD *)(*((_QWORD *)this + 58) + 8 * i);
}
LefDefParser::lefFree(*((LefDefParser **)this + 58), a2);
*((_QWORD *)this + 58) = v7;
}
v10 = LefDefParser::lefMalloc((LefDefParser *)(v2 + 1), (unsigned long long)a2);
v11 = *((int *)this + 114);
*(_QWORD *)(*((_QWORD *)this + 58) + 8 * v11) = v10;
v12 = *(_QWORD *)(*((_QWORD *)this + 58) + 8 * v11);
v13 = LefDefParser::CASE((LefDefParser *)a2, a2);
result = strcpy(v12, v13);
++*((_DWORD *)this + 114);
return result;
}
| addViaName:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
MOV RDI,RSI
CALL 0x001020e0
MOV R15,RAX
MOV EAX,dword ptr [RBX + 0x1c8]
CMP EAX,dword ptr [RBX + 0x1cc]
JNZ 0x0012d869
LEA ECX,[RAX + RAX*0x1]
TEST EAX,EAX
MOV EAX,0x2
CMOVNZ EAX,ECX
MOV dword ptr [RBX + 0x1cc],EAX
MOVSXD RDI,EAX
SHL RDI,0x3
CALL 0x00130c15
MOV R12,RAX
MOVSXD RAX,dword ptr [RBX + 0x1c8]
TEST RAX,RAX
JLE 0x0012d856
XOR ECX,ECX
LAB_0012d83f:
MOV RDX,qword ptr [RBX + 0x1d0]
MOV RDX,qword ptr [RDX + RCX*0x8]
MOV qword ptr [R12 + RCX*0x8],RDX
INC RCX
CMP RAX,RCX
JNZ 0x0012d83f
LAB_0012d856:
MOV RDI,qword ptr [RBX + 0x1d0]
CALL 0x001322d0
MOV qword ptr [RBX + 0x1d0],R12
LAB_0012d869:
INC R15D
MOVSXD RDI,R15D
CALL 0x00130c15
MOV RCX,qword ptr [RBX + 0x1d0]
MOVSXD RDX,dword ptr [RBX + 0x1c8]
MOV qword ptr [RCX + RDX*0x8],RAX
MOV RAX,qword ptr [RBX + 0x1d0]
MOV R15,qword ptr [RAX + RDX*0x8]
MOV RDI,R14
CALL 0x00133e9a
MOV RDI,R15
MOV RSI,RAX
CALL 0x001021d0
INC dword ptr [RBX + 0x1c8]
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* LefDefParser::lefiViaRule::addViaName(char const*) */
void __thiscall LefDefParser::lefiViaRule::addViaName(lefiViaRule *this,char *param_1)
{
int iVar1;
int iVar2;
size_t sVar3;
long lVar4;
int8 uVar5;
char *__src;
long lVar6;
char *pcVar7;
pcVar7 = param_1;
sVar3 = strlen(param_1);
iVar1 = *(int *)(this + 0x1c8);
if (iVar1 == *(int *)(this + 0x1cc)) {
iVar2 = 2;
if (iVar1 != 0) {
iVar2 = iVar1 * 2;
}
*(int *)(this + 0x1cc) = iVar2;
lVar4 = lefMalloc((LefDefParser *)((long)iVar2 << 3),(ulong)pcVar7);
iVar1 = *(int *)(this + 0x1c8);
if (0 < (long)iVar1) {
lVar6 = 0;
do {
*(int8 *)(lVar4 + lVar6 * 8) = *(int8 *)(*(long *)(this + 0x1d0) + lVar6 * 8);
lVar6 = lVar6 + 1;
} while (iVar1 != lVar6);
}
lefFree(*(void **)(this + 0x1d0));
*(long *)(this + 0x1d0) = lVar4;
}
uVar5 = lefMalloc((LefDefParser *)(long)((int)sVar3 + 1),(ulong)pcVar7);
iVar1 = *(int *)(this + 0x1c8);
*(int8 *)(*(long *)(this + 0x1d0) + (long)iVar1 * 8) = uVar5;
pcVar7 = *(char **)(*(long *)(this + 0x1d0) + (long)iVar1 * 8);
__src = (char *)CASE(param_1);
strcpy(pcVar7,__src);
*(int *)(this + 0x1c8) = *(int *)(this + 0x1c8) + 1;
return;
}
|
|
3,467 | nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::serializer(std::shared_ptr<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>>, char, nlohmann::json_abi_v3_11_3::detail::error_handler_t) | monkey531[P]llama/common/json.hpp | serializer(output_adapter_t<char> s, const char ichar,
error_handler_t error_handler_ = error_handler_t::strict)
: o(std::move(s))
, loc(std::localeconv())
, thousands_sep(loc->thousands_sep == nullptr ? '\0' : std::char_traits<char>::to_char_type(* (loc->thousands_sep)))
, decimal_point(loc->decimal_point == nullptr ? '\0' : std::char_traits<char>::to_char_type(* (loc->decimal_point)))
, indent_char(ichar)
, indent_string(512, indent_char)
, error_handler(error_handler_)
{} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::serializer(std::shared_ptr<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>>, char, nlohmann::json_abi_v3_11_3::detail::error_handler_t):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movl %edx, %r14d
movq %rdi, %rbx
xorl %r15d, %r15d
movq %r15, 0x8(%rdi)
movups (%rsi), %xmm0
movq %r15, 0x8(%rsi)
movups %xmm0, (%rdi)
movq %r15, (%rsi)
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rdi)
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
callq 0x1c100
movq %rax, 0x50(%rbx)
movq 0x8(%rax), %rcx
testq %rcx, %rcx
je 0xb6869
movb (%rcx), %r15b
movb %r15b, 0x58(%rbx)
movq (%rax), %rax
testq %rax, %rax
je 0xb6879
movb (%rax), %al
jmp 0xb687b
xorl %eax, %eax
movb %al, 0x59(%rbx)
leaq 0x5a(%rbx), %rdi
movl $0x200, %edx # imm = 0x200
xorl %esi, %esi
callq 0x1b4e0
movb %r14b, 0x25a(%rbx)
leaq 0x260(%rbx), %rdi
leaq 0x270(%rbx), %rax
movq %rax, 0x260(%rbx)
movsbl %r14b, %edx
movl $0x200, %esi # imm = 0x200
callq 0x1ba00
movl %ebp, 0x280(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0xb68da
callq 0x6dfc6
movq %r14, %rdi
callq 0x1bf90
| _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2ESt10shared_ptrINS1_23output_adapter_protocolIcEEEcNS1_15error_handler_tE:
push rbp
push r15
push r14
push rbx
push rax
mov ebp, ecx
mov r14d, edx
mov rbx, rdi
xor r15d, r15d
mov [rdi+8], r15
movups xmm0, xmmword ptr [rsi]
mov [rsi+8], r15
movups xmmword ptr [rdi], xmm0
mov [rsi], r15
xorps xmm0, xmm0
movups xmmword ptr [rdi+40h], xmm0
movups xmmword ptr [rdi+30h], xmm0
movups xmmword ptr [rdi+20h], xmm0
movups xmmword ptr [rdi+10h], xmm0
call _localeconv
mov [rbx+50h], rax
mov rcx, [rax+8]
test rcx, rcx
jz short loc_B6869
mov r15b, [rcx]
loc_B6869:
mov [rbx+58h], r15b
mov rax, [rax]
test rax, rax
jz short loc_B6879
mov al, [rax]
jmp short loc_B687B
loc_B6879:
xor eax, eax
loc_B687B:
mov [rbx+59h], al
lea rdi, [rbx+5Ah]
mov edx, 200h
xor esi, esi
call _memset
mov [rbx+25Ah], r14b
lea rdi, [rbx+260h]
lea rax, [rbx+270h]
mov [rbx+260h], rax
movsx edx, r14b
mov esi, 200h
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
mov [rbx+280h], ebp
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
mov r14, rax
mov rdi, [rbx+8]
test rdi, rdi
jz short loc_B68DA
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_B68DA:
mov rdi, r14
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::serializer(
long long a1,
__int128 *a2,
char a3,
int a4)
{
char v6; // r15
__int128 v7; // xmm0
long long v8; // rax
char *v9; // rcx
char *v10; // rax
char v11; // al
long long result; // rax
v6 = 0;
*(_QWORD *)(a1 + 8) = 0LL;
v7 = *a2;
*((_QWORD *)a2 + 1) = 0LL;
*(_OWORD *)a1 = v7;
*(_QWORD *)a2 = 0LL;
*(_OWORD *)(a1 + 64) = 0LL;
*(_OWORD *)(a1 + 48) = 0LL;
*(_OWORD *)(a1 + 32) = 0LL;
*(_OWORD *)(a1 + 16) = 0LL;
v8 = localeconv(a1);
*(_QWORD *)(a1 + 80) = v8;
v9 = *(char **)(v8 + 8);
if ( v9 )
v6 = *v9;
*(_BYTE *)(a1 + 88) = v6;
v10 = *(char **)v8;
if ( v10 )
v11 = *v10;
else
v11 = 0;
*(_BYTE *)(a1 + 89) = v11;
memset(a1 + 90, 0LL, 512LL);
*(_BYTE *)(a1 + 602) = a3;
*(_QWORD *)(a1 + 608) = a1 + 624;
result = std::string::_M_construct(a1 + 608, 512LL, (unsigned int)a3);
*(_DWORD *)(a1 + 640) = a4;
return result;
}
| serializer:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EBP,ECX
MOV R14D,EDX
MOV RBX,RDI
XOR R15D,R15D
MOV qword ptr [RDI + 0x8],R15
MOVUPS XMM0,xmmword ptr [RSI]
MOV qword ptr [RSI + 0x8],R15
MOVUPS xmmword ptr [RDI],XMM0
MOV qword ptr [RSI],R15
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x40],XMM0
MOVUPS xmmword ptr [RDI + 0x30],XMM0
MOVUPS xmmword ptr [RDI + 0x20],XMM0
MOVUPS xmmword ptr [RDI + 0x10],XMM0
CALL 0x0011c100
MOV qword ptr [RBX + 0x50],RAX
MOV RCX,qword ptr [RAX + 0x8]
TEST RCX,RCX
JZ 0x001b6869
MOV R15B,byte ptr [RCX]
LAB_001b6869:
MOV byte ptr [RBX + 0x58],R15B
MOV RAX,qword ptr [RAX]
TEST RAX,RAX
JZ 0x001b6879
MOV AL,byte ptr [RAX]
JMP 0x001b687b
LAB_001b6879:
XOR EAX,EAX
LAB_001b687b:
MOV byte ptr [RBX + 0x59],AL
LEA RDI,[RBX + 0x5a]
MOV EDX,0x200
XOR ESI,ESI
CALL 0x0011b4e0
MOV byte ptr [RBX + 0x25a],R14B
LEA RDI,[RBX + 0x260]
LEA RAX,[RBX + 0x270]
MOV qword ptr [RBX + 0x260],RAX
LAB_001b68aa:
MOVSX EDX,R14B
MOV ESI,0x200
CALL 0x0011ba00
LAB_001b68b8:
MOV dword ptr [RBX + 0x280],EBP
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>
>::serializer(std::shared_ptr<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>
>, char, nlohmann::json_abi_v3_11_3::detail::error_handler_t) */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::
serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::serializer(serializer<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,int8 *param_2,
serializer<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_3,int4 param_4)
{
int8 uVar1;
serializer<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>>
sVar2;
lconv *plVar3;
sVar2 = (serializer<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>>
)0x0;
*(int8 *)(this + 8) = 0;
uVar1 = param_2[1];
param_2[1] = 0;
*(int8 *)this = *param_2;
*(int8 *)(this + 8) = uVar1;
*param_2 = 0;
*(int8 *)(this + 0x40) = 0;
*(int8 *)(this + 0x48) = 0;
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
plVar3 = localeconv();
*(lconv **)(this + 0x50) = plVar3;
if ((serializer<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>>
*)plVar3->thousands_sep !=
(serializer<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>>
*)0x0) {
sVar2 = *(serializer<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>>
*)plVar3->thousands_sep;
}
this[0x58] = sVar2;
if ((serializer<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>>
*)plVar3->decimal_point ==
(serializer<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>>
*)0x0) {
sVar2 = (serializer<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>>
)0x0;
}
else {
sVar2 = *(serializer<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>>
*)plVar3->decimal_point;
}
this[0x59] = sVar2;
memset(this + 0x5a,0,0x200);
this[0x25a] = param_3;
*(serializer<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 + 0x260) = this + 0x270;
/* try { // try from 001b68aa to 001b68b7 has its CatchHandler @ 001b68c9 */
std::__cxx11::string::_M_construct((ulong)(this + 0x260),'\0');
*(int4 *)(this + 0x280) = param_4;
return;
}
|
|
3,468 | fini_one_value | eloqsql/mysys/my_getopt.c | static void fini_one_value(const struct my_option *option, void *variable,
longlong value __attribute__ ((unused)))
{
DBUG_ENTER("fini_one_value");
switch ((option->var_type & GET_TYPE_MASK)) {
case GET_STR_ALLOC:
my_free(*((char**) variable));
*((char**) variable)= NULL;
break;
default: /* dummy default to avoid compiler warnings */
break;
}
DBUG_VOID_RETURN;
} | O3 | c | fini_one_value:
movl 0x30(%rdi), %eax
andl $0x3f, %eax
cmpl $0xa, %eax
jne 0x9afc4
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq (%rsi), %rdi
callq 0x9c92a
movq $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| fini_one_value:
mov eax, [rdi+30h]
and eax, 3Fh
cmp eax, 0Ah
jnz short locret_9AFC4
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rsi
mov rdi, [rsi]
call my_free
mov qword ptr [rbx], 0
add rsp, 8
pop rbx
pop rbp
locret_9AFC4:
retn
| long long fini_one_value(long long a1, _QWORD *a2)
{
long long result; // rax
result = *(_DWORD *)(a1 + 48) & 0x3F;
if ( (_DWORD)result == 10 )
{
result = my_free(*a2);
*a2 = 0LL;
}
return result;
}
| fini_one_value:
MOV EAX,dword ptr [RDI + 0x30]
AND EAX,0x3f
CMP EAX,0xa
JNZ 0x0019afc4
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV RDI,qword ptr [RSI]
CALL 0x0019c92a
MOV qword ptr [RBX],0x0
ADD RSP,0x8
POP RBX
POP RBP
LAB_0019afc4:
RET
|
void fini_one_value(long param_1,int8 *param_2)
{
if ((*(uint *)(param_1 + 0x30) & 0x3f) == 10) {
my_free(*param_2);
*param_2 = 0;
}
return;
}
|
|
3,469 | POINTonE1_affine_Serialize_BE | corpus-core[P]colibri-stateless/build_O2/_deps/blst-src/src/e1.c | static limb_t POINTonE1_affine_Serialize_BE(unsigned char out[96],
const POINTonE1_affine *in)
{
vec384 temp;
from_fp(temp, in->X);
be_bytes_from_limbs(out, temp, sizeof(temp));
from_fp(temp, in->Y);
be_bytes_from_limbs(out + 48, temp, sizeof(temp));
return sgn0_pty_mod_384(temp, BLS12_381_P);
} | O2 | c | POINTonE1_affine_Serialize_BE:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r14
movq %rdi, %r15
leaq -0x50(%rbp), %rbx
movq %rbx, %rdi
callq 0x565c4
pushq $0x30
popq %r12
movq %r15, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x565df
addq $0x30, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x565c4
addq $0x30, %r15
movq %r15, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x565df
leaq 0x2e97a(%rip), %rsi # 0x7fcb0
movq %rbx, %rdi
callq 0x64320
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| POINTonE1_affine_Serialize_BE:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 30h
mov r14, rsi
mov r15, rdi
lea rbx, [rbp+var_50]
mov rdi, rbx
call from_fp
push 30h ; '0'
pop r12
mov rdi, r15
mov rsi, rbx
mov rdx, r12
call be_bytes_from_limbs
add r14, 30h ; '0'
mov rdi, rbx
mov rsi, r14
call from_fp
add r15, 30h ; '0'
mov rdi, r15
mov rsi, rbx
mov rdx, r12
call be_bytes_from_limbs
lea rsi, BLS12_381_P
mov rdi, rbx
call sgn0_pty_mod_384
add rsp, 30h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long POINTonE1_affine_Serialize_BE(long long a1)
{
_BYTE v2[80]; // [rsp+0h] [rbp-50h] BYREF
from_fp(v2);
be_bytes_from_limbs(a1, v2, 48LL);
from_fp(v2);
be_bytes_from_limbs(a1 + 48, v2, 48LL);
return sgn0_pty_mod_384(v2, &BLS12_381_P);
}
| POINTonE1_affine_Serialize_BE:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x30
MOV R14,RSI
MOV R15,RDI
LEA RBX,[RBP + -0x50]
MOV RDI,RBX
CALL 0x001565c4
PUSH 0x30
POP R12
MOV RDI,R15
MOV RSI,RBX
MOV RDX,R12
CALL 0x001565df
ADD R14,0x30
MOV RDI,RBX
MOV RSI,R14
CALL 0x001565c4
ADD R15,0x30
MOV RDI,R15
MOV RSI,RBX
MOV RDX,R12
CALL 0x001565df
LEA RSI,[0x17fcb0]
MOV RDI,RBX
CALL 0x00164320
ADD RSP,0x30
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
void POINTonE1_affine_Serialize_BE(long param_1,long param_2)
{
int1 local_58 [48];
from_fp(local_58);
be_bytes_from_limbs(param_1,local_58,0x30);
from_fp(local_58,param_2 + 0x30);
be_bytes_from_limbs(param_1 + 0x30,local_58,0x30);
sgn0_pty_mod_384(local_58,BLS12_381_P);
return;
}
|
|
3,470 | ratio | eloqsql/strings/dtoa.c | static double ratio(Bigint *a, Bigint *b)
{
U da, db;
int k, ka, kb;
dval(&da)= b2d(a, &ka);
dval(&db)= b2d(b, &kb);
k= ka - kb + 32*(a->wds - b->wds);
if (k > 0)
word0(&da)+= (ULong)(k*Exp_msk1 * 1.0);
else
{
k= -k;
word0(&db)+= k*Exp_msk1;
}
return dval(&da) / dval(&db);
} | O0 | c | ratio:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0xd1800
movsd %xmm0, -0x18(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x2c(%rbp), %rsi
callq 0xd1800
movsd %xmm0, -0x20(%rbp)
movl -0x28(%rbp), %eax
subl -0x2c(%rbp), %eax
movq -0x8(%rbp), %rcx
movl 0x14(%rcx), %ecx
movq -0x10(%rbp), %rdx
subl 0x14(%rdx), %ecx
shll $0x5, %ecx
addl %ecx, %eax
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jle 0xd14a4
movl -0x24(%rbp), %eax
shll $0x14, %eax
addl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
jmp 0xd14b8
xorl %eax, %eax
subl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
shll $0x14, %eax
addl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movsd -0x18(%rbp), %xmm0
divsd -0x20(%rbp), %xmm0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| ratio:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rdi, [rbp+var_8]
lea rsi, [rbp+var_28]
call b2d
movsd [rbp+var_18], xmm0
mov rdi, [rbp+var_10]
lea rsi, [rbp+var_2C]
call b2d
movsd [rbp+var_20], xmm0
mov eax, [rbp+var_28]
sub eax, [rbp+var_2C]
mov rcx, [rbp+var_8]
mov ecx, [rcx+14h]
mov rdx, [rbp+var_10]
sub ecx, [rdx+14h]
shl ecx, 5
add eax, ecx
mov [rbp+var_24], eax
cmp [rbp+var_24], 0
jle short loc_D14A4
mov eax, [rbp+var_24]
shl eax, 14h
add eax, dword ptr [rbp+var_18+4]
mov dword ptr [rbp+var_18+4], eax
jmp short loc_D14B8
loc_D14A4:
xor eax, eax
sub eax, [rbp+var_24]
mov [rbp+var_24], eax
mov eax, [rbp+var_24]
shl eax, 14h
add eax, dword ptr [rbp+var_20+4]
mov dword ptr [rbp+var_20+4], eax
loc_D14B8:
movsd xmm0, [rbp+var_18]
divsd xmm0, [rbp+var_20]
add rsp, 30h
pop rbp
retn
| double ratio(long long a1, long long a2)
{
int v3; // [rsp+4h] [rbp-2Ch] BYREF
int v4; // [rsp+8h] [rbp-28h] BYREF
int v5; // [rsp+Ch] [rbp-24h]
double v6; // [rsp+10h] [rbp-20h]
double v7; // [rsp+18h] [rbp-18h]
long long v8; // [rsp+20h] [rbp-10h]
long long v9; // [rsp+28h] [rbp-8h]
v9 = a1;
v8 = a2;
v7 = b2d(a1, &v4);
v6 = b2d(v8, &v3);
v5 = 32 * (*(_DWORD *)(v9 + 20) - *(_DWORD *)(v8 + 20)) + v4 - v3;
if ( v5 <= 0 )
{
v5 = -v5;
HIDWORD(v6) += v5 << 20;
}
else
{
HIDWORD(v7) += v5 << 20;
}
return v7 / v6;
}
| ratio:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[RBP + -0x28]
CALL 0x001d1800
MOVSD qword ptr [RBP + -0x18],XMM0
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[RBP + -0x2c]
CALL 0x001d1800
MOVSD qword ptr [RBP + -0x20],XMM0
MOV EAX,dword ptr [RBP + -0x28]
SUB EAX,dword ptr [RBP + -0x2c]
MOV RCX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RCX + 0x14]
MOV RDX,qword ptr [RBP + -0x10]
SUB ECX,dword ptr [RDX + 0x14]
SHL ECX,0x5
ADD EAX,ECX
MOV dword ptr [RBP + -0x24],EAX
CMP dword ptr [RBP + -0x24],0x0
JLE 0x001d14a4
MOV EAX,dword ptr [RBP + -0x24]
SHL EAX,0x14
ADD EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x14],EAX
JMP 0x001d14b8
LAB_001d14a4:
XOR EAX,EAX
SUB EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x24],EAX
MOV EAX,dword ptr [RBP + -0x24]
SHL EAX,0x14
ADD EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x1c],EAX
LAB_001d14b8:
MOVSD XMM0,qword ptr [RBP + -0x18]
DIVSD XMM0,qword ptr [RBP + -0x20]
ADD RSP,0x30
POP RBP
RET
|
double ratio(long param_1,long param_2)
{
int iVar1;
double dVar2;
int local_34;
int local_30 [2];
int8 local_28;
int8 local_20;
long local_18;
long local_10;
local_18 = param_2;
local_10 = param_1;
local_20 = (double)b2d(param_1,local_30);
dVar2 = (double)b2d(local_18,&local_34);
iVar1 = (local_30[0] - local_34) + (*(int *)(local_10 + 0x14) - *(int *)(local_18 + 0x14)) * 0x20;
if (iVar1 < 1) {
local_28._4_4_ = (int)((ulong)dVar2 >> 0x20);
local_28 = (double)CONCAT44(iVar1 * -0x100000 + local_28._4_4_,SUB84(dVar2,0));
}
else {
local_20 = (double)CONCAT44(iVar1 * 0x100000 + local_20._4_4_,(int4)local_20);
local_28 = dVar2;
}
return local_20 / local_28;
}
|
|
3,471 | Rpl_filter::add_wild_do_table(char const*) | eloqsql/sql/rpl_filter.cc | int
Rpl_filter::add_wild_do_table(const char* table_spec)
{
DBUG_ENTER("Rpl_filter::add_wild_do_table");
if (!wild_do_table_inited)
init_table_rule_array(&wild_do_table, &wild_do_table_inited);
table_rules_on= 1;
DBUG_RETURN(add_wild_table_rule(&wild_do_table, table_spec));
} | O3 | cpp | Rpl_filter::add_wild_do_table(char const*):
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
cmpb $0x0, 0x137(%rdi)
jne 0x54ff7
leaq 0xe0(%r14), %rsi
movq $0x0, (%rsp)
xorl %edi, %edi
movl $0x8, %edx
xorl %ecx, %ecx
movl $0x10, %r8d
movl $0x10, %r9d
callq 0x7729c
movb $0x1, 0x137(%r14)
movb $0x1, 0x134(%r14)
addq $0xe0, %r14
movq %r14, %rsi
movq %rbx, %rdx
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x55050
nop
| _ZN10Rpl_filter17add_wild_do_tableEPKc:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 10h
mov rbx, rsi
mov r14, rdi
cmp byte ptr [rdi+137h], 0
jnz short loc_54FF7
lea rsi, [r14+0E0h]
mov [rsp+20h+var_20], 0
xor edi, edi
mov edx, 8
xor ecx, ecx
mov r8d, 10h
mov r9d, 10h
call init_dynamic_array2
mov byte ptr [r14+137h], 1
loc_54FF7:
mov byte ptr [r14+134h], 1
add r14, 0E0h
mov rsi, r14
mov rdx, rbx
add rsp, 10h
pop rbx
pop r14
pop rbp
jmp _ZN10Rpl_filter19add_wild_table_ruleEP16st_dynamic_arrayPKc; Rpl_filter::add_wild_table_rule(st_dynamic_array *,char const*)
| long long Rpl_filter::add_wild_do_table(Rpl_filter *this, const char *a2)
{
Rpl_filter *v3; // r14
int v4; // esi
v3 = this;
if ( !*((_BYTE *)this + 311) )
{
v4 = (_DWORD)this + 224;
this = 0LL;
init_dynamic_array2(0, v4, 8, 0, 16, 16, 0LL);
*((_BYTE *)v3 + 311) = 1;
}
*((_BYTE *)v3 + 308) = 1;
return Rpl_filter::add_wild_table_rule(this, (char *)v3 + 224, a2);
}
| add_wild_do_table:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV RBX,RSI
MOV R14,RDI
CMP byte ptr [RDI + 0x137],0x0
JNZ 0x00154ff7
LEA RSI,[R14 + 0xe0]
MOV qword ptr [RSP],0x0
XOR EDI,EDI
MOV EDX,0x8
XOR ECX,ECX
MOV R8D,0x10
MOV R9D,0x10
CALL 0x0017729c
MOV byte ptr [R14 + 0x137],0x1
LAB_00154ff7:
MOV byte ptr [R14 + 0x134],0x1
ADD R14,0xe0
MOV RSI,R14
MOV RDX,RBX
ADD RSP,0x10
POP RBX
POP R14
POP RBP
JMP 0x00155050
|
/* Rpl_filter::add_wild_do_table(char const*) */
void __thiscall Rpl_filter::add_wild_do_table(Rpl_filter *this,char *param_1)
{
Rpl_filter *this_00;
this_00 = this;
if (this[0x137] == (Rpl_filter)0x0) {
this_00 = (Rpl_filter *)0x0;
init_dynamic_array2(0,this + 0xe0,8,0,0x10,0x10,0);
this[0x137] = (Rpl_filter)0x1;
}
this[0x134] = (Rpl_filter)0x1;
add_wild_table_rule(this_00,(st_dynamic_array *)(this + 0xe0),param_1);
return;
}
|
|
3,472 | OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateFaceVerticesFromParentFaces() | NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/quadRefinement.cpp | void
QuadRefinement::populateFaceVerticesFromParentFaces() {
//
// This is pretty straightforward, but is a good example for the case of
// iterating through the parent faces rather than the child faces, as the
// same topology information for the parent faces is required for each of
// the child faces.
//
// For each of the child faces of a parent face, identify the child vertices
// for its face-verts from the child vertices of the parent face, its edges
// and its vertices.
//
for (Index pFace = 0; pFace < _parent->getNumFaces(); ++pFace) {
ConstIndexArray pFaceVerts = _parent->getFaceVertices(pFace),
pFaceEdges = _parent->getFaceEdges(pFace),
pFaceChildren = getFaceChildFaces(pFace);
int pFaceSize = pFaceVerts.size();
for (int j = 0; j < pFaceSize; ++j) {
Index cFace = pFaceChildren[j];
if (IndexIsValid(cFace)) {
int jPrev = j ? (j - 1) : (pFaceSize - 1);
Index cVertOfFace = _faceChildVertIndex[pFace];
Index cVertOfEPrev = _edgeChildVertIndex[pFaceEdges[jPrev]];
Index cVertOfVert = _vertChildVertIndex[pFaceVerts[j]];
Index cVertOfENext = _edgeChildVertIndex[pFaceEdges[j]];
IndexArray cFaceVerts = _child->getFaceVertices(cFace);
// Note orientation wrt parent face -- quad vs non-quad...
if (pFaceSize == 4) {
int jOpp = jPrev ? (jPrev - 1) : 3;
int jNext = jOpp ? (jOpp - 1) : 3;
cFaceVerts[j] = cVertOfVert;
cFaceVerts[jNext] = cVertOfENext;
cFaceVerts[jOpp] = cVertOfFace;
cFaceVerts[jPrev] = cVertOfEPrev;
} else {
cFaceVerts[0] = cVertOfVert;
cFaceVerts[1] = cVertOfENext;
cFaceVerts[2] = cVertOfFace;
cFaceVerts[3] = cVertOfEPrev;
}
}
}
}
} | O0 | cpp | OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateFaceVerticesFromParentFaces():
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp # imm = 0x120
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xd0(%rbp)
movl $0x0, -0xc(%rbp)
movq -0xd0(%rbp), %rax
movl -0xc(%rbp), %ecx
movl %ecx, -0xd4(%rbp)
movq 0x8(%rax), %rdi
callq 0xc3430
movl %eax, %ecx
movl -0xd4(%rbp), %eax
cmpl %ecx, %eax
jge 0xf988e
movq -0xd0(%rbp), %rax
movq 0x8(%rax), %rdi
movl -0xc(%rbp), %esi
callq 0xce580
movq %rax, %rcx
movq -0xd0(%rbp), %rax
movl %edx, -0x28(%rbp)
movq %rcx, -0x30(%rbp)
movl -0x28(%rbp), %ecx
movl %ecx, -0x18(%rbp)
movq -0x30(%rbp), %rcx
movq %rcx, -0x20(%rbp)
movq 0x8(%rax), %rdi
movl -0xc(%rbp), %esi
callq 0xce3b0
movq -0xd0(%rbp), %rdi
movl %edx, -0x48(%rbp)
movq %rax, -0x50(%rbp)
movl -0x48(%rbp), %eax
movl %eax, -0x38(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x40(%rbp)
movl -0xc(%rbp), %esi
callq 0xc7fc0
movl %edx, -0x78(%rbp)
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rax
movq %rax, -0x70(%rbp)
movl -0x78(%rbp), %eax
movl %eax, -0x68(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x58(%rbp)
leaq -0x20(%rbp), %rdi
callq 0xcc250
movl %eax, -0x84(%rbp)
movl $0x0, -0x88(%rbp)
movl -0x88(%rbp), %eax
cmpl -0x84(%rbp), %eax
jge 0xf987e
movl -0x88(%rbp), %esi
leaq -0x60(%rbp), %rdi
callq 0xcabf0
movl (%rax), %eax
movl %eax, -0x8c(%rbp)
movl -0x8c(%rbp), %edi
callq 0xd63b0
testb $0x1, %al
jne 0xf9587
jmp 0xf9868
cmpl $0x0, -0x88(%rbp)
je 0xf95a1
movl -0x88(%rbp), %eax
subl $0x1, %eax
movl %eax, -0xd8(%rbp)
jmp 0xf95b0
movl -0x84(%rbp), %eax
subl $0x1, %eax
movl %eax, -0xd8(%rbp)
movq -0xd0(%rbp), %rdi
movl -0xd8(%rbp), %eax
movl %eax, -0x90(%rbp)
addq $0xa8, %rdi
movslq -0xc(%rbp), %rsi
callq 0xc7140
movq %rax, %rcx
movq -0xd0(%rbp), %rax
movl (%rcx), %ecx
movl %ecx, -0x94(%rbp)
addq $0xd8, %rax
movq %rax, -0xe0(%rbp)
movl -0x90(%rbp), %esi
leaq -0x40(%rbp), %rdi
movq %rdi, -0xe8(%rbp)
callq 0xcabf0
movq -0xe0(%rbp), %rdi
movslq (%rax), %rsi
callq 0xc7140
movq %rax, %rcx
movq -0xd0(%rbp), %rax
movl (%rcx), %ecx
movl %ecx, -0x98(%rbp)
addq $0xf0, %rax
movq %rax, -0xf0(%rbp)
movl -0x88(%rbp), %esi
leaq -0x20(%rbp), %rdi
callq 0xcabf0
movq -0xf0(%rbp), %rdi
movslq (%rax), %rsi
callq 0xc7140
movq -0xe8(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x9c(%rbp)
movl -0x88(%rbp), %esi
callq 0xcabf0
movq -0xe0(%rbp), %rdi
movslq (%rax), %rsi
callq 0xc7140
movq %rax, %rcx
movq -0xd0(%rbp), %rax
movl (%rcx), %ecx
movl %ecx, -0xa0(%rbp)
movq 0x10(%rax), %rdi
movl -0x8c(%rbp), %esi
callq 0xc9d30
movl %edx, -0xb8(%rbp)
movq %rax, -0xc0(%rbp)
movq -0xc0(%rbp), %rax
movq %rax, -0xb0(%rbp)
movl -0xb8(%rbp), %eax
movl %eax, -0xa8(%rbp)
cmpl $0x4, -0x84(%rbp)
jne 0xf97d5
cmpl $0x0, -0x90(%rbp)
je 0xf96ec
movl -0x90(%rbp), %eax
subl $0x1, %eax
movl %eax, -0xf4(%rbp)
jmp 0xf96f9
movl $0x3, %eax
movl %eax, -0xf4(%rbp)
jmp 0xf96f9
movl -0xf4(%rbp), %eax
movl %eax, -0xc4(%rbp)
cmpl $0x0, -0xc4(%rbp)
je 0xf971f
movl -0xc4(%rbp), %eax
subl $0x1, %eax
movl %eax, -0xf8(%rbp)
jmp 0xf972c
movl $0x3, %eax
movl %eax, -0xf8(%rbp)
jmp 0xf972c
movl -0xf8(%rbp), %eax
movl %eax, -0xc8(%rbp)
movl -0x9c(%rbp), %eax
movl %eax, -0x108(%rbp)
movl -0x88(%rbp), %esi
leaq -0xb0(%rbp), %rdi
callq 0xc37f0
movl -0x108(%rbp), %ecx
movl %ecx, (%rax)
movl -0xa0(%rbp), %eax
movl %eax, -0x104(%rbp)
movl -0xc8(%rbp), %esi
leaq -0xb0(%rbp), %rdi
callq 0xc37f0
movl -0x104(%rbp), %ecx
movl %ecx, (%rax)
movl -0x94(%rbp), %eax
movl %eax, -0x100(%rbp)
movl -0xc4(%rbp), %esi
leaq -0xb0(%rbp), %rdi
callq 0xc37f0
movl -0x100(%rbp), %ecx
movl %ecx, (%rax)
movl -0x98(%rbp), %eax
movl %eax, -0xfc(%rbp)
movl -0x90(%rbp), %esi
leaq -0xb0(%rbp), %rdi
callq 0xc37f0
movl -0xfc(%rbp), %ecx
movl %ecx, (%rax)
jmp 0xf9866
movl -0x9c(%rbp), %eax
movl %eax, -0x118(%rbp)
leaq -0xb0(%rbp), %rdi
xorl %esi, %esi
callq 0xc37f0
movl -0x118(%rbp), %ecx
movl %ecx, (%rax)
movl -0xa0(%rbp), %eax
movl %eax, -0x114(%rbp)
leaq -0xb0(%rbp), %rdi
movl $0x1, %esi
callq 0xc37f0
movl -0x114(%rbp), %ecx
movl %ecx, (%rax)
movl -0x94(%rbp), %eax
movl %eax, -0x110(%rbp)
leaq -0xb0(%rbp), %rdi
movl $0x2, %esi
callq 0xc37f0
movl -0x110(%rbp), %ecx
movl %ecx, (%rax)
movl -0x98(%rbp), %eax
movl %eax, -0x10c(%rbp)
leaq -0xb0(%rbp), %rdi
movl $0x3, %esi
callq 0xc37f0
movl -0x10c(%rbp), %ecx
movl %ecx, (%rax)
jmp 0xf9868
jmp 0xf986a
movl -0x88(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x88(%rbp)
jmp 0xf954a
jmp 0xf9880
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xf9481
addq $0x120, %rsp # imm = 0x120
popq %rbp
retq
nopw (%rax,%rax)
| _ZN10OpenSubdiv6v3_6_03Vtr8internal14QuadRefinement35populateFaceVerticesFromParentFacesEv:
push rbp
mov rbp, rsp
sub rsp, 120h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_D0], rax
mov [rbp+var_C], 0
loc_F9481:
mov rax, [rbp+var_D0]
mov ecx, [rbp+var_C]
mov [rbp+var_D4], ecx
mov rdi, [rax+8]; this
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level11getNumFacesEv; OpenSubdiv::v3_6_0::Vtr::internal::Level::getNumFaces(void)
mov ecx, eax
mov eax, [rbp+var_D4]
cmp eax, ecx
jge loc_F988E
mov rax, [rbp+var_D0]
mov rdi, [rax+8]; this
mov esi, [rbp+var_C]; int
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level15getFaceVerticesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVertices(int)
mov rcx, rax
mov rax, [rbp+var_D0]
mov [rbp+var_28], edx
mov [rbp+var_30], rcx
mov ecx, [rbp+var_28]
mov [rbp+var_18], ecx
mov rcx, [rbp+var_30]
mov [rbp+var_20], rcx
mov rdi, [rax+8]; this
mov esi, [rbp+var_C]; int
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level12getFaceEdgesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceEdges(int)
mov rdi, [rbp+var_D0]; this
mov [rbp+var_48], edx
mov [rbp+var_50], rax
mov eax, [rbp+var_48]
mov [rbp+var_38], eax
mov rax, [rbp+var_50]
mov [rbp+var_40], rax
mov esi, [rbp+var_C]; int
call __ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement17getFaceChildFacesEi; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::getFaceChildFaces(int)
mov [rbp+var_78], edx
mov [rbp+var_80], rax
mov rax, [rbp+var_80]
mov [rbp+var_70], rax
mov eax, [rbp+var_78]
mov dword ptr [rbp+var_68], eax
mov rax, [rbp+var_70]
mov [rbp+var_60], rax
mov rax, [rbp+var_68]
mov [rbp+var_58], rax
lea rdi, [rbp+var_20]
call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIiE4sizeEv; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::size(void)
mov [rbp+var_84], eax
mov dword ptr [rbp+var_8C+4], 0
loc_F954A:
mov eax, dword ptr [rbp+var_8C+4]
cmp eax, [rbp+var_84]
jge loc_F987E
mov esi, dword ptr [rbp+var_8C+4]; int
lea rdi, [rbp+var_60]
call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIiEixEi; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](int)
mov eax, [rax]
mov dword ptr [rbp+var_8C], eax
mov edi, dword ptr [rbp+var_8C]; this
call __ZN10OpenSubdiv6v3_6_03Vtr12IndexIsValidEi; OpenSubdiv::v3_6_0::Vtr::IndexIsValid(int)
test al, 1
jnz short loc_F9587
jmp loc_F9868
loc_F9587:
cmp dword ptr [rbp+var_8C+4], 0
jz short loc_F95A1
mov eax, dword ptr [rbp+var_8C+4]
sub eax, 1
mov [rbp+var_D8], eax
jmp short loc_F95B0
loc_F95A1:
mov eax, [rbp+var_84]
sub eax, 1
mov [rbp+var_D8], eax
loc_F95B0:
mov rdi, [rbp+var_D0]
mov eax, [rbp+var_D8]
mov [rbp+var_90], eax
add rdi, 0A8h
movsxd rsi, [rbp+var_C]
call __ZNSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)
mov rcx, rax
mov rax, [rbp+var_D0]
mov ecx, [rcx]
mov [rbp+var_94], ecx
add rax, 0D8h
mov [rbp+var_E0], rax
mov esi, [rbp+var_90]
lea rdi, [rbp+var_40]
mov [rbp+var_E8], rdi
call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIiEixEi; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](int)
mov rdi, [rbp+var_E0]
movsxd rsi, dword ptr [rax]
call __ZNSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)
mov rcx, rax
mov rax, [rbp+var_D0]
mov ecx, [rcx]
mov [rbp+var_98], ecx
add rax, 0F0h
mov [rbp+var_F0], rax
mov esi, dword ptr [rbp+var_8C+4]
lea rdi, [rbp+var_20]
call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIiEixEi; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](int)
mov rdi, [rbp+var_F0]
movsxd rsi, dword ptr [rax]
call __ZNSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)
mov rdi, [rbp+var_E8]
mov eax, [rax]
mov [rbp+var_9C], eax
mov esi, dword ptr [rbp+var_8C+4]
call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIiEixEi; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](int)
mov rdi, [rbp+var_E0]
movsxd rsi, dword ptr [rax]
call __ZNSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)
mov rcx, rax
mov rax, [rbp+var_D0]
mov ecx, [rcx]
mov [rbp+var_A0], ecx
mov rdi, [rax+10h]; this
mov esi, dword ptr [rbp+var_8C]; int
call __ZN10OpenSubdiv6v3_6_03Vtr8internal5Level15getFaceVerticesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVertices(int)
mov [rbp+var_B8], edx
mov [rbp+var_C0], rax
mov rax, [rbp+var_C0]
mov [rbp+var_B0], rax
mov eax, [rbp+var_B8]
mov [rbp+var_A8], eax
cmp [rbp+var_84], 4
jnz loc_F97D5
cmp [rbp+var_90], 0
jz short loc_F96EC
mov eax, [rbp+var_90]
sub eax, 1
mov [rbp+var_F4], eax
jmp short loc_F96F9
loc_F96EC:
mov eax, 3
mov [rbp+var_F4], eax
jmp short $+2
loc_F96F9:
mov eax, [rbp+var_F4]
mov [rbp+var_C4], eax
cmp [rbp+var_C4], 0
jz short loc_F971F
mov eax, [rbp+var_C4]
sub eax, 1
mov [rbp+var_F8], eax
jmp short loc_F972C
loc_F971F:
mov eax, 3
mov [rbp+var_F8], eax
jmp short $+2
loc_F972C:
mov eax, [rbp+var_F8]
mov [rbp+var_C8], eax
mov eax, [rbp+var_9C]
mov [rbp+var_108], eax
mov esi, dword ptr [rbp+var_8C+4]
lea rdi, [rbp+var_B0]
call __ZN10OpenSubdiv6v3_6_03Vtr5ArrayIiEixEi; OpenSubdiv::v3_6_0::Vtr::Array<int>::operator[](int)
mov ecx, [rbp+var_108]
mov [rax], ecx
mov eax, [rbp+var_A0]
mov [rbp+var_104], eax
mov esi, [rbp+var_C8]
lea rdi, [rbp+var_B0]
call __ZN10OpenSubdiv6v3_6_03Vtr5ArrayIiEixEi; OpenSubdiv::v3_6_0::Vtr::Array<int>::operator[](int)
mov ecx, [rbp+var_104]
mov [rax], ecx
mov eax, [rbp+var_94]
mov [rbp+var_100], eax
mov esi, [rbp+var_C4]
lea rdi, [rbp+var_B0]
call __ZN10OpenSubdiv6v3_6_03Vtr5ArrayIiEixEi; OpenSubdiv::v3_6_0::Vtr::Array<int>::operator[](int)
mov ecx, [rbp+var_100]
mov [rax], ecx
mov eax, [rbp+var_98]
mov [rbp+var_FC], eax
mov esi, [rbp+var_90]
lea rdi, [rbp+var_B0]
call __ZN10OpenSubdiv6v3_6_03Vtr5ArrayIiEixEi; OpenSubdiv::v3_6_0::Vtr::Array<int>::operator[](int)
mov ecx, [rbp+var_FC]
mov [rax], ecx
jmp loc_F9866
loc_F97D5:
mov eax, [rbp+var_9C]
mov [rbp+var_118], eax
lea rdi, [rbp+var_B0]
xor esi, esi
call __ZN10OpenSubdiv6v3_6_03Vtr5ArrayIiEixEi; OpenSubdiv::v3_6_0::Vtr::Array<int>::operator[](int)
mov ecx, [rbp+var_118]
mov [rax], ecx
mov eax, [rbp+var_A0]
mov [rbp+var_114], eax
lea rdi, [rbp+var_B0]
mov esi, 1
call __ZN10OpenSubdiv6v3_6_03Vtr5ArrayIiEixEi; OpenSubdiv::v3_6_0::Vtr::Array<int>::operator[](int)
mov ecx, [rbp+var_114]
mov [rax], ecx
mov eax, [rbp+var_94]
mov [rbp+var_110], eax
lea rdi, [rbp+var_B0]
mov esi, 2
call __ZN10OpenSubdiv6v3_6_03Vtr5ArrayIiEixEi; OpenSubdiv::v3_6_0::Vtr::Array<int>::operator[](int)
mov ecx, [rbp+var_110]
mov [rax], ecx
mov eax, [rbp+var_98]
mov [rbp+var_10C], eax
lea rdi, [rbp+var_B0]
mov esi, 3
call __ZN10OpenSubdiv6v3_6_03Vtr5ArrayIiEixEi; OpenSubdiv::v3_6_0::Vtr::Array<int>::operator[](int)
mov ecx, [rbp+var_10C]
mov [rax], ecx
loc_F9866:
jmp short $+2
loc_F9868:
jmp short $+2
loc_F986A:
mov eax, dword ptr [rbp+var_8C+4]
add eax, 1
mov dword ptr [rbp+var_8C+4], eax
jmp loc_F954A
loc_F987E:
jmp short $+2
loc_F9880:
mov eax, [rbp+var_C]
add eax, 1
mov [rbp+var_C], eax
jmp loc_F9481
loc_F988E:
add rsp, 120h
pop rbp
retn
| long long OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateFaceVerticesFromParentFaces(
OpenSubdiv::v3_6_0::Vtr::internal::Level **this)
{
int NumFaces; // ecx
long long result; // rax
long long FaceVertices; // rax
int v4; // edx
long long FaceEdges; // rax
int v6; // edx
long long FaceChildFaces; // rax
int v8; // edx
int v9; // esi
int *v10; // rax
int *v11; // rax
int *v12; // rax
int v13; // edx
int v14; // [rsp+8h] [rbp-118h]
int v15; // [rsp+Ch] [rbp-114h]
int v16; // [rsp+10h] [rbp-110h]
int v17; // [rsp+14h] [rbp-10Ch]
int v18; // [rsp+18h] [rbp-108h]
int v19; // [rsp+1Ch] [rbp-104h]
int v20; // [rsp+20h] [rbp-100h]
int v21; // [rsp+24h] [rbp-FCh]
unsigned int v22; // [rsp+28h] [rbp-F8h]
unsigned int v23; // [rsp+2Ch] [rbp-F4h]
unsigned int v24; // [rsp+48h] [rbp-D8h]
int v25; // [rsp+4Ch] [rbp-D4h]
long long v26; // [rsp+70h] [rbp-B0h] BYREF
int v27; // [rsp+78h] [rbp-A8h]
int v28; // [rsp+80h] [rbp-A0h]
int v29; // [rsp+84h] [rbp-9Ch]
int v30; // [rsp+88h] [rbp-98h]
int v31; // [rsp+8Ch] [rbp-94h]
unsigned int v32; // [rsp+90h] [rbp-90h]
unsigned int v33; // [rsp+94h] [rbp-8Ch]
unsigned int j; // [rsp+98h] [rbp-88h]
signed int v35; // [rsp+9Ch] [rbp-84h]
long long v36; // [rsp+A0h] [rbp-80h]
int v37; // [rsp+A8h] [rbp-78h]
long long v38; // [rsp+B0h] [rbp-70h]
long long v39; // [rsp+B8h] [rbp-68h]
_QWORD v40[3]; // [rsp+C0h] [rbp-60h] BYREF
int v41; // [rsp+D8h] [rbp-48h]
long long v42; // [rsp+E0h] [rbp-40h] BYREF
int v43; // [rsp+E8h] [rbp-38h]
long long v44; // [rsp+F0h] [rbp-30h]
int v45; // [rsp+F8h] [rbp-28h]
long long v46; // [rsp+100h] [rbp-20h] BYREF
int v47; // [rsp+108h] [rbp-18h]
int i; // [rsp+114h] [rbp-Ch]
OpenSubdiv::v3_6_0::Vtr::internal::Level **v49; // [rsp+118h] [rbp-8h]
v49 = this;
for ( i = 0; ; ++i )
{
v25 = i;
NumFaces = OpenSubdiv::v3_6_0::Vtr::internal::Level::getNumFaces(this[1]);
result = (unsigned int)v25;
if ( v25 >= NumFaces )
break;
FaceVertices = OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVertices(this[1], i);
v45 = v4;
v44 = FaceVertices;
v47 = v4;
v46 = FaceVertices;
FaceEdges = OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceEdges(this[1], i);
v41 = v6;
v40[2] = FaceEdges;
v43 = v6;
v42 = FaceEdges;
FaceChildFaces = OpenSubdiv::v3_6_0::Vtr::internal::Refinement::getFaceChildFaces(
(OpenSubdiv::v3_6_0::Vtr::internal::Refinement *)this,
i);
v37 = v8;
v36 = FaceChildFaces;
v38 = FaceChildFaces;
LODWORD(v39) = v8;
v40[0] = FaceChildFaces;
v40[1] = v39;
v35 = OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::size(&v46);
for ( j = 0; (int)j < v35; ++j )
{
v9 = j;
v33 = *(_DWORD *)OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](v40, j);
if ( (OpenSubdiv::v3_6_0::Vtr::IndexIsValid((OpenSubdiv::v3_6_0::Vtr *)v33, v9) & 1) != 0 )
{
if ( j )
v24 = j - 1;
else
v24 = v35 - 1;
v32 = v24;
v31 = *(_DWORD *)std::vector<int>::operator[](this + 21, i);
v10 = (int *)OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](&v42, v32);
v30 = *(_DWORD *)std::vector<int>::operator[](this + 27, *v10);
v11 = (int *)OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](&v46, j);
v29 = *(_DWORD *)std::vector<int>::operator[](this + 30, *v11);
v12 = (int *)OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](&v42, j);
v28 = *(_DWORD *)std::vector<int>::operator[](this + 27, *v12);
v26 = OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVertices(this[2], v33);
v27 = v13;
if ( v35 == 4 )
{
if ( v32 )
v23 = v32 - 1;
else
v23 = 3;
if ( v23 )
v22 = v23 - 1;
else
v22 = 3;
v18 = v29;
*(_DWORD *)OpenSubdiv::v3_6_0::Vtr::Array<int>::operator[](&v26, j) = v18;
v19 = v28;
*(_DWORD *)OpenSubdiv::v3_6_0::Vtr::Array<int>::operator[](&v26, v22) = v19;
v20 = v31;
*(_DWORD *)OpenSubdiv::v3_6_0::Vtr::Array<int>::operator[](&v26, v23) = v20;
v21 = v30;
*(_DWORD *)OpenSubdiv::v3_6_0::Vtr::Array<int>::operator[](&v26, v32) = v21;
}
else
{
v14 = v29;
*(_DWORD *)OpenSubdiv::v3_6_0::Vtr::Array<int>::operator[](&v26, 0LL) = v14;
v15 = v28;
*(_DWORD *)OpenSubdiv::v3_6_0::Vtr::Array<int>::operator[](&v26, 1LL) = v15;
v16 = v31;
*(_DWORD *)OpenSubdiv::v3_6_0::Vtr::Array<int>::operator[](&v26, 2LL) = v16;
v17 = v30;
*(_DWORD *)OpenSubdiv::v3_6_0::Vtr::Array<int>::operator[](&v26, 3LL) = v17;
}
}
}
}
return result;
}
| populateFaceVerticesFromParentFaces:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x120
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0xd0],RAX
MOV dword ptr [RBP + -0xc],0x0
LAB_001f9481:
MOV RAX,qword ptr [RBP + -0xd0]
MOV ECX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0xd4],ECX
MOV RDI,qword ptr [RAX + 0x8]
CALL 0x001c3430
MOV ECX,EAX
MOV EAX,dword ptr [RBP + -0xd4]
CMP EAX,ECX
JGE 0x001f988e
MOV RAX,qword ptr [RBP + -0xd0]
MOV RDI,qword ptr [RAX + 0x8]
MOV ESI,dword ptr [RBP + -0xc]
CALL 0x001ce580
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0xd0]
MOV dword ptr [RBP + -0x28],EDX
MOV qword ptr [RBP + -0x30],RCX
MOV ECX,dword ptr [RBP + -0x28]
MOV dword ptr [RBP + -0x18],ECX
MOV RCX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x20],RCX
MOV RDI,qword ptr [RAX + 0x8]
MOV ESI,dword ptr [RBP + -0xc]
CALL 0x001ce3b0
MOV RDI,qword ptr [RBP + -0xd0]
MOV dword ptr [RBP + -0x48],EDX
MOV qword ptr [RBP + -0x50],RAX
MOV EAX,dword ptr [RBP + -0x48]
MOV dword ptr [RBP + -0x38],EAX
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x40],RAX
MOV ESI,dword ptr [RBP + -0xc]
CALL 0x001c7fc0
MOV dword ptr [RBP + -0x78],EDX
MOV qword ptr [RBP + -0x80],RAX
MOV RAX,qword ptr [RBP + -0x80]
MOV qword ptr [RBP + -0x70],RAX
MOV EAX,dword ptr [RBP + -0x78]
MOV dword ptr [RBP + -0x68],EAX
MOV RAX,qword ptr [RBP + -0x70]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RBP + -0x58],RAX
LEA RDI,[RBP + -0x20]
CALL 0x001cc250
MOV dword ptr [RBP + -0x84],EAX
MOV dword ptr [RBP + -0x88],0x0
LAB_001f954a:
MOV EAX,dword ptr [RBP + -0x88]
CMP EAX,dword ptr [RBP + -0x84]
JGE 0x001f987e
MOV ESI,dword ptr [RBP + -0x88]
LEA RDI,[RBP + -0x60]
CALL 0x001cabf0
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x8c],EAX
MOV EDI,dword ptr [RBP + -0x8c]
CALL 0x001d63b0
TEST AL,0x1
JNZ 0x001f9587
JMP 0x001f9868
LAB_001f9587:
CMP dword ptr [RBP + -0x88],0x0
JZ 0x001f95a1
MOV EAX,dword ptr [RBP + -0x88]
SUB EAX,0x1
MOV dword ptr [RBP + -0xd8],EAX
JMP 0x001f95b0
LAB_001f95a1:
MOV EAX,dword ptr [RBP + -0x84]
SUB EAX,0x1
MOV dword ptr [RBP + -0xd8],EAX
LAB_001f95b0:
MOV RDI,qword ptr [RBP + -0xd0]
MOV EAX,dword ptr [RBP + -0xd8]
MOV dword ptr [RBP + -0x90],EAX
ADD RDI,0xa8
MOVSXD RSI,dword ptr [RBP + -0xc]
CALL 0x001c7140
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0xd0]
MOV ECX,dword ptr [RCX]
MOV dword ptr [RBP + -0x94],ECX
ADD RAX,0xd8
MOV qword ptr [RBP + -0xe0],RAX
MOV ESI,dword ptr [RBP + -0x90]
LEA RDI,[RBP + -0x40]
MOV qword ptr [RBP + -0xe8],RDI
CALL 0x001cabf0
MOV RDI,qword ptr [RBP + -0xe0]
MOVSXD RSI,dword ptr [RAX]
CALL 0x001c7140
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0xd0]
MOV ECX,dword ptr [RCX]
MOV dword ptr [RBP + -0x98],ECX
ADD RAX,0xf0
MOV qword ptr [RBP + -0xf0],RAX
MOV ESI,dword ptr [RBP + -0x88]
LEA RDI,[RBP + -0x20]
CALL 0x001cabf0
MOV RDI,qword ptr [RBP + -0xf0]
MOVSXD RSI,dword ptr [RAX]
CALL 0x001c7140
MOV RDI,qword ptr [RBP + -0xe8]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x9c],EAX
MOV ESI,dword ptr [RBP + -0x88]
CALL 0x001cabf0
MOV RDI,qword ptr [RBP + -0xe0]
MOVSXD RSI,dword ptr [RAX]
CALL 0x001c7140
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0xd0]
MOV ECX,dword ptr [RCX]
MOV dword ptr [RBP + -0xa0],ECX
MOV RDI,qword ptr [RAX + 0x10]
MOV ESI,dword ptr [RBP + -0x8c]
CALL 0x001c9d30
MOV dword ptr [RBP + -0xb8],EDX
MOV qword ptr [RBP + -0xc0],RAX
MOV RAX,qword ptr [RBP + -0xc0]
MOV qword ptr [RBP + -0xb0],RAX
MOV EAX,dword ptr [RBP + -0xb8]
MOV dword ptr [RBP + -0xa8],EAX
CMP dword ptr [RBP + -0x84],0x4
JNZ 0x001f97d5
CMP dword ptr [RBP + -0x90],0x0
JZ 0x001f96ec
MOV EAX,dword ptr [RBP + -0x90]
SUB EAX,0x1
MOV dword ptr [RBP + -0xf4],EAX
JMP 0x001f96f9
LAB_001f96ec:
MOV EAX,0x3
MOV dword ptr [RBP + -0xf4],EAX
JMP 0x001f96f9
LAB_001f96f9:
MOV EAX,dword ptr [RBP + -0xf4]
MOV dword ptr [RBP + -0xc4],EAX
CMP dword ptr [RBP + -0xc4],0x0
JZ 0x001f971f
MOV EAX,dword ptr [RBP + -0xc4]
SUB EAX,0x1
MOV dword ptr [RBP + -0xf8],EAX
JMP 0x001f972c
LAB_001f971f:
MOV EAX,0x3
MOV dword ptr [RBP + -0xf8],EAX
JMP 0x001f972c
LAB_001f972c:
MOV EAX,dword ptr [RBP + -0xf8]
MOV dword ptr [RBP + -0xc8],EAX
MOV EAX,dword ptr [RBP + -0x9c]
MOV dword ptr [RBP + -0x108],EAX
MOV ESI,dword ptr [RBP + -0x88]
LEA RDI,[RBP + -0xb0]
CALL 0x001c37f0
MOV ECX,dword ptr [RBP + -0x108]
MOV dword ptr [RAX],ECX
MOV EAX,dword ptr [RBP + -0xa0]
MOV dword ptr [RBP + -0x104],EAX
MOV ESI,dword ptr [RBP + -0xc8]
LEA RDI,[RBP + -0xb0]
CALL 0x001c37f0
MOV ECX,dword ptr [RBP + -0x104]
MOV dword ptr [RAX],ECX
MOV EAX,dword ptr [RBP + -0x94]
MOV dword ptr [RBP + -0x100],EAX
MOV ESI,dword ptr [RBP + -0xc4]
LEA RDI,[RBP + -0xb0]
CALL 0x001c37f0
MOV ECX,dword ptr [RBP + -0x100]
MOV dword ptr [RAX],ECX
MOV EAX,dword ptr [RBP + -0x98]
MOV dword ptr [RBP + -0xfc],EAX
MOV ESI,dword ptr [RBP + -0x90]
LEA RDI,[RBP + -0xb0]
CALL 0x001c37f0
MOV ECX,dword ptr [RBP + -0xfc]
MOV dword ptr [RAX],ECX
JMP 0x001f9866
LAB_001f97d5:
MOV EAX,dword ptr [RBP + -0x9c]
MOV dword ptr [RBP + -0x118],EAX
LEA RDI,[RBP + -0xb0]
XOR ESI,ESI
CALL 0x001c37f0
MOV ECX,dword ptr [RBP + -0x118]
MOV dword ptr [RAX],ECX
MOV EAX,dword ptr [RBP + -0xa0]
MOV dword ptr [RBP + -0x114],EAX
LEA RDI,[RBP + -0xb0]
MOV ESI,0x1
CALL 0x001c37f0
MOV ECX,dword ptr [RBP + -0x114]
MOV dword ptr [RAX],ECX
MOV EAX,dword ptr [RBP + -0x94]
MOV dword ptr [RBP + -0x110],EAX
LEA RDI,[RBP + -0xb0]
MOV ESI,0x2
CALL 0x001c37f0
MOV ECX,dword ptr [RBP + -0x110]
MOV dword ptr [RAX],ECX
MOV EAX,dword ptr [RBP + -0x98]
MOV dword ptr [RBP + -0x10c],EAX
LEA RDI,[RBP + -0xb0]
MOV ESI,0x3
CALL 0x001c37f0
MOV ECX,dword ptr [RBP + -0x10c]
MOV dword ptr [RAX],ECX
LAB_001f9866:
JMP 0x001f9868
LAB_001f9868:
JMP 0x001f986a
LAB_001f986a:
MOV EAX,dword ptr [RBP + -0x88]
ADD EAX,0x1
MOV dword ptr [RBP + -0x88],EAX
JMP 0x001f954a
LAB_001f987e:
JMP 0x001f9880
LAB_001f9880:
MOV EAX,dword ptr [RBP + -0xc]
ADD EAX,0x1
MOV dword ptr [RBP + -0xc],EAX
JMP 0x001f9481
LAB_001f988e:
ADD RSP,0x120
POP RBP
RET
|
/* OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateFaceVerticesFromParentFaces() */
void __thiscall
OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateFaceVerticesFromParentFaces
(QuadRefinement *this)
{
int4 uVar1;
int4 uVar2;
int4 uVar3;
int iVar4;
int iVar5;
int *piVar6;
ulong uVar7;
int4 *puVar8;
int1 auVar9 [12];
int local_100;
int local_fc;
int local_e0;
int1 local_b8 [12];
int4 local_a8;
int4 local_a4;
int4 local_a0;
int4 local_9c;
int local_98;
int local_94;
int local_90;
int local_8c;
int1 local_88 [12];
int1 local_78 [12];
int4 uStack_6c;
int8 local_68;
int8 local_60;
int1 local_58 [12];
int1 local_48 [12];
int1 local_38 [12];
int1 local_28 [12];
int local_14;
QuadRefinement *local_10;
local_14 = 0;
local_10 = this;
while( true ) {
iVar4 = local_14;
iVar5 = Level::getNumFaces(*(Level **)(this + 8));
if (iVar5 <= iVar4) break;
auVar9 = Level::getFaceVertices(*(Level **)(this + 8),local_14);
local_38 = auVar9;
local_28 = auVar9;
auVar9 = Level::getFaceEdges(*(Level **)(this + 8),local_14);
local_58 = auVar9;
local_48 = auVar9;
auVar9 = Refinement::getFaceChildFaces((Refinement *)this,local_14);
local_68 = auVar9._0_8_;
local_60 = CONCAT44(uStack_6c,auVar9._8_4_);
local_88 = auVar9;
local_78 = auVar9;
local_8c = ConstArray<int>::size((ConstArray<int> *)local_28);
for (local_90 = 0; local_90 < local_8c; local_90 = local_90 + 1) {
piVar6 = (int *)ConstArray<int>::operator[]((ConstArray<int> *)&local_68,local_90);
local_94 = *piVar6;
uVar7 = IndexIsValid(local_94);
if ((uVar7 & 1) != 0) {
local_e0 = local_8c;
if (local_90 != 0) {
local_e0 = local_90;
}
local_e0 = local_e0 + -1;
local_98 = local_e0;
puVar8 = (int4 *)
std::vector<int,std::allocator<int>>::operator[]
((vector<int,std::allocator<int>> *)(this + 0xa8),(long)local_14);
local_9c = *puVar8;
piVar6 = (int *)ConstArray<int>::operator[]((ConstArray<int> *)local_48,local_98);
puVar8 = (int4 *)
std::vector<int,std::allocator<int>>::operator[]
((vector<int,std::allocator<int>> *)(this + 0xd8),(long)*piVar6);
local_a0 = *puVar8;
piVar6 = (int *)ConstArray<int>::operator[]((ConstArray<int> *)local_28,local_90);
puVar8 = (int4 *)
std::vector<int,std::allocator<int>>::operator[]
((vector<int,std::allocator<int>> *)(this + 0xf0),(long)*piVar6);
local_a4 = *puVar8;
piVar6 = (int *)ConstArray<int>::operator[]((ConstArray<int> *)local_48,local_90);
puVar8 = (int4 *)
std::vector<int,std::allocator<int>>::operator[]
((vector<int,std::allocator<int>> *)(this + 0xd8),(long)*piVar6);
local_a8 = *puVar8;
auVar9 = Level::getFaceVertices(*(Level **)(this + 0x10),local_94);
uVar2 = local_a4;
local_b8 = auVar9;
if (local_8c == 4) {
if (local_98 == 0) {
local_fc = 3;
}
else {
local_fc = local_98 + -1;
}
if (local_fc == 0) {
local_100 = 3;
}
else {
local_100 = local_fc + -1;
}
puVar8 = (int4 *)Array<int>::operator[]((Array<int> *)local_b8,local_90);
uVar1 = local_a8;
*puVar8 = uVar2;
puVar8 = (int4 *)Array<int>::operator[]((Array<int> *)local_b8,local_100);
uVar3 = local_9c;
*puVar8 = uVar1;
puVar8 = (int4 *)Array<int>::operator[]((Array<int> *)local_b8,local_fc);
uVar2 = local_a0;
*puVar8 = uVar3;
puVar8 = (int4 *)Array<int>::operator[]((Array<int> *)local_b8,local_98);
*puVar8 = uVar2;
}
else {
puVar8 = (int4 *)Array<int>::operator[]((Array<int> *)local_b8,0);
uVar1 = local_a8;
*puVar8 = uVar2;
puVar8 = (int4 *)Array<int>::operator[]((Array<int> *)local_b8,1);
uVar3 = local_9c;
*puVar8 = uVar1;
puVar8 = (int4 *)Array<int>::operator[]((Array<int> *)local_b8,2);
uVar2 = local_a0;
*puVar8 = uVar3;
puVar8 = (int4 *)Array<int>::operator[]((Array<int> *)local_b8,3);
*puVar8 = uVar2;
}
}
}
local_14 = local_14 + 1;
}
return;
}
|
|
3,473 | OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateFaceVerticesFromParentFaces() | NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/quadRefinement.cpp | void
QuadRefinement::populateFaceVerticesFromParentFaces() {
//
// This is pretty straightforward, but is a good example for the case of
// iterating through the parent faces rather than the child faces, as the
// same topology information for the parent faces is required for each of
// the child faces.
//
// For each of the child faces of a parent face, identify the child vertices
// for its face-verts from the child vertices of the parent face, its edges
// and its vertices.
//
for (Index pFace = 0; pFace < _parent->getNumFaces(); ++pFace) {
ConstIndexArray pFaceVerts = _parent->getFaceVertices(pFace),
pFaceEdges = _parent->getFaceEdges(pFace),
pFaceChildren = getFaceChildFaces(pFace);
int pFaceSize = pFaceVerts.size();
for (int j = 0; j < pFaceSize; ++j) {
Index cFace = pFaceChildren[j];
if (IndexIsValid(cFace)) {
int jPrev = j ? (j - 1) : (pFaceSize - 1);
Index cVertOfFace = _faceChildVertIndex[pFace];
Index cVertOfEPrev = _edgeChildVertIndex[pFaceEdges[jPrev]];
Index cVertOfVert = _vertChildVertIndex[pFaceVerts[j]];
Index cVertOfENext = _edgeChildVertIndex[pFaceEdges[j]];
IndexArray cFaceVerts = _child->getFaceVertices(cFace);
// Note orientation wrt parent face -- quad vs non-quad...
if (pFaceSize == 4) {
int jOpp = jPrev ? (jPrev - 1) : 3;
int jNext = jOpp ? (jOpp - 1) : 3;
cFaceVerts[j] = cVertOfVert;
cFaceVerts[jNext] = cVertOfENext;
cFaceVerts[jOpp] = cVertOfFace;
cFaceVerts[jPrev] = cVertOfEPrev;
} else {
cFaceVerts[0] = cVertOfVert;
cFaceVerts[1] = cVertOfENext;
cFaceVerts[2] = cVertOfFace;
cFaceVerts[3] = cVertOfEPrev;
}
}
}
}
} | O1 | cpp | OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateFaceVerticesFromParentFaces():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, -0x58(%rsp)
movq 0x8(%rdi), %rax
movq %rax, -0x50(%rsp)
cmpl $0x0, (%rax)
jle 0x46e28
movq -0x50(%rsp), %rax
movq 0x18(%rax), %rcx
movq %rcx, -0x48(%rsp)
movq 0x30(%rax), %rcx
movq %rcx, -0x28(%rsp)
movq 0x48(%rax), %rax
movq %rax, -0x30(%rsp)
movq -0x58(%rsp), %rax
movq 0x58(%rax), %rcx
movq %rcx, -0x38(%rsp)
movq 0x78(%rax), %rax
movq %rax, -0x40(%rsp)
xorl %esi, %esi
movq -0x48(%rsp), %rax
movl (%rax,%rsi,8), %ebx
testl %ebx, %ebx
jle 0x46e14
movq -0x48(%rsp), %rax
movslq 0x4(%rax,%rsi,8), %rax
movq -0x28(%rsp), %rcx
leaq (%rcx,%rax,4), %r10
movq -0x30(%rsp), %rcx
leaq (%rcx,%rax,4), %r15
movq -0x38(%rsp), %rax
movslq 0x4(%rax,%rsi,8), %rax
movq -0x40(%rsp), %rcx
leaq (%rcx,%rax,4), %r12
movq -0x58(%rsp), %rax
movq 0x10(%rax), %rdx
movq 0xa8(%rax), %rcx
movq %rcx, -0x8(%rsp)
movq 0xd8(%rax), %rbp
movq 0xf0(%rax), %rax
movq %rax, -0x10(%rsp)
xorl %r8d, %r8d
movq %rbp, -0x18(%rsp)
movq %rdx, -0x20(%rsp)
movslq (%r12,%r8,4), %rax
cmpq $-0x1, %rax
je 0x46e08
testq %r8, %r8
movl %r8d, %ecx
cmovel %ebx, %ecx
movslq %ecx, %rcx
movq 0x18(%rdx), %rdi
movslq 0x4(%rdi,%rax,8), %r9
shlq $0x2, %r9
addq 0x30(%rdx), %r9
movq -0x8(%rsp), %rax
movl (%rax,%rsi,4), %r11d
movslq -0x4(%r15,%rcx,4), %rax
movl (%rbp,%rax,4), %eax
movslq (%r10,%r8,4), %rdi
movq -0x10(%rsp), %r14
movl (%r14,%rdi,4), %r14d
movslq (%r15,%r8,4), %rdi
movl (%rbp,%rdi,4), %edi
cmpq $0x4, %rbx
jne 0x46df6
leaq -0x1(%rcx), %rbp
addl $-0x2, %ecx
testl %ebp, %ebp
movl $0x3, %r13d
cmovel %r13d, %ecx
movq %r12, %rdx
movq %rsi, %r12
movslq %ecx, %rsi
subl $0x1, %ecx
cmovbl %r13d, %ecx
movl %r14d, (%r9,%r8,4)
movslq %ecx, %rcx
movl %edi, (%r9,%rcx,4)
movl %r11d, (%r9,%rsi,4)
movq %r12, %rsi
movq %rdx, %r12
movq -0x20(%rsp), %rdx
leaq (%r9,%rbp,4), %r9
movq -0x18(%rsp), %rbp
jmp 0x46e05
movl %r14d, (%r9)
movl %edi, 0x4(%r9)
movl %r11d, 0x8(%r9)
addq $0xc, %r9
movl %eax, (%r9)
incq %r8
cmpq %r8, %rbx
jne 0x46d56
incq %rsi
movq -0x50(%rsp), %rax
movslq (%rax), %rax
cmpq %rax, %rsi
jl 0x46ce2
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
| _ZN10OpenSubdiv6v3_6_03Vtr8internal14QuadRefinement35populateFaceVerticesFromParentFacesEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
mov [rsp+30h+var_88], rdi
mov rax, [rdi+8]
mov [rsp+30h+var_80], rax
cmp dword ptr [rax], 0
jle loc_46E28
mov rax, [rsp+30h+var_80]
mov rcx, [rax+18h]
mov [rsp+30h+var_78], rcx
mov rcx, [rax+30h]
mov [rsp+30h+var_58], rcx
mov rax, [rax+48h]
mov [rsp+30h+var_60], rax
mov rax, [rsp+30h+var_88]
mov rcx, [rax+58h]
mov [rsp+30h+var_68], rcx
mov rax, [rax+78h]
mov [rsp+30h+var_70], rax
xor esi, esi
loc_46CE2:
mov rax, [rsp+30h+var_78]
mov ebx, [rax+rsi*8]
test ebx, ebx
jle loc_46E14
mov rax, [rsp+30h+var_78]
movsxd rax, dword ptr [rax+rsi*8+4]
mov rcx, [rsp+30h+var_58]
lea r10, [rcx+rax*4]
mov rcx, [rsp+30h+var_60]
lea r15, [rcx+rax*4]
mov rax, [rsp+30h+var_68]
movsxd rax, dword ptr [rax+rsi*8+4]
mov rcx, [rsp+30h+var_70]
lea r12, [rcx+rax*4]
mov rax, [rsp+30h+var_88]
mov rdx, [rax+10h]
mov rcx, [rax+0A8h]
mov [rsp+30h+var_38], rcx
mov rbp, [rax+0D8h]
mov rax, [rax+0F0h]
mov [rsp+30h+var_40], rax
xor r8d, r8d
mov [rsp+30h+var_48], rbp
mov [rsp+30h+var_50], rdx
loc_46D56:
movsxd rax, dword ptr [r12+r8*4]
cmp rax, 0FFFFFFFFFFFFFFFFh
jz loc_46E08
test r8, r8
mov ecx, r8d
cmovz ecx, ebx
movsxd rcx, ecx
mov rdi, [rdx+18h]
movsxd r9, dword ptr [rdi+rax*8+4]
shl r9, 2
add r9, [rdx+30h]
mov rax, [rsp+30h+var_38]
mov r11d, [rax+rsi*4]
movsxd rax, dword ptr [r15+rcx*4-4]
mov eax, [rbp+rax*4+0]
movsxd rdi, dword ptr [r10+r8*4]
mov r14, [rsp+30h+var_40]
mov r14d, [r14+rdi*4]
movsxd rdi, dword ptr [r15+r8*4]
mov edi, [rbp+rdi*4+0]
cmp rbx, 4
jnz short loc_46DF6
lea rbp, [rcx-1]
add ecx, 0FFFFFFFEh
test ebp, ebp
mov r13d, 3
cmovz ecx, r13d
mov rdx, r12
mov r12, rsi
movsxd rsi, ecx
sub ecx, 1
cmovb ecx, r13d
mov [r9+r8*4], r14d
movsxd rcx, ecx
mov [r9+rcx*4], edi
mov [r9+rsi*4], r11d
mov rsi, r12
mov r12, rdx
mov rdx, [rsp+30h+var_50]
lea r9, [r9+rbp*4]
mov rbp, [rsp+30h+var_48]
jmp short loc_46E05
loc_46DF6:
mov [r9], r14d
mov [r9+4], edi
mov [r9+8], r11d
add r9, 0Ch
loc_46E05:
mov [r9], eax
loc_46E08:
inc r8
cmp rbx, r8
jnz loc_46D56
loc_46E14:
inc rsi
mov rax, [rsp+30h+var_80]
movsxd rax, dword ptr [rax]
cmp rsi, rax
jl loc_46CE2
loc_46E28:
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateFaceVerticesFromParentFaces(
OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement *this)
{
long long result; // rax
long long v2; // rsi
long long v3; // rbx
long long v4; // rax
long long v5; // r10
long long v6; // r15
long long v7; // r12
long long v8; // rdx
long long v9; // rbp
long long v10; // r8
long long v11; // rax
int v12; // ecx
_DWORD *v13; // r9
int v14; // r11d
int v15; // eax
int v16; // r14d
int v17; // edi
long long v18; // rbp
int v19; // ecx
long long v20; // rdx
long long v21; // r12
long long v22; // rsi
bool v23; // cf
int v24; // ecx
_DWORD *v25; // r9
int *v27; // [rsp+8h] [rbp-80h]
long long v28; // [rsp+10h] [rbp-78h]
long long v29; // [rsp+18h] [rbp-70h]
long long v30; // [rsp+20h] [rbp-68h]
long long v31; // [rsp+28h] [rbp-60h]
long long v32; // [rsp+30h] [rbp-58h]
long long v33; // [rsp+38h] [rbp-50h]
long long v34; // [rsp+40h] [rbp-48h]
long long v35; // [rsp+48h] [rbp-40h]
long long v36; // [rsp+50h] [rbp-38h]
result = *((_QWORD *)this + 1);
v27 = (int *)result;
if ( *(int *)result > 0 )
{
v28 = *(_QWORD *)(result + 24);
v32 = *(_QWORD *)(result + 48);
v31 = *(_QWORD *)(result + 72);
v30 = *((_QWORD *)this + 11);
v29 = *((_QWORD *)this + 15);
v2 = 0LL;
do
{
v3 = *(unsigned int *)(v28 + 8 * v2);
if ( (int)v3 > 0 )
{
v4 = *(int *)(v28 + 8 * v2 + 4);
v5 = v32 + 4 * v4;
v6 = v31 + 4 * v4;
v7 = v29 + 4LL * *(int *)(v30 + 8 * v2 + 4);
v8 = *((_QWORD *)this + 2);
v36 = *((_QWORD *)this + 21);
v9 = *((_QWORD *)this + 27);
v35 = *((_QWORD *)this + 30);
v10 = 0LL;
v34 = v9;
v33 = v8;
do
{
v11 = *(int *)(v7 + 4 * v10);
if ( v11 != -1 )
{
v12 = v10;
if ( !v10 )
v12 = v3;
v13 = (_DWORD *)(*(_QWORD *)(v8 + 48) + 4LL * *(int *)(*(_QWORD *)(v8 + 24) + 8 * v11 + 4));
v14 = *(_DWORD *)(v36 + 4 * v2);
v15 = *(_DWORD *)(v9 + 4LL * *(int *)(v6 + 4LL * v12 - 4));
v16 = *(_DWORD *)(v35 + 4LL * *(int *)(v5 + 4 * v10));
v17 = *(_DWORD *)(v9 + 4LL * *(int *)(v6 + 4 * v10));
if ( v3 == 4 )
{
v18 = v12 - 1LL;
v19 = v12 - 2;
if ( !(_DWORD)v18 )
v19 = 3;
v20 = v7;
v21 = v2;
v22 = v19;
v23 = v19 == 0;
v24 = v19 - 1;
if ( v23 )
v24 = 3;
v13[v10] = v16;
v13[v24] = v17;
v13[v22] = v14;
v2 = v21;
v7 = v20;
v8 = v33;
v25 = &v13[v18];
v9 = v34;
}
else
{
*v13 = v16;
v13[1] = v17;
v13[2] = v14;
v25 = v13 + 3;
}
*v25 = v15;
}
++v10;
}
while ( v3 != v10 );
}
++v2;
result = *v27;
}
while ( v2 < result );
}
return result;
}
| populateFaceVerticesFromParentFaces:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV qword ptr [RSP + -0x58],RDI
MOV RAX,qword ptr [RDI + 0x8]
MOV qword ptr [RSP + -0x50],RAX
CMP dword ptr [RAX],0x0
JLE 0x00146e28
MOV RAX,qword ptr [RSP + -0x50]
MOV RCX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + -0x48],RCX
MOV RCX,qword ptr [RAX + 0x30]
MOV qword ptr [RSP + -0x28],RCX
MOV RAX,qword ptr [RAX + 0x48]
MOV qword ptr [RSP + -0x30],RAX
MOV RAX,qword ptr [RSP + -0x58]
MOV RCX,qword ptr [RAX + 0x58]
MOV qword ptr [RSP + -0x38],RCX
MOV RAX,qword ptr [RAX + 0x78]
MOV qword ptr [RSP + -0x40],RAX
XOR ESI,ESI
LAB_00146ce2:
MOV RAX,qword ptr [RSP + -0x48]
MOV EBX,dword ptr [RAX + RSI*0x8]
TEST EBX,EBX
JLE 0x00146e14
MOV RAX,qword ptr [RSP + -0x48]
MOVSXD RAX,dword ptr [RAX + RSI*0x8 + 0x4]
MOV RCX,qword ptr [RSP + -0x28]
LEA R10,[RCX + RAX*0x4]
MOV RCX,qword ptr [RSP + -0x30]
LEA R15,[RCX + RAX*0x4]
MOV RAX,qword ptr [RSP + -0x38]
MOVSXD RAX,dword ptr [RAX + RSI*0x8 + 0x4]
MOV RCX,qword ptr [RSP + -0x40]
LEA R12,[RCX + RAX*0x4]
MOV RAX,qword ptr [RSP + -0x58]
MOV RDX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RAX + 0xa8]
MOV qword ptr [RSP + -0x8],RCX
MOV RBP,qword ptr [RAX + 0xd8]
MOV RAX,qword ptr [RAX + 0xf0]
MOV qword ptr [RSP + -0x10],RAX
XOR R8D,R8D
MOV qword ptr [RSP + -0x18],RBP
MOV qword ptr [RSP + -0x20],RDX
LAB_00146d56:
MOVSXD RAX,dword ptr [R12 + R8*0x4]
CMP RAX,-0x1
JZ 0x00146e08
TEST R8,R8
MOV ECX,R8D
CMOVZ ECX,EBX
MOVSXD RCX,ECX
MOV RDI,qword ptr [RDX + 0x18]
MOVSXD R9,dword ptr [RDI + RAX*0x8 + 0x4]
SHL R9,0x2
ADD R9,qword ptr [RDX + 0x30]
MOV RAX,qword ptr [RSP + -0x8]
MOV R11D,dword ptr [RAX + RSI*0x4]
MOVSXD RAX,dword ptr [R15 + RCX*0x4 + -0x4]
MOV EAX,dword ptr [RBP + RAX*0x4]
MOVSXD RDI,dword ptr [R10 + R8*0x4]
MOV R14,qword ptr [RSP + -0x10]
MOV R14D,dword ptr [R14 + RDI*0x4]
MOVSXD RDI,dword ptr [R15 + R8*0x4]
MOV EDI,dword ptr [RBP + RDI*0x4]
CMP RBX,0x4
JNZ 0x00146df6
LEA RBP,[RCX + -0x1]
ADD ECX,-0x2
TEST EBP,EBP
MOV R13D,0x3
CMOVZ ECX,R13D
MOV RDX,R12
MOV R12,RSI
MOVSXD RSI,ECX
SUB ECX,0x1
CMOVC ECX,R13D
MOV dword ptr [R9 + R8*0x4],R14D
MOVSXD RCX,ECX
MOV dword ptr [R9 + RCX*0x4],EDI
MOV dword ptr [R9 + RSI*0x4],R11D
MOV RSI,R12
MOV R12,RDX
MOV RDX,qword ptr [RSP + -0x20]
LEA R9,[R9 + RBP*0x4]
MOV RBP,qword ptr [RSP + -0x18]
JMP 0x00146e05
LAB_00146df6:
MOV dword ptr [R9],R14D
MOV dword ptr [R9 + 0x4],EDI
MOV dword ptr [R9 + 0x8],R11D
ADD R9,0xc
LAB_00146e05:
MOV dword ptr [R9],EAX
LAB_00146e08:
INC R8
CMP RBX,R8
JNZ 0x00146d56
LAB_00146e14:
INC RSI
MOV RAX,qword ptr [RSP + -0x50]
MOVSXD RAX,dword ptr [RAX]
CMP RSI,RAX
JL 0x00146ce2
LAB_00146e28:
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateFaceVerticesFromParentFaces() */
void __thiscall
OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateFaceVerticesFromParentFaces
(QuadRefinement *this)
{
long lVar1;
uint uVar2;
int iVar3;
int4 uVar4;
int4 uVar5;
int4 uVar6;
int4 uVar7;
int *piVar8;
long lVar9;
long lVar10;
long lVar11;
long lVar12;
long lVar13;
long lVar14;
long lVar15;
long lVar16;
long lVar17;
int iVar18;
long lVar19;
long lVar20;
uint uVar21;
int iVar22;
long lVar23;
ulong uVar24;
int4 *puVar25;
piVar8 = *(int **)(this + 8);
if (0 < *piVar8) {
lVar9 = *(long *)(piVar8 + 6);
lVar10 = *(long *)(piVar8 + 0xc);
lVar11 = *(long *)(piVar8 + 0x12);
lVar12 = *(long *)(this + 0x58);
lVar13 = *(long *)(this + 0x78);
lVar23 = 0;
do {
uVar2 = *(uint *)(lVar9 + lVar23 * 8);
if (0 < (int)uVar2) {
lVar19 = (long)*(int *)(lVar9 + 4 + lVar23 * 8);
lVar1 = lVar11 + lVar19 * 4;
iVar3 = *(int *)(lVar12 + 4 + lVar23 * 8);
lVar14 = *(long *)(this + 0x10);
lVar15 = *(long *)(this + 0xa8);
lVar16 = *(long *)(this + 0xd8);
lVar17 = *(long *)(this + 0xf0);
uVar24 = 0;
do {
lVar20 = (long)*(int *)(lVar13 + (long)iVar3 * 4 + uVar24 * 4);
if (lVar20 != -1) {
uVar21 = (uint)uVar24;
if (uVar24 == 0) {
uVar21 = uVar2;
}
puVar25 = (int4 *)
((long)*(int *)(*(long *)(lVar14 + 0x18) + 4 + lVar20 * 8) * 4 +
*(long *)(lVar14 + 0x30));
uVar4 = *(int4 *)(lVar15 + lVar23 * 4);
uVar5 = *(int4 *)(lVar16 + (long)*(int *)(lVar1 + -4 + (long)(int)uVar21 * 4) * 4)
;
uVar6 = *(int4 *)(lVar17 + (long)*(int *)(lVar10 + lVar19 * 4 + uVar24 * 4) * 4);
uVar7 = *(int4 *)(lVar16 + (long)*(int *)(lVar1 + uVar24 * 4) * 4);
if ((ulong)uVar2 == 4) {
lVar20 = (long)(int)uVar21 + -1;
iVar22 = uVar21 - 2;
if ((int)lVar20 == 0) {
iVar22 = 3;
}
iVar18 = iVar22 + -1;
if (iVar22 == 0) {
iVar18 = 3;
}
puVar25[uVar24] = uVar6;
puVar25[iVar18] = uVar7;
puVar25[iVar22] = uVar4;
puVar25 = puVar25 + lVar20;
}
else {
*puVar25 = uVar6;
puVar25[1] = uVar7;
puVar25[2] = uVar4;
puVar25 = puVar25 + 3;
}
*puVar25 = uVar5;
}
uVar24 = uVar24 + 1;
} while (uVar2 != uVar24);
}
lVar23 = lVar23 + 1;
} while (lVar23 < *piVar8);
}
return;
}
|
|
3,474 | OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateFaceVerticesFromParentFaces() | NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/quadRefinement.cpp | void
QuadRefinement::populateFaceVerticesFromParentFaces() {
//
// This is pretty straightforward, but is a good example for the case of
// iterating through the parent faces rather than the child faces, as the
// same topology information for the parent faces is required for each of
// the child faces.
//
// For each of the child faces of a parent face, identify the child vertices
// for its face-verts from the child vertices of the parent face, its edges
// and its vertices.
//
for (Index pFace = 0; pFace < _parent->getNumFaces(); ++pFace) {
ConstIndexArray pFaceVerts = _parent->getFaceVertices(pFace),
pFaceEdges = _parent->getFaceEdges(pFace),
pFaceChildren = getFaceChildFaces(pFace);
int pFaceSize = pFaceVerts.size();
for (int j = 0; j < pFaceSize; ++j) {
Index cFace = pFaceChildren[j];
if (IndexIsValid(cFace)) {
int jPrev = j ? (j - 1) : (pFaceSize - 1);
Index cVertOfFace = _faceChildVertIndex[pFace];
Index cVertOfEPrev = _edgeChildVertIndex[pFaceEdges[jPrev]];
Index cVertOfVert = _vertChildVertIndex[pFaceVerts[j]];
Index cVertOfENext = _edgeChildVertIndex[pFaceEdges[j]];
IndexArray cFaceVerts = _child->getFaceVertices(cFace);
// Note orientation wrt parent face -- quad vs non-quad...
if (pFaceSize == 4) {
int jOpp = jPrev ? (jPrev - 1) : 3;
int jNext = jOpp ? (jOpp - 1) : 3;
cFaceVerts[j] = cVertOfVert;
cFaceVerts[jNext] = cVertOfENext;
cFaceVerts[jOpp] = cVertOfFace;
cFaceVerts[jPrev] = cVertOfEPrev;
} else {
cFaceVerts[0] = cVertOfVert;
cFaceVerts[1] = cVertOfENext;
cFaceVerts[2] = cVertOfFace;
cFaceVerts[3] = cVertOfEPrev;
}
}
}
}
} | O2 | cpp | OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateFaceVerticesFromParentFaces():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %r12
xorl %r15d, %r15d
movq %rdi, 0x8(%rsp)
movq 0x8(%r12), %rdi
movslq (%rdi), %rax
cmpq %rax, %r15
jge 0x5f1e2
movl %r15d, %esi
callq 0x52db0
movq %rax, 0x18(%rsp)
movl %edx, %ebp
movq 0x8(%r12), %rdi
movl %r15d, %esi
callq 0x52d60
movq %rax, 0x10(%rsp)
movq %r12, %rdi
movl %r15d, %esi
callq 0x50b80
movq %rax, 0x28(%rsp)
testl %ebp, %ebp
movl $0x0, %eax
movl %ebp, (%rsp)
cmovgl %ebp, %eax
movq %rax, 0x30(%rsp)
xorl %r14d, %r14d
movq %r15, 0x20(%rsp)
cmpq %r14, 0x30(%rsp)
je 0x5f1da
movq 0x28(%rsp), %rax
movl (%rax,%r14,4), %esi
cmpl $-0x1, %esi
je 0x5f1d2
testq %r14, %r14
movl %r14d, %eax
movl (%rsp), %ebx
cmovel %ebx, %eax
movslq %eax, %rbp
movq 0x10(%r12), %rdi
movq 0xa8(%r12), %rax
movl (%rax,%r15,4), %r15d
movq 0x10(%rsp), %r8
movslq -0x4(%r8,%rbp,4), %rax
movq 0xd8(%r12), %rcx
movl (%rcx,%rax,4), %eax
movl %eax, 0x4(%rsp)
movq 0x18(%rsp), %rax
movslq (%rax,%r14,4), %rax
movq 0xf0(%r12), %rdx
movl (%rdx,%rax,4), %r13d
movslq (%r8,%r14,4), %rax
movl (%rcx,%rax,4), %r12d
callq 0x51550
cmpl $0x4, %ebx
jne 0x5f1b3
leaq -0x1(%rbp), %rcx
addl $-0x2, %ebp
testl %ecx, %ecx
pushq $0x3
popq %rsi
cmovel %esi, %ebp
movslq %ebp, %rdx
subl $0x1, %ebp
cmovbl %esi, %ebp
movl %r13d, (%rax,%r14,4)
movslq %ebp, %rsi
movl %r12d, (%rax,%rsi,4)
movl %r15d, (%rax,%rdx,4)
leaq (%rax,%rcx,4), %rax
jmp 0x5f1c2
movl %r13d, (%rax)
movl %r12d, 0x4(%rax)
movl %r15d, 0x8(%rax)
addq $0xc, %rax
movl 0x4(%rsp), %ecx
movl %ecx, (%rax)
movq 0x20(%rsp), %r15
movq 0x8(%rsp), %r12
incq %r14
jmp 0x5f109
incq %r15
jmp 0x5f0ad
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
| _ZN10OpenSubdiv6v3_6_03Vtr8internal14QuadRefinement35populateFaceVerticesFromParentFacesEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r12, rdi
xor r15d, r15d
mov [rsp+68h+var_60], rdi
loc_5F0AD:
mov rdi, [r12+8]; this
movsxd rax, dword ptr [rdi]
cmp r15, rax
jge loc_5F1E2
mov esi, r15d; int
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level15getFaceVerticesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVertices(int)
mov [rsp+68h+var_50], rax
mov ebp, edx
mov rdi, [r12+8]; this
mov esi, r15d; int
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level12getFaceEdgesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceEdges(int)
mov [rsp+68h+var_58], rax
mov rdi, r12; this
mov esi, r15d; int
call __ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement17getFaceChildFacesEi; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::getFaceChildFaces(int)
mov [rsp+68h+var_40], rax
test ebp, ebp
mov eax, 0
mov [rsp+68h+var_68], ebp
cmovg eax, ebp
mov [rsp+68h+var_38], rax
xor r14d, r14d
mov [rsp+68h+var_48], r15
loc_5F109:
cmp [rsp+68h+var_38], r14
jz loc_5F1DA
mov rax, [rsp+68h+var_40]
mov esi, [rax+r14*4]; int
cmp esi, 0FFFFFFFFh
jz loc_5F1D2
test r14, r14
mov eax, r14d
mov ebx, [rsp+68h+var_68]
cmovz eax, ebx
movsxd rbp, eax
mov rdi, [r12+10h]; this
mov rax, [r12+0A8h]
mov r15d, [rax+r15*4]
mov r8, [rsp+68h+var_58]
movsxd rax, dword ptr [r8+rbp*4-4]
mov rcx, [r12+0D8h]
mov eax, [rcx+rax*4]
mov [rsp+68h+var_64], eax
mov rax, [rsp+68h+var_50]
movsxd rax, dword ptr [rax+r14*4]
mov rdx, [r12+0F0h]
mov r13d, [rdx+rax*4]
movsxd rax, dword ptr [r8+r14*4]
mov r12d, [rcx+rax*4]
call __ZN10OpenSubdiv6v3_6_03Vtr8internal5Level15getFaceVerticesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVertices(int)
cmp ebx, 4
jnz short loc_5F1B3
lea rcx, [rbp-1]
add ebp, 0FFFFFFFEh
test ecx, ecx
push 3
pop rsi
cmovz ebp, esi
movsxd rdx, ebp
sub ebp, 1
cmovb ebp, esi
mov [rax+r14*4], r13d
movsxd rsi, ebp
mov [rax+rsi*4], r12d
mov [rax+rdx*4], r15d
lea rax, [rax+rcx*4]
jmp short loc_5F1C2
loc_5F1B3:
mov [rax], r13d
mov [rax+4], r12d
mov [rax+8], r15d
add rax, 0Ch
loc_5F1C2:
mov ecx, [rsp+68h+var_64]
mov [rax], ecx
mov r15, [rsp+68h+var_48]
mov r12, [rsp+68h+var_60]
loc_5F1D2:
inc r14
jmp loc_5F109
loc_5F1DA:
inc r15
jmp loc_5F0AD
loc_5F1E2:
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateFaceVerticesFromParentFaces(
OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement *this)
{
OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement *v1; // r12
long long i; // r15
OpenSubdiv::v3_6_0::Vtr::internal::Level *v3; // rdi
long long result; // rax
int v5; // edx
int v6; // ebp
long long v7; // rax
long long v8; // r14
int v9; // esi
int v10; // eax
long long v11; // rbp
OpenSubdiv::v3_6_0::Vtr::internal::Level *v12; // rdi
int v13; // r15d
long long v14; // rcx
int v15; // r13d
int v16; // r12d
_DWORD *v17; // rax
long long v18; // rcx
int v19; // ebp
long long v20; // rdx
bool v21; // cf
int v22; // ebp
_DWORD *v23; // rax
int v24; // [rsp+0h] [rbp-68h]
int v25; // [rsp+4h] [rbp-64h]
long long FaceEdges; // [rsp+10h] [rbp-58h]
long long FaceVertices; // [rsp+18h] [rbp-50h]
long long v29; // [rsp+20h] [rbp-48h]
long long FaceChildFaces; // [rsp+28h] [rbp-40h]
long long v31; // [rsp+30h] [rbp-38h]
v1 = this;
for ( i = 0LL; ; ++i )
{
v3 = (OpenSubdiv::v3_6_0::Vtr::internal::Level *)*((_QWORD *)v1 + 1);
result = *(int *)v3;
if ( i >= result )
break;
FaceVertices = OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVertices(v3, i);
v6 = v5;
FaceEdges = OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceEdges(
*((OpenSubdiv::v3_6_0::Vtr::internal::Level **)v1 + 1),
i);
FaceChildFaces = OpenSubdiv::v3_6_0::Vtr::internal::Refinement::getFaceChildFaces(v1, i);
v7 = 0LL;
v24 = v6;
if ( v6 > 0 )
v7 = (unsigned int)v6;
v31 = v7;
v8 = 0LL;
v29 = i;
while ( v31 != v8 )
{
v9 = *(_DWORD *)(FaceChildFaces + 4 * v8);
if ( v9 != -1 )
{
v10 = v8;
if ( !v8 )
v10 = v24;
v11 = v10;
v12 = (OpenSubdiv::v3_6_0::Vtr::internal::Level *)*((_QWORD *)v1 + 2);
v13 = *(_DWORD *)(*((_QWORD *)v1 + 21) + 4 * i);
v14 = *((_QWORD *)v1 + 27);
v25 = *(_DWORD *)(v14 + 4LL * *(int *)(FaceEdges + 4LL * v10 - 4));
v15 = *(_DWORD *)(*((_QWORD *)v1 + 30) + 4LL * *(int *)(FaceVertices + 4 * v8));
v16 = *(_DWORD *)(v14 + 4LL * *(int *)(FaceEdges + 4 * v8));
v17 = (_DWORD *)OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVertices(v12, v9);
if ( v24 == 4 )
{
v18 = v11 - 1;
v19 = v11 - 2;
if ( !(_DWORD)v18 )
v19 = 3;
v20 = v19;
v21 = v19 == 0;
v22 = v19 - 1;
if ( v21 )
v22 = 3;
v17[v8] = v15;
v17[v22] = v16;
v17[v20] = v13;
v23 = &v17[v18];
}
else
{
*v17 = v15;
v17[1] = v16;
v17[2] = v13;
v23 = v17 + 3;
}
*v23 = v25;
i = v29;
v1 = this;
}
++v8;
}
}
return result;
}
| populateFaceVerticesFromParentFaces:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R12,RDI
XOR R15D,R15D
MOV qword ptr [RSP + 0x8],RDI
LAB_0015f0ad:
MOV RDI,qword ptr [R12 + 0x8]
MOVSXD RAX,dword ptr [RDI]
CMP R15,RAX
JGE 0x0015f1e2
MOV ESI,R15D
CALL 0x00152db0
MOV qword ptr [RSP + 0x18],RAX
MOV EBP,EDX
MOV RDI,qword ptr [R12 + 0x8]
MOV ESI,R15D
CALL 0x00152d60
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,R12
MOV ESI,R15D
CALL 0x00150b80
MOV qword ptr [RSP + 0x28],RAX
TEST EBP,EBP
MOV EAX,0x0
MOV dword ptr [RSP],EBP
CMOVG EAX,EBP
MOV qword ptr [RSP + 0x30],RAX
XOR R14D,R14D
MOV qword ptr [RSP + 0x20],R15
LAB_0015f109:
CMP qword ptr [RSP + 0x30],R14
JZ 0x0015f1da
MOV RAX,qword ptr [RSP + 0x28]
MOV ESI,dword ptr [RAX + R14*0x4]
CMP ESI,-0x1
JZ 0x0015f1d2
TEST R14,R14
MOV EAX,R14D
MOV EBX,dword ptr [RSP]
CMOVZ EAX,EBX
MOVSXD RBP,EAX
MOV RDI,qword ptr [R12 + 0x10]
MOV RAX,qword ptr [R12 + 0xa8]
MOV R15D,dword ptr [RAX + R15*0x4]
MOV R8,qword ptr [RSP + 0x10]
MOVSXD RAX,dword ptr [R8 + RBP*0x4 + -0x4]
MOV RCX,qword ptr [R12 + 0xd8]
MOV EAX,dword ptr [RCX + RAX*0x4]
MOV dword ptr [RSP + 0x4],EAX
MOV RAX,qword ptr [RSP + 0x18]
MOVSXD RAX,dword ptr [RAX + R14*0x4]
MOV RDX,qword ptr [R12 + 0xf0]
MOV R13D,dword ptr [RDX + RAX*0x4]
MOVSXD RAX,dword ptr [R8 + R14*0x4]
MOV R12D,dword ptr [RCX + RAX*0x4]
CALL 0x00151550
CMP EBX,0x4
JNZ 0x0015f1b3
LEA RCX,[RBP + -0x1]
ADD EBP,-0x2
TEST ECX,ECX
PUSH 0x3
POP RSI
CMOVZ EBP,ESI
MOVSXD RDX,EBP
SUB EBP,0x1
CMOVC EBP,ESI
MOV dword ptr [RAX + R14*0x4],R13D
MOVSXD RSI,EBP
MOV dword ptr [RAX + RSI*0x4],R12D
MOV dword ptr [RAX + RDX*0x4],R15D
LEA RAX,[RAX + RCX*0x4]
JMP 0x0015f1c2
LAB_0015f1b3:
MOV dword ptr [RAX],R13D
MOV dword ptr [RAX + 0x4],R12D
MOV dword ptr [RAX + 0x8],R15D
ADD RAX,0xc
LAB_0015f1c2:
MOV ECX,dword ptr [RSP + 0x4]
MOV dword ptr [RAX],ECX
MOV R15,qword ptr [RSP + 0x20]
MOV R12,qword ptr [RSP + 0x8]
LAB_0015f1d2:
INC R14
JMP 0x0015f109
LAB_0015f1da:
INC R15
JMP 0x0015f0ad
LAB_0015f1e2:
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateFaceVerticesFromParentFaces() */
void __thiscall
OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateFaceVerticesFromParentFaces
(QuadRefinement *this)
{
long lVar1;
int4 uVar2;
int4 uVar3;
int4 uVar4;
int4 uVar5;
uint uVar6;
long lVar7;
long lVar8;
ulong uVar9;
int4 *puVar10;
uint uVar11;
int iVar12;
ulong uVar13;
int iVar14;
long lVar15;
int1 auVar16 [12];
for (lVar15 = 0; lVar15 < *(int *)*(Level **)(this + 8); lVar15 = lVar15 + 1) {
iVar14 = (int)lVar15;
auVar16 = Level::getFaceVertices(*(Level **)(this + 8),iVar14);
uVar11 = auVar16._8_4_;
lVar7 = Level::getFaceEdges(*(Level **)(this + 8),iVar14);
lVar8 = Refinement::getFaceChildFaces((Refinement *)this,iVar14);
uVar9 = 0;
if (0 < (int)uVar11) {
uVar9 = (ulong)uVar11;
}
for (uVar13 = 0; uVar9 != uVar13; uVar13 = uVar13 + 1) {
iVar14 = *(int *)(lVar8 + uVar13 * 4);
if (iVar14 != -1) {
uVar6 = (uint)uVar13;
if (uVar13 == 0) {
uVar6 = uVar11;
}
uVar2 = *(int4 *)(*(long *)(this + 0xa8) + lVar15 * 4);
uVar3 = *(int4 *)
(*(long *)(this + 0xd8) + (long)*(int *)(lVar7 + -4 + (long)(int)uVar6 * 4) * 4);
uVar4 = *(int4 *)
(*(long *)(this + 0xf0) + (long)*(int *)(auVar16._0_8_ + uVar13 * 4) * 4);
uVar5 = *(int4 *)(*(long *)(this + 0xd8) + (long)*(int *)(lVar7 + uVar13 * 4) * 4);
puVar10 = (int4 *)Level::getFaceVertices(*(Level **)(this + 0x10),iVar14);
if (uVar11 == 4) {
lVar1 = (long)(int)uVar6 + -1;
iVar14 = uVar6 - 2;
if ((int)lVar1 == 0) {
iVar14 = 3;
}
iVar12 = iVar14 + -1;
if (iVar14 == 0) {
iVar12 = 3;
}
puVar10[uVar13] = uVar4;
puVar10[iVar12] = uVar5;
puVar10[iVar14] = uVar2;
puVar10 = puVar10 + lVar1;
}
else {
*puVar10 = uVar4;
puVar10[1] = uVar5;
puVar10[2] = uVar2;
puVar10 = puVar10 + 3;
}
*puVar10 = uVar3;
}
}
}
return;
}
|
|
3,475 | my_casefold_ujis | eloqsql/strings/ctype-ujis.c | static size_t
my_casefold_ujis(CHARSET_INFO *cs,
const char *src, size_t srclen,
char *dst, size_t dstlen __attribute__((unused)),
const uchar * const map,
size_t is_upper)
{
const char *srcend= src + srclen, *dst0= dst;
while (src < srcend)
{
size_t mblen= my_ismbchar(cs, src, srcend);
if (mblen)
{
MY_UNICASE_CHARACTER *ch;
ch= (mblen == 2) ?
get_case_info_for_ch(cs, 0, (uchar) src[0], (uchar) src[1]) :
get_case_info_for_ch(cs, 1, (uchar) src[1], (uchar) src[2]);
if (ch)
{
int code= is_upper ? ch->toupper : ch->tolower;
src+= mblen;
if (code > 0xFFFF)
*dst++= (char) (uchar) ((code >> 16) & 0xFF);
if (code > 0xFF)
*dst++= (char) (uchar) ((code >> 8) & 0xFF);
*dst++= (char) (uchar) (code & 0xFF);
}
else
{
if (mblen == 3)
*dst++= *src++;
*dst++= *src++;
*dst++= *src++;
}
}
else
{
*dst++= (char) map[(uchar) *src++];
}
}
return (size_t) (dst - dst0);
} | O3 | c | my_casefold_ujis:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, -0x40(%rbp)
movq %rcx, %rbx
movq %rcx, -0x30(%rbp)
testq %rdx, %rdx
jle 0x84bf3
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
addq %rsi, %r15
xorl %eax, %eax
testq %r9, %r9
sete %al
shll $0x2, %eax
movq %rax, -0x38(%rbp)
xorl %r14d, %r14d
movq -0x30(%rbp), %rbx
movq 0xb8(%r13), %rax
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq *0xc0(%rax)
cmpl $0x2, %eax
cmovll %r14d, %eax
testl %eax, %eax
je 0x84b4d
cmpl $0x2, %eax
jne 0x84b63
movzbl (%r12), %ecx
movq 0x78(%r13), %rdx
movq 0x8(%rdx), %rdx
movq (%rdx,%rcx,8), %rcx
testq %rcx, %rcx
je 0x84bbd
movzbl 0x1(%r12), %edx
jmp 0x84b84
movzbl (%r12), %eax
incq %r12
movq -0x40(%rbp), %rcx
movb (%rcx,%rax), %al
movb %al, (%rbx)
jmp 0x84be7
movzbl 0x1(%r12), %ecx
movq 0x78(%r13), %rdx
movq 0x8(%rdx), %rdx
movq 0x800(%rdx,%rcx,8), %rcx
testq %rcx, %rcx
je 0x84bac
movzbl 0x2(%r12), %edx
leaq (%rdx,%rdx,2), %rdx
leaq (%rcx,%rdx,4), %rcx
testq %rcx, %rcx
je 0x84bac
movq -0x38(%rbp), %rdx
movl (%rcx,%rdx), %ecx
cmpl $0x10000, %ecx # imm = 0x10000
jl 0x84bd5
movl %ecx, %edx
shrl $0x10, %edx
movb %dl, (%rbx)
incq %rbx
jmp 0x84bdd
cmpl $0x3, %eax
jne 0x84bbd
movb (%r12), %al
incq %r12
movb %al, (%rbx)
incq %rbx
movb (%r12), %al
movb %al, (%rbx)
movb 0x1(%r12), %al
addq $0x2, %r12
movb %al, 0x1(%rbx)
addq $0x2, %rbx
jmp 0x84bea
cmpl $0x100, %ecx # imm = 0x100
jl 0x84be2
movb %ch, (%rbx)
incq %rbx
addq %rax, %r12
movb %cl, (%rbx)
incq %rbx
cmpq %r15, %r12
jb 0x84b09
subq -0x30(%rbp), %rbx
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_casefold_ujis:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rbp+var_40], r8
mov rbx, rcx
mov [rbp+var_30], rcx
test rdx, rdx
jle loc_84BF3
mov r15, rdx
mov r12, rsi
mov r13, rdi
add r15, rsi
xor eax, eax
test r9, r9
setz al
shl eax, 2
mov [rbp+var_38], rax
xor r14d, r14d
mov rbx, [rbp+var_30]
loc_84B09:
mov rax, [r13+0B8h]
mov rdi, r13
mov rsi, r12
mov rdx, r15
call qword ptr [rax+0C0h]
cmp eax, 2
cmovl eax, r14d
test eax, eax
jz short loc_84B4D
cmp eax, 2
jnz short loc_84B63
movzx ecx, byte ptr [r12]
mov rdx, [r13+78h]
mov rdx, [rdx+8]
mov rcx, [rdx+rcx*8]
test rcx, rcx
jz short loc_84BBD
movzx edx, byte ptr [r12+1]
jmp short loc_84B84
loc_84B4D:
movzx eax, byte ptr [r12]
inc r12
mov rcx, [rbp+var_40]
mov al, [rcx+rax]
mov [rbx], al
jmp loc_84BE7
loc_84B63:
movzx ecx, byte ptr [r12+1]
mov rdx, [r13+78h]
mov rdx, [rdx+8]
mov rcx, [rdx+rcx*8+800h]
test rcx, rcx
jz short loc_84BAC
movzx edx, byte ptr [r12+2]
loc_84B84:
lea rdx, [rdx+rdx*2]
lea rcx, [rcx+rdx*4]
test rcx, rcx
jz short loc_84BAC
mov rdx, [rbp+var_38]
mov ecx, [rcx+rdx]
cmp ecx, 10000h
jl short loc_84BD5
mov edx, ecx
shr edx, 10h
mov [rbx], dl
inc rbx
jmp short loc_84BDD
loc_84BAC:
cmp eax, 3
jnz short loc_84BBD
mov al, [r12]
inc r12
mov [rbx], al
inc rbx
loc_84BBD:
mov al, [r12]
mov [rbx], al
mov al, [r12+1]
add r12, 2
mov [rbx+1], al
add rbx, 2
jmp short loc_84BEA
loc_84BD5:
cmp ecx, 100h
jl short loc_84BE2
loc_84BDD:
mov [rbx], ch
inc rbx
loc_84BE2:
add r12, rax
mov [rbx], cl
loc_84BE7:
inc rbx
loc_84BEA:
cmp r12, r15
jb loc_84B09
loc_84BF3:
sub rbx, [rbp+var_30]
mov rax, rbx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| _BYTE * my_casefold_ujis(
long long a1,
unsigned __int8 *a2,
long long a3,
unsigned __int8 *a4,
long long a5,
long long a6)
{
unsigned __int8 *v6; // rbx
unsigned __int8 *v7; // r12
unsigned long long v8; // r15
long long v9; // rax
long long v10; // rcx
long long v11; // rdx
long long v12; // rax
long long v13; // rcx
int v14; // ecx
unsigned __int8 v15; // al
unsigned __int8 v16; // al
long long v19; // [rsp+8h] [rbp-38h]
v6 = a4;
if ( a3 > 0 )
{
v7 = a2;
v8 = (unsigned long long)&a2[a3];
v19 = 4 * (unsigned int)(a6 == 0);
v6 = a4;
while ( 1 )
{
v9 = (*(long long ( **)(long long, unsigned __int8 *, unsigned long long))(*(_QWORD *)(a1 + 184) + 192LL))(
a1,
v7,
v8);
if ( (int)v9 < 2 )
v9 = 0LL;
if ( !(_DWORD)v9 )
{
v12 = *v7++;
*v6 = *(_BYTE *)(a5 + v12);
goto LABEL_21;
}
if ( (_DWORD)v9 != 2 )
break;
v10 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 120) + 8LL) + 8LL * *v7);
if ( v10 )
{
v11 = v7[1];
LABEL_12:
v13 = v10 + 12 * v11;
if ( v13 )
{
v14 = *(_DWORD *)(v13 + v19);
if ( v14 >= 0x10000 )
{
*v6++ = BYTE2(v14);
goto LABEL_19;
}
if ( v14 >= 256 )
LABEL_19:
*v6++ = BYTE1(v14);
v7 += v9;
*v6 = v14;
LABEL_21:
++v6;
goto LABEL_22;
}
goto LABEL_15;
}
LABEL_17:
*v6 = *v7;
v16 = v7[1];
v7 += 2;
v6[1] = v16;
v6 += 2;
LABEL_22:
if ( (unsigned long long)v7 >= v8 )
return (_BYTE *)(v6 - a4);
}
v10 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 120) + 8LL) + 8LL * v7[1] + 2048);
if ( v10 )
{
v11 = v7[2];
goto LABEL_12;
}
LABEL_15:
if ( (_DWORD)v9 == 3 )
{
v15 = *v7++;
*v6++ = v15;
}
goto LABEL_17;
}
return (_BYTE *)(v6 - a4);
}
| my_casefold_ujis:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RBP + -0x40],R8
MOV RBX,RCX
MOV qword ptr [RBP + -0x30],RCX
TEST RDX,RDX
JLE 0x00184bf3
MOV R15,RDX
MOV R12,RSI
MOV R13,RDI
ADD R15,RSI
XOR EAX,EAX
TEST R9,R9
SETZ AL
SHL EAX,0x2
MOV qword ptr [RBP + -0x38],RAX
XOR R14D,R14D
MOV RBX,qword ptr [RBP + -0x30]
LAB_00184b09:
MOV RAX,qword ptr [R13 + 0xb8]
MOV RDI,R13
MOV RSI,R12
MOV RDX,R15
CALL qword ptr [RAX + 0xc0]
CMP EAX,0x2
CMOVL EAX,R14D
TEST EAX,EAX
JZ 0x00184b4d
CMP EAX,0x2
JNZ 0x00184b63
MOVZX ECX,byte ptr [R12]
MOV RDX,qword ptr [R13 + 0x78]
MOV RDX,qword ptr [RDX + 0x8]
MOV RCX,qword ptr [RDX + RCX*0x8]
TEST RCX,RCX
JZ 0x00184bbd
MOVZX EDX,byte ptr [R12 + 0x1]
JMP 0x00184b84
LAB_00184b4d:
MOVZX EAX,byte ptr [R12]
INC R12
MOV RCX,qword ptr [RBP + -0x40]
MOV AL,byte ptr [RCX + RAX*0x1]
MOV byte ptr [RBX],AL
JMP 0x00184be7
LAB_00184b63:
MOVZX ECX,byte ptr [R12 + 0x1]
MOV RDX,qword ptr [R13 + 0x78]
MOV RDX,qword ptr [RDX + 0x8]
MOV RCX,qword ptr [RDX + RCX*0x8 + 0x800]
TEST RCX,RCX
JZ 0x00184bac
MOVZX EDX,byte ptr [R12 + 0x2]
LAB_00184b84:
LEA RDX,[RDX + RDX*0x2]
LEA RCX,[RCX + RDX*0x4]
TEST RCX,RCX
JZ 0x00184bac
MOV RDX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RCX + RDX*0x1]
CMP ECX,0x10000
JL 0x00184bd5
MOV EDX,ECX
SHR EDX,0x10
MOV byte ptr [RBX],DL
INC RBX
JMP 0x00184bdd
LAB_00184bac:
CMP EAX,0x3
JNZ 0x00184bbd
MOV AL,byte ptr [R12]
INC R12
MOV byte ptr [RBX],AL
INC RBX
LAB_00184bbd:
MOV AL,byte ptr [R12]
MOV byte ptr [RBX],AL
MOV AL,byte ptr [R12 + 0x1]
ADD R12,0x2
MOV byte ptr [RBX + 0x1],AL
ADD RBX,0x2
JMP 0x00184bea
LAB_00184bd5:
CMP ECX,0x100
JL 0x00184be2
LAB_00184bdd:
MOV byte ptr [RBX],CH
INC RBX
LAB_00184be2:
ADD R12,RAX
MOV byte ptr [RBX],CL
LAB_00184be7:
INC RBX
LAB_00184bea:
CMP R12,R15
JC 0x00184b09
LAB_00184bf3:
SUB RBX,qword ptr [RBP + -0x30]
MOV RAX,RBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long my_casefold_ujis(long param_1,byte *param_2,long param_3,byte *param_4,long param_5,
long param_6)
{
byte *pbVar1;
byte bVar2;
uint uVar3;
int iVar4;
long lVar6;
byte *pbVar7;
byte *pbVar8;
ulong uVar5;
pbVar7 = param_4;
if (0 < param_3) {
pbVar8 = param_2 + param_3;
do {
uVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,pbVar8);
uVar5 = (ulong)uVar3;
if ((int)uVar3 < 2) {
uVar5 = 0;
}
iVar4 = (int)uVar5;
if (iVar4 == 0) {
bVar2 = *param_2;
param_2 = param_2 + 1;
*pbVar7 = *(byte *)(param_5 + (ulong)bVar2);
LAB_00184be7:
pbVar7 = pbVar7 + 1;
}
else {
if (iVar4 == 2) {
lVar6 = *(long *)(*(long *)(*(long *)(param_1 + 0x78) + 8) + (ulong)*param_2 * 8);
if (lVar6 != 0) {
bVar2 = param_2[1];
LAB_00184b84:
lVar6 = lVar6 + (ulong)bVar2 * 0xc;
if (lVar6 == 0) goto LAB_00184bac;
iVar4 = *(int *)(lVar6 + (ulong)(param_6 == 0) * 4);
if (iVar4 < 0x10000) {
if (0xff < iVar4) goto LAB_00184bdd;
}
else {
*pbVar7 = (byte)((uint)iVar4 >> 0x10);
pbVar7 = pbVar7 + 1;
LAB_00184bdd:
*pbVar7 = (byte)((uint)iVar4 >> 8);
pbVar7 = pbVar7 + 1;
}
param_2 = param_2 + uVar5;
*pbVar7 = (byte)iVar4;
goto LAB_00184be7;
}
}
else {
lVar6 = *(long *)(*(long *)(*(long *)(param_1 + 0x78) + 8) + 0x800 + (ulong)param_2[1] * 8
);
if (lVar6 != 0) {
bVar2 = param_2[2];
goto LAB_00184b84;
}
LAB_00184bac:
if (iVar4 == 3) {
bVar2 = *param_2;
param_2 = param_2 + 1;
*pbVar7 = bVar2;
pbVar7 = pbVar7 + 1;
}
}
*pbVar7 = *param_2;
pbVar1 = param_2 + 1;
param_2 = param_2 + 2;
pbVar7[1] = *pbVar1;
pbVar7 = pbVar7 + 2;
}
} while (param_2 < pbVar8);
}
return (long)pbVar7 - (long)param_4;
}
|
|
3,476 | Tools::trans(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | cosmotop/src/cosmotop_tools_shared.cpp | string trans(const string& str) {
std::string_view oldstr{str};
string newstr;
newstr.reserve(str.size());
for (size_t pos; (pos = oldstr.find(' ')) != string::npos;) {
newstr.append(oldstr.substr(0, pos));
size_t x = 0;
while (pos + x < oldstr.size() and oldstr.at(pos + x) == ' ') x++;
newstr.append(Mv::r(x));
oldstr.remove_prefix(pos + x);
}
return (newstr.empty()) ? str : newstr + string{oldstr};
} | O0 | cpp | Tools::trans(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
subq $0x118, %rsp # imm = 0x118
movq %rdi, 0x28(%rsp)
movq %rdi, %rax
movq %rax, 0x30(%rsp)
movq %rdi, 0xf0(%rsp)
movq %rsi, 0xe8(%rsp)
movq 0xe8(%rsp), %rdi
callq 0x68b70
movq %rax, 0xd8(%rsp)
movq %rdx, 0xe0(%rsp)
leaq 0xb8(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0x3c220
movq 0xe8(%rsp), %rdi
callq 0x392f0
movq 0x38(%rsp), %rdi
movq %rax, %rsi
callq 0x393c0
jmp 0xf195f
jmp 0xf1961
leaq 0xd8(%rsp), %rdi
movl $0x20, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0xc75e0
movq %rax, 0xa0(%rsp)
cmpq $-0x1, %rax
je 0xf1b09
movq 0xa0(%rsp), %rdx
xorl %eax, %eax
movl %eax, %esi
leaq 0xd8(%rsp), %rdi
callq 0xc7540
movq %rdx, 0x18(%rsp)
movq %rax, 0x20(%rsp)
jmp 0xf19ae
movq 0x18(%rsp), %rax
movq 0x20(%rsp), %rcx
movq %rcx, 0x90(%rsp)
movq %rax, 0x98(%rsp)
leaq 0xb8(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0xf6c60
jmp 0xf19df
movq $0x0, 0x88(%rsp)
movq 0xa0(%rsp), %rax
addq 0x88(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0xd8(%rsp), %rdi
callq 0x3a2e0
movq 0x8(%rsp), %rcx
movq %rax, %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, 0x17(%rsp)
jae 0xf1a57
movq 0xa0(%rsp), %rsi
movq 0x88(%rsp), %rax
addq %rax, %rsi
leaq 0xd8(%rsp), %rdi
callq 0xf6cc0
movq %rax, (%rsp)
jmp 0xf1a46
movq (%rsp), %rax
movsbl (%rax), %eax
cmpl $0x20, %eax
sete %al
movb %al, 0x17(%rsp)
movb 0x17(%rsp), %al
testb $0x1, %al
jne 0xf1a61
jmp 0xf1a93
movq 0x88(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x88(%rsp)
jmp 0xf19eb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb0(%rsp)
movl %eax, 0xac(%rsp)
jmp 0xf1c2c
movl 0x88(%rsp), %esi
leaq 0x68(%rsp), %rdi
callq 0xf6d20
jmp 0xf1aa6
leaq 0xb8(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x39930
jmp 0xf1aba
leaq 0x68(%rsp), %rdi
callq 0x332b0
movq 0xa0(%rsp), %rsi
addq 0x88(%rsp), %rsi
leaq 0xd8(%rsp), %rdi
callq 0xf6950
jmp 0xf1961
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb0(%rsp)
movl %eax, 0xac(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x332b0
jmp 0xf1c2c
leaq 0xb8(%rsp), %rdi
callq 0x54420
movb $0x0, 0x46(%rsp)
movb $0x0, 0x45(%rsp)
testb $0x1, %al
jne 0xf1b26
jmp 0xf1b3c
movq 0x28(%rsp), %rdi
movq 0xe8(%rsp), %rsi
callq 0x388d0
jmp 0xf1b3a
jmp 0xf1b92
leaq 0x47(%rsp), %rdx
movq %rdx, 0xf8(%rsp)
movq 0xf8(%rsp), %rax
movq %rax, 0x110(%rsp)
movb $0x1, 0x46(%rsp)
leaq 0x48(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
callq 0x353c0
jmp 0xf1b72
movq 0x28(%rsp), %rdi
movb $0x1, 0x45(%rsp)
leaq 0xb8(%rsp), %rsi
leaq 0x48(%rsp), %rdx
callq 0xf6ae0
jmp 0xf1b90
jmp 0xf1b92
testb $0x1, 0x45(%rsp)
jne 0xf1b9b
jmp 0xf1ba5
leaq 0x48(%rsp), %rdi
callq 0x332b0
testb $0x1, 0x46(%rsp)
jne 0xf1bae
jmp 0xf1bbb
leaq 0x47(%rsp), %rax
movq %rax, 0x100(%rsp)
leaq 0xb8(%rsp), %rdi
callq 0x332b0
movq 0x30(%rsp), %rax
addq $0x118, %rsp # imm = 0x118
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb0(%rsp)
movl %eax, 0xac(%rsp)
jmp 0xf1c14
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb0(%rsp)
movl %eax, 0xac(%rsp)
testb $0x1, 0x45(%rsp)
jne 0xf1c08
jmp 0xf1c12
leaq 0x48(%rsp), %rdi
callq 0x332b0
jmp 0xf1c14
testb $0x1, 0x46(%rsp)
jne 0xf1c1d
jmp 0xf1c2a
leaq 0x47(%rsp), %rax
movq %rax, 0x108(%rsp)
jmp 0xf1c2c
leaq 0xb8(%rsp), %rdi
callq 0x332b0
movq 0xb0(%rsp), %rdi
callq 0x16950
nopw %cs:(%rax,%rax)
| _ZN5Tools5transERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
sub rsp, 118h
mov [rsp+118h+var_F0], rdi
mov rax, rdi
mov [rsp+118h+var_E8], rax
mov [rsp+118h+var_28], rdi
mov [rsp+118h+var_30], rsi
mov rdi, [rsp+118h+var_30]
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEcvSt17basic_string_viewIcS2_EEv; std::string::operator std::string_view(void)
mov [rsp+118h+var_40], rax
mov [rsp+118h+var_38], rdx
lea rdi, [rsp+118h+var_60]
mov [rsp+118h+var_E0], rdi
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev; std::string::basic_string(void)
mov rdi, [rsp+118h+var_30]
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void)
mov rdi, [rsp+118h+var_E0]
mov rsi, rax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
jmp short $+2
loc_F195F:
jmp short $+2
loc_F1961:
lea rdi, [rsp+118h+var_40]
mov esi, 20h ; ' '
xor eax, eax
mov edx, eax
call _ZNKSt17basic_string_viewIcSt11char_traitsIcEE4findEcm; std::string_view::find(char,ulong)
mov [rsp+118h+var_78], rax
cmp rax, 0FFFFFFFFFFFFFFFFh
jz loc_F1B09
mov rdx, [rsp+118h+var_78]
xor eax, eax
mov esi, eax
lea rdi, [rsp+118h+var_40]
call _ZNKSt17basic_string_viewIcSt11char_traitsIcEE6substrEmm; std::string_view::substr(ulong,ulong)
mov [rsp+118h+var_100], rdx
mov [rsp+118h+var_F8], rax
jmp short $+2
loc_F19AE:
mov rax, [rsp+118h+var_100]
mov rcx, [rsp+118h+var_F8]
mov [rsp+118h+var_88], rcx
mov [rsp+118h+var_80], rax
lea rdi, [rsp+118h+var_60]
lea rsi, [rsp+118h+var_88]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendISt17basic_string_viewIcS2_EEENSt9enable_ifIXsr6__and_ISt14is_convertibleIRKT_S7_ESt6__not_IS9_IPSB_PKS4_EESE_IS9_ISC_PKcEEEE5valueERS4_E4typeESC_
jmp short $+2
loc_F19DF:
mov [rsp+118h+var_90], 0
loc_F19EB:
mov rax, [rsp+118h+var_78]
add rax, [rsp+118h+var_90]
mov [rsp+118h+var_110], rax
lea rdi, [rsp+118h+var_40]
call _ZNKSt17basic_string_viewIcSt11char_traitsIcEE4sizeEv; std::string_view::size(void)
mov rcx, [rsp+118h+var_110]
mov rdx, rax
xor eax, eax
cmp rcx, rdx
mov [rsp+118h+var_101], al
jnb short loc_F1A57
mov rsi, [rsp+118h+var_78]
mov rax, [rsp+118h+var_90]
add rsi, rax
lea rdi, [rsp+118h+var_40]
call _ZNKSt17basic_string_viewIcSt11char_traitsIcEE2atEm; std::string_view::at(ulong)
mov [rsp+118h+var_118], rax
jmp short $+2
loc_F1A46:
mov rax, [rsp+118h+var_118]
movsx eax, byte ptr [rax]
cmp eax, 20h ; ' '
setz al
mov [rsp+118h+var_101], al
loc_F1A57:
mov al, [rsp+118h+var_101]
test al, 1
jnz short loc_F1A61
jmp short loc_F1A93
loc_F1A61:
mov rax, [rsp+118h+var_90]
add rax, 1
mov [rsp+118h+var_90], rax
jmp loc_F19EB
mov rcx, rax
mov eax, edx
mov [rsp+arg_A8], rcx
mov [rsp+arg_A4], eax
jmp loc_F1C2C
loc_F1A93:
mov esi, dword ptr [rsp+118h+var_90]
lea rdi, [rsp+118h+var_B0]
call _ZN2Mv1rB5cxx11Ei; Mv::r(int)
jmp short $+2
loc_F1AA6:
lea rdi, [rsp+118h+var_60]
lea rsi, [rsp+118h+var_B0]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_; std::string::append(std::string const&)
jmp short $+2
loc_F1ABA:
lea rdi, [rsp+118h+var_B0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rsi, [rsp+118h+var_78]
add rsi, [rsp+118h+var_90]
lea rdi, [rsp+118h+var_40]
call _ZNSt17basic_string_viewIcSt11char_traitsIcEE13remove_prefixEm; std::string_view::remove_prefix(ulong)
jmp loc_F1961
mov rcx, rax
mov eax, edx
mov [rsp+arg_A8], rcx
mov [rsp+arg_A4], eax
lea rdi, [rsp+arg_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp loc_F1C2C
loc_F1B09:
lea rdi, [rsp+118h+var_60]
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
mov [rsp+118h+var_D2], 0
mov [rsp+118h+var_D3], 0
test al, 1
jnz short loc_F1B26
jmp short loc_F1B3C
loc_F1B26:
mov rdi, [rsp+118h+var_F0]
mov rsi, [rsp+118h+var_30]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&)
jmp short $+2
loc_F1B3A:
jmp short loc_F1B92
loc_F1B3C:
lea rdx, [rsp+118h+var_D1]
mov [rsp+118h+var_20], rdx
mov rax, [rsp+118h+var_20]
mov [rsp+118h+var_8], rax
mov [rsp+118h+var_D2], 1
lea rdi, [rsp+118h+var_D0]
lea rsi, [rsp+118h+var_40]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ISt17basic_string_viewIcS2_EvEERKT_RKS3_; std::string::basic_string<std::string_view,void>(std::string_view const&,std::allocator<char> const&)
jmp short $+2
loc_F1B72:
mov rdi, [rsp+118h+var_F0]
mov [rsp+118h+var_D3], 1
lea rsi, [rsp+118h+var_60]
lea rdx, [rsp+118h+var_D0]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_OS8_; std::operator+<char>(std::string const&,std::string&&)
jmp short $+2
loc_F1B90:
jmp short $+2
loc_F1B92:
test [rsp+118h+var_D3], 1
jnz short loc_F1B9B
jmp short loc_F1BA5
loc_F1B9B:
lea rdi, [rsp+118h+var_D0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_F1BA5:
test [rsp+118h+var_D2], 1
jnz short loc_F1BAE
jmp short loc_F1BBB
loc_F1BAE:
lea rax, [rsp+118h+var_D1]
mov [rsp+118h+var_18], rax
loc_F1BBB:
lea rdi, [rsp+118h+var_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rax, [rsp+118h+var_E8]
add rsp, 118h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_A8], rcx
mov [rsp+arg_A4], eax
jmp short loc_F1C14
mov rcx, rax
mov eax, edx
mov [rsp+arg_A8], rcx
mov [rsp+arg_A4], eax
test [rsp+arg_3D], 1
jnz short loc_F1C08
jmp short loc_F1C12
loc_F1C08:
lea rdi, [rsp+arg_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_F1C12:
jmp short $+2
loc_F1C14:
test [rsp+arg_3E], 1
jnz short loc_F1C1D
jmp short loc_F1C2A
loc_F1C1D:
lea rax, [rsp+arg_3F]
mov [rsp+arg_100], rax
loc_F1C2A:
jmp short $+2
loc_F1C2C:
lea rdi, [rsp+arg_B0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, [rsp+arg_A8]
call __Unwind_Resume
| long long Tools::trans(long long a1, long long a2)
{
unsigned long long v2; // rdx
unsigned long long v3; // rax
long long v4; // rax
long long v5; // rdx
unsigned long long v6; // rax
int v7; // r8d
int v8; // r9d
int v9; // ecx
int v10; // edx
_BYTE *v12; // [rsp+0h] [rbp-118h]
unsigned long long v13; // [rsp+8h] [rbp-110h]
int v14; // [rsp+10h] [rbp-108h]
bool v15; // [rsp+17h] [rbp-101h]
long long v16; // [rsp+18h] [rbp-100h]
char v17; // [rsp+20h] [rbp-F8h]
long long v18; // [rsp+28h] [rbp-F0h]
long long v19; // [rsp+30h] [rbp-E8h]
_QWORD *v20; // [rsp+38h] [rbp-E0h]
char v21; // [rsp+40h] [rbp-D8h]
char v22; // [rsp+45h] [rbp-D3h]
char v23; // [rsp+46h] [rbp-D2h]
char v24; // [rsp+47h] [rbp-D1h] BYREF
_BYTE v25[32]; // [rsp+48h] [rbp-D0h] BYREF
_BYTE v26[32]; // [rsp+68h] [rbp-B0h] BYREF
long long i; // [rsp+88h] [rbp-90h]
_QWORD v28[2]; // [rsp+90h] [rbp-88h] BYREF
long long v29; // [rsp+A0h] [rbp-78h]
_QWORD v30[4]; // [rsp+B8h] [rbp-60h] BYREF
unsigned long long v31[2]; // [rsp+D8h] [rbp-40h] BYREF
long long v32; // [rsp+E8h] [rbp-30h]
long long v33; // [rsp+F0h] [rbp-28h]
char *v34; // [rsp+F8h] [rbp-20h]
char *v35; // [rsp+100h] [rbp-18h]
char *v36; // [rsp+110h] [rbp-8h]
v18 = a1;
v19 = a1;
v33 = a1;
v32 = a2;
v31[0] = std::string::operator std::string_view(a2);
v31[1] = v2;
v20 = v30;
std::string::basic_string(v30);
v3 = std::string::size(v32);
std::string::reserve(v30, v3);
while ( 1 )
{
v29 = std::string_view::find(v31, 32, 0LL);
if ( v29 == -1 )
break;
v4 = std::string_view::substr(v31, 0LL, v29);
v16 = v5;
v17 = v4;
v28[0] = v4;
v28[1] = v5;
std::string::append<std::string_view>(v30, v28);
for ( i = 0LL; ; ++i )
{
v13 = i + v29;
v6 = std::string_view::size((long long)v31);
v9 = v13;
v10 = v6;
v15 = 0;
if ( v13 < v6 )
{
v12 = (_BYTE *)std::string_view::at(v31, i + v29);
v15 = *v12 == 32;
}
if ( !v15 )
break;
}
Mv::r[abi:cxx11]((unsigned int)v26, i, v10, v9, v7, v8, (_DWORD)v12, v13, v14, v16, v17, v18, v19, (_DWORD)v20, v21);
std::string::append((long long)v30, (long long)v26);
std::string::~string(v26);
std::string_view::remove_prefix(v31, i + v29);
}
v23 = 0;
v22 = 0;
if ( std::string::empty((long long)v30) )
{
std::string::basic_string(v18, v32);
}
else
{
v34 = &v24;
v36 = &v24;
v23 = 1;
std::string::basic_string<std::string_view,void>((long long)v25, v31, (long long)&v24);
v22 = 1;
std::operator+<char>(v18, v30, v25);
}
if ( (v22 & 1) != 0 )
std::string::~string(v25);
if ( (v23 & 1) != 0 )
v35 = &v24;
std::string::~string(v30);
return v19;
}
| trans:
SUB RSP,0x118
MOV qword ptr [RSP + 0x28],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x30],RAX
MOV qword ptr [RSP + 0xf0],RDI
MOV qword ptr [RSP + 0xe8],RSI
MOV RDI,qword ptr [RSP + 0xe8]
CALL 0x00168b70
MOV qword ptr [RSP + 0xd8],RAX
MOV qword ptr [RSP + 0xe0],RDX
LEA RDI,[RSP + 0xb8]
MOV qword ptr [RSP + 0x38],RDI
CALL 0x0013c220
MOV RDI,qword ptr [RSP + 0xe8]
CALL 0x001392f0
MOV RDI,qword ptr [RSP + 0x38]
MOV RSI,RAX
LAB_001f1958:
CALL 0x001393c0
JMP 0x001f195f
LAB_001f195f:
JMP 0x001f1961
LAB_001f1961:
LEA RDI,[RSP + 0xd8]
MOV ESI,0x20
XOR EAX,EAX
MOV EDX,EAX
CALL 0x001c75e0
MOV qword ptr [RSP + 0xa0],RAX
CMP RAX,-0x1
JZ 0x001f1b09
MOV RDX,qword ptr [RSP + 0xa0]
XOR EAX,EAX
MOV ESI,EAX
LEA RDI,[RSP + 0xd8]
CALL 0x001c7540
MOV qword ptr [RSP + 0x18],RDX
MOV qword ptr [RSP + 0x20],RAX
JMP 0x001f19ae
LAB_001f19ae:
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x90],RCX
MOV qword ptr [RSP + 0x98],RAX
LEA RDI,[RSP + 0xb8]
LEA RSI,[RSP + 0x90]
CALL 0x001f6c60
JMP 0x001f19df
LAB_001f19df:
MOV qword ptr [RSP + 0x88],0x0
LAB_001f19eb:
MOV RAX,qword ptr [RSP + 0xa0]
ADD RAX,qword ptr [RSP + 0x88]
MOV qword ptr [RSP + 0x8],RAX
LEA RDI,[RSP + 0xd8]
CALL 0x0013a2e0
MOV RCX,qword ptr [RSP + 0x8]
MOV RDX,RAX
XOR EAX,EAX
CMP RCX,RDX
MOV byte ptr [RSP + 0x17],AL
JNC 0x001f1a57
MOV RSI,qword ptr [RSP + 0xa0]
MOV RAX,qword ptr [RSP + 0x88]
ADD RSI,RAX
LEA RDI,[RSP + 0xd8]
CALL 0x001f6cc0
MOV qword ptr [RSP],RAX
JMP 0x001f1a46
LAB_001f1a46:
MOV RAX,qword ptr [RSP]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x20
SETZ AL
MOV byte ptr [RSP + 0x17],AL
LAB_001f1a57:
MOV AL,byte ptr [RSP + 0x17]
TEST AL,0x1
JNZ 0x001f1a61
JMP 0x001f1a93
LAB_001f1a61:
MOV RAX,qword ptr [RSP + 0x88]
ADD RAX,0x1
MOV qword ptr [RSP + 0x88],RAX
JMP 0x001f19eb
LAB_001f1a93:
MOV ESI,dword ptr [RSP + 0x88]
LEA RDI,[RSP + 0x68]
CALL 0x001f6d20
JMP 0x001f1aa6
LAB_001f1aa6:
LEA RDI,[RSP + 0xb8]
LEA RSI,[RSP + 0x68]
CALL 0x00139930
JMP 0x001f1aba
LAB_001f1aba:
LEA RDI,[RSP + 0x68]
CALL 0x001332b0
MOV RSI,qword ptr [RSP + 0xa0]
ADD RSI,qword ptr [RSP + 0x88]
LEA RDI,[RSP + 0xd8]
CALL 0x001f6950
JMP 0x001f1961
LAB_001f1b09:
LEA RDI,[RSP + 0xb8]
CALL 0x00154420
MOV byte ptr [RSP + 0x46],0x0
MOV byte ptr [RSP + 0x45],0x0
TEST AL,0x1
JNZ 0x001f1b26
JMP 0x001f1b3c
LAB_001f1b26:
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP + 0xe8]
LAB_001f1b33:
CALL 0x001388d0
JMP 0x001f1b3a
LAB_001f1b3a:
JMP 0x001f1b92
LAB_001f1b3c:
LEA RDX,[RSP + 0x47]
MOV qword ptr [RSP + 0xf8],RDX
MOV RAX,qword ptr [RSP + 0xf8]
MOV qword ptr [RSP + 0x110],RAX
MOV byte ptr [RSP + 0x46],0x1
LAB_001f1b5e:
LEA RDI,[RSP + 0x48]
LEA RSI,[RSP + 0xd8]
CALL 0x001353c0
JMP 0x001f1b72
LAB_001f1b72:
MOV RDI,qword ptr [RSP + 0x28]
MOV byte ptr [RSP + 0x45],0x1
LAB_001f1b7c:
LEA RSI,[RSP + 0xb8]
LEA RDX,[RSP + 0x48]
CALL 0x001f6ae0
LAB_001f1b8e:
JMP 0x001f1b90
LAB_001f1b90:
JMP 0x001f1b92
LAB_001f1b92:
TEST byte ptr [RSP + 0x45],0x1
JNZ 0x001f1b9b
JMP 0x001f1ba5
LAB_001f1b9b:
LEA RDI,[RSP + 0x48]
CALL 0x001332b0
LAB_001f1ba5:
TEST byte ptr [RSP + 0x46],0x1
JNZ 0x001f1bae
JMP 0x001f1bbb
LAB_001f1bae:
LEA RAX,[RSP + 0x47]
MOV qword ptr [RSP + 0x100],RAX
LAB_001f1bbb:
LEA RDI,[RSP + 0xb8]
CALL 0x001332b0
MOV RAX,qword ptr [RSP + 0x30]
ADD RSP,0x118
RET
|
/* Tools::trans(std::__cxx11::string const&) */
Tools * __thiscall Tools::trans(Tools *this,string *param_1)
{
ulong uVar1;
ulong uVar2;
char *pcVar3;
bool bVar4;
int1 auVar5 [16];
allocator local_d1;
string local_d0 [32];
Mv local_b0 [32];
long local_90;
int1 local_88 [16];
ulong local_78;
string local_60 [32];
basic_string_view<char,std::char_traits<char>> local_40 [16];
string *local_30;
Tools *local_28;
allocator *local_20;
allocator *local_18;
allocator *local_8;
local_30 = param_1;
local_28 = this;
local_40 = (basic_string_view<char,std::char_traits<char>> [16])
std::__cxx11::string::operator_cast_to_basic_string_view(param_1);
std::__cxx11::string::string(local_60);
uVar1 = std::__cxx11::string::size(local_30);
/* try { // try from 001f1958 to 001f1aa3 has its CatchHandler @ 001f1a7a */
std::__cxx11::string::reserve(local_60,uVar1);
while (local_78 = std::basic_string_view<char,std::char_traits<char>>::find(local_40,' ',0),
local_78 != 0xffffffffffffffff) {
auVar5 = std::basic_string_view<char,std::char_traits<char>>::substr(local_40,0,local_78);
local_88 = auVar5;
std::__cxx11::string::append<std::basic_string_view<char,std::char_traits<char>>>
(local_60,local_88);
local_90 = 0;
while( true ) {
uVar1 = local_78 + local_90;
uVar2 = std::basic_string_view<char,std::char_traits<char>>::size(local_40);
bVar4 = false;
if (uVar1 < uVar2) {
pcVar3 = (char *)std::basic_string_view<char,std::char_traits<char>>::at
(local_40,local_78 + local_90);
bVar4 = *pcVar3 == ' ';
}
if (!bVar4) break;
local_90 = local_90 + 1;
}
Mv::r_abi_cxx11_(local_b0,(int)local_90);
/* try { // try from 001f1aa6 to 001f1ab7 has its CatchHandler @ 001f1ae6 */
std::__cxx11::string::append(local_60,(string *)local_b0);
std::__cxx11::string::~string((string *)local_b0);
std::basic_string_view<char,std::char_traits<char>>::remove_prefix(local_40,local_78 + local_90)
;
}
uVar1 = std::__cxx11::string::empty(local_60);
if ((uVar1 & 1) == 0) {
local_20 = &local_d1;
/* try { // try from 001f1b5e to 001f1b6f has its CatchHandler @ 001f1bd5 */
local_8 = local_20;
std::__cxx11::string::string<std::basic_string_view<char,std::char_traits<char>>,void>
(local_d0,local_40,local_20);
/* try { // try from 001f1b7c to 001f1b8d has its CatchHandler @ 001f1beb */
std::operator+((string *)this,local_60);
std::__cxx11::string::~string(local_d0);
local_18 = &local_d1;
}
else {
/* try { // try from 001f1b33 to 001f1b37 has its CatchHandler @ 001f1a7a */
std::__cxx11::string::string((string *)this,local_30);
}
std::__cxx11::string::~string(local_60);
return this;
}
|
|
3,477 | mju_inertCom | aimrt_mujoco_sim/_deps/mujoco-src/src/engine/engine_util_spatial.c | void mju_inertCom(mjtNum res[10], const mjtNum inert[3], const mjtNum mat[9],
const mjtNum dif[3], mjtNum mass) {
// tmp = diag(inert) * mat' (mat is local-to-global rotation)
mjtNum tmp[9] = {mat[0]*inert[0], mat[3]*inert[0], mat[6]*inert[0],
mat[1]*inert[1], mat[4]*inert[1], mat[7]*inert[1],
mat[2]*inert[2], mat[5]*inert[2], mat[8]*inert[2]};
// res_rot = mat * diag(inert) * mat'
res[0] = mat[0]*tmp[0] + mat[1]*tmp[3] + mat[2]*tmp[6];
res[1] = mat[3]*tmp[1] + mat[4]*tmp[4] + mat[5]*tmp[7];
res[2] = mat[6]*tmp[2] + mat[7]*tmp[5] + mat[8]*tmp[8];
res[3] = mat[0]*tmp[1] + mat[1]*tmp[4] + mat[2]*tmp[7];
res[4] = mat[0]*tmp[2] + mat[1]*tmp[5] + mat[2]*tmp[8];
res[5] = mat[3]*tmp[2] + mat[4]*tmp[5] + mat[5]*tmp[8];
// res_rot -= mass * dif_cross * dif_cross
res[0] += mass*(dif[1]*dif[1] + dif[2]*dif[2]);
res[1] += mass*(dif[0]*dif[0] + dif[2]*dif[2]);
res[2] += mass*(dif[0]*dif[0] + dif[1]*dif[1]);
res[3] -= mass*dif[0]*dif[1];
res[4] -= mass*dif[0]*dif[2];
res[5] -= mass*dif[1]*dif[2];
// res_tran = mass * dif
res[6] = mass*dif[0];
res[7] = mass*dif[1];
res[8] = mass*dif[2];
// res_mass = mass
res[9] = mass;
} | O3 | c | mju_inertCom:
vmovsd (%rdx), %xmm1
vmovsd 0x8(%rdx), %xmm3
vmovsd (%rsi), %xmm2
vmovsd 0x8(%rsi), %xmm4
vmulsd %xmm2, %xmm1, %xmm5
vmulsd 0x18(%rdx), %xmm2, %xmm6
vmulsd 0x30(%rdx), %xmm2, %xmm2
vmulsd 0x20(%rdx), %xmm4, %xmm9
vmulsd 0x38(%rdx), %xmm4, %xmm7
vmulsd %xmm4, %xmm3, %xmm4
vmovsd 0x10(%rdx), %xmm10
vmovsd 0x10(%rsi), %xmm8
vmulsd %xmm8, %xmm10, %xmm11
vmulsd 0x28(%rdx), %xmm8, %xmm12
vmulsd 0x40(%rdx), %xmm8, %xmm8
vmulsd %xmm4, %xmm3, %xmm3
vmulsd %xmm5, %xmm1, %xmm1
vaddsd %xmm3, %xmm1, %xmm1
vmulsd %xmm11, %xmm10, %xmm3
vaddsd %xmm1, %xmm3, %xmm5
vmovsd %xmm5, (%rdi)
vmulsd 0x20(%rdx), %xmm9, %xmm1
vmulsd 0x18(%rdx), %xmm6, %xmm3
vaddsd %xmm1, %xmm3, %xmm1
vmulsd 0x28(%rdx), %xmm12, %xmm3
vaddsd %xmm1, %xmm3, %xmm3
vmovsd %xmm3, 0x8(%rdi)
vmulsd 0x38(%rdx), %xmm7, %xmm1
vmulsd 0x30(%rdx), %xmm2, %xmm4
vaddsd %xmm1, %xmm4, %xmm1
vmulsd 0x40(%rdx), %xmm8, %xmm4
vaddsd %xmm1, %xmm4, %xmm1
vmovsd %xmm1, 0x10(%rdi)
vmulsd 0x8(%rdx), %xmm9, %xmm4
vmulsd (%rdx), %xmm6, %xmm6
vaddsd %xmm4, %xmm6, %xmm4
vmulsd 0x10(%rdx), %xmm12, %xmm6
vaddsd %xmm4, %xmm6, %xmm4
vmovsd %xmm4, 0x18(%rdi)
vmulsd 0x8(%rdx), %xmm7, %xmm6
vmulsd (%rdx), %xmm2, %xmm9
vaddsd %xmm6, %xmm9, %xmm6
vmulsd 0x10(%rdx), %xmm8, %xmm9
vaddsd %xmm6, %xmm9, %xmm6
vmovsd %xmm6, 0x20(%rdi)
vmulsd 0x20(%rdx), %xmm7, %xmm7
vmulsd 0x18(%rdx), %xmm2, %xmm2
vaddsd %xmm7, %xmm2, %xmm2
vmulsd 0x28(%rdx), %xmm8, %xmm7
vaddsd %xmm2, %xmm7, %xmm2
vmovsd %xmm2, 0x28(%rdi)
vmovsd 0x8(%rcx), %xmm7
vmovsd 0x10(%rcx), %xmm8
vmulsd %xmm8, %xmm8, %xmm8
vmulsd %xmm7, %xmm7, %xmm7
vaddsd %xmm7, %xmm8, %xmm7
vmulsd %xmm7, %xmm0, %xmm7
vaddsd %xmm5, %xmm7, %xmm5
vmovsd %xmm5, (%rdi)
vmovsd (%rcx), %xmm5
vmovsd 0x10(%rcx), %xmm7
vmulsd %xmm7, %xmm7, %xmm7
vmulsd %xmm5, %xmm5, %xmm5
vaddsd %xmm7, %xmm5, %xmm5
vmulsd %xmm5, %xmm0, %xmm5
vaddsd %xmm3, %xmm5, %xmm3
vmovsd %xmm3, 0x8(%rdi)
vmovsd (%rcx), %xmm3
vmovsd 0x8(%rcx), %xmm5
vmulsd %xmm5, %xmm5, %xmm5
vmulsd %xmm3, %xmm3, %xmm3
vaddsd %xmm5, %xmm3, %xmm3
vmulsd %xmm3, %xmm0, %xmm3
vaddsd %xmm1, %xmm3, %xmm1
vmovsd %xmm1, 0x10(%rdi)
vmulsd (%rcx), %xmm0, %xmm1
vmulsd 0x8(%rcx), %xmm1, %xmm1
vsubsd %xmm1, %xmm4, %xmm1
vmovsd %xmm1, 0x18(%rdi)
vmulsd (%rcx), %xmm0, %xmm1
vmulsd 0x10(%rcx), %xmm1, %xmm1
vsubsd %xmm1, %xmm6, %xmm1
vmovsd %xmm1, 0x20(%rdi)
vmulsd 0x8(%rcx), %xmm0, %xmm1
vmulsd 0x10(%rcx), %xmm1, %xmm1
vsubsd %xmm1, %xmm2, %xmm1
vmovsd %xmm1, 0x28(%rdi)
vmulsd (%rcx), %xmm0, %xmm1
vmovsd %xmm1, 0x30(%rdi)
vmulsd 0x8(%rcx), %xmm0, %xmm1
vmovsd %xmm1, 0x38(%rdi)
vmulsd 0x10(%rcx), %xmm0, %xmm1
vmovsd %xmm1, 0x40(%rdi)
vmovsd %xmm0, 0x48(%rdi)
retq
| mju_inertCom:
vmovsd xmm1, qword ptr [rdx]
vmovsd xmm3, qword ptr [rdx+8]
vmovsd xmm2, qword ptr [rsi]
vmovsd xmm4, qword ptr [rsi+8]
vmulsd xmm5, xmm1, xmm2
vmulsd xmm6, xmm2, qword ptr [rdx+18h]
vmulsd xmm2, xmm2, qword ptr [rdx+30h]
vmulsd xmm9, xmm4, qword ptr [rdx+20h]
vmulsd xmm7, xmm4, qword ptr [rdx+38h]
vmulsd xmm4, xmm3, xmm4
vmovsd xmm10, qword ptr [rdx+10h]
vmovsd xmm8, qword ptr [rsi+10h]
vmulsd xmm11, xmm10, xmm8
vmulsd xmm12, xmm8, qword ptr [rdx+28h]
vmulsd xmm8, xmm8, qword ptr [rdx+40h]
vmulsd xmm3, xmm3, xmm4
vmulsd xmm1, xmm1, xmm5
vaddsd xmm1, xmm1, xmm3
vmulsd xmm3, xmm10, xmm11
vaddsd xmm5, xmm3, xmm1
vmovsd qword ptr [rdi], xmm5
vmulsd xmm1, xmm9, qword ptr [rdx+20h]
vmulsd xmm3, xmm6, qword ptr [rdx+18h]
vaddsd xmm1, xmm3, xmm1
vmulsd xmm3, xmm12, qword ptr [rdx+28h]
vaddsd xmm3, xmm3, xmm1
vmovsd qword ptr [rdi+8], xmm3
vmulsd xmm1, xmm7, qword ptr [rdx+38h]
vmulsd xmm4, xmm2, qword ptr [rdx+30h]
vaddsd xmm1, xmm4, xmm1
vmulsd xmm4, xmm8, qword ptr [rdx+40h]
vaddsd xmm1, xmm4, xmm1
vmovsd qword ptr [rdi+10h], xmm1
vmulsd xmm4, xmm9, qword ptr [rdx+8]
vmulsd xmm6, xmm6, qword ptr [rdx]
vaddsd xmm4, xmm6, xmm4
vmulsd xmm6, xmm12, qword ptr [rdx+10h]
vaddsd xmm4, xmm6, xmm4
vmovsd qword ptr [rdi+18h], xmm4
vmulsd xmm6, xmm7, qword ptr [rdx+8]
vmulsd xmm9, xmm2, qword ptr [rdx]
vaddsd xmm6, xmm9, xmm6
vmulsd xmm9, xmm8, qword ptr [rdx+10h]
vaddsd xmm6, xmm9, xmm6
vmovsd qword ptr [rdi+20h], xmm6
vmulsd xmm7, xmm7, qword ptr [rdx+20h]
vmulsd xmm2, xmm2, qword ptr [rdx+18h]
vaddsd xmm2, xmm2, xmm7
vmulsd xmm7, xmm8, qword ptr [rdx+28h]
vaddsd xmm2, xmm7, xmm2
vmovsd qword ptr [rdi+28h], xmm2
vmovsd xmm7, qword ptr [rcx+8]
vmovsd xmm8, qword ptr [rcx+10h]
vmulsd xmm8, xmm8, xmm8
vmulsd xmm7, xmm7, xmm7
vaddsd xmm7, xmm8, xmm7
vmulsd xmm7, xmm0, xmm7
vaddsd xmm5, xmm7, xmm5
vmovsd qword ptr [rdi], xmm5
vmovsd xmm5, qword ptr [rcx]
vmovsd xmm7, qword ptr [rcx+10h]
vmulsd xmm7, xmm7, xmm7
vmulsd xmm5, xmm5, xmm5
vaddsd xmm5, xmm5, xmm7
vmulsd xmm5, xmm0, xmm5
vaddsd xmm3, xmm5, xmm3
vmovsd qword ptr [rdi+8], xmm3
vmovsd xmm3, qword ptr [rcx]
vmovsd xmm5, qword ptr [rcx+8]
vmulsd xmm5, xmm5, xmm5
vmulsd xmm3, xmm3, xmm3
vaddsd xmm3, xmm3, xmm5
vmulsd xmm3, xmm0, xmm3
vaddsd xmm1, xmm3, xmm1
vmovsd qword ptr [rdi+10h], xmm1
vmulsd xmm1, xmm0, qword ptr [rcx]
vmulsd xmm1, xmm1, qword ptr [rcx+8]
vsubsd xmm1, xmm4, xmm1
vmovsd qword ptr [rdi+18h], xmm1
vmulsd xmm1, xmm0, qword ptr [rcx]
vmulsd xmm1, xmm1, qword ptr [rcx+10h]
vsubsd xmm1, xmm6, xmm1
vmovsd qword ptr [rdi+20h], xmm1
vmulsd xmm1, xmm0, qword ptr [rcx+8]
vmulsd xmm1, xmm1, qword ptr [rcx+10h]
vsubsd xmm1, xmm2, xmm1
vmovsd qword ptr [rdi+28h], xmm1
vmulsd xmm1, xmm0, qword ptr [rcx]
vmovsd qword ptr [rdi+30h], xmm1
vmulsd xmm1, xmm0, qword ptr [rcx+8]
vmovsd qword ptr [rdi+38h], xmm1
vmulsd xmm1, xmm0, qword ptr [rcx+10h]
vmovsd qword ptr [rdi+40h], xmm1
vmovsd qword ptr [rdi+48h], xmm0
retn
| void mju_inertCom(long long _RDI, long long _RSI, long long _RDX, long long _RCX, __m128 _XMM0)
{
__asm
{
vmovsd xmm1, qword ptr [rdx]
vmovsd xmm3, qword ptr [rdx+8]
vmovsd xmm2, qword ptr [rsi]
vmovsd xmm4, qword ptr [rsi+8]
vmulsd xmm5, xmm1, xmm2
vmulsd xmm6, xmm2, qword ptr [rdx+18h]
vmulsd xmm2, xmm2, qword ptr [rdx+30h]
vmulsd xmm9, xmm4, qword ptr [rdx+20h]
vmulsd xmm7, xmm4, qword ptr [rdx+38h]
vmulsd xmm4, xmm3, xmm4
vmovsd xmm10, qword ptr [rdx+10h]
vmovsd xmm8, qword ptr [rsi+10h]
vmulsd xmm11, xmm10, xmm8
vmulsd xmm12, xmm8, qword ptr [rdx+28h]
vmulsd xmm8, xmm8, qword ptr [rdx+40h]
vmulsd xmm3, xmm3, xmm4
vmulsd xmm1, xmm1, xmm5
vaddsd xmm1, xmm1, xmm3
vmulsd xmm3, xmm10, xmm11
vaddsd xmm5, xmm3, xmm1
vmovsd qword ptr [rdi], xmm5
vmulsd xmm1, xmm9, qword ptr [rdx+20h]
vmulsd xmm3, xmm6, qword ptr [rdx+18h]
vaddsd xmm1, xmm3, xmm1
vmulsd xmm3, xmm12, qword ptr [rdx+28h]
vaddsd xmm3, xmm3, xmm1
vmovsd qword ptr [rdi+8], xmm3
vmulsd xmm1, xmm7, qword ptr [rdx+38h]
vmulsd xmm4, xmm2, qword ptr [rdx+30h]
vaddsd xmm1, xmm4, xmm1
vmulsd xmm4, xmm8, qword ptr [rdx+40h]
vaddsd xmm1, xmm4, xmm1
vmovsd qword ptr [rdi+10h], xmm1
vmulsd xmm4, xmm9, qword ptr [rdx+8]
vmulsd xmm6, xmm6, qword ptr [rdx]
vaddsd xmm4, xmm6, xmm4
vmulsd xmm6, xmm12, qword ptr [rdx+10h]
vaddsd xmm4, xmm6, xmm4
vmovsd qword ptr [rdi+18h], xmm4
vmulsd xmm6, xmm7, qword ptr [rdx+8]
vmulsd xmm9, xmm2, qword ptr [rdx]
vaddsd xmm6, xmm9, xmm6
vmulsd xmm9, xmm8, qword ptr [rdx+10h]
vaddsd xmm6, xmm9, xmm6
vmovsd qword ptr [rdi+20h], xmm6
vmulsd xmm7, xmm7, qword ptr [rdx+20h]
vmulsd xmm2, xmm2, qword ptr [rdx+18h]
vaddsd xmm2, xmm2, xmm7
vmulsd xmm7, xmm8, qword ptr [rdx+28h]
vaddsd xmm2, xmm7, xmm2
vmovsd qword ptr [rdi+28h], xmm2
vmovsd xmm7, qword ptr [rcx+8]
vmovsd xmm8, qword ptr [rcx+10h]
vmulsd xmm8, xmm8, xmm8
vmulsd xmm7, xmm7, xmm7
vaddsd xmm7, xmm8, xmm7
vmulsd xmm7, xmm0, xmm7
vaddsd xmm5, xmm7, xmm5
vmovsd qword ptr [rdi], xmm5
vmovsd xmm5, qword ptr [rcx]
vmovsd xmm7, qword ptr [rcx+10h]
vmulsd xmm7, xmm7, xmm7
vmulsd xmm5, xmm5, xmm5
vaddsd xmm5, xmm5, xmm7
vmulsd xmm5, xmm0, xmm5
vaddsd xmm3, xmm5, xmm3
vmovsd qword ptr [rdi+8], xmm3
vmovsd xmm3, qword ptr [rcx]
vmovsd xmm5, qword ptr [rcx+8]
vmulsd xmm5, xmm5, xmm5
vmulsd xmm3, xmm3, xmm3
vaddsd xmm3, xmm3, xmm5
vmulsd xmm3, xmm0, xmm3
vaddsd xmm1, xmm3, xmm1
vmovsd qword ptr [rdi+10h], xmm1
vmulsd xmm1, xmm0, qword ptr [rcx]
vmulsd xmm1, xmm1, qword ptr [rcx+8]
vsubsd xmm1, xmm4, xmm1
vmovsd qword ptr [rdi+18h], xmm1
vmulsd xmm1, xmm0, qword ptr [rcx]
vmulsd xmm1, xmm1, qword ptr [rcx+10h]
vsubsd xmm1, xmm6, xmm1
vmovsd qword ptr [rdi+20h], xmm1
vmulsd xmm1, xmm0, qword ptr [rcx+8]
vmulsd xmm1, xmm1, qword ptr [rcx+10h]
vsubsd xmm1, xmm2, xmm1
vmovsd qword ptr [rdi+28h], xmm1
vmulsd xmm1, xmm0, qword ptr [rcx]
vmovsd qword ptr [rdi+30h], xmm1
vmulsd xmm1, xmm0, qword ptr [rcx+8]
vmovsd qword ptr [rdi+38h], xmm1
vmulsd xmm1, xmm0, qword ptr [rcx+10h]
vmovsd qword ptr [rdi+40h], xmm1
vmovsd qword ptr [rdi+48h], xmm0
}
}
| mju_inertCom:
VMOVSD XMM1,qword ptr [RDX]
VMOVSD XMM3,qword ptr [RDX + 0x8]
VMOVSD XMM2,qword ptr [RSI]
VMOVSD XMM4,qword ptr [RSI + 0x8]
VMULSD XMM5,XMM1,XMM2
VMULSD XMM6,XMM2,qword ptr [RDX + 0x18]
VMULSD XMM2,XMM2,qword ptr [RDX + 0x30]
VMULSD XMM9,XMM4,qword ptr [RDX + 0x20]
VMULSD XMM7,XMM4,qword ptr [RDX + 0x38]
VMULSD XMM4,XMM3,XMM4
VMOVSD XMM10,qword ptr [RDX + 0x10]
VMOVSD XMM8,qword ptr [RSI + 0x10]
VMULSD XMM11,XMM10,XMM8
VMULSD XMM12,XMM8,qword ptr [RDX + 0x28]
VMULSD XMM8,XMM8,qword ptr [RDX + 0x40]
VMULSD XMM3,XMM3,XMM4
VMULSD XMM1,XMM1,XMM5
VADDSD XMM1,XMM1,XMM3
VMULSD XMM3,XMM10,XMM11
VADDSD XMM5,XMM3,XMM1
VMOVSD qword ptr [RDI],XMM5
VMULSD XMM1,XMM9,qword ptr [RDX + 0x20]
VMULSD XMM3,XMM6,qword ptr [RDX + 0x18]
VADDSD XMM1,XMM3,XMM1
VMULSD XMM3,XMM12,qword ptr [RDX + 0x28]
VADDSD XMM3,XMM3,XMM1
VMOVSD qword ptr [RDI + 0x8],XMM3
VMULSD XMM1,XMM7,qword ptr [RDX + 0x38]
VMULSD XMM4,XMM2,qword ptr [RDX + 0x30]
VADDSD XMM1,XMM4,XMM1
VMULSD XMM4,XMM8,qword ptr [RDX + 0x40]
VADDSD XMM1,XMM4,XMM1
VMOVSD qword ptr [RDI + 0x10],XMM1
VMULSD XMM4,XMM9,qword ptr [RDX + 0x8]
VMULSD XMM6,XMM6,qword ptr [RDX]
VADDSD XMM4,XMM6,XMM4
VMULSD XMM6,XMM12,qword ptr [RDX + 0x10]
VADDSD XMM4,XMM6,XMM4
VMOVSD qword ptr [RDI + 0x18],XMM4
VMULSD XMM6,XMM7,qword ptr [RDX + 0x8]
VMULSD XMM9,XMM2,qword ptr [RDX]
VADDSD XMM6,XMM9,XMM6
VMULSD XMM9,XMM8,qword ptr [RDX + 0x10]
VADDSD XMM6,XMM9,XMM6
VMOVSD qword ptr [RDI + 0x20],XMM6
VMULSD XMM7,XMM7,qword ptr [RDX + 0x20]
VMULSD XMM2,XMM2,qword ptr [RDX + 0x18]
VADDSD XMM2,XMM2,XMM7
VMULSD XMM7,XMM8,qword ptr [RDX + 0x28]
VADDSD XMM2,XMM7,XMM2
VMOVSD qword ptr [RDI + 0x28],XMM2
VMOVSD XMM7,qword ptr [RCX + 0x8]
VMOVSD XMM8,qword ptr [RCX + 0x10]
VMULSD XMM8,XMM8,XMM8
VMULSD XMM7,XMM7,XMM7
VADDSD XMM7,XMM8,XMM7
VMULSD XMM7,XMM0,XMM7
VADDSD XMM5,XMM7,XMM5
VMOVSD qword ptr [RDI],XMM5
VMOVSD XMM5,qword ptr [RCX]
VMOVSD XMM7,qword ptr [RCX + 0x10]
VMULSD XMM7,XMM7,XMM7
VMULSD XMM5,XMM5,XMM5
VADDSD XMM5,XMM5,XMM7
VMULSD XMM5,XMM0,XMM5
VADDSD XMM3,XMM5,XMM3
VMOVSD qword ptr [RDI + 0x8],XMM3
VMOVSD XMM3,qword ptr [RCX]
VMOVSD XMM5,qword ptr [RCX + 0x8]
VMULSD XMM5,XMM5,XMM5
VMULSD XMM3,XMM3,XMM3
VADDSD XMM3,XMM3,XMM5
VMULSD XMM3,XMM0,XMM3
VADDSD XMM1,XMM3,XMM1
VMOVSD qword ptr [RDI + 0x10],XMM1
VMULSD XMM1,XMM0,qword ptr [RCX]
VMULSD XMM1,XMM1,qword ptr [RCX + 0x8]
VSUBSD XMM1,XMM4,XMM1
VMOVSD qword ptr [RDI + 0x18],XMM1
VMULSD XMM1,XMM0,qword ptr [RCX]
VMULSD XMM1,XMM1,qword ptr [RCX + 0x10]
VSUBSD XMM1,XMM6,XMM1
VMOVSD qword ptr [RDI + 0x20],XMM1
VMULSD XMM1,XMM0,qword ptr [RCX + 0x8]
VMULSD XMM1,XMM1,qword ptr [RCX + 0x10]
VSUBSD XMM1,XMM2,XMM1
VMOVSD qword ptr [RDI + 0x28],XMM1
VMULSD XMM1,XMM0,qword ptr [RCX]
VMOVSD qword ptr [RDI + 0x30],XMM1
VMULSD XMM1,XMM0,qword ptr [RCX + 0x8]
VMOVSD qword ptr [RDI + 0x38],XMM1
VMULSD XMM1,XMM0,qword ptr [RCX + 0x10]
VMOVSD qword ptr [RDI + 0x40],XMM1
VMOVSD qword ptr [RDI + 0x48],XMM0
RET
|
void mju_inertCom(double param_1,double *param_2,double *param_3,double *param_4,double *param_5)
{
double dVar1;
double dVar2;
double dVar3;
double dVar4;
double dVar5;
double dVar6;
double dVar7;
double dVar8;
double dVar9;
double dVar10;
double dVar11;
double dVar12;
dVar1 = *param_3;
dVar2 = param_3[1];
dVar3 = param_4[3];
dVar10 = dVar1 * param_4[6];
dVar4 = param_4[4];
dVar11 = dVar2 * param_4[7];
dVar5 = param_3[2];
dVar6 = param_4[5];
dVar12 = dVar5 * param_4[8];
dVar7 = param_4[2] * param_4[2] * dVar5 +
*param_4 * *param_4 * dVar1 + param_4[1] * param_4[1] * dVar2;
*param_2 = dVar7;
dVar8 = dVar5 * dVar6 * param_4[5] + dVar1 * dVar3 * param_4[3] + dVar2 * dVar4 * param_4[4];
param_2[1] = dVar8;
dVar9 = dVar12 * param_4[8] + dVar10 * param_4[6] + dVar11 * param_4[7];
param_2[2] = dVar9;
dVar1 = dVar5 * dVar6 * param_4[2] + dVar1 * dVar3 * *param_4 + dVar2 * dVar4 * param_4[1];
param_2[3] = dVar1;
dVar2 = dVar12 * param_4[2] + dVar10 * *param_4 + dVar11 * param_4[1];
param_2[4] = dVar2;
dVar3 = dVar12 * param_4[5] + dVar10 * param_4[3] + dVar11 * param_4[4];
param_2[5] = dVar3;
*param_2 = param_1 * (param_5[2] * param_5[2] + param_5[1] * param_5[1]) + dVar7;
param_2[1] = param_1 * (*param_5 * *param_5 + param_5[2] * param_5[2]) + dVar8;
param_2[2] = param_1 * (*param_5 * *param_5 + param_5[1] * param_5[1]) + dVar9;
param_2[3] = dVar1 - param_1 * *param_5 * param_5[1];
param_2[4] = dVar2 - param_1 * *param_5 * param_5[2];
param_2[5] = dVar3 - param_1 * param_5[1] * param_5[2];
param_2[6] = param_1 * *param_5;
param_2[7] = param_1 * param_5[1];
param_2[8] = param_1 * param_5[2];
param_2[9] = param_1;
return;
}
|
|
3,478 | LefDefParser::defiTimingDisable::setMacroFromTo(char const*, char const*) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiTimingDisable.cpp | void defiTimingDisable::setMacroFromTo(const char* fromPin, const char* toPin) {
int len;
clear();
hasFromTo_ = 1;
len = strlen(fromPin) + 1;
if (len > fromPinLength_) {
if (fromPin_) free(fromPin_);
fromPinLength_ = len;
fromPin_ = (char*)malloc(len);
}
strcpy(fromPin_,defData->DEFCASE(fromPin));
len = strlen(toPin) + 1;
if (len > toPinLength_) {
if (toPin_) free(toPin_);
toPinLength_ = len;
toPin_ = (char*)malloc(len);
}
strcpy(toPin_,defData->DEFCASE(toPin));
} | O3 | cpp | LefDefParser::defiTimingDisable::setMacroFromTo(char const*, char const*):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movl $0x0, 0x48(%rdi)
movq $0x0, 0x40(%rdi)
movl $0x1, 0x3c(%rdi)
movq %rsi, %rdi
callq 0x70d0
movq %rax, %r13
incl %r13d
movq 0x20(%r14), %r12
cmpl 0x28(%r14), %r13d
jle 0x15d2e
testq %r12, %r12
je 0x15d1b
movq %r12, %rdi
callq 0x7220
movl %r13d, 0x28(%r14)
movslq %r13d, %rdi
callq 0x7270
movq %rax, %r12
movq %rax, 0x20(%r14)
movq 0x50(%r14), %rdi
movq %r15, %rsi
callq 0x1b638
movq %r12, %rdi
movq %rax, %rsi
callq 0x7190
movq %rbx, %rdi
callq 0x70d0
movq %rax, %r12
incl %r12d
movq 0x30(%r14), %r15
cmpl 0x38(%r14), %r12d
jle 0x15d7d
testq %r15, %r15
je 0x15d6a
movq %r15, %rdi
callq 0x7220
movl %r12d, 0x38(%r14)
movslq %r12d, %rdi
callq 0x7270
movq %rax, %r15
movq %rax, 0x30(%r14)
movq 0x50(%r14), %rdi
movq %rbx, %rsi
callq 0x1b638
movq %r15, %rdi
movq %rax, %rsi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x7190
nop
| _ZN12LefDefParser17defiTimingDisable14setMacroFromToEPKcS2_:
push r15
push r14
push r13
push r12
push rbx
mov rbx, rdx
mov r15, rsi
mov r14, rdi
mov dword ptr [rdi+48h], 0
mov qword ptr [rdi+40h], 0
mov dword ptr [rdi+3Ch], 1
mov rdi, rsi
call _strlen
mov r13, rax
inc r13d
mov r12, [r14+20h]
cmp r13d, [r14+28h]
jle short loc_15D2E
test r12, r12
jz short loc_15D1B
mov rdi, r12
call _free
loc_15D1B:
mov [r14+28h], r13d
movsxd rdi, r13d
call _malloc
mov r12, rax
mov [r14+20h], rax
loc_15D2E:
mov rdi, [r14+50h]; this
mov rsi, r15; char *
call _ZN12LefDefParser8defrData7DEFCASEEPKc; LefDefParser::defrData::DEFCASE(char const*)
mov rdi, r12
mov rsi, rax
call _strcpy
mov rdi, rbx
call _strlen
mov r12, rax
inc r12d
mov r15, [r14+30h]
cmp r12d, [r14+38h]
jle short loc_15D7D
test r15, r15
jz short loc_15D6A
mov rdi, r15
call _free
loc_15D6A:
mov [r14+38h], r12d
movsxd rdi, r12d
call _malloc
mov r15, rax
mov [r14+30h], rax
loc_15D7D:
mov rdi, [r14+50h]; this
mov rsi, rbx; char *
call _ZN12LefDefParser8defrData7DEFCASEEPKc; LefDefParser::defrData::DEFCASE(char const*)
mov rdi, r15
mov rsi, rax
pop rbx
pop r12
pop r13
pop r14
pop r15
jmp _strcpy
| long long LefDefParser::defiTimingDisable::setMacroFromTo(
LefDefParser::defiTimingDisable *this,
const char *a2,
const char *a3)
{
int v4; // r13d
long long v5; // r12
long long v6; // rax
int v7; // r12d
long long v8; // r15
long long v9; // rax
*((_DWORD *)this + 18) = 0;
*((_QWORD *)this + 8) = 0LL;
*((_DWORD *)this + 15) = 1;
v4 = strlen(a2) + 1;
v5 = *((_QWORD *)this + 4);
if ( v4 > *((_DWORD *)this + 10) )
{
if ( v5 )
free(*((void **)this + 4));
*((_DWORD *)this + 10) = v4;
v5 = malloc(v4);
*((_QWORD *)this + 4) = v5;
}
v6 = LefDefParser::defrData::DEFCASE(*((LefDefParser::defrData **)this + 10), a2);
strcpy(v5, v6);
v7 = strlen(a3) + 1;
v8 = *((_QWORD *)this + 6);
if ( v7 > *((_DWORD *)this + 14) )
{
if ( v8 )
free(*((void **)this + 6));
*((_DWORD *)this + 14) = v7;
v8 = malloc(v7);
*((_QWORD *)this + 6) = v8;
}
v9 = LefDefParser::defrData::DEFCASE(*((LefDefParser::defrData **)this + 10), a3);
return strcpy(v8, v9);
}
| setMacroFromTo:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV RBX,RDX
MOV R15,RSI
MOV R14,RDI
MOV dword ptr [RDI + 0x48],0x0
MOV qword ptr [RDI + 0x40],0x0
MOV dword ptr [RDI + 0x3c],0x1
MOV RDI,RSI
CALL 0x001070d0
MOV R13,RAX
INC R13D
MOV R12,qword ptr [R14 + 0x20]
CMP R13D,dword ptr [R14 + 0x28]
JLE 0x00115d2e
TEST R12,R12
JZ 0x00115d1b
MOV RDI,R12
CALL 0x00107220
LAB_00115d1b:
MOV dword ptr [R14 + 0x28],R13D
MOVSXD RDI,R13D
CALL 0x00107270
MOV R12,RAX
MOV qword ptr [R14 + 0x20],RAX
LAB_00115d2e:
MOV RDI,qword ptr [R14 + 0x50]
MOV RSI,R15
CALL 0x0011b638
MOV RDI,R12
MOV RSI,RAX
CALL 0x00107190
MOV RDI,RBX
CALL 0x001070d0
MOV R12,RAX
INC R12D
MOV R15,qword ptr [R14 + 0x30]
CMP R12D,dword ptr [R14 + 0x38]
JLE 0x00115d7d
TEST R15,R15
JZ 0x00115d6a
MOV RDI,R15
CALL 0x00107220
LAB_00115d6a:
MOV dword ptr [R14 + 0x38],R12D
MOVSXD RDI,R12D
CALL 0x00107270
MOV R15,RAX
MOV qword ptr [R14 + 0x30],RAX
LAB_00115d7d:
MOV RDI,qword ptr [R14 + 0x50]
MOV RSI,RBX
CALL 0x0011b638
MOV RDI,R15
MOV RSI,RAX
POP RBX
POP R12
POP R13
POP R14
POP R15
JMP 0x00107190
|
/* LefDefParser::defiTimingDisable::setMacroFromTo(char const*, char const*) */
void __thiscall
LefDefParser::defiTimingDisable::setMacroFromTo(defiTimingDisable *this,char *param_1,char *param_2)
{
size_t sVar1;
char *pcVar2;
char *pcVar3;
int iVar4;
*(int4 *)(this + 0x48) = 0;
*(int8 *)(this + 0x40) = 0;
*(int4 *)(this + 0x3c) = 1;
sVar1 = strlen(param_1);
iVar4 = (int)sVar1 + 1;
pcVar2 = *(char **)(this + 0x20);
if (*(int *)(this + 0x28) < iVar4) {
if (pcVar2 != (char *)0x0) {
free(pcVar2);
}
*(int *)(this + 0x28) = iVar4;
pcVar2 = (char *)malloc((long)iVar4);
*(char **)(this + 0x20) = pcVar2;
}
pcVar3 = (char *)defrData::DEFCASE(*(defrData **)(this + 0x50),param_1);
strcpy(pcVar2,pcVar3);
sVar1 = strlen(param_2);
iVar4 = (int)sVar1 + 1;
pcVar2 = *(char **)(this + 0x30);
if (*(int *)(this + 0x38) < iVar4) {
if (pcVar2 != (char *)0x0) {
free(pcVar2);
}
*(int *)(this + 0x38) = iVar4;
pcVar2 = (char *)malloc((long)iVar4);
*(char **)(this + 0x30) = pcVar2;
}
pcVar3 = (char *)defrData::DEFCASE(*(defrData **)(this + 0x50),param_2);
strcpy(pcVar2,pcVar3);
return;
}
|
|
3,479 | fct_update_cond_derived_flags(PFS_cond*) | eloqsql/storage/perfschema/pfs_instr.cc | static void fct_update_cond_derived_flags(PFS_cond *pfs)
{
PFS_cond_class *klass= sanitize_cond_class(pfs->m_class);
if (likely(klass != NULL))
{
pfs->m_enabled= klass->m_enabled && flag_global_instrumentation;
pfs->m_timed= klass->m_timed;
}
else
{
pfs->m_enabled= false;
pfs->m_timed= false;
}
} | O0 | cpp | fct_update_cond_derived_flags(PFS_cond*):
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x2e940
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x3d19a
movq -0x10(%rbp), %rcx
xorl %eax, %eax
testb $0x1, 0x4(%rcx)
movb %al, -0x11(%rbp)
je 0x3d17a
leaq 0x3d3e0b(%rip), %rax # 0x410f80
movb (%rax), %al
movb %al, -0x11(%rbp)
movb -0x11(%rbp), %cl
movq -0x8(%rbp), %rax
andb $0x1, %cl
movb %cl, 0x4(%rax)
movq -0x10(%rbp), %rax
movb 0x5(%rax), %cl
movq -0x8(%rbp), %rax
andb $0x1, %cl
movb %cl, 0x5(%rax)
jmp 0x3d1aa
movq -0x8(%rbp), %rax
movb $0x0, 0x4(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x5(%rax)
addq $0x20, %rsp
popq %rbp
retq
| _ZL29fct_update_cond_derived_flagsP8PFS_cond:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov rdi, [rax+18h]
call _Z19sanitize_cond_classP14PFS_cond_class; sanitize_cond_class(PFS_cond_class *)
mov [rbp+var_10], rax
cmp [rbp+var_10], 0
setnz al
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_3D19A
mov rcx, [rbp+var_10]
xor eax, eax
test byte ptr [rcx+4], 1
mov [rbp+var_11], al
jz short loc_3D17A
lea rax, flag_global_instrumentation
mov al, [rax]
mov [rbp+var_11], al
loc_3D17A:
mov cl, [rbp+var_11]
mov rax, [rbp+var_8]
and cl, 1
mov [rax+4], cl
mov rax, [rbp+var_10]
mov cl, [rax+5]
mov rax, [rbp+var_8]
and cl, 1
mov [rax+5], cl
jmp short loc_3D1AA
loc_3D19A:
mov rax, [rbp+var_8]
mov byte ptr [rax+4], 0
mov rax, [rbp+var_8]
mov byte ptr [rax+5], 0
loc_3D1AA:
add rsp, 20h
pop rbp
retn
| long long fct_update_cond_derived_flags(long long a1)
{
long long result; // rax
char v2; // [rsp+Fh] [rbp-11h]
unsigned long long v3; // [rsp+10h] [rbp-10h]
v3 = sanitize_cond_class(*(_QWORD *)(a1 + 24));
if ( v3 )
{
v2 = 0;
if ( (*(_BYTE *)(v3 + 4) & 1) != 0 )
v2 = flag_global_instrumentation;
*(_BYTE *)(a1 + 4) = v2 & 1;
result = a1;
*(_BYTE *)(a1 + 5) = *(_BYTE *)(v3 + 5) & 1;
}
else
{
*(_BYTE *)(a1 + 4) = 0;
result = a1;
*(_BYTE *)(a1 + 5) = 0;
}
return result;
}
| fct_update_cond_derived_flags:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x18]
CALL 0x0012e940
MOV qword ptr [RBP + -0x10],RAX
CMP qword ptr [RBP + -0x10],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x0013d19a
MOV RCX,qword ptr [RBP + -0x10]
XOR EAX,EAX
TEST byte ptr [RCX + 0x4],0x1
MOV byte ptr [RBP + -0x11],AL
JZ 0x0013d17a
LEA RAX,[0x510f80]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x11],AL
LAB_0013d17a:
MOV CL,byte ptr [RBP + -0x11]
MOV RAX,qword ptr [RBP + -0x8]
AND CL,0x1
MOV byte ptr [RAX + 0x4],CL
MOV RAX,qword ptr [RBP + -0x10]
MOV CL,byte ptr [RAX + 0x5]
MOV RAX,qword ptr [RBP + -0x8]
AND CL,0x1
MOV byte ptr [RAX + 0x5],CL
JMP 0x0013d1aa
LAB_0013d19a:
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x4],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x5],0x0
LAB_0013d1aa:
ADD RSP,0x20
POP RBP
RET
|
/* fct_update_cond_derived_flags(PFS_cond*) */
void fct_update_cond_derived_flags(PFS_cond *param_1)
{
long lVar1;
byte local_19;
lVar1 = sanitize_cond_class(*(PFS_cond_class **)(param_1 + 0x18));
if (lVar1 == 0) {
param_1[4] = (PFS_cond)0x0;
param_1[5] = (PFS_cond)0x0;
}
else {
local_19 = 0;
if ((*(byte *)(lVar1 + 4) & 1) != 0) {
local_19 = flag_global_instrumentation;
}
param_1[4] = (PFS_cond)(local_19 & 1);
param_1[5] = (PFS_cond)(*(byte *)(lVar1 + 5) & 1);
}
return;
}
|
|
3,480 | llama_state_get_size | monkey531[P]llama/src/llama-context.cpp | size_t llama_state_get_size(struct llama_context * ctx) {
llama_data_write_dummy data_ctx;
try {
return llama_state_get_data_internal(ctx, data_ctx);
} catch (const std::exception & err) {
LLAMA_LOG_ERROR("%s: error getting state size: %s\n", __func__, err.what());
return 0;
}
} | O3 | cpp | llama_state_get_size:
pushq %rbx
subq $0x10, %rsp
movq 0xbdd1c(%rip), %rax # 0x15cb78
addq $0x10, %rax
movq %rsp, %rsi
movq %rax, (%rsi)
movq $0x0, 0x8(%rsi)
callq 0x9f34c
addq $0x10, %rsp
popq %rbx
retq
movq %rax, %rbx
cmpl $0x1, %edx
jne 0x9eec0
movq %rbx, %rdi
callq 0x65780
movq (%rax), %rcx
movq %rax, %rdi
callq *0x10(%rcx)
leaq 0x75af9(%rip), %rsi # 0x114992
leaq 0x75b14(%rip), %rdx # 0x1149b4
movl $0x4, %edi
movq %rax, %rcx
xorl %eax, %eax
callq 0x67d20
callq 0x6ab40
xorl %eax, %eax
jmp 0x9ee73
movq %rax, %rbx
callq 0x6ab40
movq %rbx, %rdi
callq 0x6b5d0
movq %rax, %rdi
callq 0x76683
| llama_state_get_size:
push rbx
sub rsp, 10h
mov rax, cs:_ZTV22llama_data_write_dummy_ptr
add rax, 10h
mov rsi, rsp; this
mov [rsi], rax
mov qword ptr [rsi+8], 0
call _ZL29llama_state_get_data_internalP13llama_contextR16llama_data_write; llama_state_get_data_internal(llama_context *,llama_data_write &)
loc_9EE73:
add rsp, 10h
pop rbx
retn
mov rbx, rax
cmp edx, 1
jnz short loc_9EEC0
mov rdi, rbx; void *
call ___cxa_begin_catch
mov rcx, [rax]
mov rdi, rax
call qword ptr [rcx+10h]
lea rsi, aSErrorGettingS; "%s: error getting state size: %s\n"
lea rdx, aLlamaStateGetS_0; "llama_state_get_size"
mov edi, 4
mov rcx, rax
xor eax, eax
call __Z18llama_log_internal14ggml_log_levelPKcz; llama_log_internal(ggml_log_level,char const*,...)
call ___cxa_end_catch
xor eax, eax
jmp short loc_9EE73
mov rbx, rax
call ___cxa_end_catch
loc_9EEC0:
mov rdi, rbx
call __Unwind_Resume
mov rdi, rax
call __clang_call_terminate
| long long llama_state_get_size(llama_context *a1)
{
_QWORD v2[3]; // [rsp+0h] [rbp-18h] BYREF
v2[0] = &`vtable for'llama_data_write_dummy + 2;
v2[1] = 0LL;
return llama_state_get_data_internal(a1, (llama_data_write *)v2);
}
| llama_state_get_size:
PUSH RBX
SUB RSP,0x10
MOV RAX,qword ptr [0x0025cb78]
ADD RAX,0x10
MOV RSI,RSP
MOV qword ptr [RSI],RAX
MOV qword ptr [RSI + 0x8],0x0
LAB_0019ee6e:
CALL 0x0019f34c
LAB_0019ee73:
ADD RSP,0x10
POP RBX
RET
|
void llama_state_get_size(llama_context *param_1)
{
int *local_18;
int8 local_10;
local_18 = PTR_vtable_0025cb78 + 0x10;
local_10 = 0;
/* try { // try from 0019ee6e to 0019ee72 has its CatchHandler @ 0019ee79 */
llama_state_get_data_internal(param_1,(llama_data_write *)&local_18);
return;
}
|
|
3,481 | (anonymous namespace)::gtest_SomeValuesTestmsgpack23_int8_EvalGenerateName_[abi:cxx11](testing::TestParamInfo<signed char> const&) | msgpack23/tests/int8_tests.cpp | TEST(msgpack23, int8Packing) {
for (std::int8_t i = -10; i < 10; ++i) {
msgpack23::Packer packer {};
auto const expected = static_cast<std::int8_t>(i * (std::numeric_limits<std::int8_t>::max() / 10));
auto data = packer(expected);
msgpack23::Unpacker unpacker {data};
std::int8_t actual {};
unpacker(actual);
EXPECT_EQ(actual, expected);
}
} | O0 | cpp | (anonymous namespace)::gtest_SomeValuesTestmsgpack23_int8_EvalGenerateName_[abi:cxx11](testing::TestParamInfo<signed char> const&):
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x50(%rbp)
movq %rdi, %rax
movq %rax, -0x48(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
callq 0x2dc90
testb $0x1, %al
jne 0x44066
jmp 0x440c0
leaq 0x6063(%rip), %rdi # 0x4a0d0
callq 0x4a0c0
leaq 0x8c415(%rip), %rsi # 0xd048e
leaq -0x30(%rbp), %rdi
movq %rdi, -0x58(%rbp)
callq 0x48800
movq -0x58(%rbp), %rsi
leaq -0x20(%rbp), %rdi
callq 0x4a150
jmp 0x44095
leaq -0x30(%rbp), %rdi
callq 0x4a180
leaq -0x20(%rbp), %rdi
callq 0x4a1a0
jmp 0x440c0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x4a180
jmp 0x440d7
movq -0x50(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x4a0d0
movq -0x48(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x16af0
| _ZN12_GLOBAL__N_152gtest_SomeValuesTestmsgpack23_int8_EvalGenerateName_B5cxx11ERKN7testing13TestParamInfoIaEE:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_50], rdi
mov rax, rdi
mov [rbp+var_48], rax
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
call _ZN7testing8internal11AlwaysFalseEv; testing::internal::AlwaysFalse(void)
test al, 1
jnz short loc_44066
jmp short loc_440C0
loc_44066:
lea rdi, _ZN7testing8internal16DefaultParamNameIaEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_13TestParamInfoIT_EE; testing::internal::DefaultParamName<signed char>(testing::TestParamInfo<signed char> const&)
call _ZN7testing8internal12TestNotEmptyIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_13TestParamInfoIaEEEEEvRKT_; testing::internal::TestNotEmpty<std::string ()(testing::TestParamInfo<signed char> const&)>(std::string ()(testing::TestParamInfo<signed char> const&) const&)
lea rsi, _ZN12_GLOBAL__N_112int8_numbersE; `anonymous namespace'::int8_numbers
lea rdi, [rbp+var_30]
mov [rbp+var_58], rdi
call _ZN7testing8ValuesInIaLm6EEENS_8internal14ParamGeneratorIT_EERAT0__KS3_; testing::ValuesIn<signed char,6ul>(signed char const(&)[6ul])
mov rsi, [rbp+var_58]
lea rdi, [rbp+var_20]
call _ZSt10make_tupleIJN7testing8internal14ParamGeneratorIaEEEESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS7_; std::make_tuple<testing::internal::ParamGenerator<signed char>>(testing::internal::ParamGenerator<signed char>&&)
jmp short $+2
loc_44095:
lea rdi, [rbp+var_30]
call _ZN7testing8internal14ParamGeneratorIaED2Ev; testing::internal::ParamGenerator<signed char>::~ParamGenerator()
lea rdi, [rbp+var_20]
call _ZNSt5tupleIJN7testing8internal14ParamGeneratorIaEEEED2Ev; std::tuple<testing::internal::ParamGenerator<signed char>>::~tuple()
jmp short loc_440C0
mov rcx, rax
mov eax, edx
mov [rbp+var_38], rcx
mov [rbp+var_3C], eax
lea rdi, [rbp+var_30]
call _ZN7testing8internal14ParamGeneratorIaED2Ev; testing::internal::ParamGenerator<signed char>::~ParamGenerator()
jmp short loc_440D7
loc_440C0:
mov rdi, [rbp+var_50]
mov rsi, [rbp+var_10]
call _ZN7testing8internal16DefaultParamNameIaEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_13TestParamInfoIT_EE; testing::internal::DefaultParamName<signed char>(testing::TestParamInfo<signed char> const&)
mov rax, [rbp+var_48]
add rsp, 60h
pop rbp
retn
loc_440D7:
mov rdi, [rbp+var_38]
call __Unwind_Resume
| testing::internal * `anonymous namespace'::gtest_SomeValuesTestmsgpack23_int8_EvalGenerateName_[abi:cxx11](
testing::internal *a1,
long long a2)
{
_BYTE v3[16]; // [rsp+30h] [rbp-30h] BYREF
_BYTE v4[16]; // [rsp+40h] [rbp-20h] BYREF
long long v5; // [rsp+50h] [rbp-10h]
testing::internal *v6; // [rsp+58h] [rbp-8h]
v6 = a1;
v5 = a2;
if ( testing::internal::AlwaysFalse(a1) )
{
testing::internal::TestNotEmpty<std::string ()(testing::TestParamInfo<signed char> const&)>(testing::internal::DefaultParamName<signed char>);
testing::ValuesIn<signed char,6ul>(v3, &`anonymous namespace'::int8_numbers);
std::make_tuple<testing::internal::ParamGenerator<signed char>>(v4, v3);
testing::internal::ParamGenerator<signed char>::~ParamGenerator(v3);
std::tuple<testing::internal::ParamGenerator<signed char>>::~tuple(v4);
}
testing::internal::DefaultParamName<signed char>(a1, v5);
return a1;
}
| gtest_SomeValuesTestmsgpack23_int8_EvalGenerateName_[abi:cxx11]:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x50],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0x48],RAX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
CALL 0x0012dc90
TEST AL,0x1
JNZ 0x00144066
JMP 0x001440c0
LAB_00144066:
LEA RDI,[0x14a0d0]
CALL 0x0014a0c0
LEA RSI,[0x1d048e]
LEA RDI,[RBP + -0x30]
MOV qword ptr [RBP + -0x58],RDI
CALL 0x00148800
MOV RSI,qword ptr [RBP + -0x58]
LAB_0014408a:
LEA RDI,[RBP + -0x20]
CALL 0x0014a150
LAB_00144093:
JMP 0x00144095
LAB_00144095:
LEA RDI,[RBP + -0x30]
CALL 0x0014a180
LEA RDI,[RBP + -0x20]
CALL 0x0014a1a0
JMP 0x001440c0
LAB_001440c0:
MOV RDI,qword ptr [RBP + -0x50]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x0014a0d0
MOV RAX,qword ptr [RBP + -0x48]
ADD RSP,0x60
POP RBP
RET
|
/* (anonymous
namespace)::gtest_SomeValuesTestmsgpack23_int8_EvalGenerateName_[abi:cxx11](testing::TestParamInfo<signed
char> const&) */
_anonymous_namespace_ * __thiscall
(anonymous_namespace)::gtest_SomeValuesTestmsgpack23_int8_EvalGenerateName__abi_cxx11_
(_anonymous_namespace_ *this,TestParamInfo *param_1)
{
ulong uVar1;
testing local_38 [16];
tuple<testing::internal::ParamGenerator<signed_char>> local_28 [16];
TestParamInfo *local_18;
_anonymous_namespace_ *local_10;
local_18 = param_1;
local_10 = this;
uVar1 = testing::internal::AlwaysFalse();
if ((uVar1 & 1) != 0) {
testing::internal::TestNotEmpty<std::__cxx11::string(testing::TestParamInfo<signed_char>const&)>
(testing::internal::DefaultParamName<signed_char>);
testing::ValuesIn<signed_char,6ul>(local_38,(signed_char *)&int8_numbers);
/* try { // try from 0014408a to 00144092 has its CatchHandler @ 001440a9 */
std::make_tuple<testing::internal::ParamGenerator<signed_char>>(local_28);
testing::internal::ParamGenerator<signed_char>::~ParamGenerator
((ParamGenerator<signed_char> *)local_38);
std::tuple<testing::internal::ParamGenerator<signed_char>>::~tuple(local_28);
}
testing::internal::DefaultParamName<signed_char>((internal *)this,local_18);
return this;
}
|
|
3,482 | inline_mysql_file_create_with_symlink | eloqsql/include/mysql/psi/mysql_file.h | static inline File
inline_mysql_file_create_with_symlink(
#ifdef HAVE_PSI_FILE_INTERFACE
PSI_file_key key, const char *src_file, uint src_line,
#endif
const char *linkname, const char *filename, int create_flags,
int access_flags, myf flags)
{
File file;
#ifdef HAVE_PSI_FILE_INTERFACE
struct PSI_file_locker *locker;
PSI_file_locker_state state;
locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_CREATE, filename,
&locker);
if (psi_likely(locker != NULL))
{
PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line);
file= my_create_with_symlink(linkname, filename, create_flags, access_flags,
flags);
PSI_FILE_CALL(end_file_open_wait_and_bind_to_descriptor)(locker, file);
return file;
}
#endif
file= my_create_with_symlink(linkname, filename, create_flags, access_flags,
flags);
return file;
} | O0 | c | inline_mysql_file_create_with_symlink:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq 0x18(%rbp), %rax
movl 0x10(%rbp), %eax
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
leaq 0x1f0021(%rip), %rax # 0x2cb4e0
movq (%rax), %rax
movq 0x148(%rax), %rax
movl -0x8(%rbp), %esi
movq -0x28(%rbp), %rcx
leaq -0x80(%rbp), %rdi
xorl %edx, %edx
leaq -0x38(%rbp), %r8
callq *%rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%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 0xdb55a
leaq 0x1effd9(%rip), %rax # 0x2cb4e0
movq (%rax), %rax
movq 0x1f0(%rax), %rax
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
callq *%rax
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
movl -0x2c(%rbp), %edx
movl 0x10(%rbp), %ecx
movq 0x18(%rbp), %r8
callq 0xfdc20
movl %eax, -0x30(%rbp)
leaq 0x1effa1(%rip), %rax # 0x2cb4e0
movq (%rax), %rax
movq 0x200(%rax), %rax
movq -0x38(%rbp), %rdi
movl -0x30(%rbp), %esi
callq *%rax
movl -0x30(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xdb57a
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
movl -0x2c(%rbp), %edx
movl 0x10(%rbp), %ecx
movq 0x18(%rbp), %r8
callq 0xfdc20
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| inline_mysql_file_create_with_symlink_0:
push rbp
mov rbp, rsp
sub rsp, 80h
mov rax, [rbp+arg_8]
mov eax, [rbp+arg_0]
mov [rbp+var_8], edi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_2C], r9d
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+148h]
mov esi, [rbp+var_8]
mov rcx, [rbp+var_28]
lea rdi, [rbp+var_80]
xor edx, edx
lea r8, [rbp+var_38]
call rax
mov [rbp+var_38], rax
cmp [rbp+var_38], 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_DB55A
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+1F0h]
mov rdi, [rbp+var_38]
mov rsi, [rbp+var_10]
mov edx, [rbp+var_14]
call rax
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_28]
mov edx, [rbp+var_2C]
mov ecx, [rbp+arg_0]
mov r8, [rbp+arg_8]
call my_create_with_symlink
mov [rbp+var_30], eax
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+200h]
mov rdi, [rbp+var_38]
mov esi, [rbp+var_30]
call rax
mov eax, [rbp+var_30]
mov [rbp+var_4], eax
jmp short loc_DB57A
loc_DB55A:
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_28]
mov edx, [rbp+var_2C]
mov ecx, [rbp+arg_0]
mov r8, [rbp+arg_8]
call my_create_with_symlink
mov [rbp+var_30], eax
mov eax, [rbp+var_30]
mov [rbp+var_4], eax
loc_DB57A:
mov eax, [rbp+var_4]
add rsp, 80h
pop rbp
retn
| long long inline_mysql_file_create_with_symlink_0(
unsigned int a1,
long long a2,
unsigned int a3,
long long a4,
long long a5,
unsigned int a6,
unsigned int a7,
long long a8)
{
_BYTE v9[72]; // [rsp+0h] [rbp-80h] BYREF
long long v10; // [rsp+48h] [rbp-38h] BYREF
unsigned int v11; // [rsp+50h] [rbp-30h]
unsigned int v12; // [rsp+54h] [rbp-2Ch]
long long v13; // [rsp+58h] [rbp-28h]
long long v14; // [rsp+60h] [rbp-20h]
unsigned int v15; // [rsp+6Ch] [rbp-14h]
long long v16; // [rsp+70h] [rbp-10h]
unsigned int v17; // [rsp+78h] [rbp-8h]
v17 = a1;
v16 = a2;
v15 = a3;
v14 = a4;
v13 = a5;
v12 = a6;
v10 = ((long long ( *)(_BYTE *, _QWORD, _QWORD, long long, long long *))PSI_server[41])(v9, a1, 0LL, a5, &v10);
if ( v10 )
{
((void ( *)(long long, long long, _QWORD))PSI_server[62])(v10, v16, v15);
v11 = my_create_with_symlink(v14, v13, v12, a7, a8);
((void ( *)(long long, _QWORD))PSI_server[64])(v10, v11);
}
else
{
return (unsigned int)my_create_with_symlink(v14, v13, v12, a7, a8);
}
return v11;
}
| inline_mysql_file_create_with_symlink:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV RAX,qword ptr [RBP + 0x18]
MOV EAX,dword ptr [RBP + 0x10]
MOV dword ptr [RBP + -0x8],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV dword ptr [RBP + -0x2c],R9D
LEA RAX,[0x3cb4e0]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x148]
MOV ESI,dword ptr [RBP + -0x8]
MOV RCX,qword ptr [RBP + -0x28]
LEA RDI,[RBP + -0x80]
XOR EDX,EDX
LEA R8,[RBP + -0x38]
CALL RAX
MOV qword ptr [RBP + -0x38],RAX
CMP qword ptr [RBP + -0x38],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 0x001db55a
LEA RAX,[0x3cb4e0]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x1f0]
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x14]
CALL RAX
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x28]
MOV EDX,dword ptr [RBP + -0x2c]
MOV ECX,dword ptr [RBP + 0x10]
MOV R8,qword ptr [RBP + 0x18]
CALL 0x001fdc20
MOV dword ptr [RBP + -0x30],EAX
LEA RAX,[0x3cb4e0]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x200]
MOV RDI,qword ptr [RBP + -0x38]
MOV ESI,dword ptr [RBP + -0x30]
CALL RAX
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001db57a
LAB_001db55a:
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x28]
MOV EDX,dword ptr [RBP + -0x2c]
MOV ECX,dword ptr [RBP + 0x10]
MOV R8,qword ptr [RBP + 0x18]
CALL 0x001fdc20
MOV dword ptr [RBP + -0x30],EAX
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x4],EAX
LAB_001db57a:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x80
POP RBP
RET
|
int4
inline_mysql_file_create_with_symlink
(int4 param_1,int8 param_2,int4 param_3,int8 param_4,
int8 param_5,int4 param_6,int4 param_7,int8 param_8)
{
int1 local_88 [72];
long local_40;
int4 local_38;
int4 local_34;
int8 local_30;
int8 local_28;
int4 local_1c;
int8 local_18;
int4 local_10;
int4 local_c;
local_34 = param_6;
local_30 = param_5;
local_28 = param_4;
local_1c = param_3;
local_18 = param_2;
local_10 = param_1;
local_40 = (**(code **)(PSI_server + 0x148))(local_88,param_1,0,param_5,&local_40);
if (local_40 == 0) {
local_c = my_create_with_symlink(local_28,local_30,local_34,param_7,param_8);
}
else {
(**(code **)(PSI_server + 0x1f0))(local_40,local_18,local_1c);
local_38 = my_create_with_symlink(local_28,local_30,local_34,param_7,param_8);
(**(code **)(PSI_server + 0x200))(local_40,local_38);
local_c = local_38;
}
return local_c;
}
|
|
3,483 | inline_mysql_file_create_with_symlink | eloqsql/include/mysql/psi/mysql_file.h | static inline File
inline_mysql_file_create_with_symlink(
#ifdef HAVE_PSI_FILE_INTERFACE
PSI_file_key key, const char *src_file, uint src_line,
#endif
const char *linkname, const char *filename, int create_flags,
int access_flags, myf flags)
{
File file;
#ifdef HAVE_PSI_FILE_INTERFACE
struct PSI_file_locker *locker;
PSI_file_locker_state state;
locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_CREATE, filename,
&locker);
if (psi_likely(locker != NULL))
{
PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line);
file= my_create_with_symlink(linkname, filename, create_flags, access_flags,
flags);
PSI_FILE_CALL(end_file_open_wait_and_bind_to_descriptor)(locker, file);
return file;
}
#endif
file= my_create_with_symlink(linkname, filename, create_flags, access_flags,
flags);
return file;
} | O3 | c | inline_mysql_file_create_with_symlink:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r9, %rbx
movl %r8d, %r14d
movq %rcx, %r15
movq %rdx, %r12
movl %esi, -0x2c(%rbp)
movl %edi, %esi
leaq 0x32dd04(%rip), %rax # 0x38f258
movq (%rax), %rax
leaq -0x80(%rbp), %rdi
leaq -0x38(%rbp), %r13
xorl %edx, %edx
movq %r13, %r8
callq *0x148(%rax)
movq %rax, (%r13)
testq %rax, %rax
jne 0x61599
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
movl %r14d, %ecx
movq %rbx, %r8
callq 0xa7674
movl %eax, %ebx
movl %ebx, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x32dcb8(%rip), %r13 # 0x38f258
movq (%r13), %rcx
leaq 0x809dc(%rip), %rsi # 0xe1f87
movq %rax, %rdi
movl -0x2c(%rbp), %edx
callq *0x1f0(%rcx)
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
movl %r14d, %ecx
movq %rbx, %r8
callq 0xa7674
movl %eax, %ebx
movq (%r13), %rax
movq -0x38(%rbp), %rdi
movl %ebx, %esi
callq *0x200(%rax)
jmp 0x61588
| inline_mysql_file_create_with_symlink:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov rbx, r9
mov r14d, r8d
mov r15, rcx
mov r12, rdx
mov [rbp+var_2C], esi
mov esi, edi
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_80]
lea r13, [rbp+var_38]
xor edx, edx
mov r8, r13
call qword ptr [rax+148h]
mov [r13+0], rax
test rax, rax
jnz short loc_61599
mov rdi, r12
mov rsi, r15
xor edx, edx
mov ecx, r14d
mov r8, rbx
call my_create_with_symlink
mov ebx, eax
loc_61588:
mov eax, ebx
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_61599:
lea r13, PSI_server
mov rcx, [r13+0]
lea rsi, aWorkspaceLlm4b_7; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, rax
mov edx, [rbp+var_2C]
call qword ptr [rcx+1F0h]
mov rdi, r12
mov rsi, r15
xor edx, edx
mov ecx, r14d
mov r8, rbx
call my_create_with_symlink
mov ebx, eax
mov rax, [r13+0]
mov rdi, [rbp+var_38]
mov esi, ebx
call qword ptr [rax+200h]
jmp short loc_61588
| long long inline_mysql_file_create_with_symlink(
unsigned int a1,
unsigned int a2,
long long a3,
long long a4,
unsigned int a5,
long long a6)
{
long long v10; // rax
_BYTE v12[72]; // [rsp+0h] [rbp-80h] BYREF
long long v13; // [rsp+48h] [rbp-38h] BYREF
unsigned int v14; // [rsp+54h] [rbp-2Ch]
v14 = a2;
v10 = ((long long ( *)(_BYTE *, _QWORD, _QWORD, long long, long long *))PSI_server[41])(v12, a1, 0LL, a4, &v13);
v13 = v10;
if ( v10 )
{
((void ( *)(long long, const char *, _QWORD))PSI_server[62])(
v10,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_create.c",
v14);
a6 = (unsigned int)my_create_with_symlink(a3, a4, 0LL, a5, a6);
((void ( *)(long long, long long))PSI_server[64])(v13, a6);
}
else
{
LODWORD(a6) = my_create_with_symlink(a3, a4, 0LL, a5, a6);
}
return (unsigned int)a6;
}
| inline_mysql_file_create_with_symlink:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV RBX,R9
MOV R14D,R8D
MOV R15,RCX
MOV R12,RDX
MOV dword ptr [RBP + -0x2c],ESI
MOV ESI,EDI
LEA RAX,[0x48f258]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x80]
LEA R13,[RBP + -0x38]
XOR EDX,EDX
MOV R8,R13
CALL qword ptr [RAX + 0x148]
MOV qword ptr [R13],RAX
TEST RAX,RAX
JNZ 0x00161599
MOV RDI,R12
MOV RSI,R15
XOR EDX,EDX
MOV ECX,R14D
MOV R8,RBX
CALL 0x001a7674
MOV EBX,EAX
LAB_00161588:
MOV EAX,EBX
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00161599:
LEA R13,[0x48f258]
MOV RCX,qword ptr [R13]
LEA RSI,[0x1e1f87]
MOV RDI,RAX
MOV EDX,dword ptr [RBP + -0x2c]
CALL qword ptr [RCX + 0x1f0]
MOV RDI,R12
MOV RSI,R15
XOR EDX,EDX
MOV ECX,R14D
MOV R8,RBX
CALL 0x001a7674
MOV EBX,EAX
MOV RAX,qword ptr [R13]
MOV RDI,qword ptr [RBP + -0x38]
MOV ESI,EBX
CALL qword ptr [RAX + 0x200]
JMP 0x00161588
|
int4
inline_mysql_file_create_with_symlink
(int4 param_1,int4 param_2,int8 param_3,int8 param_4,
int4 param_5,int8 param_6)
{
int4 uVar1;
int1 local_88 [72];
long local_40;
int4 local_34;
local_34 = param_2;
local_40 = (**(code **)(PSI_server + 0x148))(local_88,param_1,0,param_4,&local_40);
if (local_40 == 0) {
uVar1 = my_create_with_symlink(param_3,param_4,0,param_5,param_6);
}
else {
(**(code **)(PSI_server + 0x1f0))
(local_40,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_create.c",
local_34);
uVar1 = my_create_with_symlink(param_3,param_4,0,param_5,param_6);
(**(code **)(PSI_server + 0x200))(local_40,uVar1);
}
return uVar1;
}
|
|
3,484 | fmt::v11::basic_appender<char> fmt::v11::detail::do_write_float<char, fmt::v11::basic_appender<char>, fmt::v11::detail::dragonbox::decimal_fp<float>, fmt::v11::detail::digit_grouping<char>>(fmt::v11::basic_appender<char>, fmt::v11::detail::dragonbox::decimal_fp<float> const&, fmt::v11::format_specs const&, fmt::v11::sign, int, fmt::v11::detail::locale_ref) | zkingston[P]unknot/build_O1/_deps/fmt-src/include/fmt/format.h | FMT_CONSTEXPR20 auto do_write_float(OutputIt out, const DecimalFP& f,
const format_specs& specs, sign s,
int exp_upper, locale_ref loc) -> OutputIt {
auto significand = f.significand;
int significand_size = get_significand_size(f);
const Char zero = static_cast<Char>('0');
size_t size = to_unsigned(significand_size) + (s != sign::none ? 1 : 0);
using iterator = reserve_iterator<OutputIt>;
Char decimal_point = specs.localized() ? detail::decimal_point<Char>(loc)
: static_cast<Char>('.');
int output_exp = f.exponent + significand_size - 1;
auto use_exp_format = [=]() {
if (specs.type() == presentation_type::exp) return true;
if (specs.type() == presentation_type::fixed) return false;
// Use the fixed notation if the exponent is in [exp_lower, exp_upper),
// e.g. 0.0001 instead of 1e-04. Otherwise use the exponent notation.
const int exp_lower = -4;
return output_exp < exp_lower ||
output_exp >= (specs.precision > 0 ? specs.precision : exp_upper);
};
if (use_exp_format()) {
int num_zeros = 0;
if (specs.alt()) {
num_zeros = specs.precision - significand_size;
if (num_zeros < 0) num_zeros = 0;
size += to_unsigned(num_zeros);
} else if (significand_size == 1) {
decimal_point = Char();
}
auto abs_output_exp = output_exp >= 0 ? output_exp : -output_exp;
int exp_digits = 2;
if (abs_output_exp >= 100) exp_digits = abs_output_exp >= 1000 ? 4 : 3;
size += to_unsigned((decimal_point ? 1 : 0) + 2 + exp_digits);
char exp_char = specs.upper() ? 'E' : 'e';
auto write = [=](iterator it) {
if (s != sign::none) *it++ = detail::getsign<Char>(s);
// Insert a decimal point after the first digit and add an exponent.
it = write_significand(it, significand, significand_size, 1,
decimal_point);
if (num_zeros > 0) it = detail::fill_n(it, num_zeros, zero);
*it++ = static_cast<Char>(exp_char);
return write_exponent<Char>(output_exp, it);
};
return specs.width > 0
? write_padded<Char, align::right>(out, specs, size, write)
: base_iterator(out, write(reserve(out, size)));
}
int exp = f.exponent + significand_size;
if (f.exponent >= 0) {
// 1234e5 -> 123400000[.0+]
size += to_unsigned(f.exponent);
int num_zeros = specs.precision - exp;
abort_fuzzing_if(num_zeros > 5000);
if (specs.alt()) {
++size;
if (num_zeros <= 0 && specs.type() != presentation_type::fixed)
num_zeros = 0;
if (num_zeros > 0) size += to_unsigned(num_zeros);
}
auto grouping = Grouping(loc, specs.localized());
size += to_unsigned(grouping.count_separators(exp));
return write_padded<Char, align::right>(out, specs, size, [&](iterator it) {
if (s != sign::none) *it++ = detail::getsign<Char>(s);
it = write_significand<Char>(it, significand, significand_size,
f.exponent, grouping);
if (!specs.alt()) return it;
*it++ = decimal_point;
return num_zeros > 0 ? detail::fill_n(it, num_zeros, zero) : it;
});
} else if (exp > 0) {
// 1234e-2 -> 12.34[0+]
int num_zeros = specs.alt() ? specs.precision - significand_size : 0;
size += 1 + static_cast<unsigned>(max_of(num_zeros, 0));
auto grouping = Grouping(loc, specs.localized());
size += to_unsigned(grouping.count_separators(exp));
return write_padded<Char, align::right>(out, specs, size, [&](iterator it) {
if (s != sign::none) *it++ = detail::getsign<Char>(s);
it = write_significand(it, significand, significand_size, exp,
decimal_point, grouping);
return num_zeros > 0 ? detail::fill_n(it, num_zeros, zero) : it;
});
}
// 1234e-6 -> 0.001234
int num_zeros = -exp;
if (significand_size == 0 && specs.precision >= 0 &&
specs.precision < num_zeros) {
num_zeros = specs.precision;
}
bool pointy = num_zeros != 0 || significand_size != 0 || specs.alt();
size += 1 + (pointy ? 1 : 0) + to_unsigned(num_zeros);
return write_padded<Char, align::right>(out, specs, size, [&](iterator it) {
if (s != sign::none) *it++ = detail::getsign<Char>(s);
*it++ = zero;
if (!pointy) return it;
*it++ = decimal_point;
it = detail::fill_n(it, num_zeros, zero);
return write_significand<Char>(it, significand, significand_size);
});
} | O1 | c | fmt::v11::basic_appender<char> fmt::v11::detail::do_write_float<char, fmt::v11::basic_appender<char>, fmt::v11::detail::dragonbox::decimal_fp<float>, fmt::v11::detail::digit_grouping<char>>(fmt::v11::basic_appender<char>, fmt::v11::detail::dragonbox::decimal_fp<float> const&, fmt::v11::format_specs const&, fmt::v11::sign, int, fmt::v11::detail::locale_ref):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %r9, %rbp
movl %r8d, %ebx
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r10
movl %ecx, 0x18(%rsp)
movl (%rsi), %r15d
movl %r15d, 0x14(%rsp)
movl %r15d, %eax
orl $0x1, %eax
bsrl %eax, %eax
leaq 0x252867(%rip), %rdx # 0x293b60
addq (%rdx,%rax,8), %r15
shrq $0x20, %r15
movl %r15d, 0x10(%rsp)
cmpl $0x1, %ecx
sbbl $-0x1, %r15d
movb $0x30, 0xb(%rsp)
movb $0x2e, %al
testb $0x40, 0x1(%r14)
je 0x41329
movq %rbp, %rdi
movq %r10, %r13
callq 0x3f933
movq %r13, %r10
movb %al, 0xa(%rsp)
movl 0x4(%r12), %esi
movl 0x10(%rsp), %eax
leal (%rax,%rsi), %ecx
movl (%r14), %edx
movl 0xc(%r14), %r13d
movl %edx, %edi
andb $0x7, %dil
cmpb $0x1, %dil
je 0x413bf
movl %edx, %r8d
andl $0x7, %r8d
cmpl $0x2, %r8d
jne 0x413af
movl %ecx, 0x1c(%rsp)
testl %esi, %esi
js 0x415b3
addq %rsi, %r15
subl %ecx, %r13d
movl %r13d, 0xc(%rsp)
btl $0xd, %edx
jae 0x414b1
testl %r13d, %r13d
setg %al
cmpb $0x2, %dil
sete %cl
orb %al, %cl
jne 0x41393
movl $0x0, 0xc(%rsp)
incq %r15
movslq 0xc(%rsp), %rax
testq %rax, %rax
jle 0x414b1
movq %r10, %rbx
addq %rax, %r15
jmp 0x414b4
cmpl $-0x3, %ecx
jl 0x413bf
testl %r13d, %r13d
cmovgl %r13d, %ebx
cmpl %ebx, %ecx
jle 0x41359
addl %eax, %esi
decl %esi
btl $0xd, %edx
jb 0x413d7
xorl %edi, %edi
cmpl $0x1, %eax
jne 0x413e6
movb $0x0, 0xa(%rsp)
jmp 0x413e6
subl %eax, %r13d
xorl %edi, %edi
testl %r13d, %r13d
cmovgl %r13d, %edi
addq %rdi, %r15
movl $0x1, %r8d
subl %ecx, %r8d
testl %ecx, %ecx
cmovgl %esi, %r8d
xorl %ecx, %ecx
cmpl $0x3e8, %r8d # imm = 0x3E8
setge %cl
addq $0x3, %rcx
cmpl $0x64, %r8d
movl $0x2, %r8d
cmovgeq %rcx, %r8
movb 0xa(%rsp), %r9b
cmpb $0x1, %r9b
movl $0x3, %ecx
sbbq $0x0, %rcx
addq %r8, %rcx
addq %r15, %rcx
btl $0xc, %edx
setae %dl
shlb $0x5, %dl
orb $0x45, %dl
movl 0x18(%rsp), %r8d
movl %r8d, 0x20(%rsp)
movl 0x14(%rsp), %r8d
movl %r8d, 0x24(%rsp)
movl %eax, 0x28(%rsp)
movb %r9b, 0x2c(%rsp)
movl %edi, 0x30(%rsp)
movb $0x30, 0x34(%rsp)
movb %dl, 0x35(%rsp)
movl %esi, 0x38(%rsp)
cmpl $0x0, 0x8(%r14)
jle 0x41485
leaq 0x20(%rsp), %r8
movq %r10, %rdi
movq %r14, %rsi
movq %rcx, %rdx
callq 0x41a90
jmp 0x41771
addq 0x8(%r10), %rcx
cmpq %rcx, 0x10(%r10)
jae 0x4149f
movq %r10, %rdi
movq %rcx, %rsi
movq %r10, %rbx
callq *0x18(%r10)
movq %rbx, %r10
leaq 0x20(%rsp), %rdi
movq %r10, %rsi
callq 0x417a8
jmp 0x41771
movq %r10, %rbx
shrl $0xe, %edx
andl $0x1, %edx
leaq 0x68(%rsp), %r13
movq %r13, %rdi
movq %rbp, %rsi
callq 0x41918
movl 0x1c(%rsp), %eax
movq (%r13), %rcx
movq 0x28(%r13), %rdx
movq 0x8(%r13), %rsi
addq %rcx, %rsi
decq %r15
xorl %r11d, %r11d
movq %rbx, %rdi
movl $0x7fffffff, %r8d # imm = 0x7FFFFFFF
testq %rdx, %rdx
je 0x41517
cmpq %rsi, %rcx
je 0x4150c
movzbl (%rcx), %r9d
leal -0x7f(%r9), %r10d
cmpb $-0x7e, %r10b
jb 0x41517
incq %rcx
addl %r9d, %r11d
jmp 0x41514
movsbl -0x1(%rsi), %r8d
addl %r8d, %r11d
movl %r11d, %r8d
incq %r15
cmpl %eax, %r8d
jl 0x414e6
leaq 0x18(%rsp), %rax
leaq 0x20(%rsp), %r8
movq %rax, (%r8)
leaq 0x14(%rsp), %rax
movq %rax, 0x8(%r8)
leaq 0x10(%rsp), %rax
movq %rax, 0x10(%r8)
movq %r12, 0x18(%r8)
movq %r13, 0x20(%r8)
movq %r14, 0x28(%r8)
leaq 0xa(%rsp), %rax
movq %rax, 0x30(%r8)
leaq 0xc(%rsp), %rax
movq %rax, 0x38(%r8)
leaq 0xb(%rsp), %rax
movq %rax, 0x40(%r8)
movq %r14, %rsi
movq %r15, %rdx
movq %r15, %rcx
callq 0x41cd7
movq %rax, %rbx
leaq 0x98(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x41597
movq 0x98(%rsp), %rsi
incq %rsi
callq 0xfa70
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x41774
movq 0x78(%rsp), %rsi
jmp 0x416cb
testl %ecx, %ecx
jle 0x416d8
movl %edx, %ecx
shll $0x12, %ecx
sarl $0x1f, %ecx
subl %eax, %r13d
xorl %ebx, %ebx
andl %ecx, %r13d
movl %r13d, 0xc(%rsp)
cmovlel %ebx, %r13d
shrl $0xe, %edx
andl $0x1, %edx
leaq 0x20(%rsp), %r12
movq %r12, %rdi
movq %rbp, %rsi
movq %r10, %rbp
callq 0x41918
movq %rbp, %rdi
movl 0x1c(%rsp), %eax
movq (%r12), %rcx
movq 0x28(%r12), %rdx
movq 0x8(%r12), %rsi
addq %rcx, %rsi
addq %r15, %r13
movl $0x7fffffff, %r10d # imm = 0x7FFFFFFF
testq %rdx, %rdx
je 0x41639
cmpq %rsi, %rcx
je 0x4162e
movzbl (%rcx), %r8d
leal -0x7f(%r8), %r9d
cmpb $-0x7e, %r9b
jb 0x41639
incq %rcx
addl %r8d, %ebx
jmp 0x41636
movsbl -0x1(%rsi), %r8d
addl %r8d, %ebx
movl %ebx, %r10d
incq %r13
cmpl %eax, %r10d
jl 0x41608
leaq 0x18(%rsp), %rax
leaq 0x68(%rsp), %r8
movq %rax, (%r8)
leaq 0x14(%rsp), %rax
movq %rax, 0x8(%r8)
leaq 0x10(%rsp), %rax
movq %rax, 0x10(%r8)
leaq 0x1c(%rsp), %rax
movq %rax, 0x18(%r8)
leaq 0xa(%rsp), %rax
movq %rax, 0x20(%r8)
movq %r12, 0x28(%r8)
leaq 0xc(%rsp), %rax
movq %rax, 0x30(%r8)
leaq 0xb(%rsp), %rax
movq %rax, 0x38(%r8)
movq %r14, %rsi
movq %r13, %rdx
movq %r13, %rcx
callq 0x421c3
movq %rax, %rbx
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x416b4
movq 0x50(%rsp), %rsi
incq %rsi
callq 0xfa70
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x41774
movq 0x30(%rsp), %rsi
incq %rsi
callq 0xfa70
jmp 0x41774
negl %ecx
movl %ecx, 0x68(%rsp)
testl %eax, %eax
jne 0x416fc
testl %r13d, %r13d
setns %sil
cmpl %ecx, %r13d
setl %cl
andb %sil, %cl
cmpb $0x1, %cl
jne 0x416fc
movl %r13d, 0x68(%rsp)
movl 0x68(%rsp), %ecx
movb $0x1, %sil
orl %ecx, %eax
jne 0x4170f
shrl $0xd, %edx
andl $0x1, %edx
movl %edx, %esi
leaq 0xc(%rsp), %rax
movb %sil, (%rax)
movzbl %sil, %edx
addl %edx, %ecx
incl %ecx
addq %rcx, %r15
leaq 0x18(%rsp), %rcx
leaq 0x20(%rsp), %r8
movq %rcx, (%r8)
movq %rax, 0x8(%r8)
leaq 0xa(%rsp), %rax
movq %rax, 0x10(%r8)
leaq 0x68(%rsp), %rax
movq %rax, 0x18(%r8)
leaq 0xb(%rsp), %rax
movq %rax, 0x20(%r8)
leaq 0x14(%rsp), %rax
movq %rax, 0x28(%r8)
leaq 0x10(%rsp), %rax
movq %rax, 0x30(%r8)
movq %r10, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r15, %rcx
callq 0x4252e
movq %rax, %rbx
movq %rbx, %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
jmp 0x4179b
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x41a5a
movq %rbx, %rdi
callq 0x101c0
| _ZN3fmt3v116detail14do_write_floatIcNS0_14basic_appenderIcEENS1_9dragonbox10decimal_fpIfEENS1_14digit_groupingIcEEEET0_SA_RKT1_RKNS0_12format_specsENS0_4signEiNS1_10locale_refE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0A8h
mov rbp, r9
mov ebx, r8d
mov r14, rdx
mov r12, rsi
mov r10, rdi
mov [rsp+0D8h+var_C0], ecx; int
mov r15d, [rsi]
mov dword ptr [rsp+0D8h+var_C8+4], r15d
mov eax, r15d
or eax, 1
bsr eax, eax
lea rdx, _ZZN3fmt3v116detail15do_count_digitsEjE5table; fmt::v11::detail::do_count_digits(uint)::table
add r15, [rdx+rax*8]
shr r15, 20h
mov dword ptr [rsp+0D8h+var_C8], r15d; __int64
cmp ecx, 1
sbb r15d, 0FFFFFFFFh
mov [rsp+0D8h+var_CD], 30h ; '0'
mov al, 2Eh ; '.'
test byte ptr [r14+1], 40h
jz short loc_41329
mov rdi, rbp; std::locale *
mov r13, r10
call _ZN3fmt3v116detail18decimal_point_implIcEET_NS1_10locale_refE; fmt::v11::detail::decimal_point_impl<char>(fmt::v11::detail::locale_ref)
mov r10, r13
loc_41329:
mov [rsp+0D8h+var_CE], al
mov esi, [r12+4]
mov eax, dword ptr [rsp+0D8h+var_C8]
lea ecx, [rax+rsi]; int
mov edx, [r14]
mov r13d, [r14+0Ch]
mov edi, edx
and dil, 7
cmp dil, 1
jz short loc_413BF
mov r8d, edx
and r8d, 7; int
cmp r8d, 2
jnz short loc_413AF
loc_41359:
mov [rsp+0D8h+var_BC], ecx
test esi, esi
js loc_415B3
add r15, rsi
sub r13d, ecx
mov [rsp+0D8h+var_CC], r13d
bt edx, 0Dh
jnb loc_414B1
test r13d, r13d
setnle al
cmp dil, 2
setz cl
or cl, al
jnz short loc_41393
mov [rsp+0D8h+var_CC], 0
loc_41393:
inc r15
movsxd rax, [rsp+0D8h+var_CC]
test rax, rax
jle loc_414B1
mov rbx, r10
add r15, rax
jmp loc_414B4
loc_413AF:
cmp ecx, 0FFFFFFFDh
jl short loc_413BF
test r13d, r13d
cmovg ebx, r13d
cmp ecx, ebx
jle short loc_41359
loc_413BF:
add esi, eax
dec esi
bt edx, 0Dh
jb short loc_413D7
xor edi, edi
cmp eax, 1
jnz short loc_413E6
mov [rsp+0D8h+var_CE], 0
jmp short loc_413E6
loc_413D7:
sub r13d, eax
xor edi, edi
test r13d, r13d
cmovg edi, r13d
add r15, rdi
loc_413E6:
mov r8d, 1
sub r8d, ecx
test ecx, ecx
cmovg r8d, esi
xor ecx, ecx
cmp r8d, 3E8h
setnl cl
add rcx, 3
cmp r8d, 64h ; 'd'
mov r8d, 2
cmovge r8, rcx
mov r9b, [rsp+0D8h+var_CE]
cmp r9b, 1
mov ecx, 3
sbb rcx, 0
add rcx, r8
add rcx, r15
bt edx, 0Ch
setnb dl
shl dl, 5
or dl, 45h
mov r8d, [rsp+0D8h+var_C0]
mov [rsp+0D8h+var_B8], r8d
mov r8d, dword ptr [rsp+0D8h+var_C8+4]
mov [rsp+0D8h+var_B4], r8d
mov [rsp+0D8h+var_B0], eax
mov [rsp+0D8h+var_AC], r9b
mov dword ptr [rsp+0D8h+var_A8], edi
mov byte ptr [rsp+0D8h+var_A8+4], 30h ; '0'
mov byte ptr [rsp+0D8h+var_A8+5], dl
mov [rsp+0D8h+var_A0], esi
cmp dword ptr [r14+8], 0
jle short loc_41485
lea r8, [rsp+0D8h+var_B8]
mov rdi, r10
mov rsi, r14
mov rdx, rcx
call _ZN3fmt3v116detail12write_paddedIcLNS0_5alignE2ENS0_14basic_appenderIcEERZNS1_14do_write_floatIcS5_NS1_9dragonbox10decimal_fpIfEENS1_14digit_groupingIcEEEET0_SC_RKT1_RKNS0_12format_specsENS0_4signEiNS1_10locale_refEEUlS5_E_EESD_SD_SI_mmOT2_; fmt::v11::detail::write_padded<char,(fmt::v11::align)2,fmt::v11::basic_appender<char>,fmt::v11::detail::do_write_float<char,fmt::v11::basic_appender<char>,fmt::v11::detail::dragonbox::decimal_fp<float>,fmt::v11::detail::digit_grouping<char>>(fmt::v11::basic_appender<char>,fmt::v11::detail::dragonbox::decimal_fp<float> const&,fmt::v11::format_specs const&,fmt::v11::sign,int,fmt::v11::detail::locale_ref)::{lambda(fmt::v11::basic_appender<char>)#1} &>(fmt::v11::detail::dragonbox::decimal_fp<float>,fmt::v11::format_specs const&,ulong,ulong,fmt::v11::detail::do_write_float<char,fmt::v11::basic_appender<char>,fmt::v11::detail::dragonbox::decimal_fp<float>,fmt::v11::detail::digit_grouping<char>>(fmt::v11::basic_appender<char>,fmt::v11::detail::dragonbox::decimal_fp<float> const&,fmt::v11::format_specs const&,fmt::v11::sign,int,fmt::v11::detail::locale_ref)::{lambda(fmt::v11::basic_appender<char>)#1} &)
jmp loc_41771
loc_41485:
add rcx, [r10+8]
cmp [r10+10h], rcx
jnb short loc_4149F
mov rdi, r10
mov rsi, rcx
mov rbx, r10
call qword ptr [r10+18h]
mov r10, rbx
loc_4149F:
lea rdi, [rsp+0D8h+var_B8]
mov rsi, r10
call _ZZN3fmt3v116detail14do_write_floatIcNS0_14basic_appenderIcEENS1_9dragonbox10decimal_fpIfEENS1_14digit_groupingIcEEEET0_SA_RKT1_RKNS0_12format_specsENS0_4signEiNS1_10locale_refEENKUlS4_E_clES4_; fmt::v11::detail::do_write_float<char,fmt::v11::basic_appender<char>,fmt::v11::detail::dragonbox::decimal_fp<float>,fmt::v11::detail::digit_grouping<char>>(fmt::v11::basic_appender<char>,fmt::v11::detail::dragonbox::decimal_fp<float> const&,fmt::v11::format_specs const&,fmt::v11::sign,int,fmt::v11::detail::locale_ref)::{lambda(fmt::v11::basic_appender<char>)#1}::operator()(fmt::v11::basic_appender<char>)
jmp loc_41771
loc_414B1:
mov rbx, r10
loc_414B4:
shr edx, 0Eh
and edx, 1; int
lea r13, [rsp+0D8h+var_70]
mov rdi, r13; int
mov rsi, rbp; int
call _ZN3fmt3v116detail14digit_groupingIcEC2INS1_10locale_refETnNSt9enable_ifIXsr3std7is_sameIT_S5_EE5valueEiE4typeELi0EEES7_b
mov eax, [rsp+0D8h+var_BC]
mov rcx, [r13+0]
mov rdx, [r13+28h]
mov rsi, [r13+8]
add rsi, rcx
dec r15
xor r11d, r11d
mov rdi, rbx
loc_414E6:
mov r8d, 7FFFFFFFh
test rdx, rdx
jz short loc_41517
cmp rcx, rsi
jz short loc_4150C
movzx r9d, byte ptr [rcx]
lea r10d, [r9-7Fh]
cmp r10b, 82h
jb short loc_41517
inc rcx
add r11d, r9d
jmp short loc_41514
loc_4150C:
movsx r8d, byte ptr [rsi-1]
add r11d, r8d
loc_41514:
mov r8d, r11d
loc_41517:
inc r15
cmp r8d, eax
jl short loc_414E6
lea rax, [rsp+0D8h+var_C0]
lea r8, [rsp+0D8h+var_B8]
mov [r8], rax
lea rax, [rsp+0D8h+var_C8+4]
mov [r8+8], rax
lea rax, [rsp+0D8h+var_C8]
mov [r8+10h], rax
mov [r8+18h], r12
mov [r8+20h], r13
mov [r8+28h], r14
lea rax, [rsp+0D8h+var_CE]
mov [r8+30h], rax
lea rax, [rsp+0D8h+var_CC]
mov [r8+38h], rax
lea rax, [rsp+0D8h+var_CD]
mov [r8+40h], rax
mov rsi, r14
mov rdx, r15
mov rcx, r15
call _ZN3fmt3v116detail12write_paddedIcLNS0_5alignE2ENS0_14basic_appenderIcEERZNS1_14do_write_floatIcS5_NS1_9dragonbox10decimal_fpIfEENS1_14digit_groupingIcEEEET0_SC_RKT1_RKNS0_12format_specsENS0_4signEiNS1_10locale_refEEUlS5_E0_EESD_SD_SI_mmOT2_; fmt::v11::detail::write_padded<char,(fmt::v11::align)2,fmt::v11::basic_appender<char>,fmt::v11::detail::do_write_float<char,fmt::v11::basic_appender<char>,fmt::v11::detail::dragonbox::decimal_fp<float>,fmt::v11::detail::digit_grouping<char>>(fmt::v11::basic_appender<char>,fmt::v11::detail::dragonbox::decimal_fp<float> const&,fmt::v11::format_specs const&,fmt::v11::sign,int,fmt::v11::detail::locale_ref)::{lambda(fmt::v11::basic_appender<char>)#2} &>(fmt::v11::detail::dragonbox::decimal_fp<float>,fmt::v11::format_specs const&,ulong,ulong,fmt::v11::detail::do_write_float<char,fmt::v11::basic_appender<char>,fmt::v11::detail::dragonbox::decimal_fp<float>,fmt::v11::detail::digit_grouping<char>>(fmt::v11::basic_appender<char>,fmt::v11::detail::dragonbox::decimal_fp<float> const&,fmt::v11::format_specs const&,fmt::v11::sign,int,fmt::v11::detail::locale_ref)::{lambda(fmt::v11::basic_appender<char>)#2} &)
mov rbx, rax
lea rax, [rsp+0D8h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_41597
mov rsi, [rsp+0D8h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_41597:
lea rax, [rsp+0D8h+var_60]
mov rdi, [rax-10h]
cmp rdi, rax
jz loc_41774
mov rsi, [rsp+0D8h+var_60]
jmp loc_416CB
loc_415B3:
test ecx, ecx
jle loc_416D8
mov ecx, edx
shl ecx, 12h
sar ecx, 1Fh; int
sub r13d, eax
xor ebx, ebx
and r13d, ecx
mov [rsp+0D8h+var_CC], r13d
cmovle r13d, ebx
shr edx, 0Eh
and edx, 1; int
lea r12, [rsp+0D8h+var_B8]
mov rdi, r12; int
mov rsi, rbp; int
mov rbp, r10
call _ZN3fmt3v116detail14digit_groupingIcEC2INS1_10locale_refETnNSt9enable_ifIXsr3std7is_sameIT_S5_EE5valueEiE4typeELi0EEES7_b
mov rdi, rbp
mov eax, [rsp+0D8h+var_BC]
mov rcx, [r12]
mov rdx, [r12+28h]
mov rsi, [r12+8]
add rsi, rcx
add r13, r15
loc_41608:
mov r10d, 7FFFFFFFh
test rdx, rdx
jz short loc_41639
cmp rcx, rsi
jz short loc_4162E
movzx r8d, byte ptr [rcx]
lea r9d, [r8-7Fh]
cmp r9b, 82h
jb short loc_41639
inc rcx
add ebx, r8d
jmp short loc_41636
loc_4162E:
movsx r8d, byte ptr [rsi-1]
add ebx, r8d
loc_41636:
mov r10d, ebx
loc_41639:
inc r13
cmp r10d, eax
jl short loc_41608
lea rax, [rsp+0D8h+var_C0]
lea r8, [rsp+0D8h+var_70]
mov [r8], rax
lea rax, [rsp+0D8h+var_C8+4]
mov [r8+8], rax
lea rax, [rsp+0D8h+var_C8]
mov [r8+10h], rax
lea rax, [rsp+0D8h+var_BC]
mov [r8+18h], rax
lea rax, [rsp+0D8h+var_CE]
mov [r8+20h], rax
mov [r8+28h], r12
lea rax, [rsp+0D8h+var_CC]
mov [r8+30h], rax
lea rax, [rsp+0D8h+var_CD]
mov [r8+38h], rax
mov rsi, r14
mov rdx, r13
mov rcx, r13
call _ZN3fmt3v116detail12write_paddedIcLNS0_5alignE2ENS0_14basic_appenderIcEERZNS1_14do_write_floatIcS5_NS1_9dragonbox10decimal_fpIfEENS1_14digit_groupingIcEEEET0_SC_RKT1_RKNS0_12format_specsENS0_4signEiNS1_10locale_refEEUlS5_E1_EESD_SD_SI_mmOT2_; fmt::v11::detail::write_padded<char,(fmt::v11::align)2,fmt::v11::basic_appender<char>,fmt::v11::detail::do_write_float<char,fmt::v11::basic_appender<char>,fmt::v11::detail::dragonbox::decimal_fp<float>,fmt::v11::detail::digit_grouping<char>>(fmt::v11::basic_appender<char>,fmt::v11::detail::dragonbox::decimal_fp<float> const&,fmt::v11::format_specs const&,fmt::v11::sign,int,fmt::v11::detail::locale_ref)::{lambda(fmt::v11::basic_appender<char>)#3} &>(fmt::v11::detail::dragonbox::decimal_fp<float>,fmt::v11::format_specs const&,ulong,ulong,fmt::v11::detail::do_write_float<char,fmt::v11::basic_appender<char>,fmt::v11::detail::dragonbox::decimal_fp<float>,fmt::v11::detail::digit_grouping<char>>(fmt::v11::basic_appender<char>,fmt::v11::detail::dragonbox::decimal_fp<float> const&,fmt::v11::format_specs const&,fmt::v11::sign,int,fmt::v11::detail::locale_ref)::{lambda(fmt::v11::basic_appender<char>)#3} &)
mov rbx, rax
lea rax, [rsp+0D8h+var_88]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_416B4
mov rsi, [rsp+0D8h+var_88]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_416B4:
lea rax, [rsp+0D8h+var_A8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz loc_41774
mov rsi, [rsp+0D8h+var_A8]
loc_416CB:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp loc_41774
loc_416D8:
neg ecx
mov [rsp+0D8h+var_70], ecx
test eax, eax
jnz short loc_416FC
test r13d, r13d
setns sil
cmp r13d, ecx
setl cl
and cl, sil
cmp cl, 1
jnz short loc_416FC
mov [rsp+0D8h+var_70], r13d
loc_416FC:
mov ecx, [rsp+0D8h+var_70]
mov sil, 1
or eax, ecx
jnz short loc_4170F
shr edx, 0Dh
and edx, 1
mov esi, edx
loc_4170F:
lea rax, [rsp+0D8h+var_CC]
mov [rax], sil
movzx edx, sil
add ecx, edx
inc ecx
add r15, rcx
lea rcx, [rsp+0D8h+var_C0]
lea r8, [rsp+0D8h+var_B8]
mov [r8], rcx
mov [r8+8], rax
lea rax, [rsp+0D8h+var_CE]
mov [r8+10h], rax
lea rax, [rsp+0D8h+var_70]
mov [r8+18h], rax
lea rax, [rsp+0D8h+var_CD]
mov [r8+20h], rax
lea rax, [rsp+0D8h+var_C8+4]
mov [r8+28h], rax
lea rax, [rsp+0D8h+var_C8]
mov [r8+30h], rax
mov rdi, r10
mov rsi, r14
mov rdx, r15
mov rcx, r15
call _ZN3fmt3v116detail12write_paddedIcLNS0_5alignE2ENS0_14basic_appenderIcEERZNS1_14do_write_floatIcS5_NS1_9dragonbox10decimal_fpIfEENS1_14digit_groupingIcEEEET0_SC_RKT1_RKNS0_12format_specsENS0_4signEiNS1_10locale_refEEUlS5_E2_EESD_SD_SI_mmOT2_; fmt::v11::detail::write_padded<char,(fmt::v11::align)2,fmt::v11::basic_appender<char>,fmt::v11::detail::do_write_float<char,fmt::v11::basic_appender<char>,fmt::v11::detail::dragonbox::decimal_fp<float>,fmt::v11::detail::digit_grouping<char>>(fmt::v11::basic_appender<char>,fmt::v11::detail::dragonbox::decimal_fp<float> const&,fmt::v11::format_specs const&,fmt::v11::sign,int,fmt::v11::detail::locale_ref)::{lambda(fmt::v11::basic_appender<char>)#4} &>(fmt::v11::detail::dragonbox::decimal_fp<float>,fmt::v11::format_specs const&,ulong,ulong,fmt::v11::detail::do_write_float<char,fmt::v11::basic_appender<char>,fmt::v11::detail::dragonbox::decimal_fp<float>,fmt::v11::detail::digit_grouping<char>>(fmt::v11::basic_appender<char>,fmt::v11::detail::dragonbox::decimal_fp<float> const&,fmt::v11::format_specs const&,fmt::v11::sign,int,fmt::v11::detail::locale_ref)::{lambda(fmt::v11::basic_appender<char>)#4} &)
loc_41771:
mov rbx, rax
loc_41774:
mov rax, rbx
add rsp, 0A8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
lea rdi, [rsp+arg_18]
jmp short loc_4179B
mov rbx, rax
lea rdi, [rsp+arg_60]
loc_4179B:
call _ZN3fmt3v116detail14digit_groupingIcED2Ev; fmt::v11::detail::digit_grouping<char>::~digit_grouping()
mov rdi, rbx
call __Unwind_Resume
| long long fmt::v11::detail::do_write_float<char,fmt::v11::basic_appender<char>,fmt::v11::detail::dragonbox::decimal_fp<float>,fmt::v11::detail::digit_grouping<char>>(
long long a1,
int **a2,
char *a3,
int a4,
int a5,
std::locale *a6)
{
int v6; // ebp
long long v10; // r10
long long v11; // r15
long long v12; // rax
long long v13; // r15
char v14; // al
long long v15; // rsi
int v16; // ecx
unsigned int v17; // edx
int v18; // r13d
char v19; // di
int v20; // r8d
long long v21; // r15
int v22; // r13d
long long v23; // rbx
int v24; // esi
long long v25; // rdi
int v26; // r13d
int v27; // r8d
long long v28; // rcx
bool v29; // cc
long long v30; // r8
long long v31; // rcx
unsigned long long v33; // rcx
long long v34; // rbx
int *v35; // rcx
unsigned __int8 *v36; // rsi
long long v37; // r15
int v38; // r11d
int v39; // r8d
int v40; // r9d
long long v41; // rbx
int *v42; // rdi
long long *v43; // rsi
int v44; // ecx
int v45; // ebx
long long v46; // r13
int v47; // esi
long long v48; // rbp
unsigned __int8 *v49; // rcx
unsigned __int8 *v50; // rsi
long long v51; // r13
int v52; // r10d
int v53; // r8d
int v54; // ecx
bool v55; // si
long long v56; // r15
void *v58; // [rsp+0h] [rbp-D8h]
int v59; // [rsp+8h] [rbp-D0h] BYREF
int v60; // [rsp+Ch] [rbp-CCh] BYREF
long long v61; // [rsp+10h] [rbp-C8h] BYREF
int v62; // [rsp+18h] [rbp-C0h] BYREF
int v63; // [rsp+1Ch] [rbp-BCh] BYREF
int *v64; // [rsp+20h] [rbp-B8h] BYREF
int *v65; // [rsp+28h] [rbp-B0h]
long long *v66; // [rsp+30h] [rbp-A8h] BYREF
int **v67; // [rsp+38h] [rbp-A0h]
int **v68; // [rsp+40h] [rbp-98h]
char *v69; // [rsp+48h] [rbp-90h]
_QWORD v70[3]; // [rsp+50h] [rbp-88h] BYREF
int *v71; // [rsp+68h] [rbp-70h] BYREF
char *v72; // [rsp+70h] [rbp-68h]
_QWORD v73[2]; // [rsp+78h] [rbp-60h] BYREF
_QWORD *v74; // [rsp+88h] [rbp-50h]
int **v75; // [rsp+90h] [rbp-48h]
_QWORD v76[8]; // [rsp+98h] [rbp-40h] BYREF
v6 = (int)a6;
v10 = a1;
v62 = a4;
v11 = *(unsigned int *)a2;
HIDWORD(v61) = v11;
_BitScanReverse((unsigned int *)&v12, v11 | 1);
LODWORD(v61) = (unsigned long long)(fmt::v11::detail::do_count_digits(unsigned int)::table[v12] + v11) >> 32;
v13 = (unsigned int)v61 - ((a4 == 0) - 1);
HIBYTE(v59) = 48;
v14 = 46;
if ( (a3[1] & 0x40) != 0 )
{
v14 = fmt::v11::detail::decimal_point_impl<char>(a6);
v10 = a1;
}
BYTE2(v59) = v14;
v15 = *((unsigned int *)a2 + 1);
v16 = v61 + v15;
v17 = *(_DWORD *)a3;
v18 = *((_DWORD *)a3 + 3);
v19 = *(_DWORD *)a3 & 7;
if ( v19 == 1 )
goto LABEL_15;
v20 = *(_DWORD *)a3 & 7;
if ( v20 != 2 )
{
if ( v16 < -3 )
goto LABEL_15;
if ( v18 > 0 )
a5 = *((_DWORD *)a3 + 3);
if ( v16 > a5 )
{
LABEL_15:
v24 = v61 + v15 - 1;
if ( (v17 & 0x2000) != 0 )
{
v26 = v18 - v61;
v25 = 0LL;
if ( v26 > 0 )
v25 = (unsigned int)v26;
v13 += v25;
}
else
{
LODWORD(v25) = 0;
if ( (_DWORD)v61 == 1 )
BYTE2(v59) = 0;
}
v27 = 1 - v16;
if ( v16 > 0 )
v27 = v24;
v28 = (v27 >= 1000) + 3LL;
v29 = v27 < 100;
v30 = 2LL;
if ( !v29 )
v30 = v28;
v31 = v13 + v30 + 3LL - (BYTE2(v59) == 0);
v64 = (int *)__PAIR64__(HIDWORD(v61), v62);
LODWORD(v65) = v61;
BYTE4(v65) = BYTE2(v59);
LODWORD(v66) = v25;
BYTE4(v66) = 48;
BYTE5(v66) = (32 * ((v17 & 0x1000) == 0)) | 0x45;
LODWORD(v67) = v24;
if ( *((int *)a3 + 2) > 0 )
return fmt::v11::detail::write_padded<char,(fmt::v11::align)2,fmt::v11::basic_appender<char>,fmt::v11::basic_appender<char> fmt::v11::detail::do_write_float<char,fmt::v11::basic_appender<char>,fmt::v11::detail::dragonbox::decimal_fp<float>,fmt::v11::detail::digit_grouping<char>>(fmt::v11::basic_appender<char>,fmt::v11::detail::dragonbox::decimal_fp<float> const&,fmt::v11::format_specs const&,fmt::v11::sign,int,fmt::v11::detail::locale_ref)::{lambda(fmt::v11::basic_appender<char>)#1} &>(
v10,
a3,
v31,
v31,
&v64);
v33 = *(_QWORD *)(v10 + 8) + v31;
if ( *(_QWORD *)(v10 + 16) < v33 )
{
v34 = v10;
(*(void ( **)(long long, unsigned long long))(v10 + 24))(v10, v33);
v10 = v34;
}
return fmt::v11::detail::do_write_float<char,fmt::v11::basic_appender<char>,fmt::v11::detail::dragonbox::decimal_fp<float>,fmt::v11::detail::digit_grouping<char>>(fmt::v11::basic_appender<char>,fmt::v11::detail::dragonbox::decimal_fp<float> const&,fmt::v11::format_specs const&,fmt::v11::sign,int,fmt::v11::detail::locale_ref)::{lambda(fmt::v11::basic_appender<char>)#1}::operator()(
&v64,
v10);
}
}
v63 = v61 + v15;
if ( (int)v15 >= 0 )
{
v21 = v15 + v13;
v22 = v18 - v16;
v60 = v22;
if ( (v17 & 0x2000) == 0 )
goto LABEL_30;
LOBYTE(v16) = v22 > 0 || v19 == 2;
if ( !(_BYTE)v16 )
v60 = 0;
++v21;
if ( v60 > 0 )
{
v23 = v10;
v21 += v60;
}
else
{
LABEL_30:
v23 = v10;
}
ZN3fmt3v116detail14digit_groupingIcEC2INS1_10locale_refETnNSt9enable_ifIXsr3std7is_sameIT_S5_EE5valueEiE4typeELi0EEES7_b(
(int)&v71,
v6,
(v17 >> 14) & 1,
v16,
v20,
(int)a6,
v58,
v59,
v61,
v62,
(int)v64,
(int)v65,
(int)v66,
(long long)v67);
v35 = v71;
v36 = (unsigned __int8 *)&v72[(_QWORD)v71];
v37 = v21 - 1;
v38 = 0;
while ( 1 )
{
v39 = 0x7FFFFFFF;
if ( v75 )
{
if ( v35 == (int *)v36 )
{
v38 += (char)*(v36 - 1);
goto LABEL_37;
}
v40 = *(unsigned __int8 *)v35;
if ( (unsigned __int8)(v40 - 127) >= 0x82u )
{
v35 = (int *)((char *)v35 + 1);
v38 += v40;
LABEL_37:
v39 = v38;
}
}
++v37;
if ( v39 >= v63 )
{
v64 = &v62;
v65 = (int *)&v61 + 1;
v66 = &v61;
v67 = a2;
v68 = &v71;
v69 = a3;
v70[0] = (char *)&v59 + 2;
v70[1] = &v60;
v70[2] = (char *)&v59 + 3;
v41 = fmt::v11::detail::write_padded<char,(fmt::v11::align)2,fmt::v11::basic_appender<char>,fmt::v11::basic_appender<char> fmt::v11::detail::do_write_float<char,fmt::v11::basic_appender<char>,fmt::v11::detail::dragonbox::decimal_fp<float>,fmt::v11::detail::digit_grouping<char>>(fmt::v11::basic_appender<char>,fmt::v11::detail::dragonbox::decimal_fp<float> const&,fmt::v11::format_specs const&,fmt::v11::sign,int,fmt::v11::detail::locale_ref)::{lambda(fmt::v11::basic_appender<char>)#2} &>(
v23,
a3,
v37,
v37);
if ( v74 != v76 )
operator delete(v74, v76[0] + 1LL);
v42 = v71;
if ( v71 != (int *)v73 )
{
v43 = (long long *)v73[0];
goto LABEL_58;
}
return v41;
}
}
}
if ( v16 <= 0 )
{
v54 = -v16;
LODWORD(v71) = v54;
if ( !(_DWORD)v61 && v18 >= 0 && v18 < v54 )
LODWORD(v71) = v18;
v55 = 1;
if ( !((unsigned int)v71 | (unsigned int)v61) )
v55 = (v17 & 0x2000) != 0;
LOBYTE(v60) = v55;
v56 = v55 + (unsigned int)v71 + 1 + v13;
v64 = &v62;
v65 = &v60;
v66 = (long long *)((char *)&v59 + 2);
v67 = &v71;
v68 = (int **)((char *)&v59 + 3);
v69 = (char *)&v61 + 4;
v70[0] = &v61;
return fmt::v11::detail::write_padded<char,(fmt::v11::align)2,fmt::v11::basic_appender<char>,fmt::v11::basic_appender<char> fmt::v11::detail::do_write_float<char,fmt::v11::basic_appender<char>,fmt::v11::detail::dragonbox::decimal_fp<float>,fmt::v11::detail::digit_grouping<char>>(fmt::v11::basic_appender<char>,fmt::v11::detail::dragonbox::decimal_fp<float> const&,fmt::v11::format_specs const&,fmt::v11::sign,int,fmt::v11::detail::locale_ref)::{lambda(fmt::v11::basic_appender<char>)#4} &>(
v10,
a3,
v56,
v56);
}
v44 = (int)(v17 << 18) >> 31;
v45 = 0;
v46 = v44 & (unsigned int)(v18 - v61);
v60 = v46;
if ( (int)v46 <= 0 )
v46 = 0LL;
v47 = v6;
v48 = v10;
ZN3fmt3v116detail14digit_groupingIcEC2INS1_10locale_refETnNSt9enable_ifIXsr3std7is_sameIT_S5_EE5valueEiE4typeELi0EEES7_b(
(int)&v64,
v47,
(v17 >> 14) & 1,
v44,
v20,
(int)a6,
v58,
v59,
v61,
v62,
(int)v64,
(int)v65,
(int)v66,
(long long)v67);
v49 = (unsigned __int8 *)v64;
v50 = (unsigned __int8 *)v65 + (_QWORD)v64;
v51 = v13 + v46;
do
{
v52 = 0x7FFFFFFF;
if ( !v69 )
goto LABEL_53;
if ( v49 == v50 )
{
v45 += (char)*(v50 - 1);
}
else
{
v53 = *v49;
if ( (unsigned __int8)(v53 - 127) < 0x82u )
goto LABEL_53;
++v49;
v45 += v53;
}
v52 = v45;
LABEL_53:
++v51;
}
while ( v52 < v63 );
v71 = &v62;
v72 = (char *)&v61 + 4;
v73[0] = &v61;
v73[1] = &v63;
v74 = (_QWORD *)((char *)&v59 + 2);
v75 = &v64;
v76[0] = &v60;
v76[1] = (char *)&v59 + 3;
v41 = fmt::v11::detail::write_padded<char,(fmt::v11::align)2,fmt::v11::basic_appender<char>,fmt::v11::basic_appender<char> fmt::v11::detail::do_write_float<char,fmt::v11::basic_appender<char>,fmt::v11::detail::dragonbox::decimal_fp<float>,fmt::v11::detail::digit_grouping<char>>(fmt::v11::basic_appender<char>,fmt::v11::detail::dragonbox::decimal_fp<float> const&,fmt::v11::format_specs const&,fmt::v11::sign,int,fmt::v11::detail::locale_ref)::{lambda(fmt::v11::basic_appender<char>)#3} &>(
v48,
a3,
v51,
v51);
if ( v68 != v70 )
operator delete(v68, v70[0] + 1LL);
v42 = v64;
if ( v64 != (int *)&v66 )
{
v43 = v66;
LABEL_58:
operator delete(v42, (unsigned long long)v43 + 1);
}
return v41;
}
| do_write_float<char,fmt::v11::basic_appender<char>,fmt::v11::detail::dragonbox::decimal_fp<float>,fmt::v11::detail::digit_grouping<char>>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xa8
MOV RBP,R9
MOV EBX,R8D
MOV R14,RDX
MOV R12,RSI
MOV R10,RDI
MOV dword ptr [RSP + 0x18],ECX
MOV R15D,dword ptr [RSI]
MOV dword ptr [RSP + 0x14],R15D
MOV EAX,R15D
OR EAX,0x1
BSR EAX,EAX
LEA RDX,[0x393b60]
ADD R15,qword ptr [RDX + RAX*0x8]
SHR R15,0x20
MOV dword ptr [RSP + 0x10],R15D
CMP ECX,0x1
SBB R15D,-0x1
MOV byte ptr [RSP + 0xb],0x30
MOV AL,0x2e
TEST byte ptr [R14 + 0x1],0x40
JZ 0x00141329
MOV RDI,RBP
MOV R13,R10
CALL 0x0013f933
MOV R10,R13
LAB_00141329:
MOV byte ptr [RSP + 0xa],AL
MOV ESI,dword ptr [R12 + 0x4]
MOV EAX,dword ptr [RSP + 0x10]
LEA ECX,[RAX + RSI*0x1]
MOV EDX,dword ptr [R14]
MOV R13D,dword ptr [R14 + 0xc]
MOV EDI,EDX
AND DIL,0x7
CMP DIL,0x1
JZ 0x001413bf
MOV R8D,EDX
AND R8D,0x7
CMP R8D,0x2
JNZ 0x001413af
LAB_00141359:
MOV dword ptr [RSP + 0x1c],ECX
TEST ESI,ESI
JS 0x001415b3
ADD R15,RSI
SUB R13D,ECX
MOV dword ptr [RSP + 0xc],R13D
BT EDX,0xd
JNC 0x001414b1
TEST R13D,R13D
SETG AL
CMP DIL,0x2
SETZ CL
OR CL,AL
JNZ 0x00141393
MOV dword ptr [RSP + 0xc],0x0
LAB_00141393:
INC R15
MOVSXD RAX,dword ptr [RSP + 0xc]
TEST RAX,RAX
JLE 0x001414b1
MOV RBX,R10
ADD R15,RAX
JMP 0x001414b4
LAB_001413af:
CMP ECX,-0x3
JL 0x001413bf
TEST R13D,R13D
CMOVG EBX,R13D
CMP ECX,EBX
JLE 0x00141359
LAB_001413bf:
ADD ESI,EAX
DEC ESI
BT EDX,0xd
JC 0x001413d7
XOR EDI,EDI
CMP EAX,0x1
JNZ 0x001413e6
MOV byte ptr [RSP + 0xa],0x0
JMP 0x001413e6
LAB_001413d7:
SUB R13D,EAX
XOR EDI,EDI
TEST R13D,R13D
CMOVG EDI,R13D
ADD R15,RDI
LAB_001413e6:
MOV R8D,0x1
SUB R8D,ECX
TEST ECX,ECX
CMOVG R8D,ESI
XOR ECX,ECX
CMP R8D,0x3e8
SETGE CL
ADD RCX,0x3
CMP R8D,0x64
MOV R8D,0x2
CMOVGE R8,RCX
MOV R9B,byte ptr [RSP + 0xa]
CMP R9B,0x1
MOV ECX,0x3
SBB RCX,0x0
ADD RCX,R8
ADD RCX,R15
BT EDX,0xc
SETNC DL
SHL DL,0x5
OR DL,0x45
MOV R8D,dword ptr [RSP + 0x18]
MOV dword ptr [RSP + 0x20],R8D
MOV R8D,dword ptr [RSP + 0x14]
MOV dword ptr [RSP + 0x24],R8D
MOV dword ptr [RSP + 0x28],EAX
MOV byte ptr [RSP + 0x2c],R9B
MOV dword ptr [RSP + 0x30],EDI
MOV byte ptr [RSP + 0x34],0x30
MOV byte ptr [RSP + 0x35],DL
MOV dword ptr [RSP + 0x38],ESI
CMP dword ptr [R14 + 0x8],0x0
JLE 0x00141485
LEA R8,[RSP + 0x20]
MOV RDI,R10
MOV RSI,R14
MOV RDX,RCX
CALL 0x00141a90
JMP 0x00141771
LAB_00141485:
ADD RCX,qword ptr [R10 + 0x8]
CMP qword ptr [R10 + 0x10],RCX
JNC 0x0014149f
MOV RDI,R10
MOV RSI,RCX
MOV RBX,R10
CALL qword ptr [R10 + 0x18]
MOV R10,RBX
LAB_0014149f:
LEA RDI,[RSP + 0x20]
MOV RSI,R10
CALL 0x001417a8
JMP 0x00141771
LAB_001414b1:
MOV RBX,R10
LAB_001414b4:
SHR EDX,0xe
AND EDX,0x1
LEA R13,[RSP + 0x68]
MOV RDI,R13
MOV RSI,RBP
CALL 0x00141918
MOV EAX,dword ptr [RSP + 0x1c]
MOV RCX,qword ptr [R13]
MOV RDX,qword ptr [R13 + 0x28]
MOV RSI,qword ptr [R13 + 0x8]
ADD RSI,RCX
DEC R15
XOR R11D,R11D
MOV RDI,RBX
LAB_001414e6:
MOV R8D,0x7fffffff
TEST RDX,RDX
JZ 0x00141517
CMP RCX,RSI
JZ 0x0014150c
MOVZX R9D,byte ptr [RCX]
LEA R10D,[R9 + -0x7f]
CMP R10B,0x82
JC 0x00141517
INC RCX
ADD R11D,R9D
JMP 0x00141514
LAB_0014150c:
MOVSX R8D,byte ptr [RSI + -0x1]
ADD R11D,R8D
LAB_00141514:
MOV R8D,R11D
LAB_00141517:
INC R15
CMP R8D,EAX
JL 0x001414e6
LEA RAX,[RSP + 0x18]
LEA R8,[RSP + 0x20]
MOV qword ptr [R8],RAX
LEA RAX,[RSP + 0x14]
MOV qword ptr [R8 + 0x8],RAX
LEA RAX,[RSP + 0x10]
MOV qword ptr [R8 + 0x10],RAX
MOV qword ptr [R8 + 0x18],R12
MOV qword ptr [R8 + 0x20],R13
MOV qword ptr [R8 + 0x28],R14
LEA RAX,[RSP + 0xa]
MOV qword ptr [R8 + 0x30],RAX
LEA RAX,[RSP + 0xc]
MOV qword ptr [R8 + 0x38],RAX
LEA RAX,[RSP + 0xb]
MOV qword ptr [R8 + 0x40],RAX
LAB_00141565:
MOV RSI,R14
MOV RDX,R15
MOV RCX,R15
CALL 0x00141cd7
LAB_00141573:
MOV RBX,RAX
LEA RAX,[RSP + 0x98]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00141597
MOV RSI,qword ptr [RSP + 0x98]
INC RSI
CALL 0x0010fa70
LAB_00141597:
LEA RAX,[RSP + 0x78]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00141774
MOV RSI,qword ptr [RSP + 0x78]
JMP 0x001416cb
LAB_001415b3:
TEST ECX,ECX
JLE 0x001416d8
MOV ECX,EDX
SHL ECX,0x12
SAR ECX,0x1f
SUB R13D,EAX
XOR EBX,EBX
AND R13D,ECX
MOV dword ptr [RSP + 0xc],R13D
CMOVLE R13D,EBX
SHR EDX,0xe
AND EDX,0x1
LEA R12,[RSP + 0x20]
MOV RDI,R12
MOV RSI,RBP
MOV RBP,R10
CALL 0x00141918
MOV RDI,RBP
MOV EAX,dword ptr [RSP + 0x1c]
MOV RCX,qword ptr [R12]
MOV RDX,qword ptr [R12 + 0x28]
MOV RSI,qword ptr [R12 + 0x8]
ADD RSI,RCX
ADD R13,R15
LAB_00141608:
MOV R10D,0x7fffffff
TEST RDX,RDX
JZ 0x00141639
CMP RCX,RSI
JZ 0x0014162e
MOVZX R8D,byte ptr [RCX]
LEA R9D,[R8 + -0x7f]
CMP R9B,0x82
JC 0x00141639
INC RCX
ADD EBX,R8D
JMP 0x00141636
LAB_0014162e:
MOVSX R8D,byte ptr [RSI + -0x1]
ADD EBX,R8D
LAB_00141636:
MOV R10D,EBX
LAB_00141639:
INC R13
CMP R10D,EAX
JL 0x00141608
LEA RAX,[RSP + 0x18]
LEA R8,[RSP + 0x68]
MOV qword ptr [R8],RAX
LEA RAX,[RSP + 0x14]
MOV qword ptr [R8 + 0x8],RAX
LEA RAX,[RSP + 0x10]
MOV qword ptr [R8 + 0x10],RAX
LEA RAX,[RSP + 0x1c]
MOV qword ptr [R8 + 0x18],RAX
LEA RAX,[RSP + 0xa]
MOV qword ptr [R8 + 0x20],RAX
MOV qword ptr [R8 + 0x28],R12
LEA RAX,[RSP + 0xc]
MOV qword ptr [R8 + 0x30],RAX
LEA RAX,[RSP + 0xb]
MOV qword ptr [R8 + 0x38],RAX
LAB_00141688:
MOV RSI,R14
MOV RDX,R13
MOV RCX,R13
CALL 0x001421c3
LAB_00141696:
MOV RBX,RAX
LEA RAX,[RSP + 0x50]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001416b4
MOV RSI,qword ptr [RSP + 0x50]
INC RSI
CALL 0x0010fa70
LAB_001416b4:
LEA RAX,[RSP + 0x30]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00141774
MOV RSI,qword ptr [RSP + 0x30]
LAB_001416cb:
INC RSI
CALL 0x0010fa70
JMP 0x00141774
LAB_001416d8:
NEG ECX
MOV dword ptr [RSP + 0x68],ECX
TEST EAX,EAX
JNZ 0x001416fc
TEST R13D,R13D
SETNS SIL
CMP R13D,ECX
SETL CL
AND CL,SIL
CMP CL,0x1
JNZ 0x001416fc
MOV dword ptr [RSP + 0x68],R13D
LAB_001416fc:
MOV ECX,dword ptr [RSP + 0x68]
MOV SIL,0x1
OR EAX,ECX
JNZ 0x0014170f
SHR EDX,0xd
AND EDX,0x1
MOV ESI,EDX
LAB_0014170f:
LEA RAX,[RSP + 0xc]
MOV byte ptr [RAX],SIL
MOVZX EDX,SIL
ADD ECX,EDX
INC ECX
ADD R15,RCX
LEA RCX,[RSP + 0x18]
LEA R8,[RSP + 0x20]
MOV qword ptr [R8],RCX
MOV qword ptr [R8 + 0x8],RAX
LEA RAX,[RSP + 0xa]
MOV qword ptr [R8 + 0x10],RAX
LEA RAX,[RSP + 0x68]
MOV qword ptr [R8 + 0x18],RAX
LEA RAX,[RSP + 0xb]
MOV qword ptr [R8 + 0x20],RAX
LEA RAX,[RSP + 0x14]
MOV qword ptr [R8 + 0x28],RAX
LEA RAX,[RSP + 0x10]
MOV qword ptr [R8 + 0x30],RAX
MOV RDI,R10
MOV RSI,R14
MOV RDX,R15
MOV RCX,R15
CALL 0x0014252e
LAB_00141771:
MOV RBX,RAX
LAB_00141774:
MOV RAX,RBX
ADD RSP,0xa8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Type propagation algorithm not settling */
/* fmt::v11::basic_appender<char> fmt::v11::detail::do_write_float<char,
fmt::v11::basic_appender<char>, fmt::v11::detail::dragonbox::decimal_fp<float>,
fmt::v11::detail::digit_grouping<char> >(fmt::v11::basic_appender<char>,
fmt::v11::detail::dragonbox::decimal_fp<float> const&, fmt::v11::format_specs const&,
fmt::v11::sign, int, fmt::v11::detail::locale_ref) */
int8
fmt::v11::detail::
do_write_float<char,fmt::v11::basic_appender<char>,fmt::v11::detail::dragonbox::decimal_fp<float>,fmt::v11::detail::digit_grouping<char>>
(long param_1,uint *param_2,uint *param_3,int param_4,uint param_5,int8 param_6)
{
uint uVar1;
uint uVar2;
int8 uVar3;
ulong uVar4;
int **ppiVar5;
int *piVar6;
byte bVar7;
ulong uVar8;
uint uVar9;
int iVar10;
int iVar11;
long lVar12;
int1 auStack_ce [6];
int8 uStack_c8;
int local_c0;
int iStack_bc;
int8 uStack_b8;
int8 uStack_b0;
int8 uStack_a8;
int ***pppiStack_a0;
int ***pppiStack_98;
uint *puStack_90;
int **ppiStack_88;
int1 *puStack_80;
int1 *puStack_78;
int **ppiStack_70;
long lStack_68;
int *piStack_60;
long lStack_58;
uint **ppuStack_50;
int8 *puStack_48;
uint *puStack_40;
int1 *puStack_38;
uStack_c8._4_4_ = *param_2;
uVar9 = 0x1f;
if ((uStack_c8._4_4_ | 1) != 0) {
for (; (uStack_c8._4_4_ | 1) >> uVar9 == 0; uVar9 = uVar9 - 1) {
}
}
uStack_c8._0_4_ =
(int)((ulong)uStack_c8._4_4_ +
*(long *)(do_count_digits(unsigned_int)::table + (ulong)uVar9 * 8) >> 0x20);
uVar4 = (ulong)(((int)uStack_c8 + 1) - (uint)(param_4 == 0));
auStack_ce[1] = 0x30;
auStack_ce[0] = '.';
local_c0 = param_4;
if ((*param_3 & 0x4000) != 0) {
auStack_ce[0] = decimal_point_impl<char>(param_6);
}
piVar6 = uStack_a8;
uVar9 = param_2[1];
iStack_bc = (int)uStack_c8 + uVar9;
uVar1 = *param_3;
uVar2 = param_3[3];
bVar7 = (byte)uVar1 & 7;
if (bVar7 != 1) {
if ((uVar1 & 7) == 2) {
LAB_00141359:
if ((int)uVar9 < 0) {
if (iStack_bc < 1) {
ppiStack_70 = (int **)CONCAT44(ppiStack_70._4_4_,-iStack_bc);
if (((int)uStack_c8 == 0) &&
(SBORROW4(uVar2,-iStack_bc) != (int)(uVar2 + iStack_bc) < 0 && -1 < (int)uVar2)) {
ppiStack_70 = (int **)CONCAT44(ppiStack_70._4_4_,uVar2);
}
uVar9 = 1;
if ((int)uStack_c8 == 0 && (int)ppiStack_70 == 0) {
uVar9 = uVar1 >> 0xd & 1;
}
uStack_b0 = auStack_ce + 2;
auStack_ce[2] = (char)uVar9;
lVar12 = uVar4 + ((int)ppiStack_70 + uVar9 + 1);
uStack_b8 = (int **)&local_c0;
uStack_a8 = (int *)auStack_ce;
pppiStack_a0 = &ppiStack_70;
pppiStack_98 = (int ***)(auStack_ce + 1);
puStack_90 = (uint *)((long)&uStack_c8 + 4);
ppiStack_88 = (int **)&uStack_c8;
uVar3 = write_padded<char,(fmt::v11::align)2,fmt::v11::basic_appender<char>,fmt::v11::detail::do_write_float<char,fmt::v11::basic_appender<char>,fmt::v11::detail::dragonbox::decimal_fp<float>,fmt::v11::detail::digit_grouping<char>>(fmt::v11::basic_appender<char>,fmt::v11::detail::dragonbox::decimal_fp<float>const&,fmt::v11::format_specs_const&,fmt::v11::sign,int,fmt::v11::detail::locale_ref)::_lambda(fmt::v11::basic_appender<char>)_4_&>
(param_1,param_3,lVar12,lVar12);
return uVar3;
}
iVar11 = 0;
auStack_ce._2_4_ = uVar2 - (int)uStack_c8 & (int)(uVar1 << 0x12) >> 0x1f;
uVar9 = auStack_ce._2_4_;
if ((int)auStack_ce._2_4_ < 1) {
uVar9 = 0;
}
_ZN3fmt3v116detail14digit_groupingIcEC2INS1_10locale_refETnNSt9enable_ifIXsr3std7is_sameIT_S5_EE5valueEiE4typeELi0EEES7_b
(&uStack_b8,param_6,uVar1 >> 0xe & 1);
lVar12 = uVar9 + uVar4;
ppiVar5 = uStack_b8;
do {
iVar10 = 0x7fffffff;
if (puStack_90 != (uint *)0x0) {
if (ppiVar5 == (int **)((long)uStack_b0 + (long)uStack_b8)) {
uVar9 = (uint)(char)*(byte *)((long)uStack_b0 + (long)uStack_b8 + -1);
}
else {
bVar7 = *(byte *)ppiVar5;
if ((byte)(bVar7 + 0x81) < 0x82) goto LAB_00141639;
ppiVar5 = (int **)((long)ppiVar5 + 1);
uVar9 = (uint)bVar7;
}
iVar11 = iVar11 + uVar9;
iVar10 = iVar11;
}
LAB_00141639:
lVar12 = lVar12 + 1;
} while (iVar10 < iStack_bc);
ppiStack_70 = (int **)&local_c0;
lStack_68 = (long)&uStack_c8 + 4;
piStack_60 = (int *)&uStack_c8;
lStack_58 = (long)&iStack_bc;
ppuStack_50 = (uint **)auStack_ce;
puStack_40 = (uint *)(auStack_ce + 2);
puStack_38 = auStack_ce + 1;
puStack_48 = &uStack_b8;
/* try { // try from 00141688 to 00141695 has its CatchHandler @ 00141789 */
uVar3 = write_padded<char,(fmt::v11::align)2,fmt::v11::basic_appender<char>,fmt::v11::detail::do_write_float<char,fmt::v11::basic_appender<char>,fmt::v11::detail::dragonbox::decimal_fp<float>,fmt::v11::detail::digit_grouping<char>>(fmt::v11::basic_appender<char>,fmt::v11::detail::dragonbox::decimal_fp<float>const&,fmt::v11::format_specs_const&,fmt::v11::sign,int,fmt::v11::detail::locale_ref)::_lambda(fmt::v11::basic_appender<char>)_3_&>
(param_1,param_3,lVar12,lVar12);
if (pppiStack_98 != &ppiStack_88) {
operator_delete(pppiStack_98,(ulong)((long)ppiStack_88 + 1));
}
piVar6 = uStack_a8;
ppiVar5 = uStack_b8;
if (uStack_b8 == (int **)&uStack_a8) {
return uVar3;
}
}
else {
lVar12 = uVar4 + uVar9;
auStack_ce._2_4_ = uVar2 - iStack_bc;
if ((uVar1 >> 0xd & 1) != 0) {
if (bVar7 != 2 && (int)auStack_ce._2_4_ < 1) {
auStack_ce._2_4_ = 0;
}
lVar12 = lVar12 + 1;
if (0 < (long)(int)auStack_ce._2_4_) {
lVar12 = lVar12 + (int)auStack_ce._2_4_;
}
}
_ZN3fmt3v116detail14digit_groupingIcEC2INS1_10locale_refETnNSt9enable_ifIXsr3std7is_sameIT_S5_EE5valueEiE4typeELi0EEES7_b
(&ppiStack_70,param_6,uVar1 >> 0xe & 1);
lVar12 = lVar12 + -1;
iVar11 = 0;
ppiVar5 = ppiStack_70;
do {
iVar10 = 0x7fffffff;
if (puStack_48 != (int8 *)0x0) {
if (ppiVar5 == (int **)(lStack_68 + (long)ppiStack_70)) {
uVar9 = (uint)(char)*(byte *)(lStack_68 + (long)ppiStack_70 + -1);
}
else {
bVar7 = *(byte *)ppiVar5;
if ((byte)(bVar7 + 0x81) < 0x82) goto LAB_00141517;
ppiVar5 = (int **)((long)ppiVar5 + 1);
uVar9 = (uint)bVar7;
}
iVar11 = iVar11 + uVar9;
iVar10 = iVar11;
}
LAB_00141517:
lVar12 = lVar12 + 1;
} while (iVar10 < iStack_bc);
uStack_b8 = (int **)&local_c0;
uStack_b0 = (int1 *)((long)&uStack_c8 + 4);
uStack_a8 = (int *)&uStack_c8;
ppiStack_88 = (int **)auStack_ce;
puStack_80 = auStack_ce + 2;
puStack_78 = auStack_ce + 1;
pppiStack_a0 = (int ***)param_2;
pppiStack_98 = &ppiStack_70;
puStack_90 = param_3;
/* try { // try from 00141565 to 00141572 has its CatchHandler @ 00141793 */
uVar3 = write_padded<char,(fmt::v11::align)2,fmt::v11::basic_appender<char>,fmt::v11::detail::do_write_float<char,fmt::v11::basic_appender<char>,fmt::v11::detail::dragonbox::decimal_fp<float>,fmt::v11::detail::digit_grouping<char>>(fmt::v11::basic_appender<char>,fmt::v11::detail::dragonbox::decimal_fp<float>const&,fmt::v11::format_specs_const&,fmt::v11::sign,int,fmt::v11::detail::locale_ref)::_lambda(fmt::v11::basic_appender<char>)_2_&>
(param_1,param_3,lVar12,lVar12);
if (ppuStack_50 != &puStack_40) {
operator_delete(ppuStack_50,(ulong)((long)puStack_40 + 1));
}
piVar6 = piStack_60;
ppiVar5 = ppiStack_70;
if (ppiStack_70 == &piStack_60) {
return uVar3;
}
}
operator_delete(ppiVar5,(long)piVar6 + 1);
return uVar3;
}
if (-4 < iStack_bc) {
if (0 < (int)uVar2) {
param_5 = uVar2;
}
if (iStack_bc <= (int)param_5) goto LAB_00141359;
}
}
iVar11 = uVar9 + (int)uStack_c8 + -1;
if ((uVar1 >> 0xd & 1) == 0) {
uVar8 = 0;
if ((int)uStack_c8 == 1) {
auStack_ce[0] = '\0';
}
}
else {
uVar8 = 0;
if (0 < (int)(uVar2 - (int)uStack_c8)) {
uVar8 = (ulong)(uVar2 - (int)uStack_c8);
}
uVar4 = uVar4 + uVar8;
}
iVar10 = 1 - iStack_bc;
if (0 < iStack_bc) {
iVar10 = iVar11;
}
lVar12 = 2;
if (99 < iVar10) {
lVar12 = (ulong)(999 < iVar10) + 3;
}
lVar12 = (3 - (ulong)(auStack_ce[0] == '\0')) + lVar12 + uVar4;
uStack_b8 = (int **)CONCAT44(uStack_c8._4_4_,local_c0);
uStack_b0._0_5_ = CONCAT14(auStack_ce[0],(int)uStack_c8);
uStack_a8._0_5_ = CONCAT14(0x30,(int)uVar8);
uStack_a8._6_2_ = SUB82(piVar6,6);
uStack_a8 = (int *)(CONCAT26(uStack_a8._6_2_,
CONCAT15(((uVar1 >> 0xc & 1) == 0) << 5,(int5)uStack_a8)) |
0x450000000000);
pppiStack_a0 = (int ***)CONCAT44(pppiStack_a0._4_4_,iVar11);
if ((int)param_3[2] < 1) {
uVar4 = lVar12 + *(long *)(param_1 + 8);
if (*(ulong *)(param_1 + 0x10) < uVar4) {
(**(code **)(param_1 + 0x18))(param_1,uVar4);
}
uVar3 = do_write_float<char,fmt::v11::basic_appender<char>,fmt::v11::detail::dragonbox::decimal_fp<float>,fmt::v11::detail::digit_grouping<char>>(fmt::v11::basic_appender<char>,fmt::v11::detail::dragonbox::decimal_fp<float>const&,fmt::v11::format_specs_const&,fmt::v11::sign,int,fmt::v11::detail::locale_ref)
::{lambda(fmt::v11::basic_appender<char>)#1}::operator()
((_lambda_fmt__v11__basic_appender<char>__1_ *)&uStack_b8,param_1);
}
else {
uVar3 = write_padded<char,(fmt::v11::align)2,fmt::v11::basic_appender<char>,fmt::v11::detail::do_write_float<char,fmt::v11::basic_appender<char>,fmt::v11::detail::dragonbox::decimal_fp<float>,fmt::v11::detail::digit_grouping<char>>(fmt::v11::basic_appender<char>,fmt::v11::detail::dragonbox::decimal_fp<float>const&,fmt::v11::format_specs_const&,fmt::v11::sign,int,fmt::v11::detail::locale_ref)::_lambda(fmt::v11::basic_appender<char>)_1_&>
(param_1,param_3,lVar12,lVar12,&uStack_b8);
}
return uVar3;
}
|
|
3,485 | translog_get_sent_to_disk | eloqsql/storage/maria/ma_loghandler.c | static LSN translog_get_sent_to_disk()
{
register LSN lsn;
DBUG_ENTER("translog_get_sent_to_disk");
mysql_mutex_lock(&log_descriptor.sent_to_disk_lock);
lsn= log_descriptor.sent_to_disk;
DBUG_PRINT("info", ("sent to disk up to " LSN_FMT, LSN_IN_PARTS(lsn)));
mysql_mutex_unlock(&log_descriptor.sent_to_disk_lock);
DBUG_RETURN(lsn);
} | O3 | c | translog_get_sent_to_disk:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
cmpq $0x0, 0xbaf296(%rip) # 0xbff4c0
jne 0x50261
leaq 0xbaf24d(%rip), %rdi # 0xbff480
callq 0x29220
movq 0xbaf221(%rip), %rbx # 0xbff460
movq 0xbaf27a(%rip), %rdi # 0xbff4c0
testq %rdi, %rdi
jne 0x50268
leaq 0xbaf22e(%rip), %rdi # 0xbff480
callq 0x291e0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
callq 0x2ceeb
jmp 0x50238
leaq 0x335da1(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x5024b
| translog_get_sent_to_disk:
push rbp
mov rbp, rsp
push rbx
push rax
cmp cs:qword_BFF4C0, 0
jnz short loc_50261
lea rdi, unk_BFF480
call _pthread_mutex_lock
loc_50238:
mov rbx, cs:qword_BFF460
mov rdi, cs:qword_BFF4C0
test rdi, rdi
jnz short loc_50268
loc_5024B:
lea rdi, unk_BFF480
call _pthread_mutex_unlock
mov rax, rbx
add rsp, 8
pop rbx
pop rbp
retn
loc_50261:
call translog_get_sent_to_disk_cold_1
jmp short loc_50238
loc_50268:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_5024B
| long long translog_get_sent_to_disk(long long a1)
{
long long v1; // rbx
if ( qword_BFF4C0 )
translog_get_sent_to_disk_cold_1(a1);
else
pthread_mutex_lock(&unk_BFF480);
v1 = qword_BFF460;
if ( qword_BFF4C0 )
((void ( *)(long long))PSI_server[44])(qword_BFF4C0);
pthread_mutex_unlock(&unk_BFF480);
return v1;
}
| translog_get_sent_to_disk:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
CMP qword ptr [0x00cff4c0],0x0
JNZ 0x00150261
LEA RDI,[0xcff480]
CALL 0x00129220
LAB_00150238:
MOV RBX,qword ptr [0x00cff460]
MOV RDI,qword ptr [0x00cff4c0]
TEST RDI,RDI
JNZ 0x00150268
LAB_0015024b:
LEA RDI,[0xcff480]
CALL 0x001291e0
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP RBP
RET
LAB_00150261:
CALL 0x0012ceeb
JMP 0x00150238
LAB_00150268:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x0015024b
|
int8 translog_get_sent_to_disk(void)
{
int8 uVar1;
if (DAT_00cff4c0 == 0) {
pthread_mutex_lock((pthread_mutex_t *)&DAT_00cff480);
}
else {
translog_get_sent_to_disk_cold_1();
}
uVar1 = DAT_00cff460;
if (DAT_00cff4c0 != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock((pthread_mutex_t *)&DAT_00cff480);
return uVar1;
}
|
|
3,486 | my_fill_mb2 | eloqsql/strings/ctype-ucs2.c | static void
my_fill_mb2(CHARSET_INFO *cs, char *s, size_t slen, int fill)
{
char buf[10], *last;
size_t buflen, remainder;
DBUG_ASSERT((slen % 2) == 0);
buflen= my_ci_wc_mb(cs, (my_wc_t) fill, (uchar*) buf,
(uchar*) buf + sizeof(buf));
DBUG_ASSERT(buflen > 0);
/*
"last" in the last position where a sequence of "buflen" bytes can start.
*/
for (last= s + slen - buflen; s <= last; s+= buflen)
{
/* Enough space for the character */
memcpy(s, buf, buflen);
}
/*
If there are some more space which is not enough
for the whole multibyte character, then add trailing zeros.
*/
if ((remainder= last + buflen - s) > 0)
bzero(s, (size_t) remainder);
} | O3 | c | my_fill_mb2:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq 0xb8(%rdi), %rax
movslq %ecx, %rsi
leaq -0x30(%rbp), %rcx
leaq -0x3a(%rbp), %rdx
callq *0x30(%rax)
movslq %eax, %r15
addq %r14, %rbx
movq %rbx, %r13
subq %r15, %r13
cmpq %r14, %r13
jb 0xe3227
leaq -0x3a(%rbp), %r12
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x2a0b0
addq %r15, %r14
cmpq %r13, %r14
jbe 0xe3211
subq %r14, %rbx
je 0xe3239
movq %r14, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x2a2e0
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0xe3257
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2a280
| my_fill_mb2:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdx
mov r14, rsi
mov rax, fs:28h
mov [rbp+var_30], rax
mov rax, [rdi+0B8h]
movsxd rsi, ecx
lea rcx, [rbp+var_30]
lea rdx, [rbp+var_3A]
call qword ptr [rax+30h]
movsxd r15, eax
add rbx, r14
mov r13, rbx
sub r13, r15
cmp r13, r14
jb short loc_E3227
lea r12, [rbp+var_3A]
loc_E3211:
mov rdi, r14
mov rsi, r12
mov rdx, r15
call _memcpy
add r14, r15
cmp r14, r13
jbe short loc_E3211
loc_E3227:
sub rbx, r14
jz short loc_E3239
mov rdi, r14
xor esi, esi
mov rdx, rbx
call _memset
loc_E3239:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_E3257
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_E3257:
call ___stack_chk_fail
| unsigned long long my_fill_mb2(long long a1, unsigned long long a2, long long a3, int a4)
{
unsigned long long v5; // r14
long long v6; // r15
long long v7; // rbx
long long v8; // rbx
_BYTE v10[10]; // [rsp+6h] [rbp-3Ah] BYREF
unsigned long long v11[6]; // [rsp+10h] [rbp-30h] BYREF
v5 = a2;
v11[0] = __readfsqword(0x28u);
v6 = (*(int ( **)(long long, _QWORD, _BYTE *, unsigned long long *))(*(_QWORD *)(a1 + 184) + 48LL))(
a1,
a4,
v10,
v11);
v7 = a2 + a3;
if ( v7 - v6 >= a2 )
{
do
{
memcpy(v5, v10, v6);
v5 += v6;
}
while ( v5 <= v7 - v6 );
}
v8 = v7 - v5;
if ( v8 )
memset(v5, 0LL, v8);
return __readfsqword(0x28u);
}
| my_fill_mb2:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDX
MOV R14,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RDI + 0xb8]
MOVSXD RSI,ECX
LEA RCX,[RBP + -0x30]
LEA RDX,[RBP + -0x3a]
CALL qword ptr [RAX + 0x30]
MOVSXD R15,EAX
ADD RBX,R14
MOV R13,RBX
SUB R13,R15
CMP R13,R14
JC 0x001e3227
LEA R12,[RBP + -0x3a]
LAB_001e3211:
MOV RDI,R14
MOV RSI,R12
MOV RDX,R15
CALL 0x0012a0b0
ADD R14,R15
CMP R14,R13
JBE 0x001e3211
LAB_001e3227:
SUB RBX,R14
JZ 0x001e3239
MOV RDI,R14
XOR ESI,ESI
MOV RDX,RBX
CALL 0x0012a2e0
LAB_001e3239:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x001e3257
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001e3257:
CALL 0x0012a280
|
void my_fill_mb2(long param_1,void *param_2,long param_3,int param_4)
{
int iVar1;
void *pvVar2;
void *__dest;
size_t sVar3;
long in_FS_OFFSET;
int1 local_42 [10];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
iVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x30))(param_1,(long)param_4,local_42,&local_38);
sVar3 = (size_t)iVar1;
pvVar2 = (void *)((long)param_2 + (param_3 - sVar3));
__dest = param_2;
if (param_2 <= pvVar2) {
do {
memcpy(__dest,local_42,sVar3);
__dest = (void *)((long)__dest + sVar3);
} while (__dest <= pvVar2);
}
sVar3 = (long)param_2 + (param_3 - (long)__dest);
if (sVar3 != 0) {
memset(__dest,0,sVar3);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
3,487 | PickleTensorReader::read_global(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | 7CodeWizard[P]stablediffusion/model.cpp | void read_global(const std::string& str) {
if (str == "FloatStorage") {
if (read_global_type) {
global_type = GGML_TYPE_F32;
read_global_type = false;
}
tensor_storage.type = GGML_TYPE_F32;
} else if (str == "HalfStorage") {
if (read_global_type) {
global_type = GGML_TYPE_F16;
read_global_type = false;
}
tensor_storage.type = GGML_TYPE_F16;
}
} | O0 | cpp | PickleTensorReader::read_global(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq 0x8(%rsp), %rdi
leaq 0xc0112(%rip), %rsi # 0x184485
callq 0x301e0
testb $0x1, %al
jne 0xc437e
jmp 0xc43a5
testb $0x1, 0x195b97(%rip) # 0x259f1c
je 0xc4398
movl $0x0, 0x195b87(%rip) # 0x259f18
movb $0x0, 0x195b84(%rip) # 0x259f1c
movq (%rsp), %rax
movl $0x0, 0x38(%rax)
jmp 0xc43e3
movq 0x8(%rsp), %rdi
leaq 0xc00e1(%rip), %rsi # 0x184492
callq 0x301e0
testb $0x1, %al
jne 0xc43bc
jmp 0xc43e1
testb $0x1, 0x195b59(%rip) # 0x259f1c
je 0xc43d6
movl $0x1, 0x195b49(%rip) # 0x259f18
movb $0x0, 0x195b46(%rip) # 0x259f1c
movq (%rsp), %rax
movl $0x1, 0x38(%rax)
jmp 0xc43e3
addq $0x18, %rsp
retq
nopl (%rax,%rax)
| _ZN18PickleTensorReader11read_globalERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov [rsp+18h+var_10], rsi
mov rax, [rsp+18h+var_8]
mov [rsp+18h+var_18], rax
mov rdi, [rsp+18h+var_10]
lea rsi, aFloatstorage; "FloatStorage"
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, 1
jnz short loc_C437E
jmp short loc_C43A5
loc_C437E:
test cs:_ZN18PickleTensorReader16read_global_typeE, 1; PickleTensorReader::read_global_type
jz short loc_C4398
mov cs:_ZN18PickleTensorReader11global_typeE, 0; PickleTensorReader::global_type
mov cs:_ZN18PickleTensorReader16read_global_typeE, 0; PickleTensorReader::read_global_type
loc_C4398:
mov rax, [rsp+18h+var_18]
mov dword ptr [rax+38h], 0
jmp short loc_C43E3
loc_C43A5:
mov rdi, [rsp+18h+var_10]
lea rsi, aHalfstorage; "HalfStorage"
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, 1
jnz short loc_C43BC
jmp short loc_C43E1
loc_C43BC:
test cs:_ZN18PickleTensorReader16read_global_typeE, 1; PickleTensorReader::read_global_type
jz short loc_C43D6
mov cs:_ZN18PickleTensorReader11global_typeE, 1; PickleTensorReader::global_type
mov cs:_ZN18PickleTensorReader16read_global_typeE, 0; PickleTensorReader::read_global_type
loc_C43D6:
mov rax, [rsp+18h+var_18]
mov dword ptr [rax+38h], 1
loc_C43E1:
jmp short $+2
loc_C43E3:
add rsp, 18h
retn
| bool PickleTensorReader::read_global(long long a1, long long a2)
{
bool result; // al
if ( std::operator==<char>(a2, (long long)"FloatStorage") )
{
if ( (PickleTensorReader::read_global_type & 1) != 0 )
{
PickleTensorReader::global_type = 0;
PickleTensorReader::read_global_type = 0;
}
result = a1;
*(_DWORD *)(a1 + 56) = 0;
}
else
{
result = std::operator==<char>(a2, (long long)"HalfStorage");
if ( result )
{
if ( (PickleTensorReader::read_global_type & 1) != 0 )
{
PickleTensorReader::global_type = 1;
PickleTensorReader::read_global_type = 0;
}
result = a1;
*(_DWORD *)(a1 + 56) = 1;
}
}
return result;
}
| read_global:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV qword ptr [RSP + 0x8],RSI
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP],RAX
MOV RDI,qword ptr [RSP + 0x8]
LEA RSI,[0x284485]
CALL 0x001301e0
TEST AL,0x1
JNZ 0x001c437e
JMP 0x001c43a5
LAB_001c437e:
TEST byte ptr [0x00359f1c],0x1
JZ 0x001c4398
MOV dword ptr [0x00359f18],0x0
MOV byte ptr [0x00359f1c],0x0
LAB_001c4398:
MOV RAX,qword ptr [RSP]
MOV dword ptr [RAX + 0x38],0x0
JMP 0x001c43e3
LAB_001c43a5:
MOV RDI,qword ptr [RSP + 0x8]
LEA RSI,[0x284492]
CALL 0x001301e0
TEST AL,0x1
JNZ 0x001c43bc
JMP 0x001c43e1
LAB_001c43bc:
TEST byte ptr [0x00359f1c],0x1
JZ 0x001c43d6
MOV dword ptr [0x00359f18],0x1
MOV byte ptr [0x00359f1c],0x0
LAB_001c43d6:
MOV RAX,qword ptr [RSP]
MOV dword ptr [RAX + 0x38],0x1
LAB_001c43e1:
JMP 0x001c43e3
LAB_001c43e3:
ADD RSP,0x18
RET
|
/* PickleTensorReader::read_global(std::__cxx11::string const&) */
void __thiscall PickleTensorReader::read_global(PickleTensorReader *this,string *param_1)
{
bool bVar1;
bVar1 = std::operator==(param_1,"FloatStorage");
if (bVar1) {
if ((read_global_type & 1) != 0) {
global_type = 0;
read_global_type = 0;
}
*(int4 *)(this + 0x38) = 0;
}
else {
bVar1 = std::operator==(param_1,"HalfStorage");
if (bVar1) {
if ((read_global_type & 1) != 0) {
global_type = 1;
read_global_type = 0;
}
*(int4 *)(this + 0x38) = 1;
}
}
return;
}
|
|
3,488 | PickleTensorReader::read_global(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | 7CodeWizard[P]stablediffusion/model.cpp | void read_global(const std::string& str) {
if (str == "FloatStorage") {
if (read_global_type) {
global_type = GGML_TYPE_F32;
read_global_type = false;
}
tensor_storage.type = GGML_TYPE_F32;
} else if (str == "HalfStorage") {
if (read_global_type) {
global_type = GGML_TYPE_F16;
read_global_type = false;
}
tensor_storage.type = GGML_TYPE_F16;
}
} | O1 | cpp | PickleTensorReader::read_global(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x5472c(%rip), %rsi # 0xc23f1
movq %r14, %rdi
callq 0xa150
testl %eax, %eax
je 0x6dcf4
leaq 0x54726(%rip), %rsi # 0xc23fe
movq %r14, %rdi
callq 0xa150
testl %eax, %eax
jne 0x6dd0f
movl $0x1, %eax
cmpb $0x1, 0x10a4fc(%rip) # 0x1781ec
je 0x6dcff
jmp 0x6dd0c
xorl %eax, %eax
cmpb $0x0, 0x10a4ef(%rip) # 0x1781ec
je 0x6dd0c
movl %eax, 0x10a4e3(%rip) # 0x1781e8
movb $0x0, 0x10a4e0(%rip) # 0x1781ec
movl %eax, 0x38(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
| _ZN18PickleTensorReader11read_globalERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
lea rsi, aFloatstorage; "FloatStorage"
mov rdi, r14
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_6DCF4
lea rsi, aHalfstorage; "HalfStorage"
mov rdi, r14
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jnz short loc_6DD0F
mov eax, 1
cmp cs:_ZN18PickleTensorReader16read_global_typeE, 1; PickleTensorReader::read_global_type
jz short loc_6DCFF
jmp short loc_6DD0C
loc_6DCF4:
xor eax, eax
cmp cs:_ZN18PickleTensorReader16read_global_typeE, 0; PickleTensorReader::read_global_type
jz short loc_6DD0C
loc_6DCFF:
mov cs:_ZN18PickleTensorReader11global_typeE, eax; PickleTensorReader::global_type
mov cs:_ZN18PickleTensorReader16read_global_typeE, 0; PickleTensorReader::read_global_type
loc_6DD0C:
mov [rbx+38h], eax
loc_6DD0F:
add rsp, 8
pop rbx
pop r14
retn
| long long PickleTensorReader::read_global(long long a1, long long a2)
{
long long result; // rax
if ( !(unsigned int)std::string::compare(a2, "FloatStorage") )
{
result = 0LL;
if ( !PickleTensorReader::read_global_type )
goto LABEL_7;
LABEL_6:
PickleTensorReader::global_type = result;
PickleTensorReader::read_global_type = 0;
goto LABEL_7;
}
result = std::string::compare(a2, "HalfStorage");
if ( (_DWORD)result )
return result;
result = 1LL;
if ( PickleTensorReader::read_global_type == 1 )
goto LABEL_6;
LABEL_7:
*(_DWORD *)(a1 + 56) = result;
return result;
}
| |||
3,489 | PickleTensorReader::read_global(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | 7CodeWizard[P]stablediffusion/model.cpp | void read_global(const std::string& str) {
if (str == "FloatStorage") {
if (read_global_type) {
global_type = GGML_TYPE_F32;
read_global_type = false;
}
tensor_storage.type = GGML_TYPE_F32;
} else if (str == "HalfStorage") {
if (read_global_type) {
global_type = GGML_TYPE_F16;
read_global_type = false;
}
tensor_storage.type = GGML_TYPE_F16;
}
} | O3 | cpp | PickleTensorReader::read_global(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x54372(%rip), %rsi # 0xc1401
movq %r14, %rdi
callq 0xa150
testl %eax, %eax
je 0x6d0be
leaq 0x5436c(%rip), %rsi # 0xc140e
movq %r14, %rdi
callq 0xa150
testl %eax, %eax
jne 0x6d0d9
movl $0x1, %eax
cmpb $0x1, 0x109132(%rip) # 0x1761ec
je 0x6d0c9
jmp 0x6d0d6
xorl %eax, %eax
cmpb $0x0, 0x109125(%rip) # 0x1761ec
je 0x6d0d6
movl %eax, 0x109119(%rip) # 0x1761e8
movb $0x0, 0x109116(%rip) # 0x1761ec
movl %eax, 0x38(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
| _ZN18PickleTensorReader11read_globalERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
lea rsi, aFloatstorage; "FloatStorage"
mov rdi, r14
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_6D0BE
lea rsi, aHalfstorage; "HalfStorage"
mov rdi, r14
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jnz short loc_6D0D9
mov eax, 1
cmp cs:_ZN18PickleTensorReader16read_global_typeE, 1; PickleTensorReader::read_global_type
jz short loc_6D0C9
jmp short loc_6D0D6
loc_6D0BE:
xor eax, eax
cmp cs:_ZN18PickleTensorReader16read_global_typeE, 0; PickleTensorReader::read_global_type
jz short loc_6D0D6
loc_6D0C9:
mov cs:_ZN18PickleTensorReader11global_typeE, eax; PickleTensorReader::global_type
mov cs:_ZN18PickleTensorReader16read_global_typeE, 0; PickleTensorReader::read_global_type
loc_6D0D6:
mov [rbx+38h], eax
loc_6D0D9:
add rsp, 8
pop rbx
pop r14
retn
| long long PickleTensorReader::read_global(long long a1, long long a2)
{
long long result; // rax
if ( !(unsigned int)std::string::compare(a2, "FloatStorage") )
{
result = 0LL;
if ( !PickleTensorReader::read_global_type )
goto LABEL_7;
LABEL_6:
PickleTensorReader::global_type = result;
PickleTensorReader::read_global_type = 0;
goto LABEL_7;
}
result = std::string::compare(a2, "HalfStorage");
if ( (_DWORD)result )
return result;
result = 1LL;
if ( PickleTensorReader::read_global_type == 1 )
goto LABEL_6;
LABEL_7:
*(_DWORD *)(a1 + 56) = result;
return result;
}
| |||
3,490 | coro::io_scheduler::~io_scheduler() | AlayaLite/build_O3/_deps/libcoro-src/src/io_scheduler.cpp | io_scheduler::~io_scheduler()
{
shutdown();
if (m_io_thread.joinable())
{
m_io_thread.join();
}
if (m_epoll_fd != -1)
{
close(m_epoll_fd);
m_epoll_fd = -1;
}
if (m_timer_fd != -1)
{
close(m_timer_fd);
m_timer_fd = -1;
}
if (m_schedule_fd != -1)
{
close(m_schedule_fd);
m_schedule_fd = -1;
}
} | O3 | cpp | coro::io_scheduler::~io_scheduler():
pushq %rbx
movq %rdi, %rbx
callq 0x73dc
cmpq $0x0, 0xc8(%rbx)
je 0x7271
leaq 0xc8(%rbx), %rdi
callq 0x3360
movl 0xa8(%rbx), %edi
cmpl $-0x1, %edi
je 0x728b
callq 0x33c0
movl $0xffffffff, 0xa8(%rbx) # imm = 0xFFFFFFFF
movl 0xb0(%rbx), %edi
cmpl $-0x1, %edi
je 0x72a5
callq 0x33c0
movl $0xffffffff, 0xb0(%rbx) # imm = 0xFFFFFFFF
movl 0xb4(%rbx), %edi
cmpl $-0x1, %edi
je 0x72bf
callq 0x33c0
movl $0xffffffff, 0xb4(%rbx) # imm = 0xFFFFFFFF
movq 0x238(%rbx), %rdi
testq %rdi, %rdi
je 0x72da
movq 0x248(%rbx), %rsi
subq %rdi, %rsi
callq 0x3250
movq 0x160(%rbx), %rdi
testq %rdi, %rdi
je 0x72f5
movq 0x170(%rbx), %rsi
subq %rdi, %rsi
callq 0x3250
leaq 0x100(%rbx), %rdi
callq 0x87c6
movq 0xd0(%rbx), %rdi
testq %rdi, %rdi
je 0x7313
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0xd0(%rbx)
cmpq $0x0, 0xc8(%rbx)
jne 0x73c6
movq 0x90(%rbx), %rax
testq %rax, %rax
je 0x7349
leaq 0x80(%rbx), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x70(%rbx), %rax
testq %rax, %rax
je 0x7360
leaq 0x60(%rbx), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x48(%rbx), %rax
testq %rax, %rax
je 0x7377
leaq 0x38(%rbx), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x28(%rbx), %rax
testq %rax, %rax
je 0x738e
leaq 0x18(%rbx), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x73c4
movq 0x6c0a(%rip), %rax # 0xdfa8
cmpb $0x0, (%rax)
je 0x73ae
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0x73b8
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0x73c4
movq (%rdi), %rax
popq %rbx
jmpq *0x18(%rax)
popq %rbx
retq
callq 0x3070
jmp 0x73d3
jmp 0x73d3
jmp 0x73d3
jmp 0x73d3
movq %rax, %rdi
callq 0x4a0a
nop
| _ZN4coro12io_schedulerD2Ev:
push rbx; Alternative name is 'coro::io_scheduler::~io_scheduler()'
mov rbx, rdi
call _ZN4coro12io_scheduler8shutdownEv; coro::io_scheduler::shutdown(void)
cmp qword ptr [rbx+0C8h], 0
jz short loc_7271
lea rdi, [rbx+0C8h]; this
call __ZNSt6thread4joinEv; std::thread::join(void)
loc_7271:
mov edi, [rbx+0A8h]
cmp edi, 0FFFFFFFFh
jz short loc_728B
call _close
mov dword ptr [rbx+0A8h], 0FFFFFFFFh
loc_728B:
mov edi, [rbx+0B0h]
cmp edi, 0FFFFFFFFh
jz short loc_72A5
call _close
mov dword ptr [rbx+0B0h], 0FFFFFFFFh
loc_72A5:
mov edi, [rbx+0B4h]
cmp edi, 0FFFFFFFFh
jz short loc_72BF
call _close
mov dword ptr [rbx+0B4h], 0FFFFFFFFh
loc_72BF:
mov rdi, [rbx+238h]; void *
test rdi, rdi
jz short loc_72DA
mov rsi, [rbx+248h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_72DA:
mov rdi, [rbx+160h]; void *
test rdi, rdi
jz short loc_72F5
mov rsi, [rbx+170h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_72F5:
lea rdi, [rbx+100h]
call _ZNSt8_Rb_treeINSt6chrono10time_pointINS0_3_V212steady_clockENS0_8durationIlSt5ratioILl1ELl1000000000EEEEEESt4pairIKS8_PN4coro6detail9poll_infoEESt10_Select1stISF_ESt4lessIS8_ESaISF_EED2Ev; std::_Rb_tree<std::chrono::time_point<std::chrono::_V2::steady_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>>,std::pair<std::chrono::time_point<std::chrono::_V2::steady_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>> const,coro::detail::poll_info *>,std::_Select1st<std::pair<std::chrono::time_point<std::chrono::_V2::steady_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>> const,coro::detail::poll_info *>>,std::less<std::chrono::time_point<std::chrono::_V2::steady_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>>>,std::allocator<std::pair<std::chrono::time_point<std::chrono::_V2::steady_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>> const,coro::detail::poll_info *>>>::~_Rb_tree()
mov rdi, [rbx+0D0h]
test rdi, rdi
jz short loc_7313
mov rax, [rdi]
call qword ptr [rax+8]
loc_7313:
mov qword ptr [rbx+0D0h], 0
cmp qword ptr [rbx+0C8h], 0
jnz loc_73C6
mov rax, [rbx+90h]
test rax, rax
jz short loc_7349
lea rdi, [rbx+80h]
mov rsi, rdi
mov edx, 3
call rax
loc_7349:
mov rax, [rbx+70h]
test rax, rax
jz short loc_7360
lea rdi, [rbx+60h]
mov rsi, rdi
mov edx, 3
call rax
loc_7360:
mov rax, [rbx+48h]
test rax, rax
jz short loc_7377
lea rdi, [rbx+38h]
mov rsi, rdi
mov edx, 3
call rax
loc_7377:
mov rax, [rbx+28h]
test rax, rax
jz short loc_738E
lea rdi, [rbx+18h]
mov rsi, rdi
mov edx, 3
call rax
loc_738E:
mov rdi, [rbx+8]
test rdi, rdi
jz short loc_73C4
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_73AE
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_73B8
loc_73AE:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_73B8:
cmp eax, 1
jnz short loc_73C4
mov rax, [rdi]
pop rbx
jmp qword ptr [rax+18h]
loc_73C4:
pop rbx
retn
loc_73C6:
call __ZSt9terminatev; std::terminate(void)
jmp short loc_73D3
jmp short loc_73D3
jmp short loc_73D3
jmp short $+2
loc_73D3:
mov rdi, rax
call __clang_call_terminate
| void coro::io_scheduler::~io_scheduler(volatile signed __int32 **this)
{
volatile signed __int32 *v2; // rdi
volatile signed __int32 *v3; // rdi
volatile signed __int32 *v4; // rdi
volatile signed __int32 *v5; // rax
volatile signed __int32 *v6; // rax
volatile signed __int32 *v7; // rax
volatile signed __int32 *v8; // rax
volatile signed __int32 *v9; // rdi
signed __int32 v10; // eax
coro::io_scheduler::shutdown((coro::io_scheduler *)this);
if ( this[25] )
std::thread::join((std::thread *)(this + 25));
if ( *((_DWORD *)this + 42) != -1 )
{
close();
*((_DWORD *)this + 42) = -1;
}
if ( *((_DWORD *)this + 44) != -1 )
{
close();
*((_DWORD *)this + 44) = -1;
}
if ( *((_DWORD *)this + 45) != -1 )
{
close();
*((_DWORD *)this + 45) = -1;
}
v2 = this[71];
if ( v2 )
operator delete((void *)v2, (char *)this[73] - (char *)v2);
v3 = this[44];
if ( v3 )
operator delete((void *)v3, (char *)this[46] - (char *)v3);
std::_Rb_tree<std::chrono::time_point<std::chrono::_V2::steady_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>>,std::pair<std::chrono::time_point<std::chrono::_V2::steady_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>> const,coro::detail::poll_info *>,std::_Select1st<std::pair<std::chrono::time_point<std::chrono::_V2::steady_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>> const,coro::detail::poll_info *>>,std::less<std::chrono::time_point<std::chrono::_V2::steady_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>>>,std::allocator<std::pair<std::chrono::time_point<std::chrono::_V2::steady_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>> const,coro::detail::poll_info *>>>::~_Rb_tree(this + 32);
v4 = this[26];
if ( v4 )
(*(void ( **)(volatile signed __int32 *))(*(_QWORD *)v4 + 8LL))(v4);
this[26] = 0LL;
if ( this[25] )
std::terminate();
v5 = this[18];
if ( v5 )
((void ( *)(volatile signed __int32 **, volatile signed __int32 **, long long))v5)(
this + 16,
this + 16,
3LL);
v6 = this[14];
if ( v6 )
((void ( *)(volatile signed __int32 **, volatile signed __int32 **, long long))v6)(
this + 12,
this + 12,
3LL);
v7 = this[9];
if ( v7 )
((void ( *)(volatile signed __int32 **, volatile signed __int32 **, long long))v7)(this + 7, this + 7, 3LL);
v8 = this[5];
if ( v8 )
((void ( *)(volatile signed __int32 **, volatile signed __int32 **, long long))v8)(this + 3, this + 3, 3LL);
v9 = this[1];
if ( v9 )
{
if ( _libc_single_threaded )
{
v10 = *((_DWORD *)v9 + 3);
*((_DWORD *)v9 + 3) = v10 - 1;
}
else
{
v10 = _InterlockedExchangeAdd(v9 + 3, 0xFFFFFFFF);
}
if ( v10 == 1 )
(*(void ( **)(volatile signed __int32 *))(*(_QWORD *)v9 + 24LL))(v9);
}
}
| ~io_scheduler:
PUSH RBX
MOV RBX,RDI
CALL 0x001073dc
CMP qword ptr [RBX + 0xc8],0x0
JZ 0x00107271
LAB_00107265:
LEA RDI,[RBX + 0xc8]
CALL 0x00103360
LAB_00107271:
MOV EDI,dword ptr [RBX + 0xa8]
CMP EDI,-0x1
JZ 0x0010728b
CALL 0x001033c0
MOV dword ptr [RBX + 0xa8],0xffffffff
LAB_0010728b:
MOV EDI,dword ptr [RBX + 0xb0]
CMP EDI,-0x1
JZ 0x001072a5
CALL 0x001033c0
MOV dword ptr [RBX + 0xb0],0xffffffff
LAB_001072a5:
MOV EDI,dword ptr [RBX + 0xb4]
CMP EDI,-0x1
JZ 0x001072bf
CALL 0x001033c0
LAB_001072b5:
MOV dword ptr [RBX + 0xb4],0xffffffff
LAB_001072bf:
MOV RDI,qword ptr [RBX + 0x238]
TEST RDI,RDI
JZ 0x001072da
MOV RSI,qword ptr [RBX + 0x248]
SUB RSI,RDI
CALL 0x00103250
LAB_001072da:
MOV RDI,qword ptr [RBX + 0x160]
TEST RDI,RDI
JZ 0x001072f5
MOV RSI,qword ptr [RBX + 0x170]
SUB RSI,RDI
CALL 0x00103250
LAB_001072f5:
LEA RDI,[RBX + 0x100]
CALL 0x001087c6
MOV RDI,qword ptr [RBX + 0xd0]
TEST RDI,RDI
JZ 0x00107313
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x8]
LAB_00107313:
MOV qword ptr [RBX + 0xd0],0x0
CMP qword ptr [RBX + 0xc8],0x0
JNZ 0x001073c6
MOV RAX,qword ptr [RBX + 0x90]
TEST RAX,RAX
JZ 0x00107349
LEA RDI,[RBX + 0x80]
LAB_0010733f:
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_00107349:
MOV RAX,qword ptr [RBX + 0x70]
TEST RAX,RAX
JZ 0x00107360
LEA RDI,[RBX + 0x60]
LAB_00107356:
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_00107360:
MOV RAX,qword ptr [RBX + 0x48]
TEST RAX,RAX
JZ 0x00107377
LEA RDI,[RBX + 0x38]
LAB_0010736d:
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_00107377:
MOV RAX,qword ptr [RBX + 0x28]
TEST RAX,RAX
JZ 0x0010738e
LEA RDI,[RBX + 0x18]
LAB_00107384:
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_0010738e:
MOV RDI,qword ptr [RBX + 0x8]
TEST RDI,RDI
JZ 0x001073c4
MOV RAX,qword ptr [0x0010dfa8]
CMP byte ptr [RAX],0x0
JZ 0x001073ae
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x001073b8
LAB_001073ae:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_001073b8:
CMP EAX,0x1
JNZ 0x001073c4
MOV RAX,qword ptr [RDI]
POP RBX
JMP qword ptr [RAX + 0x18]
LAB_001073c4:
POP RBX
RET
LAB_001073c6:
CALL 0x00103070
|
/* coro::io_scheduler::~io_scheduler() */
void __thiscall coro::io_scheduler::~io_scheduler(io_scheduler *this)
{
int *piVar1;
void *pvVar2;
long *plVar3;
int iVar4;
shutdown(this);
if (*(long *)(this + 200) != 0) {
/* try { // try from 00107265 to 001072b4 has its CatchHandler @ 001073d3 */
std::thread::join();
}
if (*(int *)(this + 0xa8) != -1) {
close(*(int *)(this + 0xa8));
*(int4 *)(this + 0xa8) = 0xffffffff;
}
if (*(int *)(this + 0xb0) != -1) {
close(*(int *)(this + 0xb0));
*(int4 *)(this + 0xb0) = 0xffffffff;
}
if (*(int *)(this + 0xb4) != -1) {
close(*(int *)(this + 0xb4));
*(int4 *)(this + 0xb4) = 0xffffffff;
}
pvVar2 = *(void **)(this + 0x238);
if (pvVar2 != (void *)0x0) {
operator_delete(pvVar2,*(long *)(this + 0x248) - (long)pvVar2);
}
pvVar2 = *(void **)(this + 0x160);
if (pvVar2 != (void *)0x0) {
operator_delete(pvVar2,*(long *)(this + 0x170) - (long)pvVar2);
}
std::
_Rb_tree<std::chrono::time_point<std::chrono::_V2::steady_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>>,std::pair<std::chrono::time_point<std::chrono::_V2::steady_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>>const,coro::detail::poll_info*>,std::_Select1st<std::pair<std::chrono::time_point<std::chrono::_V2::steady_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>>const,coro::detail::poll_info*>>,std::less<std::chrono::time_point<std::chrono::_V2::steady_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>>>,std::allocator<std::pair<std::chrono::time_point<std::chrono::_V2::steady_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>>const,coro::detail::poll_info*>>>
::~_Rb_tree((_Rb_tree<std::chrono::time_point<std::chrono::_V2::steady_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>>,std::pair<std::chrono::time_point<std::chrono::_V2::steady_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>>const,coro::detail::poll_info*>,std::_Select1st<std::pair<std::chrono::time_point<std::chrono::_V2::steady_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>>const,coro::detail::poll_info*>>,std::less<std::chrono::time_point<std::chrono::_V2::steady_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>>>,std::allocator<std::pair<std::chrono::time_point<std::chrono::_V2::steady_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>>const,coro::detail::poll_info*>>>
*)(this + 0x100));
if (*(long **)(this + 0xd0) != (long *)0x0) {
(**(code **)(**(long **)(this + 0xd0) + 8))();
}
*(int8 *)(this + 0xd0) = 0;
if (*(long *)(this + 200) == 0) {
if (*(code **)(this + 0x90) != (code *)0x0) {
/* try { // try from 0010733f to 00107348 has its CatchHandler @ 001073d1 */
(**(code **)(this + 0x90))(this + 0x80,this + 0x80,3);
}
if (*(code **)(this + 0x70) != (code *)0x0) {
/* try { // try from 00107356 to 0010735f has its CatchHandler @ 001073cf */
(**(code **)(this + 0x70))(this + 0x60,this + 0x60,3);
}
if (*(code **)(this + 0x48) != (code *)0x0) {
/* try { // try from 0010736d to 00107376 has its CatchHandler @ 001073cd */
(**(code **)(this + 0x48))(this + 0x38,this + 0x38,3);
}
if (*(code **)(this + 0x28) != (code *)0x0) {
/* try { // try from 00107384 to 0010738d has its CatchHandler @ 001073cb */
(**(code **)(this + 0x28))(this + 0x18,this + 0x18,3);
}
plVar3 = *(long **)(this + 8);
if (plVar3 != (long *)0x0) {
if (*PTR___libc_single_threaded_0010dfa8 == '\0') {
LOCK();
piVar1 = (int *)((long)plVar3 + 0xc);
iVar4 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar4 = *(int *)((long)plVar3 + 0xc);
*(int *)((long)plVar3 + 0xc) = iVar4 + -1;
}
if (iVar4 == 1) {
/* WARNING: Could not recover jumptable at 0x001073c1. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(*plVar3 + 0x18))();
return;
}
}
return;
}
/* WARNING: Subroutine does not return */
std::terminate();
}
|
|
3,491 | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::push_back(std::pair<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>> const&) | monkey531[P]llama/common/json.hpp | void push_back(const typename object_t::value_type& val)
{
// push_back only works for null objects or objects
if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_object())))
{
JSON_THROW(type_error::create(308, detail::concat("cannot use push_back() with ", type_name()), this));
}
// transform null object into an object
if (is_null())
{
m_data.m_type = value_t::object;
m_data.m_value = value_t::object;
assert_invariant();
}
// add element to object
auto res = m_data.m_value.object->insert(val);
set_parent(res.first->second);
} | O2 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::push_back(std::pair<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>> const&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movzbl (%rdi), %eax
testl %eax, %eax
jne 0x8bd9f
movb $0x1, (%r14)
callq 0x40fde
movq %rax, 0x8(%r14)
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x40ee6
jmp 0x8bda4
cmpl $0x1, %eax
jne 0x8bdb8
movq 0x8(%r14), %rdi
movq %rbx, %rsi
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x8bf2e
pushq $0x20
popq %rdi
callq 0x234b0
movq %rax, %rbx
movq %r14, %rdi
callq 0x469c8
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x2cf34(%rip), %rsi # 0xb8d0e
leaq 0x10(%rsp), %rdi
callq 0x665bd
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x134, %esi # imm = 0x134
movq %r14, %rcx
callq 0x4687c
xorl %ebp, %ebp
leaq 0x74133(%rip), %rsi # 0xfff38
leaq -0x488b4(%rip), %rdx # 0x43558
movq %rbx, %rdi
callq 0x24050
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x24348
testb %bpl, %bpl
jne 0x8be2b
jmp 0x8be33
movq %rax, %r14
movq %rbx, %rdi
callq 0x236f0
movq %r14, %rdi
callq 0x240e0
nop
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9push_backERKSt4pairIKS9_SD_E:
push rbp; char
push r14; int
push rbx; int
sub rsp, 30h
mov rbx, rsi
mov r14, rdi
movzx eax, byte ptr [rdi]
test eax, eax
jnz short loc_8BD9F
mov byte ptr [r14], 1
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createINS2_IS9_SD_St4lessIvESaISt4pairIKS9_SD_EEEEJEEEPT_DpOT0_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::create<nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>>()
mov [r14+8], rax
push 1
pop rsi
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
jmp short loc_8BDA4
loc_8BD9F:
cmp eax, 1
jnz short loc_8BDB8
loc_8BDA4:
mov rdi, [r14+8]
mov rsi, rbx
add rsp, 30h
pop rbx
pop r14
pop rbp
jmp _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE6insertERKSI_; nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::insert(std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const&)
loc_8BDB8:
push 20h ; ' '
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aCannotUsePushB; "cannot use push_back() with "
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 134h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rdi, [rsp+48h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_8BE2B
jmp short loc_8BE33
mov r14, rax
loc_8BE2B:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_8BE33:
mov rdi, r14
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::push_back(
long long a1,
long long a2)
{
nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx
const char *v4; // [rsp+8h] [rbp-40h] BYREF
_BYTE v5[56]; // [rsp+10h] [rbp-38h] BYREF
if ( *(_BYTE *)a1 )
{
if ( *(_BYTE *)a1 != 1 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL);
v4 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(
(long long)v5,
(long long)"cannot use push_back() with ",
&v4);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
308,
(long long)v5);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
}
else
{
*(_BYTE *)a1 = 1;
*(_QWORD *)(a1 + 8) = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::create<nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>>();
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1);
}
return nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::insert(
*(_QWORD *)(a1 + 8),
a2);
}
| push_back:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV RBX,RSI
MOV R14,RDI
MOVZX EAX,byte ptr [RDI]
TEST EAX,EAX
JNZ 0x0018bd9f
MOV byte ptr [R14],0x1
CALL 0x00140fde
MOV qword ptr [R14 + 0x8],RAX
PUSH 0x1
POP RSI
MOV RDI,R14
CALL 0x00140ee6
JMP 0x0018bda4
LAB_0018bd9f:
CMP EAX,0x1
JNZ 0x0018bdb8
LAB_0018bda4:
MOV RDI,qword ptr [R14 + 0x8]
MOV RSI,RBX
ADD RSP,0x30
POP RBX
POP R14
POP RBP
JMP 0x0018bf2e
LAB_0018bdb8:
PUSH 0x20
POP RDI
CALL 0x001234b0
MOV RBX,RAX
MOV RDI,R14
CALL 0x001469c8
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_0018bdd3:
LEA RSI,[0x1b8d0e]
LEA RDI,[RSP + 0x10]
CALL 0x001665bd
MOV BPL,0x1
LAB_0018bde7:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x134
MOV RCX,R14
CALL 0x0014687c
XOR EBP,EBP
LEA RSI,[0x1fff38]
LEA RDX,[0x143558]
MOV RDI,RBX
CALL 0x00124050
|
/* 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(std::pair<std::__cxx11::string const,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> > const&) */
void __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::push_back(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this,pair *param_1)
{
ordered_map *poVar1;
int8 uVar2;
char *local_40;
detail local_38 [32];
if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x0) {
*this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1;
poVar1 = create<nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>>
();
*(ordered_map **)(this + 8) = poVar1;
assert_invariant(SUB81(this,0));
}
else if (*this != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
uVar2 = __cxa_allocate_exception(0x20);
local_40 = (char *)type_name(this);
/* try { // try from 0018bdd3 to 0018bde3 has its CatchHandler @ 0018be28 */
detail::concat<std::__cxx11::string,char_const(&)[29],char_const*>
(local_38,"cannot use push_back() with ",&local_40);
/* try { // try from 0018bde7 to 0018be13 has its CatchHandler @ 0018be14 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar2,0x134,local_38,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&detail::type_error::typeinfo,detail::exception::~exception);
}
ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
::insert(*(ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
**)(this + 8),param_1);
return;
}
|
|
3,492 | fs_validate_filename(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | monkey531[P]llama/common/common.cpp | bool fs_validate_filename(const std::string & filename) {
if (!filename.length()) {
// Empty filename invalid
return false;
}
if (filename.length() > 255) {
// Limit at common largest possible filename on Linux filesystems
// to avoid unnecessary further validation
// (On systems with smaller limits it will be caught by the OS)
return false;
}
std::u32string filename_utf32;
try {
#if defined(__clang__)
// disable C++17 deprecation warning for std::codecvt_utf8
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wdeprecated-declarations"
#endif
std::wstring_convert<std::codecvt_utf8<char32_t>, char32_t> converter;
#if defined(__clang__)
# pragma clang diagnostic pop
#endif
filename_utf32 = converter.from_bytes(filename);
// If the reverse conversion mismatches, it means overlong UTF-8 sequences were used,
// or invalid encodings were encountered. Reject such attempts
std::string filename_reencoded = converter.to_bytes(filename_utf32);
if (filename_reencoded != filename) {
return false;
}
} catch (const std::exception &) {
return false;
}
// Check for forbidden codepoints:
// - Control characters
// - Unicode equivalents of illegal characters
// - UTF-16 surrogate pairs
// - UTF-8 replacement character
// - Byte order mark (BOM)
// - Illegal characters: / \ : * ? " < > |
for (char32_t c : filename_utf32) {
if (c <= 0x1F // Control characters (C0)
|| c == 0x7F // Control characters (DEL)
|| (c >= 0x80 && c <= 0x9F) // Control characters (C1)
|| c == 0xFF0E // Fullwidth Full Stop (period equivalent)
|| c == 0x2215 // Division Slash (forward slash equivalent)
|| c == 0x2216 // Set Minus (backslash equivalent)
|| (c >= 0xD800 && c <= 0xDFFF) // UTF-16 surrogate pairs
|| c == 0xFFFD // Replacement Character (UTF-8)
|| c == 0xFEFF // Byte Order Mark (BOM)
|| c == '/' || c == '\\' || c == ':' || c == '*' // Illegal characters
|| c == '?' || c == '"' || c == '<' || c == '>' || c == '|') {
return false;
}
}
// Reject any leading or trailing ' ', or any trailing '.', these are stripped on Windows and will cause a different filename
// Unicode and other whitespace is not affected, only 0x20 space
if (filename.front() == ' ' || filename.back() == ' ' || filename.back() == '.') {
return false;
}
// Reject any ".." (currently stricter than necessary, it should be fine to just check for == ".." instead)
if (filename.find("..") != std::string::npos) {
return false;
}
// Reject "."
if (filename == ".") {
return false;
}
return true;
} | O0 | cpp | fs_validate_filename(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
subq $0x128, %rsp # imm = 0x128
movq %rdi, 0x118(%rsp)
movq 0x118(%rsp), %rdi
callq 0x5cae0
cmpq $0x0, %rax
jne 0xf7eff
movb $0x0, 0x127(%rsp)
jmp 0xf8297
movq 0x118(%rsp), %rdi
callq 0x5cae0
cmpq $0xff, %rax
jbe 0xf7f21
movb $0x0, 0x127(%rsp)
jmp 0xf8297
leaq 0xf8(%rsp), %rdi
callq 0x101870
leaq 0x98(%rsp), %rdi
callq 0x1018f0
jmp 0xf7f3d
movq 0x118(%rsp), %rdx
leaq 0x68(%rsp), %rdi
leaq 0x98(%rsp), %rsi
callq 0x1019b0
jmp 0xf7f59
leaq 0xf8(%rsp), %rdi
movq %rdi, 0x10(%rsp)
leaq 0x68(%rsp), %rsi
movq %rsi, 0x8(%rsp)
callq 0x101a30
movq 0x8(%rsp), %rdi
callq 0x101c70
movq 0x10(%rsp), %rdx
leaq 0x48(%rsp), %rdi
leaq 0x98(%rsp), %rsi
callq 0x101cb0
jmp 0xf7f98
movq 0x118(%rsp), %rsi
leaq 0x48(%rsp), %rdi
callq 0x101d30
testb $0x1, %al
jne 0xf7fb3
jmp 0xf8039
movb $0x0, 0x127(%rsp)
movl $0x1, 0x44(%rsp)
jmp 0xf8041
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
jmp 0xf7ffc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
leaq 0x98(%rsp), %rdi
callq 0x101d60
movl 0x8c(%rsp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0xf8288
movq 0x90(%rsp), %rdi
callq 0x5c0f0
movq %rax, 0x38(%rsp)
movb $0x0, 0x127(%rsp)
movl $0x1, 0x44(%rsp)
callq 0x5cf20
jmp 0xf8068
movl $0x0, 0x44(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x5d858
leaq 0x98(%rsp), %rdi
callq 0x101d60
movl 0x44(%rsp), %eax
testl %eax, %eax
jne 0xf8279
jmp 0xf8066
jmp 0xf8086
jmp 0xf8279
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
jmp 0xf8288
leaq 0xf8(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rdi
callq 0x101da0
movq %rax, 0x28(%rsp)
movq 0x30(%rsp), %rdi
callq 0x101dd0
movq %rax, 0x20(%rsp)
leaq 0x28(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x101e30
testb $0x1, %al
jne 0xf80c9
jmp 0xf81b2
leaq 0x28(%rsp), %rdi
callq 0x101e70
movl (%rax), %eax
movl %eax, 0x1c(%rsp)
cmpl $0x1f, 0x1c(%rsp)
jbe 0xf818c
cmpl $0x7f, 0x1c(%rsp)
je 0xf818c
cmpl $0x80, 0x1c(%rsp)
jb 0xf8107
cmpl $0x9f, 0x1c(%rsp)
jbe 0xf818c
cmpl $0xff0e, 0x1c(%rsp) # imm = 0xFF0E
je 0xf818c
cmpl $0x2215, 0x1c(%rsp) # imm = 0x2215
je 0xf818c
cmpl $0x2216, 0x1c(%rsp) # imm = 0x2216
je 0xf818c
cmpl $0xd800, 0x1c(%rsp) # imm = 0xD800
jb 0xf8139
cmpl $0xdfff, 0x1c(%rsp) # imm = 0xDFFF
jbe 0xf818c
cmpl $0xfffd, 0x1c(%rsp) # imm = 0xFFFD
je 0xf818c
cmpl $0xfeff, 0x1c(%rsp) # imm = 0xFEFF
je 0xf818c
cmpl $0x2f, 0x1c(%rsp)
je 0xf818c
cmpl $0x5c, 0x1c(%rsp)
je 0xf818c
cmpl $0x3a, 0x1c(%rsp)
je 0xf818c
cmpl $0x2a, 0x1c(%rsp)
je 0xf818c
cmpl $0x3f, 0x1c(%rsp)
je 0xf818c
cmpl $0x22, 0x1c(%rsp)
je 0xf818c
cmpl $0x3c, 0x1c(%rsp)
je 0xf818c
cmpl $0x3e, 0x1c(%rsp)
je 0xf818c
cmpl $0x7c, 0x1c(%rsp)
jne 0xf81a1
movb $0x0, 0x127(%rsp)
movl $0x1, 0x44(%rsp)
jmp 0xf8279
jmp 0xf81a3
leaq 0x28(%rsp), %rdi
callq 0x101e80
jmp 0xf80b1
movq 0x118(%rsp), %rdi
callq 0x5c2a0
movsbl (%rax), %eax
cmpl $0x20, %eax
je 0xf81f1
movq 0x118(%rsp), %rdi
callq 0x5d0a0
movsbl (%rax), %eax
cmpl $0x20, %eax
je 0xf81f1
movq 0x118(%rsp), %rdi
callq 0x5d0a0
movsbl (%rax), %eax
cmpl $0x2e, %eax
jne 0xf8203
movb $0x0, 0x127(%rsp)
movl $0x1, 0x44(%rsp)
jmp 0xf8279
movq 0x118(%rsp), %rdi
leaq 0x11baa2(%rip), %rsi # 0x213cb4
xorl %eax, %eax
movl %eax, %edx
callq 0x5c060
cmpq $-0x1, %rax
je 0xf8233
movb $0x0, 0x127(%rsp)
movl $0x1, 0x44(%rsp)
jmp 0xf8279
movq 0x118(%rsp), %rdi
leaq 0x11ba73(%rip), %rsi # 0x213cb5
callq 0x711d0
movb %al, 0x7(%rsp)
jmp 0xf824d
movb 0x7(%rsp), %al
testb $0x1, %al
jne 0xf8257
jmp 0xf8269
movb $0x0, 0x127(%rsp)
movl $0x1, 0x44(%rsp)
jmp 0xf8279
movb $0x1, 0x127(%rsp)
movl $0x1, 0x44(%rsp)
leaq 0xf8(%rsp), %rdi
callq 0x101c70
jmp 0xf8297
leaq 0xf8(%rsp), %rdi
callq 0x101c70
jmp 0xf82a8
movb 0x127(%rsp), %al
andb $0x1, %al
addq $0x128, %rsp # imm = 0x128
retq
movq 0x90(%rsp), %rdi
callq 0x5ccd0
nopw %cs:(%rax,%rax)
| _Z20fs_validate_filenameRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
sub rsp, 128h
mov [rsp+128h+var_10], rdi
mov rdi, [rsp+128h+var_10]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv; std::string::length(void)
cmp rax, 0
jnz short loc_F7EFF
mov [rsp+128h+var_1], 0
jmp loc_F8297
loc_F7EFF:
mov rdi, [rsp+128h+var_10]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv; std::string::length(void)
cmp rax, 0FFh
jbe short loc_F7F21
mov [rsp+128h+var_1], 0
jmp loc_F8297
loc_F7F21:
lea rdi, [rsp+128h+var_30]
call _ZNSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEEC2Ev; std::basic_string<char32_t>::basic_string(void)
lea rdi, [rsp+128h+var_90]; int
call _ZNSt7__cxx1115wstring_convertISt12codecvt_utf8IDiLm1114111ELSt12codecvt_mode0EEDiSaIDiESaIcEEC2Ev; std::wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>::wstring_convert(void)
jmp short $+2
loc_F7F3D:
mov rdx, [rsp+128h+var_10]
lea rdi, [rsp+128h+var_C0]
lea rsi, [rsp+128h+var_90]
call _ZNSt7__cxx1115wstring_convertISt12codecvt_utf8IDiLm1114111ELSt12codecvt_mode0EEDiSaIDiESaIcEE10from_bytesERKNS_12basic_stringIcSt11char_traitsIcES5_EE; std::wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>::from_bytes(std::string const&)
jmp short $+2
loc_F7F59:
lea rdi, [rsp+128h+var_30]
mov [rsp+128h+var_118], rdi
lea rsi, [rsp+128h+var_C0]
mov [rsp+128h+var_120], rsi
call _ZNSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEEaSEOS4_; std::basic_string<char32_t>::operator=(std::basic_string<char32_t>&&)
mov rdi, [rsp+128h+var_120]
call _ZNSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEED2Ev; std::basic_string<char32_t>::~basic_string()
mov rdx, [rsp+128h+var_118]
lea rdi, [rsp+128h+var_E0]
lea rsi, [rsp+128h+var_90]
call _ZNSt7__cxx1115wstring_convertISt12codecvt_utf8IDiLm1114111ELSt12codecvt_mode0EEDiSaIDiESaIcEE8to_bytesERKNS_12basic_stringIDiSt11char_traitsIDiES4_EE; std::wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>::to_bytes(std::basic_string<char32_t> const&)
jmp short $+2
loc_F7F98:
mov rsi, [rsp+128h+var_10]
lea rdi, [rsp+128h+var_E0]
call _ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EESA_; std::operator!=<char>(std::string const&,std::string const&)
test al, 1
jnz short loc_F7FB3
jmp loc_F8039
loc_F7FB3:
mov [rsp+128h+var_1], 0
mov [rsp+128h+var_E4], 1
jmp short loc_F8041
mov rcx, rax
mov eax, edx
mov [rsp+128h+var_98], rcx
mov [rsp+128h+var_9C], eax
jmp short loc_F7FFC
mov rcx, rax
mov eax, edx
mov [rsp+128h+var_98], rcx
mov [rsp+128h+var_9C], eax
lea rdi, [rsp+128h+var_90]
call _ZNSt7__cxx1115wstring_convertISt12codecvt_utf8IDiLm1114111ELSt12codecvt_mode0EEDiSaIDiESaIcEED2Ev; std::wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>::~wstring_convert()
loc_F7FFC:
mov eax, [rsp+128h+var_9C]
mov ecx, 1
cmp eax, ecx
jnz loc_F8288
mov rdi, [rsp+128h+var_98]; void *
call ___cxa_begin_catch
mov [rsp+128h+var_F0], rax
mov [rsp+128h+var_1], 0
mov [rsp+128h+var_E4], 1
call ___cxa_end_catch
jmp short loc_F8068
loc_F8039:
mov [rsp+128h+var_E4], 0
loc_F8041:
lea rdi, [rsp+128h+var_E0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+128h+var_90]
call _ZNSt7__cxx1115wstring_convertISt12codecvt_utf8IDiLm1114111ELSt12codecvt_mode0EEDiSaIDiESaIcEED2Ev; std::wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>::~wstring_convert()
mov eax, [rsp+128h+var_E4]
test eax, eax
jnz loc_F8279
jmp short $+2
loc_F8066:
jmp short loc_F8086
loc_F8068:
jmp loc_F8279
mov rcx, rax
mov eax, edx
mov [rsp+128h+var_98], rcx
mov [rsp+128h+var_9C], eax
jmp loc_F8288
loc_F8086:
lea rax, [rsp+128h+var_30]
mov [rsp+128h+var_F8], rax
mov rdi, [rsp+128h+var_F8]
call _ZNSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEE5beginEv; std::basic_string<char32_t>::begin(void)
mov [rsp+128h+var_100], rax
mov rdi, [rsp+128h+var_F8]
call _ZNSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEE3endEv; std::basic_string<char32_t>::end(void)
mov [rsp+128h+var_108], rax
loc_F80B1:
lea rdi, [rsp+128h+var_100]
lea rsi, [rsp+128h+var_108]
call _ZN9__gnu_cxxneIPDiNSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEEEEEbRKNS_17__normal_iteratorIT_T0_EESD_; __gnu_cxx::operator!=<char32_t *,std::basic_string<char32_t>>(__gnu_cxx::__normal_iterator<char32_t *,std::basic_string<char32_t>> const&,__gnu_cxx::__normal_iterator<char32_t *,std::basic_string<char32_t>> const&)
test al, 1
jnz short loc_F80C9
jmp loc_F81B2
loc_F80C9:
lea rdi, [rsp+128h+var_100]
call _ZNK9__gnu_cxx17__normal_iteratorIPDiNSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEEEEdeEv; __gnu_cxx::__normal_iterator<char32_t *,std::basic_string<char32_t>>::operator*(void)
mov eax, [rax]
mov [rsp+128h+var_10C], eax
cmp [rsp+128h+var_10C], 1Fh
jbe loc_F818C
cmp [rsp+128h+var_10C], 7Fh
jz loc_F818C
cmp [rsp+128h+var_10C], 80h
jb short loc_F8107
cmp [rsp+128h+var_10C], 9Fh
jbe loc_F818C
loc_F8107:
cmp [rsp+128h+var_10C], 0FF0Eh
jz short loc_F818C
cmp [rsp+128h+var_10C], 2215h
jz short loc_F818C
cmp [rsp+128h+var_10C], 2216h
jz short loc_F818C
cmp [rsp+128h+var_10C], 0D800h
jb short loc_F8139
cmp [rsp+128h+var_10C], 0DFFFh
jbe short loc_F818C
loc_F8139:
cmp [rsp+128h+var_10C], 0FFFDh
jz short loc_F818C
cmp [rsp+128h+var_10C], 0FEFFh
jz short loc_F818C
cmp [rsp+128h+var_10C], 2Fh ; '/'
jz short loc_F818C
cmp [rsp+128h+var_10C], 5Ch ; '\'
jz short loc_F818C
cmp [rsp+128h+var_10C], 3Ah ; ':'
jz short loc_F818C
cmp [rsp+128h+var_10C], 2Ah ; '*'
jz short loc_F818C
cmp [rsp+128h+var_10C], 3Fh ; '?'
jz short loc_F818C
cmp [rsp+128h+var_10C], 22h ; '"'
jz short loc_F818C
cmp [rsp+128h+var_10C], 3Ch ; '<'
jz short loc_F818C
cmp [rsp+128h+var_10C], 3Eh ; '>'
jz short loc_F818C
cmp [rsp+128h+var_10C], 7Ch ; '|'
jnz short loc_F81A1
loc_F818C:
mov [rsp+128h+var_1], 0
mov [rsp+128h+var_E4], 1
jmp loc_F8279
loc_F81A1:
jmp short $+2
loc_F81A3:
lea rdi, [rsp+128h+var_100]
call _ZN9__gnu_cxx17__normal_iteratorIPDiNSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEEEEppEv; __gnu_cxx::__normal_iterator<char32_t *,std::basic_string<char32_t>>::operator++(void)
jmp loc_F80B1
loc_F81B2:
mov rdi, [rsp+128h+var_10]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5frontEv; std::string::front(void)
movsx eax, byte ptr [rax]
cmp eax, 20h ; ' '
jz short loc_F81F1
mov rdi, [rsp+128h+var_10]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4backEv; std::string::back(void)
movsx eax, byte ptr [rax]
cmp eax, 20h ; ' '
jz short loc_F81F1
mov rdi, [rsp+128h+var_10]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4backEv; std::string::back(void)
movsx eax, byte ptr [rax]
cmp eax, 2Eh ; '.'
jnz short loc_F8203
loc_F81F1:
mov [rsp+128h+var_1], 0
mov [rsp+128h+var_E4], 1
jmp short loc_F8279
loc_F8203:
mov rdi, [rsp+128h+var_10]
lea rsi, aN0N1+7; ".."
xor eax, eax
mov edx, eax
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcm; std::string::find(char const*,ulong)
cmp rax, 0FFFFFFFFFFFFFFFFh
jz short loc_F8233
mov [rsp+128h+var_1], 0
mov [rsp+128h+var_E4], 1
jmp short loc_F8279
loc_F8233:
mov rdi, [rsp+128h+var_10]
lea rsi, aN0N1+8; "."
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
mov [rsp+128h+var_121], al
jmp short $+2
loc_F824D:
mov al, [rsp+128h+var_121]
test al, 1
jnz short loc_F8257
jmp short loc_F8269
loc_F8257:
mov [rsp+128h+var_1], 0
mov [rsp+128h+var_E4], 1
jmp short loc_F8279
loc_F8269:
mov [rsp+128h+var_1], 1
mov [rsp+128h+var_E4], 1
loc_F8279:
lea rdi, [rsp+128h+var_30]
call _ZNSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEED2Ev; std::basic_string<char32_t>::~basic_string()
jmp short loc_F8297
loc_F8288:
lea rdi, [rsp+128h+var_30]
call _ZNSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEED2Ev; std::basic_string<char32_t>::~basic_string()
jmp short loc_F82A8
loc_F8297:
mov al, [rsp+128h+var_1]
and al, 1
add rsp, 128h
retn
loc_F82A8:
mov rdi, [rsp+128h+var_98]
call __Unwind_Resume
| bool fs_validate_filename(long long a1, int a2)
{
int v2; // edx
int v3; // ecx
int v4; // r8d
int v5; // r9d
int v7; // [rsp+0h] [rbp-128h]
int v8; // [rsp+8h] [rbp-120h]
void *v9; // [rsp+10h] [rbp-118h]
int v10; // [rsp+18h] [rbp-110h]
unsigned int v11; // [rsp+1Ch] [rbp-10Ch]
long long v12; // [rsp+20h] [rbp-108h] BYREF
_QWORD v13[2]; // [rsp+28h] [rbp-100h] BYREF
int v14; // [rsp+44h] [rbp-E4h]
_BYTE v15[32]; // [rsp+48h] [rbp-E0h] BYREF
_BYTE v16[36]; // [rsp+68h] [rbp-C0h] BYREF
int v17[24]; // [rsp+98h] [rbp-90h] BYREF
_BYTE v18[32]; // [rsp+F8h] [rbp-30h] BYREF
long long v19; // [rsp+118h] [rbp-10h]
bool v20; // [rsp+127h] [rbp-1h]
v19 = a1;
if ( std::string::length(a1) )
{
if ( (unsigned long long)std::string::length(v19) <= 0xFF )
{
std::basic_string<char32_t>::basic_string(v18);
std::wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>::wstring_convert(
(int)v17,
a2,
v2,
v3,
v4,
v5,
v7,
v8,
v9,
v10,
v12);
std::wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>::from_bytes(
v16,
v17,
v19);
std::basic_string<char32_t>::operator=();
std::basic_string<char32_t>::~basic_string(v16);
std::wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>::to_bytes(
v15,
v17,
v18);
if ( (std::operator!=<char>(v15, v19) & 1) != 0 )
{
v20 = 0;
v14 = 1;
}
else
{
v14 = 0;
}
std::string::~string(v15);
std::wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>::~wstring_convert(v17);
if ( !v14 )
{
v13[1] = v18;
v13[0] = std::basic_string<char32_t>::begin(v18);
v12 = std::basic_string<char32_t>::end(v18);
while ( (__gnu_cxx::operator!=<char32_t *,std::basic_string<char32_t>>(v13, &v12) & 1) != 0 )
{
v11 = *(_DWORD *)__gnu_cxx::__normal_iterator<char32_t *,std::basic_string<char32_t>>::operator*(v13);
if ( v11 <= 0x1F
|| v11 == 127
|| v11 >= 0x80 && v11 <= 0x9F
|| v11 == 65294
|| v11 == 8725
|| v11 == 8726
|| v11 >= 0xD800 && v11 <= 0xDFFF
|| v11 == 65533
|| v11 == 65279
|| v11 == 47
|| v11 == 92
|| v11 == 58
|| v11 == 42
|| v11 == 63
|| v11 == 34
|| v11 == 60
|| v11 == 62
|| v11 == 124 )
{
v20 = 0;
v14 = 1;
goto LABEL_41;
}
__gnu_cxx::__normal_iterator<char32_t *,std::basic_string<char32_t>>::operator++(v13);
}
if ( *(_BYTE *)std::string::front(v19) == 32
|| *(_BYTE *)std::string::back(v19) == 32
|| *(_BYTE *)std::string::back(v19) == 46 )
{
v20 = 0;
v14 = 1;
}
else
{
v20 = std::string::find(v19, "..", 0LL) == -1 && !std::operator==<char>(v19, (long long)".");
v14 = 1;
}
}
LABEL_41:
std::basic_string<char32_t>::~basic_string(v18);
}
else
{
return 0;
}
}
else
{
return 0;
}
return v20;
}
| fs_validate_filename:
SUB RSP,0x128
MOV qword ptr [RSP + 0x118],RDI
MOV RDI,qword ptr [RSP + 0x118]
CALL 0x0015cae0
CMP RAX,0x0
JNZ 0x001f7eff
MOV byte ptr [RSP + 0x127],0x0
JMP 0x001f8297
LAB_001f7eff:
MOV RDI,qword ptr [RSP + 0x118]
CALL 0x0015cae0
CMP RAX,0xff
JBE 0x001f7f21
MOV byte ptr [RSP + 0x127],0x0
JMP 0x001f8297
LAB_001f7f21:
LEA RDI,[RSP + 0xf8]
CALL 0x00201870
LAB_001f7f2e:
LEA RDI,[RSP + 0x98]
CALL 0x002018f0
JMP 0x001f7f3d
LAB_001f7f3d:
MOV RDX,qword ptr [RSP + 0x118]
LAB_001f7f45:
LEA RDI,[RSP + 0x68]
LEA RSI,[RSP + 0x98]
CALL 0x002019b0
JMP 0x001f7f59
LAB_001f7f59:
LEA RDI,[RSP + 0xf8]
MOV qword ptr [RSP + 0x10],RDI
LEA RSI,[RSP + 0x68]
MOV qword ptr [RSP + 0x8],RSI
CALL 0x00201a30
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x00201c70
MOV RDX,qword ptr [RSP + 0x10]
LEA RDI,[RSP + 0x48]
LEA RSI,[RSP + 0x98]
CALL 0x00201cb0
LAB_001f7f96:
JMP 0x001f7f98
LAB_001f7f98:
MOV RSI,qword ptr [RSP + 0x118]
LEA RDI,[RSP + 0x48]
CALL 0x00201d30
TEST AL,0x1
JNZ 0x001f7fb3
JMP 0x001f8039
LAB_001f7fb3:
MOV byte ptr [RSP + 0x127],0x0
MOV dword ptr [RSP + 0x44],0x1
JMP 0x001f8041
LAB_001f8039:
MOV dword ptr [RSP + 0x44],0x0
LAB_001f8041:
LEA RDI,[RSP + 0x48]
CALL 0x0015d858
LEA RDI,[RSP + 0x98]
CALL 0x00201d60
MOV EAX,dword ptr [RSP + 0x44]
TEST EAX,EAX
JNZ 0x001f8279
JMP 0x001f8066
LAB_001f8066:
JMP 0x001f8086
LAB_001f8086:
LEA RAX,[RSP + 0xf8]
MOV qword ptr [RSP + 0x30],RAX
MOV RDI,qword ptr [RSP + 0x30]
CALL 0x00201da0
MOV qword ptr [RSP + 0x28],RAX
MOV RDI,qword ptr [RSP + 0x30]
CALL 0x00201dd0
MOV qword ptr [RSP + 0x20],RAX
LAB_001f80b1:
LEA RDI,[RSP + 0x28]
LEA RSI,[RSP + 0x20]
CALL 0x00201e30
TEST AL,0x1
JNZ 0x001f80c9
JMP 0x001f81b2
LAB_001f80c9:
LEA RDI,[RSP + 0x28]
CALL 0x00201e70
MOV EAX,dword ptr [RAX]
MOV dword ptr [RSP + 0x1c],EAX
CMP dword ptr [RSP + 0x1c],0x1f
JBE 0x001f818c
CMP dword ptr [RSP + 0x1c],0x7f
JZ 0x001f818c
CMP dword ptr [RSP + 0x1c],0x80
JC 0x001f8107
CMP dword ptr [RSP + 0x1c],0x9f
JBE 0x001f818c
LAB_001f8107:
CMP dword ptr [RSP + 0x1c],0xff0e
JZ 0x001f818c
CMP dword ptr [RSP + 0x1c],0x2215
JZ 0x001f818c
CMP dword ptr [RSP + 0x1c],0x2216
JZ 0x001f818c
CMP dword ptr [RSP + 0x1c],0xd800
JC 0x001f8139
CMP dword ptr [RSP + 0x1c],0xdfff
JBE 0x001f818c
LAB_001f8139:
CMP dword ptr [RSP + 0x1c],0xfffd
JZ 0x001f818c
CMP dword ptr [RSP + 0x1c],0xfeff
JZ 0x001f818c
CMP dword ptr [RSP + 0x1c],0x2f
JZ 0x001f818c
CMP dword ptr [RSP + 0x1c],0x5c
JZ 0x001f818c
CMP dword ptr [RSP + 0x1c],0x3a
JZ 0x001f818c
CMP dword ptr [RSP + 0x1c],0x2a
JZ 0x001f818c
CMP dword ptr [RSP + 0x1c],0x3f
JZ 0x001f818c
CMP dword ptr [RSP + 0x1c],0x22
JZ 0x001f818c
CMP dword ptr [RSP + 0x1c],0x3c
JZ 0x001f818c
CMP dword ptr [RSP + 0x1c],0x3e
JZ 0x001f818c
CMP dword ptr [RSP + 0x1c],0x7c
JNZ 0x001f81a1
LAB_001f818c:
MOV byte ptr [RSP + 0x127],0x0
MOV dword ptr [RSP + 0x44],0x1
JMP 0x001f8279
LAB_001f81a1:
JMP 0x001f81a3
LAB_001f81a3:
LEA RDI,[RSP + 0x28]
CALL 0x00201e80
JMP 0x001f80b1
LAB_001f81b2:
MOV RDI,qword ptr [RSP + 0x118]
CALL 0x0015c2a0
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x20
JZ 0x001f81f1
MOV RDI,qword ptr [RSP + 0x118]
CALL 0x0015d0a0
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x20
JZ 0x001f81f1
MOV RDI,qword ptr [RSP + 0x118]
CALL 0x0015d0a0
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2e
JNZ 0x001f8203
LAB_001f81f1:
MOV byte ptr [RSP + 0x127],0x0
MOV dword ptr [RSP + 0x44],0x1
JMP 0x001f8279
LAB_001f8203:
MOV RDI,qword ptr [RSP + 0x118]
LEA RSI,[0x313cb4]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x0015c060
CMP RAX,-0x1
JZ 0x001f8233
MOV byte ptr [RSP + 0x127],0x0
MOV dword ptr [RSP + 0x44],0x1
JMP 0x001f8279
LAB_001f8233:
MOV RDI,qword ptr [RSP + 0x118]
LEA RSI,[0x313cb5]
CALL 0x001711d0
LAB_001f8247:
MOV byte ptr [RSP + 0x7],AL
JMP 0x001f824d
LAB_001f824d:
MOV AL,byte ptr [RSP + 0x7]
TEST AL,0x1
JNZ 0x001f8257
JMP 0x001f8269
LAB_001f8257:
MOV byte ptr [RSP + 0x127],0x0
MOV dword ptr [RSP + 0x44],0x1
JMP 0x001f8279
LAB_001f8269:
MOV byte ptr [RSP + 0x127],0x1
MOV dword ptr [RSP + 0x44],0x1
LAB_001f8279:
LEA RDI,[RSP + 0xf8]
CALL 0x00201c70
JMP 0x001f8297
LAB_001f8297:
MOV AL,byte ptr [RSP + 0x127]
AND AL,0x1
ADD RSP,0x128
RET
|
/* fs_validate_filename(std::__cxx11::string const&) */
ulong fs_validate_filename(string *param_1)
{
uint uVar1;
bool bVar2;
long lVar3;
ulong uVar4;
uint *puVar5;
char *pcVar6;
int8 local_108;
int8 local_100;
u32string *local_f8;
uint local_e4;
u32string local_e0 [32];
wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>
local_c0 [48];
wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>
local_90 [96];
u32string local_30 [32];
string *local_10;
int1 local_1;
local_10 = param_1;
lVar3 = std::__cxx11::string::length();
if (lVar3 == 0) {
local_1 = 0;
uVar4 = 0;
}
else {
uVar4 = std::__cxx11::string::length();
if (uVar4 < 0x100) {
std::__cxx11::u32string::u32string(local_30);
/* try { // try from 001f7f2e to 001f7f3a has its CatchHandler @ 001f7fc5 */
std::__cxx11::
wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>
::wstring_convert(local_90);
/* try { // try from 001f7f45 to 001f7f95 has its CatchHandler @ 001f7fdb */
std::__cxx11::
wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>
::from_bytes(local_c0,(string *)local_90);
std::__cxx11::u32string::operator=(local_30,(u32string *)local_c0);
std::__cxx11::u32string::~u32string((u32string *)local_c0);
std::__cxx11::
wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>
::to_bytes(local_e0);
bVar2 = std::operator!=((string *)local_e0,local_10);
if (bVar2) {
local_1 = 0;
}
local_e4 = (uint)bVar2;
std::__cxx11::string::~string((string *)local_e0);
std::__cxx11::
wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>
::~wstring_convert(local_90);
if (local_e4 == 0) {
local_f8 = local_30;
local_100 = std::__cxx11::u32string::begin(local_f8);
local_108 = std::__cxx11::u32string::end(local_f8);
while (bVar2 = __gnu_cxx::operator!=
((__normal_iterator *)&local_100,(__normal_iterator *)&local_108),
bVar2) {
puVar5 = (uint *)__gnu_cxx::__normal_iterator<char32_t*,std::__cxx11::u32string>::
operator*((__normal_iterator<char32_t*,std::__cxx11::u32string> *)
&local_100);
uVar1 = *puVar5;
if ((((((uVar1 < 0x20) || (uVar1 == 0x7f)) || ((0x7f < uVar1 && (uVar1 < 0xa0)))) ||
((uVar1 == 0xff0e || (uVar1 == 0x2215)))) ||
((uVar1 == 0x2216 ||
((((0xd7ff < uVar1 && (uVar1 < 0xe000)) || (uVar1 == 0xfffd)) ||
(((uVar1 == 0xfeff || (uVar1 == 0x2f)) ||
((uVar1 == 0x5c || ((uVar1 == 0x3a || (uVar1 == 0x2a)))))))))))) ||
((uVar1 == 0x3f ||
((((uVar1 == 0x22 || (uVar1 == 0x3c)) || (uVar1 == 0x3e)) || (uVar1 == 0x7c)))))) {
local_1 = 0;
local_e4 = 1;
goto LAB_001f8279;
}
__gnu_cxx::__normal_iterator<char32_t*,std::__cxx11::u32string>::operator++
((__normal_iterator<char32_t*,std::__cxx11::u32string> *)&local_100);
}
pcVar6 = (char *)std::__cxx11::string::front();
if (((*pcVar6 == ' ') || (pcVar6 = (char *)std::__cxx11::string::back(), *pcVar6 == ' ')) ||
(pcVar6 = (char *)std::__cxx11::string::back(), *pcVar6 == '.')) {
local_1 = 0;
local_e4 = 1;
}
else {
lVar3 = std::__cxx11::string::find((char *)local_10,0x313cb4);
if (lVar3 == -1) {
bVar2 = std::operator==(local_10,".");
if (bVar2) {
local_1 = 0;
local_e4 = 1;
}
else {
local_1 = 1;
local_e4 = 1;
}
}
else {
local_1 = 0;
local_e4 = 1;
}
}
}
LAB_001f8279:
uVar4 = std::__cxx11::u32string::~u32string(local_30);
}
else {
local_1 = 0;
}
}
return CONCAT71((int7)(uVar4 >> 8),local_1) & 0xffffffffffffff01;
}
|
|
3,493 | ma_init_block_record | eloqsql/storage/maria/ma_blockrec.c | my_bool _ma_init_block_record(MARIA_HA *info)
{
MARIA_ROW *row= &info->cur_row, *new_row= &info->new_row;
MARIA_SHARE *share= info->s;
myf flag= MY_WME | (share->temporary ? MY_THREAD_SPECIFIC : 0);
uint default_extents;
DBUG_ENTER("_ma_init_block_record");
if (!my_multi_malloc(PSI_INSTRUMENT_ME, flag,
&row->empty_bits, share->base.pack_bytes,
&row->field_lengths,
share->base.max_field_lengths + 2,
&row->blob_lengths, sizeof(ulong) * share->base.blobs,
&row->null_field_lengths, (sizeof(uint) *
(share->base.fields -
share->base.blobs +
EXTRA_LENGTH_FIELDS)),
&row->tail_positions, (sizeof(MARIA_RECORD_POS) *
(share->base.blobs + 2)),
&new_row->empty_bits, share->base.pack_bytes,
&new_row->field_lengths,
share->base.max_field_lengths + 2,
&new_row->blob_lengths,
sizeof(ulong) * share->base.blobs,
&new_row->null_field_lengths, (sizeof(uint) *
(share->base.fields -
share->base.blobs +
EXTRA_LENGTH_FIELDS)),
&info->log_row_parts,
sizeof(*info->log_row_parts) *
(TRANSLOG_INTERNAL_PARTS + 3 +
share->base.fields + 3),
&info->update_field_data,
(share->base.fields * 4 +
share->base.max_field_lengths + 1 + 4),
NullS, 0))
DBUG_RETURN(1);
/* Skip over bytes used to store length of field length for logging */
row->field_lengths+= 2;
new_row->field_lengths+= 2;
/* Reserve some initial space to avoid mallocs during execution */
default_extents= (ELEMENTS_RESERVED_FOR_MAIN_PART + 1 +
(AVERAGE_BLOB_SIZE /
FULL_PAGE_SIZE(share) /
BLOB_SEGMENT_MIN_SIZE));
if (my_init_dynamic_array(PSI_INSTRUMENT_ME, &info->bitmap_blocks,
sizeof(MARIA_BITMAP_BLOCK),
default_extents, 64, flag))
goto err;
info->cur_row.extents_buffer_length= default_extents * ROW_EXTENT_SIZE;
if (!(info->cur_row.extents= my_malloc(PSI_INSTRUMENT_ME,
info->cur_row.extents_buffer_length,
flag)))
goto err;
info->row_base_length= share->base_length;
info->row_flag= share->base.default_row_flag;
/*
We need to reserve 'EXTRA_LENGTH_FIELDS' number of parts in
null_field_lengths to allow splitting of rows in 'find_where_to_split_row'
*/
row->null_field_lengths+= EXTRA_LENGTH_FIELDS;
new_row->null_field_lengths+= EXTRA_LENGTH_FIELDS;
DBUG_RETURN(0);
err:
_ma_end_block_record(info);
DBUG_RETURN(1);
} | O0 | c | ma_init_block_record:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp # imm = 0x128
movq %rdi, -0x38(%rbp)
movq -0x38(%rbp), %rax
addq $0x80, %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
addq $0x140, %rax # imm = 0x140
movq %rax, -0x48(%rbp)
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%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, -0x58(%rbp)
movq -0x58(%rbp), %rsi
movq -0x40(%rbp), %rdx
addq $0x48, %rdx
movq -0x50(%rbp), %rax
movl 0x3f4(%rax), %ecx
movq -0x40(%rbp), %r8
addq $0x50, %r8
movq -0x50(%rbp), %rax
movl 0x3d4(%rax), %r9d
addl $0x2, %r9d
movq -0x40(%rbp), %rax
addq $0x60, %rax
movq %rax, -0xb0(%rbp)
movq -0x50(%rbp), %rax
movl 0x3f0(%rax), %eax
shlq $0x3, %rax
movq %rax, -0xa8(%rbp)
movq -0x40(%rbp), %rax
addq $0x58, %rax
movq %rax, -0xa0(%rbp)
movq -0x50(%rbp), %rax
movl 0x3c8(%rax), %eax
movq -0x50(%rbp), %rdi
subl 0x3f0(%rdi), %eax
addl $0x3, %eax
movl %eax, %eax
shlq $0x2, %rax
movq %rax, -0x98(%rbp)
movq -0x40(%rbp), %rax
addq $0x28, %rax
movq %rax, -0x90(%rbp)
movq -0x50(%rbp), %rax
movl 0x3f0(%rax), %eax
addl $0x2, %eax
movl %eax, %eax
shlq $0x3, %rax
movq %rax, -0x88(%rbp)
movq -0x48(%rbp), %rax
addq $0x48, %rax
movq %rax, -0x80(%rbp)
movq -0x50(%rbp), %rax
movl 0x3f4(%rax), %eax
movl %eax, -0x74(%rbp)
movq -0x48(%rbp), %rax
addq $0x50, %rax
movq %rax, -0x70(%rbp)
movq -0x50(%rbp), %rax
movl 0x3d4(%rax), %eax
addl $0x2, %eax
movl %eax, -0x64(%rbp)
movq -0x48(%rbp), %r13
addq $0x60, %r13
movq -0x50(%rbp), %rax
movl 0x3f0(%rax), %eax
movl %eax, %r12d
shlq $0x3, %r12
movq -0x48(%rbp), %r15
addq $0x58, %r15
movq -0x50(%rbp), %rax
movl 0x3c8(%rax), %eax
movq -0x50(%rbp), %rdi
subl 0x3f0(%rdi), %eax
addl $0x3, %eax
movl %eax, %eax
movl %eax, %r14d
shlq $0x2, %r14
movq -0x38(%rbp), %rbx
addq $0x318, %rbx # imm = 0x318
movq -0x50(%rbp), %rax
movl 0x3c8(%rax), %eax
addl $0x5, %eax
addl $0x3, %eax
movl %eax, %eax
movl %eax, %r11d
shlq $0x4, %r11
movq -0x38(%rbp), %r10
addq $0x3c8, %r10 # imm = 0x3C8
movq -0x50(%rbp), %rax
movl 0x3c8(%rax), %eax
shll $0x2, %eax
movq -0x50(%rbp), %rdi
addl 0x3d4(%rdi), %eax
addl $0x1, %eax
addl $0x4, %eax
movl %eax, -0x60(%rbp)
xorl %edi, %edi
xorl %eax, %eax
movq -0xb0(%rbp), %rax
movq %rax, (%rsp)
movq -0xa8(%rbp), %rax
movq %rax, 0x8(%rsp)
movq -0xa0(%rbp), %rax
movq %rax, 0x10(%rsp)
movq -0x98(%rbp), %rax
movq %rax, 0x18(%rsp)
movq -0x90(%rbp), %rax
movq %rax, 0x20(%rsp)
movq -0x88(%rbp), %rax
movq %rax, 0x28(%rsp)
movq -0x80(%rbp), %rax
movq %rax, 0x30(%rsp)
movl -0x74(%rbp), %eax
movl %eax, 0x38(%rsp)
movq -0x70(%rbp), %rax
movq %rax, 0x40(%rsp)
movl -0x64(%rbp), %eax
movl %eax, 0x48(%rsp)
movl -0x60(%rbp), %eax
movq %r13, 0x50(%rsp)
movq %r12, 0x58(%rsp)
movq %r15, 0x60(%rsp)
movq %r14, 0x68(%rsp)
movq %rbx, 0x70(%rsp)
movq %r11, 0x78(%rsp)
movq %r10, 0x80(%rsp)
movl %eax, 0x88(%rsp)
movq $0x0, 0x90(%rsp)
movl $0x0, 0x98(%rsp)
movb $0x0, %al
callq 0xecba0
cmpq $0x0, %rax
jne 0x744bc
jmp 0x744b3
movb $0x1, -0x29(%rbp)
jmp 0x745e5
movq -0x40(%rbp), %rax
movq 0x50(%rax), %rcx
addq $0x2, %rcx
movq %rcx, 0x50(%rax)
movq -0x48(%rbp), %rax
movq 0x50(%rax), %rcx
addq $0x2, %rcx
movq %rcx, 0x50(%rax)
movq -0x50(%rbp), %rax
movl 0x7bc(%rax), %eax
movq -0x50(%rbp), %rcx
movl 0xc18(%rcx), %ecx
addl $0x8, %ecx
subl %ecx, %eax
subl $0x4, %eax
movl %eax, %eax
movl %eax, %ecx
movl $0x100000, %eax # imm = 0x100000
cqto
idivq %rcx
movl $0x80, %ecx
cqto
idivq %rcx
addq $0x5, %rax
movl %eax, -0x5c(%rbp)
movq -0x38(%rbp), %rsi
addq $0x2c0, %rsi # imm = 0x2C0
movl -0x5c(%rbp), %r8d
movq -0x58(%rbp), %rax
xorl %edi, %edi
movl $0x18, %edx
xorl %ecx, %ecx
movl $0x40, %r9d
movq %rax, (%rsp)
callq 0xda810
cmpb $0x0, %al
je 0x7454b
jmp 0x745d8
imull $0x7, -0x5c(%rbp), %eax
movl %eax, %eax
movl %eax, %ecx
movq -0x38(%rbp), %rax
movq %rcx, 0x118(%rax)
movq -0x38(%rbp), %rax
movq 0x118(%rax), %rsi
movq -0x58(%rbp), %rdx
xorl %edi, %edi
callq 0xf3860
movq -0x38(%rbp), %rcx
movq %rax, 0x90(%rcx)
cmpq $0x0, %rax
jne 0x74587
jmp 0x745d8
movq -0x50(%rbp), %rax
movl 0x7c4(%rax), %eax
movl %eax, %ecx
movq -0x38(%rbp), %rax
movq %rcx, 0x610(%rax)
movq -0x50(%rbp), %rax
movl 0x418(%rax), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x618(%rax)
movq -0x40(%rbp), %rax
movq 0x58(%rax), %rcx
addq $0xc, %rcx
movq %rcx, 0x58(%rax)
movq -0x48(%rbp), %rax
movq 0x58(%rax), %rcx
addq $0xc, %rcx
movq %rcx, 0x58(%rax)
movb $0x0, -0x29(%rbp)
jmp 0x745e5
movq -0x38(%rbp), %rdi
callq 0x74600
movb $0x1, -0x29(%rbp)
movb -0x29(%rbp), %al
addq $0x128, %rsp # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopw (%rax,%rax)
| _ma_init_block_record:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 128h
mov [rbp+var_38], rdi
mov rax, [rbp+var_38]
add rax, 80h
mov [rbp+var_40], rax
mov rax, [rbp+var_38]
add rax, 140h
mov [rbp+var_48], rax
mov rax, [rbp+var_38]
mov rax, [rax]
mov [rbp+var_50], rax
mov rax, [rbp+var_50]
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_58], rax
mov rsi, [rbp+var_58]
mov rdx, [rbp+var_40]
add rdx, 48h ; 'H'
mov rax, [rbp+var_50]
mov ecx, [rax+3F4h]
mov r8, [rbp+var_40]
add r8, 50h ; 'P'
mov rax, [rbp+var_50]
mov r9d, [rax+3D4h]
add r9d, 2
mov rax, [rbp+var_40]
add rax, 60h ; '`'
mov [rbp+var_B0], rax
mov rax, [rbp+var_50]
mov eax, [rax+3F0h]
shl rax, 3
mov [rbp+var_A8], rax
mov rax, [rbp+var_40]
add rax, 58h ; 'X'
mov [rbp+var_A0], rax
mov rax, [rbp+var_50]
mov eax, [rax+3C8h]
mov rdi, [rbp+var_50]
sub eax, [rdi+3F0h]
add eax, 3
mov eax, eax
shl rax, 2
mov [rbp+var_98], rax
mov rax, [rbp+var_40]
add rax, 28h ; '('
mov [rbp+var_90], rax
mov rax, [rbp+var_50]
mov eax, [rax+3F0h]
add eax, 2
mov eax, eax
shl rax, 3
mov [rbp+var_88], rax
mov rax, [rbp+var_48]
add rax, 48h ; 'H'
mov [rbp+var_80], rax
mov rax, [rbp+var_50]
mov eax, [rax+3F4h]
mov [rbp+var_74], eax
mov rax, [rbp+var_48]
add rax, 50h ; 'P'
mov [rbp+var_70], rax
mov rax, [rbp+var_50]
mov eax, [rax+3D4h]
add eax, 2
mov [rbp+var_64], eax
mov r13, [rbp+var_48]
add r13, 60h ; '`'
mov rax, [rbp+var_50]
mov eax, [rax+3F0h]
mov r12d, eax
shl r12, 3
mov r15, [rbp+var_48]
add r15, 58h ; 'X'
mov rax, [rbp+var_50]
mov eax, [rax+3C8h]
mov rdi, [rbp+var_50]
sub eax, [rdi+3F0h]
add eax, 3
mov eax, eax
mov r14d, eax
shl r14, 2
mov rbx, [rbp+var_38]
add rbx, 318h
mov rax, [rbp+var_50]
mov eax, [rax+3C8h]
add eax, 5
add eax, 3
mov eax, eax
mov r11d, eax
shl r11, 4
mov r10, [rbp+var_38]
add r10, 3C8h
mov rax, [rbp+var_50]
mov eax, [rax+3C8h]
shl eax, 2
mov rdi, [rbp+var_50]
add eax, [rdi+3D4h]
add eax, 1
add eax, 4
mov [rbp+var_60], eax
xor edi, edi
xor eax, eax
mov rax, [rbp+var_B0]
mov [rsp+150h+var_150], rax
mov rax, [rbp+var_A8]
mov [rsp+150h+var_148], rax
mov rax, [rbp+var_A0]
mov [rsp+150h+var_140], rax
mov rax, [rbp+var_98]
mov [rsp+150h+var_138], rax
mov rax, [rbp+var_90]
mov [rsp+150h+var_130], rax
mov rax, [rbp+var_88]
mov [rsp+150h+var_128], rax
mov rax, [rbp+var_80]
mov [rsp+150h+var_120], rax
mov eax, [rbp+var_74]
mov [rsp+150h+var_118], eax
mov rax, [rbp+var_70]
mov [rsp+150h+var_110], rax
mov eax, [rbp+var_64]
mov [rsp+150h+var_108], eax
mov eax, [rbp+var_60]
mov [rsp+150h+var_100], r13
mov [rsp+150h+var_F8], r12
mov [rsp+150h+var_F0], r15
mov [rsp+150h+var_E8], r14
mov [rsp+150h+var_E0], rbx
mov [rsp+150h+var_D8], r11
mov [rsp+150h+var_D0], r10
mov [rsp+150h+var_C8], eax
mov [rsp+150h+var_C0], 0
mov [rsp+150h+var_B8], 0
mov al, 0
call my_multi_malloc
cmp rax, 0
jnz short loc_744BC
jmp short $+2
loc_744B3:
mov [rbp+var_29], 1
jmp loc_745E5
loc_744BC:
mov rax, [rbp+var_40]
mov rcx, [rax+50h]
add rcx, 2
mov [rax+50h], rcx
mov rax, [rbp+var_48]
mov rcx, [rax+50h]
add rcx, 2
mov [rax+50h], rcx
mov rax, [rbp+var_50]
mov eax, [rax+7BCh]
mov rcx, [rbp+var_50]
mov ecx, [rcx+0C18h]
add ecx, 8
sub eax, ecx
sub eax, 4
mov eax, eax
mov ecx, eax
mov eax, 100000h
cqo
idiv rcx
mov ecx, 80h
cqo
idiv rcx
add rax, 5
mov [rbp+var_5C], eax
mov rsi, [rbp+var_38]
add rsi, 2C0h
mov r8d, [rbp+var_5C]
mov rax, [rbp+var_58]
xor edi, edi
mov edx, 18h
xor ecx, ecx
mov r9d, 40h ; '@'
mov [rsp+150h+var_150], rax
call init_dynamic_array2
cmp al, 0
jz short loc_7454B
jmp loc_745D8
loc_7454B:
imul eax, [rbp+var_5C], 7
mov eax, eax
mov ecx, eax
mov rax, [rbp+var_38]
mov [rax+118h], rcx
mov rax, [rbp+var_38]
mov rsi, [rax+118h]
mov rdx, [rbp+var_58]
xor edi, edi
call my_malloc
mov rcx, [rbp+var_38]
mov [rcx+90h], rax
cmp rax, 0
jnz short loc_74587
jmp short loc_745D8
loc_74587:
mov rax, [rbp+var_50]
mov eax, [rax+7C4h]
mov ecx, eax
mov rax, [rbp+var_38]
mov [rax+610h], rcx
mov rax, [rbp+var_50]
mov ecx, [rax+418h]
mov rax, [rbp+var_38]
mov [rax+618h], ecx
mov rax, [rbp+var_40]
mov rcx, [rax+58h]
add rcx, 0Ch
mov [rax+58h], rcx
mov rax, [rbp+var_48]
mov rcx, [rax+58h]
add rcx, 0Ch
mov [rax+58h], rcx
mov [rbp+var_29], 0
jmp short loc_745E5
loc_745D8:
mov rdi, [rbp+var_38]
call _ma_end_block_record
mov [rbp+var_29], 1
loc_745E5:
mov al, [rbp+var_29]
add rsp, 128h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| char ma_init_block_record(long long a1)
{
int v1; // eax
long long v2; // rax
int v4; // [rsp+38h] [rbp-118h]
int v5; // [rsp+48h] [rbp-108h]
int v6; // [rsp+F4h] [rbp-5Ch]
long long v7; // [rsp+F8h] [rbp-58h]
_DWORD *v8; // [rsp+100h] [rbp-50h]
long long v9; // [rsp+108h] [rbp-48h]
long long v10; // [rsp+110h] [rbp-40h]
v8 = *(_DWORD **)a1;
v1 = 0;
if ( *(_BYTE *)(*(_QWORD *)a1 + 2009LL) )
v1 = 0x10000;
v7 = v1 | 0x10u;
v4 = v8[253];
v5 = v8[245] + 2;
v9 = a1 + 320;
v10 = a1 + 128;
if ( !my_multi_malloc(
0,
v1 | 0x10u,
(int)v10 + 72,
v4,
(int)v10 + 80,
v5,
v10 + 96,
8LL * (unsigned int)v8[252],
v10 + 88,
4LL * (unsigned int)(v8[242] - v8[252] + 3),
v10 + 40,
8LL * (unsigned int)(v8[252] + 2),
v9 + 72,
v4,
v9 + 80,
v5,
v9 + 96,
8LL * (unsigned int)v8[252],
v9 + 88,
4LL * (unsigned int)(v8[242] - v8[252] + 3),
a1 + 792,
16LL * (unsigned int)(v8[242] + 8),
a1 + 968,
v8[245] + 4 * v8[242] + 5,
0LL,
0,
v10 + 96,
8LL * (unsigned int)v8[252],
v10 + 88,
4LL * (unsigned int)(v8[242] - v8[252] + 3),
v10 + 40,
8LL * (unsigned int)(v8[252] + 2),
v9 + 72) )
return 1;
*(_QWORD *)(a1 + 208) += 2LL;
*(_QWORD *)(a1 + 400) += 2LL;
v6 = 0x100000LL / (unsigned int)(v8[495] - (v8[774] + 8) - 4) / 128 + 5;
if ( (unsigned __int8)init_dynamic_array2(0, (int)a1 + 704, 24, 0, v6, 64, v7)
|| (*(_QWORD *)(a1 + 280) = (unsigned int)(7 * v6),
v2 = my_malloc(0LL, *(_QWORD *)(a1 + 280), v7),
(*(_QWORD *)(a1 + 144) = v2) == 0LL) )
{
ma_end_block_record(a1);
return 1;
}
else
{
*(_QWORD *)(a1 + 1552) = (unsigned int)v8[497];
*(_DWORD *)(a1 + 1560) = v8[262];
*(_QWORD *)(a1 + 216) += 12LL;
*(_QWORD *)(a1 + 408) += 12LL;
return 0;
}
}
| _ma_init_block_record:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x128
MOV qword ptr [RBP + -0x38],RDI
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x80
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x140
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x50]
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 + -0x58],RAX
MOV RSI,qword ptr [RBP + -0x58]
MOV RDX,qword ptr [RBP + -0x40]
ADD RDX,0x48
MOV RAX,qword ptr [RBP + -0x50]
MOV ECX,dword ptr [RAX + 0x3f4]
MOV R8,qword ptr [RBP + -0x40]
ADD R8,0x50
MOV RAX,qword ptr [RBP + -0x50]
MOV R9D,dword ptr [RAX + 0x3d4]
ADD R9D,0x2
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,0x60
MOV qword ptr [RBP + -0xb0],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RAX + 0x3f0]
SHL RAX,0x3
MOV qword ptr [RBP + -0xa8],RAX
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,0x58
MOV qword ptr [RBP + -0xa0],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RAX + 0x3c8]
MOV RDI,qword ptr [RBP + -0x50]
SUB EAX,dword ptr [RDI + 0x3f0]
ADD EAX,0x3
MOV EAX,EAX
SHL RAX,0x2
MOV qword ptr [RBP + -0x98],RAX
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,0x28
MOV qword ptr [RBP + -0x90],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RAX + 0x3f0]
ADD EAX,0x2
MOV EAX,EAX
SHL RAX,0x3
MOV qword ptr [RBP + -0x88],RAX
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,0x48
MOV qword ptr [RBP + -0x80],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RAX + 0x3f4]
MOV dword ptr [RBP + -0x74],EAX
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,0x50
MOV qword ptr [RBP + -0x70],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RAX + 0x3d4]
ADD EAX,0x2
MOV dword ptr [RBP + -0x64],EAX
MOV R13,qword ptr [RBP + -0x48]
ADD R13,0x60
MOV RAX,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RAX + 0x3f0]
MOV R12D,EAX
SHL R12,0x3
MOV R15,qword ptr [RBP + -0x48]
ADD R15,0x58
MOV RAX,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RAX + 0x3c8]
MOV RDI,qword ptr [RBP + -0x50]
SUB EAX,dword ptr [RDI + 0x3f0]
ADD EAX,0x3
MOV EAX,EAX
MOV R14D,EAX
SHL R14,0x2
MOV RBX,qword ptr [RBP + -0x38]
ADD RBX,0x318
MOV RAX,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RAX + 0x3c8]
ADD EAX,0x5
ADD EAX,0x3
MOV EAX,EAX
MOV R11D,EAX
SHL R11,0x4
MOV R10,qword ptr [RBP + -0x38]
ADD R10,0x3c8
MOV RAX,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RAX + 0x3c8]
SHL EAX,0x2
MOV RDI,qword ptr [RBP + -0x50]
ADD EAX,dword ptr [RDI + 0x3d4]
ADD EAX,0x1
ADD EAX,0x4
MOV dword ptr [RBP + -0x60],EAX
XOR EDI,EDI
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0xb0]
MOV qword ptr [RSP],RAX
MOV RAX,qword ptr [RBP + -0xa8]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RBP + -0xa0]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RBP + -0x98]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RBP + -0x90]
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RBP + -0x88]
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RBP + -0x80]
MOV qword ptr [RSP + 0x30],RAX
MOV EAX,dword ptr [RBP + -0x74]
MOV dword ptr [RSP + 0x38],EAX
MOV RAX,qword ptr [RBP + -0x70]
MOV qword ptr [RSP + 0x40],RAX
MOV EAX,dword ptr [RBP + -0x64]
MOV dword ptr [RSP + 0x48],EAX
MOV EAX,dword ptr [RBP + -0x60]
MOV qword ptr [RSP + 0x50],R13
MOV qword ptr [RSP + 0x58],R12
MOV qword ptr [RSP + 0x60],R15
MOV qword ptr [RSP + 0x68],R14
MOV qword ptr [RSP + 0x70],RBX
MOV qword ptr [RSP + 0x78],R11
MOV qword ptr [RSP + 0x80],R10
MOV dword ptr [RSP + 0x88],EAX
MOV qword ptr [RSP + 0x90],0x0
MOV dword ptr [RSP + 0x98],0x0
MOV AL,0x0
CALL 0x001ecba0
CMP RAX,0x0
JNZ 0x001744bc
JMP 0x001744b3
LAB_001744b3:
MOV byte ptr [RBP + -0x29],0x1
JMP 0x001745e5
LAB_001744bc:
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RAX + 0x50]
ADD RCX,0x2
MOV qword ptr [RAX + 0x50],RCX
MOV RAX,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [RAX + 0x50]
ADD RCX,0x2
MOV qword ptr [RAX + 0x50],RCX
MOV RAX,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RAX + 0x7bc]
MOV RCX,qword ptr [RBP + -0x50]
MOV ECX,dword ptr [RCX + 0xc18]
ADD ECX,0x8
SUB EAX,ECX
SUB EAX,0x4
MOV EAX,EAX
MOV ECX,EAX
MOV EAX,0x100000
CQO
IDIV RCX
MOV ECX,0x80
CQO
IDIV RCX
ADD RAX,0x5
MOV dword ptr [RBP + -0x5c],EAX
MOV RSI,qword ptr [RBP + -0x38]
ADD RSI,0x2c0
MOV R8D,dword ptr [RBP + -0x5c]
MOV RAX,qword ptr [RBP + -0x58]
XOR EDI,EDI
MOV EDX,0x18
XOR ECX,ECX
MOV R9D,0x40
MOV qword ptr [RSP],RAX
CALL 0x001da810
CMP AL,0x0
JZ 0x0017454b
JMP 0x001745d8
LAB_0017454b:
IMUL EAX,dword ptr [RBP + -0x5c],0x7
MOV EAX,EAX
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x118],RCX
MOV RAX,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RAX + 0x118]
MOV RDX,qword ptr [RBP + -0x58]
XOR EDI,EDI
CALL 0x001f3860
MOV RCX,qword ptr [RBP + -0x38]
MOV qword ptr [RCX + 0x90],RAX
CMP RAX,0x0
JNZ 0x00174587
JMP 0x001745d8
LAB_00174587:
MOV RAX,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RAX + 0x7c4]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x610],RCX
MOV RAX,qword ptr [RBP + -0x50]
MOV ECX,dword ptr [RAX + 0x418]
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x618],ECX
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RAX + 0x58]
ADD RCX,0xc
MOV qword ptr [RAX + 0x58],RCX
MOV RAX,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [RAX + 0x58]
ADD RCX,0xc
MOV qword ptr [RAX + 0x58],RCX
MOV byte ptr [RBP + -0x29],0x0
JMP 0x001745e5
LAB_001745d8:
MOV RDI,qword ptr [RBP + -0x38]
CALL 0x00174600
MOV byte ptr [RBP + -0x29],0x1
LAB_001745e5:
MOV AL,byte ptr [RBP + -0x29]
ADD RSP,0x128
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 _ma_init_block_record(long *param_1)
{
long lVar1;
int1 auVar2 [16];
char cVar3;
uint uVar4;
int iVar5;
long lVar6;
lVar1 = *param_1;
uVar4 = 0;
if (*(char *)(lVar1 + 0x7d9) != '\0') {
uVar4 = 0x10000;
}
uVar4 = uVar4 | 0x10;
lVar6 = my_multi_malloc(0,uVar4,param_1 + 0x19,*(int4 *)(lVar1 + 0x3f4),param_1 + 0x1a,
*(int *)(lVar1 + 0x3d4) + 2,param_1 + 0x1c,
(ulong)*(uint *)(lVar1 + 0x3f0) << 3,param_1 + 0x1b,
(ulong)((*(int *)(lVar1 + 0x3c8) - *(int *)(lVar1 + 0x3f0)) + 3) << 2,
param_1 + 0x15,(ulong)(*(int *)(lVar1 + 0x3f0) + 2) << 3,param_1 + 0x31,
*(int4 *)(lVar1 + 0x3f4),param_1 + 0x32,*(int *)(lVar1 + 0x3d4) + 2,
param_1 + 0x34,(ulong)*(uint *)(lVar1 + 0x3f0) << 3,param_1 + 0x33,
(ulong)((*(int *)(lVar1 + 0x3c8) - *(int *)(lVar1 + 0x3f0)) + 3) << 2,
param_1 + 99,(ulong)(*(int *)(lVar1 + 0x3c8) + 8) << 4,param_1 + 0x79,
*(int *)(lVar1 + 0x3c8) * 4 + *(int *)(lVar1 + 0x3d4) + 5,0,0);
if (lVar6 != 0) {
param_1[0x1a] = param_1[0x1a] + 2;
param_1[0x32] = param_1[0x32] + 2;
auVar2._8_8_ = 0;
auVar2._0_8_ = SUB168(SEXT816(0x100000),8);
iVar5 = (int)(SUB168((auVar2 << 0x40 | ZEXT816(0x100000)) /
SEXT816((long)(ulong)((*(int *)(lVar1 + 0x7bc) -
(*(int *)(lVar1 + 0xc18) + 8)) - 4)),0) / 0x80) + 5;
cVar3 = init_dynamic_array2(0,param_1 + 0x58,0x18,0,iVar5,0x40,uVar4);
if (cVar3 == '\0') {
param_1[0x23] = (ulong)(uint)(iVar5 * 7);
lVar6 = my_malloc(0,param_1[0x23],uVar4);
param_1[0x12] = lVar6;
if (lVar6 != 0) {
param_1[0xc2] = (ulong)*(uint *)(lVar1 + 0x7c4);
*(int4 *)(param_1 + 0xc3) = *(int4 *)(lVar1 + 0x418);
param_1[0x1b] = param_1[0x1b] + 0xc;
param_1[0x33] = param_1[0x33] + 0xc;
return 0;
}
}
_ma_end_block_record(param_1);
}
return 1;
}
|
|
3,494 | test_bug11754979 | eloqsql/tests/mysql_client_test.c | static void test_bug11754979()
{
MYSQL* conn;
DBUG_ENTER("test_bug11754979");
myheader("test_bug11754979");
DIE_UNLESS((conn= mysql_client_init(NULL)));
DIE_UNLESS(mysql_real_connect(conn, opt_host, opt_user,
opt_password, opt_db ? opt_db:"test", opt_port,
opt_unix_socket, CLIENT_FOUND_ROWS));
myquery(mysql_query(conn, "DROP TABLE IF EXISTS t1"));
myquery(mysql_query(conn, "CREATE TABLE t1(id INT, label CHAR(1), PRIMARY KEY(id))"));
myquery(mysql_query(conn, "INSERT INTO t1(id, label) VALUES (1, 'a')"));
myquery(mysql_query(conn, "INSERT INTO t1(id, label) VALUES (1, 'a') "
"ON DUPLICATE KEY UPDATE id = 4"));
DIE_UNLESS(mysql_affected_rows(conn) == 2);
myquery(mysql_query(conn, "DROP TABLE t1"));
mysql_close(conn);
DBUG_VOID_RETURN;
} | O0 | c | test_bug11754979:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
jmp 0x9581a
movsbl 0x3d4cb0(%rip), %eax # 0x46a4d1
cmpl $0x2, %eax
jge 0x958a2
movq 0x2197ab(%rip), %rax # 0x2aefd8
movq (%rax), %rdi
leaq 0x98aed(%rip), %rsi # 0x12e324
movb $0x0, %al
callq 0x3a1c0
movq 0x219793(%rip), %rax # 0x2aefd8
movq (%rax), %rdi
movl 0x3d4ece(%rip), %edx # 0x46a71c
movl %edx, %eax
addl $0x1, %eax
movl %eax, 0x3d4ec3(%rip) # 0x46a71c
movl 0x3d4eb9(%rip), %ecx # 0x46a718
movl 0x3d4c96(%rip), %r8d # 0x46a4fc
leaq 0x99dbf(%rip), %rsi # 0x12f62c
leaq 0x99bd6(%rip), %r9 # 0x12f44a
movb $0x0, %al
callq 0x3a1c0
movq 0x219756(%rip), %rax # 0x2aefd8
movq (%rax), %rdi
leaq 0x98ad0(%rip), %rsi # 0x12e35c
movb $0x0, %al
callq 0x3a1c0
movq 0x21973e(%rip), %rax # 0x2aefd8
movq (%rax), %rdi
callq 0x3a4a0
xorl %eax, %eax
movl %eax, %edi
callq 0x3e6a0
movq %rax, -0x8(%rbp)
cmpq $0x0, %rax
je 0x958b7
jmp 0x958cf
leaq 0x9834e(%rip), %rdi # 0x12dc0c
movl $0x4be1, %esi # imm = 0x4BE1
leaq 0xaf587(%rip), %rdx # 0x144e51
callq 0x3c010
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movq 0x3d4e62(%rip), %rax # 0x46a740
movq %rax, -0x38(%rbp)
movq 0x3d5e8f(%rip), %rax # 0x46b778
movq %rax, -0x30(%rbp)
movq 0x3d4e44(%rip), %rax # 0x46a738
movq %rax, -0x28(%rbp)
cmpq $0x0, 0x3d5e60(%rip) # 0x46b760
je 0x9590f
movq 0x3d5e57(%rip), %rax # 0x46b760
movq %rax, -0x48(%rbp)
jmp 0x9591c
leaq 0x9d177(%rip), %rax # 0x132a8d
movq %rax, -0x48(%rbp)
jmp 0x9591c
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %rdx
movq -0x38(%rbp), %rsi
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %r8
movl 0x3d5e31(%rip), %r9d # 0x46b768
movq 0x3d5e32(%rip), %rax # 0x46b770
movq %rax, (%rsp)
movq $0x2, 0x8(%rsp)
callq 0x3ad60
cmpq $0x0, %rax
je 0x95958
jmp 0x95970
leaq 0x982ad(%rip), %rdi # 0x12dc0c
movl $0x4be4, %esi # imm = 0x4BE4
leaq 0xaf506(%rip), %rdx # 0x144e71
callq 0x3c010
movq -0x8(%rbp), %rdi
leaq 0x99cc3(%rip), %rsi # 0x12f63e
callq 0x3b3d0
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0x95992
xorl %eax, %eax
movl %eax, %edi
callq 0x3bf10
cmpl $0x0, -0xc(%rbp)
jne 0x9599a
jmp 0x959b2
leaq 0x9826b(%rip), %rdi # 0x12dc0c
movl $0x4be5, %esi # imm = 0x4BE5
leaq 0xae5c2(%rip), %rdx # 0x143f6f
callq 0x3c010
movq -0x8(%rbp), %rdi
leaq 0xaf535(%rip), %rsi # 0x144ef2
callq 0x3b3d0
movl %eax, -0x10(%rbp)
cmpl $0x0, -0x10(%rbp)
je 0x959d4
xorl %eax, %eax
movl %eax, %edi
callq 0x3bf10
cmpl $0x0, -0x10(%rbp)
jne 0x959dc
jmp 0x959f4
leaq 0x98229(%rip), %rdi # 0x12dc0c
movl $0x4be6, %esi # imm = 0x4BE6
leaq 0xae580(%rip), %rdx # 0x143f6f
callq 0x3c010
movq -0x8(%rbp), %rdi
leaq 0xaf52b(%rip), %rsi # 0x144f2a
callq 0x3b3d0
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x95a16
xorl %eax, %eax
movl %eax, %edi
callq 0x3bf10
cmpl $0x0, -0x14(%rbp)
jne 0x95a1e
jmp 0x95a36
leaq 0x981e7(%rip), %rdi # 0x12dc0c
movl $0x4be7, %esi # imm = 0x4BE7
leaq 0xae53e(%rip), %rdx # 0x143f6f
callq 0x3c010
movq -0x8(%rbp), %rdi
leaq 0xaf513(%rip), %rsi # 0x144f54
callq 0x3b3d0
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
je 0x95a58
xorl %eax, %eax
movl %eax, %edi
callq 0x3bf10
cmpl $0x0, -0x18(%rbp)
jne 0x95a60
jmp 0x95a78
leaq 0x981a5(%rip), %rdi # 0x12dc0c
movl $0x4be9, %esi # imm = 0x4BE9
leaq 0xae4fc(%rip), %rdx # 0x143f6f
callq 0x3c010
movq -0x8(%rbp), %rdi
callq 0xaa120
cmpq $0x2, %rax
jne 0x95a89
jmp 0x95aa1
leaq 0x9817c(%rip), %rdi # 0x12dc0c
movl $0x4bea, %esi # imm = 0x4BEA
leaq 0xac6c7(%rip), %rdx # 0x142163
callq 0x3c010
movq -0x8(%rbp), %rdi
leaq 0x99bc1(%rip), %rsi # 0x12f66d
callq 0x3b3d0
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x95ac3
xorl %eax, %eax
movl %eax, %edi
callq 0x3bf10
cmpl $0x0, -0x1c(%rbp)
jne 0x95acb
jmp 0x95ae3
leaq 0x9813a(%rip), %rdi # 0x12dc0c
movl $0x4beb, %esi # imm = 0x4BEB
leaq 0xae491(%rip), %rdx # 0x143f6f
callq 0x3c010
movq -0x8(%rbp), %rdi
callq 0x3b2e0
jmp 0x95aee
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| test_bug11754979:
push rbp
mov rbp, rsp
sub rsp, 60h
jmp short $+2
loc_9581A:
movsx eax, cs:opt_silent
cmp eax, 2
jge short loc_958A2
mov rax, cs:stdout_ptr
mov rdi, [rax]
lea rsi, asc_12E324; "\n\n###################################"...
mov al, 0
call _fprintf
mov rax, cs:stdout_ptr
mov rdi, [rax]
mov edx, cs:test_count
mov eax, edx
add eax, 1
mov cs:test_count, eax
mov ecx, cs:iter_count
mov r8d, cs:opt_count
lea rsi, aUOfUUS; "%u of (%u/%u): %s"
lea r9, aTestBug1175497; "test_bug11754979"
mov al, 0
call _fprintf
mov rax, cs:stdout_ptr
mov rdi, [rax]
lea rsi, asc_12E35C; " \n###################################"...
mov al, 0
call _fprintf
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
loc_958A2:
xor eax, eax
mov edi, eax
call mysql_client_init
mov [rbp+var_8], rax
cmp rax, 0
jz short loc_958B7
jmp short loc_958CF
loc_958B7:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 4BE1h
lea rdx, aConnMysqlClien; "(conn= mysql_client_init(NULL))"
call die
loc_958CF:
mov rax, [rbp+var_8]
mov [rbp+var_40], rax
mov rax, cs:opt_host
mov [rbp+var_38], rax
mov rax, cs:opt_user
mov [rbp+var_30], rax
mov rax, cs:opt_password
mov [rbp+var_28], rax
cmp cs:opt_db, 0
jz short loc_9590F
mov rax, cs:opt_db
mov [rbp+var_48], rax
jmp short loc_9591C
loc_9590F:
lea rax, aShowCreateData+15h; "test"
mov [rbp+var_48], rax
jmp short $+2
loc_9591C:
mov rcx, [rbp+var_28]
mov rdx, [rbp+var_30]
mov rsi, [rbp+var_38]
mov rdi, [rbp+var_40]
mov r8, [rbp+var_48]
mov r9d, cs:opt_port
mov rax, cs:opt_unix_socket
mov [rsp+60h+var_60], rax
mov [rsp+60h+var_58], 2
call wrap_mysql_real_connect
cmp rax, 0
jz short loc_95958
jmp short loc_95970
loc_95958:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 4BE4h
lea rdx, aMysqlRealConne_6; "mysql_real_connect(conn, opt_host, opt_"...
call die
loc_95970:
mov rdi, [rbp+var_8]
lea rsi, aDropTableIfExi; "DROP TABLE IF EXISTS t1"
call wrap_mysql_query
mov [rbp+var_C], eax
cmp [rbp+var_C], 0
jz short loc_95992
xor eax, eax
mov edi, eax
call print_error
loc_95992:
cmp [rbp+var_C], 0
jnz short loc_9599A
jmp short loc_959B2
loc_9599A:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 4BE5h
lea rdx, aTmIYear0+9; "r == 0"
call die
loc_959B2:
mov rdi, [rbp+var_8]
lea rsi, aCreateTableT1I_20; "CREATE TABLE t1(id INT, label CHAR(1), "...
call wrap_mysql_query
mov [rbp+var_10], eax
cmp [rbp+var_10], 0
jz short loc_959D4
xor eax, eax
mov edi, eax
call print_error
loc_959D4:
cmp [rbp+var_10], 0
jnz short loc_959DC
jmp short loc_959F4
loc_959DC:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 4BE6h
lea rdx, aTmIYear0+9; "r == 0"
call die
loc_959F4:
mov rdi, [rbp+var_8]
lea rsi, aInsertIntoT1Id_6; "INSERT INTO t1(id, label) VALUES (1, 'a"...
call wrap_mysql_query
mov [rbp+var_14], eax
cmp [rbp+var_14], 0
jz short loc_95A16
xor eax, eax
mov edi, eax
call print_error
loc_95A16:
cmp [rbp+var_14], 0
jnz short loc_95A1E
jmp short loc_95A36
loc_95A1E:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 4BE7h
lea rdx, aTmIYear0+9; "r == 0"
call die
loc_95A36:
mov rdi, [rbp+var_8]
lea rsi, aInsertIntoT1Id_7; "INSERT INTO t1(id, label) VALUES (1, 'a"...
call wrap_mysql_query
mov [rbp+var_18], eax
cmp [rbp+var_18], 0
jz short loc_95A58
xor eax, eax
mov edi, eax
call print_error
loc_95A58:
cmp [rbp+var_18], 0
jnz short loc_95A60
jmp short loc_95A78
loc_95A60:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 4BE9h
lea rdx, aTmIYear0+9; "r == 0"
call die
loc_95A78:
mov rdi, [rbp+var_8]
call mysql_affected_rows
cmp rax, 2
jnz short loc_95A89
jmp short loc_95AA1
loc_95A89:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 4BEAh
lea rdx, aMysqlAffectedR_1; "mysql_affected_rows(conn) == 2"
call die
loc_95AA1:
mov rdi, [rbp+var_8]
lea rsi, aDropTableT1; "DROP TABLE t1"
call wrap_mysql_query
mov [rbp+var_1C], eax
cmp [rbp+var_1C], 0
jz short loc_95AC3
xor eax, eax
mov edi, eax
call print_error
loc_95AC3:
cmp [rbp+var_1C], 0
jnz short loc_95ACB
jmp short loc_95AE3
loc_95ACB:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 4BEBh
lea rdx, aTmIYear0+9; "r == 0"
call die
loc_95AE3:
mov rdi, [rbp+var_8]
call wrap_mysql_close
jmp short $+2
loc_95AEE:
add rsp, 60h
pop rbp
retn
| long long test_bug11754979()
{
int v0; // edx
long long v1; // rax
long long v3; // [rsp+58h] [rbp-8h]
if ( opt_silent < 2 )
{
fprintf(stdout, "\n\n#####################################\n");
v0 = test_count++;
fprintf(stdout, "%u of (%u/%u): %s", v0, iter_count, opt_count, "test_bug11754979");
fprintf(stdout, " \n#####################################\n");
fflush(stdout);
}
v3 = mysql_client_init(0LL);
if ( !v3 )
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 19425, "(conn= mysql_client_init(NULL))");
if ( opt_db )
v1 = wrap_mysql_real_connect(v3, opt_host, opt_user, opt_password, opt_db, opt_port, opt_unix_socket, 2LL);
else
v1 = wrap_mysql_real_connect(v3, opt_host, opt_user, opt_password, (long long)"test", opt_port, opt_unix_socket, 2LL);
if ( !v1 )
die(
"/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",
19428,
"mysql_real_connect(conn, opt_host, opt_user, opt_password, opt_db ? opt_db:\"test\", opt_port, opt_unix_socket, CL"
"IENT_FOUND_ROWS)");
if ( (unsigned int)wrap_mysql_query(v3, (long long)"DROP TABLE IF EXISTS t1") )
{
print_error(0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 19429, "r == 0");
}
if ( (unsigned int)wrap_mysql_query(v3, (long long)"CREATE TABLE t1(id INT, label CHAR(1), PRIMARY KEY(id))") )
{
print_error(0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 19430, "r == 0");
}
if ( (unsigned int)wrap_mysql_query(v3, (long long)"INSERT INTO t1(id, label) VALUES (1, 'a')") )
{
print_error(0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 19431, "r == 0");
}
if ( (unsigned int)wrap_mysql_query(
v3,
(long long)"INSERT INTO t1(id, label) VALUES (1, 'a') ON DUPLICATE KEY UPDATE id = 4") )
{
print_error(0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 19433, "r == 0");
}
if ( mysql_affected_rows(v3) != 2 )
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 19434, "mysql_affected_rows(conn) == 2");
if ( (unsigned int)wrap_mysql_query(v3, (long long)"DROP TABLE t1") )
{
print_error(0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 19435, "r == 0");
}
return wrap_mysql_close(v3);
}
| test_bug11754979:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
JMP 0x0019581a
LAB_0019581a:
MOVSX EAX,byte ptr [0x0056a4d1]
CMP EAX,0x2
JGE 0x001958a2
MOV RAX,qword ptr [0x003aefd8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x22e324]
MOV AL,0x0
CALL 0x0013a1c0
MOV RAX,qword ptr [0x003aefd8]
MOV RDI,qword ptr [RAX]
MOV EDX,dword ptr [0x0056a71c]
MOV EAX,EDX
ADD EAX,0x1
MOV dword ptr [0x0056a71c],EAX
MOV ECX,dword ptr [0x0056a718]
MOV R8D,dword ptr [0x0056a4fc]
LEA RSI,[0x22f62c]
LEA R9,[0x22f44a]
MOV AL,0x0
CALL 0x0013a1c0
MOV RAX,qword ptr [0x003aefd8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x22e35c]
MOV AL,0x0
CALL 0x0013a1c0
MOV RAX,qword ptr [0x003aefd8]
MOV RDI,qword ptr [RAX]
CALL 0x0013a4a0
LAB_001958a2:
XOR EAX,EAX
MOV EDI,EAX
CALL 0x0013e6a0
MOV qword ptr [RBP + -0x8],RAX
CMP RAX,0x0
JZ 0x001958b7
JMP 0x001958cf
LAB_001958b7:
LEA RDI,[0x22dc0c]
MOV ESI,0x4be1
LEA RDX,[0x244e51]
CALL 0x0013c010
LAB_001958cf:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [0x0056a740]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [0x0056b778]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [0x0056a738]
MOV qword ptr [RBP + -0x28],RAX
CMP qword ptr [0x0056b760],0x0
JZ 0x0019590f
MOV RAX,qword ptr [0x0056b760]
MOV qword ptr [RBP + -0x48],RAX
JMP 0x0019591c
LAB_0019590f:
LEA RAX,[0x232a8d]
MOV qword ptr [RBP + -0x48],RAX
JMP 0x0019591c
LAB_0019591c:
MOV RCX,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x38]
MOV RDI,qword ptr [RBP + -0x40]
MOV R8,qword ptr [RBP + -0x48]
MOV R9D,dword ptr [0x0056b768]
MOV RAX,qword ptr [0x0056b770]
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],0x2
CALL 0x0013ad60
CMP RAX,0x0
JZ 0x00195958
JMP 0x00195970
LAB_00195958:
LEA RDI,[0x22dc0c]
MOV ESI,0x4be4
LEA RDX,[0x244e71]
CALL 0x0013c010
LAB_00195970:
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x22f63e]
CALL 0x0013b3d0
MOV dword ptr [RBP + -0xc],EAX
CMP dword ptr [RBP + -0xc],0x0
JZ 0x00195992
XOR EAX,EAX
MOV EDI,EAX
CALL 0x0013bf10
LAB_00195992:
CMP dword ptr [RBP + -0xc],0x0
JNZ 0x0019599a
JMP 0x001959b2
LAB_0019599a:
LEA RDI,[0x22dc0c]
MOV ESI,0x4be5
LEA RDX,[0x243f6f]
CALL 0x0013c010
LAB_001959b2:
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x244ef2]
CALL 0x0013b3d0
MOV dword ptr [RBP + -0x10],EAX
CMP dword ptr [RBP + -0x10],0x0
JZ 0x001959d4
XOR EAX,EAX
MOV EDI,EAX
CALL 0x0013bf10
LAB_001959d4:
CMP dword ptr [RBP + -0x10],0x0
JNZ 0x001959dc
JMP 0x001959f4
LAB_001959dc:
LEA RDI,[0x22dc0c]
MOV ESI,0x4be6
LEA RDX,[0x243f6f]
CALL 0x0013c010
LAB_001959f4:
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x244f2a]
CALL 0x0013b3d0
MOV dword ptr [RBP + -0x14],EAX
CMP dword ptr [RBP + -0x14],0x0
JZ 0x00195a16
XOR EAX,EAX
MOV EDI,EAX
CALL 0x0013bf10
LAB_00195a16:
CMP dword ptr [RBP + -0x14],0x0
JNZ 0x00195a1e
JMP 0x00195a36
LAB_00195a1e:
LEA RDI,[0x22dc0c]
MOV ESI,0x4be7
LEA RDX,[0x243f6f]
CALL 0x0013c010
LAB_00195a36:
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x244f54]
CALL 0x0013b3d0
MOV dword ptr [RBP + -0x18],EAX
CMP dword ptr [RBP + -0x18],0x0
JZ 0x00195a58
XOR EAX,EAX
MOV EDI,EAX
CALL 0x0013bf10
LAB_00195a58:
CMP dword ptr [RBP + -0x18],0x0
JNZ 0x00195a60
JMP 0x00195a78
LAB_00195a60:
LEA RDI,[0x22dc0c]
MOV ESI,0x4be9
LEA RDX,[0x243f6f]
CALL 0x0013c010
LAB_00195a78:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001aa120
CMP RAX,0x2
JNZ 0x00195a89
JMP 0x00195aa1
LAB_00195a89:
LEA RDI,[0x22dc0c]
MOV ESI,0x4bea
LEA RDX,[0x242163]
CALL 0x0013c010
LAB_00195aa1:
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x22f66d]
CALL 0x0013b3d0
MOV dword ptr [RBP + -0x1c],EAX
CMP dword ptr [RBP + -0x1c],0x0
JZ 0x00195ac3
XOR EAX,EAX
MOV EDI,EAX
CALL 0x0013bf10
LAB_00195ac3:
CMP dword ptr [RBP + -0x1c],0x0
JNZ 0x00195acb
JMP 0x00195ae3
LAB_00195acb:
LEA RDI,[0x22dc0c]
MOV ESI,0x4beb
LEA RDX,[0x243f6f]
CALL 0x0013c010
LAB_00195ae3:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0013b2e0
JMP 0x00195aee
LAB_00195aee:
ADD RSP,0x60
POP RBP
RET
|
void test_bug11754979(void)
{
int iVar1;
long lVar2;
long lVar3;
ulong uVar4;
char *local_50;
if (opt_silent < '\x02') {
fprintf(*(FILE **)PTR_stdout_003aefd8,"\n\n#####################################\n");
uVar4 = (ulong)test_count;
test_count = test_count + 1;
fprintf(*(FILE **)PTR_stdout_003aefd8,"%u of (%u/%u): %s",uVar4,(ulong)iter_count,
(ulong)opt_count,"test_bug11754979");
fprintf(*(FILE **)PTR_stdout_003aefd8," \n#####################################\n");
fflush(*(FILE **)PTR_stdout_003aefd8);
}
lVar2 = mysql_client_init(0);
if (lVar2 == 0) {
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x4be1,
"(conn= mysql_client_init(NULL))");
}
if (opt_db == (char *)0x0) {
local_50 = "test";
}
else {
local_50 = opt_db;
}
lVar3 = wrap_mysql_real_connect
(lVar2,opt_host,opt_user,opt_password,local_50,opt_port,opt_unix_socket,2);
if (lVar3 == 0) {
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x4be4,
"mysql_real_connect(conn, opt_host, opt_user, opt_password, opt_db ? opt_db:\"test\", opt_port, opt_unix_socket, CLIENT_FOUND_ROWS)"
);
}
iVar1 = wrap_mysql_query(lVar2,"DROP TABLE IF EXISTS t1");
if (iVar1 != 0) {
print_error(0);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x4be5,"r == 0");
}
iVar1 = wrap_mysql_query(lVar2,"CREATE TABLE t1(id INT, label CHAR(1), PRIMARY KEY(id))");
if (iVar1 != 0) {
print_error(0);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x4be6,"r == 0");
}
iVar1 = wrap_mysql_query(lVar2,"INSERT INTO t1(id, label) VALUES (1, \'a\')");
if (iVar1 != 0) {
print_error(0);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x4be7,"r == 0");
}
iVar1 = wrap_mysql_query(lVar2,
"INSERT INTO t1(id, label) VALUES (1, \'a\') ON DUPLICATE KEY UPDATE id = 4"
);
if (iVar1 != 0) {
print_error(0);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x4be9,"r == 0");
}
lVar3 = mysql_affected_rows(lVar2);
if (lVar3 != 2) {
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x4bea,
"mysql_affected_rows(conn) == 2");
}
iVar1 = wrap_mysql_query(lVar2,"DROP TABLE t1");
if (iVar1 != 0) {
print_error(0);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x4beb,"r == 0");
}
wrap_mysql_close(lVar2);
return;
}
|
|
3,495 | ma_zlib_compress | eloqsql/libmariadb/plugins/compress/c_zlib.c | my_bool ma_zlib_compress(ma_compress_ctx *ctx, void *dst,
size_t *dst_len, void *source, size_t source_len)
{
int rc;
if (!ctx)
return 1;
if ((rc= compress2((Bytef *)dst, (uLongf *)dst_len, (Bytef *)source, (uLong)source_len,
ctx->compression_level)) != Z_OK)
return 1;
return 0;
} | O3 | c | ma_zlib_compress:
testq %rdi, %rdi
je 0x30d73
pushq %rbp
movq %rsp, %rbp
movl 0x10(%rdi), %eax
movq %rsi, %rdi
movq %rdx, %rsi
movq %rcx, %rdx
movq %r8, %rcx
movl %eax, %r8d
callq 0x13250
testl %eax, %eax
setne %al
popq %rbp
retq
movb $0x1, %al
retq
| ma_zlib_compress:
test rdi, rdi
jz short loc_30D73
push rbp
mov rbp, rsp
mov eax, [rdi+10h]
mov rdi, rsi
mov rsi, rdx
mov rdx, rcx
mov rcx, r8
mov r8d, eax
call _compress2
test eax, eax
setnz al
pop rbp
retn
loc_30D73:
mov al, 1
retn
| bool ma_zlib_compress(long long a1, long long a2, long long a3, long long a4, long long a5)
{
return !a1 || (unsigned int)compress2(a2, a3, a4, a5, *(unsigned int *)(a1 + 16)) != 0;
}
| ma_zlib_compress:
TEST RDI,RDI
JZ 0x00130d73
PUSH RBP
MOV RBP,RSP
MOV EAX,dword ptr [RDI + 0x10]
MOV RDI,RSI
MOV RSI,RDX
MOV RDX,RCX
MOV RCX,R8
MOV R8D,EAX
CALL 0x00113250
TEST EAX,EAX
SETNZ AL
POP RBP
RET
LAB_00130d73:
MOV AL,0x1
RET
|
bool ma_zlib_compress(long param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5)
{
int iVar1;
if (param_1 != 0) {
iVar1 = compress2(param_2,param_3,param_4,param_5,*(int4 *)(param_1 + 0x10));
return iVar1 != 0;
}
return true;
}
|
|
3,496 | update_var_htab | bluesky950520[P]quickjs/quickjs.c | static int update_var_htab(JSContext *ctx, JSFunctionDef *fd)
{
uint32_t i, j, k, m, *p;
if (fd->var_count < 27) // 27 + 27/5 == 32
return 0;
k = fd->var_count - 1;
m = fd->var_count + fd->var_count/5;
if (m & (m - 1)) // unless power of two
goto insert;
m *= 2;
p = js_realloc(ctx, fd->vars_htab, m * sizeof(*fd->vars_htab));
if (!p)
return -1;
for (i = 0; i < m; i++)
p[i] = UINT32_MAX;
fd->vars_htab = p;
k = 0;
m--;
insert:
m = UINT32_MAX >> clz32(m);
do {
i = hash_atom(fd->vars[k].var_name);
j = 1;
for (;;) {
p = &fd->vars_htab[i & m];
if (*p == UINT32_MAX)
break;
i += j;
j += 1; // quadratic probing
}
*p = k++;
} while (k < (uint32_t)fd->var_count);
return 0;
} | O0 | c | update_var_htab:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq 0x20(%rsp), %rax
cmpl $0x1b, 0xa4(%rax)
jge 0xa5999
movl $0x0, 0x34(%rsp)
jmp 0xa5b3f
movq 0x20(%rsp), %rax
movl 0xa4(%rax), %eax
subl $0x1, %eax
movl %eax, 0x14(%rsp)
movq 0x20(%rsp), %rax
movl 0xa4(%rax), %eax
movl %eax, 0x4(%rsp)
movq 0x20(%rsp), %rax
movl 0xa4(%rax), %eax
movl $0x5, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl 0x4(%rsp), %eax
addl %ecx, %eax
movl %eax, 0x10(%rsp)
movl 0x10(%rsp), %eax
movl 0x10(%rsp), %ecx
subl $0x1, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
je 0xa59f0
jmp 0xa5a87
movl 0x10(%rsp), %eax
shll %eax
movl %eax, 0x10(%rsp)
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rax
movq 0x98(%rax), %rsi
movl 0x10(%rsp), %eax
movl %eax, %edx
shlq $0x2, %rdx
callq 0x280d0
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0xa5a34
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
jmp 0xa5b3f
movl $0x0, 0x1c(%rsp)
movl 0x1c(%rsp), %eax
cmpl 0x10(%rsp), %eax
jae 0xa5a63
movq 0x8(%rsp), %rax
movl 0x1c(%rsp), %ecx
movl $0xffffffff, (%rax,%rcx,4) # imm = 0xFFFFFFFF
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0xa5a3c
movq 0x8(%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x98(%rax)
movl $0x0, 0x14(%rsp)
movl 0x10(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rsp)
movl 0x10(%rsp), %edi
callq 0xa5b50
movl %eax, %ecx
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
shrl %cl, %eax
movl %eax, 0x10(%rsp)
movq 0x20(%rsp), %rax
movq 0x90(%rax), %rax
movl 0x14(%rsp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %edi
callq 0xa5b60
movl %eax, 0x1c(%rsp)
movl $0x1, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq 0x98(%rax), %rax
movl 0x1c(%rsp), %ecx
andl 0x10(%rsp), %ecx
movl %ecx, %ecx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
cmpl $-0x1, (%rax)
jne 0xa5af5
jmp 0xa5b0e
movl 0x18(%rsp), %eax
addl 0x1c(%rsp), %eax
movl %eax, 0x1c(%rsp)
movl 0x18(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18(%rsp)
jmp 0xa5ac7
movl 0x14(%rsp), %ecx
movl %ecx, %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
movq 0x8(%rsp), %rax
movl %ecx, (%rax)
movl 0x14(%rsp), %eax
movq 0x20(%rsp), %rcx
cmpl 0xa4(%rcx), %eax
jb 0xa5a9d
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopl (%rax,%rax)
| update_var_htab:
sub rsp, 38h
mov [rsp+38h+var_10], rdi
mov [rsp+38h+var_18], rsi
mov rax, [rsp+38h+var_18]
cmp dword ptr [rax+0A4h], 1Bh
jge short loc_A5999
mov [rsp+38h+var_4], 0
jmp loc_A5B3F
loc_A5999:
mov rax, [rsp+38h+var_18]
mov eax, [rax+0A4h]
sub eax, 1
mov [rsp+38h+var_24], eax
mov rax, [rsp+38h+var_18]
mov eax, [rax+0A4h]
mov [rsp+38h+var_34], eax
mov rax, [rsp+38h+var_18]
mov eax, [rax+0A4h]
mov ecx, 5
cdq
idiv ecx
mov ecx, eax
mov eax, [rsp+38h+var_34]
add eax, ecx
mov [rsp+38h+var_28], eax
mov eax, [rsp+38h+var_28]
mov ecx, [rsp+38h+var_28]
sub ecx, 1
and eax, ecx
cmp eax, 0
jz short loc_A59F0
jmp loc_A5A87
loc_A59F0:
mov eax, [rsp+38h+var_28]
shl eax, 1
mov [rsp+38h+var_28], eax
mov rdi, [rsp+38h+var_10]
mov rax, [rsp+38h+var_18]
mov rsi, [rax+98h]
mov eax, [rsp+38h+var_28]
mov edx, eax
shl rdx, 2
call js_realloc
mov [rsp+38h+var_30], rax
cmp [rsp+38h+var_30], 0
jnz short loc_A5A34
mov [rsp+38h+var_4], 0FFFFFFFFh
jmp loc_A5B3F
loc_A5A34:
mov [rsp+38h+var_1C], 0
loc_A5A3C:
mov eax, [rsp+38h+var_1C]
cmp eax, [rsp+38h+var_28]
jnb short loc_A5A63
mov rax, [rsp+38h+var_30]
mov ecx, [rsp+38h+var_1C]
mov dword ptr [rax+rcx*4], 0FFFFFFFFh
mov eax, [rsp+38h+var_1C]
add eax, 1
mov [rsp+38h+var_1C], eax
jmp short loc_A5A3C
loc_A5A63:
mov rcx, [rsp+38h+var_30]
mov rax, [rsp+38h+var_18]
mov [rax+98h], rcx
mov [rsp+38h+var_24], 0
mov eax, [rsp+38h+var_28]
add eax, 0FFFFFFFFh
mov [rsp+38h+var_28], eax
loc_A5A87:
mov edi, [rsp+38h+var_28]
call clz32_0
mov ecx, eax
mov eax, 0FFFFFFFFh
shr eax, cl
mov [rsp+38h+var_28], eax
loc_A5A9D:
mov rax, [rsp+38h+var_18]
mov rax, [rax+90h]
mov ecx, [rsp+38h+var_24]
shl rcx, 4
add rax, rcx
mov edi, [rax]
call hash_atom
mov [rsp+38h+var_1C], eax
mov [rsp+38h+var_20], 1
loc_A5AC7:
mov rax, [rsp+38h+var_18]
mov rax, [rax+98h]
mov ecx, [rsp+38h+var_1C]
and ecx, [rsp+38h+var_28]
mov ecx, ecx
shl rcx, 2
add rax, rcx
mov [rsp+38h+var_30], rax
mov rax, [rsp+38h+var_30]
cmp dword ptr [rax], 0FFFFFFFFh
jnz short loc_A5AF5
jmp short loc_A5B0E
loc_A5AF5:
mov eax, [rsp+38h+var_20]
add eax, [rsp+38h+var_1C]
mov [rsp+38h+var_1C], eax
mov eax, [rsp+38h+var_20]
add eax, 1
mov [rsp+38h+var_20], eax
jmp short loc_A5AC7
loc_A5B0E:
mov ecx, [rsp+38h+var_24]
mov eax, ecx
add eax, 1
mov [rsp+38h+var_24], eax
mov rax, [rsp+38h+var_30]
mov [rax], ecx
mov eax, [rsp+38h+var_24]
mov rcx, [rsp+38h+var_18]
cmp eax, [rcx+0A4h]
jb loc_A5A9D
mov [rsp+38h+var_4], 0
loc_A5B3F:
mov eax, [rsp+38h+var_4]
add rsp, 38h
retn
| long long update_var_htab(long long a1, long long a2)
{
long long v2; // rdx
unsigned int v3; // ecx
long long v5; // [rsp+8h] [rbp-30h]
unsigned int *v6; // [rsp+8h] [rbp-30h]
unsigned int v7; // [rsp+10h] [rbp-28h]
unsigned int v8; // [rsp+10h] [rbp-28h]
unsigned int v9; // [rsp+10h] [rbp-28h]
unsigned int v10; // [rsp+14h] [rbp-24h]
int j; // [rsp+18h] [rbp-20h]
unsigned int i; // [rsp+1Ch] [rbp-1Ch]
int v13; // [rsp+1Ch] [rbp-1Ch]
long long v14; // [rsp+20h] [rbp-18h]
v14 = a2;
if ( *(int *)(a2 + 164) >= 27 )
{
v10 = *(_DWORD *)(a2 + 164) - 1;
v2 = (unsigned int)(*(int *)(a2 + 164) >> 31);
LODWORD(v2) = *(_DWORD *)(a2 + 164) % 5;
v7 = *(_DWORD *)(a2 + 164) / 5 + *(_DWORD *)(a2 + 164);
if ( ((v7 - 1) & v7) == 0 )
{
v8 = 2 * v7;
a2 = *(_QWORD *)(a2 + 152);
v5 = js_realloc(a1, a2, 4LL * v8);
if ( !v5 )
return (unsigned int)-1;
for ( i = 0; i < v8; ++i )
*(_DWORD *)(v5 + 4LL * i) = -1;
*(_QWORD *)(v14 + 152) = v5;
v10 = 0;
v7 = v8 - 1;
}
v9 = 0xFFFFFFFF >> clz32_0(v7, a2, v2);
do
{
v13 = hash_atom(*(unsigned int *)(16LL * v10 + *(_QWORD *)(v14 + 144)));
for ( j = 1; ; ++j )
{
v6 = (unsigned int *)(4LL * (v9 & v13) + *(_QWORD *)(v14 + 152));
if ( *v6 == -1 )
break;
v13 += j;
}
v3 = v10++;
*v6 = v3;
}
while ( v10 < *(_DWORD *)(v14 + 164) );
return 0;
}
else
{
return 0;
}
}
| update_var_htab:
SUB RSP,0x38
MOV qword ptr [RSP + 0x28],RDI
MOV qword ptr [RSP + 0x20],RSI
MOV RAX,qword ptr [RSP + 0x20]
CMP dword ptr [RAX + 0xa4],0x1b
JGE 0x001a5999
MOV dword ptr [RSP + 0x34],0x0
JMP 0x001a5b3f
LAB_001a5999:
MOV RAX,qword ptr [RSP + 0x20]
MOV EAX,dword ptr [RAX + 0xa4]
SUB EAX,0x1
MOV dword ptr [RSP + 0x14],EAX
MOV RAX,qword ptr [RSP + 0x20]
MOV EAX,dword ptr [RAX + 0xa4]
MOV dword ptr [RSP + 0x4],EAX
MOV RAX,qword ptr [RSP + 0x20]
MOV EAX,dword ptr [RAX + 0xa4]
MOV ECX,0x5
CDQ
IDIV ECX
MOV ECX,EAX
MOV EAX,dword ptr [RSP + 0x4]
ADD EAX,ECX
MOV dword ptr [RSP + 0x10],EAX
MOV EAX,dword ptr [RSP + 0x10]
MOV ECX,dword ptr [RSP + 0x10]
SUB ECX,0x1
AND EAX,ECX
CMP EAX,0x0
JZ 0x001a59f0
JMP 0x001a5a87
LAB_001a59f0:
MOV EAX,dword ptr [RSP + 0x10]
SHL EAX,0x1
MOV dword ptr [RSP + 0x10],EAX
MOV RDI,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RAX + 0x98]
MOV EAX,dword ptr [RSP + 0x10]
MOV EDX,EAX
SHL RDX,0x2
CALL 0x001280d0
MOV qword ptr [RSP + 0x8],RAX
CMP qword ptr [RSP + 0x8],0x0
JNZ 0x001a5a34
MOV dword ptr [RSP + 0x34],0xffffffff
JMP 0x001a5b3f
LAB_001a5a34:
MOV dword ptr [RSP + 0x1c],0x0
LAB_001a5a3c:
MOV EAX,dword ptr [RSP + 0x1c]
CMP EAX,dword ptr [RSP + 0x10]
JNC 0x001a5a63
MOV RAX,qword ptr [RSP + 0x8]
MOV ECX,dword ptr [RSP + 0x1c]
MOV dword ptr [RAX + RCX*0x4],0xffffffff
MOV EAX,dword ptr [RSP + 0x1c]
ADD EAX,0x1
MOV dword ptr [RSP + 0x1c],EAX
JMP 0x001a5a3c
LAB_001a5a63:
MOV RCX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RAX + 0x98],RCX
MOV dword ptr [RSP + 0x14],0x0
MOV EAX,dword ptr [RSP + 0x10]
ADD EAX,-0x1
MOV dword ptr [RSP + 0x10],EAX
LAB_001a5a87:
MOV EDI,dword ptr [RSP + 0x10]
CALL 0x001a5b50
MOV ECX,EAX
MOV EAX,0xffffffff
SHR EAX,CL
MOV dword ptr [RSP + 0x10],EAX
LAB_001a5a9d:
MOV RAX,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RAX + 0x90]
MOV ECX,dword ptr [RSP + 0x14]
SHL RCX,0x4
ADD RAX,RCX
MOV EDI,dword ptr [RAX]
CALL 0x001a5b60
MOV dword ptr [RSP + 0x1c],EAX
MOV dword ptr [RSP + 0x18],0x1
LAB_001a5ac7:
MOV RAX,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RAX + 0x98]
MOV ECX,dword ptr [RSP + 0x1c]
AND ECX,dword ptr [RSP + 0x10]
MOV ECX,ECX
SHL RCX,0x2
ADD RAX,RCX
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x8]
CMP dword ptr [RAX],-0x1
JNZ 0x001a5af5
JMP 0x001a5b0e
LAB_001a5af5:
MOV EAX,dword ptr [RSP + 0x18]
ADD EAX,dword ptr [RSP + 0x1c]
MOV dword ptr [RSP + 0x1c],EAX
MOV EAX,dword ptr [RSP + 0x18]
ADD EAX,0x1
MOV dword ptr [RSP + 0x18],EAX
JMP 0x001a5ac7
LAB_001a5b0e:
MOV ECX,dword ptr [RSP + 0x14]
MOV EAX,ECX
ADD EAX,0x1
MOV dword ptr [RSP + 0x14],EAX
MOV RAX,qword ptr [RSP + 0x8]
MOV dword ptr [RAX],ECX
MOV EAX,dword ptr [RSP + 0x14]
MOV RCX,qword ptr [RSP + 0x20]
CMP EAX,dword ptr [RCX + 0xa4]
JC 0x001a5a9d
MOV dword ptr [RSP + 0x34],0x0
LAB_001a5b3f:
MOV EAX,dword ptr [RSP + 0x34]
ADD RSP,0x38
RET
|
int4 update_var_htab(int8 param_1,long param_2)
{
byte bVar1;
uint uVar2;
long lVar3;
uint *puVar4;
uint local_28;
uint local_24;
int local_20;
uint local_1c;
if (0x1a < *(int *)(param_2 + 0xa4)) {
local_24 = *(int *)(param_2 + 0xa4) - 1;
local_28 = *(int *)(param_2 + 0xa4) + *(int *)(param_2 + 0xa4) / 5;
if ((local_28 & local_28 - 1) == 0) {
local_28 = local_28 * 2;
lVar3 = js_realloc(param_1,*(int8 *)(param_2 + 0x98),(ulong)local_28 << 2);
if (lVar3 == 0) {
return 0xffffffff;
}
for (local_1c = 0; local_1c < local_28; local_1c = local_1c + 1) {
*(int4 *)(lVar3 + (ulong)local_1c * 4) = 0xffffffff;
}
*(long *)(param_2 + 0x98) = lVar3;
local_24 = 0;
local_28 = local_28 - 1;
}
bVar1 = clz32(local_28);
do {
local_1c = hash_atom(*(int4 *)(*(long *)(param_2 + 0x90) + (ulong)local_24 * 0x10));
local_20 = 1;
while (puVar4 = (uint *)(*(long *)(param_2 + 0x98) +
(ulong)(local_1c & 0xffffffffU >> (bVar1 & 0x1f)) * 4),
*puVar4 != 0xffffffff) {
local_1c = local_20 + local_1c;
local_20 = local_20 + 1;
}
uVar2 = local_24 + 1;
*puVar4 = local_24;
local_24 = uVar2;
} while (uVar2 < *(uint *)(param_2 + 0xa4));
}
return 0;
}
|
|
3,497 | _gnu_cxx::__normal_iterator<std::pair<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>>*, std::vector<std::pair<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>>, std::allocator<std::pair<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>>>>> nlohmann::json_abi_v3_11_3::ordered_map<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>, std::less<void>, std::allocator<std::pair<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>>>>::find<char const (&) [17], 0>(char const (&) [17]) | monkey531[P]llama/common/json.hpp | iterator find(KeyType && key) // NOLINT(cppcoreguidelines-missing-std-forward)
{
for (auto it = this->begin(); it != this->end(); ++it)
{
if (m_compare(it->first, key))
{
return it;
}
}
return Container::end();
} | O2 | cpp | _gnu_cxx::__normal_iterator<std::pair<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>>*, std::vector<std::pair<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>>, std::allocator<std::pair<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>>>>> nlohmann::json_abi_v3_11_3::ordered_map<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>, std::less<void>, std::allocator<std::pair<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>>>>::find<char const (&) [17], 0>(char const (&) [17]):
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
movq (%rdi), %r14
movq 0x8(%r15), %rax
cmpq %rax, %r14
je 0x9642f
movq %r14, %rdi
movq %rbx, %rsi
callq 0x39fba
testb %al, %al
jne 0x9642c
addq $0x30, %r14
jmp 0x9640e
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
nop
| _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA17_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_:
push r15
push r14
push rbx
mov rbx, rsi
mov r15, rdi
mov r14, [rdi]
loc_9640E:
mov rax, [r15+8]
cmp r14, rax
jz short loc_9642F
mov rdi, r14
mov rsi, rbx
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jnz short loc_9642C
add r14, 30h ; '0'
jmp short loc_9640E
loc_9642C:
mov rax, r14
loc_9642F:
pop rbx
pop r14
pop r15
retn
| long long ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA17_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_(
long long *a1)
{
long long i; // r14
long long result; // rax
for ( i = *a1; ; i += 48LL )
{
result = a1[1];
if ( i == result )
break;
if ( std::operator==<char>(i) )
return i;
}
return result;
}
| _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA17_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RSI
MOV R15,RDI
MOV R14,qword ptr [RDI]
LAB_0019640e:
MOV RAX,qword ptr [R15 + 0x8]
CMP R14,RAX
JZ 0x0019642f
MOV RDI,R14
MOV RSI,RBX
CALL 0x00139fba
TEST AL,AL
JNZ 0x0019642c
ADD R14,0x30
JMP 0x0019640e
LAB_0019642c:
MOV RAX,R14
LAB_0019642f:
POP RBX
POP R14
POP R15
RET
|
string * _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA17_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_
(int8 *param_1,char *param_2)
{
bool bVar1;
string *psVar2;
string *psVar3;
psVar3 = (string *)*param_1;
while ((psVar2 = (string *)param_1[1], psVar3 != (string *)param_1[1] &&
(bVar1 = std::operator==(psVar3,param_2), psVar2 = psVar3, !bVar1))) {
psVar3 = psVar3 + 0x30;
}
return psVar2;
}
|
|
3,498 | ggml_reshape | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c | struct ggml_tensor * ggml_reshape(
struct ggml_context * ctx,
struct ggml_tensor * a,
struct ggml_tensor * b) {
GGML_ASSERT(ggml_is_contiguous(a));
// as only the shape of b is relevant, and not its memory layout, b is allowed to be non contiguous.
GGML_ASSERT(ggml_nelements(a) == ggml_nelements(b));
struct ggml_tensor * result = ggml_new_tensor_impl(ctx, a->type, GGML_MAX_DIMS, b->ne, a, 0);
ggml_format_name(result, "%s (reshaped)", a->name);
result->op = GGML_OP_RESHAPE;
result->src[0] = a;
return result;
} | O1 | c | ggml_reshape:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
movq %rsi, %rdi
xorl %esi, %esi
callq 0x1b410
testb %al, %al
je 0x1d6dc
movq 0x18(%rbx), %rax
imulq 0x10(%rbx), %rax
imulq 0x20(%rbx), %rax
imulq 0x28(%rbx), %rax
movq 0x18(%r14), %rcx
imulq 0x10(%r14), %rcx
imulq 0x20(%r14), %rcx
imulq 0x28(%r14), %rcx
cmpq %rcx, %rax
jne 0x1d6f8
addq $0x10, %r14
movl (%rbx), %esi
movq %r15, %rdi
movl $0x4, %edx
movq %r14, %rcx
movq %rbx, %r8
xorl %r9d, %r9d
callq 0x1b871
movq %rax, %r14
leaq 0x100(%rbx), %rdx
leaq 0x2f303(%rip), %rsi # 0x4c9bd
movq %rax, %rdi
xorl %eax, %eax
callq 0x18a70
movl $0x21, 0x50(%r14)
movq %rbx, 0x98(%r14)
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x2ee8c(%rip), %rdi # 0x4c56f
leaq 0x2eed7(%rip), %rdx # 0x4c5c1
leaq 0x2f28f(%rip), %rcx # 0x4c980
movl $0xbc6, %esi # imm = 0xBC6
jmp 0x1d712
leaq 0x2ee70(%rip), %rdi # 0x4c56f
leaq 0x2eebb(%rip), %rdx # 0x4c5c1
leaq 0x2f289(%rip), %rcx # 0x4c996
movl $0xbc8, %esi # imm = 0xBC8
xorl %eax, %eax
callq 0x18ce0
| ggml_reshape:
push r15
push r14
push rbx
mov r14, rdx
mov rbx, rsi
mov r15, rdi
mov rdi, rsi
xor esi, esi
call ggml_is_contiguous_n
test al, al
jz short loc_1D6DC
mov rax, [rbx+18h]
imul rax, [rbx+10h]
imul rax, [rbx+20h]
imul rax, [rbx+28h]
mov rcx, [r14+18h]
imul rcx, [r14+10h]
imul rcx, [r14+20h]
imul rcx, [r14+28h]
cmp rax, rcx
jnz short loc_1D6F8
add r14, 10h
mov esi, [rbx]
mov rdi, r15
mov edx, 4
mov rcx, r14
mov r8, rbx
xor r9d, r9d
call ggml_new_tensor_impl
mov r14, rax
lea rdx, [rbx+100h]
lea rsi, aSReshaped; "%s (reshaped)"
mov rdi, rax
xor eax, eax
call _ggml_format_name
mov dword ptr [r14+50h], 21h ; '!'
mov [r14+98h], rbx
mov rax, r14
pop rbx
pop r14
pop r15
retn
loc_1D6DC:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlIsContiguo_3; "ggml_is_contiguous(a)"
mov esi, 0BC6h
jmp short loc_1D712
loc_1D6F8:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlNelementsA_0; "ggml_nelements(a) == ggml_nelements(b)"
mov esi, 0BC8h
loc_1D712:
xor eax, eax
call _ggml_abort
| long long ggml_reshape(long long a1, long long a2, long long *a3, double a4)
{
int v5; // r8d
int v6; // r9d
long long v7; // r14
const char *v9; // rcx
int v10; // esi
if ( !(unsigned __int8)ggml_is_contiguous_n((unsigned int *)a2, 0) )
{
v9 = "ggml_is_contiguous(a)";
v10 = 3014;
goto LABEL_6;
}
if ( *(_QWORD *)(a2 + 40) * *(_QWORD *)(a2 + 32) * *(_QWORD *)(a2 + 16) * *(_QWORD *)(a2 + 24) != a3[5] * a3[4] * a3[2] * a3[3] )
{
v9 = "ggml_nelements(a) == ggml_nelements(b)";
v10 = 3016;
LABEL_6:
ggml_abort(
(unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
v10,
(unsigned int)"GGML_ASSERT(%s) failed",
(_DWORD)v9,
v5,
v6);
}
v7 = ggml_new_tensor_impl(a1, *(_DWORD *)a2, 4, a3 + 2, a2, 0LL, a4);
ggml_format_name(v7, (long long)"%s (reshaped)");
*(_DWORD *)(v7 + 80) = 33;
*(_QWORD *)(v7 + 152) = a2;
return v7;
}
| ggml_reshape:
PUSH R15
PUSH R14
PUSH RBX
MOV R14,RDX
MOV RBX,RSI
MOV R15,RDI
MOV RDI,RSI
XOR ESI,ESI
CALL 0x0011b410
TEST AL,AL
JZ 0x0011d6dc
MOV RAX,qword ptr [RBX + 0x18]
IMUL RAX,qword ptr [RBX + 0x10]
IMUL RAX,qword ptr [RBX + 0x20]
IMUL RAX,qword ptr [RBX + 0x28]
MOV RCX,qword ptr [R14 + 0x18]
IMUL RCX,qword ptr [R14 + 0x10]
IMUL RCX,qword ptr [R14 + 0x20]
IMUL RCX,qword ptr [R14 + 0x28]
CMP RAX,RCX
JNZ 0x0011d6f8
ADD R14,0x10
MOV ESI,dword ptr [RBX]
MOV RDI,R15
MOV EDX,0x4
MOV RCX,R14
MOV R8,RBX
XOR R9D,R9D
CALL 0x0011b871
MOV R14,RAX
LEA RDX,[RBX + 0x100]
LEA RSI,[0x14c9bd]
MOV RDI,RAX
XOR EAX,EAX
CALL 0x00118a70
MOV dword ptr [R14 + 0x50],0x21
MOV qword ptr [R14 + 0x98],RBX
MOV RAX,R14
POP RBX
POP R14
POP R15
RET
LAB_0011d6dc:
LEA RDI,[0x14c56f]
LEA RDX,[0x14c5c1]
LEA RCX,[0x14c980]
MOV ESI,0xbc6
JMP 0x0011d712
LAB_0011d6f8:
LEA RDI,[0x14c56f]
LEA RDX,[0x14c5c1]
LEA RCX,[0x14c996]
MOV ESI,0xbc8
LAB_0011d712:
XOR EAX,EAX
CALL 0x00118ce0
|
long ggml_reshape(int8 param_1,int4 *param_2,long param_3)
{
char cVar1;
long lVar2;
char *pcVar3;
int8 uVar4;
cVar1 = ggml_is_contiguous_n(param_2,0);
if (cVar1 == '\0') {
pcVar3 = "ggml_is_contiguous(a)";
uVar4 = 0xbc6;
}
else {
if (*(long *)(param_2 + 6) * *(long *)(param_2 + 4) * *(long *)(param_2 + 8) *
*(long *)(param_2 + 10) -
*(long *)(param_3 + 0x18) * *(long *)(param_3 + 0x10) * *(long *)(param_3 + 0x20) *
*(long *)(param_3 + 0x28) == 0) {
lVar2 = ggml_new_tensor_impl(param_1,*param_2,4,param_3 + 0x10,param_2,0);
ggml_format_name(lVar2,"%s (reshaped)",param_2 + 0x40);
*(int4 *)(lVar2 + 0x50) = 0x21;
*(int4 **)(lVar2 + 0x98) = param_2;
return lVar2;
}
pcVar3 = "ggml_nelements(a) == ggml_nelements(b)";
uVar4 = 0xbc8;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
uVar4,"GGML_ASSERT(%s) failed",pcVar3);
}
|
|
3,499 | ggml_reshape | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c | struct ggml_tensor * ggml_reshape(
struct ggml_context * ctx,
struct ggml_tensor * a,
struct ggml_tensor * b) {
GGML_ASSERT(ggml_is_contiguous(a));
// as only the shape of b is relevant, and not its memory layout, b is allowed to be non contiguous.
GGML_ASSERT(ggml_nelements(a) == ggml_nelements(b));
struct ggml_tensor * result = ggml_new_tensor_impl(ctx, a->type, GGML_MAX_DIMS, b->ne, a, 0);
ggml_format_name(result, "%s (reshaped)", a->name);
result->op = GGML_OP_RESHAPE;
result->src[0] = a;
return result;
} | O2 | c | ggml_reshape:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
movq %rsi, %rdi
callq 0x1fb90
testb %al, %al
je 0x22c46
movq 0x18(%rbx), %rax
imulq 0x10(%rbx), %rax
imulq 0x20(%rbx), %rax
imulq 0x28(%rbx), %rax
movq 0x18(%r14), %rcx
imulq 0x10(%r14), %rcx
imulq 0x20(%r14), %rcx
imulq 0x28(%r14), %rcx
cmpq %rcx, %rax
jne 0x22c62
addq $0x10, %r14
movl (%rbx), %esi
pushq $0x4
popq %rdx
movq %r15, %rdi
movq %r14, %rcx
movq %rbx, %r8
xorl %r9d, %r9d
callq 0x2122f
movq %rax, %r14
leaq 0x100(%rbx), %rdx
leaq 0x2bdad(%rip), %rsi # 0x4e9d1
movq %rax, %rdi
xorl %eax, %eax
callq 0x1f650
movl $0x21, 0x50(%r14)
movq %rbx, 0x98(%r14)
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x2b936(%rip), %rdi # 0x4e583
leaq 0x2b981(%rip), %rdx # 0x4e5d5
leaq 0x2bd39(%rip), %rcx # 0x4e994
movl $0xbc6, %esi # imm = 0xBC6
jmp 0x22c7c
leaq 0x2b91a(%rip), %rdi # 0x4e583
leaq 0x2b965(%rip), %rdx # 0x4e5d5
leaq 0x2bd33(%rip), %rcx # 0x4e9aa
movl $0xbc8, %esi # imm = 0xBC8
xorl %eax, %eax
callq 0x1f9b0
| ggml_reshape:
push r15
push r14
push rbx
mov r14, rdx
mov rbx, rsi
mov r15, rdi
mov rdi, rsi
call _ggml_is_contiguous_0
test al, al
jz short loc_22C46
mov rax, [rbx+18h]
imul rax, [rbx+10h]
imul rax, [rbx+20h]
imul rax, [rbx+28h]
mov rcx, [r14+18h]
imul rcx, [r14+10h]
imul rcx, [r14+20h]
imul rcx, [r14+28h]
cmp rax, rcx
jnz short loc_22C62
add r14, 10h
mov esi, [rbx]
push 4
pop rdx
mov rdi, r15
mov rcx, r14
mov r8, rbx
xor r9d, r9d
call ggml_new_tensor_impl
mov r14, rax
lea rdx, [rbx+100h]
lea rsi, aSReshaped; "%s (reshaped)"
mov rdi, rax
xor eax, eax
call _ggml_format_name
mov dword ptr [r14+50h], 21h ; '!'
mov [r14+98h], rbx
mov rax, r14
pop rbx
pop r14
pop r15
retn
loc_22C46:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlIsContiguo_3; "ggml_is_contiguous(a)"
mov esi, 0BC6h
jmp short loc_22C7C
loc_22C62:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlNelementsA_0; "ggml_nelements(a) == ggml_nelements(b)"
mov esi, 0BC8h
loc_22C7C:
xor eax, eax
call _ggml_abort
| long long ggml_reshape(
long long a1,
long long a2,
long long *a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
double a8,
double a9,
__m128 a10,
__m128 a11)
{
long long v12; // r8
long long v13; // r9
__m128 v14; // xmm4
__m128 v15; // xmm5
long long v16; // r14
const char *v18; // rcx
int v19; // esi
char v20; // [rsp+0h] [rbp-18h]
if ( !(unsigned __int8)ggml_is_contiguous_0(a2) )
{
v18 = "ggml_is_contiguous(a)";
v19 = 3014;
goto LABEL_6;
}
if ( *(_QWORD *)(a2 + 40) * *(_QWORD *)(a2 + 32) * *(_QWORD *)(a2 + 16) * *(_QWORD *)(a2 + 24) != a3[5] * a3[4] * a3[2] * a3[3] )
{
v18 = "ggml_nelements(a) == ggml_nelements(b)";
v19 = 3016;
LABEL_6:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
v19,
(long long)"GGML_ASSERT(%s) failed",
(long long)v18,
v12,
v13,
a4,
a5,
a6,
a7,
v14,
v15,
a10,
a11,
v20);
}
v16 = ggml_new_tensor_impl(a1, *(_DWORD *)a2, 4u, a3 + 2, a2, 0LL, a4, a5, a6, a7, v14, v15, a10, a11);
ggml_format_name(v16, (long long)"%s (reshaped)");
*(_DWORD *)(v16 + 80) = 33;
*(_QWORD *)(v16 + 152) = a2;
return v16;
}
| ggml_reshape:
PUSH R15
PUSH R14
PUSH RBX
MOV R14,RDX
MOV RBX,RSI
MOV R15,RDI
MOV RDI,RSI
CALL 0x0011fb90
TEST AL,AL
JZ 0x00122c46
MOV RAX,qword ptr [RBX + 0x18]
IMUL RAX,qword ptr [RBX + 0x10]
IMUL RAX,qword ptr [RBX + 0x20]
IMUL RAX,qword ptr [RBX + 0x28]
MOV RCX,qword ptr [R14 + 0x18]
IMUL RCX,qword ptr [R14 + 0x10]
IMUL RCX,qword ptr [R14 + 0x20]
IMUL RCX,qword ptr [R14 + 0x28]
CMP RAX,RCX
JNZ 0x00122c62
ADD R14,0x10
MOV ESI,dword ptr [RBX]
PUSH 0x4
POP RDX
MOV RDI,R15
MOV RCX,R14
MOV R8,RBX
XOR R9D,R9D
CALL 0x0012122f
MOV R14,RAX
LEA RDX,[RBX + 0x100]
LEA RSI,[0x14e9d1]
MOV RDI,RAX
XOR EAX,EAX
CALL 0x0011f650
MOV dword ptr [R14 + 0x50],0x21
MOV qword ptr [R14 + 0x98],RBX
MOV RAX,R14
POP RBX
POP R14
POP R15
RET
LAB_00122c46:
LEA RDI,[0x14e583]
LEA RDX,[0x14e5d5]
LEA RCX,[0x14e994]
MOV ESI,0xbc6
JMP 0x00122c7c
LAB_00122c62:
LEA RDI,[0x14e583]
LEA RDX,[0x14e5d5]
LEA RCX,[0x14e9aa]
MOV ESI,0xbc8
LAB_00122c7c:
XOR EAX,EAX
CALL 0x0011f9b0
|
long ggml_reshape(int8 param_1,int4 *param_2,long param_3)
{
char cVar1;
long lVar2;
char *pcVar3;
int8 uVar4;
cVar1 = ggml_is_contiguous_0(param_2);
if (cVar1 == '\0') {
pcVar3 = "ggml_is_contiguous(a)";
uVar4 = 0xbc6;
}
else {
if (*(long *)(param_2 + 6) * *(long *)(param_2 + 4) * *(long *)(param_2 + 8) *
*(long *)(param_2 + 10) -
*(long *)(param_3 + 0x18) * *(long *)(param_3 + 0x10) * *(long *)(param_3 + 0x20) *
*(long *)(param_3 + 0x28) == 0) {
lVar2 = ggml_new_tensor_impl(param_1,*param_2,4,param_3 + 0x10,param_2,0);
ggml_format_name(lVar2,"%s (reshaped)",param_2 + 0x40);
*(int4 *)(lVar2 + 0x50) = 0x21;
*(int4 **)(lVar2 + 0x98) = param_2;
return lVar2;
}
pcVar3 = "ggml_nelements(a) == ggml_nelements(b)";
uVar4 = 0xbc8;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
uVar4,"GGML_ASSERT(%s) failed",pcVar3);
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.