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
|
|---|---|---|---|---|---|---|---|---|---|---|---|
57,500
|
uf_space_endspace_selected
|
eloqsql/storage/myisam/mi_packrec.c
|
static void uf_space_endspace_selected(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff,
uchar *to, uchar *end)
{
uint spaces;
if (get_bit(bit_buff))
bfill((uchar*) to,(end-to),' ');
else
{
if (get_bit(bit_buff))
{
if ((spaces=get_bits(bit_buff,rec->space_length_bits))+to > end)
{
bit_buff->error=1;
return;
}
if (to+spaces != end)
decode_bytes(rec,bit_buff,to,end-spaces);
bfill((uchar*) end-spaces,spaces,' ');
}
else
decode_bytes(rec,bit_buff,to,end);
}
}
|
O0
|
c
|
uf_space_endspace_selected:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x4(%rax)
je 0xbe2e7
movq -0x10(%rbp), %rax
movl (%rax), %eax
movq -0x10(%rbp), %rdx
movl 0x4(%rdx), %ecx
addl $-0x1, %ecx
movl %ecx, 0x4(%rdx)
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
jne 0xbe30b
jmp 0xbe329
movq -0x10(%rbp), %rdi
callq 0xbd720
movq -0x10(%rbp), %rax
movl $0x1f, 0x4(%rax)
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x80000000, %eax # imm = 0x80000000
cmpl $0x0, %eax
je 0xbe329
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rax
subq %rax, %rdx
movl $0x20, %esi
callq 0x2a2c0
jmp 0xbe467
movq -0x10(%rbp), %rax
cmpl $0x0, 0x4(%rax)
je 0xbe35b
movq -0x10(%rbp), %rax
movl (%rax), %eax
movq -0x10(%rbp), %rdx
movl 0x4(%rdx), %ecx
addl $-0x1, %ecx
movl %ecx, 0x4(%rdx)
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
jne 0xbe383
jmp 0xbe450
movq -0x10(%rbp), %rdi
callq 0xbd720
movq -0x10(%rbp), %rax
movl $0x1f, 0x4(%rax)
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x80000000, %eax # imm = 0x80000000
cmpl $0x0, %eax
je 0xbe450
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x8(%rbp), %rcx
cmpl 0x1c(%rcx), %eax
jb 0xbe3c6
movq -0x10(%rbp), %rax
movl (%rax), %eax
movq -0x8(%rbp), %rcx
movl 0x1c(%rcx), %esi
movq -0x10(%rbp), %rdx
movl 0x4(%rdx), %ecx
subl %esi, %ecx
movl %ecx, 0x4(%rdx)
shrl %cl, %eax
movq -0x8(%rbp), %rcx
movl 0x1c(%rcx), %ecx
movl %ecx, %edx
leaq 0x202322(%rip), %rcx # 0x2c06e0
andl (%rcx,%rdx,4), %eax
movl %eax, -0x28(%rbp)
jmp 0xbe3d9
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %esi
callq 0xbbed0
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %ecx
movl %ecx, -0x24(%rbp)
movq -0x18(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
cmpq -0x20(%rbp), %rax
jbe 0xbe3fb
movq -0x10(%rbp), %rax
movl $0x1, 0x28(%rax)
jmp 0xbe467
movq -0x18(%rbp), %rax
movl -0x24(%rbp), %ecx
addq %rcx, %rax
cmpq -0x20(%rbp), %rax
je 0xbe42e
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movl -0x24(%rbp), %eax
movl %eax, %r8d
xorl %eax, %eax
subq %r8, %rax
addq %rax, %rcx
callq 0xbde30
movq -0x20(%rbp), %rdi
movl -0x24(%rbp), %eax
movl %eax, %ecx
xorl %eax, %eax
subq %rcx, %rax
addq %rax, %rdi
movl -0x24(%rbp), %eax
movl %eax, %edx
movl $0x20, %esi
callq 0x2a2c0
jmp 0xbe465
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0xbde30
jmp 0xbe467
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
|
uf_space_endspace_selected_0:
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], rcx
mov rax, [rbp+var_10]
cmp dword ptr [rax+4], 0
jz short loc_BE2E7
mov rax, [rbp+var_10]
mov eax, [rax]
mov rdx, [rbp+var_10]
mov ecx, [rdx+4]
add ecx, 0FFFFFFFFh
mov [rdx+4], ecx
mov edx, 1
shl edx, cl
mov ecx, edx
and eax, ecx
cmp eax, 0
jnz short loc_BE30B
jmp short loc_BE329
loc_BE2E7:
mov rdi, [rbp+var_10]
call fill_buffer_0
mov rax, [rbp+var_10]
mov dword ptr [rax+4], 1Fh
mov rax, [rbp+var_10]
mov eax, [rax]
and eax, 80000000h
cmp eax, 0
jz short loc_BE329
loc_BE30B:
mov rdi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov rax, [rbp+var_18]
sub rdx, rax
mov esi, 20h ; ' '
call _memset
jmp loc_BE467
loc_BE329:
mov rax, [rbp+var_10]
cmp dword ptr [rax+4], 0
jz short loc_BE35B
mov rax, [rbp+var_10]
mov eax, [rax]
mov rdx, [rbp+var_10]
mov ecx, [rdx+4]
add ecx, 0FFFFFFFFh
mov [rdx+4], ecx
mov edx, 1
shl edx, cl
mov ecx, edx
and eax, ecx
cmp eax, 0
jnz short loc_BE383
jmp loc_BE450
loc_BE35B:
mov rdi, [rbp+var_10]
call fill_buffer_0
mov rax, [rbp+var_10]
mov dword ptr [rax+4], 1Fh
mov rax, [rbp+var_10]
mov eax, [rax]
and eax, 80000000h
cmp eax, 0
jz loc_BE450
loc_BE383:
mov rax, [rbp+var_10]
mov eax, [rax+4]
mov rcx, [rbp+var_8]
cmp eax, [rcx+1Ch]
jb short loc_BE3C6
mov rax, [rbp+var_10]
mov eax, [rax]
mov rcx, [rbp+var_8]
mov esi, [rcx+1Ch]
mov rdx, [rbp+var_10]
mov ecx, [rdx+4]
sub ecx, esi
mov [rdx+4], ecx
shr eax, cl
mov rcx, [rbp+var_8]
mov ecx, [rcx+1Ch]
mov edx, ecx
lea rcx, mask_0
and eax, [rcx+rdx*4]
mov [rbp+var_28], eax
jmp short loc_BE3D9
loc_BE3C6:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_8]
mov esi, [rax+1Ch]
call fill_and_get_bits_0
mov [rbp+var_28], eax
loc_BE3D9:
mov ecx, [rbp+var_28]
mov [rbp+var_24], ecx
mov rax, [rbp+var_18]
mov ecx, ecx
add rax, rcx
cmp rax, [rbp+var_20]
jbe short loc_BE3FB
mov rax, [rbp+var_10]
mov dword ptr [rax+28h], 1
jmp short loc_BE467
loc_BE3FB:
mov rax, [rbp+var_18]
mov ecx, [rbp+var_24]
add rax, rcx
cmp rax, [rbp+var_20]
jz short loc_BE42E
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_20]
mov eax, [rbp+var_24]
mov r8d, eax
xor eax, eax
sub rax, r8
add rcx, rax
call decode_bytes_0
loc_BE42E:
mov rdi, [rbp+var_20]
mov eax, [rbp+var_24]
mov ecx, eax
xor eax, eax
sub rax, rcx
add rdi, rax
mov eax, [rbp+var_24]
mov edx, eax
mov esi, 20h ; ' '
call _memset
jmp short loc_BE465
loc_BE450:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_20]
call decode_bytes_0
loc_BE465:
jmp short $+2
loc_BE467:
add rsp, 30h
pop rbp
retn
|
long long uf_space_endspace_selected_0(long long a1, int *a2, _BYTE *a3, _BYTE *a4)
{
int v4; // eax
int v5; // ecx
long long result; // rax
int v7; // eax
int v8; // ecx
unsigned int v9; // eax
int v10; // ecx
unsigned int bits_0; // [rsp+8h] [rbp-28h]
if ( !a2[1] )
{
fill_buffer_0((long long)a2);
a2[1] = 31;
if ( *a2 >= 0 )
goto LABEL_6;
return memset(a3, 32LL, a4 - a3);
}
v4 = *a2;
v5 = a2[1] - 1;
a2[1] = v5;
if ( ((1 << v5) & v4) != 0 )
return memset(a3, 32LL, a4 - a3);
LABEL_6:
if ( a2[1] )
{
v7 = *a2;
v8 = a2[1] - 1;
a2[1] = v8;
if ( ((1 << v8) & v7) == 0 )
return decode_bytes_0(a1, (long long)a2, a3, a4);
}
else
{
fill_buffer_0((long long)a2);
a2[1] = 31;
if ( *a2 >= 0 )
return decode_bytes_0(a1, (long long)a2, a3, a4);
}
if ( (unsigned int)a2[1] < *(_DWORD *)(a1 + 28) )
{
bits_0 = fill_and_get_bits_0(a2, *(_DWORD *)(a1 + 28));
}
else
{
v9 = *a2;
v10 = a2[1] - *(_DWORD *)(a1 + 28);
a2[1] = v10;
bits_0 = mask_0[*(unsigned int *)(a1 + 28)] & (v9 >> v10);
}
if ( &a3[bits_0] <= a4 )
{
if ( &a3[bits_0] != a4 )
decode_bytes_0(a1, (long long)a2, a3, &a4[-bits_0]);
return memset(&a4[-bits_0], 32LL, bits_0);
}
else
{
result = (long long)a2;
a2[10] = 1;
}
return result;
}
|
uf_space_endspace_selected:
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],RCX
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x4],0x0
JZ 0x001be2e7
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
MOV RDX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RDX + 0x4]
ADD ECX,-0x1
MOV dword ptr [RDX + 0x4],ECX
MOV EDX,0x1
SHL EDX,CL
MOV ECX,EDX
AND EAX,ECX
CMP EAX,0x0
JNZ 0x001be30b
JMP 0x001be329
LAB_001be2e7:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001bd720
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x4],0x1f
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
AND EAX,0x80000000
CMP EAX,0x0
JZ 0x001be329
LAB_001be30b:
MOV RDI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x18]
SUB RDX,RAX
MOV ESI,0x20
CALL 0x0012a2c0
JMP 0x001be467
LAB_001be329:
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x4],0x0
JZ 0x001be35b
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
MOV RDX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RDX + 0x4]
ADD ECX,-0x1
MOV dword ptr [RDX + 0x4],ECX
MOV EDX,0x1
SHL EDX,CL
MOV ECX,EDX
AND EAX,ECX
CMP EAX,0x0
JNZ 0x001be383
JMP 0x001be450
LAB_001be35b:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001bd720
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x4],0x1f
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
AND EAX,0x80000000
CMP EAX,0x0
JZ 0x001be450
LAB_001be383:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x4]
MOV RCX,qword ptr [RBP + -0x8]
CMP EAX,dword ptr [RCX + 0x1c]
JC 0x001be3c6
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RCX + 0x1c]
MOV RDX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RDX + 0x4]
SUB ECX,ESI
MOV dword ptr [RDX + 0x4],ECX
SHR EAX,CL
MOV RCX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RCX + 0x1c]
MOV EDX,ECX
LEA RCX,[0x3c06e0]
AND EAX,dword ptr [RCX + RDX*0x4]
MOV dword ptr [RBP + -0x28],EAX
JMP 0x001be3d9
LAB_001be3c6:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RAX + 0x1c]
CALL 0x001bbed0
MOV dword ptr [RBP + -0x28],EAX
LAB_001be3d9:
MOV ECX,dword ptr [RBP + -0x28]
MOV dword ptr [RBP + -0x24],ECX
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,ECX
ADD RAX,RCX
CMP RAX,qword ptr [RBP + -0x20]
JBE 0x001be3fb
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x28],0x1
JMP 0x001be467
LAB_001be3fb:
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0x24]
ADD RAX,RCX
CMP RAX,qword ptr [RBP + -0x20]
JZ 0x001be42e
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RBP + -0x24]
MOV R8D,EAX
XOR EAX,EAX
SUB RAX,R8
ADD RCX,RAX
CALL 0x001bde30
LAB_001be42e:
MOV RDI,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RBP + -0x24]
MOV ECX,EAX
XOR EAX,EAX
SUB RAX,RCX
ADD RDI,RAX
MOV EAX,dword ptr [RBP + -0x24]
MOV EDX,EAX
MOV ESI,0x20
CALL 0x0012a2c0
JMP 0x001be465
LAB_001be450:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x20]
CALL 0x001bde30
LAB_001be465:
JMP 0x001be467
LAB_001be467:
ADD RSP,0x30
POP RBP
RET
|
void uf_space_endspace_selected(long param_1,uint *param_2,void *param_3,ulong param_4)
{
uint uVar1;
uint local_30;
if (param_2[1] == 0) {
fill_buffer(param_2);
param_2[1] = 0x1f;
uVar1 = *param_2 & 0x80000000;
}
else {
uVar1 = param_2[1];
param_2[1] = uVar1 - 1;
uVar1 = *param_2 & 1 << ((byte)(uVar1 - 1) & 0x1f);
}
if (uVar1 == 0) {
if (param_2[1] == 0) {
fill_buffer(param_2);
param_2[1] = 0x1f;
uVar1 = *param_2 & 0x80000000;
}
else {
uVar1 = param_2[1];
param_2[1] = uVar1 - 1;
uVar1 = *param_2 & 1 << ((byte)(uVar1 - 1) & 0x1f);
}
if (uVar1 == 0) {
decode_bytes(param_1,param_2,param_3,param_4);
}
else {
if (param_2[1] < *(uint *)(param_1 + 0x1c)) {
local_30 = fill_and_get_bits(param_2,*(int4 *)(param_1 + 0x1c));
}
else {
uVar1 = param_2[1] - *(int *)(param_1 + 0x1c);
param_2[1] = uVar1;
local_30 = *param_2 >> ((byte)uVar1 & 0x1f) &
*(uint *)(mask + (ulong)*(uint *)(param_1 + 0x1c) * 4);
}
if (param_4 < (long)param_3 + (ulong)local_30) {
param_2[10] = 1;
}
else {
if ((long)param_3 + (ulong)local_30 != param_4) {
decode_bytes(param_1,param_2,param_3,param_4 - local_30);
}
memset((void *)(param_4 - local_30),0x20,(ulong)local_30);
}
}
}
else {
memset(param_3,0x20,param_4 - (long)param_3);
}
return;
}
|
|
57,501
|
my_thread_init_common_mutex
|
eloqsql/mysys/my_thr_init.c
|
static void my_thread_init_common_mutex(void)
{
mysql_mutex_init(key_THR_LOCK_open, &THR_LOCK_open, MY_MUTEX_INIT_FAST);
mysql_mutex_init(key_THR_LOCK_lock, &THR_LOCK_lock, MY_MUTEX_INIT_FAST);
mysql_mutex_init(key_THR_LOCK_myisam, &THR_LOCK_myisam, MY_MUTEX_INIT_SLOW);
mysql_mutex_init(key_THR_LOCK_myisam_mmap, &THR_LOCK_myisam_mmap, MY_MUTEX_INIT_FAST);
mysql_mutex_init(key_THR_LOCK_heap, &THR_LOCK_heap, MY_MUTEX_INIT_FAST);
mysql_mutex_init(key_THR_LOCK_net, &THR_LOCK_net, MY_MUTEX_INIT_FAST);
mysql_mutex_init(key_THR_LOCK_charset, &THR_LOCK_charset, MY_MUTEX_INIT_FAST);
#if !defined(HAVE_LOCALTIME_R) || !defined(HAVE_GMTIME_R)
mysql_mutex_init(key_LOCK_localtime_r, &LOCK_localtime_r, MY_MUTEX_INIT_SLOW);
#endif
}
|
O3
|
c
|
my_thread_init_common_mutex:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x38b3f1(%rip), %rax # 0x3d1e48
movl (%rax), %edi
leaq 0x2d24c8(%rip), %r15 # 0x318f28
movq (%r15), %rax
leaq 0x38bdc6(%rip), %r14 # 0x3d2830
movq %r14, %rsi
callq *0x40(%rax)
movq %rax, 0x40(%r14)
movq %r14, 0x38(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%r14)
leaq 0x38c079(%rip), %rbx # 0x3d2b00
movq %r14, %rdi
movq %rbx, %rsi
callq 0x26510
leaq 0x38b39b(%rip), %rax # 0x3d1e34
movl (%rax), %edi
movq (%r15), %rax
leaq 0x38bdd3(%rip), %r14 # 0x3d2878
movq %r14, %rsi
callq *0x40(%rax)
movq %rax, 0x40(%r14)
movq %r14, 0x38(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%r14)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x26510
leaq 0x38b373(%rip), %rax # 0x3d1e40
movl (%rax), %edi
movq (%r15), %rax
leaq 0x38bde7(%rip), %r14 # 0x3d28c0
movq %r14, %rsi
callq *0x40(%rax)
movq %rax, 0x40(%r14)
movq %r14, 0x38(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%r14)
movq %r14, %rdi
xorl %esi, %esi
callq 0x26510
leaq 0x38b354(%rip), %rax # 0x3d1e54
movl (%rax), %edi
movq (%r15), %rax
leaq 0x38bdfc(%rip), %r14 # 0x3d2908
movq %r14, %rsi
callq *0x40(%rax)
movq %rax, 0x40(%r14)
movq %r14, 0x38(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%r14)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x26510
leaq 0x38b2fc(%rip), %rax # 0x3d1e30
movl (%rax), %edi
movq (%r15), %rax
leaq 0x38be10(%rip), %r14 # 0x3d2950
movq %r14, %rsi
callq *0x40(%rax)
movq %rax, 0x40(%r14)
movq %r14, 0x38(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%r14)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x26510
leaq 0x38b2dc(%rip), %rax # 0x3d1e44
movl (%rax), %edi
movq (%r15), %rax
leaq 0x38be24(%rip), %r14 # 0x3d2998
movq %r14, %rsi
callq *0x40(%rax)
movq %rax, 0x40(%r14)
movq %r14, 0x38(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%r14)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x26510
leaq 0x38b290(%rip), %rax # 0x3d1e2c
movl (%rax), %edi
movq (%r15), %rax
leaq 0x38be38(%rip), %r14 # 0x3d29e0
movq %r14, %rsi
callq *0x40(%rax)
movq %rax, 0x40(%r14)
movq %r14, 0x38(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%r14)
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x26510
|
my_thread_init_common_mutex:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
lea rax, key_THR_LOCK_open
mov edi, [rax]
lea r15, PSI_server
mov rax, [r15]
lea r14, THR_LOCK_open
mov rsi, r14
call qword ptr [rax+40h]
mov [r14+40h], rax
mov [r14+38h], r14
xorps xmm0, xmm0
movups xmmword ptr [r14+28h], xmm0
lea rbx, my_fast_mutexattr
mov rdi, r14
mov rsi, rbx
call _pthread_mutex_init
lea rax, key_THR_LOCK_lock
mov edi, [rax]
mov rax, [r15]
lea r14, THR_LOCK_lock
mov rsi, r14
call qword ptr [rax+40h]
mov [r14+40h], rax
mov [r14+38h], r14
xorps xmm0, xmm0
movups xmmword ptr [r14+28h], xmm0
mov rdi, r14
mov rsi, rbx
call _pthread_mutex_init
lea rax, key_THR_LOCK_myisam
mov edi, [rax]
mov rax, [r15]
lea r14, THR_LOCK_myisam
mov rsi, r14
call qword ptr [rax+40h]
mov [r14+40h], rax
mov [r14+38h], r14
xorps xmm0, xmm0
movups xmmword ptr [r14+28h], xmm0
mov rdi, r14
xor esi, esi
call _pthread_mutex_init
lea rax, key_THR_LOCK_myisam_mmap
mov edi, [rax]
mov rax, [r15]
lea r14, THR_LOCK_myisam_mmap
mov rsi, r14
call qword ptr [rax+40h]
mov [r14+40h], rax
mov [r14+38h], r14
xorps xmm0, xmm0
movups xmmword ptr [r14+28h], xmm0
mov rdi, r14
mov rsi, rbx
call _pthread_mutex_init
lea rax, key_THR_LOCK_heap
mov edi, [rax]
mov rax, [r15]
lea r14, THR_LOCK_heap
mov rsi, r14
call qword ptr [rax+40h]
mov [r14+40h], rax
mov [r14+38h], r14
xorps xmm0, xmm0
movups xmmword ptr [r14+28h], xmm0
mov rdi, r14
mov rsi, rbx
call _pthread_mutex_init
lea rax, key_THR_LOCK_net
mov edi, [rax]
mov rax, [r15]
lea r14, THR_LOCK_net
mov rsi, r14
call qword ptr [rax+40h]
mov [r14+40h], rax
mov [r14+38h], r14
xorps xmm0, xmm0
movups xmmword ptr [r14+28h], xmm0
mov rdi, r14
mov rsi, rbx
call _pthread_mutex_init
lea rax, key_THR_LOCK_charset
mov edi, [rax]
mov rax, [r15]
lea r14, THR_LOCK_charset
mov rsi, r14
call qword ptr [rax+40h]
mov [r14+40h], rax
mov [r14+38h], r14
xorps xmm0, xmm0
movups xmmword ptr [r14+28h], xmm0
mov rdi, r14
mov rsi, rbx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
jmp _pthread_mutex_init
|
long long my_thread_init_common_mutex()
{
THR_LOCK_open[8] = ((long long ( *)(_QWORD, _QWORD *))PSI_server[8])(key_THR_LOCK_open, THR_LOCK_open);
THR_LOCK_open[7] = THR_LOCK_open;
*(_OWORD *)&THR_LOCK_open[5] = 0LL;
pthread_mutex_init(THR_LOCK_open, &my_fast_mutexattr);
THR_LOCK_lock[8] = ((long long ( *)(_QWORD, _QWORD *))PSI_server[8])(key_THR_LOCK_lock, THR_LOCK_lock);
THR_LOCK_lock[7] = THR_LOCK_lock;
*(_OWORD *)&THR_LOCK_lock[5] = 0LL;
pthread_mutex_init(THR_LOCK_lock, &my_fast_mutexattr);
THR_LOCK_myisam[8] = ((long long ( *)(_QWORD, _QWORD *))PSI_server[8])(key_THR_LOCK_myisam, THR_LOCK_myisam);
THR_LOCK_myisam[7] = THR_LOCK_myisam;
*(_OWORD *)&THR_LOCK_myisam[5] = 0LL;
pthread_mutex_init(THR_LOCK_myisam, 0LL);
THR_LOCK_myisam_mmap[8] = ((long long ( *)(_QWORD, _QWORD *))PSI_server[8])(
key_THR_LOCK_myisam_mmap,
THR_LOCK_myisam_mmap);
THR_LOCK_myisam_mmap[7] = THR_LOCK_myisam_mmap;
*(_OWORD *)&THR_LOCK_myisam_mmap[5] = 0LL;
pthread_mutex_init(THR_LOCK_myisam_mmap, &my_fast_mutexattr);
THR_LOCK_heap[8] = ((long long ( *)(_QWORD, _QWORD *))PSI_server[8])(key_THR_LOCK_heap, THR_LOCK_heap);
THR_LOCK_heap[7] = THR_LOCK_heap;
*(_OWORD *)&THR_LOCK_heap[5] = 0LL;
pthread_mutex_init(THR_LOCK_heap, &my_fast_mutexattr);
THR_LOCK_net[8] = ((long long ( *)(_QWORD, _QWORD *))PSI_server[8])(key_THR_LOCK_net, THR_LOCK_net);
THR_LOCK_net[7] = THR_LOCK_net;
*(_OWORD *)&THR_LOCK_net[5] = 0LL;
pthread_mutex_init(THR_LOCK_net, &my_fast_mutexattr);
THR_LOCK_charset[8] = ((long long ( *)(_QWORD, _QWORD *))PSI_server[8])(
key_THR_LOCK_charset,
THR_LOCK_charset);
THR_LOCK_charset[7] = THR_LOCK_charset;
*(_OWORD *)&THR_LOCK_charset[5] = 0LL;
return pthread_mutex_init(THR_LOCK_charset, &my_fast_mutexattr);
}
|
my_thread_init_common_mutex:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
LEA RAX,[0x4d1e48]
MOV EDI,dword ptr [RAX]
LEA R15,[0x418f28]
MOV RAX,qword ptr [R15]
LEA R14,[0x4d2830]
MOV RSI,R14
CALL qword ptr [RAX + 0x40]
MOV qword ptr [R14 + 0x40],RAX
MOV qword ptr [R14 + 0x38],R14
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R14 + 0x28],XMM0
LEA RBX,[0x4d2b00]
MOV RDI,R14
MOV RSI,RBX
CALL 0x00126510
LEA RAX,[0x4d1e34]
MOV EDI,dword ptr [RAX]
MOV RAX,qword ptr [R15]
LEA R14,[0x4d2878]
MOV RSI,R14
CALL qword ptr [RAX + 0x40]
MOV qword ptr [R14 + 0x40],RAX
MOV qword ptr [R14 + 0x38],R14
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R14 + 0x28],XMM0
MOV RDI,R14
MOV RSI,RBX
CALL 0x00126510
LEA RAX,[0x4d1e40]
MOV EDI,dword ptr [RAX]
MOV RAX,qword ptr [R15]
LEA R14,[0x4d28c0]
MOV RSI,R14
CALL qword ptr [RAX + 0x40]
MOV qword ptr [R14 + 0x40],RAX
MOV qword ptr [R14 + 0x38],R14
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R14 + 0x28],XMM0
MOV RDI,R14
XOR ESI,ESI
CALL 0x00126510
LEA RAX,[0x4d1e54]
MOV EDI,dword ptr [RAX]
MOV RAX,qword ptr [R15]
LEA R14,[0x4d2908]
MOV RSI,R14
CALL qword ptr [RAX + 0x40]
MOV qword ptr [R14 + 0x40],RAX
MOV qword ptr [R14 + 0x38],R14
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R14 + 0x28],XMM0
MOV RDI,R14
MOV RSI,RBX
CALL 0x00126510
LEA RAX,[0x4d1e30]
MOV EDI,dword ptr [RAX]
MOV RAX,qword ptr [R15]
LEA R14,[0x4d2950]
MOV RSI,R14
CALL qword ptr [RAX + 0x40]
MOV qword ptr [R14 + 0x40],RAX
MOV qword ptr [R14 + 0x38],R14
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R14 + 0x28],XMM0
MOV RDI,R14
MOV RSI,RBX
CALL 0x00126510
LEA RAX,[0x4d1e44]
MOV EDI,dword ptr [RAX]
MOV RAX,qword ptr [R15]
LEA R14,[0x4d2998]
MOV RSI,R14
CALL qword ptr [RAX + 0x40]
MOV qword ptr [R14 + 0x40],RAX
MOV qword ptr [R14 + 0x38],R14
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R14 + 0x28],XMM0
MOV RDI,R14
MOV RSI,RBX
CALL 0x00126510
LEA RAX,[0x4d1e2c]
MOV EDI,dword ptr [RAX]
MOV RAX,qword ptr [R15]
LEA R14,[0x4d29e0]
MOV RSI,R14
CALL qword ptr [RAX + 0x40]
MOV qword ptr [R14 + 0x40],RAX
MOV qword ptr [R14 + 0x38],R14
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R14 + 0x28],XMM0
MOV RDI,R14
MOV RSI,RBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
JMP 0x00126510
|
void my_thread_init_common_mutex(void)
{
THR_LOCK_open._64_8_ = (**(code **)(PSI_server + 0x40))(key_THR_LOCK_open,THR_LOCK_open);
THR_LOCK_open._56_8_ = THR_LOCK_open;
THR_LOCK_open._40_8_ = 0;
THR_LOCK_open._48_8_ = 0;
pthread_mutex_init((pthread_mutex_t *)THR_LOCK_open,(pthread_mutexattr_t *)&my_fast_mutexattr);
THR_LOCK_lock._64_8_ = (**(code **)(PSI_server + 0x40))(key_THR_LOCK_lock,THR_LOCK_lock);
THR_LOCK_lock._56_8_ = THR_LOCK_lock;
THR_LOCK_lock._40_8_ = 0;
THR_LOCK_lock._48_8_ = 0;
pthread_mutex_init((pthread_mutex_t *)THR_LOCK_lock,(pthread_mutexattr_t *)&my_fast_mutexattr);
THR_LOCK_myisam._64_8_ = (**(code **)(PSI_server + 0x40))(key_THR_LOCK_myisam);
THR_LOCK_myisam._56_8_ = THR_LOCK_myisam;
THR_LOCK_myisam._40_8_ = 0;
THR_LOCK_myisam._48_8_ = 0;
pthread_mutex_init((pthread_mutex_t *)THR_LOCK_myisam,(pthread_mutexattr_t *)0x0);
THR_LOCK_myisam_mmap._64_8_ =
(**(code **)(PSI_server + 0x40))(key_THR_LOCK_myisam_mmap,THR_LOCK_myisam_mmap);
THR_LOCK_myisam_mmap._56_8_ = THR_LOCK_myisam_mmap;
THR_LOCK_myisam_mmap._40_8_ = 0;
THR_LOCK_myisam_mmap._48_8_ = 0;
pthread_mutex_init((pthread_mutex_t *)THR_LOCK_myisam_mmap,
(pthread_mutexattr_t *)&my_fast_mutexattr);
THR_LOCK_heap._64_8_ = (**(code **)(PSI_server + 0x40))(key_THR_LOCK_heap,THR_LOCK_heap);
THR_LOCK_heap._56_8_ = THR_LOCK_heap;
THR_LOCK_heap._40_8_ = 0;
THR_LOCK_heap._48_8_ = 0;
pthread_mutex_init((pthread_mutex_t *)THR_LOCK_heap,(pthread_mutexattr_t *)&my_fast_mutexattr);
THR_LOCK_net._64_8_ = (**(code **)(PSI_server + 0x40))(key_THR_LOCK_net,THR_LOCK_net);
THR_LOCK_net._56_8_ = THR_LOCK_net;
THR_LOCK_net._40_8_ = 0;
THR_LOCK_net._48_8_ = 0;
pthread_mutex_init((pthread_mutex_t *)THR_LOCK_net,(pthread_mutexattr_t *)&my_fast_mutexattr);
THR_LOCK_charset._64_8_ = (**(code **)(PSI_server + 0x40))(key_THR_LOCK_charset,THR_LOCK_charset);
THR_LOCK_charset._56_8_ = THR_LOCK_charset;
THR_LOCK_charset._40_8_ = 0;
THR_LOCK_charset._48_8_ = 0;
pthread_mutex_init((pthread_mutex_t *)THR_LOCK_charset,(pthread_mutexattr_t *)&my_fast_mutexattr);
return;
}
|
|
57,502
|
my_strtoll10_mb2
|
eloqsql/strings/ctype-ucs2.c
|
static longlong
my_strtoll10_mb2(CHARSET_INFO *cs __attribute__((unused)),
const char *nptr, char **endptr, int *error)
{
const uchar *s, *end, *start, *n_end, *true_end;
uchar UNINIT_VAR(c);
unsigned long i, j, k;
ulonglong li;
int negative;
ulong cutoff, cutoff2, cutoff3;
my_wc_t wc;
int res;
my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc;
s= (const uchar *) nptr;
/* If fixed length string */
if (endptr)
{
/*
Make sure string length is even.
Odd length indicates a bug in the caller.
Assert in debug, round in production.
*/
DBUG_ASSERT((*endptr - (const char *) s) % 2 == 0);
end= s + ((*endptr - (const char*) s) / 2) * 2;
for ( ; ; ) /* Skip leading spaces and tabs */
{
if ((res= mb_wc(cs, &wc, s, end)) <= 0)
goto no_conv;
s+= res;
if (wc != ' ' && wc != '\t')
break;
}
}
else
{
/* We don't support null terminated strings in UCS2 */
goto no_conv;
}
/* Check for a sign. */
negative= 0;
if (wc == '-')
{
*error= -1; /* Mark as negative number */
negative= 1;
if ((res= mb_wc(cs, &wc, s, end)) <= 0)
goto no_conv;
s+= res; /* wc is now expected to hold the first digit. */
cutoff= MAX_NEGATIVE_NUMBER / LFACTOR2;
cutoff2= (MAX_NEGATIVE_NUMBER % LFACTOR2) / 100;
cutoff3= MAX_NEGATIVE_NUMBER % 100;
}
else
{
*error= 0;
if (wc == '+')
{
if ((res= mb_wc(cs, &wc, s, end)) <= 0)
goto no_conv;
s+= res; /* wc is now expected to hold the first digit. */
}
cutoff= ULONGLONG_MAX / LFACTOR2;
cutoff2= ULONGLONG_MAX % LFACTOR2 / 100;
cutoff3= ULONGLONG_MAX % 100;
}
/*
The code below assumes that 'wc' holds the first digit
and 's' points to the next character after it.
Scan pre-zeros if any.
*/
if (wc == '0')
{
i= 0;
for ( ; ; s+= res)
{
if (s == end)
goto end_i; /* Return 0 */
if ((res= mb_wc(cs, &wc, s, end)) <= 0)
goto no_conv;
if (wc != '0')
break;
}
n_end= s + 2 * INIT_CNT;
}
else
{
/* Read first digit to check that it's a valid number */
if ((i= (wc - '0')) > 9)
goto no_conv;
n_end= s + 2 * (INIT_CNT-1);
}
/* Handle first 9 digits and store them in i */
if (n_end > end)
n_end= end;
for ( ; ; s+= res)
{
if ((res= mb_wc(cs, &wc, s, n_end)) <= 0)
break;
if (wc2digit_uchar(&c, wc))
goto end_i;
i= i*10+c;
}
if (s == end)
goto end_i;
/* Handle next 9 digits and store them in j */
j= 0;
start= s; /* Used to know how much to shift i */
n_end= true_end= s + 2 * INIT_CNT;
if (n_end > end)
n_end= end;
do
{
if ((res= mb_wc(cs, &wc, s, end)) <= 0)
goto no_conv;
if (wc2digit_uchar(&c, wc))
goto end_i_and_j;
s+= res;
j= j * 10 + c;
} while (s != n_end);
if (s == end)
{
if (s != true_end)
goto end_i_and_j;
goto end3;
}
/* Handle the next 1 or 2 digits and store them in k */
if ((res= mb_wc(cs, &wc, s, end)) <= 0)
goto no_conv;
if ((k= (wc - '0')) > 9)
goto end3;
s+= res;
if (s == end)
goto end4;
if ((res= mb_wc(cs, &wc, s, end)) <= 0)
goto no_conv;
if (wc2digit_uchar(&c, wc))
goto end4;
s+= res;
k= k*10+c;
*endptr= (char*) s;
/* number string should have ended here */
if (s != end && mb_wc(cs, &wc, s, end) > 0 && ((uchar) (wc - '0')) <= 9)
goto overflow;
/* Check that we didn't get an overflow with the last digit */
if (i > cutoff || (i == cutoff && ((j > cutoff2 || j == cutoff2) &&
k > cutoff3)))
goto overflow;
li=i*LFACTOR2+ (ulonglong) j*100 + k;
return (longlong) li;
overflow: /* *endptr is set here */
*error= MY_ERRNO_ERANGE;
return negative ? LONGLONG_MIN : (longlong) ULONGLONG_MAX;
end_i:
*endptr= (char*) s;
return (negative ? ((longlong) -(long) i) : (longlong) i);
end_i_and_j:
li= (ulonglong) i * lfactor[(size_t) (s-start) / 2] + j;
*endptr= (char*) s;
return (negative ? -((longlong) li) : (longlong) li);
end3:
li=(ulonglong) i*LFACTOR+ (ulonglong) j;
*endptr= (char*) s;
return (negative ? -((longlong) li) : (longlong) li);
end4:
li=(ulonglong) i*LFACTOR1+ (ulonglong) j * 10 + k;
*endptr= (char*) s;
if (negative)
{
if (li > MAX_NEGATIVE_NUMBER)
goto overflow;
return -((longlong) li);
}
return (longlong) li;
no_conv:
/* There was no number to convert. */
*error= MY_ERRNO_EDOM;
*endptr= (char *) nptr;
return 0;
}
|
O3
|
c
|
my_strtoll10_mb2:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rcx, -0x60(%rbp)
movq %rsi, -0x68(%rbp)
movq %rdx, -0x48(%rbp)
testq %rdx, %rdx
je 0x8316d
movq %rdi, %r12
movq 0xb8(%rdi), %rax
movq 0x28(%rax), %r8
movq -0x48(%rbp), %rax
movq (%rax), %rax
movq -0x68(%rbp), %rdx
subq %rdx, %rax
movq %rax, %r15
shrq $0x3f, %r15
addq %rax, %r15
andq $-0x2, %r15
addq %rdx, %r15
leaq -0x30(%rbp), %rsi
movq %r15, %rcx
movq %r8, -0x38(%rbp)
callq *%r8
testl %eax, %eax
jle 0x8316d
leaq -0x30(%rbp), %rbx
movq -0x68(%rbp), %r13
movq %r13, %rcx
movl %eax, %r13d
addq %rcx, %r13
movq -0x30(%rbp), %r14
cmpq $0x20, %r14
je 0x8315a
cmpq $0x9, %r14
jne 0x83193
movq %r12, %rdi
movq %rbx, %rsi
movq %r13, %rdx
movq %r15, %rcx
callq *-0x38(%rbp)
testl %eax, %eax
jg 0x83141
movq -0x60(%rbp), %rax
movl $0x21, (%rax)
movq -0x48(%rbp), %rax
movq -0x68(%rbp), %rcx
movq %rcx, (%rax)
xorl %eax, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpq $0x2d, %r14
jne 0x831d9
movq -0x60(%rbp), %rax
movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF
leaq -0x30(%rbp), %rsi
movq %r12, %rdi
movq %r13, %rdx
movq %r15, %rcx
callq *-0x38(%rbp)
testl %eax, %eax
jle 0x8316d
movl %eax, %eax
addq %rax, %r13
movl $0x8, %eax
movq %rax, -0x70(%rbp)
movl $0x15f797ae, %eax # imm = 0x15F797AE
movq %rax, -0x78(%rbp)
movl $0x57f5ff8, %eax # imm = 0x57F5FF8
movq %rax, -0x58(%rbp)
jmp 0x83221
movq -0x60(%rbp), %rax
movl $0x0, (%rax)
movl $0xf, %eax
movq %rax, -0x70(%rbp)
movl $0x2bef2f5c, %eax # imm = 0x2BEF2F5C
movq %rax, -0x78(%rbp)
movl $0xafebff0, %eax # imm = 0xAFEBFF0
movq %rax, -0x58(%rbp)
cmpq $0x2b, %r14
jne 0x83221
leaq -0x30(%rbp), %rsi
movq %r12, %rdi
movq %r13, %rdx
movq %r15, %rcx
callq *-0x38(%rbp)
testl %eax, %eax
jle 0x8316d
movl %eax, %eax
addq %rax, %r13
movq -0x30(%rbp), %rax
cmpq $0x30, %rax
jne 0x83263
cmpq %r15, %r13
je 0x8325c
leaq -0x30(%rbp), %rbx
movq %r12, %rdi
movq %rbx, %rsi
movq %r13, %rdx
movq %r15, %rcx
callq *-0x38(%rbp)
testl %eax, %eax
jle 0x8316d
cmpq $0x30, -0x30(%rbp)
jne 0x8327a
movl %eax, %eax
addq %rax, %r13
cmpq %r15, %r13
jne 0x83234
xorl %ebx, %ebx
jmp 0x83430
addq $-0x30, %rax
cmpq $0x9, %rax
ja 0x8316d
movq %rax, %rbx
leaq 0x10(%r13), %rcx
jmp 0x83280
leaq 0x12(%r13), %rcx
xorl %ebx, %ebx
cmpq %r15, %rcx
cmovaq %r15, %rcx
leaq -0x30(%rbp), %rsi
movq %r12, %rdi
movq %r13, %rdx
movq %rcx, -0x40(%rbp)
callq *-0x38(%rbp)
testl %eax, %eax
jle 0x832d6
movq -0x30(%rbp), %rcx
cmpq $0x39, %rcx
ja 0x8342d
addb $-0x30, %cl
cmpb $0x9, %cl
ja 0x8342d
leaq (%rbx,%rbx,4), %rdx
movzbl %cl, %ecx
leaq (%rcx,%rdx,2), %rbx
movl %eax, %eax
addq %rax, %r13
movq %r12, %rdi
leaq -0x30(%rbp), %rsi
movq %r13, %rdx
movq -0x40(%rbp), %rcx
jmp 0x83295
cmpq %r15, %r13
je 0x83430
movq %rbx, -0x50(%rbp)
leaq 0x12(%r13), %rax
cmpq %r15, %rax
cmovaq %r15, %rax
movq %rax, -0x80(%rbp)
xorl %ebx, %ebx
xorl %esi, %esi
movq %rsi, -0x40(%rbp)
leaq (%rbx,%r13), %rdx
movq %r12, %rdi
leaq -0x30(%rbp), %rsi
movq %rdx, -0x88(%rbp)
movq %r15, %rcx
callq *-0x38(%rbp)
testl %eax, %eax
jle 0x8316d
movq -0x30(%rbp), %rcx
cmpq $0x39, %rcx
ja 0x8344a
addb $-0x30, %cl
cmpb $0x9, %cl
movq -0x40(%rbp), %rsi
ja 0x8344e
movl %eax, %eax
addq %rax, %rbx
leaq (%rbx,%r13), %r8
leaq (%rsi,%rsi,4), %rax
movzbl %cl, %ecx
leaq (%rcx,%rax,2), %rsi
cmpq -0x80(%rbp), %r8
jne 0x832f6
cmpq %r15, -0x80(%rbp)
je 0x8348c
movq %rsi, -0x40(%rbp)
leaq -0x30(%rbp), %rsi
movq %r12, %rdi
movq %r8, %rbx
movq %r8, %rdx
movq %r15, %rcx
callq *-0x38(%rbp)
testl %eax, %eax
jle 0x8316d
movq -0x30(%rbp), %r13
addq $-0x30, %r13
cmpq $0x9, %r13
movq -0x40(%rbp), %rsi
movq %rbx, %r8
ja 0x83492
movl %eax, %eax
addq %rax, %r8
cmpq %r15, %r8
je 0x834b7
leaq -0x30(%rbp), %rsi
movq %r12, %rdi
movq %r8, %rbx
movq %r8, %rdx
movq %r15, %rcx
callq *-0x38(%rbp)
testl %eax, %eax
jle 0x8316d
movq -0x30(%rbp), %rcx
cmpq $0x39, %rcx
movq -0x40(%rbp), %rsi
movq %rbx, %r8
ja 0x834b7
addb $-0x30, %cl
cmpb $0x9, %cl
ja 0x834b7
movq %rcx, %rbx
movl %eax, %eax
addq %rax, %r8
movq -0x48(%rbp), %rax
movq %r8, (%rax)
cmpq %r15, %r8
je 0x8351c
movq %r8, %rdx
leaq -0x30(%rbp), %rsi
movq %r12, %rdi
movq %r15, %rcx
callq *-0x38(%rbp)
testl %eax, %eax
jle 0x8351c
movl $0xd0, %eax
addl -0x30(%rbp), %eax
andl $0xfe, %eax
cmpl $0xa, %eax
movq -0x50(%rbp), %rdx
jae 0x83520
jmp 0x834f4
movq %r13, %r15
movq %rbx, %rax
negq %rax
cmpq $0x2d, %r14
movq -0x48(%rbp), %rcx
movq %r15, (%rcx)
cmovneq %rbx, %rax
jmp 0x83184
movq -0x40(%rbp), %rsi
movq -0x88(%rbp), %r15
movq %r15, %rax
subq %r13, %rax
andq $-0x2, %rax
leaq 0x2115aa(%rip), %rcx # 0x294a10
movq -0x50(%rbp), %rdx
imulq (%rcx,%rax,4), %rdx
addq %rsi, %rdx
movq %rdx, %rax
negq %rax
cmpq $0x2d, %r14
movq -0x48(%rbp), %rcx
movq %r15, (%rcx)
cmovneq %rdx, %rax
jmp 0x83184
cmpq $0x12, %rbx
jne 0x83455
imulq $0x3b9aca00, -0x50(%rbp), %rax # imm = 0x3B9ACA00
addq %rax, %rsi
movq %rsi, %rax
negq %rax
cmpq $0x2d, %r14
movq -0x48(%rbp), %rcx
movq %r8, (%rcx)
cmovneq %rsi, %rax
jmp 0x83184
movabsq $0x2540be400, %rax # imm = 0x2540BE400
movq -0x50(%rbp), %rcx
imulq %rax, %rcx
leaq (%rsi,%rsi,4), %rax
leaq (%rcx,%rax,2), %rax
addq %r13, %rax
movq -0x48(%rbp), %rcx
movq %r8, (%rcx)
cmpq $0x2d, %r14
jne 0x83184
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
cmpq %rcx, %rax
jbe 0x83514
xorl %eax, %eax
cmpq $0x2d, %r14
setne %al
movq -0x60(%rbp), %rcx
movl $0x22, (%rcx)
negq %rax
btsq $0x3f, %rax
jmp 0x83184
negq %rax
jmp 0x83184
movq -0x50(%rbp), %rdx
cmpq -0x58(%rbp), %rdx
ja 0x834f4
leaq (,%r13,4), %rax
addq %r13, %rax
movzbl %bl, %ecx
leaq (%rcx,%rax,2), %rax
cmpq -0x58(%rbp), %rdx
jne 0x8354e
movq -0x40(%rbp), %rcx
cmpq -0x78(%rbp), %rcx
jb 0x8354e
cmpq -0x70(%rbp), %rax
ja 0x834f4
movabsq $0x174876e800, %rcx # imm = 0x174876E800
imulq %rcx, %rdx
imulq $0x64, -0x40(%rbp), %rcx
addq %rax, %rdx
addq %rcx, %rdx
movq %rdx, %rax
jmp 0x83184
|
my_strtoll10_mb2:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov [rbp+var_60], rcx
mov [rbp+var_68], rsi
mov [rbp+var_48], rdx
test rdx, rdx
jz short loc_8316D
mov r12, rdi
mov rax, [rdi+0B8h]
mov r8, [rax+28h]
mov rax, [rbp+var_48]
mov rax, [rax]
mov rdx, [rbp+var_68]
sub rax, rdx
mov r15, rax
shr r15, 3Fh
add r15, rax
and r15, 0FFFFFFFFFFFFFFFEh
add r15, rdx
lea rsi, [rbp+var_30]
mov rcx, r15
mov [rbp+var_38], r8
call r8
test eax, eax
jle short loc_8316D
lea rbx, [rbp+var_30]
mov r13, [rbp+var_68]
loc_83141:
mov rcx, r13
mov r13d, eax
add r13, rcx
mov r14, [rbp+var_30]
cmp r14, 20h ; ' '
jz short loc_8315A
cmp r14, 9
jnz short loc_83193
loc_8315A:
mov rdi, r12
mov rsi, rbx
mov rdx, r13
mov rcx, r15
call [rbp+var_38]
test eax, eax
jg short loc_83141
loc_8316D:
mov rax, [rbp+var_60]
mov dword ptr [rax], 21h ; '!'
mov rax, [rbp+var_48]
mov rcx, [rbp+var_68]
mov [rax], rcx
xor eax, eax
loc_83184:
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_83193:
cmp r14, 2Dh ; '-'
jnz short loc_831D9
mov rax, [rbp+var_60]
mov dword ptr [rax], 0FFFFFFFFh
lea rsi, [rbp+var_30]
mov rdi, r12
mov rdx, r13
mov rcx, r15
call [rbp+var_38]
test eax, eax
jle short loc_8316D
mov eax, eax
add r13, rax
mov eax, 8
mov [rbp+var_70], rax
mov eax, 15F797AEh
mov [rbp+var_78], rax
mov eax, 57F5FF8h
mov [rbp+var_58], rax
jmp short loc_83221
loc_831D9:
mov rax, [rbp+var_60]
mov dword ptr [rax], 0
mov eax, 0Fh
mov [rbp+var_70], rax
mov eax, 2BEF2F5Ch
mov [rbp+var_78], rax
mov eax, 0AFEBFF0h
mov [rbp+var_58], rax
cmp r14, 2Bh ; '+'
jnz short loc_83221
lea rsi, [rbp+var_30]
mov rdi, r12
mov rdx, r13
mov rcx, r15
call [rbp+var_38]
test eax, eax
jle loc_8316D
mov eax, eax
add r13, rax
loc_83221:
mov rax, [rbp+var_30]
cmp rax, 30h ; '0'
jnz short loc_83263
cmp r13, r15
jz short loc_8325C
lea rbx, [rbp+var_30]
loc_83234:
mov rdi, r12
mov rsi, rbx
mov rdx, r13
mov rcx, r15
call [rbp+var_38]
test eax, eax
jle loc_8316D
cmp [rbp+var_30], 30h ; '0'
jnz short loc_8327A
mov eax, eax
add r13, rax
cmp r13, r15
jnz short loc_83234
loc_8325C:
xor ebx, ebx
jmp loc_83430
loc_83263:
add rax, 0FFFFFFFFFFFFFFD0h
cmp rax, 9
ja loc_8316D
mov rbx, rax
lea rcx, [r13+10h]
jmp short loc_83280
loc_8327A:
lea rcx, [r13+12h]
xor ebx, ebx
loc_83280:
cmp rcx, r15
cmova rcx, r15
lea rsi, [rbp+var_30]
mov rdi, r12
mov rdx, r13
mov [rbp+var_40], rcx
loc_83295:
call [rbp+var_38]
test eax, eax
jle short loc_832D6
mov rcx, [rbp+var_30]
cmp rcx, 39h ; '9'
ja loc_8342D
add cl, 0D0h
cmp cl, 9
ja loc_8342D
lea rdx, [rbx+rbx*4]
movzx ecx, cl
lea rbx, [rcx+rdx*2]
mov eax, eax
add r13, rax
mov rdi, r12
lea rsi, [rbp+var_30]
mov rdx, r13
mov rcx, [rbp+var_40]
jmp short loc_83295
loc_832D6:
cmp r13, r15
jz loc_83430
mov [rbp+var_50], rbx
lea rax, [r13+12h]
cmp rax, r15
cmova rax, r15
mov [rbp+var_80], rax
xor ebx, ebx
xor esi, esi
loc_832F6:
mov [rbp+var_40], rsi
lea rdx, [rbx+r13]
mov rdi, r12
lea rsi, [rbp+var_30]
mov [rbp+var_88], rdx
mov rcx, r15
call [rbp+var_38]
test eax, eax
jle loc_8316D
mov rcx, [rbp+var_30]
cmp rcx, 39h ; '9'
ja loc_8344A
add cl, 0D0h
cmp cl, 9
mov rsi, [rbp+var_40]
ja loc_8344E
mov eax, eax
add rbx, rax
lea r8, [rbx+r13]
lea rax, [rsi+rsi*4]
movzx ecx, cl
lea rsi, [rcx+rax*2]
cmp r8, [rbp+var_80]
jnz short loc_832F6
cmp [rbp+var_80], r15
jz loc_8348C
mov [rbp+var_40], rsi
lea rsi, [rbp+var_30]
mov rdi, r12
mov rbx, r8
mov rdx, r8
mov rcx, r15
call [rbp+var_38]
test eax, eax
jle loc_8316D
mov r13, [rbp+var_30]
add r13, 0FFFFFFFFFFFFFFD0h
cmp r13, 9
mov rsi, [rbp+var_40]
mov r8, rbx
ja loc_83492
mov eax, eax
add r8, rax
cmp r8, r15
jz loc_834B7
lea rsi, [rbp+var_30]
mov rdi, r12
mov rbx, r8
mov rdx, r8
mov rcx, r15
call [rbp+var_38]
test eax, eax
jle loc_8316D
mov rcx, [rbp+var_30]
cmp rcx, 39h ; '9'
mov rsi, [rbp+var_40]
mov r8, rbx
ja loc_834B7
add cl, 0D0h
cmp cl, 9
ja loc_834B7
mov rbx, rcx
mov eax, eax
add r8, rax
mov rax, [rbp+var_48]
mov [rax], r8
cmp r8, r15
jz loc_8351C
mov rdx, r8
lea rsi, [rbp+var_30]
mov rdi, r12
mov rcx, r15
call [rbp+var_38]
test eax, eax
jle loc_8351C
mov eax, 0D0h
add eax, dword ptr [rbp+var_30]
and eax, 0FEh
cmp eax, 0Ah
mov rdx, [rbp+var_50]
jnb loc_83520
jmp loc_834F4
loc_8342D:
mov r15, r13
loc_83430:
mov rax, rbx
neg rax
cmp r14, 2Dh ; '-'
mov rcx, [rbp+var_48]
mov [rcx], r15
cmovnz rax, rbx
jmp loc_83184
loc_8344A:
mov rsi, [rbp+var_40]
loc_8344E:
mov r15, [rbp+var_88]
loc_83455:
mov rax, r15
sub rax, r13
and rax, 0FFFFFFFFFFFFFFFEh
lea rcx, lfactor
mov rdx, [rbp+var_50]
imul rdx, [rcx+rax*4]
add rdx, rsi
mov rax, rdx
neg rax
cmp r14, 2Dh ; '-'
mov rcx, [rbp+var_48]
mov [rcx], r15
cmovnz rax, rdx
jmp loc_83184
loc_8348C:
cmp rbx, 12h
jnz short loc_83455
loc_83492:
imul rax, [rbp+var_50], 3B9ACA00h
add rsi, rax
mov rax, rsi
neg rax
cmp r14, 2Dh ; '-'
mov rcx, [rbp+var_48]
mov [rcx], r8
cmovnz rax, rsi
jmp loc_83184
loc_834B7:
mov rax, 2540BE400h
mov rcx, [rbp+var_50]
imul rcx, rax
lea rax, [rsi+rsi*4]
lea rax, [rcx+rax*2]
add rax, r13
mov rcx, [rbp+var_48]
mov [rcx], r8
cmp r14, 2Dh ; '-'
jnz loc_83184
mov rcx, 8000000000000000h
cmp rax, rcx
jbe short loc_83514
loc_834F4:
xor eax, eax
cmp r14, 2Dh ; '-'
setnz al
mov rcx, [rbp+var_60]
mov dword ptr [rcx], 22h ; '"'
neg rax
bts rax, 3Fh ; '?'
jmp loc_83184
loc_83514:
neg rax
jmp loc_83184
loc_8351C:
mov rdx, [rbp+var_50]
loc_83520:
cmp rdx, [rbp+var_58]
ja short loc_834F4
lea rax, ds:0[r13*4]
add rax, r13
movzx ecx, bl
lea rax, [rcx+rax*2]
cmp rdx, [rbp+var_58]
jnz short loc_8354E
mov rcx, [rbp+var_40]
cmp rcx, [rbp+var_78]
jb short loc_8354E
cmp rax, [rbp+var_70]
ja short loc_834F4
loc_8354E:
mov rcx, 174876E800h
imul rdx, rcx
imul rcx, [rbp+var_40], 64h ; 'd'
add rdx, rax
add rdx, rcx
mov rax, rdx
jmp loc_83184
|
unsigned long long my_strtoll10_mb2(long long a1, long long a2, unsigned long long *a3, _DWORD *a4)
{
long long v4; // r12
unsigned long long v5; // r15
int v6; // eax
unsigned long long v7; // r13
long long v8; // r14
unsigned long long result; // rax
int v10; // eax
int v11; // eax
int v12; // eax
long long v13; // rbx
unsigned long long i; // rdx
int v15; // eax
unsigned long long v16; // rax
long long v17; // rbx
long long v18; // rsi
int v19; // eax
unsigned long long v20; // r8
unsigned long long v21; // rbx
int v22; // eax
long long v23; // r13
unsigned long long v24; // r8
unsigned long long v25; // rbx
int v26; // eax
unsigned __int8 v27; // bl
unsigned long long v28; // r8
unsigned long long v29; // rdx
long long v30; // rdx
long long v31; // rsi
unsigned long long v32; // rax
unsigned long long v33; // [rsp+10h] [rbp-80h]
unsigned long long v34; // [rsp+18h] [rbp-78h]
unsigned long long v35; // [rsp+20h] [rbp-70h]
unsigned long long v38; // [rsp+38h] [rbp-58h]
long long v39; // [rsp+40h] [rbp-50h]
long long v41; // [rsp+50h] [rbp-40h]
unsigned long long v42; // [rsp+50h] [rbp-40h]
long long ( *v43)(long long, _QWORD *, long long, unsigned long long); // [rsp+58h] [rbp-38h]
_QWORD v44[6]; // [rsp+60h] [rbp-30h] BYREF
if ( !a3 )
goto LABEL_7;
v4 = a1;
v5 = a2 + ((*a3 - a2 + ((*a3 - a2) >> 63)) & 0xFFFFFFFFFFFFFFFELL);
v43 = *(long long ( **)(long long, _QWORD *, long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 40LL);
v6 = v43(a1, v44, a2, v5);
if ( v6 <= 0 )
goto LABEL_7;
v7 = a2;
while ( 1 )
{
v7 += (unsigned int)v6;
v8 = v44[0];
if ( v44[0] != 32LL && v44[0] != 9LL )
break;
v6 = v43(a1, v44, v7, v5);
if ( v6 <= 0 )
goto LABEL_7;
}
if ( v44[0] == 45LL )
{
*a4 = -1;
v10 = v43(a1, v44, v7, v5);
if ( v10 <= 0 )
goto LABEL_7;
v7 += (unsigned int)v10;
v35 = 8LL;
v34 = 368547758LL;
v38 = 92233720LL;
}
else
{
*a4 = 0;
v35 = 15LL;
v34 = 737095516LL;
v38 = 184467440LL;
if ( v8 == 43 )
{
v11 = v43(a1, v44, v7, v5);
if ( v11 <= 0 )
goto LABEL_7;
v7 += (unsigned int)v11;
}
}
if ( v44[0] == 48LL )
{
if ( v7 == v5 )
{
LABEL_20:
v13 = 0LL;
goto LABEL_49;
}
while ( 1 )
{
v12 = v43(a1, v44, v7, v5);
if ( v12 <= 0 )
goto LABEL_7;
if ( v44[0] != 48LL )
break;
v7 += (unsigned int)v12;
if ( v7 == v5 )
goto LABEL_20;
}
v13 = 0LL;
goto LABEL_24;
}
if ( (unsigned long long)(v44[0] - 48LL) > 9 )
{
LABEL_7:
*a4 = 33;
*a3 = a2;
return 0LL;
}
v13 = v44[0] - 48LL;
LABEL_24:
for ( i = v7; ; i = v7 )
{
v15 = ((long long ( *)(long long, _QWORD *, unsigned long long))v43)(a1, v44, i);
if ( v15 <= 0 )
break;
if ( v44[0] > 0x39uLL || (unsigned __int8)(LOBYTE(v44[0]) - 48) > 9u )
{
v5 = v7;
LABEL_49:
result = -v13;
*a3 = v5;
if ( v8 != 45 )
return v13;
return result;
}
v13 = (unsigned __int8)(LOBYTE(v44[0]) - 48) + 10 * v13;
v7 += (unsigned int)v15;
a1 = v4;
}
if ( v7 == v5 )
goto LABEL_49;
v39 = v13;
v16 = v7 + 18;
if ( v7 + 18 > v5 )
v16 = v5;
v33 = v16;
v17 = 0LL;
v18 = 0LL;
do
{
v41 = v18;
v19 = v43(v4, v44, v17 + v7, v5);
if ( v19 <= 0 )
goto LABEL_7;
if ( v44[0] > 0x39uLL || (unsigned __int8)(LOBYTE(v44[0]) - 48) > 9u )
{
v5 = v17 + v7;
goto LABEL_53;
}
v17 += (unsigned int)v19;
v20 = v17 + v7;
v18 = (unsigned __int8)(LOBYTE(v44[0]) - 48) + 10 * v18;
}
while ( v17 + v7 != v33 );
if ( v33 == v5 )
{
if ( v17 == 18 )
{
LABEL_57:
v31 = 1000000000 * v39 + v18;
result = -v31;
*a3 = v20;
if ( v8 != 45 )
return v31;
return result;
}
LABEL_53:
v30 = v18 + *(_QWORD *)((char *)&lfactor + 4 * ((v5 - v7) & 0xFFFFFFFFFFFFFFFELL)) * v39;
result = -v30;
*a3 = v5;
if ( v8 != 45 )
return v30;
return result;
}
v42 = (unsigned __int8)(LOBYTE(v44[0]) - 48) + 10 * v41;
v21 = v17 + v7;
v22 = v43(v4, v44, v20, v5);
if ( v22 <= 0 )
goto LABEL_7;
v23 = v44[0] - 48LL;
v20 = v21;
if ( (unsigned long long)(v44[0] - 48LL) > 9 )
goto LABEL_57;
v24 = (unsigned int)v22 + v21;
if ( v24 == v5 )
goto LABEL_60;
v25 = (unsigned int)v22 + v21;
v26 = v43(v4, v44, v24, v5);
if ( v26 <= 0 )
goto LABEL_7;
v24 = v25;
if ( v44[0] > 0x39uLL || (unsigned __int8)(LOBYTE(v44[0]) - 48) > 9u )
{
LABEL_60:
result = v23 + 10000000000LL * v39 + 10 * v18;
*a3 = v24;
if ( v8 != 45 )
return result;
if ( result > 0x8000000000000000LL )
goto LABEL_62;
return -(long long)result;
}
else
{
v27 = LOBYTE(v44[0]) - 48;
v28 = (unsigned int)v26 + v24;
*a3 = v28;
if ( v28 == v5 || (int)v43(v4, v44, v28, v5) <= 0 )
{
v29 = v39;
}
else
{
v29 = v39;
if ( ((LOBYTE(v44[0]) - 48) & 0xFEu) < 0xA )
{
LABEL_62:
*a4 = 34;
return -(long long)(v8 != 45) | 0x8000000000000000LL;
}
}
if ( v29 > v38 )
goto LABEL_62;
v32 = v27 + 10 * v23;
if ( v29 == v38 && v42 >= v34 && v32 > v35 )
goto LABEL_62;
return 100 * v42 + v32 + 100000000000LL * v29;
}
}
|
my_strtoll10_mb2:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV qword ptr [RBP + -0x60],RCX
MOV qword ptr [RBP + -0x68],RSI
MOV qword ptr [RBP + -0x48],RDX
TEST RDX,RDX
JZ 0x0018316d
MOV R12,RDI
MOV RAX,qword ptr [RDI + 0xb8]
MOV R8,qword ptr [RAX + 0x28]
MOV RAX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RAX]
MOV RDX,qword ptr [RBP + -0x68]
SUB RAX,RDX
MOV R15,RAX
SHR R15,0x3f
ADD R15,RAX
AND R15,-0x2
ADD R15,RDX
LEA RSI,[RBP + -0x30]
MOV RCX,R15
MOV qword ptr [RBP + -0x38],R8
CALL R8
TEST EAX,EAX
JLE 0x0018316d
LEA RBX,[RBP + -0x30]
MOV R13,qword ptr [RBP + -0x68]
LAB_00183141:
MOV RCX,R13
MOV R13D,EAX
ADD R13,RCX
MOV R14,qword ptr [RBP + -0x30]
CMP R14,0x20
JZ 0x0018315a
CMP R14,0x9
JNZ 0x00183193
LAB_0018315a:
MOV RDI,R12
MOV RSI,RBX
MOV RDX,R13
MOV RCX,R15
CALL qword ptr [RBP + -0x38]
TEST EAX,EAX
JG 0x00183141
LAB_0018316d:
MOV RAX,qword ptr [RBP + -0x60]
MOV dword ptr [RAX],0x21
MOV RAX,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [RBP + -0x68]
MOV qword ptr [RAX],RCX
XOR EAX,EAX
LAB_00183184:
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00183193:
CMP R14,0x2d
JNZ 0x001831d9
MOV RAX,qword ptr [RBP + -0x60]
MOV dword ptr [RAX],0xffffffff
LEA RSI,[RBP + -0x30]
MOV RDI,R12
MOV RDX,R13
MOV RCX,R15
CALL qword ptr [RBP + -0x38]
TEST EAX,EAX
JLE 0x0018316d
MOV EAX,EAX
ADD R13,RAX
MOV EAX,0x8
MOV qword ptr [RBP + -0x70],RAX
MOV EAX,0x15f797ae
MOV qword ptr [RBP + -0x78],RAX
MOV EAX,0x57f5ff8
MOV qword ptr [RBP + -0x58],RAX
JMP 0x00183221
LAB_001831d9:
MOV RAX,qword ptr [RBP + -0x60]
MOV dword ptr [RAX],0x0
MOV EAX,0xf
MOV qword ptr [RBP + -0x70],RAX
MOV EAX,0x2bef2f5c
MOV qword ptr [RBP + -0x78],RAX
MOV EAX,0xafebff0
MOV qword ptr [RBP + -0x58],RAX
CMP R14,0x2b
JNZ 0x00183221
LEA RSI,[RBP + -0x30]
MOV RDI,R12
MOV RDX,R13
MOV RCX,R15
CALL qword ptr [RBP + -0x38]
TEST EAX,EAX
JLE 0x0018316d
MOV EAX,EAX
ADD R13,RAX
LAB_00183221:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,0x30
JNZ 0x00183263
CMP R13,R15
JZ 0x0018325c
LEA RBX,[RBP + -0x30]
LAB_00183234:
MOV RDI,R12
MOV RSI,RBX
MOV RDX,R13
MOV RCX,R15
CALL qword ptr [RBP + -0x38]
TEST EAX,EAX
JLE 0x0018316d
CMP qword ptr [RBP + -0x30],0x30
JNZ 0x0018327a
MOV EAX,EAX
ADD R13,RAX
CMP R13,R15
JNZ 0x00183234
LAB_0018325c:
XOR EBX,EBX
JMP 0x00183430
LAB_00183263:
ADD RAX,-0x30
CMP RAX,0x9
JA 0x0018316d
MOV RBX,RAX
LEA RCX,[R13 + 0x10]
JMP 0x00183280
LAB_0018327a:
LEA RCX,[R13 + 0x12]
XOR EBX,EBX
LAB_00183280:
CMP RCX,R15
CMOVA RCX,R15
LEA RSI,[RBP + -0x30]
MOV RDI,R12
MOV RDX,R13
MOV qword ptr [RBP + -0x40],RCX
LAB_00183295:
CALL qword ptr [RBP + -0x38]
TEST EAX,EAX
JLE 0x001832d6
MOV RCX,qword ptr [RBP + -0x30]
CMP RCX,0x39
JA 0x0018342d
ADD CL,0xd0
CMP CL,0x9
JA 0x0018342d
LEA RDX,[RBX + RBX*0x4]
MOVZX ECX,CL
LEA RBX,[RCX + RDX*0x2]
MOV EAX,EAX
ADD R13,RAX
MOV RDI,R12
LEA RSI,[RBP + -0x30]
MOV RDX,R13
MOV RCX,qword ptr [RBP + -0x40]
JMP 0x00183295
LAB_001832d6:
CMP R13,R15
JZ 0x00183430
MOV qword ptr [RBP + -0x50],RBX
LEA RAX,[R13 + 0x12]
CMP RAX,R15
CMOVA RAX,R15
MOV qword ptr [RBP + -0x80],RAX
XOR EBX,EBX
XOR ESI,ESI
LAB_001832f6:
MOV qword ptr [RBP + -0x40],RSI
LEA RDX,[RBX + R13*0x1]
MOV RDI,R12
LEA RSI,[RBP + -0x30]
MOV qword ptr [RBP + -0x88],RDX
MOV RCX,R15
CALL qword ptr [RBP + -0x38]
TEST EAX,EAX
JLE 0x0018316d
MOV RCX,qword ptr [RBP + -0x30]
CMP RCX,0x39
JA 0x0018344a
ADD CL,0xd0
CMP CL,0x9
MOV RSI,qword ptr [RBP + -0x40]
JA 0x0018344e
MOV EAX,EAX
ADD RBX,RAX
LEA R8,[RBX + R13*0x1]
LEA RAX,[RSI + RSI*0x4]
MOVZX ECX,CL
LEA RSI,[RCX + RAX*0x2]
CMP R8,qword ptr [RBP + -0x80]
JNZ 0x001832f6
CMP qword ptr [RBP + -0x80],R15
JZ 0x0018348c
MOV qword ptr [RBP + -0x40],RSI
LEA RSI,[RBP + -0x30]
MOV RDI,R12
MOV RBX,R8
MOV RDX,R8
MOV RCX,R15
CALL qword ptr [RBP + -0x38]
TEST EAX,EAX
JLE 0x0018316d
MOV R13,qword ptr [RBP + -0x30]
ADD R13,-0x30
CMP R13,0x9
MOV RSI,qword ptr [RBP + -0x40]
MOV R8,RBX
JA 0x00183492
MOV EAX,EAX
ADD R8,RAX
CMP R8,R15
JZ 0x001834b7
LEA RSI,[RBP + -0x30]
MOV RDI,R12
MOV RBX,R8
MOV RDX,R8
MOV RCX,R15
CALL qword ptr [RBP + -0x38]
TEST EAX,EAX
JLE 0x0018316d
MOV RCX,qword ptr [RBP + -0x30]
CMP RCX,0x39
MOV RSI,qword ptr [RBP + -0x40]
MOV R8,RBX
JA 0x001834b7
ADD CL,0xd0
CMP CL,0x9
JA 0x001834b7
MOV RBX,RCX
MOV EAX,EAX
ADD R8,RAX
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RAX],R8
CMP R8,R15
JZ 0x0018351c
MOV RDX,R8
LEA RSI,[RBP + -0x30]
MOV RDI,R12
MOV RCX,R15
CALL qword ptr [RBP + -0x38]
TEST EAX,EAX
JLE 0x0018351c
MOV EAX,0xd0
ADD EAX,dword ptr [RBP + -0x30]
AND EAX,0xfe
CMP EAX,0xa
MOV RDX,qword ptr [RBP + -0x50]
JNC 0x00183520
JMP 0x001834f4
LAB_0018342d:
MOV R15,R13
LAB_00183430:
MOV RAX,RBX
NEG RAX
CMP R14,0x2d
MOV RCX,qword ptr [RBP + -0x48]
MOV qword ptr [RCX],R15
CMOVNZ RAX,RBX
JMP 0x00183184
LAB_0018344a:
MOV RSI,qword ptr [RBP + -0x40]
LAB_0018344e:
MOV R15,qword ptr [RBP + -0x88]
LAB_00183455:
MOV RAX,R15
SUB RAX,R13
AND RAX,-0x2
LEA RCX,[0x394a10]
MOV RDX,qword ptr [RBP + -0x50]
IMUL RDX,qword ptr [RCX + RAX*0x4]
ADD RDX,RSI
MOV RAX,RDX
NEG RAX
CMP R14,0x2d
MOV RCX,qword ptr [RBP + -0x48]
MOV qword ptr [RCX],R15
CMOVNZ RAX,RDX
JMP 0x00183184
LAB_0018348c:
CMP RBX,0x12
JNZ 0x00183455
LAB_00183492:
IMUL RAX,qword ptr [RBP + -0x50],0x3b9aca00
ADD RSI,RAX
MOV RAX,RSI
NEG RAX
CMP R14,0x2d
MOV RCX,qword ptr [RBP + -0x48]
MOV qword ptr [RCX],R8
CMOVNZ RAX,RSI
JMP 0x00183184
LAB_001834b7:
MOV RAX,0x2540be400
MOV RCX,qword ptr [RBP + -0x50]
IMUL RCX,RAX
LEA RAX,[RSI + RSI*0x4]
LEA RAX,[RCX + RAX*0x2]
ADD RAX,R13
MOV RCX,qword ptr [RBP + -0x48]
MOV qword ptr [RCX],R8
CMP R14,0x2d
JNZ 0x00183184
MOV RCX,-0x8000000000000000
CMP RAX,RCX
JBE 0x00183514
LAB_001834f4:
XOR EAX,EAX
CMP R14,0x2d
SETNZ AL
MOV RCX,qword ptr [RBP + -0x60]
MOV dword ptr [RCX],0x22
NEG RAX
BTS RAX,0x3f
JMP 0x00183184
LAB_00183514:
NEG RAX
JMP 0x00183184
LAB_0018351c:
MOV RDX,qword ptr [RBP + -0x50]
LAB_00183520:
CMP RDX,qword ptr [RBP + -0x58]
JA 0x001834f4
LEA RAX,[R13*0x4]
ADD RAX,R13
MOVZX ECX,BL
LEA RAX,[RCX + RAX*0x2]
CMP RDX,qword ptr [RBP + -0x58]
JNZ 0x0018354e
MOV RCX,qword ptr [RBP + -0x40]
CMP RCX,qword ptr [RBP + -0x78]
JC 0x0018354e
CMP RAX,qword ptr [RBP + -0x70]
JA 0x001834f4
LAB_0018354e:
MOV RCX,0x174876e800
IMUL RDX,RCX
IMUL RCX,qword ptr [RBP + -0x40],0x64
ADD RDX,RAX
ADD RDX,RCX
MOV RAX,RDX
JMP 0x00183184
|
ulong my_strtoll10_mb2(long param_1,ulong param_2,ulong *param_3,int4 *param_4)
{
code *pcVar1;
long lVar2;
uint uVar3;
int iVar4;
ulong uVar5;
ulong uVar6;
byte bVar7;
long lVar8;
ulong uVar9;
ulong uVar10;
ulong uVar11;
ulong uVar12;
ulong uVar13;
ulong local_80;
ulong local_78;
ulong local_60;
int local_38;
int4 uStack_34;
if (param_3 != (ulong *)0x0) {
pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28);
uVar12 = ((*param_3 - param_2) - ((long)(*param_3 - param_2) >> 0x3f) & 0xfffffffffffffffe) +
param_2;
uVar3 = (*pcVar1)(param_1,&local_38,param_2,uVar12);
if (0 < (int)uVar3) {
uVar11 = param_2;
do {
uVar11 = uVar3 + uVar11;
lVar2 = CONCAT44(uStack_34,local_38);
if ((lVar2 != 0x20) && (lVar2 != 9)) {
if (lVar2 == 0x2d) {
*param_4 = 0xffffffff;
uVar3 = (*pcVar1)(param_1,&local_38,uVar11,uVar12);
if ((int)uVar3 < 1) break;
uVar11 = uVar11 + uVar3;
local_78 = 8;
local_80 = 0x15f797ae;
local_60 = 0x57f5ff8;
}
else {
*param_4 = 0;
local_78 = 0xf;
local_80 = 0x2bef2f5c;
local_60 = 0xafebff0;
if (lVar2 == 0x2b) {
uVar3 = (*pcVar1)(param_1,&local_38,uVar11,uVar12);
if ((int)uVar3 < 1) break;
uVar11 = uVar11 + uVar3;
}
}
if (CONCAT44(uStack_34,local_38) == 0x30) {
if (uVar11 == uVar12) goto LAB_0018325c;
goto LAB_00183234;
}
uVar5 = CONCAT44(uStack_34,local_38) - 0x30;
if (uVar5 < 10) {
uVar9 = uVar11 + 0x10;
goto LAB_00183280;
}
break;
}
uVar3 = (*pcVar1)(param_1,&local_38,uVar11,uVar12);
} while (0 < (int)uVar3);
}
}
LAB_0018316d:
*param_4 = 0x21;
*param_3 = param_2;
return 0;
LAB_00183234:
uVar3 = (*pcVar1)(param_1,&local_38,uVar11,uVar12);
if ((int)uVar3 < 1) goto LAB_0018316d;
if (CONCAT44(uStack_34,local_38) != 0x30) {
uVar9 = uVar11 + 0x12;
uVar5 = 0;
LAB_00183280:
if (uVar12 < uVar9) {
uVar9 = uVar12;
}
while (uVar3 = (*pcVar1)(param_1,&local_38,uVar11,uVar9), 0 < (int)uVar3) {
uVar6 = uVar11;
if ((0x39 < CONCAT44(uStack_34,local_38)) || (bVar7 = (char)local_38 - 0x30, 9 < bVar7))
goto LAB_00183430;
uVar5 = (ulong)bVar7 + uVar5 * 10;
uVar11 = uVar11 + uVar3;
}
uVar6 = uVar12;
if (uVar11 == uVar12) goto LAB_00183430;
uVar6 = uVar11 + 0x12;
if (uVar12 < uVar11 + 0x12) {
uVar6 = uVar12;
}
lVar8 = 0;
uVar9 = 0;
while( true ) {
uVar13 = lVar8 + uVar11;
uVar3 = (*pcVar1)(param_1,&local_38,uVar13,uVar12);
if ((int)uVar3 < 1) break;
if ((0x39 < CONCAT44(uStack_34,local_38)) || (bVar7 = (char)local_38 - 0x30, 9 < bVar7)) {
LAB_00183455:
uVar9 = uVar5 * *(long *)((long)&lfactor + (uVar13 - uVar11 & 0xfffffffffffffffe) * 4) +
uVar9;
*param_3 = uVar13;
if (lVar2 == 0x2d) {
return -uVar9;
}
return uVar9;
}
lVar8 = lVar8 + (ulong)uVar3;
uVar10 = lVar8 + uVar11;
uVar9 = (ulong)bVar7 + uVar9 * 10;
if (uVar10 == uVar6) {
if (uVar6 == uVar12) {
uVar13 = uVar12;
if (lVar8 == 0x12) {
LAB_00183492:
uVar9 = uVar9 + uVar5 * 1000000000;
*param_3 = uVar10;
if (lVar2 == 0x2d) {
return -uVar9;
}
return uVar9;
}
goto LAB_00183455;
}
uVar3 = (*pcVar1)(param_1,&local_38,uVar10,uVar12);
if ((int)uVar3 < 1) break;
uVar11 = CONCAT44(uStack_34,local_38) - 0x30;
if (9 < uVar11) goto LAB_00183492;
uVar10 = uVar10 + uVar3;
if (uVar10 != uVar12) {
uVar3 = (*pcVar1)(param_1,&local_38,uVar10,uVar12);
if ((int)uVar3 < 1) break;
if ((CONCAT44(uStack_34,local_38) < 0x3a) && (bVar7 = (char)local_38 - 0x30, bVar7 < 10))
{
uVar10 = uVar10 + uVar3;
*param_3 = uVar10;
if ((((uVar10 == uVar12) ||
(iVar4 = (*pcVar1)(param_1,&local_38,uVar10,uVar12), iVar4 < 1)) ||
(9 < (local_38 + 0xd0U & 0xfe))) &&
((uVar5 <= local_60 &&
(((uVar12 = (ulong)bVar7 + uVar11 * 10, uVar5 != local_60 || (uVar9 < local_80)) ||
(uVar12 <= local_78)))))) {
return uVar5 * 100000000000 + uVar12 + uVar9 * 100;
}
goto LAB_001834f4;
}
}
uVar11 = uVar5 * 10000000000 + uVar9 * 10 + uVar11;
*param_3 = uVar10;
if (lVar2 != 0x2d) {
return uVar11;
}
if (uVar11 < 0x8000000000000001) {
return -uVar11;
}
LAB_001834f4:
*param_4 = 0x22;
return -(ulong)(lVar2 != 0x2d) | 0x8000000000000000;
}
}
goto LAB_0018316d;
}
uVar11 = uVar11 + uVar3;
if (uVar11 == uVar12) {
LAB_0018325c:
uVar5 = 0;
uVar6 = uVar12;
LAB_00183430:
*param_3 = uVar6;
if (lVar2 == 0x2d) {
return -uVar5;
}
return uVar5;
}
goto LAB_00183234;
}
|
|
57,503
|
server_response::remove_waiting_task_ids(std::unordered_set<int, std::hash<int>, std::equal_to<int>, std::allocator<int>> const&)
|
monkey531[P]llama/examples/server/server.cpp
|
void remove_waiting_task_ids(const std::unordered_set<int> & id_tasks) {
std::unique_lock<std::mutex> lock(mutex_results);
for (const auto & id_task : id_tasks) {
SRV_DBG("remove task %d from waiting list. current waiting = %d (before remove)\n", id_task, (int) waiting_task_ids.size());
waiting_task_ids.erase(id_task);
}
}
|
O3
|
cpp
|
server_response::remove_waiting_task_ids(std::unordered_set<int, std::hash<int>, std::equal_to<int>, std::allocator<int>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x50(%rdi), %rax
leaq 0x8(%rsp), %r15
movq %rax, (%r15)
movb $0x0, 0x8(%r15)
movq %r15, %rdi
callq 0x4547c
movb $0x1, 0x8(%r15)
addq $0x10, %rbx
leaq 0x24978b(%rip), %rbp # 0x2cff48
leaq 0xc1aec(%rip), %r15 # 0x1482b0
leaq 0xc34d4(%rip), %r12 # 0x149c9f
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x86814
leaq 0x8(%rbx), %r13
cmpl $0x0, (%rbp)
jle 0x86807
callq 0x13f3e3
movl (%r13), %r9d
movl 0x18(%r14), %ecx
movl %ecx, (%rsp)
movq %rax, %rdi
movl $0x1, %esi
movq %r15, %rdx
movl $0xc, %ecx
movq %r12, %r8
xorl %eax, %eax
callq 0x13f480
movq %r14, %rdi
movq %r13, %rsi
callq 0x78986
jmp 0x867cb
leaq 0x8(%rsp), %rdi
callq 0x45466
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x45466
movq %rbx, %rdi
callq 0x20380
|
_ZN15server_response23remove_waiting_task_idsERKSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rsi
mov r14, rdi
lea rax, [rdi+50h]
lea r15, [rsp+48h+var_40]
mov [r15], rax
mov byte ptr [r15+8], 0
mov rdi, r15
call _ZNSt11unique_lockISt5mutexE4lockEv; std::unique_lock<std::mutex>::lock(void)
mov byte ptr [r15+8], 1
add rbx, 10h
lea rbp, common_log_verbosity_thold
lea r15, aSrv12SRemoveTa; "srv %12.*s: remove task %d from waitin"...
lea r12, aRemoveWaitingT_0; "remove_waiting_task_ids"
loc_867CB:
mov rbx, [rbx]
test rbx, rbx
jz short loc_86814
lea r13, [rbx+8]
cmp dword ptr [rbp+0], 0
jle short loc_86807
call _Z15common_log_mainv; common_log_main(void)
mov r9d, [r13+0]
mov ecx, [r14+18h]
mov [rsp+48h+var_48], ecx
mov rdi, rax
mov esi, 1
mov rdx, r15
mov ecx, 0Ch
mov r8, r12
xor eax, eax
call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...)
loc_86807:
mov rdi, r14
mov rsi, r13
call _ZNSt10_HashtableIiiSaIiENSt8__detail9_IdentityESt8equal_toIiESt4hashIiENS1_18_Mod_range_hashingENS1_20_Default_ranged_hashENS1_20_Prime_rehash_policyENS1_17_Hashtable_traitsILb0ELb1ELb1EEEE8_M_eraseESt17integral_constantIbLb1EERKi; std::_Hashtable<int,int,std::allocator<int>,std::__detail::_Identity,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,true,true>>::_M_erase(std::integral_constant<bool,true>,int const&)
jmp short loc_867CB
loc_86814:
lea rdi, [rsp+48h+var_40]
call _ZNSt11unique_lockISt5mutexED2Ev; std::unique_lock<std::mutex>::~unique_lock()
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
lea rdi, [rsp+arg_0]
call _ZNSt11unique_lockISt5mutexED2Ev; std::unique_lock<std::mutex>::~unique_lock()
mov rdi, rbx
call __Unwind_Resume
|
long long server_response::remove_waiting_task_ids(_QWORD *a1, long long a2)
{
long long result; // rax
int *i; // rbx
int v4; // eax
_QWORD *v5; // [rsp+8h] [rbp-40h] BYREF
char v6; // [rsp+10h] [rbp-38h]
v5 = a1 + 10;
v6 = 0;
result = std::unique_lock<std::mutex>::lock((long long)&v5);
v6 = 1;
for ( i = (int *)(a2 + 16);
;
result = std::_Hashtable<int,int,std::allocator<int>,std::__detail::_Identity,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,true,true>>::_M_erase(
a1,
i + 2) )
{
i = *(int **)i;
if ( !i )
break;
if ( common_log_verbosity_thold > 0 )
{
v4 = common_log_main();
common_log_add(
v4,
1,
(unsigned int)"srv %12.*s: remove task %d from waiting list. current waiting = %d (before remove)\n",
12,
(unsigned int)"remove_waiting_task_ids",
i[2]);
}
}
std::unique_lock<std::mutex>::~unique_lock((long long)&v5);
return result;
}
|
remove_waiting_task_ids:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RSI
MOV R14,RDI
LEA RAX,[RDI + 0x50]
LEA R15,[RSP + 0x8]
MOV qword ptr [R15],RAX
MOV byte ptr [R15 + 0x8],0x0
MOV RDI,R15
CALL 0x0014547c
MOV byte ptr [R15 + 0x8],0x1
ADD RBX,0x10
LEA RBP,[0x3cff48]
LEA R15,[0x2482b0]
LEA R12,[0x249c9f]
LAB_001867cb:
MOV RBX,qword ptr [RBX]
TEST RBX,RBX
JZ 0x00186814
LEA R13,[RBX + 0x8]
CMP dword ptr [RBP],0x0
JLE 0x00186807
LAB_001867dd:
CALL 0x0023f3e3
MOV R9D,dword ptr [R13]
MOV ECX,dword ptr [R14 + 0x18]
MOV dword ptr [RSP],ECX
MOV RDI,RAX
MOV ESI,0x1
MOV RDX,R15
MOV ECX,0xc
MOV R8,R12
XOR EAX,EAX
CALL 0x0023f480
LAB_00186807:
MOV RDI,R14
MOV RSI,R13
CALL 0x00178986
LAB_00186812:
JMP 0x001867cb
LAB_00186814:
LEA RDI,[RSP + 0x8]
CALL 0x00145466
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* server_response::remove_waiting_task_ids(std::unordered_set<int, std::hash<int>,
std::equal_to<int>, std::allocator<int> > const&) */
void __thiscall
server_response::remove_waiting_task_ids(server_response *this,unordered_set *param_1)
{
int8 uVar1;
unordered_set *puVar2;
server_response *local_40;
int1 local_38;
local_40 = this + 0x50;
local_38 = 0;
std::unique_lock<std::mutex>::lock((unique_lock<std::mutex> *)&local_40);
local_38 = 1;
puVar2 = param_1 + 0x10;
while (puVar2 = *(unordered_set **)puVar2, puVar2 != (unordered_set *)0x0) {
if (0 < common_log_verbosity_thold) {
/* try { // try from 001867dd to 00186811 has its CatchHandler @ 0018682d */
uVar1 = common_log_main();
common_log_add(uVar1,1,
"srv %12.*s: remove task %d from waiting list. current waiting = %d (before remove)\n"
,0xc,"remove_waiting_task_ids",*(int4 *)(puVar2 + 8),
*(int4 *)(this + 0x18));
}
std::
_Hashtable<int,int,std::allocator<int>,std::__detail::_Identity,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,true,true>>
::_M_erase(this,puVar2 + 8);
}
std::unique_lock<std::mutex>::~unique_lock((unique_lock<std::mutex> *)&local_40);
return;
}
|
|
57,504
|
testing::internal::JsonUnitTestResultPrinter::EscapeJson(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
AlayaLite/build_O3/_deps/googletest-src/googletest/src/gtest.cc
|
std::string JsonUnitTestResultPrinter::EscapeJson(const std::string& str) {
Message m;
for (size_t i = 0; i < str.size(); ++i) {
const char ch = str[i];
switch (ch) {
case '\\':
case '"':
case '/':
m << '\\' << ch;
break;
case '\b':
m << "\\b";
break;
case '\t':
m << "\\t";
break;
case '\n':
m << "\\n";
break;
case '\f':
m << "\\f";
break;
case '\r':
m << "\\r";
break;
default:
if (ch < ' ') {
m << "\\u00" << String::FormatByte(static_cast<unsigned char>(ch));
} else {
m << ch;
}
break;
}
}
return m.GetString();
}
|
O3
|
cpp
|
testing::internal::JsonUnitTestResultPrinter::EscapeJson(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, 0x30(%rsp)
leaq 0x8(%rsp), %rdi
callq 0x5e3fe
cmpq $0x0, 0x8(%r14)
je 0x6a9b5
xorl %ebp, %ebp
leaq 0x10(%rsp), %r15
leaq 0x1a7e3(%rip), %rbx # 0x85060
movq (%r14), %rax
movb (%rax,%rbp), %r12b
movzbl %r12b, %r13d
leal -0x8(%r13), %eax
cmpl $0x5, %eax
ja 0x6a8ad
movslq (%rbx,%rax,4), %rax
addq %rbx, %rax
leaq 0x1cfed(%rip), %rsi # 0x8788c
jmpq *%rax
leaq 0x1cfe7(%rip), %rsi # 0x8788f
jmp 0x6a97f
leal -0x22(%r13), %eax
cmpl $0x3a, %eax
ja 0x6a901
movabsq $0x400000000002001, %rcx # imm = 0x400000000002001
btq %rax, %rcx
jae 0x6a901
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
movb $0x5c, 0x10(%rsp)
movl $0x1, %edx
movq %r15, %rsi
callq 0x11b90
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
movb %r12b, 0x10(%rsp)
movl $0x1, %edx
movq %r15, %rsi
callq 0x11b90
jmp 0x6a992
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
cmpb $0x1f, %r12b
jg 0x6a9a1
movl $0x4, %edx
leaq 0x1cf7b(%rip), %rsi # 0x8789b
callq 0x11b90
movq %r15, %rdi
movl %r13d, %esi
callq 0x610e6
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
callq 0x11b90
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x6a992
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x11120
jmp 0x6a992
leaq 0x1cf28(%rip), %rsi # 0x87895
jmp 0x6a97f
leaq 0x1cf22(%rip), %rsi # 0x87898
jmp 0x6a97f
leaq 0x1cf13(%rip), %rsi # 0x87892
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
movl $0x2, %edx
callq 0x11b90
incq %rbp
cmpq 0x8(%r14), %rbp
jb 0x6a87d
jmp 0x6a9b5
movb %r12b, 0x10(%rsp)
movl $0x1, %edx
movq %r15, %rsi
callq 0x11b90
jmp 0x6a992
movq 0x8(%rsp), %rsi
movq 0x30(%rsp), %rbx
movq %rbx, %rdi
callq 0x5e655
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x6a9d7
movq (%rdi), %rax
callq *0x8(%rax)
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6aa10
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x6aa13
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x11120
jmp 0x6aa13
jmp 0x6aa10
jmp 0x6aa10
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x6aa23
movq (%rdi), %rax
callq *0x8(%rax)
movq %rbx, %rdi
callq 0x11760
nop
|
_ZN7testing8internal25JsonUnitTestResultPrinter10EscapeJsonERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r14, rsi
mov [rsp+68h+var_38], rdi
lea rdi, [rsp+68h+var_60]; this
call _ZN7testing7MessageC2Ev; testing::Message::Message(void)
cmp qword ptr [r14+8], 0
jz loc_6A9B5
xor ebp, ebp
lea r15, [rsp+68h+var_58]
lea rbx, jpt_6A89F
loc_6A87D:
mov rax, [r14]
mov r12b, [rax+rbp]
movzx r13d, r12b
lea eax, [r13-8]; switch 6 cases
cmp eax, 5
ja short def_6A89F; jumptable 000000000006A89F default case
movsxd rax, ds:(jpt_6A89F - 85060h)[rbx+rax*4]
add rax, rbx
lea rsi, aB; "\\b"
jmp rax; switch jump
loc_6A8A1:
lea rsi, aT; jumptable 000000000006A89F case 9
jmp loc_6A97F; jumptable 000000000006A89F case 8
def_6A89F:
lea eax, [r13-22h]; jumptable 000000000006A89F default case
cmp eax, 3Ah ; ':'
ja short loc_6A901; jumptable 000000000006A89F case 11
mov rcx, 400000000002001h
bt rcx, rax
jnb short loc_6A901; jumptable 000000000006A89F case 11
mov rdi, [rsp+68h+var_60]
add rdi, 10h
mov byte ptr [rsp+68h+var_58], 5Ch ; '\'
mov edx, 1
mov rsi, r15
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, [rsp+68h+var_60]
add rdi, 10h
mov byte ptr [rsp+68h+var_58], r12b
mov edx, 1
mov rsi, r15
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
jmp loc_6A992
loc_6A901:
mov rdi, [rsp+68h+var_60]; jumptable 000000000006A89F case 11
add rdi, 10h
cmp r12b, 1Fh
jg loc_6A9A1
mov edx, 4
lea rsi, aU00; "\\u00"
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, r15
mov esi, r13d
call _ZN7testing8internal6String10FormatByteB5cxx11Eh; testing::internal::String::FormatByte(uchar)
mov rdi, [rsp+68h+var_60]
add rdi, 10h
mov rsi, [rsp+68h+var_58]
mov rdx, [rsp+68h+var_50]
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, [rsp+68h+var_58]; void *
lea rax, [rsp+68h+var_48]
cmp rdi, rax
jz short loc_6A992
mov rsi, [rsp+68h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_6A992
loc_6A966:
lea rsi, asc_87895; jumptable 000000000006A89F case 12
jmp short loc_6A97F; jumptable 000000000006A89F case 8
loc_6A96F:
lea rsi, aR; jumptable 000000000006A89F case 13
jmp short loc_6A97F; jumptable 000000000006A89F case 8
loc_6A978:
lea rsi, aN; jumptable 000000000006A89F case 10
loc_6A97F:
mov rdi, [rsp+68h+var_60]; jumptable 000000000006A89F case 8
add rdi, 10h
mov edx, 2
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
loc_6A992:
inc rbp
cmp rbp, [r14+8]
jb loc_6A87D
jmp short loc_6A9B5
loc_6A9A1:
mov byte ptr [rsp+68h+var_58], r12b
mov edx, 1
mov rsi, r15
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
jmp short loc_6A992
loc_6A9B5:
mov rsi, [rsp+68h+var_60]
mov rbx, [rsp+68h+var_38]
mov rdi, rbx
call _ZN7testing8internal20StringStreamToStringEPNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE; testing::internal::StringStreamToString(std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>> *)
mov rdi, [rsp+68h+var_60]
test rdi, rdi
jz short loc_6A9D7
mov rax, [rdi]
call qword ptr [rax+8]
loc_6A9D7:
mov rax, rbx
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_6AA10
mov rbx, rax
mov rdi, [rsp+arg_8]; void *
lea rax, [rsp+arg_18]
cmp rdi, rax
jz short loc_6AA13
mov rsi, [rsp+arg_18]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_6AA13
jmp short loc_6AA10
jmp short $+2
loc_6AA10:
mov rbx, rax
loc_6AA13:
mov rdi, [rsp+arg_0]
test rdi, rdi
jz short loc_6AA23
mov rax, [rdi]
call qword ptr [rax+8]
loc_6AA23:
mov rdi, rbx
call __Unwind_Resume
|
long long testing::internal::JsonUnitTestResultPrinter::EscapeJson(long long a1, _QWORD *a2)
{
unsigned long long v3; // rbp
unsigned __int8 v4; // r12
const char *v5; // rsi
unsigned long long v6; // rax
long long v7; // rcx
long long v8; // rdi
long long v9; // rbx
long long v11; // [rsp+8h] [rbp-60h] BYREF
void *v12[2]; // [rsp+10h] [rbp-58h] BYREF
long long v13; // [rsp+20h] [rbp-48h] BYREF
long long v14; // [rsp+30h] [rbp-38h]
v14 = a1;
testing::Message::Message((testing::Message *)&v11);
if ( a2[1] )
{
v3 = 0LL;
do
{
v4 = *(_BYTE *)(*a2 + v3);
v5 = "\\b";
switch ( v4 )
{
case 8u:
goto LABEL_14;
case 9u:
v5 = "\\t";
goto LABEL_14;
case 0xAu:
v5 = "\\n";
goto LABEL_14;
case 0xBu:
goto LABEL_8;
case 0xCu:
v5 = "\\f";
goto LABEL_14;
case 0xDu:
v5 = "\\r";
LABEL_14:
std::__ostream_insert<char,std::char_traits<char>>(v11 + 16, v5, 2LL);
break;
default:
v6 = (unsigned int)v4 - 34;
if ( (unsigned int)v6 <= 0x3A && (v7 = 0x400000000002001LL, _bittest64(&v7, v6)) )
{
LOBYTE(v12[0]) = 92;
std::__ostream_insert<char,std::char_traits<char>>(v11 + 16, v12, 1LL);
LOBYTE(v12[0]) = v4;
std::__ostream_insert<char,std::char_traits<char>>(v11 + 16, v12, 1LL);
}
else
{
LABEL_8:
v8 = v11 + 16;
if ( (char)v4 > 31 )
{
LOBYTE(v12[0]) = *(_BYTE *)(*a2 + v3);
std::__ostream_insert<char,std::char_traits<char>>(v8, v12, 1LL);
}
else
{
std::__ostream_insert<char,std::char_traits<char>>(v8, "\\u00", 4LL);
testing::internal::String::FormatByte[abi:cxx11]((long long)v12, v4);
std::__ostream_insert<char,std::char_traits<char>>(v11 + 16, v12[0], v12[1]);
if ( v12[0] != &v13 )
operator delete(v12[0], v13 + 1);
}
}
break;
}
++v3;
}
while ( v3 < a2[1] );
}
v9 = v14;
testing::internal::StringStreamToString(v14, v11);
if ( v11 )
(*(void ( **)(long long))(*(_QWORD *)v11 + 8LL))(v11);
return v9;
}
|
EscapeJson:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R14,RSI
MOV qword ptr [RSP + 0x30],RDI
LEA RDI,[RSP + 0x8]
CALL 0x0015e3fe
CMP qword ptr [R14 + 0x8],0x0
JZ 0x0016a9b5
XOR EBP,EBP
LEA R15,[RSP + 0x10]
LEA RBX,[0x185060]
LAB_0016a87d:
MOV RAX,qword ptr [R14]
MOV R12B,byte ptr [RAX + RBP*0x1]
MOVZX R13D,R12B
LEA EAX,[R13 + -0x8]
CMP EAX,0x5
JA 0x0016a8ad
MOVSXD RAX,dword ptr [RBX + RAX*0x4]
ADD RAX,RBX
LEA RSI,[0x18788c]
switchD:
JMP RAX
caseD_9:
LEA RSI,[0x18788f]
JMP 0x0016a97f
default:
LEA EAX,[R13 + -0x22]
CMP EAX,0x3a
JA 0x0016a901
MOV RCX,0x400000000002001
BT RCX,RAX
JNC 0x0016a901
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x10
MOV byte ptr [RSP + 0x10],0x5c
LAB_0016a8d4:
MOV EDX,0x1
MOV RSI,R15
CALL 0x00111b90
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x10
MOV byte ptr [RSP + 0x10],R12B
MOV EDX,0x1
MOV RSI,R15
CALL 0x00111b90
JMP 0x0016a992
caseD_b:
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x10
CMP R12B,0x1f
JG 0x0016a9a1
LAB_0016a914:
MOV EDX,0x4
LEA RSI,[0x18789b]
CALL 0x00111b90
LAB_0016a925:
MOV RDI,R15
MOV ESI,R13D
CALL 0x001610e6
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x10
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x18]
LAB_0016a943:
CALL 0x00111b90
MOV RDI,qword ptr [RSP + 0x10]
LEA RAX,[RSP + 0x20]
CMP RDI,RAX
JZ 0x0016a992
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x00111120
JMP 0x0016a992
caseD_c:
LEA RSI,[0x187895]
JMP 0x0016a97f
caseD_d:
LEA RSI,[0x187898]
JMP 0x0016a97f
caseD_a:
LEA RSI,[0x187892]
caseD_8:
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x10
LAB_0016a988:
MOV EDX,0x2
CALL 0x00111b90
LAB_0016a992:
INC RBP
CMP RBP,qword ptr [R14 + 0x8]
JC 0x0016a87d
JMP 0x0016a9b5
LAB_0016a9a1:
MOV byte ptr [RSP + 0x10],R12B
MOV EDX,0x1
MOV RSI,R15
CALL 0x00111b90
JMP 0x0016a992
LAB_0016a9b5:
MOV RSI,qword ptr [RSP + 0x8]
LAB_0016a9ba:
MOV RBX,qword ptr [RSP + 0x30]
MOV RDI,RBX
CALL 0x0015e655
LAB_0016a9c7:
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x0016a9d7
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x8]
LAB_0016a9d7:
MOV RAX,RBX
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* testing::internal::JsonUnitTestResultPrinter::EscapeJson(std::__cxx11::string const&) */
stringstream * __thiscall
testing::internal::JsonUnitTestResultPrinter::EscapeJson
(JsonUnitTestResultPrinter *this,string *param_1)
{
byte bVar1;
JsonUnitTestResultPrinter *pJVar2;
ulong uVar3;
char *pcVar4;
long *local_60;
byte local_58;
int7 uStack_57;
long local_50;
long local_48 [2];
JsonUnitTestResultPrinter *local_38;
local_38 = this;
Message::Message((Message *)&local_60);
if (*(long *)(param_1 + 8) != 0) {
uVar3 = 0;
do {
bVar1 = *(byte *)(*(long *)param_1 + uVar3);
pcVar4 = "\\b";
switch(bVar1) {
case 8:
break;
case 9:
pcVar4 = "\\t";
break;
case 10:
pcVar4 = "\\n";
break;
case 0xb:
switchD_0016a89f_caseD_b:
if ((char)bVar1 < ' ') {
/* try { // try from 0016a914 to 0016a924 has its CatchHandler @ 0016aa10 */
std::__ostream_insert<char,std::char_traits<char>>((ostream *)(local_60 + 2),"\\u00",4);
/* try { // try from 0016a925 to 0016a92f has its CatchHandler @ 0016aa0c */
String::FormatByte_abi_cxx11_((uchar)&local_58);
/* try { // try from 0016a943 to 0016a947 has its CatchHandler @ 0016a9eb */
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)(local_60 + 2),(char *)CONCAT71(uStack_57,local_58),local_50);
if ((long *)CONCAT71(uStack_57,local_58) != local_48) {
operator_delete((long *)CONCAT71(uStack_57,local_58),local_48[0] + 1);
}
}
else {
local_58 = bVar1;
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)(local_60 + 2),(char *)&local_58,1);
}
goto LAB_0016a992;
case 0xc:
pcVar4 = "\\f";
break;
case 0xd:
pcVar4 = "\\r";
break;
default:
if ((0x3a < bVar1 - 0x22) ||
((0x400000000002001U >> ((ulong)(bVar1 - 0x22) & 0x3f) & 1) == 0))
goto switchD_0016a89f_caseD_b;
local_58 = 0x5c;
/* try { // try from 0016a8d4 to 0016a8fb has its CatchHandler @ 0016aa0e */
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)(local_60 + 2),(char *)&local_58,1);
local_58 = bVar1;
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)(local_60 + 2),(char *)&local_58,1);
goto LAB_0016a992;
}
/* try { // try from 0016a988 to 0016a9b2 has its CatchHandler @ 0016aa10 */
std::__ostream_insert<char,std::char_traits<char>>((ostream *)(local_60 + 2),pcVar4,2);
LAB_0016a992:
uVar3 = uVar3 + 1;
} while (uVar3 < *(ulong *)(param_1 + 8));
}
pJVar2 = local_38;
/* try { // try from 0016a9ba to 0016a9c6 has its CatchHandler @ 0016a9e9 */
StringStreamToString((stringstream *)local_38);
if (local_60 != (long *)0x0) {
(**(code **)(*local_60 + 8))();
}
return (stringstream *)pJVar2;
}
|
|
57,505
|
common_detokenize[abi:cxx11](llama_vocab const*, std::vector<int, std::allocator<int>> const&, bool)
|
monkey531[P]llama/common/common.cpp
|
std::string common_detokenize(const struct llama_vocab * vocab, const std::vector<llama_token> & tokens, bool special) {
std::string text;
text.resize(std::max(text.capacity(), tokens.size()));
int32_t n_chars = llama_detokenize(vocab, tokens.data(), (int32_t)tokens.size(), &text[0], (int32_t)text.size(), false, special);
if (n_chars < 0) {
text.resize(-n_chars);
n_chars = llama_detokenize(vocab, tokens.data(), (int32_t)tokens.size(), &text[0], (int32_t)text.size(), false, special);
GGML_ASSERT(n_chars <= (int32_t)text.size()); // whitespace trimming is performed after per-token detokenization
}
text.resize(n_chars);
// NOTE: the original tokenizer decodes bytes after collecting the pieces.
return text;
}
|
O1
|
cpp
|
common_detokenize[abi:cxx11](llama_vocab const*, std::vector<int, std::allocator<int>> const&, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %ecx, %ebp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %r12
movq %r12, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq 0x8(%rdx), %rax
subq (%rdx), %rax
sarq $0x2, %rax
cmpq $0x10, %rax
movl $0xf, %esi
cmovaeq %rax, %rsi
xorl %edx, %edx
callq 0x181c0
movq (%r15), %rsi
movq 0x8(%r15), %rdx
subq %rsi, %rdx
shrq $0x2, %rdx
movq (%rbx), %rcx
movl 0x8(%rbx), %r8d
movzbl %bpl, %ebp
movl %ebp, (%rsp)
movq %r14, %rdi
xorl %r9d, %r9d
callq 0x180c0
testl %eax, %eax
jns 0x23290
negl %eax
movq %rbx, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x181c0
movq (%r15), %rsi
movq 0x8(%r15), %rdx
subq %rsi, %rdx
shrq $0x2, %rdx
movq (%rbx), %rcx
movl 0x8(%rbx), %r8d
movl %ebp, (%rsp)
movq %r14, %rdi
xorl %r9d, %r9d
callq 0x180c0
cmpl 0x8(%rbx), %eax
jg 0x232ad
movslq %eax, %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x181c0
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x88c81(%rip), %rdi # 0xabf35
leaq 0x88cc6(%rip), %rdx # 0xabf81
leaq 0x8933d(%rip), %rcx # 0xac5ff
movl $0x6e2, %esi # imm = 0x6E2
xorl %eax, %eax
callq 0x18af0
jmp 0x232d0
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0x232e7
movq (%r12), %rsi
incq %rsi
callq 0x186a0
movq %r14, %rdi
callq 0x18bc0
|
_Z17common_detokenizeB5cxx11PK11llama_vocabRKSt6vectorIiSaIiEEb:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 10h
mov ebp, ecx
mov r15, rdx
mov r14, rsi
mov rbx, rdi
lea r12, [rdi+10h]
mov [rdi], r12
mov qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
mov rax, [rdx+8]
sub rax, [rdx]
sar rax, 2
cmp rax, 10h
mov esi, 0Fh
cmovnb rsi, rax
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEmc; std::string::resize(ulong,char)
mov rsi, [r15]
mov rdx, [r15+8]
sub rdx, rsi
shr rdx, 2
mov rcx, [rbx]
mov r8d, [rbx+8]
movzx ebp, bpl
mov [rsp+38h+var_38], ebp
mov rdi, r14
xor r9d, r9d
call _llama_detokenize
test eax, eax
jns short loc_23290
neg eax
mov rdi, rbx
mov rsi, rax
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEmc; std::string::resize(ulong,char)
mov rsi, [r15]
mov rdx, [r15+8]
sub rdx, rsi
shr rdx, 2
mov rcx, [rbx]
mov r8d, [rbx+8]
mov [rsp+38h+var_38], ebp
mov rdi, r14
xor r9d, r9d
call _llama_detokenize
cmp eax, [rbx+8]
jg short loc_232AD
loc_23290:
movsxd rsi, eax
mov rdi, rbx
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEmc; std::string::resize(ulong,char)
mov rax, rbx
add rsp, 10h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_232AD:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aNCharsInt32TTe; "n_chars <= (int32_t)text.size()"
mov esi, 6E2h
xor eax, eax
call _ggml_abort
jmp short $+2
loc_232D0:
mov r14, rax
mov rdi, [rbx]; void *
cmp rdi, r12
jz short loc_232E7
mov rsi, [r12]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_232E7:
mov rdi, r14
call __Unwind_Resume
|
_QWORD * common_detokenize[abi:cxx11](_QWORD *a1, long long a2, _QWORD *a3, unsigned __int8 a4)
{
_QWORD *v7; // r12
long long v8; // rsi
int v9; // eax
long long v11; // r14
v7 = a1 + 2;
*a1 = a1 + 2;
a1[1] = 0LL;
*((_BYTE *)a1 + 16) = 0;
v8 = 15LL;
if ( (unsigned long long)((long long)(a3[1] - *a3) >> 2) >= 0x10 )
v8 = (long long)(a3[1] - *a3) >> 2;
std::string::resize(a1, v8, 0LL);
v9 = llama_detokenize(a2, *a3, (a3[1] - *a3) >> 2, *a1, *((unsigned int *)a1 + 2), 0LL, a4);
if ( v9 < 0 )
{
std::string::resize(a1, (unsigned int)-v9, 0LL);
v9 = llama_detokenize(a2, *a3, (a3[1] - *a3) >> 2, *a1, *((unsigned int *)a1 + 2), 0LL, a4);
if ( v9 > *((_DWORD *)a1 + 2) )
{
v11 = ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",
1762LL,
"GGML_ASSERT(%s) failed",
"n_chars <= (int32_t)text.size()");
if ( (_QWORD *)*a1 != v7 )
operator delete((void *)*a1, *v7 + 1LL);
_Unwind_Resume(v11);
}
}
std::string::resize(a1, v9, 0LL);
return a1;
}
|
common_detokenize[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV EBP,ECX
MOV R15,RDX
MOV R14,RSI
MOV RBX,RDI
LEA R12,[RDI + 0x10]
MOV qword ptr [RDI],R12
MOV qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
MOV RAX,qword ptr [RDX + 0x8]
SUB RAX,qword ptr [RDX]
SAR RAX,0x2
CMP RAX,0x10
MOV ESI,0xf
CMOVNC RSI,RAX
LAB_00123227:
XOR EDX,EDX
CALL 0x001181c0
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
SUB RDX,RSI
SHR RDX,0x2
MOV RCX,qword ptr [RBX]
MOV R8D,dword ptr [RBX + 0x8]
LAB_00123243:
MOVZX EBP,BPL
MOV dword ptr [RSP],EBP
MOV RDI,R14
XOR R9D,R9D
CALL 0x001180c0
TEST EAX,EAX
JNS 0x00123290
NEG EAX
MOV RDI,RBX
MOV RSI,RAX
XOR EDX,EDX
CALL 0x001181c0
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
SUB RDX,RSI
SHR RDX,0x2
MOV RCX,qword ptr [RBX]
MOV R8D,dword ptr [RBX + 0x8]
MOV dword ptr [RSP],EBP
MOV RDI,R14
XOR R9D,R9D
CALL 0x001180c0
CMP EAX,dword ptr [RBX + 0x8]
JG 0x001232ad
LAB_00123290:
MOVSXD RSI,EAX
MOV RDI,RBX
XOR EDX,EDX
CALL 0x001181c0
MOV RAX,RBX
ADD RSP,0x10
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001232ad:
LEA RDI,[0x1abf35]
LEA RDX,[0x1abf81]
LEA RCX,[0x1ac5ff]
MOV ESI,0x6e2
XOR EAX,EAX
CALL 0x00118af0
|
/* common_detokenize[abi:cxx11](llama_vocab const*, std::vector<int, std::allocator<int> > const&,
bool) */
llama_vocab * common_detokenize_abi_cxx11_(llama_vocab *param_1,vector *param_2,bool param_3)
{
int iVar1;
ulong uVar2;
int1 in_CL;
int7 in_register_00000011;
long *plVar3;
ulong uVar4;
plVar3 = (long *)CONCAT71(in_register_00000011,param_3);
*(llama_vocab **)param_1 = param_1 + 0x10;
*(int8 *)(param_1 + 8) = 0;
param_1[0x10] = (llama_vocab)0x0;
uVar2 = plVar3[1] - *plVar3 >> 2;
uVar4 = 0xf;
if (0xf < uVar2) {
uVar4 = uVar2;
}
/* try { // try from 00123227 to 0012322d has its CatchHandler @ 001232ce */
std::__cxx11::string::resize((ulong)param_1,(char)uVar4);
/* try { // try from 00123243 to 001232cd has its CatchHandler @ 001232d0 */
iVar1 = llama_detokenize(param_2,*plVar3,(ulong)(plVar3[1] - *plVar3) >> 2,*(int8 *)param_1,
*(int4 *)(param_1 + 8),0,in_CL);
if (iVar1 < 0) {
std::__cxx11::string::resize((ulong)param_1,-(char)iVar1);
iVar1 = llama_detokenize(param_2,*plVar3,(ulong)(plVar3[1] - *plVar3) >> 2,
*(int8 *)param_1,*(int4 *)(param_1 + 8),0,in_CL);
if (*(int *)(param_1 + 8) < iVar1) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",0x6e2
,"GGML_ASSERT(%s) failed","n_chars <= (int32_t)text.size()");
}
}
std::__cxx11::string::resize((ulong)param_1,(char)iVar1);
return param_1;
}
|
|
57,506
|
simple_cs_is_full
|
eloqsql/mysys/charset.c
|
static my_bool simple_cs_is_full(CHARSET_INFO *cs)
{
return cs->number && cs->cs_name.str && cs->coll_name.str &&
simple_8bit_charset_data_is_full(cs) &&
(simple_8bit_collation_data_is_full(cs) || cs->tailoring);
}
|
O3
|
c
|
simple_cs_is_full:
pushq %rbp
movq %rsp, %rbp
cmpl $0x0, (%rdi)
je 0xa63bf
cmpq $0x0, 0x10(%rdi)
je 0xa63bf
cmpq $0x0, 0x20(%rdi)
je 0xa63bf
cmpq $0x0, 0x40(%rdi)
je 0xa63bf
cmpq $0x0, 0x50(%rdi)
je 0xa63bf
cmpq $0x0, 0x48(%rdi)
je 0xa63bf
cmpq $0x0, 0x68(%rdi)
je 0xa63bf
movb $0x1, %al
cmpq $0x0, 0x58(%rdi)
jne 0xa63c1
testb $0x10, 0xc(%rdi)
jne 0xa63c1
cmpq $0x0, 0x38(%rdi)
setne %al
jmp 0xa63c1
xorl %eax, %eax
popq %rbp
retq
|
simple_cs_is_full:
push rbp
mov rbp, rsp
cmp dword ptr [rdi], 0
jz short loc_A63BF
cmp qword ptr [rdi+10h], 0
jz short loc_A63BF
cmp qword ptr [rdi+20h], 0
jz short loc_A63BF
cmp qword ptr [rdi+40h], 0
jz short loc_A63BF
cmp qword ptr [rdi+50h], 0
jz short loc_A63BF
cmp qword ptr [rdi+48h], 0
jz short loc_A63BF
cmp qword ptr [rdi+68h], 0
jz short loc_A63BF
mov al, 1
cmp qword ptr [rdi+58h], 0
jnz short loc_A63C1
test byte ptr [rdi+0Ch], 10h
jnz short loc_A63C1
cmp qword ptr [rdi+38h], 0
setnz al
jmp short loc_A63C1
loc_A63BF:
xor eax, eax
loc_A63C1:
pop rbp
retn
|
bool simple_cs_is_full(long long a1)
{
bool result; // al
if ( !*(_DWORD *)a1
|| !*(_QWORD *)(a1 + 16)
|| !*(_QWORD *)(a1 + 32)
|| !*(_QWORD *)(a1 + 64)
|| !*(_QWORD *)(a1 + 80)
|| !*(_QWORD *)(a1 + 72)
|| !*(_QWORD *)(a1 + 104) )
{
return 0;
}
result = 1;
if ( !*(_QWORD *)(a1 + 88) && (*(_BYTE *)(a1 + 12) & 0x10) == 0 )
return *(_QWORD *)(a1 + 56) != 0LL;
return result;
}
|
simple_cs_is_full:
PUSH RBP
MOV RBP,RSP
CMP dword ptr [RDI],0x0
JZ 0x001a63bf
CMP qword ptr [RDI + 0x10],0x0
JZ 0x001a63bf
CMP qword ptr [RDI + 0x20],0x0
JZ 0x001a63bf
CMP qword ptr [RDI + 0x40],0x0
JZ 0x001a63bf
CMP qword ptr [RDI + 0x50],0x0
JZ 0x001a63bf
CMP qword ptr [RDI + 0x48],0x0
JZ 0x001a63bf
CMP qword ptr [RDI + 0x68],0x0
JZ 0x001a63bf
MOV AL,0x1
CMP qword ptr [RDI + 0x58],0x0
JNZ 0x001a63c1
TEST byte ptr [RDI + 0xc],0x10
JNZ 0x001a63c1
CMP qword ptr [RDI + 0x38],0x0
SETNZ AL
JMP 0x001a63c1
LAB_001a63bf:
XOR EAX,EAX
LAB_001a63c1:
POP RBP
RET
|
bool simple_cs_is_full(int *param_1)
{
bool bVar1;
if (((((*param_1 == 0) || (*(long *)(param_1 + 4) == 0)) || (*(long *)(param_1 + 8) == 0)) ||
((*(long *)(param_1 + 0x10) == 0 || (*(long *)(param_1 + 0x14) == 0)))) ||
((*(long *)(param_1 + 0x12) == 0 || (*(long *)(param_1 + 0x1a) == 0)))) {
bVar1 = false;
}
else {
bVar1 = true;
if ((*(long *)(param_1 + 0x16) == 0) && ((*(byte *)(param_1 + 3) & 0x10) == 0)) {
bVar1 = *(long *)(param_1 + 0xe) != 0;
}
}
return bVar1;
}
|
|
57,507
|
reinit_queue
|
eloqsql/mysys/queues.c
|
int reinit_queue(QUEUE *queue, uint max_elements, uint offset_to_key,
my_bool max_at_top, int (*compare) (void *, uchar *, uchar *),
void *first_cmp_arg, uint offset_to_queue_pos,
uint auto_extent)
{
DBUG_ENTER("reinit_queue");
queue->elements= 0;
queue->compare= compare;
queue->first_cmp_arg= first_cmp_arg;
queue->offset_to_key= offset_to_key;
queue->offset_to_queue_pos= offset_to_queue_pos;
queue->auto_extent= auto_extent;
queue_set_max_at_top(queue, max_at_top);
DBUG_RETURN(resize_queue(queue, max_elements));
}
|
O3
|
c
|
reinit_queue:
pushq %rbp
movq %rsp, %rbp
movl 0x18(%rbp), %eax
movl 0x10(%rbp), %r10d
movl $0x0, 0x10(%rdi)
movq %r8, 0x28(%rdi)
movq %r9, 0x8(%rdi)
movl %edx, 0x18(%rdi)
movl %r10d, 0x1c(%rdi)
movl %eax, 0x20(%rdi)
xorl %eax, %eax
negb %cl
sbbl %eax, %eax
orl $0x1, %eax
movl %eax, 0x24(%rdi)
popq %rbp
jmp 0xa93d1
|
reinit_queue:
push rbp
mov rbp, rsp
mov eax, [rbp+arg_8]
mov r10d, [rbp+arg_0]
mov dword ptr [rdi+10h], 0
mov [rdi+28h], r8
mov [rdi+8], r9
mov [rdi+18h], edx
mov [rdi+1Ch], r10d
mov [rdi+20h], eax
xor eax, eax
neg cl
sbb eax, eax
or eax, 1
mov [rdi+24h], eax
pop rbp
jmp $+5
|
long long reinit_queue(long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, int a7, int a8)
{
*(_DWORD *)(a1 + 16) = 0;
*(_QWORD *)(a1 + 40) = a5;
*(_QWORD *)(a1 + 8) = a6;
*(_DWORD *)(a1 + 24) = a3;
*(_DWORD *)(a1 + 28) = a7;
*(_DWORD *)(a1 + 32) = a8;
LOBYTE(a4) = -(char)a4;
*(_DWORD *)(a1 + 36) = (_BYTE)a4 != 0 ? -1 : 1;
return resize_queue(a1, a2, a3, a4);
}
|
reinit_queue:
PUSH RBP
MOV RBP,RSP
MOV EAX,dword ptr [RBP + 0x18]
MOV R10D,dword ptr [RBP + 0x10]
MOV dword ptr [RDI + 0x10],0x0
MOV qword ptr [RDI + 0x28],R8
MOV qword ptr [RDI + 0x8],R9
MOV dword ptr [RDI + 0x18],EDX
MOV dword ptr [RDI + 0x1c],R10D
MOV dword ptr [RDI + 0x20],EAX
XOR EAX,EAX
NEG CL
SBB EAX,EAX
OR EAX,0x1
MOV dword ptr [RDI + 0x24],EAX
POP RBP
JMP 0x001a93d1
|
void reinit_queue(long param_1,int8 param_2,int4 param_3,char param_4,int8 param_5
,int8 param_6,int4 param_7,int4 param_8)
{
*(int4 *)(param_1 + 0x10) = 0;
*(int8 *)(param_1 + 0x28) = param_5;
*(int8 *)(param_1 + 8) = param_6;
*(int4 *)(param_1 + 0x18) = param_3;
*(int4 *)(param_1 + 0x1c) = param_7;
*(int4 *)(param_1 + 0x20) = param_8;
*(uint *)(param_1 + 0x24) = -(uint)(param_4 != '\0') | 1;
resize_queue();
return;
}
|
|
57,508
|
resize_key_cache
|
eloqsql/mysys/mf_keycache.c
|
int resize_key_cache(KEY_CACHE *keycache, uint key_cache_block_size,
size_t use_mem, uint division_limit, uint age_threshold,
uint changed_blocks_hash_size)
{
int blocks= -1;
if (keycache->key_cache_inited)
{
pthread_mutex_lock(&keycache->op_lock);
if ((uint) keycache->param_partitions != keycache->partitions && use_mem)
blocks= repartition_key_cache_internal(keycache,
key_cache_block_size, use_mem,
division_limit, age_threshold,
changed_blocks_hash_size,
(uint) keycache->param_partitions,
0);
else
{
blocks= keycache->interface_funcs->resize(keycache->keycache_cb,
key_cache_block_size,
use_mem, division_limit,
age_threshold,
changed_blocks_hash_size);
if (keycache->partitions)
keycache->partitions=
((PARTITIONED_KEY_CACHE_CB *)(keycache->keycache_cb))->partitions;
}
keycache->key_cache_mem_size=
keycache->partitions ?
((PARTITIONED_KEY_CACHE_CB *)(keycache->keycache_cb))->key_cache_mem_size :
((SIMPLE_KEY_CACHE_CB *)(keycache->keycache_cb))->key_cache_mem_size;
keycache->can_be_used= (blocks >= 0);
pthread_mutex_unlock(&keycache->op_lock);
}
return blocks;
}
|
O0
|
c
|
resize_key_cache:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
movl %r9d, -0x24(%rbp)
movl $0xffffffff, -0x28(%rbp) # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rax
cmpb $0x0, 0x48(%rax)
je 0xe8c91
movq -0x8(%rbp), %rdi
addq $0x58, %rdi
callq 0x2a220
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq -0x8(%rbp), %rcx
cmpl 0x4c(%rcx), %eax
je 0xe8bee
cmpq $0x0, -0x18(%rbp)
je 0xe8bee
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %ecx
movl -0x20(%rbp), %r8d
movl -0x24(%rbp), %r9d
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
xorl %r10d, %r10d
movl %eax, (%rsp)
movl $0x0, 0x8(%rsp)
callq 0xe8ca0
movl %eax, -0x28(%rbp)
jmp 0xe8c37
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x8(%rcx), %rdi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %ecx
movl -0x20(%rbp), %r8d
movl -0x24(%rbp), %r9d
callq *%rax
movl %eax, -0x28(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x4c(%rax)
je 0xe8c35
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x1c(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x4c(%rax)
jmp 0xe8c37
movq -0x8(%rbp), %rax
cmpl $0x0, 0x4c(%rax)
je 0xe8c53
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0xe8c63
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x50(%rax)
cmpl $0x0, -0x28(%rbp)
setge %al
andb $0x1, %al
movzbl %al, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movb %cl, 0x49(%rax)
movq -0x8(%rbp), %rdi
addq $0x58, %rdi
callq 0x2a1f0
movl -0x28(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
resize_key_cache:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
mov [rbp+var_1C], ecx
mov [rbp+var_20], r8d
mov [rbp+var_24], r9d
mov [rbp+var_28], 0FFFFFFFFh
mov rax, [rbp+var_8]
cmp byte ptr [rax+48h], 0
jz loc_E8C91
mov rdi, [rbp+var_8]
add rdi, 58h ; 'X'
call _pthread_mutex_lock
mov rax, [rbp+var_8]
mov rax, [rax+38h]
mov rcx, [rbp+var_8]
cmp eax, [rcx+4Ch]
jz short loc_E8BEE
cmp [rbp+var_18], 0
jz short loc_E8BEE
mov rdi, [rbp+var_8]
mov esi, [rbp+var_C]
mov rdx, [rbp+var_18]
mov ecx, [rbp+var_1C]
mov r8d, [rbp+var_20]
mov r9d, [rbp+var_24]
mov rax, [rbp+var_8]
mov rax, [rax+38h]
xor r10d, r10d
mov [rsp+40h+var_40], eax
mov [rsp+40h+var_38], 0
call repartition_key_cache_internal
mov [rbp+var_28], eax
jmp short loc_E8C37
loc_E8BEE:
mov rax, [rbp+var_8]
mov rax, [rax+10h]
mov rax, [rax+8]
mov rcx, [rbp+var_8]
mov rdi, [rcx+8]
mov esi, [rbp+var_C]
mov rdx, [rbp+var_18]
mov ecx, [rbp+var_1C]
mov r8d, [rbp+var_20]
mov r9d, [rbp+var_24]
call rax
mov [rbp+var_28], eax
mov rax, [rbp+var_8]
cmp dword ptr [rax+4Ch], 0
jz short loc_E8C35
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov ecx, [rax+1Ch]
mov rax, [rbp+var_8]
mov [rax+4Ch], ecx
loc_E8C35:
jmp short $+2
loc_E8C37:
mov rax, [rbp+var_8]
cmp dword ptr [rax+4Ch], 0
jz short loc_E8C53
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov rax, [rax+10h]
mov [rbp+var_30], rax
jmp short loc_E8C63
loc_E8C53:
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov rax, [rax+8]
mov [rbp+var_30], rax
loc_E8C63:
mov rcx, [rbp+var_30]
mov rax, [rbp+var_8]
mov [rax+50h], rcx
cmp [rbp+var_28], 0
setnl al
and al, 1
movzx eax, al
mov cl, al
mov rax, [rbp+var_8]
mov [rax+49h], cl
mov rdi, [rbp+var_8]
add rdi, 58h ; 'X'
call _pthread_mutex_unlock
loc_E8C91:
mov eax, [rbp+var_28]
add rsp, 40h
pop rbp
retn
|
long long resize_key_cache(
long long a1,
unsigned int a2,
long long a3,
unsigned int a4,
unsigned int a5,
unsigned int a6)
{
long long v7; // [rsp+10h] [rbp-30h]
int v8; // [rsp+18h] [rbp-28h]
v8 = -1;
if ( *(_BYTE *)(a1 + 72) )
{
pthread_mutex_lock(a1 + 88);
if ( (unsigned int)*(_QWORD *)(a1 + 56) == *(_DWORD *)(a1 + 76) || !a3 )
{
v8 = (*(long long ( **)(_QWORD, _QWORD, long long, _QWORD, _QWORD, _QWORD))(*(_QWORD *)(a1 + 16) + 8LL))(
*(_QWORD *)(a1 + 8),
a2,
a3,
a4,
a5,
a6);
if ( *(_DWORD *)(a1 + 76) )
*(_DWORD *)(a1 + 76) = *(_DWORD *)(*(_QWORD *)(a1 + 8) + 28LL);
}
else
{
v8 = repartition_key_cache_internal(a1, a2, a3, a4, a5, a6, *(_QWORD *)(a1 + 56), 0);
}
if ( *(_DWORD *)(a1 + 76) )
v7 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 16LL);
else
v7 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL);
*(_QWORD *)(a1 + 80) = v7;
*(_BYTE *)(a1 + 73) = v8 >= 0;
pthread_mutex_unlock(a1 + 88);
}
return (unsigned int)v8;
}
|
resize_key_cache:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],ECX
MOV dword ptr [RBP + -0x20],R8D
MOV dword ptr [RBP + -0x24],R9D
MOV dword ptr [RBP + -0x28],0xffffffff
MOV RAX,qword ptr [RBP + -0x8]
CMP byte ptr [RAX + 0x48],0x0
JZ 0x001e8c91
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x58
CALL 0x0012a220
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x38]
MOV RCX,qword ptr [RBP + -0x8]
CMP EAX,dword ptr [RCX + 0x4c]
JZ 0x001e8bee
CMP qword ptr [RBP + -0x18],0x0
JZ 0x001e8bee
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0xc]
MOV RDX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0x1c]
MOV R8D,dword ptr [RBP + -0x20]
MOV R9D,dword ptr [RBP + -0x24]
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x38]
XOR R10D,R10D
MOV dword ptr [RSP],EAX
MOV dword ptr [RSP + 0x8],0x0
CALL 0x001e8ca0
MOV dword ptr [RBP + -0x28],EAX
JMP 0x001e8c37
LAB_001e8bee:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RCX + 0x8]
MOV ESI,dword ptr [RBP + -0xc]
MOV RDX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0x1c]
MOV R8D,dword ptr [RBP + -0x20]
MOV R9D,dword ptr [RBP + -0x24]
CALL RAX
MOV dword ptr [RBP + -0x28],EAX
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x4c],0x0
JZ 0x001e8c35
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV ECX,dword ptr [RAX + 0x1c]
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x4c],ECX
LAB_001e8c35:
JMP 0x001e8c37
LAB_001e8c37:
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x4c],0x0
JZ 0x001e8c53
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x30],RAX
JMP 0x001e8c63
LAB_001e8c53:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x30],RAX
LAB_001e8c63:
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x50],RCX
CMP dword ptr [RBP + -0x28],0x0
SETGE AL
AND AL,0x1
MOVZX EAX,AL
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x49],CL
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x58
CALL 0x0012a1f0
LAB_001e8c91:
MOV EAX,dword ptr [RBP + -0x28]
ADD RSP,0x40
POP RBP
RET
|
int resize_key_cache(long param_1,int4 param_2,long param_3,int4 param_4,
int4 param_5,int4 param_6)
{
int8 local_38;
int4 local_30;
local_30 = -1;
if (*(char *)(param_1 + 0x48) != '\0') {
pthread_mutex_lock((pthread_mutex_t *)(param_1 + 0x58));
if (((int)*(int8 *)(param_1 + 0x38) == *(int *)(param_1 + 0x4c)) || (param_3 == 0)) {
local_30 = (**(code **)(*(long *)(param_1 + 0x10) + 8))
(*(int8 *)(param_1 + 8),param_2,param_3,param_4,param_5,param_6);
if (*(int *)(param_1 + 0x4c) != 0) {
*(int4 *)(param_1 + 0x4c) = *(int4 *)(*(long *)(param_1 + 8) + 0x1c);
}
}
else {
local_30 = repartition_key_cache_internal
(param_1,param_2,param_3,param_4,param_5,param_6,
(int)*(int8 *)(param_1 + 0x38),0);
}
if (*(int *)(param_1 + 0x4c) == 0) {
local_38 = *(int8 *)(*(long *)(param_1 + 8) + 8);
}
else {
local_38 = *(int8 *)(*(long *)(param_1 + 8) + 0x10);
}
*(int8 *)(param_1 + 0x50) = local_38;
*(bool *)(param_1 + 0x49) = -1 < local_30;
pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0x58));
}
return local_30;
}
|
|
57,509
|
protocol::encode(protocol::StatusResponse const&, unsigned int)
|
untodesu[P]voxelius/game/shared/protocol.cc
|
ENetPacket *protocol::encode(const protocol::StatusResponse &packet, enet_uint32 flags)
{
write_buffer.reset();
write_buffer.write_UI16(protocol::StatusResponse::ID);
write_buffer.write_UI32(packet.version);
write_buffer.write_UI16(packet.max_players);
write_buffer.write_UI16(packet.num_players);
write_buffer.write_string(packet.motd);
return write_buffer.to_packet(flags);
}
|
O0
|
cpp
|
protocol::encode(protocol::StatusResponse const&, unsigned int):
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
leaq 0x3b156a(%rip), %rdi # 0x510ba0
callq 0x27a920
leaq 0x3b155e(%rip), %rdi # 0x510ba0
movl $0x1, %esi
callq 0x27a970
movq -0x8(%rbp), %rax
movl 0x10(%rax), %esi
leaq 0x3b1546(%rip), %rdi # 0x510ba0
callq 0x27a9e0
movq -0x8(%rbp), %rax
leaq 0x3b1536(%rip), %rdi # 0x510ba0
movzwl 0x14(%rax), %esi
callq 0x27a970
movq -0x8(%rbp), %rax
leaq 0x3b1522(%rip), %rdi # 0x510ba0
movzwl 0x16(%rax), %esi
callq 0x27a970
movq -0x8(%rbp), %rsi
addq $0x18, %rsi
leaq 0x3b150a(%rip), %rdi # 0x510ba0
callq 0x27ac00
movl -0xc(%rbp), %esi
leaq 0x3b14fb(%rip), %rdi # 0x510ba0
callq 0x27ad80
addq $0x10, %rsp
popq %rbp
retq
|
_ZN8protocol6encodeERKNS_14StatusResponseEj:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
lea rdi, _ZL12write_buffer; this
call _ZN11WriteBuffer5resetEv; WriteBuffer::reset(void)
lea rdi, _ZL12write_buffer; this
mov esi, 1; unsigned __int16
call _ZN11WriteBuffer10write_UI16Et; WriteBuffer::write_UI16(ushort)
mov rax, [rbp+var_8]
mov esi, [rax+10h]; unsigned int
lea rdi, _ZL12write_buffer; this
call _ZN11WriteBuffer10write_UI32Ej; WriteBuffer::write_UI32(uint)
mov rax, [rbp+var_8]
lea rdi, _ZL12write_buffer; this
movzx esi, word ptr [rax+14h]; unsigned __int16
call _ZN11WriteBuffer10write_UI16Et; WriteBuffer::write_UI16(ushort)
mov rax, [rbp+var_8]
lea rdi, _ZL12write_buffer; this
movzx esi, word ptr [rax+16h]; unsigned __int16
call _ZN11WriteBuffer10write_UI16Et; WriteBuffer::write_UI16(ushort)
mov rsi, [rbp+var_8]
add rsi, 18h
lea rdi, _ZL12write_buffer; write_buffer
call _ZN11WriteBuffer12write_stringERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; WriteBuffer::write_string(std::string const&)
mov esi, [rbp+var_C]; unsigned int
lea rdi, _ZL12write_buffer; this
call _ZNK11WriteBuffer9to_packetEj; WriteBuffer::to_packet(uint)
add rsp, 10h
pop rbp
retn
|
long long protocol::encode(protocol *this, const protocol::StatusResponse *a2)
{
WriteBuffer::reset((WriteBuffer *)&write_buffer);
WriteBuffer::write_UI16((WriteBuffer *)&write_buffer, 1u);
WriteBuffer::write_UI32((WriteBuffer *)&write_buffer, *((_DWORD *)this + 4));
WriteBuffer::write_UI16((WriteBuffer *)&write_buffer, *((_WORD *)this + 10));
WriteBuffer::write_UI16((WriteBuffer *)&write_buffer, *((_WORD *)this + 11));
WriteBuffer::write_string(&write_buffer, (char *)this + 24);
return WriteBuffer::to_packet((WriteBuffer *)&write_buffer, (unsigned int)a2);
}
|
__invoke<void(*)(protocol::ChatMessage_const&),protocol::ChatMessage&>:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x0015f650
ADD RSP,0x20
POP RBP
RET
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* std::__invoke_result<void (*)(protocol::ChatMessage const&), protocol::ChatMessage&>::type
std::__invoke<void (*)(protocol::ChatMessage const&), protocol::ChatMessage&>(void
(*&&)(protocol::ChatMessage const&), protocol::ChatMessage&) */
void std::__invoke<void(*)(protocol::ChatMessage_const&),protocol::ChatMessage&>
(_func_void_ChatMessage_ptr *param_1,ChatMessage *param_2)
{
__invoke_impl<void,void(*)(protocol::ChatMessage_const&),protocol::ChatMessage&>(param_1,param_2);
return;
}
|
|
57,510
|
ma_tls_set_certs
|
eloqsql/libmariadb/libmariadb/secure/openssl.c
|
static int ma_tls_set_certs(MYSQL *mysql, SSL_CTX *ctx)
{
char *certfile= mysql->options.ssl_cert,
*keyfile= mysql->options.ssl_key;
char *pw= (mysql->options.extension) ?
mysql->options.extension->tls_pw : NULL;
/* add cipher */
if ((mysql->options.ssl_cipher &&
mysql->options.ssl_cipher[0] != 0))
{
if(
#ifdef TLS1_3_VERSION
SSL_CTX_set_ciphersuites(ctx, mysql->options.ssl_cipher) == 0 &&
#endif
SSL_CTX_set_cipher_list(ctx, mysql->options.ssl_cipher) == 0)
goto error;
}
/* ca_file and ca_path */
if (!SSL_CTX_load_verify_locations(ctx,
mysql->options.ssl_ca,
mysql->options.ssl_capath))
{
if (mysql->options.ssl_ca || mysql->options.ssl_capath)
goto error;
if (SSL_CTX_set_default_verify_paths(ctx) == 0)
goto error;
}
if (mysql->options.extension &&
(mysql->options.extension->ssl_crl || mysql->options.extension->ssl_crlpath))
{
X509_STORE *certstore;
if ((certstore= SSL_CTX_get_cert_store(ctx)))
{
if (X509_STORE_load_locations(certstore, mysql->options.extension->ssl_crl,
mysql->options.extension->ssl_crlpath) == 0)
goto error;
if (X509_STORE_set_flags(certstore, X509_V_FLAG_CRL_CHECK | X509_V_FLAG_CRL_CHECK_ALL) == 0)
goto error;
}
}
if (keyfile && !certfile)
certfile= keyfile;
if (certfile && !keyfile)
keyfile= certfile;
/* set cert */
if (certfile && certfile[0] != 0)
{
if (SSL_CTX_use_certificate_chain_file(ctx, certfile) != 1)
{
goto error;
}
}
if (keyfile && keyfile[0])
{
FILE *fp;
if ((fp= fopen(keyfile, "rb")))
{
EVP_PKEY *key= EVP_PKEY_new();
PEM_read_PrivateKey(fp, &key, NULL, pw);
fclose(fp);
if (SSL_CTX_use_PrivateKey(ctx, key) != 1)
{
unsigned long err= ERR_peek_error();
EVP_PKEY_free(key);
if (!(ERR_GET_LIB(err) == ERR_LIB_X509 &&
ERR_GET_REASON(err) == X509_R_CERT_ALREADY_IN_HASH_TABLE))
goto error;
}
EVP_PKEY_free(key);
} else {
my_set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN,
CER(CR_FILE_NOT_FOUND), keyfile);
return 1;
}
}
/* verify key */
if (certfile && SSL_CTX_check_private_key(ctx) != 1)
goto error;
SSL_CTX_set_verify(ctx, (mysql->options.ssl_ca || mysql->options.ssl_capath) ?
SSL_VERIFY_PEER : SSL_VERIFY_NONE, NULL);
return 0;
error:
ma_tls_set_error(mysql);
return 1;
}
|
O0
|
c
|
ma_tls_set_certs:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x408(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x400(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x480(%rax)
je 0x3a094
movq -0x10(%rbp), %rax
movq 0x480(%rax), %rax
movq 0xa0(%rax), %rax
movq %rax, -0x58(%rbp)
jmp 0x3a09c
xorl %eax, %eax
movq %rax, -0x58(%rbp)
jmp 0x3a09c
movq -0x58(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x420(%rax)
je 0x3a0fe
movq -0x10(%rbp), %rax
movq 0x420(%rax), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x3a0fe
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x420(%rax), %rsi
callq 0x13500
cmpl $0x0, %eax
jne 0x3a0fc
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x420(%rax), %rsi
callq 0x13400
cmpl $0x0, %eax
jne 0x3a0fc
jmp 0x3a392
jmp 0x3a0fe
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x410(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x418(%rax), %rdx
callq 0x13550
cmpl $0x0, %eax
jne 0x3a158
movq -0x10(%rbp), %rax
cmpq $0x0, 0x410(%rax)
jne 0x3a13e
movq -0x10(%rbp), %rax
cmpq $0x0, 0x418(%rax)
je 0x3a143
jmp 0x3a392
movq -0x18(%rbp), %rdi
callq 0x134a0
cmpl $0x0, %eax
jne 0x3a156
jmp 0x3a392
jmp 0x3a158
movq -0x10(%rbp), %rax
cmpq $0x0, 0x480(%rax)
je 0x3a1ee
movq -0x10(%rbp), %rax
movq 0x480(%rax), %rax
cmpq $0x0, 0x10(%rax)
jne 0x3a18e
movq -0x10(%rbp), %rax
movq 0x480(%rax), %rax
cmpq $0x0, 0x18(%rax)
je 0x3a1ee
movq -0x18(%rbp), %rdi
callq 0x137d0
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0x3a1ec
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x480(%rax), %rax
movq 0x10(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x480(%rax), %rax
movq 0x18(%rax), %rdx
callq 0x13800
cmpl $0x0, %eax
jne 0x3a1d2
jmp 0x3a392
movq -0x38(%rbp), %rdi
movl $0xc, %esi
callq 0x132f0
cmpl $0x0, %eax
jne 0x3a1ea
jmp 0x3a392
jmp 0x3a1ec
jmp 0x3a1ee
cmpq $0x0, -0x28(%rbp)
je 0x3a204
cmpq $0x0, -0x20(%rbp)
jne 0x3a204
movq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x3a21a
cmpq $0x0, -0x28(%rbp)
jne 0x3a21a
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x3a246
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x3a246
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x13350
cmpl $0x1, %eax
je 0x3a244
jmp 0x3a392
jmp 0x3a246
cmpq $0x0, -0x28(%rbp)
je 0x3a328
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x3a328
movq -0x28(%rbp), %rdi
leaq 0x14d99(%rip), %rsi # 0x4f005
callq 0x134d0
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
je 0x3a2f4
callq 0x13740
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rdi
movq -0x30(%rbp), %rcx
leaq -0x48(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x132e0
movq -0x40(%rbp), %rdi
callq 0x13420
movq -0x18(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x13380
cmpl $0x1, %eax
je 0x3a2e9
callq 0x130c0
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rdi
callq 0x132b0
movq -0x50(%rbp), %rdi
callq 0x3aec0
cmpl $0xb, %eax
jne 0x3a2e2
movq -0x50(%rbp), %rdi
callq 0x3af00
cmpl $0x65, %eax
je 0x3a2e7
jmp 0x3a392
jmp 0x3a2e9
movq -0x48(%rbp), %rdi
callq 0x132b0
jmp 0x3a326
movq -0x10(%rbp), %rdi
leaq 0x28c71(%rip), %rax # 0x62f70
movq (%rax), %rdx
leaq 0x28e77(%rip), %rax # 0x63180
movq 0x20(%rax), %rcx
movq -0x28(%rbp), %r8
movl $0x7ea, %esi # imm = 0x7EA
movb $0x0, %al
callq 0x16c30
movl $0x1, -0x4(%rbp)
jmp 0x3a3a2
jmp 0x3a328
cmpq $0x0, -0x20(%rbp)
je 0x3a33f
movq -0x18(%rbp), %rdi
callq 0x13710
cmpl $0x1, %eax
je 0x3a33f
jmp 0x3a392
movq -0x18(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x10(%rbp), %rcx
movb $0x1, %al
cmpq $0x0, 0x410(%rcx)
movb %al, -0x59(%rbp)
jne 0x3a36c
movq -0x10(%rbp), %rax
cmpq $0x0, 0x418(%rax)
setne %al
movb %al, -0x59(%rbp)
movq -0x68(%rbp), %rdi
movb -0x59(%rbp), %cl
xorl %esi, %esi
movl $0x1, %eax
testb $0x1, %cl
cmovnel %eax, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x13120
movl $0x0, -0x4(%rbp)
jmp 0x3a3a2
movq -0x10(%rbp), %rdi
callq 0x3a5f0
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
ma_tls_set_certs:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
mov rax, [rax+408h]
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov rax, [rax+400h]
mov [rbp+var_28], rax
mov rax, [rbp+var_10]
cmp qword ptr [rax+480h], 0
jz short loc_3A094
mov rax, [rbp+var_10]
mov rax, [rax+480h]
mov rax, [rax+0A0h]
mov [rbp+var_58], rax
jmp short loc_3A09C
loc_3A094:
xor eax, eax
mov [rbp+var_58], rax
jmp short $+2
loc_3A09C:
mov rax, [rbp+var_58]
mov [rbp+var_30], rax
mov rax, [rbp+var_10]
cmp qword ptr [rax+420h], 0
jz short loc_3A0FE
mov rax, [rbp+var_10]
mov rax, [rax+420h]
movsx eax, byte ptr [rax]
cmp eax, 0
jz short loc_3A0FE
mov rdi, [rbp+var_18]
mov rax, [rbp+var_10]
mov rsi, [rax+420h]
call _SSL_CTX_set_ciphersuites
cmp eax, 0
jnz short loc_3A0FC
mov rdi, [rbp+var_18]
mov rax, [rbp+var_10]
mov rsi, [rax+420h]
call _SSL_CTX_set_cipher_list
cmp eax, 0
jnz short loc_3A0FC
jmp loc_3A392
loc_3A0FC:
jmp short $+2
loc_3A0FE:
mov rdi, [rbp+var_18]
mov rax, [rbp+var_10]
mov rsi, [rax+410h]
mov rax, [rbp+var_10]
mov rdx, [rax+418h]
call _SSL_CTX_load_verify_locations
cmp eax, 0
jnz short loc_3A158
mov rax, [rbp+var_10]
cmp qword ptr [rax+410h], 0
jnz short loc_3A13E
mov rax, [rbp+var_10]
cmp qword ptr [rax+418h], 0
jz short loc_3A143
loc_3A13E:
jmp loc_3A392
loc_3A143:
mov rdi, [rbp+var_18]
call _SSL_CTX_set_default_verify_paths
cmp eax, 0
jnz short loc_3A156
jmp loc_3A392
loc_3A156:
jmp short $+2
loc_3A158:
mov rax, [rbp+var_10]
cmp qword ptr [rax+480h], 0
jz loc_3A1EE
mov rax, [rbp+var_10]
mov rax, [rax+480h]
cmp qword ptr [rax+10h], 0
jnz short loc_3A18E
mov rax, [rbp+var_10]
mov rax, [rax+480h]
cmp qword ptr [rax+18h], 0
jz short loc_3A1EE
loc_3A18E:
mov rdi, [rbp+var_18]
call _SSL_CTX_get_cert_store
mov [rbp+var_38], rax
cmp rax, 0
jz short loc_3A1EC
mov rdi, [rbp+var_38]
mov rax, [rbp+var_10]
mov rax, [rax+480h]
mov rsi, [rax+10h]
mov rax, [rbp+var_10]
mov rax, [rax+480h]
mov rdx, [rax+18h]
call _X509_STORE_load_locations
cmp eax, 0
jnz short loc_3A1D2
jmp loc_3A392
loc_3A1D2:
mov rdi, [rbp+var_38]
mov esi, 0Ch
call _X509_STORE_set_flags
cmp eax, 0
jnz short loc_3A1EA
jmp loc_3A392
loc_3A1EA:
jmp short $+2
loc_3A1EC:
jmp short $+2
loc_3A1EE:
cmp [rbp+var_28], 0
jz short loc_3A204
cmp [rbp+var_20], 0
jnz short loc_3A204
mov rax, [rbp+var_28]
mov [rbp+var_20], rax
loc_3A204:
cmp [rbp+var_20], 0
jz short loc_3A21A
cmp [rbp+var_28], 0
jnz short loc_3A21A
mov rax, [rbp+var_20]
mov [rbp+var_28], rax
loc_3A21A:
cmp [rbp+var_20], 0
jz short loc_3A246
mov rax, [rbp+var_20]
movsx eax, byte ptr [rax]
cmp eax, 0
jz short loc_3A246
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
call _SSL_CTX_use_certificate_chain_file
cmp eax, 1
jz short loc_3A244
jmp loc_3A392
loc_3A244:
jmp short $+2
loc_3A246:
cmp [rbp+var_28], 0
jz loc_3A328
mov rax, [rbp+var_28]
movsx eax, byte ptr [rax]
cmp eax, 0
jz loc_3A328
mov rdi, [rbp+var_28]
lea rsi, aRb; "rb"
call _fopen64
mov [rbp+var_40], rax
cmp rax, 0
jz short loc_3A2F4
call _EVP_PKEY_new
mov [rbp+var_48], rax
mov rdi, [rbp+var_40]
mov rcx, [rbp+var_30]
lea rsi, [rbp+var_48]
xor eax, eax
mov edx, eax
call _PEM_read_PrivateKey
mov rdi, [rbp+var_40]
call _fclose
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_48]
call _SSL_CTX_use_PrivateKey
cmp eax, 1
jz short loc_3A2E9
call _ERR_peek_error
mov [rbp+var_50], rax
mov rdi, [rbp+var_48]
call _EVP_PKEY_free
mov rdi, [rbp+var_50]
call ERR_GET_LIB
cmp eax, 0Bh
jnz short loc_3A2E2
mov rdi, [rbp+var_50]
call ERR_GET_REASON
cmp eax, 65h ; 'e'
jz short loc_3A2E7
loc_3A2E2:
jmp loc_3A392
loc_3A2E7:
jmp short $+2
loc_3A2E9:
mov rdi, [rbp+var_48]
call _EVP_PKEY_free
jmp short loc_3A326
loc_3A2F4:
mov rdi, [rbp+var_10]
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
lea rax, mariadb_client_errors
mov rcx, [rax+20h]
mov r8, [rbp+var_28]
mov esi, 7EAh
mov al, 0
call my_set_error
mov [rbp+var_4], 1
jmp short loc_3A3A2
loc_3A326:
jmp short $+2
loc_3A328:
cmp [rbp+var_20], 0
jz short loc_3A33F
mov rdi, [rbp+var_18]
call _SSL_CTX_check_private_key
cmp eax, 1
jz short loc_3A33F
jmp short loc_3A392
loc_3A33F:
mov rax, [rbp+var_18]
mov [rbp+var_68], rax
mov rcx, [rbp+var_10]
mov al, 1
cmp qword ptr [rcx+410h], 0
mov [rbp+var_59], al
jnz short loc_3A36C
mov rax, [rbp+var_10]
cmp qword ptr [rax+418h], 0
setnz al
mov [rbp+var_59], al
loc_3A36C:
mov rdi, [rbp+var_68]
mov cl, [rbp+var_59]
xor esi, esi
mov eax, 1
test cl, 1
cmovnz esi, eax
xor eax, eax
mov edx, eax
call _SSL_CTX_set_verify
mov [rbp+var_4], 0
jmp short loc_3A3A2
loc_3A392:
mov rdi, [rbp+var_10]
call ma_tls_set_error
mov [rbp+var_4], 1
loc_3A3A2:
mov eax, [rbp+var_4]
add rsp, 70h
pop rbp
retn
|
long long ma_tls_set_certs(_QWORD *a1, long long a2)
{
bool v3; // [rsp+17h] [rbp-59h]
long long v4; // [rsp+18h] [rbp-58h]
long long v5; // [rsp+20h] [rbp-50h]
long long v6; // [rsp+28h] [rbp-48h] BYREF
long long v7; // [rsp+30h] [rbp-40h]
long long cert_store; // [rsp+38h] [rbp-38h]
long long v9; // [rsp+40h] [rbp-30h]
_BYTE *v10; // [rsp+48h] [rbp-28h]
_BYTE *v11; // [rsp+50h] [rbp-20h]
long long v12; // [rsp+58h] [rbp-18h]
_QWORD *v13; // [rsp+60h] [rbp-10h]
v13 = a1;
v12 = a2;
v11 = (_BYTE *)a1[129];
v10 = (_BYTE *)a1[128];
if ( a1[144] )
v4 = *(_QWORD *)(v13[144] + 160LL);
else
v4 = 0LL;
v9 = v4;
if ( v13[132]
&& *(_BYTE *)v13[132]
&& !(unsigned int)SSL_CTX_set_ciphersuites(v12, v13[132])
&& !(unsigned int)SSL_CTX_set_cipher_list(v12, v13[132]) )
{
goto LABEL_42;
}
if ( !(unsigned int)SSL_CTX_load_verify_locations(v12, v13[130], v13[131])
&& (v13[130] || v13[131] || !(unsigned int)SSL_CTX_set_default_verify_paths(v12)) )
{
goto LABEL_42;
}
if ( v13[144] && (*(_QWORD *)(v13[144] + 16LL) || *(_QWORD *)(v13[144] + 24LL)) )
{
cert_store = SSL_CTX_get_cert_store(v12);
if ( cert_store )
{
if ( !(unsigned int)X509_STORE_load_locations(
cert_store,
*(_QWORD *)(v13[144] + 16LL),
*(_QWORD *)(v13[144] + 24LL))
|| !(unsigned int)X509_STORE_set_flags(cert_store, 12LL) )
{
goto LABEL_42;
}
}
}
if ( v10 && !v11 )
v11 = v10;
if ( v11 && !v10 )
v10 = v11;
if ( v11 && *v11 && (unsigned int)SSL_CTX_use_certificate_chain_file(v12, v11) != 1 )
goto LABEL_42;
if ( v10 && *v10 )
{
v7 = fopen64(v10, "rb");
if ( !v7 )
{
my_set_error((long long)v13, 0x7EAu, (long long)SQLSTATE_UNKNOWN, (long long)mariadb_client_errors[4], v10);
return 1;
}
v6 = EVP_PKEY_new();
PEM_read_PrivateKey(v7, &v6, 0LL, v9);
fclose(v7);
if ( (unsigned int)SSL_CTX_use_PrivateKey(v12, v6) != 1 )
{
v5 = ERR_peek_error();
EVP_PKEY_free(v6);
if ( (unsigned int)ERR_GET_LIB(v5) != 11 || (unsigned int)ERR_GET_REASON(v5) != 101 )
goto LABEL_42;
}
EVP_PKEY_free(v6);
}
if ( v11 && (unsigned int)SSL_CTX_check_private_key(v12) != 1 )
{
LABEL_42:
ma_tls_set_error(v13);
return 1;
}
v3 = 1;
if ( !v13[130] )
v3 = v13[131] != 0LL;
SSL_CTX_set_verify(v12, v3, 0LL);
return 0;
}
|
ma_tls_set_certs:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x408]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x400]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x480],0x0
JZ 0x0013a094
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0xa0]
MOV qword ptr [RBP + -0x58],RAX
JMP 0x0013a09c
LAB_0013a094:
XOR EAX,EAX
MOV qword ptr [RBP + -0x58],RAX
JMP 0x0013a09c
LAB_0013a09c:
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x420],0x0
JZ 0x0013a0fe
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x420]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
JZ 0x0013a0fe
MOV RDI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x420]
CALL 0x00113500
CMP EAX,0x0
JNZ 0x0013a0fc
MOV RDI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x420]
CALL 0x00113400
CMP EAX,0x0
JNZ 0x0013a0fc
JMP 0x0013a392
LAB_0013a0fc:
JMP 0x0013a0fe
LAB_0013a0fe:
MOV RDI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x410]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x418]
CALL 0x00113550
CMP EAX,0x0
JNZ 0x0013a158
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x410],0x0
JNZ 0x0013a13e
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x418],0x0
JZ 0x0013a143
LAB_0013a13e:
JMP 0x0013a392
LAB_0013a143:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001134a0
CMP EAX,0x0
JNZ 0x0013a156
JMP 0x0013a392
LAB_0013a156:
JMP 0x0013a158
LAB_0013a158:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x480],0x0
JZ 0x0013a1ee
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x480]
CMP qword ptr [RAX + 0x10],0x0
JNZ 0x0013a18e
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x480]
CMP qword ptr [RAX + 0x18],0x0
JZ 0x0013a1ee
LAB_0013a18e:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001137d0
MOV qword ptr [RBP + -0x38],RAX
CMP RAX,0x0
JZ 0x0013a1ec
MOV RDI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x480]
MOV RSI,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x480]
MOV RDX,qword ptr [RAX + 0x18]
CALL 0x00113800
CMP EAX,0x0
JNZ 0x0013a1d2
JMP 0x0013a392
LAB_0013a1d2:
MOV RDI,qword ptr [RBP + -0x38]
MOV ESI,0xc
CALL 0x001132f0
CMP EAX,0x0
JNZ 0x0013a1ea
JMP 0x0013a392
LAB_0013a1ea:
JMP 0x0013a1ec
LAB_0013a1ec:
JMP 0x0013a1ee
LAB_0013a1ee:
CMP qword ptr [RBP + -0x28],0x0
JZ 0x0013a204
CMP qword ptr [RBP + -0x20],0x0
JNZ 0x0013a204
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x20],RAX
LAB_0013a204:
CMP qword ptr [RBP + -0x20],0x0
JZ 0x0013a21a
CMP qword ptr [RBP + -0x28],0x0
JNZ 0x0013a21a
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x28],RAX
LAB_0013a21a:
CMP qword ptr [RBP + -0x20],0x0
JZ 0x0013a246
MOV RAX,qword ptr [RBP + -0x20]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
JZ 0x0013a246
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x00113350
CMP EAX,0x1
JZ 0x0013a244
JMP 0x0013a392
LAB_0013a244:
JMP 0x0013a246
LAB_0013a246:
CMP qword ptr [RBP + -0x28],0x0
JZ 0x0013a328
MOV RAX,qword ptr [RBP + -0x28]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
JZ 0x0013a328
MOV RDI,qword ptr [RBP + -0x28]
LEA RSI,[0x14f005]
CALL 0x001134d0
MOV qword ptr [RBP + -0x40],RAX
CMP RAX,0x0
JZ 0x0013a2f4
CALL 0x00113740
MOV qword ptr [RBP + -0x48],RAX
MOV RDI,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x30]
LEA RSI,[RBP + -0x48]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x001132e0
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x00113420
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x48]
CALL 0x00113380
CMP EAX,0x1
JZ 0x0013a2e9
CALL 0x001130c0
MOV qword ptr [RBP + -0x50],RAX
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x001132b0
MOV RDI,qword ptr [RBP + -0x50]
CALL 0x0013aec0
CMP EAX,0xb
JNZ 0x0013a2e2
MOV RDI,qword ptr [RBP + -0x50]
CALL 0x0013af00
CMP EAX,0x65
JZ 0x0013a2e7
LAB_0013a2e2:
JMP 0x0013a392
LAB_0013a2e7:
JMP 0x0013a2e9
LAB_0013a2e9:
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x001132b0
JMP 0x0013a326
LAB_0013a2f4:
MOV RDI,qword ptr [RBP + -0x10]
LEA RAX,[0x162f70]
MOV RDX,qword ptr [RAX]
LEA RAX,[0x163180]
MOV RCX,qword ptr [RAX + 0x20]
MOV R8,qword ptr [RBP + -0x28]
MOV ESI,0x7ea
MOV AL,0x0
CALL 0x00116c30
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0013a3a2
LAB_0013a326:
JMP 0x0013a328
LAB_0013a328:
CMP qword ptr [RBP + -0x20],0x0
JZ 0x0013a33f
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00113710
CMP EAX,0x1
JZ 0x0013a33f
JMP 0x0013a392
LAB_0013a33f:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x68],RAX
MOV RCX,qword ptr [RBP + -0x10]
MOV AL,0x1
CMP qword ptr [RCX + 0x410],0x0
MOV byte ptr [RBP + -0x59],AL
JNZ 0x0013a36c
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x418],0x0
SETNZ AL
MOV byte ptr [RBP + -0x59],AL
LAB_0013a36c:
MOV RDI,qword ptr [RBP + -0x68]
MOV CL,byte ptr [RBP + -0x59]
XOR ESI,ESI
MOV EAX,0x1
TEST CL,0x1
CMOVNZ ESI,EAX
XOR EAX,EAX
MOV EDX,EAX
CALL 0x00113120
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0013a3a2
LAB_0013a392:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013a5f0
MOV dword ptr [RBP + -0x4],0x1
LAB_0013a3a2:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x70
POP RBP
RET
|
int4 ma_tls_set_certs(long param_1,SSL_CTX *param_2)
{
int iVar1;
ulong uVar2;
bool bVar3;
void *local_60;
EVP_PKEY *local_50;
FILE *local_48;
X509_STORE *local_40;
void *local_38;
char *local_30;
char *local_28;
SSL_CTX *local_20;
long local_18;
local_28 = *(char **)(param_1 + 0x408);
local_30 = *(char **)(param_1 + 0x400);
if (*(long *)(param_1 + 0x480) == 0) {
local_60 = (void *)0x0;
}
else {
local_60 = *(void **)(*(long *)(param_1 + 0x480) + 0xa0);
}
local_38 = local_60;
local_20 = param_2;
local_18 = param_1;
if ((((((*(long *)(param_1 + 0x420) == 0) || (**(char **)(param_1 + 0x420) == '\0')) ||
(iVar1 = SSL_CTX_set_ciphersuites(param_2,*(int8 *)(param_1 + 0x420)), iVar1 != 0)) ||
(iVar1 = SSL_CTX_set_cipher_list(local_20,*(char **)(local_18 + 0x420)), iVar1 != 0)) &&
((iVar1 = SSL_CTX_load_verify_locations
(local_20,*(char **)(local_18 + 0x410),*(char **)(local_18 + 0x418)),
iVar1 != 0 ||
(((*(long *)(local_18 + 0x410) == 0 && (*(long *)(local_18 + 0x418) == 0)) &&
(iVar1 = SSL_CTX_set_default_verify_paths(local_20), iVar1 != 0)))))) &&
((((*(long *)(local_18 + 0x480) == 0 ||
((*(long *)(*(long *)(local_18 + 0x480) + 0x10) == 0 &&
(*(long *)(*(long *)(local_18 + 0x480) + 0x18) == 0)))) ||
(local_40 = SSL_CTX_get_cert_store(local_20), local_40 == (X509_STORE *)0x0)) ||
((iVar1 = X509_STORE_load_locations
(local_40,*(char **)(*(long *)(local_18 + 0x480) + 0x10),
*(char **)(*(long *)(local_18 + 0x480) + 0x18)), iVar1 != 0 &&
(iVar1 = X509_STORE_set_flags(local_40,0xc), iVar1 != 0)))))) {
if ((local_30 != (char *)0x0) && (local_28 == (char *)0x0)) {
local_28 = local_30;
}
if ((local_28 != (char *)0x0) && (local_30 == (char *)0x0)) {
local_30 = local_28;
}
if (((local_28 == (char *)0x0) || (*local_28 == '\0')) ||
(iVar1 = SSL_CTX_use_certificate_chain_file(local_20,local_28), iVar1 == 1)) {
if ((local_30 != (char *)0x0) && (*local_30 != '\0')) {
local_48 = fopen64(local_30,"rb");
if (local_48 == (FILE *)0x0) {
my_set_error(local_18,0x7ea,SQLSTATE_UNKNOWN,mariadb_client_errors._32_8_,local_30);
return 1;
}
local_50 = EVP_PKEY_new();
PEM_read_PrivateKey(local_48,&local_50,(int1 *)0x0,local_38);
fclose(local_48);
iVar1 = SSL_CTX_use_PrivateKey(local_20,local_50);
if (iVar1 != 1) {
uVar2 = ERR_peek_error();
EVP_PKEY_free(local_50);
iVar1 = ERR_GET_LIB(uVar2);
if ((iVar1 != 0xb) || (iVar1 = ERR_GET_REASON(uVar2), iVar1 != 0x65)) goto LAB_0013a392;
}
EVP_PKEY_free(local_50);
}
if ((local_28 == (char *)0x0) || (iVar1 = SSL_CTX_check_private_key(local_20), iVar1 == 1)) {
bVar3 = true;
if (*(long *)(local_18 + 0x410) == 0) {
bVar3 = *(long *)(local_18 + 0x418) != 0;
}
SSL_CTX_set_verify(local_20,(uint)bVar3,(callback *)0x0);
return 0;
}
}
}
LAB_0013a392:
ma_tls_set_error(local_18);
return 1;
}
|
|
57,511
|
ma_apply_undo_key_insert
|
eloqsql/storage/maria/ma_key_recover.c
|
my_bool _ma_apply_undo_key_insert(MARIA_HA *info, LSN undo_lsn,
const uchar *header, uint length)
{
LSN lsn;
my_bool res;
uint keynr;
uchar key_buff[MARIA_MAX_KEY_BUFF];
MARIA_SHARE *share= info->s;
MARIA_KEY key;
my_off_t new_root;
struct st_msg_to_write_hook_for_undo_key msg;
DBUG_ENTER("_ma_apply_undo_key_insert");
share->state.changed|= (STATE_CHANGED | STATE_NOT_OPTIMIZED_KEYS |
STATE_NOT_SORTED_PAGES | STATE_NOT_ZEROFILLED |
STATE_NOT_MOVABLE);
keynr= key_nr_korr(header);
length-= KEY_NR_STORE_SIZE;
/* We have to copy key as _ma_ck_real_delete() may change it */
memcpy(key_buff, header + KEY_NR_STORE_SIZE, length);
DBUG_DUMP("key_buff", key_buff, length);
new_root= share->state.key_root[keynr];
/*
Change the key to an internal structure.
It's safe to have SEARCH_USER_KEY_HAS_TRANSID even if there isn't
a transaction id, as ha_key_cmp() will stop comparison when key length
is reached.
For index with transid flag, the ref_length of the key is not correct.
This should however be safe as long as this key is only used for
comparsion against other keys (not for packing or for read-next etc as
in this case we use data_length + ref_length, which is correct.
*/
key.keyinfo= share->keyinfo + keynr;
key.data= key_buff;
key.data_length= length - share->rec_reflength;
key.ref_length= share->rec_reflength;
key.flag= SEARCH_USER_KEY_HAS_TRANSID;
res= ((share->keyinfo[keynr].key_alg == HA_KEY_ALG_RTREE) ?
maria_rtree_real_delete(info, &key, &new_root) :
_ma_ck_real_delete(info, &key, &new_root));
if (res)
_ma_mark_file_crashed(share);
msg.root= &share->state.key_root[keynr];
msg.value= new_root;
msg.keynr= keynr;
if (_ma_write_clr(info, undo_lsn, *msg.root == msg.value ?
LOGREC_UNDO_KEY_INSERT : LOGREC_UNDO_KEY_INSERT_WITH_ROOT,
0, 0, &lsn, (void*) &msg))
res= 1;
_ma_fast_unlock_key_del(info);
_ma_unpin_all_pages_and_finalize_row(info, lsn);
DBUG_RETURN(res);
}
|
O3
|
c
|
ma_apply_undo_key_insert:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa48, %rsp # imm = 0xA48
movl %ecx, %r12d
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq (%rdi), %r15
orl $0x1b1, 0x170(%r15) # imm = 0x1B1
movq %rsi, -0xa20(%rbp)
movzbl (%rdx), %r14d
decl %r12d
leaq 0x1(%rdx), %rsi
leaq -0xa10(%rbp), %r13
movl $0x9d3, %ecx # imm = 0x9D3
movq %r13, %rdi
movq %r12, %rdx
callq 0x29410
movq 0x118(%r15), %rax
movq (%rax,%r14,8), %rax
movq %rax, -0xa18(%rbp)
movq 0x570(%r15), %rax
imulq $0x118, %r14, %rcx # imm = 0x118
leaq (%rax,%rcx), %rdx
movq %rdx, -0xa40(%rbp)
movq %r13, -0xa48(%rbp)
movl 0x740(%r15), %edx
subl %edx, %r12d
movl %r12d, -0xa38(%rbp)
movl %edx, -0xa34(%rbp)
movl $0x80000, -0xa30(%rbp) # imm = 0x80000
cmpb $0x2, 0xa4(%rax,%rcx)
jne 0x5a3dd
leaq -0xa48(%rbp), %rsi
leaq -0xa18(%rbp), %rdx
movq %rbx, %rdi
callq 0x6bb2b
jmp 0x5a3f3
leaq -0xa48(%rbp), %rsi
leaq -0xa18(%rbp), %rdx
movq %rbx, %rdi
callq 0x67014
movl %eax, %r12d
testb %al, %al
je 0x5a402
movq %r15, %rdi
callq 0x342f2
movq 0x118(%r15), %rax
leaq (%rax,%r14,8), %rax
leaq -0xa68(%rbp), %rcx
movq %rax, (%rcx)
movq -0xa18(%rbp), %rsi
movq %rsi, 0x8(%rcx)
movl %r14d, 0x10(%rcx)
xorl %edx, %edx
cmpq %rsi, (%rax)
setne %dl
addl $0x15, %edx
movq %rcx, (%rsp)
leaq -0xa28(%rbp), %r9
movq %rbx, %rdi
movq -0xa20(%rbp), %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x591a5
movl %eax, %r14d
cmpb $0x0, 0x67e(%rbx)
je 0x5a464
movq %rbx, %rdi
callq 0x5a7e2
testb %r14b, %r14b
movzbl %r12b, %eax
movl $0x1, %r14d
cmovel %eax, %r14d
movq -0xa28(%rbp), %rsi
movq %rbx, %rdi
callq 0x59128
movq 0x8(%rbx), %rax
movq $0x0, 0x90(%rax)
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x5a4b7
movl %r14d, %eax
addq $0xa48, %rsp # imm = 0xA48
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x29260
|
_ma_apply_undo_key_insert:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0A48h
mov r12d, ecx
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov r15, [rdi]
or dword ptr [r15+170h], 1B1h
mov [rbp+var_A20], rsi
movzx r14d, byte ptr [rdx]
dec r12d
lea rsi, [rdx+1]
lea r13, [rbp+var_A10]
mov ecx, 9D3h
mov rdi, r13
mov rdx, r12
call ___memcpy_chk
mov rax, [r15+118h]
mov rax, [rax+r14*8]
mov [rbp+var_A18], rax
mov rax, [r15+570h]
imul rcx, r14, 118h
lea rdx, [rax+rcx]
mov [rbp+var_A40], rdx
mov [rbp+var_A48], r13
mov edx, [r15+740h]
sub r12d, edx
mov [rbp+var_A38], r12d
mov [rbp+var_A34], edx
mov [rbp+var_A30], 80000h
cmp byte ptr [rax+rcx+0A4h], 2
jnz short loc_5A3DD
lea rsi, [rbp+var_A48]
lea rdx, [rbp+var_A18]
mov rdi, rbx
call maria_rtree_real_delete
jmp short loc_5A3F3
loc_5A3DD:
lea rsi, [rbp+var_A48]
lea rdx, [rbp+var_A18]
mov rdi, rbx
call _ma_ck_real_delete
loc_5A3F3:
mov r12d, eax
test al, al
jz short loc_5A402
mov rdi, r15
call _ma_mark_file_crashed
loc_5A402:
mov rax, [r15+118h]
lea rax, [rax+r14*8]
lea rcx, [rbp+var_A68]
mov [rcx], rax
mov rsi, [rbp+var_A18]
mov [rcx+8], rsi
mov [rcx+10h], r14d
xor edx, edx
cmp [rax], rsi
setnz dl
add edx, 15h
mov [rsp+0A70h+var_A70], rcx
lea r9, [rbp+var_A28]
mov rdi, rbx
mov rsi, [rbp+var_A20]
xor ecx, ecx
xor r8d, r8d
call _ma_write_clr
mov r14d, eax
cmp byte ptr [rbx+67Eh], 0
jz short loc_5A464
mov rdi, rbx
call _ma_unlock_key_del
loc_5A464:
test r14b, r14b
movzx eax, r12b
mov r14d, 1
cmovz r14d, eax
mov rsi, [rbp+var_A28]
mov rdi, rbx
call _ma_unpin_all_pages
mov rax, [rbx+8]
mov qword ptr [rax+90h], 0
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_5A4B7
mov eax, r14d
add rsp, 0A48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_5A4B7:
call ___stack_chk_fail
|
long long ma_apply_undo_key_insert(long long a1, long long a2, unsigned __int8 *a3, int a4)
{
long long v4; // r15
long long v5; // r14
long long v6; // r12
int v7; // edx
unsigned __int8 v8; // al
unsigned __int8 v9; // r12
char v10; // r14
bool v11; // zf
unsigned int v12; // r14d
_QWORD v14[2]; // [rsp+8h] [rbp-A68h] BYREF
int v15; // [rsp+18h] [rbp-A58h]
_BYTE *v16; // [rsp+28h] [rbp-A48h] BYREF
long long v17; // [rsp+30h] [rbp-A40h]
int v18; // [rsp+38h] [rbp-A38h]
int v19; // [rsp+3Ch] [rbp-A34h]
int v20; // [rsp+40h] [rbp-A30h]
signed long long v21; // [rsp+48h] [rbp-A28h] BYREF
long long v22; // [rsp+50h] [rbp-A20h]
long long v23; // [rsp+58h] [rbp-A18h] BYREF
_BYTE v24[2528]; // [rsp+60h] [rbp-A10h] BYREF
unsigned long long v25; // [rsp+A40h] [rbp-30h]
v25 = __readfsqword(0x28u);
v4 = *(_QWORD *)a1;
*(_DWORD *)(*(_QWORD *)a1 + 368LL) |= 0x1B1u;
v22 = a2;
v5 = *a3;
v6 = (unsigned int)(a4 - 1);
__memcpy_chk(v24, a3 + 1, v6, 2515LL);
v23 = *(_QWORD *)(*(_QWORD *)(v4 + 280) + 8 * v5);
v17 = *(_QWORD *)(v4 + 1392) + 280 * v5;
v16 = v24;
v7 = *(_DWORD *)(v4 + 1856);
v18 = v6 - v7;
v19 = v7;
v20 = 0x80000;
if ( *(_BYTE *)(v17 + 164) == 2 )
v8 = maria_rtree_real_delete(a1, &v16, &v23);
else
v8 = ma_ck_real_delete(a1, &v16, &v23);
v9 = v8;
if ( v8 )
ma_mark_file_crashed(v4);
v14[0] = *(_QWORD *)(v4 + 280) + 8 * v5;
v14[1] = v23;
v15 = v5;
v10 = ma_write_clr(
(long long *)a1,
v22,
(unsigned int)(*(_QWORD *)v14[0] != v23) + 21,
0,
0,
(unsigned long long)&v21,
(long long)v14);
if ( *(_BYTE *)(a1 + 1662) )
ma_unlock_key_del(a1);
v11 = v10 == 0;
v12 = 1;
if ( v11 )
v12 = v9;
ma_unpin_all_pages(a1, v21);
*(_QWORD *)(*(_QWORD *)(a1 + 8) + 144LL) = 0LL;
return v12;
}
|
_ma_apply_undo_key_insert:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xa48
MOV R12D,ECX
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV R15,qword ptr [RDI]
OR dword ptr [R15 + 0x170],0x1b1
MOV qword ptr [RBP + -0xa20],RSI
MOVZX R14D,byte ptr [RDX]
DEC R12D
LEA RSI,[RDX + 0x1]
LEA R13,[RBP + -0xa10]
MOV ECX,0x9d3
MOV RDI,R13
MOV RDX,R12
CALL 0x00129410
MOV RAX,qword ptr [R15 + 0x118]
MOV RAX,qword ptr [RAX + R14*0x8]
MOV qword ptr [RBP + -0xa18],RAX
MOV RAX,qword ptr [R15 + 0x570]
IMUL RCX,R14,0x118
LEA RDX,[RAX + RCX*0x1]
MOV qword ptr [RBP + -0xa40],RDX
MOV qword ptr [RBP + -0xa48],R13
MOV EDX,dword ptr [R15 + 0x740]
SUB R12D,EDX
MOV dword ptr [RBP + -0xa38],R12D
MOV dword ptr [RBP + -0xa34],EDX
MOV dword ptr [RBP + -0xa30],0x80000
CMP byte ptr [RAX + RCX*0x1 + 0xa4],0x2
JNZ 0x0015a3dd
LEA RSI,[RBP + -0xa48]
LEA RDX,[RBP + -0xa18]
MOV RDI,RBX
CALL 0x0016bb2b
JMP 0x0015a3f3
LAB_0015a3dd:
LEA RSI,[RBP + -0xa48]
LEA RDX,[RBP + -0xa18]
MOV RDI,RBX
CALL 0x00167014
LAB_0015a3f3:
MOV R12D,EAX
TEST AL,AL
JZ 0x0015a402
MOV RDI,R15
CALL 0x001342f2
LAB_0015a402:
MOV RAX,qword ptr [R15 + 0x118]
LEA RAX,[RAX + R14*0x8]
LEA RCX,[RBP + -0xa68]
MOV qword ptr [RCX],RAX
MOV RSI,qword ptr [RBP + -0xa18]
MOV qword ptr [RCX + 0x8],RSI
MOV dword ptr [RCX + 0x10],R14D
XOR EDX,EDX
CMP qword ptr [RAX],RSI
SETNZ DL
ADD EDX,0x15
MOV qword ptr [RSP],RCX
LEA R9,[RBP + -0xa28]
MOV RDI,RBX
MOV RSI,qword ptr [RBP + -0xa20]
XOR ECX,ECX
XOR R8D,R8D
CALL 0x001591a5
MOV R14D,EAX
CMP byte ptr [RBX + 0x67e],0x0
JZ 0x0015a464
MOV RDI,RBX
CALL 0x0015a7e2
LAB_0015a464:
TEST R14B,R14B
MOVZX EAX,R12B
MOV R14D,0x1
CMOVZ R14D,EAX
MOV RSI,qword ptr [RBP + -0xa28]
MOV RDI,RBX
CALL 0x00159128
MOV RAX,qword ptr [RBX + 0x8]
MOV qword ptr [RAX + 0x90],0x0
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0015a4b7
MOV EAX,R14D
ADD RSP,0xa48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0015a4b7:
CALL 0x00129260
|
char _ma_apply_undo_key_insert(long *param_1,int8 param_2,byte *param_3,int param_4)
{
byte bVar1;
long lVar2;
char cVar3;
char cVar4;
char cVar5;
ulong uVar6;
long in_FS_OFFSET;
long *local_a70;
long local_a68;
uint local_a60;
int1 *local_a50;
long local_a48;
int local_a40;
int local_a3c;
int4 local_a38;
int8 local_a30;
int8 local_a28;
long local_a20;
int1 local_a18 [2528];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
lVar2 = *param_1;
*(uint *)(lVar2 + 0x170) = *(uint *)(lVar2 + 0x170) | 0x1b1;
bVar1 = *param_3;
uVar6 = (ulong)bVar1;
local_a28 = param_2;
__memcpy_chk(local_a18,param_3 + 1,param_4 + -1,0x9d3);
local_a20 = *(long *)(*(long *)(lVar2 + 0x118) + uVar6 * 8);
local_a48 = *(long *)(lVar2 + 0x570) + uVar6 * 0x118;
local_a3c = *(int *)(lVar2 + 0x740);
local_a40 = (param_4 + -1) - local_a3c;
local_a38 = 0x80000;
local_a50 = local_a18;
if (*(char *)(*(long *)(lVar2 + 0x570) + 0xa4 + uVar6 * 0x118) == '\x02') {
cVar3 = maria_rtree_real_delete(param_1,&local_a50,&local_a20);
}
else {
cVar3 = _ma_ck_real_delete(param_1,&local_a50,&local_a20);
}
if (cVar3 != '\0') {
_ma_mark_file_crashed(lVar2);
}
local_a70 = (long *)(*(long *)(lVar2 + 0x118) + uVar6 * 8);
local_a68 = local_a20;
local_a60 = (uint)bVar1;
cVar4 = _ma_write_clr(param_1,local_a28,(*local_a70 != local_a20) + '\x15',0,0,&local_a30,
&local_a70);
if (*(char *)((long)param_1 + 0x67e) != '\0') {
_ma_unlock_key_del(param_1);
}
cVar5 = '\x01';
if (cVar4 == '\0') {
cVar5 = cVar3;
}
_ma_unpin_all_pages(param_1,local_a30);
*(int8 *)(param_1[1] + 0x90) = 0;
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return cVar5;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
57,512
|
my_once_free
|
eloqsql/mysys/my_once.c
|
void my_once_free(void)
{
reg1 USED_MEM *next,*old;
DBUG_ENTER("my_once_free");
for (next=my_once_root_block ; next ; )
{
old=next; next= next->next ;
free((uchar*) old);
}
my_once_root_block=0;
DBUG_VOID_RETURN;
}
|
O3
|
c
|
my_once_free:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0xb682fe(%rip), %rbx # 0xc08690
movq (%rbx), %rdi
testq %rdi, %rdi
je 0xa03aa
movq (%rdi), %r14
callq 0x29160
movq %r14, %rdi
testq %r14, %r14
jne 0xa039a
movq $0x0, (%rbx)
popq %rbx
popq %r14
popq %rbp
retq
nop
|
my_once_free:
push rbp
mov rbp, rsp
push r14
push rbx
lea rbx, my_once_root_block
mov rdi, [rbx]
test rdi, rdi
jz short loc_A03AA
loc_A039A:
mov r14, [rdi]
call _free
mov rdi, r14
test r14, r14
jnz short loc_A039A
loc_A03AA:
mov qword ptr [rbx], 0
pop rbx
pop r14
pop rbp
retn
|
long long my_once_free()
{
_QWORD *v0; // rdi
_QWORD *v1; // r14
long long result; // rax
v0 = (_QWORD *)my_once_root_block;
if ( my_once_root_block )
{
do
{
v1 = (_QWORD *)*v0;
result = free(v0);
v0 = v1;
}
while ( v1 );
}
my_once_root_block = 0LL;
return result;
}
|
my_once_free:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
LEA RBX,[0xd08690]
MOV RDI,qword ptr [RBX]
TEST RDI,RDI
JZ 0x001a03aa
LAB_001a039a:
MOV R14,qword ptr [RDI]
CALL 0x00129160
MOV RDI,R14
TEST R14,R14
JNZ 0x001a039a
LAB_001a03aa:
MOV qword ptr [RBX],0x0
POP RBX
POP R14
POP RBP
RET
|
void my_once_free(void)
{
long *plVar1;
long *__ptr;
__ptr = my_once_root_block;
if (my_once_root_block != (long *)0x0) {
do {
plVar1 = (long *)*__ptr;
free(__ptr);
__ptr = plVar1;
} while (plVar1 != (long *)0x0);
}
my_once_root_block = (long *)0x0;
return;
}
|
|
57,513
|
llama_kv_cache_view_update(llama_kv_cache_view*, llama_kv_cache const&)
|
monkey531[P]llama/src/llama-kv-cache.cpp
|
void llama_kv_cache_view_update(struct llama_kv_cache_view * view, const struct llama_kv_cache & kv) {
if (uint32_t(view->n_cells) < kv.size || view->cells == nullptr) {
view->n_cells = int32_t(kv.size);
void * p = realloc(view->cells, sizeof(struct llama_kv_cache_view_cell) * view->n_cells);
GGML_ASSERT(p != nullptr && "Failed to alloc kv_cache_view cells");
view->cells = (struct llama_kv_cache_view_cell *)p;
p = realloc(view->cells_sequences, sizeof(llama_seq_id) * view->n_seq_max * view->n_cells);
GGML_ASSERT(p != nullptr && "Failed to alloc kv_cache_view cells sequences");
view->cells_sequences = (llama_seq_id *)p;
}
const std::vector<llama_kv_cell> & kv_cells = kv.cells;
llama_kv_cache_view_cell * c_curr = view->cells;
llama_seq_id * cs_curr = view->cells_sequences;
int32_t used_cells = 0;
int32_t token_count = 0;
int32_t curr_contig_idx = -1;
uint32_t max_contig = 0;
int32_t max_contig_idx = -1;
for (int32_t i = 0; i < int32_t(kv.size); i++, c_curr++, cs_curr += view->n_seq_max) {
const size_t curr_size = kv_cells[i].seq_id.size();
token_count += curr_size;
c_curr->pos = kv_cells[i].pos + kv_cells[i].delta;
if (curr_size > 0) {
if (curr_contig_idx >= 0 && uint32_t(i - curr_contig_idx) > max_contig) {
max_contig = i - curr_contig_idx;
max_contig_idx = curr_contig_idx;
}
curr_contig_idx = -1;
} else if (curr_contig_idx < 0) {
curr_contig_idx = i;
}
int seq_idx = 0;
for (const llama_seq_id it : kv_cells[i].seq_id) {
if (seq_idx >= view->n_seq_max) {
break;
}
cs_curr[seq_idx] = it;
seq_idx++;
}
if (seq_idx != 0) {
used_cells++;
}
for (; seq_idx < view->n_seq_max; seq_idx++) {
cs_curr[seq_idx] = -1;
}
}
if (curr_contig_idx >= 0 && kv_cells.size() - curr_contig_idx > max_contig) {
max_contig_idx = curr_contig_idx;
max_contig = kv_cells.size() - curr_contig_idx;
}
view->max_contiguous = max_contig;
view->max_contiguous_idx = max_contig_idx;
view->token_count = token_count;
view->used_cells = used_cells;
if (uint32_t(used_cells) != kv.used) {
LLAMA_LOG_ERROR("%s: used cells mismatch. kv_cache says %d but we calculated %d\n",
__func__, kv.used, used_cells);
}
}
|
O1
|
cpp
|
llama_kv_cache_view_update(llama_kv_cache_view*, llama_kv_cache const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r15
movq %rdi, %r14
movl 0xc(%rsi), %eax
cmpl %eax, (%rdi)
jb 0xae1bc
cmpq $0x0, 0x18(%r14)
jne 0xae201
movslq %eax, %rsi
movl %esi, (%r14)
movq 0x18(%r14), %rdi
shlq $0x2, %rsi
callq 0x6bbf0
testq %rax, %rax
je 0xae3e4
movq %rax, 0x18(%r14)
movq 0x20(%r14), %rdi
movslq 0x4(%r14), %rax
movslq (%r14), %rsi
imulq %rax, %rsi
shlq $0x2, %rsi
callq 0x6bbf0
testq %rax, %rax
je 0xae400
movq %rax, 0x20(%r14)
cmpl $0x0, 0xc(%r15)
jle 0xae33e
movq 0x18(%r14), %r13
movq 0x20(%r14), %rbx
movq 0x20(%r15), %rax
movq %rax, 0x20(%rsp)
xorl %ebp, %ebp
movl $0xffffffff, 0x10(%rsp) # imm = 0xFFFFFFFF
movl $0x0, 0xc(%rsp)
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %esi, %esi
xorl %r8d, %r8d
movq %r15, 0x28(%rsp)
movl %esi, 0x18(%rsp)
movl %r8d, 0x1c(%rsp)
movq %rbp, %r12
shlq $0x6, %r12
movq 0x20(%rsp), %rcx
movq 0x38(%rcx,%r12), %rsi
movl 0x4(%rcx,%r12), %eax
addl (%rcx,%r12), %eax
movl %eax, (%r13)
movq %rsi, 0x30(%rsp)
testq %rsi, %rsi
je 0xae296
testl %edx, %edx
js 0xae28f
movl %ebp, %eax
subl %edx, %eax
movl 0xc(%rsp), %ecx
cmpl %ecx, %eax
cmoval %eax, %ecx
movl %ecx, 0xc(%rsp)
movl 0x10(%rsp), %eax
cmoval %edx, %eax
movl %eax, 0x10(%rsp)
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
jmp 0xae29b
testl %edx, %edx
cmovsl %ebp, %edx
movl %edx, 0x14(%rsp)
addq 0x20(%rsp), %r12
movq 0x28(%r12), %rax
addq $0x18, %r12
cmpq %r12, %rax
je 0xae2e2
xorl %ecx, %ecx
movl 0x4(%r14), %edx
movl %ecx, %r15d
cmpl %edx, %ecx
jge 0xae2cc
movl 0x20(%rax), %esi
movslq %ecx, %rdi
movl %esi, (%rbx,%rdi,4)
leal 0x1(%rcx), %r15d
cmpl %edx, %ecx
jge 0xae2e5
movq %rax, %rdi
callq 0x69bb0
movl %r15d, %ecx
cmpq %r12, %rax
jne 0xae2b4
jmp 0xae2e5
xorl %r15d, %r15d
cmpl $0x1, %r15d
movl 0x1c(%rsp), %r8d
sbbl $-0x1, %r8d
movl 0x4(%r14), %eax
cmpl %eax, %r15d
movl 0x18(%rsp), %esi
movl 0x14(%rsp), %edx
jge 0xae319
movslq %r15d, %rcx
movl $0xffffffff, (%rbx,%rcx,4) # imm = 0xFFFFFFFF
incq %rcx
movslq 0x4(%r14), %rax
cmpq %rax, %rcx
jl 0xae306
addl 0x30(%rsp), %esi
incq %rbp
addq $0x4, %r13
cltq
leaq (%rbx,%rax,4), %rbx
movq 0x28(%rsp), %r15
movslq 0xc(%r15), %rax
cmpq %rax, %rbp
jl 0xae23e
jmp 0xae358
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %r8d, %r8d
xorl %esi, %esi
movl $0x0, 0xc(%rsp)
movl $0xffffffff, 0x10(%rsp) # imm = 0xFFFFFFFF
testl %edx, %edx
js 0xae38c
movq 0x28(%r15), %rax
subq 0x20(%r15), %rax
sarq $0x6, %rax
movl %edx, %ecx
movl %edx, %r9d
movq %rax, %rdx
subq %rcx, %rdx
movl 0xc(%rsp), %edi
movl %edi, %ecx
cmpq %rcx, %rdx
movl 0x10(%rsp), %ecx
jbe 0xae394
subl %r9d, %eax
movl %eax, %edi
movl %r9d, %ecx
jmp 0xae394
movl 0x10(%rsp), %ecx
movl 0xc(%rsp), %edi
movl %edi, 0x10(%r14)
movl %ecx, 0x14(%r14)
movl %esi, 0x8(%r14)
movl %r8d, 0xc(%r14)
movl 0x10(%r15), %ecx
cmpl %ecx, %r8d
jne 0xae3bc
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6bb9c(%rip), %rsi # 0x119f5f
leaq 0x6bbd5(%rip), %rdx # 0x119f9f
movl $0x4, %edi
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x68da0
leaq 0x6b9af(%rip), %rdi # 0x119d9a
leaq 0x65fd2(%rip), %rdx # 0x1143c4
leaq 0x6baf0(%rip), %rcx # 0x119ee9
movl $0x294, %esi # imm = 0x294
jmp 0xae41a
leaq 0x6b993(%rip), %rdi # 0x119d9a
leaq 0x65fb6(%rip), %rdx # 0x1143c4
leaq 0x6bb0a(%rip), %rcx # 0x119f1f
movl $0x297, %esi # imm = 0x297
xorl %eax, %eax
callq 0x6bfd0
nop
|
_Z26llama_kv_cache_view_updateP19llama_kv_cache_viewRK14llama_kv_cache:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r15, rsi
mov r14, rdi
mov eax, [rsi+0Ch]
cmp [rdi], eax
jb short loc_AE1BC
cmp qword ptr [r14+18h], 0
jnz short loc_AE201
loc_AE1BC:
movsxd rsi, eax
mov [r14], esi
mov rdi, [r14+18h]
shl rsi, 2
call _realloc
test rax, rax
jz loc_AE3E4
mov [r14+18h], rax
mov rdi, [r14+20h]
movsxd rax, dword ptr [r14+4]
movsxd rsi, dword ptr [r14]
imul rsi, rax
shl rsi, 2
call _realloc
test rax, rax
jz loc_AE400
mov [r14+20h], rax
loc_AE201:
cmp dword ptr [r15+0Ch], 0
jle loc_AE33E
mov r13, [r14+18h]
mov rbx, [r14+20h]
mov rax, [r15+20h]
mov [rsp+68h+var_48], rax
xor ebp, ebp
mov [rsp+68h+var_58], 0FFFFFFFFh
mov [rsp+68h+var_5C], 0
mov edx, 0FFFFFFFFh
xor esi, esi
xor r8d, r8d
mov [rsp+68h+var_40], r15
loc_AE23E:
mov [rsp+68h+var_50], esi
mov [rsp+68h+var_4C], r8d
mov r12, rbp
shl r12, 6
mov rcx, [rsp+68h+var_48]
mov rsi, [rcx+r12+38h]
mov eax, [rcx+r12+4]
add eax, [rcx+r12]
mov [r13+0], eax
mov [rsp+68h+var_38], rsi
test rsi, rsi
jz short loc_AE296
test edx, edx
js short loc_AE28F
mov eax, ebp
sub eax, edx
mov ecx, [rsp+68h+var_5C]
cmp eax, ecx
cmova ecx, eax
mov [rsp+68h+var_5C], ecx
mov eax, [rsp+68h+var_58]
cmova eax, edx
mov [rsp+68h+var_58], eax
loc_AE28F:
mov edx, 0FFFFFFFFh
jmp short loc_AE29B
loc_AE296:
test edx, edx
cmovs edx, ebp
loc_AE29B:
mov [rsp+68h+var_54], edx
add r12, [rsp+68h+var_48]
mov rax, [r12+28h]
add r12, 18h
cmp rax, r12
jz short loc_AE2E2
xor ecx, ecx
loc_AE2B4:
mov edx, [r14+4]
mov r15d, ecx
cmp ecx, edx
jge short loc_AE2CC
mov esi, [rax+20h]
movsxd rdi, ecx
mov [rbx+rdi*4], esi
lea r15d, [rcx+1]
loc_AE2CC:
cmp ecx, edx
jge short loc_AE2E5
mov rdi, rax
call __ZSt18_Rb_tree_incrementPKSt18_Rb_tree_node_base; std::_Rb_tree_increment(std::_Rb_tree_node_base const*)
mov ecx, r15d
cmp rax, r12
jnz short loc_AE2B4
jmp short loc_AE2E5
loc_AE2E2:
xor r15d, r15d
loc_AE2E5:
cmp r15d, 1
mov r8d, [rsp+68h+var_4C]
sbb r8d, 0FFFFFFFFh
mov eax, [r14+4]
cmp r15d, eax
mov esi, [rsp+68h+var_50]
mov edx, [rsp+68h+var_54]
jge short loc_AE319
movsxd rcx, r15d
loc_AE306:
mov dword ptr [rbx+rcx*4], 0FFFFFFFFh
inc rcx
movsxd rax, dword ptr [r14+4]
cmp rcx, rax
jl short loc_AE306
loc_AE319:
add esi, dword ptr [rsp+68h+var_38]
inc rbp
add r13, 4
cdqe
lea rbx, [rbx+rax*4]
mov r15, [rsp+68h+var_40]
movsxd rax, dword ptr [r15+0Ch]
cmp rbp, rax
jl loc_AE23E
jmp short loc_AE358
loc_AE33E:
mov edx, 0FFFFFFFFh
xor r8d, r8d
xor esi, esi
mov [rsp+68h+var_5C], 0
mov [rsp+68h+var_58], 0FFFFFFFFh
loc_AE358:
test edx, edx
js short loc_AE38C
mov rax, [r15+28h]
sub rax, [r15+20h]
sar rax, 6
mov ecx, edx
mov r9d, edx
mov rdx, rax
sub rdx, rcx
mov edi, [rsp+68h+var_5C]
mov ecx, edi
cmp rdx, rcx
mov ecx, [rsp+68h+var_58]
jbe short loc_AE394
sub eax, r9d
mov edi, eax
mov ecx, r9d
jmp short loc_AE394
loc_AE38C:
mov ecx, [rsp+68h+var_58]
mov edi, [rsp+68h+var_5C]
loc_AE394:
mov [r14+10h], edi
mov [r14+14h], ecx
mov [r14+8], esi
mov [r14+0Ch], r8d
mov ecx, [r15+10h]
cmp r8d, ecx
jnz short loc_AE3BC
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_AE3BC:
lea rsi, aSUsedCellsMism; "%s: used cells mismatch. kv_cache says "...
lea rdx, aLlamaKvCacheVi_2; "llama_kv_cache_view_update"
mov edi, 4
xor eax, eax
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp __Z18llama_log_internal14ggml_log_levelPKcz; llama_log_internal(ggml_log_level,char const*,...)
loc_AE3E4:
lea rdi, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aPNullptrFailed; "p != nullptr && \"Failed to alloc kv_ca"...
mov esi, 294h
jmp short loc_AE41A
loc_AE400:
lea rdi, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aPNullptrFailed_0; "p != nullptr && \"Failed to alloc kv_ca"...
mov esi, 297h
loc_AE41A:
xor eax, eax
call _ggml_abort
nop
|
long long llama_kv_cache_view_update(int *a1, long long a2, long long a3, long long a4, long long a5, int a6)
{
long long v6; // r15
long long result; // rax
long long v9; // rax
_DWORD *v10; // r13
long long v11; // rbx
long long v12; // rbp
int v13; // edx
int v14; // esi
int v15; // r8d
long long v16; // rsi
unsigned int v17; // ecx
bool v18; // cc
int v19; // eax
long long v20; // r12
long long v21; // rax
long long v22; // r12
int v23; // ecx
int v24; // r15d
long long v25; // rax
long long v26; // rcx
int v27; // edi
int v28; // ecx
int v29; // ecx
double v30; // xmm0_8
unsigned int v31; // [rsp+Ch] [rbp-5Ch]
int v32; // [rsp+10h] [rbp-58h]
int v33; // [rsp+14h] [rbp-54h]
int v34; // [rsp+18h] [rbp-50h]
int v35; // [rsp+1Ch] [rbp-4Ch]
long long v36; // [rsp+20h] [rbp-48h]
long long v37; // [rsp+28h] [rbp-40h]
v6 = a2;
result = *(unsigned int *)(a2 + 12);
if ( *a1 >= (unsigned int)result && *((_QWORD *)a1 + 3) )
goto LABEL_6;
*a1 = result;
v9 = realloc(*((_QWORD *)a1 + 3), 4LL * (int)result);
if ( !v9 )
{
v30 = ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama-kv-cache.cpp",
660LL,
"GGML_ASSERT(%s) failed",
"p != nullptr && \"Failed to alloc kv_cache_view cells\"");
return std::vector<llama_kv_cell>::resize(v30);
}
*((_QWORD *)a1 + 3) = v9;
result = realloc(*((_QWORD *)a1 + 4), 4 * a1[1] * (long long)*a1);
if ( !result )
{
v30 = ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama-kv-cache.cpp",
663LL,
"GGML_ASSERT(%s) failed",
"p != nullptr && \"Failed to alloc kv_cache_view cells sequences\"");
return std::vector<llama_kv_cell>::resize(v30);
}
*((_QWORD *)a1 + 4) = result;
LABEL_6:
if ( *(int *)(a2 + 12) <= 0 )
{
v13 = -1;
v15 = 0;
v14 = 0;
v31 = 0;
v32 = -1;
}
else
{
v10 = (_DWORD *)*((_QWORD *)a1 + 3);
v11 = *((_QWORD *)a1 + 4);
v36 = *(_QWORD *)(a2 + 32);
v12 = 0LL;
v32 = -1;
v31 = 0;
v13 = -1;
v14 = 0;
v15 = 0;
v37 = v6;
do
{
v34 = v14;
v35 = v15;
v16 = *(_QWORD *)(v36 + (v12 << 6) + 56);
*v10 = *(_DWORD *)(v36 + (v12 << 6)) + *(_DWORD *)(v36 + (v12 << 6) + 4);
if ( v16 )
{
if ( v13 >= 0 )
{
v17 = v31;
v18 = (int)v12 - v13 <= v31;
if ( (int)v12 - v13 > v31 )
v17 = v12 - v13;
v31 = v17;
v19 = v32;
if ( !v18 )
v19 = v13;
v32 = v19;
}
v13 = -1;
}
else if ( v13 < 0 )
{
v13 = v12;
}
v33 = v13;
v20 = v36 + (v12 << 6);
v21 = *(_QWORD *)(v20 + 40);
v22 = v20 + 24;
if ( v21 == v22 )
{
v24 = 0;
}
else
{
v23 = 0;
do
{
v24 = v23;
if ( v23 >= a1[1] )
break;
*(_DWORD *)(v11 + 4LL * v23) = *(_DWORD *)(v21 + 32);
v24 = v23 + 1;
v21 = std::_Rb_tree_increment(v21);
v23 = v24;
}
while ( v21 != v22 );
}
v15 = v35 - ((v24 == 0) - 1);
LODWORD(v25) = a1[1];
v13 = v33;
if ( v24 < (int)v25 )
{
v26 = v24;
do
{
*(_DWORD *)(v11 + 4 * v26++) = -1;
v25 = a1[1];
}
while ( v26 < v25 );
}
v14 = v16 + v34;
++v12;
++v10;
v11 += 4LL * (int)v25;
v6 = v37;
result = *(int *)(v37 + 12);
}
while ( v12 < result );
}
if ( v13 < 0 )
{
v28 = v32;
v27 = v31;
}
else
{
result = (long long)(*(_QWORD *)(v6 + 40) - *(_QWORD *)(v6 + 32)) >> 6;
a6 = v13;
v27 = v31;
v28 = v32;
if ( result - (unsigned long long)(unsigned int)v13 > v31 )
{
result = (unsigned int)(result - v13);
v27 = result;
v28 = v13;
}
}
a1[4] = v27;
a1[5] = v28;
a1[2] = v14;
a1[3] = v15;
v29 = *(_DWORD *)(v6 + 16);
if ( v15 != v29 )
return llama_log_internal(
4,
(unsigned int)"%s: used cells mismatch. kv_cache says %d but we calculated %d\n",
(unsigned int)"llama_kv_cache_view_update",
v29,
v15,
a6);
return result;
}
|
llama_kv_cache_view_update:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R15,RSI
MOV R14,RDI
MOV EAX,dword ptr [RSI + 0xc]
CMP dword ptr [RDI],EAX
JC 0x001ae1bc
CMP qword ptr [R14 + 0x18],0x0
JNZ 0x001ae201
LAB_001ae1bc:
MOVSXD RSI,EAX
MOV dword ptr [R14],ESI
MOV RDI,qword ptr [R14 + 0x18]
SHL RSI,0x2
CALL 0x0016bbf0
TEST RAX,RAX
JZ 0x001ae3e4
MOV qword ptr [R14 + 0x18],RAX
MOV RDI,qword ptr [R14 + 0x20]
MOVSXD RAX,dword ptr [R14 + 0x4]
MOVSXD RSI,dword ptr [R14]
IMUL RSI,RAX
SHL RSI,0x2
CALL 0x0016bbf0
TEST RAX,RAX
JZ 0x001ae400
MOV qword ptr [R14 + 0x20],RAX
LAB_001ae201:
CMP dword ptr [R15 + 0xc],0x0
JLE 0x001ae33e
MOV R13,qword ptr [R14 + 0x18]
MOV RBX,qword ptr [R14 + 0x20]
MOV RAX,qword ptr [R15 + 0x20]
MOV qword ptr [RSP + 0x20],RAX
XOR EBP,EBP
MOV dword ptr [RSP + 0x10],0xffffffff
MOV dword ptr [RSP + 0xc],0x0
MOV EDX,0xffffffff
XOR ESI,ESI
XOR R8D,R8D
MOV qword ptr [RSP + 0x28],R15
LAB_001ae23e:
MOV dword ptr [RSP + 0x18],ESI
MOV dword ptr [RSP + 0x1c],R8D
MOV R12,RBP
SHL R12,0x6
MOV RCX,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RCX + R12*0x1 + 0x38]
MOV EAX,dword ptr [RCX + R12*0x1 + 0x4]
ADD EAX,dword ptr [RCX + R12*0x1]
MOV dword ptr [R13],EAX
MOV qword ptr [RSP + 0x30],RSI
TEST RSI,RSI
JZ 0x001ae296
TEST EDX,EDX
JS 0x001ae28f
MOV EAX,EBP
SUB EAX,EDX
MOV ECX,dword ptr [RSP + 0xc]
CMP EAX,ECX
CMOVA ECX,EAX
MOV dword ptr [RSP + 0xc],ECX
MOV EAX,dword ptr [RSP + 0x10]
CMOVA EAX,EDX
MOV dword ptr [RSP + 0x10],EAX
LAB_001ae28f:
MOV EDX,0xffffffff
JMP 0x001ae29b
LAB_001ae296:
TEST EDX,EDX
CMOVS EDX,EBP
LAB_001ae29b:
MOV dword ptr [RSP + 0x14],EDX
ADD R12,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [R12 + 0x28]
ADD R12,0x18
CMP RAX,R12
JZ 0x001ae2e2
XOR ECX,ECX
LAB_001ae2b4:
MOV EDX,dword ptr [R14 + 0x4]
MOV R15D,ECX
CMP ECX,EDX
JGE 0x001ae2cc
MOV ESI,dword ptr [RAX + 0x20]
MOVSXD RDI,ECX
MOV dword ptr [RBX + RDI*0x4],ESI
LEA R15D,[RCX + 0x1]
LAB_001ae2cc:
CMP ECX,EDX
JGE 0x001ae2e5
MOV RDI,RAX
CALL 0x00169bb0
MOV ECX,R15D
CMP RAX,R12
JNZ 0x001ae2b4
JMP 0x001ae2e5
LAB_001ae2e2:
XOR R15D,R15D
LAB_001ae2e5:
CMP R15D,0x1
MOV R8D,dword ptr [RSP + 0x1c]
SBB R8D,-0x1
MOV EAX,dword ptr [R14 + 0x4]
CMP R15D,EAX
MOV ESI,dword ptr [RSP + 0x18]
MOV EDX,dword ptr [RSP + 0x14]
JGE 0x001ae319
MOVSXD RCX,R15D
LAB_001ae306:
MOV dword ptr [RBX + RCX*0x4],0xffffffff
INC RCX
MOVSXD RAX,dword ptr [R14 + 0x4]
CMP RCX,RAX
JL 0x001ae306
LAB_001ae319:
ADD ESI,dword ptr [RSP + 0x30]
INC RBP
ADD R13,0x4
CDQE
LEA RBX,[RBX + RAX*0x4]
MOV R15,qword ptr [RSP + 0x28]
MOVSXD RAX,dword ptr [R15 + 0xc]
CMP RBP,RAX
JL 0x001ae23e
JMP 0x001ae358
LAB_001ae33e:
MOV EDX,0xffffffff
XOR R8D,R8D
XOR ESI,ESI
MOV dword ptr [RSP + 0xc],0x0
MOV dword ptr [RSP + 0x10],0xffffffff
LAB_001ae358:
TEST EDX,EDX
JS 0x001ae38c
MOV RAX,qword ptr [R15 + 0x28]
SUB RAX,qword ptr [R15 + 0x20]
SAR RAX,0x6
MOV ECX,EDX
MOV R9D,EDX
MOV RDX,RAX
SUB RDX,RCX
MOV EDI,dword ptr [RSP + 0xc]
MOV ECX,EDI
CMP RDX,RCX
MOV ECX,dword ptr [RSP + 0x10]
JBE 0x001ae394
SUB EAX,R9D
MOV EDI,EAX
MOV ECX,R9D
JMP 0x001ae394
LAB_001ae38c:
MOV ECX,dword ptr [RSP + 0x10]
MOV EDI,dword ptr [RSP + 0xc]
LAB_001ae394:
MOV dword ptr [R14 + 0x10],EDI
MOV dword ptr [R14 + 0x14],ECX
MOV dword ptr [R14 + 0x8],ESI
MOV dword ptr [R14 + 0xc],R8D
MOV ECX,dword ptr [R15 + 0x10]
CMP R8D,ECX
JNZ 0x001ae3bc
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001ae3bc:
LEA RSI,[0x219f5f]
LEA RDX,[0x219f9f]
MOV EDI,0x4
XOR EAX,EAX
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x00168da0
LAB_001ae3e4:
LEA RDI,[0x219d9a]
LEA RDX,[0x2143c4]
LEA RCX,[0x219ee9]
MOV ESI,0x294
JMP 0x001ae41a
LAB_001ae400:
LEA RDI,[0x219d9a]
LEA RDX,[0x2143c4]
LEA RCX,[0x219f1f]
MOV ESI,0x297
LAB_001ae41a:
XOR EAX,EAX
CALL 0x0016bfd0
|
/* llama_kv_cache_view_update(llama_kv_cache_view*, llama_kv_cache const&) */
void llama_kv_cache_view_update(llama_kv_cache_view *param_1,llama_kv_cache *param_2)
{
long lVar1;
long lVar2;
uint uVar3;
int iVar4;
void *pvVar5;
_Rb_tree_node_base *p_Var6;
long lVar7;
int iVar8;
char *pcVar9;
uint uVar10;
long lVar11;
int iVar12;
int8 uVar13;
int iVar14;
long lVar15;
_Rb_tree_node_base *p_Var16;
int *piVar17;
uint local_5c;
uint local_58;
int local_38;
uVar10 = *(uint *)(param_2 + 0xc);
if ((uVar10 <= *(uint *)param_1) && (*(long *)(param_1 + 0x18) != 0)) {
LAB_001ae201:
if (*(int *)(param_2 + 0xc) < 1) {
uVar10 = 0xffffffff;
iVar14 = 0;
iVar12 = 0;
local_5c = 0;
local_58 = 0xffffffff;
}
else {
piVar17 = *(int **)(param_1 + 0x18);
lVar7 = *(long *)(param_1 + 0x20);
lVar1 = *(long *)(param_2 + 0x20);
lVar11 = 0;
local_58 = 0xffffffff;
local_5c = 0;
uVar10 = 0xffffffff;
iVar12 = 0;
iVar14 = 0;
do {
lVar15 = lVar11 * 0x40;
lVar2 = *(long *)(lVar1 + 0x38 + lVar15);
*piVar17 = *(int *)(lVar1 + 4 + lVar15) + *(int *)(lVar1 + lVar15);
if (lVar2 == 0) {
if ((int)uVar10 < 0) {
uVar10 = (uint)lVar11;
}
}
else {
if ((-1 < (int)uVar10) && (uVar3 = (uint)lVar11 - uVar10, local_5c < uVar3)) {
local_5c = uVar3;
local_58 = uVar10;
}
uVar10 = 0xffffffff;
}
p_Var6 = *(_Rb_tree_node_base **)(lVar15 + lVar1 + 0x28);
p_Var16 = (_Rb_tree_node_base *)(lVar15 + lVar1 + 0x18);
if (p_Var6 == p_Var16) {
iVar8 = 0;
}
else {
iVar8 = 0;
do {
if (*(int *)(param_1 + 4) <= iVar8) break;
*(int4 *)(lVar7 + (long)iVar8 * 4) = *(int4 *)(p_Var6 + 0x20);
iVar8 = iVar8 + 1;
p_Var6 = (_Rb_tree_node_base *)std::_Rb_tree_increment(p_Var6);
} while (p_Var6 != p_Var16);
}
iVar14 = (iVar14 + 1) - (uint)(iVar8 == 0);
iVar4 = *(int *)(param_1 + 4);
if (iVar8 < iVar4) {
lVar15 = (long)iVar8;
do {
*(int4 *)(lVar7 + lVar15 * 4) = 0xffffffff;
lVar15 = lVar15 + 1;
iVar4 = *(int *)(param_1 + 4);
} while (lVar15 < iVar4);
}
local_38 = (int)lVar2;
iVar12 = iVar12 + local_38;
lVar11 = lVar11 + 1;
piVar17 = piVar17 + 1;
lVar7 = lVar7 + (long)iVar4 * 4;
} while (lVar11 < *(int *)(param_2 + 0xc));
}
if ((-1 < (int)uVar10) &&
(lVar7 = *(long *)(param_2 + 0x28) - *(long *)(param_2 + 0x20) >> 6,
(ulong)local_5c < lVar7 - (ulong)uVar10)) {
local_5c = (int)lVar7 - uVar10;
local_58 = uVar10;
}
*(uint *)(param_1 + 0x10) = local_5c;
*(uint *)(param_1 + 0x14) = local_58;
*(int *)(param_1 + 8) = iVar12;
*(int *)(param_1 + 0xc) = iVar14;
if (iVar14 != *(int *)(param_2 + 0x10)) {
llama_log_internal(4,"%s: used cells mismatch. kv_cache says %d but we calculated %d\n",
"llama_kv_cache_view_update");
return;
}
return;
}
*(uint *)param_1 = uVar10;
pvVar5 = realloc(*(void **)(param_1 + 0x18),(long)(int)uVar10 << 2);
if (pvVar5 == (void *)0x0) {
pcVar9 = "p != nullptr && \"Failed to alloc kv_cache_view cells\"";
uVar13 = 0x294;
}
else {
*(void **)(param_1 + 0x18) = pvVar5;
pvVar5 = realloc(*(void **)(param_1 + 0x20),
(long)*(int *)param_1 * (long)*(int *)(param_1 + 4) * 4);
if (pvVar5 != (void *)0x0) {
*(void **)(param_1 + 0x20) = pvVar5;
goto LAB_001ae201;
}
pcVar9 = "p != nullptr && \"Failed to alloc kv_cache_view cells sequences\"";
uVar13 = 0x297;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama-kv-cache.cpp",
uVar13,"GGML_ASSERT(%s) failed",pcVar9);
}
|
|
57,514
|
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::end_object()
|
monkey531[P]llama/common/json.hpp
|
bool end_object()
{
if (ref_stack.back())
{
if (!callback(static_cast<int>(ref_stack.size()) - 1, parse_event_t::object_end, *ref_stack.back()))
{
// discard object
*ref_stack.back() = discarded;
}
else
{
ref_stack.back()->set_parents();
}
}
JSON_ASSERT(!ref_stack.empty());
JSON_ASSERT(!keep_stack.empty());
ref_stack.pop_back();
keep_stack.pop_back();
if (!ref_stack.empty() && ref_stack.back() && ref_stack.back()->is_structured())
{
// remove discarded value
for (auto it = ref_stack.back()->begin(); it != ref_stack.back()->end(); ++it)
{
if (it->is_discarded())
{
ref_stack.back()->erase(it);
break;
}
}
}
return true;
}
|
O2
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::end_object():
pushq %r15
pushq %r14
pushq %rbx
subq $0x70, %rsp
movq %rdi, %rbx
movq 0x10(%rdi), %rsi
movq -0x8(%rsi), %rcx
testq %rcx, %rcx
je 0x68820
leaq 0x80(%rbx), %rdi
subq 0x8(%rbx), %rsi
shrq $0x3, %rsi
decl %esi
pushq $0x1
popq %rdx
callq 0x68e74
testb %al, %al
jne 0x68820
leaq 0xa8(%rbx), %rsi
leaq 0x40(%rsp), %r14
movq %r14, %rdi
callq 0x69646
movq 0x10(%rbx), %rax
movq -0x8(%rax), %rdi
movq %r14, %rsi
callq 0x67582
movq %r14, %rdi
callq 0x64c70
movq 0x10(%rbx), %rax
cmpq %rax, 0x8(%rbx)
je 0x688f4
movq 0x20(%rbx), %rcx
cmpq 0x30(%rbx), %rcx
jne 0x68842
cmpl $0x0, 0x38(%rbx)
je 0x68910
leaq 0x30(%rbx), %rdi
addq $-0x8, %rax
movq %rax, 0x10(%rbx)
callq 0x684dc
movq 0x10(%rbx), %rax
cmpq %rax, 0x8(%rbx)
je 0x688e8
movq -0x8(%rax), %rsi
testq %rsi, %rsi
je 0x688e8
movb (%rsi), %al
decb %al
cmpb $0x1, %al
ja 0x688e8
movq %rsp, %r14
movq %r14, %rdi
callq 0x696e6
leaq 0x20(%rsp), %r15
movq 0x10(%rbx), %rax
movq -0x8(%rax), %rsi
movq %r15, %rdi
callq 0x69716
movq %r14, %rdi
movq %r15, %rsi
callq 0x6970c
testb %al, %al
je 0x688e8
movq %r14, %rdi
callq 0x6973c
cmpb $0x9, (%rax)
je 0x688b8
movq %r14, %rdi
callq 0x69a5c
jmp 0x68882
movq 0x10(%rbx), %rax
movq -0x8(%rax), %rsi
movq (%rsp), %rax
leaq 0x50(%rsp), %rdx
movq %rax, (%rdx)
movups 0x8(%rsp), %xmm0
movups %xmm0, 0x8(%rdx)
movq 0x18(%rsp), %rax
movq %rax, 0x18(%rdx)
leaq 0x20(%rsp), %rdi
callq 0x6986a
movb $0x1, %al
addq $0x70, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x65984(%rip), %rdi # 0xce27f
leaq 0x5e041(%rip), %rdx # 0xc6943
leaq 0x66970(%rip), %rcx # 0xcf279
movl $0x1bbd, %esi # imm = 0x1BBD
jmp 0x6892a
leaq 0x65968(%rip), %rdi # 0xce27f
leaq 0x5e025(%rip), %rdx # 0xc6943
leaq 0x668ce(%rip), %rcx # 0xcf1f3
movl $0x1bbe, %esi # imm = 0x1BBE
xorl %eax, %eax
callq 0x27520
nop
|
_ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE10end_objectEv:
push r15
push r14
push rbx
sub rsp, 70h
mov rbx, rdi
mov rsi, [rdi+10h]
mov rcx, [rsi-8]
test rcx, rcx
jz short loc_68820
lea rdi, [rbx+80h]
sub rsi, [rbx+8]
shr rsi, 3
dec esi
push 1
pop rdx
call _ZNKSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEclEiS3_SH_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)>::operator()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)
test al, al
jnz short loc_68820
lea rsi, [rbx+0A8h]
lea r14, [rsp+88h+var_48]
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
mov rax, [rbx+10h]
mov rdi, [rax-8]
mov rsi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
loc_68820:
mov rax, [rbx+10h]
cmp [rbx+8], rax
jz loc_688F4
mov rcx, [rbx+20h]
cmp rcx, [rbx+30h]
jnz short loc_68842
cmp dword ptr [rbx+38h], 0
jz loc_68910
loc_68842:
lea rdi, [rbx+30h]; this
add rax, 0FFFFFFFFFFFFFFF8h
mov [rbx+10h], rax
call _ZNSt18_Bit_iterator_base12_M_bump_downEv; std::_Bit_iterator_base::_M_bump_down(void)
mov rax, [rbx+10h]
cmp [rbx+8], rax
jz loc_688E8
mov rsi, [rax-8]
test rsi, rsi
jz short loc_688E8
mov al, [rsi]
dec al
cmp al, 1
ja short loc_688E8
mov r14, rsp
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5beginEv; 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>::begin(void)
lea r15, [rsp+88h+var_68]
loc_68882:
mov rax, [rbx+10h]
mov rsi, [rax-8]
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE3endEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::end(void)
mov rdi, r14
mov rsi, r15
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEneISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_
test al, al
jz short loc_688E8
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEptEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::operator->(void)
cmp byte ptr [rax], 9
jz short loc_688B8
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEppEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::operator++(void)
jmp short loc_68882
loc_688B8:
mov rax, [rbx+10h]
mov rsi, [rax-8]
mov rax, [rsp+88h+var_88]
lea rdx, [rsp+88h+var_38]
mov [rdx], rax
movups xmm0, [rsp+88h+var_80]
movups xmmword ptr [rdx+8], xmm0
mov rax, [rsp+88h+var_70]
mov [rdx+18h], rax
lea rdi, [rsp+88h+var_68]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_
loc_688E8:
mov al, 1
add rsp, 70h
pop rbx
pop r14
pop r15
retn
loc_688F4:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aRefStackEmpty; "!ref_stack.empty()"
mov esi, 1BBDh
jmp short loc_6892A
loc_68910:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKeepStackEmpty; "!keep_stack.empty()"
mov esi, 1BBEh
loc_6892A:
xor eax, eax
call _ggml_abort
nop
|
char nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::end_object(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
char a7,
int a8,
char a9)
{
long long v9; // rsi
long long v10; // rcx
long long v11; // rax
long long v12; // rax
_BYTE *v13; // rsi
long long v14; // rsi
int v16; // esi
int v17; // edx
int v18; // ecx
int v19; // r8d
int v20; // r9d
long long v21; // [rsp+0h] [rbp-88h] BYREF
__int128 v22; // [rsp+8h] [rbp-80h]
long long v23; // [rsp+18h] [rbp-70h]
_BYTE v24[32]; // [rsp+20h] [rbp-68h] BYREF
_BYTE v25[16]; // [rsp+40h] [rbp-48h] BYREF
long long v26; // [rsp+50h] [rbp-38h]
__int128 v27; // [rsp+58h] [rbp-30h]
long long v28; // [rsp+68h] [rbp-20h]
v9 = *(_QWORD *)(a1 + 16);
v10 = *(_QWORD *)(v9 - 8);
if ( v10
&& !(unsigned __int8)std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &)>::operator()(
a1 + 128,
(unsigned int)((unsigned long long)(v9 - *(_QWORD *)(a1 + 8)) >> 3) - 1,
1LL,
v10) )
{
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
v25,
a1 + 168);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=(
*(_QWORD *)(*(_QWORD *)(a1 + 16) - 8LL),
(long long)v25);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)v25);
}
v11 = *(_QWORD *)(a1 + 16);
if ( *(_QWORD *)(a1 + 8) == v11 )
{
v16 = 7101;
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
7101LL,
"GGML_ASSERT(%s) failed",
"!ref_stack.empty()");
return nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::key(
(unsigned int)"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
v16,
v17,
v18,
v19,
v20,
a7,
a8,
a9);
}
if ( *(_QWORD *)(a1 + 32) == *(_QWORD *)(a1 + 48) && !*(_DWORD *)(a1 + 56) )
{
v16 = 7102;
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
7102LL,
"GGML_ASSERT(%s) failed",
"!keep_stack.empty()");
return nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::key(
(unsigned int)"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
v16,
v17,
v18,
v19,
v20,
a7,
a8,
a9);
}
*(_QWORD *)(a1 + 16) = v11 - 8;
std::_Bit_iterator_base::_M_bump_down((std::_Bit_iterator_base *)(a1 + 48));
v12 = *(_QWORD *)(a1 + 16);
if ( *(_QWORD *)(a1 + 8) != v12 )
{
v13 = *(_BYTE **)(v12 - 8);
if ( v13 )
{
if ( (unsigned __int8)(*v13 - 1) <= 1u )
{
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>::begin(&v21);
while ( 1 )
{
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>::end(
v24,
*(_QWORD *)(*(_QWORD *)(a1 + 16) - 8LL));
if ( !(unsigned __int8)ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEneISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_(
&v21,
v24) )
break;
if ( *(_BYTE *)nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::operator->(&v21) == 9 )
{
v14 = *(_QWORD *)(*(_QWORD *)(a1 + 16) - 8LL);
v26 = v21;
v27 = v22;
v28 = v23;
ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_(
v24,
v14);
return 1;
}
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::operator++(&v21);
}
}
}
}
return 1;
}
|
end_object:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x70
MOV RBX,RDI
MOV RSI,qword ptr [RDI + 0x10]
MOV RCX,qword ptr [RSI + -0x8]
TEST RCX,RCX
JZ 0x00168820
LEA RDI,[RBX + 0x80]
SUB RSI,qword ptr [RBX + 0x8]
SHR RSI,0x3
DEC ESI
PUSH 0x1
POP RDX
CALL 0x00168e74
TEST AL,AL
JNZ 0x00168820
LEA RSI,[RBX + 0xa8]
LEA R14,[RSP + 0x40]
MOV RDI,R14
CALL 0x00169646
MOV RAX,qword ptr [RBX + 0x10]
MOV RDI,qword ptr [RAX + -0x8]
MOV RSI,R14
CALL 0x00167582
MOV RDI,R14
CALL 0x00164c70
LAB_00168820:
MOV RAX,qword ptr [RBX + 0x10]
CMP qword ptr [RBX + 0x8],RAX
JZ 0x001688f4
MOV RCX,qword ptr [RBX + 0x20]
CMP RCX,qword ptr [RBX + 0x30]
JNZ 0x00168842
CMP dword ptr [RBX + 0x38],0x0
JZ 0x00168910
LAB_00168842:
LEA RDI,[RBX + 0x30]
ADD RAX,-0x8
MOV qword ptr [RBX + 0x10],RAX
CALL 0x001684dc
MOV RAX,qword ptr [RBX + 0x10]
CMP qword ptr [RBX + 0x8],RAX
JZ 0x001688e8
MOV RSI,qword ptr [RAX + -0x8]
TEST RSI,RSI
JZ 0x001688e8
MOV AL,byte ptr [RSI]
DEC AL
CMP AL,0x1
JA 0x001688e8
MOV R14,RSP
MOV RDI,R14
CALL 0x001696e6
LEA R15,[RSP + 0x20]
LAB_00168882:
MOV RAX,qword ptr [RBX + 0x10]
MOV RSI,qword ptr [RAX + -0x8]
MOV RDI,R15
CALL 0x00169716
MOV RDI,R14
MOV RSI,R15
CALL 0x0016970c
TEST AL,AL
JZ 0x001688e8
MOV RDI,R14
CALL 0x0016973c
CMP byte ptr [RAX],0x9
JZ 0x001688b8
MOV RDI,R14
CALL 0x00169a5c
JMP 0x00168882
LAB_001688b8:
MOV RAX,qword ptr [RBX + 0x10]
MOV RSI,qword ptr [RAX + -0x8]
MOV RAX,qword ptr [RSP]
LEA RDX,[RSP + 0x50]
MOV qword ptr [RDX],RAX
MOVUPS XMM0,xmmword ptr [RSP + 0x8]
MOVUPS xmmword ptr [RDX + 0x8],XMM0
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RDX + 0x18],RAX
LEA RDI,[RSP + 0x20]
CALL 0x0016986a
LAB_001688e8:
MOV AL,0x1
ADD RSP,0x70
POP RBX
POP R14
POP R15
RET
LAB_001688f4:
LEA RDI,[0x1ce27f]
LEA RDX,[0x1c6943]
LEA RCX,[0x1cf279]
MOV ESI,0x1bbd
JMP 0x0016892a
LAB_00168910:
LEA RDI,[0x1ce27f]
LEA RDX,[0x1c6943]
LEA RCX,[0x1cf1f3]
MOV ESI,0x1bbe
LAB_0016892a:
XOR EAX,EAX
CALL 0x00127520
|
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >::end_object() */
int8 __thiscall
nlohmann::json_abi_v3_11_3::detail::
json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::end_object(json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this)
{
char cVar1;
char *pcVar2;
int8 uVar3;
int8 local_88;
int4 local_80;
int4 uStack_7c;
int4 uStack_78;
int4 uStack_74;
int8 local_70;
int1 local_68 [32];
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_48 [16];
int8 local_38;
int4 local_30;
int4 uStack_2c;
int4 uStack_28;
int4 uStack_24;
int8 local_20;
if ((*(long *)(*(long *)(this + 0x10) + -8) != 0) &&
(cVar1 = std::
function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)>
::operator()(this + 0x80,
(int)((ulong)(*(long *)(this + 0x10) - *(long *)(this + 8)) >> 3) + -1,1)
, cVar1 == '\0')) {
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::basic_json(local_48,this + 0xa8);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator=(*(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
**)(*(long *)(this + 0x10) + -8),local_48);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::~basic_json(local_48);
}
if (*(long *)(this + 8) == *(long *)(this + 0x10)) {
pcVar2 = "!ref_stack.empty()";
uVar3 = 0x1bbd;
}
else {
if ((*(long *)(this + 0x20) != *(long *)(this + 0x30)) || (*(int *)(this + 0x38) != 0)) {
*(long *)(this + 0x10) = *(long *)(this + 0x10) + -8;
std::_Bit_iterator_base::_M_bump_down((_Bit_iterator_base *)(this + 0x30));
if ((*(long *)(this + 8) != *(long *)(this + 0x10)) &&
((pcVar2 = *(char **)(*(long *)(this + 0x10) + -8), pcVar2 != (char *)0x0 &&
((byte)(*pcVar2 - 1U) < 2)))) {
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::begin();
while( true ) {
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::end();
cVar1 = _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEneISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_
(&local_88,local_68);
if (cVar1 == '\0') break;
pcVar2 = (char *)iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::operator->((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)&local_88);
if (*pcVar2 == '\t') {
local_38 = local_88;
local_30 = local_80;
uStack_2c = uStack_7c;
uStack_28 = uStack_78;
uStack_24 = uStack_74;
local_20 = local_70;
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_
(local_68,*(int8 *)(*(long *)(this + 0x10) + -8));
return 1;
}
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::operator++((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)&local_88);
}
}
return 1;
}
pcVar2 = "!keep_stack.empty()";
uVar3 = 0x1bbe;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar3,
"GGML_ASSERT(%s) failed",pcVar2);
}
|
|
57,515
|
find_collation_data_inheritance_source
|
eloqsql/mysys/charset.c
|
static CHARSET_INFO *find_collation_data_inheritance_source(CHARSET_INFO *cs, myf flags)
{
const char *beg, *end;
if (cs->tailoring &&
!strncmp(cs->tailoring, "[import ", 8) &&
(end= strchr(cs->tailoring + 8, ']')) &&
(beg= cs->tailoring + 8) + MY_CS_NAME_SIZE > end)
{
char name[MY_CS_NAME_SIZE + 1];
memcpy(name, beg, end - beg);
name[end - beg]= '\0';
return inheritance_source_by_id(cs, get_collation_number(name,MYF(flags)));
}
return NULL;
}
|
O0
|
c
|
find_collation_data_inheritance_source:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x40(%rbp)
movq %rsi, -0x48(%rbp)
movq -0x40(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x2c456
movq -0x40(%rbp), %rax
movq 0x38(%rax), %rdi
leaq 0x4e445(%rip), %rsi # 0x7a800
movl $0x8, %edx
callq 0x24140
cmpl $0x0, %eax
jne 0x2c456
movq -0x40(%rbp), %rax
movq 0x38(%rax), %rdi
addq $0x8, %rdi
movl $0x5d, %esi
callq 0x24100
movq %rax, -0x58(%rbp)
cmpq $0x0, %rax
je 0x2c456
movq -0x40(%rbp), %rax
movq 0x38(%rax), %rax
addq $0x8, %rax
movq %rax, -0x50(%rbp)
addq $0x20, %rax
cmpq -0x58(%rbp), %rax
jbe 0x2c456
leaq -0x30(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq -0x58(%rbp), %rdx
movq -0x50(%rbp), %rax
subq %rax, %rdx
callq 0x24220
movq -0x58(%rbp), %rax
movq -0x50(%rbp), %rcx
subq %rcx, %rax
movb $0x0, -0x30(%rbp,%rax)
movq -0x40(%rbp), %rax
movq %rax, -0x60(%rbp)
leaq -0x30(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x2a190
movq -0x60(%rbp), %rdi
movl %eax, %esi
callq 0x2c5d0
movq %rax, -0x38(%rbp)
jmp 0x2c45e
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x68(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x2c482
movq -0x68(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
callq 0x242e0
nopw (%rax,%rax)
|
find_collation_data_inheritance_source:
push rbp
mov rbp, rsp
sub rsp, 70h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_40], rdi
mov [rbp+var_48], rsi
mov rax, [rbp+var_40]
cmp qword ptr [rax+38h], 0
jz loc_2C456
mov rax, [rbp+var_40]
mov rdi, [rax+38h]
lea rsi, aImport; "[import "
mov edx, 8
call _strncmp
cmp eax, 0
jnz loc_2C456
mov rax, [rbp+var_40]
mov rdi, [rax+38h]
add rdi, 8
mov esi, 5Dh ; ']'
call _strchr
mov [rbp+var_58], rax
cmp rax, 0
jz short loc_2C456
mov rax, [rbp+var_40]
mov rax, [rax+38h]
add rax, 8
mov [rbp+var_50], rax
add rax, 20h ; ' '
cmp rax, [rbp+var_58]
jbe short loc_2C456
lea rdi, [rbp+var_30]
mov rsi, [rbp+var_50]
mov rdx, [rbp+var_58]
mov rax, [rbp+var_50]
sub rdx, rax
call _memcpy
mov rax, [rbp+var_58]
mov rcx, [rbp+var_50]
sub rax, rcx
mov [rbp+rax+var_30], 0
mov rax, [rbp+var_40]
mov [rbp+var_60], rax
lea rdi, [rbp+var_30]
mov rsi, [rbp+var_48]
call get_collation_number
mov rdi, [rbp+var_60]
mov esi, eax
call inheritance_source_by_id
mov [rbp+var_38], rax
jmp short loc_2C45E
loc_2C456:
mov [rbp+var_38], 0
loc_2C45E:
mov rax, [rbp+var_38]
mov [rbp+var_68], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_2C482
mov rax, [rbp+var_68]
add rsp, 70h
pop rbp
retn
loc_2C482:
call ___stack_chk_fail
|
long long find_collation_data_inheritance_source(long long a1, long long a2)
{
unsigned int collation_number; // eax
unsigned long long v4; // [rsp+18h] [rbp-58h]
long long v5; // [rsp+20h] [rbp-50h]
_BYTE v7[40]; // [rsp+40h] [rbp-30h] BYREF
unsigned long long v8; // [rsp+68h] [rbp-8h]
v8 = __readfsqword(0x28u);
if ( !*(_QWORD *)(a1 + 56) )
return 0LL;
if ( (unsigned int)strncmp(*(_QWORD *)(a1 + 56), "[import ", 8LL) )
return 0LL;
v4 = strchr(*(_QWORD *)(a1 + 56) + 8LL, 93LL);
if ( !v4 )
return 0LL;
v5 = *(_QWORD *)(a1 + 56) + 8LL;
if ( *(_QWORD *)(a1 + 56) + 40LL <= v4 )
return 0LL;
memcpy(v7, v5, v4 - v5);
v7[v4 - v5] = 0;
collation_number = get_collation_number((long long)v7, a2);
return inheritance_source_by_id(a1, collation_number);
}
|
find_collation_data_inheritance_source:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x40],RDI
MOV qword ptr [RBP + -0x48],RSI
MOV RAX,qword ptr [RBP + -0x40]
CMP qword ptr [RAX + 0x38],0x0
JZ 0x0012c456
MOV RAX,qword ptr [RBP + -0x40]
MOV RDI,qword ptr [RAX + 0x38]
LEA RSI,[0x17a800]
MOV EDX,0x8
CALL 0x00124140
CMP EAX,0x0
JNZ 0x0012c456
MOV RAX,qword ptr [RBP + -0x40]
MOV RDI,qword ptr [RAX + 0x38]
ADD RDI,0x8
MOV ESI,0x5d
CALL 0x00124100
MOV qword ptr [RBP + -0x58],RAX
CMP RAX,0x0
JZ 0x0012c456
MOV RAX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RAX + 0x38]
ADD RAX,0x8
MOV qword ptr [RBP + -0x50],RAX
ADD RAX,0x20
CMP RAX,qword ptr [RBP + -0x58]
JBE 0x0012c456
LEA RDI,[RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x58]
MOV RAX,qword ptr [RBP + -0x50]
SUB RDX,RAX
CALL 0x00124220
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x50]
SUB RAX,RCX
MOV byte ptr [RBP + RAX*0x1 + -0x30],0x0
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x60],RAX
LEA RDI,[RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x48]
CALL 0x0012a190
MOV RDI,qword ptr [RBP + -0x60]
MOV ESI,EAX
CALL 0x0012c5d0
MOV qword ptr [RBP + -0x38],RAX
JMP 0x0012c45e
LAB_0012c456:
MOV qword ptr [RBP + -0x38],0x0
LAB_0012c45e:
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0012c482
MOV RAX,qword ptr [RBP + -0x68]
ADD RSP,0x70
POP RBP
RET
LAB_0012c482:
CALL 0x001242e0
|
int8 find_collation_data_inheritance_source(long param_1,int8 param_2)
{
int iVar1;
int4 uVar2;
char *pcVar3;
void *__src;
long in_FS_OFFSET;
int8 local_40;
char local_38 [40];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
if (*(long *)(param_1 + 0x38) != 0) {
iVar1 = strncmp(*(char **)(param_1 + 0x38),"[import ",8);
if (iVar1 == 0) {
pcVar3 = strchr((char *)(*(long *)(param_1 + 0x38) + 8),0x5d);
if ((pcVar3 != (char *)0x0) &&
(__src = (void *)(*(long *)(param_1 + 0x38) + 8),
pcVar3 < (char *)(*(long *)(param_1 + 0x38) + 0x28))) {
memcpy(local_38,__src,(long)pcVar3 - (long)__src);
pcVar3[(long)(local_38 + -(long)__src)] = '\0';
uVar2 = get_collation_number(local_38,param_2);
local_40 = inheritance_source_by_id(param_1,uVar2);
goto LAB_0012c45e;
}
}
}
local_40 = 0;
LAB_0012c45e:
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return local_40;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
57,516
|
my_getcputime
|
eloqsql/mysys/my_getsystime.c
|
ulonglong my_getcputime()
{
#ifdef CLOCK_THREAD_CPUTIME_ID
struct timespec tp;
if (clock_gettime(CLOCK_THREAD_CPUTIME_ID, &tp))
return 0;
return (ulonglong)tp.tv_sec*10000000+(ulonglong)tp.tv_nsec/100;
#elif defined(__NR_clock_gettime)
struct timespec tp;
if (syscall(__NR_clock_gettime, CLOCK_THREAD_CPUTIME_ID, &tp))
return 0;
return (ulonglong)tp.tv_sec*10000000+(ulonglong)tp.tv_nsec/100;
#endif /* CLOCK_THREAD_CPUTIME_ID */
return 0;
}
|
O0
|
c
|
my_getcputime:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x3, %edi
leaq -0x18(%rbp), %rsi
callq 0x24260
cmpl $0x0, %eax
je 0x5e345
movq $0x0, -0x8(%rbp)
jmp 0x5e36d
imulq $0x989680, -0x18(%rbp), %rax # imm = 0x989680
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl $0x64, %ecx
xorl %edx, %edx
divq %rcx
movq %rax, %rcx
movq -0x20(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
my_getcputime:
push rbp
mov rbp, rsp
sub rsp, 20h
mov edi, 3
lea rsi, [rbp+var_18]
call _clock_gettime
cmp eax, 0
jz short loc_5E345
mov [rbp+var_8], 0
jmp short loc_5E36D
loc_5E345:
imul rax, [rbp+var_18], 989680h
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov ecx, 64h ; 'd'
xor edx, edx
div rcx
mov rcx, rax
mov rax, [rbp+var_20]
add rax, rcx
mov [rbp+var_8], rax
loc_5E36D:
mov rax, [rbp+var_8]
add rsp, 20h
pop rbp
retn
|
unsigned long long my_getcputime()
{
long long v1; // [rsp+8h] [rbp-18h] BYREF
unsigned long long v2; // [rsp+10h] [rbp-10h]
if ( (unsigned int)clock_gettime(3LL, &v1) )
return 0LL;
else
return v2 / 0x64 + 10000000 * v1;
}
|
my_getcputime:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV EDI,0x3
LEA RSI,[RBP + -0x18]
CALL 0x00124260
CMP EAX,0x0
JZ 0x0015e345
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0015e36d
LAB_0015e345:
IMUL RAX,qword ptr [RBP + -0x18],0x989680
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,0x64
XOR EDX,EDX
DIV RCX
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,RCX
MOV qword ptr [RBP + -0x8],RAX
LAB_0015e36d:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x20
POP RBP
RET
|
long my_getcputime(void)
{
int iVar1;
timespec local_20;
long local_10;
iVar1 = clock_gettime(3,&local_20);
if (iVar1 == 0) {
local_10 = local_20.tv_sec * 10000000 + (ulong)local_20.tv_nsec / 100;
}
else {
local_10 = 0;
}
return local_10;
}
|
|
57,517
|
my_sync_dir_by_file
|
eloqsql/mysys/my_sync.c
|
int my_sync_dir_by_file(const char *file_name __attribute__((unused)),
myf my_flags __attribute__((unused)))
{
#ifdef NEED_EXPLICIT_SYNC_DIR
char dir_name[FN_REFLEN];
size_t dir_name_length;
dirname_part(dir_name, file_name, &dir_name_length);
return my_sync_dir(dir_name, my_flags & ~MY_NOSYMLINKS);
#else
return 0;
#endif
}
|
O0
|
c
|
my_sync_dir_by_file:
pushq %rbp
movq %rsp, %rbp
subq $0x240, %rsp # imm = 0x240
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x218(%rbp)
movq %rsi, -0x220(%rbp)
movq -0x218(%rbp), %rsi
leaq -0x210(%rbp), %rdi
movq %rdi, -0x238(%rbp)
leaq -0x228(%rbp), %rdx
callq 0xae780
movq -0x238(%rbp), %rdi
movq -0x220(%rbp), %rax
andl $0xfffffdff, %eax # imm = 0xFFFFFDFF
movl %eax, %esi
callq 0xc0970
movl %eax, -0x22c(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0xc0aa8
movl -0x22c(%rbp), %eax
addq $0x240, %rsp # imm = 0x240
popq %rbp
retq
callq 0x272b0
nopl (%rax)
|
my_sync_dir_by_file:
push rbp
mov rbp, rsp
sub rsp, 240h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_218], rdi
mov [rbp+var_220], rsi
mov rsi, [rbp+var_218]
lea rdi, [rbp+var_210]
mov [rbp+var_238], rdi
lea rdx, [rbp+var_228]
call dirname_part
mov rdi, [rbp+var_238]
mov rax, [rbp+var_220]
and eax, 0FFFFFDFFh
mov esi, eax
call my_sync_dir
mov [rbp+var_22C], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_C0AA8
mov eax, [rbp+var_22C]
add rsp, 240h
pop rbp
retn
loc_C0AA8:
call ___stack_chk_fail
|
long long my_sync_dir_by_file(_BYTE *a1, long long a2)
{
long long v3; // [rsp+18h] [rbp-228h] BYREF
long long v4; // [rsp+20h] [rbp-220h]
_BYTE *v5; // [rsp+28h] [rbp-218h]
_BYTE v6[520]; // [rsp+30h] [rbp-210h] BYREF
unsigned long long v7; // [rsp+238h] [rbp-8h]
v7 = __readfsqword(0x28u);
v5 = a1;
v4 = a2;
dirname_part((long long)v6, a1, &v3);
return (unsigned int)my_sync_dir(v6, (unsigned int)v4 & 0xFFFFFDFF);
}
|
my_sync_dir_by_file:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x240
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x218],RDI
MOV qword ptr [RBP + -0x220],RSI
MOV RSI,qword ptr [RBP + -0x218]
LEA RDI,[RBP + -0x210]
MOV qword ptr [RBP + -0x238],RDI
LEA RDX,[RBP + -0x228]
CALL 0x001ae780
MOV RDI,qword ptr [RBP + -0x238]
MOV RAX,qword ptr [RBP + -0x220]
AND EAX,0xfffffdff
MOV ESI,EAX
CALL 0x001c0970
MOV dword ptr [RBP + -0x22c],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001c0aa8
MOV EAX,dword ptr [RBP + -0x22c]
ADD RSP,0x240
POP RBP
RET
LAB_001c0aa8:
CALL 0x001272b0
|
int4 my_sync_dir_by_file(int8 param_1,int8 param_2)
{
int4 uVar1;
long in_FS_OFFSET;
int1 local_230 [8];
int8 local_228;
int8 local_220;
int1 local_218 [520];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_228 = param_2;
local_220 = param_1;
dirname_part(local_218,param_1,local_230);
uVar1 = my_sync_dir(local_218,(uint)local_228 & 0xfffffdff);
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return uVar1;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
57,518
|
POINTonE2_affine_Serialize_BE
|
corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/e2.c
|
static limb_t POINTonE2_affine_Serialize_BE(unsigned char out[192],
const POINTonE2_affine *in)
{
vec384x temp;
from_fp(temp[1], in->X[1]);
be_bytes_from_limbs(out, temp[1], sizeof(temp[1]));
from_fp(temp[0], in->X[0]);
be_bytes_from_limbs(out + 48, temp[0], sizeof(temp[0]));
from_fp(temp[1], in->Y[1]);
be_bytes_from_limbs(out + 96, temp[1], sizeof(temp[1]));
from_fp(temp[0], in->Y[0]);
be_bytes_from_limbs(out + 144, temp[0], sizeof(temp[0]));
return sgn0_pty_mod_384x(temp, BLS12_381_P);
}
|
O0
|
c
|
POINTonE2_affine_Serialize_BE:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x70(%rbp), %rdi
addq $0x30, %rdi
movq -0x10(%rbp), %rsi
addq $0x30, %rsi
callq 0xaf670
movq -0x8(%rbp), %rdi
leaq -0x70(%rbp), %rsi
addq $0x30, %rsi
movl $0x30, %edx
callq 0xaf6b0
leaq -0x70(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xaf670
movq -0x8(%rbp), %rdi
addq $0x30, %rdi
leaq -0x70(%rbp), %rsi
movl $0x30, %edx
callq 0xaf6b0
leaq -0x70(%rbp), %rdi
addq $0x30, %rdi
movq -0x10(%rbp), %rsi
addq $0x60, %rsi
addq $0x30, %rsi
callq 0xaf670
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
leaq -0x70(%rbp), %rsi
addq $0x30, %rsi
movl $0x30, %edx
callq 0xaf6b0
leaq -0x70(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x60, %rsi
callq 0xaf670
movq -0x8(%rbp), %rdi
addq $0x90, %rdi
leaq -0x70(%rbp), %rsi
movl $0x30, %edx
callq 0xaf6b0
leaq -0x70(%rbp), %rdi
leaq 0x3c55a(%rip), %rsi # 0xe8470
callq 0xc67a0
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
|
POINTonE2_affine_Serialize_BE:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
lea rdi, [rbp+var_70]
add rdi, 30h ; '0'
mov rsi, [rbp+var_10]
add rsi, 30h ; '0'
call from_fp
mov rdi, [rbp+var_8]
lea rsi, [rbp+var_70]
add rsi, 30h ; '0'
mov edx, 30h ; '0'
call be_bytes_from_limbs
lea rdi, [rbp+var_70]
mov rsi, [rbp+var_10]
call from_fp
mov rdi, [rbp+var_8]
add rdi, 30h ; '0'
lea rsi, [rbp+var_70]
mov edx, 30h ; '0'
call be_bytes_from_limbs
lea rdi, [rbp+var_70]
add rdi, 30h ; '0'
mov rsi, [rbp+var_10]
add rsi, 60h ; '`'
add rsi, 30h ; '0'
call from_fp
mov rdi, [rbp+var_8]
add rdi, 60h ; '`'
lea rsi, [rbp+var_70]
add rsi, 30h ; '0'
mov edx, 30h ; '0'
call be_bytes_from_limbs
lea rdi, [rbp+var_70]
mov rsi, [rbp+var_10]
add rsi, 60h ; '`'
call from_fp
mov rdi, [rbp+var_8]
add rdi, 90h
lea rsi, [rbp+var_70]
mov edx, 30h ; '0'
call be_bytes_from_limbs
lea rdi, [rbp+var_70]
lea rsi, BLS12_381_P
call sgn0_pty_mod_384x
add rsp, 70h
pop rbp
retn
|
long long POINTonE2_affine_Serialize_BE(long long a1, long long a2)
{
_BYTE v3[48]; // [rsp+0h] [rbp-70h] BYREF
_BYTE v4[48]; // [rsp+30h] [rbp-40h] BYREF
long long v5; // [rsp+60h] [rbp-10h]
long long v6; // [rsp+68h] [rbp-8h]
v6 = a1;
v5 = a2;
from_fp(v4, a2 + 48);
be_bytes_from_limbs(v6, v4, 48LL);
from_fp(v3, v5);
be_bytes_from_limbs(v6 + 48, v3, 48LL);
from_fp(v4, v5 + 144);
be_bytes_from_limbs(v6 + 96, v4, 48LL);
from_fp(v3, v5 + 96);
be_bytes_from_limbs(v6 + 144, v3, 48LL);
return sgn0_pty_mod_384x(v3, &BLS12_381_P);
}
|
POINTonE2_affine_Serialize_BE:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
LEA RDI,[RBP + -0x70]
ADD RDI,0x30
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x30
CALL 0x001af670
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[RBP + -0x70]
ADD RSI,0x30
MOV EDX,0x30
CALL 0x001af6b0
LEA RDI,[RBP + -0x70]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x001af670
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x30
LEA RSI,[RBP + -0x70]
MOV EDX,0x30
CALL 0x001af6b0
LEA RDI,[RBP + -0x70]
ADD RDI,0x30
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x60
ADD RSI,0x30
CALL 0x001af670
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x60
LEA RSI,[RBP + -0x70]
ADD RSI,0x30
MOV EDX,0x30
CALL 0x001af6b0
LEA RDI,[RBP + -0x70]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x60
CALL 0x001af670
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x90
LEA RSI,[RBP + -0x70]
MOV EDX,0x30
CALL 0x001af6b0
LEA RDI,[RBP + -0x70]
LEA RSI,[0x1e8470]
CALL 0x001c67a0
ADD RSP,0x70
POP RBP
RET
|
void POINTonE2_affine_Serialize_BE(long param_1,long param_2)
{
int1 local_78 [48];
int1 auStack_48 [48];
long local_18;
long local_10;
local_18 = param_2;
local_10 = param_1;
from_fp(auStack_48,param_2 + 0x30);
be_bytes_from_limbs(local_10,auStack_48,0x30);
from_fp(local_78,local_18);
be_bytes_from_limbs(local_10 + 0x30,local_78,0x30);
from_fp(auStack_48,local_18 + 0x90);
be_bytes_from_limbs(local_10 + 0x60,auStack_48,0x30);
from_fp(local_78,local_18 + 0x60);
be_bytes_from_limbs(local_10 + 0x90,local_78,0x30);
sgn0_pty_mod_384x(local_78,BLS12_381_P);
return;
}
|
|
57,519
|
testing::internal::JsonUnitTestResultPrinter::OnTestIterationEnd(testing::UnitTest const&, int)
|
giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest.cc
|
void JsonUnitTestResultPrinter::OnTestIterationEnd(const UnitTest& unit_test,
int /*iteration*/) {
FILE* jsonout = OpenFileForWriting(output_file_);
std::stringstream stream;
PrintJsonUnitTest(&stream, unit_test);
fprintf(jsonout, "%s", StringStreamToString(&stream).c_str());
fclose(jsonout);
}
|
O1
|
cpp
|
testing::internal::JsonUnitTestResultPrinter::OnTestIterationEnd(testing::UnitTest const&, int):
pushq %r14
pushq %rbx
subq $0x1a8, %rsp # imm = 0x1A8
movq %rsi, %r14
addq $0x8, %rdi
callq 0x244dc
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x8340
leaq 0x30(%rsp), %rdi
movq %r14, %rsi
callq 0x28a64
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
callq 0x1cfc7
leaq 0x10(%rsp), %r14
movq -0x10(%r14), %rdi
movq %rbx, %rsi
callq 0x8580
movq -0x10(%r14), %rdi
cmpq %r14, %rdi
je 0x28a08
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x84e0
movq %rbx, %rdi
callq 0x84a0
movq 0x30579(%rip), %rsi # 0x58f90
leaq 0x20(%rsp), %rdi
callq 0x8390
leaq 0xa0(%rsp), %rdi
callq 0x8190
addq $0x1a8, %rsp # imm = 0x1A8
popq %rbx
popq %r14
retq
jmp 0x28a3b
movq %rax, %rbx
movq 0x3054b(%rip), %rsi # 0x58f90
leaq 0x20(%rsp), %rdi
callq 0x8390
leaq 0xa0(%rsp), %rdi
callq 0x8190
movq %rbx, %rdi
callq 0x8990
|
_ZN7testing8internal25JsonUnitTestResultPrinter18OnTestIterationEndERKNS_8UnitTestEi:
push r14
push rbx
sub rsp, 1A8h
mov r14, rsi
add rdi, 8; int
call _ZN7testing8internalL18OpenFileForWritingERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::OpenFileForWriting(std::string const&)
mov rbx, rax
lea rdi, [rsp+1B8h+var_198]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void)
lea rdi, [rsp+1B8h+var_188]; this
mov rsi, r14; std::ostream *
call _ZN7testing8internal25JsonUnitTestResultPrinter17PrintJsonUnitTestEPSoRKNS_8UnitTestE; testing::internal::JsonUnitTestResultPrinter::PrintJsonUnitTest(std::ostream *,testing::UnitTest const&)
mov rdi, rsp
lea rsi, [rsp+1B8h+var_198]
call _ZN7testing8internal20StringStreamToStringEPNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE; testing::internal::StringStreamToString(std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>> *)
lea r14, [rsp+1B8h+var_1A8]
mov rdi, [r14-10h]
mov rsi, rbx
call _fputs
mov rdi, [r14-10h]; void *
cmp rdi, r14
jz short loc_28A08
mov rsi, [rsp+1B8h+var_1A8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_28A08:
mov rdi, rbx
call _fclose
mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+1B8h+var_198]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
lea rdi, [rsp+1B8h+var_118]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
add rsp, 1A8h
pop rbx
pop r14
retn
jmp short $+2
loc_28A3B:
mov rbx, rax
mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+arg_18]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
lea rdi, [rsp+arg_98]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rdi, rbx
call __Unwind_Resume
|
void testing::internal::JsonUnitTestResultPrinter::OnTestIterationEnd(
testing::internal::JsonUnitTestResultPrinter *this,
const testing::UnitTest *a2)
{
long long v2; // rbx
const testing::UnitTest *v3; // rdx
long long *v4; // [rsp+0h] [rbp-1B8h] BYREF
long long v5; // [rsp+10h] [rbp-1A8h] BYREF
_BYTE v6[16]; // [rsp+20h] [rbp-198h] BYREF
_BYTE v7[112]; // [rsp+30h] [rbp-188h] BYREF
_BYTE v8[280]; // [rsp+A0h] [rbp-118h] BYREF
v2 = testing::internal::OpenFileForWriting((_QWORD *)this + 1);
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v6);
testing::internal::JsonUnitTestResultPrinter::PrintJsonUnitTest(
(testing::internal::JsonUnitTestResultPrinter *)v7,
a2,
v3);
testing::internal::StringStreamToString((long long)&v4, (long long)v6);
fputs(v4, v2);
if ( v4 != &v5 )
operator delete(v4, v5 + 1);
fclose(v2);
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(
v6,
&`VTT for'std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>);
std::ios_base::~ios_base((std::ios_base *)v8);
}
|
OnTestIterationEnd:
PUSH R14
PUSH RBX
SUB RSP,0x1a8
MOV R14,RSI
ADD RDI,0x8
CALL 0x001244dc
MOV RBX,RAX
LEA RDI,[RSP + 0x20]
CALL 0x00108340
LEA RDI,[RSP + 0x30]
LAB_001289cc:
MOV RSI,R14
CALL 0x00128a64
LAB_001289d4:
MOV RDI,RSP
LEA RSI,[RSP + 0x20]
CALL 0x0011cfc7
LAB_001289e1:
LEA R14,[RSP + 0x10]
MOV RDI,qword ptr [R14 + -0x10]
MOV RSI,RBX
CALL 0x00108580
MOV RDI,qword ptr [R14 + -0x10]
CMP RDI,R14
JZ 0x00128a08
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x001084e0
LAB_00128a08:
MOV RDI,RBX
CALL 0x001084a0
MOV RSI,qword ptr [0x00158f90]
LEA RDI,[RSP + 0x20]
CALL 0x00108390
LEA RDI,[RSP + 0xa0]
CALL 0x00108190
ADD RSP,0x1a8
POP RBX
POP R14
RET
|
/* testing::internal::JsonUnitTestResultPrinter::OnTestIterationEnd(testing::UnitTest const&, int)
*/
void testing::internal::JsonUnitTestResultPrinter::OnTestIterationEnd(UnitTest *param_1,int param_2)
{
FILE *__stream;
int4 in_register_00000034;
long *local_1b8 [2];
long local_1a8 [2];
stringstream local_198 [16];
ostream local_188 [112];
ios_base local_118 [264];
__stream = (FILE *)OpenFileForWriting((string *)(param_1 + 8));
std::__cxx11::stringstream::stringstream(local_198);
/* try { // try from 001289cc to 001289d3 has its CatchHandler @ 00128a3b */
PrintJsonUnitTest(local_188,(UnitTest *)CONCAT44(in_register_00000034,param_2));
/* try { // try from 001289d4 to 001289e0 has its CatchHandler @ 00128a39 */
StringStreamToString((stringstream *)local_1b8);
fputs((char *)local_1b8[0],__stream);
if (local_1b8[0] != local_1a8) {
operator_delete(local_1b8[0],local_1a8[0] + 1);
}
fclose(__stream);
std::__cxx11::stringstream::~stringstream(local_198);
std::ios_base::~ios_base(local_118);
return;
}
|
|
57,520
|
ma_control_file_end
|
eloqsql/storage/maria/ma_control_file.c
|
int ma_control_file_end(void)
{
int close_error;
DBUG_ENTER("ma_control_file_end");
if (control_file_fd < 0) /* already closed */
DBUG_RETURN(0);
#ifndef _WIN32
(void) my_lock(control_file_fd, F_UNLCK, 0L, F_TO_EOF,
MYF(MY_SEEK_NOT_DONE | MY_FORCE_LOCK));
#endif
close_error= mysql_file_close(control_file_fd, MYF(MY_WME));
/*
As mysql_file_close() frees structures even if close() fails, we do the
same, i.e. we mark the file as closed in all cases.
*/
control_file_fd= -1;
/*
As this module owns these variables, closing the module forbids access to
them (just a safety):
*/
last_checkpoint_lsn= LSN_IMPOSSIBLE;
last_logno= FILENO_IMPOSSIBLE;
max_trid_in_control_file= recovery_failures= 0;
DBUG_RETURN(close_error);
}
|
O0
|
c
|
ma_control_file_end:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
cmpl $0x0, 0x26ec41(%rip) # 0x2bd3c0
jge 0x4e78c
jmp 0x4e783
movl $0x0, -0x4(%rbp)
jmp 0x4e7ff
movl 0x26ec2e(%rip), %edi # 0x2bd3c0
movl $0x2, %esi
xorl %eax, %eax
movl %eax, %ecx
movl $0xa0, %r8d
movq %rcx, %rdx
callq 0xf3500
movl 0x26ec11(%rip), %edx # 0x2bd3c0
leaq 0x103125(%rip), %rdi # 0x1518db
movl $0x24d, %esi # imm = 0x24D
movl $0x10, %ecx
callq 0x4ec40
movl %eax, -0x8(%rbp)
movl $0xffffffff, 0x26ebee(%rip) # imm = 0xFFFFFFFF
movq $0x0, 0x42998b(%rip) # 0x478168
movl $0x0, 0x429989(%rip) # 0x478170
movb $0x0, 0x429992(%rip) # 0x478180
movq $0x0, 0x42997f(%rip) # 0x478178
movl -0x8(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
ma_control_file_end:
push rbp
mov rbp, rsp
sub rsp, 10h
cmp cs:control_file_fd, 0
jge short loc_4E78C
jmp short $+2
loc_4E783:
mov [rbp+var_4], 0
jmp short loc_4E7FF
loc_4E78C:
mov edi, cs:control_file_fd
mov esi, 2
xor eax, eax
mov ecx, eax
mov r8d, 0A0h
mov rdx, rcx
call my_lock
mov edx, cs:control_file_fd
lea rdi, aWorkspaceLlm4b_10; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 24Dh
mov ecx, 10h
call inline_mysql_file_close_1
mov [rbp+var_8], eax
mov cs:control_file_fd, 0FFFFFFFFh
mov cs:last_checkpoint_lsn, 0
mov cs:last_logno, 0
mov cs:recovery_failures, 0
mov cs:max_trid_in_control_file, 0
mov eax, [rbp+var_8]
mov [rbp+var_4], eax
loc_4E7FF:
mov eax, [rbp+var_4]
add rsp, 10h
pop rbp
retn
|
long long ma_control_file_end()
{
unsigned int v1; // [rsp+8h] [rbp-8h]
if ( control_file_fd >= 0 )
{
my_lock((unsigned int)control_file_fd, 2LL, 0LL, 0LL, 160LL);
v1 = inline_mysql_file_close_1(
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_control_file.c",
589LL,
(unsigned int)control_file_fd,
16LL);
control_file_fd = -1;
last_checkpoint_lsn = 0LL;
last_logno = 0;
recovery_failures = 0;
max_trid_in_control_file = 0LL;
return v1;
}
else
{
return 0;
}
}
|
ma_control_file_end:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
CMP dword ptr [0x003bd3c0],0x0
JGE 0x0014e78c
JMP 0x0014e783
LAB_0014e783:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0014e7ff
LAB_0014e78c:
MOV EDI,dword ptr [0x003bd3c0]
MOV ESI,0x2
XOR EAX,EAX
MOV ECX,EAX
MOV R8D,0xa0
MOV RDX,RCX
CALL 0x001f3500
MOV EDX,dword ptr [0x003bd3c0]
LEA RDI,[0x2518db]
MOV ESI,0x24d
MOV ECX,0x10
CALL 0x0014ec40
MOV dword ptr [RBP + -0x8],EAX
MOV dword ptr [0x003bd3c0],0xffffffff
MOV qword ptr [0x00578168],0x0
MOV dword ptr [0x00578170],0x0
MOV byte ptr [0x00578180],0x0
MOV qword ptr [0x00578178],0x0
MOV EAX,dword ptr [RBP + -0x8]
MOV dword ptr [RBP + -0x4],EAX
LAB_0014e7ff:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x10
POP RBP
RET
|
int4 ma_control_file_end(void)
{
int4 local_c;
if (control_file_fd < 0) {
local_c = 0;
}
else {
my_lock(control_file_fd,2,0,0,0xa0);
local_c = inline_mysql_file_close
("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_control_file.c",
0x24d,control_file_fd,0x10);
control_file_fd = -1;
last_checkpoint_lsn = 0;
last_logno = 0;
recovery_failures = 0;
max_trid_in_control_file = 0;
}
return local_c;
}
|
|
57,521
|
ma_control_file_end
|
eloqsql/storage/maria/ma_control_file.c
|
int ma_control_file_end(void)
{
int close_error;
DBUG_ENTER("ma_control_file_end");
if (control_file_fd < 0) /* already closed */
DBUG_RETURN(0);
#ifndef _WIN32
(void) my_lock(control_file_fd, F_UNLCK, 0L, F_TO_EOF,
MYF(MY_SEEK_NOT_DONE | MY_FORCE_LOCK));
#endif
close_error= mysql_file_close(control_file_fd, MYF(MY_WME));
/*
As mysql_file_close() frees structures even if close() fails, we do the
same, i.e. we mark the file as closed in all cases.
*/
control_file_fd= -1;
/*
As this module owns these variables, closing the module forbids access to
them (just a safety):
*/
last_checkpoint_lsn= LSN_IMPOSSIBLE;
last_logno= FILENO_IMPOSSIBLE;
max_trid_in_control_file= recovery_failures= 0;
DBUG_RETURN(close_error);
}
|
O3
|
c
|
ma_control_file_end:
movl 0x33c391(%rip), %edi # 0x384190
testl %edi, %edi
js 0x47e8c
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
movl $0xa0, %r8d
movl $0x2, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x9fa38
movl 0x33c364(%rip), %ebx # 0x384190
leaq 0x33e1dd(%rip), %rax # 0x386010
movq (%rax), %rax
leaq -0x60(%rbp), %rdi
movl %ebx, %esi
movl $0x4, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x47e8f
movl $0x10, %esi
movl %ebx, %edi
callq 0xa0469
movl $0xffffffff, 0x33c32e(%rip) # imm = 0xFFFFFFFF
xorl %ecx, %ecx
movq %rcx, 0x3b56fd(%rip) # 0x3fd568
movl $0x0, 0x3b56fb(%rip) # 0x3fd570
movb $0x0, 0x3b5704(%rip) # 0x3fd580
movq %rcx, 0x3b56f5(%rip) # 0x3fd578
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
retq
xorl %eax, %eax
retq
leaq -0x14(%rbp), %r14
movq %rax, %rdi
movl %ebx, %esi
movq %r14, %rdx
callq 0x2a742
movl (%r14), %eax
jmp 0x47e58
|
ma_control_file_end:
mov edi, cs:control_file_fd
test edi, edi
js loc_47E8C
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 50h
mov r8d, 0A0h
mov esi, 2
xor edx, edx
xor ecx, ecx
call my_lock
mov ebx, cs:control_file_fd
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp-60h]
mov esi, ebx
mov edx, 4
call qword ptr [rax+158h]
test rax, rax
jnz short loc_47E8F
mov esi, 10h
mov edi, ebx
call my_close
loc_47E58:
mov cs:control_file_fd, 0FFFFFFFFh
xor ecx, ecx
mov cs:last_checkpoint_lsn, rcx
mov cs:last_logno, 0
mov cs:recovery_failures, 0
mov cs:max_trid_in_control_file, rcx
add rsp, 50h
pop rbx
pop r14
pop rbp
retn
loc_47E8C:
xor eax, eax
retn
loc_47E8F:
lea r14, [rbp-14h]
mov rdi, rax
mov esi, ebx
mov rdx, r14
call ma_control_file_end_cold_1
mov eax, [r14]
jmp short loc_47E58
|
long long ma_control_file_end()
{
unsigned int v0; // ebx
long long v1; // rax
long long result; // rax
long long v3; // [rsp-68h] [rbp-68h] BYREF
unsigned int v4; // [rsp-1Ch] [rbp-1Ch] BYREF
if ( control_file_fd < 0 )
return 0LL;
my_lock((unsigned int)control_file_fd, 2LL, 0LL, 0LL, 160LL);
v0 = control_file_fd;
v1 = ((long long ( *)(long long *, _QWORD, long long))PSI_server[43])(&v3, (unsigned int)control_file_fd, 4LL);
if ( v1 )
{
ma_control_file_end_cold_1(v1, v0, &v4);
result = v4;
}
else
{
result = my_close(v0, 16LL);
}
control_file_fd = -1;
last_checkpoint_lsn = 0LL;
last_logno = 0;
recovery_failures = 0;
max_trid_in_control_file = 0LL;
return result;
}
|
ma_control_file_end:
MOV EDI,dword ptr [0x00484190]
TEST EDI,EDI
JS 0x00147e8c
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x50
MOV R8D,0xa0
MOV ESI,0x2
XOR EDX,EDX
XOR ECX,ECX
CALL 0x0019fa38
MOV EBX,dword ptr [0x00484190]
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x60]
MOV ESI,EBX
MOV EDX,0x4
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x00147e8f
MOV ESI,0x10
MOV EDI,EBX
CALL 0x001a0469
LAB_00147e58:
MOV dword ptr [0x00484190],0xffffffff
XOR ECX,ECX
MOV qword ptr [0x004fd568],RCX
MOV dword ptr [0x004fd570],0x0
MOV byte ptr [0x004fd580],0x0
MOV qword ptr [0x004fd578],RCX
ADD RSP,0x50
POP RBX
POP R14
POP RBP
RET
LAB_00147e8c:
XOR EAX,EAX
RET
LAB_00147e8f:
LEA R14,[RBP + -0x14]
MOV RDI,RAX
MOV ESI,EBX
MOV RDX,R14
CALL 0x0012a742
MOV EAX,dword ptr [R14]
JMP 0x00147e58
|
ulong ma_control_file_end(void)
{
int iVar1;
long lVar2;
ulong uVar3;
int1 local_68 [76];
uint local_1c;
if (-1 < control_file_fd) {
my_lock(control_file_fd,2,0,0,0xa0);
iVar1 = control_file_fd;
lVar2 = (**(code **)(PSI_server + 0x158))(local_68,control_file_fd,4);
if (lVar2 == 0) {
uVar3 = my_close(iVar1,0x10);
}
else {
ma_control_file_end_cold_1(lVar2,iVar1,&local_1c);
uVar3 = (ulong)local_1c;
}
control_file_fd = 0xffffffff;
last_checkpoint_lsn = 0;
last_logno = 0;
recovery_failures = 0;
max_trid_in_control_file = 0;
return uVar3;
}
return 0;
}
|
|
57,522
|
google::protobuf::compiler::objectivec::ClassNameWorker[abi:cxx11](google::protobuf::EnumDescriptor const*)
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc
|
std::string ClassNameWorker(const EnumDescriptor* descriptor) {
std::string name;
if (descriptor->containing_type() != NULL) {
name = ClassNameWorker(descriptor->containing_type());
name += "_";
}
return name + descriptor->name();
}
|
O0
|
cpp
|
google::protobuf::compiler::objectivec::ClassNameWorker[abi:cxx11](google::protobuf::EnumDescriptor const*):
subq $0x98, %rsp
movq %rdi, 0x20(%rsp)
movq %rdi, %rax
movq %rax, 0x28(%rsp)
movq %rdi, 0x90(%rsp)
movq %rsi, 0x88(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x21390
movq 0x88(%rsp), %rdi
callq 0x58150
movq %rax, 0x30(%rsp)
jmp 0x83b12
movq 0x30(%rsp), %rax
cmpq $0x0, %rax
je 0x83b94
movq 0x88(%rsp), %rdi
callq 0x58150
movq %rax, 0x18(%rsp)
jmp 0x83b31
movq 0x18(%rsp), %rsi
leaq 0x38(%rsp), %rdi
callq 0x839c0
jmp 0x83b42
leaq 0x68(%rsp), %rdi
movq %rdi, 0x10(%rsp)
leaq 0x38(%rsp), %rsi
movq %rsi, 0x8(%rsp)
callq 0x215e0
movq 0x8(%rsp), %rdi
callq 0x21cc8
movq 0x10(%rsp), %rdi
leaq 0x3344be(%rip), %rsi # 0x3b802f
callq 0x21190
jmp 0x83b78
jmp 0x83b94
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x60(%rsp)
movl %eax, 0x5c(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x21cc8
jmp 0x83bd3
movq 0x88(%rsp), %rdi
callq 0x58160
movq %rax, (%rsp)
jmp 0x83ba7
movq (%rsp), %rdx
movq 0x20(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x369d0
jmp 0x83bbc
leaq 0x68(%rsp), %rdi
callq 0x21cc8
movq 0x28(%rsp), %rax
addq $0x98, %rsp
retq
movq 0x60(%rsp), %rdi
callq 0x21700
nopl (%rax)
|
_ZN6google8protobuf8compiler10objectivec15ClassNameWorkerB5cxx11EPKNS0_14EnumDescriptorE:
sub rsp, 98h
mov qword ptr [rsp+98h+var_78], rdi
mov rax, rdi
mov [rsp+98h+var_70], rax
mov [rsp+98h+var_8], rdi
mov [rsp+98h+var_10], rsi
lea rdi, [rsp+98h+var_30]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void)
mov rdi, [rsp+98h+var_10]; this
call _ZNK6google8protobuf14EnumDescriptor15containing_typeEv; google::protobuf::EnumDescriptor::containing_type(void)
mov [rsp+98h+var_68], rax
jmp short $+2
loc_83B12:
mov rax, [rsp+98h+var_68]
cmp rax, 0
jz short loc_83B94
mov rdi, [rsp+98h+var_10]; this
call _ZNK6google8protobuf14EnumDescriptor15containing_typeEv; google::protobuf::EnumDescriptor::containing_type(void)
mov [rsp+98h+var_80], rax
jmp short $+2
loc_83B31:
mov rsi, [rsp+98h+var_80]
lea rdi, [rsp+98h+var_60]
call _ZN6google8protobuf8compiler10objectivec15ClassNameWorkerB5cxx11EPKNS0_10DescriptorE; google::protobuf::compiler::objectivec::ClassNameWorker(google::protobuf::Descriptor const*)
jmp short $+2
loc_83B42:
lea rdi, [rsp+98h+var_30]
mov [rsp+98h+var_88], rdi
lea rsi, [rsp+98h+var_60]
mov [rsp+98h+var_90], rsi
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [rsp+98h+var_90]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rdi, [rsp+98h+var_88]
lea rsi, aPb_0+2; "_"
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc; std::string::operator+=(char const*)
jmp short $+2
loc_83B78:
jmp short loc_83B94
mov rcx, rax
mov eax, edx
mov [rsp+arg_58], rcx
mov [rsp+arg_54], eax
lea rdi, [rsp+arg_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_83BD3
loc_83B94:
mov rdi, [rsp+98h+var_10]
call _ZNK6google8protobuf14EnumDescriptor4nameB5cxx11Ev; google::protobuf::EnumDescriptor::name(void)
mov qword ptr [rsp+98h+var_98], rax; int
jmp short $+2
loc_83BA7:
mov rdx, qword ptr [rsp+98h+var_98]; int
mov rdi, qword ptr [rsp+98h+var_78]; int
lea rsi, [rsp+98h+var_30]; int
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_SA_; std::operator+<char>(std::string const&,std::string const&)
jmp short $+2
loc_83BBC:
lea rdi, [rsp+98h+var_30]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rax, [rsp+98h+var_70]
add rsp, 98h
retn
loc_83BD3:
mov rdi, [rsp+arg_58]
call __Unwind_Resume
|
long long google::protobuf::compiler::objectivec::ClassNameWorker[abi:cxx11](
long long a1,
google::protobuf::EnumDescriptor *a2)
{
long long v3; // [rsp+0h] [rbp-98h]
google::protobuf::Descriptor *v4; // [rsp+18h] [rbp-80h]
_BYTE v5[48]; // [rsp+38h] [rbp-60h] BYREF
int v6[8]; // [rsp+68h] [rbp-30h] BYREF
google::protobuf::EnumDescriptor *v7; // [rsp+88h] [rbp-10h]
long long v8; // [rsp+90h] [rbp-8h]
v8 = a1;
v7 = a2;
std::string::basic_string(v6);
if ( google::protobuf::EnumDescriptor::containing_type(v7) )
{
v4 = (google::protobuf::Descriptor *)google::protobuf::EnumDescriptor::containing_type(v7);
google::protobuf::compiler::objectivec::ClassNameWorker[abi:cxx11]((long long)v5, v4);
std::string::operator=(v6, v5);
std::string::~string(v5);
std::string::operator+=(v6, "_");
}
v3 = google::protobuf::EnumDescriptor::name[abi:cxx11]((long long)v7);
std::operator+<char>(a1, (long long)v6, v3);
std::string::~string(v6);
return a1;
}
|
ClassNameWorker[abi:cxx11]:
SUB RSP,0x98
MOV qword ptr [RSP + 0x20],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP + 0x90],RDI
MOV qword ptr [RSP + 0x88],RSI
LEA RDI,[RSP + 0x68]
CALL 0x00121390
MOV RDI,qword ptr [RSP + 0x88]
LAB_00183b06:
CALL 0x00158150
MOV qword ptr [RSP + 0x30],RAX
JMP 0x00183b12
LAB_00183b12:
MOV RAX,qword ptr [RSP + 0x30]
CMP RAX,0x0
JZ 0x00183b94
MOV RDI,qword ptr [RSP + 0x88]
CALL 0x00158150
MOV qword ptr [RSP + 0x18],RAX
JMP 0x00183b31
LAB_00183b31:
MOV RSI,qword ptr [RSP + 0x18]
LEA RDI,[RSP + 0x38]
CALL 0x001839c0
JMP 0x00183b42
LAB_00183b42:
LEA RDI,[RSP + 0x68]
MOV qword ptr [RSP + 0x10],RDI
LEA RSI,[RSP + 0x38]
MOV qword ptr [RSP + 0x8],RSI
CALL 0x001215e0
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x00121cc8
MOV RDI,qword ptr [RSP + 0x10]
LEA RSI,[0x4b802f]
CALL 0x00121190
JMP 0x00183b78
LAB_00183b78:
JMP 0x00183b94
LAB_00183b94:
MOV RDI,qword ptr [RSP + 0x88]
CALL 0x00158160
MOV qword ptr [RSP],RAX
JMP 0x00183ba7
LAB_00183ba7:
MOV RDX,qword ptr [RSP]
MOV RDI,qword ptr [RSP + 0x20]
LEA RSI,[RSP + 0x68]
CALL 0x001369d0
LAB_00183bba:
JMP 0x00183bbc
LAB_00183bbc:
LEA RDI,[RSP + 0x68]
CALL 0x00121cc8
MOV RAX,qword ptr [RSP + 0x28]
ADD RSP,0x98
RET
|
/* google::protobuf::compiler::objectivec::ClassNameWorker[abi:cxx11](google::protobuf::EnumDescriptor
const*) */
objectivec * __thiscall
google::protobuf::compiler::objectivec::ClassNameWorker_abi_cxx11_
(objectivec *this,EnumDescriptor *param_1)
{
long lVar1;
Descriptor *pDVar2;
objectivec local_60 [48];
string local_30 [32];
EnumDescriptor *local_10;
objectivec *local_8;
local_10 = param_1;
local_8 = this;
std::__cxx11::string::string(local_30);
/* try { // try from 00183b06 to 00183bb9 has its CatchHandler @ 00183b7a */
lVar1 = EnumDescriptor::containing_type(local_10);
if (lVar1 != 0) {
pDVar2 = (Descriptor *)EnumDescriptor::containing_type(local_10);
ClassNameWorker_abi_cxx11_(local_60,pDVar2);
std::__cxx11::string::operator=(local_30,(string *)local_60);
std::__cxx11::string::~string((string *)local_60);
std::__cxx11::string::operator+=(local_30,"_");
}
EnumDescriptor::name_abi_cxx11_(local_10);
std::operator+((string *)this,local_30);
std::__cxx11::string::~string(local_30);
return this;
}
|
|
57,523
|
mbr_join
|
eloqsql/storage/maria/ma_rt_split.c
|
static void mbr_join(double *a, const double *b, int n_dim)
{
double *end= a + n_dim * 2;
do
{
if (a[0] > b[0])
a[0]= b[0];
if (a[1] < b[1])
a[1]= b[1];
a+= 2;
b+= 2;
} while (a != end);
}
|
O0
|
c
|
mbr_join:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movl -0x14(%rbp), %ecx
shll %ecx
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movsd (%rax), %xmm0
movq -0x10(%rbp), %rax
ucomisd (%rax), %xmm0
jbe 0x9bef8
movq -0x10(%rbp), %rax
movsd (%rax), %xmm0
movq -0x8(%rbp), %rax
movsd %xmm0, (%rax)
movq -0x8(%rbp), %rax
movsd 0x8(%rax), %xmm1
movq -0x10(%rbp), %rax
movsd 0x8(%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x9bf22
movq -0x10(%rbp), %rax
movsd 0x8(%rax), %xmm0
movq -0x8(%rbp), %rax
movsd %xmm0, 0x8(%rax)
movq -0x8(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpq -0x20(%rbp), %rax
jne 0x9bed6
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
mbr_join:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov rax, [rbp+var_8]
mov ecx, [rbp+var_14]
shl ecx, 1
movsxd rcx, ecx
shl rcx, 3
add rax, rcx
mov [rbp+var_20], rax
loc_9BED6:
mov rax, [rbp+var_8]
movsd xmm0, qword ptr [rax]
mov rax, [rbp+var_10]
ucomisd xmm0, qword ptr [rax]
jbe short loc_9BEF8
mov rax, [rbp+var_10]
movsd xmm0, qword ptr [rax]
mov rax, [rbp+var_8]
movsd qword ptr [rax], xmm0
loc_9BEF8:
mov rax, [rbp+var_8]
movsd xmm1, qword ptr [rax+8]
mov rax, [rbp+var_10]
movsd xmm0, qword ptr [rax+8]
ucomisd xmm0, xmm1
jbe short loc_9BF22
mov rax, [rbp+var_10]
movsd xmm0, qword ptr [rax+8]
mov rax, [rbp+var_8]
movsd qword ptr [rax+8], xmm0
loc_9BF22:
mov rax, [rbp+var_8]
add rax, 10h
mov [rbp+var_8], rax
mov rax, [rbp+var_10]
add rax, 10h
mov [rbp+var_10], rax
mov rax, [rbp+var_8]
cmp rax, [rbp+var_20]
jnz short loc_9BED6
pop rbp
retn
|
double * mbr_join(double *a1, double *a2, int a3)
{
double *result; // rax
double *v5; // [rsp+18h] [rbp-8h]
v5 = a1;
do
{
if ( *v5 > *a2 )
*v5 = *a2;
if ( a2[1] > v5[1] )
v5[1] = a2[1];
v5 += 2;
a2 += 2;
result = v5;
}
while ( v5 != &a1[2 * a3] );
return result;
}
|
mbr_join:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RBP + -0x14]
SHL ECX,0x1
MOVSXD RCX,ECX
SHL RCX,0x3
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
LAB_0019bed6:
MOV RAX,qword ptr [RBP + -0x8]
MOVSD XMM0,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
UCOMISD XMM0,qword ptr [RAX]
JBE 0x0019bef8
MOV RAX,qword ptr [RBP + -0x10]
MOVSD XMM0,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x8]
MOVSD qword ptr [RAX],XMM0
LAB_0019bef8:
MOV RAX,qword ptr [RBP + -0x8]
MOVSD XMM1,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOVSD XMM0,qword ptr [RAX + 0x8]
UCOMISD XMM0,XMM1
JBE 0x0019bf22
MOV RAX,qword ptr [RBP + -0x10]
MOVSD XMM0,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x8]
MOVSD qword ptr [RAX + 0x8],XMM0
LAB_0019bf22:
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x10
MOV qword ptr [RBP + -0x8],RAX
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x10
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x0019bed6
POP RBP
RET
|
void mbr_join(double *param_1,double *param_2,int param_3)
{
double *local_18;
double *local_10;
local_18 = param_2;
local_10 = param_1;
do {
if (*local_18 <= *local_10 && *local_10 != *local_18) {
*local_10 = *local_18;
}
if (local_10[1] < local_18[1]) {
local_10[1] = local_18[1];
}
local_10 = local_10 + 2;
local_18 = local_18 + 2;
} while (local_10 != param_1 + (param_3 << 1));
return;
}
|
|
57,524
|
allocate_dynamic
|
eloqsql/mysys/array.c
|
my_bool allocate_dynamic(DYNAMIC_ARRAY *array, uint max_elements)
{
DBUG_ENTER("allocate_dynamic");
if (max_elements >= array->max_element)
{
uint size;
uchar *new_ptr;
size= (max_elements + array->alloc_increment)/array->alloc_increment;
size*= array->alloc_increment;
if (array->malloc_flags & MY_INIT_BUFFER_USED)
{
/*
In this senerio, the buffer is statically preallocated,
so we have to create an all-new malloc since we overflowed
*/
if (!(new_ptr= (uchar *) my_malloc(array->m_psi_key, size *
array->size_of_element,
MYF(array->malloc_flags | MY_WME))))
DBUG_RETURN(0);
memcpy(new_ptr, array->buffer,
array->elements * array->size_of_element);
array->malloc_flags&= ~MY_INIT_BUFFER_USED;
}
else if (!(new_ptr= (uchar*) my_realloc(array->m_psi_key,
array->buffer,size *
array->size_of_element,
MYF(MY_WME | MY_ALLOW_ZERO_PTR |
array->malloc_flags))))
DBUG_RETURN(TRUE);
array->buffer= new_ptr;
array->max_element= size;
}
DBUG_RETURN(FALSE);
}
|
O3
|
c
|
allocate_dynamic:
cmpl %esi, 0xc(%rdi)
jbe 0xac821
xorl %eax, %eax
retq
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movl 0x10(%rdi), %ecx
movl 0x18(%rdi), %edi
addl %ecx, %ebx
movl %ebx, %eax
xorl %edx, %edx
divl %ecx
subl %edx, %ebx
movq 0x20(%r14), %rcx
btl $0x8, %ecx
jb 0xac869
movq (%r14), %rsi
movl 0x14(%r14), %edx
imull %ebx, %edx
orq $0x50, %rcx
callq 0xbf444
movq %rax, %r15
testq %rax, %rax
jne 0xac8a1
movb $0x1, %al
jmp 0xac8aa
movl 0x14(%r14), %esi
imull %ebx, %esi
orq $0x10, %rcx
movq %rcx, %rdx
callq 0xbf321
testq %rax, %rax
je 0xac8a8
movq %rax, %r15
movq (%r14), %rsi
movl 0x14(%r14), %edx
imull 0x8(%r14), %edx
movq %rax, %rdi
callq 0x2a0b0
movl $0xfffffeff, %eax # imm = 0xFFFFFEFF
andq %rax, 0x20(%r14)
movq %r15, (%r14)
movl %ebx, 0xc(%r14)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
allocate_dynamic:
cmp [rdi+0Ch], esi
jbe short loc_AC821
xor eax, eax
retn
loc_AC821:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov ebx, esi
mov r14, rdi
mov ecx, [rdi+10h]
mov edi, [rdi+18h]
add ebx, ecx
mov eax, ebx
xor edx, edx
div ecx
sub ebx, edx
mov rcx, [r14+20h]
bt ecx, 8
jb short loc_AC869
mov rsi, [r14]
mov edx, [r14+14h]
imul edx, ebx
or rcx, 50h
call my_realloc
mov r15, rax
test rax, rax
jnz short loc_AC8A1
mov al, 1
jmp short loc_AC8AA
loc_AC869:
mov esi, [r14+14h]
imul esi, ebx
or rcx, 10h
mov rdx, rcx
call my_malloc
test rax, rax
jz short loc_AC8A8
mov r15, rax
mov rsi, [r14]
mov edx, [r14+14h]
imul edx, [r14+8]
mov rdi, rax
call _memcpy
mov eax, 0FFFFFEFFh
and [r14+20h], rax
loc_AC8A1:
mov [r14], r15
mov [r14+0Ch], ebx
loc_AC8A8:
xor eax, eax
loc_AC8AA:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long allocate_dynamic(long long a1, unsigned int a2)
{
unsigned int v4; // ecx
long long v5; // rdi
unsigned int v6; // ebx
long long v7; // rcx
long long v8; // r15
long long v9; // rax
if ( *(_DWORD *)(a1 + 12) > a2 )
return 0LL;
v4 = *(_DWORD *)(a1 + 16);
v5 = *(unsigned int *)(a1 + 24);
v6 = v4 + a2 - (v4 + a2) % v4;
v7 = *(_QWORD *)(a1 + 32);
if ( (v7 & 0x100) == 0 )
{
v8 = my_realloc(v5, *(_QWORD *)a1, v6 * *(_DWORD *)(a1 + 20), v7 | 0x50);
if ( !v8 )
return 1LL;
goto LABEL_8;
}
v9 = my_malloc(v5, v6 * *(_DWORD *)(a1 + 20), v7 | 0x10);
if ( v9 )
{
v8 = v9;
memcpy(v9, *(_QWORD *)a1, (unsigned int)(*(_DWORD *)(a1 + 8) * *(_DWORD *)(a1 + 20)));
*(_QWORD *)(a1 + 32) &= 0xFFFFFEFFuLL;
LABEL_8:
*(_QWORD *)a1 = v8;
*(_DWORD *)(a1 + 12) = v6;
}
return 0LL;
}
|
allocate_dynamic:
CMP dword ptr [RDI + 0xc],ESI
JBE 0x001ac821
XOR EAX,EAX
RET
LAB_001ac821:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EBX,ESI
MOV R14,RDI
MOV ECX,dword ptr [RDI + 0x10]
MOV EDI,dword ptr [RDI + 0x18]
ADD EBX,ECX
MOV EAX,EBX
XOR EDX,EDX
DIV ECX
SUB EBX,EDX
MOV RCX,qword ptr [R14 + 0x20]
BT ECX,0x8
JC 0x001ac869
MOV RSI,qword ptr [R14]
MOV EDX,dword ptr [R14 + 0x14]
IMUL EDX,EBX
OR RCX,0x50
CALL 0x001bf444
MOV R15,RAX
TEST RAX,RAX
JNZ 0x001ac8a1
MOV AL,0x1
JMP 0x001ac8aa
LAB_001ac869:
MOV ESI,dword ptr [R14 + 0x14]
IMUL ESI,EBX
OR RCX,0x10
MOV RDX,RCX
CALL 0x001bf321
TEST RAX,RAX
JZ 0x001ac8a8
MOV R15,RAX
MOV RSI,qword ptr [R14]
MOV EDX,dword ptr [R14 + 0x14]
IMUL EDX,dword ptr [R14 + 0x8]
MOV RDI,RAX
CALL 0x0012a0b0
MOV EAX,0xfffffeff
AND qword ptr [R14 + 0x20],RAX
LAB_001ac8a1:
MOV qword ptr [R14],R15
MOV dword ptr [R14 + 0xc],EBX
LAB_001ac8a8:
XOR EAX,EAX
LAB_001ac8aa:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
int8 allocate_dynamic(long *param_1,uint param_2)
{
ulong uVar1;
void *__dest;
int iVar2;
if (param_2 < *(uint *)((long)param_1 + 0xc)) {
return 0;
}
param_2 = param_2 + *(uint *)(param_1 + 2);
iVar2 = param_2 - param_2 % *(uint *)(param_1 + 2);
uVar1 = param_1[4];
if (((uint)uVar1 >> 8 & 1) == 0) {
__dest = (void *)my_realloc((int)param_1[3],*param_1,*(int *)((long)param_1 + 0x14) * iVar2,
uVar1 | 0x50);
if (__dest == (void *)0x0) {
return 1;
}
}
else {
__dest = (void *)my_malloc((int)param_1[3],*(int *)((long)param_1 + 0x14) * iVar2,uVar1 | 0x10);
if (__dest == (void *)0x0) {
return 0;
}
memcpy(__dest,(void *)*param_1,(ulong)(uint)(*(int *)((long)param_1 + 0x14) * (int)param_1[1]));
param_1[4] = param_1[4] & 0xfffffeff;
}
*param_1 = (long)__dest;
*(int *)((long)param_1 + 0xc) = iVar2;
return 0;
}
|
|
57,525
|
bitmap_bits_set
|
eloqsql/mysys/my_bitmap.c
|
uint bitmap_bits_set(const MY_BITMAP *map)
{
my_bitmap_map *data_ptr= map->bitmap;
my_bitmap_map *end= map->last_word_ptr;
uint res= 0;
DBUG_ASSERT(map->bitmap);
for (; data_ptr < end; data_ptr++)
res+= my_count_bits_uint32(*data_ptr);
/*Reset last bits to zero*/
res+= my_count_bits_uint32(*map->last_word_ptr & ~map->last_word_mask);
return res;
}
|
O3
|
c
|
bitmap_bits_set:
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rdx
movq 0x8(%rdi), %rax
xorl %ecx, %ecx
cmpq %rax, %rdx
jae 0x9ec98
xorl %ecx, %ecx
movl $0x33333333, %esi # imm = 0x33333333
movl (%rdx), %r8d
movl %r8d, %r9d
shrl %r9d
andl $0x55555555, %r9d # imm = 0x55555555
subl %r9d, %r8d
movl %r8d, %r9d
andl %esi, %r9d
shrl $0x2, %r8d
andl %esi, %r8d
addl %r9d, %r8d
movl %r8d, %r9d
shrl $0x4, %r9d
addl %r8d, %r9d
andl $0xf0f0f0f, %r9d # imm = 0xF0F0F0F
imull $0x1010101, %r9d, %r8d # imm = 0x1010101
shrl $0x18, %r8d
addl %r8d, %ecx
addq $0x4, %rdx
cmpq %rax, %rdx
jb 0x9ec4d
movl 0x18(%rdi), %edx
notl %edx
andl (%rax), %edx
movl %edx, %eax
shrl %eax
andl $0x55555555, %eax # imm = 0x55555555
subl %eax, %edx
movl $0x33333333, %eax # imm = 0x33333333
movl %edx, %esi
andl %eax, %esi
shrl $0x2, %edx
andl %eax, %edx
addl %esi, %edx
movl %edx, %eax
shrl $0x4, %eax
addl %edx, %eax
andl $0xf0f0f0f, %eax # imm = 0xF0F0F0F
imull $0x1010101, %eax, %eax # imm = 0x1010101
shrl $0x18, %eax
addl %ecx, %eax
popq %rbp
retq
|
bitmap_bits_set:
push rbp
mov rbp, rsp
mov rdx, [rdi]
mov rax, [rdi+8]
xor ecx, ecx
cmp rdx, rax
jnb short loc_9EC98
xor ecx, ecx
mov esi, 33333333h
loc_9EC4D:
mov r8d, [rdx]
mov r9d, r8d
shr r9d, 1
and r9d, 55555555h
sub r8d, r9d
mov r9d, r8d
and r9d, esi
shr r8d, 2
and r8d, esi
add r8d, r9d
mov r9d, r8d
shr r9d, 4
add r9d, r8d
and r9d, 0F0F0F0Fh
imul r8d, r9d, 1010101h
shr r8d, 18h
add ecx, r8d
add rdx, 4
cmp rdx, rax
jb short loc_9EC4D
loc_9EC98:
mov edx, [rdi+18h]
not edx
and edx, [rax]
mov eax, edx
shr eax, 1
and eax, 55555555h
sub edx, eax
mov eax, 33333333h
mov esi, edx
and esi, eax
shr edx, 2
and edx, eax
add edx, esi
mov eax, edx
shr eax, 4
add eax, edx
and eax, 0F0F0F0Fh
imul eax, 1010101h
shr eax, 18h
add eax, ecx
pop rbp
retn
|
long long bitmap_bits_set(long long a1)
{
_DWORD *v1; // rdx
_DWORD *v2; // rax
int v3; // ecx
unsigned int v4; // edx
v1 = *(_DWORD **)a1;
v2 = *(_DWORD **)(a1 + 8);
v3 = 0;
if ( *(_QWORD *)a1 < (unsigned long long)v2 )
{
v3 = 0;
do
{
v3 += (16843009
* ((((*v1 - ((*v1 >> 1) & 0x55555555)) & 0x33333333)
+ (((*v1 - ((*v1 >> 1) & 0x55555555u)) >> 2) & 0x33333333)
+ ((((*v1 - ((*v1 >> 1) & 0x55555555)) & 0x33333333)
+ (((*v1 - ((*v1 >> 1) & 0x55555555u)) >> 2) & 0x33333333)) >> 4)) & 0xF0F0F0F)) >> 24;
++v1;
}
while ( v1 < v2 );
}
v4 = (*v2 & ~*(_DWORD *)(a1 + 24)) - (((*v2 & (unsigned int)~*(_DWORD *)(a1 + 24)) >> 1) & 0x55555555);
return v3
+ ((16843009
* (((v4 & 0x33333333) + ((v4 >> 2) & 0x33333333) + (((v4 & 0x33333333) + ((v4 >> 2) & 0x33333333)) >> 4)) & 0xF0F0F0F)) >> 24);
}
|
bitmap_bits_set:
PUSH RBP
MOV RBP,RSP
MOV RDX,qword ptr [RDI]
MOV RAX,qword ptr [RDI + 0x8]
XOR ECX,ECX
CMP RDX,RAX
JNC 0x0019ec98
XOR ECX,ECX
MOV ESI,0x33333333
LAB_0019ec4d:
MOV R8D,dword ptr [RDX]
MOV R9D,R8D
SHR R9D,0x1
AND R9D,0x55555555
SUB R8D,R9D
MOV R9D,R8D
AND R9D,ESI
SHR R8D,0x2
AND R8D,ESI
ADD R8D,R9D
MOV R9D,R8D
SHR R9D,0x4
ADD R9D,R8D
AND R9D,0xf0f0f0f
IMUL R8D,R9D,0x1010101
SHR R8D,0x18
ADD ECX,R8D
ADD RDX,0x4
CMP RDX,RAX
JC 0x0019ec4d
LAB_0019ec98:
MOV EDX,dword ptr [RDI + 0x18]
NOT EDX
AND EDX,dword ptr [RAX]
MOV EAX,EDX
SHR EAX,0x1
AND EAX,0x55555555
SUB EDX,EAX
MOV EAX,0x33333333
MOV ESI,EDX
AND ESI,EAX
SHR EDX,0x2
AND EDX,EAX
ADD EDX,ESI
MOV EAX,EDX
SHR EAX,0x4
ADD EAX,EDX
AND EAX,0xf0f0f0f
IMUL EAX,EAX,0x1010101
SHR EAX,0x18
ADD EAX,ECX
POP RBP
RET
|
int bitmap_bits_set(int8 *param_1)
{
uint *puVar1;
int iVar2;
uint *puVar3;
uint uVar4;
puVar3 = (uint *)*param_1;
puVar1 = (uint *)param_1[1];
iVar2 = 0;
if (puVar3 < puVar1) {
iVar2 = 0;
do {
uVar4 = *puVar3 - (*puVar3 >> 1 & 0x55555555);
uVar4 = (uVar4 >> 2 & 0x33333333) + (uVar4 & 0x33333333);
iVar2 = iVar2 + (((uVar4 >> 4) + uVar4 & 0xf0f0f0f) * 0x1010101 >> 0x18);
puVar3 = puVar3 + 1;
} while (puVar3 < puVar1);
}
uVar4 = (~*(uint *)(param_1 + 3) & *puVar1) -
((~*(uint *)(param_1 + 3) & *puVar1) >> 1 & 0x55555555);
uVar4 = (uVar4 >> 2 & 0x33333333) + (uVar4 & 0x33333333);
return (((uVar4 >> 4) + uVar4 & 0xf0f0f0f) * 0x1010101 >> 0x18) + iVar2;
}
|
|
57,526
|
ma_update_static_record
|
eloqsql/storage/maria/ma_statrec.c
|
my_bool _ma_update_static_record(MARIA_HA *info, MARIA_RECORD_POS pos,
const uchar *oldrec __attribute__ ((unused)),
const uchar *record)
{
info->rec_cache.seek_not_done=1; /* We have done a seek */
return (info->s->file_write(info,
record, info->s->base.reclength,
pos,
MYF(MY_NABP)) != 0);
}
|
O0
|
c
|
ma_update_static_record:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movl $0x1, 0x598(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x6e8(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
movq 0x398(%rcx), %rdx
movq -0x10(%rbp), %rcx
movl $0x4, %r8d
callq *%rax
cmpq $0x0, %rax
setne %al
andb $0x1, %al
movzbl %al, %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
_ma_update_static_record:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov rax, [rbp+var_8]
mov dword ptr [rax+598h], 1
mov rax, [rbp+var_8]
mov rax, [rax]
mov rax, [rax+6E8h]
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_20]
mov rcx, [rbp+var_8]
mov rcx, [rcx]
mov rdx, [rcx+398h]
mov rcx, [rbp+var_10]
mov r8d, 4
call rax
cmp rax, 0
setnz al
and al, 1
movzx eax, al
add rsp, 20h
pop rbp
retn
|
_BOOL8 ma_update_static_record(_DWORD *a1, long long a2, long long a3, long long a4, long long a5, long long a6)
{
a1[358] = 1;
return (*(long long ( **)(_DWORD *, long long, _QWORD, long long, long long, long long, long long, long long, long long, _DWORD *))(*(_QWORD *)a1 + 1768LL))(
a1,
a4,
*(_QWORD *)(*(_QWORD *)a1 + 920LL),
a2,
4LL,
a6,
a4,
a3,
a2,
a1) != 0;
}
|
_ma_update_static_record:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x598],0x1
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x6e8]
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RCX]
MOV RDX,qword ptr [RCX + 0x398]
MOV RCX,qword ptr [RBP + -0x10]
MOV R8D,0x4
CALL RAX
CMP RAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
ADD RSP,0x20
POP RBP
RET
|
bool _ma_update_static_record
(long *param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6)
{
long lVar1;
*(int4 *)(param_1 + 0xb3) = 1;
lVar1 = (**(code **)(*param_1 + 0x6e8))
(param_1,param_4,*(int8 *)(*param_1 + 0x398),param_2,4,param_6,param_4,
param_3);
return lVar1 != 0;
}
|
|
57,527
|
lf_dynarray_lvalue
|
eloqsql/mysys/lf_dynarray.c
|
void *lf_dynarray_lvalue(LF_DYNARRAY *array, uint idx)
{
void * ptr, * volatile * ptr_ptr= 0;
int i;
for (i= LF_DYNARRAY_LEVELS-1; idx < dynarray_idxes_in_prev_levels[i]; i--)
/* no-op */;
ptr_ptr= &array->level[i];
idx-= dynarray_idxes_in_prev_levels[i];
for (; i > 0; i--)
{
if (!(ptr= *ptr_ptr))
{
void *alloc= my_malloc(key_memory_lf_dynarray, LF_DYNARRAY_LEVEL_LENGTH *
sizeof(void *), MYF(MY_WME|MY_ZEROFILL));
if (unlikely(!alloc))
return(NULL);
if (my_atomic_casptr(ptr_ptr, &ptr, alloc))
ptr= alloc;
else
my_free(alloc);
}
ptr_ptr= ((void **)ptr) + idx / dynarray_idxes_in_prev_level[i];
idx%= dynarray_idxes_in_prev_level[i];
}
if (!(ptr= *ptr_ptr))
{
uchar *alloc, *data;
alloc= my_malloc(key_memory_lf_dynarray,
LF_DYNARRAY_LEVEL_LENGTH * array->size_of_element +
MY_MAX(array->size_of_element, sizeof(void *)),
MYF(MY_WME|MY_ZEROFILL));
if (unlikely(!alloc))
return(NULL);
/* reserve the space for free() address */
data= alloc + sizeof(void *);
{ /* alignment */
intptr mod= ((intptr)data) % array->size_of_element;
if (mod)
data+= array->size_of_element - mod;
}
((void **)data)[-1]= alloc; /* free() will need the original pointer */
if (my_atomic_casptr(ptr_ptr, &ptr, data))
ptr= data;
else
my_free(alloc);
}
return ((uchar*)ptr) + array->size_of_element * idx;
}
|
O0
|
c
|
lf_dynarray_lvalue:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq $0x0, -0x28(%rbp)
movl $0x3, -0x2c(%rbp)
movl -0x14(%rbp), %eax
movslq -0x2c(%rbp), %rdx
leaq 0x57ed1(%rip), %rcx # 0xb3ff0
cmpq (%rcx,%rdx,8), %rax
jae 0x5c132
jmp 0x5c127
movl -0x2c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x5c111
movq -0x10(%rbp), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movslq -0x2c(%rbp), %rcx
leaq 0x57ea0(%rip), %rax # 0xb3ff0
movq (%rax,%rcx,8), %rcx
movl -0x14(%rbp), %eax
subq %rcx, %rax
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x2c(%rbp)
jle 0x5c27a
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x5c21c
leaq 0x3b2ab9(%rip), %rax # 0x40ec3c
movl (%rax), %edi
movl $0x800, %esi # imm = 0x800
movl $0x30, %edx
callq 0x58d60
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x5c1c7
movq $0x0, -0x8(%rbp)
jmp 0x5c3ef
movq -0x28(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rax
movq -0x40(%rbp), %rdx
lock
cmpxchgq %rdx, (%rcx)
movq %rax, %rcx
sete %al
movb %al, -0x79(%rbp)
movq %rcx, -0x78(%rbp)
testb $0x1, %al
jne 0x5c1f9
movq -0x78(%rbp), %rax
movq %rax, -0x20(%rbp)
movb -0x79(%rbp), %al
andb $0x1, %al
movb %al, -0x41(%rbp)
testb $0x1, -0x41(%rbp)
je 0x5c211
movq -0x38(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x5c21a
movq -0x38(%rbp), %rdi
callq 0x590e0
jmp 0x5c21c
movq -0x20(%rbp), %rax
movq %rax, -0x88(%rbp)
movl -0x14(%rbp), %eax
movslq -0x2c(%rbp), %rsi
leaq 0x57ddb(%rip), %rcx # 0xb4010
xorl %edx, %edx
divq (%rcx,%rsi,8)
movq %rax, %rcx
movq -0x88(%rbp), %rax
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movslq -0x2c(%rbp), %rcx
leaq 0x57db5(%rip), %rax # 0xb4010
movq (%rax,%rcx,8), %rcx
movl -0x14(%rbp), %eax
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, -0x14(%rbp)
movl -0x2c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x5c15d
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x5c3d7
leaq 0x3b29a6(%rip), %rax # 0x40ec3c
movl (%rax), %eax
movl %eax, -0x94(%rbp)
movq -0x10(%rbp), %rax
movl 0x20(%rax), %eax
shll $0x8, %eax
movl %eax, %eax
movq %rax, -0x90(%rbp)
movq -0x10(%rbp), %rax
movl 0x20(%rax), %eax
cmpq $0x8, %rax
jbe 0x5c2ce
movq -0x10(%rbp), %rax
movl 0x20(%rax), %eax
movq %rax, -0xa0(%rbp)
jmp 0x5c2dc
movl $0x8, %eax
movq %rax, -0xa0(%rbp)
jmp 0x5c2dc
movl -0x94(%rbp), %edi
movq -0x90(%rbp), %rsi
movq -0xa0(%rbp), %rax
addq %rax, %rsi
movl $0x30, %edx
callq 0x58d60
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x5c330
movq $0x0, -0x8(%rbp)
jmp 0x5c3ef
movq -0x50(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq -0x10(%rbp), %rcx
movl 0x20(%rcx), %ecx
xorl %edx, %edx
divq %rcx
movq %rdx, -0x60(%rbp)
cmpq $0x0, -0x60(%rbp)
je 0x5c36a
movq -0x10(%rbp), %rax
movl 0x20(%rax), %eax
subq -0x60(%rbp), %rax
addq -0x58(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x50(%rbp), %rcx
movq -0x58(%rbp), %rax
movq %rcx, -0x8(%rax)
movq -0x28(%rbp), %rcx
movq -0x58(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x20(%rbp), %rax
movq -0x68(%rbp), %rdx
lock
cmpxchgq %rdx, (%rcx)
movq %rax, %rcx
sete %al
movb %al, -0xa9(%rbp)
movq %rcx, -0xa8(%rbp)
testb $0x1, %al
jne 0x5c3b1
movq -0xa8(%rbp), %rax
movq %rax, -0x20(%rbp)
movb -0xa9(%rbp), %al
andb $0x1, %al
movb %al, -0x69(%rbp)
testb $0x1, -0x69(%rbp)
je 0x5c3cc
movq -0x58(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x5c3d5
movq -0x50(%rbp), %rdi
callq 0x590e0
jmp 0x5c3d7
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movl 0x20(%rcx), %ecx
imull -0x14(%rbp), %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xb0, %rsp
popq %rbp
retq
nopl (%rax)
|
lf_dynarray_lvalue:
push rbp
mov rbp, rsp
sub rsp, 0B0h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_28], 0
mov [rbp+var_2C], 3
loc_5C111:
mov eax, [rbp+var_14]
movsxd rdx, [rbp+var_2C]
lea rcx, dynarray_idxes_in_prev_levels
cmp rax, [rcx+rdx*8]
jnb short loc_5C132
jmp short $+2
loc_5C127:
mov eax, [rbp+var_2C]
add eax, 0FFFFFFFFh
mov [rbp+var_2C], eax
jmp short loc_5C111
loc_5C132:
mov rax, [rbp+var_10]
movsxd rcx, [rbp+var_2C]
shl rcx, 3
add rax, rcx
mov [rbp+var_28], rax
movsxd rcx, [rbp+var_2C]
lea rax, dynarray_idxes_in_prev_levels
mov rcx, [rax+rcx*8]
mov eax, [rbp+var_14]
sub rax, rcx
mov [rbp+var_14], eax
loc_5C15D:
cmp [rbp+var_2C], 0
jle loc_5C27A
mov rax, [rbp+var_28]
mov rax, [rax]
mov [rbp+var_20], rax
cmp rax, 0
jnz loc_5C21C
lea rax, key_memory_lf_dynarray
mov edi, [rax]
mov esi, 800h
mov edx, 30h ; '0'
call my_malloc
mov [rbp+var_38], rax
cmp [rbp+var_38], 0
setnz al
xor al, 0FFh
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_5C1C7
mov [rbp+var_8], 0
jmp loc_5C3EF
loc_5C1C7:
mov rcx, [rbp+var_28]
mov rax, [rbp+var_38]
mov [rbp+var_40], rax
mov rax, [rbp+var_20]
mov rdx, [rbp+var_40]
lock cmpxchg [rcx], rdx
mov rcx, rax
setz al
mov [rbp+var_79], al
mov [rbp+var_78], rcx
test al, 1
jnz short loc_5C1F9
mov rax, [rbp+var_78]
mov [rbp+var_20], rax
loc_5C1F9:
mov al, [rbp+var_79]
and al, 1
mov [rbp+var_41], al
test [rbp+var_41], 1
jz short loc_5C211
mov rax, [rbp+var_38]
mov [rbp+var_20], rax
jmp short loc_5C21A
loc_5C211:
mov rdi, [rbp+var_38]
call my_free
loc_5C21A:
jmp short $+2
loc_5C21C:
mov rax, [rbp+var_20]
mov [rbp+var_88], rax
mov eax, [rbp+var_14]
movsxd rsi, [rbp+var_2C]
lea rcx, dynarray_idxes_in_prev_level
xor edx, edx
div qword ptr [rcx+rsi*8]
mov rcx, rax
mov rax, [rbp+var_88]
shl rcx, 3
add rax, rcx
mov [rbp+var_28], rax
movsxd rcx, [rbp+var_2C]
lea rax, dynarray_idxes_in_prev_level
mov rcx, [rax+rcx*8]
mov eax, [rbp+var_14]
xor edx, edx
div rcx
mov eax, edx
mov [rbp+var_14], eax
mov eax, [rbp+var_2C]
add eax, 0FFFFFFFFh
mov [rbp+var_2C], eax
jmp loc_5C15D
loc_5C27A:
mov rax, [rbp+var_28]
mov rax, [rax]
mov [rbp+var_20], rax
cmp rax, 0
jnz loc_5C3D7
lea rax, key_memory_lf_dynarray
mov eax, [rax]
mov [rbp+var_94], eax
mov rax, [rbp+var_10]
mov eax, [rax+20h]
shl eax, 8
mov eax, eax
mov [rbp+var_90], rax
mov rax, [rbp+var_10]
mov eax, [rax+20h]
cmp rax, 8
jbe short loc_5C2CE
mov rax, [rbp+var_10]
mov eax, [rax+20h]
mov [rbp+var_A0], rax
jmp short loc_5C2DC
loc_5C2CE:
mov eax, 8
mov [rbp+var_A0], rax
jmp short $+2
loc_5C2DC:
mov edi, [rbp+var_94]
mov rsi, [rbp+var_90]
mov rax, [rbp+var_A0]
add rsi, rax
mov edx, 30h ; '0'
call my_malloc
mov [rbp+var_50], rax
cmp [rbp+var_50], 0
setnz al
xor al, 0FFh
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_5C330
mov [rbp+var_8], 0
jmp loc_5C3EF
loc_5C330:
mov rax, [rbp+var_50]
add rax, 8
mov [rbp+var_58], rax
mov rax, [rbp+var_58]
mov rcx, [rbp+var_10]
mov ecx, [rcx+20h]
xor edx, edx
div rcx
mov [rbp+var_60], rdx
cmp [rbp+var_60], 0
jz short loc_5C36A
mov rax, [rbp+var_10]
mov eax, [rax+20h]
sub rax, [rbp+var_60]
add rax, [rbp+var_58]
mov [rbp+var_58], rax
loc_5C36A:
mov rcx, [rbp+var_50]
mov rax, [rbp+var_58]
mov [rax-8], rcx
mov rcx, [rbp+var_28]
mov rax, [rbp+var_58]
mov [rbp+var_68], rax
mov rax, [rbp+var_20]
mov rdx, [rbp+var_68]
lock cmpxchg [rcx], rdx
mov rcx, rax
setz al
mov [rbp+var_A9], al
mov [rbp+var_A8], rcx
test al, 1
jnz short loc_5C3B1
mov rax, [rbp+var_A8]
mov [rbp+var_20], rax
loc_5C3B1:
mov al, [rbp+var_A9]
and al, 1
mov [rbp+var_69], al
test [rbp+var_69], 1
jz short loc_5C3CC
mov rax, [rbp+var_58]
mov [rbp+var_20], rax
jmp short loc_5C3D5
loc_5C3CC:
mov rdi, [rbp+var_50]
call my_free
loc_5C3D5:
jmp short $+2
loc_5C3D7:
mov rax, [rbp+var_20]
mov rcx, [rbp+var_10]
mov ecx, [rcx+20h]
imul ecx, [rbp+var_14]
mov ecx, ecx
add rax, rcx
mov [rbp+var_8], rax
loc_5C3EF:
mov rax, [rbp+var_8]
add rsp, 0B0h
pop rbp
retn
|
signed long long lf_dynarray_lvalue(long long a1, unsigned int a2)
{
signed long long v2; // rcx
signed long long v3; // rcx
long long v5; // [rsp+10h] [rbp-A0h]
unsigned long long v6; // [rsp+50h] [rbp-60h]
signed long long v7; // [rsp+58h] [rbp-58h]
long long v8; // [rsp+60h] [rbp-50h]
signed long long v9; // [rsp+78h] [rbp-38h]
int i; // [rsp+84h] [rbp-2Ch]
volatile signed long long *v11; // [rsp+88h] [rbp-28h]
volatile signed long long v12; // [rsp+90h] [rbp-20h]
volatile signed long long v13; // [rsp+90h] [rbp-20h]
unsigned int v14; // [rsp+9Ch] [rbp-14h]
for ( i = 3; (unsigned long long)a2 < dynarray_idxes_in_prev_levels[i]; --i )
;
v11 = (volatile signed long long *)(8LL * i + a1);
v14 = a2 - dynarray_idxes_in_prev_levels[i];
while ( i > 0 )
{
v12 = *v11;
if ( !*v11 )
{
v9 = my_malloc(key_memory_lf_dynarray, 0x800uLL, 48);
if ( !v9 )
return 0LL;
v2 = _InterlockedCompareExchange64(v11, v9, 0LL);
if ( v2 )
{
v12 = v2;
my_free(v9);
}
else
{
v12 = v9;
}
}
v11 = (volatile signed long long *)(8 * ((unsigned long long)v14 / dynarray_idxes_in_prev_level[i]) + v12);
v14 = (unsigned long long)v14 % dynarray_idxes_in_prev_level[i--];
}
v13 = *v11;
if ( *v11 )
return v14 * *(_DWORD *)(a1 + 32) + v13;
if ( *(unsigned int *)(a1 + 32) <= 8uLL )
v5 = 8LL;
else
v5 = *(unsigned int *)(a1 + 32);
v8 = my_malloc(key_memory_lf_dynarray, v5 + (unsigned int)(*(_DWORD *)(a1 + 32) << 8), 48);
if ( v8 )
{
v7 = v8 + 8;
v6 = (v8 + 8) % (unsigned long long)*(unsigned int *)(a1 + 32);
if ( v6 )
v7 += *(unsigned int *)(a1 + 32) - v6;
*(_QWORD *)(v7 - 8) = v8;
v3 = _InterlockedCompareExchange64(v11, v7, 0LL);
if ( v3 )
{
v13 = v3;
my_free(v8);
}
else
{
v13 = v7;
}
return v14 * *(_DWORD *)(a1 + 32) + v13;
}
return 0LL;
}
|
lf_dynarray_lvalue:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xb0
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV qword ptr [RBP + -0x28],0x0
MOV dword ptr [RBP + -0x2c],0x3
LAB_0015c111:
MOV EAX,dword ptr [RBP + -0x14]
MOVSXD RDX,dword ptr [RBP + -0x2c]
LEA RCX,[0x1b3ff0]
CMP RAX,qword ptr [RCX + RDX*0x8]
JNC 0x0015c132
JMP 0x0015c127
LAB_0015c127:
MOV EAX,dword ptr [RBP + -0x2c]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x0015c111
LAB_0015c132:
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,dword ptr [RBP + -0x2c]
SHL RCX,0x3
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
MOVSXD RCX,dword ptr [RBP + -0x2c]
LEA RAX,[0x1b3ff0]
MOV RCX,qword ptr [RAX + RCX*0x8]
MOV EAX,dword ptr [RBP + -0x14]
SUB RAX,RCX
MOV dword ptr [RBP + -0x14],EAX
LAB_0015c15d:
CMP dword ptr [RBP + -0x2c],0x0
JLE 0x0015c27a
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,0x0
JNZ 0x0015c21c
LEA RAX,[0x50ec3c]
MOV EDI,dword ptr [RAX]
MOV ESI,0x800
MOV EDX,0x30
CALL 0x00158d60
MOV qword ptr [RBP + -0x38],RAX
CMP qword ptr [RBP + -0x38],0x0
SETNZ AL
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x0015c1c7
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0015c3ef
LAB_0015c1c7:
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x40]
CMPXCHG.LOCK qword ptr [RCX],RDX
MOV RCX,RAX
SETZ AL
MOV byte ptr [RBP + -0x79],AL
MOV qword ptr [RBP + -0x78],RCX
TEST AL,0x1
JNZ 0x0015c1f9
MOV RAX,qword ptr [RBP + -0x78]
MOV qword ptr [RBP + -0x20],RAX
LAB_0015c1f9:
MOV AL,byte ptr [RBP + -0x79]
AND AL,0x1
MOV byte ptr [RBP + -0x41],AL
TEST byte ptr [RBP + -0x41],0x1
JZ 0x0015c211
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0015c21a
LAB_0015c211:
MOV RDI,qword ptr [RBP + -0x38]
CALL 0x001590e0
LAB_0015c21a:
JMP 0x0015c21c
LAB_0015c21c:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x88],RAX
MOV EAX,dword ptr [RBP + -0x14]
MOVSXD RSI,dword ptr [RBP + -0x2c]
LEA RCX,[0x1b4010]
XOR EDX,EDX
DIV qword ptr [RCX + RSI*0x8]
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x88]
SHL RCX,0x3
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
MOVSXD RCX,dword ptr [RBP + -0x2c]
LEA RAX,[0x1b4010]
MOV RCX,qword ptr [RAX + RCX*0x8]
MOV EAX,dword ptr [RBP + -0x14]
XOR EDX,EDX
DIV RCX
MOV EAX,EDX
MOV dword ptr [RBP + -0x14],EAX
MOV EAX,dword ptr [RBP + -0x2c]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x0015c15d
LAB_0015c27a:
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,0x0
JNZ 0x0015c3d7
LEA RAX,[0x50ec3c]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x94],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x20]
SHL EAX,0x8
MOV EAX,EAX
MOV qword ptr [RBP + -0x90],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x20]
CMP RAX,0x8
JBE 0x0015c2ce
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x20]
MOV qword ptr [RBP + -0xa0],RAX
JMP 0x0015c2dc
LAB_0015c2ce:
MOV EAX,0x8
MOV qword ptr [RBP + -0xa0],RAX
JMP 0x0015c2dc
LAB_0015c2dc:
MOV EDI,dword ptr [RBP + -0x94]
MOV RSI,qword ptr [RBP + -0x90]
MOV RAX,qword ptr [RBP + -0xa0]
ADD RSI,RAX
MOV EDX,0x30
CALL 0x00158d60
MOV qword ptr [RBP + -0x50],RAX
CMP qword ptr [RBP + -0x50],0x0
SETNZ AL
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x0015c330
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0015c3ef
LAB_0015c330:
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,0x8
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RCX + 0x20]
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0x60],RDX
CMP qword ptr [RBP + -0x60],0x0
JZ 0x0015c36a
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x20]
SUB RAX,qword ptr [RBP + -0x60]
ADD RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x58],RAX
LAB_0015c36a:
MOV RCX,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RAX + -0x8],RCX
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x68]
CMPXCHG.LOCK qword ptr [RCX],RDX
MOV RCX,RAX
SETZ AL
MOV byte ptr [RBP + -0xa9],AL
MOV qword ptr [RBP + -0xa8],RCX
TEST AL,0x1
JNZ 0x0015c3b1
MOV RAX,qword ptr [RBP + -0xa8]
MOV qword ptr [RBP + -0x20],RAX
LAB_0015c3b1:
MOV AL,byte ptr [RBP + -0xa9]
AND AL,0x1
MOV byte ptr [RBP + -0x69],AL
TEST byte ptr [RBP + -0x69],0x1
JZ 0x0015c3cc
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0015c3d5
LAB_0015c3cc:
MOV RDI,qword ptr [RBP + -0x50]
CALL 0x001590e0
LAB_0015c3d5:
JMP 0x0015c3d7
LAB_0015c3d7:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RCX + 0x20]
IMUL ECX,dword ptr [RBP + -0x14]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x8],RAX
LAB_0015c3ef:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0xb0
POP RBP
RET
|
long lf_dynarray_lvalue(long param_1,uint param_2)
{
ulong uVar1;
long lVar2;
ulong uVar3;
bool bVar4;
ulong local_a8;
ulong local_60;
int local_34;
ulong *local_30;
ulong local_28;
uint local_1c;
local_34 = 3;
while ((ulong)param_2 < *(ulong *)(dynarray_idxes_in_prev_levels + (long)local_34 * 8)) {
local_34 = local_34 + -1;
}
local_30 = (ulong *)(param_1 + (long)local_34 * 8);
local_1c = param_2 - (int)*(int8 *)(dynarray_idxes_in_prev_levels + (long)local_34 * 8);
for (; 0 < local_34; local_34 = local_34 + -1) {
uVar1 = *local_30;
local_28 = uVar1;
if (uVar1 == 0) {
local_28 = my_malloc(key_memory_lf_dynarray,0x800,0x30);
if (local_28 == 0) {
return 0;
}
LOCK();
uVar3 = *local_30;
bVar4 = uVar3 == 0;
if (bVar4) {
*local_30 = local_28;
uVar3 = uVar1;
}
UNLOCK();
if (!bVar4) {
my_free(local_28);
local_28 = uVar3;
}
}
local_30 = (ulong *)(local_28 +
((ulong)local_1c /
*(ulong *)(dynarray_idxes_in_prev_level + (long)local_34 * 8)) * 8);
local_1c = (uint)((ulong)local_1c %
*(ulong *)(dynarray_idxes_in_prev_level + (long)local_34 * 8));
}
uVar1 = *local_30;
local_28 = uVar1;
if (uVar1 == 0) {
if (*(uint *)(param_1 + 0x20) < 9) {
local_a8 = 8;
}
else {
local_a8 = (ulong)*(uint *)(param_1 + 0x20);
}
lVar2 = my_malloc(key_memory_lf_dynarray,(uint)(*(int *)(param_1 + 0x20) << 8) + local_a8,0x30);
if (lVar2 == 0) {
return 0;
}
local_60 = lVar2 + 8;
uVar3 = local_60 % (ulong)*(uint *)(param_1 + 0x20);
if (uVar3 != 0) {
local_60 = (*(uint *)(param_1 + 0x20) - uVar3) + local_60;
}
*(long *)(local_60 - 8) = lVar2;
LOCK();
local_28 = *local_30;
bVar4 = local_28 == 0;
if (bVar4) {
*local_30 = local_60;
local_28 = uVar1;
}
UNLOCK();
if (bVar4) {
local_28 = local_60;
}
else {
my_free(lVar2);
}
}
return local_28 + *(int *)(param_1 + 0x20) * local_1c;
}
|
|
57,528
|
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round(char*, int, unsigned long, unsigned long, unsigned long, unsigned long)
|
monkey531[P]llama/common/json.hpp
|
inline void grisu2_round(char* buf, int len, std::uint64_t dist, std::uint64_t delta,
std::uint64_t rest, std::uint64_t ten_k)
{
JSON_ASSERT(len >= 1);
JSON_ASSERT(dist <= delta);
JSON_ASSERT(rest <= delta);
JSON_ASSERT(ten_k > 0);
// <--------------------------- delta ---->
// <---- dist --------->
// --------------[------------------+-------------------]--------------
// M- w M+
//
// ten_k
// <------>
// <---- rest ---->
// --------------[------------------+----+--------------]--------------
// w V
// = buf * 10^k
//
// ten_k represents a unit-in-the-last-place in the decimal representation
// stored in buf.
// Decrement buf by ten_k while this takes buf closer to w.
// The tests are written in this order to avoid overflow in unsigned
// integer arithmetic.
while (rest < dist
&& delta - rest >= ten_k
&& (rest + ten_k < dist || dist - rest > rest + ten_k - dist))
{
JSON_ASSERT(buf[len - 1] != '0');
buf[len - 1]--;
rest += ten_k;
}
}
|
O0
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round(char*, int, unsigned long, unsigned long, unsigned long, unsigned long):
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movl %esi, 0x2c(%rsp)
movq %rdx, 0x20(%rsp)
movq %rcx, 0x18(%rsp)
movq %r8, 0x10(%rsp)
movq %r9, 0x8(%rsp)
cmpl $0x1, 0x2c(%rsp)
jge 0x19f3e9
leaq 0x7ced4(%rip), %rdi # 0x21c2a3
movl $0x4431, %esi # imm = 0x4431
leaq 0x75efc(%rip), %rdx # 0x2152d7
leaq 0x81eeb(%rip), %rcx # 0x2212cd
movb $0x0, %al
callq 0x5ef40
movq 0x20(%rsp), %rax
cmpq 0x18(%rsp), %rax
jbe 0x19f416
leaq 0x7cea7(%rip), %rdi # 0x21c2a3
movl $0x4432, %esi # imm = 0x4432
leaq 0x75ecf(%rip), %rdx # 0x2152d7
leaq 0x81ec7(%rip), %rcx # 0x2212d6
movb $0x0, %al
callq 0x5ef40
movq 0x10(%rsp), %rax
cmpq 0x18(%rsp), %rax
jbe 0x19f443
leaq 0x7ce7a(%rip), %rdi # 0x21c2a3
movl $0x4433, %esi # imm = 0x4433
leaq 0x75ea2(%rip), %rdx # 0x2152d7
leaq 0x81ea8(%rip), %rcx # 0x2212e4
movb $0x0, %al
callq 0x5ef40
cmpq $0x0, 0x8(%rsp)
ja 0x19f46c
leaq 0x7ce51(%rip), %rdi # 0x21c2a3
movl $0x4434, %esi # imm = 0x4434
leaq 0x75e79(%rip), %rdx # 0x2152d7
leaq 0x81e8d(%rip), %rcx # 0x2212f2
movb $0x0, %al
callq 0x5ef40
jmp 0x19f46e
movq 0x10(%rsp), %rcx
xorl %eax, %eax
cmpq 0x20(%rsp), %rcx
movb %al, 0x7(%rsp)
jae 0x19f4d9
movq 0x18(%rsp), %rcx
subq 0x10(%rsp), %rcx
xorl %eax, %eax
cmpq 0x8(%rsp), %rcx
movb %al, 0x7(%rsp)
jb 0x19f4d9
movq 0x10(%rsp), %rcx
addq 0x8(%rsp), %rcx
movb $0x1, %al
cmpq 0x20(%rsp), %rcx
movb %al, 0x6(%rsp)
jb 0x19f4d1
movq 0x20(%rsp), %rax
subq 0x10(%rsp), %rax
movq 0x10(%rsp), %rcx
addq 0x8(%rsp), %rcx
subq 0x20(%rsp), %rcx
cmpq %rcx, %rax
seta %al
movb %al, 0x6(%rsp)
movb 0x6(%rsp), %al
movb %al, 0x7(%rsp)
movb 0x7(%rsp), %al
testb $0x1, %al
jne 0x19f4e3
jmp 0x19f548
movq 0x30(%rsp), %rax
movl 0x2c(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x30, %eax
jne 0x19f51c
leaq 0x7cda1(%rip), %rdi # 0x21c2a3
movl $0x444d, %esi # imm = 0x444D
leaq 0x75dc9(%rip), %rdx # 0x2152d7
leaq 0x81de7(%rip), %rcx # 0x2212fc
movb $0x0, %al
callq 0x5ef40
movq 0x30(%rsp), %rax
movl 0x2c(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %dl
addb $-0x1, %dl
movb %dl, (%rax,%rcx)
movq 0x8(%rsp), %rax
addq 0x10(%rsp), %rax
movq %rax, 0x10(%rsp)
jmp 0x19f46e
addq $0x38, %rsp
retq
nopl (%rax)
|
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl12grisu2_roundEPcimmmm:
sub rsp, 38h
mov [rsp+38h+var_8], rdi
mov [rsp+38h+var_C], esi
mov [rsp+38h+var_18], rdx
mov [rsp+38h+var_20], rcx
mov [rsp+38h+var_28], r8
mov [rsp+38h+var_30], r9
cmp [rsp+38h+var_C], 1
jge short loc_19F3E9
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
mov esi, 4431h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aLen1; "len >= 1"
mov al, 0
call _ggml_abort
loc_19F3E9:
mov rax, [rsp+38h+var_18]
cmp rax, [rsp+38h+var_20]
jbe short loc_19F416
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
mov esi, 4432h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aDistDelta; "dist <= delta"
mov al, 0
call _ggml_abort
loc_19F416:
mov rax, [rsp+38h+var_28]
cmp rax, [rsp+38h+var_20]
jbe short loc_19F443
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
mov esi, 4433h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aRestDelta; "rest <= delta"
mov al, 0
call _ggml_abort
loc_19F443:
cmp [rsp+38h+var_30], 0
ja short loc_19F46C
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
mov esi, 4434h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aTenK0; "ten_k > 0"
mov al, 0
call _ggml_abort
loc_19F46C:
jmp short $+2
loc_19F46E:
mov rcx, [rsp+38h+var_28]
xor eax, eax
cmp rcx, [rsp+38h+var_18]
mov [rsp+38h+var_31], al
jnb short loc_19F4D9
mov rcx, [rsp+38h+var_20]
sub rcx, [rsp+38h+var_28]
xor eax, eax
cmp rcx, [rsp+38h+var_30]
mov [rsp+38h+var_31], al
jb short loc_19F4D9
mov rcx, [rsp+38h+var_28]
add rcx, [rsp+38h+var_30]
mov al, 1
cmp rcx, [rsp+38h+var_18]
mov [rsp+38h+var_32], al
jb short loc_19F4D1
mov rax, [rsp+38h+var_18]
sub rax, [rsp+38h+var_28]
mov rcx, [rsp+38h+var_28]
add rcx, [rsp+38h+var_30]
sub rcx, [rsp+38h+var_18]
cmp rax, rcx
setnbe al
mov [rsp+38h+var_32], al
loc_19F4D1:
mov al, [rsp+38h+var_32]
mov [rsp+38h+var_31], al
loc_19F4D9:
mov al, [rsp+38h+var_31]
test al, 1
jnz short loc_19F4E3
jmp short loc_19F548
loc_19F4E3:
mov rax, [rsp+38h+var_8]
mov ecx, [rsp+38h+var_C]
sub ecx, 1
movsxd rcx, ecx
movsx eax, byte ptr [rax+rcx]
cmp eax, 30h ; '0'
jnz short loc_19F51C
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
mov esi, 444Dh
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aBufLen10; "buf[len - 1] != '0'"
mov al, 0
call _ggml_abort
loc_19F51C:
mov rax, [rsp+38h+var_8]
mov ecx, [rsp+38h+var_C]
sub ecx, 1
movsxd rcx, ecx
mov dl, [rax+rcx]
add dl, 0FFh
mov [rax+rcx], dl
mov rax, [rsp+38h+var_30]
add rax, [rsp+38h+var_28]
mov [rsp+38h+var_28], rax
jmp loc_19F46E
loc_19F548:
add rsp, 38h
retn
|
bool nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round(
nlohmann::json_abi_v3_11_3::detail::dtoa_impl *this,
char *a2,
unsigned long long a3,
unsigned long long a4,
unsigned long long a5,
unsigned long long a6)
{
bool result; // al
bool v7; // [rsp+6h] [rbp-32h]
bool v8; // [rsp+7h] [rbp-31h]
if ( (int)a2 < 1 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17457LL,
"GGML_ASSERT(%s) failed",
"len >= 1");
if ( a3 > a4 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17458LL,
"GGML_ASSERT(%s) failed",
"dist <= delta");
if ( a5 > a4 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17459LL,
"GGML_ASSERT(%s) failed",
"rest <= delta");
if ( !a6 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17460LL,
"GGML_ASSERT(%s) failed",
"ten_k > 0");
while ( 1 )
{
v8 = 0;
if ( a5 < a3 )
{
v8 = 0;
if ( a4 - a5 >= a6 )
{
v7 = 1;
if ( a6 + a5 >= a3 )
v7 = a3 - a5 > a6 + a5 - a3;
v8 = v7;
}
}
result = v8;
if ( !v8 )
break;
if ( *((_BYTE *)this + (int)a2 - 1) == 48 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17485LL,
"GGML_ASSERT(%s) failed",
"buf[len - 1] != '0'");
--*((_BYTE *)this + (int)a2 - 1);
a5 += a6;
}
return result;
}
| |||
57,529
|
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round(char*, int, unsigned long, unsigned long, unsigned long, unsigned long)
|
monkey531[P]llama/common/json.hpp
|
inline void grisu2_round(char* buf, int len, std::uint64_t dist, std::uint64_t delta,
std::uint64_t rest, std::uint64_t ten_k)
{
JSON_ASSERT(len >= 1);
JSON_ASSERT(dist <= delta);
JSON_ASSERT(rest <= delta);
JSON_ASSERT(ten_k > 0);
// <--------------------------- delta ---->
// <---- dist --------->
// --------------[------------------+-------------------]--------------
// M- w M+
//
// ten_k
// <------>
// <---- rest ---->
// --------------[------------------+----+--------------]--------------
// w V
// = buf * 10^k
//
// ten_k represents a unit-in-the-last-place in the decimal representation
// stored in buf.
// Decrement buf by ten_k while this takes buf closer to w.
// The tests are written in this order to avoid overflow in unsigned
// integer arithmetic.
while (rest < dist
&& delta - rest >= ten_k
&& (rest + ten_k < dist || dist - rest > rest + ten_k - dist))
{
JSON_ASSERT(buf[len - 1] != '0');
buf[len - 1]--;
rest += ten_k;
}
}
|
O1
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round(char*, int, unsigned long, unsigned long, unsigned long, unsigned long):
pushq %rax
testl %esi, %esi
jle 0xbe01a
cmpq %rcx, %rdx
ja 0xbe036
movq %rcx, %r10
subq %r8, %r10
jb 0xbe052
testq %r9, %r9
je 0xbe06e
movq %rdx, %rax
subq %r8, %rax
setbe %r11b
cmpq %r9, %r10
setb %r10b
orb %r11b, %r10b
jne 0xbdff7
movl %esi, %esi
addq %r9, %r8
subq %r8, %rcx
movq %rdx, %r10
negq %r10
cmpq %rdx, %r8
jb 0xbdfcd
leaq (%r10,%r8), %r11
cmpq %r11, %rax
jbe 0xbdff7
movb -0x1(%rdi,%rsi), %r11b
cmpb $0x30, %r11b
je 0xbdff9
decb %r11b
movb %r11b, -0x1(%rdi,%rsi)
subq %r9, %rcx
setb %r11b
cmpq %rdx, %r8
jae 0xbdff7
subq %r9, %rax
addq %r9, %r8
testb %r11b, %r11b
je 0xbdfbf
popq %rax
retq
leaq 0x36cfc(%rip), %rdi # 0xf4cfc
leaq 0x2f5ce(%rip), %rdx # 0xed5d5
leaq 0x3b883(%rip), %rcx # 0xf9891
movl $0x444d, %esi # imm = 0x444D
xorl %eax, %eax
callq 0x1bef0
leaq 0x36cdb(%rip), %rdi # 0xf4cfc
leaq 0x2f5ad(%rip), %rdx # 0xed5d5
leaq 0x3b833(%rip), %rcx # 0xf9862
movl $0x4431, %esi # imm = 0x4431
jmp 0xbe013
leaq 0x36cbf(%rip), %rdi # 0xf4cfc
leaq 0x2f591(%rip), %rdx # 0xed5d5
leaq 0x3b820(%rip), %rcx # 0xf986b
movl $0x4432, %esi # imm = 0x4432
jmp 0xbe013
leaq 0x36ca3(%rip), %rdi # 0xf4cfc
leaq 0x2f575(%rip), %rdx # 0xed5d5
leaq 0x3b812(%rip), %rcx # 0xf9879
movl $0x4433, %esi # imm = 0x4433
jmp 0xbe013
leaq 0x36c87(%rip), %rdi # 0xf4cfc
leaq 0x2f559(%rip), %rdx # 0xed5d5
leaq 0x3b804(%rip), %rcx # 0xf9887
movl $0x4434, %esi # imm = 0x4434
jmp 0xbe013
|
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl12grisu2_roundEPcimmmm:
push rax
test esi, esi
jle loc_BE01A
cmp rdx, rcx
ja loc_BE036
mov r10, rcx
sub r10, r8
jb loc_BE052
test r9, r9
jz loc_BE06E
mov rax, rdx
sub rax, r8
setbe r11b
cmp r10, r9
setb r10b
or r10b, r11b
jnz short loc_BDFF7
mov esi, esi
add r8, r9
sub rcx, r8
mov r10, rdx
neg r10
loc_BDFBF:
cmp r8, rdx
jb short loc_BDFCD
lea r11, [r10+r8]
cmp rax, r11
jbe short loc_BDFF7
loc_BDFCD:
mov r11b, [rdi+rsi-1]
cmp r11b, 30h ; '0'
jz short loc_BDFF9
dec r11b
mov [rdi+rsi-1], r11b
sub rcx, r9
setb r11b
cmp r8, rdx
jnb short loc_BDFF7
sub rax, r9
add r8, r9
test r11b, r11b
jz short loc_BDFBF
loc_BDFF7:
pop rax
retn
loc_BDFF9:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aBufLen10; "buf[len - 1] != '0'"
mov esi, 444Dh
loc_BE013:
xor eax, eax
call _ggml_abort
loc_BE01A:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aLen1; "len >= 1"
mov esi, 4431h
jmp short loc_BE013
loc_BE036:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aDistDelta; "dist <= delta"
mov esi, 4432h
jmp short loc_BE013
loc_BE052:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aRestDelta; "rest <= delta"
mov esi, 4433h
jmp short loc_BE013
loc_BE06E:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aTenK0; "ten_k > 0"
mov esi, 4434h
jmp short loc_BE013
|
void __spoils<rdx,rcx,r8,r9,r10,r11,xmm0,xmm4,xmm5> nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round(
nlohmann::json_abi_v3_11_3::detail::dtoa_impl *this,
char *a2,
unsigned long long a3,
unsigned long long a4,
unsigned long long a5,
unsigned long long a6)
{
unsigned long long v6; // rax
unsigned long long v7; // r8
unsigned long long v8; // rcx
char v9; // r11
bool v10; // cf
if ( (int)a2 <= 0 )
goto LABEL_14;
if ( a3 > a4 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17458LL,
"GGML_ASSERT(%s) failed",
"dist <= delta");
goto LABEL_14;
}
if ( a4 < a5 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17459LL,
"GGML_ASSERT(%s) failed",
"rest <= delta");
goto LABEL_14;
}
if ( !a6 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17460LL,
"GGML_ASSERT(%s) failed",
"ten_k > 0");
goto LABEL_14;
}
v6 = a3 - a5;
if ( a3 > a5 && a4 - a5 >= a6 )
{
v7 = a6 + a5;
v8 = a4 - v7;
while ( 1 )
{
if ( v7 >= a3 && v6 <= v7 - a3 )
return;
v9 = *((_BYTE *)this + (unsigned int)a2 - 1);
if ( v9 == 48 )
break;
*((_BYTE *)this + (unsigned int)a2 - 1) = v9 - 1;
v10 = v8 < a6;
v8 -= a6;
if ( v7 < a3 )
{
v6 -= a6;
v7 += a6;
if ( !v10 )
continue;
}
return;
}
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17485LL,
"GGML_ASSERT(%s) failed",
"buf[len - 1] != '0'");
while ( 1 )
LABEL_14:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17457LL,
"GGML_ASSERT(%s) failed",
"len >= 1");
}
}
|
grisu2_round:
PUSH RAX
TEST ESI,ESI
JLE 0x001be01a
CMP RDX,RCX
JA 0x001be036
MOV R10,RCX
SUB R10,R8
JC 0x001be052
TEST R9,R9
JZ 0x001be06e
MOV RAX,RDX
SUB RAX,R8
SETBE R11B
CMP R10,R9
SETC R10B
OR R10B,R11B
JNZ 0x001bdff7
MOV ESI,ESI
ADD R8,R9
SUB RCX,R8
MOV R10,RDX
NEG R10
LAB_001bdfbf:
CMP R8,RDX
JC 0x001bdfcd
LEA R11,[R10 + R8*0x1]
CMP RAX,R11
JBE 0x001bdff7
LAB_001bdfcd:
MOV R11B,byte ptr [RDI + RSI*0x1 + -0x1]
CMP R11B,0x30
JZ 0x001bdff9
DEC R11B
MOV byte ptr [RDI + RSI*0x1 + -0x1],R11B
SUB RCX,R9
SETC R11B
CMP R8,RDX
JNC 0x001bdff7
SUB RAX,R9
ADD R8,R9
TEST R11B,R11B
JZ 0x001bdfbf
LAB_001bdff7:
POP RAX
RET
LAB_001bdff9:
LEA RDI,[0x1f4cfc]
LEA RDX,[0x1ed5d5]
LEA RCX,[0x1f9891]
MOV ESI,0x444d
LAB_001be013:
XOR EAX,EAX
CALL 0x0011bef0
LAB_001be01a:
LEA RDI,[0x1f4cfc]
LEA RDX,[0x1ed5d5]
LEA RCX,[0x1f9862]
MOV ESI,0x4431
JMP 0x001be013
LAB_001be036:
LEA RDI,[0x1f4cfc]
LEA RDX,[0x1ed5d5]
LEA RCX,[0x1f986b]
MOV ESI,0x4432
JMP 0x001be013
LAB_001be052:
LEA RDI,[0x1f4cfc]
LEA RDX,[0x1ed5d5]
LEA RCX,[0x1f9879]
MOV ESI,0x4433
JMP 0x001be013
LAB_001be06e:
LEA RDI,[0x1f4cfc]
LEA RDX,[0x1ed5d5]
LEA RCX,[0x1f9887]
MOV ESI,0x4434
JMP 0x001be013
|
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round(char*, int, unsigned long, unsigned
long, unsigned long, unsigned long) */
int8
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round
(char *param_1,int param_2,ulong param_3,ulong param_4,ulong param_5,ulong param_6)
{
int8 in_RAX;
ulong uVar1;
ulong uVar2;
char *pcVar3;
int8 uVar4;
ulong uVar5;
bool bVar6;
if (param_2 < 1) {
pcVar3 = "len >= 1";
uVar4 = 0x4431;
}
else if (param_4 < param_3) {
pcVar3 = "dist <= delta";
uVar4 = 0x4432;
}
else if (param_4 < param_5) {
pcVar3 = "rest <= delta";
uVar4 = 0x4433;
}
else {
if (param_6 != 0) {
uVar1 = param_3 - param_5;
if (param_6 <= param_4 - param_5 && (param_5 <= param_3 && uVar1 != 0)) {
uVar5 = param_5 + param_6;
uVar2 = param_4 - uVar5;
do {
if ((param_3 <= uVar5) && (uVar1 <= uVar5 - param_3)) {
return in_RAX;
}
if (param_1[(ulong)(uint)param_2 - 1] == '0') {
pcVar3 = "buf[len - 1] != \'0\'";
uVar4 = 0x444d;
goto LAB_001be013;
}
param_1[(ulong)(uint)param_2 - 1] = param_1[(ulong)(uint)param_2 - 1] + -1;
bVar6 = param_6 <= uVar2;
uVar2 = uVar2 - param_6;
if (param_3 <= uVar5) {
return in_RAX;
}
uVar1 = uVar1 - param_6;
uVar5 = uVar5 + param_6;
} while (bVar6);
}
return in_RAX;
}
pcVar3 = "ten_k > 0";
uVar4 = 0x4434;
}
LAB_001be013:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar4,
"GGML_ASSERT(%s) failed",pcVar3);
}
|
|
57,530
|
nlohmann::json_abi_v3_11_3::detail::invalid_iterator nlohmann::json_abi_v3_11_3::detail::invalid_iterator::create<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*)
|
monkey531[P]llama/common/json.hpp
|
static invalid_iterator create(int id_, const std::string& what_arg, BasicJsonContext context)
{
const std::string w = concat(exception::name("invalid_iterator", id_), exception::diagnostics(context), what_arg);
return {id_, w.c_str()};
}
|
O3
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::invalid_iterator nlohmann::json_abi_v3_11_3::detail::invalid_iterator::create<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x8e1a8(%rip), %rsi # 0xebc2f
leaq 0x8e1b1(%rip), %rdx # 0xebc3f
leaq 0x28(%rsp), %rdi
callq 0x21540
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
movl %ebp, %edx
callq 0x57b42
leaq 0x78(%rsp), %r14
movq %r14, -0x10(%r14)
xorl %eax, %eax
movq %rax, -0x8(%r14)
movb %al, (%r14)
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq %rax, -0x8(%r12)
movb %al, (%r12)
movq 0x8(%r15), %rsi
addq 0x50(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x1ad20
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
leaq 0x8(%rsp), %rdi
callq 0x1a250
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
leaq 0x8(%rsp), %rdi
callq 0x1a250
movq (%r15), %rsi
movq 0x8(%r15), %rdx
leaq 0x8(%rsp), %rdi
callq 0x1a250
movq 0x68(%rsp), %rdi
cmpq %r14, %rdi
je 0x5db31
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x1a890
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5db4c
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x1a890
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x5db63
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1a890
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x57db0
leaq 0xca3a7(%rip), %rax # 0x127f20
addq $0x10, %rax
movq %rax, (%rbx)
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x5db97
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a890
movq %rbx, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x5dc25
movq 0x18(%rsp), %rsi
jmp 0x5dc1d
movq %rax, %rbx
jmp 0x5dc0e
movq %rax, %rbx
jmp 0x5dc25
movq %rdx, %rbx
movq %rax, %r15
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x5dbe7
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a890
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rdx
leaq 0x88(%rsp), %r12
movq %r14, %rsi
movq %r15, %rcx
movl %ebx, %r8d
movq %r12, %r9
callq 0x1b54b
movq (%r12), %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x5dc25
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1a890
movq %rbx, %rdi
callq 0x1af20
nop
|
_ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 98h
mov r15, rdx
mov ebp, esi
mov rbx, rdi
lea r13, [rsp+0C8h+var_90]
mov [r13-10h], r13
lea rsi, aInvalidIterato; "invalid_iterator"
lea rdx, aInvalidIterato+10h; ""
lea rdi, [rsp+0C8h+var_A0]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rdi, [rsp+0C8h+var_80]; int
lea rsi, [rsp+0C8h+var_A0]; int
mov edx, ebp; int
call _ZN8nlohmann16json_abi_v3_11_36detail9exception4nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; nlohmann::json_abi_v3_11_3::detail::exception::name(std::string const&,int)
lea r14, [rsp+0C8h+var_50]
mov [r14-10h], r14
xor eax, eax
mov [r14-8], rax
mov [r14], al
lea r12, [rsp+0C8h+var_B0]
mov [r12-10h], r12
mov [r12-8], rax
mov [r12], al
mov rsi, [r15+8]
add rsi, [rsp+0C8h+var_78]
lea rdi, [rsp+0C8h+var_C0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
mov rsi, qword ptr [rsp+0C8h+var_80]
mov rdx, [rsp+0C8h+var_78]
lea rdi, [rsp+0C8h+var_C0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rsi, [rsp+0C8h+var_60]
mov rdx, [rsp+0C8h+var_58]
lea rdi, [rsp+0C8h+var_C0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rsi, [r15]
mov rdx, [r15+8]
lea rdi, [rsp+0C8h+var_C0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rdi, [rsp+0C8h+var_60]; void *
cmp rdi, r14
jz short loc_5DB31
mov rsi, [rsp+0C8h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5DB31:
lea rax, [rsp+0C8h+var_70]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_5DB4C
mov rsi, [rsp+0C8h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5DB4C:
mov rdi, [rsp+0C8h+var_A0]; void *
cmp rdi, r13
jz short loc_5DB63
mov rsi, [rsp+0C8h+var_90]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5DB63:
mov rdx, [rsp+0C8h+var_C0]; char *
mov rdi, rbx; this
mov esi, ebp; int
call _ZN8nlohmann16json_abi_v3_11_36detail9exceptionC2EiPKc; nlohmann::json_abi_v3_11_3::detail::exception::exception(int,char const*)
lea rax, _ZTVN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorE; `vtable for'nlohmann::json_abi_v3_11_3::detail::invalid_iterator
add rax, 10h
mov [rbx], rax
mov rdi, [rsp+0C8h+var_C0]; void *
cmp rdi, r12
jz short loc_5DB97
mov rsi, [rsp+0C8h+var_B0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5DB97:
mov rax, rbx
add rsp, 98h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, [rsp+arg_0]
cmp rdi, r12
jz short loc_5DC25
mov rsi, [rsp+arg_10]
jmp short loc_5DC1D
mov rbx, rax
jmp short loc_5DC0E
mov rbx, rax
jmp short loc_5DC25
mov rbx, rdx
mov r15, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, r12
jz short loc_5DBE7
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5DBE7:
lea rdi, [rsp+arg_60]
lea rdx, [rsp+arg_40]
lea r12, [rsp+arg_80]
mov rsi, r14
mov rcx, r15
mov r8d, ebx
mov r9, r12
call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ__cold_1
mov rbx, [r12]
loc_5DC0E:
mov rdi, [rsp+arg_20]; void *
cmp rdi, r13
jz short loc_5DC25
mov rsi, [rsp+arg_30]
loc_5DC1D:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5DC25:
mov rdi, rbx
call __Unwind_Resume
|
nlohmann::json_abi_v3_11_3::detail::exception * ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
nlohmann::json_abi_v3_11_3::detail::exception *this,
int a2,
_QWORD *a3)
{
char *v5[2]; // [rsp+8h] [rbp-C0h] BYREF
_QWORD v6[2]; // [rsp+18h] [rbp-B0h] BYREF
void *v7[2]; // [rsp+28h] [rbp-A0h] BYREF
_QWORD v8[2]; // [rsp+38h] [rbp-90h] BYREF
int v9[2]; // [rsp+48h] [rbp-80h] BYREF
long long v10; // [rsp+50h] [rbp-78h]
long long v11; // [rsp+58h] [rbp-70h] BYREF
void *v12; // [rsp+68h] [rbp-60h]
long long v13; // [rsp+70h] [rbp-58h]
_QWORD v14[10]; // [rsp+78h] [rbp-50h] BYREF
v7[0] = v8;
std::string::_M_construct<char const*>((long long)v7, "invalid_iterator", (long long)"");
nlohmann::json_abi_v3_11_3::detail::exception::name((long long)v9, (long long)v7, a2);
v12 = v14;
v13 = 0LL;
LOBYTE(v14[0]) = 0;
v5[0] = (char *)v6;
v5[1] = 0LL;
LOBYTE(v6[0]) = 0;
std::string::reserve(v5, v10 + a3[1]);
std::string::_M_append(v5, *(_QWORD *)v9, v10);
std::string::_M_append(v5, v12, v13);
std::string::_M_append(v5, *a3, a3[1]);
if ( v12 != v14 )
operator delete(v12, v14[0] + 1LL);
if ( *(long long **)v9 != &v11 )
operator delete(*(void **)v9, v11 + 1);
if ( v7[0] != v8 )
operator delete(v7[0], v8[0] + 1LL);
nlohmann::json_abi_v3_11_3::detail::exception::exception(this, a2, v5[0]);
*(_QWORD *)this = &`vtable for'nlohmann::json_abi_v3_11_3::detail::invalid_iterator + 2;
if ( (_QWORD *)v5[0] != v6 )
operator delete(v5[0], v6[0] + 1LL);
return this;
}
|
_ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x98
MOV R15,RDX
MOV EBP,ESI
MOV RBX,RDI
LEA R13,[RSP + 0x38]
MOV qword ptr [R13 + -0x10],R13
LAB_0015da80:
LEA RSI,[0x1ebc2f]
LEA RDX,[0x1ebc3f]
LEA RDI,[RSP + 0x28]
CALL 0x00121540
LAB_0015da98:
LEA RDI,[RSP + 0x48]
LEA RSI,[RSP + 0x28]
MOV EDX,EBP
CALL 0x00157b42
LEA R14,[RSP + 0x78]
MOV qword ptr [R14 + -0x10],R14
XOR EAX,EAX
MOV qword ptr [R14 + -0x8],RAX
MOV byte ptr [R14],AL
LEA R12,[RSP + 0x18]
MOV qword ptr [R12 + -0x10],R12
MOV qword ptr [R12 + -0x8],RAX
MOV byte ptr [R12],AL
MOV RSI,qword ptr [R15 + 0x8]
ADD RSI,qword ptr [RSP + 0x50]
LAB_0015dad7:
LEA RDI,[RSP + 0x8]
CALL 0x0011ad20
MOV RSI,qword ptr [RSP + 0x48]
MOV RDX,qword ptr [RSP + 0x50]
LEA RDI,[RSP + 0x8]
CALL 0x0011a250
MOV RSI,qword ptr [RSP + 0x68]
MOV RDX,qword ptr [RSP + 0x70]
LEA RDI,[RSP + 0x8]
CALL 0x0011a250
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
LEA RDI,[RSP + 0x8]
CALL 0x0011a250
MOV RDI,qword ptr [RSP + 0x68]
CMP RDI,R14
JZ 0x0015db31
MOV RSI,qword ptr [RSP + 0x78]
INC RSI
CALL 0x0011a890
LAB_0015db31:
LEA RAX,[RSP + 0x58]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0015db4c
MOV RSI,qword ptr [RSP + 0x58]
INC RSI
CALL 0x0011a890
LAB_0015db4c:
MOV RDI,qword ptr [RSP + 0x28]
CMP RDI,R13
JZ 0x0015db63
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x0011a890
LAB_0015db63:
MOV RDX,qword ptr [RSP + 0x8]
LAB_0015db68:
MOV RDI,RBX
MOV ESI,EBP
CALL 0x00157db0
LAB_0015db72:
LEA RAX,[0x227f20]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R12
JZ 0x0015db97
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011a890
LAB_0015db97:
MOV RAX,RBX
ADD RSP,0x98
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
exception *
_ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(exception *param_1,int param_2,ulong *param_3)
{
char *local_c0;
int8 local_b8;
char local_b0;
int7 uStack_af;
long *local_a0 [2];
long local_90 [2];
long *local_80 [2];
long local_70 [2];
int1 *local_60;
int8 local_58;
int1 local_50;
int7 uStack_4f;
/* try { // try from 0015da80 to 0015da97 has its CatchHandler @ 0015dbc5 */
local_a0[0] = local_90;
std::__cxx11::string::_M_construct<char_const*>(local_a0,"invalid_iterator","");
/* try { // try from 0015da98 to 0015daa8 has its CatchHandler @ 0015dbc0 */
nlohmann::json_abi_v3_11_3::detail::exception::name
((exception *)local_80,(string *)local_a0,param_2);
local_58 = 0;
local_50 = 0;
local_b8 = 0;
local_b0 = '\0';
/* try { // try from 0015dad7 to 0015db19 has its CatchHandler @ 0015dbca */
local_c0 = &local_b0;
local_60 = &local_50;
std::__cxx11::string::reserve((ulong)&local_c0);
std::__cxx11::string::_M_append((char *)&local_c0,(ulong)local_80[0]);
std::__cxx11::string::_M_append((char *)&local_c0,(ulong)local_60);
std::__cxx11::string::_M_append((char *)&local_c0,*param_3);
if (local_60 != &local_50) {
operator_delete(local_60,CONCAT71(uStack_4f,local_50) + 1);
}
if (local_80[0] != local_70) {
operator_delete(local_80[0],local_70[0] + 1);
}
if (local_a0[0] != local_90) {
operator_delete(local_a0[0],local_90[0] + 1);
}
/* try { // try from 0015db68 to 0015db71 has its CatchHandler @ 0015dbac */
nlohmann::json_abi_v3_11_3::detail::exception::exception(param_1,param_2,local_c0);
*(int ***)param_1 = &PTR__exception_00227f30;
if (local_c0 != &local_b0) {
operator_delete(local_c0,CONCAT71(uStack_af,local_b0) + 1);
}
return param_1;
}
|
|
57,531
|
pfs_end_cond_wait_v1
|
eloqsql/storage/perfschema/pfs.cc
|
void pfs_end_cond_wait_v1(PSI_cond_locker* locker, int rc)
{
PSI_cond_locker_state *state= reinterpret_cast<PSI_cond_locker_state*> (locker);
assert(state != NULL);
ulonglong timer_end= 0;
ulonglong wait_time= 0;
PFS_cond *cond= reinterpret_cast<PFS_cond *> (state->m_cond);
/* PFS_mutex *mutex= reinterpret_cast<PFS_mutex *> (state->m_mutex); */
if (state->m_flags & STATE_FLAG_TIMED)
{
timer_end= state->m_timer();
wait_time= timer_end - state->m_timer_start;
/* Aggregate to EVENTS_WAITS_SUMMARY_BY_INSTANCE (timed) */
cond->m_cond_stat.m_wait_stat.aggregate_value(wait_time);
}
else
{
/* Aggregate to EVENTS_WAITS_SUMMARY_BY_INSTANCE (counted) */
cond->m_cond_stat.m_wait_stat.aggregate_counted();
}
if (state->m_flags & STATE_FLAG_THREAD)
{
PFS_thread *thread= reinterpret_cast<PFS_thread *> (state->m_thread);
assert(thread != NULL);
PFS_single_stat *event_name_array;
event_name_array= thread->write_instr_class_waits_stats();
uint index= cond->m_class->m_event_name_index;
if (state->m_flags & STATE_FLAG_TIMED)
{
/* Aggregate to EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME (timed) */
event_name_array[index].aggregate_value(wait_time);
}
else
{
/* Aggregate to EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME (counted) */
event_name_array[index].aggregate_counted();
}
if (state->m_flags & STATE_FLAG_EVENT)
{
PFS_events_waits *wait= reinterpret_cast<PFS_events_waits*> (state->m_wait);
assert(wait != NULL);
wait->m_timer_end= timer_end;
wait->m_end_event_id= thread->m_event_id;
if (thread->m_flag_events_waits_history)
insert_events_waits_history(thread, wait);
if (thread->m_flag_events_waits_history_long)
insert_events_waits_history_long(wait);
thread->m_events_waits_current--;
assert(wait == thread->m_events_waits_current);
}
}
}
|
O0
|
cpp
|
pfs_end_cond_wait_v1:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x4c74f
movq -0x18(%rbp), %rax
callq *0x28(%rax)
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
subq 0x20(%rcx), %rax
movq %rax, -0x28(%rbp)
movq -0x30(%rbp), %rdi
addq $0x20, %rdi
movq -0x28(%rbp), %rsi
callq 0x51b50
jmp 0x4c75c
movq -0x30(%rbp), %rdi
addq $0x20, %rdi
callq 0x51a90
movq -0x18(%rbp), %rax
movl (%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x4c853
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
callq 0x409d0
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x10(%rax), %eax
movl %eax, -0x44(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x4c7bc
movq -0x40(%rbp), %rdi
movl -0x44(%rbp), %eax
shlq $0x5, %rax
addq %rax, %rdi
movq -0x28(%rbp), %rsi
callq 0x51b50
jmp 0x4c7cf
movq -0x40(%rbp), %rdi
movl -0x44(%rbp), %eax
shlq $0x5, %rax
addq %rax, %rdi
callq 0x51a90
movq -0x18(%rbp), %rax
movl (%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x4c851
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x20(%rbp), %rcx
movq -0x50(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x38(%rbp), %rax
movq 0x7f8(%rax), %rcx
movq -0x50(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x38(%rbp), %rax
testb $0x1, 0x7e2(%rax)
je 0x4c822
movq -0x38(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0x581a0
movq -0x38(%rbp), %rax
testb $0x1, 0x7e3(%rax)
je 0x4c838
movq -0x50(%rbp), %rdi
callq 0x58270
movq -0x38(%rbp), %rax
movq 0x7f0(%rax), %rcx
addq $-0xb0, %rcx
movq %rcx, 0x7f0(%rax)
jmp 0x4c853
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
|
pfs_end_cond_wait_v1:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov rax, [rbp+var_8]
mov [rbp+var_18], rax
mov [rbp+var_20], 0
mov [rbp+var_28], 0
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov [rbp+var_30], rax
mov rax, [rbp+var_18]
mov eax, [rax]
and eax, 1
cmp eax, 0
jz short loc_4C74F
mov rax, [rbp+var_18]
call qword ptr [rax+28h]
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
mov rcx, [rbp+var_18]
sub rax, [rcx+20h]
mov [rbp+var_28], rax
mov rdi, [rbp+var_30]
add rdi, 20h ; ' '; this
mov rsi, [rbp+var_28]; unsigned __int64
call _ZN15PFS_single_stat15aggregate_valueEy; PFS_single_stat::aggregate_value(ulong long)
jmp short loc_4C75C
loc_4C74F:
mov rdi, [rbp+var_30]
add rdi, 20h ; ' '; this
call _ZN15PFS_single_stat17aggregate_countedEv; PFS_single_stat::aggregate_counted(void)
loc_4C75C:
mov rax, [rbp+var_18]
mov eax, [rax]
and eax, 2
cmp eax, 0
jz loc_4C853
mov rax, [rbp+var_18]
mov rax, [rax+18h]
mov [rbp+var_38], rax
mov rdi, [rbp+var_38]; this
call _ZN20PFS_connection_slice29write_instr_class_waits_statsEv; PFS_connection_slice::write_instr_class_waits_stats(void)
mov [rbp+var_40], rax
mov rax, [rbp+var_30]
mov rax, [rax+18h]
mov eax, [rax+10h]
mov [rbp+var_44], eax
mov rax, [rbp+var_18]
mov eax, [rax]
and eax, 1
cmp eax, 0
jz short loc_4C7BC
mov rdi, [rbp+var_40]
mov eax, [rbp+var_44]
shl rax, 5
add rdi, rax; this
mov rsi, [rbp+var_28]; unsigned __int64
call _ZN15PFS_single_stat15aggregate_valueEy; PFS_single_stat::aggregate_value(ulong long)
jmp short loc_4C7CF
loc_4C7BC:
mov rdi, [rbp+var_40]
mov eax, [rbp+var_44]
shl rax, 5
add rdi, rax; this
call _ZN15PFS_single_stat17aggregate_countedEv; PFS_single_stat::aggregate_counted(void)
loc_4C7CF:
mov rax, [rbp+var_18]
mov eax, [rax]
and eax, 4
cmp eax, 0
jz short loc_4C851
mov rax, [rbp+var_18]
mov rax, [rax+30h]
mov [rbp+var_50], rax
mov rcx, [rbp+var_20]
mov rax, [rbp+var_50]
mov [rax+40h], rcx
mov rax, [rbp+var_38]
mov rcx, [rax+7F8h]
mov rax, [rbp+var_50]
mov [rax+10h], rcx
mov rax, [rbp+var_38]
test byte ptr [rax+7E2h], 1
jz short loc_4C822
mov rdi, [rbp+var_38]
mov rsi, [rbp+var_50]
call _Z27insert_events_waits_historyP10PFS_threadP16PFS_events_waits; insert_events_waits_history(PFS_thread *,PFS_events_waits *)
loc_4C822:
mov rax, [rbp+var_38]
test byte ptr [rax+7E3h], 1
jz short loc_4C838
mov rdi, [rbp+var_50]
call _Z32insert_events_waits_history_longP16PFS_events_waits; insert_events_waits_history_long(PFS_events_waits *)
loc_4C838:
mov rax, [rbp+var_38]
mov rcx, [rax+7F0h]
add rcx, 0FFFFFFFFFFFFFF50h
mov [rax+7F0h], rcx
loc_4C851:
jmp short $+2
loc_4C853:
add rsp, 50h
pop rbp
retn
|
PFS_connection_slice * pfs_end_cond_wait_v1(long long a1)
{
PFS_connection_slice *result; // rax
long long v2; // [rsp+0h] [rbp-50h]
unsigned int v3; // [rsp+Ch] [rbp-44h]
long long v4; // [rsp+10h] [rbp-40h]
PFS_connection_slice *v5; // [rsp+18h] [rbp-38h]
long long v6; // [rsp+20h] [rbp-30h]
unsigned long long v7; // [rsp+28h] [rbp-28h]
long long v8; // [rsp+30h] [rbp-20h]
v8 = 0LL;
v7 = 0LL;
v6 = *(_QWORD *)(a1 + 8);
if ( (*(_DWORD *)a1 & 1) != 0 )
{
v8 = (*(long long (**)(void))(a1 + 40))();
v7 = v8 - *(_QWORD *)(a1 + 32);
PFS_single_stat::aggregate_value((PFS_single_stat *)(v6 + 32), v7);
}
else
{
PFS_single_stat::aggregate_counted((PFS_single_stat *)(v6 + 32));
}
result = (PFS_connection_slice *)(*(_DWORD *)a1 & 2);
if ( (_DWORD)result )
{
v5 = *(PFS_connection_slice **)(a1 + 24);
v4 = PFS_connection_slice::write_instr_class_waits_stats(v5);
v3 = *(_DWORD *)(*(_QWORD *)(v6 + 24) + 16LL);
if ( (*(_DWORD *)a1 & 1) != 0 )
PFS_single_stat::aggregate_value((PFS_single_stat *)(32LL * v3 + v4), v7);
else
PFS_single_stat::aggregate_counted((PFS_single_stat *)(32LL * v3 + v4));
result = (PFS_connection_slice *)(*(_DWORD *)a1 & 4);
if ( (_DWORD)result )
{
v2 = *(_QWORD *)(a1 + 48);
*(_QWORD *)(v2 + 64) = v8;
*(_QWORD *)(v2 + 16) = *((_QWORD *)v5 + 255);
if ( (*((_BYTE *)v5 + 2018) & 1) != 0 )
insert_events_waits_history(v5, v2);
if ( (*((_BYTE *)v5 + 2019) & 1) != 0 )
insert_events_waits_history_long(v2);
result = v5;
*((_QWORD *)v5 + 254) -= 176LL;
}
}
return result;
}
|
pfs_end_cond_wait_v1:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x18],RAX
MOV qword ptr [RBP + -0x20],0x0
MOV qword ptr [RBP + -0x28],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX]
AND EAX,0x1
CMP EAX,0x0
JZ 0x0014c74f
MOV RAX,qword ptr [RBP + -0x18]
CALL qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x18]
SUB RAX,qword ptr [RCX + 0x20]
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x30]
ADD RDI,0x20
MOV RSI,qword ptr [RBP + -0x28]
CALL 0x00151b50
JMP 0x0014c75c
LAB_0014c74f:
MOV RDI,qword ptr [RBP + -0x30]
ADD RDI,0x20
CALL 0x00151a90
LAB_0014c75c:
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX]
AND EAX,0x2
CMP EAX,0x0
JZ 0x0014c853
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x38]
CALL 0x001409d0
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x18]
MOV EAX,dword ptr [RAX + 0x10]
MOV dword ptr [RBP + -0x44],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX]
AND EAX,0x1
CMP EAX,0x0
JZ 0x0014c7bc
MOV RDI,qword ptr [RBP + -0x40]
MOV EAX,dword ptr [RBP + -0x44]
SHL RAX,0x5
ADD RDI,RAX
MOV RSI,qword ptr [RBP + -0x28]
CALL 0x00151b50
JMP 0x0014c7cf
LAB_0014c7bc:
MOV RDI,qword ptr [RBP + -0x40]
MOV EAX,dword ptr [RBP + -0x44]
SHL RAX,0x5
ADD RDI,RAX
CALL 0x00151a90
LAB_0014c7cf:
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX]
AND EAX,0x4
CMP EAX,0x0
JZ 0x0014c851
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RBP + -0x50],RAX
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RAX + 0x40],RCX
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RAX + 0x7f8]
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RBP + -0x38]
TEST byte ptr [RAX + 0x7e2],0x1
JZ 0x0014c822
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RBP + -0x50]
CALL 0x001581a0
LAB_0014c822:
MOV RAX,qword ptr [RBP + -0x38]
TEST byte ptr [RAX + 0x7e3],0x1
JZ 0x0014c838
MOV RDI,qword ptr [RBP + -0x50]
CALL 0x00158270
LAB_0014c838:
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RAX + 0x7f0]
ADD RCX,-0xb0
MOV qword ptr [RAX + 0x7f0],RCX
LAB_0014c851:
JMP 0x0014c853
LAB_0014c853:
ADD RSP,0x50
POP RBP
RET
|
void pfs_end_cond_wait_v1(uint *param_1)
{
uint uVar1;
long lVar2;
PFS_connection_slice *this;
PFS_events_waits *pPVar3;
long lVar4;
ulonglong local_30;
long local_28;
local_28 = 0;
local_30 = 0;
lVar2 = *(long *)(param_1 + 2);
if ((*param_1 & 1) == 0) {
PFS_single_stat::aggregate_counted((PFS_single_stat *)(lVar2 + 0x20));
}
else {
local_28 = (**(code **)(param_1 + 10))();
local_30 = local_28 - *(long *)(param_1 + 8);
PFS_single_stat::aggregate_value((PFS_single_stat *)(lVar2 + 0x20),local_30);
}
if ((*param_1 & 2) != 0) {
this = *(PFS_connection_slice **)(param_1 + 6);
lVar4 = PFS_connection_slice::write_instr_class_waits_stats(this);
uVar1 = *(uint *)(*(long *)(lVar2 + 0x18) + 0x10);
if ((*param_1 & 1) == 0) {
PFS_single_stat::aggregate_counted((PFS_single_stat *)(lVar4 + (ulong)uVar1 * 0x20));
}
else {
PFS_single_stat::aggregate_value((PFS_single_stat *)(lVar4 + (ulong)uVar1 * 0x20),local_30);
}
if ((*param_1 & 4) != 0) {
pPVar3 = *(PFS_events_waits **)(param_1 + 0xc);
*(long *)(pPVar3 + 0x40) = local_28;
*(int8 *)(pPVar3 + 0x10) = *(int8 *)(this + 0x7f8);
if (((byte)this[0x7e2] & 1) != 0) {
insert_events_waits_history((PFS_thread *)this,pPVar3);
}
if (((byte)this[0x7e3] & 1) != 0) {
insert_events_waits_history_long(pPVar3);
}
*(long *)(this + 0x7f0) = *(long *)(this + 0x7f0) + -0xb0;
}
}
return;
}
|
|
57,532
|
my_rw_init
|
eloqsql/mysys/thr_rwlock.c
|
int my_rw_init(my_rw_lock_t *rwp)
{
pthread_condattr_t cond_attr;
pthread_mutex_init( &rwp->lock, MY_MUTEX_INIT_FAST);
pthread_condattr_init( &cond_attr );
pthread_cond_init( &rwp->readers, &cond_attr );
pthread_cond_init( &rwp->writers, &cond_attr );
pthread_condattr_destroy(&cond_attr);
rwp->state = 0;
rwp->waiters = 0;
#ifdef SAFE_MUTEX
rwp->write_thread = 0;
#endif
return(0);
}
|
O0
|
c
|
my_rw_init:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x3b4bf9(%rip), %rsi # 0x411f50
callq 0x26500
leaq -0xc(%rbp), %rdi
callq 0x260a0
movq -0x8(%rbp), %rdi
addq $0x28, %rdi
leaq -0xc(%rbp), %rsi
callq 0x263f0
movq -0x8(%rbp), %rdi
addq $0x58, %rdi
leaq -0xc(%rbp), %rsi
callq 0x263f0
leaq -0xc(%rbp), %rdi
callq 0x261b0
movq -0x8(%rbp), %rax
movl $0x0, 0x88(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x8c(%rax)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_rw_init:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]
lea rsi, my_fast_mutexattr
call _pthread_mutex_init
lea rdi, [rbp+var_C]
call _pthread_condattr_init
mov rdi, [rbp+var_8]
add rdi, 28h ; '('
lea rsi, [rbp+var_C]
call _pthread_cond_init
mov rdi, [rbp+var_8]
add rdi, 58h ; 'X'
lea rsi, [rbp+var_C]
call _pthread_cond_init
lea rdi, [rbp+var_C]
call _pthread_condattr_destroy
mov rax, [rbp+var_8]
mov dword ptr [rax+88h], 0
mov rax, [rbp+var_8]
mov dword ptr [rax+8Ch], 0
xor eax, eax
add rsp, 10h
pop rbp
retn
|
long long my_rw_init(long long a1)
{
_BYTE v2[4]; // [rsp+4h] [rbp-Ch] BYREF
long long v3; // [rsp+8h] [rbp-8h]
v3 = a1;
pthread_mutex_init(a1, &my_fast_mutexattr);
pthread_condattr_init(v2);
pthread_cond_init(v3 + 40, v2);
pthread_cond_init(v3 + 88, v2);
pthread_condattr_destroy(v2);
*(_DWORD *)(v3 + 136) = 0;
*(_DWORD *)(v3 + 140) = 0;
return 0LL;
}
|
my_rw_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x511f50]
CALL 0x00126500
LEA RDI,[RBP + -0xc]
CALL 0x001260a0
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x28
LEA RSI,[RBP + -0xc]
CALL 0x001263f0
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x58
LEA RSI,[RBP + -0xc]
CALL 0x001263f0
LEA RDI,[RBP + -0xc]
CALL 0x001261b0
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x88],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x8c],0x0
XOR EAX,EAX
ADD RSP,0x10
POP RBP
RET
|
int8 my_rw_init(pthread_mutex_t *param_1)
{
pthread_condattr_t local_14;
pthread_mutex_t *local_10;
local_10 = param_1;
pthread_mutex_init(param_1,(pthread_mutexattr_t *)&my_fast_mutexattr);
pthread_condattr_init(&local_14);
pthread_cond_init((pthread_cond_t *)(local_10 + 1),&local_14);
pthread_cond_init((pthread_cond_t *)((long)local_10 + 0x58),&local_14);
pthread_condattr_destroy(&local_14);
*(int4 *)((long)local_10 + 0x88) = 0;
*(int4 *)((long)local_10 + 0x8c) = 0;
return 0;
}
|
|
57,533
|
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);
}
|
O3
|
c
|
ma_init_block_record:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
movq (%rdi), %rsi
xorl %r14d, %r14d
cmpb $0x0, 0x7d9(%rsi)
setne %r14b
shll $0x10, %r14d
orq $0x10, %r14
leaq 0xc8(%rdi), %rdx
movl 0x3f4(%rsi), %ecx
leaq 0xd0(%rdi), %r8
movl 0x3c8(%rsi), %r11d
movl 0x3d4(%rsi), %eax
leal 0x2(%rax), %r9d
addq $0xe0, %rdi
movq %rdi, -0x78(%rbp)
movq %rsi, -0x30(%rbp)
movl 0x3f0(%rsi), %r15d
leal 0x8(%r11), %r10d
leal (%rax,%r11,4), %eax
addl $0x5, %eax
movq %rax, -0x58(%rbp)
subl %r15d, %r11d
leal 0x2(%r15), %r12d
shlq $0x3, %r15
addl $0x3, %r11d
shlq $0x2, %r11
shlq $0x3, %r12
shlq $0x4, %r10
leaq 0xd8(%rbx), %rax
movq %rax, -0x70(%rbp)
leaq 0xa8(%rbx), %rax
movq %rax, -0x68(%rbp)
leaq 0x188(%rbx), %rax
movq %rax, -0x60(%rbp)
leaq 0x190(%rbx), %rax
movq %rax, -0x50(%rbp)
leaq 0x1a0(%rbx), %rax
movq %rax, -0x48(%rbp)
leaq 0x198(%rbx), %rax
movq %rax, -0x40(%rbp)
leaq 0x318(%rbx), %rax
movq %rax, -0x38(%rbp)
leaq 0x3c8(%rbx), %r13
xorl %edi, %edi
movq %r14, %rsi
xorl %eax, %eax
pushq $0x0
pushq $0x0
pushq -0x58(%rbp)
pushq %r13
pushq %r10
pushq -0x38(%rbp)
pushq %r11
pushq -0x40(%rbp)
pushq %r15
pushq -0x48(%rbp)
pushq %r9
pushq -0x50(%rbp)
pushq %rcx
pushq -0x60(%rbp)
pushq %r12
pushq -0x68(%rbp)
pushq %r11
pushq -0x70(%rbp)
pushq %r15
pushq -0x78(%rbp)
callq 0xa28bc
addq $0xa0, %rsp
movb $0x1, %r15b
testq %rax, %rax
je 0x491ce
addq $0x2, 0xd0(%rbx)
addq $0x2, 0x190(%rbx)
movq -0x30(%rbp), %r13
movl 0x7bc(%r13), %ecx
subl 0xc18(%r13), %ecx
addl $-0xc, %ecx
movl $0x100000, %eax # imm = 0x100000
xorl %edx, %edx
divl %ecx
movl %eax, %r12d
shrl $0x7, %r12d
addl $0x5, %r12d
leaq 0x2c0(%rbx), %rsi
subq $0x8, %rsp
xorl %edi, %edi
movl $0x18, %edx
xorl %ecx, %ecx
movl %r12d, %r8d
movl $0x40, %r9d
pushq %r14
callq 0x97a10
addq $0x10, %rsp
testb %al, %al
je 0x49178
movq %rbx, %rdi
callq 0x491e0
jmp 0x491ce
leal (,%r12,8), %esi
subl %r12d, %esi
movq %rsi, 0x118(%rbx)
xorl %edi, %edi
movq %r14, %rdx
callq 0xa5de1
movq %rax, 0x90(%rbx)
testq %rax, %rax
je 0x4916e
movl 0x7c4(%r13), %eax
movq %rax, 0x610(%rbx)
movl 0x418(%r13), %eax
movl %eax, 0x618(%rbx)
addq $0xc, 0xd8(%rbx)
addq $0xc, 0x198(%rbx)
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
_ma_init_block_record:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov rbx, rdi
mov rsi, [rdi]
xor r14d, r14d
cmp byte ptr [rsi+7D9h], 0
setnz r14b
shl r14d, 10h
or r14, 10h
lea rdx, [rdi+0C8h]
mov ecx, [rsi+3F4h]
lea r8, [rdi+0D0h]
mov r11d, [rsi+3C8h]
mov eax, [rsi+3D4h]
lea r9d, [rax+2]
add rdi, 0E0h
mov [rbp+var_78], rdi
mov [rbp+var_30], rsi
mov r15d, [rsi+3F0h]
lea r10d, [r11+8]
lea eax, [rax+r11*4]
add eax, 5
mov [rbp+var_58], rax
sub r11d, r15d
lea r12d, [r15+2]
shl r15, 3
add r11d, 3
shl r11, 2
shl r12, 3
shl r10, 4
lea rax, [rbx+0D8h]
mov [rbp+var_70], rax
lea rax, [rbx+0A8h]
mov [rbp+var_68], rax
lea rax, [rbx+188h]
mov [rbp+var_60], rax
lea rax, [rbx+190h]
mov [rbp+var_50], rax
lea rax, [rbx+1A0h]
mov [rbp+var_48], rax
lea rax, [rbx+198h]
mov [rbp+var_40], rax
lea rax, [rbx+318h]
mov [rbp+var_38], rax
lea r13, [rbx+3C8h]
xor edi, edi
mov rsi, r14
xor eax, eax
push 0
push 0
push [rbp+var_58]
push r13
push r10
push [rbp+var_38]
push r11
push [rbp+var_40]
push r15
push [rbp+var_48]
push r9
push [rbp+var_50]
push rcx
push [rbp+var_60]
push r12
push [rbp+var_68]
push r11
push [rbp+var_70]
push r15
push [rbp+var_78]
call my_multi_malloc
add rsp, 0A0h
mov r15b, 1
test rax, rax
jz loc_491CE
add qword ptr [rbx+0D0h], 2
add qword ptr [rbx+190h], 2
mov r13, [rbp+var_30]
mov ecx, [r13+7BCh]
sub ecx, [r13+0C18h]
add ecx, 0FFFFFFF4h
mov eax, offset xmmword_100000
xor edx, edx
div ecx
mov r12d, eax
shr r12d, 7
add r12d, 5
lea rsi, [rbx+2C0h]
sub rsp, 8
xor edi, edi
mov edx, 18h
xor ecx, ecx
mov r8d, r12d
mov r9d, 40h ; '@'
push r14
call init_dynamic_array2
add rsp, 10h
test al, al
jz short loc_49178
loc_4916E:
mov rdi, rbx
call _ma_end_block_record
jmp short loc_491CE
loc_49178:
lea esi, ds:0[r12*8]
sub esi, r12d
mov [rbx+118h], rsi
xor edi, edi
mov rdx, r14
call my_malloc
mov [rbx+90h], rax
test rax, rax
jz short loc_4916E
mov eax, [r13+7C4h]
mov [rbx+610h], rax
mov eax, [r13+418h]
mov [rbx+618h], eax
add qword ptr [rbx+0D8h], 0Ch
add qword ptr [rbx+198h], 0Ch
xor r15d, r15d
loc_491CE:
mov eax, r15d
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long ma_init_block_record(long long a1)
{
long long v1; // r14
int v2; // r11d
int v3; // eax
long long v4; // r15
long long v5; // r10
int v6; // r11d
long long v7; // r12
long long v8; // rax
long long v9; // r15
unsigned int v10; // r12d
long long v11; // rsi
long long v12; // rax
long long v14; // [rsp+28h] [rbp-58h]
_DWORD *v15; // [rsp+50h] [rbp-30h]
v1 = ((unsigned __int8)(*(_BYTE *)(*(_QWORD *)a1 + 2009LL) != 0) << 16) | 0x10LL;
v2 = *(_DWORD *)(*(_QWORD *)a1 + 968LL);
v3 = *(_DWORD *)(*(_QWORD *)a1 + 980LL);
v15 = *(_DWORD **)a1;
v4 = *(unsigned int *)(*(_QWORD *)a1 + 1008LL);
v5 = (unsigned int)(v2 + 8);
v14 = (unsigned int)(v3 + 4 * v2 + 5);
v6 = v2 - v4;
v7 = (unsigned int)(v4 + 2);
v9 = 8 * v4;
v8 = my_multi_malloc(
0,
v1,
(int)a1 + 200,
*(_DWORD *)(*(_QWORD *)a1 + 1012LL),
(int)a1 + 208,
v3 + 2,
a1 + 224,
v9,
a1 + 216,
4LL * (unsigned int)(v6 + 3),
a1 + 168,
8 * v7,
a1 + 392,
*(unsigned int *)(*(_QWORD *)a1 + 1012LL),
a1 + 400,
(unsigned int)(v3 + 2),
a1 + 416,
v9,
a1 + 408,
4LL * (unsigned int)(v6 + 3),
a1 + 792,
16 * v5,
a1 + 968,
v14,
0LL,
0LL);
LOBYTE(v9) = 1;
if ( v8 )
{
*(_QWORD *)(a1 + 208) += 2LL;
*(_QWORD *)(a1 + 400) += 2LL;
v10 = (((unsigned int)&xmmword_100000 / (v15[495] - v15[774] - 12)) >> 7) + 5;
if ( (unsigned __int8)init_dynamic_array2(0, (int)a1 + 704, 24, 0, v10, 64, v1)
|| (v11 = 7 * v10, *(_QWORD *)(a1 + 280) = v11,
v12 = my_malloc(0LL, v11, v1),
(*(_QWORD *)(a1 + 144) = v12) == 0LL) )
{
ma_end_block_record(a1);
}
else
{
*(_QWORD *)(a1 + 1552) = (unsigned int)v15[497];
*(_DWORD *)(a1 + 1560) = v15[262];
*(_QWORD *)(a1 + 216) += 12LL;
*(_QWORD *)(a1 + 408) += 12LL;
LODWORD(v9) = 0;
}
}
return (unsigned int)v9;
}
|
_ma_init_block_record:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV RBX,RDI
MOV RSI,qword ptr [RDI]
XOR R14D,R14D
CMP byte ptr [RSI + 0x7d9],0x0
SETNZ R14B
SHL R14D,0x10
OR R14,0x10
LEA RDX,[RDI + 0xc8]
MOV ECX,dword ptr [RSI + 0x3f4]
LEA R8,[RDI + 0xd0]
MOV R11D,dword ptr [RSI + 0x3c8]
MOV EAX,dword ptr [RSI + 0x3d4]
LEA R9D,[RAX + 0x2]
ADD RDI,0xe0
MOV qword ptr [RBP + -0x78],RDI
MOV qword ptr [RBP + -0x30],RSI
MOV R15D,dword ptr [RSI + 0x3f0]
LEA R10D,[R11 + 0x8]
LEA EAX,[RAX + R11*0x4]
ADD EAX,0x5
MOV qword ptr [RBP + -0x58],RAX
SUB R11D,R15D
LEA R12D,[R15 + 0x2]
SHL R15,0x3
ADD R11D,0x3
SHL R11,0x2
SHL R12,0x3
SHL R10,0x4
LEA RAX,[RBX + 0xd8]
MOV qword ptr [RBP + -0x70],RAX
LEA RAX,[RBX + 0xa8]
MOV qword ptr [RBP + -0x68],RAX
LEA RAX,[RBX + 0x188]
MOV qword ptr [RBP + -0x60],RAX
LEA RAX,[RBX + 0x190]
MOV qword ptr [RBP + -0x50],RAX
LEA RAX,[RBX + 0x1a0]
MOV qword ptr [RBP + -0x48],RAX
LEA RAX,[RBX + 0x198]
MOV qword ptr [RBP + -0x40],RAX
LEA RAX,[RBX + 0x318]
MOV qword ptr [RBP + -0x38],RAX
LEA R13,[RBX + 0x3c8]
XOR EDI,EDI
MOV RSI,R14
XOR EAX,EAX
PUSH 0x0
PUSH 0x0
PUSH qword ptr [RBP + -0x58]
PUSH R13
PUSH R10
PUSH qword ptr [RBP + -0x38]
PUSH R11
PUSH qword ptr [RBP + -0x40]
PUSH R15
PUSH qword ptr [RBP + -0x48]
PUSH R9
PUSH qword ptr [RBP + -0x50]
PUSH RCX
PUSH qword ptr [RBP + -0x60]
PUSH R12
PUSH qword ptr [RBP + -0x68]
PUSH R11
PUSH qword ptr [RBP + -0x70]
PUSH R15
PUSH qword ptr [RBP + -0x78]
CALL 0x001a28bc
ADD RSP,0xa0
MOV R15B,0x1
TEST RAX,RAX
JZ 0x001491ce
ADD qword ptr [RBX + 0xd0],0x2
ADD qword ptr [RBX + 0x190],0x2
MOV R13,qword ptr [RBP + -0x30]
MOV ECX,dword ptr [R13 + 0x7bc]
SUB ECX,dword ptr [R13 + 0xc18]
ADD ECX,-0xc
MOV EAX,0x100000
XOR EDX,EDX
DIV ECX
MOV R12D,EAX
SHR R12D,0x7
ADD R12D,0x5
LEA RSI,[RBX + 0x2c0]
SUB RSP,0x8
XOR EDI,EDI
MOV EDX,0x18
XOR ECX,ECX
MOV R8D,R12D
MOV R9D,0x40
PUSH R14
CALL 0x00197a10
ADD RSP,0x10
TEST AL,AL
JZ 0x00149178
LAB_0014916e:
MOV RDI,RBX
CALL 0x001491e0
JMP 0x001491ce
LAB_00149178:
LEA ESI,[R12*0x8]
SUB ESI,R12D
MOV qword ptr [RBX + 0x118],RSI
XOR EDI,EDI
MOV RDX,R14
CALL 0x001a5de1
MOV qword ptr [RBX + 0x90],RAX
TEST RAX,RAX
JZ 0x0014916e
MOV EAX,dword ptr [R13 + 0x7c4]
MOV qword ptr [RBX + 0x610],RAX
MOV EAX,dword ptr [R13 + 0x418]
MOV dword ptr [RBX + 0x618],EAX
ADD qword ptr [RBX + 0xd8],0xc
ADD qword ptr [RBX + 0x198],0xc
XOR R15D,R15D
LAB_001491ce:
MOV EAX,R15D
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
ulong _ma_init_block_record(long *param_1)
{
int iVar1;
uint uVar2;
long lVar3;
char cVar4;
ulong uVar5;
long lVar6;
int iVar7;
ulong uVar8;
long lVar9;
ulong uVar10;
lVar3 = *param_1;
uVar8 = (ulong)(*(char *)(lVar3 + 0x7d9) != '\0') << 0x10 | 0x10;
iVar1 = *(int *)(lVar3 + 0x3c8);
iVar7 = *(int *)(lVar3 + 0x3d4) + 2;
uVar2 = *(uint *)(lVar3 + 0x3f0);
lVar9 = (ulong)uVar2 << 3;
lVar6 = (ulong)((iVar1 - uVar2) + 3) << 2;
lVar6 = my_multi_malloc(0,uVar8,param_1 + 0x19,*(int4 *)(lVar3 + 0x3f4),param_1 + 0x1a,iVar7
,param_1 + 0x1c,lVar9,param_1 + 0x1b,lVar6,param_1 + 0x15,
(ulong)(uVar2 + 2) << 3,param_1 + 0x31,*(int4 *)(lVar3 + 0x3f4),
param_1 + 0x32,iVar7,param_1 + 0x34,lVar9,param_1 + 0x33,lVar6,
param_1 + 99,(ulong)(iVar1 + 8) << 4,param_1 + 0x79,
*(int *)(lVar3 + 0x3d4) + iVar1 * 4 + 5,0,0);
uVar10 = CONCAT71((int7)((ulong)lVar9 >> 8),1);
if (lVar6 != 0) {
param_1[0x1a] = param_1[0x1a] + 2;
param_1[0x32] = param_1[0x32] + 2;
iVar7 = (int)(0x100000 / (ulong)((*(int *)(lVar3 + 0x7bc) - *(int *)(lVar3 + 0xc18)) - 0xc) >> 7
) + 5;
cVar4 = init_dynamic_array2(0,param_1 + 0x58,0x18,0,iVar7,0x40,uVar8);
if (cVar4 == '\0') {
uVar5 = (ulong)(uint)(iVar7 * 7);
param_1[0x23] = uVar5;
lVar6 = my_malloc(0,uVar5,uVar8);
param_1[0x12] = lVar6;
if (lVar6 != 0) {
param_1[0xc2] = (ulong)*(uint *)(lVar3 + 0x7c4);
*(int4 *)(param_1 + 0xc3) = *(int4 *)(lVar3 + 0x418);
param_1[0x1b] = param_1[0x1b] + 0xc;
param_1[0x33] = param_1[0x33] + 0xc;
uVar10 = 0;
goto LAB_001491ce;
}
}
_ma_end_block_record(param_1);
}
LAB_001491ce:
return uVar10 & 0xffffffff;
}
|
|
57,534
|
httplib::ThreadPool::ThreadPool(unsigned long, unsigned long)
|
hkr04[P]cpp-mcp/common/httplib.h
|
explicit ThreadPool(size_t n, size_t mqr = 0)
: shutdown_(false), max_queued_requests_(mqr) {
while (n) {
threads_.emplace_back(worker(*this));
n--;
}
}
|
O0
|
c
|
httplib::ThreadPool::ThreadPool(unsigned long, unsigned long):
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movq 0x50(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0xa8200
movq 0x20(%rsp), %rdi
leaq 0x956e2(%rip), %rax # 0x13d800
addq $0x10, %rax
movq %rax, (%rdi)
addq $0x8, %rdi
movq %rdi, 0x8(%rsp)
callq 0x98250
movq 0x20(%rsp), %rdi
addq $0x20, %rdi
movq %rdi, 0x10(%rsp)
callq 0xa8220
movq 0x20(%rsp), %rdi
movb $0x0, 0x38(%rdi)
movq 0x40(%rsp), %rax
movq %rax, 0x40(%rdi)
addq $0x48, %rdi
movq %rdi, 0x18(%rsp)
callq 0xcbf0
movq 0x20(%rsp), %rdi
addq $0x78, %rdi
callq 0x92440
cmpq $0x0, 0x48(%rsp)
je 0xa81f0
movq 0x20(%rsp), %rsi
movq %rsi, %rax
addq $0x8, %rax
movq %rax, (%rsp)
leaq 0x38(%rsp), %rdi
callq 0xa82b0
jmp 0xa8198
movq (%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0xa8230
jmp 0xa81a8
movq 0x48(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x48(%rsp)
jmp 0xa8174
movq 0x18(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
callq 0xcea0
movq 0x10(%rsp), %rdi
callq 0xa82d0
movq 0x8(%rsp), %rdi
callq 0x98320
movq 0x20(%rsp), %rdi
callq 0xa8500
jmp 0xa81f5
addq $0x58, %rsp
retq
movq 0x30(%rsp), %rdi
callq 0xce40
nop
|
_ZN7httplib10ThreadPoolC2Emm:
sub rsp, 58h
mov [rsp+58h+var_8], rdi
mov [rsp+58h+var_10], rsi
mov [rsp+58h+var_18], rdx
mov rdi, [rsp+58h+var_8]; this
mov [rsp+58h+var_38], rdi
call _ZN7httplib9TaskQueueC2Ev; httplib::TaskQueue::TaskQueue(void)
mov rdi, [rsp+58h+var_38]
lea rax, _ZTVN7httplib10ThreadPoolE; `vtable for'httplib::ThreadPool
add rax, 10h
mov [rdi], rax
add rdi, 8
mov [rsp+58h+var_50], rdi
call _ZNSt6vectorISt6threadSaIS0_EEC2Ev; std::vector<std::thread>::vector(void)
mov rdi, [rsp+58h+var_38]
add rdi, 20h ; ' '
mov [rsp+58h+var_48], rdi
call _ZNSt7__cxx114listISt8functionIFvvEESaIS3_EEC2Ev; std::list<std::function<void ()(void)>>::list(void)
mov rdi, [rsp+58h+var_38]
mov byte ptr [rdi+38h], 0
mov rax, [rsp+58h+var_18]
mov [rdi+40h], rax
add rdi, 48h ; 'H'; this
mov [rsp+58h+var_40], rdi
call __ZNSt18condition_variableC1Ev; std::condition_variable::condition_variable(void)
mov rdi, [rsp+58h+var_38]
add rdi, 78h ; 'x'; this
call _ZNSt5mutexC2Ev; std::mutex::mutex(void)
loc_A8174:
cmp [rsp+58h+var_10], 0
jz short loc_A81F0
mov rsi, [rsp+58h+var_38]
mov rax, rsi
add rax, 8
mov [rsp+58h+var_58], rax
lea rdi, [rsp+58h+var_20]
call _ZN7httplib10ThreadPool6workerC2ERS0_; httplib::ThreadPool::worker::worker(httplib::ThreadPool&)
jmp short $+2
loc_A8198:
mov rdi, [rsp+58h+var_58]
lea rsi, [rsp+58h+var_20]
call _ZNSt6vectorISt6threadSaIS0_EE12emplace_backIJN7httplib10ThreadPool6workerEEEERS0_DpOT_; std::vector<std::thread>::emplace_back<httplib::ThreadPool::worker>(httplib::ThreadPool::worker &&)
jmp short $+2
loc_A81A8:
mov rax, [rsp+58h+var_10]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rsp+58h+var_10], rax
jmp short loc_A8174
mov rdi, [rsp+arg_10]; this
mov rcx, rax
mov eax, edx
mov [rsp+arg_28], rcx
mov [rsp+arg_24], eax
call __ZNSt18condition_variableD1Ev; std::condition_variable::~condition_variable()
mov rdi, [rsp+arg_8]
call _ZNSt7__cxx114listISt8functionIFvvEESaIS3_EED2Ev; std::list<std::function<void ()(void)>>::~list()
mov rdi, [rsp+arg_0]
call _ZNSt6vectorISt6threadSaIS0_EED2Ev; std::vector<std::thread>::~vector()
mov rdi, [rsp+arg_18]; this
call _ZN7httplib9TaskQueueD2Ev; httplib::TaskQueue::~TaskQueue()
jmp short loc_A81F5
loc_A81F0:
add rsp, 58h
retn
loc_A81F5:
mov rdi, [rsp+arg_28]
call __Unwind_Resume
|
std::mutex * httplib::ThreadPool::ThreadPool(httplib::ThreadPool *this, long long a2, long long a3)
{
std::mutex *result; // rax
_BYTE v4[8]; // [rsp+38h] [rbp-20h] BYREF
long long v5; // [rsp+40h] [rbp-18h]
long long v6; // [rsp+48h] [rbp-10h]
httplib::TaskQueue *v7; // [rsp+50h] [rbp-8h]
v7 = this;
v6 = a2;
v5 = a3;
httplib::TaskQueue::TaskQueue(this);
*(_QWORD *)this = &`vtable for'httplib::ThreadPool + 2;
std::vector<std::thread>::vector((long long)this + 8);
std::list<std::function<void ()(void)>>::list();
*((_BYTE *)this + 56) = 0;
*((_QWORD *)this + 8) = v5;
std::condition_variable::condition_variable((httplib::ThreadPool *)((char *)this + 72));
result = std::mutex::mutex((httplib::ThreadPool *)((char *)this + 120));
while ( v6 )
{
httplib::ThreadPool::worker::worker((httplib::ThreadPool::worker *)v4, this);
std::vector<std::thread>::emplace_back<httplib::ThreadPool::worker>((char *)this + 8, v4);
result = (std::mutex *)--v6;
}
return result;
}
|
ThreadPool:
SUB RSP,0x58
MOV qword ptr [RSP + 0x50],RDI
MOV qword ptr [RSP + 0x48],RSI
MOV qword ptr [RSP + 0x40],RDX
MOV RDI,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x20],RDI
CALL 0x001a8200
MOV RDI,qword ptr [RSP + 0x20]
LEA RAX,[0x23d800]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
ADD RDI,0x8
MOV qword ptr [RSP + 0x8],RDI
CALL 0x00198250
MOV RDI,qword ptr [RSP + 0x20]
ADD RDI,0x20
MOV qword ptr [RSP + 0x10],RDI
CALL 0x001a8220
MOV RDI,qword ptr [RSP + 0x20]
MOV byte ptr [RDI + 0x38],0x0
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RDI + 0x40],RAX
ADD RDI,0x48
MOV qword ptr [RSP + 0x18],RDI
CALL 0x0010cbf0
MOV RDI,qword ptr [RSP + 0x20]
ADD RDI,0x78
CALL 0x00192440
LAB_001a8174:
CMP qword ptr [RSP + 0x48],0x0
JZ 0x001a81f0
MOV RSI,qword ptr [RSP + 0x20]
MOV RAX,RSI
ADD RAX,0x8
MOV qword ptr [RSP],RAX
LAB_001a818c:
LEA RDI,[RSP + 0x38]
CALL 0x001a82b0
JMP 0x001a8198
LAB_001a8198:
MOV RDI,qword ptr [RSP]
LEA RSI,[RSP + 0x38]
CALL 0x001a8230
LAB_001a81a6:
JMP 0x001a81a8
LAB_001a81a8:
MOV RAX,qword ptr [RSP + 0x48]
ADD RAX,-0x1
MOV qword ptr [RSP + 0x48],RAX
JMP 0x001a8174
LAB_001a81f0:
ADD RSP,0x58
RET
|
/* httplib::ThreadPool::ThreadPool(unsigned long, unsigned long) */
void __thiscall httplib::ThreadPool::ThreadPool(ThreadPool *this,ulong param_1,ulong param_2)
{
worker local_20 [8];
ulong local_18;
ulong local_10;
ThreadPool *local_8;
local_18 = param_2;
local_10 = param_1;
local_8 = this;
TaskQueue::TaskQueue((TaskQueue *)this);
*(int ***)this = &PTR__ThreadPool_0023d810;
std::vector<std::thread,std::allocator<std::thread>>::vector
((vector<std::thread,std::allocator<std::thread>> *)(this + 8));
std::__cxx11::list<std::function<void()>,std::allocator<std::function<void()>>>::list
((list<std::function<void()>,std::allocator<std::function<void()>>> *)(this + 0x20));
this[0x38] = (ThreadPool)0x0;
*(ulong *)(this + 0x40) = local_18;
std::condition_variable::condition_variable((condition_variable *)(this + 0x48));
std::mutex::mutex((mutex *)(this + 0x78));
for (; local_10 != 0; local_10 = local_10 - 1) {
/* try { // try from 001a818c to 001a81a5 has its CatchHandler @ 001a81b8 */
worker::worker(local_20,this);
std::vector<std::thread,std::allocator<std::thread>>::emplace_back<httplib::ThreadPool::worker>
((vector<std::thread,std::allocator<std::thread>> *)(this + 8),local_20);
}
return;
}
|
|
57,535
|
httplib::ThreadPool::ThreadPool(unsigned long, unsigned long)
|
hkr04[P]cpp-mcp/common/httplib.h
|
explicit ThreadPool(size_t n, size_t mqr = 0)
: shutdown_(false), max_queued_requests_(mqr) {
while (n) {
threads_.emplace_back(worker(*this));
n--;
}
}
|
O2
|
c
|
httplib::ThreadPool::ThreadPool(unsigned long, unsigned long):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x41608(%rip), %rax # 0x77888
movq %rax, (%rdi)
andq $0x0, 0x18(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
leaq 0x20(%rdi), %r12
movq %r12, 0x28(%rdi)
movq %r12, 0x20(%rdi)
andq $0x0, 0x30(%rdi)
leaq 0x8(%rdi), %r15
movb $0x0, 0x38(%rdi)
movq %rdx, 0x40(%rdi)
leaq 0x48(%rdi), %r13
movq %r13, %rdi
callq 0xa910
xorps %xmm0, %xmm0
movups %xmm0, 0x88(%r14)
movups %xmm0, 0x78(%r14)
andq $0x0, 0x98(%r14)
movq %rsp, %rbp
subq $0x1, %rbx
jb 0x362ea
movq %r14, (%rsp)
movq %r15, %rdi
movq %rbp, %rsi
callq 0x3631c
jmp 0x362d3
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %r13, %rdi
callq 0xab10
movq %r12, %rdi
callq 0x367ce
movq %r15, %rdi
callq 0x199c6
movq %rbx, %rdi
callq 0xaac0
|
_ZN7httplib10ThreadPoolC2Emm:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rsi
mov r14, rdi
lea rax, off_77888
mov [rdi], rax
and qword ptr [rdi+18h], 0
xorps xmm0, xmm0
movups xmmword ptr [rdi+8], xmm0
lea r12, [rdi+20h]
mov [rdi+28h], r12
mov [rdi+20h], r12
and qword ptr [rdi+30h], 0
lea r15, [rdi+8]
mov byte ptr [rdi+38h], 0
mov [rdi+40h], rdx
lea r13, [rdi+48h]
mov rdi, r13; this
call __ZNSt18condition_variableC1Ev; std::condition_variable::condition_variable(void)
xorps xmm0, xmm0
movups xmmword ptr [r14+88h], xmm0
movups xmmword ptr [r14+78h], xmm0
and qword ptr [r14+98h], 0
mov rbp, rsp
loc_362D3:
sub rbx, 1
jb short loc_362EA
mov [rsp+38h+var_38], r14
mov rdi, r15
mov rsi, rbp
call _ZNSt6vectorISt6threadSaIS0_EE12emplace_backIJN7httplib10ThreadPool6workerEEEERS0_DpOT_; std::vector<std::thread>::emplace_back<httplib::ThreadPool::worker>(httplib::ThreadPool::worker &&)
jmp short loc_362D3
loc_362EA:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, r13; this
call __ZNSt18condition_variableD1Ev; std::condition_variable::~condition_variable()
mov rdi, r12
call _ZNSt7__cxx1110_List_baseISt8functionIFvvEESaIS3_EE8_M_clearEv; std::_List_base<std::function<void ()(void)>>::_M_clear(void)
mov rdi, r15
call _ZNSt6vectorISt6threadSaIS0_EED2Ev; std::vector<std::thread>::~vector()
mov rdi, rbx
call __Unwind_Resume
|
long long httplib::ThreadPool::ThreadPool(httplib::ThreadPool *this, long long a2, long long a3)
{
httplib::ThreadPool *v3; // rax
long long result; // rax
httplib::ThreadPool *v7; // [rsp+0h] [rbp-38h] BYREF
v7 = v3;
*(_QWORD *)this = off_77888;
*((_QWORD *)this + 3) = 0LL;
*(_OWORD *)((char *)this + 8) = 0LL;
*((_QWORD *)this + 5) = (char *)this + 32;
*((_QWORD *)this + 4) = (char *)this + 32;
*((_QWORD *)this + 6) = 0LL;
*((_BYTE *)this + 56) = 0;
*((_QWORD *)this + 8) = a3;
result = std::condition_variable::condition_variable((httplib::ThreadPool *)((char *)this + 72));
*(_OWORD *)((char *)this + 136) = 0LL;
*(_OWORD *)((char *)this + 120) = 0LL;
*((_QWORD *)this + 19) = 0LL;
while ( a2-- != 0 )
{
v7 = this;
result = std::vector<std::thread>::emplace_back<httplib::ThreadPool::worker>((char *)this + 8, &v7);
}
return result;
}
|
ThreadPool:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
LEA RAX,[0x177888]
MOV qword ptr [RDI],RAX
AND qword ptr [RDI + 0x18],0x0
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x8],XMM0
LEA R12,[RDI + 0x20]
MOV qword ptr [RDI + 0x28],R12
MOV qword ptr [RDI + 0x20],R12
AND qword ptr [RDI + 0x30],0x0
LEA R15,[RDI + 0x8]
MOV byte ptr [RDI + 0x38],0x0
MOV qword ptr [RDI + 0x40],RDX
LEA R13,[RDI + 0x48]
MOV RDI,R13
CALL 0x0010a910
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R14 + 0x88],XMM0
MOVUPS xmmword ptr [R14 + 0x78],XMM0
AND qword ptr [R14 + 0x98],0x0
MOV RBP,RSP
LAB_001362d3:
SUB RBX,0x1
JC 0x001362ea
MOV qword ptr [RSP],R14
LAB_001362dd:
MOV RDI,R15
MOV RSI,RBP
CALL 0x0013631c
LAB_001362e8:
JMP 0x001362d3
LAB_001362ea:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* httplib::ThreadPool::ThreadPool(unsigned long, unsigned long) */
void __thiscall httplib::ThreadPool::ThreadPool(ThreadPool *this,ulong param_1,ulong param_2)
{
bool bVar1;
ThreadPool *local_38;
*(int ***)this = &PTR__ThreadPool_00177888;
*(int8 *)(this + 0x18) = 0;
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
*(ThreadPool **)(this + 0x28) = this + 0x20;
*(ThreadPool **)(this + 0x20) = this + 0x20;
*(int8 *)(this + 0x30) = 0;
this[0x38] = (ThreadPool)0x0;
*(ulong *)(this + 0x40) = param_2;
std::condition_variable::condition_variable((condition_variable *)(this + 0x48));
*(int8 *)(this + 0x88) = 0;
*(int8 *)(this + 0x90) = 0;
*(int8 *)(this + 0x78) = 0;
*(int8 *)(this + 0x80) = 0;
*(int8 *)(this + 0x98) = 0;
while (bVar1 = param_1 != 0, param_1 = param_1 - 1, bVar1) {
local_38 = this;
/* try { // try from 001362dd to 001362e7 has its CatchHandler @ 001362f9 */
std::vector<std::thread,std::allocator<std::thread>>::emplace_back<httplib::ThreadPool::worker>
((vector<std::thread,std::allocator<std::thread>> *)(this + 8),(worker *)&local_38);
}
return;
}
|
|
57,536
|
rtree_find_req
|
eloqsql/storage/myisam/rt_index.c
|
static int rtree_find_req(MI_INFO *info, MI_KEYDEF *keyinfo, uint search_flag,
uint nod_cmp_flag, my_off_t page, int level)
{
uchar *k;
uchar *last;
uint nod_flag;
int res;
uchar *page_buf;
int k_len;
uint *saved_key = (uint*) (info->rtree_recursion_state) + level;
if (!(page_buf = (uchar*)my_alloca((uint)keyinfo->block_length)))
{
my_errno = HA_ERR_OUT_OF_MEM;
return -1;
}
if (!_mi_fetch_keypage(info, keyinfo, page, DFLT_INIT_HITS, page_buf, 0))
goto err1;
nod_flag = mi_test_if_nod(page_buf);
k_len = keyinfo->keylength - info->s->base.rec_reflength;
if(info->rtree_recursion_depth >= level)
{
k = page_buf + *saved_key;
}
else
{
k = rt_PAGE_FIRST_KEY(page_buf, nod_flag);
}
last = rt_PAGE_END(page_buf);
for (; k < last; k = rt_PAGE_NEXT_KEY(k, k_len, nod_flag))
{
if (nod_flag)
{
/* this is an internal node in the tree */
if (!(res = rtree_key_cmp(keyinfo->seg, info->first_mbr_key, k,
info->last_rkey_length, nod_cmp_flag)))
{
switch ((res = rtree_find_req(info, keyinfo, search_flag, nod_cmp_flag,
_mi_kpos(nod_flag, k), level + 1)))
{
case 0: /* found - exit from recursion */
*saved_key = (uint) (k - page_buf);
goto ok;
case 1: /* not found - continue searching */
info->rtree_recursion_depth = level;
break;
default: /* error */
case -1:
goto err1;
}
}
}
else
{
/* this is a leaf */
if (!rtree_key_cmp(keyinfo->seg, info->first_mbr_key, k,
info->last_rkey_length, search_flag))
{
uchar *after_key = rt_PAGE_NEXT_KEY(k, k_len, nod_flag);
info->lastpos = _mi_dpos(info, 0, after_key);
info->lastkey_length = k_len + info->s->base.rec_reflength;
memcpy(info->lastkey, k, info->lastkey_length);
info->rtree_recursion_depth = level;
*saved_key = (uint) (last - page_buf);
if (after_key < last)
{
info->int_keypos = info->buff;
info->int_maxpos = info->buff + (last - after_key);
memcpy(info->buff, after_key, last - after_key);
info->buff_used = 0;
}
else
{
info->buff_used = 1;
}
res = 0;
goto ok;
}
}
}
info->lastpos = HA_OFFSET_ERROR;
my_errno = HA_ERR_KEY_NOT_FOUND;
res = 1;
ok:
my_afree((uchar*)page_buf);
return res;
err1:
my_afree((uchar*)page_buf);
info->lastpos = HA_OFFSET_ERROR;
return -1;
}
|
O3
|
c
|
rtree_find_req:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, -0x40(%rbp)
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq 0x3b8(%rdi), %r14
movzwl 0xe(%rsi), %eax
movq %rsp, %r12
addl $0xf, %eax
andl $-0x10, %eax
subq %rax, %r12
movq %r12, %rsp
xorl %r13d, %r13d
movq %rsi, -0x38(%rbp)
movl $0x3, %ecx
movq %r12, %r8
xorl %r9d, %r9d
callq 0x84f68
testq %rax, %rax
je 0x8af62
movzbl (%r12), %esi
movq (%rbx), %rax
testb %sil, %sil
jns 0x8ae42
movl 0x17c(%rax), %r13d
movslq -0x40(%rbp), %rcx
cmpl %ecx, 0x3c0(%rbx)
movq %r14, -0x58(%rbp)
movq %rcx, -0x50(%rbp)
jge 0x8ae60
leaq 0x2(%r12), %rcx
movl %r13d, %edx
jmp 0x8ae67
movl (%r14,%rcx,4), %edx
movq %r12, %rcx
movl %edx, %r14d
addq %rcx, %r14
movzbl 0x1(%r12), %ecx
andl $0x7f, %esi
shll $0x8, %esi
orq %rcx, %rsi
movq %rsi, -0x60(%rbp)
movq %r12, -0x68(%rbp)
addq %rsi, %r12
cmpq %r12, %r14
jae 0x8af28
movq -0x38(%rbp), %rcx
movzwl 0x12(%rcx), %ecx
subl 0x178(%rax), %ecx
movq -0x40(%rbp), %rax
incl %eax
movl %eax, -0x44(%rbp)
movslq %ecx, %r15
movq -0x38(%rbp), %rax
movq 0x28(%rax), %rdi
movq 0x118(%rbx), %rsi
movl 0x1dc(%rbx), %ecx
movq %r14, %rdx
movl $0x400, %r8d # imm = 0x400
callq 0x8c724
testl %r13d, %r13d
je 0x8af0a
movl %r13d, %ecx
testl %eax, %eax
jne 0x8af1b
movl %r13d, %edi
movq %r14, %rsi
callq 0x858e2
movq %rbx, %rdi
movq -0x38(%rbp), %rsi
movq %rax, %rdx
movl -0x44(%rbp), %ecx
callq 0x8adcf
cmpl $0x1, %eax
jne 0x8af46
movq -0x40(%rbp), %rax
movl %eax, 0x3c0(%rbx)
movl %r13d, %ecx
jmp 0x8af1b
testl %eax, %eax
je 0x8af98
movq (%rbx), %rax
movl 0x178(%rax), %ecx
addq %r15, %r14
movl %ecx, %eax
addq %rax, %r14
cmpq %r12, %r14
jb 0x8aeaa
movq $-0x1, 0x170(%rbx)
callq 0xa2f56
movl $0x78, (%rax)
movl $0x1, %r15d
jmp 0x8af73
testl %eax, %eax
movq -0x58(%rbp), %rax
movq -0x68(%rbp), %rcx
jne 0x8af62
subl %ecx, %r14d
movq -0x50(%rbp), %rcx
movl %r14d, (%rax,%rcx,4)
xorl %r15d, %r15d
jmp 0x8af73
movq $-0x1, 0x170(%rbx)
movl $0xffffffff, %r15d # imm = 0xFFFFFFFF
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x8b043
movl %r15d, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %r13
movq (%rbx), %rcx
movl 0x178(%rcx), %edx
addq %r14, %rdx
addq %r15, %rdx
movq %rdx, -0x38(%rbp)
xorl %r15d, %r15d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x859c1
movq %rax, 0x170(%rbx)
movq (%rbx), %rax
movq 0x108(%rbx), %rdi
addl 0x178(%rax), %r13d
movl %r13d, 0x1d8(%rbx)
movq %r14, %rsi
movq %r13, %rdx
callq 0x29080
movq -0x38(%rbp), %rsi
movq -0x40(%rbp), %rax
movl %eax, 0x3c0(%rbx)
movq -0x58(%rbp), %rax
movq -0x60(%rbp), %rcx
movq -0x50(%rbp), %rdx
movl %ecx, (%rax,%rdx,4)
cmpq %r12, %rsi
jae 0x8b037
movq 0x100(%rbx), %rdi
movq %rdi, 0x128(%rbx)
subq %rsi, %r12
leaq (%rdi,%r12), %rax
movq %rax, 0x130(%rbx)
movq %r12, %rdx
callq 0x29080
movb $0x0, 0x33d(%rbx)
jmp 0x8af73
movb $0x1, 0x33d(%rbx)
jmp 0x8af73
callq 0x29250
|
rtree_find_req:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov [rbp+var_40], rcx
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov r14, [rdi+3B8h]
movzx eax, word ptr [rsi+0Eh]
mov r12, rsp
add eax, 0Fh
and eax, 0FFFFFFF0h
sub r12, rax
mov rsp, r12
xor r13d, r13d
mov [rbp+var_38], rsi
mov ecx, 3
mov r8, r12
xor r9d, r9d
call _mi_fetch_keypage
test rax, rax
jz loc_8AF62
movzx esi, byte ptr [r12]
mov rax, [rbx]
test sil, sil
jns short loc_8AE42
mov r13d, [rax+17Ch]
loc_8AE42:
movsxd rcx, dword ptr [rbp+var_40]
cmp [rbx+3C0h], ecx
mov [rbp+var_58], r14
mov [rbp+var_50], rcx
jge short loc_8AE60
lea rcx, [r12+2]
mov edx, r13d
jmp short loc_8AE67
loc_8AE60:
mov edx, [r14+rcx*4]
mov rcx, r12
loc_8AE67:
mov r14d, edx
add r14, rcx
movzx ecx, byte ptr [r12+1]
and esi, 7Fh
shl esi, 8
or rsi, rcx
mov [rbp+var_60], rsi
mov [rbp+var_68], r12
add r12, rsi
cmp r14, r12
jnb loc_8AF28
mov rcx, [rbp+var_38]
movzx ecx, word ptr [rcx+12h]
sub ecx, [rax+178h]
mov rax, [rbp+var_40]
inc eax
mov [rbp+var_44], eax
movsxd r15, ecx
loc_8AEAA:
mov rax, [rbp+var_38]
mov rdi, [rax+28h]
mov rsi, [rbx+118h]
mov ecx, [rbx+1DCh]
mov rdx, r14
mov r8d, 400h
call rtree_key_cmp
test r13d, r13d
jz short loc_8AF0A
mov ecx, r13d
test eax, eax
jnz short loc_8AF1B
mov edi, r13d
mov rsi, r14
call _mi_kpos
mov rdi, rbx
mov rsi, [rbp+var_38]
mov rdx, rax
mov ecx, [rbp+var_44]
call rtree_find_req
cmp eax, 1
jnz short loc_8AF46
mov rax, [rbp+var_40]
mov [rbx+3C0h], eax
mov ecx, r13d
jmp short loc_8AF1B
loc_8AF0A:
test eax, eax
jz loc_8AF98
mov rax, [rbx]
mov ecx, [rax+178h]
loc_8AF1B:
add r14, r15
mov eax, ecx
add r14, rax
cmp r14, r12
jb short loc_8AEAA
loc_8AF28:
mov qword ptr [rbx+170h], 0FFFFFFFFFFFFFFFFh
call _my_thread_var
mov dword ptr [rax], 78h ; 'x'
mov r15d, 1
jmp short loc_8AF73
loc_8AF46:
test eax, eax
mov rax, [rbp+var_58]
mov rcx, [rbp+var_68]
jnz short loc_8AF62
sub r14d, ecx
mov rcx, [rbp+var_50]
mov [rax+rcx*4], r14d
xor r15d, r15d
jmp short loc_8AF73
loc_8AF62:
mov qword ptr [rbx+170h], 0FFFFFFFFFFFFFFFFh
mov r15d, 0FFFFFFFFh
loc_8AF73:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz loc_8B043
mov eax, r15d
lea rsp, [rbp-28h]
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_8AF98:
mov r13, r15
mov rcx, [rbx]
mov edx, [rcx+178h]
add rdx, r14
add rdx, r15
mov [rbp+var_38], rdx
xor r15d, r15d
mov rdi, rbx
xor esi, esi
call _mi_dpos
mov [rbx+170h], rax
mov rax, [rbx]
mov rdi, [rbx+108h]
add r13d, [rax+178h]
mov [rbx+1D8h], r13d
mov rsi, r14
mov rdx, r13
call _memcpy
mov rsi, [rbp+var_38]
mov rax, [rbp+var_40]
mov [rbx+3C0h], eax
mov rax, [rbp+var_58]
mov rcx, [rbp+var_60]
mov rdx, [rbp+var_50]
mov [rax+rdx*4], ecx
cmp rsi, r12
jnb short loc_8B037
mov rdi, [rbx+100h]
mov [rbx+128h], rdi
sub r12, rsi
lea rax, [rdi+r12]
mov [rbx+130h], rax
mov rdx, r12
call _memcpy
mov byte ptr [rbx+33Dh], 0
jmp loc_8AF73
loc_8B037:
mov byte ptr [rbx+33Dh], 1
jmp loc_8AF73
loc_8B043:
call ___stack_chk_fail
|
long long rtree_find_req(long long *a1, long long a2, long long a3, long long a4)
{
long long *v4; // rbx
long long v5; // r14
char *v6; // r12
unsigned int v7; // r13d
char v8; // si
long long v9; // rax
bool v10; // cc
char *v11; // rcx
unsigned int v12; // edx
unsigned long long v13; // r14
char *v14; // r12
int v15; // ecx
long long v16; // r15
int v17; // eax
unsigned int v18; // ecx
unsigned long long v19; // rax
int req; // eax
unsigned int v21; // r15d
int v23; // r13d
long long v24; // rdi
long long v25; // r13
unsigned long long v26; // rsi
long long v27; // rdi
char *v28; // r12
long long v29; // [rsp+0h] [rbp-70h] BYREF
char *v30; // [rsp+8h] [rbp-68h]
unsigned long long v31; // [rsp+10h] [rbp-60h]
long long v32; // [rsp+18h] [rbp-58h]
long long v33; // [rsp+20h] [rbp-50h]
unsigned int v34; // [rsp+2Ch] [rbp-44h]
long long v35; // [rsp+30h] [rbp-40h]
long long v36; // [rsp+38h] [rbp-38h]
unsigned long long v37; // [rsp+40h] [rbp-30h]
v35 = a4;
v4 = a1;
v37 = __readfsqword(0x28u);
v5 = a1[119];
v6 = (char *)&v29 - ((*(unsigned __int16 *)(a2 + 14) + 15) & 0xFFFFFFF0);
v7 = 0;
v36 = a2;
if ( !mi_fetch_keypage(a1, a2, a3) )
{
LABEL_19:
v4[46] = -1LL;
return (unsigned int)-1;
}
v8 = *v6;
v9 = *a1;
if ( *v6 < 0 )
v7 = *(_DWORD *)(v9 + 380);
v10 = *((_DWORD *)a1 + 240) < (int)v35;
v32 = v5;
v33 = (int)v35;
if ( v10 )
{
v11 = v6 + 2;
v12 = v7;
}
else
{
v12 = *(_DWORD *)(v5 + 4LL * (int)v35);
v11 = v6;
}
v13 = (unsigned long long)&v11[v12];
v31 = (unsigned __int8)v6[1] | (unsigned long long)((unsigned __int8)(v8 & 0x7F) << 8);
v30 = v6;
v14 = &v6[v31];
if ( v13 >= (unsigned long long)v14 )
{
LABEL_16:
v4[46] = -1LL;
*(_DWORD *)my_thread_var(a1) = 120;
return 1;
}
v15 = *(unsigned __int16 *)(v36 + 18) - *(_DWORD *)(v9 + 376);
v34 = v35 + 1;
v16 = v15;
while ( 1 )
{
a1 = *(long long **)(v36 + 40);
v17 = rtree_key_cmp(a1, v4[35], v13, *((unsigned int *)v4 + 119), 1024LL);
if ( v7 )
break;
if ( !v17 )
{
v23 = v16;
v36 = v16 + v13 + *(unsigned int *)(*v4 + 376);
v21 = 0;
v4[46] = mi_dpos(v4, 0, v36);
v24 = v4[33];
v25 = (unsigned int)(*(_DWORD *)(*v4 + 376) + v23);
*((_DWORD *)v4 + 118) = v25;
memcpy(v24, v13, v25);
v26 = v36;
*((_DWORD *)v4 + 240) = v35;
*(_DWORD *)(v32 + 4 * v33) = v31;
if ( v26 >= (unsigned long long)v14 )
{
*((_BYTE *)v4 + 829) = 1;
}
else
{
v27 = v4[32];
v4[37] = v27;
v28 = &v14[-v26];
v4[38] = (long long)&v28[v27];
memcpy(v27, v26, v28);
*((_BYTE *)v4 + 829) = 0;
}
return v21;
}
v18 = *(_DWORD *)(*v4 + 376);
LABEL_15:
v13 += v18 + v16;
if ( v13 >= (unsigned long long)v14 )
goto LABEL_16;
}
v18 = v7;
if ( v17 )
goto LABEL_15;
v19 = mi_kpos(v7, v13);
a1 = v4;
req = rtree_find_req(v4, v36, v19, v34);
if ( req == 1 )
{
*((_DWORD *)v4 + 240) = v35;
v18 = v7;
goto LABEL_15;
}
if ( req )
goto LABEL_19;
*(_DWORD *)(v32 + 4 * v33) = v13 - (_DWORD)v30;
return 0;
}
|
rtree_find_req:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RBP + -0x40],RCX
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV R14,qword ptr [RDI + 0x3b8]
MOVZX EAX,word ptr [RSI + 0xe]
MOV R12,RSP
ADD EAX,0xf
AND EAX,0xfffffff0
SUB R12,RAX
MOV RSP,R12
XOR R13D,R13D
MOV qword ptr [RBP + -0x38],RSI
MOV ECX,0x3
MOV R8,R12
XOR R9D,R9D
CALL 0x00184f68
TEST RAX,RAX
JZ 0x0018af62
MOVZX ESI,byte ptr [R12]
MOV RAX,qword ptr [RBX]
TEST SIL,SIL
JNS 0x0018ae42
MOV R13D,dword ptr [RAX + 0x17c]
LAB_0018ae42:
MOVSXD RCX,dword ptr [RBP + -0x40]
CMP dword ptr [RBX + 0x3c0],ECX
MOV qword ptr [RBP + -0x58],R14
MOV qword ptr [RBP + -0x50],RCX
JGE 0x0018ae60
LEA RCX,[R12 + 0x2]
MOV EDX,R13D
JMP 0x0018ae67
LAB_0018ae60:
MOV EDX,dword ptr [R14 + RCX*0x4]
MOV RCX,R12
LAB_0018ae67:
MOV R14D,EDX
ADD R14,RCX
MOVZX ECX,byte ptr [R12 + 0x1]
AND ESI,0x7f
SHL ESI,0x8
OR RSI,RCX
MOV qword ptr [RBP + -0x60],RSI
MOV qword ptr [RBP + -0x68],R12
ADD R12,RSI
CMP R14,R12
JNC 0x0018af28
MOV RCX,qword ptr [RBP + -0x38]
MOVZX ECX,word ptr [RCX + 0x12]
SUB ECX,dword ptr [RAX + 0x178]
MOV RAX,qword ptr [RBP + -0x40]
INC EAX
MOV dword ptr [RBP + -0x44],EAX
MOVSXD R15,ECX
LAB_0018aeaa:
MOV RAX,qword ptr [RBP + -0x38]
MOV RDI,qword ptr [RAX + 0x28]
MOV RSI,qword ptr [RBX + 0x118]
MOV ECX,dword ptr [RBX + 0x1dc]
MOV RDX,R14
MOV R8D,0x400
CALL 0x0018c724
TEST R13D,R13D
JZ 0x0018af0a
MOV ECX,R13D
TEST EAX,EAX
JNZ 0x0018af1b
MOV EDI,R13D
MOV RSI,R14
CALL 0x001858e2
MOV RDI,RBX
MOV RSI,qword ptr [RBP + -0x38]
MOV RDX,RAX
MOV ECX,dword ptr [RBP + -0x44]
CALL 0x0018adcf
CMP EAX,0x1
JNZ 0x0018af46
MOV RAX,qword ptr [RBP + -0x40]
MOV dword ptr [RBX + 0x3c0],EAX
MOV ECX,R13D
JMP 0x0018af1b
LAB_0018af0a:
TEST EAX,EAX
JZ 0x0018af98
MOV RAX,qword ptr [RBX]
MOV ECX,dword ptr [RAX + 0x178]
LAB_0018af1b:
ADD R14,R15
MOV EAX,ECX
ADD R14,RAX
CMP R14,R12
JC 0x0018aeaa
LAB_0018af28:
MOV qword ptr [RBX + 0x170],-0x1
CALL 0x001a2f56
MOV dword ptr [RAX],0x78
MOV R15D,0x1
JMP 0x0018af73
LAB_0018af46:
TEST EAX,EAX
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x68]
JNZ 0x0018af62
SUB R14D,ECX
MOV RCX,qword ptr [RBP + -0x50]
MOV dword ptr [RAX + RCX*0x4],R14D
XOR R15D,R15D
JMP 0x0018af73
LAB_0018af62:
MOV qword ptr [RBX + 0x170],-0x1
MOV R15D,0xffffffff
LAB_0018af73:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0018b043
MOV EAX,R15D
LEA RSP,[RBP + -0x28]
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0018af98:
MOV R13,R15
MOV RCX,qword ptr [RBX]
MOV EDX,dword ptr [RCX + 0x178]
ADD RDX,R14
ADD RDX,R15
MOV qword ptr [RBP + -0x38],RDX
XOR R15D,R15D
MOV RDI,RBX
XOR ESI,ESI
CALL 0x001859c1
MOV qword ptr [RBX + 0x170],RAX
MOV RAX,qword ptr [RBX]
MOV RDI,qword ptr [RBX + 0x108]
ADD R13D,dword ptr [RAX + 0x178]
MOV dword ptr [RBX + 0x1d8],R13D
MOV RSI,R14
MOV RDX,R13
CALL 0x00129080
MOV RSI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x40]
MOV dword ptr [RBX + 0x3c0],EAX
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x60]
MOV RDX,qword ptr [RBP + -0x50]
MOV dword ptr [RAX + RDX*0x4],ECX
CMP RSI,R12
JNC 0x0018b037
MOV RDI,qword ptr [RBX + 0x100]
MOV qword ptr [RBX + 0x128],RDI
SUB R12,RSI
LEA RAX,[RDI + R12*0x1]
MOV qword ptr [RBX + 0x130],RAX
MOV RDX,R12
CALL 0x00129080
MOV byte ptr [RBX + 0x33d],0x0
JMP 0x0018af73
LAB_0018b037:
MOV byte ptr [RBX + 0x33d],0x1
JMP 0x0018af73
LAB_0018b043:
CALL 0x00129250
|
int8 rtree_find_req(long *param_1,byte *param_2,int8 param_3,int8 param_4)
{
uint uVar1;
int4 uVar2;
void *pvVar3;
long lVar4;
int iVar5;
long lVar6;
int8 uVar7;
int4 *puVar8;
long lVar9;
int iVar10;
ulong uVar11;
byte *pbVar12;
byte *pbVar13;
size_t __n;
uint uVar14;
byte *pbVar15;
long in_FS_OFFSET;
int8 uStack_80;
byte abStack_78 [8];
byte *local_70;
ulong local_68;
long local_60;
long local_58;
int local_4c;
int8 local_48;
byte *local_40;
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
lVar9 = param_1[0x77];
lVar4 = -(ulong)(*(ushort *)(param_2 + 0xe) + 0xf & 0xfffffff0);
pbVar12 = abStack_78 + lVar4;
uVar14 = 0;
local_48 = param_4;
local_40 = param_2;
*(int8 *)((long)&uStack_80 + lVar4) = 0x18ae25;
lVar6 = _mi_fetch_keypage();
if (lVar6 == 0) {
LAB_0018af62:
param_1[0x2e] = -1;
uVar7 = 0xffffffff;
}
else {
if ((char)*pbVar12 < '\0') {
uVar14 = *(uint *)(*param_1 + 0x17c);
}
local_60 = lVar9;
local_58 = (long)(int)local_48;
if ((int)param_1[0x78] < (int)local_48) {
pbVar15 = abStack_78 + lVar4 + 2;
uVar1 = uVar14;
}
else {
uVar1 = *(uint *)(lVar9 + (long)(int)local_48 * 4);
pbVar15 = pbVar12;
}
pbVar15 = pbVar15 + uVar1;
local_68 = (ulong)((*pbVar12 & 0x7f) << 8) | (ulong)abStack_78[lVar4 + 1];
pbVar13 = pbVar12 + local_68;
local_70 = pbVar12;
if (pbVar15 < pbVar13) {
iVar10 = (uint)*(ushort *)(local_40 + 0x12) - *(int *)(*param_1 + 0x178);
local_4c = (int)local_48 + 1;
do {
uVar7 = *(int8 *)(local_40 + 0x28);
lVar9 = param_1[0x23];
uVar2 = *(int4 *)((long)param_1 + 0x1dc);
*(int8 *)((long)&uStack_80 + lVar4) = 0x18aecd;
iVar5 = rtree_key_cmp(uVar7,lVar9,pbVar15,uVar2,0x400);
if (uVar14 == 0) {
if (iVar5 == 0) {
local_40 = pbVar15 + (long)iVar10 + (ulong)*(uint *)(*param_1 + 0x178);
uVar7 = 0;
*(int8 *)((long)&uStack_80 + lVar4) = 0x18afbb;
lVar9 = _mi_dpos(param_1,0);
param_1[0x2e] = lVar9;
pvVar3 = (void *)param_1[0x21];
uVar14 = iVar10 + *(int *)(*param_1 + 0x178);
*(uint *)(param_1 + 0x3b) = uVar14;
*(int8 *)((long)&uStack_80 + lVar4) = 0x18afe5;
memcpy(pvVar3,pbVar15,(ulong)uVar14);
pbVar12 = local_40;
*(int *)(param_1 + 0x78) = (int)local_48;
*(int *)(local_60 + local_58 * 4) = (int)local_68;
if (local_40 < pbVar13) {
pvVar3 = (void *)param_1[0x20];
param_1[0x25] = (long)pvVar3;
__n = (long)pbVar13 - (long)local_40;
param_1[0x26] = (long)pvVar3 + __n;
*(int8 *)((long)&uStack_80 + lVar4) = 0x18b02b;
memcpy(pvVar3,pbVar12,__n);
*(int1 *)((long)param_1 + 0x33d) = 0;
}
else {
*(int1 *)((long)param_1 + 0x33d) = 1;
}
goto LAB_0018af73;
}
uVar11 = (ulong)*(uint *)(*param_1 + 0x178);
}
else {
uVar11 = (ulong)uVar14;
if (iVar5 == 0) {
*(int8 *)((long)&uStack_80 + lVar4) = 0x18aee4;
uVar7 = _mi_kpos(uVar14,pbVar15);
pbVar12 = local_40;
iVar5 = local_4c;
*(int8 *)((long)&uStack_80 + lVar4) = 0x18aef6;
iVar5 = rtree_find_req(param_1,pbVar12,uVar7,iVar5);
if (iVar5 != 1) {
if (iVar5 != 0) goto LAB_0018af62;
*(int *)(local_60 + local_58 * 4) = (int)pbVar15 - (int)local_70;
uVar7 = 0;
goto LAB_0018af73;
}
*(int *)(param_1 + 0x78) = (int)local_48;
uVar11 = (ulong)uVar14;
}
}
pbVar15 = pbVar15 + uVar11 + (long)iVar10;
} while (pbVar15 < pbVar13);
}
param_1[0x2e] = -1;
*(int8 *)((long)&uStack_80 + lVar4) = 0x18af38;
puVar8 = (int4 *)_my_thread_var();
*puVar8 = 0x78;
uVar7 = 1;
}
LAB_0018af73:
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return uVar7;
}
/* WARNING: Subroutine does not return */
*(code **)((long)&uStack_80 + lVar4) = rtree_find_next;
__stack_chk_fail();
}
|
|
57,537
|
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>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&&)
|
monkey531[P]llama/common/json.hpp
|
basic_json(basic_json&& other) noexcept
: json_base_class_t(std::forward<json_base_class_t>(other)),
m_data(std::move(other.m_data))
{
// check that passed value is valid
other.assert_invariant(false);
// invalidate payload
other.m_data.m_type = value_t::null;
other.m_data.m_value = {};
set_parents();
assert_invariant();
}
|
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>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&&):
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movups (%rsi), %xmm0
movups %xmm0, (%rdi)
movq %rsi, %rdi
xorl %esi, %esi
callq 0x3d8e2
movb $0x0, (%rbx)
andq $0x0, 0x8(%rbx)
pushq $0x1
popq %rsi
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3d8e2
|
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2EOSD_:
push r14
push rbx
push rax
mov rbx, rsi
mov r14, rdi
movups xmm0, xmmword ptr [rsi]
movups xmmword ptr [rdi], xmm0
mov rdi, rsi
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 byte ptr [rbx], 0
and qword ptr [rbx+8], 0
push 1
pop rsi
mov rdi, r14
add rsp, 8
pop rbx
pop r14
jmp _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)
|
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>::basic_json(
char *a1,
long long a2)
{
*(_OWORD *)a1 = *(_OWORD *)a2;
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 *)a2);
*(_BYTE *)a2 = 0;
*(_QWORD *)(a2 + 8) = 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(a1);
}
|
basic_json:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
MOVUPS XMM0,xmmword ptr [RSI]
MOVUPS xmmword ptr [RDI],XMM0
MOV RDI,RSI
XOR ESI,ESI
CALL 0x0013d8e2
MOV byte ptr [RBX],0x0
AND qword ptr [RBX + 0x8],0x0
PUSH 0x1
POP RSI
MOV RDI,R14
ADD RSP,0x8
POP RBX
POP R14
JMP 0x0013d8e2
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >,
void>::basic_json(nlohmann::json_abi_v3_11_3::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>&&) */
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>
::basic_json(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this,basic_json *param_1)
{
int8 uVar1;
uVar1 = *(int8 *)(param_1 + 8);
*(int8 *)this = *(int8 *)param_1;
*(int8 *)(this + 8) = uVar1;
assert_invariant(SUB81(param_1,0));
*param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
assert_invariant(SUB81(this,0));
return;
}
|
|
57,538
|
my_coll_parser_exec
|
eloqsql/strings/ctype-uca.c
|
static int
my_coll_parser_exec(MY_COLL_RULE_PARSER *p)
{
if (!my_coll_parser_scan_settings(p))
return 0;
while (my_coll_parser_curr(p)->term == MY_COLL_LEXEM_RESET)
{
if (!my_coll_parser_scan_rule(p))
return 0;
}
/* Make sure no unparsed input data left */
return my_coll_parser_scan_term(p, MY_COLL_LEXEM_EOF);
}
|
O0
|
c
|
my_coll_parser_exec:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x58250
cmpl $0x0, %eax
jne 0x57c23
movl $0x0, -0x4(%rbp)
jmp 0x57c5a
jmp 0x57c25
movq -0x10(%rbp), %rdi
callq 0x57d80
cmpl $0x4, (%rax)
jne 0x57c4c
movq -0x10(%rbp), %rdi
callq 0x582a0
cmpl $0x0, %eax
jne 0x57c4a
movl $0x0, -0x4(%rbp)
jmp 0x57c5a
jmp 0x57c25
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x58350
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_coll_parser_exec:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_10], rdi
mov rdi, [rbp+var_10]
call my_coll_parser_scan_settings
cmp eax, 0
jnz short loc_57C23
mov [rbp+var_4], 0
jmp short loc_57C5A
loc_57C23:
jmp short $+2
loc_57C25:
mov rdi, [rbp+var_10]
call my_coll_parser_curr
cmp dword ptr [rax], 4
jnz short loc_57C4C
mov rdi, [rbp+var_10]
call my_coll_parser_scan_rule
cmp eax, 0
jnz short loc_57C4A
mov [rbp+var_4], 0
jmp short loc_57C5A
loc_57C4A:
jmp short loc_57C25
loc_57C4C:
mov rdi, [rbp+var_10]
xor esi, esi
call my_coll_parser_scan_term
mov [rbp+var_4], eax
loc_57C5A:
mov eax, [rbp+var_4]
add rsp, 10h
pop rbp
retn
|
long long my_coll_parser_exec(long long a1)
{
if ( (unsigned int)my_coll_parser_scan_settings(a1) )
{
while ( *(_DWORD *)my_coll_parser_curr(a1) == 4 )
{
if ( !(unsigned int)my_coll_parser_scan_rule(a1) )
return 0;
}
return (unsigned int)my_coll_parser_scan_term(a1, 0LL);
}
else
{
return 0;
}
}
|
my_coll_parser_exec:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x10],RDI
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00158250
CMP EAX,0x0
JNZ 0x00157c23
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00157c5a
LAB_00157c23:
JMP 0x00157c25
LAB_00157c25:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00157d80
CMP dword ptr [RAX],0x4
JNZ 0x00157c4c
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001582a0
CMP EAX,0x0
JNZ 0x00157c4a
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00157c5a
LAB_00157c4a:
JMP 0x00157c25
LAB_00157c4c:
MOV RDI,qword ptr [RBP + -0x10]
XOR ESI,ESI
CALL 0x00158350
MOV dword ptr [RBP + -0x4],EAX
LAB_00157c5a:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x10
POP RBP
RET
|
int4 my_coll_parser_exec(int8 param_1)
{
int iVar1;
int4 uVar2;
int *piVar3;
iVar1 = my_coll_parser_scan_settings(param_1);
while( true ) {
if (iVar1 == 0) {
return 0;
}
piVar3 = (int *)my_coll_parser_curr(param_1);
if (*piVar3 != 4) break;
iVar1 = my_coll_parser_scan_rule(param_1);
}
uVar2 = my_coll_parser_scan_term(param_1,0);
return uVar2;
}
|
|
57,539
|
ma_search_next
|
eloqsql/storage/maria/ma_search.c
|
int _ma_search_next(register MARIA_HA *info, MARIA_KEY *key,
uint32 nextflag, my_off_t pos)
{
int error;
uchar lastkey[MARIA_MAX_KEY_BUFF];
MARIA_KEYDEF *keyinfo= key->keyinfo;
MARIA_KEY tmp_key;
MARIA_PAGE page;
DBUG_ENTER("_ma_search_next");
DBUG_PRINT("enter",("nextflag: %u lastpos: %lu int_keypos:%p page_changed %d keyread_buff_used: %d",
nextflag, (ulong) info->cur_row.lastpos,
info->int_keypos,
info->page_changed, info->keyread_buff_used));
DBUG_EXECUTE("key", _ma_print_key(DBUG_FILE, key););
/*
Force full read if we are at last key or if we are not on a leaf
and the key tree has changed since we used it last time
Note that even if the key tree has changed since last read, we can use
the last read data from the leaf if we haven't used the buffer for
something else.
*/
if (((nextflag & SEARCH_BIGGER) && info->int_keypos >= info->int_maxpos) ||
info->page_changed ||
(info->int_keytree_version != keyinfo->version &&
(info->int_nod_flag || info->keyread_buff_used)))
DBUG_RETURN(_ma_search(info, key, nextflag | SEARCH_SAVE_BUFF,
pos));
if (info->keyread_buff_used)
{
if (_ma_fetch_keypage(&page, info, keyinfo, info->last_search_keypage,
PAGECACHE_LOCK_LEFT_UNLOCKED,
DFLT_INIT_HITS, info->keyread_buff, 0))
DBUG_RETURN(-1);
info->keyread_buff_used=0;
}
else
{
/* Last used buffer is in info->keyread_buff */
/* Todo: Add info->keyread_page to keep track of this */
_ma_page_setup(&page, info, keyinfo, 0, info->keyread_buff);
}
tmp_key.data= lastkey;
tmp_key.keyinfo= keyinfo;
if (nextflag & SEARCH_BIGGER) /* Next key */
{
if (page.node)
{
my_off_t tmp_pos= _ma_kpos(page.node, info->int_keypos);
if ((error= _ma_search(info, key, nextflag | SEARCH_SAVE_BUFF,
tmp_pos)) <=0)
DBUG_RETURN(error);
}
if (keyinfo->flag & (HA_PACK_KEY | HA_BINARY_PACK_KEY) &&
info->last_key.data != key->data)
memcpy(info->last_key.data, key->data,
key->data_length + key->ref_length);
if (!(*keyinfo->get_key)(&info->last_key, page.flag, page.node,
&info->int_keypos))
DBUG_RETURN(-1);
}
else /* Previous key */
{
/* Find start of previous key */
info->int_keypos= _ma_get_last_key(&tmp_key, &page, info->int_keypos);
if (!info->int_keypos)
DBUG_RETURN(-1);
if (info->int_keypos == info->keyread_buff + info->s->keypage_header)
{
/* Previous key was first key, read key before this one */
DBUG_RETURN(_ma_search(info, key, nextflag | SEARCH_SAVE_BUFF,
pos));
}
if (page.node &&
(error= _ma_search(info, key, nextflag | SEARCH_SAVE_BUFF,
_ma_kpos(page.node,info->int_keypos))) <= 0)
DBUG_RETURN(error);
/* QQ: We should be able to optimize away the following call */
if (! _ma_get_last_key(&info->last_key, &page, info->int_keypos))
DBUG_RETURN(-1);
}
info->cur_row.lastpos= _ma_row_pos_from_key(&info->last_key);
info->cur_row.trid= _ma_trid_from_key(&info->last_key);
DBUG_PRINT("exit",("found key at %lu",(ulong) info->cur_row.lastpos));
DBUG_RETURN(0);
}
|
O0
|
c
|
ma_search_next:
pushq %rbp
movq %rsp, %rbp
subq $0xab0, %rsp # imm = 0xAB0
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x9f0(%rbp)
movq %rsi, -0x9f8(%rbp)
movl %edx, -0x9fc(%rbp)
movq %rcx, -0xa08(%rbp)
movq -0x9f8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0xa18(%rbp)
jmp 0x6cda7
jmp 0x6cda9
jmp 0x6cdab
movl -0x9fc(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x6cdd7
movq -0x9f0(%rbp), %rax
movq 0x3b0(%rax), %rax
movq -0x9f0(%rbp), %rcx
cmpq 0x3b8(%rcx), %rax
jae 0x6ce29
movq -0x9f0(%rbp), %rax
movsbl 0x684(%rax), %eax
cmpl $0x0, %eax
jne 0x6ce29
movq -0x9f0(%rbp), %rax
movl 0x3d4(%rax), %eax
movq -0xa18(%rbp), %rcx
cmpl 0xb8(%rcx), %eax
je 0x6ce59
movq -0x9f0(%rbp), %rax
cmpl $0x0, 0x3d0(%rax)
jne 0x6ce29
movq -0x9f0(%rbp), %rax
movsbl 0x685(%rax), %eax
cmpl $0x0, %eax
je 0x6ce59
jmp 0x6ce2b
movq -0x9f0(%rbp), %rdi
movq -0x9f8(%rbp), %rsi
movl -0x9fc(%rbp), %edx
orl $0x20, %edx
movq -0xa08(%rbp), %rcx
callq 0x691c0
movl %eax, -0x9e4(%rbp)
jmp 0x6d22a
movq -0x9f0(%rbp), %rax
cmpb $0x0, 0x685(%rax)
je 0x6ced9
movq -0x9f0(%rbp), %rsi
movq -0xa18(%rbp), %rdx
movq -0x9f0(%rbp), %rax
movq 0x448(%rax), %rcx
movq -0x9f0(%rbp), %rax
movq 0x380(%rax), %rax
leaq -0xa70(%rbp), %rdi
xorl %r8d, %r8d
movl $0x3, %r9d
movq %rax, (%rsp)
movl $0x0, 0x8(%rsp)
callq 0x6ee50
cmpb $0x0, %al
je 0x6cec9
jmp 0x6ceba
movl $0xffffffff, -0x9e4(%rbp) # imm = 0xFFFFFFFF
jmp 0x6d22a
movq -0x9f0(%rbp), %rax
movb $0x0, 0x685(%rax)
jmp 0x6cf05
movq -0x9f0(%rbp), %rsi
movq -0xa18(%rbp), %rdx
movq -0x9f0(%rbp), %rax
movq 0x380(%rax), %r8
leaq -0xa70(%rbp), %rdi
xorl %eax, %eax
movl %eax, %ecx
callq 0x6ed60
leaq -0x9e0(%rbp), %rax
movq %rax, -0xa38(%rbp)
movq -0xa18(%rbp), %rax
movq %rax, -0xa30(%rbp)
movl -0x9fc(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x6d057
cmpl $0x0, -0xa48(%rbp)
je 0x6cf9f
movl -0xa48(%rbp), %edi
movq -0x9f0(%rbp), %rax
movq 0x3b0(%rax), %rsi
callq 0x6ab60
movq %rax, -0xa78(%rbp)
movq -0x9f0(%rbp), %rdi
movq -0x9f8(%rbp), %rsi
movl -0x9fc(%rbp), %edx
orl $0x20, %edx
movq -0xa78(%rbp), %rcx
callq 0x691c0
movl %eax, -0xa0c(%rbp)
cmpl $0x0, %eax
jg 0x6cf9d
jmp 0x6cf8c
movl -0xa0c(%rbp), %eax
movl %eax, -0x9e4(%rbp)
jmp 0x6d22a
jmp 0x6cf9f
movq -0xa18(%rbp), %rax
movzwl 0xa2(%rax), %eax
andl $0x22, %eax
cmpl $0x0, %eax
je 0x6d004
movq -0x9f0(%rbp), %rax
movq 0x200(%rax), %rax
movq -0x9f8(%rbp), %rcx
cmpq (%rcx), %rax
je 0x6d004
movq -0x9f0(%rbp), %rax
movq 0x200(%rax), %rdi
movq -0x9f8(%rbp), %rax
movq (%rax), %rsi
movq -0x9f8(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x9f8(%rbp), %rcx
addl 0x14(%rcx), %eax
movl %eax, %eax
movl %eax, %edx
callq 0x2a090
movq -0xa18(%rbp), %rax
movq 0xe0(%rax), %rax
movq -0x9f0(%rbp), %rdi
addq $0x200, %rdi # imm = 0x200
movl -0xa44(%rbp), %esi
movl -0xa48(%rbp), %edx
movq -0x9f0(%rbp), %rcx
addq $0x3b0, %rcx # imm = 0x3B0
callq *%rax
cmpl $0x0, %eax
jne 0x6d052
jmp 0x6d043
movl $0xffffffff, -0x9e4(%rbp) # imm = 0xFFFFFFFF
jmp 0x6d22a
jmp 0x6d1d4
movq -0x9f0(%rbp), %rax
movq 0x3b0(%rax), %rdx
leaq -0xa38(%rbp), %rdi
leaq -0xa70(%rbp), %rsi
callq 0x6c980
movq %rax, %rcx
movq -0x9f0(%rbp), %rax
movq %rcx, 0x3b0(%rax)
movq -0x9f0(%rbp), %rax
cmpq $0x0, 0x3b0(%rax)
jne 0x6d0ab
jmp 0x6d09c
movl $0xffffffff, -0x9e4(%rbp) # imm = 0xFFFFFFFF
jmp 0x6d22a
movq -0x9f0(%rbp), %rax
movq 0x3b0(%rax), %rax
movq -0x9f0(%rbp), %rcx
movq 0x380(%rcx), %rcx
movq -0x9f0(%rbp), %rdx
movq (%rdx), %rdx
movl 0x744(%rdx), %edx
addq %rdx, %rcx
cmpq %rcx, %rax
jne 0x6d10f
jmp 0x6d0e1
movq -0x9f0(%rbp), %rdi
movq -0x9f8(%rbp), %rsi
movl -0x9fc(%rbp), %edx
orl $0x20, %edx
movq -0xa08(%rbp), %rcx
callq 0x691c0
movl %eax, -0x9e4(%rbp)
jmp 0x6d22a
cmpl $0x0, -0xa48(%rbp)
je 0x6d196
movq -0x9f0(%rbp), %rax
movq %rax, -0xa90(%rbp)
movq -0x9f8(%rbp), %rax
movq %rax, -0xa88(%rbp)
movl -0x9fc(%rbp), %eax
orl $0x20, %eax
movl %eax, -0xa7c(%rbp)
movl -0xa48(%rbp), %edi
movq -0x9f0(%rbp), %rax
movq 0x3b0(%rax), %rsi
callq 0x6ab60
movq -0xa90(%rbp), %rdi
movq -0xa88(%rbp), %rsi
movl -0xa7c(%rbp), %edx
movq %rax, %rcx
callq 0x691c0
movl %eax, -0xa0c(%rbp)
cmpl $0x0, %eax
jg 0x6d196
jmp 0x6d185
movl -0xa0c(%rbp), %eax
movl %eax, -0x9e4(%rbp)
jmp 0x6d22a
movq -0x9f0(%rbp), %rdi
addq $0x200, %rdi # imm = 0x200
movq -0x9f0(%rbp), %rax
movq 0x3b0(%rax), %rdx
leaq -0xa70(%rbp), %rsi
callq 0x6c980
cmpq $0x0, %rax
jne 0x6d1d2
jmp 0x6d1c6
movl $0xffffffff, -0x9e4(%rbp) # imm = 0xFFFFFFFF
jmp 0x6d22a
jmp 0x6d1d4
movq -0x9f0(%rbp), %rdi
addq $0x200, %rdi # imm = 0x200
callq 0x6b050
movq %rax, %rcx
movq -0x9f0(%rbp), %rax
movq %rcx, 0x98(%rax)
movq -0x9f0(%rbp), %rdi
addq $0x200, %rdi # imm = 0x200
callq 0x6b200
movq %rax, %rcx
movq -0x9f0(%rbp), %rax
movq %rcx, 0xc0(%rax)
jmp 0x6d21e
jmp 0x6d220
movl $0x0, -0x9e4(%rbp)
movl -0x9e4(%rbp), %eax
movl %eax, -0xa94(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x6d257
movl -0xa94(%rbp), %eax
addq $0xab0, %rsp # imm = 0xAB0
popq %rbp
retq
callq 0x2a270
nopl (%rax)
|
_ma_search_next:
push rbp
mov rbp, rsp
sub rsp, 0AB0h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_9F0], rdi
mov [rbp+var_9F8], rsi
mov [rbp+var_9FC], edx
mov [rbp+var_A08], rcx
mov rax, [rbp+var_9F8]
mov rax, [rax+8]
mov [rbp+var_A18], rax
jmp short $+2
loc_6CDA7:
jmp short $+2
loc_6CDA9:
jmp short $+2
loc_6CDAB:
mov eax, [rbp+var_9FC]
and eax, 8
cmp eax, 0
jz short loc_6CDD7
mov rax, [rbp+var_9F0]
mov rax, [rax+3B0h]
mov rcx, [rbp+var_9F0]
cmp rax, [rcx+3B8h]
jnb short loc_6CE29
loc_6CDD7:
mov rax, [rbp+var_9F0]
movsx eax, byte ptr [rax+684h]
cmp eax, 0
jnz short loc_6CE29
mov rax, [rbp+var_9F0]
mov eax, [rax+3D4h]
mov rcx, [rbp+var_A18]
cmp eax, [rcx+0B8h]
jz short loc_6CE59
mov rax, [rbp+var_9F0]
cmp dword ptr [rax+3D0h], 0
jnz short loc_6CE29
mov rax, [rbp+var_9F0]
movsx eax, byte ptr [rax+685h]
cmp eax, 0
jz short loc_6CE59
loc_6CE29:
jmp short $+2
loc_6CE2B:
mov rdi, [rbp+var_9F0]
mov rsi, [rbp+var_9F8]
mov edx, [rbp+var_9FC]
or edx, 20h
mov rcx, [rbp+var_A08]
call _ma_search
mov [rbp+var_9E4], eax
jmp loc_6D22A
loc_6CE59:
mov rax, [rbp+var_9F0]
cmp byte ptr [rax+685h], 0
jz short loc_6CED9
mov rsi, [rbp+var_9F0]
mov rdx, [rbp+var_A18]
mov rax, [rbp+var_9F0]
mov rcx, [rax+448h]
mov rax, [rbp+var_9F0]
mov rax, [rax+380h]
lea rdi, [rbp+var_A70]
xor r8d, r8d
mov r9d, 3
mov [rsp+0AB0h+var_AB0], rax
mov [rsp+0AB0h+var_AA8], 0
call _ma_fetch_keypage
cmp al, 0
jz short loc_6CEC9
jmp short $+2
loc_6CEBA:
mov [rbp+var_9E4], 0FFFFFFFFh
jmp loc_6D22A
loc_6CEC9:
mov rax, [rbp+var_9F0]
mov byte ptr [rax+685h], 0
jmp short loc_6CF05
loc_6CED9:
mov rsi, [rbp+var_9F0]
mov rdx, [rbp+var_A18]
mov rax, [rbp+var_9F0]
mov r8, [rax+380h]
lea rdi, [rbp+var_A70]
xor eax, eax
mov ecx, eax
call _ma_page_setup
loc_6CF05:
lea rax, [rbp+var_9E0]
mov [rbp+var_A38], rax
mov rax, [rbp+var_A18]
mov [rbp+var_A30], rax
mov eax, [rbp+var_9FC]
and eax, 8
cmp eax, 0
jz loc_6D057
cmp [rbp+var_A48], 0
jz short loc_6CF9F
mov edi, [rbp+var_A48]
mov rax, [rbp+var_9F0]
mov rsi, [rax+3B0h]
call _ma_kpos
mov [rbp+var_A78], rax
mov rdi, [rbp+var_9F0]
mov rsi, [rbp+var_9F8]
mov edx, [rbp+var_9FC]
or edx, 20h
mov rcx, [rbp+var_A78]
call _ma_search
mov [rbp+var_A0C], eax
cmp eax, 0
jg short loc_6CF9D
jmp short $+2
loc_6CF8C:
mov eax, [rbp+var_A0C]
mov [rbp+var_9E4], eax
jmp loc_6D22A
loc_6CF9D:
jmp short $+2
loc_6CF9F:
mov rax, [rbp+var_A18]
movzx eax, word ptr [rax+0A2h]
and eax, 22h
cmp eax, 0
jz short loc_6D004
mov rax, [rbp+var_9F0]
mov rax, [rax+200h]
mov rcx, [rbp+var_9F8]
cmp rax, [rcx]
jz short loc_6D004
mov rax, [rbp+var_9F0]
mov rdi, [rax+200h]
mov rax, [rbp+var_9F8]
mov rsi, [rax]
mov rax, [rbp+var_9F8]
mov eax, [rax+10h]
mov rcx, [rbp+var_9F8]
add eax, [rcx+14h]
mov eax, eax
mov edx, eax
call _memcpy
loc_6D004:
mov rax, [rbp+var_A18]
mov rax, [rax+0E0h]
mov rdi, [rbp+var_9F0]
add rdi, 200h
mov esi, [rbp+var_A44]
mov edx, [rbp+var_A48]
mov rcx, [rbp+var_9F0]
add rcx, 3B0h
call rax
cmp eax, 0
jnz short loc_6D052
jmp short $+2
loc_6D043:
mov [rbp+var_9E4], 0FFFFFFFFh
jmp loc_6D22A
loc_6D052:
jmp loc_6D1D4
loc_6D057:
mov rax, [rbp+var_9F0]
mov rdx, [rax+3B0h]
lea rdi, [rbp+var_A38]
lea rsi, [rbp+var_A70]
call _ma_get_last_key
mov rcx, rax
mov rax, [rbp+var_9F0]
mov [rax+3B0h], rcx
mov rax, [rbp+var_9F0]
cmp qword ptr [rax+3B0h], 0
jnz short loc_6D0AB
jmp short $+2
loc_6D09C:
mov [rbp+var_9E4], 0FFFFFFFFh
jmp loc_6D22A
loc_6D0AB:
mov rax, [rbp+var_9F0]
mov rax, [rax+3B0h]
mov rcx, [rbp+var_9F0]
mov rcx, [rcx+380h]
mov rdx, [rbp+var_9F0]
mov rdx, [rdx]
mov edx, [rdx+744h]
add rcx, rdx
cmp rax, rcx
jnz short loc_6D10F
jmp short $+2
loc_6D0E1:
mov rdi, [rbp+var_9F0]
mov rsi, [rbp+var_9F8]
mov edx, [rbp+var_9FC]
or edx, 20h
mov rcx, [rbp+var_A08]
call _ma_search
mov [rbp+var_9E4], eax
jmp loc_6D22A
loc_6D10F:
cmp [rbp+var_A48], 0
jz short loc_6D196
mov rax, [rbp+var_9F0]
mov [rbp+var_A90], rax
mov rax, [rbp+var_9F8]
mov [rbp+var_A88], rax
mov eax, [rbp+var_9FC]
or eax, 20h
mov [rbp+var_A7C], eax
mov edi, [rbp+var_A48]
mov rax, [rbp+var_9F0]
mov rsi, [rax+3B0h]
call _ma_kpos
mov rdi, [rbp+var_A90]
mov rsi, [rbp+var_A88]
mov edx, [rbp+var_A7C]
mov rcx, rax
call _ma_search
mov [rbp+var_A0C], eax
cmp eax, 0
jg short loc_6D196
jmp short $+2
loc_6D185:
mov eax, [rbp+var_A0C]
mov [rbp+var_9E4], eax
jmp loc_6D22A
loc_6D196:
mov rdi, [rbp+var_9F0]
add rdi, 200h
mov rax, [rbp+var_9F0]
mov rdx, [rax+3B0h]
lea rsi, [rbp+var_A70]
call _ma_get_last_key
cmp rax, 0
jnz short loc_6D1D2
jmp short $+2
loc_6D1C6:
mov [rbp+var_9E4], 0FFFFFFFFh
jmp short loc_6D22A
loc_6D1D2:
jmp short $+2
loc_6D1D4:
mov rdi, [rbp+var_9F0]
add rdi, 200h
call _ma_row_pos_from_key
mov rcx, rax
mov rax, [rbp+var_9F0]
mov [rax+98h], rcx
mov rdi, [rbp+var_9F0]
add rdi, 200h
call _ma_trid_from_key
mov rcx, rax
mov rax, [rbp+var_9F0]
mov [rax+0C0h], rcx
jmp short $+2
loc_6D21E:
jmp short $+2
loc_6D220:
mov [rbp+var_9E4], 0
loc_6D22A:
mov eax, [rbp+var_9E4]
mov [rbp+var_A94], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_6D257
mov eax, [rbp+var_A94]
add rsp, 0AB0h
pop rbp
retn
loc_6D257:
call ___stack_chk_fail
|
long long ma_search_next(long long a1, long long a2, int a3, long long a4)
{
unsigned long long last_key; // rax
long long v5; // rax
long long v6; // rax
unsigned long long v7; // rax
long long v9; // [rsp+20h] [rbp-A90h]
long long v10; // [rsp+28h] [rbp-A88h]
unsigned int v11; // [rsp+34h] [rbp-A7Ch]
long long v12; // [rsp+38h] [rbp-A78h]
_BYTE v13[40]; // [rsp+40h] [rbp-A70h] BYREF
unsigned int v14; // [rsp+68h] [rbp-A48h]
unsigned int v15; // [rsp+6Ch] [rbp-A44h]
_QWORD v16[4]; // [rsp+78h] [rbp-A38h] BYREF
long long v17; // [rsp+98h] [rbp-A18h]
int v18; // [rsp+A4h] [rbp-A0Ch]
long long v19; // [rsp+A8h] [rbp-A08h]
int v20; // [rsp+B4h] [rbp-9FCh]
long long v21; // [rsp+B8h] [rbp-9F8h]
long long v22; // [rsp+C0h] [rbp-9F0h]
char v24; // [rsp+D0h] [rbp-9E0h] BYREF
unsigned long long v25; // [rsp+AA8h] [rbp-8h]
v25 = __readfsqword(0x28u);
v22 = a1;
v21 = a2;
v20 = a3;
v19 = a4;
v17 = *(_QWORD *)(a2 + 8);
if ( ((a3 & 8) == 0 || *(_QWORD *)(v22 + 944) < *(_QWORD *)(v22 + 952))
&& !*(_BYTE *)(v22 + 1668)
&& (*(_DWORD *)(v22 + 980) == *(_DWORD *)(v17 + 184) || !*(_DWORD *)(v22 + 976) && !*(_BYTE *)(v22 + 1669)) )
{
if ( *(_BYTE *)(v22 + 1669) )
{
if ( (unsigned __int8)ma_fetch_keypage(
(unsigned int)v13,
v22,
v17,
*(_QWORD *)(v22 + 1096),
0,
3,
*(_QWORD *)(v22 + 896),
0) )
return (unsigned int)-1;
*(_BYTE *)(v22 + 1669) = 0;
}
else
{
ma_page_setup(v13, v22, v17, 0LL, *(_QWORD *)(v22 + 896));
}
v16[0] = &v24;
v16[1] = v17;
if ( (v20 & 8) != 0 )
{
if ( v14 )
{
v12 = ma_kpos(v14, *(_QWORD *)(v22 + 944));
v18 = ma_search(v22, v21, v20 | 0x20u, v12);
if ( v18 <= 0 )
return (unsigned int)v18;
}
if ( (*(_WORD *)(v17 + 162) & 0x22) != 0 && *(_QWORD *)(v22 + 512) != *(_QWORD *)v21 )
memcpy(*(_QWORD *)(v22 + 512), *(_QWORD *)v21, (unsigned int)(*(_DWORD *)(v21 + 20) + *(_DWORD *)(v21 + 16)));
if ( !(*(unsigned int ( **)(long long, _QWORD, _QWORD, long long))(v17 + 224))(
v22 + 512,
v15,
v14,
v22 + 944) )
return (unsigned int)-1;
}
else
{
last_key = ma_get_last_key((long long)v16, (long long)v13, *(_QWORD *)(v22 + 944));
*(_QWORD *)(v22 + 944) = last_key;
if ( !*(_QWORD *)(v22 + 944) )
return (unsigned int)-1;
if ( *(_QWORD *)(v22 + 944) == *(unsigned int *)(*(_QWORD *)v22 + 1860LL) + *(_QWORD *)(v22 + 896) )
return (unsigned int)ma_search(v22, v21, v20 | 0x20u, v19);
if ( v14 )
{
v9 = v22;
v10 = v21;
v11 = v20 | 0x20;
v5 = ma_kpos(v14, *(_QWORD *)(v22 + 944));
v18 = ma_search(v9, v10, v11, v5);
if ( v18 <= 0 )
return (unsigned int)v18;
}
if ( !ma_get_last_key(v22 + 512, (long long)v13, *(_QWORD *)(v22 + 944)) )
return (unsigned int)-1;
}
v6 = ma_row_pos_from_key(v22 + 512);
*(_QWORD *)(v22 + 152) = v6;
v7 = ma_trid_from_key(v22 + 512);
*(_QWORD *)(v22 + 192) = v7;
return 0;
}
return (unsigned int)ma_search(v22, v21, v20 | 0x20u, v19);
}
|
_ma_search_next:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xab0
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x9f0],RDI
MOV qword ptr [RBP + -0x9f8],RSI
MOV dword ptr [RBP + -0x9fc],EDX
MOV qword ptr [RBP + -0xa08],RCX
MOV RAX,qword ptr [RBP + -0x9f8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0xa18],RAX
JMP 0x0016cda7
LAB_0016cda7:
JMP 0x0016cda9
LAB_0016cda9:
JMP 0x0016cdab
LAB_0016cdab:
MOV EAX,dword ptr [RBP + -0x9fc]
AND EAX,0x8
CMP EAX,0x0
JZ 0x0016cdd7
MOV RAX,qword ptr [RBP + -0x9f0]
MOV RAX,qword ptr [RAX + 0x3b0]
MOV RCX,qword ptr [RBP + -0x9f0]
CMP RAX,qword ptr [RCX + 0x3b8]
JNC 0x0016ce29
LAB_0016cdd7:
MOV RAX,qword ptr [RBP + -0x9f0]
MOVSX EAX,byte ptr [RAX + 0x684]
CMP EAX,0x0
JNZ 0x0016ce29
MOV RAX,qword ptr [RBP + -0x9f0]
MOV EAX,dword ptr [RAX + 0x3d4]
MOV RCX,qword ptr [RBP + -0xa18]
CMP EAX,dword ptr [RCX + 0xb8]
JZ 0x0016ce59
MOV RAX,qword ptr [RBP + -0x9f0]
CMP dword ptr [RAX + 0x3d0],0x0
JNZ 0x0016ce29
MOV RAX,qword ptr [RBP + -0x9f0]
MOVSX EAX,byte ptr [RAX + 0x685]
CMP EAX,0x0
JZ 0x0016ce59
LAB_0016ce29:
JMP 0x0016ce2b
LAB_0016ce2b:
MOV RDI,qword ptr [RBP + -0x9f0]
MOV RSI,qword ptr [RBP + -0x9f8]
MOV EDX,dword ptr [RBP + -0x9fc]
OR EDX,0x20
MOV RCX,qword ptr [RBP + -0xa08]
CALL 0x001691c0
MOV dword ptr [RBP + -0x9e4],EAX
JMP 0x0016d22a
LAB_0016ce59:
MOV RAX,qword ptr [RBP + -0x9f0]
CMP byte ptr [RAX + 0x685],0x0
JZ 0x0016ced9
MOV RSI,qword ptr [RBP + -0x9f0]
MOV RDX,qword ptr [RBP + -0xa18]
MOV RAX,qword ptr [RBP + -0x9f0]
MOV RCX,qword ptr [RAX + 0x448]
MOV RAX,qword ptr [RBP + -0x9f0]
MOV RAX,qword ptr [RAX + 0x380]
LEA RDI,[RBP + -0xa70]
XOR R8D,R8D
MOV R9D,0x3
MOV qword ptr [RSP],RAX
MOV dword ptr [RSP + 0x8],0x0
CALL 0x0016ee50
CMP AL,0x0
JZ 0x0016cec9
JMP 0x0016ceba
LAB_0016ceba:
MOV dword ptr [RBP + -0x9e4],0xffffffff
JMP 0x0016d22a
LAB_0016cec9:
MOV RAX,qword ptr [RBP + -0x9f0]
MOV byte ptr [RAX + 0x685],0x0
JMP 0x0016cf05
LAB_0016ced9:
MOV RSI,qword ptr [RBP + -0x9f0]
MOV RDX,qword ptr [RBP + -0xa18]
MOV RAX,qword ptr [RBP + -0x9f0]
MOV R8,qword ptr [RAX + 0x380]
LEA RDI,[RBP + -0xa70]
XOR EAX,EAX
MOV ECX,EAX
CALL 0x0016ed60
LAB_0016cf05:
LEA RAX,[RBP + -0x9e0]
MOV qword ptr [RBP + -0xa38],RAX
MOV RAX,qword ptr [RBP + -0xa18]
MOV qword ptr [RBP + -0xa30],RAX
MOV EAX,dword ptr [RBP + -0x9fc]
AND EAX,0x8
CMP EAX,0x0
JZ 0x0016d057
CMP dword ptr [RBP + -0xa48],0x0
JZ 0x0016cf9f
MOV EDI,dword ptr [RBP + -0xa48]
MOV RAX,qword ptr [RBP + -0x9f0]
MOV RSI,qword ptr [RAX + 0x3b0]
CALL 0x0016ab60
MOV qword ptr [RBP + -0xa78],RAX
MOV RDI,qword ptr [RBP + -0x9f0]
MOV RSI,qword ptr [RBP + -0x9f8]
MOV EDX,dword ptr [RBP + -0x9fc]
OR EDX,0x20
MOV RCX,qword ptr [RBP + -0xa78]
CALL 0x001691c0
MOV dword ptr [RBP + -0xa0c],EAX
CMP EAX,0x0
JG 0x0016cf9d
JMP 0x0016cf8c
LAB_0016cf8c:
MOV EAX,dword ptr [RBP + -0xa0c]
MOV dword ptr [RBP + -0x9e4],EAX
JMP 0x0016d22a
LAB_0016cf9d:
JMP 0x0016cf9f
LAB_0016cf9f:
MOV RAX,qword ptr [RBP + -0xa18]
MOVZX EAX,word ptr [RAX + 0xa2]
AND EAX,0x22
CMP EAX,0x0
JZ 0x0016d004
MOV RAX,qword ptr [RBP + -0x9f0]
MOV RAX,qword ptr [RAX + 0x200]
MOV RCX,qword ptr [RBP + -0x9f8]
CMP RAX,qword ptr [RCX]
JZ 0x0016d004
MOV RAX,qword ptr [RBP + -0x9f0]
MOV RDI,qword ptr [RAX + 0x200]
MOV RAX,qword ptr [RBP + -0x9f8]
MOV RSI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x9f8]
MOV EAX,dword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x9f8]
ADD EAX,dword ptr [RCX + 0x14]
MOV EAX,EAX
MOV EDX,EAX
CALL 0x0012a090
LAB_0016d004:
MOV RAX,qword ptr [RBP + -0xa18]
MOV RAX,qword ptr [RAX + 0xe0]
MOV RDI,qword ptr [RBP + -0x9f0]
ADD RDI,0x200
MOV ESI,dword ptr [RBP + -0xa44]
MOV EDX,dword ptr [RBP + -0xa48]
MOV RCX,qword ptr [RBP + -0x9f0]
ADD RCX,0x3b0
CALL RAX
CMP EAX,0x0
JNZ 0x0016d052
JMP 0x0016d043
LAB_0016d043:
MOV dword ptr [RBP + -0x9e4],0xffffffff
JMP 0x0016d22a
LAB_0016d052:
JMP 0x0016d1d4
LAB_0016d057:
MOV RAX,qword ptr [RBP + -0x9f0]
MOV RDX,qword ptr [RAX + 0x3b0]
LEA RDI,[RBP + -0xa38]
LEA RSI,[RBP + -0xa70]
CALL 0x0016c980
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x9f0]
MOV qword ptr [RAX + 0x3b0],RCX
MOV RAX,qword ptr [RBP + -0x9f0]
CMP qword ptr [RAX + 0x3b0],0x0
JNZ 0x0016d0ab
JMP 0x0016d09c
LAB_0016d09c:
MOV dword ptr [RBP + -0x9e4],0xffffffff
JMP 0x0016d22a
LAB_0016d0ab:
MOV RAX,qword ptr [RBP + -0x9f0]
MOV RAX,qword ptr [RAX + 0x3b0]
MOV RCX,qword ptr [RBP + -0x9f0]
MOV RCX,qword ptr [RCX + 0x380]
MOV RDX,qword ptr [RBP + -0x9f0]
MOV RDX,qword ptr [RDX]
MOV EDX,dword ptr [RDX + 0x744]
ADD RCX,RDX
CMP RAX,RCX
JNZ 0x0016d10f
JMP 0x0016d0e1
LAB_0016d0e1:
MOV RDI,qword ptr [RBP + -0x9f0]
MOV RSI,qword ptr [RBP + -0x9f8]
MOV EDX,dword ptr [RBP + -0x9fc]
OR EDX,0x20
MOV RCX,qword ptr [RBP + -0xa08]
CALL 0x001691c0
MOV dword ptr [RBP + -0x9e4],EAX
JMP 0x0016d22a
LAB_0016d10f:
CMP dword ptr [RBP + -0xa48],0x0
JZ 0x0016d196
MOV RAX,qword ptr [RBP + -0x9f0]
MOV qword ptr [RBP + -0xa90],RAX
MOV RAX,qword ptr [RBP + -0x9f8]
MOV qword ptr [RBP + -0xa88],RAX
MOV EAX,dword ptr [RBP + -0x9fc]
OR EAX,0x20
MOV dword ptr [RBP + -0xa7c],EAX
MOV EDI,dword ptr [RBP + -0xa48]
MOV RAX,qword ptr [RBP + -0x9f0]
MOV RSI,qword ptr [RAX + 0x3b0]
CALL 0x0016ab60
MOV RDI,qword ptr [RBP + -0xa90]
MOV RSI,qword ptr [RBP + -0xa88]
MOV EDX,dword ptr [RBP + -0xa7c]
MOV RCX,RAX
CALL 0x001691c0
MOV dword ptr [RBP + -0xa0c],EAX
CMP EAX,0x0
JG 0x0016d196
JMP 0x0016d185
LAB_0016d185:
MOV EAX,dword ptr [RBP + -0xa0c]
MOV dword ptr [RBP + -0x9e4],EAX
JMP 0x0016d22a
LAB_0016d196:
MOV RDI,qword ptr [RBP + -0x9f0]
ADD RDI,0x200
MOV RAX,qword ptr [RBP + -0x9f0]
MOV RDX,qword ptr [RAX + 0x3b0]
LEA RSI,[RBP + -0xa70]
CALL 0x0016c980
CMP RAX,0x0
JNZ 0x0016d1d2
JMP 0x0016d1c6
LAB_0016d1c6:
MOV dword ptr [RBP + -0x9e4],0xffffffff
JMP 0x0016d22a
LAB_0016d1d2:
JMP 0x0016d1d4
LAB_0016d1d4:
MOV RDI,qword ptr [RBP + -0x9f0]
ADD RDI,0x200
CALL 0x0016b050
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x9f0]
MOV qword ptr [RAX + 0x98],RCX
MOV RDI,qword ptr [RBP + -0x9f0]
ADD RDI,0x200
CALL 0x0016b200
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x9f0]
MOV qword ptr [RAX + 0xc0],RCX
JMP 0x0016d21e
LAB_0016d21e:
JMP 0x0016d220
LAB_0016d220:
MOV dword ptr [RBP + -0x9e4],0x0
LAB_0016d22a:
MOV EAX,dword ptr [RBP + -0x9e4]
MOV dword ptr [RBP + -0xa94],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0016d257
MOV EAX,dword ptr [RBP + -0xa94]
ADD RSP,0xab0
POP RBP
RET
LAB_0016d257:
CALL 0x0012a270
|
int _ma_search_next(long *param_1,long *param_2,uint param_3,int8 param_4)
{
long *plVar1;
long *plVar2;
char cVar3;
int iVar4;
uint uVar5;
int8 uVar6;
long lVar7;
long in_FS_OFFSET;
int1 local_a78 [40];
int local_a50;
int4 local_a4c;
int1 *local_a40;
long local_a38;
long local_a20;
int local_a14;
int8 local_a10;
uint local_a04;
long *local_a00;
long *local_9f8;
int local_9ec;
int1 local_9e8 [2520];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_a20 = param_2[1];
local_a10 = param_4;
local_a04 = param_3;
local_a00 = param_2;
local_9f8 = param_1;
if (((((param_3 & 8) != 0) && ((ulong)param_1[0x77] <= (ulong)param_1[0x76])) ||
(*(char *)((long)param_1 + 0x684) != '\0')) ||
((*(int *)((long)param_1 + 0x3d4) != *(int *)(local_a20 + 0xb8) &&
(((int)param_1[0x7a] != 0 || (*(char *)((long)param_1 + 0x685) != '\0')))))) {
local_9ec = _ma_search(param_1,param_2,param_3 | 0x20,param_4);
goto LAB_0016d22a;
}
if (*(char *)((long)param_1 + 0x685) == '\0') {
_ma_page_setup(local_a78,param_1,local_a20,0,param_1[0x70]);
}
else {
cVar3 = _ma_fetch_keypage(local_a78,param_1,local_a20,param_1[0x89],0,3,param_1[0x70],0);
if (cVar3 != '\0') {
local_9ec = -1;
goto LAB_0016d22a;
}
*(int1 *)((long)local_9f8 + 0x685) = 0;
}
local_a40 = local_9e8;
local_a38 = local_a20;
if ((local_a04 & 8) == 0) {
lVar7 = _ma_get_last_key(&local_a40,local_a78,local_9f8[0x76]);
plVar2 = local_9f8;
plVar1 = local_a00;
local_9f8[0x76] = lVar7;
if (local_9f8[0x76] == 0) {
local_9ec = -1;
goto LAB_0016d22a;
}
if (local_9f8[0x76] == local_9f8[0x70] + (ulong)*(uint *)(*local_9f8 + 0x744)) {
local_9ec = _ma_search(local_9f8,local_a00,local_a04 | 0x20,local_a10);
goto LAB_0016d22a;
}
if (local_a50 != 0) {
uVar5 = local_a04 | 0x20;
uVar6 = _ma_kpos(local_a50,local_9f8[0x76]);
local_a14 = _ma_search(plVar2,plVar1,uVar5,uVar6);
local_9ec = local_a14;
if (local_a14 < 1) goto LAB_0016d22a;
}
lVar7 = _ma_get_last_key(local_9f8 + 0x40,local_a78,local_9f8[0x76]);
if (lVar7 == 0) {
local_9ec = -1;
goto LAB_0016d22a;
}
}
else {
if (local_a50 != 0) {
uVar6 = _ma_kpos(local_a50,local_9f8[0x76]);
local_a14 = _ma_search(local_9f8,local_a00,local_a04 | 0x20,uVar6);
local_9ec = local_a14;
if (local_a14 < 1) goto LAB_0016d22a;
}
if (((*(ushort *)(local_a20 + 0xa2) & 0x22) != 0) && (local_9f8[0x40] != *local_a00)) {
memcpy((void *)local_9f8[0x40],(void *)*local_a00,
(ulong)(uint)((int)local_a00[2] + *(int *)((long)local_a00 + 0x14)));
}
iVar4 = (**(code **)(local_a20 + 0xe0))(local_9f8 + 0x40,local_a4c,local_a50,local_9f8 + 0x76);
if (iVar4 == 0) {
local_9ec = -1;
goto LAB_0016d22a;
}
}
lVar7 = _ma_row_pos_from_key(local_9f8 + 0x40);
local_9f8[0x13] = lVar7;
lVar7 = _ma_trid_from_key(local_9f8 + 0x40);
local_9f8[0x18] = lVar7;
local_9ec = 0;
LAB_0016d22a:
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_9ec;
}
|
|
57,540
|
SET_file
|
xtate/src/generate-modules/ip-list-gen.c
|
static ConfRes SET_file(void *conf, const char *name, const char *value) {
UNUSEDPARM(conf);
UNUSEDPARM(name);
iplist_conf.fp = fopen(value, "rb");
if (iplist_conf.fp == NULL) {
LOG(LEVEL_ERROR, "(stream generator) %s: %s\n", value, strerror(errno));
return Conf_ERR;
}
return Conf_OK;
}
|
O3
|
c
|
SET_file:
pushq %rbx
movq %rdx, %rbx
leaq 0x3c8e5(%rip), %rsi # 0x5d004
movq %rdx, %rdi
callq 0x15e00
movq %rax, %rcx
movq %rax, 0x18293f(%rip) # 0x1a3070
xorl %eax, %eax
testq %rcx, %rcx
jne 0x20762
callq 0x15b70
movl (%rax), %edi
callq 0x15810
leaq 0x40a3c(%rip), %rsi # 0x61187
movl $0xffffffff, %edi # imm = 0xFFFFFFFF
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x536da
movl $0x1, %eax
popq %rbx
retq
|
SET_file_1:
push rbx
mov rbx, rdx
lea rsi, unk_5D004
mov rdi, rdx
call _fopen
mov rcx, rax
mov cs:iplist_conf, rax
xor eax, eax
test rcx, rcx
jnz short loc_20762
call ___errno_location
mov edi, [rax]
call _strerror
lea rsi, aStreamGenerato_8; "(stream generator) %s: %s\n"
mov edi, 0FFFFFFFFh
mov rdx, rbx
mov rcx, rax
xor eax, eax
call LOG
mov eax, 1
loc_20762:
pop rbx
retn
|
long long SET_file_1(long long a1, long long a2, long long a3)
{
int v3; // ebx
long long v5; // rdx
long long v6; // r8
long long result; // rax
unsigned int *v8; // rax
int v9; // eax
int v10; // r8d
int v11; // r9d
v3 = a3;
iplist_conf = fopen(a3, &unk_5D004);
result = 0LL;
if ( !iplist_conf )
{
v8 = (unsigned int *)__errno_location(a3, &unk_5D004, v5, 0LL, v6);
v9 = strerror(*v8);
LOG(-1, (unsigned int)"(stream generator) %s: %s\n", v3, v9, v10, v11);
return 1LL;
}
return result;
}
|
SET_file:
PUSH RBX
MOV RBX,RDX
LEA RSI,[0x15d004]
MOV RDI,RDX
CALL 0x00115e00
MOV RCX,RAX
MOV qword ptr [0x002a3070],RAX
XOR EAX,EAX
TEST RCX,RCX
JNZ 0x00120762
CALL 0x00115b70
MOV EDI,dword ptr [RAX]
CALL 0x00115810
LEA RSI,[0x161187]
MOV EDI,0xffffffff
MOV RDX,RBX
MOV RCX,RAX
XOR EAX,EAX
CALL 0x001536da
MOV EAX,0x1
LAB_00120762:
POP RBX
RET
|
bool SET_file(int8 param_1,int8 param_2,char *param_3)
{
int *piVar1;
char *pcVar2;
bool bVar3;
iplist_conf = fopen(param_3,"rb");
bVar3 = iplist_conf == (FILE *)0x0;
if (bVar3) {
piVar1 = __errno_location();
pcVar2 = strerror(*piVar1);
LOG(0xffffffff,"(stream generator) %s: %s\n",param_3,pcVar2);
}
return bVar3;
}
|
|
57,541
|
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> CLI::detail::rjoin<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
|
MikePodsytnik[P]TCRtrie/build_O3/_deps/cli11-src/include/CLI/StringTools.hpp
|
std::string rjoin(const T &v, std::string delim = ",") {
std::ostringstream s;
for(std::size_t start = 0; start < v.size(); start++) {
if(start > 0)
s << delim;
s << v[v.size() - start - 1];
}
return s.str();
}
|
O3
|
cpp
|
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> CLI::detail::rjoin<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x178, %rsp # imm = 0x178
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rsp, %rdi
callq 0x7580
movq 0x8(%r15), %rax
cmpq (%r15), %rax
je 0x240fc
movq $-0x20, %r13
xorl %ebp, %ebp
movq %rsp, %r12
testq %rbp, %rbp
je 0x240d1
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %r12, %rdi
callq 0x74b0
movq 0x8(%r15), %rax
movq (%rax,%r13), %rsi
movq 0x8(%rax,%r13), %rdx
movq %r12, %rdi
callq 0x74b0
movq 0x8(%r15), %rax
movq %rax, %rcx
subq (%r15), %rcx
incq %rbp
sarq $0x5, %rcx
addq $-0x20, %r13
cmpq %rcx, %rbp
jb 0x240b9
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x7680
movq 0x25e80(%rip), %rsi # 0x49f90
movq %rsp, %rdi
callq 0x7200
leaq 0x70(%rsp), %rdi
callq 0x7150
movq %rbx, %rax
addq $0x178, %rsp # imm = 0x178
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x24139
movq %rax, %rbx
movq 0x25e4d(%rip), %rsi # 0x49f90
movq %rsp, %rdi
callq 0x7200
leaq 0x70(%rsp), %rdi
callq 0x7150
movq %rbx, %rdi
callq 0x7780
nop
|
_ZN3CLI6detail5rjoinISt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS8_EEEES8_RKT_S8_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 178h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
mov rdi, rsp
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void)
mov rax, [r15+8]
cmp rax, [r15]
jz short loc_240FC
mov r13, 0FFFFFFFFFFFFFFE0h
xor ebp, ebp
mov r12, rsp
loc_240B9:
test rbp, rbp
jz short loc_240D1
mov rsi, [r14]
mov rdx, [r14+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 rax, [r15+8]
loc_240D1:
mov rsi, [rax+r13]
mov rdx, [rax+r13+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 rax, [r15+8]
mov rcx, rax
sub rcx, [r15]
inc rbp
sar rcx, 5
add r13, 0FFFFFFFFFFFFFFE0h
cmp rbp, rcx
jb short loc_240B9
loc_240FC:
lea rsi, [rsp+1A8h+var_1A0]
mov rdi, rbx
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr
mov rdi, rsp
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream()
lea rdi, [rsp+1A8h+var_138]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rax, rbx
add rsp, 178h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_24139:
mov rbx, rax
mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr
mov rdi, rsp
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream()
lea rdi, [rsp+arg_68]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rdi, rbx
call __Unwind_Resume
|
long long CLI::detail::rjoin<std::vector<std::string>>(long long a1, _QWORD *a2, _QWORD *a3)
{
long long v4; // rax
long long v5; // r13
unsigned long long v6; // rbp
long long v8; // [rsp+0h] [rbp-1A8h] BYREF
_BYTE v9[104]; // [rsp+8h] [rbp-1A0h] BYREF
_BYTE v10[312]; // [rsp+70h] [rbp-138h] BYREF
std::ostringstream::basic_ostringstream(&v8);
v4 = a2[1];
if ( v4 != *a2 )
{
v5 = -32LL;
v6 = 0LL;
do
{
if ( v6 )
{
std::__ostream_insert<char,std::char_traits<char>>(&v8, *a3, a3[1]);
v4 = a2[1];
}
std::__ostream_insert<char,std::char_traits<char>>(&v8, *(_QWORD *)(v4 + v5), *(_QWORD *)(v4 + v5 + 8));
v4 = a2[1];
++v6;
v5 -= 32LL;
}
while ( v6 < (v4 - *a2) >> 5 );
}
std::stringbuf::str(a1, v9);
std::ostringstream::~ostringstream(&v8, &`VTT for'std::ostringstream);
std::ios_base::~ios_base((std::ios_base *)v10);
return a1;
}
|
rjoin<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x178
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
MOV RDI,RSP
CALL 0x00107580
MOV RAX,qword ptr [R15 + 0x8]
CMP RAX,qword ptr [R15]
JZ 0x001240fc
MOV R13,-0x20
XOR EBP,EBP
MOV R12,RSP
LAB_001240b9:
TEST RBP,RBP
JZ 0x001240d1
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
LAB_001240c5:
MOV RDI,R12
CALL 0x001074b0
MOV RAX,qword ptr [R15 + 0x8]
LAB_001240d1:
MOV RSI,qword ptr [RAX + R13*0x1]
MOV RDX,qword ptr [RAX + R13*0x1 + 0x8]
MOV RDI,R12
CALL 0x001074b0
MOV RAX,qword ptr [R15 + 0x8]
MOV RCX,RAX
SUB RCX,qword ptr [R15]
INC RBP
SAR RCX,0x5
ADD R13,-0x20
CMP RBP,RCX
JC 0x001240b9
LAB_001240fc:
LEA RSI,[RSP + 0x8]
LAB_00124101:
MOV RDI,RBX
CALL 0x00107680
LAB_00124109:
MOV RSI,qword ptr [0x00149f90]
MOV RDI,RSP
CALL 0x00107200
LEA RDI,[RSP + 0x70]
CALL 0x00107150
MOV RAX,RBX
ADD RSP,0x178
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* std::__cxx11::string CLI::detail::rjoin<std::vector<std::__cxx11::string,
std::allocator<std::__cxx11::string > > >(std::vector<std::__cxx11::string,
std::allocator<std::__cxx11::string > > const&, std::__cxx11::string) */
detail * __thiscall
CLI::detail::rjoin<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>
(detail *this,long *param_1,int8 *param_3)
{
long lVar1;
ulong uVar2;
long lVar3;
ostringstream aoStack_1a8 [112];
ios_base local_138 [264];
std::__cxx11::ostringstream::ostringstream(aoStack_1a8);
lVar1 = param_1[1];
if (lVar1 != *param_1) {
lVar3 = -0x20;
uVar2 = 0;
do {
if (uVar2 != 0) {
/* try { // try from 001240c5 to 001240e1 has its CatchHandler @ 00124139 */
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)aoStack_1a8,(char *)*param_3,param_3[1]);
lVar1 = param_1[1];
}
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)aoStack_1a8,*(char **)(lVar1 + lVar3),*(long *)(lVar1 + 8 + lVar3));
lVar1 = param_1[1];
uVar2 = uVar2 + 1;
lVar3 = lVar3 + -0x20;
} while (uVar2 < (ulong)(lVar1 - *param_1 >> 5));
}
/* try { // try from 00124101 to 00124108 has its CatchHandler @ 00124137 */
std::__cxx11::stringbuf::str();
std::__cxx11::ostringstream::~ostringstream(aoStack_1a8);
std::ios_base::~ios_base(local_138);
return this;
}
|
|
57,542
|
xml_skip_whitespace
|
eloqsql/storage/maria/libmarias3/src/xml.c
|
static void xml_skip_whitespace(struct xml_parser* parser) {
xml_parser_info(parser, "whitespace");
while (isspace(parser->buffer[parser->position])) {
if (parser->position + 1 >= parser->length) {
return;
} else {
parser->position++;
}
}
}
|
O0
|
c
|
xml_skip_whitespace:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
callq 0x27150
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
movq -0x8(%rbp), %rdx
movq 0x8(%rdx), %rdx
movzbl (%rcx,%rdx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax # imm = 0x2000
cmpl $0x0, %eax
je 0x334a2
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
addq $0x1, %rax
movq -0x8(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jb 0x33490
jmp 0x334a2
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rax)
jmp 0x3344c
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
xml_skip_whitespace:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
loc_3344C:
call ___ctype_b_loc
mov rax, [rax]
mov rcx, [rbp+var_8]
mov rcx, [rcx]
mov rdx, [rbp+var_8]
mov rdx, [rdx+8]
movzx ecx, byte ptr [rcx+rdx]
movsxd rcx, ecx
movzx eax, word ptr [rax+rcx*2]
and eax, 2000h
cmp eax, 0
jz short loc_334A2
mov rax, [rbp+var_8]
mov rax, [rax+8]
add rax, 1
mov rcx, [rbp+var_8]
cmp rax, [rcx+10h]
jb short loc_33490
jmp short loc_334A2
loc_33490:
mov rax, [rbp+var_8]
mov rcx, [rax+8]
add rcx, 1
mov [rax+8], rcx
jmp short loc_3344C
loc_334A2:
add rsp, 10h
pop rbp
retn
|
unsigned long long xml_skip_whitespace(_QWORD *a1)
{
unsigned long long result; // rax
while ( 1 )
{
result = *(_WORD *)(*(_QWORD *)__ctype_b_loc() + 2LL * *(unsigned __int8 *)(*a1 + a1[1])) & 0x2000;
if ( !(_DWORD)result )
break;
result = a1[1] + 1LL;
if ( result >= a1[2] )
break;
++a1[1];
}
return result;
}
|
xml_skip_whitespace:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
LAB_0013344c:
CALL 0x00127150
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RCX]
MOV RDX,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RDX + 0x8]
MOVZX ECX,byte ptr [RCX + RDX*0x1]
MOVSXD RCX,ECX
MOVZX EAX,word ptr [RAX + RCX*0x2]
AND EAX,0x2000
CMP EAX,0x0
JZ 0x001334a2
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
ADD RAX,0x1
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RCX + 0x10]
JC 0x00133490
JMP 0x001334a2
LAB_00133490:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x8]
ADD RCX,0x1
MOV qword ptr [RAX + 0x8],RCX
JMP 0x0013344c
LAB_001334a2:
ADD RSP,0x10
POP RBP
RET
|
void xml_skip_whitespace(long *param_1)
{
ushort **ppuVar1;
while ((ppuVar1 = __ctype_b_loc(),
((*ppuVar1)[(int)(uint)*(byte *)(*param_1 + param_1[1])] & 0x2000) != 0 &&
(param_1[1] + 1U < (ulong)param_1[2]))) {
param_1[1] = param_1[1] + 1;
}
return;
}
|
|
57,543
|
translog_finish_page
|
eloqsql/storage/maria/ma_loghandler.c
|
static void translog_finish_page(TRANSLOG_ADDRESS *horizon,
struct st_buffer_cursor *cursor)
{
uint16 left= TRANSLOG_PAGE_SIZE - cursor->current_page_fill;
uchar *page= cursor->ptr - cursor->current_page_fill;
DBUG_ENTER("translog_finish_page");
DBUG_PRINT("enter", ("Buffer: #%u %p "
"Buffer addr: " LSN_FMT " "
"Page addr: " LSN_FMT " "
"size:%u (%u) Pg:%u left:%u",
(uint) cursor->buffer_no, cursor->buffer,
LSN_IN_PARTS(cursor->buffer->offset),
(uint)LSN_FILE_NO(*horizon),
(uint)(LSN_OFFSET(*horizon) -
cursor->current_page_fill),
(uint) cursor->buffer->size,
(uint) (cursor->ptr -cursor->buffer->buffer),
(uint) cursor->current_page_fill, (uint) left));
DBUG_ASSERT(LSN_FILE_NO(*horizon) == LSN_FILE_NO(cursor->buffer->offset)
|| translog_status == TRANSLOG_UNINITED);
if ((LSN_FILE_NO(*horizon) != LSN_FILE_NO(cursor->buffer->offset)))
DBUG_VOID_RETURN; // everything wrong do not write to awoid more problems
translog_check_cursor(cursor);
if (cursor->protected)
{
DBUG_PRINT("info", ("Already protected and finished"));
DBUG_VOID_RETURN;
}
cursor->protected= 1;
DBUG_ASSERT(left < TRANSLOG_PAGE_SIZE);
if (left != 0)
{
DBUG_PRINT("info", ("left: %u", (uint) left));
memset(cursor->ptr, TRANSLOG_FILLER, left);
cursor->ptr+= left;
(*horizon)+= left; /* offset increasing */
if (!cursor->chaser)
cursor->buffer->size+= left;
/* We are finishing the page so reset the counter */
cursor->current_page_fill= 0;
DBUG_PRINT("info", ("Finish Page buffer #%u: %p "
"chaser: %d Size: %lu (%lu)",
(uint) cursor->buffer->buffer_no,
cursor->buffer, cursor->chaser,
(ulong) cursor->buffer->size,
(ulong) (cursor->ptr - cursor->buffer->buffer)));
translog_check_cursor(cursor);
}
/*
When we are finishing the page other thread might not finish the page
header yet (in case if we started from the middle of the page) so we
have to read log_descriptor.flags but not the flags from the page.
*/
if (log_descriptor.flags & TRANSLOG_SECTOR_PROTECTION)
{
translog_put_sector_protection(page, cursor);
DBUG_PRINT("info", ("drop write_counter"));
cursor->write_counter= 0;
cursor->previous_offset= 0;
}
if (log_descriptor.flags & TRANSLOG_PAGE_CRC)
{
uint32 crc= translog_crc(page + log_descriptor.page_overhead,
TRANSLOG_PAGE_SIZE -
log_descriptor.page_overhead);
DBUG_PRINT("info", ("CRC: %lx", (ulong) crc));
/* We have page number, file number and flag before crc */
int4store(page + 3 + 3 + 1, crc);
}
DBUG_VOID_RETURN;
}
|
O3
|
c
|
translog_finish_page:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x28(%rsi), %rax
movq 0x100010(%rax), %rax
xorq (%rdi), %rax
shrq $0x20, %rax
jne 0x4bcd1
movq %rsi, %r14
cmpb $0x0, 0x38(%rsi)
jne 0x4bcd1
movzwl 0x30(%r14), %r13d
movq 0x20(%r14), %rbx
movb $0x1, 0x38(%r14)
movzwl %r13w, %eax
cmpl $0x2000, %eax # imm = 0x2000
je 0x4bc85
movq %rdi, %r15
movl $0x2000, %eax # imm = 0x2000
subl %r13d, %eax
movzwl %ax, %r12d
movq %rbx, %rdi
movl $0xff, %esi
movq %r12, %rdx
callq 0x292c0
addq %r12, 0x20(%r14)
addq %r12, (%r15)
cmpb $0x0, 0x37(%r14)
jne 0x4bc7e
movq 0x28(%r14), %rax
addl %r12d, 0x100030(%rax)
movw $0x0, 0x30(%r14)
subq %r13, %rbx
movl 0x3b2b3a(%rip), %eax # 0x3fe7c8
testb $0x2, %al
je 0x4bcb1
movl 0x34(%r14), %edx
movzwl 0x32(%r14), %esi
movq %rbx, %rdi
callq 0x4f4d1
movl $0x0, 0x32(%r14)
movl 0x3b2b17(%rip), %eax # 0x3fe7c8
testb $0x1, %al
je 0x4bcd1
movzwl 0x3b2b28(%rip), %eax # 0x3fe7e4
leaq (%rbx,%rax), %rsi
movl $0x2000, %edx # imm = 0x2000
subl %eax, %edx
xorl %edi, %edi
callq 0xa7fb8
movl %eax, 0x7(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
translog_finish_page:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rax, [rsi+28h]
mov rax, ds:qword_100010[rax]
xor rax, [rdi]
shr rax, 20h
jnz loc_4BCD1
mov r14, rsi
cmp byte ptr [rsi+38h], 0
jnz loc_4BCD1
movzx r13d, word ptr [r14+30h]
mov rbx, [r14+20h]
mov byte ptr [r14+38h], 1
movzx eax, r13w
cmp eax, 2000h
jz short loc_4BC85
mov r15, rdi
mov eax, 2000h
sub eax, r13d
movzx r12d, ax
mov rdi, rbx
mov esi, 0FFh
mov rdx, r12
call _memset
add [r14+20h], r12
add [r15], r12
cmp byte ptr [r14+37h], 0
jnz short loc_4BC7E
mov rax, [r14+28h]
add dword ptr ds:qword_100030[rax], r12d
loc_4BC7E:
mov word ptr [r14+30h], 0
loc_4BC85:
sub rbx, r13
mov eax, cs:dword_3FE7C8
test al, 2
jz short loc_4BCB1
mov edx, [r14+34h]
movzx esi, word ptr [r14+32h]
mov rdi, rbx
call translog_put_sector_protection
mov dword ptr [r14+32h], 0
mov eax, cs:dword_3FE7C8
loc_4BCB1:
test al, 1
jz short loc_4BCD1
movzx eax, cs:word_3FE7E4
lea rsi, [rbx+rax]
mov edx, 2000h
sub edx, eax
xor edi, edi
call my_checksum
mov [rbx+7], eax
loc_4BCD1:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
unsigned long long translog_finish_page(_QWORD *a1, long long a2)
{
unsigned long long result; // rax
long long v3; // r13
long long v4; // rbx
long long v5; // r12
long long v6; // rbx
result = (*a1 ^ *(unsigned long long *)((char *)&qword_100010 + *(_QWORD *)(a2 + 40))) >> 32;
if ( !result && !*(_BYTE *)(a2 + 56) )
{
v3 = *(unsigned __int16 *)(a2 + 48);
v4 = *(_QWORD *)(a2 + 32);
*(_BYTE *)(a2 + 56) = 1;
if ( (unsigned __int16)v3 != 0x2000 )
{
v5 = (unsigned __int16)(0x2000 - v3);
memset(v4, 255LL, v5);
*(_QWORD *)(a2 + 32) += v5;
*a1 += v5;
if ( !*(_BYTE *)(a2 + 55) )
*(_DWORD *)((char *)&qword_100030 + *(_QWORD *)(a2 + 40)) += v5;
*(_WORD *)(a2 + 48) = 0;
}
v6 = v4 - v3;
result = (unsigned int)dword_3FE7C8;
if ( (dword_3FE7C8 & 2) != 0 )
{
translog_put_sector_protection(v6, *(unsigned __int16 *)(a2 + 50), *(unsigned int *)(a2 + 52));
*(_DWORD *)(a2 + 50) = 0;
result = (unsigned int)dword_3FE7C8;
}
if ( (result & 1) != 0 )
{
result = my_checksum(
0LL,
v6 + (unsigned __int16)word_3FE7E4,
0x2000 - (unsigned int)(unsigned __int16)word_3FE7E4);
*(_DWORD *)(v6 + 7) = result;
}
}
return result;
}
|
translog_finish_page:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RAX,qword ptr [RSI + 0x28]
MOV RAX,qword ptr [RAX + 0x100010]
XOR RAX,qword ptr [RDI]
SHR RAX,0x20
JNZ 0x0014bcd1
MOV R14,RSI
CMP byte ptr [RSI + 0x38],0x0
JNZ 0x0014bcd1
MOVZX R13D,word ptr [R14 + 0x30]
MOV RBX,qword ptr [R14 + 0x20]
MOV byte ptr [R14 + 0x38],0x1
MOVZX EAX,R13W
CMP EAX,0x2000
JZ 0x0014bc85
MOV R15,RDI
MOV EAX,0x2000
SUB EAX,R13D
MOVZX R12D,AX
MOV RDI,RBX
MOV ESI,0xff
MOV RDX,R12
CALL 0x001292c0
ADD qword ptr [R14 + 0x20],R12
ADD qword ptr [R15],R12
CMP byte ptr [R14 + 0x37],0x0
JNZ 0x0014bc7e
MOV RAX,qword ptr [R14 + 0x28]
ADD dword ptr [RAX + 0x100030],R12D
LAB_0014bc7e:
MOV word ptr [R14 + 0x30],0x0
LAB_0014bc85:
SUB RBX,R13
MOV EAX,dword ptr [0x004fe7c8]
TEST AL,0x2
JZ 0x0014bcb1
MOV EDX,dword ptr [R14 + 0x34]
MOVZX ESI,word ptr [R14 + 0x32]
MOV RDI,RBX
CALL 0x0014f4d1
MOV dword ptr [R14 + 0x32],0x0
MOV EAX,dword ptr [0x004fe7c8]
LAB_0014bcb1:
TEST AL,0x1
JZ 0x0014bcd1
MOVZX EAX,word ptr [0x004fe7e4]
LEA RSI,[RBX + RAX*0x1]
MOV EDX,0x2000
SUB EDX,EAX
XOR EDI,EDI
CALL 0x001a7fb8
MOV dword ptr [RBX + 0x7],EAX
LAB_0014bcd1:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void translog_finish_page(ulong *param_1,long param_2)
{
ushort uVar1;
void *__s;
int4 uVar2;
long lVar3;
uint uVar4;
ulong __n;
if (((*(ulong *)(Elf64_Ehdr_00100000.e_ident_pad + *(long *)(param_2 + 0x28) + 7) ^ *param_1) >>
0x20 == 0) && (*(char *)(param_2 + 0x38) == '\0')) {
uVar1 = *(ushort *)(param_2 + 0x30);
__s = *(void **)(param_2 + 0x20);
*(int1 *)(param_2 + 0x38) = 1;
if (uVar1 != 0x2000) {
uVar4 = 0x2000 - uVar1 & 0xffff;
__n = (ulong)uVar4;
memset(__s,0xff,__n);
*(long *)(param_2 + 0x20) = *(long *)(param_2 + 0x20) + __n;
*param_1 = *param_1 + __n;
if (*(char *)(param_2 + 0x37) == '\0') {
*(uint *)(Elf64_Ehdr_00100000.e_ident_pad + *(long *)(param_2 + 0x28) + 0x27) =
*(int *)(Elf64_Ehdr_00100000.e_ident_pad + *(long *)(param_2 + 0x28) + 0x27) + uVar4;
}
*(int2 *)(param_2 + 0x30) = 0;
}
lVar3 = (long)__s - (ulong)uVar1;
if ((_DAT_004fe7c8 & 2) != 0) {
translog_put_sector_protection
(lVar3,*(int2 *)(param_2 + 0x32),*(int4 *)(param_2 + 0x34));
*(int4 *)(param_2 + 0x32) = 0;
}
if ((_DAT_004fe7c8 & 1) != 0) {
uVar2 = my_checksum(0,lVar3 + (ulong)(uint)DAT_004fe7e4,0x2000 - (uint)DAT_004fe7e4);
*(int4 *)(lVar3 + 7) = uVar2;
}
}
return;
}
|
|
57,544
|
CameraMoveForward
|
csit-sgu[P]mit-game-2025-team-tyler/Libraries/raylib/src/rcamera.h
|
void CameraMoveForward(Camera *camera, float distance, bool moveInWorldPlane)
{
Vector3 forward = GetCameraForward(camera);
if (moveInWorldPlane)
{
// Project vector onto world plane
forward.y = 0;
forward = Vector3Normalize(forward);
}
// Scale by distance
forward = Vector3Scale(forward, distance);
// Move position and target
camera->position = Vector3Add(camera->position, forward);
camera->target = Vector3Add(camera->target, forward);
}
|
O3
|
c
|
CameraMoveForward:
movsd 0xc(%rdi), %xmm1
movss 0x14(%rdi), %xmm2
movsd (%rdi), %xmm3
movss 0x8(%rdi), %xmm4
movaps %xmm1, %xmm9
subps %xmm3, %xmm9
movaps %xmm2, %xmm8
subss %xmm4, %xmm8
movaps %xmm9, %xmm5
mulps %xmm9, %xmm5
shufps $0x55, %xmm5, %xmm5 # xmm5 = xmm5[1,1,1,1]
movaps %xmm9, %xmm6
mulss %xmm9, %xmm6
addss %xmm5, %xmm6
movaps %xmm8, %xmm5
mulss %xmm8, %xmm5
addss %xmm6, %xmm5
xorps %xmm6, %xmm6
sqrtss %xmm5, %xmm6
xorps %xmm5, %xmm5
ucomiss %xmm5, %xmm6
movss 0x64019(%rip), %xmm7 # 0xcf0f8
movaps %xmm7, %xmm5
divss %xmm6, %xmm5
movaps %xmm5, %xmm6
shufps $0x0, %xmm5, %xmm6 # xmm6 = xmm6[0,0],xmm5[0,0]
mulps %xmm9, %xmm6
jne 0x6b0f9
jp 0x6b0f9
movaps %xmm9, %xmm6
mulss %xmm8, %xmm5
jne 0x6b106
jp 0x6b106
movaps %xmm8, %xmm5
testl %esi, %esi
je 0x6b159
movaps %xmm6, %xmm9
mulss %xmm6, %xmm9
xorps %xmm8, %xmm8
addss %xmm8, %xmm9
movaps %xmm5, %xmm10
mulss %xmm5, %xmm10
addss %xmm9, %xmm10
xorps %xmm9, %xmm9
sqrtss %xmm10, %xmm9
ucomiss %xmm8, %xmm9
jne 0x6b13b
jnp 0x6b153
divss %xmm9, %xmm7
mulss %xmm7, %xmm6
mulss %xmm7, %xmm8
unpcklps %xmm8, %xmm6 # xmm6 = xmm6[0],xmm8[0],xmm6[1],xmm8[1]
mulss %xmm7, %xmm5
jmp 0x6b159
xorps %xmm7, %xmm7
unpcklps %xmm7, %xmm6 # xmm6 = xmm6[0],xmm7[0],xmm6[1],xmm7[1]
mulss %xmm0, %xmm5
shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0]
mulps %xmm6, %xmm0
addps %xmm0, %xmm3
addss %xmm5, %xmm4
movlps %xmm3, (%rdi)
movss %xmm4, 0x8(%rdi)
addps %xmm0, %xmm1
addss %xmm5, %xmm2
movlps %xmm1, 0xc(%rdi)
movss %xmm2, 0x14(%rdi)
retq
|
CameraMoveForward:
movsd xmm1, qword ptr [rdi+0Ch]
movss xmm2, dword ptr [rdi+14h]
movsd xmm3, qword ptr [rdi]
movss xmm4, dword ptr [rdi+8]
movaps xmm9, xmm1
subps xmm9, xmm3
movaps xmm8, xmm2
subss xmm8, xmm4
movaps xmm5, xmm9
mulps xmm5, xmm9
shufps xmm5, xmm5, 55h ; 'U'
movaps xmm6, xmm9
mulss xmm6, xmm9
addss xmm6, xmm5
movaps xmm5, xmm8
mulss xmm5, xmm8
addss xmm5, xmm6
xorps xmm6, xmm6
sqrtss xmm6, xmm5
xorps xmm5, xmm5
ucomiss xmm6, xmm5
movss xmm7, cs:dword_CF0F8
movaps xmm5, xmm7
divss xmm5, xmm6
movaps xmm6, xmm5
shufps xmm6, xmm5, 0
mulps xmm6, xmm9
jnz short loc_6B0F9
jp short loc_6B0F9
movaps xmm6, xmm9
loc_6B0F9:
mulss xmm5, xmm8
jnz short loc_6B106
jp short loc_6B106
movaps xmm5, xmm8
loc_6B106:
test esi, esi
jz short loc_6B159
movaps xmm9, xmm6
mulss xmm9, xmm6
xorps xmm8, xmm8
addss xmm9, xmm8
movaps xmm10, xmm5
mulss xmm10, xmm5
addss xmm10, xmm9
xorps xmm9, xmm9
sqrtss xmm9, xmm10
ucomiss xmm9, xmm8
jnz short loc_6B13B
jnp short loc_6B153
loc_6B13B:
divss xmm7, xmm9
mulss xmm6, xmm7
mulss xmm8, xmm7
unpcklps xmm6, xmm8
mulss xmm5, xmm7
jmp short loc_6B159
loc_6B153:
xorps xmm7, xmm7
unpcklps xmm6, xmm7
loc_6B159:
mulss xmm5, xmm0
shufps xmm0, xmm0, 0
mulps xmm0, xmm6
addps xmm3, xmm0
addss xmm4, xmm5
movlps qword ptr [rdi], xmm3
movss dword ptr [rdi+8], xmm4
addps xmm1, xmm0
addss xmm2, xmm5
movlps qword ptr [rdi+0Ch], xmm1
movss dword ptr [rdi+14h], xmm2
retn
|
void CameraMoveForward(unsigned long long *a1, int a2, __m128 a3)
{
__m128 v3; // xmm1
float v4; // xmm2_4
__m128 v5; // xmm3
float v6; // xmm4_4
__m128 v7; // xmm9
float v8; // xmm8_4
__m128 v9; // xmm5
float v10; // xmm6_4
bool v11; // zf
__m128 v12; // xmm5
__m128 v13; // xmm6
float v14; // xmm5_4
__m128 v15; // xmm8
float v16; // xmm9_4
float v17; // xmm5_4
__m128 v18; // xmm0
v3 = (__m128)*(unsigned long long *)((char *)a1 + 12);
v4 = *((float *)a1 + 5);
v5 = (__m128)*a1;
v6 = *((float *)a1 + 2);
v7 = _mm_sub_ps(v3, v5);
v8 = v4 - v6;
v9 = _mm_mul_ps(v7, v7);
v10 = fsqrt((float)(v8 * v8) + (float)((float)(v7.m128_f32[0] * v7.m128_f32[0])
+ _mm_shuffle_ps(v9, v9, 85).m128_f32[0]));
v11 = v10 == 0.0;
v12 = (__m128)0x3F800000u;
v12.m128_f32[0] = 1.0 / v10;
v13 = _mm_mul_ps(_mm_shuffle_ps(v12, v12, 0), v7);
if ( v11 )
v13 = v7;
v14 = v12.m128_f32[0] * v8;
if ( v11 )
v14 = *((float *)a1 + 5) - v6;
if ( a2 )
{
v15 = 0LL;
v16 = fsqrt((float)(v14 * v14) + (float)((float)(v13.m128_f32[0] * v13.m128_f32[0]) + 0.0));
if ( v16 == 0.0 )
{
v13 = _mm_unpacklo_ps(v13, (__m128)0LL);
}
else
{
v13.m128_f32[0] = v13.m128_f32[0] * (float)(1.0 / v16);
v15.m128_f32[0] = 0.0 * (float)(1.0 / v16);
v13 = _mm_unpacklo_ps(v13, v15);
v14 = v14 * (float)(1.0 / v16);
}
}
v17 = v14 * a3.m128_f32[0];
v18 = _mm_mul_ps(_mm_shuffle_ps(a3, a3, 0), v13);
_mm_storel_ps((double *)a1, _mm_add_ps(v5, v18));
*((float *)a1 + 2) = v6 + v17;
_mm_storel_ps((double *)((char *)a1 + 12), _mm_add_ps(v3, v18));
*((float *)a1 + 5) = v4 + v17;
}
|
CameraMoveForward:
MOVSD XMM1,qword ptr [RDI + 0xc]
MOVSS XMM2,dword ptr [RDI + 0x14]
MOVSD XMM3,qword ptr [RDI]
MOVSS XMM4,dword ptr [RDI + 0x8]
MOVAPS XMM9,XMM1
SUBPS XMM9,XMM3
MOVAPS XMM8,XMM2
SUBSS XMM8,XMM4
MOVAPS XMM5,XMM9
MULPS XMM5,XMM9
SHUFPS XMM5,XMM5,0x55
MOVAPS XMM6,XMM9
MULSS XMM6,XMM9
ADDSS XMM6,XMM5
MOVAPS XMM5,XMM8
MULSS XMM5,XMM8
ADDSS XMM5,XMM6
XORPS XMM6,XMM6
SQRTSS XMM6,XMM5
XORPS XMM5,XMM5
UCOMISS XMM6,XMM5
MOVSS XMM7,dword ptr [0x001cf0f8]
MOVAPS XMM5,XMM7
DIVSS XMM5,XMM6
MOVAPS XMM6,XMM5
SHUFPS XMM6,XMM5,0x0
MULPS XMM6,XMM9
JNZ 0x0016b0f9
JP 0x0016b0f9
MOVAPS XMM6,XMM9
LAB_0016b0f9:
MULSS XMM5,XMM8
JNZ 0x0016b106
JP 0x0016b106
MOVAPS XMM5,XMM8
LAB_0016b106:
TEST ESI,ESI
JZ 0x0016b159
MOVAPS XMM9,XMM6
MULSS XMM9,XMM6
XORPS XMM8,XMM8
ADDSS XMM9,XMM8
MOVAPS XMM10,XMM5
MULSS XMM10,XMM5
ADDSS XMM10,XMM9
XORPS XMM9,XMM9
SQRTSS XMM9,XMM10
UCOMISS XMM9,XMM8
JNZ 0x0016b13b
JNP 0x0016b153
LAB_0016b13b:
DIVSS XMM7,XMM9
MULSS XMM6,XMM7
MULSS XMM8,XMM7
UNPCKLPS XMM6,XMM8
MULSS XMM5,XMM7
JMP 0x0016b159
LAB_0016b153:
XORPS XMM7,XMM7
UNPCKLPS XMM6,XMM7
LAB_0016b159:
MULSS XMM5,XMM0
SHUFPS XMM0,XMM0,0x0
MULPS XMM0,XMM6
ADDPS XMM3,XMM0
ADDSS XMM4,XMM5
MOVLPS qword ptr [RDI],XMM3
MOVSS dword ptr [RDI + 0x8],XMM4
ADDPS XMM1,XMM0
ADDSS XMM2,XMM5
MOVLPS qword ptr [RDI + 0xc],XMM1
MOVSS dword ptr [RDI + 0x14],XMM2
RET
|
void CameraMoveForward(float param_1,int8 *param_2,int param_3)
{
float fVar1;
float fVar2;
float fVar3;
float fVar4;
float fVar5;
float fVar6;
float fVar7;
float fVar8;
float fVar9;
float fVar10;
float fVar11;
fVar1 = (float)*(int8 *)((long)param_2 + 0xc);
fVar2 = (float)((ulong)*(int8 *)((long)param_2 + 0xc) >> 0x20);
fVar3 = (float)*param_2;
fVar10 = fVar1 - fVar3;
fVar4 = (float)((ulong)*param_2 >> 0x20);
fVar11 = fVar2 - fVar4;
fVar8 = *(float *)((long)param_2 + 0x14) - *(float *)(param_2 + 1);
fVar6 = SQRT(fVar8 * fVar8 + fVar10 * fVar10 + fVar11 * fVar11);
fVar5 = DAT_001cf0f8 / fVar6;
fVar7 = fVar5 * fVar10;
fVar9 = fVar5 * fVar11;
if ((fVar6 == 0.0) && (!NAN(fVar6))) {
fVar7 = fVar10;
fVar9 = fVar11;
}
fVar5 = fVar5 * fVar8;
if ((fVar6 == 0.0) && (!NAN(fVar6))) {
fVar5 = fVar8;
}
if (param_3 != 0) {
fVar6 = SQRT(fVar5 * fVar5 + fVar7 * fVar7 + 0.0);
if ((fVar6 != 0.0) || (NAN(fVar6))) {
fVar6 = DAT_001cf0f8 / fVar6;
fVar7 = fVar7 * fVar6;
fVar9 = fVar6 * 0.0;
fVar5 = fVar5 * fVar6;
}
else {
fVar9 = 0.0;
}
}
*param_2 = CONCAT44(fVar4 + param_1 * fVar9,fVar3 + param_1 * fVar7);
*(float *)(param_2 + 1) = *(float *)(param_2 + 1) + fVar5 * param_1;
*(ulong *)((long)param_2 + 0xc) = CONCAT44(fVar2 + param_1 * fVar9,fVar1 + param_1 * fVar7);
*(float *)((long)param_2 + 0x14) = *(float *)((long)param_2 + 0x14) + fVar5 * param_1;
return;
}
|
|
57,545
|
ftxui::(anonymous namespace)::Border::Border(std::vector<std::shared_ptr<ftxui::Node>, std::allocator<std::shared_ptr<ftxui::Node>>>, ftxui::BorderStyle, std::optional<ftxui::Color>)
|
Andrewchistyakov[P]flashcards_lyc/build_O0/_deps/ftxui-src/src/ftxui/dom/border.cpp
|
Border(Elements children,
BorderStyle style,
std::optional<Color> foreground_color = std::nullopt)
: Node(std::move(children)),
charset_(simple_border_charset[style]),
foreground_color_(foreground_color) {}
|
O0
|
cpp
|
ftxui::(anonymous namespace)::Border::Border(std::vector<std::shared_ptr<ftxui::Node>, std::allocator<std::shared_ptr<ftxui::Node>>>, ftxui::BorderStyle, std::optional<ftxui::Color>):
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movl %ecx, %eax
movl %eax, -0x5(%rbp)
shrq $0x20, %rcx
movb %cl, %al
movb %al, -0x1(%rbp)
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
leaq -0x38(%rbp), %rdi
movq %rdi, -0x50(%rbp)
callq 0x3e4b0
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0x44540
jmp 0x3a945
leaq -0x38(%rbp), %rdi
callq 0x23cd0
movq -0x58(%rbp), %rax
leaq 0xa26a7(%rip), %rcx # 0xdd000
addq $0x10, %rcx
movq %rcx, (%rax)
movl -0x1c(%rbp), %eax
movl %eax, %esi
leaq 0xa4ce4(%rip), %rdi # 0xdf650
callq 0x3e650
movq %rax, %rcx
movq -0x58(%rbp), %rax
movq %rcx, 0x60(%rax)
movl -0x5(%rbp), %ecx
movl %ecx, 0x68(%rax)
movb -0x1(%rbp), %cl
movb %cl, 0x6c(%rax)
addq $0x60, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x23cd0
movq -0x40(%rbp), %rdi
callq 0xda90
nopl (%rax)
|
_ZN5ftxui12_GLOBAL__N_16BorderC2ESt6vectorISt10shared_ptrINS_4NodeEESaIS5_EENS_11BorderStyleESt8optionalINS_5ColorEE:
push rbp
mov rbp, rsp
sub rsp, 60h
mov eax, ecx
mov [rbp+var_5], eax
shr rcx, 20h
mov al, cl
mov [rbp+var_1], al
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov rax, [rbp+var_10]
mov [rbp+var_58], rax
lea rdi, [rbp+var_38]
mov [rbp+var_50], rdi
call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EEC2EOS5_; std::vector<std::shared_ptr<ftxui::Node>>::vector(std::vector<std::shared_ptr<ftxui::Node>>&&)
mov rdi, [rbp+var_58]
mov rsi, [rbp+var_50]
call _ZN5ftxui4NodeC2ESt6vectorISt10shared_ptrIS0_ESaIS3_EE; ftxui::Node::Node(std::vector<std::shared_ptr<ftxui::Node>>)
jmp short $+2
loc_3A945:
lea rdi, [rbp+var_38]
call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector()
mov rax, [rbp+var_58]
lea rcx, _ZTVN5ftxui12_GLOBAL__N_16BorderE; `vtable for'ftxui::`anonymous namespace'::Border
add rcx, 10h
mov [rax], rcx
mov eax, [rbp+var_1C]
mov esi, eax
lea rdi, _ZN5ftxui12_GLOBAL__N_121simple_border_charsetB5cxx11E; ftxui::`anonymous namespace'::simple_border_charset
call _ZNSt5arrayIS_INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELm6EELm6EEixEm; std::array<std::array<std::string,6ul>,6ul>::operator[](ulong)
mov rcx, rax
mov rax, [rbp+var_58]
mov [rax+60h], rcx
mov ecx, [rbp+var_5]
mov [rax+68h], ecx
mov cl, [rbp+var_1]
mov [rax+6Ch], cl
add rsp, 60h
pop rbp
retn
mov rcx, rax
mov eax, edx
mov [rbp+var_40], rcx
mov [rbp+var_44], eax
lea rdi, [rbp+var_38]
call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector()
mov rdi, [rbp+var_40]
call __Unwind_Resume
|
long long ftxui::`anonymous namespace'::Border::Border(long long a1, long long a2, unsigned int a3, long long a4)
{
long long v4; // rcx
long long result; // rax
long long v6[3]; // [rsp+28h] [rbp-38h] BYREF
unsigned int v7; // [rsp+44h] [rbp-1Ch]
long long v8; // [rsp+48h] [rbp-18h]
long long v9; // [rsp+50h] [rbp-10h]
int v10; // [rsp+5Bh] [rbp-5h]
char v11; // [rsp+5Fh] [rbp-1h]
v10 = a4;
v11 = BYTE4(a4);
v9 = a1;
v8 = a2;
v7 = a3;
std::vector<std::shared_ptr<ftxui::Node>>::vector(v6, a2);
ftxui::Node::Node(a1, v6);
std::vector<std::shared_ptr<ftxui::Node>>::~vector(v6);
*(_QWORD *)a1 = &`vtable for'ftxui::`anonymous namespace'::Border + 2;
v4 = std::array<std::array<std::string,6ul>,6ul>::operator[](
&ftxui::`anonymous namespace'::simple_border_charset[abi:cxx11],
v7);
result = a1;
*(_QWORD *)(a1 + 96) = v4;
*(_DWORD *)(a1 + 104) = v10;
*(_BYTE *)(a1 + 108) = v11;
return result;
}
|
Border:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV EAX,ECX
MOV dword ptr [RBP + -0x5],EAX
SHR RCX,0x20
MOV AL,CL
MOV byte ptr [RBP + -0x1],AL
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x58],RAX
LEA RDI,[RBP + -0x38]
MOV qword ptr [RBP + -0x50],RDI
CALL 0x0013e4b0
MOV RDI,qword ptr [RBP + -0x58]
MOV RSI,qword ptr [RBP + -0x50]
LAB_0013a93e:
CALL 0x00144540
LAB_0013a943:
JMP 0x0013a945
LAB_0013a945:
LEA RDI,[RBP + -0x38]
CALL 0x00123cd0
MOV RAX,qword ptr [RBP + -0x58]
LEA RCX,[0x1dd000]
ADD RCX,0x10
MOV qword ptr [RAX],RCX
MOV EAX,dword ptr [RBP + -0x1c]
MOV ESI,EAX
LEA RDI,[0x1df650]
CALL 0x0013e650
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RAX + 0x60],RCX
MOV ECX,dword ptr [RBP + -0x5]
MOV dword ptr [RAX + 0x68],ECX
MOV CL,byte ptr [RBP + -0x1]
MOV byte ptr [RAX + 0x6c],CL
ADD RSP,0x60
POP RBP
RET
|
/* ftxui::(anonymous namespace)::Border::Border(std::vector<std::shared_ptr<ftxui::Node>,
std::allocator<std::shared_ptr<ftxui::Node> > >, ftxui::BorderStyle, std::optional<ftxui::Color>)
*/
void __thiscall
ftxui::(anonymous_namespace)::Border::Border
(Border *this,vector *param_2,uint param_3,int8 param_4)
{
int8 uVar1;
vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>> local_40 [28];
uint local_24;
vector *local_20;
Border *local_18;
int4 local_d;
Border local_9;
local_d = (int4)param_4;
local_9 = SUB81((ulong)param_4 >> 0x20,0);
local_24 = param_3;
local_20 = param_2;
local_18 = this;
std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>::vector
(local_40,param_2);
/* try { // try from 0013a93e to 0013a942 has its CatchHandler @ 0013a98e */
Node::Node((Node *)this,local_40);
std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>::~vector
(local_40);
*(int ***)this = &PTR__Border_001dd010;
uVar1 = std::array<std::array<std::__cxx11::string,6ul>,6ul>::operator[]
((array<std::array<std::__cxx11::string,6ul>,6ul> *)
simple_border_charset_abi_cxx11_,(ulong)local_24);
*(int8 *)(this + 0x60) = uVar1;
*(int4 *)(this + 0x68) = local_d;
this[0x6c] = local_9;
return;
}
|
|
57,546
|
my_strntoull10rnd_mb2_or_mb4
|
eloqsql/strings/ctype-ucs2.c
|
static ulonglong
my_strntoull10rnd_mb2_or_mb4(CHARSET_INFO *cs,
const char *nptr, size_t length,
int unsign_fl,
char **endptr, int *err)
{
char buf[256], *b= buf;
ulonglong res;
const uchar *end, *s= (const uchar*) nptr;
my_wc_t wc;
my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc;
int cnv;
/* Cut too long strings */
if (length >= sizeof(buf))
length= sizeof(buf)-1;
end= s + length;
while ((cnv= mb_wc(cs, &wc, s, end)) > 0)
{
s+= cnv;
if (wc > (int) (uchar) 'e' || !wc)
break; /* Can't be a number part */
*b++= (char) wc;
}
res= my_strntoull10rnd_8bit(cs, buf, b - buf, unsign_fl, endptr, err);
*endptr= (char*) nptr + cs->mbminlen * (size_t) (*endptr - buf);
return res;
}
|
O0
|
c
|
my_strntoull10rnd_mb2_or_mb4:
pushq %rbp
movq %rsp, %rbp
subq $0x190, %rsp # imm = 0x190
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x118(%rbp)
movq %rsi, -0x120(%rbp)
movq %rdx, -0x128(%rbp)
movl %ecx, -0x12c(%rbp)
movq %r8, -0x138(%rbp)
movq %r9, -0x140(%rbp)
leaq -0x110(%rbp), %rax
movq %rax, -0x148(%rbp)
movq -0x120(%rbp), %rax
movq %rax, -0x160(%rbp)
movq -0x118(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x170(%rbp)
cmpq $0x100, -0x128(%rbp) # imm = 0x100
jb 0xb91fe
movq $0xff, -0x128(%rbp)
movq -0x160(%rbp), %rax
addq -0x128(%rbp), %rax
movq %rax, -0x158(%rbp)
movq -0x170(%rbp), %rax
movq -0x118(%rbp), %rdi
movq -0x160(%rbp), %rdx
movq -0x158(%rbp), %rcx
leaq -0x168(%rbp), %rsi
callq *%rax
movl %eax, -0x174(%rbp)
cmpl $0x0, %eax
jle 0xb9298
movl -0x174(%rbp), %ecx
movq -0x160(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x160(%rbp)
cmpq $0x65, -0x168(%rbp)
ja 0xb9271
cmpq $0x0, -0x168(%rbp)
jne 0xb9273
jmp 0xb9298
movq -0x168(%rbp), %rax
movb %al, %cl
movq -0x148(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x148(%rbp)
movb %cl, (%rax)
jmp 0xb9213
movq -0x118(%rbp), %rdi
movq -0x148(%rbp), %rdx
leaq -0x110(%rbp), %rsi
movq %rsi, -0x188(%rbp)
subq %rsi, %rdx
movl -0x12c(%rbp), %ecx
movq -0x138(%rbp), %r8
movq -0x140(%rbp), %r9
callq 0xa3b10
movq -0x188(%rbp), %rdi
movq %rax, -0x150(%rbp)
movq -0x120(%rbp), %rcx
movq -0x118(%rbp), %rax
movl 0x98(%rax), %eax
movl %eax, %edx
movq -0x138(%rbp), %rax
movq (%rax), %rsi
subq %rdi, %rsi
imulq %rsi, %rdx
addq %rdx, %rcx
movq %rcx, (%rax)
movq -0x150(%rbp), %rax
movq %rax, -0x180(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0xb933b
movq -0x180(%rbp), %rax
addq $0x190, %rsp # imm = 0x190
popq %rbp
retq
callq 0x283b0
|
my_strntoull10rnd_mb2_or_mb4:
push rbp
mov rbp, rsp
sub rsp, 190h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_118], rdi
mov [rbp+var_120], rsi
mov [rbp+var_128], rdx
mov [rbp+var_12C], ecx
mov [rbp+var_138], r8
mov [rbp+var_140], r9
lea rax, [rbp+var_110]
mov [rbp+var_148], rax
mov rax, [rbp+var_120]
mov [rbp+var_160], rax
mov rax, [rbp+var_118]
mov rax, [rax+0B8h]
mov rax, [rax+28h]
mov [rbp+var_170], rax
cmp [rbp+var_128], 100h
jb short loc_B91FE
mov [rbp+var_128], 0FFh
loc_B91FE:
mov rax, [rbp+var_160]
add rax, [rbp+var_128]
mov [rbp+var_158], rax
loc_B9213:
mov rax, [rbp+var_170]
mov rdi, [rbp+var_118]
mov rdx, [rbp+var_160]
mov rcx, [rbp+var_158]
lea rsi, [rbp+var_168]
call rax
mov [rbp+var_174], eax
cmp eax, 0
jle short loc_B9298
mov ecx, [rbp+var_174]
mov rax, [rbp+var_160]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_160], rax
cmp [rbp+var_168], 65h ; 'e'
ja short loc_B9271
cmp [rbp+var_168], 0
jnz short loc_B9273
loc_B9271:
jmp short loc_B9298
loc_B9273:
mov rax, [rbp+var_168]
mov cl, al
mov rax, [rbp+var_148]
mov rdx, rax
add rdx, 1
mov [rbp+var_148], rdx
mov [rax], cl
jmp loc_B9213
loc_B9298:
mov rdi, [rbp+var_118]
mov rdx, [rbp+var_148]
lea rsi, [rbp+var_110]
mov [rbp+var_188], rsi
sub rdx, rsi
mov ecx, [rbp+var_12C]
mov r8, [rbp+var_138]
mov r9, [rbp+var_140]
call my_strntoull10rnd_8bit
mov rdi, [rbp+var_188]
mov [rbp+var_150], rax
mov rcx, [rbp+var_120]
mov rax, [rbp+var_118]
mov eax, [rax+98h]
mov edx, eax
mov rax, [rbp+var_138]
mov rsi, [rax]
sub rsi, rdi
imul rdx, rsi
add rcx, rdx
mov [rax], rcx
mov rax, [rbp+var_150]
mov [rbp+var_180], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_B933B
mov rax, [rbp+var_180]
add rsp, 190h
pop rbp
retn
loc_B933B:
call ___stack_chk_fail
|
long long my_strntoull10rnd_mb2_or_mb4(
long long a1,
long long a2,
unsigned long long a3,
int a4,
_QWORD *a5,
int *a6)
{
_BYTE *v6; // rax
int v8; // [rsp+1Ch] [rbp-174h]
long long ( *v9)(long long, unsigned long long *, long long, long long); // [rsp+20h] [rbp-170h]
unsigned long long v10; // [rsp+28h] [rbp-168h] BYREF
long long v11; // [rsp+30h] [rbp-160h]
long long v12; // [rsp+38h] [rbp-158h]
long long v13; // [rsp+40h] [rbp-150h]
_BYTE *v14; // [rsp+48h] [rbp-148h]
int *v15; // [rsp+50h] [rbp-140h]
_QWORD *v16; // [rsp+58h] [rbp-138h]
int v17; // [rsp+64h] [rbp-12Ch]
long long v18; // [rsp+68h] [rbp-128h]
long long v19; // [rsp+70h] [rbp-120h]
long long v20; // [rsp+78h] [rbp-118h]
_BYTE v21[264]; // [rsp+80h] [rbp-110h] BYREF
unsigned long long v22; // [rsp+188h] [rbp-8h]
v22 = __readfsqword(0x28u);
v20 = a1;
v19 = a2;
v18 = a3;
v17 = a4;
v16 = a5;
v15 = a6;
v14 = v21;
v11 = a2;
v9 = *(long long ( **)(long long, unsigned long long *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL);
if ( a3 >= 0x100 )
v18 = 255LL;
v12 = v18 + v11;
while ( 1 )
{
v8 = v9(v20, &v10, v11, v12);
if ( v8 <= 0 )
break;
v11 += v8;
if ( v10 > 0x65 || !v10 )
break;
v6 = v14++;
*v6 = v10;
}
v13 = my_strntoull10rnd_8bit(v20, v21, v14 - v21, v17, v16, v15);
*v16 = (*v16 - (_QWORD)v21) * *(unsigned int *)(v20 + 152) + v19;
return v13;
}
|
my_strntoull10rnd_mb2_or_mb4:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x190
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x118],RDI
MOV qword ptr [RBP + -0x120],RSI
MOV qword ptr [RBP + -0x128],RDX
MOV dword ptr [RBP + -0x12c],ECX
MOV qword ptr [RBP + -0x138],R8
MOV qword ptr [RBP + -0x140],R9
LEA RAX,[RBP + -0x110]
MOV qword ptr [RBP + -0x148],RAX
MOV RAX,qword ptr [RBP + -0x120]
MOV qword ptr [RBP + -0x160],RAX
MOV RAX,qword ptr [RBP + -0x118]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x170],RAX
CMP qword ptr [RBP + -0x128],0x100
JC 0x001b91fe
MOV qword ptr [RBP + -0x128],0xff
LAB_001b91fe:
MOV RAX,qword ptr [RBP + -0x160]
ADD RAX,qword ptr [RBP + -0x128]
MOV qword ptr [RBP + -0x158],RAX
LAB_001b9213:
MOV RAX,qword ptr [RBP + -0x170]
MOV RDI,qword ptr [RBP + -0x118]
MOV RDX,qword ptr [RBP + -0x160]
MOV RCX,qword ptr [RBP + -0x158]
LEA RSI,[RBP + -0x168]
CALL RAX
MOV dword ptr [RBP + -0x174],EAX
CMP EAX,0x0
JLE 0x001b9298
MOV ECX,dword ptr [RBP + -0x174]
MOV RAX,qword ptr [RBP + -0x160]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x160],RAX
CMP qword ptr [RBP + -0x168],0x65
JA 0x001b9271
CMP qword ptr [RBP + -0x168],0x0
JNZ 0x001b9273
LAB_001b9271:
JMP 0x001b9298
LAB_001b9273:
MOV RAX,qword ptr [RBP + -0x168]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x148]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x148],RDX
MOV byte ptr [RAX],CL
JMP 0x001b9213
LAB_001b9298:
MOV RDI,qword ptr [RBP + -0x118]
MOV RDX,qword ptr [RBP + -0x148]
LEA RSI,[RBP + -0x110]
MOV qword ptr [RBP + -0x188],RSI
SUB RDX,RSI
MOV ECX,dword ptr [RBP + -0x12c]
MOV R8,qword ptr [RBP + -0x138]
MOV R9,qword ptr [RBP + -0x140]
CALL 0x001a3b10
MOV RDI,qword ptr [RBP + -0x188]
MOV qword ptr [RBP + -0x150],RAX
MOV RCX,qword ptr [RBP + -0x120]
MOV RAX,qword ptr [RBP + -0x118]
MOV EAX,dword ptr [RAX + 0x98]
MOV EDX,EAX
MOV RAX,qword ptr [RBP + -0x138]
MOV RSI,qword ptr [RAX]
SUB RSI,RDI
IMUL RDX,RSI
ADD RCX,RDX
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x150]
MOV qword ptr [RBP + -0x180],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001b933b
MOV RAX,qword ptr [RBP + -0x180]
ADD RSP,0x190
POP RBP
RET
LAB_001b933b:
CALL 0x001283b0
|
int8
my_strntoull10rnd_mb2_or_mb4
(long param_1,long param_2,ulong param_3,int4 param_4,long *param_5,
int8 param_6)
{
code *pcVar1;
int iVar2;
long in_FS_OFFSET;
ulong local_170;
long local_168;
long local_160;
int8 local_158;
int1 *local_150;
int8 local_148;
long *local_140;
int4 local_134;
ulong local_130;
long local_128;
long local_120;
int1 local_118 [264];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28);
local_130 = param_3;
if (0xff < param_3) {
local_130 = 0xff;
}
local_160 = param_2 + local_130;
local_168 = param_2;
local_150 = local_118;
local_148 = param_6;
local_140 = param_5;
local_134 = param_4;
local_128 = param_2;
local_120 = param_1;
while (((iVar2 = (*pcVar1)(local_120,&local_170,local_168,local_160), 0 < iVar2 &&
(local_168 = local_168 + iVar2, local_170 < 0x66)) && (local_170 != 0))) {
*local_150 = (char)local_170;
local_150 = local_150 + 1;
}
local_158 = my_strntoull10rnd_8bit
(local_120,local_118,(long)local_150 - (long)local_118,local_134,local_140,
local_148);
*local_140 = local_128 + (ulong)*(uint *)(local_120 + 0x98) * (*local_140 - (long)local_118);
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_158;
}
|
|
57,547
|
string_view::operator==(string_view const&) const
|
monkey531[P]llama/common/json-schema-to-grammar.cpp
|
bool operator==(const string_view & other) const {
std::string this_str = *this;
std::string other_str = other;
return this_str == other_str;
}
|
O1
|
cpp
|
string_view::operator==(string_view const&) const:
pushq %rbx
subq $0x40, %rsp
movq %rsi, %rbx
movq (%rdi), %rsi
movq 0x8(%rdi), %rdx
movq 0x10(%rdi), %rcx
subq %rdx, %rcx
movq %rsp, %rdi
callq 0x1b990
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq 0x10(%rbx), %rcx
subq %rdx, %rcx
leaq 0x20(%rsp), %rdi
callq 0x1b990
movq 0x8(%rsp), %rdx
cmpq 0x28(%rsp), %rdx
jne 0xd06bc
testq %rdx, %rdx
je 0xd06c0
movq 0x20(%rsp), %rsi
movq (%rsp), %rdi
callq 0x1b980
testl %eax, %eax
sete %bl
jmp 0xd06c2
xorl %ebx, %ebx
jmp 0xd06c2
movb $0x1, %bl
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xd06dd
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1b930
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xd06f8
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1b930
movl %ebx, %eax
addq $0x40, %rsp
popq %rbx
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xd071e
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1b930
movq %rbx, %rdi
callq 0x1c0d0
|
_ZNK11string_vieweqERKS_:
push rbx
sub rsp, 40h
mov rbx, rsi
mov rsi, [rdi]
mov rdx, [rdi+8]
mov rcx, [rdi+10h]
sub rcx, rdx
mov rdi, rsp
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
mov rsi, [rbx]
mov rdx, [rbx+8]
mov rcx, [rbx+10h]
sub rcx, rdx
lea rdi, [rsp+48h+var_28]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
mov rdx, [rsp+48h+var_40]
cmp rdx, [rsp+48h+var_20]
jnz short loc_D06BC
test rdx, rdx
jz short loc_D06C0
mov rsi, [rsp+48h+var_28]
mov rdi, [rsp+48h+var_48]
call _bcmp
test eax, eax
setz bl
jmp short loc_D06C2
loc_D06BC:
xor ebx, ebx
jmp short loc_D06C2
loc_D06C0:
mov bl, 1
loc_D06C2:
lea rax, [rsp+48h+var_18]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_D06DD
mov rsi, [rsp+48h+var_18]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_D06DD:
lea rax, [rsp+48h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_D06F8
mov rsi, [rsp+48h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_D06F8:
mov eax, ebx
add rsp, 40h
pop rbx
retn
mov rbx, rax
lea rax, [rsp+arg_8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_D071E
mov rsi, [rsp+arg_8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_D071E:
mov rdi, rbx
call __Unwind_Resume
|
long long string_view::operator==(_QWORD *a1, _QWORD *a2)
{
long long *v4; // [rsp+0h] [rbp-48h] BYREF
void *v5; // [rsp+8h] [rbp-40h]
long long v6; // [rsp+10h] [rbp-38h] BYREF
void *v7[2]; // [rsp+20h] [rbp-28h] BYREF
long long v8; // [rsp+30h] [rbp-18h] BYREF
std::string::substr(&v4, *a1, a1[1], a1[2] - a1[1]);
std::string::substr(v7, *a2, a2[1], a2[2] - a2[1]);
if ( v5 == v7[1] )
{
if ( v5 )
LOBYTE(a2) = (unsigned int)bcmp(v4, v7[0]) == 0;
else
LOBYTE(a2) = 1;
}
else
{
LODWORD(a2) = 0;
}
if ( v7[0] != &v8 )
operator delete(v7[0], v8 + 1);
if ( v4 != &v6 )
operator delete(v4, v6 + 1);
return (unsigned int)a2;
}
|
operator==:
PUSH RBX
SUB RSP,0x40
MOV RBX,RSI
MOV RSI,qword ptr [RDI]
MOV RDX,qword ptr [RDI + 0x8]
MOV RCX,qword ptr [RDI + 0x10]
SUB RCX,RDX
MOV RDI,RSP
CALL 0x0011b990
MOV RSI,qword ptr [RBX]
MOV RDX,qword ptr [RBX + 0x8]
MOV RCX,qword ptr [RBX + 0x10]
SUB RCX,RDX
LAB_001d068c:
LEA RDI,[RSP + 0x20]
CALL 0x0011b990
LAB_001d0696:
MOV RDX,qword ptr [RSP + 0x8]
CMP RDX,qword ptr [RSP + 0x28]
JNZ 0x001d06bc
TEST RDX,RDX
JZ 0x001d06c0
MOV RSI,qword ptr [RSP + 0x20]
MOV RDI,qword ptr [RSP]
CALL 0x0011b980
TEST EAX,EAX
SETZ BL
JMP 0x001d06c2
LAB_001d06bc:
XOR EBX,EBX
JMP 0x001d06c2
LAB_001d06c0:
MOV BL,0x1
LAB_001d06c2:
LEA RAX,[RSP + 0x30]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001d06dd
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
CALL 0x0011b930
LAB_001d06dd:
LEA RAX,[RSP + 0x10]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001d06f8
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x0011b930
LAB_001d06f8:
MOV EAX,EBX
ADD RSP,0x40
POP RBX
RET
|
/* string_view::TEMPNAMEPLACEHOLDERVALUE(string_view const&) const */
ulong __thiscall string_view::operator==(string_view *this,string_view *param_1)
{
int iVar1;
int7 uVar3;
ulong uVar2;
long *local_48;
size_t local_40;
long local_38 [2];
long *local_28;
size_t local_20;
long local_18 [2];
std::__cxx11::string::substr((ulong)&local_48,*(ulong *)this);
/* try { // try from 001d068c to 001d0695 has its CatchHandler @ 001d0700 */
std::__cxx11::string::substr((ulong)&local_28,*(ulong *)param_1);
if (local_40 == local_20) {
uVar3 = (int7)((ulong)param_1 >> 8);
if (local_40 == 0) {
uVar2 = CONCAT71(uVar3,1);
}
else {
iVar1 = bcmp(local_48,local_28,local_40);
uVar2 = CONCAT71(uVar3,iVar1 == 0);
}
}
else {
uVar2 = 0;
}
if (local_28 != local_18) {
operator_delete(local_28,local_18[0] + 1);
}
if (local_48 != local_38) {
operator_delete(local_48,local_38[0] + 1);
}
return uVar2 & 0xffffffff;
}
|
|
57,548
|
mlog_itertor_last
|
qoraal-tictactoe/build_O0/_deps/qoraal-src/src/common/mlog.c
|
void*
mlog_itertor_last (MLOG_TYPE_T log, uint16_t type)
{
if (!_memlog_started) return 0 ;
CBUFFER_QUEUE_T * queue ;
CBUFFER_ITEM_T* it = 0 ;
queue = get_cqueue (log) ;
if (queue) {
os_mutex_lock (&_mlog_mutex) ;
it = cqueue_back (queue) ;
while (it) {
if (! cqueue_validate_item(queue, it)) {
it = 0 ;
break ;
}
if (!type || ((((QORAAL_LOG_MSG_T *)it->data)->type) & type)) {
break ;
}
it = cqueue_forwards (queue, it) ;
}
os_mutex_unlock (&_mlog_mutex) ;
}
return (void*) it ;
}
|
O0
|
c
|
mlog_itertor_last:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %si, %ax
movl %edi, -0xc(%rbp)
movw %ax, -0xe(%rbp)
cmpw $0x0, 0x29a66(%rip) # 0x4f2e0
jne 0x25889
movq $0x0, -0x8(%rbp)
jmp 0x25923
movq $0x0, -0x20(%rbp)
movl -0xc(%rbp), %edi
callq 0x24d70
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x2591b
leaq 0x27355(%rip), %rdi # 0x4cc00
callq 0x1cd80
movq -0x18(%rbp), %rdi
callq 0x28500
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x2590f
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x285d0
cmpl $0x0, %eax
jne 0x258e0
movq $0x0, -0x20(%rbp)
jmp 0x2590f
cmpw $0x0, -0xe(%rbp)
je 0x258fa
movq -0x20(%rbp), %rax
movzwl 0x20(%rax), %eax
movzwl -0xe(%rbp), %ecx
andl %ecx, %eax
cmpl $0x0, %eax
je 0x258fc
jmp 0x2590f
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x28550
movq %rax, -0x20(%rbp)
jmp 0x258bd
leaq 0x272ea(%rip), %rdi # 0x4cc00
callq 0x1cdd0
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
|
mlog_itertor_last:
push rbp
mov rbp, rsp
sub rsp, 20h
mov ax, si
mov [rbp+var_C], edi
mov [rbp+var_E], ax
cmp cs:_memlog_started, 0
jnz short loc_25889
mov [rbp+var_8], 0
jmp loc_25923
loc_25889:
mov [rbp+var_20], 0
mov edi, [rbp+var_C]
call get_cqueue
mov [rbp+var_18], rax
cmp [rbp+var_18], 0
jz short loc_2591B
lea rdi, _mlog_mutex
call os_mutex_lock
mov rdi, [rbp+var_18]
call cqueue_back
mov [rbp+var_20], rax
loc_258BD:
cmp [rbp+var_20], 0
jz short loc_2590F
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
call cqueue_validate_item
cmp eax, 0
jnz short loc_258E0
mov [rbp+var_20], 0
jmp short loc_2590F
loc_258E0:
cmp [rbp+var_E], 0
jz short loc_258FA
mov rax, [rbp+var_20]
movzx eax, word ptr [rax+20h]
movzx ecx, [rbp+var_E]
and eax, ecx
cmp eax, 0
jz short loc_258FC
loc_258FA:
jmp short loc_2590F
loc_258FC:
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
call cqueue_forwards
mov [rbp+var_20], rax
jmp short loc_258BD
loc_2590F:
lea rdi, _mlog_mutex
call os_mutex_unlock
loc_2591B:
mov rax, [rbp+var_20]
mov [rbp+var_8], rax
loc_25923:
mov rax, [rbp+var_8]
add rsp, 20h
pop rbp
retn
|
long long mlog_itertor_last(int a1, unsigned __int16 a2)
{
long long i; // [rsp+0h] [rbp-20h]
long long cqueue; // [rsp+8h] [rbp-18h]
if ( !memlog_started )
return 0LL;
i = 0LL;
cqueue = get_cqueue(a1);
if ( cqueue )
{
os_mutex_lock(&mlog_mutex);
for ( i = cqueue_back(cqueue); i; i = cqueue_forwards(cqueue, i) )
{
if ( !(unsigned int)cqueue_validate_item(cqueue, i) )
{
i = 0LL;
break;
}
if ( !a2 || (a2 & *(_WORD *)(i + 32)) != 0 )
break;
}
os_mutex_unlock(&mlog_mutex);
}
return i;
}
|
mlog_itertor_last:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV AX,SI
MOV dword ptr [RBP + -0xc],EDI
MOV word ptr [RBP + -0xe],AX
CMP word ptr [0x0014f2e0],0x0
JNZ 0x00125889
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00125923
LAB_00125889:
MOV qword ptr [RBP + -0x20],0x0
MOV EDI,dword ptr [RBP + -0xc]
CALL 0x00124d70
MOV qword ptr [RBP + -0x18],RAX
CMP qword ptr [RBP + -0x18],0x0
JZ 0x0012591b
LEA RDI,[0x14cc00]
CALL 0x0011cd80
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00128500
MOV qword ptr [RBP + -0x20],RAX
LAB_001258bd:
CMP qword ptr [RBP + -0x20],0x0
JZ 0x0012590f
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x001285d0
CMP EAX,0x0
JNZ 0x001258e0
MOV qword ptr [RBP + -0x20],0x0
JMP 0x0012590f
LAB_001258e0:
CMP word ptr [RBP + -0xe],0x0
JZ 0x001258fa
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,word ptr [RAX + 0x20]
MOVZX ECX,word ptr [RBP + -0xe]
AND EAX,ECX
CMP EAX,0x0
JZ 0x001258fc
LAB_001258fa:
JMP 0x0012590f
LAB_001258fc:
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x00128550
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001258bd
LAB_0012590f:
LEA RDI,[0x14cc00]
CALL 0x0011cdd0
LAB_0012591b:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x8],RAX
LAB_00125923:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x20
POP RBP
RET
|
long mlog_itertor_last(int4 param_1,ushort param_2)
{
int iVar1;
long lVar2;
long local_28;
long local_10;
if (_memlog_started == 0) {
local_10 = 0;
}
else {
local_28 = 0;
lVar2 = get_cqueue(param_1);
if (lVar2 != 0) {
os_mutex_lock(&_mlog_mutex);
for (local_28 = cqueue_back(lVar2); local_28 != 0; local_28 = cqueue_forwards(lVar2,local_28))
{
iVar1 = cqueue_validate_item(lVar2,local_28);
if (iVar1 == 0) {
local_28 = 0;
break;
}
if ((param_2 == 0) || ((*(ushort *)(local_28 + 0x20) & param_2) != 0)) break;
}
os_mutex_unlock(&_mlog_mutex);
}
local_10 = local_28;
}
return local_10;
}
|
|
57,549
|
nglog::LogDestination::FlushLogFiles(int)
|
ng-log[P]ng-log/src/logging.cc
|
inline void LogDestination::FlushLogFiles(int min_severity) {
// Prevent any subtle race conditions by wrapping a mutex lock around
// all this stuff.
std::lock_guard<std::mutex> l{log_mutex};
for (int i = min_severity; i < NUM_SEVERITIES; i++) {
LogDestination* log = log_destination(static_cast<LogSeverity>(i));
if (log != nullptr) {
log->logger_->Flush();
}
}
}
|
O1
|
cpp
|
nglog::LogDestination::FlushLogFiles(int):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebx
leaq 0x2df5c(%rip), %rdi # 0x3ec58
callq 0x7800
testl %eax, %eax
jne 0x10d98
cmpl $0x3, %ebx
jg 0x10d7e
leaq 0x1ee8b(%rip), %r13 # 0x2fba0
leaq 0x8(%rsp), %r14
movl %ebx, %eax
leaq (,%rax,8), %r15
addq %r13, %r15
cmpq $0x0, (%r15)
jne 0x10d62
movl $0xd0, %edi
callq 0x7530
movq %rax, %r12
movq %rax, %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x977c
movq $0x0, 0x8(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x11c6c
movq %r14, %rdi
callq 0x107ac
movq (%r15), %rax
testq %rax, %rax
je 0x10d77
movq 0xc8(%rax), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
incl %ebx
cmpl $0x4, %ebx
jne 0x10d1a
leaq 0x2ded3(%rip), %rdi # 0x3ec58
callq 0x73e0
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movl %eax, %edi
callq 0x7350
movq %rax, %rbx
movl $0xd0, %esi
movq %r12, %rdi
callq 0x7540
jmp 0x10db4
movq %rax, %rbx
leaq 0x2de9d(%rip), %rdi # 0x3ec58
callq 0x73e0
movq %rbx, %rdi
callq 0x7970
|
_ZN5nglog14LogDestination13FlushLogFilesEi:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 10h
mov ebx, edi
lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex
call _pthread_mutex_lock
test eax, eax
jnz loc_10D98
cmp ebx, 3
jg short loc_10D7E
lea r13, _ZN5nglog14LogDestination17log_destinations_E; nglog::LogDestination::log_destinations_
lea r14, [rsp+38h+var_30]
loc_10D1A:
mov eax, ebx
lea r15, ds:0[rax*8]
add r15, r13
cmp qword ptr [r15], 0
jnz short loc_10D62
mov edi, 0D0h; unsigned __int64
call __Znwm; operator new(ulong)
mov r12, rax
mov rdi, rax
mov esi, ebx
xor edx, edx
call _ZN5nglog14LogDestinationC2ENS_11LogSeverityEPKc; nglog::LogDestination::LogDestination(nglog::LogSeverity,char const*)
mov [rsp+38h+var_30], 0
mov rdi, r15
mov rsi, r12
call _ZNSt15__uniq_ptr_implIN5nglog14LogDestinationESt14default_deleteIS1_EE5resetEPS1_; std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset(nglog::LogDestination*)
mov rdi, r14
call _ZNSt10unique_ptrIN5nglog14LogDestinationESt14default_deleteIS1_EED2Ev; std::unique_ptr<nglog::LogDestination>::~unique_ptr()
loc_10D62:
mov rax, [r15]
test rax, rax
jz short loc_10D77
mov rdi, [rax+0C8h]
mov rax, [rdi]
call qword ptr [rax+18h]
loc_10D77:
inc ebx
cmp ebx, 4
jnz short loc_10D1A
loc_10D7E:
lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex
call _pthread_mutex_unlock
add rsp, 10h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_10D98:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
mov rbx, rax
mov esi, 0D0h; unsigned __int64
mov rdi, r12; void *
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_10DB4
mov rbx, rax
loc_10DB4:
lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex
call _pthread_mutex_unlock
mov rdi, rbx
call __Unwind_Resume
|
long long nglog::LogDestination::FlushLogFiles(nglog::LogDestination *this)
{
unsigned int v1; // ebx
int v2; // eax
char *v3; // r15
long long v4; // r12
nglog::LogDestination *v6; // [rsp+8h] [rbp-30h] BYREF
v1 = (unsigned int)this;
v2 = pthread_mutex_lock(&nglog::log_mutex);
if ( v2 )
std::__throw_system_error(v2);
if ( (int)this <= 3 )
{
do
{
v3 = (char *)&nglog::LogDestination::log_destinations_ + 8 * v1;
if ( !*(_QWORD *)v3 )
{
v4 = operator new(0xD0uLL);
nglog::LogDestination::LogDestination(v4, v1, 0LL);
v6 = 0LL;
std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset(
(char *)&nglog::LogDestination::log_destinations_ + 8 * v1,
v4);
std::unique_ptr<nglog::LogDestination>::~unique_ptr(&v6);
}
if ( *(_QWORD *)v3 )
(*(void ( **)(_QWORD))(**(_QWORD **)(*(_QWORD *)v3 + 200LL) + 24LL))(*(_QWORD *)(*(_QWORD *)v3 + 200LL));
++v1;
}
while ( v1 != 4 );
}
return pthread_mutex_unlock(&nglog::log_mutex);
}
|
FlushLogFiles:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV EBX,EDI
LEA RDI,[0x13ec58]
CALL 0x00107800
TEST EAX,EAX
JNZ 0x00110d98
CMP EBX,0x3
JG 0x00110d7e
LEA R13,[0x12fba0]
LEA R14,[RSP + 0x8]
LAB_00110d1a:
MOV EAX,EBX
LEA R15,[RAX*0x8]
ADD R15,R13
CMP qword ptr [R15],0x0
JNZ 0x00110d62
LAB_00110d2d:
MOV EDI,0xd0
CALL 0x00107530
LAB_00110d37:
MOV R12,RAX
MOV RDI,RAX
MOV ESI,EBX
XOR EDX,EDX
CALL 0x0010977c
MOV qword ptr [RSP + 0x8],0x0
MOV RDI,R15
MOV RSI,R12
CALL 0x00111c6c
MOV RDI,R14
CALL 0x001107ac
LAB_00110d62:
MOV RAX,qword ptr [R15]
TEST RAX,RAX
JZ 0x00110d77
MOV RDI,qword ptr [RAX + 0xc8]
MOV RAX,qword ptr [RDI]
LAB_00110d74:
CALL qword ptr [RAX + 0x18]
LAB_00110d77:
INC EBX
CMP EBX,0x4
JNZ 0x00110d1a
LAB_00110d7e:
LEA RDI,[0x13ec58]
CALL 0x001073e0
ADD RSP,0x10
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
LAB_00110d98:
MOV EDI,EAX
CALL 0x00107350
|
/* nglog::LogDestination::FlushLogFiles(int) */
void nglog::LogDestination::FlushLogFiles(int param_1)
{
int iVar1;
LogDestination *pLVar2;
uint uVar3;
__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>> *this;
int8 local_30;
ulong uVar4;
uVar4 = (ulong)(uint)param_1;
iVar1 = pthread_mutex_lock((pthread_mutex_t *)log_mutex);
if (iVar1 == 0) {
if (param_1 < 4) {
do {
this = (__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>> *)
(&log_destinations_ + uVar4);
if (*(long *)this == 0) {
/* try { // try from 00110d2d to 00110d36 has its CatchHandler @ 00110db1 */
pLVar2 = (LogDestination *)operator_new(0xd0);
/* try { // try from 00110d37 to 00110d45 has its CatchHandler @ 00110d9f */
LogDestination(pLVar2,uVar4,0);
local_30 = 0;
std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::
reset(this,pLVar2);
std::unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::
~unique_ptr((unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>>
*)&local_30);
}
if (*(long *)this != 0) {
/* try { // try from 00110d74 to 00110d76 has its CatchHandler @ 00110db1 */
(**(code **)(**(long **)(*(long *)this + 200) + 0x18))();
}
uVar3 = (int)uVar4 + 1;
uVar4 = (ulong)uVar3;
} while (uVar3 != 4);
}
pthread_mutex_unlock((pthread_mutex_t *)log_mutex);
return;
}
/* WARNING: Subroutine does not return */
std::__throw_system_error(iVar1);
}
|
|
57,550
|
Settings::clearAllShots()
|
666mxvbee[P]BattleShip/lib/Settings/Settings.cpp
|
void Settings::clearAllShots() {
std::lock_guard<std::mutex> lock(settings_mutex);
for (auto& ship : masterShips) {
std::fill(ship.hits.begin(), ship.hits.end(), false);
}
for (auto& ship : slaveShips) {
std::fill(ship.hits.begin(), ship.hits.end(), false);
}
}
|
O1
|
cpp
|
Settings::clearAllShots():
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
callq 0x5520
testl %eax, %eax
jne 0x732c
movq 0x90(%rbx), %r14
movq 0x98(%rbx), %r15
cmpq %r15, %r14
je 0x72c6
movq 0x18(%r14), %rdi
movq 0x28(%r14), %r12
movl 0x30(%r14), %ebp
cmpq %r12, %rdi
je 0x72a3
movq %r12, %rdx
subq %rdi, %rdx
xorl %esi, %esi
callq 0x51e0
jmp 0x72a6
movq %rdi, %r12
testl %ebp, %ebp
je 0x72c0
negb %bpl
movq $-0x1, %rax
movl %ebp, %ecx
shrq %cl, %rax
notq %rax
andq %rax, (%r12)
addq $0x40, %r14
jmp 0x727e
movq 0xa8(%rbx), %r14
movq 0xb0(%rbx), %r15
cmpq %r15, %r14
je 0x731c
movq 0x18(%r14), %rdi
movq 0x28(%r14), %r12
movl 0x30(%r14), %ebp
cmpq %r12, %rdi
je 0x72f9
movq %r12, %rdx
subq %rdi, %rdx
xorl %esi, %esi
callq 0x51e0
jmp 0x72fc
movq %rdi, %r12
testl %ebp, %ebp
je 0x7316
negb %bpl
movq $-0x1, %rax
movl %ebp, %ecx
shrq %cl, %rax
notq %rax
andq %rax, (%r12)
addq $0x40, %r14
jmp 0x72d4
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x52f0
movl %eax, %edi
callq 0x5260
nop
|
_ZN8Settings13clearAllShotsEv:
push rbp
push r15
push r14
push r12
push rbx
mov rbx, rdi
call _pthread_mutex_lock
test eax, eax
jnz loc_732C
mov r14, [rbx+90h]
mov r15, [rbx+98h]
loc_727E:
cmp r14, r15
jz short loc_72C6
mov rdi, [r14+18h]
mov r12, [r14+28h]
mov ebp, [r14+30h]
cmp rdi, r12
jz short loc_72A3
mov rdx, r12
sub rdx, rdi
xor esi, esi
call _memset
jmp short loc_72A6
loc_72A3:
mov r12, rdi
loc_72A6:
test ebp, ebp
jz short loc_72C0
neg bpl
mov rax, 0FFFFFFFFFFFFFFFFh
mov ecx, ebp
shr rax, cl
not rax
and [r12], rax
loc_72C0:
add r14, 40h ; '@'
jmp short loc_727E
loc_72C6:
mov r14, [rbx+0A8h]
mov r15, [rbx+0B0h]
loc_72D4:
cmp r14, r15
jz short loc_731C
mov rdi, [r14+18h]
mov r12, [r14+28h]
mov ebp, [r14+30h]
cmp rdi, r12
jz short loc_72F9
mov rdx, r12
sub rdx, rdi
xor esi, esi
call _memset
jmp short loc_72FC
loc_72F9:
mov r12, rdi
loc_72FC:
test ebp, ebp
jz short loc_7316
neg bpl
mov rax, 0FFFFFFFFFFFFFFFFh
mov ecx, ebp
shr rax, cl
not rax
and [r12], rax
loc_7316:
add r14, 40h ; '@'
jmp short loc_72D4
loc_731C:
mov rdi, rbx
pop rbx
pop r12
pop r14
pop r15
pop rbp
jmp _pthread_mutex_unlock
loc_732C:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
|
long long Settings::clearAllShots(Settings *this)
{
int v2; // eax
long long v3; // r14
long long v4; // r15
char *v5; // rdi
char *v6; // r12
int v7; // ebp
long long v8; // r14
long long v9; // r15
char *v10; // rdi
char *v11; // r12
int v12; // ebp
v2 = pthread_mutex_lock(this);
if ( v2 )
std::__throw_system_error(v2);
v3 = *((_QWORD *)this + 18);
v4 = *((_QWORD *)this + 19);
while ( v3 != v4 )
{
v5 = *(char **)(v3 + 24);
v6 = *(char **)(v3 + 40);
v7 = *(_DWORD *)(v3 + 48);
if ( v5 == v6 )
v6 = *(char **)(v3 + 24);
else
memset(v5, 0LL, v6 - v5);
if ( v7 )
*(_QWORD *)v6 &= ~(0xFFFFFFFFFFFFFFFFLL >> -(char)v7);
v3 += 64LL;
}
v8 = *((_QWORD *)this + 21);
v9 = *((_QWORD *)this + 22);
while ( v8 != v9 )
{
v10 = *(char **)(v8 + 24);
v11 = *(char **)(v8 + 40);
v12 = *(_DWORD *)(v8 + 48);
if ( v10 == v11 )
v11 = *(char **)(v8 + 24);
else
memset(v10, 0LL, v11 - v10);
if ( v12 )
*(_QWORD *)v11 &= ~(0xFFFFFFFFFFFFFFFFLL >> -(char)v12);
v8 += 64LL;
}
return pthread_mutex_unlock(this);
}
|
clearAllShots:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,RDI
CALL 0x00105520
TEST EAX,EAX
JNZ 0x0010732c
MOV R14,qword ptr [RBX + 0x90]
MOV R15,qword ptr [RBX + 0x98]
LAB_0010727e:
CMP R14,R15
JZ 0x001072c6
MOV RDI,qword ptr [R14 + 0x18]
MOV R12,qword ptr [R14 + 0x28]
MOV EBP,dword ptr [R14 + 0x30]
CMP RDI,R12
JZ 0x001072a3
MOV RDX,R12
SUB RDX,RDI
XOR ESI,ESI
CALL 0x001051e0
JMP 0x001072a6
LAB_001072a3:
MOV R12,RDI
LAB_001072a6:
TEST EBP,EBP
JZ 0x001072c0
NEG BPL
MOV RAX,-0x1
MOV ECX,EBP
SHR RAX,CL
NOT RAX
AND qword ptr [R12],RAX
LAB_001072c0:
ADD R14,0x40
JMP 0x0010727e
LAB_001072c6:
MOV R14,qword ptr [RBX + 0xa8]
MOV R15,qword ptr [RBX + 0xb0]
LAB_001072d4:
CMP R14,R15
JZ 0x0010731c
MOV RDI,qword ptr [R14 + 0x18]
MOV R12,qword ptr [R14 + 0x28]
MOV EBP,dword ptr [R14 + 0x30]
CMP RDI,R12
JZ 0x001072f9
MOV RDX,R12
SUB RDX,RDI
XOR ESI,ESI
CALL 0x001051e0
JMP 0x001072fc
LAB_001072f9:
MOV R12,RDI
LAB_001072fc:
TEST EBP,EBP
JZ 0x00107316
NEG BPL
MOV RAX,-0x1
MOV ECX,EBP
SHR RAX,CL
NOT RAX
AND qword ptr [R12],RAX
LAB_00107316:
ADD R14,0x40
JMP 0x001072d4
LAB_0010731c:
MOV RDI,RBX
POP RBX
POP R12
POP R14
POP R15
POP RBP
JMP 0x001052f0
LAB_0010732c:
MOV EDI,EAX
CALL 0x00105260
|
/* Settings::clearAllShots() */
void __thiscall Settings::clearAllShots(Settings *this)
{
long lVar1;
ulong *puVar2;
int iVar3;
ulong *puVar4;
long lVar5;
iVar3 = pthread_mutex_lock((pthread_mutex_t *)this);
if (iVar3 != 0) {
/* WARNING: Subroutine does not return */
std::__throw_system_error(iVar3);
}
lVar1 = *(long *)(this + 0x98);
for (lVar5 = *(long *)(this + 0x90); lVar5 != lVar1; lVar5 = lVar5 + 0x40) {
puVar4 = *(ulong **)(lVar5 + 0x18);
puVar2 = *(ulong **)(lVar5 + 0x28);
iVar3 = *(int *)(lVar5 + 0x30);
if (puVar4 != puVar2) {
memset(puVar4,0,(long)puVar2 - (long)puVar4);
puVar4 = puVar2;
}
if (iVar3 != 0) {
*puVar4 = *puVar4 & ~(0xffffffffffffffffU >> (-(char)iVar3 & 0x3fU));
}
}
lVar1 = *(long *)(this + 0xb0);
for (lVar5 = *(long *)(this + 0xa8); lVar5 != lVar1; lVar5 = lVar5 + 0x40) {
puVar4 = *(ulong **)(lVar5 + 0x18);
puVar2 = *(ulong **)(lVar5 + 0x28);
iVar3 = *(int *)(lVar5 + 0x30);
if (puVar4 != puVar2) {
memset(puVar4,0,(long)puVar2 - (long)puVar4);
puVar4 = puVar2;
}
if (iVar3 != 0) {
*puVar4 = *puVar4 & ~(0xffffffffffffffffU >> (-(char)iVar3 & 0x3fU));
}
}
pthread_mutex_unlock((pthread_mutex_t *)this);
return;
}
|
|
57,551
|
Settings::clearAllShots()
|
666mxvbee[P]BattleShip/lib/Settings/Settings.cpp
|
void Settings::clearAllShots() {
std::lock_guard<std::mutex> lock(settings_mutex);
for (auto& ship : masterShips) {
std::fill(ship.hits.begin(), ship.hits.end(), false);
}
for (auto& ship : slaveShips) {
std::fill(ship.hits.begin(), ship.hits.end(), false);
}
}
|
O2
|
cpp
|
Settings::clearAllShots():
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x6d3c
movq 0x90(%rbx), %r15
movq 0x98(%rbx), %r12
leaq 0x7(%rsp), %r14
cmpq %r12, %r15
je 0x69cf
movq 0x18(%r15), %rdi
movq 0x28(%r15), %rdx
movl 0x30(%r15), %ecx
movb $0x0, 0x7(%rsp)
xorl %esi, %esi
movq %r14, %r8
callq 0x6c84
addq $0x40, %r15
jmp 0x69a9
movq 0xa8(%rbx), %r15
movq 0xb0(%rbx), %r12
leaq 0x6(%rsp), %r14
cmpq %r12, %r15
je 0x6a08
movq 0x18(%r15), %rdi
movq 0x28(%r15), %rdx
movl 0x30(%r15), %ecx
movb $0x0, 0x6(%rsp)
xorl %esi, %esi
movq %r14, %r8
callq 0x6c84
addq $0x40, %r15
jmp 0x69e2
movq %rbx, %rdi
callq 0x52e0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x6a1e
movq %rax, %r14
movq %rbx, %rdi
callq 0x52e0
movq %r14, %rdi
callq 0x55b0
nop
|
_ZN8Settings13clearAllShotsEv:
push r15
push r14
push r12
push rbx
push rax
mov rbx, rdi
call _ZNSt5mutex4lockEv; std::mutex::lock(void)
mov r15, [rbx+90h]
mov r12, [rbx+98h]
lea r14, [rsp+28h+var_21]
loc_69A9:
cmp r15, r12
jz short loc_69CF
mov rdi, [r15+18h]
mov rdx, [r15+28h]
mov ecx, [r15+30h]
mov [rsp+28h+var_21], 0
xor esi, esi
mov r8, r14
call _ZSt9__fill_a1St13_Bit_iteratorS_RKb; std::__fill_a1(std::_Bit_iterator,std::_Bit_iterator,bool const&)
add r15, 40h ; '@'
jmp short loc_69A9
loc_69CF:
mov r15, [rbx+0A8h]
mov r12, [rbx+0B0h]
lea r14, [rsp+28h+var_22]
loc_69E2:
cmp r15, r12
jz short loc_6A08
mov rdi, [r15+18h]
mov rdx, [r15+28h]
mov ecx, [r15+30h]
mov [rsp+28h+var_22], 0
xor esi, esi
mov r8, r14
call _ZSt9__fill_a1St13_Bit_iteratorS_RKb; std::__fill_a1(std::_Bit_iterator,std::_Bit_iterator,bool const&)
add r15, 40h ; '@'
jmp short loc_69E2
loc_6A08:
mov rdi, rbx
call _pthread_mutex_unlock
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
jmp short $+2
loc_6A1E:
mov r14, rax
mov rdi, rbx
call _pthread_mutex_unlock
mov rdi, r14
call __Unwind_Resume
|
long long Settings::clearAllShots(Settings *this)
{
long long v1; // rax
long long v3; // r15
long long v4; // r12
long long v5; // rdi
long long v6; // rdx
long long v7; // rcx
long long v8; // r15
long long v9; // r12
long long v10; // rdi
long long v11; // rdx
long long v12; // rcx
_WORD v14[17]; // [rsp+0h] [rbp-22h] BYREF
v14[0] = HIWORD(v1);
std::mutex::lock(this);
v3 = *((_QWORD *)this + 18);
v4 = *((_QWORD *)this + 19);
while ( v3 != v4 )
{
v5 = *(_QWORD *)(v3 + 24);
v6 = *(_QWORD *)(v3 + 40);
v7 = *(unsigned int *)(v3 + 48);
HIBYTE(v14[0]) = 0;
std::__fill_a1(v5, 0LL, v6, v7, (char *)v14 + 1);
v3 += 64LL;
}
v8 = *((_QWORD *)this + 21);
v9 = *((_QWORD *)this + 22);
while ( v8 != v9 )
{
v10 = *(_QWORD *)(v8 + 24);
v11 = *(_QWORD *)(v8 + 40);
v12 = *(unsigned int *)(v8 + 48);
LOBYTE(v14[0]) = 0;
std::__fill_a1(v10, 0LL, v11, v12, v14);
v8 += 64LL;
}
return pthread_mutex_unlock(this);
}
|
clearAllShots:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
CALL 0x00106d3c
MOV R15,qword ptr [RBX + 0x90]
MOV R12,qword ptr [RBX + 0x98]
LEA R14,[RSP + 0x7]
LAB_001069a9:
CMP R15,R12
JZ 0x001069cf
MOV RDI,qword ptr [R15 + 0x18]
MOV RDX,qword ptr [R15 + 0x28]
MOV ECX,dword ptr [R15 + 0x30]
MOV byte ptr [RSP + 0x7],0x0
LAB_001069bf:
XOR ESI,ESI
MOV R8,R14
CALL 0x00106c84
ADD R15,0x40
JMP 0x001069a9
LAB_001069cf:
MOV R15,qword ptr [RBX + 0xa8]
MOV R12,qword ptr [RBX + 0xb0]
LEA R14,[RSP + 0x6]
LAB_001069e2:
CMP R15,R12
JZ 0x00106a08
MOV RDI,qword ptr [R15 + 0x18]
MOV RDX,qword ptr [R15 + 0x28]
MOV ECX,dword ptr [R15 + 0x30]
MOV byte ptr [RSP + 0x6],0x0
LAB_001069f8:
XOR ESI,ESI
MOV R8,R14
CALL 0x00106c84
LAB_00106a02:
ADD R15,0x40
JMP 0x001069e2
LAB_00106a08:
MOV RDI,RBX
CALL 0x001052e0
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* Settings::clearAllShots() */
void __thiscall Settings::clearAllShots(Settings *this)
{
long lVar1;
int4 in_EAX;
int4 in_register_00000004;
int8 in_R9;
long lVar2;
ulong uVar3;
uVar3 = CONCAT44(in_register_00000004,in_EAX);
std::mutex::lock();
lVar1 = *(long *)(this + 0x98);
for (lVar2 = *(long *)(this + 0x90); lVar2 != lVar1; lVar2 = lVar2 + 0x40) {
uVar3 = uVar3 & 0xffffffffffffff;
/* try { // try from 001069bf to 001069c8 has its CatchHandler @ 00106a1e */
std::__fill_a1(*(int8 *)(lVar2 + 0x18),0,*(int8 *)(lVar2 + 0x28),
*(int4 *)(lVar2 + 0x30),&stack0xffffffffffffffdf,in_R9,uVar3);
}
lVar1 = *(long *)(this + 0xb0);
for (lVar2 = *(long *)(this + 0xa8); lVar2 != lVar1; lVar2 = lVar2 + 0x40) {
/* try { // try from 001069f8 to 00106a01 has its CatchHandler @ 00106a1c */
std::__fill_a1(*(int8 *)(lVar2 + 0x18),0,*(int8 *)(lVar2 + 0x28),
*(int4 *)(lVar2 + 0x30),&stack0xffffffffffffffde);
}
pthread_mutex_unlock((pthread_mutex_t *)this);
return;
}
|
|
57,552
|
Settings::clearAllShots()
|
666mxvbee[P]BattleShip/lib/Settings/Settings.cpp
|
void Settings::clearAllShots() {
std::lock_guard<std::mutex> lock(settings_mutex);
for (auto& ship : masterShips) {
std::fill(ship.hits.begin(), ship.hits.end(), false);
}
for (auto& ship : slaveShips) {
std::fill(ship.hits.begin(), ship.hits.end(), false);
}
}
|
O3
|
cpp
|
Settings::clearAllShots():
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
callq 0x5520
testl %eax, %eax
jne 0x72d8
movq 0x90(%rbx), %r14
movq 0x98(%rbx), %r15
cmpq %r15, %r14
je 0x7272
movq 0x18(%r14), %rdi
movq 0x28(%r14), %r12
movl 0x30(%r14), %ebp
cmpq %r12, %rdi
je 0x724f
movq %r12, %rdx
subq %rdi, %rdx
xorl %esi, %esi
callq 0x51e0
jmp 0x7252
movq %rdi, %r12
testl %ebp, %ebp
je 0x726c
negb %bpl
movq $-0x1, %rax
movl %ebp, %ecx
shrq %cl, %rax
notq %rax
andq %rax, (%r12)
addq $0x40, %r14
jmp 0x722a
movq 0xa8(%rbx), %r14
movq 0xb0(%rbx), %r15
cmpq %r15, %r14
je 0x72c8
movq 0x18(%r14), %rdi
movq 0x28(%r14), %r12
movl 0x30(%r14), %ebp
cmpq %r12, %rdi
je 0x72a5
movq %r12, %rdx
subq %rdi, %rdx
xorl %esi, %esi
callq 0x51e0
jmp 0x72a8
movq %rdi, %r12
testl %ebp, %ebp
je 0x72c2
negb %bpl
movq $-0x1, %rax
movl %ebp, %ecx
shrq %cl, %rax
notq %rax
andq %rax, (%r12)
addq $0x40, %r14
jmp 0x7280
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x52f0
movl %eax, %edi
callq 0x5260
nop
|
_ZN8Settings13clearAllShotsEv:
push rbp
push r15
push r14
push r12
push rbx
mov rbx, rdi
call _pthread_mutex_lock
test eax, eax
jnz loc_72D8
mov r14, [rbx+90h]
mov r15, [rbx+98h]
loc_722A:
cmp r14, r15
jz short loc_7272
mov rdi, [r14+18h]
mov r12, [r14+28h]
mov ebp, [r14+30h]
cmp rdi, r12
jz short loc_724F
mov rdx, r12
sub rdx, rdi
xor esi, esi
call _memset
jmp short loc_7252
loc_724F:
mov r12, rdi
loc_7252:
test ebp, ebp
jz short loc_726C
neg bpl
mov rax, 0FFFFFFFFFFFFFFFFh
mov ecx, ebp
shr rax, cl
not rax
and [r12], rax
loc_726C:
add r14, 40h ; '@'
jmp short loc_722A
loc_7272:
mov r14, [rbx+0A8h]
mov r15, [rbx+0B0h]
loc_7280:
cmp r14, r15
jz short loc_72C8
mov rdi, [r14+18h]
mov r12, [r14+28h]
mov ebp, [r14+30h]
cmp rdi, r12
jz short loc_72A5
mov rdx, r12
sub rdx, rdi
xor esi, esi
call _memset
jmp short loc_72A8
loc_72A5:
mov r12, rdi
loc_72A8:
test ebp, ebp
jz short loc_72C2
neg bpl
mov rax, 0FFFFFFFFFFFFFFFFh
mov ecx, ebp
shr rax, cl
not rax
and [r12], rax
loc_72C2:
add r14, 40h ; '@'
jmp short loc_7280
loc_72C8:
mov rdi, rbx
pop rbx
pop r12
pop r14
pop r15
pop rbp
jmp _pthread_mutex_unlock
loc_72D8:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
|
long long Settings::clearAllShots(Settings *this)
{
int v2; // eax
long long v3; // r14
long long v4; // r15
char *v5; // rdi
char *v6; // r12
int v7; // ebp
long long v8; // r14
long long v9; // r15
char *v10; // rdi
char *v11; // r12
int v12; // ebp
v2 = pthread_mutex_lock(this);
if ( v2 )
std::__throw_system_error(v2);
v3 = *((_QWORD *)this + 18);
v4 = *((_QWORD *)this + 19);
while ( v3 != v4 )
{
v5 = *(char **)(v3 + 24);
v6 = *(char **)(v3 + 40);
v7 = *(_DWORD *)(v3 + 48);
if ( v5 == v6 )
v6 = *(char **)(v3 + 24);
else
memset(v5, 0LL, v6 - v5);
if ( v7 )
*(_QWORD *)v6 &= ~(0xFFFFFFFFFFFFFFFFLL >> -(char)v7);
v3 += 64LL;
}
v8 = *((_QWORD *)this + 21);
v9 = *((_QWORD *)this + 22);
while ( v8 != v9 )
{
v10 = *(char **)(v8 + 24);
v11 = *(char **)(v8 + 40);
v12 = *(_DWORD *)(v8 + 48);
if ( v10 == v11 )
v11 = *(char **)(v8 + 24);
else
memset(v10, 0LL, v11 - v10);
if ( v12 )
*(_QWORD *)v11 &= ~(0xFFFFFFFFFFFFFFFFLL >> -(char)v12);
v8 += 64LL;
}
return pthread_mutex_unlock(this);
}
|
clearAllShots:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,RDI
CALL 0x00105520
TEST EAX,EAX
JNZ 0x001072d8
MOV R14,qword ptr [RBX + 0x90]
MOV R15,qword ptr [RBX + 0x98]
LAB_0010722a:
CMP R14,R15
JZ 0x00107272
MOV RDI,qword ptr [R14 + 0x18]
MOV R12,qword ptr [R14 + 0x28]
MOV EBP,dword ptr [R14 + 0x30]
CMP RDI,R12
JZ 0x0010724f
MOV RDX,R12
SUB RDX,RDI
XOR ESI,ESI
CALL 0x001051e0
JMP 0x00107252
LAB_0010724f:
MOV R12,RDI
LAB_00107252:
TEST EBP,EBP
JZ 0x0010726c
NEG BPL
MOV RAX,-0x1
MOV ECX,EBP
SHR RAX,CL
NOT RAX
AND qword ptr [R12],RAX
LAB_0010726c:
ADD R14,0x40
JMP 0x0010722a
LAB_00107272:
MOV R14,qword ptr [RBX + 0xa8]
MOV R15,qword ptr [RBX + 0xb0]
LAB_00107280:
CMP R14,R15
JZ 0x001072c8
MOV RDI,qword ptr [R14 + 0x18]
MOV R12,qword ptr [R14 + 0x28]
MOV EBP,dword ptr [R14 + 0x30]
CMP RDI,R12
JZ 0x001072a5
MOV RDX,R12
SUB RDX,RDI
XOR ESI,ESI
CALL 0x001051e0
JMP 0x001072a8
LAB_001072a5:
MOV R12,RDI
LAB_001072a8:
TEST EBP,EBP
JZ 0x001072c2
NEG BPL
MOV RAX,-0x1
MOV ECX,EBP
SHR RAX,CL
NOT RAX
AND qword ptr [R12],RAX
LAB_001072c2:
ADD R14,0x40
JMP 0x00107280
LAB_001072c8:
MOV RDI,RBX
POP RBX
POP R12
POP R14
POP R15
POP RBP
JMP 0x001052f0
LAB_001072d8:
MOV EDI,EAX
CALL 0x00105260
|
/* Settings::clearAllShots() */
void __thiscall Settings::clearAllShots(Settings *this)
{
long lVar1;
ulong *puVar2;
int iVar3;
ulong *puVar4;
long lVar5;
iVar3 = pthread_mutex_lock((pthread_mutex_t *)this);
if (iVar3 != 0) {
/* WARNING: Subroutine does not return */
std::__throw_system_error(iVar3);
}
lVar1 = *(long *)(this + 0x98);
for (lVar5 = *(long *)(this + 0x90); lVar5 != lVar1; lVar5 = lVar5 + 0x40) {
puVar4 = *(ulong **)(lVar5 + 0x18);
puVar2 = *(ulong **)(lVar5 + 0x28);
iVar3 = *(int *)(lVar5 + 0x30);
if (puVar4 != puVar2) {
memset(puVar4,0,(long)puVar2 - (long)puVar4);
puVar4 = puVar2;
}
if (iVar3 != 0) {
*puVar4 = *puVar4 & ~(0xffffffffffffffffU >> (-(char)iVar3 & 0x3fU));
}
}
lVar1 = *(long *)(this + 0xb0);
for (lVar5 = *(long *)(this + 0xa8); lVar5 != lVar1; lVar5 = lVar5 + 0x40) {
puVar4 = *(ulong **)(lVar5 + 0x18);
puVar2 = *(ulong **)(lVar5 + 0x28);
iVar3 = *(int *)(lVar5 + 0x30);
if (puVar4 != puVar2) {
memset(puVar4,0,(long)puVar2 - (long)puVar4);
puVar4 = puVar2;
}
if (iVar3 != 0) {
*puVar4 = *puVar4 & ~(0xffffffffffffffffU >> (-(char)iVar3 & 0x3fU));
}
}
pthread_mutex_unlock((pthread_mutex_t *)this);
return;
}
|
|
57,553
|
ImageDrawRectangleRec
|
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtextures.c
|
void ImageDrawRectangleRec(Image *dst, Rectangle rec, Color color)
{
// Security check to avoid program crash
if ((dst->data == NULL) || (dst->width == 0) || (dst->height == 0)) return;
// Security check to avoid drawing out of bounds in case of bad user data
if (rec.x < 0) { rec.width += rec.x; rec.x = 0; }
if (rec.y < 0) { rec.height += rec.y; rec.y = 0; }
if (rec.width < 0) rec.width = 0;
if (rec.height < 0) rec.height = 0;
// Clamp the size the the image bounds
if ((rec.x + rec.width) >= dst->width) rec.width = dst->width - rec.x;
if ((rec.y + rec.height) >= dst->height) rec.height = dst->height - rec.y;
// Check if the rect is even inside the image
if ((rec.x >= dst->width) || (rec.y >= dst->height)) return;
if (((rec.x + rec.width) <= 0) || (rec.y + rec.height <= 0)) return;
int sy = (int)rec.y;
int sx = (int)rec.x;
int bytesPerPixel = GetPixelDataSize(1, 1, dst->format);
// Fill in the first pixel of the first row based on image format
ImageDrawPixel(dst, sx, sy, color);
int bytesOffset = ((sy*dst->width) + sx)*bytesPerPixel;
unsigned char *pSrcPixel = (unsigned char *)dst->data + bytesOffset;
// Repeat the first pixel data throughout the row
for (int x = 1; x < (int)rec.width; x++)
{
memcpy(pSrcPixel + x*bytesPerPixel, pSrcPixel, bytesPerPixel);
}
// Repeat the first row data for all other rows
int bytesPerRow = bytesPerPixel*(int)rec.width;
for (int y = 1; y < (int)rec.height; y++)
{
memcpy(pSrcPixel + (y*dst->width)*bytesPerPixel, pSrcPixel, bytesPerRow);
}
}
|
O0
|
c
|
ImageDrawRectangleRec:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movlpd %xmm0, -0x10(%rbp)
movlpd %xmm1, -0x8(%rbp)
movl %esi, -0x14(%rbp)
movq %rdi, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq $0x0, (%rax)
je 0x107df7
movq -0x20(%rbp), %rax
cmpl $0x0, 0x8(%rax)
je 0x107df7
movq -0x20(%rbp), %rax
cmpl $0x0, 0xc(%rax)
jne 0x107dfc
jmp 0x107ff3
xorps %xmm0, %xmm0
ucomiss -0x10(%rbp), %xmm0
jbe 0x107e1c
movss -0x10(%rbp), %xmm0
addss -0x8(%rbp), %xmm0
movss %xmm0, -0x8(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x10(%rbp)
xorps %xmm0, %xmm0
ucomiss -0xc(%rbp), %xmm0
jbe 0x107e3c
movss -0xc(%rbp), %xmm0
addss -0x4(%rbp), %xmm0
movss %xmm0, -0x4(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0xc(%rbp)
xorps %xmm0, %xmm0
ucomiss -0x8(%rbp), %xmm0
jbe 0x107e4d
xorps %xmm0, %xmm0
movss %xmm0, -0x8(%rbp)
xorps %xmm0, %xmm0
ucomiss -0x4(%rbp), %xmm0
jbe 0x107e5e
xorps %xmm0, %xmm0
movss %xmm0, -0x4(%rbp)
movss -0x10(%rbp), %xmm0
addss -0x8(%rbp), %xmm0
movq -0x20(%rbp), %rax
cvtsi2ssl 0x8(%rax), %xmm1
ucomiss %xmm1, %xmm0
jb 0x107e89
movq -0x20(%rbp), %rax
cvtsi2ssl 0x8(%rax), %xmm0
subss -0x10(%rbp), %xmm0
movss %xmm0, -0x8(%rbp)
movss -0xc(%rbp), %xmm0
addss -0x4(%rbp), %xmm0
movq -0x20(%rbp), %rax
cvtsi2ssl 0xc(%rax), %xmm1
ucomiss %xmm1, %xmm0
jb 0x107eb4
movq -0x20(%rbp), %rax
cvtsi2ssl 0xc(%rax), %xmm0
subss -0xc(%rbp), %xmm0
movss %xmm0, -0x4(%rbp)
movss -0x10(%rbp), %xmm0
movq -0x20(%rbp), %rax
cvtsi2ssl 0x8(%rax), %xmm1
ucomiss %xmm1, %xmm0
jae 0x107eda
movss -0xc(%rbp), %xmm0
movq -0x20(%rbp), %rax
cvtsi2ssl 0xc(%rax), %xmm1
ucomiss %xmm1, %xmm0
jb 0x107edf
jmp 0x107ff3
movss -0x10(%rbp), %xmm1
addss -0x8(%rbp), %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm1, %xmm0
jae 0x107f03
movss -0xc(%rbp), %xmm1
addss -0x4(%rbp), %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm1, %xmm0
jb 0x107f08
jmp 0x107ff3
cvttss2si -0xc(%rbp), %eax
movl %eax, -0x24(%rbp)
cvttss2si -0x10(%rbp), %eax
movl %eax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movl 0x14(%rax), %edx
movl $0x1, %esi
movl %esi, %edi
callq 0xfb840
movl %eax, -0x2c(%rbp)
movq -0x20(%rbp), %rdi
movl -0x28(%rbp), %esi
movl -0x24(%rbp), %edx
movl -0x14(%rbp), %ecx
callq 0x106af0
movl -0x24(%rbp), %eax
movq -0x20(%rbp), %rcx
imull 0x8(%rcx), %eax
addl -0x28(%rbp), %eax
imull -0x2c(%rbp), %eax
movl %eax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movslq -0x30(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movl $0x1, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cvttss2si -0x8(%rbp), %ecx
cmpl %ecx, %eax
jge 0x107fa2
movq -0x38(%rbp), %rdi
movl -0x3c(%rbp), %eax
imull -0x2c(%rbp), %eax
cltq
addq %rax, %rdi
movq -0x38(%rbp), %rsi
movslq -0x2c(%rbp), %rdx
callq 0xa400
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x107f6e
movl -0x2c(%rbp), %eax
cvttss2si -0x8(%rbp), %ecx
imull %ecx, %eax
movl %eax, -0x40(%rbp)
movl $0x1, -0x44(%rbp)
movl -0x44(%rbp), %eax
cvttss2si -0x4(%rbp), %ecx
cmpl %ecx, %eax
jge 0x107ff3
movq -0x38(%rbp), %rdi
movl -0x44(%rbp), %eax
movq -0x20(%rbp), %rcx
imull 0x8(%rcx), %eax
imull -0x2c(%rbp), %eax
cltq
addq %rax, %rdi
movq -0x38(%rbp), %rsi
movslq -0x40(%rbp), %rdx
callq 0xa400
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x107fb7
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
|
ImageDrawRectangleRec:
push rbp
mov rbp, rsp
sub rsp, 50h
movlpd [rbp+var_10], xmm0
movlpd [rbp+var_8], xmm1
mov [rbp+var_14], esi
mov [rbp+var_20], rdi
mov rax, [rbp+var_20]
cmp qword ptr [rax], 0
jz short loc_107DF7
mov rax, [rbp+var_20]
cmp dword ptr [rax+8], 0
jz short loc_107DF7
mov rax, [rbp+var_20]
cmp dword ptr [rax+0Ch], 0
jnz short loc_107DFC
loc_107DF7:
jmp loc_107FF3
loc_107DFC:
xorps xmm0, xmm0
ucomiss xmm0, dword ptr [rbp+var_10]
jbe short loc_107E1C
movss xmm0, dword ptr [rbp+var_10]
addss xmm0, dword ptr [rbp+var_8]
movss dword ptr [rbp+var_8], xmm0
xorps xmm0, xmm0
movss dword ptr [rbp+var_10], xmm0
loc_107E1C:
xorps xmm0, xmm0
ucomiss xmm0, dword ptr [rbp+var_10+4]
jbe short loc_107E3C
movss xmm0, dword ptr [rbp+var_10+4]
addss xmm0, dword ptr [rbp+var_8+4]
movss dword ptr [rbp+var_8+4], xmm0
xorps xmm0, xmm0
movss dword ptr [rbp+var_10+4], xmm0
loc_107E3C:
xorps xmm0, xmm0
ucomiss xmm0, dword ptr [rbp+var_8]
jbe short loc_107E4D
xorps xmm0, xmm0
movss dword ptr [rbp+var_8], xmm0
loc_107E4D:
xorps xmm0, xmm0
ucomiss xmm0, dword ptr [rbp+var_8+4]
jbe short loc_107E5E
xorps xmm0, xmm0
movss dword ptr [rbp+var_8+4], xmm0
loc_107E5E:
movss xmm0, dword ptr [rbp+var_10]
addss xmm0, dword ptr [rbp+var_8]
mov rax, [rbp+var_20]
cvtsi2ss xmm1, dword ptr [rax+8]
ucomiss xmm0, xmm1
jb short loc_107E89
mov rax, [rbp+var_20]
cvtsi2ss xmm0, dword ptr [rax+8]
subss xmm0, dword ptr [rbp+var_10]
movss dword ptr [rbp+var_8], xmm0
loc_107E89:
movss xmm0, dword ptr [rbp+var_10+4]
addss xmm0, dword ptr [rbp+var_8+4]
mov rax, [rbp+var_20]
cvtsi2ss xmm1, dword ptr [rax+0Ch]
ucomiss xmm0, xmm1
jb short loc_107EB4
mov rax, [rbp+var_20]
cvtsi2ss xmm0, dword ptr [rax+0Ch]
subss xmm0, dword ptr [rbp+var_10+4]
movss dword ptr [rbp+var_8+4], xmm0
loc_107EB4:
movss xmm0, dword ptr [rbp+var_10]
mov rax, [rbp+var_20]
cvtsi2ss xmm1, dword ptr [rax+8]
ucomiss xmm0, xmm1
jnb short loc_107EDA
movss xmm0, dword ptr [rbp+var_10+4]
mov rax, [rbp+var_20]
cvtsi2ss xmm1, dword ptr [rax+0Ch]
ucomiss xmm0, xmm1
jb short loc_107EDF
loc_107EDA:
jmp loc_107FF3
loc_107EDF:
movss xmm1, dword ptr [rbp+var_10]
addss xmm1, dword ptr [rbp+var_8]
xorps xmm0, xmm0
ucomiss xmm0, xmm1
jnb short loc_107F03
movss xmm1, dword ptr [rbp+var_10+4]
addss xmm1, dword ptr [rbp+var_8+4]
xorps xmm0, xmm0
ucomiss xmm0, xmm1
jb short loc_107F08
loc_107F03:
jmp loc_107FF3
loc_107F08:
cvttss2si eax, dword ptr [rbp+var_10+4]
mov [rbp+var_24], eax
cvttss2si eax, dword ptr [rbp+var_10]
mov [rbp+var_28], eax
mov rax, [rbp+var_20]
mov edx, [rax+14h]
mov esi, 1
mov edi, esi
call GetPixelDataSize
mov [rbp+var_2C], eax
mov rdi, [rbp+var_20]
mov esi, [rbp+var_28]
mov edx, [rbp+var_24]
mov ecx, [rbp+var_14]
call ImageDrawPixel
mov eax, [rbp+var_24]
mov rcx, [rbp+var_20]
imul eax, [rcx+8]
add eax, [rbp+var_28]
imul eax, [rbp+var_2C]
mov [rbp+var_30], eax
mov rax, [rbp+var_20]
mov rax, [rax]
movsxd rcx, [rbp+var_30]
add rax, rcx
mov [rbp+var_38], rax
mov [rbp+var_3C], 1
loc_107F6E:
mov eax, [rbp+var_3C]
cvttss2si ecx, dword ptr [rbp+var_8]
cmp eax, ecx
jge short loc_107FA2
mov rdi, [rbp+var_38]
mov eax, [rbp+var_3C]
imul eax, [rbp+var_2C]
cdqe
add rdi, rax
mov rsi, [rbp+var_38]
movsxd rdx, [rbp+var_2C]
call _memcpy
mov eax, [rbp+var_3C]
add eax, 1
mov [rbp+var_3C], eax
jmp short loc_107F6E
loc_107FA2:
mov eax, [rbp+var_2C]
cvttss2si ecx, dword ptr [rbp+var_8]
imul eax, ecx
mov [rbp+var_40], eax
mov [rbp+var_44], 1
loc_107FB7:
mov eax, [rbp+var_44]
cvttss2si ecx, dword ptr [rbp+var_8+4]
cmp eax, ecx
jge short loc_107FF3
mov rdi, [rbp+var_38]
mov eax, [rbp+var_44]
mov rcx, [rbp+var_20]
imul eax, [rcx+8]
imul eax, [rbp+var_2C]
cdqe
add rdi, rax
mov rsi, [rbp+var_38]
movsxd rdx, [rbp+var_40]
call _memcpy
mov eax, [rbp+var_44]
add eax, 1
mov [rbp+var_44], eax
jmp short loc_107FB7
loc_107FF3:
add rsp, 50h
pop rbp
retn
|
long long ImageDrawRectangleRec(long long a1, int a2, double a3, double a4)
{
long long result; // rax
int j; // [rsp+Ch] [rbp-44h]
int i; // [rsp+14h] [rbp-3Ch]
long long v7; // [rsp+18h] [rbp-38h]
int PixelDataSize; // [rsp+24h] [rbp-2Ch]
double v9; // [rsp+40h] [rbp-10h]
double v10; // [rsp+48h] [rbp-8h]
v9 = a3;
v10 = a4;
result = a1;
if ( *(_QWORD *)a1 )
{
result = a1;
if ( *(_DWORD *)(a1 + 8) )
{
result = a1;
if ( *(_DWORD *)(a1 + 12) )
{
if ( *(float *)&a3 < 0.0 )
{
*(float *)&v10 = *(float *)&a3 + *(float *)&a4;
LODWORD(v9) = 0;
}
if ( *((float *)&a3 + 1) < 0.0 )
{
*((float *)&v10 + 1) = *((float *)&a3 + 1) + *((float *)&a4 + 1);
HIDWORD(v9) = 0;
}
if ( *(float *)&v10 < 0.0 )
LODWORD(v10) = 0;
if ( *((float *)&v10 + 1) < 0.0 )
HIDWORD(v10) = 0;
if ( (float)(*(float *)&v9 + *(float *)&v10) >= (float)*(int *)(a1 + 8) )
*(float *)&v10 = (float)*(int *)(a1 + 8) - *(float *)&v9;
if ( (float)(*((float *)&v9 + 1) + *((float *)&v10 + 1)) >= (float)*(int *)(a1 + 12) )
*((float *)&v10 + 1) = (float)*(int *)(a1 + 12) - *((float *)&v9 + 1);
result = a1;
if ( *(float *)&v9 < (float)*(int *)(a1 + 8) )
{
result = a1;
if ( *((float *)&v9 + 1) < (float)*(int *)(a1 + 12)
&& (float)(*(float *)&v9 + *(float *)&v10) > 0.0
&& (float)(*((float *)&v9 + 1) + *((float *)&v10 + 1)) > 0.0 )
{
PixelDataSize = GetPixelDataSize(1, 1, *(_DWORD *)(a1 + 20));
ImageDrawPixel((long long *)a1, (int)*(float *)&v9, (int)*((float *)&v9 + 1), a2);
v7 = PixelDataSize * ((int)*(float *)&v9 + *(_DWORD *)(a1 + 8) * (int)*((float *)&v9 + 1)) + *(_QWORD *)a1;
for ( i = 1; i < (int)*(float *)&v10; ++i )
memcpy(PixelDataSize * i + v7, v7, PixelDataSize);
for ( j = 1; ; ++j )
{
result = (unsigned int)j;
if ( j >= (int)*((float *)&v10 + 1) )
break;
memcpy(PixelDataSize * *(_DWORD *)(a1 + 8) * j + v7, v7, (int)*(float *)&v10 * PixelDataSize);
}
}
}
}
}
}
return result;
}
| |||
57,554
|
ImageDrawRectangleRec
|
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtextures.c
|
void ImageDrawRectangleRec(Image *dst, Rectangle rec, Color color)
{
// Security check to avoid program crash
if ((dst->data == NULL) || (dst->width == 0) || (dst->height == 0)) return;
// Security check to avoid drawing out of bounds in case of bad user data
if (rec.x < 0) { rec.width += rec.x; rec.x = 0; }
if (rec.y < 0) { rec.height += rec.y; rec.y = 0; }
if (rec.width < 0) rec.width = 0;
if (rec.height < 0) rec.height = 0;
// Clamp the size the the image bounds
if ((rec.x + rec.width) >= dst->width) rec.width = dst->width - rec.x;
if ((rec.y + rec.height) >= dst->height) rec.height = dst->height - rec.y;
// Check if the rect is even inside the image
if ((rec.x >= dst->width) || (rec.y >= dst->height)) return;
if (((rec.x + rec.width) <= 0) || (rec.y + rec.height <= 0)) return;
int sy = (int)rec.y;
int sx = (int)rec.x;
int bytesPerPixel = GetPixelDataSize(1, 1, dst->format);
// Fill in the first pixel of the first row based on image format
ImageDrawPixel(dst, sx, sy, color);
int bytesOffset = ((sy*dst->width) + sx)*bytesPerPixel;
unsigned char *pSrcPixel = (unsigned char *)dst->data + bytesOffset;
// Repeat the first pixel data throughout the row
for (int x = 1; x < (int)rec.width; x++)
{
memcpy(pSrcPixel + x*bytesPerPixel, pSrcPixel, bytesPerPixel);
}
// Repeat the first row data for all other rows
int bytesPerRow = bytesPerPixel*(int)rec.width;
for (int y = 1; y < (int)rec.height; y++)
{
memcpy(pSrcPixel + (y*dst->width)*bytesPerPixel, pSrcPixel, bytesPerRow);
}
}
|
O3
|
c
|
ImageDrawRectangleRec:
cmpq $0x0, (%rdi)
je 0x9a4f1
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movl 0x8(%rdi), %ecx
testl %ecx, %ecx
je 0x9a4e3
movl 0xc(%rbx), %eax
testl %eax, %eax
je 0x9a4e3
movl %esi, %ebp
xorps %xmm2, %xmm2
ucomiss %xmm0, %xmm2
jbe 0x9a35a
movaps %xmm0, %xmm3
addps %xmm1, %xmm3
shufps $0x1, %xmm3, %xmm1 # xmm1 = xmm1[1,0],xmm3[0,0]
shufps $0xe2, %xmm3, %xmm1 # xmm1 = xmm1[2,0],xmm3[2,3]
xorps %xmm3, %xmm3
shufps $0x1, %xmm3, %xmm0 # xmm0 = xmm0[1,0],xmm3[0,0]
shufps $0xe2, %xmm3, %xmm0 # xmm0 = xmm0[2,0],xmm3[2,3]
movaps %xmm0, %xmm5
shufps $0x55, %xmm0, %xmm5 # xmm5 = xmm5[1,1],xmm0[1,1]
ucomiss %xmm5, %xmm2
jbe 0x9a380
movaps %xmm0, %xmm2
addps %xmm1, %xmm2
shufps $0x1, %xmm1, %xmm2 # xmm2 = xmm2[1,0],xmm1[0,0]
shufps $0xe2, %xmm1, %xmm2 # xmm2 = xmm2[2,0],xmm1[2,3]
xorps %xmm1, %xmm1
unpcklps %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
xorps %xmm5, %xmm5
movaps %xmm2, %xmm1
xorps %xmm2, %xmm2
ucomiss %xmm1, %xmm2
jbe 0x9a38c
movss %xmm2, %xmm1 # xmm1 = xmm2[0],xmm1[1,2,3]
movaps %xmm1, %xmm3
shufps $0x55, %xmm1, %xmm3 # xmm3 = xmm3[1,1],xmm1[1,1]
ucomiss %xmm3, %xmm2
jbe 0x9a3a5
xorps %xmm2, %xmm2
movlhps %xmm1, %xmm2 # xmm2 = xmm2[0],xmm1[0]
shufps $0xe2, %xmm1, %xmm2 # xmm2 = xmm2[2,0],xmm1[2,3]
movaps %xmm2, %xmm1
xorps %xmm2, %xmm2
cvtsi2ss %ecx, %xmm2
movaps %xmm0, %xmm3
addss %xmm1, %xmm3
ucomiss %xmm2, %xmm3
jb 0x9a3c3
movaps %xmm2, %xmm3
subss %xmm0, %xmm3
movss %xmm3, %xmm1 # xmm1 = xmm3[0],xmm1[1,2,3]
movaps %xmm1, %xmm4
xorps %xmm3, %xmm3
cvtsi2ss %eax, %xmm3
shufps $0x55, %xmm1, %xmm4 # xmm4 = xmm4[1,1],xmm1[1,1]
addss %xmm5, %xmm4
ucomiss %xmm3, %xmm4
jb 0x9a3eb
movaps %xmm3, %xmm4
subss %xmm5, %xmm4
movlhps %xmm1, %xmm4 # xmm4 = xmm4[0],xmm1[0]
shufps $0xe2, %xmm1, %xmm4 # xmm4 = xmm4[2,0],xmm1[2,3]
movaps %xmm4, %xmm1
ucomiss %xmm2, %xmm0
jae 0x9a4e3
ucomiss %xmm3, %xmm5
jae 0x9a4e3
movaps %xmm0, %xmm3
addss %xmm1, %xmm3
xorps %xmm2, %xmm2
ucomiss %xmm3, %xmm2
jae 0x9a4e3
movaps %xmm1, %xmm4
shufps $0x55, %xmm1, %xmm4 # xmm4 = xmm4[1,1],xmm1[1,1]
movaps %xmm5, %xmm3
addss %xmm4, %xmm3
ucomiss %xmm3, %xmm2
jae 0x9a4e3
movaps %xmm4, 0x10(%rsp)
cvttss2si %xmm5, %r15d
cvttss2si %xmm0, %r12d
movl 0x14(%rbx), %edx
movl $0x1, %edi
movl $0x1, %esi
movaps %xmm1, (%rsp)
callq 0x9225b
movl %eax, %r14d
movq %rbx, %rdi
movl %r12d, %esi
movl %r15d, %edx
movl %ebp, %ecx
callq 0x99487
imull 0x8(%rbx), %r15d
addl %r12d, %r15d
imull %r14d, %r15d
movq (%rbx), %r12
movslq %r15d, %rax
leaq (%r12,%rax), %r15
cvttss2si (%rsp), %ecx
movl %ecx, (%rsp)
cmpl $0x2, %ecx
jl 0x9a4a7
movslq %r14d, %r13
movl (%rsp), %ebp
addq %r13, %r12
addq %rax, %r12
decq %rbp
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0xa410
addq %r13, %r12
decq %rbp
jne 0x9a491
cvttss2si 0x10(%rsp), %r13d
cmpl $0x2, %r13d
jl 0x9a4e3
movl (%rsp), %eax
imull %r14d, %eax
movslq %eax, %r12
decl %r13d
movl %r14d, %ebp
movl 0x8(%rbx), %eax
imull %ebp, %eax
movslq %eax, %rdi
addq %r15, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0xa410
addl %r14d, %ebp
decl %r13d
jne 0x9a4c4
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
ImageDrawRectangleRec:
cmp qword ptr [rdi], 0
jz locret_9A4F1
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov rbx, rdi
mov ecx, [rdi+8]
test ecx, ecx
jz loc_9A4E3
mov eax, [rbx+0Ch]
test eax, eax
jz loc_9A4E3
mov ebp, esi
xorps xmm2, xmm2
ucomiss xmm2, xmm0
jbe short loc_9A35A
movaps xmm3, xmm0
addps xmm3, xmm1
shufps xmm1, xmm3, 1
shufps xmm1, xmm3, 0E2h
xorps xmm3, xmm3
shufps xmm0, xmm3, 1
shufps xmm0, xmm3, 0E2h
loc_9A35A:
movaps xmm5, xmm0
shufps xmm5, xmm0, 55h ; 'U'
ucomiss xmm2, xmm5
jbe short loc_9A380
movaps xmm2, xmm0
addps xmm2, xmm1
shufps xmm2, xmm1, 1
shufps xmm2, xmm1, 0E2h
xorps xmm1, xmm1
unpcklps xmm0, xmm1
xorps xmm5, xmm5
movaps xmm1, xmm2
loc_9A380:
xorps xmm2, xmm2
ucomiss xmm2, xmm1
jbe short loc_9A38C
movss xmm1, xmm2
loc_9A38C:
movaps xmm3, xmm1
shufps xmm3, xmm1, 55h ; 'U'
ucomiss xmm2, xmm3
jbe short loc_9A3A5
xorps xmm2, xmm2
movlhps xmm2, xmm1
shufps xmm2, xmm1, 0E2h
movaps xmm1, xmm2
loc_9A3A5:
xorps xmm2, xmm2
cvtsi2ss xmm2, ecx
movaps xmm3, xmm0
addss xmm3, xmm1
ucomiss xmm3, xmm2
jb short loc_9A3C3
movaps xmm3, xmm2
subss xmm3, xmm0
movss xmm1, xmm3
loc_9A3C3:
movaps xmm4, xmm1
xorps xmm3, xmm3
cvtsi2ss xmm3, eax
shufps xmm4, xmm1, 55h ; 'U'
addss xmm4, xmm5
ucomiss xmm4, xmm3
jb short loc_9A3EB
movaps xmm4, xmm3
subss xmm4, xmm5
movlhps xmm4, xmm1
shufps xmm4, xmm1, 0E2h
movaps xmm1, xmm4
loc_9A3EB:
ucomiss xmm0, xmm2
jnb loc_9A4E3
ucomiss xmm5, xmm3
jnb loc_9A4E3
movaps xmm3, xmm0
addss xmm3, xmm1
xorps xmm2, xmm2
ucomiss xmm2, xmm3
jnb loc_9A4E3
movaps xmm4, xmm1
shufps xmm4, xmm1, 55h ; 'U'
movaps xmm3, xmm5
addss xmm3, xmm4
ucomiss xmm2, xmm3
jnb loc_9A4E3
movaps [rsp+58h+var_48], xmm4
cvttss2si r15d, xmm5
cvttss2si r12d, xmm0
mov edx, [rbx+14h]
mov edi, 1
mov esi, 1
movaps [rsp+58h+var_58], xmm1
call GetPixelDataSize
mov r14d, eax
mov rdi, rbx
mov esi, r12d
mov edx, r15d
mov ecx, ebp
call ImageDrawPixel
imul r15d, [rbx+8]
add r15d, r12d
imul r15d, r14d
mov r12, [rbx]
movsxd rax, r15d
lea r15, [r12+rax]
cvttss2si ecx, dword ptr [rsp+58h+var_58]
mov dword ptr [rsp+58h+var_58], ecx
cmp ecx, 2
jl short loc_9A4A7
movsxd r13, r14d
mov ebp, dword ptr [rsp+58h+var_58]
add r12, r13
add r12, rax
dec rbp
loc_9A491:
mov rdi, r12
mov rsi, r15
mov rdx, r13
call _memcpy
add r12, r13
dec rbp
jnz short loc_9A491
loc_9A4A7:
cvttss2si r13d, dword ptr [rsp+58h+var_48]
cmp r13d, 2
jl short loc_9A4E3
mov eax, dword ptr [rsp+58h+var_58]
imul eax, r14d
movsxd r12, eax
dec r13d
mov ebp, r14d
loc_9A4C4:
mov eax, [rbx+8]
imul eax, ebp
movsxd rdi, eax
add rdi, r15
mov rsi, r15
mov rdx, r12
call _memcpy
add ebp, r14d
dec r13d
jnz short loc_9A4C4
loc_9A4E3:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
locret_9A4F1:
retn
|
void ImageDrawRectangleRec(long long a1, unsigned int a2, __m128 a3, __m128 a4)
{
int v4; // ecx
int v5; // eax
__m128 v6; // xmm3
float v7; // xmm5_4
__m128 v8; // xmm2
float v9; // xmm2_4
__m128 v10; // xmm3
__m128 v11; // xmm4
float v12; // xmm4_4
int v13; // r15d
int PixelDataSize; // r14d
long long v15; // rax
long long v16; // r15
long long v17; // r12
long long v18; // rbp
int v19; // r13d
int v20; // ebp
float v21; // [rsp+10h] [rbp-48h]
if ( *(_QWORD *)a1 )
{
v4 = *(_DWORD *)(a1 + 8);
if ( v4 )
{
v5 = *(_DWORD *)(a1 + 12);
if ( v5 )
{
if ( a3.m128_f32[0] < 0.0 )
{
v6 = _mm_add_ps(a3, a4);
a4 = _mm_shuffle_ps(_mm_shuffle_ps(a4, v6, 1), v6, 226);
a3 = _mm_shuffle_ps(_mm_shuffle_ps(a3, (__m128)0LL, 1), (__m128)0LL, 226);
}
v7 = _mm_shuffle_ps(a3, a3, 85).m128_f32[0];
if ( v7 < 0.0 )
{
v8 = _mm_shuffle_ps(_mm_shuffle_ps(_mm_add_ps(a3, a4), a4, 1), a4, 226);
a3.m128_i32[0] = _mm_unpacklo_ps(a3, (__m128)0LL).m128_u32[0];
v7 = 0.0;
a4 = v8;
}
if ( a4.m128_f32[0] < 0.0 )
a4.m128_f32[0] = 0.0;
if ( _mm_shuffle_ps(a4, a4, 85).m128_f32[0] < 0.0 )
a4 = _mm_shuffle_ps(_mm_movelh_ps((__m128)0LL, a4), a4, 226);
v9 = (float)v4;
if ( (float)(a3.m128_f32[0] + a4.m128_f32[0]) >= (float)v4 )
a4.m128_f32[0] = v9 - a3.m128_f32[0];
v10 = 0LL;
v10.m128_f32[0] = (float)v5;
if ( (float)(_mm_shuffle_ps(a4, a4, 85).m128_f32[0] + v7) >= (float)v5 )
{
v11 = v10;
v11.m128_f32[0] = v10.m128_f32[0] - v7;
a4 = _mm_shuffle_ps(_mm_movelh_ps(v11, a4), a4, 226);
}
if ( a3.m128_f32[0] < v9 && v7 < v10.m128_f32[0] && (float)(a3.m128_f32[0] + a4.m128_f32[0]) > 0.0 )
{
v12 = _mm_shuffle_ps(a4, a4, 85).m128_f32[0];
if ( (float)(v7 + v12) > 0.0 )
{
v21 = v12;
v13 = (int)v7;
PixelDataSize = GetPixelDataSize(1, 1, *(_DWORD *)(a1 + 20));
ImageDrawPixel((long long *)a1, (int)a3.m128_f32[0], v13, a2);
v15 = PixelDataSize * ((int)a3.m128_f32[0] + *(_DWORD *)(a1 + 8) * v13);
v16 = *(_QWORD *)a1 + v15;
if ( (int)a4.m128_f32[0] >= 2 )
{
v17 = v15 + PixelDataSize + *(_QWORD *)a1;
v18 = (unsigned int)(int)a4.m128_f32[0] - 1LL;
do
{
memcpy(v17);
v17 += PixelDataSize;
--v18;
}
while ( v18 );
}
if ( (int)v21 >= 2 )
{
v19 = (int)v21 - 1;
v20 = PixelDataSize;
do
{
memcpy(v16 + v20 * *(_DWORD *)(a1 + 8));
v20 += PixelDataSize;
--v19;
}
while ( v19 );
}
}
}
}
}
}
}
|
ImageDrawRectangleRec:
CMP qword ptr [RDI],0x0
JZ 0x0019a4f1
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RBX,RDI
MOV ECX,dword ptr [RDI + 0x8]
TEST ECX,ECX
JZ 0x0019a4e3
MOV EAX,dword ptr [RBX + 0xc]
TEST EAX,EAX
JZ 0x0019a4e3
MOV EBP,ESI
XORPS XMM2,XMM2
UCOMISS XMM2,XMM0
JBE 0x0019a35a
MOVAPS XMM3,XMM0
ADDPS XMM3,XMM1
SHUFPS XMM1,XMM3,0x1
SHUFPS XMM1,XMM3,0xe2
XORPS XMM3,XMM3
SHUFPS XMM0,XMM3,0x1
SHUFPS XMM0,XMM3,0xe2
LAB_0019a35a:
MOVAPS XMM5,XMM0
SHUFPS XMM5,XMM0,0x55
UCOMISS XMM2,XMM5
JBE 0x0019a380
MOVAPS XMM2,XMM0
ADDPS XMM2,XMM1
SHUFPS XMM2,XMM1,0x1
SHUFPS XMM2,XMM1,0xe2
XORPS XMM1,XMM1
UNPCKLPS XMM0,XMM1
XORPS XMM5,XMM5
MOVAPS XMM1,XMM2
LAB_0019a380:
XORPS XMM2,XMM2
UCOMISS XMM2,XMM1
JBE 0x0019a38c
MOVSS XMM1,XMM2
LAB_0019a38c:
MOVAPS XMM3,XMM1
SHUFPS XMM3,XMM1,0x55
UCOMISS XMM2,XMM3
JBE 0x0019a3a5
XORPS XMM2,XMM2
MOVLHPS XMM2,XMM1
SHUFPS XMM2,XMM1,0xe2
MOVAPS XMM1,XMM2
LAB_0019a3a5:
XORPS XMM2,XMM2
CVTSI2SS XMM2,ECX
MOVAPS XMM3,XMM0
ADDSS XMM3,XMM1
UCOMISS XMM3,XMM2
JC 0x0019a3c3
MOVAPS XMM3,XMM2
SUBSS XMM3,XMM0
MOVSS XMM1,XMM3
LAB_0019a3c3:
MOVAPS XMM4,XMM1
XORPS XMM3,XMM3
CVTSI2SS XMM3,EAX
SHUFPS XMM4,XMM1,0x55
ADDSS XMM4,XMM5
UCOMISS XMM4,XMM3
JC 0x0019a3eb
MOVAPS XMM4,XMM3
SUBSS XMM4,XMM5
MOVLHPS XMM4,XMM1
SHUFPS XMM4,XMM1,0xe2
MOVAPS XMM1,XMM4
LAB_0019a3eb:
UCOMISS XMM0,XMM2
JNC 0x0019a4e3
UCOMISS XMM5,XMM3
JNC 0x0019a4e3
MOVAPS XMM3,XMM0
ADDSS XMM3,XMM1
XORPS XMM2,XMM2
UCOMISS XMM2,XMM3
JNC 0x0019a4e3
MOVAPS XMM4,XMM1
SHUFPS XMM4,XMM1,0x55
MOVAPS XMM3,XMM5
ADDSS XMM3,XMM4
UCOMISS XMM2,XMM3
JNC 0x0019a4e3
MOVAPS xmmword ptr [RSP + 0x10],XMM4
CVTTSS2SI R15D,XMM5
CVTTSS2SI R12D,XMM0
MOV EDX,dword ptr [RBX + 0x14]
MOV EDI,0x1
MOV ESI,0x1
MOVAPS xmmword ptr [RSP],XMM1
CALL 0x0019225b
MOV R14D,EAX
MOV RDI,RBX
MOV ESI,R12D
MOV EDX,R15D
MOV ECX,EBP
CALL 0x00199487
IMUL R15D,dword ptr [RBX + 0x8]
ADD R15D,R12D
IMUL R15D,R14D
MOV R12,qword ptr [RBX]
MOVSXD RAX,R15D
LEA R15,[R12 + RAX*0x1]
CVTTSS2SI ECX,dword ptr [RSP]
MOV dword ptr [RSP],ECX
CMP ECX,0x2
JL 0x0019a4a7
MOVSXD R13,R14D
MOV EBP,dword ptr [RSP]
ADD R12,R13
ADD R12,RAX
DEC RBP
LAB_0019a491:
MOV RDI,R12
MOV RSI,R15
MOV RDX,R13
CALL 0x0010a410
ADD R12,R13
DEC RBP
JNZ 0x0019a491
LAB_0019a4a7:
CVTTSS2SI R13D,dword ptr [RSP + 0x10]
CMP R13D,0x2
JL 0x0019a4e3
MOV EAX,dword ptr [RSP]
IMUL EAX,R14D
MOVSXD R12,EAX
DEC R13D
MOV EBP,R14D
LAB_0019a4c4:
MOV EAX,dword ptr [RBX + 0x8]
IMUL EAX,EBP
MOVSXD RDI,EAX
ADD RDI,R15
MOV RSI,R15
MOV RDX,R12
CALL 0x0010a410
ADD EBP,R14D
DEC R13D
JNZ 0x0019a4c4
LAB_0019a4e3:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
LAB_0019a4f1:
RET
|
void ImageDrawRectangleRec(int8 param_1,int8 param_2,long *param_3,int4 param_4)
{
void *__src;
int iVar1;
long lVar2;
uint uVar3;
int iVar4;
void *__dest;
int iVar5;
size_t __n;
float fVar6;
float fVar7;
float fVar8;
float fVar9;
float fVar10;
float fVar11;
fVar8 = (float)((ulong)param_2 >> 0x20);
fVar9 = (float)param_2;
fVar11 = (float)((ulong)param_1 >> 0x20);
fVar6 = (float)param_1;
if (((*param_3 != 0) && ((int)param_3[1] != 0)) && (*(int *)((long)param_3 + 0xc) != 0)) {
if (fVar6 < 0.0) {
fVar9 = fVar6 + fVar9;
fVar6 = 0.0;
}
if (fVar11 < 0.0) {
fVar8 = fVar11 + fVar8;
fVar11 = 0.0;
}
if (fVar9 < 0.0) {
fVar9 = 0.0;
}
if (fVar8 < 0.0) {
fVar8 = 0.0;
}
fVar7 = (float)(int)param_3[1];
if (fVar7 <= fVar6 + fVar9) {
fVar9 = fVar7 - fVar6;
}
fVar10 = (float)*(int *)((long)param_3 + 0xc);
if (fVar10 <= fVar8 + fVar11) {
fVar8 = fVar10 - fVar11;
}
if (((fVar6 < fVar7) && (fVar11 < fVar10)) && ((0.0 < fVar6 + fVar9 && (0.0 < fVar11 + fVar8))))
{
iVar1 = GetPixelDataSize(1,1,*(int4 *)((long)param_3 + 0x14));
ImageDrawPixel(param_3,(int)fVar6,(int)fVar11,param_4);
lVar2 = (long)(((int)fVar11 * (int)param_3[1] + (int)fVar6) * iVar1);
__src = (void *)(*param_3 + lVar2);
uVar3 = (uint)fVar9;
if (1 < (int)uVar3) {
__n = (size_t)iVar1;
__dest = (void *)(*param_3 + __n + lVar2);
lVar2 = (ulong)uVar3 - 1;
do {
memcpy(__dest,__src,__n);
__dest = (void *)((long)__dest + __n);
lVar2 = lVar2 + -1;
} while (lVar2 != 0);
}
if (1 < (int)fVar8) {
iVar5 = (int)fVar8 + -1;
iVar4 = iVar1;
do {
memcpy((void *)((long)((int)param_3[1] * iVar4) + (long)__src),__src,
(long)(int)(uVar3 * iVar1));
iVar4 = iVar4 + iVar1;
iVar5 = iVar5 + -1;
} while (iVar5 != 0);
}
}
}
return;
}
|
|
57,555
|
add_closure_var
|
bluesky950520[P]quickjs/quickjs.c
|
static int add_closure_var(JSContext *ctx, JSFunctionDef *s,
BOOL is_local, BOOL is_arg,
int var_idx, JSAtom var_name,
BOOL is_const, BOOL is_lexical,
JSVarKindEnum var_kind)
{
JSClosureVar *cv;
/* the closure variable indexes are currently stored on 16 bits */
if (s->closure_var_count >= JS_MAX_LOCAL_VARS) {
// XXX: add_closure_var() should take JSParseState *s and use js_parse_error
JS_ThrowSyntaxError(ctx, "too many closure variables used (only %d allowed)",
JS_MAX_LOCAL_VARS - 1);
return -1;
}
if (js_resize_array(ctx, (void **)&s->closure_var,
sizeof(s->closure_var[0]),
&s->closure_var_size, s->closure_var_count + 1))
return -1;
cv = &s->closure_var[s->closure_var_count++];
cv->is_local = is_local;
cv->is_arg = is_arg;
cv->is_const = is_const;
cv->is_lexical = is_lexical;
cv->var_kind = var_kind;
cv->var_idx = var_idx;
cv->var_name = JS_DupAtom(ctx, var_name);
return s->closure_var_count - 1;
}
|
O1
|
c
|
add_closure_var:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebp
movq %rdi, %r15
movl 0x198(%rsi), %r8d
cmpl $0xffff, %r8d # imm = 0xFFFF
jl 0x6cec1
leaq 0x344f0(%rip), %rsi # 0xa1398
movq %r15, %rdi
movl $0xfffe, %edx # imm = 0xFFFE
xorl %eax, %eax
callq 0x224d1
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
jmp 0x6cf55
movl %r9d, %ebx
movl %ecx, %r12d
movl %edx, %r13d
movq %rsi, %r14
cmpl %r8d, 0x19c(%rsi)
jle 0x6cf64
movl 0x50(%rsp), %esi
movl 0x48(%rsp), %edx
movl 0x40(%rsp), %edi
movq 0x1a0(%r14), %rax
movslq 0x198(%r14), %rcx
leal 0x1(%rcx), %r8d
movl %r8d, 0x198(%r14)
andb $0x1, %r13b
addb %r12b, %r12b
andb $0x2, %r12b
orb %r13b, %r12b
shlb $0x2, %dil
andb $0x4, %dil
orb %r12b, %dil
shlb $0x3, %dl
shlb $0x4, %sil
andb $0x8, %dl
orb %dil, %dl
orb %sil, %dl
movb %dl, (%rax,%rcx,8)
movw %bp, 0x2(%rax,%rcx,8)
cmpl $0xe0, %ebx
jl 0x6cf48
movq 0x18(%r15), %rdx
movq 0x68(%rdx), %rdx
movl %ebx, %esi
movq (%rdx,%rsi,8), %rdx
incl (%rdx)
movl %ebx, 0x4(%rax,%rcx,8)
movl 0x198(%r14), %eax
decl %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1a0(%r14), %rsi
leaq 0x19c(%r14), %rcx
incl %r8d
movq %r15, %rdi
movl $0x8, %edx
callq 0x434ef
movl %eax, %ecx
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x6cf55
jmp 0x6ceda
|
add_closure_var:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov ebp, r8d
mov r15, rdi
mov r8d, [rsi+198h]
cmp r8d, 0FFFFh
jl short loc_6CEC1
lea rsi, aTooManyClosure; "too many closure variables used (only %"...
mov rdi, r15
mov edx, 0FFFEh
xor eax, eax
call JS_ThrowSyntaxError
mov eax, 0FFFFFFFFh
jmp loc_6CF55
loc_6CEC1:
mov ebx, r9d
mov r12d, ecx
mov r13d, edx
mov r14, rsi
cmp [rsi+19Ch], r8d
jle loc_6CF64
loc_6CEDA:
mov esi, [rsp+38h+arg_10]
mov edx, [rsp+38h+arg_8]
mov edi, [rsp+38h+arg_0]
mov rax, [r14+1A0h]
movsxd rcx, dword ptr [r14+198h]
lea r8d, [rcx+1]
mov [r14+198h], r8d
and r13b, 1
add r12b, r12b
and r12b, 2
or r12b, r13b
shl dil, 2
and dil, 4
or dil, r12b
shl dl, 3
shl sil, 4
and dl, 8
or dl, dil
or dl, sil
mov [rax+rcx*8], dl
mov [rax+rcx*8+2], bp
cmp ebx, 0E0h
jl short loc_6CF48
mov rdx, [r15+18h]
mov rdx, [rdx+68h]
mov esi, ebx
mov rdx, [rdx+rsi*8]
inc dword ptr [rdx]
loc_6CF48:
mov [rax+rcx*8+4], ebx
mov eax, [r14+198h]
dec eax
loc_6CF55:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_6CF64:
lea rsi, [r14+1A0h]
lea rcx, [r14+19Ch]
inc r8d
mov rdi, r15
mov edx, 8
call js_realloc_array
mov ecx, eax
mov eax, 0FFFFFFFFh
test ecx, ecx
jnz short loc_6CF55
jmp loc_6CEDA
|
long long add_closure_var(
long long a1,
long long a2,
char a3,
long long a4,
__int16 a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
char a15,
char a16,
char a17)
{
char v17; // al
long long v19; // r8
long long result; // rax
int v21; // ebx
char v22; // r12
long long v24; // rax
long long v25; // rcx
_DWORD *v26; // rdx
int v27; // ecx
v19 = *(unsigned int *)(a2 + 408);
if ( (int)v19 < 0xFFFF )
{
v21 = a6;
v22 = a4;
if ( *(_DWORD *)(a2 + 412) > (int)v19
|| (v27 = js_realloc_array(a1, (long long *)(a2 + 416), 8u, (_DWORD *)(a2 + 412), (int)v19 + 1),
result = 0xFFFFFFFFLL,
!v27) )
{
v24 = *(_QWORD *)(a2 + 416);
v25 = *(int *)(a2 + 408);
*(_DWORD *)(a2 + 408) = v25 + 1;
*(_BYTE *)(v24 + 8 * v25) = (16 * a17) | a3 & 1 | (2 * v22) & 2 | (4 * a15) & 4 | (8 * a16) & 8;
*(_WORD *)(v24 + 8 * v25 + 2) = a5;
if ( v21 >= 224 )
{
v26 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 104LL) + 8LL * (unsigned int)v21);
++*v26;
}
*(_DWORD *)(v24 + 8 * v25 + 4) = v21;
return (unsigned int)(*(_DWORD *)(a2 + 408) - 1);
}
}
else
{
JS_ThrowSyntaxError(
a1,
(long long)"too many closure variables used (only %d allowed)",
65534LL,
a4,
v19,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v17);
return 0xFFFFFFFFLL;
}
return result;
}
| |||
57,556
|
add_closure_var
|
bluesky950520[P]quickjs/quickjs.c
|
static int add_closure_var(JSContext *ctx, JSFunctionDef *s,
BOOL is_local, BOOL is_arg,
int var_idx, JSAtom var_name,
BOOL is_const, BOOL is_lexical,
JSVarKindEnum var_kind)
{
JSClosureVar *cv;
/* the closure variable indexes are currently stored on 16 bits */
if (s->closure_var_count >= JS_MAX_LOCAL_VARS) {
// XXX: add_closure_var() should take JSParseState *s and use js_parse_error
JS_ThrowSyntaxError(ctx, "too many closure variables used (only %d allowed)",
JS_MAX_LOCAL_VARS - 1);
return -1;
}
if (js_resize_array(ctx, (void **)&s->closure_var,
sizeof(s->closure_var[0]),
&s->closure_var_size, s->closure_var_count + 1))
return -1;
cv = &s->closure_var[s->closure_var_count++];
cv->is_local = is_local;
cv->is_arg = is_arg;
cv->is_const = is_const;
cv->is_lexical = is_lexical;
cv->var_kind = var_kind;
cv->var_idx = var_idx;
cv->var_name = JS_DupAtom(ctx, var_name);
return s->closure_var_count - 1;
}
|
O2
|
c
|
add_closure_var:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebp
movq %rdi, %r15
movl 0x198(%rsi), %r8d
cmpl $0xffff, %r8d # imm = 0xFFFF
jl 0x5be36
leaq 0x2c4ad(%rip), %rsi # 0x882d2
movq %r15, %rdi
movl $0xfffe, %edx # imm = 0xFFFE
xorl %eax, %eax
callq 0x1c5bb
jmp 0x5be62
movl %r9d, %ebx
movl %ecx, %r12d
movl %edx, %r13d
movq %rsi, %r14
addq $0x1a0, %rsi # imm = 0x1A0
leaq 0x19c(%r14), %rcx
incl %r8d
pushq $0x8
popq %rdx
movq %r15, %rdi
callq 0x3b0ef
testl %eax, %eax
je 0x5be74
pushq $-0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x50(%rsp), %esi
movl 0x48(%rsp), %edx
movl 0x40(%rsp), %edi
movq 0x1a0(%r14), %rax
movslq 0x198(%r14), %rcx
leal 0x1(%rcx), %r8d
movl %r8d, 0x198(%r14)
andb $0x1, %r13b
addb %r12b, %r12b
andb $0x2, %r12b
orb %r13b, %r12b
shlb $0x2, %dil
andb $0x4, %dil
orb %r12b, %dil
shlb $0x3, %dl
shlb $0x4, %sil
andb $0x8, %dl
orb %dil, %dl
orb %sil, %dl
movb %dl, (%rax,%rcx,8)
movw %bp, 0x2(%rax,%rcx,8)
cmpl $0xe0, %ebx
jl 0x5bee2
movq 0x18(%r15), %rdx
movq 0x68(%rdx), %rdx
movl %ebx, %esi
movq (%rdx,%rsi,8), %rdx
incl (%rdx)
movl %ebx, 0x4(%rax,%rcx,8)
movl 0x198(%r14), %eax
decl %eax
jmp 0x5be65
|
add_closure_var:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov ebp, r8d
mov r15, rdi
mov r8d, [rsi+198h]
cmp r8d, 0FFFFh
jl short loc_5BE36
lea rsi, aTooManyClosure; "too many closure variables used (only %"...
mov rdi, r15
mov edx, 0FFFEh
xor eax, eax
call JS_ThrowSyntaxError
jmp short loc_5BE62
loc_5BE36:
mov ebx, r9d
mov r12d, ecx
mov r13d, edx
mov r14, rsi
add rsi, 1A0h
lea rcx, [r14+19Ch]
inc r8d
push 8
pop rdx
mov rdi, r15
call js_resize_array
test eax, eax
jz short loc_5BE74
loc_5BE62:
push 0FFFFFFFFFFFFFFFFh
pop rax
loc_5BE65:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_5BE74:
mov esi, [rsp+38h+arg_10]
mov edx, [rsp+38h+arg_8]
mov edi, [rsp+38h+arg_0]
mov rax, [r14+1A0h]
movsxd rcx, dword ptr [r14+198h]
lea r8d, [rcx+1]
mov [r14+198h], r8d
and r13b, 1
add r12b, r12b
and r12b, 2
or r12b, r13b
shl dil, 2
and dil, 4
or dil, r12b
shl dl, 3
shl sil, 4
and dl, 8
or dl, dil
or dl, sil
mov [rax+rcx*8], dl
mov [rax+rcx*8+2], bp
cmp ebx, 0E0h
jl short loc_5BEE2
mov rdx, [r15+18h]
mov rdx, [rdx+68h]
mov esi, ebx
mov rdx, [rdx+rsi*8]
inc dword ptr [rdx]
loc_5BEE2:
mov [rax+rcx*8+4], ebx
mov eax, [r14+198h]
dec eax
jmp loc_5BE65
|
long long add_closure_var(
long long a1,
long long a2,
char a3,
long long a4,
__int16 a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
char a15,
char a16,
char a17)
{
char v17; // al
long long v19; // r8
int v20; // ebx
char v21; // r12
long long v24; // rax
long long v25; // rcx
_DWORD *v26; // rdx
v19 = *(unsigned int *)(a2 + 408);
if ( (int)v19 >= 0xFFFF )
{
JS_ThrowSyntaxError(
a1,
(long long)"too many closure variables used (only %d allowed)",
65534LL,
a4,
v19,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v17);
return -1LL;
}
v20 = a6;
v21 = a4;
if ( (unsigned int)js_resize_array(a1, a2 + 416, 8LL, (_DWORD *)(a2 + 412), (int)v19 + 1) )
return -1LL;
v24 = *(_QWORD *)(a2 + 416);
v25 = *(int *)(a2 + 408);
*(_DWORD *)(a2 + 408) = v25 + 1;
*(_BYTE *)(v24 + 8 * v25) = (16 * a17) | a3 & 1 | (2 * v21) & 2 | (4 * a15) & 4 | (8 * a16) & 8;
*(_WORD *)(v24 + 8 * v25 + 2) = a5;
if ( v20 >= 224 )
{
v26 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 104LL) + 8LL * (unsigned int)v20);
++*v26;
}
*(_DWORD *)(v24 + 8 * v25 + 4) = v20;
return (unsigned int)(*(_DWORD *)(a2 + 408) - 1);
}
|
add_closure_var:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV EBP,R8D
MOV R15,RDI
MOV R8D,dword ptr [RSI + 0x198]
CMP R8D,0xffff
JL 0x0015be36
LEA RSI,[0x1882d2]
MOV RDI,R15
MOV EDX,0xfffe
XOR EAX,EAX
CALL 0x0011c5bb
JMP 0x0015be62
LAB_0015be36:
MOV EBX,R9D
MOV R12D,ECX
MOV R13D,EDX
MOV R14,RSI
ADD RSI,0x1a0
LEA RCX,[R14 + 0x19c]
INC R8D
PUSH 0x8
POP RDX
MOV RDI,R15
CALL 0x0013b0ef
TEST EAX,EAX
JZ 0x0015be74
LAB_0015be62:
PUSH -0x1
POP RAX
LAB_0015be65:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0015be74:
MOV ESI,dword ptr [RSP + 0x50]
MOV EDX,dword ptr [RSP + 0x48]
MOV EDI,dword ptr [RSP + 0x40]
MOV RAX,qword ptr [R14 + 0x1a0]
MOVSXD RCX,dword ptr [R14 + 0x198]
LEA R8D,[RCX + 0x1]
MOV dword ptr [R14 + 0x198],R8D
AND R13B,0x1
ADD R12B,R12B
AND R12B,0x2
OR R12B,R13B
SHL DIL,0x2
AND DIL,0x4
OR DIL,R12B
SHL DL,0x3
SHL SIL,0x4
AND DL,0x8
OR DL,DIL
OR DL,SIL
MOV byte ptr [RAX + RCX*0x8],DL
MOV word ptr [RAX + RCX*0x8 + 0x2],BP
CMP EBX,0xe0
JL 0x0015bee2
MOV RDX,qword ptr [R15 + 0x18]
MOV RDX,qword ptr [RDX + 0x68]
MOV ESI,EBX
MOV RDX,qword ptr [RDX + RSI*0x8]
INC dword ptr [RDX]
LAB_0015bee2:
MOV dword ptr [RAX + RCX*0x8 + 0x4],EBX
MOV EAX,dword ptr [R14 + 0x198]
DEC EAX
JMP 0x0015be65
|
ulong add_closure_var(long param_1,long param_2,byte param_3,char param_4,int2 param_5,
uint param_6,byte param_7,byte param_8,char param_9)
{
long lVar1;
int *piVar2;
int iVar3;
long lVar4;
if (*(int *)(param_2 + 0x198) < 0xffff) {
iVar3 = js_resize_array(param_1,param_2 + 0x1a0,8,param_2 + 0x19c,*(int *)(param_2 + 0x198) + 1)
;
if (iVar3 == 0) {
lVar1 = *(long *)(param_2 + 0x1a0);
lVar4 = (long)*(int *)(param_2 + 0x198);
*(int *)(param_2 + 0x198) = *(int *)(param_2 + 0x198) + 1;
*(byte *)(lVar1 + lVar4 * 8) =
(param_8 & 1) << 3 | (param_7 & 1) << 2 | param_4 * '\x02' & 2U | param_3 & 1 |
param_9 << 4;
*(int2 *)(lVar1 + 2 + lVar4 * 8) = param_5;
if (0xdf < (int)param_6) {
piVar2 = *(int **)(*(long *)(*(long *)(param_1 + 0x18) + 0x68) + (ulong)param_6 * 8);
*piVar2 = *piVar2 + 1;
}
*(uint *)(lVar1 + 4 + lVar4 * 8) = param_6;
return (ulong)(*(int *)(param_2 + 0x198) - 1);
}
}
else {
JS_ThrowSyntaxError(param_1,"too many closure variables used (only %d allowed)",0xfffe);
}
return 0xffffffffffffffff;
}
|
|
57,557
|
mi_unique_comp
|
eloqsql/storage/myisam/mi_unique.c
|
int mi_unique_comp(MI_UNIQUEDEF *def, const uchar *a, const uchar *b,
my_bool null_are_equal)
{
const uchar *pos_a, *pos_b, *end;
HA_KEYSEG *keyseg;
for (keyseg=def->seg ; keyseg < def->end ; keyseg++)
{
enum ha_base_keytype type=(enum ha_base_keytype) keyseg->type;
uint a_length, b_length;
a_length= b_length= keyseg->length;
/* If part is NULL it's regarded as different */
if (keyseg->null_bit)
{
uint tmp;
if ((tmp=(a[keyseg->null_pos] & keyseg->null_bit)) !=
(uint) (b[keyseg->null_pos] & keyseg->null_bit))
return 1;
if (tmp)
{
if (!null_are_equal)
return 1;
continue;
}
}
pos_a= a+keyseg->start;
pos_b= b+keyseg->start;
if (keyseg->flag & HA_VAR_LENGTH_PART)
{
uint pack_length= keyseg->bit_start;
if (pack_length == 1)
{
a_length= (uint) *(uchar*) pos_a++;
b_length= (uint) *(uchar*) pos_b++;
}
else
{
a_length= uint2korr(pos_a);
b_length= uint2korr(pos_b);
pos_a+= 2; /* Skip VARCHAR length */
pos_b+= 2;
}
set_if_smaller(a_length, keyseg->length); /* Safety */
set_if_smaller(b_length, keyseg->length); /* safety */
}
else if (keyseg->flag & HA_BLOB_PART)
{
/* Only compare 'length' characters if length != 0 */
a_length= _mi_calc_blob_length(keyseg->bit_start,pos_a);
b_length= _mi_calc_blob_length(keyseg->bit_start,pos_b);
/* Check that a and b are of equal length */
if (keyseg->length)
{
/*
This is used in some cases when we are not interested in comparing
the whole length of the blob.
*/
set_if_smaller(a_length, keyseg->length);
set_if_smaller(b_length, keyseg->length);
}
memcpy((char**) &pos_a, pos_a+keyseg->bit_start, sizeof(char*));
memcpy((char**) &pos_b, pos_b+keyseg->bit_start, sizeof(char*));
}
if (type == HA_KEYTYPE_TEXT || type == HA_KEYTYPE_VARTEXT1 ||
type == HA_KEYTYPE_VARTEXT2)
{
if (ha_compare_text(keyseg->charset, (uchar *) pos_a, a_length,
(uchar *) pos_b, b_length, 0))
return 1;
}
else
{
if (a_length != b_length)
return 1;
end= pos_a+a_length;
while (pos_a != end)
{
if (*pos_a++ != *pos_b++)
return 1;
}
}
}
return 0;
}
|
O3
|
c
|
mi_unique_comp:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq 0x8(%rdi), %r15
movq %rdi, -0x48(%rbp)
cmpq 0x10(%rdi), %r15
jae 0x89077
movl %ecx, %r14d
movq %rdx, -0x40(%rbp)
movq %rsi, -0x38(%rbp)
movl %ecx, -0x2c(%rbp)
movzbl 0x18(%r15), %r12d
movzwl 0x14(%r15), %ecx
movb 0x19(%r15), %dil
testb %dil, %dil
je 0x88f5e
movl 0xc(%r15), %eax
movb (%rsi,%rax), %r8b
andb %dil, %r8b
andb (%rdx,%rax), %dil
movl $0x1, %eax
cmpb %dil, %r8b
jne 0x89079
testb %r8b, %r8b
je 0x88f5e
testb %r14b, %r14b
jne 0x89034
jmp 0x89079
movl 0x8(%r15), %r13d
leaq (%rsi,%r13), %rbx
addq %rdx, %r13
movzwl 0x12(%r15), %eax
testb $0x8, %al
jne 0x88f7d
testb $0x20, %al
jne 0x88f94
movl %ecx, %esi
jmp 0x89001
cmpb $0x1, 0x1a(%r15)
jne 0x88fe3
movzbl (%rbx), %eax
incq %rbx
movzbl (%r13), %edx
incq %r13
jmp 0x88ff3
movzbl 0x1a(%r15), %edi
movq %rbx, %rsi
callq 0x7a28d
movq %rax, %r14
movzbl 0x1a(%r15), %edi
movq %r13, %rsi
callq 0x7a28d
movzwl 0x14(%r15), %edx
cmpl %edx, %r14d
movl %edx, %ecx
cmovbl %r14d, %ecx
cmpl %edx, %eax
movl %edx, %esi
cmovbl %eax, %esi
testl %edx, %edx
cmovel %r14d, %ecx
movl -0x2c(%rbp), %r14d
cmovel %eax, %esi
movzbl 0x1a(%r15), %eax
movq (%rbx,%rax), %rbx
movq (%r13,%rax), %r13
jmp 0x89001
movzwl (%rbx), %eax
movzwl (%r13), %edx
addq $0x2, %rbx
addq $0x2, %r13
cmpl %ecx, %eax
cmovael %ecx, %eax
cmpl %ecx, %edx
movl %ecx, %esi
cmovbl %edx, %esi
movl %eax, %ecx
cmpl $0x11, %r12d
ja 0x89048
movl $0x28002, %eax # imm = 0x28002
btl %r12d, %eax
jae 0x89048
movq (%r15), %rdi
movl %ecx, %edx
movl %esi, %r8d
movq %rbx, %rsi
movq %r13, %rcx
xorl %r9d, %r9d
callq 0xa3148
testl %eax, %eax
movq -0x40(%rbp), %rdx
movq -0x38(%rbp), %rsi
jne 0x89088
addq $0x20, %r15
movq -0x48(%rbp), %rax
cmpq 0x10(%rax), %r15
jb 0x88f1b
jmp 0x89077
movl $0x1, %eax
cmpl %esi, %ecx
jne 0x89079
movl %ecx, %ecx
xorl %r8d, %r8d
movq -0x40(%rbp), %rdx
movq -0x38(%rbp), %rsi
cmpq %r8, %rcx
je 0x89034
movb (%rbx,%r8), %r9b
leaq 0x1(%r8), %rdi
cmpb (%r13,%r8), %r9b
movq %rdi, %r8
je 0x8905e
jmp 0x89079
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %eax
jmp 0x89079
nop
|
mi_unique_comp:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r15, [rdi+8]
mov [rbp+var_48], rdi
cmp r15, [rdi+10h]
jnb loc_89077
mov r14d, ecx
mov [rbp+var_40], rdx
mov [rbp+var_38], rsi
mov [rbp+var_2C], ecx
loc_88F1B:
movzx r12d, byte ptr [r15+18h]
movzx ecx, word ptr [r15+14h]
mov dil, [r15+19h]
test dil, dil
jz short loc_88F5E
mov eax, [r15+0Ch]
mov r8b, [rsi+rax]
and r8b, dil
and dil, [rdx+rax]
mov eax, 1
cmp r8b, dil
jnz loc_89079
test r8b, r8b
jz short loc_88F5E
test r14b, r14b
jnz loc_89034
jmp loc_89079
loc_88F5E:
mov r13d, [r15+8]
lea rbx, [rsi+r13]
add r13, rdx
movzx eax, word ptr [r15+12h]
test al, 8
jnz short loc_88F7D
test al, 20h
jnz short loc_88F94
mov esi, ecx
jmp loc_89001
loc_88F7D:
cmp byte ptr [r15+1Ah], 1
jnz short loc_88FE3
movzx eax, byte ptr [rbx]
inc rbx
movzx edx, byte ptr [r13+0]
inc r13
jmp short loc_88FF3
loc_88F94:
movzx edi, byte ptr [r15+1Ah]
mov rsi, rbx
call _mi_calc_blob_length
mov r14, rax
movzx edi, byte ptr [r15+1Ah]
mov rsi, r13
call _mi_calc_blob_length
movzx edx, word ptr [r15+14h]
cmp r14d, edx
mov ecx, edx
cmovb ecx, r14d
cmp eax, edx
mov esi, edx
cmovb esi, eax
test edx, edx
cmovz ecx, r14d
mov r14d, [rbp+var_2C]
cmovz esi, eax
movzx eax, byte ptr [r15+1Ah]
mov rbx, [rbx+rax]
mov r13, [r13+rax+0]
jmp short loc_89001
loc_88FE3:
movzx eax, word ptr [rbx]
movzx edx, word ptr [r13+0]
add rbx, 2
add r13, 2
loc_88FF3:
cmp eax, ecx
cmovnb eax, ecx
cmp edx, ecx
mov esi, ecx
cmovb esi, edx
mov ecx, eax
loc_89001:
cmp r12d, 11h
ja short loc_89048
mov eax, 28002h
bt eax, r12d
jnb short loc_89048
mov rdi, [r15]
mov edx, ecx
mov r8d, esi
mov rsi, rbx
mov rcx, r13
xor r9d, r9d
call ha_compare_text
test eax, eax
mov rdx, [rbp+var_40]
mov rsi, [rbp+var_38]
jnz short loc_89088
loc_89034:
add r15, 20h ; ' '
mov rax, [rbp+var_48]
cmp r15, [rax+10h]
jb loc_88F1B
jmp short loc_89077
loc_89048:
mov eax, 1
cmp ecx, esi
jnz short loc_89079
mov ecx, ecx
xor r8d, r8d
mov rdx, [rbp+var_40]
mov rsi, [rbp+var_38]
loc_8905E:
cmp rcx, r8
jz short loc_89034
mov r9b, [rbx+r8]
lea rdi, [r8+1]
cmp r9b, [r13+r8+0]
mov r8, rdi
jz short loc_8905E
jmp short loc_89079
loc_89077:
xor eax, eax
loc_89079:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_89088:
mov eax, 1
jmp short loc_89079
|
long long mi_unique_comp(long long a1, long long a2, long long a3, char a4)
{
unsigned long long v4; // r15
char v5; // r14
unsigned int v6; // r12d
unsigned int v7; // ecx
char v8; // di
long long v9; // rax
char v10; // r8
char v11; // di
long long result; // rax
long long v13; // r13
unsigned __int8 *v14; // rbx
unsigned __int8 *v15; // r13
__int16 v16; // ax
unsigned int v17; // esi
unsigned int v18; // eax
unsigned int v19; // edx
unsigned int v20; // r14d
unsigned int v21; // eax
unsigned int v22; // edx
long long v23; // rax
int v24; // eax
int v25; // eax
long long v26; // r8
bool v27; // zf
long long v29; // [rsp+10h] [rbp-40h]
long long v30; // [rsp+18h] [rbp-38h]
v4 = *(_QWORD *)(a1 + 8);
if ( v4 < *(_QWORD *)(a1 + 16) )
{
v5 = a4;
v29 = a3;
v30 = a2;
do
{
v6 = *(unsigned __int8 *)(v4 + 24);
v7 = *(unsigned __int16 *)(v4 + 20);
v8 = *(_BYTE *)(v4 + 25);
if ( !v8 )
goto LABEL_8;
v9 = *(unsigned int *)(v4 + 12);
v10 = v8 & *(_BYTE *)(a2 + v9);
v11 = *(_BYTE *)(a3 + v9) & v8;
result = 1LL;
if ( v10 != v11 )
return result;
if ( v10 )
{
if ( !v5 )
return result;
}
else
{
LABEL_8:
v13 = *(unsigned int *)(v4 + 8);
v14 = (unsigned __int8 *)(a2 + v13);
v15 = (unsigned __int8 *)(a3 + v13);
v16 = *(_WORD *)(v4 + 18);
if ( (v16 & 8) != 0 )
{
if ( *(_BYTE *)(v4 + 26) == 1 )
{
v18 = *v14++;
v19 = *v15++;
}
else
{
v18 = *(unsigned __int16 *)v14;
v19 = *(unsigned __int16 *)v15;
v14 += 2;
v15 += 2;
}
if ( v18 >= v7 )
v18 = *(unsigned __int16 *)(v4 + 20);
v17 = *(unsigned __int16 *)(v4 + 20);
if ( v19 < v7 )
v17 = v19;
v7 = v18;
}
else if ( (v16 & 0x20) != 0 )
{
v20 = mi_calc_blob_length(*(unsigned __int8 *)(v4 + 26), v14);
v21 = mi_calc_blob_length(*(unsigned __int8 *)(v4 + 26), v15);
v22 = *(unsigned __int16 *)(v4 + 20);
v7 = v22;
if ( v20 < v22 )
v7 = v20;
v17 = *(unsigned __int16 *)(v4 + 20);
if ( v21 < v22 )
v17 = v21;
if ( !*(_WORD *)(v4 + 20) )
v7 = v20;
v5 = a4;
if ( !*(_WORD *)(v4 + 20) )
v17 = v21;
v23 = *(unsigned __int8 *)(v4 + 26);
v14 = *(unsigned __int8 **)&v14[v23];
v15 = *(unsigned __int8 **)&v15[v23];
}
else
{
v17 = *(unsigned __int16 *)(v4 + 20);
}
if ( v6 <= 0x11 && (v24 = 163842, _bittest(&v24, v6)) )
{
v25 = ha_compare_text(*(_QWORD *)v4, v14, v7, v15, v17, 0LL);
a3 = v29;
a2 = v30;
if ( v25 )
return 1LL;
}
else
{
result = 1LL;
if ( v7 != v17 )
return result;
v26 = 0LL;
a3 = v29;
a2 = v30;
while ( v7 != v26 )
{
v27 = v14[v26] == v15[v26];
++v26;
if ( !v27 )
return result;
}
}
}
v4 += 32LL;
}
while ( v4 < *(_QWORD *)(a1 + 16) );
}
return 0LL;
}
|
mi_unique_comp:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R15,qword ptr [RDI + 0x8]
MOV qword ptr [RBP + -0x48],RDI
CMP R15,qword ptr [RDI + 0x10]
JNC 0x00189077
MOV R14D,ECX
MOV qword ptr [RBP + -0x40],RDX
MOV qword ptr [RBP + -0x38],RSI
MOV dword ptr [RBP + -0x2c],ECX
LAB_00188f1b:
MOVZX R12D,byte ptr [R15 + 0x18]
MOVZX ECX,word ptr [R15 + 0x14]
MOV DIL,byte ptr [R15 + 0x19]
TEST DIL,DIL
JZ 0x00188f5e
MOV EAX,dword ptr [R15 + 0xc]
MOV R8B,byte ptr [RSI + RAX*0x1]
AND R8B,DIL
AND DIL,byte ptr [RDX + RAX*0x1]
MOV EAX,0x1
CMP R8B,DIL
JNZ 0x00189079
TEST R8B,R8B
JZ 0x00188f5e
TEST R14B,R14B
JNZ 0x00189034
JMP 0x00189079
LAB_00188f5e:
MOV R13D,dword ptr [R15 + 0x8]
LEA RBX,[RSI + R13*0x1]
ADD R13,RDX
MOVZX EAX,word ptr [R15 + 0x12]
TEST AL,0x8
JNZ 0x00188f7d
TEST AL,0x20
JNZ 0x00188f94
MOV ESI,ECX
JMP 0x00189001
LAB_00188f7d:
CMP byte ptr [R15 + 0x1a],0x1
JNZ 0x00188fe3
MOVZX EAX,byte ptr [RBX]
INC RBX
MOVZX EDX,byte ptr [R13]
INC R13
JMP 0x00188ff3
LAB_00188f94:
MOVZX EDI,byte ptr [R15 + 0x1a]
MOV RSI,RBX
CALL 0x0017a28d
MOV R14,RAX
MOVZX EDI,byte ptr [R15 + 0x1a]
MOV RSI,R13
CALL 0x0017a28d
MOVZX EDX,word ptr [R15 + 0x14]
CMP R14D,EDX
MOV ECX,EDX
CMOVC ECX,R14D
CMP EAX,EDX
MOV ESI,EDX
CMOVC ESI,EAX
TEST EDX,EDX
CMOVZ ECX,R14D
MOV R14D,dword ptr [RBP + -0x2c]
CMOVZ ESI,EAX
MOVZX EAX,byte ptr [R15 + 0x1a]
MOV RBX,qword ptr [RBX + RAX*0x1]
MOV R13,qword ptr [R13 + RAX*0x1]
JMP 0x00189001
LAB_00188fe3:
MOVZX EAX,word ptr [RBX]
MOVZX EDX,word ptr [R13]
ADD RBX,0x2
ADD R13,0x2
LAB_00188ff3:
CMP EAX,ECX
CMOVNC EAX,ECX
CMP EDX,ECX
MOV ESI,ECX
CMOVC ESI,EDX
MOV ECX,EAX
LAB_00189001:
CMP R12D,0x11
JA 0x00189048
MOV EAX,0x28002
BT EAX,R12D
JNC 0x00189048
MOV RDI,qword ptr [R15]
MOV EDX,ECX
MOV R8D,ESI
MOV RSI,RBX
MOV RCX,R13
XOR R9D,R9D
CALL 0x001a3148
TEST EAX,EAX
MOV RDX,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x38]
JNZ 0x00189088
LAB_00189034:
ADD R15,0x20
MOV RAX,qword ptr [RBP + -0x48]
CMP R15,qword ptr [RAX + 0x10]
JC 0x00188f1b
JMP 0x00189077
LAB_00189048:
MOV EAX,0x1
CMP ECX,ESI
JNZ 0x00189079
MOV ECX,ECX
XOR R8D,R8D
MOV RDX,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x38]
LAB_0018905e:
CMP RCX,R8
JZ 0x00189034
MOV R9B,byte ptr [RBX + R8*0x1]
LEA RDI,[R8 + 0x1]
CMP R9B,byte ptr [R13 + R8*0x1]
MOV R8,RDI
JZ 0x0018905e
JMP 0x00189079
LAB_00189077:
XOR EAX,EAX
LAB_00189079:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00189088:
MOV EAX,0x1
JMP 0x00189079
|
int8 mi_unique_comp(long param_1,long param_2,long param_3,char param_4)
{
byte *pbVar1;
byte *pbVar2;
byte bVar3;
byte bVar4;
ushort uVar5;
uint uVar6;
uint uVar7;
uint uVar8;
int iVar9;
uint uVar10;
ulong uVar11;
uint uVar12;
ushort *puVar13;
byte bVar14;
ulong uVar15;
ushort *puVar16;
int8 *puVar17;
puVar17 = *(int8 **)(param_1 + 8);
if (puVar17 < *(int8 **)(param_1 + 0x10)) {
do {
bVar4 = *(byte *)(puVar17 + 3);
uVar5 = *(ushort *)((long)puVar17 + 0x14);
uVar11 = (ulong)uVar5;
bVar3 = *(byte *)((long)puVar17 + 0x19);
if (bVar3 == 0) {
LAB_00188f5e:
puVar13 = (ushort *)(param_2 + (ulong)*(uint *)(puVar17 + 1));
puVar16 = (ushort *)((ulong)*(uint *)(puVar17 + 1) + param_3);
if ((*(ushort *)((long)puVar17 + 0x12) & 8) == 0) {
if ((*(ushort *)((long)puVar17 + 0x12) & 0x20) == 0) {
uVar10 = (uint)uVar5;
}
else {
uVar7 = _mi_calc_blob_length(*(int1 *)((long)puVar17 + 0x1a),puVar13);
uVar8 = _mi_calc_blob_length(*(int1 *)((long)puVar17 + 0x1a),puVar16);
uVar5 = *(ushort *)((long)puVar17 + 0x14);
uVar6 = (uint)uVar5;
if (uVar7 < uVar5) {
uVar6 = uVar7;
}
uVar12 = (uint)uVar5;
uVar10 = uVar12;
if (uVar8 < uVar12) {
uVar10 = uVar8;
}
if (uVar12 == 0) {
uVar10 = uVar8;
uVar6 = uVar7;
}
uVar11 = (ulong)uVar6;
puVar13 = *(ushort **)((long)puVar13 + (ulong)*(byte *)((long)puVar17 + 0x1a));
puVar16 = *(ushort **)((long)puVar16 + (ulong)*(byte *)((long)puVar17 + 0x1a));
}
}
else {
if (*(char *)((long)puVar17 + 0x1a) == '\x01') {
uVar6 = (uint)(byte)*puVar13;
puVar13 = (ushort *)((long)puVar13 + 1);
uVar7 = (uint)(byte)*puVar16;
puVar16 = (ushort *)((long)puVar16 + 1);
}
else {
uVar6 = (uint)*puVar13;
uVar7 = (uint)*puVar16;
puVar13 = puVar13 + 1;
puVar16 = puVar16 + 1;
}
uVar10 = (uint)uVar5;
if (uVar10 <= uVar6) {
uVar6 = uVar10;
}
if (uVar7 < uVar10) {
uVar10 = uVar7;
}
uVar11 = (ulong)uVar6;
}
if ((bVar4 < 0x12) && ((0x28002U >> (bVar4 & 0x1f) & 1) != 0)) {
iVar9 = ha_compare_text(*puVar17,puVar13,uVar11,puVar16,uVar10,0);
if (iVar9 != 0) {
return 1;
}
}
else {
if ((uint)uVar11 != uVar10) {
return 1;
}
uVar15 = 0;
while (uVar11 != uVar15) {
pbVar1 = (byte *)((long)puVar13 + uVar15);
pbVar2 = (byte *)((long)puVar16 + uVar15);
uVar15 = uVar15 + 1;
if (*pbVar1 != *pbVar2) {
return 1;
}
}
}
}
else {
bVar14 = *(byte *)(param_2 + (ulong)*(uint *)((long)puVar17 + 0xc)) & bVar3;
if (bVar14 != (bVar3 & *(byte *)(param_3 + (ulong)*(uint *)((long)puVar17 + 0xc)))) {
return 1;
}
if (bVar14 == 0) goto LAB_00188f5e;
if (param_4 == '\0') {
return 1;
}
}
puVar17 = puVar17 + 4;
} while (puVar17 < *(int8 **)(param_1 + 0x10));
}
return 0;
}
|
|
57,558
|
reset_root_defaults
|
eloqsql/mysys/my_alloc.c
|
void reset_root_defaults(MEM_ROOT *mem_root, size_t block_size,
size_t pre_alloc_size __attribute__((unused)))
{
DBUG_ENTER("reset_root_defaults");
DBUG_ASSERT(alloc_root_inited(mem_root));
mem_root->block_size= (((block_size - ALLOC_ROOT_MIN_BLOCK_SIZE) & ~1) |
(mem_root->block_size & 1));
#if !(defined(HAVE_valgrind) && defined(EXTRA_DEBUG))
if (pre_alloc_size)
{
size_t size= pre_alloc_size + ALIGN_SIZE(sizeof(USED_MEM));
if (!mem_root->pre_alloc || mem_root->pre_alloc->size != size)
{
USED_MEM *mem, **prev= &mem_root->free;
/*
Free unused blocks, so that consequent calls
to reset_root_defaults won't eat away memory.
*/
while (*prev)
{
mem= *prev;
if (mem->size == size)
{
/* We found a suitable block, no need to do anything else */
mem_root->pre_alloc= mem;
DBUG_VOID_RETURN;
}
if (mem->left + ALIGN_SIZE(sizeof(USED_MEM)) == mem->size)
{
/* remove block from the list and free it */
*prev= mem->next;
my_free(mem);
}
else
prev= &mem->next;
}
/* Allocate new prealloc block and add it to the end of free list */
if ((mem= (USED_MEM *) my_malloc(mem_root->m_psi_key, size,
MYF(MALLOC_FLAG(mem_root->
block_size)))))
{
mem->size= size;
mem->left= pre_alloc_size;
mem->next= *prev;
*prev= mem_root->pre_alloc= mem;
TRASH_MEM(mem);
}
else
{
mem_root->pre_alloc= 0;
}
}
}
else
#endif
mem_root->pre_alloc= 0;
DBUG_VOID_RETURN;
}
|
O0
|
c
|
reset_root_defaults:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
jmp 0x682d6
movq -0x10(%rbp), %rcx
subq $0x28, %rcx
andq $-0x2, %rcx
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
andq $0x1, %rax
orq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x20(%rax)
cmpq $0x0, -0x18(%rbp)
je 0x6842f
movq -0x18(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x68331
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
cmpq -0x20(%rbp), %rax
je 0x6842d
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq $0x0, (%rax)
je 0x683a6
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
cmpq -0x20(%rbp), %rax
jne 0x6836d
movq -0x28(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x6843f
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
addq $0x18, %rax
movq -0x28(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jne 0x6839c
movq -0x28(%rbp), %rax
movq (%rax), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rdi
callq 0x592a0
jmp 0x683a4
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x68339
movq -0x8(%rbp), %rax
movl 0x38(%rax), %edi
movq -0x20(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdx
andq $0x1, %rdx
xorl %eax, %eax
movl $0x10000, %ecx # imm = 0x10000
cmpq $0x0, %rdx
cmovnel %ecx, %eax
movl %eax, %eax
movl %eax, %edx
callq 0x58f20
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x6841f
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rax
movq (%rax), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
jmp 0x68419
jmp 0x6841b
jmp 0x6841d
jmp 0x6842b
movq -0x8(%rbp), %rax
movq $0x0, 0x10(%rax)
jmp 0x6842d
jmp 0x6843b
movq -0x8(%rbp), %rax
movq $0x0, 0x10(%rax)
jmp 0x6843d
jmp 0x6843f
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
reset_root_defaults:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
jmp short $+2
loc_682D6:
mov rcx, [rbp+var_10]
sub rcx, 28h ; '('
and rcx, 0FFFFFFFFFFFFFFFEh
mov rax, [rbp+var_8]
mov rax, [rax+20h]
and rax, 1
or rcx, rax
mov rax, [rbp+var_8]
mov [rax+20h], rcx
cmp [rbp+var_18], 0
jz loc_6842F
mov rax, [rbp+var_18]
add rax, 18h
mov [rbp+var_20], rax
mov rax, [rbp+var_8]
cmp qword ptr [rax+10h], 0
jz short loc_68331
mov rax, [rbp+var_8]
mov rax, [rax+10h]
mov rax, [rax+10h]
cmp rax, [rbp+var_20]
jz loc_6842D
loc_68331:
mov rax, [rbp+var_8]
mov [rbp+var_30], rax
loc_68339:
mov rax, [rbp+var_30]
cmp qword ptr [rax], 0
jz short loc_683A6
mov rax, [rbp+var_30]
mov rax, [rax]
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
mov rax, [rax+10h]
cmp rax, [rbp+var_20]
jnz short loc_6836D
mov rcx, [rbp+var_28]
mov rax, [rbp+var_8]
mov [rax+10h], rcx
jmp loc_6843F
loc_6836D:
mov rax, [rbp+var_28]
mov rax, [rax+8]
add rax, 18h
mov rcx, [rbp+var_28]
cmp rax, [rcx+10h]
jnz short loc_6839C
mov rax, [rbp+var_28]
mov rcx, [rax]
mov rax, [rbp+var_30]
mov [rax], rcx
mov rdi, [rbp+var_28]
call my_free
jmp short loc_683A4
loc_6839C:
mov rax, [rbp+var_28]
mov [rbp+var_30], rax
loc_683A4:
jmp short loc_68339
loc_683A6:
mov rax, [rbp+var_8]
mov edi, [rax+38h]
mov rsi, [rbp+var_20]
mov rax, [rbp+var_8]
mov rdx, [rax+20h]
and rdx, 1
xor eax, eax
mov ecx, 10000h
cmp rdx, 0
cmovnz eax, ecx
mov eax, eax
mov edx, eax
call my_malloc
mov [rbp+var_28], rax
cmp rax, 0
jz short loc_6841F
mov rcx, [rbp+var_20]
mov rax, [rbp+var_28]
mov [rax+10h], rcx
mov rcx, [rbp+var_18]
mov rax, [rbp+var_28]
mov [rax+8], rcx
mov rax, [rbp+var_30]
mov rcx, [rax]
mov rax, [rbp+var_28]
mov [rax], rcx
mov rcx, [rbp+var_28]
mov rax, [rbp+var_8]
mov [rax+10h], rcx
mov rax, [rbp+var_30]
mov [rax], rcx
jmp short $+2
loc_68419:
jmp short $+2
loc_6841B:
jmp short $+2
loc_6841D:
jmp short loc_6842B
loc_6841F:
mov rax, [rbp+var_8]
mov qword ptr [rax+10h], 0
loc_6842B:
jmp short $+2
loc_6842D:
jmp short loc_6843B
loc_6842F:
mov rax, [rbp+var_8]
mov qword ptr [rax+10h], 0
loc_6843B:
jmp short $+2
loc_6843D:
jmp short $+2
loc_6843F:
add rsp, 30h
pop rbp
retn
|
long long * reset_root_defaults(long long *a1, long long a2, long long a3)
{
long long *result; // rax
unsigned int v4; // edi
int v5; // eax
long long *v6; // [rsp+0h] [rbp-30h]
long long *v7; // [rsp+8h] [rbp-28h]
_QWORD *v8; // [rsp+8h] [rbp-28h]
unsigned long long v9; // [rsp+10h] [rbp-20h]
a1[4] = a1[4] & 1 | (a2 - 40) & 0xFFFFFFFFFFFFFFFELL;
if ( a3 )
{
v9 = a3 + 24;
if ( !a1[2] || (result = *(long long **)(a1[2] + 16), result != (long long *)v9) )
{
v6 = a1;
while ( *v6 )
{
v7 = (long long *)*v6;
if ( *(_QWORD *)(*v6 + 16) == v9 )
{
result = a1;
a1[2] = (long long)v7;
return result;
}
if ( v7[1] + 24 == v7[2] )
{
*v6 = *v7;
my_free((long long)v7);
}
else
{
v6 = (long long *)*v6;
}
}
v4 = *((_DWORD *)a1 + 14);
v5 = 0;
if ( (a1[4] & 1) != 0 )
v5 = 0x10000;
v8 = (_QWORD *)my_malloc(v4, v9, v5);
if ( v8 )
{
v8[2] = v9;
v8[1] = a3;
*v8 = *v6;
a1[2] = (long long)v8;
result = v6;
*v6 = (long long)v8;
}
else
{
result = a1;
a1[2] = 0LL;
}
}
}
else
{
result = a1;
a1[2] = 0LL;
}
return result;
}
|
reset_root_defaults:
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
JMP 0x001682d6
LAB_001682d6:
MOV RCX,qword ptr [RBP + -0x10]
SUB RCX,0x28
AND RCX,-0x2
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x20]
AND RAX,0x1
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x20],RCX
CMP qword ptr [RBP + -0x18],0x0
JZ 0x0016842f
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x18
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x10],0x0
JZ 0x00168331
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RAX + 0x10]
CMP RAX,qword ptr [RBP + -0x20]
JZ 0x0016842d
LAB_00168331:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x30],RAX
LAB_00168339:
MOV RAX,qword ptr [RBP + -0x30]
CMP qword ptr [RAX],0x0
JZ 0x001683a6
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x10]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x0016836d
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x10],RCX
JMP 0x0016843f
LAB_0016836d:
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x8]
ADD RAX,0x18
MOV RCX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RCX + 0x10]
JNZ 0x0016839c
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x001592a0
JMP 0x001683a4
LAB_0016839c:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x30],RAX
LAB_001683a4:
JMP 0x00168339
LAB_001683a6:
MOV RAX,qword ptr [RBP + -0x8]
MOV EDI,dword ptr [RAX + 0x38]
MOV RSI,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RAX + 0x20]
AND RDX,0x1
XOR EAX,EAX
MOV ECX,0x10000
CMP RDX,0x0
CMOVNZ EAX,ECX
MOV EAX,EAX
MOV EDX,EAX
CALL 0x00158f20
MOV qword ptr [RBP + -0x28],RAX
CMP RAX,0x0
JZ 0x0016841f
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX + 0x10],RCX
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
JMP 0x00168419
LAB_00168419:
JMP 0x0016841b
LAB_0016841b:
JMP 0x0016841d
LAB_0016841d:
JMP 0x0016842b
LAB_0016841f:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x10],0x0
LAB_0016842b:
JMP 0x0016842d
LAB_0016842d:
JMP 0x0016843b
LAB_0016842f:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x10],0x0
LAB_0016843b:
JMP 0x0016843d
LAB_0016843d:
JMP 0x0016843f
LAB_0016843f:
ADD RSP,0x30
POP RBP
RET
|
void reset_root_defaults(long *param_1,long param_2,long param_3)
{
int4 uVar1;
long lVar2;
long *plVar3;
long *local_38;
param_1[4] = param_2 - 0x28U & 0xfffffffffffffffe | param_1[4] & 1U;
if (param_3 == 0) {
param_1[2] = 0;
}
else {
lVar2 = param_3 + 0x18;
plVar3 = param_1;
if ((param_1[2] == 0) || (plVar3 = param_1, *(long *)(param_1[2] + 0x10) != lVar2)) {
while (local_38 = plVar3, *local_38 != 0) {
plVar3 = (long *)*local_38;
if (plVar3[2] == lVar2) {
param_1[2] = (long)plVar3;
return;
}
if (plVar3[1] + 0x18 == plVar3[2]) {
*local_38 = *plVar3;
my_free(plVar3);
plVar3 = local_38;
}
}
uVar1 = 0;
if ((param_1[4] & 1U) != 0) {
uVar1 = 0x10000;
}
plVar3 = (long *)my_malloc((int)param_1[7],lVar2,uVar1);
if (plVar3 == (long *)0x0) {
param_1[2] = 0;
}
else {
plVar3[2] = lVar2;
plVar3[1] = param_3;
*plVar3 = *local_38;
param_1[2] = (long)plVar3;
*local_38 = (long)plVar3;
}
}
}
return;
}
|
|
57,559
|
my_fwrite
|
eloqsql/mysys/my_fstream.c
|
size_t my_fwrite(FILE *stream, const uchar *Buffer, size_t Count, myf MyFlags)
{
size_t writtenbytes =0;
my_off_t seekptr;
#if !defined(NO_BACKGROUND) && defined(USE_MY_STREAM)
uint errors;
#endif
DBUG_ENTER("my_fwrite");
DBUG_PRINT("my",("stream:%p Buffer:%p Count: %u MyFlags: %lu",
stream, Buffer, (uint) Count, MyFlags));
#if !defined(NO_BACKGROUND) && defined(USE_MY_STREAM)
errors=0;
#endif
seekptr= ftell(stream);
for (;;)
{
size_t written;
if ((written = (size_t) fwrite((char*) Buffer,sizeof(char),
Count, stream)) != Count)
{
DBUG_PRINT("error",("Write only %d bytes", (int) writtenbytes));
my_errno=errno;
if (written != (size_t) -1)
{
seekptr+=written;
Buffer+=written;
writtenbytes+=written;
Count-=written;
}
#ifdef EINTR
if (errno == EINTR)
{
(void) my_fseek(stream,seekptr,MY_SEEK_SET,MYF(0));
continue;
}
#endif
#if !defined(NO_BACKGROUND) && defined(USE_MY_STREAM)
if (my_thread_var->abort)
MyFlags&= ~ MY_WAIT_IF_FULL; /* End if aborted by user */
if ((errno == ENOSPC || errno == EDQUOT) &&
(MyFlags & MY_WAIT_IF_FULL))
{
wait_for_free_space("[stream]", errors);
errors++;
(void) my_fseek(stream,seekptr,MY_SEEK_SET,MYF(0));
continue;
}
#endif
if (ferror(stream) || (MyFlags & (MY_NABP | MY_FNABP)))
{
if (MyFlags & (MY_WME | MY_FAE | MY_FNABP))
{
my_error(EE_WRITE, MYF(ME_BELL),
my_filename(my_fileno(stream)), errno);
}
writtenbytes= (size_t) -1; /* Return that we got error */
break;
}
}
if (MyFlags & (MY_NABP | MY_FNABP))
writtenbytes= 0; /* Everything OK */
else
writtenbytes+= written;
break;
}
DBUG_RETURN(writtenbytes);
}
|
O0
|
c
|
my_fwrite:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
jmp 0x78672
movq -0x8(%rbp), %rdi
callq 0x36bf0
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
movq -0x8(%rbp), %rcx
movl $0x1, %esi
callq 0x36a90
movq %rax, -0x38(%rbp)
cmpq -0x18(%rbp), %rax
je 0x7877d
jmp 0x786a5
jmp 0x786a7
callq 0x36990
movl (%rax), %eax
movl %eax, -0x3c(%rbp)
callq 0x7ed00
movl -0x3c(%rbp), %ecx
movl %ecx, (%rax)
cmpq $-0x1, -0x38(%rbp)
je 0x786f5
movq -0x38(%rbp), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x38(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x38(%rbp), %rcx
movq -0x18(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x18(%rbp)
callq 0x36990
cmpl $0x4, (%rax)
jne 0x78717
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
xorl %edx, %edx
xorl %eax, %eax
movl %eax, %ecx
callq 0x787c0
jmp 0x7867f
movq -0x8(%rbp), %rdi
callq 0x367a0
cmpl $0x0, %eax
jne 0x78733
movq -0x20(%rbp), %rax
andq $0x6, %rax
cmpq $0x0, %rax
je 0x7877b
movq -0x20(%rbp), %rax
andq $0x1a, %rax
cmpq $0x0, %rax
je 0x78771
movq -0x8(%rbp), %rdi
callq 0x78630
movl %eax, %edi
callq 0x83bd0
movq %rax, -0x48(%rbp)
callq 0x36990
movq -0x48(%rbp), %rdx
movl (%rax), %ecx
movl $0x3, %edi
movl $0x4, %esi
movb $0x0, %al
callq 0x779f0
movq $-0x1, -0x28(%rbp)
jmp 0x787a3
jmp 0x7877d
movq -0x20(%rbp), %rax
andq $0x6, %rax
cmpq $0x0, %rax
je 0x78795
movq $0x0, -0x28(%rbp)
jmp 0x787a1
movq -0x38(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x787a3
jmp 0x787a5
movq -0x28(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
my_fwrite:
push rbp
mov rbp, rsp
sub rsp, 50h
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
jmp short $+2
loc_78672:
mov rdi, [rbp+var_8]
call _ftello64
mov [rbp+var_30], rax
loc_7867F:
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_8]
mov esi, 1
call _fwrite
mov [rbp+var_38], rax
cmp rax, [rbp+var_18]
jz loc_7877D
jmp short $+2
loc_786A5:
jmp short $+2
loc_786A7:
call ___errno_location
mov eax, [rax]
mov [rbp+var_3C], eax
call _my_thread_var
mov ecx, [rbp+var_3C]
mov [rax], ecx
cmp [rbp+var_38], 0FFFFFFFFFFFFFFFFh
jz short loc_786F5
mov rax, [rbp+var_38]
add rax, [rbp+var_30]
mov [rbp+var_30], rax
mov rax, [rbp+var_38]
add rax, [rbp+var_10]
mov [rbp+var_10], rax
mov rax, [rbp+var_38]
add rax, [rbp+var_28]
mov [rbp+var_28], rax
mov rcx, [rbp+var_38]
mov rax, [rbp+var_18]
sub rax, rcx
mov [rbp+var_18], rax
loc_786F5:
call ___errno_location
cmp dword ptr [rax], 4
jnz short loc_78717
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_30]
xor edx, edx
xor eax, eax
mov ecx, eax
call my_fseek
jmp loc_7867F
loc_78717:
mov rdi, [rbp+var_8]
call _ferror
cmp eax, 0
jnz short loc_78733
mov rax, [rbp+var_20]
and rax, 6
cmp rax, 0
jz short loc_7877B
loc_78733:
mov rax, [rbp+var_20]
and rax, 1Ah
cmp rax, 0
jz short loc_78771
mov rdi, [rbp+var_8]
call my_fileno
mov edi, eax
call my_filename
mov [rbp+var_48], rax
call ___errno_location
mov rdx, [rbp+var_48]
mov ecx, [rax]
mov edi, 3
mov esi, 4
mov al, 0
call my_error
loc_78771:
mov [rbp+var_28], 0FFFFFFFFFFFFFFFFh
jmp short loc_787A3
loc_7877B:
jmp short $+2
loc_7877D:
mov rax, [rbp+var_20]
and rax, 6
cmp rax, 0
jz short loc_78795
mov [rbp+var_28], 0
jmp short loc_787A1
loc_78795:
mov rax, [rbp+var_38]
add rax, [rbp+var_28]
mov [rbp+var_28], rax
loc_787A1:
jmp short $+2
loc_787A3:
jmp short $+2
loc_787A5:
mov rax, [rbp+var_28]
mov [rbp+var_50], rax
mov rax, [rbp+var_50]
add rsp, 50h
pop rbp
retn
|
long long my_fwrite(long long a1, long long a2, long long a3, char a4)
{
long long v4; // rdi
long long v5; // rdi
unsigned int *v6; // rax
long long v8; // [rsp+8h] [rbp-48h]
int v9; // [rsp+14h] [rbp-3Ch]
long long v10; // [rsp+18h] [rbp-38h]
long long i; // [rsp+20h] [rbp-30h]
long long v12; // [rsp+28h] [rbp-28h]
v12 = 0LL;
for ( i = ftello64(a1); ; my_fseek(a1, i, 0LL, 0LL) )
{
v4 = a2;
v10 = fwrite(a2, 1LL, a3, a1);
if ( v10 == a3 )
goto LABEL_12;
v9 = *(_DWORD *)__errno_location(a2);
*(_DWORD *)my_thread_var() = v9;
if ( v10 != -1 )
{
i += v10;
a2 += v10;
v12 += v10;
a3 -= v10;
}
if ( *(_DWORD *)__errno_location(v4) != 4 )
break;
}
if ( !(unsigned int)ferror(a1) && (a4 & 6) == 0 )
{
LABEL_12:
if ( (a4 & 6) != 0 )
return 0LL;
else
return v12 + v10;
}
if ( (a4 & 0x1A) != 0 )
{
v5 = (unsigned int)my_fileno(a1);
v8 = my_filename(v5);
v6 = (unsigned int *)__errno_location(v5);
my_error(3u, 4LL, v8, *v6);
}
return -1LL;
}
|
my_fwrite:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
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
JMP 0x00178672
LAB_00178672:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00136bf0
MOV qword ptr [RBP + -0x30],RAX
LAB_0017867f:
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x8]
MOV ESI,0x1
CALL 0x00136a90
MOV qword ptr [RBP + -0x38],RAX
CMP RAX,qword ptr [RBP + -0x18]
JZ 0x0017877d
JMP 0x001786a5
LAB_001786a5:
JMP 0x001786a7
LAB_001786a7:
CALL 0x00136990
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x3c],EAX
CALL 0x0017ed00
MOV ECX,dword ptr [RBP + -0x3c]
MOV dword ptr [RAX],ECX
CMP qword ptr [RBP + -0x38],-0x1
JZ 0x001786f5
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x28],RAX
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x18]
SUB RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
LAB_001786f5:
CALL 0x00136990
CMP dword ptr [RAX],0x4
JNZ 0x00178717
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x30]
XOR EDX,EDX
XOR EAX,EAX
MOV ECX,EAX
CALL 0x001787c0
JMP 0x0017867f
LAB_00178717:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001367a0
CMP EAX,0x0
JNZ 0x00178733
MOV RAX,qword ptr [RBP + -0x20]
AND RAX,0x6
CMP RAX,0x0
JZ 0x0017877b
LAB_00178733:
MOV RAX,qword ptr [RBP + -0x20]
AND RAX,0x1a
CMP RAX,0x0
JZ 0x00178771
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00178630
MOV EDI,EAX
CALL 0x00183bd0
MOV qword ptr [RBP + -0x48],RAX
CALL 0x00136990
MOV RDX,qword ptr [RBP + -0x48]
MOV ECX,dword ptr [RAX]
MOV EDI,0x3
MOV ESI,0x4
MOV AL,0x0
CALL 0x001779f0
LAB_00178771:
MOV qword ptr [RBP + -0x28],-0x1
JMP 0x001787a3
LAB_0017877b:
JMP 0x0017877d
LAB_0017877d:
MOV RAX,qword ptr [RBP + -0x20]
AND RAX,0x6
CMP RAX,0x0
JZ 0x00178795
MOV qword ptr [RBP + -0x28],0x0
JMP 0x001787a1
LAB_00178795:
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x28],RAX
LAB_001787a1:
JMP 0x001787a3
LAB_001787a3:
JMP 0x001787a5
LAB_001787a5:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x50]
ADD RSP,0x50
POP RBP
RET
|
long my_fwrite(FILE *param_1,void *param_2,size_t param_3,ulong param_4)
{
int iVar1;
int4 uVar2;
size_t sVar3;
int *piVar4;
int8 uVar5;
long local_38;
long local_30;
size_t local_20;
void *local_18;
local_30 = 0;
local_38 = ftello64(param_1);
local_20 = param_3;
local_18 = param_2;
do {
sVar3 = fwrite(local_18,1,local_20,param_1);
if (sVar3 == local_20) {
LAB_0017877d:
if ((param_4 & 6) == 0) {
local_30 = sVar3 + local_30;
}
else {
local_30 = 0;
}
return local_30;
}
piVar4 = __errno_location();
iVar1 = *piVar4;
piVar4 = (int *)_my_thread_var();
*piVar4 = iVar1;
if (sVar3 != 0xffffffffffffffff) {
local_38 = sVar3 + local_38;
local_18 = (void *)(sVar3 + (long)local_18);
local_30 = sVar3 + local_30;
local_20 = local_20 - sVar3;
}
piVar4 = __errno_location();
if (*piVar4 != 4) {
iVar1 = ferror(param_1);
if ((iVar1 != 0) || ((param_4 & 6) != 0)) {
if ((param_4 & 0x1a) != 0) {
uVar2 = my_fileno(param_1);
uVar5 = my_filename(uVar2);
piVar4 = __errno_location();
my_error(3,4,uVar5,*piVar4);
}
return -1;
}
goto LAB_0017877d;
}
my_fseek(param_1,local_38,0,0);
} while( true );
}
|
|
57,560
|
std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*> nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::handle_value<bool&>(bool&, bool)
|
llama.cpp/common/json.hpp
|
std::pair<bool, BasicJsonType*> handle_value(Value&& v, const bool skip_callback = false)
{
JSON_ASSERT(!keep_stack.empty());
// do not handle this value if we know it would be added to a discarded
// container
if (!keep_stack.back())
{
return {false, nullptr};
}
// create value
auto value = BasicJsonType(std::forward<Value>(v));
// check callback
const bool keep = skip_callback || callback(static_cast<int>(ref_stack.size()), parse_event_t::value, value);
// do not handle this value if we just learnt it shall be discarded
if (!keep)
{
return {false, nullptr};
}
if (ref_stack.empty())
{
root = std::move(value);
return {true, & root};
}
// skip this value if we already decided to skip the parent
// (https://github.com/nlohmann/json/issues/971#issuecomment-413678360)
if (!ref_stack.back())
{
return {false, nullptr};
}
// we now only expect arrays and objects
JSON_ASSERT(ref_stack.back()->is_array() || ref_stack.back()->is_object());
// array
if (ref_stack.back()->is_array())
{
ref_stack.back()->m_data.m_value.array->emplace_back(std::move(value));
return {true, & (ref_stack.back()->m_data.m_value.array->back())};
}
// object
JSON_ASSERT(ref_stack.back()->is_object());
// check if we should store an element for the current key
JSON_ASSERT(!key_keep_stack.empty());
const bool store_element = key_keep_stack.back();
key_keep_stack.pop_back();
if (!store_element)
{
return {false, nullptr};
}
JSON_ASSERT(object_element);
*object_element = std::move(value);
return {true, object_element};
}
|
O3
|
cpp
|
std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*> nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::handle_value<bool&>(bool&, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movl %edx, %ebp
movq %rdi, %rbx
movq 0x30(%rdi), %rax
movl 0x38(%rdi), %ecx
cmpq %rax, 0x20(%rdi)
sete %dl
testl %ecx, %ecx
sete %dil
andb %dl, %dil
cmpb $0x1, %dil
je 0x8b3b6
movl %ecx, %ecx
movabsq $-0x8000000000000000, %r15 # imm = 0x8000000000000000
leaq -0x1(%rcx), %rdx
addq $0x3e, %rcx
testq %rdx, %rdx
cmovnsq %rdx, %rcx
sarq $0x6, %rcx
leaq (%rax,%rcx,8), %rax
leaq 0x3f(%r15), %rcx
andq %rdx, %rcx
xorl %edi, %edi
cmpq %r15, %rcx
setbe %dil
movq -0x8(%rax,%rdi,8), %rax
btq %rdx, %rax
jae 0x8b249
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r14
movaps %xmm0, (%r14)
movq (%rsi), %rsi
movq %r14, %rdi
callq 0x8b450
movq %r14, %rdi
movl $0x1, %esi
callq 0x8400e
testb %bpl, %bpl
jne 0x8b1f6
movq 0x10(%rbx), %rax
subq 0x8(%rbx), %rax
shrq $0x3, %rax
movl %eax, 0xc(%rsp)
movb $0x5, 0xb(%rsp)
cmpq $0x0, 0x90(%rbx)
je 0x8b3d7
leaq 0x80(%rbx), %rdi
leaq 0xc(%rsp), %rsi
leaq 0xb(%rsp), %rdx
leaq 0x10(%rsp), %rcx
callq *0x98(%rbx)
testb %al, %al
je 0x8b38a
movq 0x10(%rbx), %rax
cmpq %rax, 0x8(%rbx)
je 0x8b253
movq -0x8(%rax), %rax
testq %rax, %rax
je 0x8b38a
movzbl (%rax), %ecx
cmpl $0x1, %ecx
je 0x8b2ad
cmpl $0x2, %ecx
jne 0x8b3dc
movq 0x8(%rax), %rdi
leaq 0x10(%rsp), %rsi
callq 0x87e24
movq 0x10(%rbx), %rax
movq -0x8(%rax), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %r14
addq $-0x10, %r14
jmp 0x8b386
xorl %ebx, %ebx
xorl %r14d, %r14d
jmp 0x8b3a6
leaq 0x10(%rsp), %r14
movaps (%r14), %xmm0
leaq 0x30(%rsp), %r15
movaps %xmm0, (%r15)
movq %r14, %rdi
xorl %esi, %esi
callq 0x8400e
movb $0x0, (%r14)
movq $0x0, 0x8(%r14)
movq %r15, %rdi
movl $0x1, %esi
callq 0x8400e
movq (%rbx), %rdi
movq %r15, %rsi
callq 0x8617a
movq %r15, %rdi
xorl %esi, %esi
callq 0x8400e
movq %r15, %rdi
callq 0x88728
movq (%rbx), %r14
jmp 0x8b386
movq 0x58(%rbx), %rax
movl 0x60(%rbx), %ecx
cmpq %rax, 0x48(%rbx)
sete %dl
testl %ecx, %ecx
sete %sil
andb %dl, %sil
cmpb $0x1, %sil
je 0x8b3ea
movl %ecx, %esi
leaq -0x1(%rsi), %rcx
movq %rsi, %rdx
addq $0x3e, %rdx
testq %rcx, %rcx
cmovnsq %rcx, %rdx
sarq $0x6, %rdx
leaq (%rax,%rdx,8), %rdi
leaq 0x3f(%r15), %rdx
andq %rcx, %rdx
xorl %r8d, %r8d
cmpq %r15, %rdx
setbe %r8b
movl $0x1, %edx
shlq %cl, %rdx
andq -0x8(%rdi,%r8,8), %rdx
subl $0x1, %esi
movl %esi, 0x60(%rbx)
jae 0x8b31f
movl $0x3f, 0x60(%rbx)
addq $-0x8, %rax
movq %rax, 0x58(%rbx)
testq %rdx, %rdx
je 0x8b38a
cmpq $0x0, 0x70(%rbx)
je 0x8b40b
leaq 0x10(%rsp), %r14
movaps (%r14), %xmm0
leaq 0x20(%rsp), %r15
movaps %xmm0, (%r15)
movq %r14, %rdi
xorl %esi, %esi
callq 0x8400e
movb $0x0, (%r14)
movq $0x0, 0x8(%r14)
movq %r15, %rdi
movl $0x1, %esi
callq 0x8400e
movq 0x70(%rbx), %rdi
movq %r15, %rsi
callq 0x8617a
movq %r15, %rdi
xorl %esi, %esi
callq 0x8400e
movq %r15, %rdi
callq 0x88728
movq 0x70(%rbx), %r14
movb $0x1, %bl
jmp 0x8b38f
xorl %ebx, %ebx
xorl %r14d, %r14d
leaq 0x10(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x8400e
movq %r15, %rdi
callq 0x88728
movl %ebx, %eax
movq %r14, %rdx
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8d365(%rip), %rdi # 0x118722
leaq 0x8d399(%rip), %rdx # 0x11875d
leaq 0x8e2c4(%rip), %rcx # 0x11968f
movl $0x1c28, %esi # imm = 0x1C28
xorl %eax, %eax
callq 0x20e70
callq 0x212b0
leaq 0x8e2c0(%rip), %rcx # 0x1196a3
movl $0x1c4b, %esi # imm = 0x1C4B
jmp 0x8b3f6
leaq 0x8e2f0(%rip), %rcx # 0x1196e1
movl $0x1c57, %esi # imm = 0x1C57
leaq 0x8d325(%rip), %rdi # 0x118722
leaq 0x8d359(%rip), %rdx # 0x11875d
xorl %eax, %eax
callq 0x20e70
leaq 0x8d310(%rip), %rdi # 0x118722
leaq 0x8d344(%rip), %rdx # 0x11875d
leaq 0x8e2d9(%rip), %rcx # 0x1196f9
movl $0x1c60, %esi # imm = 0x1C60
xorl %eax, %eax
callq 0x20e70
jmp 0x8b42e
movq %rax, %rbx
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x8400e
movq %r14, %rdi
callq 0x88728
movq %rbx, %rdi
callq 0x20b00
|
_ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12handle_valueIRmEESt4pairIbPSF_EOT_b:
push rbp
push r15
push r14
push rbx
sub rsp, 48h
mov ebp, edx
mov rbx, rdi
mov rax, [rdi+30h]
mov ecx, [rdi+38h]
cmp [rdi+20h], rax
setz dl
test ecx, ecx
setz dil
and dil, dl
cmp dil, 1
jz loc_8B3B6
mov ecx, ecx
mov r15, 8000000000000000h
lea rdx, [rcx-1]
add rcx, 3Eh ; '>'
test rdx, rdx
cmovns rcx, rdx
sar rcx, 6
lea rax, [rax+rcx*8]
lea rcx, [r15+3Fh]
and rcx, rdx
xor edi, edi
cmp rcx, r15
setbe dil
mov rax, [rax+rdi*8-8]
bt rax, rdx
jnb loc_8B249
xorps xmm0, xmm0
lea r14, [rsp+68h+var_58]
movaps xmmword ptr [r14], xmm0
mov rsi, [rsi]
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE6EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_17number_unsigned_tE; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)6>::construct<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> &,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>::number_unsigned_t)
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)
test bpl, bpl
jnz short loc_8B1F6
mov rax, [rbx+10h]
sub rax, [rbx+8]
shr rax, 3
mov [rsp+68h+var_5C], eax
mov [rsp+68h+var_5D], 5
cmp qword ptr [rbx+90h], 0
jz loc_8B3D7
lea rdi, [rbx+80h]
lea rsi, [rsp+68h+var_5C]
lea rdx, [rsp+68h+var_5D]
lea rcx, [rsp+68h+var_58]
call qword ptr [rbx+98h]
test al, al
jz loc_8B38A
loc_8B1F6:
mov rax, [rbx+10h]
cmp [rbx+8], rax
jz short loc_8B253
mov rax, [rax-8]
test rax, rax
jz loc_8B38A
movzx ecx, byte ptr [rax]
cmp ecx, 1
jz loc_8B2AD
cmp ecx, 2
jnz loc_8B3DC
mov rdi, [rax+8]
lea rsi, [rsp+68h+var_58]
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJSD_EEERSD_DpOT_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &&)
mov rax, [rbx+10h]
mov rax, [rax-8]
mov rax, [rax+8]
mov r14, [rax+8]
add r14, 0FFFFFFFFFFFFFFF0h
jmp loc_8B386
loc_8B249:
xor ebx, ebx
xor r14d, r14d
jmp loc_8B3A6
loc_8B253:
lea r14, [rsp+68h+var_58]
movaps xmm0, xmmword ptr [r14]
lea r15, [rsp+68h+var_38]
movaps xmmword ptr [r15], xmm0
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 byte ptr [r14], 0
mov qword ptr [r14+8], 0
mov rdi, r15
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, [rbx]
mov rsi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>)
mov rdi, r15
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, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov r14, [rbx]
jmp loc_8B386
loc_8B2AD:
mov rax, [rbx+58h]
mov ecx, [rbx+60h]
cmp [rbx+48h], rax
setz dl
test ecx, ecx
setz sil
and sil, dl
cmp sil, 1
jz loc_8B3EA
mov esi, ecx
lea rcx, [rsi-1]
mov rdx, rsi
add rdx, 3Eh ; '>'
test rcx, rcx
cmovns rdx, rcx
sar rdx, 6
lea rdi, [rax+rdx*8]
lea rdx, [r15+3Fh]
and rdx, rcx
xor r8d, r8d
cmp rdx, r15
setbe r8b
mov edx, 1
shl rdx, cl
and rdx, [rdi+r8*8-8]
sub esi, 1
mov [rbx+60h], esi
jnb short loc_8B31F
mov dword ptr [rbx+60h], 3Fh ; '?'
add rax, 0FFFFFFFFFFFFFFF8h
mov [rbx+58h], rax
loc_8B31F:
test rdx, rdx
jz short loc_8B38A
cmp qword ptr [rbx+70h], 0
jz loc_8B40B
lea r14, [rsp+68h+var_58]
movaps xmm0, xmmword ptr [r14]
lea r15, [rsp+68h+var_48]
movaps xmmword ptr [r15], xmm0
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 byte ptr [r14], 0
mov qword ptr [r14+8], 0
mov rdi, r15
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, [rbx+70h]
mov rsi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>)
mov rdi, r15
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, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov r14, [rbx+70h]
loc_8B386:
mov bl, 1
jmp short loc_8B38F
loc_8B38A:
xor ebx, ebx
xor r14d, r14d
loc_8B38F:
lea r15, [rsp+68h+var_58]
mov rdi, r15
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, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
loc_8B3A6:
mov eax, ebx
mov rdx, r14
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_8B3B6:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKeepStackEmpty; "!keep_stack.empty()"
mov esi, 1C28h
xor eax, eax
call _ggml_abort
loc_8B3D7:
call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
loc_8B3DC:
lea rcx, aRefStackBackIs; "ref_stack.back()->is_array() || ref_sta"...
mov esi, 1C4Bh
jmp short loc_8B3F6
loc_8B3EA:
lea rcx, aKeyKeepStackEm; "!key_keep_stack.empty()"
mov esi, 1C57h
loc_8B3F6:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
xor eax, eax
call _ggml_abort
loc_8B40B:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aObjectElement; "object_element"
mov esi, 1C60h
xor eax, eax
call _ggml_abort
jmp short $+2
loc_8B42E:
mov rbx, rax
lea r14, [rsp+68h+var_58]
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, rbx
call __Unwind_Resume
|
long long nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::handle_value<unsigned long &>(
long long a1,
_QWORD *a2,
char a3)
{
unsigned int v4; // ebx
long long v5; // rax
unsigned int v6; // ecx
signed long long v7; // rdx
long long v8; // rcx
long long v9; // rax
long long v10; // rax
unsigned __int8 *v11; // rax
int v12; // ecx
long long v13; // rax
unsigned int v14; // ecx
long long v15; // rsi
long long v16; // rcx
long long v17; // rdx
long long v18; // rdx
const char *v20; // rcx
long long v21; // rsi
long long v22; // rax
long long v23; // rbx
char v24; // [rsp+Bh] [rbp-5Dh] BYREF
int v25; // [rsp+Ch] [rbp-5Ch] BYREF
__int128 v26; // [rsp+10h] [rbp-58h] BYREF
__int128 v27; // [rsp+20h] [rbp-48h] BYREF
_OWORD v28[3]; // [rsp+30h] [rbp-38h] BYREF
v4 = a1;
v5 = *(_QWORD *)(a1 + 48);
v6 = *(_DWORD *)(a1 + 56);
if ( *(_QWORD *)(a1 + 32) == v5 && v6 == 0 )
{
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
7208LL,
"GGML_ASSERT(%s) failed",
"!keep_stack.empty()");
goto LABEL_28;
}
v7 = v6 - 1LL;
v8 = v6 + 62LL;
if ( v7 >= 0 )
v8 = v7;
v9 = *(_QWORD *)(v5 + 8 * (v8 >> 6) + 8LL * ((v7 & 0x800000000000003FLL) <= 0x8000000000000000LL) - 8);
if ( _bittest64(&v9, v7) )
{
v26 = 0LL;
nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)6>::construct<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>>(
&v26,
*a2);
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 *)&v26);
if ( a3 )
{
LABEL_8:
v10 = *(_QWORD *)(a1 + 16);
if ( *(_QWORD *)(a1 + 8) == v10 )
{
v28[0] = v26;
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 *)&v26);
LOBYTE(v26) = 0;
*((_QWORD *)&v26 + 1) = 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((char *)v28);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=(
*(_QWORD *)a1,
(long long)v28);
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 *)v28);
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(v28);
goto LABEL_23;
}
v11 = *(unsigned __int8 **)(v10 - 8);
if ( v11 )
{
v12 = *v11;
if ( v12 != 1 )
{
if ( v12 == 2 )
{
std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
*((_QWORD *)v11 + 1),
(long long)&v26);
LABEL_23:
LOBYTE(v4) = 1;
LABEL_25:
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 *)&v26);
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(&v26);
return v4;
}
v20 = "ref_stack.back()->is_array() || ref_stack.back()->is_object()";
v21 = 7243LL;
goto LABEL_31;
}
v13 = *(_QWORD *)(a1 + 88);
v14 = *(_DWORD *)(a1 + 96);
if ( *(_QWORD *)(a1 + 72) == v13 && v14 == 0 )
{
v20 = "!key_keep_stack.empty()";
v21 = 7255LL;
LABEL_31:
ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", v21, "GGML_ASSERT(%s) failed", v20);
goto LABEL_32;
}
v15 = v14;
v16 = v14 - 1LL;
v17 = v15 + 62;
if ( v16 >= 0 )
v17 = v16;
v18 = *(_QWORD *)(v13 + 8 * (v17 >> 6) + 8LL * ((v16 & 0x800000000000003FLL) <= 0x8000000000000000LL) - 8) & (1LL << v16);
*(_DWORD *)(a1 + 96) = v15 - 1;
if ( !(_DWORD)v15 )
{
*(_DWORD *)(a1 + 96) = 63;
*(_QWORD *)(a1 + 88) = v13 - 8;
}
if ( v18 )
{
if ( *(_QWORD *)(a1 + 112) )
{
v27 = v26;
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 *)&v26);
LOBYTE(v26) = 0;
*((_QWORD *)&v26 + 1) = 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((char *)&v27);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=(
*(_QWORD *)(a1 + 112),
(long long)&v27);
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 *)&v27);
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(&v27);
goto LABEL_23;
}
LABEL_32:
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
7264LL,
"GGML_ASSERT(%s) failed",
"object_element");
v23 = v22;
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 *)&v26);
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(&v26);
_Unwind_Resume(v23);
}
}
LABEL_24:
v4 = 0;
goto LABEL_25;
}
v25 = (*(_QWORD *)(a1 + 16) - *(_QWORD *)(a1 + 8)) >> 3;
v24 = 5;
if ( *(_QWORD *)(a1 + 144) )
{
if ( !(*(unsigned __int8 ( **)(long long, int *, char *, __int128 *))(a1 + 152))(
a1 + 128,
&v25,
&v24,
&v26) )
goto LABEL_24;
goto LABEL_8;
}
LABEL_28:
std::__throw_bad_function_call();
}
return 0;
}
|
handle_value<unsigned_long&>:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV EBP,EDX
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x30]
MOV ECX,dword ptr [RDI + 0x38]
CMP qword ptr [RDI + 0x20],RAX
SETZ DL
TEST ECX,ECX
SETZ DIL
AND DIL,DL
CMP DIL,0x1
JZ 0x0018b3b6
MOV ECX,ECX
MOV R15,-0x8000000000000000
LEA RDX,[RCX + -0x1]
ADD RCX,0x3e
TEST RDX,RDX
CMOVNS RCX,RDX
SAR RCX,0x6
LEA RAX,[RAX + RCX*0x8]
LEA RCX,[R15 + 0x3f]
AND RCX,RDX
XOR EDI,EDI
CMP RCX,R15
SETBE DIL
MOV RAX,qword ptr [RAX + RDI*0x8 + -0x8]
BT RAX,RDX
JNC 0x0018b249
XORPS XMM0,XMM0
LEA R14,[RSP + 0x10]
MOVAPS xmmword ptr [R14],XMM0
MOV RSI,qword ptr [RSI]
MOV RDI,R14
CALL 0x0018b450
MOV RDI,R14
MOV ESI,0x1
CALL 0x0018400e
TEST BPL,BPL
JNZ 0x0018b1f6
MOV RAX,qword ptr [RBX + 0x10]
SUB RAX,qword ptr [RBX + 0x8]
SHR RAX,0x3
MOV dword ptr [RSP + 0xc],EAX
MOV byte ptr [RSP + 0xb],0x5
CMP qword ptr [RBX + 0x90],0x0
JZ 0x0018b3d7
LEA RDI,[RBX + 0x80]
LAB_0018b1d9:
LEA RSI,[RSP + 0xc]
LEA RDX,[RSP + 0xb]
LEA RCX,[RSP + 0x10]
CALL qword ptr [RBX + 0x98]
TEST AL,AL
JZ 0x0018b38a
LAB_0018b1f6:
MOV RAX,qword ptr [RBX + 0x10]
CMP qword ptr [RBX + 0x8],RAX
JZ 0x0018b253
MOV RAX,qword ptr [RAX + -0x8]
TEST RAX,RAX
JZ 0x0018b38a
MOVZX ECX,byte ptr [RAX]
CMP ECX,0x1
JZ 0x0018b2ad
CMP ECX,0x2
JNZ 0x0018b3dc
MOV RDI,qword ptr [RAX + 0x8]
LEA RSI,[RSP + 0x10]
CALL 0x00187e24
LAB_0018b230:
MOV RAX,qword ptr [RBX + 0x10]
MOV RAX,qword ptr [RAX + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV R14,qword ptr [RAX + 0x8]
ADD R14,-0x10
JMP 0x0018b386
LAB_0018b249:
XOR EBX,EBX
XOR R14D,R14D
JMP 0x0018b3a6
LAB_0018b253:
LEA R14,[RSP + 0x10]
MOVAPS XMM0,xmmword ptr [R14]
LEA R15,[RSP + 0x30]
MOVAPS xmmword ptr [R15],XMM0
MOV RDI,R14
XOR ESI,ESI
CALL 0x0018400e
MOV byte ptr [R14],0x0
MOV qword ptr [R14 + 0x8],0x0
MOV RDI,R15
MOV ESI,0x1
CALL 0x0018400e
MOV RDI,qword ptr [RBX]
MOV RSI,R15
CALL 0x0018617a
MOV RDI,R15
XOR ESI,ESI
CALL 0x0018400e
MOV RDI,R15
CALL 0x00188728
MOV R14,qword ptr [RBX]
JMP 0x0018b386
LAB_0018b2ad:
MOV RAX,qword ptr [RBX + 0x58]
MOV ECX,dword ptr [RBX + 0x60]
CMP qword ptr [RBX + 0x48],RAX
SETZ DL
TEST ECX,ECX
SETZ SIL
AND SIL,DL
CMP SIL,0x1
JZ 0x0018b3ea
MOV ESI,ECX
LEA RCX,[RSI + -0x1]
MOV RDX,RSI
ADD RDX,0x3e
TEST RCX,RCX
CMOVNS RDX,RCX
SAR RDX,0x6
LEA RDI,[RAX + RDX*0x8]
LEA RDX,[R15 + 0x3f]
AND RDX,RCX
XOR R8D,R8D
CMP RDX,R15
SETBE R8B
MOV EDX,0x1
SHL RDX,CL
AND RDX,qword ptr [RDI + R8*0x8 + -0x8]
SUB ESI,0x1
MOV dword ptr [RBX + 0x60],ESI
JNC 0x0018b31f
MOV dword ptr [RBX + 0x60],0x3f
ADD RAX,-0x8
MOV qword ptr [RBX + 0x58],RAX
LAB_0018b31f:
TEST RDX,RDX
JZ 0x0018b38a
CMP qword ptr [RBX + 0x70],0x0
JZ 0x0018b40b
LEA R14,[RSP + 0x10]
MOVAPS XMM0,xmmword ptr [R14]
LEA R15,[RSP + 0x20]
MOVAPS xmmword ptr [R15],XMM0
MOV RDI,R14
XOR ESI,ESI
CALL 0x0018400e
MOV byte ptr [R14],0x0
MOV qword ptr [R14 + 0x8],0x0
MOV RDI,R15
MOV ESI,0x1
CALL 0x0018400e
MOV RDI,qword ptr [RBX + 0x70]
MOV RSI,R15
CALL 0x0018617a
MOV RDI,R15
XOR ESI,ESI
CALL 0x0018400e
MOV RDI,R15
CALL 0x00188728
MOV R14,qword ptr [RBX + 0x70]
LAB_0018b386:
MOV BL,0x1
JMP 0x0018b38f
LAB_0018b38a:
XOR EBX,EBX
XOR R14D,R14D
LAB_0018b38f:
LEA R15,[RSP + 0x10]
MOV RDI,R15
XOR ESI,ESI
CALL 0x0018400e
MOV RDI,R15
CALL 0x00188728
LAB_0018b3a6:
MOV EAX,EBX
MOV RDX,R14
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0018b3b6:
LEA RDI,[0x218722]
LEA RDX,[0x21875d]
LEA RCX,[0x21968f]
MOV ESI,0x1c28
XOR EAX,EAX
CALL 0x00120e70
LAB_0018b3d7:
CALL 0x001212b0
LAB_0018b3dc:
LEA RCX,[0x2196a3]
MOV ESI,0x1c4b
JMP 0x0018b3f6
LAB_0018b3ea:
LEA RCX,[0x2196e1]
MOV ESI,0x1c57
LAB_0018b3f6:
LEA RDI,[0x218722]
LEA RDX,[0x21875d]
XOR EAX,EAX
CALL 0x00120e70
LAB_0018b40b:
LEA RDI,[0x218722]
LEA RDX,[0x21875d]
LEA RCX,[0x2196f9]
MOV ESI,0x1c60
XOR EAX,EAX
CALL 0x00120e70
|
/* std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>*>
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >::handle_value<unsigned long&>(unsigned long&, bool) */
int1 [16] __thiscall
nlohmann::json_abi_v3_11_3::detail::
json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::handle_value<unsigned_long&>
(json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this,ulong *param_1,bool param_2)
{
uint uVar1;
char cVar2;
ulong uVar3;
char *pcVar4;
ulong uVar5;
int8 uVar6;
bool bVar7;
long lVar8;
int1 auVar9 [16];
int1 local_5d;
int4 local_5c;
ulong local_58;
int8 uStack_50;
ulong local_48;
int8 uStack_40;
ulong local_38;
int8 uStack_30;
uVar1 = *(uint *)(this + 0x38);
if (uVar1 == 0 && *(long *)(this + 0x20) == *(long *)(this + 0x30)) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",0x1c28,
"GGML_ASSERT(%s) failed","!keep_stack.empty()");
}
uVar5 = (ulong)uVar1 - 1;
uVar3 = (ulong)uVar1 + 0x3e;
if (-1 < (long)uVar5) {
uVar3 = uVar5;
}
if ((*(ulong *)(*(long *)(this + 0x30) + ((long)uVar3 >> 6) * 8 + -8 +
(ulong)((uVar5 & 0x800000000000003f) < 0x8000000000000001) * 8) >> (uVar5 & 0x3f) &
1) == 0) {
uVar5 = 0;
lVar8 = 0;
goto LAB_0018b3a6;
}
local_58 = 0;
uStack_50 = 0;
external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)6>::
construct<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_58,*param_1);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(&local_58,0));
if (param_2) {
LAB_0018b1f6:
if (*(long *)(this + 8) == *(long *)(this + 0x10)) {
local_38 = local_58;
uStack_30 = uStack_50;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(&local_58,0));
local_58 = local_58 & 0xffffffffffffff00;
uStack_50 = 0;
bVar7 = SUB81((data *)&local_38,0);
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(bVar7);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator=(*(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
**)this,(data *)&local_38);
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(bVar7);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)&local_38);
lVar8 = *(long *)this;
}
else {
pcVar4 = *(char **)(*(long *)(this + 0x10) + -8);
if (pcVar4 == (char *)0x0) goto LAB_0018b38a;
if (*pcVar4 == '\x01') {
lVar8 = *(long *)(this + 0x58);
uVar1 = *(uint *)(this + 0x60);
if (uVar1 == 0 && *(long *)(this + 0x48) == lVar8) {
pcVar4 = "!key_keep_stack.empty()";
uVar6 = 0x1c57;
goto LAB_0018b3f6;
}
uVar5 = (ulong)uVar1 - 1;
uVar3 = (ulong)uVar1 + 0x3e;
if (-1 < (long)uVar5) {
uVar3 = uVar5;
}
uVar3 = *(ulong *)(lVar8 + ((long)uVar3 >> 6) * 8 + -8 +
(ulong)((uVar5 & 0x800000000000003f) < 0x8000000000000001) * 8);
*(uint *)(this + 0x60) = uVar1 - 1;
if (uVar1 == 0) {
*(int4 *)(this + 0x60) = 0x3f;
*(long *)(this + 0x58) = lVar8 + -8;
}
if ((1L << ((byte)uVar5 & 0x3f) & uVar3) == 0) goto LAB_0018b38a;
if (*(long *)(this + 0x70) == 0) {
/* try { // try from 0018b40b to 0018b42b has its CatchHandler @ 0018b42c */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",0x1c60,
"GGML_ASSERT(%s) failed","object_element");
}
local_48 = local_58;
uStack_40 = uStack_50;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(&local_58,0));
local_58 = local_58 & 0xffffffffffffff00;
uStack_50 = 0;
bVar7 = SUB81((data *)&local_48,0);
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(bVar7);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator=(*(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
**)(this + 0x70),(data *)&local_48);
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(bVar7);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)&local_48);
lVar8 = *(long *)(this + 0x70);
}
else {
if (*pcVar4 != '\x02') {
pcVar4 = "ref_stack.back()->is_array() || ref_stack.back()->is_object()";
uVar6 = 0x1c4b;
LAB_0018b3f6:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",uVar6,
"GGML_ASSERT(%s) failed",pcVar4);
}
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::
emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
**)(pcVar4 + 8),(basic_json *)&local_58);
lVar8 = *(long *)(*(long *)(*(long *)(*(long *)(this + 0x10) + -8) + 8) + 8) + -0x10;
}
}
uVar5 = CONCAT71((int7)((ulong)this >> 8),1);
}
else {
local_5c = (int4)((ulong)(*(long *)(this + 0x10) - *(long *)(this + 8)) >> 3);
local_5d = 5;
if (*(long *)(this + 0x90) == 0) {
/* WARNING: Subroutine does not return */
/* try { // try from 0018b3d7 to 0018b40a has its CatchHandler @ 0018b42e */
std::__throw_bad_function_call();
}
/* try { // try from 0018b1d9 to 0018b22f has its CatchHandler @ 0018b42e */
cVar2 = (**(code **)(this + 0x98))(this + 0x80,&local_5c,&local_5d,&local_58);
if (cVar2 != '\0') goto LAB_0018b1f6;
LAB_0018b38a:
uVar5 = 0;
lVar8 = 0;
}
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81((data *)&local_58,0));
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)&local_58);
LAB_0018b3a6:
auVar9._0_8_ = uVar5 & 0xffffffff;
auVar9._8_8_ = lVar8;
return auVar9;
}
|
|
57,561
|
alloc_dynamic
|
eloqsql/mysys/array.c
|
void *alloc_dynamic(DYNAMIC_ARRAY *array)
{
DBUG_ENTER("alloc_dynamic");
DBUG_ASSERT(array->size_of_element); /* Ensure init() is called */
if (array->elements == array->max_element)
{
char *new_ptr;
if (array->malloc_flags & MY_INIT_BUFFER_USED)
{
/*
In this scenario, the buffer is statically preallocated,
so we have to create an all-new malloc since we overflowed
*/
if (!(new_ptr= (char *) my_malloc(array->m_psi_key,
(array->max_element+
array->alloc_increment) *
array->size_of_element,
MYF(array->malloc_flags | MY_WME))))
DBUG_RETURN(0);
if (array->elements)
memcpy(new_ptr, array->buffer,
array->elements * array->size_of_element);
array->malloc_flags&= ~MY_INIT_BUFFER_USED;
}
else if (!(new_ptr=(char*)
my_realloc(array->m_psi_key, array->buffer,
(array->max_element+ array->alloc_increment) *
array->size_of_element,
MYF(MY_WME | MY_ALLOW_ZERO_PTR |
array->malloc_flags))))
DBUG_RETURN(0);
array->buffer= (uchar*) new_ptr;
array->max_element+=array->alloc_increment;
}
DBUG_RETURN(array->buffer+(array->elements++ * array->size_of_element));
}
|
O3
|
c
|
alloc_dynamic:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl 0x8(%rdi), %eax
cmpl 0xc(%rdi), %eax
jne 0x91587
movq 0x20(%rbx), %rcx
btl $0x8, %ecx
movl 0x18(%rbx), %edi
jb 0x9158c
addl 0x10(%rbx), %eax
movq (%rbx), %rsi
imull 0x14(%rbx), %eax
orq $0x50, %rcx
movq %rax, %rdx
callq 0x9f804
movq %rax, %r14
testq %rax, %rax
jne 0x915c9
jmp 0x915e7
movq (%rbx), %r14
jmp 0x915d5
addl 0x10(%rbx), %eax
imull 0x14(%rbx), %eax
orq $0x10, %rcx
movq %rax, %rsi
movq %rcx, %rdx
callq 0x9f6e1
testq %rax, %rax
je 0x915e7
movq %rax, %r14
movl 0x8(%rbx), %edx
testl %edx, %edx
je 0x915c0
movq (%rbx), %rsi
imull 0x14(%rbx), %edx
movq %r14, %rdi
callq 0x29090
movl $0xfffffeff, %eax # imm = 0xFFFFFEFF
andq %rax, 0x20(%rbx)
movq %r14, (%rbx)
movl 0x8(%rbx), %eax
movl 0x10(%rbx), %ecx
addl %ecx, 0xc(%rbx)
leal 0x1(%rax), %ecx
movl %ecx, 0x8(%rbx)
imull 0x14(%rbx), %eax
addq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
xorl %eax, %eax
jmp 0x915e2
|
alloc_dynamic:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rdi
mov eax, [rdi+8]
cmp eax, [rdi+0Ch]
jnz short loc_91587
mov rcx, [rbx+20h]
bt ecx, 8
mov edi, [rbx+18h]
jb short loc_9158C
add eax, [rbx+10h]
mov rsi, [rbx]
imul eax, [rbx+14h]
or rcx, 50h
mov rdx, rax
call my_realloc
mov r14, rax
test rax, rax
jnz short loc_915C9
jmp short loc_915E7
loc_91587:
mov r14, [rbx]
jmp short loc_915D5
loc_9158C:
add eax, [rbx+10h]
imul eax, [rbx+14h]
or rcx, 10h
mov rsi, rax
mov rdx, rcx
call my_malloc
test rax, rax
jz short loc_915E7
mov r14, rax
mov edx, [rbx+8]
test edx, edx
jz short loc_915C0
mov rsi, [rbx]
imul edx, [rbx+14h]
mov rdi, r14
call _memcpy
loc_915C0:
mov eax, 0FFFFFEFFh
and [rbx+20h], rax
loc_915C9:
mov [rbx], r14
mov eax, [rbx+8]
mov ecx, [rbx+10h]
add [rbx+0Ch], ecx
loc_915D5:
lea ecx, [rax+1]
mov [rbx+8], ecx
imul eax, [rbx+14h]
add rax, r14
loc_915E2:
pop rbx
pop r14
pop rbp
retn
loc_915E7:
xor eax, eax
jmp short loc_915E2
|
long long alloc_dynamic(long long *a1, long long a2, long long a3, long long a4, long long a5, long long a6)
{
int v7; // eax
long long v8; // rcx
long long v9; // rdi
long long v10; // r14
long long v11; // rax
int v12; // edx
v7 = *((_DWORD *)a1 + 2);
if ( v7 != *((_DWORD *)a1 + 3) )
{
v10 = *a1;
LABEL_11:
*((_DWORD *)a1 + 2) = v7 + 1;
return v10 + (unsigned int)(*((_DWORD *)a1 + 5) * v7);
}
v8 = a1[4];
v9 = *((unsigned int *)a1 + 6);
if ( (v8 & 0x100) == 0 )
{
v10 = my_realloc(v9, *a1, (unsigned int)(*((_DWORD *)a1 + 5) * (*((_DWORD *)a1 + 4) + v7)), v8 | 0x50, a5, a6);
if ( !v10 )
return 0LL;
goto LABEL_10;
}
v11 = my_malloc(v9, (unsigned int)(*((_DWORD *)a1 + 5) * (*((_DWORD *)a1 + 4) + v7)), v8 | 0x10);
if ( v11 )
{
v10 = v11;
v12 = *((_DWORD *)a1 + 2);
if ( v12 )
memcpy(v11, *a1, (unsigned int)(*((_DWORD *)a1 + 5) * v12));
a1[4] &= 0xFFFFFEFFuLL;
LABEL_10:
*a1 = v10;
v7 = *((_DWORD *)a1 + 2);
*((_DWORD *)a1 + 3) += *((_DWORD *)a1 + 4);
goto LABEL_11;
}
return 0LL;
}
|
alloc_dynamic:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RDI
MOV EAX,dword ptr [RDI + 0x8]
CMP EAX,dword ptr [RDI + 0xc]
JNZ 0x00191587
MOV RCX,qword ptr [RBX + 0x20]
BT ECX,0x8
MOV EDI,dword ptr [RBX + 0x18]
JC 0x0019158c
ADD EAX,dword ptr [RBX + 0x10]
MOV RSI,qword ptr [RBX]
IMUL EAX,dword ptr [RBX + 0x14]
OR RCX,0x50
MOV RDX,RAX
CALL 0x0019f804
MOV R14,RAX
TEST RAX,RAX
JNZ 0x001915c9
JMP 0x001915e7
LAB_00191587:
MOV R14,qword ptr [RBX]
JMP 0x001915d5
LAB_0019158c:
ADD EAX,dword ptr [RBX + 0x10]
IMUL EAX,dword ptr [RBX + 0x14]
OR RCX,0x10
MOV RSI,RAX
MOV RDX,RCX
CALL 0x0019f6e1
TEST RAX,RAX
JZ 0x001915e7
MOV R14,RAX
MOV EDX,dword ptr [RBX + 0x8]
TEST EDX,EDX
JZ 0x001915c0
MOV RSI,qword ptr [RBX]
IMUL EDX,dword ptr [RBX + 0x14]
MOV RDI,R14
CALL 0x00129090
LAB_001915c0:
MOV EAX,0xfffffeff
AND qword ptr [RBX + 0x20],RAX
LAB_001915c9:
MOV qword ptr [RBX],R14
MOV EAX,dword ptr [RBX + 0x8]
MOV ECX,dword ptr [RBX + 0x10]
ADD dword ptr [RBX + 0xc],ECX
LAB_001915d5:
LEA ECX,[RAX + 0x1]
MOV dword ptr [RBX + 0x8],ECX
IMUL EAX,dword ptr [RBX + 0x14]
ADD RAX,R14
LAB_001915e2:
POP RBX
POP R14
POP RBP
RET
LAB_001915e7:
XOR EAX,EAX
JMP 0x001915e2
|
long alloc_dynamic(long *param_1)
{
ulong uVar1;
int iVar2;
void *__dest;
long lVar3;
iVar2 = (int)param_1[1];
if (iVar2 == *(int *)((long)param_1 + 0xc)) {
uVar1 = param_1[4];
if (((uint)uVar1 >> 8 & 1) == 0) {
__dest = (void *)my_realloc((int)param_1[3],*param_1,
(iVar2 + (int)param_1[2]) * *(int *)((long)param_1 + 0x14),
uVar1 | 0x50);
if (__dest != (void *)0x0) {
LAB_001915c9:
*param_1 = (long)__dest;
iVar2 = (int)param_1[1];
*(int *)((long)param_1 + 0xc) = *(int *)((long)param_1 + 0xc) + (int)param_1[2];
goto LAB_001915d5;
}
}
else {
__dest = (void *)my_malloc((int)param_1[3],
(iVar2 + (int)param_1[2]) * *(int *)((long)param_1 + 0x14),
uVar1 | 0x10);
if (__dest != (void *)0x0) {
if ((int)param_1[1] != 0) {
memcpy(__dest,(void *)*param_1,
(ulong)(uint)((int)param_1[1] * *(int *)((long)param_1 + 0x14)));
}
param_1[4] = param_1[4] & 0xfffffeff;
goto LAB_001915c9;
}
}
lVar3 = 0;
}
else {
__dest = (void *)*param_1;
LAB_001915d5:
*(int *)(param_1 + 1) = iVar2 + 1;
lVar3 = (ulong)(uint)(iVar2 * *(int *)((long)param_1 + 0x14)) + (long)__dest;
}
return lVar3;
}
|
|
57,562
|
my_convert_fix
|
eloqsql/strings/ctype.c
|
size_t
my_convert_fix(CHARSET_INFO *to_cs, char *to, size_t to_length,
CHARSET_INFO *from_cs, const char *from, size_t from_length,
size_t nchars,
MY_STRCOPY_STATUS *copy_status,
MY_STRCONV_STATUS *conv_status)
{
int cnvres;
my_wc_t wc;
my_charset_conv_mb_wc mb_wc= from_cs->cset->mb_wc;
my_charset_conv_wc_mb wc_mb= to_cs->cset->wc_mb;
const uchar *from_end= (const uchar*) from + from_length;
uchar *to_end= (uchar*) to + to_length;
char *to_start= to;
DBUG_ASSERT(to_cs != &my_charset_bin);
DBUG_ASSERT(from_cs != &my_charset_bin);
copy_status->m_well_formed_error_pos= NULL;
conv_status->m_cannot_convert_error_pos= NULL;
for ( ; nchars; nchars--)
{
const char *from_prev= from;
if ((cnvres= (*mb_wc)(from_cs, &wc, (uchar*) from, from_end)) > 0)
from+= cnvres;
else if (cnvres == MY_CS_ILSEQ)
{
if (!copy_status->m_well_formed_error_pos)
copy_status->m_well_formed_error_pos= from;
from++;
wc= '?';
}
else if (cnvres > MY_CS_TOOSMALL)
{
/*
A correct multibyte sequence detected
But it doesn't have Unicode mapping.
*/
if (!conv_status->m_cannot_convert_error_pos)
conv_status->m_cannot_convert_error_pos= from;
from+= (-cnvres);
wc= '?';
}
else
{
if ((uchar *) from >= from_end)
break; // End of line
// Incomplete byte sequence
if (!copy_status->m_well_formed_error_pos)
copy_status->m_well_formed_error_pos= from;
from++;
wc= '?';
}
outp:
if ((cnvres= (*wc_mb)(to_cs, wc, (uchar*) to, to_end)) > 0)
to+= cnvres;
else if (cnvres == MY_CS_ILUNI && wc != '?')
{
if (!conv_status->m_cannot_convert_error_pos)
conv_status->m_cannot_convert_error_pos= from_prev;
wc= '?';
goto outp;
}
else
{
from= from_prev;
break;
}
}
copy_status->m_source_end_pos= from;
return to - to_start;
}
|
O3
|
c
|
my_convert_fix:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, %r14
movq %rdx, %r12
movq %rdi, %r13
movq 0x20(%rbp), %rdi
movq 0x18(%rbp), %rdx
movq 0x10(%rbp), %r8
movq %rcx, -0x60(%rbp)
movq 0xb8(%rcx), %rax
movq 0x28(%rax), %rax
movq %rax, -0x58(%rbp)
movq 0xb8(%r13), %rax
movq 0x30(%rax), %rax
movq %rax, -0x40(%rbp)
xorl %eax, %eax
movq %rax, 0x8(%rdx)
movq %rax, (%rdi)
testq %r8, %r8
movq %rsi, -0x48(%rbp)
je 0x5b42b
movq %r8, -0x50(%rbp)
addq %r14, %r9
movq %r9, -0x38(%rbp)
addq %rsi, %r12
movq %rsi, %rbx
movq -0x60(%rbp), %rdi
leaq -0x30(%rbp), %rsi
movq %r14, %rdx
movq -0x38(%rbp), %rcx
callq *-0x58(%rbp)
movl %eax, %r15d
testl %eax, %eax
jle 0x5b3a3
movl %r15d, %r15d
addq %r14, %r15
movq -0x30(%rbp), %rsi
jmp 0x5b3db
je 0x5b3c6
cmpl $-0x64, %r15d
jb 0x5b3c0
movq 0x20(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x5b3b8
movq %r14, (%rax)
negl %r15d
addq %r14, %r15
jmp 0x5b403
cmpq -0x38(%rbp), %r14
jae 0x5b426
movq 0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x5b3d5
movq %r14, 0x8(%rax)
leaq 0x1(%r14), %r15
jmp 0x5b403
movq %r13, %rdi
movq %rbx, %rdx
movq %r12, %rcx
callq *-0x40(%rbp)
testl %eax, %eax
jg 0x5b412
testl %eax, %eax
jne 0x5b426
cmpq $0x3f, -0x30(%rbp)
je 0x5b426
movq 0x20(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x5b403
movq %r14, (%rax)
movq $0x3f, -0x30(%rbp)
movl $0x3f, %esi
jmp 0x5b3db
movl %eax, %eax
addq %rax, %rbx
movq %r15, %r14
decq -0x50(%rbp)
jne 0x5b37e
jmp 0x5b431
movq %r14, %r15
jmp 0x5b431
movq %r14, %r15
movq %rsi, %rbx
movq 0x18(%rbp), %rax
movq %r15, (%rax)
subq -0x48(%rbp), %rbx
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
my_convert_fix:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r14, r8
mov r12, rdx
mov r13, rdi
mov rdi, [rbp+arg_10]
mov rdx, [rbp+arg_8]
mov r8, [rbp+arg_0]
mov [rbp+var_60], rcx
mov rax, [rcx+0B8h]
mov rax, [rax+28h]
mov [rbp+var_58], rax
mov rax, [r13+0B8h]
mov rax, [rax+30h]
mov [rbp+var_40], rax
xor eax, eax
mov [rdx+8], rax
mov [rdi], rax
test r8, r8
mov [rbp+var_48], rsi
jz loc_5B42B
mov [rbp+var_50], r8
add r9, r14
mov [rbp+var_38], r9
add r12, rsi
mov rbx, rsi
loc_5B37E:
mov rdi, [rbp+var_60]
lea rsi, [rbp+var_30]
mov rdx, r14
mov rcx, [rbp+var_38]
call [rbp+var_58]
mov r15d, eax
test eax, eax
jle short loc_5B3A3
mov r15d, r15d
add r15, r14
mov rsi, [rbp+var_30]
jmp short loc_5B3DB
loc_5B3A3:
jz short loc_5B3C6
cmp r15d, 0FFFFFF9Ch
jb short loc_5B3C0
mov rax, [rbp+arg_10]
cmp qword ptr [rax], 0
jnz short loc_5B3B8
mov [rax], r14
loc_5B3B8:
neg r15d
add r15, r14
jmp short loc_5B403
loc_5B3C0:
cmp r14, [rbp+var_38]
jnb short loc_5B426
loc_5B3C6:
mov rax, [rbp+arg_8]
cmp qword ptr [rax+8], 0
jnz short loc_5B3D5
mov [rax+8], r14
loc_5B3D5:
lea r15, [r14+1]
jmp short loc_5B403
loc_5B3DB:
mov rdi, r13
mov rdx, rbx
mov rcx, r12
call [rbp+var_40]
test eax, eax
jg short loc_5B412
test eax, eax
jnz short loc_5B426
cmp [rbp+var_30], 3Fh ; '?'
jz short loc_5B426
mov rax, [rbp+arg_10]
cmp qword ptr [rax], 0
jnz short loc_5B403
mov [rax], r14
loc_5B403:
mov [rbp+var_30], 3Fh ; '?'
mov esi, 3Fh ; '?'
jmp short loc_5B3DB
loc_5B412:
mov eax, eax
add rbx, rax
mov r14, r15
dec [rbp+var_50]
jnz loc_5B37E
jmp short loc_5B431
loc_5B426:
mov r15, r14
jmp short loc_5B431
loc_5B42B:
mov r15, r14
mov rbx, rsi
loc_5B431:
mov rax, [rbp+arg_8]
mov [rax], r15
sub rbx, [rbp+var_48]
mov rax, rbx
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long my_convert_fix(
long long a1,
long long a2,
long long a3,
long long a4,
unsigned long long a5,
long long a6,
long long a7,
unsigned long long *a8,
unsigned long long *a9)
{
unsigned long long v9; // r14
long long v10; // r12
long long v11; // rbx
int v12; // eax
unsigned long long v13; // r15
long long v14; // rsi
int v15; // eax
long long ( *v18)(long long, long long *, unsigned long long, unsigned long long); // [rsp+8h] [rbp-58h]
long long v19; // [rsp+10h] [rbp-50h]
long long ( *v21)(long long, long long, long long, long long); // [rsp+20h] [rbp-40h]
unsigned long long v22; // [rsp+28h] [rbp-38h]
long long v23[6]; // [rsp+30h] [rbp-30h] BYREF
v9 = a5;
v18 = *(long long ( **)(long long, long long *, unsigned long long, unsigned long long))(*(_QWORD *)(a4 + 184) + 40LL);
v21 = *(long long ( **)(long long, long long, long long, long long))(*(_QWORD *)(a1 + 184) + 48LL);
a8[1] = 0LL;
*a9 = 0LL;
if ( a7 )
{
v19 = a7;
v22 = a5 + a6;
v10 = a2 + a3;
v11 = a2;
while ( 1 )
{
v12 = v18(a4, v23, v9, v22);
if ( v12 > 0 )
{
v13 = v9 + (unsigned int)v12;
v14 = v23[0];
goto LABEL_14;
}
if ( !v12 )
goto LABEL_11;
if ( (unsigned int)v12 < 0xFFFFFF9C )
break;
if ( !*a9 )
*a9 = v9;
v13 = v9 + (unsigned int)-v12;
LABEL_19:
while ( 1 )
{
v23[0] = 63LL;
v14 = 63LL;
LABEL_14:
v15 = v21(a1, v14, v11, v10);
if ( v15 > 0 )
break;
if ( v15 || v23[0] == 63 )
goto LABEL_22;
if ( !*a9 )
*a9 = v9;
}
v11 += (unsigned int)v15;
v9 = v13;
if ( !--v19 )
goto LABEL_24;
}
if ( v9 < v22 )
{
LABEL_11:
if ( !a8[1] )
a8[1] = v9;
v13 = v9 + 1;
goto LABEL_19;
}
LABEL_22:
v13 = v9;
}
else
{
v13 = a5;
v11 = a2;
}
LABEL_24:
*a8 = v13;
return v11 - a2;
}
|
my_convert_fix:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R14,R8
MOV R12,RDX
MOV R13,RDI
MOV RDI,qword ptr [RBP + 0x20]
MOV RDX,qword ptr [RBP + 0x18]
MOV R8,qword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x60],RCX
MOV RAX,qword ptr [RCX + 0xb8]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [R13 + 0xb8]
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RBP + -0x40],RAX
XOR EAX,EAX
MOV qword ptr [RDX + 0x8],RAX
MOV qword ptr [RDI],RAX
TEST R8,R8
MOV qword ptr [RBP + -0x48],RSI
JZ 0x0015b42b
MOV qword ptr [RBP + -0x50],R8
ADD R9,R14
MOV qword ptr [RBP + -0x38],R9
ADD R12,RSI
MOV RBX,RSI
LAB_0015b37e:
MOV RDI,qword ptr [RBP + -0x60]
LEA RSI,[RBP + -0x30]
MOV RDX,R14
MOV RCX,qword ptr [RBP + -0x38]
CALL qword ptr [RBP + -0x58]
MOV R15D,EAX
TEST EAX,EAX
JLE 0x0015b3a3
MOV R15D,R15D
ADD R15,R14
MOV RSI,qword ptr [RBP + -0x30]
JMP 0x0015b3db
LAB_0015b3a3:
JZ 0x0015b3c6
CMP R15D,-0x64
JC 0x0015b3c0
MOV RAX,qword ptr [RBP + 0x20]
CMP qword ptr [RAX],0x0
JNZ 0x0015b3b8
MOV qword ptr [RAX],R14
LAB_0015b3b8:
NEG R15D
ADD R15,R14
JMP 0x0015b403
LAB_0015b3c0:
CMP R14,qword ptr [RBP + -0x38]
JNC 0x0015b426
LAB_0015b3c6:
MOV RAX,qword ptr [RBP + 0x18]
CMP qword ptr [RAX + 0x8],0x0
JNZ 0x0015b3d5
MOV qword ptr [RAX + 0x8],R14
LAB_0015b3d5:
LEA R15,[R14 + 0x1]
JMP 0x0015b403
LAB_0015b3db:
MOV RDI,R13
MOV RDX,RBX
MOV RCX,R12
CALL qword ptr [RBP + -0x40]
TEST EAX,EAX
JG 0x0015b412
TEST EAX,EAX
JNZ 0x0015b426
CMP qword ptr [RBP + -0x30],0x3f
JZ 0x0015b426
MOV RAX,qword ptr [RBP + 0x20]
CMP qword ptr [RAX],0x0
JNZ 0x0015b403
MOV qword ptr [RAX],R14
LAB_0015b403:
MOV qword ptr [RBP + -0x30],0x3f
MOV ESI,0x3f
JMP 0x0015b3db
LAB_0015b412:
MOV EAX,EAX
ADD RBX,RAX
MOV R14,R15
DEC qword ptr [RBP + -0x50]
JNZ 0x0015b37e
JMP 0x0015b431
LAB_0015b426:
MOV R15,R14
JMP 0x0015b431
LAB_0015b42b:
MOV R15,R14
MOV RBX,RSI
LAB_0015b431:
MOV RAX,qword ptr [RBP + 0x18]
MOV qword ptr [RAX],R15
SUB RBX,qword ptr [RBP + -0x48]
MOV RAX,RBX
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long my_convert_fix(long param_1,long param_2,long param_3,long param_4,ulong param_5,long param_6,
long param_7,ulong *param_8,ulong *param_9)
{
code *pcVar1;
code *pcVar2;
uint uVar3;
long lVar4;
ulong uVar5;
ulong uVar6;
long local_58;
long local_38;
pcVar1 = *(code **)(*(long *)(param_4 + 0xb8) + 0x28);
pcVar2 = *(code **)(*(long *)(param_1 + 0xb8) + 0x30);
param_8[1] = 0;
*param_9 = 0;
lVar4 = param_2;
uVar5 = param_5;
if (param_7 != 0) {
local_58 = param_7;
while( true ) {
uVar3 = (*pcVar1)(param_4,&local_38,uVar5,param_6 + param_5);
if ((int)uVar3 < 1) break;
uVar6 = uVar3 + uVar5;
while (uVar3 = (*pcVar2)(param_1,local_38,lVar4,param_3 + param_2), (int)uVar3 < 1) {
if ((uVar3 != 0) || (local_38 == 0x3f)) goto LAB_0015b431;
if (*param_9 == 0) {
*param_9 = uVar5;
}
LAB_0015b403:
local_38 = 0x3f;
}
lVar4 = lVar4 + (ulong)uVar3;
local_58 = local_58 + -1;
uVar5 = uVar6;
if (local_58 == 0) goto LAB_0015b431;
}
if (uVar3 != 0) {
if (0xffffff9b < uVar3) {
if (*param_9 == 0) {
*param_9 = uVar5;
}
uVar6 = -uVar3 + uVar5;
goto LAB_0015b403;
}
if (param_6 + param_5 <= uVar5) goto LAB_0015b431;
}
if (param_8[1] == 0) {
param_8[1] = uVar5;
}
uVar6 = uVar5 + 1;
goto LAB_0015b403;
}
LAB_0015b431:
*param_8 = uVar5;
return lVar4 - param_2;
}
|
|
57,563
|
my_strcasecmp_utf8mb3
|
eloqsql/strings/ctype-utf8.c
|
static
int my_strcasecmp_utf8mb3(CHARSET_INFO *cs, const char *s, const char *t)
{
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
while (s[0] && t[0])
{
my_wc_t s_wc,t_wc;
if ((uchar) s[0] < 128)
{
/*
s[0] is between 0 and 127.
It represents a single byte character.
Convert it into weight according to collation.
*/
s_wc= my_unicase_default_page00[(uchar) s[0]].tolower;
s++;
}
else
{
int res;
/*
Scan a multibyte character.
In the future it is worth to write a special version of my_utf8mb3_uni()
for 0-terminated strings which will not take in account length. Now
we call the regular version of my_utf8mb3_uni() with s+3 in the
last argument. s+3 is enough to scan any multibyte sequence.
Calling the regular version of my_utf8mb3_uni is safe for 0-terminated
strings: we will never lose the end of the string:
If we have 0 character in the middle of a multibyte sequence,
then my_utf8mb3_uni will always return a negative number, so the
loop with finish.
*/
res= my_utf8mb3_uni(cs,&s_wc, (const uchar*)s, (const uchar*) s + 3);
/*
In the case of wrong multibyte sequence we will
call strcmp() for byte-to-byte comparison.
*/
if (res <= 0)
return strcmp(s, t);
s+= res;
/* Convert Unicode code into weight according to collation */
my_tolower_utf8mb3(uni_plane, &s_wc);
}
/* Do the same for the second string */
if ((uchar) t[0] < 128)
{
/* Convert single byte character into weight */
t_wc= my_unicase_default_page00[(uchar) t[0]].tolower;
t++;
}
else
{
int res=my_utf8mb3_uni(cs,&t_wc, (const uchar*)t, (const uchar*) t + 3);
if (res <= 0)
return strcmp(s, t);
t+= res;
/* Convert code into weight */
my_tolower_utf8mb3(uni_plane, &t_wc);
}
/* Now we have two weights, let's compare them */
if ( s_wc != t_wc )
return ((int) s_wc) - ((int) t_wc);
}
return ((int)(uchar)s[0]) - ((int) (uchar) t[0]);
}
|
O0
|
c
|
my_strcasecmp_utf8mb3:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x41(%rbp)
je 0x28d31
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
testb $0x1, %al
jne 0x28d3d
jmp 0x28e76
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x80, %eax
jge 0x28d77
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x1ab5b5(%rip), %rax # 0x1d4310
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x28dcc
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
movq -0x18(%rbp), %rcx
addq $0x3, %rcx
leaq -0x30(%rbp), %rsi
callq 0x273c0
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
jg 0x28dae
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x253d0
movl %eax, -0x4(%rbp)
jmp 0x28e89
movl -0x3c(%rbp), %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x28690
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x80, %eax
jge 0x28e06
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x1ab526(%rip), %rax # 0x1d4310
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x28e58
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rdx
movq -0x20(%rbp), %rcx
addq $0x3, %rcx
leaq -0x38(%rbp), %rsi
callq 0x273c0
movl %eax, -0x40(%rbp)
cmpl $0x0, -0x40(%rbp)
jg 0x28e3a
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x253d0
movl %eax, -0x4(%rbp)
jmp 0x28e89
movl -0x40(%rbp), %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x28690
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
je 0x28e71
movq -0x30(%rbp), %rax
movq -0x38(%rbp), %rcx
subl %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x28e89
jmp 0x28d10
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
movq -0x20(%rbp), %rcx
movzbl (%rcx), %ecx
subl %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_strcasecmp_utf8mb3:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov rax, [rax+78h]
mov [rbp+var_28], rax
loc_28D10:
mov rax, [rbp+var_18]
movsx ecx, byte ptr [rax]
xor eax, eax
cmp ecx, 0
mov [rbp+var_41], al
jz short loc_28D31
mov rax, [rbp+var_20]
movsx eax, byte ptr [rax]
cmp eax, 0
setnz al
mov [rbp+var_41], al
loc_28D31:
mov al, [rbp+var_41]
test al, 1
jnz short loc_28D3D
jmp loc_28E76
loc_28D3D:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
cmp eax, 80h
jge short loc_28D77
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
mov ecx, eax
lea rax, my_unicase_default_page00
imul rcx, 0Ch
add rax, rcx
mov eax, [rax+4]
mov [rbp+var_30], rax
mov rax, [rbp+var_18]
add rax, 1
mov [rbp+var_18], rax
jmp short loc_28DCC
loc_28D77:
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_18]
add rcx, 3
lea rsi, [rbp+var_30]
call my_utf8mb3_uni
mov [rbp+var_3C], eax
cmp [rbp+var_3C], 0
jg short loc_28DAE
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
call _strcmp
mov [rbp+var_4], eax
jmp loc_28E89
loc_28DAE:
mov ecx, [rbp+var_3C]
mov rax, [rbp+var_18]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_18], rax
mov rdi, [rbp+var_28]
lea rsi, [rbp+var_30]
call my_tolower_utf8mb3
loc_28DCC:
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
cmp eax, 80h
jge short loc_28E06
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
mov ecx, eax
lea rax, my_unicase_default_page00
imul rcx, 0Ch
add rax, rcx
mov eax, [rax+4]
mov [rbp+var_38], rax
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
jmp short loc_28E58
loc_28E06:
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_20]
add rcx, 3
lea rsi, [rbp+var_38]
call my_utf8mb3_uni
mov [rbp+var_40], eax
cmp [rbp+var_40], 0
jg short loc_28E3A
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
call _strcmp
mov [rbp+var_4], eax
jmp short loc_28E89
loc_28E3A:
mov ecx, [rbp+var_40]
mov rax, [rbp+var_20]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_20], rax
mov rdi, [rbp+var_28]
lea rsi, [rbp+var_38]
call my_tolower_utf8mb3
loc_28E58:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_38]
jz short loc_28E71
mov rax, [rbp+var_30]
mov rcx, [rbp+var_38]
sub eax, ecx
mov [rbp+var_4], eax
jmp short loc_28E89
loc_28E71:
jmp loc_28D10
loc_28E76:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
mov rcx, [rbp+var_20]
movzx ecx, byte ptr [rcx]
sub eax, ecx
mov [rbp+var_4], eax
loc_28E89:
mov eax, [rbp+var_4]
add rsp, 50h
pop rbp
retn
|
long long my_strcasecmp_utf8mb3(long long a1, _BYTE *a2, _BYTE *a3, long long a4, long long a5, long long a6)
{
bool v7; // [rsp+Fh] [rbp-41h]
int v8; // [rsp+10h] [rbp-40h]
int v9; // [rsp+14h] [rbp-3Ch]
long long v10; // [rsp+18h] [rbp-38h] BYREF
long long v11; // [rsp+20h] [rbp-30h] BYREF
long long v12; // [rsp+28h] [rbp-28h]
_BYTE *v13; // [rsp+30h] [rbp-20h]
_BYTE *v14; // [rsp+38h] [rbp-18h]
long long v15; // [rsp+40h] [rbp-10h]
v15 = a1;
v14 = a2;
v13 = a3;
v12 = *(_QWORD *)(a1 + 120);
while ( 1 )
{
v7 = 0;
if ( *v14 )
v7 = *v13 != 0;
if ( !v7 )
break;
if ( (unsigned __int8)*v14 >= 0x80u )
{
v9 = my_utf8mb3_uni(v15, (long long)&v11, (long long)v14, (long long)(v14 + 3), a5, a6);
if ( v9 <= 0 )
return (unsigned int)strcmp(v14, v13);
v14 += v9;
my_tolower_utf8mb3(v12, &v11);
}
else
{
v11 = my_unicase_default_page00[3 * (unsigned __int8)*v14++ + 1];
}
if ( (unsigned __int8)*v13 >= 0x80u )
{
v8 = my_utf8mb3_uni(v15, (long long)&v10, (long long)v13, (long long)(v13 + 3), a5, a6);
if ( v8 <= 0 )
return (unsigned int)strcmp(v14, v13);
v13 += v8;
my_tolower_utf8mb3(v12, &v10);
}
else
{
v10 = my_unicase_default_page00[3 * (unsigned __int8)*v13++ + 1];
}
if ( v11 != v10 )
return (unsigned int)(v11 - v10);
}
return (unsigned int)((unsigned __int8)*v14 - (unsigned __int8)*v13);
}
|
my_strcasecmp_utf8mb3:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x78]
MOV qword ptr [RBP + -0x28],RAX
LAB_00128d10:
MOV RAX,qword ptr [RBP + -0x18]
MOVSX ECX,byte ptr [RAX]
XOR EAX,EAX
CMP ECX,0x0
MOV byte ptr [RBP + -0x41],AL
JZ 0x00128d31
MOV RAX,qword ptr [RBP + -0x20]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x41],AL
LAB_00128d31:
MOV AL,byte ptr [RBP + -0x41]
TEST AL,0x1
JNZ 0x00128d3d
JMP 0x00128e76
LAB_00128d3d:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x80
JGE 0x00128d77
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
MOV ECX,EAX
LEA RAX,[0x2d4310]
IMUL RCX,RCX,0xc
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0x4]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00128dcc
LAB_00128d77:
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x18]
ADD RCX,0x3
LEA RSI,[RBP + -0x30]
CALL 0x001273c0
MOV dword ptr [RBP + -0x3c],EAX
CMP dword ptr [RBP + -0x3c],0x0
JG 0x00128dae
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x001253d0
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00128e89
LAB_00128dae:
MOV ECX,dword ptr [RBP + -0x3c]
MOV RAX,qword ptr [RBP + -0x18]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
MOV RDI,qword ptr [RBP + -0x28]
LEA RSI,[RBP + -0x30]
CALL 0x00128690
LAB_00128dcc:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x80
JGE 0x00128e06
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
MOV ECX,EAX
LEA RAX,[0x2d4310]
IMUL RCX,RCX,0xc
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0x4]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x00128e58
LAB_00128e06:
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x20]
ADD RCX,0x3
LEA RSI,[RBP + -0x38]
CALL 0x001273c0
MOV dword ptr [RBP + -0x40],EAX
CMP dword ptr [RBP + -0x40],0x0
JG 0x00128e3a
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x001253d0
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00128e89
LAB_00128e3a:
MOV ECX,dword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x20]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x28]
LEA RSI,[RBP + -0x38]
CALL 0x00128690
LAB_00128e58:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x38]
JZ 0x00128e71
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x38]
SUB EAX,ECX
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00128e89
LAB_00128e71:
JMP 0x00128d10
LAB_00128e76:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RCX]
SUB EAX,ECX
MOV dword ptr [RBP + -0x4],EAX
LAB_00128e89:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x50
POP RBP
RET
|
int my_strcasecmp_utf8mb3(long param_1,byte *param_2,byte *param_3)
{
int iVar1;
bool bVar2;
ulong local_40;
ulong local_38;
int8 local_30;
byte *local_28;
byte *local_20;
long local_18;
local_30 = *(int8 *)(param_1 + 0x78);
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
do {
bVar2 = false;
if (*local_20 != 0) {
bVar2 = *local_28 != 0;
}
if (!bVar2) {
return (uint)*local_20 - (uint)*local_28;
}
if (*local_20 < 0x80) {
local_38 = (ulong)*(uint *)(my_unicase_default_page00 + (ulong)*local_20 * 0xc + 4);
local_20 = local_20 + 1;
}
else {
iVar1 = my_utf8mb3_uni(local_18,&local_38,local_20,local_20 + 3);
if (iVar1 < 1) {
iVar1 = strcmp((char *)local_20,(char *)local_28);
return iVar1;
}
local_20 = local_20 + iVar1;
my_tolower_utf8mb3(local_30,&local_38);
}
if (*local_28 < 0x80) {
local_40 = (ulong)*(uint *)(my_unicase_default_page00 + (ulong)*local_28 * 0xc + 4);
local_28 = local_28 + 1;
}
else {
iVar1 = my_utf8mb3_uni(local_18,&local_40,local_28,local_28 + 3);
if (iVar1 < 1) {
iVar1 = strcmp((char *)local_20,(char *)local_28);
return iVar1;
}
local_28 = local_28 + iVar1;
my_tolower_utf8mb3(local_30,&local_40);
}
} while (local_38 == local_40);
return (int)local_38 - (int)local_40;
}
|
|
57,564
|
my_hash_sort_simple_nopad
|
eloqsql/strings/ctype-simple.c
|
void my_hash_sort_simple_nopad(CHARSET_INFO *cs,
const uchar *key, size_t len,
ulong *nr1, ulong *nr2)
{
register const uchar *sort_order=cs->sort_order;
const uchar *end= key + len;
register ulong m1= *nr1, m2= *nr2;
for (; key < (uchar*) end ; key++)
{
MY_HASH_ADD(m1, m2, (uint) sort_order[(uint) *key]);
}
*nr1= m1;
*nr2= m2;
}
|
O0
|
c
|
my_hash_sort_simple_nopad:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0x4a1f4
jmp 0x4a1a2
movq -0x40(%rbp), %rax
andq $0x3f, %rax
addq -0x48(%rbp), %rax
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rdx
movzbl (%rdx), %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
movl %ecx, %ecx
imulq %rcx, %rax
movq -0x40(%rbp), %rcx
shlq $0x8, %rcx
addq %rcx, %rax
xorq -0x40(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x48(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x48(%rbp)
jmp 0x4a1e6
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x4a196
movq -0x40(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x48(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
popq %rbp
retq
nopl (%rax)
|
my_hash_sort_simple_nopad:
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], r8
mov rax, [rbp+var_8]
mov rax, [rax+58h]
mov [rbp+var_30], rax
mov rax, [rbp+var_10]
add rax, [rbp+var_18]
mov [rbp+var_38], rax
mov rax, [rbp+var_20]
mov rax, [rax]
mov [rbp+var_40], rax
mov rax, [rbp+var_28]
mov rax, [rax]
mov [rbp+var_48], rax
loc_4A196:
mov rax, [rbp+var_10]
cmp rax, [rbp+var_38]
jnb short loc_4A1F4
jmp short $+2
loc_4A1A2:
mov rax, [rbp+var_40]
and rax, 3Fh
add rax, [rbp+var_48]
mov rcx, [rbp+var_30]
mov rdx, [rbp+var_10]
movzx edx, byte ptr [rdx]
mov edx, edx
movzx ecx, byte ptr [rcx+rdx]
mov ecx, ecx
imul rax, rcx
mov rcx, [rbp+var_40]
shl rcx, 8
add rax, rcx
xor rax, [rbp+var_40]
mov [rbp+var_40], rax
mov rax, [rbp+var_48]
add rax, 3
mov [rbp+var_48], rax
jmp short $+2
loc_4A1E6:
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp short loc_4A196
loc_4A1F4:
mov rcx, [rbp+var_40]
mov rax, [rbp+var_20]
mov [rax], rcx
mov rcx, [rbp+var_48]
mov rax, [rbp+var_28]
mov [rax], rcx
pop rbp
retn
|
_QWORD * my_hash_sort_simple_nopad(long long a1, unsigned __int8 *a2, long long a3, long long *a4, _QWORD *a5)
{
_QWORD *result; // rax
long long v6; // [rsp+0h] [rbp-48h]
long long v7; // [rsp+8h] [rbp-40h]
unsigned __int8 *v8; // [rsp+38h] [rbp-10h]
v8 = a2;
v7 = *a4;
v6 = *a5;
while ( v8 < &a2[a3] )
{
v7 ^= (v7 << 8) + *(unsigned __int8 *)(*(_QWORD *)(a1 + 88) + *v8) * (v6 + (v7 & 0x3F));
v6 += 3LL;
++v8;
}
*a4 = v7;
result = a5;
*a5 = v6;
return result;
}
|
my_hash_sort_simple_nopad:
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],R8
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x58]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x48],RAX
LAB_0014a196:
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x38]
JNC 0x0014a1f4
JMP 0x0014a1a2
LAB_0014a1a2:
MOV RAX,qword ptr [RBP + -0x40]
AND RAX,0x3f
ADD RAX,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x10]
MOVZX EDX,byte ptr [RDX]
MOV EDX,EDX
MOVZX ECX,byte ptr [RCX + RDX*0x1]
MOV ECX,ECX
IMUL RAX,RCX
MOV RCX,qword ptr [RBP + -0x40]
SHL RCX,0x8
ADD RAX,RCX
XOR RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,0x3
MOV qword ptr [RBP + -0x48],RAX
JMP 0x0014a1e6
LAB_0014a1e6:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0014a196
LAB_0014a1f4:
MOV RCX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],RCX
POP RBP
RET
|
void my_hash_sort_simple_nopad(long param_1,byte *param_2,long param_3,ulong *param_4,long *param_5)
{
long local_50;
ulong local_48;
byte *local_18;
local_48 = *param_4;
local_50 = *param_5;
for (local_18 = param_2; local_18 < param_2 + param_3; local_18 = local_18 + 1) {
local_48 = ((local_48 & 0x3f) + local_50) *
(ulong)*(byte *)(*(long *)(param_1 + 0x58) + (ulong)*local_18) + local_48 * 0x100 ^
local_48;
local_50 = local_50 + 3;
}
*param_4 = local_48;
*param_5 = local_50;
return;
}
|
|
57,565
|
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [9], 0>(char const (&) [9])
|
monkey531[P]llama/common/json.hpp
|
reference at(KeyType && key)
{
// at only works for objects
if (JSON_HEDLEY_UNLIKELY(!is_object()))
{
JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this));
}
auto it = m_data.m_value.object->find(std::forward<KeyType>(key));
if (it == m_data.m_value.object->end())
{
JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this));
}
return set_parent(it->second);
}
|
O0
|
cpp
|
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [9], 0>(char const (&) [9]):
subq $0xc8, %rsp
movq %rdi, 0xc0(%rsp)
movq %rsi, 0xb8(%rsp)
movq 0xc0(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0xb32f0
xorb $-0x1, %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x165038
jmp 0x165114
movb $0x1, 0x83(%rsp)
movl $0x20, %edi
callq 0x5a6b0
movq 0x20(%rsp), %rdi
movq %rax, 0x18(%rsp)
callq 0xba0c0
movq %rax, 0x90(%rsp)
leaq 0xb0e61(%rip), %rsi # 0x215ec9
leaq 0x98(%rsp), %rdi
leaq 0x90(%rsp), %rdx
callq 0x16d140
jmp 0x16507f
movq 0x20(%rsp), %rcx
movq 0x18(%rsp), %rdi
movl $0x130, %esi # imm = 0x130
leaq 0x98(%rsp), %rdx
callq 0xb9e60
jmp 0x16509d
movq 0x18(%rsp), %rdi
movb $0x0, 0x83(%rsp)
leaq 0x13ecc7(%rip), %rsi # 0x2a3d78
leaq -0xaaf48(%rip), %rdx # 0xba170
callq 0x5ab40
jmp 0x1652a5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
jmp 0x1650f9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
leaq 0x98(%rsp), %rdi
callq 0x5b648
testb $0x1, 0x83(%rsp)
jne 0x165105
jmp 0x16510f
movq 0x18(%rsp), %rdi
callq 0x5b020
jmp 0x165298
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0xb8(%rsp), %rsi
callq 0x16e290
movq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x78(%rsp)
movq 0x8(%rax), %rdi
callq 0xb8af0
movq %rax, 0x70(%rsp)
leaq 0x78(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0xb9a90
testb $0x1, %al
jne 0x16515d
jmp 0x16526e
movb $0x1, 0x2e(%rsp)
movl $0x20, %edi
callq 0x5a6b0
movq %rax, (%rsp)
movq 0xb8(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x2f(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x5b180
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x30(%rsp), %rdi
callq 0x65530
jmp 0x1651a2
leaq 0xb0d50(%rip), %rsi # 0x215ef9
leaq 0xb0d4f(%rip), %rcx # 0x215eff
leaq 0x50(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x16e360
jmp 0x1651c1
movq 0x20(%rsp), %rcx
movq (%rsp), %rdi
movl $0x193, %esi # imm = 0x193
leaq 0x50(%rsp), %rdx
callq 0xb2e40
jmp 0x1651db
movq (%rsp), %rdi
movb $0x0, 0x2e(%rsp)
leaq 0x13eb0d(%rip), %rsi # 0x2a3cf8
leaq -0xb2da2(%rip), %rdx # 0xb2450
callq 0x5ab40
jmp 0x1652a5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
jmp 0x165250
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
jmp 0x165246
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x5b648
leaq 0x30(%rsp), %rdi
callq 0x5b648
leaq 0x2f(%rsp), %rdi
callq 0x5b620
testb $0x1, 0x2e(%rsp)
jne 0x165263
jmp 0x16526c
movq (%rsp), %rdi
callq 0x5b020
jmp 0x165298
leaq 0x78(%rsp), %rdi
callq 0xb9c90
movq 0x20(%rsp), %rdi
movq %rax, %rsi
addq $0x20, %rsi
movq $-0x1, %rdx
callq 0x16d020
addq $0xc8, %rsp
retq
movq 0x88(%rsp), %rdi
callq 0x5ac00
nopw %cs:(%rax,%rax)
nop
|
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_:
sub rsp, 0C8h
mov [rsp+0C8h+var_8], rdi
mov qword ptr [rsp+0C8h+var_10], rsi
mov rdi, [rsp+0C8h+var_8]
mov [rsp+0C8h+var_A8], rdi; int
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9is_objectEv; 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>::is_object(void)
xor al, 0FFh
xor al, 0FFh
xor al, 0FFh
test al, 1
jnz short loc_165038
jmp loc_165114
loc_165038:
mov [rsp+0C8h+var_45], 1
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rdi, [rsp+0C8h+var_A8]
mov [rsp+0C8h+var_B0], rax; char
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
mov qword ptr [rsp+0C8h+var_38], rax; char
lea rsi, aCannotUseAtWit; "cannot use at() with "
lea rdi, [rsp+0C8h+var_30]; int
lea rdx, [rsp+0C8h+var_38]; int
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&)
jmp short $+2
loc_16507F:
mov rcx, [rsp+0C8h+var_A8]
mov rdi, [rsp+0C8h+var_B0]; int
mov esi, 130h
lea rdx, [rsp+0C8h+var_30]
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
jmp short $+2
loc_16509D:
mov rdi, [rsp+0C8h+var_B0]; void *
mov [rsp+0C8h+var_45], 0
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail10type_errorD2Ev; void (*)(void *)
call ___cxa_throw
jmp loc_1652A5
mov rcx, rax
mov eax, edx
mov [rsp+arg_80], rcx
mov [rsp+arg_7C], eax
jmp short loc_1650F9
mov rcx, rax
mov eax, edx
mov [rsp+arg_80], rcx
mov [rsp+arg_7C], eax
lea rdi, [rsp+arg_90]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_1650F9:
test [rsp+arg_7B], 1
jnz short loc_165105
jmp short loc_16510F
loc_165105:
mov rdi, [rsp+arg_10]; void *
call ___cxa_free_exception
loc_16510F:
jmp loc_165298
loc_165114:
mov rax, [rsp+0C8h+var_A8]
mov rdi, [rax+8]
mov rsi, qword ptr [rsp+0C8h+var_10]
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA8_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_
mov rcx, rax
mov rax, [rsp+0C8h+var_A8]
mov qword ptr [rsp+0C8h+var_50], rcx; int
mov rdi, [rax+8]
call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE3endEv; std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::end(void)
mov qword ptr [rsp+0C8h+var_58], rax; char
lea rdi, [rsp+0C8h+var_50]
lea rsi, [rsp+0C8h+var_58]
call _ZN9__gnu_cxxeqIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEEbRKNS_17__normal_iteratorIT_T0_EESR_; __gnu_cxx::operator==<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>(__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&,__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&)
test al, 1
jnz short loc_16515D
jmp loc_16526E
loc_16515D:
mov [rsp+0C8h+var_9A], 1
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov [rsp+0C8h+var_C8], rax; int
mov rax, qword ptr [rsp+0C8h+var_10]
mov qword ptr [rsp+0C8h+var_C0], rax; int
lea rdi, [rsp+0C8h+var_99]
mov qword ptr [rsp+0C8h+var_B8], rdi; int
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rsi, qword ptr [rsp+0C8h+var_C0]
mov rdx, qword ptr [rsp+0C8h+var_B8]
lea rdi, [rsp+0C8h+var_99+1]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_1651A2:
lea rsi, aKey; "key '"
lea rcx, aNotFound; "' not found"
lea rdi, [rsp+0C8h+var_78]; int
lea rdx, [rsp+0C8h+var_99+1]; int
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&)
jmp short $+2
loc_1651C1:
mov rcx, [rsp+0C8h+var_A8]
mov rdi, [rsp+0C8h+var_C8]; int
mov esi, 193h
lea rdx, [rsp+0C8h+var_78]
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
jmp short $+2
loc_1651DB:
mov rdi, [rsp+0C8h+var_C8]; void *
mov [rsp+0C8h+var_9A], 0
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail12out_of_rangeD2Ev; void (*)(void *)
call ___cxa_throw
jmp loc_1652A5
mov rcx, rax
mov eax, edx
mov [rsp+arg_80], rcx
mov [rsp+arg_7C], eax
jmp short loc_165250
mov rcx, rax
mov eax, edx
mov [rsp+arg_80], rcx
mov [rsp+arg_7C], eax
jmp short loc_165246
mov rcx, rax
mov eax, edx
mov [rsp+arg_80], rcx
mov [rsp+arg_7C], eax
lea rdi, [rsp+arg_48]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_165246:
lea rdi, [rsp+arg_28]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_165250:
lea rdi, [rsp+arg_27]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
test [rsp+arg_26], 1
jnz short loc_165263
jmp short loc_16526C
loc_165263:
mov rdi, [rsp+0]; void *
call ___cxa_free_exception
loc_16526C:
jmp short loc_165298
loc_16526E:
lea rdi, [rsp+0C8h+var_50]
call _ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEptEv; __gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::operator->(void)
mov rdi, [rsp+0C8h+var_A8]
mov rsi, rax
add rsi, 20h ; ' '
mov rdx, 0FFFFFFFFFFFFFFFFh
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10set_parentERSD_m; 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>::set_parent(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>&,ulong)
add rsp, 0C8h
retn
loc_165298:
mov rdi, [rsp+arg_80]
call __Unwind_Resume
loc_1652A5:
nop word ptr [rax+rax+00000000h]
nop
|
long long ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_(
long long a1,
long long a2)
{
int v2; // ecx
int v3; // r8d
int v4; // r9d
int v5; // r8d
int v6; // r9d
long long v7; // rax
int v9; // [rsp+0h] [rbp-C8h]
void *v10; // [rsp+0h] [rbp-C8h]
nlohmann::json_abi_v3_11_3::detail::out_of_range *v11; // [rsp+0h] [rbp-C8h]
void *v12; // [rsp+8h] [rbp-C0h]
long long v13; // [rsp+8h] [rbp-C0h]
int v14; // [rsp+10h] [rbp-B8h]
int v15; // [rsp+18h] [rbp-B0h]
void *exception; // [rsp+18h] [rbp-B0h]
nlohmann::json_abi_v3_11_3::detail::type_error *v17; // [rsp+18h] [rbp-B0h]
long long v18; // [rsp+20h] [rbp-A8h]
char v19; // [rsp+2Fh] [rbp-99h] BYREF
_BYTE v20[32]; // [rsp+30h] [rbp-98h] BYREF
int v21[8]; // [rsp+50h] [rbp-78h] BYREF
char v22[8]; // [rsp+70h] [rbp-58h] BYREF
int v23[2]; // [rsp+78h] [rbp-50h] BYREF
char v24; // [rsp+83h] [rbp-45h]
char v25[8]; // [rsp+90h] [rbp-38h] BYREF
int v26[8]; // [rsp+98h] [rbp-30h] BYREF
int v27[2]; // [rsp+B8h] [rbp-10h]
long long v28; // [rsp+C0h] [rbp-8h]
v28 = a1;
*(_QWORD *)v27 = a2;
if ( !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>::is_object((_BYTE *)a1) )
{
exception = __cxa_allocate_exception(0x20uLL);
*(_QWORD *)v25 = 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((_BYTE *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(
(int)v26,
(int)"cannot use at() with ",
(int)v25,
v2,
v3,
v4,
v9,
v12,
v14,
(long long)exception);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
v17,
304,
(long long)v26,
a1);
v24 = 0;
__cxa_throw(
v17,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::type_error::~type_error);
}
*(_QWORD *)v23 = ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA8_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_(
*(_QWORD *)(a1 + 8),
*(_QWORD *)v27);
*(_QWORD *)v22 = std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::end(*(_QWORD *)(a1 + 8));
if ( __gnu_cxx::operator==<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>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>(
(long long)v23,
(long long)v22) )
{
v10 = __cxa_allocate_exception(0x20uLL);
v13 = *(_QWORD *)v27;
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>((long long)v20, v13, (long long)&v19);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(
(int)v21,
(int)"key '",
(int)v20,
(int)"' not found",
v5,
v6,
v10,
v13,
(int)&v19,
v15,
a1);
ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
v11,
403,
(long long)v21,
v18);
__cxa_throw(
v11,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::out_of_range::~out_of_range);
}
v7 = __gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::operator->((long long)v23);
return 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>::set_parent(
a1,
v7 + 32,
-1LL);
}
| |||
57,566
|
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [9], 0>(char const (&) [9])
|
monkey531[P]llama/common/json.hpp
|
reference at(KeyType && key)
{
// at only works for objects
if (JSON_HEDLEY_UNLIKELY(!is_object()))
{
JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this));
}
auto it = m_data.m_value.object->find(std::forward<KeyType>(key));
if (it == m_data.m_value.object->end())
{
JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this));
}
return set_parent(it->second);
}
|
O1
|
cpp
|
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [9], 0>(char const (&) [9]):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
cmpb $0x1, (%rdi)
jne 0xa7414
movq %rsi, %r15
movq 0x8(%r14), %r12
movq (%r12), %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
je 0xa73f9
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1b210
testl %eax, %eax
je 0xa73f6
addq $0x30, %rbx
jmp 0xa73d7
movq %rbx, %rax
movq 0x8(%r14), %rcx
cmpq 0x8(%rcx), %rax
je 0xa7470
addq $0x20, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x1b450
movq %rax, %rbx
movq %r14, %rdi
callq 0x6113e
leaq 0x20(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x4f0c6(%rip), %rsi # 0xf64fe
movq %rsp, %rdi
callq 0xadd99
movb $0x1, %bpl
movq %rsp, %rdx
movq %rbx, %rdi
movl $0x130, %esi # imm = 0x130
movq %r14, %rcx
callq 0x60ee6
xorl %ebp, %ebp
leaq 0x87aa9(%rip), %rsi # 0x12ef08
leaq -0x4a1e6(%rip), %rdx # 0x5d280
movq %rbx, %rdi
callq 0x1bfb0
jmp 0xa74e9
movl $0x20, %edi
callq 0x1b450
movq %rax, %rbx
leaq 0x30(%rsp), %r12
movq %r12, -0x10(%r12)
movq %r15, %rdi
callq 0x1b3f0
leaq (%rax,%r15), %rdx
leaq 0x20(%rsp), %rdi
movq %r15, %rsi
callq 0x244b0
leaq 0x4f087(%rip), %rsi # 0xf652e
leaq 0x4f086(%rip), %rcx # 0xf6534
movq %rsp, %rdi
leaq 0x20(%rsp), %rdx
callq 0xae3a2
movb $0x1, %bpl
movq %rsp, %rdx
movq %rbx, %rdi
movl $0x193, %esi # imm = 0x193
movq %r14, %rcx
callq 0x5f458
xorl %ebp, %ebp
leaq 0x879ae(%rip), %rsi # 0x12ee88
leaq -0x4a261(%rip), %rdx # 0x5d280
movq %rbx, %rdi
callq 0x1bfb0
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa750f
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1b8e0
jmp 0xa750f
movq %rax, %r14
movb $0x1, %bpl
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0xa7548
movq 0x30(%rsp), %rsi
jmp 0xa7538
jmp 0xa7542
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa7548
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1b8e0
jmp 0xa7548
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0xa7555
movq %rbx, %rdi
callq 0x1b670
movq %r14, %rdi
callq 0x1c030
nop
|
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_:
push rbp; char
push r15; int
push r14; int
push r12; int
push rbx; char
sub rsp, 40h
mov r14, rdi
cmp byte ptr [rdi], 1
jnz short loc_A7414
mov r15, rsi
mov r12, [r14+8]
mov rbx, [r12]
loc_A73D7:
mov rax, [r12+8]
cmp rbx, rax
jz short loc_A73F9
mov rdi, rbx
mov rsi, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_A73F6
add rbx, 30h ; '0'
jmp short loc_A73D7
loc_A73F6:
mov rax, rbx
loc_A73F9:
mov rcx, [r14+8]
cmp rax, [rcx+8]
jz short loc_A7470
add rax, 20h ; ' '
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_A7414:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+68h+var_48]
mov [rdx], rax
lea rsi, aCannotUseAtWit; "cannot use at() with "
mov rdi, rsp
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&)
mov bpl, 1
mov rdx, rsp
mov rdi, rbx; this
mov esi, 130h; 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
jmp short loc_A74E9
loc_A7470:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r12, [rsp+68h+var_38]
mov [r12-10h], r12
mov rdi, r15
call _strlen
lea rdx, [rax+r15]
lea rdi, [rsp+68h+var_48]
mov rsi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rsi, aKey; "key '"
lea rcx, aNotFound; "' not found"
mov rdi, rsp
lea rdx, [rsp+68h+var_48]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&)
mov bpl, 1
mov rdx, rsp
mov rdi, rbx; this
mov esi, 193h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_A74E9:
mov r14, rax
lea rax, [rsp+68h+var_58]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A750F
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_A750F
mov r14, rax
mov bpl, 1
loc_A750F:
mov rdi, [rsp+68h+var_48]
cmp rdi, r12
jz short loc_A7548
mov rsi, [rsp+68h+var_38]
jmp short loc_A7538
jmp short loc_A7542
mov r14, rax
lea rax, [rsp+68h+var_58]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A7548
mov rsi, [rsp+68h+var_58]
loc_A7538:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_A7548
loc_A7542:
mov r14, rax
mov bpl, 1
loc_A7548:
test bpl, bpl
jz short loc_A7555
mov rdi, rbx; void *
call ___cxa_free_exception
loc_A7555:
mov rdi, r14
call __Unwind_Resume
|
long long ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_(
long long a1,
_BYTE *a2)
{
long long *v2; // r12
long long i; // rbx
long long v4; // rax
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
nlohmann::json_abi_v3_11_3::detail::exception *v7; // rbx
long long v8; // rax
_QWORD v9[2]; // [rsp+0h] [rbp-68h] BYREF
_QWORD v10[2]; // [rsp+20h] [rbp-48h] BYREF
long long v11; // [rsp+30h] [rbp-38h] BYREF
if ( *(_BYTE *)a1 != 1 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v10[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>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(v9, "cannot use at() with ");
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
304,
v9);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
v2 = *(long long **)(a1 + 8);
for ( i = *v2; ; i += 48LL )
{
v4 = v2[1];
if ( i == v4 )
break;
if ( !(unsigned int)std::string::compare(i, a2) )
{
v4 = i;
break;
}
}
if ( v4 == *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL) )
{
v7 = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v10[0] = &v11;
v8 = strlen(a2);
std::string::_M_construct<char const*>(v10, a2, (long long)&a2[v8]);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(
v9,
"key '",
v10,
"' not found");
ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
v7,
403,
v9);
__cxa_throw(
v7,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return v4 + 32;
}
|
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV R14,RDI
CMP byte ptr [RDI],0x1
JNZ 0x001a7414
MOV R15,RSI
MOV R12,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [R12]
LAB_001a73d7:
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JZ 0x001a73f9
MOV RDI,RBX
MOV RSI,R15
CALL 0x0011b210
TEST EAX,EAX
JZ 0x001a73f6
ADD RBX,0x30
JMP 0x001a73d7
LAB_001a73f6:
MOV RAX,RBX
LAB_001a73f9:
MOV RCX,qword ptr [R14 + 0x8]
CMP RAX,qword ptr [RCX + 0x8]
JZ 0x001a7470
ADD RAX,0x20
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001a7414:
MOV EDI,0x20
CALL 0x0011b450
MOV RBX,RAX
MOV RDI,R14
CALL 0x0016113e
LEA RDX,[RSP + 0x20]
MOV qword ptr [RDX],RAX
LAB_001a7431:
LEA RSI,[0x1f64fe]
MOV RDI,RSP
CALL 0x001add99
MOV BPL,0x1
LAB_001a7443:
MOV RDX,RSP
MOV RDI,RBX
MOV ESI,0x130
MOV RCX,R14
CALL 0x00160ee6
XOR EBP,EBP
LEA RSI,[0x22ef08]
LEA RDX,[0x15d280]
MOV RDI,RBX
CALL 0x0011bfb0
LAB_001a7470:
MOV EDI,0x20
CALL 0x0011b450
MOV RBX,RAX
LEA R12,[RSP + 0x30]
MOV qword ptr [R12 + -0x10],R12
MOV RDI,R15
CALL 0x0011b3f0
LEA RDX,[RAX + R15*0x1]
LAB_001a7493:
LEA RDI,[RSP + 0x20]
MOV RSI,R15
CALL 0x001244b0
LAB_001a74a0:
LEA RSI,[0x1f652e]
LEA RCX,[0x1f6534]
MOV RDI,RSP
LEA RDX,[RSP + 0x20]
CALL 0x001ae3a2
MOV BPL,0x1
LAB_001a74be:
MOV RDX,RSP
MOV RDI,RBX
MOV ESI,0x193
MOV RCX,R14
CALL 0x0015f458
XOR EBP,EBP
LEA RSI,[0x22ee88]
LEA RDX,[0x15d280]
MOV RDI,RBX
CALL 0x0011bfb0
|
char * _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*param_1,char *param_2)
{
int8 *puVar1;
int iVar2;
char *pcVar3;
int8 uVar4;
size_t sVar5;
char *pcVar6;
detail adStack_68 [32];
char *local_48 [2];
char local_38 [16];
if (*param_1 !=
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
uVar4 = __cxa_allocate_exception(0x20);
local_48[0] = (char *)nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name(param_1);
/* try { // try from 001a7431 to 001a743f has its CatchHandler @ 001a7542 */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*>
(adStack_68,"cannot use at() with ",local_48);
/* try { // try from 001a7443 to 001a746d has its CatchHandler @ 001a7522 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar4,0x130,adStack_68,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
puVar1 = *(int8 **)(param_1 + 8);
pcVar6 = (char *)*puVar1;
while ((pcVar3 = (char *)puVar1[1], pcVar6 != pcVar3 &&
(iVar2 = std::__cxx11::string::compare(pcVar6), pcVar3 = pcVar6, iVar2 != 0))) {
pcVar6 = pcVar6 + 0x30;
}
if (pcVar3 == *(char **)(*(long *)(param_1 + 8) + 8)) {
uVar4 = __cxa_allocate_exception(0x20);
local_48[0] = local_38;
sVar5 = strlen(param_2);
/* try { // try from 001a7493 to 001a749f has its CatchHandler @ 001a7520 */
std::__cxx11::string::_M_construct<char_const*>(local_48,param_2,param_2 + sVar5);
/* try { // try from 001a74a0 to 001a74ba has its CatchHandler @ 001a7509 */
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]>
(adStack_68,"key \'",(string *)local_48,"\' not found");
/* try { // try from 001a74be to 001a74e8 has its CatchHandler @ 001a74e9 */
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar4,0x193,adStack_68,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return pcVar3 + 0x20;
}
|
|
57,567
|
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [9], 0>(char const (&) [9])
|
monkey531[P]llama/common/json.hpp
|
reference at(KeyType && key)
{
// at only works for objects
if (JSON_HEDLEY_UNLIKELY(!is_object()))
{
JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this));
}
auto it = m_data.m_value.object->find(std::forward<KeyType>(key));
if (it == m_data.m_value.object->end())
{
JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this));
}
return set_parent(it->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>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [9], 0>(char const (&) [9]):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %r14
cmpb $0x1, (%rdi)
jne 0x7c89b
movq %rsi, %r15
movq 0x8(%r14), %rdi
callq 0x8023e
movq 0x8(%r14), %rcx
cmpq 0x8(%rcx), %rax
je 0x7c8f9
addq $0x20, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x23470
movq %rax, %rbx
movq %r14, %rdi
callq 0x44c82
leaq 0x28(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x39c21(%rip), %rsi # 0xb64de
leaq 0x8(%rsp), %rdi
callq 0x7f21b
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0x130, %esi # imm = 0x130
movq %r14, %rcx
callq 0x44b36
xorl %ebp, %ebp
leaq 0x80650(%rip), %rsi # 0xfcf38
leaq -0x3b0dd(%rip), %rdx # 0x41812
movq %rbx, %rdi
callq 0x23fb0
jmp 0x7c963
pushq $0x20
popq %rdi
callq 0x23470
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movq %r15, %rsi
callq 0x28b3c
leaq 0x39bf1(%rip), %rsi # 0xb650e
leaq 0x39bf0(%rip), %rcx # 0xb6514
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x7f825
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0x193, %esi # imm = 0x193
movq %r14, %rcx
callq 0x433e2
xorl %ebp, %ebp
leaq 0x80564(%rip), %rsi # 0xfceb8
leaq -0x3b149(%rip), %rdx # 0x41812
movq %rbx, %rdi
callq 0x23fb0
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x242a8
jmp 0x7c978
movq %rax, %r14
movb $0x1, %bpl
leaq 0x28(%rsp), %rdi
jmp 0x7c989
jmp 0x7c995
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x242a8
testb %bpl, %bpl
jne 0x7c998
jmp 0x7c9a0
movq %rax, %r14
movq %rbx, %rdi
callq 0x23690
movq %r14, %rdi
callq 0x24030
|
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA13_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_:
push rbp; char
push r15; int
push r14; int
push rbx; int
sub rsp, 48h
mov r14, rdi
cmp byte ptr [rdi], 1
jnz short loc_7C89B
mov r15, rsi
mov rdi, [r14+8]
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA13_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_
mov rcx, [r14+8]
cmp rax, [rcx+8]
jz short loc_7C8F9
add rax, 20h ; ' '
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_7C89B:
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+68h+var_40]
mov [rdx], rax
lea rsi, aCannotUseAtWit; "cannot use at() with "
lea rdi, [rsp+68h+var_60]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&)
mov bpl, 1
lea rdx, [rsp+68h+var_60]
mov rdi, rbx; this
mov esi, 130h; 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
jmp short loc_7C963
loc_7C8F9:
push 20h ; ' '
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+68h+var_40]
lea rdx, [rsp+68h+var_61]
mov rsi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rsi, aKey; "key '"
lea rcx, aNotFound; "' not found"
lea rdi, [rsp+68h+var_60]
lea rdx, [rsp+68h+var_40]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&)
mov bpl, 1
lea rdx, [rsp+68h+var_60]
mov rdi, rbx; this
mov esi, 193h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_7C963:
mov r14, rax
lea rdi, [rsp+68h+var_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_7C978
mov r14, rax
mov bpl, 1
loc_7C978:
lea rdi, [rsp+68h+var_40]
jmp short loc_7C989
jmp short loc_7C995
mov r14, rax
lea rdi, [rsp+68h+var_60]; void *
loc_7C989:
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_7C998
jmp short loc_7C9A0
loc_7C995:
mov r14, rax
loc_7C998:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_7C9A0:
mov rdi, r14
call __Unwind_Resume
|
long long ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA13_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_(
long long a1,
long long a2)
{
long long v2; // rax
nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx
nlohmann::json_abi_v3_11_3::detail::out_of_range *v5; // rbx
_BYTE v6[32]; // [rsp+8h] [rbp-60h] BYREF
_QWORD v7[8]; // [rsp+28h] [rbp-40h] BYREF
if ( *(_BYTE *)a1 != 1 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL);
v7[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>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(v6, "cannot use at() with ");
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
304,
(long long)v6);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
v2 = ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA13_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_(*(_QWORD *)(a1 + 8));
if ( v2 == *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL) )
{
v5 = (nlohmann::json_abi_v3_11_3::detail::out_of_range *)__cxa_allocate_exception(0x20uLL);
std::string::basic_string<std::allocator<char>>(v7, a2);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(
v6,
"key '",
v7,
"' not found");
ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
v5,
403,
(long long)v6,
a1);
__cxa_throw(
v5,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return v2 + 32;
}
|
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA13_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV R14,RDI
CMP byte ptr [RDI],0x1
JNZ 0x0017c89b
MOV R15,RSI
MOV RDI,qword ptr [R14 + 0x8]
CALL 0x0018023e
MOV RCX,qword ptr [R14 + 0x8]
CMP RAX,qword ptr [RCX + 0x8]
JZ 0x0017c8f9
ADD RAX,0x20
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0017c89b:
PUSH 0x20
POP RDI
CALL 0x00123470
MOV RBX,RAX
MOV RDI,R14
CALL 0x00144c82
LEA RDX,[RSP + 0x28]
MOV qword ptr [RDX],RAX
LAB_0017c8b6:
LEA RSI,[0x1b64de]
LEA RDI,[RSP + 0x8]
CALL 0x0017f21b
MOV BPL,0x1
LAB_0017c8ca:
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV ESI,0x130
MOV RCX,R14
CALL 0x00144b36
XOR EBP,EBP
LEA RSI,[0x1fcf38]
LEA RDX,[0x141812]
MOV RDI,RBX
CALL 0x00123fb0
LAB_0017c8f9:
PUSH 0x20
POP RDI
CALL 0x00123470
MOV RBX,RAX
LAB_0017c904:
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x7]
MOV RSI,R15
CALL 0x00128b3c
LAB_0017c916:
LEA RSI,[0x1b650e]
LEA RCX,[0x1b6514]
LEA RDI,[RSP + 0x8]
LEA RDX,[RSP + 0x28]
CALL 0x0017f825
MOV BPL,0x1
LAB_0017c936:
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV ESI,0x193
MOV RCX,R14
CALL 0x001433e2
XOR EBP,EBP
LEA RSI,[0x1fceb8]
LEA RDX,[0x141812]
MOV RDI,RBX
CALL 0x00123fb0
|
long _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA13_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*param_1,char *param_2)
{
long lVar1;
int8 uVar2;
allocator local_61;
detail local_60 [32];
char *local_40 [4];
if (*param_1 !=
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
uVar2 = __cxa_allocate_exception(0x20);
local_40[0] = (char *)nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name(param_1);
/* try { // try from 0017c8b6 to 0017c8c6 has its CatchHandler @ 0017c995 */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*>
(local_60,"cannot use at() with ",local_40);
/* try { // try from 0017c8ca to 0017c8f6 has its CatchHandler @ 0017c981 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar2,0x130,local_60,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
lVar1 = _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA13_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_
(*(int8 *)(param_1 + 8));
if (lVar1 != *(long *)(*(long *)(param_1 + 8) + 8)) {
return lVar1 + 0x20;
}
uVar2 = __cxa_allocate_exception(0x20);
/* try { // try from 0017c904 to 0017c915 has its CatchHandler @ 0017c97f */
std::__cxx11::string::string<std::allocator<char>>((string *)local_40,param_2,&local_61);
/* try { // try from 0017c916 to 0017c932 has its CatchHandler @ 0017c972 */
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]>
(local_60,"key \'",(string *)local_40,"\' not found");
/* try { // try from 0017c936 to 0017c962 has its CatchHandler @ 0017c963 */
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar2,0x193,local_60,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
|
|
57,568
|
testing::TestResult::ValidateTestProperty(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, testing::TestProperty const&)
|
giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest.cc
|
bool TestResult::ValidateTestProperty(const std::string& xml_element,
const TestProperty& test_property) {
return ValidateTestPropertyName(test_property.key(),
GetReservedAttributesForElement(xml_element));
}
|
O1
|
cpp
|
testing::TestResult::ValidateTestProperty(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, testing::TestProperty const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdi, %rbx
movq (%rsi), %rsi
leaq 0x78(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x81e0
leaq 0x2374c(%rip), %rsi # 0x435b7
movq %rbx, %rdi
callq 0x8160
testl %eax, %eax
je 0x1ff24
leaq 0x23613(%rip), %rsi # 0x43495
movq %rbx, %rdi
callq 0x8160
testl %eax, %eax
je 0x1ff43
leaq 0x23651(%rip), %rsi # 0x434ea
movq %rbx, %rdi
callq 0x8160
testl %eax, %eax
je 0x1ff62
leaq 0x2285d(%rip), %rdx # 0x4270d
leaq 0x38(%rsp), %rdi
movl $0x3, %esi
movl $0x94c, %ecx # imm = 0x94C
callq 0x16e72
movq 0x3911d(%rip), %rdi # 0x58fe8
leaq 0x24229(%rip), %rsi # 0x440fb
movl $0x18, %edx
callq 0x85b0
movq 0x39105(%rip), %rdi # 0x58fe8
leaq 0x2422a(%rip), %rsi # 0x44114
movl $0x23, %edx
callq 0x85b0
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq 0x390e6(%rip), %rdi # 0x58fe8
callq 0x85b0
leaq 0x38(%rsp), %rdi
callq 0x16fb4
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
jmp 0x1ff7f
leaq 0x38775(%rip), %rsi # 0x586a0
leaq 0x387ae(%rip), %rdx # 0x586e0
leaq 0x10(%rsp), %rdi
leaq 0x38(%rsp), %rcx
callq 0x376c0
jmp 0x1ff7f
leaq 0x38796(%rip), %rsi # 0x586e0
leaq 0x387cf(%rip), %rdx # 0x58720
leaq 0x10(%rsp), %rdi
leaq 0x38(%rsp), %rcx
callq 0x376c0
jmp 0x1ff7f
leaq 0x387b7(%rip), %rsi # 0x58720
leaq 0x387f0(%rip), %rdx # 0x58760
leaq 0x10(%rsp), %rdi
leaq 0x38(%rsp), %rcx
callq 0x376c0
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
leaq 0x78(%rsp), %rdx
callq 0x3b4aa
movq %rax, %rbx
movq 0x18(%rsp), %r14
cmpq %r14, %rax
je 0x201c1
leaq 0x58(%rsp), %rdi
callq 0x1cd64
movq 0x58(%rsp), %rax
movq %rax, 0x30(%rsp)
leaq 0x10(%rax), %r15
leaq 0x240fe(%rip), %rsi # 0x440c1
movl $0x27, %edx
movq %r15, %rdi
callq 0x85b0
movq 0x78(%rsp), %rsi
movq 0x80(%rsp), %rdx
movq %r15, %rdi
callq 0x85b0
leaq 0x205e6(%rip), %rsi # 0x405d2
movl $0x2, %edx
movq %r15, %rdi
callq 0x85b0
movq %r15, 0x68(%rsp)
movq %r14, 0x70(%rsp)
movq %rbx, 0x60(%rsp)
movq %rsp, %rdi
callq 0x1cd64
movq 0x18(%rsp), %rax
subq 0x10(%rsp), %rax
je 0x200e5
sarq $0x5, %rax
movq (%rsp), %r12
addq $0x10, %r12
movl $0x8, %r14d
xorl %r15d, %r15d
leaq 0x247f8(%rip), %r13 # 0x44834
leaq 0x22b6c(%rip), %rbp # 0x42baf
leaq 0x22883(%rip), %rbx # 0x428cd
testq %r15, %r15
sete %cl
cmpq $0x3, %rax
setb %al
orb %cl, %al
jne 0x2006b
movl $0x2, %edx
movq %r12, %rdi
movq %r13, %rsi
callq 0x85b0
movq 0x18(%rsp), %rax
subq 0x10(%rsp), %rax
sarq $0x5, %rax
decq %rax
cmpq %rax, %r15
jne 0x20091
movl $0x4, %edx
movq %r12, %rdi
movq %rbp, %rsi
callq 0x85b0
movl $0x1, %edx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x85b0
movq 0x10(%rsp), %rax
movq -0x8(%rax,%r14), %rsi
movq (%rax,%r14), %rdx
movq %r12, %rdi
callq 0x85b0
movl $0x1, %edx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x85b0
movq 0x18(%rsp), %rax
subq 0x10(%rsp), %rax
incq %r15
sarq $0x5, %rax
addq $0x20, %r14
cmpq %rax, %r15
jb 0x2004a
movq (%rsp), %rbx
leaq 0x38(%rsp), %rdi
movq %rbx, %rsi
callq 0x1cfc7
testq %rbx, %rbx
movq 0x68(%rsp), %r15
je 0x20109
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdx
movq %r15, %rdi
callq 0x85b0
movq 0x70(%rsp), %r14
leaq 0x23fc2(%rip), %rsi # 0x440e9
movl $0x11, %edx
movq %r15, %rdi
callq 0x85b0
leaq 0x23087(%rip), %rsi # 0x431c2
movl $0xb, %edx
movq %r15, %rdi
callq 0x85b0
leaq 0x22fce(%rip), %rsi # 0x4311d
movl $0x1, %edx
movq %r15, %rdi
callq 0x85b0
leaq 0x225aa(%rip), %rdx # 0x4270d
leaq 0x22cc4(%rip), %r8 # 0x42e2e
movq %rsp, %rdi
movl $0x1, %esi
movl $0x978, %ecx # imm = 0x978
callq 0x18f74
movq 0x60(%rsp), %rbx
movq %rsp, %rdi
leaq 0x58(%rsp), %rsi
callq 0x16886
movq %rsp, %rdi
callq 0x18fe0
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x201b1
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x84e0
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x201c1
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0x10(%rsp), %rdi
callq 0x3244c
leaq 0x88(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x201ec
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x84e0
cmpq %r14, %rbx
sete %al
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rsp, %rdi
callq 0x18fe0
jmp 0x20238
jmp 0x20235
jmp 0x20255
jmp 0x20230
movq %rax, %r14
leaq 0x38(%rsp), %rdi
callq 0x16fb4
jmp 0x20284
movq %rax, %r14
jmp 0x20284
movq %rax, %r14
jmp 0x2027a
movq %rax, %r14
jmp 0x20267
movq %rax, %r14
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x20267
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x84e0
jmp 0x20267
movq %rax, %r14
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x20267
movq (%rdi), %rax
callq *0x8(%rax)
cmpq $0x0, 0x30(%rsp)
je 0x2027a
movq 0x30(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0x10(%rsp), %rdi
callq 0x3244c
leaq 0x88(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x202a5
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x84e0
movq %r14, %rdi
callq 0x8990
nop
|
_ZN7testing10TestResult20ValidateTestPropertyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_12TestPropertyE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 98h
mov rbx, rdi
mov rsi, [rsi]
lea rdi, [rsp+0C8h+var_50]
lea rdx, [rsp+0C8h+var_B9]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcRKS3_; std::string::basic_string(char const*,std::allocator<char> const&)
lea rsi, aTestsuites; "testsuites"
mov rdi, rbx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz loc_1FF24
lea rsi, aTestsuite+3; "testsuite"
mov rdi, rbx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz loc_1FF43
lea rsi, aTestcase+5; "testcase"
mov rdi, rbx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz loc_1FF62
lea rdx, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdi, [rsp+0C8h+var_90]
mov esi, 3
mov ecx, 94Ch
call _ZN7testing8internal8GTestLogC2ENS0_16GTestLogSeverityEPKci; testing::internal::GTestLog::GTestLog(testing::internal::GTestLogSeverity,char const*,int)
mov rdi, cs:_ZSt4cerr_ptr
lea rsi, aConditionFalse; "Condition false failed. "
mov edx, 18h
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, aUnrecognizedXm; "Unrecognized xml_element provided: "
mov edx, 23h ; '#'
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, [rbx]
mov rdx, [rbx+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)
lea rdi, [rsp+0C8h+var_90]; this
call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog()
xorps xmm0, xmm0
movaps [rsp+0C8h+var_B8], xmm0
mov [rsp+0C8h+var_A8], 0
jmp short loc_1FF7F
loc_1FF24:
lea rsi, _ZN7testingL29kReservedTestSuitesAttributesE; testing::kReservedTestSuitesAttributes
lea rdx, _ZN7testingL28kReservedTestSuiteAttributesE; testing::kReservedTestSuiteAttributes
lea rdi, [rsp+0C8h+var_B8]
lea rcx, [rsp+0C8h+var_90]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2IPKPKcvEET_SD_RKS6_; std::vector<std::string>::vector<char const* const*,void>(char const* const*,char const* const*,std::allocator<std::string> const&)
jmp short loc_1FF7F
loc_1FF43:
lea rsi, _ZN7testingL28kReservedTestSuiteAttributesE; testing::kReservedTestSuiteAttributes
lea rdx, _ZN7testingL27kReservedTestCaseAttributesE; testing::kReservedTestCaseAttributes
lea rdi, [rsp+0C8h+var_B8]
lea rcx, [rsp+0C8h+var_90]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2IPKPKcvEET_SD_RKS6_; std::vector<std::string>::vector<char const* const*,void>(char const* const*,char const* const*,std::allocator<std::string> const&)
jmp short loc_1FF7F
loc_1FF62:
lea rsi, _ZN7testingL27kReservedTestCaseAttributesE; testing::kReservedTestCaseAttributes
lea rdx, _ZN7testingL33kReservedOutputTestCaseAttributesE; testing::kReservedOutputTestCaseAttributes
lea rdi, [rsp+0C8h+var_B8]
lea rcx, [rsp+0C8h+var_90]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2IPKPKcvEET_SD_RKS6_; std::vector<std::string>::vector<char const* const*,void>(char const* const*,char const* const*,std::allocator<std::string> const&)
loc_1FF7F:
mov rdi, qword ptr [rsp+0C8h+var_B8]
mov rsi, qword ptr [rsp+0C8h+var_B8+8]
lea rdx, [rsp+0C8h+var_50]
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)
mov rbx, rax
mov r14, qword ptr [rsp+0C8h+var_B8+8]
cmp rax, r14
jz loc_201C1
lea rdi, [rsp+0C8h+var_70]; this
call _ZN7testing7MessageC2Ev; testing::Message::Message(void)
mov rax, [rsp+0C8h+var_70]
mov [rsp+0C8h+var_98], rax
lea r15, [rax+10h]
lea rsi, aReservedKeyUse; "Reserved key used in RecordProperty(): "
mov edx, 27h ; '''
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)
mov rsi, [rsp+0C8h+var_50]
mov rdx, [rsp+0C8h+var_48]
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, aExpected+9; " ("
mov edx, 2
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)
mov [rsp+0C8h+var_60], r15
mov [rsp+0C8h+var_58], r14
mov [rsp+0C8h+var_68], rbx
mov rdi, rsp; this
call _ZN7testing7MessageC2Ev; testing::Message::Message(void)
mov rax, qword ptr [rsp+0C8h+var_B8+8]
sub rax, qword ptr [rsp+0C8h+var_B8]
jz loc_200E5
sar rax, 5
mov r12, [rsp+0C8h+var_C8]
add r12, 10h
mov r14d, 8
xor r15d, r15d
lea r13, aMustBeInRange0+15h; ", "
lea rbp, aAnd+1; "and "
lea rbx, aUnknownTypePar+25h; "'"
loc_2004A:
test r15, r15
setz cl
cmp rax, 3
setb al
or al, cl
jnz short loc_2006B
mov edx, 2
mov rdi, r12
mov rsi, r13
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
loc_2006B:
mov rax, qword ptr [rsp+0C8h+var_B8+8]
sub rax, qword ptr [rsp+0C8h+var_B8]
sar rax, 5
dec rax
cmp r15, rax
jnz short loc_20091
mov edx, 4
mov rdi, r12
mov rsi, rbp
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
loc_20091:
mov edx, 1
mov rdi, r12
mov rsi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rax, qword ptr [rsp+0C8h+var_B8]
mov rsi, [rax+r14-8]
mov rdx, [rax+r14]
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 edx, 1
mov rdi, r12
mov rsi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rax, qword ptr [rsp+0C8h+var_B8+8]
sub rax, qword ptr [rsp+0C8h+var_B8]
inc r15
sar rax, 5
add r14, 20h ; ' '
cmp r15, rax
jb loc_2004A
loc_200E5:
mov rbx, [rsp+0C8h+var_C8]
lea rdi, [rsp+0C8h+var_90]
mov rsi, rbx
call _ZN7testing8internal20StringStreamToStringEPNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE; testing::internal::StringStreamToString(std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>> *)
test rbx, rbx
mov r15, [rsp+0C8h+var_60]
jz short loc_20109
mov rax, [rbx]
mov rdi, rbx
call qword ptr [rax+8]
loc_20109:
mov rsi, [rsp+0C8h+var_90]
mov rdx, [rsp+0C8h+var_88]
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)
mov r14, [rsp+0C8h+var_58]
lea rsi, aAreReservedBy; " are reserved by "
mov edx, 11h
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, aGoogleTest; "Google Test"
mov edx, 0Bh
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, aTeardowntestsu+12h; ")"
mov edx, 1
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 rdx, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea r8, aFailed; "Failed"
mov rdi, rsp
mov esi, 1
mov ecx, 978h
call _ZN7testing8internal12AssertHelperC2ENS_14TestPartResult4TypeEPKciS5_; testing::internal::AssertHelper::AssertHelper(testing::TestPartResult::Type,char const*,int,char const*)
mov rbx, [rsp+0C8h+var_68]
mov rdi, rsp
lea rsi, [rsp+0C8h+var_70]
call _ZNK7testing8internal12AssertHelperaSERKNS_7MessageE; testing::internal::AssertHelper::operator=(testing::Message const&)
mov rdi, rsp; this
call _ZN7testing8internal12AssertHelperD2Ev; testing::internal::AssertHelper::~AssertHelper()
lea rax, [rsp+0C8h+var_80]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_201B1
mov rsi, [rsp+0C8h+var_80]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_201B1:
mov rdi, [rsp+0C8h+var_98]
test rdi, rdi
jz short loc_201C1
mov rax, [rdi]
call qword ptr [rax+8]
loc_201C1:
lea rdi, [rsp+0C8h+var_B8]; void *
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
lea rax, [rsp+0C8h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_201EC
mov rsi, [rsp+0C8h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_201EC:
cmp rbx, r14
setz al
add rsp, 98h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r14, rax
mov rdi, rsp; this
call _ZN7testing8internal12AssertHelperD2Ev; testing::internal::AssertHelper::~AssertHelper()
jmp short loc_20238
jmp short loc_20235
jmp short loc_20255
jmp short loc_20230
mov r14, rax
lea rdi, [rsp+arg_30]; this
call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog()
jmp short loc_20284
mov r14, rax
jmp short loc_20284
mov r14, rax
jmp short loc_2027A
loc_20230:
mov r14, rax
jmp short loc_20267
loc_20235:
mov r14, rax
loc_20238:
lea rax, [rsp+arg_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_20267
mov rsi, [rsp+arg_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_20267
loc_20255:
mov r14, rax
mov rdi, [rsp+0]
test rdi, rdi
jz short loc_20267
mov rax, [rdi]
call qword ptr [rax+8]
loc_20267:
cmp [rsp+arg_28], 0
jz short loc_2027A
mov rdi, [rsp+arg_28]
mov rax, [rdi]
call qword ptr [rax+8]
loc_2027A:
lea rdi, [rsp+arg_8]; void *
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
loc_20284:
lea rax, [rsp+arg_80]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_202A5
mov rsi, [rsp+arg_80]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_202A5:
mov rdi, r14
call __Unwind_Resume
|
bool testing::TestResult::ValidateTestProperty(long long *a1, _QWORD *a2)
{
long long v2; // rsi
long long v3; // rdx
long long v4; // rcx
long long v5; // rbx
long long v6; // r14
long long v7; // r15
unsigned long long v8; // rax
long long v9; // r12
long long v10; // r14
unsigned long long v11; // r15
long long v12; // rbx
long long v13; // r15
long long v15; // [rsp+0h] [rbp-C8h] BYREF
char v16; // [rsp+Fh] [rbp-B9h] BYREF
__int128 v17; // [rsp+10h] [rbp-B8h] BYREF
long long v18; // [rsp+20h] [rbp-A8h]
long long v19; // [rsp+30h] [rbp-98h]
void *v20[2]; // [rsp+38h] [rbp-90h] BYREF
long long v21; // [rsp+48h] [rbp-80h] BYREF
long long v22; // [rsp+58h] [rbp-70h] BYREF
long long v23; // [rsp+60h] [rbp-68h]
long long v24; // [rsp+68h] [rbp-60h]
long long v25; // [rsp+70h] [rbp-58h]
void *v26[2]; // [rsp+78h] [rbp-50h] BYREF
long long v27; // [rsp+88h] [rbp-40h] BYREF
std::string::basic_string(v26, *a2, &v16);
if ( !(unsigned int)std::string::compare(a1, "testsuites") )
{
std::vector<std::string>::vector<char const* const*,void>(
&v17,
testing::kReservedTestSuitesAttributes,
testing::kReservedTestSuiteAttributes,
v20);
}
else if ( !(unsigned int)std::string::compare(a1, "testsuite") )
{
std::vector<std::string>::vector<char const* const*,void>(
&v17,
testing::kReservedTestSuiteAttributes,
&testing::kReservedTestCaseAttributes,
v20);
}
else if ( !(unsigned int)std::string::compare(a1, "testcase") )
{
std::vector<std::string>::vector<char const* const*,void>(
&v17,
&testing::kReservedTestCaseAttributes,
&testing::kReservedOutputTestCaseAttributes,
v20);
}
else
{
testing::internal::GTestLog::GTestLog(
v20,
3,
"/workspace/llm4binary/github/2025_star3/giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest.cc",
2380);
std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, "Condition false failed. ", 24LL);
std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, "Unrecognized xml_element provided: ", 35LL);
v2 = *a1;
std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, *a1, a1[1]);
testing::internal::GTestLog::~GTestLog((testing::internal::GTestLog *)v20, v2, v3, v4);
v17 = 0LL;
v18 = 0LL;
}
v5 = std::__find_if<__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>,__gnu_cxx::__ops::_Iter_equals_val<std::string const>>(
v17,
*((_QWORD *)&v17 + 1),
v26);
v6 = *((_QWORD *)&v17 + 1);
if ( v5 != *((_QWORD *)&v17 + 1) )
{
testing::Message::Message((testing::Message *)&v22);
v19 = v22;
v7 = v22 + 16;
std::__ostream_insert<char,std::char_traits<char>>(v22 + 16, "Reserved key used in RecordProperty(): ", 39LL);
std::__ostream_insert<char,std::char_traits<char>>(v7, v26[0], v26[1]);
std::__ostream_insert<char,std::char_traits<char>>(v7, " (", 2LL);
v24 = v7;
v25 = v6;
v23 = v5;
testing::Message::Message((testing::Message *)&v15);
if ( *((_QWORD *)&v17 + 1) != (_QWORD)v17 )
{
v8 = (long long)(*((_QWORD *)&v17 + 1) - v17) >> 5;
v9 = v15 + 16;
v10 = 8LL;
v11 = 0LL;
do
{
if ( v11 != 0 && v8 >= 3 )
std::__ostream_insert<char,std::char_traits<char>>(v9, ", ", 2LL);
if ( v11 == ((long long)(*((_QWORD *)&v17 + 1) - v17) >> 5) - 1 )
std::__ostream_insert<char,std::char_traits<char>>(v9, "and ", 4LL);
std::__ostream_insert<char,std::char_traits<char>>(v9, "'", 1LL);
std::__ostream_insert<char,std::char_traits<char>>(v9, *(_QWORD *)(v17 + v10 - 8), *(_QWORD *)(v17 + v10));
std::__ostream_insert<char,std::char_traits<char>>(v9, "'", 1LL);
++v11;
v8 = (long long)(*((_QWORD *)&v17 + 1) - v17) >> 5;
v10 += 32LL;
}
while ( v11 < v8 );
}
v12 = v15;
testing::internal::StringStreamToString((long long)v20, v15);
v13 = v24;
if ( v12 )
(*(void ( **)(long long))(*(_QWORD *)v12 + 8LL))(v12);
std::__ostream_insert<char,std::char_traits<char>>(v13, v20[0], v20[1]);
v6 = v25;
std::__ostream_insert<char,std::char_traits<char>>(v13, " are reserved by ", 17LL);
std::__ostream_insert<char,std::char_traits<char>>(v13, "Google Test", 11LL);
std::__ostream_insert<char,std::char_traits<char>>(v13, ")", 1LL);
testing::internal::AssertHelper::AssertHelper(
&v15,
1,
(long long)"/workspace/llm4binary/github/2025_star3/giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest.cc",
2424,
(long long)"Failed");
v5 = v23;
testing::internal::AssertHelper::operator=((testing::UnitTest *)&v15, (int)&v22);
testing::internal::AssertHelper::~AssertHelper((testing::internal::AssertHelper *)&v15);
if ( v20[0] != &v21 )
operator delete(v20[0], v21 + 1);
if ( v19 )
(*(void ( **)(long long))(*(_QWORD *)v19 + 8LL))(v19);
}
std::vector<std::string>::~vector(&v17);
if ( v26[0] != &v27 )
operator delete(v26[0], v27 + 1);
return v5 == v6;
}
|
ValidateTestProperty:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x98
MOV RBX,RDI
MOV RSI,qword ptr [RSI]
LEA RDI,[RSP + 0x78]
LEA RDX,[RSP + 0xf]
CALL 0x001081e0
LEA RSI,[0x1435b7]
MOV RDI,RBX
CALL 0x00108160
TEST EAX,EAX
JZ 0x0011ff24
LEA RSI,[0x143495]
MOV RDI,RBX
CALL 0x00108160
TEST EAX,EAX
JZ 0x0011ff43
LEA RSI,[0x1434ea]
MOV RDI,RBX
CALL 0x00108160
TEST EAX,EAX
JZ 0x0011ff62
LAB_0011fea9:
LEA RDX,[0x14270d]
LEA RDI,[RSP + 0x38]
MOV ESI,0x3
MOV ECX,0x94c
CALL 0x00116e72
LAB_0011fec4:
MOV RDI,qword ptr [0x00158fe8]
LEA RSI,[0x1440fb]
MOV EDX,0x18
CALL 0x001085b0
MOV RDI,qword ptr [0x00158fe8]
LEA RSI,[0x144114]
MOV EDX,0x23
CALL 0x001085b0
MOV RSI,qword ptr [RBX]
MOV RDX,qword ptr [RBX + 0x8]
MOV RDI,qword ptr [0x00158fe8]
CALL 0x001085b0
LEA RDI,[RSP + 0x38]
CALL 0x00116fb4
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOV qword ptr [RSP + 0x20],0x0
JMP 0x0011ff7f
LAB_0011ff24:
LEA RSI,[0x1586a0]
LEA RDX,[0x1586e0]
LEA RDI,[RSP + 0x10]
LEA RCX,[RSP + 0x38]
CALL 0x001376c0
JMP 0x0011ff7f
LAB_0011ff43:
LEA RSI,[0x1586e0]
LEA RDX,[0x158720]
LEA RDI,[RSP + 0x10]
LEA RCX,[RSP + 0x38]
CALL 0x001376c0
JMP 0x0011ff7f
LAB_0011ff62:
LEA RSI,[0x158720]
LEA RDX,[0x158760]
LEA RDI,[RSP + 0x10]
LEA RCX,[RSP + 0x38]
CALL 0x001376c0
LAB_0011ff7f:
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x18]
LAB_0011ff89:
LEA RDX,[RSP + 0x78]
CALL 0x0013b4aa
MOV RBX,RAX
MOV R14,qword ptr [RSP + 0x18]
CMP RAX,R14
JZ 0x001201c1
LEA RDI,[RSP + 0x58]
CALL 0x0011cd64
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x30],RAX
LEA R15,[RAX + 0x10]
LAB_0011ffbc:
LEA RSI,[0x1440c1]
MOV EDX,0x27
MOV RDI,R15
CALL 0x001085b0
MOV RSI,qword ptr [RSP + 0x78]
MOV RDX,qword ptr [RSP + 0x80]
MOV RDI,R15
CALL 0x001085b0
LEA RSI,[0x1405d2]
MOV EDX,0x2
MOV RDI,R15
CALL 0x001085b0
LAB_0011fff9:
MOV qword ptr [RSP + 0x68],R15
MOV qword ptr [RSP + 0x70],R14
MOV qword ptr [RSP + 0x60],RBX
MOV RDI,RSP
CALL 0x0011cd64
MOV RAX,qword ptr [RSP + 0x18]
SUB RAX,qword ptr [RSP + 0x10]
JZ 0x001200e5
SAR RAX,0x5
MOV R12,qword ptr [RSP]
ADD R12,0x10
MOV R14D,0x8
XOR R15D,R15D
LEA R13,[0x144834]
LEA RBP,[0x142baf]
LEA RBX,[0x1428cd]
LAB_0012004a:
TEST R15,R15
SETZ CL
CMP RAX,0x3
SETC AL
OR AL,CL
JNZ 0x0012006b
LAB_0012005b:
MOV EDX,0x2
MOV RDI,R12
MOV RSI,R13
CALL 0x001085b0
LAB_0012006b:
MOV RAX,qword ptr [RSP + 0x18]
SUB RAX,qword ptr [RSP + 0x10]
SAR RAX,0x5
DEC RAX
CMP R15,RAX
JNZ 0x00120091
MOV EDX,0x4
MOV RDI,R12
MOV RSI,RBP
CALL 0x001085b0
LAB_00120091:
MOV EDX,0x1
MOV RDI,R12
MOV RSI,RBX
CALL 0x001085b0
MOV RAX,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RAX + R14*0x1 + -0x8]
MOV RDX,qword ptr [RAX + R14*0x1]
MOV RDI,R12
CALL 0x001085b0
MOV EDX,0x1
MOV RDI,R12
MOV RSI,RBX
CALL 0x001085b0
MOV RAX,qword ptr [RSP + 0x18]
SUB RAX,qword ptr [RSP + 0x10]
INC R15
SAR RAX,0x5
ADD R14,0x20
CMP R15,RAX
JC 0x0012004a
LAB_001200e5:
MOV RBX,qword ptr [RSP]
LAB_001200e9:
LEA RDI,[RSP + 0x38]
MOV RSI,RBX
CALL 0x0011cfc7
LAB_001200f6:
TEST RBX,RBX
MOV R15,qword ptr [RSP + 0x68]
JZ 0x00120109
MOV RAX,qword ptr [RBX]
MOV RDI,RBX
CALL qword ptr [RAX + 0x8]
LAB_00120109:
MOV RSI,qword ptr [RSP + 0x38]
MOV RDX,qword ptr [RSP + 0x40]
LAB_00120113:
MOV RDI,R15
CALL 0x001085b0
MOV R14,qword ptr [RSP + 0x70]
LEA RSI,[0x1440e9]
MOV EDX,0x11
MOV RDI,R15
CALL 0x001085b0
LEA RSI,[0x1431c2]
MOV EDX,0xb
MOV RDI,R15
CALL 0x001085b0
LEA RSI,[0x14311d]
MOV EDX,0x1
MOV RDI,R15
CALL 0x001085b0
LAB_0012015c:
LEA RDX,[0x14270d]
LEA R8,[0x142e2e]
MOV RDI,RSP
MOV ESI,0x1
MOV ECX,0x978
CALL 0x00118f74
MOV RBX,qword ptr [RSP + 0x60]
LAB_00120181:
MOV RDI,RSP
LEA RSI,[RSP + 0x58]
CALL 0x00116886
LAB_0012018e:
MOV RDI,RSP
CALL 0x00118fe0
LEA RAX,[RSP + 0x48]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001201b1
MOV RSI,qword ptr [RSP + 0x48]
INC RSI
CALL 0x001084e0
LAB_001201b1:
MOV RDI,qword ptr [RSP + 0x30]
TEST RDI,RDI
JZ 0x001201c1
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x8]
LAB_001201c1:
LEA RDI,[RSP + 0x10]
CALL 0x0013244c
LEA RAX,[RSP + 0x88]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001201ec
MOV RSI,qword ptr [RSP + 0x88]
INC RSI
CALL 0x001084e0
LAB_001201ec:
CMP RBX,R14
SETZ AL
ADD RSP,0x98
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* testing::TestResult::ValidateTestProperty(std::__cxx11::string const&, testing::TestProperty
const&) */
bool testing::TestResult::ValidateTestProperty(string *param_1,TestProperty *param_2)
{
int iVar1;
long lVar2;
ulong uVar3;
ostream *poVar4;
long lVar5;
ulong uVar6;
long *local_c8;
allocator local_b9;
char *local_b8;
long lStack_b0;
int8 local_a8;
long *local_98;
long *local_90;
long local_88;
long local_80 [2];
long *local_70;
long local_68;
ostream *local_60;
long local_58;
long *local_50;
long local_48;
long local_40 [2];
std::__cxx11::string::string((string *)&local_50,*(char **)param_2,&local_b9);
iVar1 = std::__cxx11::string::compare((char *)param_1);
if (iVar1 == 0) {
/* try { // try from 0011ff24 to 0011ff7e has its CatchHandler @ 00120226 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::
vector<char_const*const*,void>
(&local_b8,(char **)kReservedTestSuitesAttributes,
(allocator *)kReservedTestSuiteAttributes);
}
else {
iVar1 = std::__cxx11::string::compare((char *)param_1);
if (iVar1 == 0) {
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::
vector<char_const*const*,void>
(&local_b8,(char **)kReservedTestSuiteAttributes,
(allocator *)kReservedTestCaseAttributes);
}
else {
iVar1 = std::__cxx11::string::compare((char *)param_1);
if (iVar1 == 0) {
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::
vector<char_const*const*,void>
(&local_b8,(char **)kReservedTestCaseAttributes,
(allocator *)kReservedOutputTestCaseAttributes);
}
else {
/* try { // try from 0011fea9 to 0011fec3 has its CatchHandler @ 00120226 */
internal::GTestLog::GTestLog
((GTestLog *)&local_90,3,
"/workspace/llm4binary/github/2025_star3/giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest.cc"
,0x94c);
/* try { // try from 0011fec4 to 0011ff06 has its CatchHandler @ 00120217 */
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)PTR_cerr_00158fe8,"Condition false failed. ",0x18);
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)PTR_cerr_00158fe8,"Unrecognized xml_element provided: ",0x23);
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)PTR_cerr_00158fe8,*(char **)param_1,*(long *)(param_1 + 8));
internal::GTestLog::~GTestLog((GTestLog *)&local_90);
local_b8 = (char *)0x0;
lStack_b0 = 0;
local_a8 = 0;
}
}
}
/* try { // try from 0011ff89 to 0011ffad has its CatchHandler @ 0012022b */
lVar2 = 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_b8,lStack_b0,&local_50);
lVar5 = lStack_b0;
if (lVar2 != lStack_b0) {
Message::Message((Message *)&local_70);
local_98 = local_70;
poVar4 = (ostream *)(local_70 + 2);
/* try { // try from 0011ffbc to 0011fff8 has its CatchHandler @ 00120230 */
std::__ostream_insert<char,std::char_traits<char>>
(poVar4,"Reserved key used in RecordProperty(): ",0x27);
std::__ostream_insert<char,std::char_traits<char>>(poVar4,(char *)local_50,local_48);
std::__ostream_insert<char,std::char_traits<char>>(poVar4," (",2);
/* try { // try from 0011fff9 to 0012000f has its CatchHandler @ 00120215 */
local_58 = lVar5;
local_68 = lVar2;
local_60 = poVar4;
Message::Message((Message *)&local_c8);
if (lStack_b0 - (long)local_b8 != 0) {
uVar3 = lStack_b0 - (long)local_b8 >> 5;
poVar4 = (ostream *)(local_c8 + 2);
lVar5 = 8;
uVar6 = 0;
do {
if (2 < uVar3 && uVar6 != 0) {
/* try { // try from 0012005b to 001200c6 has its CatchHandler @ 00120255 */
std::__ostream_insert<char,std::char_traits<char>>(poVar4,", ",2);
}
if (uVar6 == (lStack_b0 - (long)local_b8 >> 5) - 1U) {
std::__ostream_insert<char,std::char_traits<char>>(poVar4,"and ",4);
}
std::__ostream_insert<char,std::char_traits<char>>(poVar4,"\'",1);
std::__ostream_insert<char,std::char_traits<char>>
(poVar4,*(char **)(local_b8 + lVar5 + -8),*(long *)(local_b8 + lVar5));
std::__ostream_insert<char,std::char_traits<char>>(poVar4,"\'",1);
uVar6 = uVar6 + 1;
uVar3 = lStack_b0 - (long)local_b8 >> 5;
lVar5 = lVar5 + 0x20;
} while (uVar6 < uVar3);
}
/* try { // try from 001200e9 to 001200f5 has its CatchHandler @ 00120213 */
internal::StringStreamToString((stringstream *)&local_90);
poVar4 = local_60;
if (local_c8 != (long *)0x0) {
(**(code **)(*local_c8 + 8))(local_c8);
}
/* try { // try from 00120113 to 0012015b has its CatchHandler @ 00120235 */
std::__ostream_insert<char,std::char_traits<char>>(poVar4,(char *)local_90,local_88);
lVar5 = local_58;
std::__ostream_insert<char,std::char_traits<char>>(poVar4," are reserved by ",0x11);
std::__ostream_insert<char,std::char_traits<char>>(poVar4,"Google Test",0xb);
std::__ostream_insert<char,std::char_traits<char>>(poVar4,")",1);
/* try { // try from 0012015c to 0012017b has its CatchHandler @ 00120211 */
internal::AssertHelper::AssertHelper
((AssertHelper *)&local_c8,1,
"/workspace/llm4binary/github/2025_star3/giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest.cc"
,0x978,"Failed");
lVar2 = local_68;
/* try { // try from 00120181 to 0012018d has its CatchHandler @ 00120204 */
internal::AssertHelper::operator=((AssertHelper *)&local_c8,(Message *)&local_70);
internal::AssertHelper::~AssertHelper((AssertHelper *)&local_c8);
if (local_90 != local_80) {
operator_delete(local_90,local_80[0] + 1);
}
if (local_98 != (long *)0x0) {
(**(code **)(*local_98 + 8))();
}
}
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_b8);
if (local_50 != local_40) {
operator_delete(local_50,local_40[0] + 1);
}
return lVar2 == lVar5;
}
|
|
57,569
|
PycModule::loadFromMarshalledFile(char const*, int, int)
|
Pyarmor-Static-Unpack-1shot/pyc_module.cpp
|
void PycModule::loadFromMarshalledFile(const char* filename, int major, int minor)
{
PycFile in (filename);
if (!in.isOpen()) {
fprintf(stderr, "Error opening file %s\n", filename);
return;
}
if (!isSupportedVersion(major, minor)) {
fprintf(stderr, "Unsupported version %d.%d\n", major, minor);
return;
}
m_maj = major;
m_min = minor;
m_unicode = (major >= 3);
m_code = LoadObject(&in, this).cast<PycCode>();
}
|
O3
|
cpp
|
PycModule::loadFromMarshalledFile(char const*, int, int):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %ecx, %r14d
movl %edx, %r15d
movq %rsi, %r12
movq %rdi, %rbx
leaq -0x48(%rbp), %r13
movq %r13, %rdi
callq 0x2fbd2
cmpq $0x0, 0x8(%r13)
je 0x3171f
cmpl $0x1, %r15d
je 0x316f1
cmpl $0x3, %r15d
je 0x31717
cmpl $0x2, %r15d
jne 0x316f7
cmpl $0x8, %r14d
jae 0x316f7
movl %r15d, 0x2c(%rbx)
movl %r14d, 0x30(%rbx)
cmpl $0x3, %r15d
setae 0x34(%rbx)
leaq -0x30(%rbp), %rdi
leaq -0x48(%rbp), %rsi
movq %rbx, %rdx
callq 0x32f4c
leaq -0x38(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0xb9d0
movq -0x38(%rbp), %rax
movq %rax, 0x38(%rbx)
movq $0x0, -0x38(%rbp)
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x3173a
decl 0x8(%rdi)
jne 0x3173a
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x3173a
cmpl $0x7, %r14d
jb 0x3169e
movq 0x1989a(%rip), %rax # 0x4af98
movq (%rax), %rdi
leaq 0x6c37(%rip), %rsi # 0x3833f
movl %r15d, %edx
movl %r14d, %ecx
xorl %eax, %eax
callq 0x7320
jmp 0x3173a
cmpl $0xd, %r14d
jb 0x3169e
jmp 0x316f7
movq 0x19872(%rip), %rax # 0x4af98
movq (%rax), %rdi
leaq 0x6bec(%rip), %rsi # 0x3831c
movq %r12, %rdx
xorl %eax, %eax
callq 0x7320
leaq 0x1918f(%rip), %rax # 0x4a8d0
addq $0x10, %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x31757
callq 0x7210
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x31782
decl 0x8(%rdi)
jne 0x31782
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x31782
movq %rax, %rbx
leaq 0x19147(%rip), %rax # 0x4a8d0
addq $0x10, %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x3179f
callq 0x7210
movq %rbx, %rdi
callq 0x7450
nop
|
_ZN9PycModule22loadFromMarshalledFileEPKcii:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r14d, ecx
mov r15d, edx
mov r12, rsi
mov rbx, rdi
lea r13, [rbp+var_48]
mov rdi, r13; this
call _ZN7PycFileC2EPKc; PycFile::PycFile(char const*)
cmp qword ptr [r13+8], 0
jz loc_3171F
cmp r15d, 1
jz short loc_316F1
cmp r15d, 3
jz loc_31717
cmp r15d, 2
jnz short loc_316F7
cmp r14d, 8
jnb short loc_316F7
loc_3169E:
mov [rbx+2Ch], r15d
mov [rbx+30h], r14d
cmp r15d, 3
setnb byte ptr [rbx+34h]
lea rdi, [rbp+var_30]; PycData *
lea rsi, [rbp+var_48]; PycModule *
mov rdx, rbx
call _Z10LoadObjectP7PycDataP9PycModule; LoadObject(PycData *,PycModule *)
lea rdi, [rbp+var_38]
lea rsi, [rbp+var_30]
call _ZNK6PycRefI9PycObjectE4castI7PycCodeEES_IT_Ev; PycRef<PycObject>::cast<PycCode>(void)
mov rax, [rbp+var_38]
mov [rbx+38h], rax
mov [rbp+var_38], 0
mov rdi, [rbp+var_30]
test rdi, rdi
jz short loc_3173A
dec dword ptr [rdi+8]
jnz short loc_3173A
mov rax, [rdi]
call qword ptr [rax+8]
jmp short loc_3173A
loc_316F1:
cmp r14d, 7
jb short loc_3169E
loc_316F7:
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aUnsupportedVer; "Unsupported version %d.%d\n"
mov edx, r15d
mov ecx, r14d
xor eax, eax
call _fprintf
jmp short loc_3173A
loc_31717:
cmp r14d, 0Dh
jb short loc_3169E
jmp short loc_316F7
loc_3171F:
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aErrorOpeningFi_0; "Error opening file %s\n"
mov rdx, r12
xor eax, eax
call _fprintf
loc_3173A:
lea rax, _ZTV7PycFile; `vtable for'PycFile
add rax, 10h
mov [rbp+var_48], rax
mov rdi, [rbp+var_40]
test rdi, rdi
jz short loc_31757
call _fclose
loc_31757:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, [rbp+var_30]
test rdi, rdi
jz short loc_31782
dec dword ptr [rdi+8]
jnz short loc_31782
mov rax, [rdi]
call qword ptr [rax+8]
jmp short loc_31782
mov rbx, rax
loc_31782:
lea rax, _ZTV7PycFile; `vtable for'PycFile
add rax, 10h
mov [rbp+var_48], rax
mov rdi, [rbp+var_40]
test rdi, rdi
jz short loc_3179F
call _fclose
loc_3179F:
mov rdi, rbx
call __Unwind_Resume
|
long long * PycModule::loadFromMarshalledFile(
PycModule *this,
const char *a2,
unsigned int a3,
unsigned int a4)
{
const void *v6; // rdi
long long *result; // rax
long long *v9; // [rsp+8h] [rbp-48h] BYREF
long long v10; // [rsp+10h] [rbp-40h]
long long v11; // [rsp+18h] [rbp-38h] BYREF
const void *v12[6]; // [rsp+20h] [rbp-30h] BYREF
PycFile::PycFile((PycFile *)&v9, a2);
if ( !v10 )
{
fprintf(stderr, "Error opening file %s\n", a2);
goto LABEL_14;
}
if ( a3 == 1 )
{
if ( a4 < 7 )
goto LABEL_6;
LABEL_10:
fprintf(stderr, "Unsupported version %d.%d\n", a3, a4);
goto LABEL_14;
}
if ( a3 == 3 )
{
if ( a4 < 0xD )
goto LABEL_6;
goto LABEL_10;
}
if ( a3 != 2 || a4 >= 8 )
goto LABEL_10;
LABEL_6:
*((_DWORD *)this + 11) = a3;
*((_DWORD *)this + 12) = a4;
*((_BYTE *)this + 52) = a3 >= 3;
LoadObject((PycData *)v12, (PycModule *)&v9);
PycRef<PycObject>::cast<PycCode>(&v11, v12);
*((_QWORD *)this + 7) = v11;
v11 = 0LL;
v6 = v12[0];
if ( v12[0] )
{
if ( (*((_DWORD *)v12[0] + 2))-- == 1 )
(*(void ( **)(const void *))(*(_QWORD *)v6 + 8LL))(v6);
}
LABEL_14:
result = &`vtable for'PycFile + 2;
v9 = &`vtable for'PycFile + 2;
if ( v10 )
return (long long *)fclose(v10);
return result;
}
|
loadFromMarshalledFile:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R14D,ECX
MOV R15D,EDX
MOV R12,RSI
MOV RBX,RDI
LEA R13,[RBP + -0x48]
MOV RDI,R13
CALL 0x0012fbd2
CMP qword ptr [R13 + 0x8],0x0
JZ 0x0013171f
CMP R15D,0x1
JZ 0x001316f1
CMP R15D,0x3
JZ 0x00131717
CMP R15D,0x2
JNZ 0x001316f7
CMP R14D,0x8
JNC 0x001316f7
LAB_0013169e:
MOV dword ptr [RBX + 0x2c],R15D
MOV dword ptr [RBX + 0x30],R14D
CMP R15D,0x3
SETNC byte ptr [RBX + 0x34]
LAB_001316ae:
LEA RDI,[RBP + -0x30]
LEA RSI,[RBP + -0x48]
MOV RDX,RBX
CALL 0x00132f4c
LAB_001316be:
LEA RDI,[RBP + -0x38]
LEA RSI,[RBP + -0x30]
CALL 0x0010b9d0
LAB_001316cb:
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBX + 0x38],RAX
MOV qword ptr [RBP + -0x38],0x0
MOV RDI,qword ptr [RBP + -0x30]
TEST RDI,RDI
JZ 0x0013173a
DEC dword ptr [RDI + 0x8]
JNZ 0x0013173a
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x8]
JMP 0x0013173a
LAB_001316f1:
CMP R14D,0x7
JC 0x0013169e
LAB_001316f7:
MOV RAX,qword ptr [0x0014af98]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x13833f]
MOV EDX,R15D
MOV ECX,R14D
XOR EAX,EAX
CALL 0x00107320
JMP 0x0013173a
LAB_00131717:
CMP R14D,0xd
JC 0x0013169e
JMP 0x001316f7
LAB_0013171f:
MOV RAX,qword ptr [0x0014af98]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x13831c]
MOV RDX,R12
XOR EAX,EAX
CALL 0x00107320
LAB_0013173a:
LEA RAX,[0x14a8d0]
ADD RAX,0x10
MOV qword ptr [RBP + -0x48],RAX
MOV RDI,qword ptr [RBP + -0x40]
TEST RDI,RDI
JZ 0x00131757
CALL 0x00107210
LAB_00131757:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* PycModule::loadFromMarshalledFile(char const*, int, int) */
void __thiscall
PycModule::loadFromMarshalledFile(PycModule *this,char *param_1,int param_2,int param_3)
{
long *plVar1;
int **local_50;
FILE *local_48;
int8 local_40;
long *local_38;
PycFile::PycFile((PycFile *)&local_50,param_1);
if (local_48 == (FILE *)0x0) {
fprintf(*(FILE **)PTR_stderr_0014af98,"Error opening file %s\n",param_1);
goto LAB_0013173a;
}
if (param_2 == 1) {
if (6 < (uint)param_3) goto LAB_001316f7;
}
else if (param_2 == 3) {
if (0xc < (uint)param_3) goto LAB_001316f7;
}
else if ((param_2 != 2) || (7 < (uint)param_3)) {
LAB_001316f7:
fprintf(*(FILE **)PTR_stderr_0014af98,"Unsupported version %d.%d\n",(ulong)(uint)param_2,
(ulong)(uint)param_3);
goto LAB_0013173a;
}
*(int *)(this + 0x2c) = param_2;
*(int *)(this + 0x30) = param_3;
this[0x34] = (PycModule)(2 < (uint)param_2);
/* try { // try from 001316ae to 001316bd has its CatchHandler @ 0013177f */
LoadObject((PycData *)&local_38,(PycModule *)&local_50);
/* try { // try from 001316be to 001316ca has its CatchHandler @ 00131766 */
PycRef<PycObject>::cast<PycCode>();
*(int8 *)(this + 0x38) = local_40;
local_40 = 0;
if (local_38 != (long *)0x0) {
plVar1 = local_38 + 1;
*(int *)plVar1 = (int)*plVar1 + -1;
if ((int)*plVar1 == 0) {
(**(code **)(*local_38 + 8))();
}
}
LAB_0013173a:
local_50 = &PTR__PycFile_0014a8e0;
if (local_48 != (FILE *)0x0) {
fclose(local_48);
}
return;
}
|
|
57,570
|
mi_check_index_tuple
|
eloqsql/storage/myisam/mi_key.c
|
check_result_t mi_check_index_tuple(MI_INFO *info, uint keynr, uchar *record)
{
int need_unpack= TRUE;
check_result_t res= CHECK_POS;
if (info->index_cond_func)
{
if (mi_unpack_index_tuple(info, keynr, record))
res= CHECK_ERROR;
else if ((res= info->index_cond_func(info->index_cond_func_arg)) ==
CHECK_OUT_OF_RANGE)
{
/* We got beyond the end of scanned range */
info->lastpos= HA_OFFSET_ERROR; /* No active record */
my_errno= HA_ERR_END_OF_FILE;
}
/*
If we got an error, out-of-range condition, or ICP condition computed to
FALSE - we don't need to check the Rowid Filter.
*/
if (res != CHECK_POS)
return res;
need_unpack= FALSE;
}
/* Check the Rowid Filter, if present */
if (mi_check_rowid_filter_is_active(info))
{
/* Unpack the index tuple if we haven't done it already */
if (need_unpack && mi_unpack_index_tuple(info, keynr, record))
res= CHECK_ERROR;
else
{
if ((res= info->rowid_filter_func(info->rowid_filter_func_arg)) ==
CHECK_OUT_OF_RANGE)
{
/* We got beyond the end of scanned range */
info->lastpos= HA_OFFSET_ERROR; /* No active record */
my_errno= HA_ERR_END_OF_FILE;
}
}
}
return res;
}
|
O3
|
c
|
mi_check_index_tuple:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movl %esi, %r15d
movq %rdi, %rbx
movq 0x340(%rdi), %r13
testq %r13, %r13
je 0x7cb17
movq %rbx, %rdi
movl %r15d, %esi
movq %r14, %rdx
callq 0x7cb9a
movl $0xffffffff, %r12d # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0x7cb88
movq 0x348(%rbx), %rdi
callq *0x340(%rbx)
cmpl $0x2, %eax
je 0x7cb4d
movl %eax, %r12d
cmpl $0x1, %eax
jne 0x7cb88
movq 0x358(%rbx), %rax
movl $0x1, %r12d
testq %rax, %rax
je 0x7cb88
movq 0x360(%rbx), %rdi
callq *%rax
testl %eax, %eax
je 0x7cb88
testq %r13, %r13
je 0x7cb70
movq 0x360(%rbx), %rdi
callq *0x350(%rbx)
cmpl $0x2, %eax
jne 0x7cb6b
movq $-0x1, 0x170(%rbx)
callq 0xa2a4e
movl $0x89, (%rax)
movl $0x2, %r12d
jmp 0x7cb88
movl %eax, %r12d
jmp 0x7cb88
movq %rbx, %rdi
movl %r15d, %esi
movq %r14, %rdx
callq 0x7cb9a
movl $0xffffffff, %r12d # imm = 0xFFFFFFFF
testl %eax, %eax
je 0x7cb3b
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
mi_check_index_tuple:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rdx
mov r15d, esi
mov rbx, rdi
mov r13, [rdi+340h]
test r13, r13
jz short loc_7CB17
mov rdi, rbx
mov esi, r15d
mov rdx, r14
call mi_unpack_index_tuple
mov r12d, 0FFFFFFFFh
test eax, eax
jnz loc_7CB88
mov rdi, [rbx+348h]
call qword ptr [rbx+340h]
cmp eax, 2
jz short loc_7CB4D
mov r12d, eax
cmp eax, 1
jnz short loc_7CB88
loc_7CB17:
mov rax, [rbx+358h]
mov r12d, 1
test rax, rax
jz short loc_7CB88
mov rdi, [rbx+360h]
call rax
test eax, eax
jz short loc_7CB88
test r13, r13
jz short loc_7CB70
loc_7CB3B:
mov rdi, [rbx+360h]
call qword ptr [rbx+350h]
cmp eax, 2
jnz short loc_7CB6B
loc_7CB4D:
mov qword ptr [rbx+170h], 0FFFFFFFFFFFFFFFFh
call _my_thread_var
mov dword ptr [rax], 89h
mov r12d, 2
jmp short loc_7CB88
loc_7CB6B:
mov r12d, eax
jmp short loc_7CB88
loc_7CB70:
mov rdi, rbx
mov esi, r15d
mov rdx, r14
call mi_unpack_index_tuple
mov r12d, 0FFFFFFFFh
test eax, eax
jz short loc_7CB3B
loc_7CB88:
mov eax, r12d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long mi_check_index_tuple(long long a1, const char *a2, long long a3)
{
long long v5; // r13
unsigned int v6; // r12d
long long v7; // rdi
unsigned int v8; // eax
unsigned int ( *v9)(_QWORD); // rax
unsigned int v10; // eax
v5 = *(_QWORD *)(a1 + 832);
if ( v5 )
{
a2 = (const char *)(unsigned int)a2;
v6 = -1;
if ( (unsigned int)mi_unpack_index_tuple(a1, (unsigned int)a2, a3) )
return v6;
v7 = *(_QWORD *)(a1 + 840);
v8 = (*(long long ( **)(long long))(a1 + 832))(v7);
if ( v8 == 2 )
{
LABEL_9:
*(_QWORD *)(a1 + 368) = -1LL;
*(_DWORD *)my_thread_var(v7, a2) = 137;
return 2;
}
v6 = v8;
if ( v8 != 1 )
return v6;
}
v9 = *(unsigned int ( **)(_QWORD))(a1 + 856);
v6 = 1;
if ( v9 )
{
if ( v9(*(_QWORD *)(a1 + 864)) )
{
if ( v5
|| (a2 = (const char *)(unsigned int)a2, v6 = -1, !(unsigned int)mi_unpack_index_tuple(a1, (unsigned int)a2, a3)) )
{
v7 = *(_QWORD *)(a1 + 864);
v10 = (*(long long ( **)(long long))(a1 + 848))(v7);
if ( v10 != 2 )
return v10;
goto LABEL_9;
}
}
}
return v6;
}
|
mi_check_index_tuple:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RDX
MOV R15D,ESI
MOV RBX,RDI
MOV R13,qword ptr [RDI + 0x340]
TEST R13,R13
JZ 0x0017cb17
MOV RDI,RBX
MOV ESI,R15D
MOV RDX,R14
CALL 0x0017cb9a
MOV R12D,0xffffffff
TEST EAX,EAX
JNZ 0x0017cb88
MOV RDI,qword ptr [RBX + 0x348]
CALL qword ptr [RBX + 0x340]
CMP EAX,0x2
JZ 0x0017cb4d
MOV R12D,EAX
CMP EAX,0x1
JNZ 0x0017cb88
LAB_0017cb17:
MOV RAX,qword ptr [RBX + 0x358]
MOV R12D,0x1
TEST RAX,RAX
JZ 0x0017cb88
MOV RDI,qword ptr [RBX + 0x360]
CALL RAX
TEST EAX,EAX
JZ 0x0017cb88
TEST R13,R13
JZ 0x0017cb70
LAB_0017cb3b:
MOV RDI,qword ptr [RBX + 0x360]
CALL qword ptr [RBX + 0x350]
CMP EAX,0x2
JNZ 0x0017cb6b
LAB_0017cb4d:
MOV qword ptr [RBX + 0x170],-0x1
CALL 0x001a2a4e
MOV dword ptr [RAX],0x89
MOV R12D,0x2
JMP 0x0017cb88
LAB_0017cb6b:
MOV R12D,EAX
JMP 0x0017cb88
LAB_0017cb70:
MOV RDI,RBX
MOV ESI,R15D
MOV RDX,R14
CALL 0x0017cb9a
MOV R12D,0xffffffff
TEST EAX,EAX
JZ 0x0017cb3b
LAB_0017cb88:
MOV EAX,R12D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int mi_check_index_tuple(long param_1,int4 param_2,int8 param_3)
{
long lVar1;
int iVar2;
int4 *puVar3;
lVar1 = *(long *)(param_1 + 0x340);
if (lVar1 != 0) {
iVar2 = mi_unpack_index_tuple(param_1,param_2,param_3);
if (iVar2 != 0) {
return -1;
}
iVar2 = (**(code **)(param_1 + 0x340))(*(int8 *)(param_1 + 0x348));
if (iVar2 == 2) goto LAB_0017cb4d;
if (iVar2 != 1) {
return iVar2;
}
}
if (*(code **)(param_1 + 0x358) == (code *)0x0) {
return 1;
}
iVar2 = (**(code **)(param_1 + 0x358))(*(int8 *)(param_1 + 0x360));
if (iVar2 == 0) {
return 1;
}
if ((lVar1 == 0) && (iVar2 = mi_unpack_index_tuple(param_1,param_2,param_3), iVar2 != 0)) {
return -1;
}
iVar2 = (**(code **)(param_1 + 0x350))(*(int8 *)(param_1 + 0x360));
if (iVar2 != 2) {
return iVar2;
}
LAB_0017cb4d:
*(int8 *)(param_1 + 0x170) = 0xffffffffffffffff;
puVar3 = (int4 *)_my_thread_var();
*puVar3 = 0x89;
return 2;
}
|
|
57,571
|
minja::IfTemplateToken::IfTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::shared_ptr<minja::Expression>&&)
|
monkey531[P]llama/common/minja.hpp
|
IfTemplateToken(const Location & location, SpaceHandling pre, SpaceHandling post, std::shared_ptr<Expression> && c) : TemplateToken(Type::If, location, pre, post), condition(std::move(c)) {}
|
O2
|
cpp
|
minja::IfTemplateToken::IfTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::shared_ptr<minja::Expression>&&):
pushq %r14
pushq %rbx
pushq %rax
movq %r8, %rbx
movl %ecx, %r8d
movl %edx, %ecx
movq %rsi, %rdx
movq %rdi, %r14
pushq $0x2
popq %rsi
callq 0x4c470
leaq 0x7daed(%rip), %rax # 0xe1b50
addq $0x10, %rax
movq %rax, (%r14)
andq $0x0, 0x38(%r14)
movups (%rbx), %xmm0
andq $0x0, 0x8(%rbx)
movups %xmm0, 0x30(%r14)
andq $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
|
_ZN5minja15IfTemplateTokenC2ERKNS_8LocationENS_13SpaceHandlingES4_OSt10shared_ptrINS_10ExpressionEE:
push r14
push rbx
push rax
mov rbx, r8
mov r8d, ecx
mov ecx, edx
mov rdx, rsi
mov r14, rdi
push 2
pop rsi
call _ZN5minja13TemplateTokenC2ENS0_4TypeERKNS_8LocationENS_13SpaceHandlingES5_; minja::TemplateToken::TemplateToken(minja::TemplateToken::Type,minja::Location const&,minja::SpaceHandling,minja::SpaceHandling)
lea rax, _ZTVN5minja15IfTemplateTokenE; `vtable for'minja::IfTemplateToken
add rax, 10h
mov [r14], rax
and qword ptr [r14+38h], 0
movups xmm0, xmmword ptr [rbx]
and qword ptr [rbx+8], 0
movups xmmword ptr [r14+30h], xmm0
and qword ptr [rbx], 0
add rsp, 8
pop rbx
pop r14
retn
|
long long * minja::IfTemplateToken::IfTemplateToken(long long a1, long long a2, int a3, int a4, __int128 *a5)
{
long long *result; // rax
__int128 v7; // xmm0
minja::TemplateToken::TemplateToken(a1, 2, a2, a3, a4);
result = &`vtable for'minja::IfTemplateToken + 2;
*(_QWORD *)a1 = &`vtable for'minja::IfTemplateToken + 2;
*(_QWORD *)(a1 + 56) = 0LL;
v7 = *a5;
*((_QWORD *)a5 + 1) = 0LL;
*(_OWORD *)(a1 + 48) = v7;
*(_QWORD *)a5 = 0LL;
return result;
}
|
IfTemplateToken:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,R8
MOV R8D,ECX
MOV ECX,EDX
MOV RDX,RSI
MOV R14,RDI
PUSH 0x2
POP RSI
CALL 0x0014c470
LEA RAX,[0x1e1b50]
ADD RAX,0x10
MOV qword ptr [R14],RAX
AND qword ptr [R14 + 0x38],0x0
MOVUPS XMM0,xmmword ptr [RBX]
AND qword ptr [RBX + 0x8],0x0
MOVUPS xmmword ptr [R14 + 0x30],XMM0
AND qword ptr [RBX],0x0
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* minja::IfTemplateToken::IfTemplateToken(minja::Location const&, minja::SpaceHandling,
minja::SpaceHandling, std::shared_ptr<minja::Expression>&&) */
void __thiscall
minja::IfTemplateToken::IfTemplateToken
(IfTemplateToken *this,int8 param_1,int4 param_3,int4 param_4,
int8 *param_5)
{
int8 uVar1;
TemplateToken::TemplateToken((TemplateToken *)this,2,param_1,param_3,param_4);
*(int ***)this = &PTR__IfTemplateToken_001e1b60;
*(int8 *)(this + 0x38) = 0;
uVar1 = param_5[1];
param_5[1] = 0;
*(int8 *)(this + 0x30) = *param_5;
*(int8 *)(this + 0x38) = uVar1;
*param_5 = 0;
return;
}
|
|
57,572
|
minja::IfTemplateToken::IfTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::shared_ptr<minja::Expression>&&)
|
monkey531[P]llama/common/minja.hpp
|
IfTemplateToken(const Location & location, SpaceHandling pre, SpaceHandling post, std::shared_ptr<Expression> && c) : TemplateToken(Type::If, location, pre, post), condition(std::move(c)) {}
|
O3
|
cpp
|
minja::IfTemplateToken::IfTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::shared_ptr<minja::Expression>&&):
pushq %rbx
movq %rdi, %rbx
leaq 0x83cbb(%rip), %rax # 0xefb50
addq $0x10, %rax
movq %rax, (%rdi)
movq 0x38(%rdi), %rdi
testq %rdi, %rdi
je 0x6beaa
callq 0x31b9a
leaq 0x83317(%rip), %rax # 0xef1c8
addq $0x10, %rax
movq %rax, (%rbx)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x6bec7
popq %rbx
jmp 0x31b9a
popq %rbx
retq
nop
|
_ZN5minja15IfTemplateTokenD2Ev:
push rbx
mov rbx, rdi
lea rax, _ZTVN5minja15IfTemplateTokenE; `vtable for'minja::IfTemplateToken
add rax, 10h
mov [rdi], rax
mov rdi, [rdi+38h]
test rdi, rdi
jz short loc_6BEAA
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_6BEAA:
lea rax, _ZTVN5minja13TemplateTokenE; `vtable for'minja::TemplateToken
add rax, 10h
mov [rbx], rax
mov rdi, [rbx+18h]
test rdi, rdi
jz short loc_6BEC7
pop rbx
jmp _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_6BEC7:
pop rbx
retn
|
void minja::IfTemplateToken::~IfTemplateToken(minja::IfTemplateToken *this)
{
volatile signed __int32 *v2; // rdi
volatile signed __int32 *v3; // rdi
*(_QWORD *)this = &`vtable for'minja::IfTemplateToken + 2;
v2 = (volatile signed __int32 *)*((_QWORD *)this + 7);
if ( v2 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v2);
*(_QWORD *)this = &`vtable for'minja::TemplateToken + 2;
v3 = (volatile signed __int32 *)*((_QWORD *)this + 3);
if ( v3 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3);
}
|
~IfTemplateToken:
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x1efb50]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0x38]
TEST RDI,RDI
JZ 0x0016beaa
CALL 0x00131b9a
LAB_0016beaa:
LEA RAX,[0x1ef1c8]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
MOV RDI,qword ptr [RBX + 0x18]
TEST RDI,RDI
JZ 0x0016bec7
POP RBX
JMP 0x00131b9a
LAB_0016bec7:
POP RBX
RET
|
/* minja::IfTemplateToken::~IfTemplateToken() */
void __thiscall minja::IfTemplateToken::~IfTemplateToken(IfTemplateToken *this)
{
*(int ***)this = &PTR__IfTemplateToken_001efb60;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38));
}
*(int ***)this = &PTR__TemplateToken_001ef1d8;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18));
return;
}
return;
}
|
|
57,573
|
ft_boolean_find_relevance
|
eloqsql/storage/myisam/ft_boolean_search.c
|
float ft_boolean_find_relevance(FT_INFO *ftb, uchar *record, uint length)
{
FTB_EXPR *ftbe;
FT_SEG_ITERATOR ftsi, ftsi2;
my_off_t docid=ftb->info->lastpos;
MY_FTB_FIND_PARAM ftb_param;
MYSQL_FTPARSER_PARAM *param;
struct st_mysql_ftparser *parser= ftb->keynr == NO_SUCH_KEY ?
&ft_default_parser :
ftb->info->s->keyinfo[ftb->keynr].parser;
if (docid == HA_OFFSET_ERROR)
return -2.0;
if (!ftb->queue.elements)
return 0;
if (! (param= ftparser_call_initializer(ftb->info, ftb->keynr, 0)))
return 0;
if (ftb->state != INDEX_SEARCH && docid <= ftb->lastpos)
{
FTB_EXPR *x;
uint i;
for (i=0; i < ftb->queue.elements; i++)
{
ftb->list[i]->docid[1]=HA_OFFSET_ERROR;
for (x=ftb->list[i]->up; x; x=x->up)
x->docid[1]=HA_OFFSET_ERROR;
}
}
ftb->lastpos=docid;
if (ftb->keynr==NO_SUCH_KEY)
_mi_ft_segiterator_dummy_init(record, length, &ftsi);
else
_mi_ft_segiterator_init(ftb->info, ftb->keynr, record, &ftsi);
memcpy(&ftsi2, &ftsi, sizeof(ftsi));
ftb_param.ftb= ftb;
ftb_param.ftsi= &ftsi2;
param->mysql_parse= ftb_find_relevance_parse;
param->mysql_add_word= ftb_find_relevance_add_word;
param->mysql_ftparam= (void *)&ftb_param;
param->flags= 0;
param->cs= ftb->charset;
param->mode= MYSQL_FTPARSER_SIMPLE_MODE;
while (_mi_ft_segiterator(&ftsi))
{
if (!ftsi.pos)
continue;
param->doc= (char *)ftsi.pos;
param->length= ftsi.len;
if (unlikely(parser->parse(param)))
return 0;
}
ftbe=ftb->root;
if (ftbe->docid[1]==docid && ftbe->cur_weight>0 &&
ftbe->yesses>=ftbe->ythresh && !ftbe->nos)
{ /* row matched ! */
return ftbe->cur_weight;
}
else
{ /* match failed ! */
return 0.0;
}
}
|
O0
|
c
|
ft_boolean_find_relevance:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x170(%rax), %rax
movq %rax, -0x70(%rbp)
movq -0x10(%rbp), %rax
cmpl $-0x1, 0x340(%rax)
jne 0x9edf6
leaq 0x220513(%rip), %rax # 0x2bf300
movq %rax, -0xa8(%rbp)
jmp 0x9ee24
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movq 0x218(%rax), %rax
movq -0x10(%rbp), %rcx
movl 0x340(%rcx), %ecx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movq 0x38(%rax), %rax
movq %rax, -0xa8(%rbp)
movq -0xa8(%rbp), %rax
movq %rax, -0x90(%rbp)
cmpq $-0x1, -0x70(%rbp)
jne 0x9ee4b
movss 0xb21cf(%rip), %xmm0 # 0x151010
movss %xmm0, -0x4(%rbp)
jmp 0x9f0f5
movq -0x10(%rbp), %rax
cmpl $0x0, 0x80(%rax)
jne 0x9ee65
xorps %xmm0, %xmm0
movss %xmm0, -0x4(%rbp)
jmp 0x9f0f5
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rax
movl 0x340(%rax), %esi
xorl %edx, %edx
callq 0xa2600
movq %rax, -0x88(%rbp)
cmpq $0x0, %rax
jne 0x9ee98
xorps %xmm0, %xmm0
movss %xmm0, -0x4(%rbp)
jmp 0x9f0f5
movq -0x10(%rbp), %rax
cmpl $0x2, 0x348(%rax)
je 0x9ef54
movq -0x70(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x338(%rcx), %rax
ja 0x9ef54
movl $0x0, -0x9c(%rbp)
movl -0x9c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x80(%rcx), %eax
jae 0x9ef52
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x9c(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq $-0x1, 0x18(%rax)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x9c(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq (%rax), %rax
movq %rax, -0x98(%rbp)
cmpq $0x0, -0x98(%rbp)
je 0x9ef3c
movq -0x98(%rbp), %rax
movq $-0x1, 0x18(%rax)
movq -0x98(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x98(%rbp)
jmp 0x9ef10
jmp 0x9ef3e
movl -0x9c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x9c(%rbp)
jmp 0x9eec8
jmp 0x9ef54
movq -0x70(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x338(%rax)
movq -0x10(%rbp), %rax
cmpl $-0x1, 0x340(%rax)
jne 0x9ef82
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %esi
leaq -0x48(%rbp), %rdx
callq 0xa28d0
jmp 0x9efa1
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rax
movl 0x340(%rax), %esi
movq -0x18(%rbp), %rdx
leaq -0x48(%rbp), %rcx
callq 0xa2850
movq -0x48(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x80(%rbp)
leaq -0x68(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x88(%rbp), %rax
leaq 0x131(%rip), %rcx # 0x9f110
movq %rcx, (%rax)
movq -0x88(%rbp), %rax
leaq 0x1a0(%rip), %rcx # 0x9f190
movq %rcx, 0x8(%rax)
movq -0x88(%rbp), %rax
leaq -0x80(%rbp), %rcx
movq %rcx, 0x18(%rax)
movq -0x88(%rbp), %rax
movl $0x0, 0x34(%rax)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x88(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x88(%rbp), %rax
movl $0x0, 0x38(%rax)
leaq -0x48(%rbp), %rdi
callq 0xa2910
cmpl $0x0, %eax
je 0x9f098
cmpq $0x0, -0x30(%rbp)
jne 0x9f049
jmp 0x9f032
movq -0x30(%rbp), %rcx
movq -0x88(%rbp), %rax
movq %rcx, 0x28(%rax)
movl -0x44(%rbp), %ecx
movq -0x88(%rbp), %rax
movl %ecx, 0x30(%rax)
movq -0x90(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x88(%rbp), %rdi
callq *%rax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x9f096
xorps %xmm0, %xmm0
movss %xmm0, -0x4(%rbp)
jmp 0x9f0f5
jmp 0x9f032
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
cmpq -0x70(%rbp), %rax
jne 0x9f0ed
movq -0x28(%rbp), %rax
movss 0x2c(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x9f0ed
movq -0x28(%rbp), %rax
movl 0x40(%rax), %eax
movq -0x28(%rbp), %rcx
cmpl 0x48(%rcx), %eax
jb 0x9f0ed
movq -0x28(%rbp), %rax
cmpl $0x0, 0x44(%rax)
jne 0x9f0ed
movq -0x28(%rbp), %rax
movss 0x2c(%rax), %xmm0
movss %xmm0, -0x4(%rbp)
jmp 0x9f0f5
xorps %xmm0, %xmm0
movss %xmm0, -0x4(%rbp)
movss -0x4(%rbp), %xmm0
addq $0xb0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
ft_boolean_find_relevance:
push rbp
mov rbp, rsp
sub rsp, 0B0h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov rax, [rax+170h]
mov [rbp+var_70], rax
mov rax, [rbp+var_10]
cmp dword ptr [rax+340h], 0FFFFFFFFh
jnz short loc_9EDF6
lea rax, ft_default_parser
mov [rbp+var_A8], rax
jmp short loc_9EE24
loc_9EDF6:
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov rax, [rax]
mov rax, [rax+218h]
mov rcx, [rbp+var_10]
mov ecx, [rcx+340h]
imul rcx, 70h ; 'p'
add rax, rcx
mov rax, [rax+38h]
mov [rbp+var_A8], rax
loc_9EE24:
mov rax, [rbp+var_A8]
mov [rbp+var_90], rax
cmp [rbp+var_70], 0FFFFFFFFFFFFFFFFh
jnz short loc_9EE4B
movss xmm0, cs:dword_151010
movss [rbp+var_4], xmm0
jmp loc_9F0F5
loc_9EE4B:
mov rax, [rbp+var_10]
cmp dword ptr [rax+80h], 0
jnz short loc_9EE65
xorps xmm0, xmm0
movss [rbp+var_4], xmm0
jmp loc_9F0F5
loc_9EE65:
mov rax, [rbp+var_10]
mov rdi, [rax+8]
mov rax, [rbp+var_10]
mov esi, [rax+340h]
xor edx, edx
call ftparser_call_initializer
mov [rbp+var_88], rax
cmp rax, 0
jnz short loc_9EE98
xorps xmm0, xmm0
movss [rbp+var_4], xmm0
jmp loc_9F0F5
loc_9EE98:
mov rax, [rbp+var_10]
cmp dword ptr [rax+348h], 2
jz loc_9EF54
mov rax, [rbp+var_70]
mov rcx, [rbp+var_10]
cmp rax, [rcx+338h]
ja loc_9EF54
mov [rbp+var_9C], 0
loc_9EEC8:
mov eax, [rbp+var_9C]
mov rcx, [rbp+var_10]
cmp eax, [rcx+80h]
jnb short loc_9EF52
mov rax, [rbp+var_10]
mov rax, [rax+20h]
mov ecx, [rbp+var_9C]
mov rax, [rax+rcx*8]
mov qword ptr [rax+18h], 0FFFFFFFFFFFFFFFFh
mov rax, [rbp+var_10]
mov rax, [rax+20h]
mov ecx, [rbp+var_9C]
mov rax, [rax+rcx*8]
mov rax, [rax]
mov [rbp+var_98], rax
loc_9EF10:
cmp [rbp+var_98], 0
jz short loc_9EF3C
mov rax, [rbp+var_98]
mov qword ptr [rax+18h], 0FFFFFFFFFFFFFFFFh
mov rax, [rbp+var_98]
mov rax, [rax]
mov [rbp+var_98], rax
jmp short loc_9EF10
loc_9EF3C:
jmp short $+2
loc_9EF3E:
mov eax, [rbp+var_9C]
add eax, 1
mov [rbp+var_9C], eax
jmp loc_9EEC8
loc_9EF52:
jmp short $+2
loc_9EF54:
mov rcx, [rbp+var_70]
mov rax, [rbp+var_10]
mov [rax+338h], rcx
mov rax, [rbp+var_10]
cmp dword ptr [rax+340h], 0FFFFFFFFh
jnz short loc_9EF82
mov rdi, [rbp+var_18]
mov esi, [rbp+var_1C]
lea rdx, [rbp+var_48]
call _mi_ft_segiterator_dummy_init
jmp short loc_9EFA1
loc_9EF82:
mov rax, [rbp+var_10]
mov rdi, [rax+8]
mov rax, [rbp+var_10]
mov esi, [rax+340h]
mov rdx, [rbp+var_18]
lea rcx, [rbp+var_48]
call _mi_ft_segiterator_init
loc_9EFA1:
mov rax, [rbp+var_48]
mov [rbp+var_68], rax
mov rax, [rbp+var_40]
mov [rbp+var_60], rax
mov rax, [rbp+var_38]
mov [rbp+var_58], rax
mov rax, [rbp+var_30]
mov [rbp+var_50], rax
mov rax, [rbp+var_10]
mov [rbp+var_80], rax
lea rax, [rbp+var_68]
mov [rbp+var_78], rax
mov rax, [rbp+var_88]
lea rcx, ftb_find_relevance_parse
mov [rax], rcx
mov rax, [rbp+var_88]
lea rcx, ftb_find_relevance_add_word
mov [rax+8], rcx
mov rax, [rbp+var_88]
lea rcx, [rbp+var_80]
mov [rax+18h], rcx
mov rax, [rbp+var_88]
mov dword ptr [rax+34h], 0
mov rax, [rbp+var_10]
mov rcx, [rax+10h]
mov rax, [rbp+var_88]
mov [rax+20h], rcx
mov rax, [rbp+var_88]
mov dword ptr [rax+38h], 0
loc_9F032:
lea rdi, [rbp+var_48]
call _mi_ft_segiterator
cmp eax, 0
jz short loc_9F098
cmp [rbp+var_30], 0
jnz short loc_9F049
jmp short loc_9F032
loc_9F049:
mov rcx, [rbp+var_30]
mov rax, [rbp+var_88]
mov [rax+28h], rcx
mov ecx, dword ptr [rbp+var_48+4]
mov rax, [rbp+var_88]
mov [rax+30h], ecx
mov rax, [rbp+var_90]
mov rax, [rax+8]
mov rdi, [rbp+var_88]
call rax
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_9F096
xorps xmm0, xmm0
movss [rbp+var_4], xmm0
jmp short loc_9F0F5
loc_9F096:
jmp short loc_9F032
loc_9F098:
mov rax, [rbp+var_10]
mov rax, [rax+18h]
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
mov rax, [rax+18h]
cmp rax, [rbp+var_70]
jnz short loc_9F0ED
mov rax, [rbp+var_28]
movss xmm0, dword ptr [rax+2Ch]
xorps xmm1, xmm1
ucomiss xmm0, xmm1
jbe short loc_9F0ED
mov rax, [rbp+var_28]
mov eax, [rax+40h]
mov rcx, [rbp+var_28]
cmp eax, [rcx+48h]
jb short loc_9F0ED
mov rax, [rbp+var_28]
cmp dword ptr [rax+44h], 0
jnz short loc_9F0ED
mov rax, [rbp+var_28]
movss xmm0, dword ptr [rax+2Ch]
movss [rbp+var_4], xmm0
jmp short loc_9F0F5
loc_9F0ED:
xorps xmm0, xmm0
movss [rbp+var_4], xmm0
loc_9F0F5:
movss xmm0, [rbp+var_4]
add rsp, 0B0h
pop rbp
retn
|
float ft_boolean_find_relevance(long long a1, long long a2, unsigned int a3)
{
unsigned int ( **v4)(long long); // [rsp+8h] [rbp-A8h]
long long v5; // [rsp+14h] [rbp-9Ch]
_QWORD *i; // [rsp+18h] [rbp-98h]
long long v7; // [rsp+28h] [rbp-88h]
_QWORD v8[2]; // [rsp+30h] [rbp-80h] BYREF
unsigned long long v9; // [rsp+40h] [rbp-70h]
_QWORD v10[4]; // [rsp+48h] [rbp-68h] BYREF
_QWORD v11[3]; // [rsp+68h] [rbp-48h] BYREF
long long v12; // [rsp+80h] [rbp-30h]
long long v13; // [rsp+88h] [rbp-28h]
unsigned int v14; // [rsp+94h] [rbp-1Ch]
long long v15; // [rsp+98h] [rbp-18h]
long long v16; // [rsp+A0h] [rbp-10h]
v16 = a1;
v15 = a2;
v14 = a3;
v9 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 368LL);
if ( *(_DWORD *)(a1 + 832) == -1 )
v4 = (unsigned int ( **)(long long))&ft_default_parser;
else
v4 = *(unsigned int ( ***)(long long))(112LL * *(unsigned int *)(v16 + 832)
+ *(_QWORD *)(**(_QWORD **)(v16 + 8) + 536LL)
+ 56);
if ( v9 == -1LL )
return -2.0;
if ( !*(_DWORD *)(v16 + 128) )
return 0.0;
v7 = ftparser_call_initializer(*(_QWORD *)(v16 + 8), *(unsigned int *)(v16 + 832), 0LL);
if ( !v7 )
return 0.0;
if ( *(_DWORD *)(v16 + 840) != 2 && v9 <= *(_QWORD *)(v16 + 824) )
{
LODWORD(v5) = 0;
while ( (unsigned int)v5 < *(_DWORD *)(v16 + 128) )
{
*(_QWORD *)(*(_QWORD *)(*(_QWORD *)(v16 + 32) + 8LL * (unsigned int)v5) + 24LL) = -1LL;
for ( i = **(_QWORD ***)(*(_QWORD *)(v16 + 32) + 8LL * (unsigned int)v5); i; i = (_QWORD *)*i )
i[3] = -1LL;
v5 = (unsigned int)(v5 + 1);
}
}
*(_QWORD *)(v16 + 824) = v9;
if ( *(_DWORD *)(v16 + 832) == -1 )
mi_ft_segiterator_dummy_init(v15, v14, v11);
else
mi_ft_segiterator_init(*(_QWORD *)(v16 + 8), *(unsigned int *)(v16 + 832), v15, v11);
v10[0] = v11[0];
v10[1] = v11[1];
v10[2] = v11[2];
v10[3] = v12;
v8[0] = v16;
v8[1] = v10;
*(_QWORD *)v7 = ftb_find_relevance_parse;
*(_QWORD *)(v7 + 8) = ftb_find_relevance_add_word;
*(_QWORD *)(v7 + 24) = v8;
*(_DWORD *)(v7 + 52) = 0;
*(_QWORD *)(v7 + 32) = *(_QWORD *)(v16 + 16);
*(_DWORD *)(v7 + 56) = 0;
while ( (unsigned int)mi_ft_segiterator(v11) )
{
if ( v12 )
{
*(_QWORD *)(v7 + 40) = v12;
*(_DWORD *)(v7 + 48) = HIDWORD(v11[0]);
if ( v4[1](v7) )
return 0.0;
}
}
v13 = *(_QWORD *)(v16 + 24);
if ( *(_QWORD *)(v13 + 24) != v9
|| *(float *)(v13 + 44) <= 0.0
|| *(_DWORD *)(v13 + 64) < *(_DWORD *)(v13 + 72)
|| *(_DWORD *)(v13 + 68) )
{
return 0.0;
}
else
{
return *(float *)(v13 + 44);
}
}
|
ft_boolean_find_relevance:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xb0
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0x170]
MOV qword ptr [RBP + -0x70],RAX
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x340],-0x1
JNZ 0x0019edf6
LEA RAX,[0x3bf300]
MOV qword ptr [RBP + -0xa8],RAX
JMP 0x0019ee24
LAB_0019edf6:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x218]
MOV RCX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RCX + 0x340]
IMUL RCX,RCX,0x70
ADD RAX,RCX
MOV RAX,qword ptr [RAX + 0x38]
MOV qword ptr [RBP + -0xa8],RAX
LAB_0019ee24:
MOV RAX,qword ptr [RBP + -0xa8]
MOV qword ptr [RBP + -0x90],RAX
CMP qword ptr [RBP + -0x70],-0x1
JNZ 0x0019ee4b
MOVSS XMM0,dword ptr [0x00251010]
MOVSS dword ptr [RBP + -0x4],XMM0
JMP 0x0019f0f5
LAB_0019ee4b:
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x80],0x0
JNZ 0x0019ee65
XORPS XMM0,XMM0
MOVSS dword ptr [RBP + -0x4],XMM0
JMP 0x0019f0f5
LAB_0019ee65:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RAX + 0x340]
XOR EDX,EDX
CALL 0x001a2600
MOV qword ptr [RBP + -0x88],RAX
CMP RAX,0x0
JNZ 0x0019ee98
XORPS XMM0,XMM0
MOVSS dword ptr [RBP + -0x4],XMM0
JMP 0x0019f0f5
LAB_0019ee98:
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x348],0x2
JZ 0x0019ef54
MOV RAX,qword ptr [RBP + -0x70]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x338]
JA 0x0019ef54
MOV dword ptr [RBP + -0x9c],0x0
LAB_0019eec8:
MOV EAX,dword ptr [RBP + -0x9c]
MOV RCX,qword ptr [RBP + -0x10]
CMP EAX,dword ptr [RCX + 0x80]
JNC 0x0019ef52
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x20]
MOV ECX,dword ptr [RBP + -0x9c]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RAX + 0x18],-0x1
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x20]
MOV ECX,dword ptr [RBP + -0x9c]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x98],RAX
LAB_0019ef10:
CMP qword ptr [RBP + -0x98],0x0
JZ 0x0019ef3c
MOV RAX,qword ptr [RBP + -0x98]
MOV qword ptr [RAX + 0x18],-0x1
MOV RAX,qword ptr [RBP + -0x98]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x98],RAX
JMP 0x0019ef10
LAB_0019ef3c:
JMP 0x0019ef3e
LAB_0019ef3e:
MOV EAX,dword ptr [RBP + -0x9c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x9c],EAX
JMP 0x0019eec8
LAB_0019ef52:
JMP 0x0019ef54
LAB_0019ef54:
MOV RCX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x338],RCX
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x340],-0x1
JNZ 0x0019ef82
MOV RDI,qword ptr [RBP + -0x18]
MOV ESI,dword ptr [RBP + -0x1c]
LEA RDX,[RBP + -0x48]
CALL 0x001a28d0
JMP 0x0019efa1
LAB_0019ef82:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RAX + 0x340]
MOV RDX,qword ptr [RBP + -0x18]
LEA RCX,[RBP + -0x48]
CALL 0x001a2850
LAB_0019efa1:
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x80],RAX
LEA RAX,[RBP + -0x68]
MOV qword ptr [RBP + -0x78],RAX
MOV RAX,qword ptr [RBP + -0x88]
LEA RCX,[0x19f110]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x88]
LEA RCX,[0x19f190]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x88]
LEA RCX,[RBP + -0x80]
MOV qword ptr [RAX + 0x18],RCX
MOV RAX,qword ptr [RBP + -0x88]
MOV dword ptr [RAX + 0x34],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x88]
MOV qword ptr [RAX + 0x20],RCX
MOV RAX,qword ptr [RBP + -0x88]
MOV dword ptr [RAX + 0x38],0x0
LAB_0019f032:
LEA RDI,[RBP + -0x48]
CALL 0x001a2910
CMP EAX,0x0
JZ 0x0019f098
CMP qword ptr [RBP + -0x30],0x0
JNZ 0x0019f049
JMP 0x0019f032
LAB_0019f049:
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x88]
MOV qword ptr [RAX + 0x28],RCX
MOV ECX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + -0x88]
MOV dword ptr [RAX + 0x30],ECX
MOV RAX,qword ptr [RBP + -0x90]
MOV RAX,qword ptr [RAX + 0x8]
MOV RDI,qword ptr [RBP + -0x88]
CALL RAX
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x0019f096
XORPS XMM0,XMM0
MOVSS dword ptr [RBP + -0x4],XMM0
JMP 0x0019f0f5
LAB_0019f096:
JMP 0x0019f032
LAB_0019f098:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x18]
CMP RAX,qword ptr [RBP + -0x70]
JNZ 0x0019f0ed
MOV RAX,qword ptr [RBP + -0x28]
MOVSS XMM0,dword ptr [RAX + 0x2c]
XORPS XMM1,XMM1
UCOMISS XMM0,XMM1
JBE 0x0019f0ed
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x28]
CMP EAX,dword ptr [RCX + 0x48]
JC 0x0019f0ed
MOV RAX,qword ptr [RBP + -0x28]
CMP dword ptr [RAX + 0x44],0x0
JNZ 0x0019f0ed
MOV RAX,qword ptr [RBP + -0x28]
MOVSS XMM0,dword ptr [RAX + 0x2c]
MOVSS dword ptr [RBP + -0x4],XMM0
JMP 0x0019f0f5
LAB_0019f0ed:
XORPS XMM0,XMM0
MOVSS dword ptr [RBP + -0x4],XMM0
LAB_0019f0f5:
MOVSS XMM0,dword ptr [RBP + -0x4]
ADD RSP,0xb0
POP RBP
RET
|
int4 ft_boolean_find_relevance(long param_1,int8 param_2,int4 param_3)
{
long lVar1;
int iVar2;
int8 *puVar3;
int1 *local_b0;
uint local_a4;
int8 *local_a0;
long local_88;
int1 *local_80;
ulong local_78;
int1 local_70 [8];
int8 local_68;
int8 local_60;
long local_58;
int1 local_50 [4];
int4 uStack_4c;
int8 local_48;
int8 local_40;
long local_38;
int4 local_24;
int8 local_20;
long local_18;
int4 local_c;
local_78 = *(ulong *)(*(long *)(param_1 + 8) + 0x170);
if (*(int *)(param_1 + 0x340) == -1) {
local_b0 = ft_default_parser;
}
else {
local_b0 = *(int1 **)
(*(long *)(**(long **)(param_1 + 8) + 0x218) +
(ulong)*(uint *)(param_1 + 0x340) * 0x70 + 0x38);
}
if (local_78 == 0xffffffffffffffff) {
local_c = DAT_00251010;
}
else if (*(int *)(param_1 + 0x80) == 0) {
local_c = 0;
}
else {
local_24 = param_3;
local_20 = param_2;
local_18 = param_1;
puVar3 = (int8 *)
ftparser_call_initializer
(*(int8 *)(param_1 + 8),*(int4 *)(param_1 + 0x340),0);
if (puVar3 == (int8 *)0x0) {
local_c = 0;
}
else {
if ((*(int *)(local_18 + 0x348) != 2) && (local_78 <= *(ulong *)(local_18 + 0x338))) {
for (local_a4 = 0; local_a4 < *(uint *)(local_18 + 0x80); local_a4 = local_a4 + 1) {
*(int8 *)(*(long *)(*(long *)(local_18 + 0x20) + (ulong)local_a4 * 8) + 0x18) =
0xffffffffffffffff;
for (local_a0 = (int8 *)
**(int8 **)(*(long *)(local_18 + 0x20) + (ulong)local_a4 * 8);
local_a0 != (int8 *)0x0; local_a0 = (int8 *)*local_a0) {
local_a0[3] = 0xffffffffffffffff;
}
}
}
*(ulong *)(local_18 + 0x338) = local_78;
if (*(int *)(local_18 + 0x340) == -1) {
_mi_ft_segiterator_dummy_init(local_20,local_24,local_50);
}
else {
_mi_ft_segiterator_init
(*(int8 *)(local_18 + 8),*(int4 *)(local_18 + 0x340),local_20,local_50
);
}
local_68 = local_48;
local_60 = local_40;
local_58 = local_38;
local_88 = local_18;
local_80 = local_70;
*puVar3 = ftb_find_relevance_parse;
puVar3[1] = ftb_find_relevance_add_word;
puVar3[3] = &local_88;
*(int4 *)((long)puVar3 + 0x34) = 0;
puVar3[4] = *(int8 *)(local_18 + 0x10);
*(int4 *)(puVar3 + 7) = 0;
do {
do {
iVar2 = _mi_ft_segiterator(local_50);
if (iVar2 == 0) {
lVar1 = *(long *)(local_18 + 0x18);
if ((((*(ulong *)(lVar1 + 0x18) == local_78) && (0.0 < *(float *)(lVar1 + 0x2c))) &&
(*(uint *)(lVar1 + 0x48) <= *(uint *)(lVar1 + 0x40))) &&
(*(int *)(lVar1 + 0x44) == 0)) {
return *(int4 *)(lVar1 + 0x2c);
}
return 0;
}
} while (local_38 == 0);
puVar3[5] = local_38;
*(int4 *)(puVar3 + 6) = uStack_4c;
iVar2 = (**(code **)(local_b0 + 8))(puVar3);
} while (iVar2 == 0);
local_c = 0;
}
}
return local_c;
}
|
|
57,574
|
common_sampler_types_from_chars(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
monkey531[P]llama/common/sampling.cpp
|
std::vector<common_sampler_type> common_sampler_types_from_chars(const std::string & chars) {
std::unordered_map<char, common_sampler_type> sampler_name_map = {
{ common_sampler_type_to_chr(COMMON_SAMPLER_TYPE_DRY), COMMON_SAMPLER_TYPE_DRY },
{ common_sampler_type_to_chr(COMMON_SAMPLER_TYPE_TOP_K), COMMON_SAMPLER_TYPE_TOP_K },
{ common_sampler_type_to_chr(COMMON_SAMPLER_TYPE_TYPICAL_P), COMMON_SAMPLER_TYPE_TYPICAL_P },
{ common_sampler_type_to_chr(COMMON_SAMPLER_TYPE_TOP_P), COMMON_SAMPLER_TYPE_TOP_P },
{ common_sampler_type_to_chr(COMMON_SAMPLER_TYPE_MIN_P), COMMON_SAMPLER_TYPE_MIN_P },
{ common_sampler_type_to_chr(COMMON_SAMPLER_TYPE_TEMPERATURE), COMMON_SAMPLER_TYPE_TEMPERATURE },
{ common_sampler_type_to_chr(COMMON_SAMPLER_TYPE_XTC), COMMON_SAMPLER_TYPE_XTC },
{ common_sampler_type_to_chr(COMMON_SAMPLER_TYPE_INFILL), COMMON_SAMPLER_TYPE_INFILL },
{ common_sampler_type_to_chr(COMMON_SAMPLER_TYPE_PENALTIES), COMMON_SAMPLER_TYPE_PENALTIES },
};
std::vector<common_sampler_type> samplers;
samplers.reserve(chars.size());
for (const auto & c : chars) {
const auto sampler = sampler_name_map.find(c);
if (sampler != sampler_name_map.end()) {
samplers.push_back(sampler->second);
}
}
return samplers;
}
|
O3
|
cpp
|
common_sampler_types_from_chars(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x98(%rsp), %rdx
movb $0x64, -0x48(%rdx)
movl $0x1, -0x44(%rdx)
movb $0x6b, -0x40(%rdx)
movl $0x2, -0x3c(%rdx)
movb $0x79, -0x38(%rdx)
movl $0x6, -0x34(%rdx)
movb $0x70, -0x30(%rdx)
movl $0x3, -0x2c(%rdx)
movb $0x6d, -0x28(%rdx)
movl $0x4, -0x24(%rdx)
movb $0x74, -0x20(%rdx)
movl $0x7, -0x1c(%rdx)
movb $0x78, -0x18(%rdx)
movl $0x8, -0x14(%rdx)
movb $0x69, -0x10(%rdx)
movl $0x9, -0xc(%rdx)
movb $0x65, -0x8(%rdx)
movl $0xa, -0x4(%rdx)
leaq 0x15(%rsp), %rax
movq %rax, (%rsp)
leaq 0x18(%rsp), %rdi
leaq 0x50(%rsp), %rsi
leaq 0x17(%rsp), %r8
leaq 0x16(%rsp), %r9
xorl %ecx, %ecx
callq 0xcfe3c
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
movq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0xcf306
movq 0x8(%r14), %r12
testq %r12, %r12
je 0xcefbd
movq (%r14), %r14
leaq 0x18(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0xd01ce
testq %rax, %rax
je 0xcefb5
addq $0xc, %rax
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0xcefaa
movl (%rax), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0xcefb5
movq %rbx, %rdi
movq %rax, %rdx
callq 0xcfd1c
incq %r14
decq %r12
jne 0xcef7e
leaq 0x18(%rsp), %rdi
callq 0xcf672
movq %rbx, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0xcefdb
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0xceff2
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x1a890
leaq 0x18(%rsp), %rdi
callq 0xcf672
movq %r14, %rdi
callq 0x1af20
|
_Z31common_sampler_types_from_charsRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r15
push r14
push r12
push rbx
sub rsp, 98h
mov r14, rsi
mov rbx, rdi
lea rdx, [rsp+0B8h+var_20]
mov byte ptr [rdx-48h], 64h ; 'd'
mov dword ptr [rdx-44h], 1
mov byte ptr [rdx-40h], 6Bh ; 'k'
mov dword ptr [rdx-3Ch], 2
mov byte ptr [rdx-38h], 79h ; 'y'
mov dword ptr [rdx-34h], 6
mov byte ptr [rdx-30h], 70h ; 'p'
mov dword ptr [rdx-2Ch], 3
mov byte ptr [rdx-28h], 6Dh ; 'm'
mov dword ptr [rdx-24h], 4
mov byte ptr [rdx-20h], 74h ; 't'
mov dword ptr [rdx-1Ch], 7
mov byte ptr [rdx-18h], 78h ; 'x'
mov dword ptr [rdx-14h], 8
mov byte ptr [rdx-10h], 69h ; 'i'
mov dword ptr [rdx-0Ch], 9
mov byte ptr [rdx-8], 65h ; 'e'
mov dword ptr [rdx-4], 0Ah
lea rax, [rsp+0B8h+var_A3]
mov [rsp+0B8h+var_B8], rax
lea rdi, [rsp+0B8h+var_A0]
lea rsi, [rsp+0B8h+var_68]
lea r8, [rsp+0B8h+var_A1]
lea r9, [rsp+0B8h+var_A2]
xor ecx, ecx
call _ZNSt10_HashtableIcSt4pairIKc19common_sampler_typeESaIS3_ENSt8__detail10_Select1stESt8equal_toIcESt4hashIcENS5_18_Mod_range_hashingENS5_20_Default_ranged_hashENS5_20_Prime_rehash_policyENS5_17_Hashtable_traitsILb0ELb0ELb1EEEEC2IPKS3_EET_SK_mRKSA_RKS8_RKS4_St17integral_constantIbLb1EE; std::_Hashtable<char,std::pair<char const,common_sampler_type>,std::allocator<std::pair<char const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<char>,std::hash<char>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::_Hashtable<std::pair<char const,common_sampler_type> const*>(std::pair<char const,common_sampler_type> const*,std::pair<char const,common_sampler_type> const*,ulong,std::hash<char> const&,std::equal_to<char> const&,std::allocator<std::pair<char const,common_sampler_type>> const&,std::integral_constant<bool,true>)
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
mov qword ptr [rbx+10h], 0
mov rsi, [r14+8]
mov rdi, rbx
call _ZNSt6vectorI19common_sampler_typeSaIS0_EE7reserveEm; std::vector<common_sampler_type>::reserve(ulong)
mov r12, [r14+8]
test r12, r12
jz short loc_CEFBD
mov r14, [r14]
lea r15, [rsp+0B8h+var_A0]
loc_CEF7E:
mov rdi, r15
mov rsi, r14
call _ZNSt10_HashtableIcSt4pairIKc19common_sampler_typeESaIS3_ENSt8__detail10_Select1stESt8equal_toIcESt4hashIcENS5_18_Mod_range_hashingENS5_20_Default_ranged_hashENS5_20_Prime_rehash_policyENS5_17_Hashtable_traitsILb0ELb0ELb1EEEE4findERS1_; std::_Hashtable<char,std::pair<char const,common_sampler_type>,std::allocator<std::pair<char const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<char>,std::hash<char>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::find(char const&)
test rax, rax
jz short loc_CEFB5
add rax, 0Ch
mov rsi, [rbx+8]
cmp rsi, [rbx+10h]
jz short loc_CEFAA
mov eax, [rax]
mov [rsi], eax
add rsi, 4
mov [rbx+8], rsi
jmp short loc_CEFB5
loc_CEFAA:
mov rdi, rbx
mov rdx, rax
call _ZNSt6vectorI19common_sampler_typeSaIS0_EE17_M_realloc_insertIJRKS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_; std::vector<common_sampler_type>::_M_realloc_insert<common_sampler_type const&>(__gnu_cxx::__normal_iterator<common_sampler_type*,std::vector<common_sampler_type>>,common_sampler_type const&)
loc_CEFB5:
inc r14
dec r12
jnz short loc_CEF7E
loc_CEFBD:
lea rdi, [rsp+0B8h+var_A0]
call _ZNSt10_HashtableIcSt4pairIKc19common_sampler_typeESaIS3_ENSt8__detail10_Select1stESt8equal_toIcESt4hashIcENS5_18_Mod_range_hashingENS5_20_Default_ranged_hashENS5_20_Prime_rehash_policyENS5_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<char,std::pair<char const,common_sampler_type>,std::allocator<std::pair<char const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<char>,std::hash<char>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable()
mov rax, rbx
add rsp, 98h
pop rbx
pop r12
pop r14
pop r15
retn
jmp short $+2
loc_CEFDB:
mov r14, rax
mov rdi, [rbx]; void *
test rdi, rdi
jz short loc_CEFF2
mov rsi, [rbx+10h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_CEFF2:
lea rdi, [rsp+arg_10]
call _ZNSt10_HashtableIcSt4pairIKc19common_sampler_typeESaIS3_ENSt8__detail10_Select1stESt8equal_toIcESt4hashIcENS5_18_Mod_range_hashingENS5_20_Default_ranged_hashENS5_20_Prime_rehash_policyENS5_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<char,std::pair<char const,common_sampler_type>,std::allocator<std::pair<char const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<char>,std::hash<char>,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, r14
call __Unwind_Resume
|
long long common_sampler_types_from_chars(long long a1, long long *a2)
{
long long v2; // r12
long long v3; // r14
long long v4; // rax
_DWORD *v5; // rax
_DWORD *v6; // rsi
char v8; // [rsp+15h] [rbp-A3h] BYREF
char v9; // [rsp+16h] [rbp-A2h] BYREF
char v10; // [rsp+17h] [rbp-A1h] BYREF
_BYTE v11[56]; // [rsp+18h] [rbp-A0h] BYREF
char v12; // [rsp+50h] [rbp-68h] BYREF
int v13; // [rsp+54h] [rbp-64h]
char v14; // [rsp+58h] [rbp-60h]
int v15; // [rsp+5Ch] [rbp-5Ch]
char v16; // [rsp+60h] [rbp-58h]
int v17; // [rsp+64h] [rbp-54h]
char v18; // [rsp+68h] [rbp-50h]
int v19; // [rsp+6Ch] [rbp-4Ch]
char v20; // [rsp+70h] [rbp-48h]
int v21; // [rsp+74h] [rbp-44h]
char v22; // [rsp+78h] [rbp-40h]
int v23; // [rsp+7Ch] [rbp-3Ch]
char v24; // [rsp+80h] [rbp-38h]
int v25; // [rsp+84h] [rbp-34h]
char v26; // [rsp+88h] [rbp-30h]
int v27; // [rsp+8Ch] [rbp-2Ch]
char v28; // [rsp+90h] [rbp-28h]
int v29; // [rsp+94h] [rbp-24h]
char v30; // [rsp+98h] [rbp-20h] BYREF
v12 = 100;
v13 = 1;
v14 = 107;
v15 = 2;
v16 = 121;
v17 = 6;
v18 = 112;
v19 = 3;
v20 = 109;
v21 = 4;
v22 = 116;
v23 = 7;
v24 = 120;
v25 = 8;
v26 = 105;
v27 = 9;
v28 = 101;
v29 = 10;
std::_Hashtable<char,std::pair<char const,common_sampler_type>,std::allocator<std::pair<char const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<char>,std::hash<char>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::_Hashtable<std::pair<char const,common_sampler_type> const*>(
(unsigned int)v11,
(unsigned int)&v12,
(unsigned int)&v30,
0,
(unsigned int)&v10,
(unsigned int)&v9,
(long long)&v8);
*(_OWORD *)a1 = 0LL;
*(_QWORD *)(a1 + 16) = 0LL;
std::vector<common_sampler_type>::reserve(a1, a2[1]);
v2 = a2[1];
if ( v2 )
{
v3 = *a2;
do
{
v4 = std::_Hashtable<char,std::pair<char const,common_sampler_type>,std::allocator<std::pair<char const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<char>,std::hash<char>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::find(
v11,
v3);
if ( v4 )
{
v5 = (_DWORD *)(v4 + 12);
v6 = *(_DWORD **)(a1 + 8);
if ( v6 == *(_DWORD **)(a1 + 16) )
{
std::vector<common_sampler_type>::_M_realloc_insert<common_sampler_type const&>(a1, v6, v5);
}
else
{
*v6 = *v5;
*(_QWORD *)(a1 + 8) = v6 + 1;
}
}
++v3;
--v2;
}
while ( v2 );
}
std::_Hashtable<char,std::pair<char const,common_sampler_type>,std::allocator<std::pair<char const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<char>,std::hash<char>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable(v11);
return a1;
}
|
common_sampler_types_from_chars:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x98
MOV R14,RSI
MOV RBX,RDI
LEA RDX,[RSP + 0x98]
MOV byte ptr [RDX + -0x48],0x64
MOV dword ptr [RDX + -0x44],0x1
MOV byte ptr [RDX + -0x40],0x6b
MOV dword ptr [RDX + -0x3c],0x2
MOV byte ptr [RDX + -0x38],0x79
MOV dword ptr [RDX + -0x34],0x6
MOV byte ptr [RDX + -0x30],0x70
MOV dword ptr [RDX + -0x2c],0x3
MOV byte ptr [RDX + -0x28],0x6d
MOV dword ptr [RDX + -0x24],0x4
MOV byte ptr [RDX + -0x20],0x74
MOV dword ptr [RDX + -0x1c],0x7
MOV byte ptr [RDX + -0x18],0x78
MOV dword ptr [RDX + -0x14],0x8
MOV byte ptr [RDX + -0x10],0x69
MOV dword ptr [RDX + -0xc],0x9
MOV byte ptr [RDX + -0x8],0x65
MOV dword ptr [RDX + -0x4],0xa
LEA RAX,[RSP + 0x15]
MOV qword ptr [RSP],RAX
LEA RDI,[RSP + 0x18]
LEA RSI,[RSP + 0x50]
LEA R8,[RSP + 0x17]
LEA R9,[RSP + 0x16]
XOR ECX,ECX
CALL 0x001cfe3c
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
MOV qword ptr [RBX + 0x10],0x0
MOV RSI,qword ptr [R14 + 0x8]
LAB_001cef65:
MOV RDI,RBX
CALL 0x001cf306
MOV R12,qword ptr [R14 + 0x8]
TEST R12,R12
JZ 0x001cefbd
MOV R14,qword ptr [R14]
LEA R15,[RSP + 0x18]
LAB_001cef7e:
MOV RDI,R15
MOV RSI,R14
CALL 0x001d01ce
TEST RAX,RAX
JZ 0x001cefb5
ADD RAX,0xc
MOV RSI,qword ptr [RBX + 0x8]
CMP RSI,qword ptr [RBX + 0x10]
JZ 0x001cefaa
MOV EAX,dword ptr [RAX]
MOV dword ptr [RSI],EAX
ADD RSI,0x4
MOV qword ptr [RBX + 0x8],RSI
JMP 0x001cefb5
LAB_001cefaa:
MOV RDI,RBX
MOV RDX,RAX
CALL 0x001cfd1c
LAB_001cefb5:
INC R14
DEC R12
JNZ 0x001cef7e
LAB_001cefbd:
LEA RDI,[RSP + 0x18]
CALL 0x001cf672
MOV RAX,RBX
ADD RSP,0x98
POP RBX
POP R12
POP R14
POP R15
RET
|
/* common_sampler_types_from_chars(std::__cxx11::string const&) */
string * common_sampler_types_from_chars(string *param_1)
{
int4 *puVar1;
long lVar2;
int8 *in_RSI;
long lVar3;
char *pcVar4;
int1 local_a3;
int1 local_a2;
int1 local_a1;
_Hashtable<char,std::pair<char_const,common_sampler_type>,std::allocator<std::pair<char_const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<char>,std::hash<char>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>
local_a0 [56];
int1 local_68 [4];
int4 local_64;
int1 local_60;
int4 local_5c;
int1 local_58;
int4 local_54;
int1 local_50;
int4 local_4c;
int1 local_48;
int4 local_44;
int1 local_40;
int4 local_3c;
int1 local_38;
int4 local_34;
int1 local_30;
int4 local_2c;
int1 local_28;
int4 local_24;
local_68[0] = 100;
local_64 = 1;
local_60 = 0x6b;
local_5c = 2;
local_58 = 0x79;
local_54 = 6;
local_50 = 0x70;
local_4c = 3;
local_48 = 0x6d;
local_44 = 4;
local_40 = 0x74;
local_3c = 7;
local_38 = 0x78;
local_34 = 8;
local_30 = 0x69;
local_2c = 9;
local_28 = 0x65;
local_24 = 10;
std::
_Hashtable<char,std::pair<char_const,common_sampler_type>,std::allocator<std::pair<char_const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<char>,std::hash<char>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>
::_Hashtable<std::pair<char_const,common_sampler_type>const*>
(local_a0,local_68,&stack0xffffffffffffffe0,0,&local_a1,&local_a2,&local_a3);
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
*(int8 *)(param_1 + 0x10) = 0;
/* try { // try from 001cef65 to 001cef6c has its CatchHandler @ 001cefd9 */
std::vector<common_sampler_type,std::allocator<common_sampler_type>>::reserve
((vector<common_sampler_type,std::allocator<common_sampler_type>> *)param_1,in_RSI[1]);
lVar3 = in_RSI[1];
if (lVar3 != 0) {
pcVar4 = (char *)*in_RSI;
do {
/* try { // try from 001cef7e to 001cefb4 has its CatchHandler @ 001cefdb */
lVar2 = std::
_Hashtable<char,std::pair<char_const,common_sampler_type>,std::allocator<std::pair<char_const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<char>,std::hash<char>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>
::find(local_a0,pcVar4);
if (lVar2 != 0) {
puVar1 = *(int4 **)(param_1 + 8);
if (puVar1 == *(int4 **)(param_1 + 0x10)) {
std::vector<common_sampler_type,std::allocator<common_sampler_type>>::
_M_realloc_insert<common_sampler_type_const&>
((vector<common_sampler_type,std::allocator<common_sampler_type>> *)param_1,
puVar1,(int4 *)(lVar2 + 0xc));
}
else {
*puVar1 = *(int4 *)(lVar2 + 0xc);
*(int4 **)(param_1 + 8) = puVar1 + 1;
}
}
pcVar4 = pcVar4 + 1;
lVar3 = lVar3 + -1;
} while (lVar3 != 0);
}
std::
_Hashtable<char,std::pair<char_const,common_sampler_type>,std::allocator<std::pair<char_const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<char>,std::hash<char>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>
::~_Hashtable(local_a0);
return param_1;
}
|
|
57,575
|
string
|
tsotchke[P]eshkol/src/frontend/lexer/lexer.c
|
static Token string(Lexer* lexer) {
// Skip the opening quote
lexer->start++;
// Find the closing quote
while (peek(lexer) != '"' && !is_at_end(lexer)) {
if (peek(lexer) == '\n') {
lexer->line++;
lexer->column = 0;
}
advance(lexer);
}
if (is_at_end(lexer)) {
return error_token(lexer, "Unterminated string.");
}
// Get the string content
size_t length = (size_t)(lexer->current - lexer->start);
// Intern the string
StringId id = string_table_intern_n(lexer->strings, lexer->start, length);
// Skip the closing quote
advance(lexer);
Token token = make_token(lexer, TOKEN_STRING);
token.value.string_id = id;
return token;
}
|
O0
|
c
|
string:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x28(%rbp)
movq %rdi, -0x20(%rbp)
movq %rsi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rdi
callq 0x60a0
movsbl %al, %ecx
xorl %eax, %eax
cmpl $0x22, %ecx
movb %al, -0x29(%rbp)
je 0x5bb8
movq -0x8(%rbp), %rdi
callq 0x5860
xorb $-0x1, %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
testb $0x1, %al
jne 0x5bc1
jmp 0x5bf9
movq -0x8(%rbp), %rdi
callq 0x60a0
movsbl %al, %eax
cmpl $0xa, %eax
jne 0x5bee
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x30(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x38(%rax)
movq -0x8(%rbp), %rdi
callq 0x58e0
jmp 0x5b94
movq -0x8(%rbp), %rdi
callq 0x5860
testb $0x1, %al
jne 0x5c08
jmp 0x5c1e
movq -0x28(%rbp), %rdi
movq -0x8(%rbp), %rsi
leaq 0xb06a(%rip), %rdx # 0x10c81
callq 0x5d00
jmp 0x5c79
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x20(%rcx), %rcx
subq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rsi
movq -0x10(%rbp), %rdx
callq 0x41a0
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x58e0
movq -0x28(%rbp), %rdi
movq -0x8(%rbp), %rsi
movl $0xf, %edx
callq 0x5880
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, 0x28(%rax)
movq -0x20(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
string:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_28], rdi
mov [rbp+var_20], rdi
mov [rbp+var_8], rsi
mov rax, [rbp+var_8]
mov rcx, [rax+20h]
add rcx, 1
mov [rax+20h], rcx
loc_5B94:
mov rdi, [rbp+var_8]
call peek
movsx ecx, al
xor eax, eax
cmp ecx, 22h ; '"'
mov [rbp+var_29], al
jz short loc_5BB8
mov rdi, [rbp+var_8]
call is_at_end
xor al, 0FFh
mov [rbp+var_29], al
loc_5BB8:
mov al, [rbp+var_29]
test al, 1
jnz short loc_5BC1
jmp short loc_5BF9
loc_5BC1:
mov rdi, [rbp+var_8]
call peek
movsx eax, al
cmp eax, 0Ah
jnz short loc_5BEE
mov rax, [rbp+var_8]
mov rcx, [rax+30h]
add rcx, 1
mov [rax+30h], rcx
mov rax, [rbp+var_8]
mov qword ptr [rax+38h], 0
loc_5BEE:
mov rdi, [rbp+var_8]
call advance
jmp short loc_5B94
loc_5BF9:
mov rdi, [rbp+var_8]
call is_at_end
test al, 1
jnz short loc_5C08
jmp short loc_5C1E
loc_5C08:
mov rdi, [rbp+var_28]
mov rsi, [rbp+var_8]
lea rdx, aUnterminatedSt; "Unterminated string."
call error_token
jmp short loc_5C79
loc_5C1E:
mov rax, [rbp+var_8]
mov rax, [rax+28h]
mov rcx, [rbp+var_8]
mov rcx, [rcx+20h]
sub rax, rcx
mov [rbp+var_10], rax
mov rax, [rbp+var_8]
mov rdi, [rax+8]
mov rax, [rbp+var_8]
mov rsi, [rax+20h]
mov rdx, [rbp+var_10]
call string_table_intern_n
mov [rbp+var_18], rax
mov rdi, [rbp+var_8]
call advance
mov rdi, [rbp+var_28]
mov rsi, [rbp+var_8]
mov edx, 0Fh
call make_token
mov rax, [rbp+var_28]
mov rcx, [rbp+var_18]
mov [rax+28h], rcx
loc_5C79:
mov rax, [rbp+var_20]
add rsp, 30h
pop rbp
retn
|
long long string(long long a1, long long a2)
{
char v3; // [rsp+7h] [rbp-29h]
long long v4; // [rsp+18h] [rbp-18h]
++*(_QWORD *)(a2 + 32);
while ( 1 )
{
v3 = 0;
if ( (char)peek(a2) != 34 )
v3 = ~is_at_end(a2);
if ( (v3 & 1) == 0 )
break;
if ( (char)peek(a2) == 10 )
{
++*(_QWORD *)(a2 + 48);
*(_QWORD *)(a2 + 56) = 0LL;
}
advance(a2);
}
if ( is_at_end(a2) )
{
error_token(a1, a2, "Unterminated string.");
}
else
{
v4 = string_table_intern_n(*(long long **)(a2 + 8), *(_QWORD *)(a2 + 32), *(_QWORD *)(a2 + 40) - *(_QWORD *)(a2 + 32));
advance(a2);
make_token(a1, (_QWORD *)a2, 15);
*(_QWORD *)(a1 + 40) = v4;
}
return a1;
}
|
string:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x28],RDI
MOV qword ptr [RBP + -0x20],RDI
MOV qword ptr [RBP + -0x8],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x20]
ADD RCX,0x1
MOV qword ptr [RAX + 0x20],RCX
LAB_00105b94:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001060a0
MOVSX ECX,AL
XOR EAX,EAX
CMP ECX,0x22
MOV byte ptr [RBP + -0x29],AL
JZ 0x00105bb8
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00105860
XOR AL,0xff
MOV byte ptr [RBP + -0x29],AL
LAB_00105bb8:
MOV AL,byte ptr [RBP + -0x29]
TEST AL,0x1
JNZ 0x00105bc1
JMP 0x00105bf9
LAB_00105bc1:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001060a0
MOVSX EAX,AL
CMP EAX,0xa
JNZ 0x00105bee
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x30]
ADD RCX,0x1
MOV qword ptr [RAX + 0x30],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x38],0x0
LAB_00105bee:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001058e0
JMP 0x00105b94
LAB_00105bf9:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00105860
TEST AL,0x1
JNZ 0x00105c08
JMP 0x00105c1e
LAB_00105c08:
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x8]
LEA RDX,[0x110c81]
CALL 0x00105d00
JMP 0x00105c79
LAB_00105c1e:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x28]
MOV RCX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RCX + 0x20]
SUB RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RAX + 0x20]
MOV RDX,qword ptr [RBP + -0x10]
CALL 0x001041a0
MOV qword ptr [RBP + -0x18],RAX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001058e0
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x8]
MOV EDX,0xf
CALL 0x00105880
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x28],RCX
LAB_00105c79:
MOV RAX,qword ptr [RBP + -0x20]
ADD RSP,0x30
POP RBP
RET
|
long string(long param_1,long param_2)
{
char cVar1;
ulong uVar2;
int8 uVar3;
byte local_31;
*(long *)(param_2 + 0x20) = *(long *)(param_2 + 0x20) + 1;
while( true ) {
cVar1 = peek(param_2);
local_31 = 0;
if (cVar1 != '\"') {
local_31 = is_at_end(param_2);
local_31 = local_31 ^ 0xff;
}
if ((local_31 & 1) == 0) break;
cVar1 = peek(param_2);
if (cVar1 == '\n') {
*(long *)(param_2 + 0x30) = *(long *)(param_2 + 0x30) + 1;
*(int8 *)(param_2 + 0x38) = 0;
}
advance(param_2);
}
uVar2 = is_at_end(param_2);
if ((uVar2 & 1) == 0) {
uVar3 = string_table_intern_n
(*(int8 *)(param_2 + 8),*(int8 *)(param_2 + 0x20),
*(long *)(param_2 + 0x28) - *(long *)(param_2 + 0x20));
advance(param_2);
make_token(param_1,param_2,0xf);
*(int8 *)(param_1 + 0x28) = uVar3;
}
else {
error_token(param_1,param_2,"Unterminated string.");
}
return param_1;
}
|
|
57,576
|
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [32], char const*>(char const (&) [32], char const*&&)
|
monkey531[P]llama/common/./json.hpp
|
inline OutStringType concat(Args && ... args)
{
OutStringType str;
str.reserve(concat_length(args...));
concat_into(str, std::forward<Args>(args)...);
return str;
}
|
O2
|
cpp
|
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [32], char const*>(char const (&) [32], char const*&&):
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x4216d
movq %rbx, %rdi
movq %rax, %rsi
callq 0x22bc0
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x85262
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x22f48
movq %r14, %rdi
callq 0x22d30
nop
|
_ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA32_KcPS9_EEET_DpOT0_:
push r15
push r14
push rbx
mov r14, rdx
mov r15, rsi
mov rbx, rdi
lea rax, [rdi+10h]
mov [rdi], rax
and qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
mov rdi, rsi
mov rsi, rdx
call _ZN8nlohmann16json_abi_v3_11_36detail13concat_lengthIJPKcEEEmS4_DpRKT_; nlohmann::json_abi_v3_11_3::detail::concat_length<char const*>(char const*,char const* const&)
mov rdi, rbx
mov rsi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
mov rdi, rbx
mov rsi, r15
mov rdx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail11concat_intoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA32_KcJPS9_ETnNSt9enable_ifIXsr24detect_string_can_appendIT_T0_EE5valueEiE4typeELi0EEEvRSE_OSF_DpOT1_
mov rax, rbx
pop rbx
pop r14
pop r15
retn
mov r14, rax
mov rdi, rbx; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r14
call __Unwind_Resume
|
long long nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[32],char const*>(
long long a1,
long long a2,
_QWORD *a3)
{
long long v4; // rax
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
v4 = nlohmann::json_abi_v3_11_3::detail::concat_length<char const*>(a2, a3);
std::string::reserve(a1, v4);
ZN8nlohmann16json_abi_v3_11_36detail11concat_intoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA32_KcJPS9_ETnNSt9enable_ifIXsr24detect_string_can_appendIT_T0_EE5valueEiE4typeELi0EEEvRSE_OSF_DpOT1_(
a1,
a2,
a3);
return a1;
}
|
concat<std::__cxx11::string,char_const(&)[32],char_const*>:
PUSH R15
PUSH R14
PUSH RBX
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
LEA RAX,[RDI + 0x10]
MOV qword ptr [RDI],RAX
AND qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
MOV RDI,RSI
MOV RSI,RDX
CALL 0x0014216d
LAB_001851f0:
MOV RDI,RBX
MOV RSI,RAX
CALL 0x00122bc0
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
CALL 0x00185262
LAB_00185209:
MOV RAX,RBX
POP RBX
POP R14
POP R15
RET
|
/* std::__cxx11::string nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string, char const
(&) [32], char const*>(char const (&) [32], char const*&&) */
detail * __thiscall
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[32],char_const*>
(detail *this,char *param_1,char **param_2)
{
*(detail **)this = this + 0x10;
*(int8 *)(this + 8) = 0;
this[0x10] = (detail)0x0;
concat_length<char_const*>(param_1,param_2);
/* try { // try from 001851f0 to 00185208 has its CatchHandler @ 00185212 */
std::__cxx11::string::reserve((ulong)this);
_ZN8nlohmann16json_abi_v3_11_36detail11concat_intoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA32_KcJPS9_ETnNSt9enable_ifIXsr24detect_string_can_appendIT_T0_EE5valueEiE4typeELi0EEEvRSE_OSF_DpOT1_
(this,param_1,param_2);
return this;
}
|
|
57,577
|
ft_boolean_check_syntax_string
|
eloqsql/storage/myisam/ft_parser.c
|
my_bool ft_boolean_check_syntax_string(const uchar *str, size_t length,
CHARSET_INFO *cs)
{
uint i, j;
if (cs->mbminlen != 1)
{
DBUG_ASSERT(0);
return 1;
}
if (!str ||
(length + 1 != sizeof(DEFAULT_FTB_SYNTAX)) ||
(str[0] != ' ' && str[1] != ' '))
return 1;
for (i=0; i<sizeof(DEFAULT_FTB_SYNTAX); i++)
{
/* limiting to 7-bit ascii only */
if ((unsigned char)(str[i]) > 127 || my_isalnum(cs, str[i]))
return 1;
for (j=0; j<i; j++)
if (str[i] == str[j] && (i != 11 || j != 10))
return 1;
}
return 0;
}
|
O3
|
c
|
ft_boolean_check_syntax_string:
cmpl $0x1, 0x98(%rdx)
jne 0x734b2
testq %rdi, %rdi
sete %al
cmpq $0xe, %rsi
setne %cl
orb %al, %cl
jne 0x734b2
cmpb $0x20, (%rdi)
je 0x7345a
cmpb $0x20, 0x1(%rdi)
jne 0x734b2
pushq %rbp
movq %rsp, %rbp
xorl %ecx, %ecx
movsbq (%rdi,%rcx), %rax
testq %rax, %rax
js 0x734b5
movq 0x40(%rdx), %rsi
testb $0x7, 0x1(%rsi,%rax)
jne 0x734b5
testq %rcx, %rcx
je 0x734a5
movq %rcx, %rsi
xorq $0xb, %rsi
xorl %r8d, %r8d
movq %r8, %r9
xorq $0xa, %r9
orq %rsi, %r9
setne %r9b
cmpb (%rdi,%r8), %al
jne 0x7349d
testb %r9b, %r9b
jne 0x734b5
incq %r8
cmpq %r8, %rcx
jne 0x73484
incq %rcx
xorl %eax, %eax
cmpq $0xf, %rcx
jne 0x73460
jmp 0x734b7
movb $0x1, %al
retq
movb $0x1, %al
popq %rbp
retq
|
ft_boolean_check_syntax_string:
cmp dword ptr [rdx+98h], 1
jnz short loc_734B2
test rdi, rdi
setz al
cmp rsi, 0Eh
setnz cl
or cl, al
jnz short loc_734B2
cmp byte ptr [rdi], 20h ; ' '
jz short loc_7345A
cmp byte ptr [rdi+1], 20h ; ' '
jnz short loc_734B2
loc_7345A:
push rbp
mov rbp, rsp
xor ecx, ecx
loc_73460:
movsx rax, byte ptr [rdi+rcx]
test rax, rax
js short loc_734B5
mov rsi, [rdx+40h]
test byte ptr [rsi+rax+1], 7
jnz short loc_734B5
test rcx, rcx
jz short loc_734A5
mov rsi, rcx
xor rsi, 0Bh
xor r8d, r8d
loc_73484:
mov r9, r8
xor r9, 0Ah
or r9, rsi
setnz r9b
cmp al, [rdi+r8]
jnz short loc_7349D
test r9b, r9b
jnz short loc_734B5
loc_7349D:
inc r8
cmp rcx, r8
jnz short loc_73484
loc_734A5:
inc rcx
xor eax, eax
cmp rcx, 0Fh
jnz short loc_73460
jmp short loc_734B7
loc_734B2:
mov al, 1
retn
loc_734B5:
mov al, 1
loc_734B7:
pop rbp
retn
|
char ft_boolean_check_syntax_string(_BYTE *a1, long long a2, long long a3)
{
long long v3; // rcx
long long v4; // rax
long long v5; // r8
char result; // al
if ( *(_DWORD *)(a3 + 152) != 1 || a1 == 0LL || a2 != 14 || *a1 != 32 && a1[1] != 32 )
return 1;
v3 = 0LL;
while ( 1 )
{
v4 = (char)a1[v3];
if ( v4 < 0 || (*(_BYTE *)(*(_QWORD *)(a3 + 64) + v4 + 1) & 7) != 0 )
return 1;
if ( v3 )
{
v5 = 0LL;
while ( (_BYTE)v4 != a1[v5] || !(v3 ^ 0xB | v5 ^ 0xA) )
{
if ( v3 == ++v5 )
goto LABEL_13;
}
return 1;
}
LABEL_13:
++v3;
result = 0;
if ( v3 == 15 )
return result;
}
}
|
ft_boolean_check_syntax_string:
CMP dword ptr [RDX + 0x98],0x1
JNZ 0x001734b2
TEST RDI,RDI
SETZ AL
CMP RSI,0xe
SETNZ CL
OR CL,AL
JNZ 0x001734b2
CMP byte ptr [RDI],0x20
JZ 0x0017345a
CMP byte ptr [RDI + 0x1],0x20
JNZ 0x001734b2
LAB_0017345a:
PUSH RBP
MOV RBP,RSP
XOR ECX,ECX
LAB_00173460:
MOVSX RAX,byte ptr [RDI + RCX*0x1]
TEST RAX,RAX
JS 0x001734b5
MOV RSI,qword ptr [RDX + 0x40]
TEST byte ptr [RSI + RAX*0x1 + 0x1],0x7
JNZ 0x001734b5
TEST RCX,RCX
JZ 0x001734a5
MOV RSI,RCX
XOR RSI,0xb
XOR R8D,R8D
LAB_00173484:
MOV R9,R8
XOR R9,0xa
OR R9,RSI
SETNZ R9B
CMP AL,byte ptr [RDI + R8*0x1]
JNZ 0x0017349d
TEST R9B,R9B
JNZ 0x001734b5
LAB_0017349d:
INC R8
CMP RCX,R8
JNZ 0x00173484
LAB_001734a5:
INC RCX
XOR EAX,EAX
CMP RCX,0xf
JNZ 0x00173460
JMP 0x001734b7
LAB_001734b2:
MOV AL,0x1
RET
LAB_001734b5:
MOV AL,0x1
LAB_001734b7:
POP RBP
RET
|
int8 ft_boolean_check_syntax_string(char *param_1,long param_2,long param_3)
{
char cVar1;
long lVar2;
long lVar3;
if (((*(int *)(param_3 + 0x98) == 1) && (param_2 == 0xe && param_1 != (char *)0x0)) &&
((*param_1 == ' ' || (param_1[1] == ' ')))) {
lVar2 = 0;
do {
cVar1 = param_1[lVar2];
if (((long)cVar1 < 0) || ((*(byte *)(*(long *)(param_3 + 0x40) + 1 + (long)cVar1) & 7) != 0))
{
return 1;
}
if (lVar2 != 0) {
lVar3 = 0;
do {
if ((cVar1 == param_1[lVar3]) && (lVar3 != 10 || lVar2 != 0xb)) {
return 1;
}
lVar3 = lVar3 + 1;
} while (lVar2 != lVar3);
}
lVar2 = lVar2 + 1;
if (lVar2 == 0xf) {
return 0;
}
} while( true );
}
return 1;
}
|
|
57,578
|
testing::internal::(anonymous namespace)::UnitTestFilter::UnitTestFilter(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc
|
explicit UnitTestFilter(const std::string& filter) {
// By design "" filter matches "" string.
std::vector<std::string> all_patterns;
SplitString(filter, ':', &all_patterns);
const auto exact_match_patterns_begin = std::partition(
all_patterns.begin(), all_patterns.end(), &IsGlobPattern);
glob_patterns_.reserve(static_cast<size_t>(
std::distance(all_patterns.begin(), exact_match_patterns_begin)));
std::move(all_patterns.begin(), exact_match_patterns_begin,
std::inserter(glob_patterns_, glob_patterns_.begin()));
std::move(
exact_match_patterns_begin, all_patterns.end(),
std::inserter(exact_match_patterns_, exact_match_patterns_.begin()));
}
|
O0
|
cpp
|
testing::internal::(anonymous namespace)::UnitTestFilter::UnitTestFilter(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
subq $0x158, %rsp # imm = 0x158
movq %rdi, 0x150(%rsp)
movq %rsi, 0x148(%rsp)
movq 0x150(%rsp), %rdi
movq %rdi, 0x70(%rsp)
movq %rdi, %rax
movq %rax, 0x68(%rsp)
callq 0x1240e0
movq 0x70(%rsp), %rdi
addq $0x18, %rdi
movq %rdi, 0x78(%rsp)
callq 0x1301a0
leaq 0x130(%rsp), %rdi
movq %rdi, 0x80(%rsp)
callq 0x1240e0
movq 0x80(%rsp), %rdx
movq 0x148(%rsp), %rdi
movl $0x3a, %esi
callq 0xf72c0
jmp 0xffa65
leaq 0x130(%rsp), %rdi
movq %rdi, 0x58(%rsp)
callq 0x125840
movq 0x58(%rsp), %rdi
movq %rax, 0x110(%rsp)
callq 0x1258f0
movq %rax, 0x108(%rsp)
movq 0x110(%rsp), %rdi
movq 0x108(%rsp), %rsi
leaq 0x1e858(%rip), %rdx # 0x11e300
callq 0x1301b0
movq %rax, 0x60(%rsp)
jmp 0xffab4
movq 0x68(%rsp), %rax
movq 0x60(%rsp), %rcx
movq %rcx, 0x118(%rsp)
movq %rax, 0x48(%rsp)
leaq 0x130(%rsp), %rdi
callq 0x125840
movq %rax, 0x100(%rsp)
movq 0x118(%rsp), %rax
movq %rax, 0xf8(%rsp)
movq 0x100(%rsp), %rdi
movq 0xf8(%rsp), %rsi
callq 0x130320
movq %rax, 0x50(%rsp)
jmp 0xffb0c
movq 0x50(%rsp), %rsi
movq 0x48(%rsp), %rdi
callq 0x130210
jmp 0xffb1d
leaq 0x130(%rsp), %rdi
callq 0x125840
movq 0x68(%rsp), %rdi
movq %rax, 0xf0(%rsp)
movq 0x118(%rsp), %rax
movq %rax, 0xe8(%rsp)
callq 0x125840
movq 0x68(%rsp), %rdi
movq %rax, 0xd0(%rsp)
movq 0xd0(%rsp), %rsi
callq 0x1303f0
movq %rdx, 0x38(%rsp)
movq %rax, 0x40(%rsp)
jmp 0xffb72
movq 0x38(%rsp), %rax
movq 0x40(%rsp), %rcx
movq %rcx, 0xd8(%rsp)
movq %rax, 0xe0(%rsp)
movq 0xf0(%rsp), %rdi
movq 0xe8(%rsp), %rsi
movq 0xd8(%rsp), %rdx
movq 0xe0(%rsp), %rcx
callq 0x130360
movq %rdx, 0x28(%rsp)
movq %rax, 0x30(%rsp)
jmp 0xffbbd
movq 0x28(%rsp), %rax
movq 0x30(%rsp), %rcx
movq %rcx, 0xc0(%rsp)
movq %rax, 0xc8(%rsp)
movq 0x118(%rsp), %rax
movq %rax, 0xb8(%rsp)
leaq 0x130(%rsp), %rdi
callq 0x1258f0
movq 0x68(%rsp), %rdi
movq %rax, 0xb0(%rsp)
addq $0x18, %rdi
movq %rdi, 0x10(%rsp)
callq 0x130500
movq 0x10(%rsp), %rdi
movq %rax, 0x98(%rsp)
movq 0x98(%rsp), %rsi
callq 0x1304c0
movq %rdx, 0x18(%rsp)
movq %rax, 0x20(%rsp)
jmp 0xffc35
movq 0x18(%rsp), %rax
movq 0x20(%rsp), %rcx
movq %rcx, 0xa0(%rsp)
movq %rax, 0xa8(%rsp)
movq 0xb8(%rsp), %rdi
movq 0xb0(%rsp), %rsi
movq 0xa0(%rsp), %rdx
movq 0xa8(%rsp), %rcx
callq 0x130430
movq %rdx, (%rsp)
movq %rax, 0x8(%rsp)
jmp 0xffc7f
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
movq %rcx, 0x88(%rsp)
movq %rax, 0x90(%rsp)
leaq 0x130(%rsp), %rdi
callq 0x123ed0
addq $0x158, %rsp # imm = 0x158
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x128(%rsp)
movl %eax, 0x124(%rsp)
leaq 0x130(%rsp), %rdi
callq 0x123ed0
movq 0x78(%rsp), %rdi
callq 0x130530
movq 0x70(%rsp), %rdi
callq 0x123ed0
movq 0x128(%rsp), %rdi
callq 0x15dd0
nop
|
_ZN7testing8internal12_GLOBAL__N_114UnitTestFilterC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
sub rsp, 158h
mov [rsp+158h+var_8], rdi
mov [rsp+158h+var_10], rsi
mov rdi, [rsp+158h+var_8]
mov [rsp+158h+var_E8], rdi
mov rax, rdi
mov [rsp+158h+var_F0], rax
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2Ev; std::vector<std::string>::vector(void)
mov rdi, [rsp+158h+var_E8]
add rdi, 18h
mov [rsp+158h+var_E0], rdi
call _ZNSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EEC2Ev; std::unordered_set<std::string>::unordered_set(void)
lea rdi, [rsp+158h+var_28]
mov [rsp+158h+var_D8], rdi
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2Ev; std::vector<std::string>::vector(void)
mov rdx, [rsp+158h+var_D8]
mov rdi, [rsp+158h+var_10]
mov esi, 3Ah ; ':'
call _ZN7testing8internal11SplitStringERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcPSt6vectorIS6_SaIS6_EE; testing::internal::SplitString(std::string const&,char,std::vector<std::string> *)
jmp short $+2
loc_FFA65:
lea rdi, [rsp+158h+var_28]
mov [rsp+158h+var_100], rdi
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5beginEv; std::vector<std::string>::begin(void)
mov rdi, [rsp+158h+var_100]
mov [rsp+158h+var_48], rax
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE3endEv; std::vector<std::string>::end(void)
mov [rsp+158h+var_50], rax
mov rdi, [rsp+158h+var_48]
mov rsi, [rsp+158h+var_50]
lea rdx, _ZN7testing8internal12_GLOBAL__N_113IsGlobPatternERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::`anonymous namespace'::IsGlobPattern(std::string const&)
call _ZSt9partitionIN9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS7_SaIS7_EEEEPFbRKS7_EET_SH_SH_T0_; std::partition<__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>,bool (*)(std::string const&)>(__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>,__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>,bool (*)(std::string const&))
mov [rsp+158h+var_F8], rax
jmp short $+2
loc_FFAB4:
mov rax, [rsp+158h+var_F0]
mov rcx, [rsp+158h+var_F8]
mov [rsp+158h+var_40], rcx
mov [rsp+158h+var_110], rax
lea rdi, [rsp+158h+var_28]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5beginEv; std::vector<std::string>::begin(void)
mov [rsp+158h+var_58], rax
mov rax, [rsp+158h+var_40]
mov [rsp+158h+var_60], rax
mov rdi, [rsp+158h+var_58]
mov rsi, [rsp+158h+var_60]
call _ZSt8distanceIN9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS7_SaIS7_EEEEENSt15iterator_traitsIT_E15difference_typeESE_SE_; std::distance<__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>>(__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>,__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>)
mov [rsp+158h+var_108], rax
jmp short $+2
loc_FFB0C:
mov rsi, [rsp+158h+var_108]
mov rdi, [rsp+158h+var_110]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE7reserveEm; std::vector<std::string>::reserve(ulong)
jmp short $+2
loc_FFB1D:
lea rdi, [rsp+158h+var_28]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5beginEv; std::vector<std::string>::begin(void)
mov rdi, [rsp+158h+var_F0]
mov [rsp+158h+var_68], rax
mov rax, [rsp+158h+var_40]
mov [rsp+158h+var_70], rax
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5beginEv; std::vector<std::string>::begin(void)
mov rdi, [rsp+158h+var_F0]
mov [rsp+158h+var_88], rax
mov rsi, [rsp+158h+var_88]
call _ZSt8inserterISt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EEESt15insert_iteratorIT_ERSA_DTclsr6ranges13__cust_accessE7__beginclsr3stdE7declvalISC_EEEE
mov [rsp+158h+var_120], rdx
mov [rsp+158h+var_118], rax
jmp short $+2
loc_FFB72:
mov rax, [rsp+158h+var_120]
mov rcx, [rsp+158h+var_118]
mov [rsp+158h+var_80], rcx
mov [rsp+158h+var_78], rax
mov rdi, [rsp+158h+var_68]
mov rsi, [rsp+158h+var_70]
mov rdx, [rsp+158h+var_80]
mov rcx, [rsp+158h+var_78]
call _ZSt4moveIN9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS7_SaIS7_EEEESt15insert_iteratorISB_EET0_T_SG_SF_; std::move<__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>,std::insert_iterator<std::vector<std::string>>>(__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>,__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>,std::insert_iterator<std::vector<std::string>>)
mov [rsp+158h+var_130], rdx
mov [rsp+158h+var_128], rax
jmp short $+2
loc_FFBBD:
mov rax, [rsp+158h+var_130]
mov rcx, [rsp+158h+var_128]
mov [rsp+158h+var_98], rcx
mov [rsp+158h+var_90], rax
mov rax, [rsp+158h+var_40]
mov [rsp+158h+var_A0], rax
lea rdi, [rsp+158h+var_28]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE3endEv; std::vector<std::string>::end(void)
mov rdi, [rsp+158h+var_F0]
mov [rsp+158h+var_A8], rax
add rdi, 18h
mov [rsp+158h+var_148], rdi
call _ZNSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EE5beginEv; std::unordered_set<std::string>::begin(void)
mov rdi, [rsp+158h+var_148]
mov [rsp+158h+var_C0], rax
mov rsi, [rsp+158h+var_C0]
call _ZSt8inserterISt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS6_ESt8equal_toIS6_ESaIS6_EEESt15insert_iteratorIT_ERSE_DTclsr6ranges13__cust_accessE7__beginclsr3stdE7declvalISG_EEEE
mov [rsp+158h+var_140], rdx
mov [rsp+158h+var_138], rax
jmp short $+2
loc_FFC35:
mov rax, [rsp+158h+var_140]
mov rcx, [rsp+158h+var_138]
mov [rsp+158h+var_B8], rcx
mov [rsp+158h+var_B0], rax
mov rdi, [rsp+158h+var_A0]
mov rsi, [rsp+158h+var_A8]
mov rdx, [rsp+158h+var_B8]
mov rcx, [rsp+158h+var_B0]
call _ZSt4moveIN9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS7_SaIS7_EEEESt15insert_iteratorISt13unordered_setIS7_St4hashIS7_ESt8equal_toIS7_ESA_EEET0_T_SM_SL_; std::move<__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>,std::insert_iterator<std::unordered_set<std::string>>>(__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>,__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>,std::insert_iterator<std::unordered_set<std::string>>)
mov [rsp+158h+var_158], rdx
mov [rsp+158h+var_150], rax
jmp short $+2
loc_FFC7F:
mov rax, [rsp+158h+var_158]
mov rcx, [rsp+158h+var_150]
mov [rsp+158h+var_D0], rcx
mov [rsp+158h+var_C8], rax
lea rdi, [rsp+158h+var_28]; void *
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
add rsp, 158h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_120], rcx
mov [rsp+arg_11C], eax
lea rdi, [rsp+arg_128]; void *
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, [rsp+arg_70]
call _ZNSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EED2Ev; std::unordered_set<std::string>::~unordered_set()
mov rdi, [rsp+arg_68]; void *
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, [rsp+arg_120]
call __Unwind_Resume
|
void testing::internal::`anonymous namespace'::UnitTestFilter::UnitTestFilter(long long a1, long long a2)
{
long long v2; // rax
long long v3; // rdx
long long v4; // rax
long long v5; // rdx
long long v6; // [rsp+50h] [rbp-108h]
long long v7; // [rsp+98h] [rbp-C0h]
long long v8; // [rsp+B0h] [rbp-A8h]
long long v9; // [rsp+D0h] [rbp-88h]
long long v10; // [rsp+F0h] [rbp-68h]
long long v11; // [rsp+100h] [rbp-58h]
long long v12; // [rsp+108h] [rbp-50h]
long long v13; // [rsp+110h] [rbp-48h]
long long v14; // [rsp+118h] [rbp-40h]
_BYTE v15[24]; // [rsp+130h] [rbp-28h] BYREF
long long v16; // [rsp+148h] [rbp-10h]
long long v17; // [rsp+150h] [rbp-8h]
v17 = a1;
v16 = a2;
std::vector<std::string>::vector(a1);
std::unordered_set<std::string>::unordered_set();
std::vector<std::string>::vector(v15);
testing::internal::SplitString(v16, 58, (long long)v15);
v13 = std::vector<std::string>::begin(v15);
v12 = std::vector<std::string>::end(v15);
v14 = std::partition<__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>,bool (*)(std::string const&)>(
v13,
v12,
testing::internal::`anonymous namespace'::IsGlobPattern);
v11 = std::vector<std::string>::begin(v15);
v6 = std::distance<__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>>(v11, v14);
std::vector<std::string>::reserve(a1, v6);
v10 = std::vector<std::string>::begin(v15);
v9 = std::vector<std::string>::begin(a1);
v2 = std::inserter<std::vector<std::string>>(a1, v9);
std::move<__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>,std::insert_iterator<std::vector<std::string>>>(
v10,
v14,
v2,
v3);
v8 = std::vector<std::string>::end(v15);
v7 = std::unordered_set<std::string>::begin();
v4 = std::inserter<std::unordered_set<std::string>>(a1 + 24, v7);
std::move<__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>,std::insert_iterator<std::unordered_set<std::string>>>(
v14,
v8,
v4,
v5);
std::vector<std::string>::~vector(v15);
}
|
UnitTestFilter:
SUB RSP,0x158
MOV qword ptr [RSP + 0x150],RDI
MOV qword ptr [RSP + 0x148],RSI
MOV RDI,qword ptr [RSP + 0x150]
MOV qword ptr [RSP + 0x70],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x68],RAX
CALL 0x002240e0
MOV RDI,qword ptr [RSP + 0x70]
ADD RDI,0x18
MOV qword ptr [RSP + 0x78],RDI
CALL 0x002301a0
LEA RDI,[RSP + 0x130]
MOV qword ptr [RSP + 0x80],RDI
CALL 0x002240e0
MOV RDX,qword ptr [RSP + 0x80]
MOV RDI,qword ptr [RSP + 0x148]
LAB_001ffa59:
MOV ESI,0x3a
CALL 0x001f72c0
JMP 0x001ffa65
LAB_001ffa65:
LEA RDI,[RSP + 0x130]
MOV qword ptr [RSP + 0x58],RDI
CALL 0x00225840
MOV RDI,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x110],RAX
CALL 0x002258f0
MOV qword ptr [RSP + 0x108],RAX
MOV RDI,qword ptr [RSP + 0x110]
MOV RSI,qword ptr [RSP + 0x108]
LEA RDX,[0x21e300]
CALL 0x002301b0
MOV qword ptr [RSP + 0x60],RAX
JMP 0x001ffab4
LAB_001ffab4:
MOV RAX,qword ptr [RSP + 0x68]
MOV RCX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x118],RCX
MOV qword ptr [RSP + 0x48],RAX
LEA RDI,[RSP + 0x130]
CALL 0x00225840
MOV qword ptr [RSP + 0x100],RAX
MOV RAX,qword ptr [RSP + 0x118]
MOV qword ptr [RSP + 0xf8],RAX
MOV RDI,qword ptr [RSP + 0x100]
MOV RSI,qword ptr [RSP + 0xf8]
CALL 0x00230320
MOV qword ptr [RSP + 0x50],RAX
JMP 0x001ffb0c
LAB_001ffb0c:
MOV RSI,qword ptr [RSP + 0x50]
MOV RDI,qword ptr [RSP + 0x48]
CALL 0x00230210
JMP 0x001ffb1d
LAB_001ffb1d:
LEA RDI,[RSP + 0x130]
CALL 0x00225840
MOV RDI,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0xf0],RAX
MOV RAX,qword ptr [RSP + 0x118]
MOV qword ptr [RSP + 0xe8],RAX
CALL 0x00225840
MOV RDI,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0xd0],RAX
MOV RSI,qword ptr [RSP + 0xd0]
CALL 0x002303f0
MOV qword ptr [RSP + 0x38],RDX
MOV qword ptr [RSP + 0x40],RAX
JMP 0x001ffb72
LAB_001ffb72:
MOV RAX,qword ptr [RSP + 0x38]
MOV RCX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0xd8],RCX
MOV qword ptr [RSP + 0xe0],RAX
MOV RDI,qword ptr [RSP + 0xf0]
MOV RSI,qword ptr [RSP + 0xe8]
MOV RDX,qword ptr [RSP + 0xd8]
MOV RCX,qword ptr [RSP + 0xe0]
CALL 0x00230360
MOV qword ptr [RSP + 0x28],RDX
MOV qword ptr [RSP + 0x30],RAX
JMP 0x001ffbbd
LAB_001ffbbd:
MOV RAX,qword ptr [RSP + 0x28]
MOV RCX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0xc0],RCX
MOV qword ptr [RSP + 0xc8],RAX
MOV RAX,qword ptr [RSP + 0x118]
MOV qword ptr [RSP + 0xb8],RAX
LEA RDI,[RSP + 0x130]
CALL 0x002258f0
MOV RDI,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0xb0],RAX
ADD RDI,0x18
MOV qword ptr [RSP + 0x10],RDI
CALL 0x00230500
MOV RDI,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x98],RAX
MOV RSI,qword ptr [RSP + 0x98]
CALL 0x002304c0
MOV qword ptr [RSP + 0x18],RDX
MOV qword ptr [RSP + 0x20],RAX
JMP 0x001ffc35
LAB_001ffc35:
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0xa0],RCX
MOV qword ptr [RSP + 0xa8],RAX
MOV RDI,qword ptr [RSP + 0xb8]
MOV RSI,qword ptr [RSP + 0xb0]
MOV RDX,qword ptr [RSP + 0xa0]
MOV RCX,qword ptr [RSP + 0xa8]
CALL 0x00230430
LAB_001ffc74:
MOV qword ptr [RSP],RDX
MOV qword ptr [RSP + 0x8],RAX
JMP 0x001ffc7f
LAB_001ffc7f:
MOV RAX,qword ptr [RSP]
MOV RCX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x88],RCX
MOV qword ptr [RSP + 0x90],RAX
LEA RDI,[RSP + 0x130]
CALL 0x00223ed0
ADD RSP,0x158
RET
|
/* testing::internal::(anonymous namespace)::UnitTestFilter::UnitTestFilter(std::__cxx11::string
const&) */
void __thiscall
testing::internal::(anonymous_namespace)::UnitTestFilter::UnitTestFilter
(UnitTestFilter *this,string *param_1)
{
int8 uVar1;
int8 uVar2;
ulong uVar3;
int8 uVar4;
int1 auVar5 [16];
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_28 [24];
string *local_10;
UnitTestFilter *local_8;
local_10 = param_1;
local_8 = this;
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)this);
std::
unordered_set<std::__cxx11::string,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
::unordered_set((unordered_set<std::__cxx11::string,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
*)(this + 0x18));
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector(local_28);
/* try { // try from 001ffa59 to 001ffc73 has its CatchHandler @ 001ffcad */
SplitString(local_10,':',(vector *)local_28);
uVar1 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::begin(local_28);
uVar2 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::end(local_28);
uVar1 = std::
partition<__gnu_cxx::__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>,bool(*)(std::__cxx11::string_const&)>
(uVar1,uVar2,IsGlobPattern);
uVar2 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::begin(local_28);
uVar3 = std::
distance<__gnu_cxx::__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>>
(uVar2,uVar1);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::reserve
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)this,uVar3);
uVar2 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::begin(local_28);
uVar4 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::begin
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)this);
auVar5 = _ZSt8inserterISt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EEESt15insert_iteratorIT_ERSA_DTclsr6ranges13__cust_accessE7__beginclsr3stdE7declvalISC_EEEE
(this,uVar4);
std::
move<__gnu_cxx::__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>,std::insert_iterator<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>>
(uVar2,uVar1,auVar5._0_8_,auVar5._8_8_);
uVar2 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::end(local_28);
uVar4 = std::
unordered_set<std::__cxx11::string,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
::begin((unordered_set<std::__cxx11::string,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
*)(this + 0x18));
auVar5 = _ZSt8inserterISt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS6_ESt8equal_toIS6_ESaIS6_EEESt15insert_iteratorIT_ERSE_DTclsr6ranges13__cust_accessE7__beginclsr3stdE7declvalISG_EEEE
((unordered_set<std::__cxx11::string,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
*)(this + 0x18),uVar4);
std::
move<__gnu_cxx::__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>,std::insert_iterator<std::unordered_set<std::__cxx11::string,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::__cxx11::string>>>>
(uVar1,uVar2,auVar5._0_8_,auVar5._8_8_);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_28);
return;
}
|
|
57,579
|
server_context::send_embedding(server_slot const&, llama_batch const&)
|
monkey531[P]llama/examples/server/server.cpp
|
void send_embedding(const server_slot & slot, const llama_batch & batch) {
auto res = std::make_unique<server_task_result_embd>();
res->id = slot.id_task;
res->index = slot.index;
res->n_tokens = slot.n_prompt_tokens;
res->oaicompat = slot.params.oaicompat;
const int n_embd = llama_model_n_embd(model);
std::vector<float> embd_res(n_embd, 0.0f);
for (int i = 0; i < batch.n_tokens; ++i) {
if (!batch.logits[i] || batch.seq_id[i][0] != slot.id) {
continue;
}
const float * embd = llama_get_embeddings_seq(ctx, batch.seq_id[i][0]);
if (embd == NULL) {
embd = llama_get_embeddings_ith(ctx, i);
}
if (embd == NULL) {
SLT_ERR(slot, "failed to get embeddings, token = %d, seq_id = %d\n", batch.token[i], batch.seq_id[i][0]);
res->embedding.push_back(std::vector<float>(n_embd, 0.0f));
continue;
}
// normalize only when there is pooling
// TODO: configurable
if (llama_pooling_type(slot.ctx) != LLAMA_POOLING_TYPE_NONE) {
common_embd_normalize(embd, embd_res.data(), n_embd, 2);
res->embedding.push_back(embd_res);
} else {
res->embedding.push_back({ embd, embd + n_embd });
}
}
SLT_DBG(slot, "%s", "sending embeddings\n");
queue_results.send(std::move(res));
}
|
O2
|
cpp
|
server_context::send_embedding(server_slot const&, llama_batch const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq %rsp, %r12
movq %r12, %rdi
callq 0x886d4
movl 0x4(%r14), %eax
movq (%r12), %rcx
movl %eax, 0x8(%rcx)
movl 0x78(%r14), %eax
movl %eax, 0x10(%rcx)
movl 0x780(%r14), %eax
movl %eax, 0x30(%rcx)
movl 0x70c(%r14), %eax
movl %eax, 0x34(%rcx)
movq 0x1338(%rbx), %rdi
callq 0x282f0
movl %eax, %r13d
movslq %eax, %rsi
leaq 0x20(%rsp), %rdx
andl $0x0, (%rdx)
leaq 0x40(%rsp), %rdi
leaq 0xc(%rsp), %rcx
movq %rsi, 0x18(%rsp)
callq 0x88710
xorl %r12d, %r12d
movl %r13d, 0x14(%rsp)
movq %r14, 0x38(%rsp)
movslq (%r15), %rax
cmpq %rax, %r12
jge 0x8205a
movq 0x30(%r15), %rax
cmpb $0x0, (%rax,%r12)
je 0x82052
movq 0x28(%r15), %rax
movq (%rax,%r12,8), %rax
movl (%rax), %esi
cmpl (%r14), %esi
jne 0x82052
movq 0x1340(%rbx), %rdi
callq 0x281d0
movq %rax, %rbp
testq %rax, %rax
jne 0x81f2e
movq 0x1340(%rbx), %rdi
movl %r12d, %esi
callq 0x28780
movq %rax, %rbp
testq %rax, %rax
je 0x81fba
movq 0x48(%r14), %rdi
callq 0x28ee0
testl %eax, %eax
je 0x81f65
movq 0x40(%rsp), %rsi
movq %rbp, %rdi
movl %r13d, %edx
pushq $0x2
popq %rcx
callq 0xc4c78
movq (%rsp), %rdi
addq $0x18, %rdi
leaq 0x40(%rsp), %rsi
callq 0x88766
jmp 0x82052
movq %rbx, %r14
movq (%rsp), %r13
movq 0x18(%rsp), %rax
leaq (,%rax,4), %rdx
addq %rbp, %rdx
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
movq %rbp, %rsi
leaq 0xc(%rsp), %rcx
callq 0x88792
addq $0x18, %r13
movq %r13, %rdi
movq %rbx, %rsi
callq 0x89188
movq %rbx, %rdi
callq 0x7c4b0
movl 0x14(%rsp), %r13d
movq %r14, %rbx
movq 0x38(%rsp), %r14
jmp 0x82052
leaq 0x20ffd7(%rip), %rax # 0x291f98
cmpl $0x0, (%rax)
js 0x82011
callq 0xeb6fe
movl (%r14), %r9d
movl 0x4(%r14), %r10d
movq 0x8(%r15), %rcx
movq 0x28(%r15), %rdx
movl (%rcx,%r12,4), %r11d
movq (%rdx,%r12,8), %rcx
movl (%rcx), %r13d
subq $0x8, %rsp
movq %rax, %rdi
pushq $0x4
popq %rsi
leaq 0x7592c(%rip), %rdx # 0xf7922
pushq $0xc
popq %rcx
leaq 0x75975(%rip), %r8 # 0xf7975
xorl %eax, %eax
pushq %r13
pushq %r11
pushq %r10
callq 0xeb796
addq $0x20, %rsp
movq (%rsp), %r13
andl $0x0, 0xc(%rsp)
leaq 0x20(%rsp), %rbp
movq %rbp, %rdi
movq 0x18(%rsp), %rsi
leaq 0xc(%rsp), %rdx
leaq 0x13(%rsp), %rcx
callq 0x88710
addq $0x18, %r13
movq %r13, %rdi
movq %rbp, %rsi
callq 0x89188
movq %rbp, %rdi
callq 0x7c4b0
movl 0x14(%rsp), %r13d
incq %r12
jmp 0x81ed1
leaq 0x20ff37(%rip), %rax # 0x291f98
cmpl $0x0, (%rax)
jle 0x8209d
callq 0xeb6fe
movl (%r14), %r9d
movl 0x4(%r14), %r10d
leaq 0x7590b(%rip), %r11 # 0xf7984
leaq 0x70b17(%rip), %rdx # 0xf2b97
leaq 0x758ee(%rip), %r8 # 0xf7975
pushq $0x1
popq %rsi
pushq $0xc
popq %rcx
movq %rax, %rdi
xorl %eax, %eax
pushq %r11
pushq %r10
callq 0xeb796
popq %rax
popq %rcx
movq (%rsp), %rax
andq $0x0, (%rsp)
addq $0x1578, %rbx # imm = 0x1578
leaq 0x20(%rsp), %rsi
movq %rax, (%rsi)
movq %rbx, %rdi
callq 0x7e10c
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x820cd
movq (%rdi), %rax
callq *0x28(%rax)
leaq 0x40(%rsp), %rdi
callq 0x7c4b0
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x820e6
movq (%rdi), %rax
callq *0x28(%rax)
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x8212b
movq (%rdi), %rax
callq *0x28(%rax)
jmp 0x8212b
jmp 0x8210c
movq %rax, %rbx
jmp 0x82135
jmp 0x82128
jmp 0x82117
jmp 0x82128
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x7c4b0
jmp 0x8212b
jmp 0x82128
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x7c4b0
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x82144
movq (%rdi), %rax
callq *0x28(%rax)
movq %rbx, %rdi
callq 0x293c0
|
_ZN14server_context14send_embeddingERK11server_slotRK11llama_batch:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov r15, rdx
mov r14, rsi
mov rbx, rdi
mov r12, rsp
mov rdi, r12
call _ZSt11make_uniqueI23server_task_result_embdJEENSt9_MakeUniqIT_E15__single_objectEDpOT0_; std::make_unique<server_task_result_embd>()
mov eax, [r14+4]
mov rcx, [r12]
mov [rcx+8], eax
mov eax, [r14+78h]
mov [rcx+10h], eax
mov eax, [r14+780h]
mov [rcx+30h], eax
mov eax, [r14+70Ch]
mov [rcx+34h], eax
mov rdi, [rbx+1338h]
call _llama_model_n_embd
mov r13d, eax
movsxd rsi, eax
lea rdx, [rsp+88h+var_68]
and dword ptr [rdx], 0
lea rdi, [rsp+88h+var_48]
lea rcx, [rsp+88h+var_7C]
mov [rsp+88h+var_70], rsi
call _ZNSt6vectorIfSaIfEEC2EmRKfRKS0_; std::vector<float>::vector(ulong,float const&,std::allocator<float> const&)
xor r12d, r12d
mov [rsp+88h+var_74], r13d
mov [rsp+88h+var_50], r14
loc_81ED1:
movsxd rax, dword ptr [r15]
cmp r12, rax
jge loc_8205A
mov rax, [r15+30h]
cmp byte ptr [rax+r12], 0
jz loc_82052
mov rax, [r15+28h]
mov rax, [rax+r12*8]
mov esi, [rax]
cmp esi, [r14]
jnz loc_82052
mov rdi, [rbx+1340h]
call _llama_get_embeddings_seq
mov rbp, rax
test rax, rax
jnz short loc_81F2E
mov rdi, [rbx+1340h]
mov esi, r12d
call _llama_get_embeddings_ith
mov rbp, rax
test rax, rax
jz loc_81FBA
loc_81F2E:
mov rdi, [r14+48h]
call _llama_pooling_type
test eax, eax
jz short loc_81F65
mov rsi, [rsp+88h+var_48]; float *
mov rdi, rbp; float *
mov edx, r13d; int
push 2
pop rcx; int
call _Z21common_embd_normalizePKfPfii; common_embd_normalize(float const*,float *,int,int)
mov rdi, [rsp+88h+var_88]
add rdi, 18h
lea rsi, [rsp+88h+var_48]
call _ZNSt6vectorIS_IfSaIfEESaIS1_EE9push_backERKS1_; std::vector<std::vector<float>>::push_back(std::vector<float> const&)
jmp loc_82052
loc_81F65:
mov r14, rbx
mov r13, [rsp+88h+var_88]
mov rax, [rsp+88h+var_70]
lea rdx, ds:0[rax*4]
add rdx, rbp
lea rbx, [rsp+88h+var_68]
mov rdi, rbx
mov rsi, rbp
lea rcx, [rsp+88h+var_7C]
call _ZNSt6vectorIfSaIfEEC2IPKfvEET_S5_RKS0_; std::vector<float>::vector<float const*,void>(float const*,float const*,std::allocator<float> const&)
add r13, 18h
mov rdi, r13
mov rsi, rbx
call _ZNSt6vectorIS_IfSaIfEESaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<std::vector<float>>::emplace_back<std::vector<float>>(std::vector<float> &&)
mov rdi, rbx
call _ZNSt12_Vector_baseIfSaIfEED2Ev; std::_Vector_base<float>::~_Vector_base()
mov r13d, [rsp+88h+var_74]
mov rbx, r14
mov r14, [rsp+88h+var_50]
jmp loc_82052
loc_81FBA:
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js short loc_82011
call _Z15common_log_mainv; common_log_main(void)
mov r9d, [r14]
mov r10d, [r14+4]
mov rcx, [r15+8]
mov rdx, [r15+28h]
mov r11d, [rcx+r12*4]
mov rcx, [rdx+r12*8]
mov r13d, [rcx]
sub rsp, 8
mov rdi, rax
push 4
pop rsi
lea rdx, aSlot12SId2dTas_24; "slot %12.*s: id %2d | task %d | failed "...
push 0Ch
pop rcx
lea r8, aSendEmbedding; "send_embedding"
xor eax, eax
push r13
push r11
push r10
call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...)
add rsp, 20h
loc_82011:
mov r13, [rsp+88h+var_88]
and [rsp+88h+var_7C], 0
lea rbp, [rsp+88h+var_68]
mov rdi, rbp
mov rsi, [rsp+88h+var_70]
lea rdx, [rsp+88h+var_7C]
lea rcx, [rsp+88h+var_75]
call _ZNSt6vectorIfSaIfEEC2EmRKfRKS0_; std::vector<float>::vector(ulong,float const&,std::allocator<float> const&)
add r13, 18h
mov rdi, r13
mov rsi, rbp
call _ZNSt6vectorIS_IfSaIfEESaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<std::vector<float>>::emplace_back<std::vector<float>>(std::vector<float> &&)
mov rdi, rbp
call _ZNSt12_Vector_baseIfSaIfEED2Ev; std::_Vector_base<float>::~_Vector_base()
mov r13d, [rsp+88h+var_74]
loc_82052:
inc r12
jmp loc_81ED1
loc_8205A:
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
jle short loc_8209D
call _Z15common_log_mainv; common_log_main(void)
mov r9d, [r14]
mov r10d, [r14+4]
lea r11, aSendingEmbeddi; "sending embeddings\n"
lea rdx, aSlot12SId2dTas_0; "slot %12.*s: id %2d | task %d | %s"
lea r8, aSendEmbedding; "send_embedding"
push 1
pop rsi
push 0Ch
pop rcx
mov rdi, rax
xor eax, eax
push r11
push r10
call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...)
pop rax
pop rcx
loc_8209D:
mov rax, [rsp+88h+var_88]
and [rsp+88h+var_88], 0
add rbx, 1578h
lea rsi, [rsp+88h+var_68]
mov [rsi], rax
mov rdi, rbx
call _ZN15server_response4sendEOSt10unique_ptrI18server_task_resultSt14default_deleteIS1_EE; server_response::send(std::unique_ptr<server_task_result> &&)
mov rdi, [rsp+88h+var_68]
test rdi, rdi
jz short loc_820CD
mov rax, [rdi]
call qword ptr [rax+28h]
loc_820CD:
lea rdi, [rsp+88h+var_48]
call _ZNSt12_Vector_baseIfSaIfEED2Ev; std::_Vector_base<float>::~_Vector_base()
mov rdi, [rsp+88h+var_88]
test rdi, rdi
jz short loc_820E6
mov rax, [rdi]
call qword ptr [rax+28h]
loc_820E6:
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, [rsp+arg_18]
test rdi, rdi
jz short loc_8212B
mov rax, [rdi]
call qword ptr [rax+28h]
jmp short loc_8212B
jmp short $+2
loc_8210C:
mov rbx, rax
jmp short loc_82135
jmp short loc_82128
jmp short loc_82117
jmp short loc_82128
loc_82117:
mov rbx, rax
lea rdi, [rsp+arg_18]
call _ZNSt12_Vector_baseIfSaIfEED2Ev; std::_Vector_base<float>::~_Vector_base()
jmp short loc_8212B
jmp short $+2
loc_82128:
mov rbx, rax
loc_8212B:
lea rdi, [rsp+arg_38]
call _ZNSt12_Vector_baseIfSaIfEED2Ev; std::_Vector_base<float>::~_Vector_base()
loc_82135:
mov rdi, [rsp+0]
test rdi, rdi
jz short loc_82144
mov rax, [rdi]
call qword ptr [rax+28h]
loc_82144:
mov rdi, rbx
call __Unwind_Resume
|
long long * server_context::send_embedding(long long a1, _DWORD *a2, int *a3)
{
_DWORD *v4; // r14
_DWORD *v5; // rcx
int v6; // r13d
long long v7; // r12
const float *embeddings_seq; // rbp
_DWORD *v9; // r13
int v10; // eax
_DWORD *v11; // r13
int v12; // eax
_DWORD *v13; // rax
long long *result; // rax
_DWORD *v15; // [rsp+0h] [rbp-88h] BYREF
int v16; // [rsp+Ch] [rbp-7Ch] BYREF
char v17; // [rsp+13h] [rbp-75h] BYREF
int v18; // [rsp+14h] [rbp-74h]
long long v19; // [rsp+18h] [rbp-70h]
_QWORD v20[3]; // [rsp+20h] [rbp-68h] BYREF
_DWORD *v21; // [rsp+38h] [rbp-50h]
float *v22[9]; // [rsp+40h] [rbp-48h] BYREF
v4 = a2;
std::make_unique<server_task_result_embd>(&v15);
v5 = v15;
v15[2] = a2[1];
v5[4] = a2[30];
v5[12] = a2[480];
v5[13] = a2[451];
v6 = llama_model_n_embd(*(_QWORD *)(a1 + 4920), a2);
LODWORD(v20[0]) = 0;
v19 = v6;
std::vector<float>::vector(v22, v6, v20, &v16);
v7 = 0LL;
v18 = v6;
v21 = a2;
while ( v7 < *a3 )
{
if ( *(_BYTE *)(*((_QWORD *)a3 + 6) + v7) && **(_DWORD **)(*((_QWORD *)a3 + 5) + 8 * v7) == *v4 )
{
embeddings_seq = (const float *)llama_get_embeddings_seq(*(_QWORD *)(a1 + 4928));
if ( embeddings_seq
|| (embeddings_seq = (const float *)llama_get_embeddings_ith(*(_QWORD *)(a1 + 4928), (unsigned int)v7)) != 0LL )
{
if ( (unsigned int)llama_pooling_type(*((_QWORD *)v4 + 9)) )
{
common_embd_normalize(embeddings_seq, v22[0], v6, 2);
std::vector<std::vector<float>>::push_back(v15 + 6, v22);
}
else
{
v9 = v15;
std::vector<float>::vector<float const*,void>(v20, embeddings_seq, &embeddings_seq[v19], &v16);
std::vector<std::vector<float>>::emplace_back<std::vector<float>>(v9 + 6, v20);
std::_Vector_base<float>::~_Vector_base((long long)v20);
v6 = v18;
v4 = v21;
}
}
else
{
if ( common_log_verbosity_thold >= 0 )
{
v10 = common_log_main();
common_log_add(
v10,
4,
(unsigned int)"slot %12.*s: id %2d | task %d | failed to get embeddings, token = %d, seq_id = %d\n",
12,
(unsigned int)"send_embedding",
*v4);
}
v11 = v15;
v16 = 0;
std::vector<float>::vector(v20, v19, &v16, &v17);
std::vector<std::vector<float>>::emplace_back<std::vector<float>>(v11 + 6, v20);
std::_Vector_base<float>::~_Vector_base((long long)v20);
v6 = v18;
}
}
++v7;
}
if ( common_log_verbosity_thold > 0 )
{
v12 = common_log_main();
common_log_add(v12, 1, (unsigned int)"slot %12.*s: id %2d | task %d | %s", 12, (unsigned int)"send_embedding", *v4);
}
v13 = v15;
v15 = 0LL;
v20[0] = v13;
result = server_response::send(a1 + 5496, (long long)v20);
if ( v20[0] )
result = (long long *)(*(long long ( **)(_QWORD))(*(_QWORD *)v20[0] + 40LL))(v20[0]);
std::_Vector_base<float>::~_Vector_base((long long)v22);
if ( v15 )
return (long long *)(*(long long ( **)(_DWORD *))(*(_QWORD *)v15 + 40LL))(v15);
return result;
}
|
send_embedding:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV R15,RDX
MOV R14,RSI
MOV RBX,RDI
MOV R12,RSP
MOV RDI,R12
CALL 0x001886d4
MOV EAX,dword ptr [R14 + 0x4]
MOV RCX,qword ptr [R12]
MOV dword ptr [RCX + 0x8],EAX
MOV EAX,dword ptr [R14 + 0x78]
MOV dword ptr [RCX + 0x10],EAX
MOV EAX,dword ptr [R14 + 0x780]
MOV dword ptr [RCX + 0x30],EAX
MOV EAX,dword ptr [R14 + 0x70c]
MOV dword ptr [RCX + 0x34],EAX
MOV RDI,qword ptr [RBX + 0x1338]
LAB_00181e9d:
CALL 0x001282f0
MOV R13D,EAX
MOVSXD RSI,EAX
LEA RDX,[RSP + 0x20]
AND dword ptr [RDX],0x0
LAB_00181eb0:
LEA RDI,[RSP + 0x40]
LEA RCX,[RSP + 0xc]
MOV qword ptr [RSP + 0x18],RSI
CALL 0x00188710
XOR R12D,R12D
MOV dword ptr [RSP + 0x14],R13D
MOV qword ptr [RSP + 0x38],R14
LAB_00181ed1:
MOVSXD RAX,dword ptr [R15]
CMP R12,RAX
JGE 0x0018205a
MOV RAX,qword ptr [R15 + 0x30]
CMP byte ptr [RAX + R12*0x1],0x0
JZ 0x00182052
MOV RAX,qword ptr [R15 + 0x28]
MOV RAX,qword ptr [RAX + R12*0x8]
MOV ESI,dword ptr [RAX]
CMP ESI,dword ptr [R14]
JNZ 0x00182052
MOV RDI,qword ptr [RBX + 0x1340]
LAB_00181f06:
CALL 0x001281d0
MOV RBP,RAX
TEST RAX,RAX
JNZ 0x00181f2e
MOV RDI,qword ptr [RBX + 0x1340]
MOV ESI,R12D
CALL 0x00128780
MOV RBP,RAX
TEST RAX,RAX
JZ 0x00181fba
LAB_00181f2e:
MOV RDI,qword ptr [R14 + 0x48]
CALL 0x00128ee0
TEST EAX,EAX
JZ 0x00181f65
MOV RSI,qword ptr [RSP + 0x40]
MOV RDI,RBP
MOV EDX,R13D
PUSH 0x2
POP RCX
CALL 0x001c4c78
MOV RDI,qword ptr [RSP]
ADD RDI,0x18
LEA RSI,[RSP + 0x40]
CALL 0x00188766
JMP 0x00182052
LAB_00181f65:
MOV R14,RBX
MOV R13,qword ptr [RSP]
MOV RAX,qword ptr [RSP + 0x18]
LEA RDX,[RAX*0x4]
ADD RDX,RBP
LAB_00181f7c:
LEA RBX,[RSP + 0x20]
MOV RDI,RBX
MOV RSI,RBP
LEA RCX,[RSP + 0xc]
CALL 0x00188792
ADD R13,0x18
LAB_00181f95:
MOV RDI,R13
MOV RSI,RBX
CALL 0x00189188
MOV RDI,RBX
CALL 0x0017c4b0
MOV R13D,dword ptr [RSP + 0x14]
MOV RBX,R14
MOV R14,qword ptr [RSP + 0x38]
JMP 0x00182052
LAB_00181fba:
LEA RAX,[0x391f98]
CMP dword ptr [RAX],0x0
JS 0x00182011
LAB_00181fc6:
CALL 0x001eb6fe
MOV R9D,dword ptr [R14]
MOV R10D,dword ptr [R14 + 0x4]
MOV RCX,qword ptr [R15 + 0x8]
MOV RDX,qword ptr [R15 + 0x28]
MOV R11D,dword ptr [RCX + R12*0x4]
MOV RCX,qword ptr [RDX + R12*0x8]
MOV R13D,dword ptr [RCX]
SUB RSP,0x8
MOV RDI,RAX
PUSH 0x4
POP RSI
LEA RDX,[0x1f7922]
PUSH 0xc
POP RCX
LEA R8,[0x1f7975]
XOR EAX,EAX
PUSH R13
PUSH R11
PUSH R10
CALL 0x001eb796
ADD RSP,0x20
LAB_00182011:
MOV R13,qword ptr [RSP]
AND dword ptr [RSP + 0xc],0x0
LAB_0018201a:
LEA RBP,[RSP + 0x20]
MOV RDI,RBP
MOV RSI,qword ptr [RSP + 0x18]
LEA RDX,[RSP + 0xc]
LEA RCX,[RSP + 0x13]
CALL 0x00188710
ADD R13,0x18
LAB_0018203a:
MOV RDI,R13
MOV RSI,RBP
CALL 0x00189188
MOV RDI,RBP
CALL 0x0017c4b0
MOV R13D,dword ptr [RSP + 0x14]
LAB_00182052:
INC R12
JMP 0x00181ed1
LAB_0018205a:
LEA RAX,[0x391f98]
CMP dword ptr [RAX],0x0
JLE 0x0018209d
LAB_00182066:
CALL 0x001eb6fe
MOV R9D,dword ptr [R14]
MOV R10D,dword ptr [R14 + 0x4]
LEA R11,[0x1f7984]
LEA RDX,[0x1f2b97]
LEA R8,[0x1f7975]
PUSH 0x1
POP RSI
PUSH 0xc
POP RCX
MOV RDI,RAX
XOR EAX,EAX
PUSH R11
PUSH R10
CALL 0x001eb796
POP RAX
POP RCX
LAB_0018209d:
MOV RAX,qword ptr [RSP]
AND qword ptr [RSP],0x0
ADD RBX,0x1578
LEA RSI,[RSP + 0x20]
MOV qword ptr [RSI],RAX
LAB_001820b5:
MOV RDI,RBX
CALL 0x0017e10c
LAB_001820bd:
MOV RDI,qword ptr [RSP + 0x20]
TEST RDI,RDI
JZ 0x001820cd
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x28]
LAB_001820cd:
LEA RDI,[RSP + 0x40]
CALL 0x0017c4b0
MOV RDI,qword ptr [RSP]
TEST RDI,RDI
JZ 0x001820e6
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x28]
LAB_001820e6:
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Removing unreachable block (ram,0x001820e0) */
/* server_context::send_embedding(server_slot const&, llama_batch const&) */
void __thiscall
server_context::send_embedding(server_context *this,server_slot *param_1,llama_batch *param_2)
{
int iVar1;
int iVar2;
float *pfVar3;
int8 uVar4;
ulong uVar5;
long *local_88;
float local_7c;
allocator local_75;
int local_74;
ulong local_70;
int8 local_68;
server_slot *local_50;
float *local_48 [3];
std::make_unique<server_task_result_embd>();
*(int4 *)(local_88 + 1) = *(int4 *)(param_1 + 4);
*(int4 *)(local_88 + 2) = *(int4 *)(param_1 + 0x78);
*(int4 *)(local_88 + 6) = *(int4 *)(param_1 + 0x780);
*(int4 *)((long)local_88 + 0x34) = *(int4 *)(param_1 + 0x70c);
/* try { // try from 00181e9d to 00181ea1 has its CatchHandler @ 0018210c */
iVar1 = llama_model_n_embd(*(int8 *)(this + 0x1338));
local_70 = (ulong)iVar1;
local_68 = (long *)((ulong)local_68._4_4_ << 0x20);
/* try { // try from 00181eb0 to 00181ec3 has its CatchHandler @ 0018210a */
std::vector<float,std::allocator<float>>::vector
((vector<float,std::allocator<float>> *)local_48,local_70,(float *)&local_68,
(allocator *)&local_7c);
local_74 = iVar1;
local_50 = param_1;
for (uVar5 = 0; (long)uVar5 < (long)*(int *)param_2; uVar5 = uVar5 + 1) {
if ((*(char *)(*(long *)(param_2 + 0x30) + uVar5) != '\0') &&
(**(int **)(*(long *)(param_2 + 0x28) + uVar5 * 8) == *(int *)param_1)) {
/* try { // try from 00181f06 to 00181f5f has its CatchHandler @ 00182128 */
pfVar3 = (float *)llama_get_embeddings_seq(*(int8 *)(this + 0x1340));
if ((pfVar3 == (float *)0x0) &&
(pfVar3 = (float *)llama_get_embeddings_ith
(*(int8 *)(this + 0x1340),uVar5 & 0xffffffff),
pfVar3 == (float *)0x0)) {
if (-1 < common_log_verbosity_thold) {
/* try { // try from 00181fc6 to 00182010 has its CatchHandler @ 00182128 */
uVar4 = common_log_main();
common_log_add(uVar4,4,
"slot %12.*s: id %2d | task %d | failed to get embeddings, token = %d, seq_id = %d\n"
,0xc,"send_embedding",*(int *)param_1,*(int *)(param_1 + 4),
*(int4 *)(*(long *)(param_2 + 8) + uVar5 * 4),
**(int4 **)(*(long *)(param_2 + 0x28) + uVar5 * 8));
}
local_7c = 0.0;
/* try { // try from 0018201a to 00182035 has its CatchHandler @ 00182115 */
std::vector<float,std::allocator<float>>::vector
((vector<float,std::allocator<float>> *)&local_68,local_70,&local_7c,&local_75);
/* try { // try from 0018203a to 00182044 has its CatchHandler @ 00182113 */
std::
vector<std::vector<float,std::allocator<float>>,std::allocator<std::vector<float,std::allocator<float>>>>
::emplace_back<std::vector<float,std::allocator<float>>>
((vector<std::vector<float,std::allocator<float>>,std::allocator<std::vector<float,std::allocator<float>>>>
*)(local_88 + 3),(vector<float,std::allocator<float>> *)&local_68);
std::_Vector_base<float,std::allocator<float>>::~_Vector_base
((_Vector_base<float,std::allocator<float>> *)&local_68);
iVar1 = local_74;
}
else {
iVar2 = llama_pooling_type(*(int8 *)(param_1 + 0x48));
if (iVar2 == 0) {
/* try { // try from 00181f7c to 00181f90 has its CatchHandler @ 00182126 */
std::vector<float,std::allocator<float>>::vector<float_const*,void>
((float *)&local_68,pfVar3,(allocator *)(pfVar3 + local_70));
/* try { // try from 00181f95 to 00181f9f has its CatchHandler @ 00182117 */
std::
vector<std::vector<float,std::allocator<float>>,std::allocator<std::vector<float,std::allocator<float>>>>
::emplace_back<std::vector<float,std::allocator<float>>>
((vector<std::vector<float,std::allocator<float>>,std::allocator<std::vector<float,std::allocator<float>>>>
*)(local_88 + 3),(_Vector_base<float,std::allocator<float>> *)&local_68);
std::_Vector_base<float,std::allocator<float>>::~_Vector_base
((_Vector_base<float,std::allocator<float>> *)&local_68);
param_1 = local_50;
iVar1 = local_74;
}
else {
common_embd_normalize(pfVar3,local_48[0],iVar1,2);
std::
vector<std::vector<float,std::allocator<float>>,std::allocator<std::vector<float,std::allocator<float>>>>
::push_back((vector<std::vector<float,std::allocator<float>>,std::allocator<std::vector<float,std::allocator<float>>>>
*)(local_88 + 3),(vector *)local_48);
}
}
}
}
if (0 < common_log_verbosity_thold) {
/* try { // try from 00182066 to 0018209c has its CatchHandler @ 00182111 */
uVar4 = common_log_main();
common_log_add(uVar4,1,"slot %12.*s: id %2d | task %d | %s",0xc,"send_embedding",*(int *)param_1
,*(int *)(param_1 + 4),"sending embeddings\n");
}
local_68 = local_88;
/* try { // try from 001820b5 to 001820bc has its CatchHandler @ 001820f5 */
server_response::send((server_response *)(this + 0x1578),(unique_ptr *)&local_68);
if (local_68 != (long *)0x0) {
(**(code **)(*local_68 + 0x28))();
}
std::_Vector_base<float,std::allocator<float>>::~_Vector_base
((_Vector_base<float,std::allocator<float>> *)local_48);
return;
}
|
|
57,580
|
server_context::send_embedding(server_slot const&, llama_batch const&)
|
monkey531[P]llama/examples/server/server.cpp
|
void send_embedding(const server_slot & slot, const llama_batch & batch) {
auto res = std::make_unique<server_task_result_embd>();
res->id = slot.id_task;
res->index = slot.index;
res->n_tokens = slot.n_prompt_tokens;
res->oaicompat = slot.params.oaicompat;
const int n_embd = llama_model_n_embd(model);
std::vector<float> embd_res(n_embd, 0.0f);
for (int i = 0; i < batch.n_tokens; ++i) {
if (!batch.logits[i] || batch.seq_id[i][0] != slot.id) {
continue;
}
const float * embd = llama_get_embeddings_seq(ctx, batch.seq_id[i][0]);
if (embd == NULL) {
embd = llama_get_embeddings_ith(ctx, i);
}
if (embd == NULL) {
SLT_ERR(slot, "failed to get embeddings, token = %d, seq_id = %d\n", batch.token[i], batch.seq_id[i][0]);
res->embedding.push_back(std::vector<float>(n_embd, 0.0f));
continue;
}
// normalize only when there is pooling
// TODO: configurable
if (llama_pooling_type(slot.ctx) != LLAMA_POOLING_TYPE_NONE) {
common_embd_normalize(embd, embd_res.data(), n_embd, 2);
res->embedding.push_back(embd_res);
} else {
res->embedding.push_back({ embd, embd + n_embd });
}
}
SLT_DBG(slot, "%s", "sending embeddings\n");
queue_results.send(std::move(res));
}
|
O3
|
cpp
|
server_context::send_embedding(server_slot const&, llama_batch const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %r14
movl $0x38, %edi
callq 0x1fab0
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rax)
movl $0xffffffff, 0xc(%rax) # imm = 0xFFFFFFFF
leaq 0x10fc72(%rip), %rcx # 0x1a3118
movq %rcx, (%rax)
movups %xmm0, 0x18(%rax)
movq $0x0, 0x28(%rax)
movl 0x4(%r15), %ecx
movl %ecx, 0x8(%rax)
movl 0x78(%r15), %ecx
movl %ecx, 0x10(%rax)
movl 0x780(%r15), %ecx
movl %ecx, 0x30(%rax)
movl 0x70c(%r15), %edx
movq %rax, 0x8(%rsp)
movl %edx, 0x34(%rax)
movq 0x1338(%r14), %rdi
callq 0x1f2c0
movl %eax, 0x34(%rsp)
movslq %eax, %rsi
leaq 0x10(%rsp), %rdx
movl $0x0, (%rdx)
leaq 0x40(%rsp), %rdi
movq %rsp, %rcx
movq %rsi, 0x38(%rsp)
callq 0x9c826
cmpl $0x0, (%r12)
jle 0x93692
movq 0x8(%rsp), %rbx
addq $0x18, %rbx
movq %rbx, 0x28(%rsp)
xorl %ebp, %ebp
movq 0x30(%r12), %rax
cmpb $0x0, (%rax,%rbp)
je 0x93682
movq 0x28(%r12), %rax
movq (%rax,%rbp,8), %rax
movl (%rax), %esi
cmpl (%r15), %esi
jne 0x93682
movq 0x1340(%r14), %rdi
callq 0x1f1e0
movq %rax, %r13
testq %rax, %rax
jne 0x93574
movq 0x1340(%r14), %rdi
movl %ebp, %esi
callq 0x1f720
movq %rax, %r13
testq %rax, %rax
je 0x935e0
movq 0x48(%r15), %rdi
callq 0x1fe70
testl %eax, %eax
je 0x935ab
movq 0x40(%rsp), %rsi
movq %r13, %rdi
movl 0x34(%rsp), %edx
movl $0x2, %ecx
callq 0x10b140
movq 0x28(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x9c9b0
jmp 0x93682
movq 0x38(%rsp), %rax
leaq (,%rax,4), %rdx
addq %r13, %rdx
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
movq %r13, %rsi
movq %rsp, %rcx
callq 0x9c9dc
movq 0x28(%rsp), %rdi
movq %rbx, %rsi
callq 0x9d4c4
jmp 0x9366b
leaq 0x23c961(%rip), %rax # 0x2cff48
cmpl $0x0, (%rax)
js 0x9363d
callq 0x13f3e3
movl (%r15), %r9d
movl 0x4(%r15), %r10d
movq 0x8(%r12), %rcx
movq 0x28(%r12), %rdx
movl (%rcx,%rbp,4), %r11d
movq (%rdx,%rbp,8), %rcx
movl (%rcx), %r13d
subq $0x8, %rsp
movq %rax, %rdi
movl $0x4, %esi
leaq 0xb82ca(%rip), %rdx # 0x14b8ea
movl $0xc, %ecx
leaq 0xb8311(%rip), %r8 # 0x14b93d
xorl %eax, %eax
pushq %r13
pushq %r11
pushq %r10
callq 0x13f480
addq $0x20, %rsp
movl $0x0, (%rsp)
leaq 0x10(%rsp), %r13
movq %r13, %rdi
movq 0x38(%rsp), %rsi
movq %rsp, %rdx
leaq 0x7(%rsp), %rcx
callq 0x9c826
movq 0x28(%rsp), %rdi
movq %r13, %rsi
callq 0x9d4c4
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x93682
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x1fae0
incq %rbp
movslq (%r12), %rax
cmpq %rax, %rbp
jl 0x93527
leaq 0x23c8af(%rip), %rax # 0x2cff48
cmpl $0x0, (%rax)
jle 0x936db
callq 0x13f3e3
movl (%r15), %r9d
movl 0x4(%r15), %r10d
leaq 0xb829b(%rip), %r11 # 0x14b94c
leaq 0xb34e8(%rip), %rdx # 0x146ba0
leaq 0xb827e(%rip), %r8 # 0x14b93d
movq %rax, %rdi
movl $0x1, %esi
movl $0xc, %ecx
xorl %eax, %eax
pushq %r11
pushq %r10
callq 0x13f480
addq $0x10, %rsp
addq $0x1578, %r14 # imm = 0x1578
leaq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rax
movq %rax, (%rsi)
movq %r14, %rdi
callq 0x8e230
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x93707
movq (%rdi), %rax
callq *0x28(%rax)
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x9371e
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x1fae0
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x93758
jmp 0x93776
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x93744
movq (%rdi), %rax
callq *0x28(%rax)
movq $0x0, 0x8(%rsp)
jmp 0x93779
jmp 0x93751
movq %rax, %rbx
jmp 0x93798
jmp 0x93776
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x93779
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x1fae0
jmp 0x93779
jmp 0x93776
movq %rax, %rbx
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x93790
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x1fae0
cmpq $0x0, 0x8(%rsp)
je 0x937a3
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
movq %rbx, %rdi
callq 0x20380
nop
|
_ZN14server_context14send_embeddingERK11server_slotRK11llama_batch:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov r12, rdx
mov r15, rsi
mov r14, rdi
mov edi, 38h ; '8'; unsigned __int64
call __Znwm; operator new(ulong)
xorps xmm0, xmm0
movaps xmmword ptr [rax+10h], xmm0
mov dword ptr [rax+0Ch], 0FFFFFFFFh
lea rcx, off_1A3118
mov [rax], rcx
movups xmmword ptr [rax+18h], xmm0
mov qword ptr [rax+28h], 0
mov ecx, [r15+4]
mov [rax+8], ecx
mov ecx, [r15+78h]
mov [rax+10h], ecx
mov ecx, [r15+780h]
mov [rax+30h], ecx
mov edx, [r15+70Ch]
mov [rsp+88h+var_80], rax
mov [rax+34h], edx
mov rdi, [r14+1338h]
call _llama_model_n_embd
mov [rsp+88h+var_54], eax
movsxd rsi, eax
lea rdx, [rsp+88h+var_78]
mov dword ptr [rdx], 0
lea rdi, [rsp+88h+var_48]
mov rcx, rsp
mov [rsp+88h+var_50], rsi
call _ZNSt6vectorIfSaIfEEC2EmRKfRKS0_; std::vector<float>::vector(ulong,float const&,std::allocator<float> const&)
cmp dword ptr [r12], 0
jle loc_93692
mov rbx, [rsp+88h+var_80]
add rbx, 18h
mov [rsp+88h+var_60], rbx
xor ebp, ebp
loc_93527:
mov rax, [r12+30h]
cmp byte ptr [rax+rbp], 0
jz loc_93682
mov rax, [r12+28h]
mov rax, [rax+rbp*8]
mov esi, [rax]
cmp esi, [r15]
jnz loc_93682
mov rdi, [r14+1340h]
call _llama_get_embeddings_seq
mov r13, rax
test rax, rax
jnz short loc_93574
mov rdi, [r14+1340h]
mov esi, ebp
call _llama_get_embeddings_ith
mov r13, rax
test rax, rax
jz short loc_935E0
loc_93574:
mov rdi, [r15+48h]
call _llama_pooling_type
test eax, eax
jz short loc_935AB
mov rsi, [rsp+88h+var_48]; float *
mov rdi, r13; float *
mov edx, [rsp+88h+var_54]; int
mov ecx, 2; int
call _Z21common_embd_normalizePKfPfii; common_embd_normalize(float const*,float *,int,int)
mov rdi, [rsp+88h+var_60]
lea rsi, [rsp+88h+var_48]
call _ZNSt6vectorIS_IfSaIfEESaIS1_EE9push_backERKS1_; std::vector<std::vector<float>>::push_back(std::vector<float> const&)
jmp loc_93682
loc_935AB:
mov rax, [rsp+88h+var_50]
lea rdx, ds:0[rax*4]
add rdx, r13
lea rbx, [rsp+88h+var_78]
mov rdi, rbx
mov rsi, r13
mov rcx, rsp
call _ZNSt6vectorIfSaIfEEC2IPKfvEET_S5_RKS0_; std::vector<float>::vector<float const*,void>(float const*,float const*,std::allocator<float> const&)
mov rdi, [rsp+88h+var_60]
mov rsi, rbx
call _ZNSt6vectorIS_IfSaIfEESaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<std::vector<float>>::emplace_back<std::vector<float>>(std::vector<float> &&)
jmp loc_9366B
loc_935E0:
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js short loc_9363D
call _Z15common_log_mainv; common_log_main(void)
mov r9d, [r15]
mov r10d, [r15+4]
mov rcx, [r12+8]
mov rdx, [r12+28h]
mov r11d, [rcx+rbp*4]
mov rcx, [rdx+rbp*8]
mov r13d, [rcx]
sub rsp, 8
mov rdi, rax
mov esi, 4
lea rdx, aSlot12SId2dTas_24; "slot %12.*s: id %2d | task %d | failed "...
mov ecx, 0Ch
lea r8, aSendEmbedding; "send_embedding"
xor eax, eax
push r13
push r11
push r10
call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...)
add rsp, 20h
loc_9363D:
mov [rsp+88h+var_88], 0
lea r13, [rsp+88h+var_78]
mov rdi, r13
mov rsi, [rsp+88h+var_50]
mov rdx, rsp
lea rcx, [rsp+88h+var_81]
call _ZNSt6vectorIfSaIfEEC2EmRKfRKS0_; std::vector<float>::vector(ulong,float const&,std::allocator<float> const&)
mov rdi, [rsp+88h+var_60]
mov rsi, r13
call _ZNSt6vectorIS_IfSaIfEESaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<std::vector<float>>::emplace_back<std::vector<float>>(std::vector<float> &&)
loc_9366B:
mov rdi, [rsp+88h+var_78]; void *
test rdi, rdi
jz short loc_93682
mov rsi, [rsp+88h+var_68]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_93682:
inc rbp
movsxd rax, dword ptr [r12]
cmp rbp, rax
jl loc_93527
loc_93692:
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
jle short loc_936DB
call _Z15common_log_mainv; common_log_main(void)
mov r9d, [r15]
mov r10d, [r15+4]
lea r11, aSendingEmbeddi; "sending embeddings\n"
lea rdx, aSlot12SId2dTas_0; "slot %12.*s: id %2d | task %d | %s"
lea r8, aSendEmbedding; "send_embedding"
mov rdi, rax
mov esi, 1
mov ecx, 0Ch
xor eax, eax
push r11
push r10
call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...)
add rsp, 10h
loc_936DB:
add r14, 1578h
lea rsi, [rsp+88h+var_78]
mov rax, [rsp+88h+var_80]
mov [rsi], rax
mov rdi, r14
call _ZN15server_response4sendEOSt10unique_ptrI18server_task_resultSt14default_deleteIS1_EE; server_response::send(std::unique_ptr<server_task_result> &&)
mov rdi, [rsp+88h+var_78]
test rdi, rdi
jz short loc_93707
mov rax, [rdi]
call qword ptr [rax+28h]
loc_93707:
mov rdi, [rsp+88h+var_48]; void *
test rdi, rdi
jz short loc_9371E
mov rsi, [rsp+88h+var_38]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9371E:
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_93758
jmp short loc_93776
mov rbx, rax
mov rdi, [rsp+arg_8]
test rdi, rdi
jz short loc_93744
mov rax, [rdi]
call qword ptr [rax+28h]
loc_93744:
mov [rsp+arg_0], 0
jmp short loc_93779
jmp short $+2
loc_93751:
mov rbx, rax
jmp short loc_93798
jmp short loc_93776
loc_93758:
mov rbx, rax
mov rdi, [rsp+arg_8]; void *
test rdi, rdi
jz short loc_93779
mov rsi, [rsp+arg_18]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_93779
jmp short $+2
loc_93776:
mov rbx, rax
loc_93779:
mov rdi, [rsp+arg_38]; void *
test rdi, rdi
jz short loc_93790
mov rsi, [rsp+arg_48]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_93790:
cmp [rsp+arg_0], 0
jz short loc_937A3
loc_93798:
mov rdi, [rsp+arg_0]
mov rax, [rdi]
call qword ptr [rax+28h]
loc_937A3:
mov rdi, rbx
call __Unwind_Resume
|
void server_context::send_embedding(long long a1, _DWORD *a2, int *a3)
{
_DWORD *v4; // rax
int v5; // edx
long long i; // rbp
const float *embeddings_seq; // r13
int v8; // eax
int v9; // eax
int v10; // [rsp+0h] [rbp-88h] BYREF
char v11; // [rsp+7h] [rbp-81h] BYREF
char *v12; // [rsp+8h] [rbp-80h]
void *v13[3]; // [rsp+10h] [rbp-78h] BYREF
char *v14; // [rsp+28h] [rbp-60h]
int v15; // [rsp+34h] [rbp-54h]
long long v16; // [rsp+38h] [rbp-50h]
float *v17[9]; // [rsp+40h] [rbp-48h] BYREF
v4 = (_DWORD *)operator new(0x38uLL);
*((_OWORD *)v4 + 1) = 0LL;
v4[3] = -1;
*(_QWORD *)v4 = off_1A3118;
*(_OWORD *)(v4 + 6) = 0LL;
*((_QWORD *)v4 + 5) = 0LL;
v4[2] = a2[1];
v4[4] = a2[30];
v4[12] = a2[480];
v5 = a2[451];
v12 = (char *)v4;
v4[13] = v5;
v15 = llama_model_n_embd(*(_QWORD *)(a1 + 4920), a2);
LODWORD(v13[0]) = 0;
v16 = v15;
std::vector<float>::vector(v17, v15, v13, &v10);
if ( *a3 > 0 )
{
v14 = v12 + 24;
for ( i = 0LL; i < *a3; ++i )
{
if ( *(_BYTE *)(*((_QWORD *)a3 + 6) + i) && **(_DWORD **)(*((_QWORD *)a3 + 5) + 8 * i) == *a2 )
{
embeddings_seq = (const float *)llama_get_embeddings_seq(*(_QWORD *)(a1 + 4928));
if ( !embeddings_seq )
{
embeddings_seq = (const float *)llama_get_embeddings_ith(*(_QWORD *)(a1 + 4928), (unsigned int)i);
if ( !embeddings_seq )
{
if ( common_log_verbosity_thold >= 0 )
{
v8 = common_log_main();
common_log_add(
v8,
4,
(unsigned int)"slot %12.*s: id %2d | task %d | failed to get embeddings, token = %d, seq_id = %d\n",
12,
(unsigned int)"send_embedding",
*a2);
}
v10 = 0;
std::vector<float>::vector(v13, v16, &v10, &v11);
std::vector<std::vector<float>>::emplace_back<std::vector<float>>(v14, v13);
goto LABEL_13;
}
}
if ( !(unsigned int)llama_pooling_type(*((_QWORD *)a2 + 9)) )
{
std::vector<float>::vector<float const*,void>(v13, embeddings_seq, &embeddings_seq[v16], &v10);
std::vector<std::vector<float>>::emplace_back<std::vector<float>>(v14, v13);
LABEL_13:
if ( v13[0] )
operator delete(v13[0], (char *)v13[2] - (char *)v13[0]);
continue;
}
common_embd_normalize(embeddings_seq, v17[0], v15, 2);
std::vector<std::vector<float>>::push_back(v14, v17);
}
}
}
if ( common_log_verbosity_thold > 0 )
{
v9 = common_log_main();
common_log_add(v9, 1, (unsigned int)"slot %12.*s: id %2d | task %d | %s", 12, (unsigned int)"send_embedding", *a2);
}
v13[0] = v12;
server_response::send(a1 + 5496, (long long)v13);
if ( v13[0] )
(*(void ( **)(void *))(*(_QWORD *)v13[0] + 40LL))(v13[0]);
if ( v17[0] )
operator delete(v17[0], (char *)v17[2] - (char *)v17[0]);
}
|
send_embedding:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV R12,RDX
MOV R15,RSI
MOV R14,RDI
MOV EDI,0x38
CALL 0x0011fab0
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RAX + 0x10],XMM0
MOV dword ptr [RAX + 0xc],0xffffffff
LEA RCX,[0x2a3118]
MOV qword ptr [RAX],RCX
MOVUPS xmmword ptr [RAX + 0x18],XMM0
MOV qword ptr [RAX + 0x28],0x0
MOV ECX,dword ptr [R15 + 0x4]
MOV dword ptr [RAX + 0x8],ECX
MOV ECX,dword ptr [R15 + 0x78]
MOV dword ptr [RAX + 0x10],ECX
MOV ECX,dword ptr [R15 + 0x780]
MOV dword ptr [RAX + 0x30],ECX
MOV EDX,dword ptr [R15 + 0x70c]
MOV qword ptr [RSP + 0x8],RAX
MOV dword ptr [RAX + 0x34],EDX
MOV RDI,qword ptr [R14 + 0x1338]
LAB_001934e3:
CALL 0x0011f2c0
MOV dword ptr [RSP + 0x34],EAX
MOVSXD RSI,EAX
LEA RDX,[RSP + 0x10]
MOV dword ptr [RDX],0x0
LAB_001934fa:
LEA RDI,[RSP + 0x40]
MOV RCX,RSP
MOV qword ptr [RSP + 0x38],RSI
CALL 0x0019c826
CMP dword ptr [R12],0x0
JLE 0x00193692
MOV RBX,qword ptr [RSP + 0x8]
ADD RBX,0x18
MOV qword ptr [RSP + 0x28],RBX
XOR EBP,EBP
LAB_00193527:
MOV RAX,qword ptr [R12 + 0x30]
CMP byte ptr [RAX + RBP*0x1],0x0
JZ 0x00193682
MOV RAX,qword ptr [R12 + 0x28]
MOV RAX,qword ptr [RAX + RBP*0x8]
MOV ESI,dword ptr [RAX]
CMP ESI,dword ptr [R15]
JNZ 0x00193682
MOV RDI,qword ptr [R14 + 0x1340]
LAB_00193551:
CALL 0x0011f1e0
MOV R13,RAX
TEST RAX,RAX
JNZ 0x00193574
MOV RDI,qword ptr [R14 + 0x1340]
MOV ESI,EBP
CALL 0x0011f720
MOV R13,RAX
TEST RAX,RAX
JZ 0x001935e0
LAB_00193574:
MOV RDI,qword ptr [R15 + 0x48]
CALL 0x0011fe70
TEST EAX,EAX
JZ 0x001935ab
MOV RSI,qword ptr [RSP + 0x40]
MOV RDI,R13
MOV EDX,dword ptr [RSP + 0x34]
MOV ECX,0x2
CALL 0x0020b140
MOV RDI,qword ptr [RSP + 0x28]
LEA RSI,[RSP + 0x40]
CALL 0x0019c9b0
JMP 0x00193682
LAB_001935ab:
MOV RAX,qword ptr [RSP + 0x38]
LEA RDX,[RAX*0x4]
ADD RDX,R13
LAB_001935bb:
LEA RBX,[RSP + 0x10]
MOV RDI,RBX
MOV RSI,R13
MOV RCX,RSP
CALL 0x0019c9dc
LAB_001935ce:
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,RBX
CALL 0x0019d4c4
JMP 0x0019366b
LAB_001935e0:
LEA RAX,[0x3cff48]
CMP dword ptr [RAX],0x0
JS 0x0019363d
LAB_001935ec:
CALL 0x0023f3e3
MOV R9D,dword ptr [R15]
MOV R10D,dword ptr [R15 + 0x4]
MOV RCX,qword ptr [R12 + 0x8]
MOV RDX,qword ptr [R12 + 0x28]
MOV R11D,dword ptr [RCX + RBP*0x4]
MOV RCX,qword ptr [RDX + RBP*0x8]
MOV R13D,dword ptr [RCX]
SUB RSP,0x8
MOV RDI,RAX
MOV ESI,0x4
LEA RDX,[0x24b8ea]
MOV ECX,0xc
LEA R8,[0x24b93d]
XOR EAX,EAX
PUSH R13
PUSH R11
PUSH R10
CALL 0x0023f480
ADD RSP,0x20
LAB_0019363d:
MOV dword ptr [RSP],0x0
LAB_00193644:
LEA R13,[RSP + 0x10]
MOV RDI,R13
MOV RSI,qword ptr [RSP + 0x38]
MOV RDX,RSP
LEA RCX,[RSP + 0x7]
CALL 0x0019c826
LAB_0019365e:
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,R13
CALL 0x0019d4c4
LAB_0019366b:
MOV RDI,qword ptr [RSP + 0x10]
TEST RDI,RDI
JZ 0x00193682
MOV RSI,qword ptr [RSP + 0x20]
SUB RSI,RDI
CALL 0x0011fae0
LAB_00193682:
INC RBP
MOVSXD RAX,dword ptr [R12]
CMP RBP,RAX
JL 0x00193527
LAB_00193692:
LEA RAX,[0x3cff48]
CMP dword ptr [RAX],0x0
JLE 0x001936db
LAB_0019369e:
CALL 0x0023f3e3
MOV R9D,dword ptr [R15]
MOV R10D,dword ptr [R15 + 0x4]
LEA R11,[0x24b94c]
LEA RDX,[0x246ba0]
LEA R8,[0x24b93d]
MOV RDI,RAX
MOV ESI,0x1
MOV ECX,0xc
XOR EAX,EAX
PUSH R11
PUSH R10
CALL 0x0023f480
ADD RSP,0x10
LAB_001936db:
ADD R14,0x1578
LEA RSI,[RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSI],RAX
LAB_001936ef:
MOV RDI,R14
CALL 0x0018e230
LAB_001936f7:
MOV RDI,qword ptr [RSP + 0x10]
TEST RDI,RDI
JZ 0x00193707
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x28]
LAB_00193707:
MOV RDI,qword ptr [RSP + 0x40]
TEST RDI,RDI
JZ 0x0019371e
MOV RSI,qword ptr [RSP + 0x50]
SUB RSI,RDI
CALL 0x0011fae0
LAB_0019371e:
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* server_context::send_embedding(server_slot const&, llama_batch const&) */
void __thiscall
server_context::send_embedding(server_context *this,server_slot *param_1,llama_batch *param_2)
{
int iVar1;
float *pfVar2;
int8 uVar3;
ulong uVar4;
int4 local_88 [2];
long *local_80;
int8 local_78;
long local_68;
vector<std::vector<float,std::allocator<float>>,std::allocator<std::vector<float,std::allocator<float>>>>
*local_60;
int local_54;
float *local_50;
float *local_48 [2];
long local_38;
local_80 = (long *)operator_new(0x38);
local_80[2] = 0;
local_80[3] = 0;
*(int4 *)((long)local_80 + 0xc) = 0xffffffff;
*local_80 = (long)&PTR_is_error_002a3118;
local_80[3] = 0;
local_80[4] = 0;
local_80[5] = 0;
*(int4 *)(local_80 + 1) = *(int4 *)(param_1 + 4);
*(int4 *)(local_80 + 2) = *(int4 *)(param_1 + 0x78);
*(int4 *)(local_80 + 6) = *(int4 *)(param_1 + 0x780);
*(int4 *)((long)local_80 + 0x34) = *(int4 *)(param_1 + 0x70c);
/* try { // try from 001934e3 to 001934e7 has its CatchHandler @ 00193751 */
local_54 = llama_model_n_embd(*(int8 *)(this + 0x1338));
local_50 = (float *)(long)local_54;
local_78 = (long *)((ulong)local_78._4_4_ << 0x20);
/* try { // try from 001934fa to 0019350b has its CatchHandler @ 0019374f */
std::vector<float,std::allocator<float>>::vector((ulong)local_48,local_50,(allocator *)&local_78);
if (0 < *(int *)param_2) {
local_60 = (vector<std::vector<float,std::allocator<float>>,std::allocator<std::vector<float,std::allocator<float>>>>
*)(local_80 + 3);
uVar4 = 0;
do {
if ((*(char *)(*(long *)(param_2 + 0x30) + uVar4) != '\0') &&
(**(int **)(*(long *)(param_2 + 0x28) + uVar4 * 8) == *(int *)param_1)) {
/* try { // try from 00193551 to 001935a5 has its CatchHandler @ 00193776 */
pfVar2 = (float *)llama_get_embeddings_seq(*(int8 *)(this + 0x1340));
if (pfVar2 == (float *)0x0) {
pfVar2 = (float *)llama_get_embeddings_ith
(*(int8 *)(this + 0x1340),uVar4 & 0xffffffff);
if (pfVar2 != (float *)0x0) goto LAB_00193574;
if (-1 < common_log_verbosity_thold) {
/* try { // try from 001935ec to 0019363c has its CatchHandler @ 00193776 */
uVar3 = common_log_main();
common_log_add(uVar3,4,
"slot %12.*s: id %2d | task %d | failed to get embeddings, token = %d, seq_id = %d\n"
,0xc,"send_embedding",*(int4 *)param_1,*(int4 *)(param_1 + 4)
,*(int4 *)(*(long *)(param_2 + 8) + uVar4 * 4),
**(int4 **)(*(long *)(param_2 + 0x28) + uVar4 * 8));
}
local_88[0] = 0;
/* try { // try from 00193644 to 0019365d has its CatchHandler @ 0019372f */
std::vector<float,std::allocator<float>>::vector
((ulong)&local_78,local_50,(allocator *)local_88);
/* try { // try from 0019365e to 0019366a has its CatchHandler @ 0019372d */
std::
vector<std::vector<float,std::allocator<float>>,std::allocator<std::vector<float,std::allocator<float>>>>
::emplace_back<std::vector<float,std::allocator<float>>>(local_60,(vector *)&local_78);
}
else {
LAB_00193574:
iVar1 = llama_pooling_type(*(int8 *)(param_1 + 0x48));
if (iVar1 != 0) {
common_embd_normalize(pfVar2,local_48[0],local_54,2);
std::
vector<std::vector<float,std::allocator<float>>,std::allocator<std::vector<float,std::allocator<float>>>>
::push_back(local_60,(vector *)local_48);
goto LAB_00193682;
}
/* try { // try from 001935bb to 001935cd has its CatchHandler @ 00193774 */
std::vector<float,std::allocator<float>>::vector<float_const*,void>
((float *)&local_78,pfVar2,(allocator *)(pfVar2 + (long)local_50));
/* try { // try from 001935ce to 001935da has its CatchHandler @ 00193758 */
std::
vector<std::vector<float,std::allocator<float>>,std::allocator<std::vector<float,std::allocator<float>>>>
::emplace_back<std::vector<float,std::allocator<float>>>(local_60,(vector *)&local_78);
}
if (local_78 != (long *)0x0) {
operator_delete(local_78,local_68 - (long)local_78);
}
}
LAB_00193682:
uVar4 = uVar4 + 1;
} while ((long)uVar4 < (long)*(int *)param_2);
}
if (0 < common_log_verbosity_thold) {
/* try { // try from 0019369e to 001936da has its CatchHandler @ 00193756 */
uVar3 = common_log_main();
common_log_add(uVar3,1,"slot %12.*s: id %2d | task %d | %s",0xc,"send_embedding",
*(int4 *)param_1,*(int4 *)(param_1 + 4),"sending embeddings\n");
}
local_78 = local_80;
/* try { // try from 001936ef to 001936f6 has its CatchHandler @ 00193731 */
server_response::send((server_response *)(this + 0x1578),(unique_ptr *)&local_78);
if (local_78 != (long *)0x0) {
(**(code **)(*local_78 + 0x28))();
}
if (local_48[0] != (float *)0x0) {
operator_delete(local_48[0],local_38 - (long)local_48[0]);
}
return;
}
|
|
57,581
|
JS_ParseJSON
|
bluesky950520[P]quickjs/quickjs.c
|
JSValue JS_ParseJSON(JSContext *ctx, const char *buf, size_t buf_len, const char *filename)
{
JSParseState s1, *s = &s1;
JSValue val = JS_UNDEFINED;
js_parse_init(ctx, s, buf, buf_len, filename);
if (json_next_token(s))
goto fail;
val = json_parse_value(s);
if (JS_IsException(val))
goto fail;
if (s->token.val != TOK_EOF) {
if (js_parse_error(s, "unexpected data at the end"))
goto fail;
}
return val;
fail:
JS_FreeValue(ctx, val);
free_token(s, &s->token);
return JS_EXCEPTION;
}
|
O0
|
c
|
JS_ParseJSON:
subq $0xf8, %rsp
movq %rdi, 0xe0(%rsp)
movq %rsi, 0xd8(%rsp)
movq %rdx, 0xd0(%rsp)
movq %rcx, 0xc8(%rsp)
leaq 0x28(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0xbea78(%rip), %rax # 0x10c210
movq %rax, 0x10(%rsp)
movq 0xbea74(%rip), %rax # 0x10c218
movq %rax, 0x18(%rsp)
movq 0xe0(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0xd8(%rsp), %rdx
movq 0xd0(%rsp), %rcx
movq 0xc8(%rsp), %r8
callq 0x4d8c0
movq 0x20(%rsp), %rdi
callq 0x4d9d0
cmpl $0x0, %eax
je 0x4d7e4
jmp 0x4d863
movq 0x20(%rsp), %rdi
callq 0x4dd80
movq %rax, (%rsp)
movq %rdx, 0x8(%rsp)
movq (%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x22a00
cmpl $0x0, %eax
je 0x4d820
jmp 0x4d863
movq 0x20(%rsp), %rax
cmpl $-0x56, 0x20(%rax)
je 0x4d847
movq 0x20(%rsp), %rdi
leaq 0xbee91(%rip), %rsi # 0x10c6c8
movb $0x0, %al
callq 0x473d0
cmpl $0x0, %eax
je 0x4d845
jmp 0x4d863
jmp 0x4d847
movq 0x10(%rsp), %rax
movq %rax, 0xe8(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0xf0(%rsp)
jmp 0x4d8a4
movq 0xe0(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
callq 0x229d0
movq 0x20(%rsp), %rdi
movq 0x20(%rsp), %rsi
addq $0x20, %rsi
callq 0x4e460
movl $0x0, 0xe8(%rsp)
movq $0x6, 0xf0(%rsp)
movq 0xe8(%rsp), %rax
movq 0xf0(%rsp), %rdx
addq $0xf8, %rsp
retq
nopl (%rax)
|
JS_ParseJSON:
sub rsp, 0F8h
mov [rsp+0F8h+var_18], rdi
mov [rsp+0F8h+var_20], rsi
mov [rsp+0F8h+var_28], rdx
mov [rsp+0F8h+var_30], rcx
lea rax, [rsp+0F8h+var_D0]
mov [rsp+0F8h+var_D8], rax
mov rax, cs:qword_10C210
mov [rsp+0F8h+var_E8], rax
mov rax, cs:qword_10C218
mov [rsp+0F8h+var_E0], rax
mov rdi, [rsp+0F8h+var_18]
mov rsi, [rsp+0F8h+var_D8]
mov rdx, [rsp+0F8h+var_20]
mov rcx, [rsp+0F8h+var_28]
mov r8, [rsp+0F8h+var_30]
call js_parse_init
mov rdi, [rsp+0F8h+var_D8]
call json_next_token
cmp eax, 0
jz short loc_4D7E4
jmp short loc_4D863
loc_4D7E4:
mov rdi, [rsp+0F8h+var_D8]
call json_parse_value
mov [rsp+0F8h+var_F8], rax
mov [rsp+0F8h+var_F0], rdx
mov rax, [rsp+0F8h+var_F8]
mov [rsp+0F8h+var_E8], rax
mov rax, [rsp+0F8h+var_F0]
mov [rsp+0F8h+var_E0], rax
mov rdi, [rsp+0F8h+var_E8]
mov rsi, [rsp+0F8h+var_E0]
call JS_IsException_1
cmp eax, 0
jz short loc_4D820
jmp short loc_4D863
loc_4D820:
mov rax, [rsp+0F8h+var_D8]
cmp dword ptr [rax+20h], 0FFFFFFAAh
jz short loc_4D847
mov rdi, [rsp+0F8h+var_D8]
lea rsi, aUnexpectedData; "unexpected data at the end"
mov al, 0
call js_parse_error
cmp eax, 0
jz short loc_4D845
jmp short loc_4D863
loc_4D845:
jmp short $+2
loc_4D847:
mov rax, [rsp+0F8h+var_E8]
mov [rsp+0F8h+var_10], rax
mov rax, [rsp+0F8h+var_E0]
mov [rsp+0F8h+var_8], rax
jmp short loc_4D8A4
loc_4D863:
mov rdi, [rsp+0F8h+var_18]
mov rsi, [rsp+0F8h+var_E8]
mov rdx, [rsp+0F8h+var_E0]
call JS_FreeValue
mov rdi, [rsp+0F8h+var_D8]
mov rsi, [rsp+0F8h+var_D8]
add rsi, 20h ; ' '
call free_token
mov dword ptr [rsp+0F8h+var_10], 0
mov [rsp+0F8h+var_8], 6
loc_4D8A4:
mov rax, [rsp+0F8h+var_10]
mov rdx, [rsp+0F8h+var_8]
add rsp, 0F8h
retn
|
long long JS_ParseJSON(
long long a1,
long long a2,
long long a3,
long long a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
double a9,
double a10,
__m128 a11,
__m128 a12)
{
long long v12; // rdx
long long v13; // rdx
long long v14; // rcx
long long v15; // r8
long long v16; // r9
__m128 v17; // xmm4
__m128 v18; // xmm5
long long v20; // [rsp+0h] [rbp-F8h]
long long v21; // [rsp+10h] [rbp-E8h]
long long v22; // [rsp+18h] [rbp-E0h]
_QWORD v23[4]; // [rsp+28h] [rbp-D0h] BYREF
int v24[32]; // [rsp+48h] [rbp-B0h] BYREF
long long v25; // [rsp+C8h] [rbp-30h]
long long v26; // [rsp+D0h] [rbp-28h]
long long v27; // [rsp+D8h] [rbp-20h]
long long v28; // [rsp+E0h] [rbp-18h]
long long v29; // [rsp+E8h] [rbp-10h]
long long v30; // [rsp+F0h] [rbp-8h]
v28 = a1;
v27 = a2;
v26 = a3;
v25 = a4;
v21 = 0LL;
v22 = 3LL;
js_parse_init(a1, v23, a2, a3, a4);
if ( (unsigned int)json_next_token(v23)
|| (v20 = json_parse_value(v23), v21 = v20, v22 = v12, JS_IsException_1(v20, v12))
|| v24[0] != -86
&& (unsigned int)js_parse_error(
v23,
(long long)"unexpected data at the end",
v13,
v14,
v15,
v16,
a5,
a6,
a7,
a8,
v17,
v18,
a11,
a12,
v20) )
{
JS_FreeValue(v28, v21, v22);
free_token(v23, v24);
LODWORD(v29) = 0;
v30 = 6LL;
}
else
{
v29 = v21;
v30 = v22;
}
return v29;
}
|
JS_ParseJSON:
SUB RSP,0xf8
MOV qword ptr [RSP + 0xe0],RDI
MOV qword ptr [RSP + 0xd8],RSI
MOV qword ptr [RSP + 0xd0],RDX
MOV qword ptr [RSP + 0xc8],RCX
LEA RAX,[RSP + 0x28]
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [0x0020c210]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [0x0020c218]
MOV qword ptr [RSP + 0x18],RAX
MOV RDI,qword ptr [RSP + 0xe0]
MOV RSI,qword ptr [RSP + 0x20]
MOV RDX,qword ptr [RSP + 0xd8]
MOV RCX,qword ptr [RSP + 0xd0]
MOV R8,qword ptr [RSP + 0xc8]
CALL 0x0014d8c0
MOV RDI,qword ptr [RSP + 0x20]
CALL 0x0014d9d0
CMP EAX,0x0
JZ 0x0014d7e4
JMP 0x0014d863
LAB_0014d7e4:
MOV RDI,qword ptr [RSP + 0x20]
CALL 0x0014dd80
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],RDX
MOV RAX,qword ptr [RSP]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x18],RAX
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x18]
CALL 0x00122a00
CMP EAX,0x0
JZ 0x0014d820
JMP 0x0014d863
LAB_0014d820:
MOV RAX,qword ptr [RSP + 0x20]
CMP dword ptr [RAX + 0x20],-0x56
JZ 0x0014d847
MOV RDI,qword ptr [RSP + 0x20]
LEA RSI,[0x20c6c8]
MOV AL,0x0
CALL 0x001473d0
CMP EAX,0x0
JZ 0x0014d845
JMP 0x0014d863
LAB_0014d845:
JMP 0x0014d847
LAB_0014d847:
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0xe8],RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0xf0],RAX
JMP 0x0014d8a4
LAB_0014d863:
MOV RDI,qword ptr [RSP + 0xe0]
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x18]
CALL 0x001229d0
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x20]
ADD RSI,0x20
CALL 0x0014e460
MOV dword ptr [RSP + 0xe8],0x0
MOV qword ptr [RSP + 0xf0],0x6
LAB_0014d8a4:
MOV RAX,qword ptr [RSP + 0xe8]
MOV RDX,qword ptr [RSP + 0xf0]
ADD RSP,0xf8
RET
|
int1 [16]
JS_ParseJSON(int8 param_1,int8 param_2,int8 param_3,int8 param_4)
{
int1 auVar1 [16];
int iVar2;
int1 auVar3 [16];
int8 local_e8;
int8 local_e0;
int1 local_d0 [32];
int local_b0 [32];
int8 local_30;
int8 local_28;
int8 local_20;
int8 local_18;
int4 local_10;
int4 uStack_c;
int8 local_8;
auVar3._8_8_ = DAT_0020c218;
auVar3._0_8_ = DAT_0020c210;
local_30 = param_4;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
js_parse_init(param_1,local_d0,param_2,param_3,param_4);
iVar2 = json_next_token(local_d0);
if (iVar2 == 0) {
auVar3 = json_parse_value(local_d0);
iVar2 = JS_IsException(auVar3._0_8_,auVar3._8_8_);
if ((iVar2 == 0) &&
((local_b0[0] == -0x56 ||
(iVar2 = js_parse_error(local_d0,"unexpected data at the end"), iVar2 == 0)))) {
local_10 = auVar3._0_4_;
uStack_c = auVar3._4_4_;
local_8 = auVar3._8_8_;
goto LAB_0014d8a4;
}
}
local_e0 = auVar3._8_8_;
local_e8 = auVar3._0_8_;
JS_FreeValue(local_18,local_e8,local_e0);
free_token(local_d0,local_b0);
local_10 = 0;
local_8 = 6;
LAB_0014d8a4:
auVar1._4_4_ = uStack_c;
auVar1._0_4_ = local_10;
auVar1._8_8_ = local_8;
return auVar1;
}
|
|
57,582
|
JS_ParseJSON
|
bluesky950520[P]quickjs/quickjs.c
|
JSValue JS_ParseJSON(JSContext *ctx, const char *buf, size_t buf_len, const char *filename)
{
JSParseState s1, *s = &s1;
JSValue val = JS_UNDEFINED;
js_parse_init(ctx, s, buf, buf_len, filename);
if (json_next_token(s))
goto fail;
val = json_parse_value(s);
if (JS_IsException(val))
goto fail;
if (s->token.val != TOK_EOF) {
if (js_parse_error(s, "unexpected data at the end"))
goto fail;
}
return val;
fail:
JS_FreeValue(ctx, val);
free_token(s, &s->token);
return JS_EXCEPTION;
}
|
O1
|
c
|
JS_ParseJSON:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rcx, %r13
movq %rdx, %rbp
movq %rsi, %r12
movq %rdi, %r14
leaq 0x8(%rsp), %r15
xorl %ebx, %ebx
movl $0xa0, %edx
movq %r15, %rdi
xorl %esi, %esi
callq 0xe340
movq %r14, (%r15)
movq %r13, 0x18(%r15)
movabsq $0x100000001, %rax # imm = 0x100000001
movq %rax, 0x10(%r15)
movq %r12, 0x70(%r15)
movq %r12, 0x68(%r15)
testl %ebp, %ebp
movl $0x1, %eax
cmovlel %ebp, %eax
leaq (%r12,%rbp), %rcx
movq %rcx, 0x78(%r15)
cltq
addq %r12, %rax
movq %rax, 0x88(%r15)
movq %r12, 0x80(%r15)
movabsq $0x100000020, %rax # imm = 0x100000020
movq %rax, 0x20(%r15)
movl $0x1, 0x28(%r15)
movq %r15, %rdi
callq 0x330a5
testl %eax, %eax
je 0x33034
movl $0x3, %r15d
jmp 0x33064
leaq 0x8(%rsp), %rdi
callq 0x334d0
movq %rax, %rbx
movq %rdx, %r15
cmpl $0x6, %r15d
je 0x33064
cmpl $-0x56, 0x28(%rsp)
je 0x3308d
leaq 0x6a674(%rip), %rsi # 0x9d6cc
leaq 0x8(%rsp), %rdi
xorl %eax, %eax
callq 0x2f0d5
leaq 0x28(%rsp), %r12
movq 0x18(%r14), %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x1ccb2
leaq 0x8(%rsp), %rdi
movq %r12, %rsi
callq 0x338e6
movl $0x6, %r15d
xorl %ebx, %ebx
movq %rbx, %rax
movq %r15, %rdx
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
JS_ParseJSON:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0A8h
mov r13, rcx
mov rbp, rdx
mov r12, rsi
mov r14, rdi
lea r15, [rsp+0D8h+var_D0]
xor ebx, ebx
mov edx, 0A0h
mov rdi, r15
xor esi, esi
call _memset
mov [r15], r14
mov [r15+18h], r13
mov rax, 100000001h
mov [r15+10h], rax
mov [r15+70h], r12
mov [r15+68h], r12
test ebp, ebp
mov eax, 1
cmovle eax, ebp
lea rcx, [r12+rbp]
mov [r15+78h], rcx
cdqe
add rax, r12
mov [r15+88h], rax
mov [r15+80h], r12
mov rax, 100000020h
mov [r15+20h], rax
mov dword ptr [r15+28h], 1
mov rdi, r15
call json_next_token
test eax, eax
jz short loc_33034
mov r15d, 3
jmp short loc_33064
loc_33034:
lea rdi, [rsp+0D8h+var_D0]
call json_parse_value
mov rbx, rax
mov r15, rdx
cmp r15d, 6
jz short loc_33064
cmp [rsp+0D8h+var_B0], 0FFFFFFAAh
jz short loc_3308D
lea rsi, aUnexpectedData; "unexpected data at the end"
lea rdi, [rsp+0D8h+var_D0]
xor eax, eax
call js_parse_error
loc_33064:
lea r12, [rsp+0D8h+var_B0]
mov rdi, [r14+18h]
mov rsi, rbx
mov rdx, r15
call JS_FreeValueRT
lea rdi, [rsp+0D8h+var_D0]
mov rsi, r12
call free_token
mov r15d, 6
xor ebx, ebx
loc_3308D:
mov rax, rbx
mov rdx, r15
add rsp, 0A8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
_DWORD * JS_ParseJSON(
long long a1,
long long a2,
long long a3,
long long a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
double a9,
double a10,
__m128 a11,
__m128 a12)
{
_DWORD *v14; // rbx
int v15; // eax
long long v16; // r15
long long v17; // rdx
long long v18; // rcx
long long v19; // r8
long long v20; // r9
__m128 v21; // xmm4
__m128 v22; // xmm5
char v24; // [rsp+0h] [rbp-D8h]
long long v25[4]; // [rsp+8h] [rbp-D0h] BYREF
long long v26; // [rsp+28h] [rbp-B0h] BYREF
int v27; // [rsp+30h] [rbp-A8h]
long long v28; // [rsp+70h] [rbp-68h]
long long v29; // [rsp+78h] [rbp-60h]
long long v30; // [rsp+80h] [rbp-58h]
long long v31; // [rsp+88h] [rbp-50h]
long long v32; // [rsp+90h] [rbp-48h]
v14 = 0LL;
memset(v25, 0LL, 160LL);
v25[0] = a1;
v25[3] = a4;
v25[2] = 0x100000001LL;
v29 = a2;
v28 = a2;
v15 = 1;
if ( (int)a3 <= 0 )
v15 = a3;
v30 = a2 + a3;
v32 = a2 + v15;
v31 = a2;
v26 = 0x100000020LL;
v27 = 1;
if ( (unsigned int)json_next_token(v25) )
{
v16 = 3LL;
LABEL_8:
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v14, v16);
free_token(v25, &v26);
return 0LL;
}
v14 = (_DWORD *)json_parse_value(v25);
v16 = v17;
if ( (_DWORD)v17 == 6 )
goto LABEL_8;
if ( (_DWORD)v26 != -86 )
{
js_parse_error(
v25,
(long long)"unexpected data at the end",
v17,
v18,
v19,
v20,
a5,
a6,
a7,
a8,
v21,
v22,
a11,
a12,
v24);
goto LABEL_8;
}
return v14;
}
|
JS_ParseJSON:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xa8
MOV R13,RCX
MOV RBP,RDX
MOV R12,RSI
MOV R14,RDI
LEA R15,[RSP + 0x8]
XOR EBX,EBX
MOV EDX,0xa0
MOV RDI,R15
XOR ESI,ESI
CALL 0x0010e340
MOV qword ptr [R15],R14
MOV qword ptr [R15 + 0x18],R13
MOV RAX,0x100000001
MOV qword ptr [R15 + 0x10],RAX
MOV qword ptr [R15 + 0x70],R12
MOV qword ptr [R15 + 0x68],R12
TEST EBP,EBP
MOV EAX,0x1
CMOVLE EAX,EBP
LEA RCX,[R12 + RBP*0x1]
MOV qword ptr [R15 + 0x78],RCX
CDQE
ADD RAX,R12
MOV qword ptr [R15 + 0x88],RAX
MOV qword ptr [R15 + 0x80],R12
MOV RAX,0x100000020
MOV qword ptr [R15 + 0x20],RAX
MOV dword ptr [R15 + 0x28],0x1
MOV RDI,R15
CALL 0x001330a5
TEST EAX,EAX
JZ 0x00133034
MOV R15D,0x3
JMP 0x00133064
LAB_00133034:
LEA RDI,[RSP + 0x8]
CALL 0x001334d0
MOV RBX,RAX
MOV R15,RDX
CMP R15D,0x6
JZ 0x00133064
CMP dword ptr [RSP + 0x28],-0x56
JZ 0x0013308d
LEA RSI,[0x19d6cc]
LEA RDI,[RSP + 0x8]
XOR EAX,EAX
CALL 0x0012f0d5
LAB_00133064:
LEA R12,[RSP + 0x28]
MOV RDI,qword ptr [R14 + 0x18]
MOV RSI,RBX
MOV RDX,R15
CALL 0x0011ccb2
LEA RDI,[RSP + 0x8]
MOV RSI,R12
CALL 0x001338e6
MOV R15D,0x6
XOR EBX,EBX
LAB_0013308d:
MOV RAX,RBX
MOV RDX,R15
ADD RSP,0xa8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16] JS_ParseJSON(long param_1,long param_2,long param_3,int8 param_4)
{
int iVar1;
int1 auVar2 [16];
long local_d0 [2];
int8 local_c0;
int8 local_b8;
int8 local_b0;
int4 local_a8;
long local_68;
long local_60;
long local_58;
long local_50;
long local_48;
memset(local_d0,0,0xa0);
local_c0 = 0x100000001;
iVar1 = 1;
if ((int)param_3 < 1) {
iVar1 = (int)param_3;
}
local_58 = param_2 + param_3;
local_48 = iVar1 + param_2;
local_b0 = 0x100000020;
local_a8 = 1;
local_d0[0] = param_1;
local_b8 = param_4;
local_68 = param_2;
local_60 = param_2;
local_50 = param_2;
iVar1 = json_next_token(local_d0);
if (iVar1 == 0) {
auVar2 = json_parse_value(local_d0);
if (auVar2._8_4_ != 6) {
if ((int)local_b0 == -0x56) {
return auVar2;
}
js_parse_error(local_d0,"unexpected data at the end");
}
}
else {
auVar2 = ZEXT816(3) << 0x40;
}
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar2._0_8_,auVar2._8_8_);
free_token(local_d0,&local_b0);
return ZEXT816(6) << 0x40;
}
|
|
57,583
|
JS_ParseJSON
|
bluesky950520[P]quickjs/quickjs.c
|
JSValue JS_ParseJSON(JSContext *ctx, const char *buf, size_t buf_len, const char *filename)
{
JSParseState s1, *s = &s1;
JSValue val = JS_UNDEFINED;
js_parse_init(ctx, s, buf, buf_len, filename);
if (json_next_token(s))
goto fail;
val = json_parse_value(s);
if (JS_IsException(val))
goto fail;
if (s->token.val != TOK_EOF) {
if (js_parse_error(s, "unexpected data at the end"))
goto fail;
}
return val;
fail:
JS_FreeValue(ctx, val);
free_token(s, &s->token);
return JS_EXCEPTION;
}
|
O3
|
c
|
JS_ParseJSON:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa0, %rsp
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movl $0x98, %edx
movq %r14, %rdi
xorl %esi, %esi
callq 0xe340
movq %rbx, -0x8(%r14)
movq %r15, 0x10(%r14)
movabsq $0x100000001, %rax # imm = 0x100000001
movq %rax, 0x8(%r14)
movq %r13, 0x68(%r14)
movq %r13, 0x60(%r14)
testl %r12d, %r12d
movl $0x1, %eax
cmovlel %r12d, %eax
leaq (%r12,%r13), %rcx
movq %rcx, 0x70(%r14)
cltq
addq %r13, %rax
movq %rax, 0x80(%r14)
movq %r13, 0x78(%r14)
movabsq $0x100000020, %rax # imm = 0x100000020
movq %rax, 0x18(%r14)
movl $0x1, 0x20(%r14)
movq %rsp, %rdi
callq 0x33f30
testl %eax, %eax
je 0x33edf
leaq 0x20(%rsp), %rsi
movq %rsp, %rdi
callq 0x346e8
movl $0x6, %r14d
xorl %r15d, %r15d
movq %r15, %rax
movq %r14, %rdx
addq $0xa0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rsp, %rdi
callq 0x3433c
movq %rax, %r15
movq %rdx, %r14
cmpl $0x6, %r14d
je 0x33f0b
cmpl $-0x56, 0x20(%rsp)
je 0x33ec8
leaq 0x6c79b(%rip), %rsi # 0xa069c
movq %rsp, %rdi
xorl %eax, %eax
callq 0x2fed1
cmpl $-0x9, %r14d
jb 0x33eb2
movq 0x18(%rbx), %rdi
movl (%r15), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r15)
cmpl $0x1, %eax
jg 0x33eb2
movq %r15, %rsi
movq %r14, %rdx
callq 0x20d90
jmp 0x33eb2
|
JS_ParseJSON:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0A0h
mov r15, rcx
mov r12, rdx
mov r13, rsi
mov rbx, rdi
lea r14, [rsp+0C8h+var_C0]
mov edx, 98h
mov rdi, r14
xor esi, esi
call _memset
mov [r14-8], rbx
mov [r14+10h], r15
mov rax, 100000001h
mov [r14+8], rax
mov [r14+68h], r13
mov [r14+60h], r13
test r12d, r12d
mov eax, 1
cmovle eax, r12d
lea rcx, [r12+r13]
mov [r14+70h], rcx
cdqe
add rax, r13
mov [r14+80h], rax
mov [r14+78h], r13
mov rax, 100000020h
mov [r14+18h], rax
mov dword ptr [r14+20h], 1
mov rdi, rsp
call json_next_token
test eax, eax
jz short loc_33EDF
loc_33EB2:
lea rsi, [rsp+0C8h+var_A8]
mov rdi, rsp
call free_token
mov r14d, 6
xor r15d, r15d
loc_33EC8:
mov rax, r15
mov rdx, r14
add rsp, 0A0h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_33EDF:
mov rdi, rsp
call json_parse_value
mov r15, rax
mov r14, rdx
cmp r14d, 6
jz short loc_33F0B
cmp [rsp+0C8h+var_A8], 0FFFFFFAAh
jz short loc_33EC8
lea rsi, aUnexpectedData; "unexpected data at the end"
mov rdi, rsp
xor eax, eax
call js_parse_error
loc_33F0B:
cmp r14d, 0FFFFFFF7h
jb short loc_33EB2
mov rdi, [rbx+18h]
mov eax, [r15]
lea ecx, [rax-1]
mov [r15], ecx
cmp eax, 1
jg short loc_33EB2
mov rsi, r15
mov rdx, r14
call js_free_value_rt
jmp short loc_33EB2
|
_QWORD * JS_ParseJSON(
long long a1,
long long a2,
long long a3,
long long a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
double a9,
double a10,
__m128 a11,
__m128 a12)
{
int v14; // eax
_QWORD *v15; // r15
long long v17; // rdx
long long v18; // rcx
long long v19; // r8
long long v20; // r9
__m128 v21; // xmm4
__m128 v22; // xmm5
long long v23; // r14
long long v24; // rdi
int v25; // eax
long long v26; // rcx
long long v27; // [rsp+0h] [rbp-C8h] BYREF
_BYTE v28[8]; // [rsp+8h] [rbp-C0h] BYREF
long long v29; // [rsp+10h] [rbp-B8h]
long long v30; // [rsp+18h] [rbp-B0h]
long long v31; // [rsp+20h] [rbp-A8h] BYREF
int v32; // [rsp+28h] [rbp-A0h]
long long v33; // [rsp+68h] [rbp-60h]
long long v34; // [rsp+70h] [rbp-58h]
long long v35; // [rsp+78h] [rbp-50h]
long long v36; // [rsp+80h] [rbp-48h]
long long v37; // [rsp+88h] [rbp-40h]
memset(v28, 0LL, 152LL);
v27 = a1;
v30 = a4;
v29 = 0x100000001LL;
v34 = a2;
v33 = a2;
v14 = 1;
if ( (int)a3 <= 0 )
v14 = a3;
v35 = a3 + a2;
v37 = a2 + v14;
v36 = a2;
v31 = 0x100000020LL;
v32 = 1;
if ( !(unsigned int)json_next_token(&v27) )
{
v15 = (_QWORD *)json_parse_value(&v27);
v23 = v17;
if ( (_DWORD)v17 != 6 )
{
if ( (_DWORD)v31 == -86 )
return v15;
js_parse_error(
&v27,
(long long)"unexpected data at the end",
v17,
v18,
v19,
v20,
a5,
a6,
a7,
a8,
v21,
v22,
a11,
a12,
v27);
}
if ( (unsigned int)v23 >= 0xFFFFFFF7 )
{
v24 = *(_QWORD *)(a1 + 24);
v25 = *(_DWORD *)v15;
v26 = (unsigned int)(*(_DWORD *)v15 - 1);
*(_DWORD *)v15 = v26;
if ( v25 <= 1 )
js_free_value_rt(v24, v15, v23, v26, v19, v20);
}
}
free_token(&v27, &v31);
return 0LL;
}
|
JS_ParseJSON:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xa0
MOV R15,RCX
MOV R12,RDX
MOV R13,RSI
MOV RBX,RDI
LEA R14,[RSP + 0x8]
MOV EDX,0x98
MOV RDI,R14
XOR ESI,ESI
CALL 0x0010e340
MOV qword ptr [R14 + -0x8],RBX
MOV qword ptr [R14 + 0x10],R15
MOV RAX,0x100000001
MOV qword ptr [R14 + 0x8],RAX
MOV qword ptr [R14 + 0x68],R13
MOV qword ptr [R14 + 0x60],R13
TEST R12D,R12D
MOV EAX,0x1
CMOVLE EAX,R12D
LEA RCX,[R12 + R13*0x1]
MOV qword ptr [R14 + 0x70],RCX
CDQE
ADD RAX,R13
MOV qword ptr [R14 + 0x80],RAX
MOV qword ptr [R14 + 0x78],R13
MOV RAX,0x100000020
MOV qword ptr [R14 + 0x18],RAX
MOV dword ptr [R14 + 0x20],0x1
MOV RDI,RSP
CALL 0x00133f30
TEST EAX,EAX
JZ 0x00133edf
LAB_00133eb2:
LEA RSI,[RSP + 0x20]
MOV RDI,RSP
CALL 0x001346e8
MOV R14D,0x6
XOR R15D,R15D
LAB_00133ec8:
MOV RAX,R15
MOV RDX,R14
ADD RSP,0xa0
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
LAB_00133edf:
MOV RDI,RSP
CALL 0x0013433c
MOV R15,RAX
MOV R14,RDX
CMP R14D,0x6
JZ 0x00133f0b
CMP dword ptr [RSP + 0x20],-0x56
JZ 0x00133ec8
LEA RSI,[0x1a069c]
MOV RDI,RSP
XOR EAX,EAX
CALL 0x0012fed1
LAB_00133f0b:
CMP R14D,-0x9
JC 0x00133eb2
MOV RDI,qword ptr [RBX + 0x18]
MOV EAX,dword ptr [R15]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R15],ECX
CMP EAX,0x1
JG 0x00133eb2
MOV RSI,R15
MOV RDX,R14
CALL 0x00120d90
JMP 0x00133eb2
|
int1 [16] JS_ParseJSON(long param_1,long param_2,long param_3,int8 param_4)
{
int8 uVar1;
int iVar2;
int *piVar3;
int1 auVar4 [16];
long local_c8;
int1 local_c0 [8];
int8 local_b8;
int8 local_b0;
int8 local_a8;
int4 local_a0;
long local_60;
long local_58;
long local_50;
long local_48;
long local_40;
memset(local_c0,0,0x98);
local_b8 = 0x100000001;
iVar2 = 1;
if ((int)param_3 < 1) {
iVar2 = (int)param_3;
}
local_50 = param_3 + param_2;
local_40 = iVar2 + param_2;
local_a8 = 0x100000020;
local_a0 = 1;
local_c8 = param_1;
local_b0 = param_4;
local_60 = param_2;
local_58 = param_2;
local_48 = param_2;
iVar2 = json_next_token(&local_c8);
if (iVar2 == 0) {
auVar4 = json_parse_value(&local_c8);
piVar3 = auVar4._0_8_;
if (auVar4._8_4_ != 6) {
if ((int)local_a8 == -0x56) {
return auVar4;
}
js_parse_error(&local_c8,"unexpected data at the end");
}
if (0xfffffff6 < auVar4._8_4_) {
uVar1 = *(int8 *)(param_1 + 0x18);
iVar2 = *piVar3;
*piVar3 = iVar2 + -1;
if (iVar2 < 2) {
js_free_value_rt(uVar1,piVar3,auVar4._8_8_);
}
}
}
free_token(&local_c8,&local_a8);
return ZEXT816(6) << 0x40;
}
|
|
57,584
|
bool ConfigMgr::GetOption<bool>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool const&, bool) const
|
SylCore-WoTLK/src/common/Configuration/Config.cpp
|
bool ConfigMgr::GetOption<bool>(std::string const& name, bool const& def, bool showLogs /*= true*/) const
{
std::string val = GetValueDefault(name, std::string(def ? "1" : "0"), showLogs);
auto boolVal = Acore::StringTo<bool>(val);
if (!boolVal)
{
if (showLogs)
{
LOG_ERROR("server.loading", "> Config: Bad value defined for name '{}', going to use '{}' instead",
name, def ? "true" : "false");
}
return def;
}
return *boolVal;
}
|
O3
|
cpp
|
bool ConfigMgr::GetOption<bool>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool const&, bool) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xa0, %rsp
movl %ecx, %ebp
movq %rdx, %rbx
movq %rsi, %r14
leaq 0x64b25(%rip), %rax # 0x1091f7
leaq 0x5fbc7(%rip), %rsi # 0x1042a0
cmpb $0x0, (%rdx)
cmovneq %rax, %rsi
leaq 0x20(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x64b07(%rip), %rax # 0x1091f8
leaq 0x5fba9(%rip), %rdx # 0x1042a1
cmovneq %rax, %rdx
leaq 0x10(%rsp), %rdi
callq 0x29098
movzbl %bpl, %r8d
leaq 0x80(%rsp), %rdi
leaq 0x10(%rsp), %rcx
movq %r14, %rdx
callq 0xa3720
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0xa4736
movq 0x20(%rsp), %rsi
incq %rsi
callq 0xd32e8
movq 0x80(%rsp), %rsi
movq 0x88(%rsp), %rdi
xorl %edx, %edx
callq 0x6be66
leaq 0xf(%rsp), %rcx
movb %al, (%rcx)
btl $0x8, %eax
setae %al
cmovaeq %rbx, %rcx
andb %bpl, %al
cmpb $0x1, %al
jne 0xa487d
callq 0xb4614
movq %rax, %r15
leaq 0x10(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x5776e(%rip), %rsi # 0xfbeef
leaq 0x57775(%rip), %rdx # 0xfbefd
callq 0x29098
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
movl $0x2, %edx
callq 0xb45e4
movl %eax, %ebp
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0xa47b8
movq 0x20(%rsp), %rsi
incq %rsi
callq 0xd32e8
testb %bpl, %bpl
je 0xa487a
callq 0xb4614
movq %rax, %r15
leaq 0x48(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x57715(%rip), %rsi # 0xfbeef
leaq 0x5771c(%rip), %rdx # 0xfbefd
leaq 0x38(%rsp), %rdi
callq 0x29098
cmpb $0x0, (%rbx)
leaq 0x5858f(%rip), %rax # 0xfcd84
leaq 0x58591(%rip), %rcx # 0xfcd8d
cmovneq %rax, %rcx
movups (%r14), %xmm0
leaq 0x10(%rsp), %r8
movaps %xmm0, (%r8)
movq %rcx, 0x10(%r8)
leaq 0x69b8b(%rip), %rsi # 0x10e3a3
leaq 0x58(%rsp), %rdi
movl $0x44, %edx
movl $0xcd, %ecx
callq 0xea7c3
movq 0x58(%rsp), %rcx
movq 0x60(%rsp), %r8
leaq 0x38(%rsp), %rsi
movq %r15, %rdi
movl $0x2, %edx
callq 0x285d8
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa4863
movq 0x68(%rsp), %rsi
incq %rsi
callq 0xd32e8
movq 0x38(%rsp), %rdi
cmpq %r12, %rdi
je 0xa487a
movq 0x48(%rsp), %rsi
incq %rsi
callq 0xd32e8
movq %rbx, %rcx
movb (%rcx), %bl
leaq 0x90(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa48a0
movq 0x90(%rsp), %rsi
incq %rsi
callq 0xd32e8
movl %ebx, %eax
addq $0xa0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rdx, %r15
movq %rax, %r14
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa48db
movq 0x68(%rsp), %rsi
incq %rsi
callq 0xd32e8
jmp 0xa48db
movq %rdx, %r15
movq %rax, %r14
movq 0x38(%rsp), %rdi
cmpq %r12, %rdi
je 0xa48fc
movq 0x48(%rsp), %rsi
incq %rsi
callq 0xd32e8
jmp 0xa48fc
jmp 0xa48f6
movq %rdx, %r15
movq %rax, %r14
cmpl $0x1, %r15d
jne 0xa4a14
movq %r14, %rdi
callq 0x1b0d0
movq %rax, %r15
callq 0xb4614
movq %rax, %r14
leaq 0x48(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x548be(%rip), %rsi # 0xf91e8
leaq 0x548bd(%rip), %rdx # 0xf91ee
leaq 0x38(%rsp), %rdi
callq 0x29098
movq (%r15), %rax
movq %r15, %rdi
callq *0x10(%rax)
leaq 0x58(%rsp), %r9
movq %rax, (%r9)
leaq 0x7c(%rsp), %rax
movl $0x1fc, (%rax) # imm = 0x1FC
leaq 0x698bb(%rip), %r10 # 0x10e219
leaq 0x5489a(%rip), %rcx # 0xf91ff
leaq 0x38(%rsp), %rsi
movl $0x25, %r8d
movq %r14, %rdi
movl $0x2, %edx
pushq %rax
pushq %r10
callq 0x286d0
addq $0x10, %rsp
movq 0x38(%rsp), %rdi
cmpq %r12, %rdi
je 0xa499b
movq 0x48(%rsp), %rsi
incq %rsi
callq 0xd32e8
callq 0x1be70
movq %rbx, %rcx
jmp 0xa487d
jmp 0xa4a11
movq %rax, %r14
movq 0x38(%rsp), %rdi
cmpq %r12, %rdi
je 0xa49cb
movq 0x48(%rsp), %rsi
incq %rsi
callq 0xd32e8
jmp 0xa49cb
jmp 0xa49c8
movq %rax, %r14
callq 0x1be70
jmp 0xa4a14
movq %rax, %rdi
callq 0x2841d
movq %rax, %r14
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0xa4a14
movq 0x20(%rsp), %rsi
incq %rsi
callq 0xd32e8
jmp 0xa4a14
jmp 0xa4a11
movq %rax, %r14
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0xa4a35
movq 0x20(%rsp), %rsi
jmp 0xa4a2d
movq %rax, %r14
jmp 0xa4a35
movq %rax, %r14
leaq 0x90(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa4a35
movq 0x90(%rsp), %rsi
incq %rsi
callq 0xd32e8
movq %r14, %rdi
callq 0x1bba0
nop
|
_ZNK9ConfigMgr9GetOptionIbEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS1_b:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 0A0h
mov ebp, ecx
mov rbx, rdx
mov r14, rsi
lea rax, aSelectBandateU_0+48h; "1"
lea rsi, aDeleteFromChar_19+41h; "0"
cmp byte ptr [rdx], 0
cmovnz rsi, rax
lea r12, [rsp+0C8h+var_A8]
mov [r12-10h], r12
lea rax, aSelectBandateU_0+49h; ""
lea rdx, aDeleteFromChar_19+42h; ""
cmovnz rdx, rax
lea rdi, [rsp+0C8h+var_B8]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
movzx r8d, bpl
lea rdi, [rsp+0C8h+var_48]
lea rcx, [rsp+0C8h+var_B8]
mov rdx, r14
call _ZNK9ConfigMgr15GetValueDefaultINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_RKS6_RKS7_b; ConfigMgr::GetValueDefault<std::string>(std::string const&,std::string const&,bool)
mov rdi, [rsp+0C8h+var_B8]; void *
cmp rdi, r12
jz short loc_A4736
mov rsi, [rsp+0C8h+var_A8]
inc rsi; unsigned __int64
call _ZdlPvm; operator delete(void *,ulong)
loc_A4736:
mov rsi, [rsp+0C8h+var_48]
mov rdi, [rsp+0C8h+var_40]; this
xor edx, edx
call _ZN5Acore4Impl17StringConvertImpl3ForIbvE10FromStringESt17basic_string_viewIcSt11char_traitsIcEEi; Acore::Impl::StringConvertImpl::For<bool,void>::FromString(std::string_view,int)
lea rcx, [rsp+0C8h+var_B9]
mov [rcx], al
bt eax, 8
setnb al
cmovnb rcx, rbx
and al, bpl
cmp al, 1
jnz loc_A487D
call _ZN3Log8instanceEv; Log::instance(void)
mov r15, rax
lea rdi, [rsp+0C8h+var_B8]
mov [rdi], r12
lea rsi, aServerLoading; "server.loading"
lea rdx, aServerLoading+0Eh; ""
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rsi, [rsp+0C8h+var_B8]
mov rdi, r15
mov edx, 2
call _ZNK3Log9ShouldLogERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE8LogLevel; Log::ShouldLog(std::string const&,LogLevel)
mov ebp, eax
mov rdi, [rsp+0C8h+var_B8]; this
cmp rdi, r12
jz short loc_A47B8
mov rsi, [rsp+0C8h+var_A8]
inc rsi; unsigned __int64
call _ZdlPvm; operator delete(void *,ulong)
loc_A47B8:
test bpl, bpl
jz loc_A487A
call _ZN3Log8instanceEv; Log::instance(void)
mov r15, rax
lea r12, [rsp+0C8h+var_80]
mov [r12-10h], r12
lea rsi, aServerLoading; "server.loading"
lea rdx, aServerLoading+0Eh; ""
lea rdi, [rsp+0C8h+var_90]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
cmp byte ptr [rbx], 0
lea rax, aTrue; "true"
lea rcx, aFalse; "false"
cmovnz rcx, rax
movups xmm0, xmmword ptr [r14]
lea r8, [rsp+0C8h+var_B8]; int
movaps xmmword ptr [r8], xmm0
mov [r8+10h], rcx
lea rsi, aConfigBadValue; "> Config: Bad value defined for name '{"...
lea rdi, [rsp+0C8h+var_70]; int
mov edx, 44h ; 'D'; int
mov ecx, 0CDh; int
call _ZN3fmt3v107vformatB5cxx11ENS0_17basic_string_viewIcEENS0_17basic_format_argsINS0_20basic_format_contextINS0_8appenderEcEEEE; fmt::v10::vformat(fmt::v10::basic_string_view<char>,fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>>)
mov rcx, qword ptr [rsp+0C8h+var_70]
mov r8, [rsp+0C8h+var_68]
lea rsi, [rsp+0C8h+var_90]
mov rdi, r15
mov edx, 2
call _ZN3Log10outMessageIJEEEvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE8LogLevelN3fmt3v1019basic_format_stringIcJDpNSB_13type_identityIT_E4typeEEEEDpOSE_
lea rax, [rsp+0C8h+var_60]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A4863
mov rsi, [rsp+0C8h+var_60]
inc rsi; unsigned __int64
call _ZdlPvm; operator delete(void *,ulong)
loc_A4863:
mov rdi, [rsp+0C8h+var_90]; void *
cmp rdi, r12
jz short loc_A487A
mov rsi, [rsp+0C8h+var_80]
inc rsi; unsigned __int64
call _ZdlPvm; operator delete(void *,ulong)
loc_A487A:
mov rcx, rbx
loc_A487D:
mov bl, [rcx]
lea rax, [rsp+0C8h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A48A0
mov rsi, [rsp+0C8h+var_38]
inc rsi; unsigned __int64
call _ZdlPvm; operator delete(void *,ulong)
loc_A48A0:
mov eax, ebx
add rsp, 0A0h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
mov r15, rdx
mov r14, rax
lea rax, [rsp+0C8h+var_60]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A48DB
mov rsi, [rsp+0C8h+var_60]
inc rsi; unsigned __int64
call _ZdlPvm; operator delete(void *,ulong)
jmp short loc_A48DB
mov r15, rdx
mov r14, rax
loc_A48DB:
mov rdi, [rsp+0C8h+var_90]; void *
cmp rdi, r12
jz short loc_A48FC
mov rsi, [rsp+0C8h+var_80]
inc rsi; unsigned __int64
call _ZdlPvm; operator delete(void *,ulong)
jmp short loc_A48FC
jmp short $+2
loc_A48F6:
mov r15, rdx
mov r14, rax
loc_A48FC:
cmp r15d, 1
jnz loc_A4A14
mov rdi, r14; this
call ___cxa_begin_catch
mov r15, rax
call _ZN3Log8instanceEv; Log::instance(void)
mov r14, rax
lea r12, [rsp+0C8h+var_80]
mov [r12-10h], r12
lea rsi, aServerAuthserv+0Bh; "server"
lea rdx, aServerAuthserv+11h; ""
lea rdi, [rsp+0C8h+var_90]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rax, [r15]
mov rdi, r15
call qword ptr [rax+10h]
lea r9, [rsp+0C8h+var_70]
mov [r9], rax
lea rax, [rsp+0C8h+var_4C]
mov dword ptr [rax], 1FCh
lea r10, aWorkspaceLlm4b_24; "/workspace/llm4binary/github2025/SylCor"...
lea rcx, aWrongFormatOcc; "Wrong format occurred ({}) at '{}:{}'"
lea rsi, [rsp+0C8h+var_90]
mov r8d, 25h ; '%'
mov rdi, r14
mov edx, 2
push rax
push r10
call _ZN3Log10outMessageIJPKcRA83_S1_iEEEvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE8LogLevelN3fmt3v1019basic_format_stringIcJDpNSF_13type_identityIT_E4typeEEEEDpOSI_; Log::outMessage<char const*,char const(&)[83],int>(std::string const&,LogLevel,fmt::v10::basic_format_string<char,fmt::v10::type_identity<char const*,char const(&)[83],int>::type>,char const*,char const(&)[83],int&&)
add rsp, 10h
mov rdi, [rsp+0C8h+var_90]; void *
cmp rdi, r12
jz short loc_A499B
mov rsi, [rsp+0C8h+var_80]
inc rsi; unsigned __int64
call _ZdlPvm; operator delete(void *,ulong)
loc_A499B:
call ___cxa_end_catch
mov rcx, rbx
jmp loc_A487D
jmp short loc_A4A11
mov r14, rax
mov rdi, [rsp+0C8h+var_90]; void *
cmp rdi, r12
jz short loc_A49CB
mov rsi, [rsp+0C8h+var_80]
inc rsi; unsigned __int64
call _ZdlPvm; operator delete(void *,ulong)
jmp short loc_A49CB
jmp short $+2
loc_A49C8:
mov r14, rax
loc_A49CB:
call ___cxa_end_catch
jmp short loc_A4A14
mov rdi, rax
call __clang_call_terminate
mov r14, rax
mov rdi, [rsp+0C8h+var_B8]; void *
cmp rdi, r12
jz short loc_A4A14
mov rsi, [rsp+0C8h+var_A8]
inc rsi; unsigned __int64
call _ZdlPvm; operator delete(void *,ulong)
jmp short loc_A4A14
jmp short loc_A4A11
mov r14, rax
mov rdi, [rsp+0C8h+var_B8]
cmp rdi, r12
jz short loc_A4A35
mov rsi, [rsp+0C8h+var_A8]
jmp short loc_A4A2D
mov r14, rax
jmp short loc_A4A35
loc_A4A11:
mov r14, rax
loc_A4A14:
lea rax, [rsp+0C8h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A4A35
mov rsi, [rsp+0C8h+var_38]
loc_A4A2D:
inc rsi; unsigned __int64
call _ZdlPvm; operator delete(void *,ulong)
loc_A4A35:
mov rdi, r14
call __Unwind_Resume
|
long long ConfigMgr::GetOption<bool>(long long a1, long long *a2, char *a3, char a4)
{
char *v5; // rbx
char *v7; // rsi
bool v8; // zf
char *v9; // rdx
Log *v10; // rdi
__int16 v11; // ax
char *v12; // rcx
bool v13; // cf
bool v14; // al
long long v15; // r15
char ShouldLog; // bp
Log *v17; // rdi
long long v18; // r15
int v19; // r9d
const char *v20; // rcx
int v21; // r9d
int v23; // [rsp+0h] [rbp-C8h]
int v24; // [rsp+8h] [rbp-C0h]
char v25; // [rsp+Fh] [rbp-B9h] BYREF
Log *v26[2]; // [rsp+10h] [rbp-B8h] BYREF
_QWORD v27[3]; // [rsp+20h] [rbp-A8h] BYREF
void *v28[2]; // [rsp+38h] [rbp-90h] BYREF
_QWORD v29[2]; // [rsp+48h] [rbp-80h] BYREF
int v30[2]; // [rsp+58h] [rbp-70h] BYREF
long long v31; // [rsp+60h] [rbp-68h]
long long v32; // [rsp+68h] [rbp-60h] BYREF
long long *v33; // [rsp+80h] [rbp-48h] BYREF
Log *v34; // [rsp+88h] [rbp-40h]
long long v35; // [rsp+90h] [rbp-38h] BYREF
v5 = a3;
v7 = "0";
v8 = *a3 == 0;
if ( *a3 )
v7 = "1";
v26[0] = (Log *)v27;
v9 = "";
if ( !v8 )
v9 = "";
std::string::_M_construct<char const*>((long long)v26, v7, (long long)v9);
ConfigMgr::GetValueDefault<std::string>(&v33, (long long)v7, a2, (long long **)v26, a4);
if ( (_QWORD *)v26[0] != v27 )
operator delete(v26[0], v27[0] + 1LL);
v10 = v34;
v11 = Acore::Impl::StringConvertImpl::For<bool,void>::FromString((long long)v34, v33, 0);
v12 = &v25;
v25 = v11;
v13 = (v11 & 0x100) != 0;
v14 = (v11 & 0x100) == 0;
if ( !v13 )
v12 = v5;
if ( ((unsigned __int8)a4 & v14) == 1 )
{
v15 = Log::instance(v10);
v26[0] = (Log *)v27;
std::string::_M_construct<char const*>((long long)v26, "server.loading", (long long)"");
ShouldLog = Log::ShouldLog(v15, v26, 2LL);
v17 = v26[0];
if ( (_QWORD *)v26[0] != v27 )
operator delete(v26[0], v27[0] + 1LL);
if ( ShouldLog )
{
v18 = Log::instance(v17);
v28[0] = v29;
std::string::_M_construct<char const*>((long long)v28, "server.loading", (long long)"");
v20 = "false";
if ( *v5 )
v20 = "true";
fmt::v10::vformat[abi:cxx11](
(int)v30,
(int)"> Config: Bad value defined for name '{}', going to use '{}' instead",
68,
205,
(int)v26,
v19,
v23,
v24,
(void *)*a2,
a2[1],
(unsigned long long)v20);
Log::outMessage<>(v18, (long long)v28, 2u, v30[0], v31, v21);
if ( *(long long **)v30 != &v32 )
operator delete(*(void **)v30, v32 + 1);
if ( v28[0] != v29 )
operator delete(v28[0], v29[0] + 1LL);
}
v12 = v5;
}
LOBYTE(v5) = *v12;
if ( v33 != &v35 )
operator delete(v33, v35 + 1);
return (unsigned int)v5;
}
|
GetOption<bool>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0xa0
MOV EBP,ECX
MOV RBX,RDX
MOV R14,RSI
LEA RAX,[0x2091f7]
LEA RSI,[0x2042a0]
CMP byte ptr [RDX],0x0
CMOVNZ RSI,RAX
LEA R12,[RSP + 0x20]
MOV qword ptr [R12 + -0x10],R12
LEA RAX,[0x2091f8]
LEA RDX,[0x2042a1]
CMOVNZ RDX,RAX
LAB_001a46fc:
LEA RDI,[RSP + 0x10]
CALL 0x00129098
LAB_001a4706:
MOVZX R8D,BPL
LEA RDI,[RSP + 0x80]
LEA RCX,[RSP + 0x10]
MOV RDX,R14
CALL 0x001a3720
MOV RDI,qword ptr [RSP + 0x10]
CMP RDI,R12
JZ 0x001a4736
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x001d32e8
LAB_001a4736:
MOV RSI,qword ptr [RSP + 0x80]
MOV RDI,qword ptr [RSP + 0x88]
LAB_001a4746:
XOR EDX,EDX
CALL 0x0016be66
LEA RCX,[RSP + 0xf]
MOV byte ptr [RCX],AL
BT EAX,0x8
SETNC AL
CMOVNC RCX,RBX
AND AL,BPL
CMP AL,0x1
JNZ 0x001a487d
CALL 0x001b4614
MOV R15,RAX
LEA RDI,[RSP + 0x10]
MOV qword ptr [RDI],R12
LAB_001a477a:
LEA RSI,[0x1fbeef]
LEA RDX,[0x1fbefd]
CALL 0x00129098
LAB_001a478d:
LEA RSI,[RSP + 0x10]
MOV RDI,R15
MOV EDX,0x2
CALL 0x001b45e4
MOV EBP,EAX
MOV RDI,qword ptr [RSP + 0x10]
CMP RDI,R12
JZ 0x001a47b8
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x001d32e8
LAB_001a47b8:
TEST BPL,BPL
JZ 0x001a487a
LAB_001a47c1:
CALL 0x001b4614
MOV R15,RAX
LEA R12,[RSP + 0x48]
MOV qword ptr [R12 + -0x10],R12
LAB_001a47d3:
LEA RSI,[0x1fbeef]
LEA RDX,[0x1fbefd]
LEA RDI,[RSP + 0x38]
CALL 0x00129098
CMP byte ptr [RBX],0x0
LEA RAX,[0x1fcd84]
LEA RCX,[0x1fcd8d]
CMOVNZ RCX,RAX
MOVUPS XMM0,xmmword ptr [R14]
LEA R8,[RSP + 0x10]
MOVAPS xmmword ptr [R8],XMM0
MOV qword ptr [R8 + 0x10],RCX
LAB_001a4811:
LEA RSI,[0x20e3a3]
LEA RDI,[RSP + 0x58]
MOV EDX,0x44
MOV ECX,0xcd
CALL 0x001ea7c3
MOV RCX,qword ptr [RSP + 0x58]
MOV R8,qword ptr [RSP + 0x60]
LAB_001a4836:
LEA RSI,[RSP + 0x38]
MOV RDI,R15
MOV EDX,0x2
CALL 0x001285d8
LAB_001a4848:
LEA RAX,[RSP + 0x68]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001a4863
MOV RSI,qword ptr [RSP + 0x68]
INC RSI
CALL 0x001d32e8
LAB_001a4863:
MOV RDI,qword ptr [RSP + 0x38]
CMP RDI,R12
JZ 0x001a487a
MOV RSI,qword ptr [RSP + 0x48]
INC RSI
CALL 0x001d32e8
LAB_001a487a:
MOV RCX,RBX
LAB_001a487d:
MOV BL,byte ptr [RCX]
LEA RAX,[RSP + 0x90]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001a48a0
MOV RSI,qword ptr [RSP + 0x90]
INC RSI
CALL 0x001d32e8
LAB_001a48a0:
MOV EAX,EBX
ADD RSP,0xa0
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* bool ConfigMgr::GetOption<bool>(std::__cxx11::string const&, bool const&, bool) const */
bool __thiscall
ConfigMgr::GetOption<bool>(ConfigMgr *this,string *param_1,bool *param_2,bool param_3)
{
char cVar1;
uint uVar2;
Log *pLVar3;
int8 uVar4;
bool *pbVar5;
char *pcVar6;
string *psVar7;
bool bVar8;
bool local_b9;
char **local_b8;
int4 uStack_b0;
int4 uStack_ac;
char *local_a8 [3];
long *local_90 [2];
long local_80 [2];
long *local_70;
int8 local_68;
long local_60 [3];
long *local_48;
For<bool,void> *local_40;
long local_38 [2];
psVar7 = (string *)0x2042a0;
if (*param_2 != false) {
psVar7 = (string *)0x2091f7;
}
pcVar6 = "";
if (*param_2 != false) {
pcVar6 = "";
}
/* try { // try from 001a46fc to 001a4705 has its CatchHandler @ 001a4a0c */
local_b8 = local_a8;
std::__cxx11::string::_M_construct<char_const*>(&local_b8,psVar7,pcVar6);
/* try { // try from 001a4706 to 001a471e has its CatchHandler @ 001a49f8 */
GetValueDefault<std::__cxx11::string>((string *)&local_48,psVar7,SUB81(param_1,0));
if (local_b8 != local_a8) {
operator_delete(local_b8,(ulong)(local_a8[0] + 1));
}
/* try { // try from 001a4746 to 001a476e has its CatchHandler @ 001a4a11 */
uVar2 = Acore::Impl::StringConvertImpl::For<bool,void>::FromString(local_40,local_48,0);
local_b9 = (bool)(char)uVar2;
bVar8 = (uVar2 >> 8 & 1) == 0;
pbVar5 = &local_b9;
if (bVar8) {
pbVar5 = param_2;
}
if (bVar8 && param_3) {
pLVar3 = (Log *)Log::instance();
local_b8 = local_a8;
/* try { // try from 001a477a to 001a478c has its CatchHandler @ 001a49f6 */
std::__cxx11::string::_M_construct<char_const*>(&local_b8,"server.loading","");
/* try { // try from 001a478d to 001a479e has its CatchHandler @ 001a49da */
cVar1 = Log::ShouldLog(pLVar3,&local_b8,2);
if (local_b8 != local_a8) {
operator_delete(local_b8,(ulong)(local_a8[0] + 1));
}
pbVar5 = param_2;
if (cVar1 != '\0') {
/* try { // try from 001a47c1 to 001a47c5 has its CatchHandler @ 001a48f6 */
uVar4 = Log::instance();
/* try { // try from 001a47d3 to 001a47ea has its CatchHandler @ 001a48f4 */
local_90[0] = local_80;
std::__cxx11::string::_M_construct<char_const*>(local_90,"server.loading","");
local_a8[0] = "false";
if (*param_2 != false) {
local_a8[0] = "true";
}
local_b8 = *(char ***)param_1;
uStack_b0 = *(int4 *)(param_1 + 8);
uStack_ac = *(int4 *)(param_1 + 0xc);
/* try { // try from 001a4811 to 001a482b has its CatchHandler @ 001a48d5 */
fmt::v10::vformat_abi_cxx11_
(&local_70,
"> Config: Bad value defined for name \'{}\', going to use \'{}\' instead",0x44,
0xcd);
/* try { // try from 001a4836 to 001a4847 has its CatchHandler @ 001a48b2 */
Log::outMessage<>(uVar4,local_90,2,local_70,local_68);
if (local_70 != local_60) {
operator_delete(local_70,local_60[0] + 1);
}
if (local_90[0] != local_80) {
operator_delete(local_90[0],local_80[0] + 1);
}
}
}
bVar8 = *pbVar5;
if (local_48 != local_38) {
operator_delete(local_48,local_38[0] + 1);
}
return bVar8;
}
|
|
57,585
|
my_once_free
|
eloqsql/mysys/my_once.c
|
void my_once_free(void)
{
reg1 USED_MEM *next,*old;
DBUG_ENTER("my_once_free");
for (next=my_once_root_block ; next ; )
{
old=next; next= next->next ;
free((uchar*) old);
}
my_once_root_block=0;
DBUG_VOID_RETURN;
}
|
O3
|
c
|
my_once_free:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0xb6ba0a(%rip), %rbx # 0xc16180
movq (%rbx), %rdi
testq %rdi, %rdi
je 0xaa78e
movq (%rdi), %r14
callq 0x2a170
movq %r14, %rdi
testq %r14, %r14
jne 0xaa77e
movq $0x0, (%rbx)
popq %rbx
popq %r14
popq %rbp
retq
nop
|
my_once_free:
push rbp
mov rbp, rsp
push r14
push rbx
lea rbx, my_once_root_block
mov rdi, [rbx]
test rdi, rdi
jz short loc_AA78E
loc_AA77E:
mov r14, [rdi]
call _free
mov rdi, r14
test r14, r14
jnz short loc_AA77E
loc_AA78E:
mov qword ptr [rbx], 0
pop rbx
pop r14
pop rbp
retn
|
long long my_once_free()
{
_QWORD *v0; // rdi
_QWORD *v1; // r14
long long result; // rax
v0 = (_QWORD *)my_once_root_block;
if ( my_once_root_block )
{
do
{
v1 = (_QWORD *)*v0;
result = free(v0);
v0 = v1;
}
while ( v1 );
}
my_once_root_block = 0LL;
return result;
}
|
my_once_free:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
LEA RBX,[0xd16180]
MOV RDI,qword ptr [RBX]
TEST RDI,RDI
JZ 0x001aa78e
LAB_001aa77e:
MOV R14,qword ptr [RDI]
CALL 0x0012a170
MOV RDI,R14
TEST R14,R14
JNZ 0x001aa77e
LAB_001aa78e:
MOV qword ptr [RBX],0x0
POP RBX
POP R14
POP RBP
RET
|
void my_once_free(void)
{
long *plVar1;
long *__ptr;
__ptr = my_once_root_block;
if (my_once_root_block != (long *)0x0) {
do {
plVar1 = (long *)*__ptr;
free(__ptr);
__ptr = plVar1;
} while (plVar1 != (long *)0x0);
}
my_once_root_block = (long *)0x0;
return;
}
|
|
57,586
|
pvio_socket_read
|
eloqsql/libmariadb/plugins/pvio/pvio_socket.c
|
ssize_t pvio_socket_read(MARIADB_PVIO *pvio, uchar *buffer, size_t length)
{
ssize_t r;
int read_flags= MSG_DONTWAIT;
struct st_pvio_socket *csock;
int timeout;
if (!pvio || !pvio->data)
return -1;
csock= (struct st_pvio_socket *)pvio->data;
timeout = pvio->timeout[PVIO_READ_TIMEOUT];
while ((r = ma_recv(csock->socket, (void *)buffer, length, read_flags)) == -1)
{
int err = socket_errno;
if ((err != SOCKET_EAGAIN
#ifdef HAVE_SOCKET_EWOULDBLOCK
&& err != SOCKET_EWOULDBLOCK
#endif
) || timeout == 0)
return r;
if (pvio_socket_wait_io_or_timeout(pvio, TRUE, timeout) < 1)
return -1;
}
return r;
}
|
O3
|
c
|
pvio_socket_read:
movq $-0x1, %rax
testq %rdi, %rdi
je 0x2e7d9
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r12
movq (%rdi), %rbx
testq %rbx, %rbx
je 0x2e7cb
movq %rdx, %r14
movq %rsi, %r15
movl 0x28(%r12), %r13d
movl %r13d, -0x2c(%rbp)
movl (%rbx), %r13d
movl %r13d, %edi
movq %r15, %rsi
movq %r14, %rdx
movl $0x40, %ecx
callq 0x13170
cmpq $-0x1, %rax
jne 0x2e7cb
callq 0x13060
movl (%rax), %eax
cmpl $0x4, %eax
je 0x2e77d
cmpl $0xb, %eax
jne 0x2e7c4
movl -0x2c(%rbp), %r13d
testl %r13d, %r13d
je 0x2e7c4
movq %r12, %rdi
movl $0x1, %esi
movl %r13d, %edx
callq 0x2e89c
testl %eax, %eax
jg 0x2e77a
movq $-0x1, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
pvio_socket_read:
mov rax, 0FFFFFFFFFFFFFFFFh
test rdi, rdi
jz locret_2E7D9
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r12, rdi
mov rbx, [rdi]
test rbx, rbx
jz short loc_2E7CB
mov r14, rdx
mov r15, rsi
mov r13d, [r12+28h]
mov [rbp-2Ch], r13d
loc_2E77A:
mov r13d, [rbx]
loc_2E77D:
mov edi, r13d
mov rsi, r15
mov rdx, r14
mov ecx, 40h ; '@'
call _recv
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz short loc_2E7CB
call ___errno_location
mov eax, [rax]
cmp eax, 4
jz short loc_2E77D
cmp eax, 0Bh
jnz short loc_2E7C4
mov r13d, [rbp-2Ch]
test r13d, r13d
jz short loc_2E7C4
mov rdi, r12
mov esi, 1
mov edx, r13d
call pvio_socket_wait_io_or_timeout
test eax, eax
jg short loc_2E77A
loc_2E7C4:
mov rax, 0FFFFFFFFFFFFFFFFh
loc_2E7CB:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
locret_2E7D9:
retn
|
long long pvio_socket_read(long long a1, long long a2, long long a3)
{
long long result; // rax
unsigned int *v4; // rbx
unsigned int v6; // r13d
int v7; // eax
unsigned int v8; // [rsp-34h] [rbp-34h]
result = -1LL;
if ( a1 )
{
v4 = *(unsigned int **)a1;
if ( *(_QWORD *)a1 )
{
v8 = *(_DWORD *)(a1 + 40);
LABEL_4:
v6 = *v4;
while ( 1 )
{
result = recv(v6, a2, a3, 64LL);
if ( result != -1 )
break;
v7 = *(_DWORD *)__errno_location(v6);
if ( v7 != 4 )
{
if ( v7 != 11 || !v8 || (int)pvio_socket_wait_io_or_timeout(a1, 1LL, v8) <= 0 )
return -1LL;
goto LABEL_4;
}
}
}
}
return result;
}
|
pvio_socket_read:
MOV RAX,-0x1
TEST RDI,RDI
JZ 0x0012e7d9
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R12,RDI
MOV RBX,qword ptr [RDI]
TEST RBX,RBX
JZ 0x0012e7cb
MOV R14,RDX
MOV R15,RSI
MOV R13D,dword ptr [R12 + 0x28]
MOV dword ptr [RBP + -0x2c],R13D
LAB_0012e77a:
MOV R13D,dword ptr [RBX]
LAB_0012e77d:
MOV EDI,R13D
MOV RSI,R15
MOV RDX,R14
MOV ECX,0x40
CALL 0x00113170
CMP RAX,-0x1
JNZ 0x0012e7cb
CALL 0x00113060
MOV EAX,dword ptr [RAX]
CMP EAX,0x4
JZ 0x0012e77d
CMP EAX,0xb
JNZ 0x0012e7c4
MOV R13D,dword ptr [RBP + -0x2c]
TEST R13D,R13D
JZ 0x0012e7c4
MOV RDI,R12
MOV ESI,0x1
MOV EDX,R13D
CALL 0x0012e89c
TEST EAX,EAX
JG 0x0012e77a
LAB_0012e7c4:
MOV RAX,-0x1
LAB_0012e7cb:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
LAB_0012e7d9:
RET
|
ssize_t pvio_socket_read(int8 *param_1,void *param_2,size_t param_3)
{
int iVar1;
int *piVar2;
int iVar3;
ssize_t sVar4;
int *piVar5;
if ((param_1 != (int8 *)0x0) && (piVar2 = (int *)*param_1, piVar2 != (int *)0x0)) {
iVar1 = *(int *)(param_1 + 5);
do {
iVar3 = *piVar2;
do {
sVar4 = recv(iVar3,param_2,param_3,0x40);
if (sVar4 != -1) {
return sVar4;
}
piVar5 = __errno_location();
} while (*piVar5 == 4);
} while (((*piVar5 == 0xb) && (iVar1 != 0)) &&
(iVar3 = pvio_socket_wait_io_or_timeout(param_1,1,iVar1), 0 < iVar3));
}
return -1;
}
|
|
57,587
|
testing::ScopedFakeTestPartResultReporter::~ScopedFakeTestPartResultReporter()
|
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc
|
ScopedFakeTestPartResultReporter::~ScopedFakeTestPartResultReporter() {
internal::UnitTestImpl* const impl = internal::GetUnitTestImpl();
if (intercept_mode_ == INTERCEPT_ALL_THREADS) {
impl->SetGlobalTestPartResultReporter(old_reporter_);
} else {
impl->SetTestPartResultReporterForCurrentThread(old_reporter_);
}
}
|
O0
|
cpp
|
testing::ScopedFakeTestPartResultReporter::~ScopedFakeTestPartResultReporter():
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0xb74d6(%rip), %rcx # 0x176ae0
addq $0x10, %rcx
movq %rcx, (%rax)
callq 0xe2720
movq %rax, 0x10(%rsp)
jmp 0xbf61d
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rcx
movq %rcx, 0x18(%rsp)
cmpl $0x1, 0x8(%rax)
jne 0xbf649
movq 0x8(%rsp), %rax
movq 0x18(%rsp), %rdi
movq 0x10(%rax), %rsi
callq 0xbf5a0
jmp 0xbf647
jmp 0xbf660
movq 0x8(%rsp), %rax
movq 0x18(%rsp), %rdi
movq 0x10(%rax), %rsi
callq 0xbb840
jmp 0xbf65e
jmp 0xbf660
movq 0x8(%rsp), %rdi
callq 0xeea10
addq $0x28, %rsp
retq
movq %rax, %rdi
callq 0x1b6b0
nopw (%rax,%rax)
|
_ZN7testing32ScopedFakeTestPartResultReporterD2Ev:
sub rsp, 28h; Alternative name is 'testing::ScopedFakeTestPartResultReporter::~ScopedFakeTestPartResultReporter()'
mov [rsp+28h+var_8], rdi
mov rax, [rsp+28h+var_8]
mov [rsp+28h+var_20], rax
lea rcx, _ZTVN7testing32ScopedFakeTestPartResultReporterE; `vtable for'testing::ScopedFakeTestPartResultReporter
add rcx, 10h
mov [rax], rcx
call _ZN7testing8internal15GetUnitTestImplEv; testing::internal::GetUnitTestImpl(void)
mov [rsp+28h+var_18], rax
jmp short $+2
loc_BF61D:
mov rax, [rsp+28h+var_20]
mov rcx, [rsp+28h+var_18]
mov [rsp+28h+var_10], rcx
cmp dword ptr [rax+8], 1
jnz short loc_BF649
mov rax, [rsp+28h+var_20]
mov rdi, [rsp+28h+var_10]; this
mov rsi, [rax+10h]; testing::TestPartResultReporterInterface *
call _ZN7testing8internal12UnitTestImpl31SetGlobalTestPartResultReporterEPNS_31TestPartResultReporterInterfaceE; testing::internal::UnitTestImpl::SetGlobalTestPartResultReporter(testing::TestPartResultReporterInterface *)
jmp short $+2
loc_BF647:
jmp short loc_BF660
loc_BF649:
mov rax, [rsp+28h+var_20]
mov rdi, [rsp+28h+var_10]; this
mov rsi, [rax+10h]; testing::TestPartResultReporterInterface *
call _ZN7testing8internal12UnitTestImpl41SetTestPartResultReporterForCurrentThreadEPNS_31TestPartResultReporterInterfaceE; testing::internal::UnitTestImpl::SetTestPartResultReporterForCurrentThread(testing::TestPartResultReporterInterface *)
jmp short $+2
loc_BF65E:
jmp short $+2
loc_BF660:
mov rdi, [rsp+28h+var_20]; this
call _ZN7testing31TestPartResultReporterInterfaceD2Ev; testing::TestPartResultReporterInterface::~TestPartResultReporterInterface()
add rsp, 28h
retn
mov rdi, rax
call __clang_call_terminate
|
void testing::ScopedFakeTestPartResultReporter::~ScopedFakeTestPartResultReporter(
testing::TestPartResultReporterInterface **this)
{
testing::internal::UnitTestImpl *UnitTestImpl; // [rsp+18h] [rbp-10h]
*this = (testing::TestPartResultReporterInterface *)(&`vtable for'testing::ScopedFakeTestPartResultReporter + 2);
UnitTestImpl = (testing::internal::UnitTestImpl *)testing::internal::GetUnitTestImpl((testing::internal *)this);
if ( *((_DWORD *)this + 2) == 1 )
testing::internal::UnitTestImpl::SetGlobalTestPartResultReporter(UnitTestImpl, this[2]);
else
testing::internal::UnitTestImpl::SetTestPartResultReporterForCurrentThread(UnitTestImpl, this[2]);
testing::TestPartResultReporterInterface::~TestPartResultReporterInterface((testing::TestPartResultReporterInterface *)this);
}
|
~ScopedFakeTestPartResultReporter:
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],RDI
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x8],RAX
LEA RCX,[0x276ae0]
ADD RCX,0x10
MOV qword ptr [RAX],RCX
LAB_001bf611:
CALL 0x001e2720
MOV qword ptr [RSP + 0x10],RAX
JMP 0x001bf61d
LAB_001bf61d:
MOV RAX,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x18],RCX
CMP dword ptr [RAX + 0x8],0x1
JNZ 0x001bf649
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RAX + 0x10]
CALL 0x001bf5a0
JMP 0x001bf647
LAB_001bf647:
JMP 0x001bf660
LAB_001bf649:
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RAX + 0x10]
CALL 0x001bb840
JMP 0x001bf65e
LAB_001bf65e:
JMP 0x001bf660
LAB_001bf660:
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x001eea10
ADD RSP,0x28
RET
|
/* testing::ScopedFakeTestPartResultReporter::~ScopedFakeTestPartResultReporter() */
void __thiscall
testing::ScopedFakeTestPartResultReporter::~ScopedFakeTestPartResultReporter
(ScopedFakeTestPartResultReporter *this)
{
UnitTestImpl *this_00;
*(int ***)this = &PTR__ScopedFakeTestPartResultReporter_00276af0;
/* try { // try from 001bf611 to 001bf65b has its CatchHandler @ 001bf66f */
this_00 = (UnitTestImpl *)internal::GetUnitTestImpl();
if (*(int *)(this + 8) == 1) {
internal::UnitTestImpl::SetGlobalTestPartResultReporter
(this_00,*(TestPartResultReporterInterface **)(this + 0x10));
}
else {
internal::UnitTestImpl::SetTestPartResultReporterForCurrentThread
(this_00,*(TestPartResultReporterInterface **)(this + 0x10));
}
TestPartResultReporterInterface::~TestPartResultReporterInterface
((TestPartResultReporterInterface *)this);
return;
}
|
|
57,588
|
rw_pr_wrlock
|
eloqsql/mysys/thr_rwlock.c
|
int rw_pr_wrlock(rw_pr_lock_t *rwlock)
{
pthread_mutex_lock(&rwlock->lock);
if (rwlock->active_readers != 0)
{
/* There are active readers. We have to wait until they are gone. */
rwlock->writers_waiting_readers++;
while (rwlock->active_readers != 0)
pthread_cond_wait(&rwlock->no_active_readers, &rwlock->lock);
rwlock->writers_waiting_readers--;
}
/*
We own 'lock' mutex so there is no active writers.
Also there are no active readers.
This means that we can grant wr-lock.
Not releasing 'lock' mutex until unlock will block
both requests for rd and wr-locks.
Set 'active_writer' flag to simplify unlock.
Thanks to the fact wr-lock/unlock in the absence of
contention from readers is essentially mutex lock/unlock
with a few simple checks make this rwlock implementation
wr-lock optimized.
*/
rwlock->active_writer= TRUE;
#ifdef SAFE_MUTEX
rwlock->writer_thread= pthread_self();
#endif
return 0;
}
|
O3
|
c
|
rw_pr_wrlock:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x243f0
cmpl $0x0, 0x58(%rbx)
je 0x26059
incl 0x5c(%rbx)
leaq 0x28(%rbx), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x24470
cmpl $0x0, 0x58(%rbx)
jne 0x26045
decl 0x5c(%rbx)
movb $0x1, 0x60(%rbx)
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
|
rw_pr_wrlock:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rdi
call _pthread_mutex_lock
cmp dword ptr [rbx+58h], 0
jz short loc_26059
inc dword ptr [rbx+5Ch]
lea r14, [rbx+28h]
loc_26045:
mov rdi, r14
mov rsi, rbx
call _pthread_cond_wait
cmp dword ptr [rbx+58h], 0
jnz short loc_26045
dec dword ptr [rbx+5Ch]
loc_26059:
mov byte ptr [rbx+60h], 1
xor eax, eax
pop rbx
pop r14
pop rbp
retn
|
long long rw_pr_wrlock(long long a1)
{
pthread_mutex_lock(a1);
if ( *(_DWORD *)(a1 + 88) )
{
++*(_DWORD *)(a1 + 92);
do
pthread_cond_wait(a1 + 40, a1);
while ( *(_DWORD *)(a1 + 88) );
--*(_DWORD *)(a1 + 92);
}
*(_BYTE *)(a1 + 96) = 1;
return 0LL;
}
|
rw_pr_wrlock:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RDI
CALL 0x001243f0
CMP dword ptr [RBX + 0x58],0x0
JZ 0x00126059
INC dword ptr [RBX + 0x5c]
LEA R14,[RBX + 0x28]
LAB_00126045:
MOV RDI,R14
MOV RSI,RBX
CALL 0x00124470
CMP dword ptr [RBX + 0x58],0x0
JNZ 0x00126045
DEC dword ptr [RBX + 0x5c]
LAB_00126059:
MOV byte ptr [RBX + 0x60],0x1
XOR EAX,EAX
POP RBX
POP R14
POP RBP
RET
|
int8 rw_pr_wrlock(pthread_mutex_t *param_1)
{
pthread_mutex_lock(param_1);
if (*(int *)((long)param_1 + 0x58) != 0) {
*(int *)((long)param_1 + 0x5c) = *(int *)((long)param_1 + 0x5c) + 1;
do {
pthread_cond_wait((pthread_cond_t *)(param_1 + 1),param_1);
} while (*(int *)((long)param_1 + 0x58) != 0);
*(int *)((long)param_1 + 0x5c) = *(int *)((long)param_1 + 0x5c) + -1;
}
*(int1 *)((long)param_1 + 0x60) = 1;
return 0;
}
|
|
57,589
|
js_std_file_readAsString
|
bluesky950520[P]quickjs/quickjs-libc.c
|
static JSValue js_std_file_readAsString(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
FILE *f = js_std_file_get(ctx, this_val);
int c;
DynBuf dbuf;
JSValue obj;
uint64_t max_size64;
size_t max_size;
JSValue max_size_val;
if (!f)
return JS_EXCEPTION;
if (argc >= 1)
max_size_val = argv[0];
else
max_size_val = JS_UNDEFINED;
max_size = (size_t)-1;
if (!JS_IsUndefined(max_size_val)) {
if (JS_ToIndex(ctx, &max_size64, max_size_val))
return JS_EXCEPTION;
if (max_size64 < max_size)
max_size = max_size64;
}
js_std_dbuf_init(ctx, &dbuf);
while (max_size != 0) {
c = fgetc(f);
if (c == EOF)
break;
if (dbuf_putc(&dbuf, c)) {
dbuf_free(&dbuf);
return JS_EXCEPTION;
}
max_size--;
}
obj = JS_NewStringLen(ctx, (const char *)dbuf.buf, dbuf.size);
dbuf_free(&dbuf);
return obj;
}
|
O0
|
c
|
js_std_file_readAsString:
subq $0xc8, %rsp
movq %rsi, 0xa8(%rsp)
movq %rdx, 0xb0(%rsp)
movq %rdi, 0xa0(%rsp)
movl %ecx, 0x9c(%rsp)
movq %r8, 0x90(%rsp)
movq 0xa0(%rsp), %rdi
movq 0xa8(%rsp), %rsi
movq 0xb0(%rsp), %rdx
callq 0x13a80
movq %rax, 0x88(%rsp)
cmpq $0x0, 0x88(%rsp)
jne 0x1370a
movl $0x0, 0xb8(%rsp)
movq $0x6, 0xc0(%rsp)
jmp 0x138a3
cmpl $0x1, 0x9c(%rsp)
jl 0x1372f
movq 0x90(%rsp), %rax
movq (%rax), %rcx
movq %rcx, 0x20(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x28(%rsp)
jmp 0x13754
movl $0x0, 0x10(%rsp)
movq $0x3, 0x18(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x28(%rsp)
movq $-0x1, 0x30(%rsp)
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x11930
cmpl $0x0, %eax
jne 0x137c6
movq 0xa0(%rsp), %rdi
movq 0x20(%rsp), %rdx
movq 0x28(%rsp), %rcx
leaq 0x38(%rsp), %rsi
callq 0x39140
cmpl $0x0, %eax
je 0x137ae
movl $0x0, 0xb8(%rsp)
movq $0x6, 0xc0(%rsp)
jmp 0x138a3
movq 0x38(%rsp), %rax
cmpq 0x30(%rsp), %rax
jae 0x137c4
movq 0x38(%rsp), %rax
movq %rax, 0x30(%rsp)
jmp 0x137c6
movq 0xa0(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x14750
cmpq $0x0, 0x30(%rsp)
je 0x1384c
movq 0x88(%rsp), %rdi
callq 0xe390
movl %eax, 0x84(%rsp)
cmpl $-0x1, 0x84(%rsp)
jne 0x13800
jmp 0x1384c
movl 0x84(%rsp), %eax
leaq 0x50(%rsp), %rdi
movzbl %al, %esi
callq 0x1e6d0
cmpl $0x0, %eax
je 0x1383c
leaq 0x50(%rsp), %rdi
callq 0x1e930
movl $0x0, 0xb8(%rsp)
movq $0x6, 0xc0(%rsp)
jmp 0x138a3
movq 0x30(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x30(%rsp)
jmp 0x137d8
movq 0xa0(%rsp), %rdi
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
callq 0x28270
movq %rax, (%rsp)
movq %rdx, 0x8(%rsp)
movq (%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x48(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x1e930
movq 0x40(%rsp), %rax
movq %rax, 0xb8(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0xc0(%rsp)
movq 0xb8(%rsp), %rax
movq 0xc0(%rsp), %rdx
addq $0xc8, %rsp
retq
nopl (%rax,%rax)
|
js_std_file_readAsString:
sub rsp, 0C8h
mov [rsp+0C8h+var_20], rsi
mov [rsp+0C8h+var_18], rdx
mov [rsp+0C8h+var_28], rdi
mov [rsp+0C8h+var_2C], ecx
mov [rsp+0C8h+var_38], r8
mov rdi, [rsp+0C8h+var_28]
mov rsi, [rsp+0C8h+var_20]
mov rdx, [rsp+0C8h+var_18]
call js_std_file_get
mov [rsp+0C8h+var_40], rax
cmp [rsp+0C8h+var_40], 0
jnz short loc_1370A
mov dword ptr [rsp+0C8h+var_10], 0
mov [rsp+0C8h+var_8], 6
jmp loc_138A3
loc_1370A:
cmp [rsp+0C8h+var_2C], 1
jl short loc_1372F
mov rax, [rsp+0C8h+var_38]
mov rcx, [rax]
mov [rsp+0C8h+var_A8], rcx
mov rax, [rax+8]
mov [rsp+0C8h+var_A0], rax
jmp short loc_13754
loc_1372F:
mov dword ptr [rsp+0C8h+var_B8], 0
mov [rsp+0C8h+var_B0], 3
mov rax, [rsp+0C8h+var_B8]
mov [rsp+0C8h+var_A8], rax
mov rax, [rsp+0C8h+var_B0]
mov [rsp+0C8h+var_A0], rax
loc_13754:
mov [rsp+0C8h+var_98], 0FFFFFFFFFFFFFFFFh
mov rdi, [rsp+0C8h+var_A8]
mov rsi, [rsp+0C8h+var_A0]
call JS_IsUndefined
cmp eax, 0
jnz short loc_137C6
mov rdi, [rsp+0C8h+var_28]
mov rdx, [rsp+0C8h+var_A8]
mov rcx, [rsp+0C8h+var_A0]
lea rsi, [rsp+0C8h+var_90]
call JS_ToIndex
cmp eax, 0
jz short loc_137AE
mov dword ptr [rsp+0C8h+var_10], 0
mov [rsp+0C8h+var_8], 6
jmp loc_138A3
loc_137AE:
mov rax, [rsp+0C8h+var_90]
cmp rax, [rsp+0C8h+var_98]
jnb short loc_137C4
mov rax, [rsp+0C8h+var_90]
mov [rsp+0C8h+var_98], rax
loc_137C4:
jmp short $+2
loc_137C6:
mov rdi, [rsp+0C8h+var_28]
lea rsi, [rsp+0C8h+var_78]
call js_std_dbuf_init
loc_137D8:
cmp [rsp+0C8h+var_98], 0
jz short loc_1384C
mov rdi, [rsp+0C8h+var_40]
call _fgetc
mov [rsp+0C8h+var_44], eax
cmp [rsp+0C8h+var_44], 0FFFFFFFFh
jnz short loc_13800
jmp short loc_1384C
loc_13800:
mov eax, [rsp+0C8h+var_44]
lea rdi, [rsp+0C8h+var_78]
movzx esi, al
call dbuf_putc
cmp eax, 0
jz short loc_1383C
lea rdi, [rsp+0C8h+var_78]
call dbuf_free
mov dword ptr [rsp+0C8h+var_10], 0
mov [rsp+0C8h+var_8], 6
jmp short loc_138A3
loc_1383C:
mov rax, [rsp+0C8h+var_98]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rsp+0C8h+var_98], rax
jmp short loc_137D8
loc_1384C:
mov rdi, [rsp+0C8h+var_28]
mov rsi, [rsp+0C8h+var_78]
mov rdx, [rsp+0C8h+var_70]
call JS_NewStringLen
mov [rsp+0C8h+var_C8], rax
mov [rsp+0C8h+var_C0], rdx
mov rax, [rsp+0C8h+var_C8]
mov [rsp+0C8h+var_88], rax
mov rax, [rsp+0C8h+var_C0]
mov [rsp+0C8h+var_80], rax
lea rdi, [rsp+0C8h+var_78]
call dbuf_free
mov rax, [rsp+0C8h+var_88]
mov [rsp+0C8h+var_10], rax
mov rax, [rsp+0C8h+var_80]
mov [rsp+0C8h+var_8], rax
loc_138A3:
mov rax, [rsp+0C8h+var_10]
mov rdx, [rsp+0C8h+var_8]
add rsp, 0C8h
retn
|
long long js_std_file_readAsString(long long a1, long long a2, long long a3, int a4, long long *a5)
{
long long v5; // rdx
long long v7; // [rsp+10h] [rbp-B8h]
long long v8; // [rsp+20h] [rbp-A8h]
long long v9; // [rsp+28h] [rbp-A0h]
long long v10; // [rsp+30h] [rbp-98h]
long long v11; // [rsp+38h] [rbp-90h] BYREF
long long v12; // [rsp+40h] [rbp-88h]
long long v13; // [rsp+48h] [rbp-80h]
_QWORD v14[6]; // [rsp+50h] [rbp-78h] BYREF
int v15; // [rsp+84h] [rbp-44h]
long long v16; // [rsp+88h] [rbp-40h]
long long *v17; // [rsp+90h] [rbp-38h]
int v18; // [rsp+9Ch] [rbp-2Ch]
long long v19; // [rsp+A0h] [rbp-28h]
long long v20; // [rsp+A8h] [rbp-20h]
long long v21; // [rsp+B0h] [rbp-18h]
long long v22; // [rsp+B8h] [rbp-10h]
long long v23; // [rsp+C0h] [rbp-8h]
v20 = a2;
v21 = a3;
v19 = a1;
v18 = a4;
v17 = a5;
v16 = js_std_file_get(a1, a2, a3);
if ( v16 )
{
if ( v18 < 1 )
{
LODWORD(v7) = 0;
v8 = v7;
v9 = 3LL;
}
else
{
v8 = *v17;
v9 = v17[1];
}
v10 = -1LL;
if ( !JS_IsUndefined(v8, v9) )
{
if ( (unsigned int)JS_ToIndex(v19, &v11, v8, v9) )
{
LODWORD(v22) = 0;
v23 = 6LL;
return v22;
}
if ( v11 != -1 )
v10 = v11;
}
js_std_dbuf_init(v19, v14);
while ( v10 )
{
v15 = fgetc(v16);
if ( v15 == -1 )
break;
if ( (unsigned int)dbuf_putc(v14, (unsigned __int8)v15) )
{
dbuf_free(v14);
LODWORD(v22) = 0;
v23 = 6LL;
return v22;
}
--v10;
}
v12 = JS_NewStringLen(v19, v14[0], v14[1]);
v13 = v5;
dbuf_free(v14);
v22 = v12;
v23 = v13;
}
else
{
LODWORD(v22) = 0;
v23 = 6LL;
}
return v22;
}
|
js_std_file_readAsString:
SUB RSP,0xc8
MOV qword ptr [RSP + 0xa8],RSI
MOV qword ptr [RSP + 0xb0],RDX
MOV qword ptr [RSP + 0xa0],RDI
MOV dword ptr [RSP + 0x9c],ECX
MOV qword ptr [RSP + 0x90],R8
MOV RDI,qword ptr [RSP + 0xa0]
MOV RSI,qword ptr [RSP + 0xa8]
MOV RDX,qword ptr [RSP + 0xb0]
CALL 0x00113a80
MOV qword ptr [RSP + 0x88],RAX
CMP qword ptr [RSP + 0x88],0x0
JNZ 0x0011370a
MOV dword ptr [RSP + 0xb8],0x0
MOV qword ptr [RSP + 0xc0],0x6
JMP 0x001138a3
LAB_0011370a:
CMP dword ptr [RSP + 0x9c],0x1
JL 0x0011372f
MOV RAX,qword ptr [RSP + 0x90]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP + 0x20],RCX
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x28],RAX
JMP 0x00113754
LAB_0011372f:
MOV dword ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x18],0x3
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x28],RAX
LAB_00113754:
MOV qword ptr [RSP + 0x30],-0x1
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x00111930
CMP EAX,0x0
JNZ 0x001137c6
MOV RDI,qword ptr [RSP + 0xa0]
MOV RDX,qword ptr [RSP + 0x20]
MOV RCX,qword ptr [RSP + 0x28]
LEA RSI,[RSP + 0x38]
CALL 0x00139140
CMP EAX,0x0
JZ 0x001137ae
MOV dword ptr [RSP + 0xb8],0x0
MOV qword ptr [RSP + 0xc0],0x6
JMP 0x001138a3
LAB_001137ae:
MOV RAX,qword ptr [RSP + 0x38]
CMP RAX,qword ptr [RSP + 0x30]
JNC 0x001137c4
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x30],RAX
LAB_001137c4:
JMP 0x001137c6
LAB_001137c6:
MOV RDI,qword ptr [RSP + 0xa0]
LEA RSI,[RSP + 0x50]
CALL 0x00114750
LAB_001137d8:
CMP qword ptr [RSP + 0x30],0x0
JZ 0x0011384c
MOV RDI,qword ptr [RSP + 0x88]
CALL 0x0010e390
MOV dword ptr [RSP + 0x84],EAX
CMP dword ptr [RSP + 0x84],-0x1
JNZ 0x00113800
JMP 0x0011384c
LAB_00113800:
MOV EAX,dword ptr [RSP + 0x84]
LEA RDI,[RSP + 0x50]
MOVZX ESI,AL
CALL 0x0011e6d0
CMP EAX,0x0
JZ 0x0011383c
LEA RDI,[RSP + 0x50]
CALL 0x0011e930
MOV dword ptr [RSP + 0xb8],0x0
MOV qword ptr [RSP + 0xc0],0x6
JMP 0x001138a3
LAB_0011383c:
MOV RAX,qword ptr [RSP + 0x30]
ADD RAX,-0x1
MOV qword ptr [RSP + 0x30],RAX
JMP 0x001137d8
LAB_0011384c:
MOV RDI,qword ptr [RSP + 0xa0]
MOV RSI,qword ptr [RSP + 0x50]
MOV RDX,qword ptr [RSP + 0x58]
CALL 0x00128270
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],RDX
MOV RAX,qword ptr [RSP]
MOV qword ptr [RSP + 0x40],RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x48],RAX
LEA RDI,[RSP + 0x50]
CALL 0x0011e930
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0xb8],RAX
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0xc0],RAX
LAB_001138a3:
MOV RAX,qword ptr [RSP + 0xb8]
MOV RDX,qword ptr [RSP + 0xc0]
ADD RSP,0xc8
RET
|
int1 [16]
js_std_file_readAsString
(int8 param_1,int8 param_2,int8 param_3,int param_4,long *param_5)
{
int1 auVar1 [16];
int iVar2;
uint uStack_b4;
long local_a8;
long local_a0;
long local_98;
long local_90;
int1 local_88 [16];
int8 local_78;
int8 local_70;
uint local_44;
FILE *local_40;
long *local_38;
int local_2c;
int8 local_28;
int8 local_20;
int8 local_18;
int4 local_10;
int4 uStack_c;
int8 local_8;
local_38 = param_5;
local_2c = param_4;
local_28 = param_1;
local_20 = param_2;
local_18 = param_3;
local_40 = (FILE *)js_std_file_get(param_1,param_2,param_3);
if (local_40 == (FILE *)0x0) {
local_10 = 0;
local_8 = 6;
}
else {
if (local_2c < 1) {
local_a8 = (ulong)uStack_b4 << 0x20;
local_a0 = 3;
}
else {
local_a8 = *local_38;
local_a0 = local_38[1];
}
local_98 = -1;
iVar2 = JS_IsUndefined(local_a8,local_a0);
if (iVar2 == 0) {
iVar2 = JS_ToIndex(local_28,&local_90,local_a8,local_a0);
if (iVar2 != 0) {
local_10 = 0;
local_8 = 6;
goto LAB_001138a3;
}
if (local_90 != -1) {
local_98 = local_90;
}
}
js_std_dbuf_init(local_28,&local_78);
while ((local_98 != 0 && (local_44 = fgetc(local_40), local_44 != 0xffffffff))) {
iVar2 = dbuf_putc(&local_78,local_44 & 0xff);
if (iVar2 != 0) {
dbuf_free(&local_78);
local_10 = 0;
local_8 = 6;
goto LAB_001138a3;
}
local_98 = local_98 + -1;
}
local_88 = JS_NewStringLen(local_28,local_78,local_70);
dbuf_free(&local_78);
local_10 = local_88._0_4_;
uStack_c = local_88._4_4_;
local_8 = local_88._8_8_;
}
LAB_001138a3:
auVar1._4_4_ = uStack_c;
auVar1._0_4_ = local_10;
auVar1._8_8_ = local_8;
return auVar1;
}
|
|
57,590
|
js_std_file_readAsString
|
bluesky950520[P]quickjs/quickjs-libc.c
|
static JSValue js_std_file_readAsString(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
FILE *f = js_std_file_get(ctx, this_val);
int c;
DynBuf dbuf;
JSValue obj;
uint64_t max_size64;
size_t max_size;
JSValue max_size_val;
if (!f)
return JS_EXCEPTION;
if (argc >= 1)
max_size_val = argv[0];
else
max_size_val = JS_UNDEFINED;
max_size = (size_t)-1;
if (!JS_IsUndefined(max_size_val)) {
if (JS_ToIndex(ctx, &max_size64, max_size_val))
return JS_EXCEPTION;
if (max_size64 < max_size)
max_size = max_size64;
}
js_std_dbuf_init(ctx, &dbuf);
while (max_size != 0) {
c = fgetc(f);
if (c == EOF)
break;
if (dbuf_putc(&dbuf, c)) {
dbuf_free(&dbuf);
return JS_EXCEPTION;
}
max_size--;
}
obj = JS_NewStringLen(ctx, (const char *)dbuf.buf, dbuf.size);
dbuf_free(&dbuf);
return obj;
}
|
O1
|
c
|
js_std_file_readAsString:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, %r12
movl %ecx, %ebp
movq %rdi, %r14
callq 0x16588
movl $0x6, %ebx
testq %rax, %rax
je 0x164ec
movq %rax, %r15
testl %ebp, %ebp
jle 0x1643d
movq (%r12), %rdx
movq 0x8(%r12), %rcx
jmp 0x16444
movl $0x3, %ecx
xorl %edx, %edx
movq $-0x1, %r13
cmpl $0x3, %ecx
je 0x16467
movq %rsp, %rsi
movq %r14, %rdi
callq 0x27a6f
testl %eax, %eax
jne 0x164ec
movq (%rsp), %r13
movq %r14, %rdi
callq 0x1fd7e
leaq 0x664c(%rip), %rdx # 0x1cac2
leaq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x1b32b
testq %r13, %r13
je 0x164ae
leaq 0x8(%rsp), %r12
movq %r15, %rdi
callq 0xe390
cmpl $-0x1, %eax
je 0x164ae
movzbl %al, %esi
movq %r12, %rdi
callq 0x1b4d0
testl %eax, %eax
jne 0x164e2
decq %r13
jne 0x1648d
leaq 0x8(%rsp), %r15
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %r14, %rdi
callq 0x1ff07
movq %rax, %r14
movq %rdx, %rbx
movq %r15, %rdi
callq 0x1b62a
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
andq %r14, %rcx
movl %r14d, %eax
jmp 0x164f0
leaq 0x8(%rsp), %rdi
callq 0x1b62a
xorl %eax, %eax
xorl %ecx, %ecx
orq %rcx, %rax
movq %rbx, %rdx
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
js_std_file_readAsString:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r12, r8
mov ebp, ecx
mov r14, rdi
call js_std_file_get
mov ebx, 6
test rax, rax
jz loc_164EC
mov r15, rax
test ebp, ebp
jle short loc_1643D
mov rdx, [r12]
mov rcx, [r12+8]
jmp short loc_16444
loc_1643D:
mov ecx, 3
xor edx, edx
loc_16444:
mov r13, 0FFFFFFFFFFFFFFFFh
cmp ecx, 3
jz short loc_16467
mov rsi, rsp
mov rdi, r14
call JS_ToIndex
test eax, eax
jnz loc_164EC
mov r13, [rsp+68h+var_68]
loc_16467:
mov rdi, r14
call JS_GetRuntime
lea rdx, js_realloc_rt
lea rdi, [rsp+68h+var_60]
mov rsi, rax
call dbuf_init2
test r13, r13
jz short loc_164AE
lea r12, [rsp+68h+var_60]
loc_1648D:
mov rdi, r15
call _fgetc
cmp eax, 0FFFFFFFFh
jz short loc_164AE
movzx esi, al
mov rdi, r12
call dbuf_putc
test eax, eax
jnz short loc_164E2
dec r13
jnz short loc_1648D
loc_164AE:
lea r15, [rsp+68h+var_60]
mov rsi, [r15]
mov rdx, [r15+8]
mov rdi, r14
call JS_NewStringLen
mov r14, rax
mov rbx, rdx
mov rdi, r15
call dbuf_free
mov rcx, 0FFFFFFFF00000000h
and rcx, r14
mov eax, r14d
jmp short loc_164F0
loc_164E2:
lea rdi, [rsp+68h+var_60]
call dbuf_free
loc_164EC:
xor eax, eax
xor ecx, ecx
loc_164F0:
or rax, rcx
mov rdx, rbx
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
unsigned long long js_std_file_readAsString(long long a1, long long a2, long long a3, int a4, long long *a5)
{
long long v7; // rax
long long v8; // r15
long long v9; // rdx
long long v10; // rcx
long long v11; // r13
long long Runtime; // rax
int v13; // eax
long long v14; // r14
unsigned long long v15; // rcx
long long v16; // rax
long long v18; // [rsp+0h] [rbp-68h] BYREF
_QWORD v19[12]; // [rsp+8h] [rbp-60h] BYREF
v7 = js_std_file_get(a1);
if ( !v7 )
goto LABEL_14;
v8 = v7;
if ( a4 <= 0 )
{
v10 = 3LL;
v9 = 0LL;
}
else
{
v9 = *a5;
v10 = a5[1];
}
v11 = -1LL;
if ( (_DWORD)v10 == 3 )
goto LABEL_8;
if ( (unsigned int)JS_ToIndex(a1, &v18, v9, v10) )
{
LABEL_14:
v16 = 0LL;
v15 = 0LL;
return v15 | v16;
}
v11 = v18;
LABEL_8:
Runtime = JS_GetRuntime(a1);
dbuf_init2(v19, Runtime, js_realloc_rt);
for ( ; v11; --v11 )
{
v13 = fgetc(v8);
if ( v13 == -1 )
break;
if ( (unsigned int)dbuf_putc(v19, (unsigned __int8)v13) )
{
dbuf_free(v19);
goto LABEL_14;
}
}
v14 = JS_NewStringLen(a1, v19[0], v19[1]);
dbuf_free(v19);
v15 = v14 & 0xFFFFFFFF00000000LL;
v16 = (unsigned int)v14;
return v15 | v16;
}
|
js_std_file_readAsString:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R12,R8
MOV EBP,ECX
MOV R14,RDI
CALL 0x00116588
MOV EBX,0x6
TEST RAX,RAX
JZ 0x001164ec
MOV R15,RAX
TEST EBP,EBP
JLE 0x0011643d
MOV RDX,qword ptr [R12]
MOV RCX,qword ptr [R12 + 0x8]
JMP 0x00116444
LAB_0011643d:
MOV ECX,0x3
XOR EDX,EDX
LAB_00116444:
MOV R13,-0x1
CMP ECX,0x3
JZ 0x00116467
MOV RSI,RSP
MOV RDI,R14
CALL 0x00127a6f
TEST EAX,EAX
JNZ 0x001164ec
MOV R13,qword ptr [RSP]
LAB_00116467:
MOV RDI,R14
CALL 0x0011fd7e
LEA RDX,[0x11cac2]
LEA RDI,[RSP + 0x8]
MOV RSI,RAX
CALL 0x0011b32b
TEST R13,R13
JZ 0x001164ae
LEA R12,[RSP + 0x8]
LAB_0011648d:
MOV RDI,R15
CALL 0x0010e390
CMP EAX,-0x1
JZ 0x001164ae
MOVZX ESI,AL
MOV RDI,R12
CALL 0x0011b4d0
TEST EAX,EAX
JNZ 0x001164e2
DEC R13
JNZ 0x0011648d
LAB_001164ae:
LEA R15,[RSP + 0x8]
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
MOV RDI,R14
CALL 0x0011ff07
MOV R14,RAX
MOV RBX,RDX
MOV RDI,R15
CALL 0x0011b62a
MOV RCX,-0x100000000
AND RCX,R14
MOV EAX,R14D
JMP 0x001164f0
LAB_001164e2:
LEA RDI,[RSP + 0x8]
CALL 0x0011b62a
LAB_001164ec:
XOR EAX,EAX
XOR ECX,ECX
LAB_001164f0:
OR RAX,RCX
MOV RDX,RBX
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16]
js_std_file_readAsString
(int8 param_1,int8 param_2,int8 param_3,int param_4,int8 *param_5)
{
int iVar1;
uint uVar2;
FILE *__stream;
int8 uVar3;
ulong uVar4;
ulong uVar5;
int8 uVar6;
long lVar7;
int1 auVar8 [16];
long local_68;
int8 local_60;
int8 local_58;
__stream = (FILE *)js_std_file_get();
uVar6 = 6;
if (__stream != (FILE *)0x0) {
if (param_4 < 1) {
iVar1 = 3;
uVar3 = 0;
}
else {
uVar3 = *param_5;
iVar1 = (int)param_5[1];
}
lVar7 = -1;
if ((iVar1 == 3) || (iVar1 = JS_ToIndex(param_1,&local_68,uVar3), lVar7 = local_68, iVar1 == 0))
{
uVar3 = JS_GetRuntime(param_1);
dbuf_init2(&local_60,uVar3,js_realloc_rt);
if (lVar7 != 0) {
do {
uVar2 = fgetc(__stream);
if (uVar2 == 0xffffffff) break;
iVar1 = dbuf_putc(&local_60,uVar2 & 0xff);
if (iVar1 != 0) {
dbuf_free(&local_60);
goto LAB_001164ec;
}
lVar7 = lVar7 + -1;
} while (lVar7 != 0);
}
auVar8 = JS_NewStringLen(param_1,local_60,local_58);
uVar6 = auVar8._8_8_;
dbuf_free(&local_60);
uVar5 = auVar8._0_8_ & 0xffffffff00000000;
uVar4 = auVar8._0_8_ & 0xffffffff;
goto LAB_001164f0;
}
}
LAB_001164ec:
uVar4 = 0;
uVar5 = 0;
LAB_001164f0:
auVar8._0_8_ = uVar4 | uVar5;
auVar8._8_8_ = uVar6;
return auVar8;
}
|
|
57,591
|
js_std_file_readAsString
|
bluesky950520[P]quickjs/quickjs-libc.c
|
static JSValue js_std_file_readAsString(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
FILE *f = js_std_file_get(ctx, this_val);
int c;
DynBuf dbuf;
JSValue obj;
uint64_t max_size64;
size_t max_size;
JSValue max_size_val;
if (!f)
return JS_EXCEPTION;
if (argc >= 1)
max_size_val = argv[0];
else
max_size_val = JS_UNDEFINED;
max_size = (size_t)-1;
if (!JS_IsUndefined(max_size_val)) {
if (JS_ToIndex(ctx, &max_size64, max_size_val))
return JS_EXCEPTION;
if (max_size64 < max_size)
max_size = max_size64;
}
js_std_dbuf_init(ctx, &dbuf);
while (max_size != 0) {
c = fgetc(f);
if (c == EOF)
break;
if (dbuf_putc(&dbuf, c)) {
dbuf_free(&dbuf);
return JS_EXCEPTION;
}
max_size--;
}
obj = JS_NewStringLen(ctx, (const char *)dbuf.buf, dbuf.size);
dbuf_free(&dbuf);
return obj;
}
|
O2
|
c
|
js_std_file_readAsString:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, %r12
movl %ecx, %ebp
movq %rdi, %r14
callq 0x113c6
pushq $0x6
popq %rbx
testq %rax, %rax
je 0x112e3
movq %rax, %r15
pushq $-0x1
popq %r13
testl %ebp, %ebp
jle 0x112a5
movq 0x8(%r12), %rcx
cmpl $0x3, %ecx
je 0x112a5
movq (%r12), %rdx
movq %rsp, %rsi
movq %r14, %rdi
callq 0x21680
testl %eax, %eax
jne 0x112e3
movq (%rsp), %r13
leaq 0x8(%rsp), %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x11a50
incq %r13
decq %r13
je 0x112e9
movq %r15, %rdi
callq 0xe3a0
cmpl $-0x1, %eax
je 0x112e9
movzbl %al, %esi
movq %r12, %rdi
callq 0x15d33
testl %eax, %eax
je 0x112b8
leaq 0x8(%rsp), %rdi
callq 0x15e89
xorl %eax, %eax
xorl %ecx, %ecx
jmp 0x1131b
leaq 0x8(%rsp), %r15
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %r14, %rdi
callq 0x1a2ea
movq %rax, %r14
movq %rdx, %rbx
movq %r15, %rdi
callq 0x15e89
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
andq %r14, %rcx
movl %r14d, %eax
orq %rcx, %rax
movq %rbx, %rdx
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
js_std_file_readAsString:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r12, r8
mov ebp, ecx
mov r14, rdi
call js_std_file_get
push 6
pop rbx
test rax, rax
jz short loc_112E3
mov r15, rax
push 0FFFFFFFFFFFFFFFFh
pop r13
test ebp, ebp
jle short loc_112A5
mov rcx, [r12+8]
cmp ecx, 3
jz short loc_112A5
mov rdx, [r12]
mov rsi, rsp
mov rdi, r14
call JS_ToIndex
test eax, eax
jnz short loc_112E3
mov r13, [rsp+68h+var_68]
loc_112A5:
lea r12, [rsp+68h+var_60]
mov rdi, r14
mov rsi, r12
call js_std_dbuf_init
inc r13
loc_112B8:
dec r13
jz short loc_112E9
mov rdi, r15
call _fgetc
cmp eax, 0FFFFFFFFh
jz short loc_112E9
movzx esi, al
mov rdi, r12
call dbuf_putc
test eax, eax
jz short loc_112B8
lea rdi, [rsp+68h+var_60]
call dbuf_free
loc_112E3:
xor eax, eax
xor ecx, ecx
jmp short loc_1131B
loc_112E9:
lea r15, [rsp+68h+var_60]
mov rsi, [r15]
mov rdx, [r15+8]
mov rdi, r14
call JS_NewStringLen
mov r14, rax
mov rbx, rdx
mov rdi, r15
call dbuf_free
mov rcx, 0FFFFFFFF00000000h
and rcx, r14
mov eax, r14d
loc_1131B:
or rax, rcx
mov rdx, rbx
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
unsigned long long js_std_file_readAsString(long long a1, long long a2, long long a3, int a4, _QWORD *a5)
{
long long v7; // rax
long long v8; // r15
long long v9; // r13
long long v10; // rcx
long long v11; // r13
int v12; // eax
long long v13; // rax
unsigned long long v14; // rcx
long long v15; // r14
long long v17; // [rsp+0h] [rbp-68h] BYREF
_QWORD v18[12]; // [rsp+8h] [rbp-60h] BYREF
v7 = js_std_file_get(a1);
if ( !v7 )
goto LABEL_11;
v8 = v7;
v9 = -1LL;
if ( a4 > 0 )
{
v10 = a5[1];
if ( (_DWORD)v10 != 3 )
{
if ( !(unsigned int)JS_ToIndex(a1, &v17, *a5, v10) )
{
v9 = v17;
goto LABEL_6;
}
LABEL_11:
v13 = 0LL;
v14 = 0LL;
return v14 | v13;
}
}
LABEL_6:
js_std_dbuf_init(a1, v18);
v11 = v9 + 1;
while ( --v11 )
{
v12 = fgetc(v8);
if ( v12 == -1 )
break;
if ( (unsigned int)dbuf_putc(v18, (unsigned __int8)v12) )
{
dbuf_free(v18);
goto LABEL_11;
}
}
v15 = JS_NewStringLen(a1, v18[0], v18[1]);
dbuf_free(v18);
v14 = v15 & 0xFFFFFFFF00000000LL;
v13 = (unsigned int)v15;
return v14 | v13;
}
|
js_std_file_readAsString:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R12,R8
MOV EBP,ECX
MOV R14,RDI
CALL 0x001113c6
PUSH 0x6
POP RBX
TEST RAX,RAX
JZ 0x001112e3
MOV R15,RAX
PUSH -0x1
POP R13
TEST EBP,EBP
JLE 0x001112a5
MOV RCX,qword ptr [R12 + 0x8]
CMP ECX,0x3
JZ 0x001112a5
MOV RDX,qword ptr [R12]
MOV RSI,RSP
MOV RDI,R14
CALL 0x00121680
TEST EAX,EAX
JNZ 0x001112e3
MOV R13,qword ptr [RSP]
LAB_001112a5:
LEA R12,[RSP + 0x8]
MOV RDI,R14
MOV RSI,R12
CALL 0x00111a50
INC R13
LAB_001112b8:
DEC R13
JZ 0x001112e9
MOV RDI,R15
CALL 0x0010e3a0
CMP EAX,-0x1
JZ 0x001112e9
MOVZX ESI,AL
MOV RDI,R12
CALL 0x00115d33
TEST EAX,EAX
JZ 0x001112b8
LEA RDI,[RSP + 0x8]
CALL 0x00115e89
LAB_001112e3:
XOR EAX,EAX
XOR ECX,ECX
JMP 0x0011131b
LAB_001112e9:
LEA R15,[RSP + 0x8]
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
MOV RDI,R14
CALL 0x0011a2ea
MOV R14,RAX
MOV RBX,RDX
MOV RDI,R15
CALL 0x00115e89
MOV RCX,-0x100000000
AND RCX,R14
MOV EAX,R14D
LAB_0011131b:
OR RAX,RCX
MOV RDX,RBX
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16]
js_std_file_readAsString
(int8 param_1,int8 param_2,int8 param_3,int param_4,int8 *param_5)
{
int iVar1;
uint uVar2;
FILE *__stream;
ulong uVar3;
ulong uVar4;
int8 uVar5;
long lVar6;
int1 auVar7 [16];
long local_68;
int8 local_60;
int8 local_58;
__stream = (FILE *)js_std_file_get();
uVar5 = 6;
if ((__stream != (FILE *)0x0) &&
(((lVar6 = -1, param_4 < 1 || ((int)param_5[1] == 3)) ||
(iVar1 = JS_ToIndex(param_1,&local_68,*param_5), lVar6 = local_68, iVar1 == 0)))) {
js_std_dbuf_init(param_1,&local_60);
lVar6 = lVar6 + 1;
do {
lVar6 = lVar6 + -1;
if ((lVar6 == 0) || (uVar2 = fgetc(__stream), uVar2 == 0xffffffff)) {
auVar7 = JS_NewStringLen(param_1,local_60,local_58);
uVar5 = auVar7._8_8_;
dbuf_free(&local_60);
uVar4 = auVar7._0_8_ & 0xffffffff00000000;
uVar3 = auVar7._0_8_ & 0xffffffff;
goto LAB_0011131b;
}
iVar1 = dbuf_putc(&local_60,uVar2 & 0xff);
} while (iVar1 == 0);
dbuf_free(&local_60);
}
uVar3 = 0;
uVar4 = 0;
LAB_0011131b:
auVar7._0_8_ = uVar3 | uVar4;
auVar7._8_8_ = uVar5;
return auVar7;
}
|
|
57,592
|
translog_put_sector_protection
|
eloqsql/storage/maria/ma_loghandler.c
|
static void translog_put_sector_protection(uchar *page,
struct st_buffer_cursor *cursor)
{
uchar *table= page + log_descriptor.page_overhead -
TRANSLOG_PAGE_SIZE / DISK_DRIVE_SECTOR_SIZE;
uint i, offset;
uint16 last_protected_sector= ((cursor->previous_offset - 1) /
DISK_DRIVE_SECTOR_SIZE);
uint16 start_sector= cursor->previous_offset / DISK_DRIVE_SECTOR_SIZE;
uint8 value= table[0] + cursor->write_counter;
DBUG_ENTER("translog_put_sector_protection");
if (start_sector == 0)
{
/* First sector is protected by file & page numbers in the page header. */
start_sector= 1;
}
DBUG_PRINT("enter", ("Write counter:%u value:%u offset:%u, "
"last protected:%u start sector:%u",
(uint) cursor->write_counter,
(uint) value,
(uint) cursor->previous_offset,
(uint) last_protected_sector, (uint) start_sector));
if (last_protected_sector == start_sector)
{
i= last_protected_sector;
offset= last_protected_sector * DISK_DRIVE_SECTOR_SIZE;
/* restore data, because we modified sector which was protected */
if (offset < cursor->previous_offset)
page[offset]= table[i];
}
for (i= start_sector, offset= start_sector * DISK_DRIVE_SECTOR_SIZE;
i < TRANSLOG_PAGE_SIZE / DISK_DRIVE_SECTOR_SIZE;
i++, (offset+= DISK_DRIVE_SECTOR_SIZE))
{
DBUG_PRINT("info", ("sector:%u offset:%u data 0x%x",
i, offset, (uint) page[offset]));
table[i]= page[offset];
page[offset]= value;
DBUG_PRINT("info", ("sector:%u offset:%u data 0x%x",
i, offset, (uint) page[offset]));
}
DBUG_VOID_RETURN;
}
|
O3
|
c
|
translog_put_sector_protection:
movzwl 0x39be4c(%rip), %eax # 0x40be84
movl $0xffff, %r9d # imm = 0xFFFF
andl %r9d, %edx
leal 0x1ffffff(%rdx), %ecx
shrl $0x9, %ecx
movl %edx, %r10d
shrl $0x9, %r10d
addb -0x10(%rdi,%rax), %sil
cmpl $0x200, %edx # imm = 0x200
movl $0x1, %r8d
cmovael %r10d, %r8d
cmpw %cx, %r8w
jne 0x7008a
andl %r9d, %ecx
movl %ecx, %r9d
shll $0x9, %r9d
cmpl %edx, %r9d
jae 0x7008a
leaq (%rdi,%rax), %rdx
addq $-0x10, %rdx
movb (%rdx,%rcx), %cl
movb %cl, (%rdi,%r9)
cmpw $0xf, %r8w
ja 0x700bd
pushq %rbp
movq %rsp, %rbp
addq %rdi, %rax
movzwl %r8w, %edx
leaq -0x10(%rdx), %rcx
shll $0x9, %edx
addq %rdi, %rdx
movb (%rdx), %dil
movb %dil, (%rax,%rcx)
movb %sil, (%rdx)
addq $0x200, %rdx # imm = 0x200
incq %rcx
jne 0x700a6
popq %rbp
retq
|
translog_put_sector_protection:
movzx eax, cs:word_40BE84
mov r9d, 0FFFFh
and edx, r9d
lea ecx, [rdx+1FFFFFFh]
shr ecx, 9
mov r10d, edx
shr r10d, 9
add sil, [rdi+rax-10h]
cmp edx, 200h
mov r8d, 1
cmovnb r8d, r10d
cmp r8w, cx
jnz short loc_7008A
and ecx, r9d
mov r9d, ecx
shl r9d, 9
cmp r9d, edx
jnb short loc_7008A
lea rdx, [rdi+rax]
add rdx, 0FFFFFFFFFFFFFFF0h
mov cl, [rdx+rcx]
mov [rdi+r9], cl
loc_7008A:
cmp r8w, 0Fh
ja short locret_700BD
push rbp
mov rbp, rsp
add rax, rdi
movzx edx, r8w
lea rcx, [rdx-10h]
shl edx, 9
add rdx, rdi
loc_700A6:
mov dil, [rdx]
mov [rax+rcx], dil
mov [rdx], sil
add rdx, 200h
inc rcx
jnz short loc_700A6
pop rbp
locret_700BD:
retn
|
long long translog_put_sector_protection(long long a1, char a2, unsigned __int16 a3)
{
long long result; // rax
char v4; // si
unsigned __int16 v5; // r8
long long v6; // rcx
long long v7; // r9
long long v8; // rcx
_BYTE *v9; // rdx
result = (unsigned __int16)word_40BE84;
v4 = *(_BYTE *)(a1 + (unsigned __int16)word_40BE84 - 16) + a2;
v5 = 1;
if ( a3 >= 0x200u )
v5 = a3 >> 9;
if ( v5 == (unsigned __int16)(((unsigned int)a3 + 0x1FFFFFF) >> 9) )
{
v6 = (unsigned __int16)(((unsigned int)a3 + 0x1FFFFFF) >> 9);
v7 = (unsigned int)((_DWORD)v6 << 9);
if ( (unsigned int)v7 < a3 )
*(_BYTE *)(a1 + v7) = *(_BYTE *)(a1 + (unsigned __int16)word_40BE84 - 16 + v6);
}
if ( v5 <= 0xFu )
{
result += a1;
v8 = v5 - 16LL;
v9 = (_BYTE *)(a1 + (v5 << 9));
do
{
*(_BYTE *)(result + v8) = *v9;
*v9 = v4;
v9 += 512;
++v8;
}
while ( v8 );
}
return result;
}
|
translog_put_sector_protection:
MOVZX EAX,word ptr [0x0050be84]
MOV R9D,0xffff
AND EDX,R9D
LEA ECX,[RDX + 0x1ffffff]
SHR ECX,0x9
MOV R10D,EDX
SHR R10D,0x9
ADD SIL,byte ptr [RDI + RAX*0x1 + -0x10]
CMP EDX,0x200
MOV R8D,0x1
CMOVNC R8D,R10D
CMP R8W,CX
JNZ 0x0017008a
AND ECX,R9D
MOV R9D,ECX
SHL R9D,0x9
CMP R9D,EDX
JNC 0x0017008a
LEA RDX,[RDI + RAX*0x1]
ADD RDX,-0x10
MOV CL,byte ptr [RDX + RCX*0x1]
MOV byte ptr [RDI + R9*0x1],CL
LAB_0017008a:
CMP R8W,0xf
JA 0x001700bd
PUSH RBP
MOV RBP,RSP
ADD RAX,RDI
MOVZX EDX,R8W
LEA RCX,[RDX + -0x10]
SHL EDX,0x9
ADD RDX,RDI
LAB_001700a6:
MOV DIL,byte ptr [RDX]
MOV byte ptr [RAX + RCX*0x1],DIL
MOV byte ptr [RDX],SIL
ADD RDX,0x200
INC RCX
JNZ 0x001700a6
POP RBP
LAB_001700bd:
RET
|
void translog_put_sector_protection(long param_1,char param_2,uint param_3)
{
char cVar1;
ulong uVar2;
uint uVar3;
long lVar4;
char *pcVar5;
uint uVar6;
uint uVar7;
uVar2 = (ulong)DAT_0050be84;
param_3 = param_3 & 0xffff;
uVar3 = param_3 + 0x1ffffff >> 9;
cVar1 = *(char *)(param_1 + -0x10 + uVar2);
uVar6 = 1;
if (0x1ff < param_3) {
uVar6 = param_3 >> 9;
}
if ((ushort)uVar6 == (ushort)uVar3) {
uVar3 = uVar3 & 0xffff;
uVar7 = uVar3 << 9;
if (uVar7 < param_3) {
*(int1 *)(param_1 + (ulong)uVar7) =
*(int1 *)(param_1 + uVar2 + -0x10 + (ulong)uVar3);
}
}
if ((ushort)uVar6 < 0x10) {
lVar4 = (ulong)uVar6 - 0x10;
pcVar5 = (char *)((ulong)(uVar6 << 9) + param_1);
do {
*(char *)(uVar2 + param_1 + lVar4) = *pcVar5;
*pcVar5 = param_2 + cVar1;
pcVar5 = pcVar5 + 0x200;
lVar4 = lVar4 + 1;
} while (lVar4 != 0);
}
return;
}
|
|
57,593
|
google::protobuf::DescriptorPool::Tables::AddSymbol(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, google::protobuf::Symbol)
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
|
bool DescriptorPool::Tables::AddSymbol(const std::string& full_name,
Symbol symbol) {
GOOGLE_DCHECK_EQ(full_name, symbol.full_name());
if (symbols_by_name_.insert(symbol).second) {
symbols_after_checkpoint_.push_back(symbol);
return true;
} else {
return false;
}
}
|
O3
|
cpp
|
google::protobuf::DescriptorPool::Tables::AddSymbol(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, google::protobuf::Symbol):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %rdi
movq %rdx, (%rdi)
leaq 0x128(%rbx), %r12
callq 0x3dc9e
testq %rdx, %rdx
jle 0x1d0e1
addq %rax, %rdx
xorl %r15d, %r15d
leaq (%r15,%r15,4), %rcx
movsbq (%rax), %r15
addq %rcx, %r15
incq %rax
cmpq %rdx, %rax
jb 0x1d0cc
jmp 0x1d0e4
xorl %r15d, %r15d
movq %r15, %rax
xorl %edx, %edx
divq 0x130(%rbx)
movq %rdx, %rbp
leaq 0x8(%rsp), %rdx
movq %r12, %rdi
movq %rbp, %rsi
movq %r15, %rcx
callq 0x3aee0
testq %rax, %rax
je 0x1d118
cmpq $0x0, (%rax)
je 0x1d118
xorl %eax, %eax
jmp 0x1d2ce
movl $0x18, %edi
callq 0xf350
movq %rax, %r14
movq $0x0, (%rax)
movq 0x8(%rsp), %rax
movq %rax, 0x8(%r14)
leaq 0x148(%rbx), %rdi
movq 0x150(%rbx), %rax
movq %rax, 0x10(%rsp)
movq 0x130(%rbx), %rsi
movq 0x140(%rbx), %rdx
movl $0x1, %ecx
callq 0xf420
testb $0x1, %al
je 0x1d236
movq %rdx, %r13
cmpq $0x1, %rdx
je 0x1d2dd
leaq 0x7(%rsp), %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x1379a
movq %rax, %r12
leaq (,%r13,8), %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0xf1d0
movq 0x138(%rbx), %rsi
movq $0x0, 0x138(%rbx)
testq %rsi, %rsi
je 0x1d203
leaq 0x138(%rbx), %rcx
xorl %r8d, %r8d
movq (%rsi), %rdi
movq 0x10(%rsi), %rax
xorl %edx, %edx
divq %r13
movq (%r12,%rdx,8), %rax
testq %rax, %rax
je 0x1d1de
movq (%rax), %rax
movq %rax, (%rsi)
movq (%r12,%rdx,8), %rax
movq %r8, %rdx
jmp 0x1d1f5
movq (%rcx), %rax
movq %rax, (%rsi)
movq %rsi, (%rcx)
movq %rcx, (%r12,%rdx,8)
cmpq $0x0, (%rsi)
je 0x1d1f8
leaq (%r12,%r8,8), %rax
movq %rsi, (%rax)
movq %rdi, %rsi
movq %rdx, %r8
testq %rdi, %rdi
jne 0x1d1ba
movq 0x128(%rbx), %rdi
leaq 0x158(%rbx), %rax
cmpq %rdi, %rax
je 0x1d21b
callq 0xf330
movq %r13, 0x130(%rbx)
movq %r12, 0x128(%rbx)
movq %r15, %rax
xorl %edx, %edx
divq %r13
movq %rdx, %rbp
jmp 0x1d23a
movq (%r12), %r12
movq %r15, 0x10(%r14)
movq (%r12,%rbp,8), %rax
testq %rax, %rax
je 0x1d256
movq (%rax), %rax
movq %rax, (%r14)
movq (%r12,%rbp,8), %rax
movq %r14, (%rax)
jmp 0x1d28f
leaq 0x138(%rbx), %rcx
movq 0x138(%rbx), %rax
movq %rax, (%r14)
movq %r14, 0x138(%rbx)
testq %rax, %rax
je 0x1d28b
movq 0x10(%rax), %rax
xorl %edx, %edx
divq 0x130(%rbx)
movq %r14, (%r12,%rdx,8)
movq 0x128(%rbx), %r12
movq %rcx, (%r12,%rbp,8)
incq 0x140(%rbx)
movq 0x1e8(%rbx), %rsi
cmpq 0x1f0(%rbx), %rsi
je 0x1d2b8
movq 0x8(%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x1e8(%rbx)
jmp 0x1d2cc
addq $0x1e0, %rbx # imm = 0x1E0
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x41d66
movb $0x1, %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x158(%rbx), %r12
movq $0x0, 0x158(%rbx)
jmp 0x1d199
movq %rax, %rdi
callq 0xf170
movq 0x10(%rsp), %rax
movq %rax, 0x150(%rbx)
callq 0xf4a0
movq %rax, %rbx
callq 0xf510
jmp 0x1d322
movq %rax, %rdi
callq 0x13387
movq %rax, %rbx
movq %r14, %rdi
callq 0xf330
movq %rbx, %rdi
callq 0xf570
|
_ZN6google8protobuf14DescriptorPool6Tables9AddSymbolERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_6SymbolE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdi
lea rdi, [rsp+48h+var_40]; this
mov [rdi], rdx
lea r12, [rbx+128h]
call _ZNK6google8protobuf6Symbol9full_nameEv; google::protobuf::Symbol::full_name(void)
test rdx, rdx
jle short loc_1D0E1
add rdx, rax
xor r15d, r15d
loc_1D0CC:
lea rcx, [r15+r15*4]
movsx r15, byte ptr [rax]
add r15, rcx
inc rax
cmp rax, rdx
jb short loc_1D0CC
jmp short loc_1D0E4
loc_1D0E1:
xor r15d, r15d
loc_1D0E4:
mov rax, r15
xor edx, edx
div qword ptr [rbx+130h]
mov rbp, rdx
lea rdx, [rsp+48h+var_40]
mov rdi, r12
mov rsi, rbp
mov rcx, r15
call _ZNKSt10_HashtableIN6google8protobuf6SymbolES2_SaIS2_ENSt8__detail9_IdentityENS1_12_GLOBAL__N_118SymbolByFullNameEqENS6_20SymbolByFullNameHashENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb1ELb1ELb1EEEE19_M_find_before_nodeEmRKS2_m; std::_Hashtable<google::protobuf::Symbol,google::protobuf::Symbol,std::allocator<google::protobuf::Symbol>,std::__detail::_Identity,google::protobuf::`anonymous namespace'::SymbolByFullNameEq,google::protobuf::`anonymous namespace'::SymbolByFullNameHash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::_M_find_before_node(ulong,google::protobuf::Symbol const&,ulong)
test rax, rax
jz short loc_1D118
cmp qword ptr [rax], 0
jz short loc_1D118
xor eax, eax
jmp loc_1D2CE
loc_1D118:
mov edi, 18h; unsigned __int64
call __Znwm; operator new(ulong)
mov r14, rax
mov qword ptr [rax], 0
mov rax, [rsp+48h+var_40]
mov [r14+8], rax
lea rdi, [rbx+148h]; this
mov rax, [rbx+150h]
mov [rsp+48h+var_38], rax
mov rsi, [rbx+130h]; unsigned __int64
mov rdx, [rbx+140h]; unsigned __int64
mov ecx, 1; unsigned __int64
call __ZNKSt8__detail20_Prime_rehash_policy14_M_need_rehashEmmm; std::__detail::_Prime_rehash_policy::_M_need_rehash(ulong,ulong,ulong)
test al, 1
jz loc_1D236
mov r13, rdx
cmp rdx, 1
jz loc_1D2DD
lea rdi, [rsp+48h+var_41]
mov rsi, r13
xor edx, edx
call _ZN9__gnu_cxx13new_allocatorIPNSt8__detail15_Hash_node_baseEE8allocateEmPKv; __gnu_cxx::new_allocator<std::__detail::_Hash_node_base *>::allocate(ulong,void const*)
mov r12, rax
lea rdx, ds:0[r13*8]
mov rdi, rax
xor esi, esi
call _memset
loc_1D199:
mov rsi, [rbx+138h]
mov qword ptr [rbx+138h], 0
test rsi, rsi
jz short loc_1D203
lea rcx, [rbx+138h]
xor r8d, r8d
loc_1D1BA:
mov rdi, [rsi]
mov rax, [rsi+10h]
xor edx, edx
div r13
mov rax, [r12+rdx*8]
test rax, rax
jz short loc_1D1DE
mov rax, [rax]
mov [rsi], rax
mov rax, [r12+rdx*8]
mov rdx, r8
jmp short loc_1D1F5
loc_1D1DE:
mov rax, [rcx]
mov [rsi], rax
mov [rcx], rsi
mov [r12+rdx*8], rcx
cmp qword ptr [rsi], 0
jz short loc_1D1F8
lea rax, [r12+r8*8]
loc_1D1F5:
mov [rax], rsi
loc_1D1F8:
mov rsi, rdi
mov r8, rdx
test rdi, rdi
jnz short loc_1D1BA
loc_1D203:
mov rdi, [rbx+128h]; void *
lea rax, [rbx+158h]
cmp rax, rdi
jz short loc_1D21B
call __ZdlPv; operator delete(void *)
loc_1D21B:
mov [rbx+130h], r13
mov [rbx+128h], r12
mov rax, r15
xor edx, edx
div r13
mov rbp, rdx
jmp short loc_1D23A
loc_1D236:
mov r12, [r12]
loc_1D23A:
mov [r14+10h], r15
mov rax, [r12+rbp*8]
test rax, rax
jz short loc_1D256
mov rax, [rax]
mov [r14], rax
mov rax, [r12+rbp*8]
mov [rax], r14
jmp short loc_1D28F
loc_1D256:
lea rcx, [rbx+138h]
mov rax, [rbx+138h]
mov [r14], rax
mov [rbx+138h], r14
test rax, rax
jz short loc_1D28B
mov rax, [rax+10h]
xor edx, edx
div qword ptr [rbx+130h]
mov [r12+rdx*8], r14
mov r12, [rbx+128h]
loc_1D28B:
mov [r12+rbp*8], rcx
loc_1D28F:
inc qword ptr [rbx+140h]
mov rsi, [rbx+1E8h]
cmp rsi, [rbx+1F0h]
jz short loc_1D2B8
mov rax, [rsp+48h+var_40]
mov [rsi], rax
add qword ptr [rbx+1E8h], 8
jmp short loc_1D2CC
loc_1D2B8:
add rbx, 1E0h
lea rdx, [rsp+48h+var_40]
mov rdi, rbx
call _ZNSt6vectorIN6google8protobuf6SymbolESaIS2_EE17_M_realloc_insertIJRKS2_EEEvN9__gnu_cxx17__normal_iteratorIPS2_S4_EEDpOT_; std::vector<google::protobuf::Symbol>::_M_realloc_insert<google::protobuf::Symbol const&>(__gnu_cxx::__normal_iterator<google::protobuf::Symbol*,std::vector<google::protobuf::Symbol>>,google::protobuf::Symbol const&)
loc_1D2CC:
mov al, 1
loc_1D2CE:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_1D2DD:
lea r12, [rbx+158h]
mov qword ptr [rbx+158h], 0
jmp loc_1D199
mov rdi, rax; void *
call ___cxa_begin_catch
mov rax, [rsp+48h+var_38]
mov [rbx+150h], rax
call ___cxa_rethrow
mov rbx, rax
call ___cxa_end_catch
jmp short loc_1D322
mov rdi, rax
call __clang_call_terminate
mov rbx, rax
loc_1D322:
mov rdi, r14; void *
call __ZdlPv; operator delete(void *)
mov rdi, rbx
call __Unwind_Resume
|
char google::protobuf::DescriptorPool::Tables::AddSymbol(_QWORD *a1, long long a2, long long a3)
{
char *v4; // rax
long long v5; // rdx
char *v6; // rdx
unsigned long long v7; // r15
unsigned long long v8; // rbp
_QWORD *v9; // rax
_QWORD *v11; // r14
unsigned long long v12; // rdx
_QWORD *v13; // rcx
unsigned long long v14; // r8
unsigned long long v15; // r13
long long v16; // r12
_QWORD *v17; // rsi
_QWORD *v18; // rdi
unsigned long long v19; // rdx
_QWORD *v20; // rax
_QWORD *v21; // rax
_QWORD *v22; // rdi
_QWORD *v23; // rax
long long v24; // rax
_QWORD *v25; // rsi
char v26; // [rsp+7h] [rbp-41h] BYREF
_QWORD v27[8]; // [rsp+8h] [rbp-40h] BYREF
v27[0] = a3;
v4 = (char *)google::protobuf::Symbol::full_name((google::protobuf::Symbol *)v27);
if ( v5 <= 0 )
{
v7 = 0LL;
}
else
{
v6 = &v4[v5];
v7 = 0LL;
do
v7 = 5 * v7 + *v4++;
while ( v4 < v6 );
}
v8 = v7 % a1[38];
v9 = (_QWORD *)std::_Hashtable<google::protobuf::Symbol,google::protobuf::Symbol,std::allocator<google::protobuf::Symbol>,std::__detail::_Identity,google::protobuf::`anonymous namespace'::SymbolByFullNameEq,google::protobuf::`anonymous namespace'::SymbolByFullNameHash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::_M_find_before_node(
a1 + 37,
v8,
v27);
if ( v9 && *v9 )
return 0;
v11 = (_QWORD *)operator new(0x18uLL);
*v11 = 0LL;
v11[1] = v27[0];
v27[1] = a1[42];
if ( (std::__detail::_Prime_rehash_policy::_M_need_rehash(
(std::__detail::_Prime_rehash_policy *)(a1 + 41),
a1[38],
a1[40],
1uLL) & 1) != 0 )
{
v15 = v12;
if ( v12 == 1 )
{
v16 = (long long)(a1 + 43);
a1[43] = 0LL;
}
else
{
v16 = __gnu_cxx::new_allocator<std::__detail::_Hash_node_base *>::allocate((long long)&v26, v12);
memset(v16, 0LL, 8 * v15);
}
v17 = (_QWORD *)a1[39];
a1[39] = 0LL;
if ( v17 )
{
v13 = a1 + 39;
v14 = 0LL;
while ( 1 )
{
v18 = (_QWORD *)*v17;
v19 = v17[2] % v15;
v20 = *(_QWORD **)(v16 + 8 * v19);
if ( v20 )
break;
*v17 = *v13;
*v13 = v17;
*(_QWORD *)(v16 + 8 * v19) = v13;
if ( *v17 )
{
v21 = (_QWORD *)(v16 + 8 * v14);
goto LABEL_18;
}
LABEL_19:
v17 = v18;
v14 = v19;
if ( !v18 )
goto LABEL_20;
}
*v17 = *v20;
v21 = *(_QWORD **)(v16 + 8 * v19);
v19 = v14;
LABEL_18:
*v21 = v17;
goto LABEL_19;
}
LABEL_20:
v22 = (_QWORD *)a1[37];
if ( a1 + 43 != v22 )
operator delete(v22);
a1[38] = v15;
a1[37] = v16;
v8 = v7 % v15;
}
else
{
v16 = a1[37];
}
v11[2] = v7;
v23 = *(_QWORD **)(v16 + 8 * v8);
if ( v23 )
{
*v11 = *v23;
**(_QWORD **)(v16 + 8 * v8) = v11;
}
else
{
v13 = a1 + 39;
v24 = a1[39];
*v11 = v24;
a1[39] = v11;
if ( v24 )
{
*(_QWORD *)(v16 + 8LL * (*(_QWORD *)(v24 + 16) % a1[38])) = v11;
v16 = a1[37];
}
*(_QWORD *)(v16 + 8 * v8) = v13;
}
++a1[40];
v25 = (_QWORD *)a1[61];
if ( v25 == (_QWORD *)a1[62] )
{
std::vector<google::protobuf::Symbol>::_M_realloc_insert<google::protobuf::Symbol const&>(
a1 + 60,
v25,
v27,
v13,
v14);
}
else
{
*v25 = v27[0];
a1[61] += 8LL;
}
return 1;
}
|
AddSymbol:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
LEA RDI,[RSP + 0x8]
MOV qword ptr [RDI],RDX
LEA R12,[RBX + 0x128]
CALL 0x0013dc9e
TEST RDX,RDX
JLE 0x0011d0e1
ADD RDX,RAX
XOR R15D,R15D
LAB_0011d0cc:
LEA RCX,[R15 + R15*0x4]
MOVSX R15,byte ptr [RAX]
ADD R15,RCX
INC RAX
CMP RAX,RDX
JC 0x0011d0cc
JMP 0x0011d0e4
LAB_0011d0e1:
XOR R15D,R15D
LAB_0011d0e4:
MOV RAX,R15
XOR EDX,EDX
DIV qword ptr [RBX + 0x130]
MOV RBP,RDX
LEA RDX,[RSP + 0x8]
MOV RDI,R12
MOV RSI,RBP
MOV RCX,R15
CALL 0x0013aee0
TEST RAX,RAX
JZ 0x0011d118
CMP qword ptr [RAX],0x0
JZ 0x0011d118
XOR EAX,EAX
JMP 0x0011d2ce
LAB_0011d118:
MOV EDI,0x18
CALL 0x0010f350
MOV R14,RAX
MOV qword ptr [RAX],0x0
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [R14 + 0x8],RAX
LEA RDI,[RBX + 0x148]
MOV RAX,qword ptr [RBX + 0x150]
MOV qword ptr [RSP + 0x10],RAX
MOV RSI,qword ptr [RBX + 0x130]
MOV RDX,qword ptr [RBX + 0x140]
LAB_0011d156:
MOV ECX,0x1
CALL 0x0010f420
TEST AL,0x1
JZ 0x0011d236
MOV R13,RDX
CMP RDX,0x1
JZ 0x0011d2dd
LAB_0011d175:
LEA RDI,[RSP + 0x7]
MOV RSI,R13
XOR EDX,EDX
CALL 0x0011379a
LAB_0011d184:
MOV R12,RAX
LEA RDX,[R13*0x8]
MOV RDI,RAX
XOR ESI,ESI
CALL 0x0010f1d0
LAB_0011d199:
MOV RSI,qword ptr [RBX + 0x138]
MOV qword ptr [RBX + 0x138],0x0
TEST RSI,RSI
JZ 0x0011d203
LEA RCX,[RBX + 0x138]
XOR R8D,R8D
LAB_0011d1ba:
MOV RDI,qword ptr [RSI]
MOV RAX,qword ptr [RSI + 0x10]
XOR EDX,EDX
DIV R13
MOV RAX,qword ptr [R12 + RDX*0x8]
TEST RAX,RAX
JZ 0x0011d1de
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSI],RAX
MOV RAX,qword ptr [R12 + RDX*0x8]
MOV RDX,R8
JMP 0x0011d1f5
LAB_0011d1de:
MOV RAX,qword ptr [RCX]
MOV qword ptr [RSI],RAX
MOV qword ptr [RCX],RSI
MOV qword ptr [R12 + RDX*0x8],RCX
CMP qword ptr [RSI],0x0
JZ 0x0011d1f8
LEA RAX,[R12 + R8*0x8]
LAB_0011d1f5:
MOV qword ptr [RAX],RSI
LAB_0011d1f8:
MOV RSI,RDI
MOV R8,RDX
TEST RDI,RDI
JNZ 0x0011d1ba
LAB_0011d203:
MOV RDI,qword ptr [RBX + 0x128]
LEA RAX,[RBX + 0x158]
CMP RAX,RDI
JZ 0x0011d21b
CALL 0x0010f330
LAB_0011d21b:
MOV qword ptr [RBX + 0x130],R13
MOV qword ptr [RBX + 0x128],R12
MOV RAX,R15
XOR EDX,EDX
DIV R13
MOV RBP,RDX
JMP 0x0011d23a
LAB_0011d236:
MOV R12,qword ptr [R12]
LAB_0011d23a:
MOV qword ptr [R14 + 0x10],R15
MOV RAX,qword ptr [R12 + RBP*0x8]
TEST RAX,RAX
JZ 0x0011d256
MOV RAX,qword ptr [RAX]
MOV qword ptr [R14],RAX
MOV RAX,qword ptr [R12 + RBP*0x8]
MOV qword ptr [RAX],R14
JMP 0x0011d28f
LAB_0011d256:
LEA RCX,[RBX + 0x138]
MOV RAX,qword ptr [RBX + 0x138]
MOV qword ptr [R14],RAX
MOV qword ptr [RBX + 0x138],R14
TEST RAX,RAX
JZ 0x0011d28b
MOV RAX,qword ptr [RAX + 0x10]
XOR EDX,EDX
DIV qword ptr [RBX + 0x130]
MOV qword ptr [R12 + RDX*0x8],R14
MOV R12,qword ptr [RBX + 0x128]
LAB_0011d28b:
MOV qword ptr [R12 + RBP*0x8],RCX
LAB_0011d28f:
INC qword ptr [RBX + 0x140]
MOV RSI,qword ptr [RBX + 0x1e8]
CMP RSI,qword ptr [RBX + 0x1f0]
JZ 0x0011d2b8
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSI],RAX
ADD qword ptr [RBX + 0x1e8],0x8
JMP 0x0011d2cc
LAB_0011d2b8:
ADD RBX,0x1e0
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
CALL 0x00141d66
LAB_0011d2cc:
MOV AL,0x1
LAB_0011d2ce:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0011d2dd:
LEA R12,[RBX + 0x158]
MOV qword ptr [RBX + 0x158],0x0
JMP 0x0011d199
|
/* google::protobuf::DescriptorPool::Tables::AddSymbol(std::__cxx11::string const&,
google::protobuf::Symbol) */
int8 __thiscall
google::protobuf::DescriptorPool::Tables::AddSymbol(Tables *this,int8 param_2,long param_3)
{
Tables *pTVar1;
long *plVar2;
long lVar3;
char *pcVar4;
long *plVar5;
Tables *__s;
Tables *pTVar6;
int8 uVar7;
char *pcVar8;
ulong uVar9;
void *pvVar10;
ulong uVar11;
long *plVar12;
ulong uVar13;
int1 auVar14 [16];
int1 local_41;
long local_40;
int8 local_38;
local_40 = param_3;
auVar14 = Symbol::full_name((Symbol *)&local_40);
pcVar4 = auVar14._0_8_;
if (auVar14._8_8_ < 1) {
uVar13 = 0;
}
else {
pcVar8 = pcVar4 + auVar14._8_8_;
uVar13 = 0;
do {
uVar13 = (long)*pcVar4 + uVar13 * 5;
pcVar4 = pcVar4 + 1;
} while (pcVar4 < pcVar8);
}
uVar9 = uVar13 % *(ulong *)(this + 0x130);
plVar5 = (long *)std::
_Hashtable<google::protobuf::Symbol,google::protobuf::Symbol,std::allocator<google::protobuf::Symbol>,std::__detail::_Identity,google::protobuf::(anonymous_namespace)::SymbolByFullNameEq,google::protobuf::(anonymous_namespace)::SymbolByFullNameHash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
::_M_find_before_node
((_Hashtable<google::protobuf::Symbol,google::protobuf::Symbol,std::allocator<google::protobuf::Symbol>,std::__detail::_Identity,google::protobuf::(anonymous_namespace)::SymbolByFullNameEq,google::protobuf::(anonymous_namespace)::SymbolByFullNameHash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
*)(this + 0x128),uVar9,(Symbol *)&local_40,uVar13);
if ((plVar5 == (long *)0x0) || (*plVar5 == 0)) {
plVar5 = (long *)operator_new(0x18);
*plVar5 = 0;
plVar5[1] = local_40;
local_38 = *(int8 *)(this + 0x150);
/* try { // try from 0011d156 to 0011d15f has its CatchHandler @ 0011d31f */
auVar14 = std::__detail::_Prime_rehash_policy::_M_need_rehash
((ulong)(this + 0x148),*(ulong *)(this + 0x130),*(ulong *)(this + 0x140));
pvVar10 = auVar14._8_8_;
if ((auVar14 & (int1 [16])0x1) == (int1 [16])0x0) {
__s = *(Tables **)(this + 0x128);
}
else {
if (pvVar10 == (void *)0x1) {
__s = this + 0x158;
*(int8 *)(this + 0x158) = 0;
}
else {
/* try { // try from 0011d175 to 0011d183 has its CatchHandler @ 0011d2f4 */
__s = (Tables *)
__gnu_cxx::new_allocator<std::__detail::_Hash_node_base*>::allocate
((ulong)&local_41,pvVar10);
memset(__s,0,(long)pvVar10 * 8);
}
plVar12 = *(long **)(this + 0x138);
*(int8 *)(this + 0x138) = 0;
if (plVar12 != (long *)0x0) {
pTVar1 = this + 0x138;
uVar9 = 0;
do {
plVar2 = (long *)*plVar12;
uVar11 = (ulong)plVar12[2] % (ulong)pvVar10;
if (*(long **)(__s + uVar11 * 8) == (long *)0x0) {
*plVar12 = *(long *)pTVar1;
*(long **)pTVar1 = plVar12;
*(Tables **)(__s + uVar11 * 8) = pTVar1;
if (*plVar12 != 0) {
pTVar6 = __s + uVar9 * 8;
goto LAB_0011d1f5;
}
}
else {
*plVar12 = **(long **)(__s + uVar11 * 8);
pTVar6 = *(Tables **)(__s + uVar11 * 8);
uVar11 = uVar9;
LAB_0011d1f5:
*(long **)pTVar6 = plVar12;
}
plVar12 = plVar2;
uVar9 = uVar11;
} while (plVar2 != (long *)0x0);
}
if (this + 0x158 != *(Tables **)(this + 0x128)) {
operator_delete(*(Tables **)(this + 0x128));
}
*(void **)(this + 0x130) = pvVar10;
*(Tables **)(this + 0x128) = __s;
uVar9 = uVar13 % (ulong)pvVar10;
}
plVar5[2] = uVar13;
if (*(long **)(__s + uVar9 * 8) == (long *)0x0) {
lVar3 = *(long *)(this + 0x138);
*plVar5 = lVar3;
*(long **)(this + 0x138) = plVar5;
if (lVar3 != 0) {
*(long **)(__s + (*(ulong *)(lVar3 + 0x10) % *(ulong *)(this + 0x130)) * 8) = plVar5;
__s = *(Tables **)(this + 0x128);
}
*(Tables **)(__s + uVar9 * 8) = this + 0x138;
}
else {
*plVar5 = **(long **)(__s + uVar9 * 8);
**(int8 **)(__s + uVar9 * 8) = plVar5;
}
*(long *)(this + 0x140) = *(long *)(this + 0x140) + 1;
plVar5 = *(long **)(this + 0x1e8);
if (plVar5 == *(long **)(this + 0x1f0)) {
std::vector<google::protobuf::Symbol,std::allocator<google::protobuf::Symbol>>::
_M_realloc_insert<google::protobuf::Symbol_const&>
((vector<google::protobuf::Symbol,std::allocator<google::protobuf::Symbol>> *)
(this + 0x1e0),plVar5,&local_40);
}
else {
*plVar5 = local_40;
*(long *)(this + 0x1e8) = *(long *)(this + 0x1e8) + 8;
}
uVar7 = 1;
}
else {
uVar7 = 0;
}
return uVar7;
}
|
|
57,594
|
ma_unlock_key_del
|
eloqsql/storage/maria/ma_key_recover.c
|
void _ma_unlock_key_del(MARIA_HA *info)
{
DBUG_ASSERT(info->key_del_used);
if (info->key_del_used == 1) /* Ignore insert-with-append */
{
MARIA_SHARE *share= info->s;
mysql_mutex_lock(&share->key_del_lock);
share->key_del_used= 0;
share->state.key_del= share->key_del_current;
mysql_mutex_unlock(&share->key_del_lock);
mysql_cond_signal(&share->key_del_cond);
}
info->key_del_used= 0;
}
|
O0
|
c
|
ma_unlock_key_del:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
jmp 0x7298e
movq -0x8(%rbp), %rax
movzbl 0x67e(%rax), %eax
cmpl $0x1, %eax
jne 0x72a06
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
addq $0x938, %rdi # imm = 0x938
leaq 0xdfffe(%rip), %rsi # 0x1529b9
movl $0x59a, %edx # imm = 0x59A
callq 0x702d0
movq -0x10(%rbp), %rax
movb $0x0, 0x7e9(%rax)
movq -0x10(%rbp), %rax
movq 0x700(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x120(%rax)
movq -0x10(%rbp), %rdi
addq $0x938, %rdi # imm = 0x938
callq 0x70340
movq -0x10(%rbp), %rdi
addq $0x980, %rdi # imm = 0x980
callq 0x72a20
movq -0x8(%rbp), %rax
movb $0x0, 0x67e(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
_ma_unlock_key_del:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
jmp short $+2
loc_7298E:
mov rax, [rbp+var_8]
movzx eax, byte ptr [rax+67Eh]
cmp eax, 1
jnz short loc_72A06
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_10], rax
mov rdi, [rbp+var_10]
add rdi, 938h
lea rsi, aWorkspaceLlm4b_16; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 59Ah
call inline_mysql_mutex_lock_13
mov rax, [rbp+var_10]
mov byte ptr [rax+7E9h], 0
mov rax, [rbp+var_10]
mov rcx, [rax+700h]
mov rax, [rbp+var_10]
mov [rax+120h], rcx
mov rdi, [rbp+var_10]
add rdi, 938h
call inline_mysql_mutex_unlock_13
mov rdi, [rbp+var_10]
add rdi, 980h
call inline_mysql_cond_signal_0
loc_72A06:
mov rax, [rbp+var_8]
mov byte ptr [rax+67Eh], 0
add rsp, 10h
pop rbp
retn
|
long long * ma_unlock_key_del(long long *a1)
{
long long *result; // rax
long long v2; // [rsp+0h] [rbp-10h]
if ( *((_BYTE *)a1 + 1662) == 1 )
{
v2 = *a1;
inline_mysql_mutex_lock_13(
*a1 + 2360,
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_key_recover.c",
0x59Au);
*(_BYTE *)(v2 + 2025) = 0;
*(_QWORD *)(v2 + 288) = *(_QWORD *)(v2 + 1792);
inline_mysql_mutex_unlock_13(v2 + 2360);
inline_mysql_cond_signal_0(v2 + 2432);
}
result = a1;
*((_BYTE *)a1 + 1662) = 0;
return result;
}
|
_ma_unlock_key_del:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
JMP 0x0017298e
LAB_0017298e:
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,byte ptr [RAX + 0x67e]
CMP EAX,0x1
JNZ 0x00172a06
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x10],RAX
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x938
LEA RSI,[0x2529b9]
MOV EDX,0x59a
CALL 0x001702d0
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x7e9],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x700]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x120],RCX
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x938
CALL 0x00170340
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x980
CALL 0x00172a20
LAB_00172a06:
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x67e],0x0
ADD RSP,0x10
POP RBP
RET
|
void _ma_unlock_key_del(long *param_1)
{
long lVar1;
if (*(char *)((long)param_1 + 0x67e) == '\x01') {
lVar1 = *param_1;
inline_mysql_mutex_lock
(lVar1 + 0x938,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_key_recover.c",0x59a);
*(int1 *)(lVar1 + 0x7e9) = 0;
*(int8 *)(lVar1 + 0x120) = *(int8 *)(lVar1 + 0x700);
inline_mysql_mutex_unlock(lVar1 + 0x938);
inline_mysql_cond_signal(lVar1 + 0x980);
}
*(int1 *)((long)param_1 + 0x67e) = 0;
return;
}
|
|
57,595
|
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__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>>>::iteration_proxy_value(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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>>, unsigned long)
|
monkey531[P]llama/common/json.hpp
|
explicit iteration_proxy_value(IteratorType it, std::size_t array_index_ = 0)
noexcept(std::is_nothrow_move_constructible<IteratorType>::value
&& std::is_nothrow_default_constructible<string_type>::value)
: anchor(std::move(it))
, array_index(array_index_)
{}
|
O2
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__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>>>::iteration_proxy_value(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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>>, unsigned long):
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movups (%rsi), %xmm0
movups 0x10(%rsi), %xmm1
movups %xmm1, 0x10(%rdi)
movups %xmm0, (%rdi)
movq %rdx, 0x20(%rdi)
andq $0x0, 0x28(%rdi)
addq $0x30, %rdi
leaq 0x36e4a(%rip), %rsi # 0xd2b9c
leaq 0xf(%rsp), %rdx
callq 0x2b096
leaq 0x60(%rbx), %rax
movq %rax, 0x50(%rbx)
andq $0x0, 0x58(%rbx)
movb $0x0, 0x60(%rbx)
addq $0x10, %rsp
popq %rbx
retq
movq %rax, %rdi
callq 0x2b335
|
_ZN8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEEC2ESH_m:
push rbx
sub rsp, 10h
mov rbx, rdi
movups xmm0, xmmword ptr [rsi]
movups xmm1, xmmword ptr [rsi+10h]
movups xmmword ptr [rdi+10h], xmm1
movups xmmword ptr [rdi], xmm0
mov [rdi+20h], rdx
and qword ptr [rdi+28h], 0
add rdi, 30h ; '0'
lea rsi, aMinExp0+0Ah; "0"
lea rdx, [rsp+18h+var_9]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rax, [rbx+60h]
mov [rbx+50h], rax
and qword ptr [rbx+58h], 0
mov byte ptr [rbx+60h], 0
add rsp, 10h
pop rbx
retn
mov rdi, rax
call __clang_call_terminate
|
long long nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::iteration_proxy_value(
long long a1,
__int128 *a2,
long long a3)
{
__int128 v3; // xmm0
long long result; // rax
v3 = *a2;
*(_OWORD *)(a1 + 16) = a2[1];
*(_OWORD *)a1 = v3;
*(_QWORD *)(a1 + 32) = a3;
*(_QWORD *)(a1 + 40) = 0LL;
std::string::basic_string<std::allocator<char>>((_QWORD *)(a1 + 48), (long long)"0");
result = a1 + 96;
*(_QWORD *)(a1 + 80) = a1 + 96;
*(_QWORD *)(a1 + 88) = 0LL;
*(_BYTE *)(a1 + 96) = 0;
return result;
}
|
iteration_proxy_value:
PUSH RBX
SUB RSP,0x10
MOV RBX,RDI
MOVUPS XMM0,xmmword ptr [RSI]
MOVUPS XMM1,xmmword ptr [RSI + 0x10]
MOVUPS xmmword ptr [RDI + 0x10],XMM1
MOVUPS xmmword ptr [RDI],XMM0
MOV qword ptr [RDI + 0x20],RDX
AND qword ptr [RDI + 0x28],0x0
ADD RDI,0x30
LAB_0019bd4b:
LEA RSI,[0x1d2b9c]
LEA RDX,[RSP + 0xf]
CALL 0x0012b096
LEA RAX,[RBX + 0x60]
MOV qword ptr [RBX + 0x50],RAX
AND qword ptr [RBX + 0x58],0x0
MOV byte ptr [RBX + 0x60],0x0
ADD RSP,0x10
POP RBX
RET
|
/* nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >
>::iteration_proxy_value(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >, unsigned long) */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::
iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::iteration_proxy_value
(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
*this,int8 *param_2,int8 param_3)
{
int8 uVar1;
int8 uVar2;
int8 uVar3;
allocator local_9;
uVar1 = *param_2;
uVar2 = param_2[1];
uVar3 = param_2[3];
*(int8 *)(this + 0x10) = param_2[2];
*(int8 *)(this + 0x18) = uVar3;
*(int8 *)this = uVar1;
*(int8 *)(this + 8) = uVar2;
*(int8 *)(this + 0x20) = param_3;
*(int8 *)(this + 0x28) = 0;
/* try { // try from 0019bd4b to 0019bd5b has its CatchHandler @ 0019bd73 */
std::__cxx11::string::string<std::allocator<char>>((string *)(this + 0x30),"0",&local_9);
*(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
**)(this + 0x50) = this + 0x60;
*(int8 *)(this + 0x58) = 0;
this[0x60] = (iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
)0x0;
return;
}
|
|
57,596
|
mi_restore_status
|
eloqsql/storage/myisam/mi_locking.c
|
void mi_restore_status(void *param)
{
MI_INFO *info= (MI_INFO*) param;
DBUG_ENTER("mi_restore_status");
DBUG_PRINT("info",("key_file: %ld data_file: %ld",
(long) info->s->state.state.key_file_length,
(long) info->s->state.state.data_file_length));
info->state= &info->s->state.state;
info->append_insert_at_end= 0;
DBUG_VOID_RETURN;
}
|
O0
|
c
|
mi_restore_status:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0xb5952
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x18, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movb $0x0, 0x33a(%rax)
jmp 0xb5972
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
mi_restore_status:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
jmp short $+2
loc_B5952:
mov rax, [rbp+var_10]
mov rcx, [rax]
add rcx, 18h
mov rax, [rbp+var_10]
mov [rax+8], rcx
mov rax, [rbp+var_10]
mov byte ptr [rax+33Ah], 0
jmp short $+2
loc_B5972:
pop rbp
retn
|
long long mi_restore_status(long long a1)
{
long long result; // rax
*(_QWORD *)(a1 + 8) = *(_QWORD *)a1 + 24LL;
result = a1;
*(_BYTE *)(a1 + 826) = 0;
return result;
}
|
mi_restore_status:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
JMP 0x001b5952
LAB_001b5952:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
ADD RCX,0x18
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x33a],0x0
JMP 0x001b5972
LAB_001b5972:
POP RBP
RET
|
void mi_restore_status(long *param_1)
{
param_1[1] = *param_1 + 0x18;
*(int1 *)((long)param_1 + 0x33a) = 0;
return;
}
|
|
57,597
|
ma_ft_erase
|
eloqsql/storage/maria/ma_ft_update.c
|
static int _ma_ft_erase(MARIA_HA *info, uint keynr, uchar *keybuf,
FT_WORD *wlist, my_off_t filepos)
{
uint err=0;
DBUG_ENTER("_ma_ft_erase");
for (; wlist->pos; wlist++)
{
MARIA_KEY key;
_ma_ft_make_key(info, &key, keynr, keybuf, wlist, filepos);
if (_ma_ck_delete(info, &key))
err=1;
}
DBUG_RETURN(err);
}
|
O3
|
c
|
ma_ft_erase:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
cmpq $0x0, (%rcx)
je 0x6aa29
movq %r8, %r12
movq %rcx, %r15
movq %rdx, %r14
movq %rdi, -0x38(%rbp)
xorl %r13d, %r13d
movl %esi, -0x2c(%rbp)
movq -0x38(%rbp), %rbx
movq %rbx, %rdi
leaq -0x58(%rbp), %rsi
movl -0x2c(%rbp), %edx
movq %r14, %rcx
movq %r15, %r8
movq %r12, %r9
callq 0x6a911
movq %rbx, %rdi
leaq -0x58(%rbp), %rsi
callq 0x6752d
testb %al, %al
movl $0x1, %eax
cmovnel %eax, %r13d
cmpq $0x0, 0x18(%r15)
leaq 0x18(%r15), %r15
jne 0x6a9ed
jmp 0x6aa2c
xorl %r13d, %r13d
movl %r13d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
_ma_ft_erase:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
cmp qword ptr [rcx], 0
jz short loc_6AA29
mov r12, r8
mov r15, rcx
mov r14, rdx
mov [rbp+var_38], rdi
xor r13d, r13d
mov [rbp+var_2C], esi
mov rbx, [rbp+var_38]
loc_6A9ED:
mov rdi, rbx
lea rsi, [rbp+var_58]
mov edx, [rbp+var_2C]
mov rcx, r14
mov r8, r15
mov r9, r12
call _ma_ft_make_key
mov rdi, rbx
lea rsi, [rbp+var_58]
call _ma_ck_delete
test al, al
mov eax, 1
cmovnz r13d, eax
cmp qword ptr [r15+18h], 0
lea r15, [r15+18h]
jnz short loc_6A9ED
jmp short loc_6AA2C
loc_6AA29:
xor r13d, r13d
loc_6AA2C:
mov eax, r13d
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long ma_ft_erase(_DWORD *a1, unsigned int a2, char *a3, _QWORD *a4, long long a5, __m128i a6)
{
long long v7; // r15
unsigned int v9; // r13d
bool v10; // zf
long long v12[5]; // [rsp+8h] [rbp-58h] BYREF
unsigned int v13; // [rsp+34h] [rbp-2Ch]
if ( *a4 )
{
v7 = (long long)a4;
v12[4] = (long long)a1;
v9 = 0;
v13 = a2;
do
{
ma_ft_make_key(a1, (long long)v12, v13, a3, v7, a5, a6);
if ( ma_ck_delete((_QWORD **)a1, v12) )
v9 = 1;
v10 = *(_QWORD *)(v7 + 24) == 0LL;
v7 += 24LL;
}
while ( !v10 );
}
else
{
return 0;
}
return v9;
}
|
_ma_ft_erase:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
CMP qword ptr [RCX],0x0
JZ 0x0016aa29
MOV R12,R8
MOV R15,RCX
MOV R14,RDX
MOV qword ptr [RBP + -0x38],RDI
XOR R13D,R13D
MOV dword ptr [RBP + -0x2c],ESI
MOV RBX,qword ptr [RBP + -0x38]
LAB_0016a9ed:
MOV RDI,RBX
LEA RSI,[RBP + -0x58]
MOV EDX,dword ptr [RBP + -0x2c]
MOV RCX,R14
MOV R8,R15
MOV R9,R12
CALL 0x0016a911
MOV RDI,RBX
LEA RSI,[RBP + -0x58]
CALL 0x0016752d
TEST AL,AL
MOV EAX,0x1
CMOVNZ R13D,EAX
CMP qword ptr [R15 + 0x18],0x0
LEA R15,[R15 + 0x18]
JNZ 0x0016a9ed
JMP 0x0016aa2c
LAB_0016aa29:
XOR R13D,R13D
LAB_0016aa2c:
MOV EAX,R13D
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int4
_ma_ft_erase(int8 param_1,int4 param_2,int8 param_3,long *param_4,
int8 param_5)
{
long *plVar1;
char cVar2;
int4 uVar3;
int1 local_60 [32];
int8 local_40;
int4 local_34;
if (*param_4 == 0) {
uVar3 = 0;
}
else {
uVar3 = 0;
local_40 = param_1;
local_34 = param_2;
do {
_ma_ft_make_key(param_1,local_60,local_34,param_3,param_4,param_5);
cVar2 = _ma_ck_delete(param_1,local_60);
if (cVar2 != '\0') {
uVar3 = 1;
}
plVar1 = param_4 + 3;
param_4 = param_4 + 3;
} while (*plVar1 != 0);
}
return uVar3;
}
|
|
57,598
|
minja::SliceExpr::~SliceExpr()
|
monkey531[P]llama/common/minja.hpp
|
SliceExpr(const Location & location, std::shared_ptr<Expression> && s, std::shared_ptr<Expression> && e)
: Expression(location), start(std::move(s)), end(std::move(e)) {}
|
O3
|
cpp
|
minja::SliceExpr::~SliceExpr():
pushq %rbx
movq %rdi, %rbx
leaq 0x9c94b(%rip), %rax # 0x12c6c8
addq $0x10, %rax
movq %rax, (%rdi)
movq 0x38(%rdi), %rdi
testq %rdi, %rdi
je 0x8fd92
callq 0x6dfc6
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x8fda0
callq 0x6dfc6
leaq 0x9c5f1(%rip), %rax # 0x12c398
addq $0x10, %rax
movq %rax, (%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x8fdbc
callq 0x6dfc6
movl $0x40, %esi
movq %rbx, %rdi
popq %rbx
jmp 0x1b8c0
|
_ZN5minja9SliceExprD0Ev:
push rbx
mov rbx, rdi
lea rax, _ZTVN5minja9SliceExprE; `vtable for'minja::SliceExpr
add rax, 10h
mov [rdi], rax
mov rdi, [rdi+38h]
test rdi, rdi
jz short loc_8FD92
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_8FD92:
mov rdi, [rbx+28h]
test rdi, rdi
jz short loc_8FDA0
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_8FDA0:
lea rax, _ZTVN5minja10ExpressionE; `vtable for'minja::Expression
add rax, 10h
mov [rbx], rax
mov rdi, [rbx+10h]
test rdi, rdi
jz short loc_8FDBC
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_8FDBC:
mov esi, 40h ; '@'; unsigned __int64
mov rdi, rbx; void *
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
|
void minja::SliceExpr::~SliceExpr(minja::SliceExpr *this)
{
volatile signed __int32 *v2; // rdi
volatile signed __int32 *v3; // rdi
volatile signed __int32 *v4; // rdi
*(_QWORD *)this = &`vtable for'minja::SliceExpr + 2;
v2 = (volatile signed __int32 *)*((_QWORD *)this + 7);
if ( v2 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v2);
v3 = (volatile signed __int32 *)*((_QWORD *)this + 5);
if ( v3 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3);
*(_QWORD *)this = &`vtable for'minja::Expression + 2;
v4 = (volatile signed __int32 *)*((_QWORD *)this + 2);
if ( v4 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v4);
operator delete(this, 0x40uLL);
}
|
~SliceExpr:
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x22c6c8]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0x38]
TEST RDI,RDI
JZ 0x0018fd92
CALL 0x0016dfc6
LAB_0018fd92:
MOV RDI,qword ptr [RBX + 0x28]
TEST RDI,RDI
JZ 0x0018fda0
CALL 0x0016dfc6
LAB_0018fda0:
LEA RAX,[0x22c398]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
MOV RDI,qword ptr [RBX + 0x10]
TEST RDI,RDI
JZ 0x0018fdbc
CALL 0x0016dfc6
LAB_0018fdbc:
MOV ESI,0x40
MOV RDI,RBX
POP RBX
JMP 0x0011b8c0
|
/* minja::SliceExpr::~SliceExpr() */
void __thiscall minja::SliceExpr::~SliceExpr(SliceExpr *this)
{
*(int ***)this = &PTR_do_evaluate_0022c6d8;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38));
}
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x28) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x28));
}
*(int ***)this = &PTR___cxa_pure_virtual_0022c3a8;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x10) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x10));
}
operator_delete(this,0x40);
return;
}
|
|
57,599
|
escape_string_for_mysql
|
eloqsql/mysys/charset.c
|
size_t escape_string_for_mysql(CHARSET_INFO *charset_info,
char *to, size_t to_length,
const char *from, size_t length,
my_bool *overflow)
{
const char *to_start= to;
const char *end, *to_end=to_start + (to_length ? to_length-1 : 2*length);
*overflow= FALSE;
for (end= from + length; from < end; from++)
{
char escape= 0;
#ifdef USE_MB
int tmp_length= my_ci_charlen(charset_info, (const uchar *) from, (const uchar *) end);
if (tmp_length > 1)
{
if (to + tmp_length > to_end)
{
*overflow= TRUE;
break;
}
while (tmp_length--)
*to++= *from++;
from--;
continue;
}
/*
If the next character appears to begin a multi-byte character, we
escape that first byte of that apparent multi-byte character. (The
character just looks like a multi-byte character -- if it were actually
a multi-byte character, it would have been passed through in the test
above.)
Without this check, we can create a problem by converting an invalid
multi-byte character into a valid one. For example, 0xbf27 is not
a valid GBK character, but 0xbf5c is. (0x27 = ', 0x5c = \)
*/
if (tmp_length < 1) /* Bad byte sequence */
escape= *from;
else
#endif
switch (*from) {
case 0: /* Must be escaped for 'mysql' */
escape= '0';
break;
case '\n': /* Must be escaped for logs */
escape= 'n';
break;
case '\r':
escape= 'r';
break;
case '\\':
escape= '\\';
break;
case '\'':
escape= '\'';
break;
case '"': /* Better safe than sorry */
escape= '"';
break;
case '\032': /* This gives problems on Win32 */
escape= 'Z';
break;
}
if (escape)
{
if (to + 2 > to_end)
{
*overflow= TRUE;
break;
}
*to++= '\\';
*to++= escape;
}
else
{
if (to + 1 > to_end)
{
*overflow= TRUE;
break;
}
*to++= *from;
}
}
*to= 0;
return (size_t) (to - to_start);
}
|
O0
|
c
|
escape_string_for_mysql:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x2a915
movq -0x18(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x2a920
movq -0x28(%rbp), %rax
shlq %rax
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rax
movq -0x60(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x30(%rbp), %rax
movb $0x0, (%rax)
movq -0x20(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x2aadf
movb $0x0, -0x49(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0x2ab00
movl %eax, -0x50(%rbp)
cmpl $0x1, -0x50(%rbp)
jle 0x2a9d2
movq -0x10(%rbp), %rax
movslq -0x50(%rbp), %rcx
addq %rcx, %rax
cmpq -0x48(%rbp), %rax
jbe 0x2a98b
movq -0x30(%rbp), %rax
movb $0x1, (%rax)
jmp 0x2aadf
jmp 0x2a98d
movl -0x50(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x50(%rbp)
cmpl $0x0, %eax
je 0x2a9c1
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movb (%rax), %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
jmp 0x2a98d
movq -0x20(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x2aace
cmpl $0x1, -0x50(%rbp)
jge 0x2a9e3
movq -0x20(%rbp), %rax
movb (%rax), %al
movb %al, -0x49(%rbp)
jmp 0x2aa59
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
movl %eax, -0x64(%rbp)
testl %eax, %eax
je 0x2aa2f
jmp 0x2a9f3
movl -0x64(%rbp), %eax
subl $0xa, %eax
je 0x2aa35
jmp 0x2a9fd
movl -0x64(%rbp), %eax
subl $0xd, %eax
je 0x2aa3b
jmp 0x2aa07
movl -0x64(%rbp), %eax
subl $0x1a, %eax
je 0x2aa53
jmp 0x2aa11
movl -0x64(%rbp), %eax
subl $0x22, %eax
je 0x2aa4d
jmp 0x2aa1b
movl -0x64(%rbp), %eax
subl $0x27, %eax
je 0x2aa47
jmp 0x2aa25
movl -0x64(%rbp), %eax
subl $0x5c, %eax
je 0x2aa41
jmp 0x2aa57
movb $0x30, -0x49(%rbp)
jmp 0x2aa57
movb $0x6e, -0x49(%rbp)
jmp 0x2aa57
movb $0x72, -0x49(%rbp)
jmp 0x2aa57
movb $0x5c, -0x49(%rbp)
jmp 0x2aa57
movb $0x27, -0x49(%rbp)
jmp 0x2aa57
movb $0x22, -0x49(%rbp)
jmp 0x2aa57
movb $0x5a, -0x49(%rbp)
jmp 0x2aa59
cmpb $0x0, -0x49(%rbp)
je 0x2aa9e
movq -0x10(%rbp), %rax
addq $0x2, %rax
cmpq -0x48(%rbp), %rax
jbe 0x2aa76
movq -0x30(%rbp), %rax
movb $0x1, (%rax)
jmp 0x2aadf
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movb $0x5c, (%rax)
movb -0x49(%rbp), %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
jmp 0x2aacc
movq -0x10(%rbp), %rax
addq $0x1, %rax
cmpq -0x48(%rbp), %rax
jbe 0x2aab5
movq -0x30(%rbp), %rax
movb $0x1, (%rax)
jmp 0x2aadf
movq -0x20(%rbp), %rax
movb (%rax), %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
jmp 0x2aace
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x2a942
movq -0x10(%rbp), %rax
movb $0x0, (%rax)
movq -0x10(%rbp), %rax
movq -0x38(%rbp), %rcx
subq %rcx, %rax
addq $0x70, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
escape_string_for_mysql:
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_28], r8
mov [rbp+var_30], r9
mov rax, [rbp+var_10]
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov [rbp+var_58], rax
cmp [rbp+var_18], 0
jz short loc_2A915
mov rax, [rbp+var_18]
sub rax, 1
mov [rbp+var_60], rax
jmp short loc_2A920
loc_2A915:
mov rax, [rbp+var_28]
shl rax, 1
mov [rbp+var_60], rax
loc_2A920:
mov rax, [rbp+var_58]
mov rcx, [rbp+var_60]
add rax, rcx
mov [rbp+var_48], rax
mov rax, [rbp+var_30]
mov byte ptr [rax], 0
mov rax, [rbp+var_20]
add rax, [rbp+var_28]
mov [rbp+var_40], rax
loc_2A942:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_40]
jnb loc_2AADF
mov [rbp+var_49], 0
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_40]
call my_ci_charlen
mov [rbp+var_50], eax
cmp [rbp+var_50], 1
jle short loc_2A9D2
mov rax, [rbp+var_10]
movsxd rcx, [rbp+var_50]
add rax, rcx
cmp rax, [rbp+var_48]
jbe short loc_2A98B
mov rax, [rbp+var_30]
mov byte ptr [rax], 1
jmp loc_2AADF
loc_2A98B:
jmp short $+2
loc_2A98D:
mov eax, [rbp+var_50]
mov ecx, eax
add ecx, 0FFFFFFFFh
mov [rbp+var_50], ecx
cmp eax, 0
jz short loc_2A9C1
mov rax, [rbp+var_20]
mov rcx, rax
add rcx, 1
mov [rbp+var_20], rcx
mov cl, [rax]
mov rax, [rbp+var_10]
mov rdx, rax
add rdx, 1
mov [rbp+var_10], rdx
mov [rax], cl
jmp short loc_2A98D
loc_2A9C1:
mov rax, [rbp+var_20]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_20], rax
jmp loc_2AACE
loc_2A9D2:
cmp [rbp+var_50], 1
jge short loc_2A9E3
mov rax, [rbp+var_20]
mov al, [rax]
mov [rbp+var_49], al
jmp short loc_2AA59
loc_2A9E3:
mov rax, [rbp+var_20]
movsx eax, byte ptr [rax]
mov [rbp+var_64], eax
test eax, eax
jz short loc_2AA2F
jmp short $+2
loc_2A9F3:
mov eax, [rbp+var_64]
sub eax, 0Ah
jz short loc_2AA35
jmp short $+2
loc_2A9FD:
mov eax, [rbp+var_64]
sub eax, 0Dh
jz short loc_2AA3B
jmp short $+2
loc_2AA07:
mov eax, [rbp+var_64]
sub eax, 1Ah
jz short loc_2AA53
jmp short $+2
loc_2AA11:
mov eax, [rbp+var_64]
sub eax, 22h ; '"'
jz short loc_2AA4D
jmp short $+2
loc_2AA1B:
mov eax, [rbp+var_64]
sub eax, 27h ; '''
jz short loc_2AA47
jmp short $+2
loc_2AA25:
mov eax, [rbp+var_64]
sub eax, 5Ch ; '\'
jz short loc_2AA41
jmp short loc_2AA57
loc_2AA2F:
mov [rbp+var_49], 30h ; '0'
jmp short loc_2AA57
loc_2AA35:
mov [rbp+var_49], 6Eh ; 'n'
jmp short loc_2AA57
loc_2AA3B:
mov [rbp+var_49], 72h ; 'r'
jmp short loc_2AA57
loc_2AA41:
mov [rbp+var_49], 5Ch ; '\'
jmp short loc_2AA57
loc_2AA47:
mov [rbp+var_49], 27h ; '''
jmp short loc_2AA57
loc_2AA4D:
mov [rbp+var_49], 22h ; '"'
jmp short loc_2AA57
loc_2AA53:
mov [rbp+var_49], 5Ah ; 'Z'
loc_2AA57:
jmp short $+2
loc_2AA59:
cmp [rbp+var_49], 0
jz short loc_2AA9E
mov rax, [rbp+var_10]
add rax, 2
cmp rax, [rbp+var_48]
jbe short loc_2AA76
mov rax, [rbp+var_30]
mov byte ptr [rax], 1
jmp short loc_2AADF
loc_2AA76:
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
mov byte ptr [rax], 5Ch ; '\'
mov cl, [rbp+var_49]
mov rax, [rbp+var_10]
mov rdx, rax
add rdx, 1
mov [rbp+var_10], rdx
mov [rax], cl
jmp short loc_2AACC
loc_2AA9E:
mov rax, [rbp+var_10]
add rax, 1
cmp rax, [rbp+var_48]
jbe short loc_2AAB5
mov rax, [rbp+var_30]
mov byte ptr [rax], 1
jmp short loc_2AADF
loc_2AAB5:
mov rax, [rbp+var_20]
mov cl, [rax]
mov rax, [rbp+var_10]
mov rdx, rax
add rdx, 1
mov [rbp+var_10], rdx
mov [rax], cl
loc_2AACC:
jmp short $+2
loc_2AACE:
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
jmp loc_2A942
loc_2AADF:
mov rax, [rbp+var_10]
mov byte ptr [rax], 0
mov rax, [rbp+var_10]
mov rcx, [rbp+var_38]
sub rax, rcx
add rsp, 70h
pop rbp
retn
|
_BYTE * escape_string_for_mysql(long long a1, char *a2, long long a3, char *a4, long long a5, _BYTE *a6)
{
char *v7; // rax
char v8; // cl
char *v9; // rax
char *v10; // rax
char *v11; // rax
int v13; // [rsp+Ch] [rbp-64h]
long long v14; // [rsp+10h] [rbp-60h]
int v15; // [rsp+20h] [rbp-50h]
char v16; // [rsp+27h] [rbp-49h]
unsigned long long v17; // [rsp+28h] [rbp-48h]
unsigned long long v18; // [rsp+30h] [rbp-40h]
char *v20; // [rsp+50h] [rbp-20h]
char *v21; // [rsp+60h] [rbp-10h]
v21 = a2;
v20 = a4;
if ( a3 )
v14 = a3 - 1;
else
v14 = 2 * a5;
v17 = (unsigned long long)&a2[v14];
*a6 = 0;
v18 = (unsigned long long)&a4[a5];
while ( (unsigned long long)v20 < v18 )
{
v16 = 0;
v15 = my_ci_charlen(a1, v20, v18);
if ( v15 <= 1 )
{
if ( v15 >= 1 )
{
v13 = *v20;
if ( *v20 )
{
switch ( v13 )
{
case 10:
v16 = 110;
break;
case 13:
v16 = 114;
break;
case 26:
v16 = 90;
break;
case 34:
v16 = 34;
break;
case 39:
v16 = 39;
break;
case 92:
v16 = 92;
break;
}
}
else
{
v16 = 48;
}
}
else
{
v16 = *v20;
}
if ( v16 )
{
if ( (unsigned long long)(v21 + 2) > v17 )
{
*a6 = 1;
break;
}
*v21 = 92;
v10 = v21 + 1;
v21 += 2;
*v10 = v16;
}
else
{
if ( (unsigned long long)(v21 + 1) > v17 )
{
*a6 = 1;
break;
}
v11 = v21++;
*v11 = *v20;
}
}
else
{
if ( (unsigned long long)&v21[v15] > v17 )
{
*a6 = 1;
break;
}
while ( v15-- )
{
v7 = v20++;
v8 = *v7;
v9 = v21++;
*v9 = v8;
}
--v20;
}
++v20;
}
*v21 = 0;
return (_BYTE *)(v21 - a2);
}
|
escape_string_for_mysql:
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 qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x58],RAX
CMP qword ptr [RBP + -0x18],0x0
JZ 0x0012a915
MOV RAX,qword ptr [RBP + -0x18]
SUB RAX,0x1
MOV qword ptr [RBP + -0x60],RAX
JMP 0x0012a920
LAB_0012a915:
MOV RAX,qword ptr [RBP + -0x28]
SHL RAX,0x1
MOV qword ptr [RBP + -0x60],RAX
LAB_0012a920:
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x60]
ADD RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x40],RAX
LAB_0012a942:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x40]
JNC 0x0012aadf
MOV byte ptr [RBP + -0x49],0x0
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x40]
CALL 0x0012ab00
MOV dword ptr [RBP + -0x50],EAX
CMP dword ptr [RBP + -0x50],0x1
JLE 0x0012a9d2
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,dword ptr [RBP + -0x50]
ADD RAX,RCX
CMP RAX,qword ptr [RBP + -0x48]
JBE 0x0012a98b
MOV RAX,qword ptr [RBP + -0x30]
MOV byte ptr [RAX],0x1
JMP 0x0012aadf
LAB_0012a98b:
JMP 0x0012a98d
LAB_0012a98d:
MOV EAX,dword ptr [RBP + -0x50]
MOV ECX,EAX
ADD ECX,-0x1
MOV dword ptr [RBP + -0x50],ECX
CMP EAX,0x0
JZ 0x0012a9c1
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x20],RCX
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x10],RDX
MOV byte ptr [RAX],CL
JMP 0x0012a98d
LAB_0012a9c1:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0012aace
LAB_0012a9d2:
CMP dword ptr [RBP + -0x50],0x1
JGE 0x0012a9e3
MOV RAX,qword ptr [RBP + -0x20]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x49],AL
JMP 0x0012aa59
LAB_0012a9e3:
MOV RAX,qword ptr [RBP + -0x20]
MOVSX EAX,byte ptr [RAX]
MOV dword ptr [RBP + -0x64],EAX
TEST EAX,EAX
JZ 0x0012aa2f
JMP 0x0012a9f3
LAB_0012a9f3:
MOV EAX,dword ptr [RBP + -0x64]
SUB EAX,0xa
JZ 0x0012aa35
JMP 0x0012a9fd
LAB_0012a9fd:
MOV EAX,dword ptr [RBP + -0x64]
SUB EAX,0xd
JZ 0x0012aa3b
JMP 0x0012aa07
LAB_0012aa07:
MOV EAX,dword ptr [RBP + -0x64]
SUB EAX,0x1a
JZ 0x0012aa53
JMP 0x0012aa11
LAB_0012aa11:
MOV EAX,dword ptr [RBP + -0x64]
SUB EAX,0x22
JZ 0x0012aa4d
JMP 0x0012aa1b
LAB_0012aa1b:
MOV EAX,dword ptr [RBP + -0x64]
SUB EAX,0x27
JZ 0x0012aa47
JMP 0x0012aa25
LAB_0012aa25:
MOV EAX,dword ptr [RBP + -0x64]
SUB EAX,0x5c
JZ 0x0012aa41
JMP 0x0012aa57
LAB_0012aa2f:
MOV byte ptr [RBP + -0x49],0x30
JMP 0x0012aa57
LAB_0012aa35:
MOV byte ptr [RBP + -0x49],0x6e
JMP 0x0012aa57
LAB_0012aa3b:
MOV byte ptr [RBP + -0x49],0x72
JMP 0x0012aa57
LAB_0012aa41:
MOV byte ptr [RBP + -0x49],0x5c
JMP 0x0012aa57
LAB_0012aa47:
MOV byte ptr [RBP + -0x49],0x27
JMP 0x0012aa57
LAB_0012aa4d:
MOV byte ptr [RBP + -0x49],0x22
JMP 0x0012aa57
LAB_0012aa53:
MOV byte ptr [RBP + -0x49],0x5a
LAB_0012aa57:
JMP 0x0012aa59
LAB_0012aa59:
CMP byte ptr [RBP + -0x49],0x0
JZ 0x0012aa9e
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x48]
JBE 0x0012aa76
MOV RAX,qword ptr [RBP + -0x30]
MOV byte ptr [RAX],0x1
JMP 0x0012aadf
LAB_0012aa76:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOV byte ptr [RAX],0x5c
MOV CL,byte ptr [RBP + -0x49]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x10],RDX
MOV byte ptr [RAX],CL
JMP 0x0012aacc
LAB_0012aa9e:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
CMP RAX,qword ptr [RBP + -0x48]
JBE 0x0012aab5
MOV RAX,qword ptr [RBP + -0x30]
MOV byte ptr [RAX],0x1
JMP 0x0012aadf
LAB_0012aab5:
MOV RAX,qword ptr [RBP + -0x20]
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x10],RDX
MOV byte ptr [RAX],CL
LAB_0012aacc:
JMP 0x0012aace
LAB_0012aace:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0012a942
LAB_0012aadf:
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x38]
SUB RAX,RCX
ADD RSP,0x70
POP RBP
RET
|
long escape_string_for_mysql
(int8 param_1,char *param_2,long param_3,char *param_4,long param_5,
int1 *param_6)
{
char cVar1;
char *pcVar2;
long local_68;
int local_58;
char local_51;
char *local_28;
char *local_18;
if (param_3 == 0) {
local_68 = param_5 << 1;
}
else {
local_68 = param_3 + -1;
}
pcVar2 = param_2 + local_68;
*param_6 = 0;
local_28 = param_4;
local_18 = param_2;
do {
if (param_4 + param_5 <= local_28) {
LAB_0012aadf:
*local_18 = '\0';
return (long)local_18 - (long)param_2;
}
local_51 = '\0';
local_58 = my_ci_charlen(param_1,local_28,param_4 + param_5);
if (local_58 < 2) {
if (local_58 < 1) {
local_51 = *local_28;
}
else {
cVar1 = *local_28;
if (cVar1 == '\0') {
local_51 = '0';
}
else if (cVar1 == '\n') {
local_51 = 'n';
}
else if (cVar1 == '\r') {
local_51 = 'r';
}
else if (cVar1 == '\x1a') {
local_51 = 'Z';
}
else if (cVar1 == '\"') {
local_51 = '\"';
}
else if (cVar1 == '\'') {
local_51 = '\'';
}
else if (cVar1 == '\\') {
local_51 = '\\';
}
}
if (local_51 == '\0') {
if (pcVar2 < local_18 + 1) {
*param_6 = 1;
goto LAB_0012aadf;
}
*local_18 = *local_28;
local_18 = local_18 + 1;
}
else {
if (pcVar2 < local_18 + 2) {
*param_6 = 1;
goto LAB_0012aadf;
}
*local_18 = '\\';
local_18[1] = local_51;
local_18 = local_18 + 2;
}
}
else {
if (pcVar2 < local_18 + local_58) {
*param_6 = 1;
goto LAB_0012aadf;
}
while (local_58 != 0) {
*local_18 = *local_28;
local_58 = local_58 + -1;
local_28 = local_28 + 1;
local_18 = local_18 + 1;
}
local_28 = local_28 + -1;
}
local_28 = local_28 + 1;
} while( true );
}
|
Subsets and Splits
C++ Functions Using STL
Identifies C++ functions that depend on standard library components, revealing patterns in how developers utilize STL libraries and potentially highlighting common coding practices or dependencies in the dataset.
C++ STL Function Queries
Filters C++ code examples that use standard library containers and algorithms, helping identify common programming patterns and library usage in code generation tasks.
Random Training Function Samples
Performs basic filtering and random sampling of assembly code data without revealing meaningful patterns or relationships.
Random Training Function Samples
Retrieves a random sample of 1000 records from the training dataset, providing basic data exploration but offering limited analytical value beyond seeing raw entries.