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
|
|---|---|---|---|---|---|---|---|---|---|---|---|
20,100
|
ggml_backend_sched_graph_compute
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend.cpp
|
enum ggml_status ggml_backend_sched_graph_compute(ggml_backend_sched_t sched, struct ggml_cgraph * graph) {
enum ggml_status err = ggml_backend_sched_graph_compute_async(sched, graph);
ggml_backend_sched_synchronize(sched);
return err;
}
|
O3
|
cpp
|
ggml_backend_sched_graph_compute:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x16320
movl %eax, %ebp
movl 0x4(%rbx), %eax
testl %eax, %eax
jle 0x2819c
xorl %r14d, %r14d
movq 0x8(%rbx,%r14,8), %rdi
movq 0x30(%rdi), %rcx
testq %rcx, %rcx
je 0x28191
callq *%rcx
movl 0x4(%rbx), %eax
incq %r14
movslq %eax, %rcx
cmpq %rcx, %r14
jl 0x2817e
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
|
ggml_backend_sched_graph_compute:
push rbp
push r14
push rbx
mov rbx, rdi
call _ggml_backend_sched_graph_compute_async
mov ebp, eax
mov eax, [rbx+4]
test eax, eax
jle short loc_2819C
xor r14d, r14d
loc_2817E:
mov rdi, [rbx+r14*8+8]
mov rcx, [rdi+30h]
test rcx, rcx
jz short loc_28191
call rcx
mov eax, [rbx+4]
loc_28191:
inc r14
movsxd rcx, eax
cmp r14, rcx
jl short loc_2817E
loc_2819C:
mov eax, ebp
pop rbx
pop r14
pop rbp
retn
|
long long ggml_backend_sched_graph_compute(long long a1)
{
unsigned int v1; // ebp
int v2; // eax
long long i; // r14
void (*v4)(void); // rcx
v1 = ggml_backend_sched_graph_compute_async();
v2 = *(_DWORD *)(a1 + 4);
if ( v2 > 0 )
{
for ( i = 0LL; i < v2; ++i )
{
v4 = *(void (**)(void))(*(_QWORD *)(a1 + 8 * i + 8) + 48LL);
if ( v4 )
{
v4();
v2 = *(_DWORD *)(a1 + 4);
}
}
}
return v1;
}
|
ggml_backend_sched_graph_compute:
PUSH RBP
PUSH R14
PUSH RBX
MOV RBX,RDI
CALL 0x00116320
MOV EBP,EAX
MOV EAX,dword ptr [RBX + 0x4]
TEST EAX,EAX
JLE 0x0012819c
XOR R14D,R14D
LAB_0012817e:
MOV RDI,qword ptr [RBX + R14*0x8 + 0x8]
MOV RCX,qword ptr [RDI + 0x30]
TEST RCX,RCX
JZ 0x00128191
CALL RCX
MOV EAX,dword ptr [RBX + 0x4]
LAB_00128191:
INC R14
MOVSXD RCX,EAX
CMP R14,RCX
JL 0x0012817e
LAB_0012819c:
MOV EAX,EBP
POP RBX
POP R14
POP RBP
RET
|
int4 ggml_backend_sched_graph_compute(long param_1)
{
code *pcVar1;
int4 uVar2;
int iVar3;
long lVar4;
uVar2 = ggml_backend_sched_graph_compute_async();
iVar3 = *(int *)(param_1 + 4);
if (0 < iVar3) {
lVar4 = 0;
do {
pcVar1 = *(code **)(*(long *)(param_1 + 8 + lVar4 * 8) + 0x30);
if (pcVar1 != (code *)0x0) {
(*pcVar1)();
iVar3 = *(int *)(param_1 + 4);
}
lVar4 = lVar4 + 1;
} while (lVar4 < iVar3);
}
return uVar2;
}
|
|
20,101
|
enough_free_entries_on_page
|
eloqsql/storage/maria/ma_blockrec.c
|
my_bool enough_free_entries_on_page(MARIA_SHARE *share,
uchar *page_buff)
{
enum en_page_type page_type;
page_type= (enum en_page_type) (page_buff[PAGE_TYPE_OFFSET] &
~(uchar) PAGE_CAN_BE_COMPACTED);
if (page_type == HEAD_PAGE)
{
uint row_count= (uint) page_buff[DIR_COUNT_OFFSET];
return !(row_count == MAX_ROWS_PER_PAGE &&
page_buff[DIR_FREE_OFFSET] == END_OF_DIR_FREE_LIST);
}
return enough_free_entries(page_buff, share->block_size,
1 + share->base.blobs);
}
|
O3
|
c
|
enough_free_entries_on_page:
pushq %rbp
movq %rsp, %rbp
movb 0x7(%rsi), %al
andb $0x7f, %al
cmpb $0x1, %al
jne 0x34970
movb $0x1, %al
cmpb $-0x1, 0x8(%rsi)
jne 0x349bc
cmpb $-0x1, 0x9(%rsi)
setne %al
jmp 0x349bc
movl 0x3f0(%rdi), %eax
movzbl 0x8(%rsi), %ecx
addl %eax, %ecx
incl %ecx
movb $0x1, %al
cmpl $0x100, %ecx # imm = 0x100
jb 0x349bc
movb 0x9(%rsi), %dl
cmpb $-0x1, %dl
je 0x349ba
movl 0x7bc(%rdi), %edi
addl $0xffffff01, %ecx # imm = 0xFFFFFF01
addq %rdi, %rsi
addq $-0x5, %rsi
decl %ecx
je 0x349bc
movzbl %dl, %edx
shll $0x2, %edx
movq %rsi, %rdi
subq %rdx, %rdi
movb (%rdi), %dl
cmpb $-0x1, %dl
jne 0x349a3
xorl %eax, %eax
popq %rbp
retq
|
enough_free_entries_on_page:
push rbp
mov rbp, rsp
mov al, [rsi+7]
and al, 7Fh
cmp al, 1
jnz short loc_34970
mov al, 1
cmp byte ptr [rsi+8], 0FFh
jnz short loc_349BC
cmp byte ptr [rsi+9], 0FFh
setnz al
jmp short loc_349BC
loc_34970:
mov eax, [rdi+3F0h]
movzx ecx, byte ptr [rsi+8]
add ecx, eax
inc ecx
mov al, 1
cmp ecx, 100h
jb short loc_349BC
mov dl, [rsi+9]
cmp dl, 0FFh
jz short loc_349BA
mov edi, [rdi+7BCh]
add ecx, 0FFFFFF01h
add rsi, rdi
add rsi, 0FFFFFFFFFFFFFFFBh
loc_349A3:
dec ecx
jz short loc_349BC
movzx edx, dl
shl edx, 2
mov rdi, rsi
sub rdi, rdx
mov dl, [rdi]
cmp dl, 0FFh
jnz short loc_349A3
loc_349BA:
xor eax, eax
loc_349BC:
pop rbp
retn
|
bool enough_free_entries_on_page(long long a1, _BYTE *a2)
{
bool result; // al
unsigned __int8 v3; // dl
int v4; // ecx
long long v5; // rsi
if ( (a2[7] & 0x7F) == 1 )
{
result = 1;
if ( a2[8] == 0xFF )
return a2[9] != 0xFF;
}
else
{
result = 1;
if ( *(_DWORD *)(a1 + 1008) + (unsigned int)(unsigned __int8)a2[8] + 1 >= 0x100 )
{
v3 = a2[9];
if ( v3 == 0xFF )
{
return 0;
}
else
{
v4 = *(_DWORD *)(a1 + 1008) + (unsigned __int8)a2[8] - 254;
v5 = (long long)&a2[*(unsigned int *)(a1 + 1980) - 5];
while ( --v4 )
{
v3 = *(_BYTE *)(v5 - 4 * (unsigned int)v3);
if ( v3 == 0xFF )
return 0;
}
}
}
}
return result;
}
|
enough_free_entries_on_page:
PUSH RBP
MOV RBP,RSP
MOV AL,byte ptr [RSI + 0x7]
AND AL,0x7f
CMP AL,0x1
JNZ 0x00134970
MOV AL,0x1
CMP byte ptr [RSI + 0x8],0xff
JNZ 0x001349bc
CMP byte ptr [RSI + 0x9],0xff
SETNZ AL
JMP 0x001349bc
LAB_00134970:
MOV EAX,dword ptr [RDI + 0x3f0]
MOVZX ECX,byte ptr [RSI + 0x8]
ADD ECX,EAX
INC ECX
MOV AL,0x1
CMP ECX,0x100
JC 0x001349bc
MOV DL,byte ptr [RSI + 0x9]
CMP DL,0xff
JZ 0x001349ba
MOV EDI,dword ptr [RDI + 0x7bc]
ADD ECX,0xffffff01
ADD RSI,RDI
ADD RSI,-0x5
LAB_001349a3:
DEC ECX
JZ 0x001349bc
MOVZX EDX,DL
SHL EDX,0x2
MOV RDI,RSI
SUB RDI,RDX
MOV DL,byte ptr [RDI]
CMP DL,0xff
JNZ 0x001349a3
LAB_001349ba:
XOR EAX,EAX
LAB_001349bc:
POP RBP
RET
|
int8 enough_free_entries_on_page(long param_1,long param_2)
{
int8 in_RAX;
ulong uVar1;
int8 uVar2;
int iVar4;
byte bVar5;
int7 uVar3;
uVar1 = CONCAT71((int7)((ulong)in_RAX >> 8),*(int1 *)(param_2 + 7)) & 0xffffffffffffff7f;
if ((char)uVar1 == '\x01') {
uVar3 = (int7)(uVar1 >> 8);
uVar2 = CONCAT71(uVar3,1);
if (*(char *)(param_2 + 8) == -1) {
uVar2 = CONCAT71(uVar3,*(char *)(param_2 + 9) != -1);
}
}
else {
iVar4 = (uint)*(byte *)(param_2 + 8) + *(int *)(param_1 + 0x3f0);
uVar2 = CONCAT71((uint7)(uint3)((uint)*(int *)(param_1 + 0x3f0) >> 8),1);
if (0xff < iVar4 + 1U) {
bVar5 = *(byte *)(param_2 + 9);
if (bVar5 != 0xff) {
iVar4 = iVar4 + -0xfe;
do {
iVar4 = iVar4 + -1;
if (iVar4 == 0) {
return uVar2;
}
bVar5 = *(byte *)(param_2 + (ulong)*(uint *)(param_1 + 0x7bc) + -5 + (ulong)bVar5 * -4);
} while (bVar5 != 0xff);
}
uVar2 = 0;
}
}
return uVar2;
}
|
|
20,102
|
my_wildcmp_unicode_impl
|
eloqsql/strings/ctype-utf8.c
|
static
int my_wildcmp_unicode_impl(CHARSET_INFO *cs,
const char *str,const char *str_end,
const char *wildstr,const char *wildend,
int escape, int w_one, int w_many,
MY_UNICASE_INFO *weights, int recurse_level)
{
int result= -1; /* Not found, using wildcards */
my_wc_t s_wc, w_wc;
int scan;
my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc;
if (my_string_stack_guard && my_string_stack_guard(recurse_level))
return 1;
while (wildstr != wildend)
{
while (1)
{
my_bool escaped= 0;
if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr,
(const uchar*)wildend)) <= 0)
return 1;
if (w_wc == (my_wc_t) w_many)
{
result= 1; /* Found an anchor char */
break;
}
wildstr+= scan;
if (w_wc == (my_wc_t) escape && wildstr < wildend)
{
if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr,
(const uchar*)wildend)) <= 0)
return 1;
wildstr+= scan;
escaped= 1;
}
if ((scan= mb_wc(cs, &s_wc, (const uchar*)str,
(const uchar*)str_end)) <= 0)
return 1;
str+= scan;
if (!escaped && w_wc == (my_wc_t) w_one)
{
result= 1; /* Found an anchor char */
}
else
{
if (weights)
{
my_tosort_unicode(weights, &s_wc, cs->state);
my_tosort_unicode(weights, &w_wc, cs->state);
}
if (s_wc != w_wc)
return 1; /* No match */
}
if (wildstr == wildend)
return (str != str_end); /* Match if both are at end */
}
if (w_wc == (my_wc_t) w_many)
{ /* Found w_many */
/* Remove any '%' and '_' from the wild search string */
for ( ; wildstr != wildend ; )
{
if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr,
(const uchar*)wildend)) <= 0)
return 1;
if (w_wc == (my_wc_t) w_many)
{
wildstr+= scan;
continue;
}
if (w_wc == (my_wc_t) w_one)
{
wildstr+= scan;
if ((scan= mb_wc(cs, &s_wc, (const uchar*)str,
(const uchar*)str_end)) <= 0)
return 1;
str+= scan;
continue;
}
break; /* Not a wild character */
}
if (wildstr == wildend)
return 0; /* Ok if w_many is last */
if (str == str_end)
return -1;
if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr,
(const uchar*)wildend)) <= 0)
return 1;
wildstr+= scan;
if (w_wc == (my_wc_t) escape)
{
if (wildstr < wildend)
{
if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr,
(const uchar*)wildend)) <= 0)
return 1;
wildstr+= scan;
}
}
while (1)
{
/* Skip until the first character from wildstr is found */
while (str != str_end)
{
if ((scan= mb_wc(cs, &s_wc, (const uchar*)str,
(const uchar*)str_end)) <= 0)
return 1;
if (weights)
{
my_tosort_unicode(weights, &s_wc, cs->state);
my_tosort_unicode(weights, &w_wc, cs->state);
}
if (s_wc == w_wc)
break;
str+= scan;
}
if (str == str_end)
return -1;
str+= scan;
result= my_wildcmp_unicode_impl(cs, str, str_end, wildstr, wildend,
escape, w_one, w_many,
weights, recurse_level + 1);
if (result <= 0)
return result;
}
}
}
return (str != str_end ? 1 : 0);
}
|
O3
|
c
|
my_wildcmp_unicode_impl:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %r9d, -0x54(%rbp)
movq %r8, %r12
movq %rcx, %r13
movq %rdx, -0x50(%rbp)
movq %rsi, -0x38(%rbp)
movq %rdi, %r15
movl 0x28(%rbp), %eax
movq %rax, -0x60(%rbp)
movq 0xb8(%rdi), %rax
movq 0x28(%rax), %rax
movq %rax, -0x40(%rbp)
leaq 0xb3d6d7(%rip), %rax # 0xc08998
movq (%rax), %rax
testq %rax, %rax
je 0xcb2db
movl 0x28(%rbp), %edi
callq *%rax
movl $0x1, %ebx
testl %eax, %eax
jne 0xcb66b
cmpq %r12, %r13
je 0xcb46a
movl 0x18(%rbp), %eax
movl 0x10(%rbp), %ecx
cltq
movq %rax, -0x78(%rbp)
movslq -0x54(%rbp), %rax
movq %rax, -0x70(%rbp)
movslq %ecx, %rax
movq %rax, -0x68(%rbp)
movq %r15, %rdi
leaq -0x30(%rbp), %rsi
movq %r13, %rdx
movq %r12, %rcx
movq -0x40(%rbp), %r14
callq *%r14
testl %eax, %eax
jle 0xcb666
movq -0x30(%rbp), %rcx
cmpq -0x78(%rbp), %rcx
je 0xcb47c
movl %eax, %eax
addq %rax, %r13
cmpq -0x70(%rbp), %rcx
jne 0xcb382
cmpq %r12, %r13
jae 0xcb382
movq %r15, %rdi
leaq -0x30(%rbp), %rsi
movq %r13, %rdx
movq %r12, %rcx
callq *%r14
testl %eax, %eax
jle 0xcb666
movl %eax, %ebx
movq %r15, %rdi
leaq -0x48(%rbp), %rsi
movq %r14, %rax
movq -0x38(%rbp), %r14
movq %r14, %rdx
movq -0x50(%rbp), %rcx
callq *%rax
testl %eax, %eax
jle 0xcb666
movl %ebx, %ecx
addq %rcx, %r13
movl %eax, %eax
addq %rax, %r14
movq %r14, -0x38(%rbp)
jmp 0xcb3b6
movq %r15, %rdi
leaq -0x48(%rbp), %rsi
movq -0x38(%rbp), %rbx
movq %rbx, %rdx
movq -0x50(%rbp), %rcx
callq *%r14
testl %eax, %eax
jle 0xcb666
movl %eax, %eax
addq %rax, %rbx
movq %rbx, -0x38(%rbp)
movq -0x68(%rbp), %rax
cmpq %rax, -0x30(%rbp)
je 0xcb461
movq -0x48(%rbp), %rax
movq 0x20(%rbp), %r8
testq %r8, %r8
je 0xcb44f
movl 0xc(%r15), %ecx
movq (%r8), %rdx
movl $0xfffd, %esi # imm = 0xFFFD
cmpq %rdx, %rax
ja 0xcb404
movq 0x8(%r8), %rsi
movq %rax, %rdi
shrq $0x8, %rdi
movq (%rsi,%rdi,8), %rsi
testq %rsi, %rsi
je 0xcb40b
xorl %edi, %edi
testw %cx, %cx
setns %dil
movzbl %al, %eax
leaq (%rax,%rax,2), %rax
leaq (%rsi,%rax,4), %rax
movl 0x4(%rax,%rdi,4), %esi
movq %rsi, -0x48(%rbp)
movq %rsi, %rax
movq -0x30(%rbp), %rsi
movl $0xfffd, %edi # imm = 0xFFFD
cmpq %rdx, %rsi
ja 0xcb446
movq 0x8(%r8), %rdx
movq %rsi, %rdi
shrq $0x8, %rdi
movq (%rdx,%rdi,8), %rdx
testq %rdx, %rdx
je 0xcb453
xorl %edi, %edi
testw %cx, %cx
setns %dil
movzbl %sil, %ecx
leaq (%rcx,%rcx,2), %rcx
leaq (%rdx,%rcx,4), %rcx
movl 0x4(%rcx,%rdi,4), %edi
movq %rdi, -0x30(%rbp)
movq %rdi, %rsi
jmp 0xcb453
movq -0x30(%rbp), %rsi
movl $0x1, %ebx
cmpq %rsi, %rax
jne 0xcb66b
cmpq %r12, %r13
jne 0xcb2ff
xorl %ebx, %ebx
movq -0x50(%rbp), %rax
cmpq %rax, -0x38(%rbp)
setne %bl
jmp 0xcb66b
xorl %ebx, %ebx
cmpq %r12, %r13
je 0xcb66b
movq %r15, %rdi
leaq -0x30(%rbp), %rsi
movq %r13, %rdx
movq %r12, %rcx
callq *%r14
testl %eax, %eax
jle 0xcb666
movl %eax, %r14d
movq -0x30(%rbp), %rax
cmpq -0x78(%rbp), %rax
jne 0xcb4c0
movl %r14d, %eax
addq %rax, %r13
cmpq %r12, %r13
movq -0x40(%rbp), %r14
jne 0xcb487
jmp 0xcb66b
cmpq -0x68(%rbp), %rax
jne 0xcb4ee
movq %r15, %rdi
leaq -0x48(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq -0x50(%rbp), %rcx
callq *-0x40(%rbp)
testl %eax, %eax
jle 0xcb666
movl %r14d, %ecx
addq %rcx, %r13
movl %eax, %eax
addq %rax, -0x38(%rbp)
jmp 0xcb4b2
movq -0x50(%rbp), %r14
cmpq %r14, -0x38(%rbp)
je 0xcb67c
leaq -0x30(%rbp), %rsi
movq %r15, %rdi
movq %r13, %rdx
movq %r12, %rcx
callq *-0x40(%rbp)
testl %eax, %eax
jle 0xcb666
movl %eax, %eax
addq %rax, %r13
movq -0x70(%rbp), %rax
cmpq %rax, -0x30(%rbp)
jne 0xcb545
cmpq %r12, %r13
jae 0xcb545
leaq -0x30(%rbp), %rsi
movq %r15, %rdi
movq %r13, %rdx
movq %r12, %rcx
callq *-0x40(%rbp)
testl %eax, %eax
jle 0xcb666
movl %eax, %eax
addq %rax, %r13
movq -0x60(%rbp), %rax
incl %eax
movq %rax, -0x60(%rbp)
movq -0x38(%rbp), %rbx
cmpq %r14, %rbx
je 0xcb67c
movq %r15, %rdi
leaq -0x48(%rbp), %rsi
movq %rbx, %rdx
movq %r14, %rcx
callq *-0x40(%rbp)
testl %eax, %eax
jle 0xcb666
movq -0x48(%rbp), %rcx
movq 0x20(%rbp), %rsi
testq %rsi, %rsi
je 0xcb61a
movl 0xc(%r15), %edx
movq (%rsi), %rsi
movl $0xfffd, %edi # imm = 0xFFFD
cmpq %rsi, %rcx
ja 0xcb5c8
movq 0x20(%rbp), %rdi
movq 0x8(%rdi), %rdi
movq %rcx, %r8
shrq $0x8, %r8
movq (%rdi,%r8,8), %rdi
testq %rdi, %rdi
je 0xcb5cf
xorl %r8d, %r8d
testw %dx, %dx
setns %r8b
movzbl %cl, %ecx
leaq (%rcx,%rcx,2), %rcx
leaq (%rdi,%rcx,4), %rcx
movl 0x4(%rcx,%r8,4), %edi
movq %rdi, -0x48(%rbp)
movq %rdi, %rcx
movq -0x30(%rbp), %rdi
movl $0xfffd, %r8d # imm = 0xFFFD
cmpq %rsi, %rdi
ja 0xcb611
movq 0x20(%rbp), %rsi
movq 0x8(%rsi), %rsi
movq %rdi, %r8
shrq $0x8, %r8
movq (%rsi,%r8,8), %rsi
testq %rsi, %rsi
je 0xcb61e
xorl %r8d, %r8d
testw %dx, %dx
setns %r8b
movzbl %dil, %edx
leaq (%rdx,%rdx,2), %rdx
leaq (%rsi,%rdx,4), %rdx
movl 0x4(%rdx,%r8,4), %r8d
movq %r8, -0x30(%rbp)
movq %r8, %rdi
jmp 0xcb61e
movq -0x30(%rbp), %rdi
movl %eax, %eax
addq %rax, %rbx
cmpq %rdi, %rcx
jne 0xcb553
movq %r15, %rdi
movq %rbx, -0x38(%rbp)
movq %rbx, %rsi
movq %r14, %rdx
movq %r13, %rcx
movq %r12, %r8
movl -0x54(%rbp), %r9d
pushq -0x60(%rbp)
pushq 0x20(%rbp)
movl 0x18(%rbp), %eax
pushq %rax
movl 0x10(%rbp), %eax
pushq %rax
callq 0xcb27e
addq $0x20, %rsp
movl %eax, %ebx
testl %eax, %eax
jg 0xcb54f
jmp 0xcb66b
movl $0x1, %ebx
movl %ebx, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xffffffff, %ebx # imm = 0xFFFFFFFF
jmp 0xcb66b
|
my_wildcmp_unicode_impl:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov [rbp+var_54], r9d
mov r12, r8
mov r13, rcx
mov [rbp+var_50], rdx
mov [rbp+var_38], rsi
mov r15, rdi
mov eax, [rbp+arg_18]
mov [rbp+var_60], rax
mov rax, [rdi+0B8h]
mov rax, [rax+28h]
mov [rbp+var_40], rax
lea rax, my_string_stack_guard
mov rax, [rax]
test rax, rax
jz short loc_CB2DB
mov edi, [rbp+arg_18]
call rax
mov ebx, 1
test eax, eax
jnz loc_CB66B
loc_CB2DB:
cmp r13, r12
jz loc_CB46A
mov eax, [rbp+arg_8]
mov ecx, [rbp+arg_0]
cdqe
mov [rbp+var_78], rax
movsxd rax, [rbp+var_54]
mov [rbp+var_70], rax
movsxd rax, ecx
mov [rbp+var_68], rax
loc_CB2FF:
mov rdi, r15
lea rsi, [rbp+var_30]
mov rdx, r13
mov rcx, r12
mov r14, [rbp+var_40]
call r14
test eax, eax
jle loc_CB666
mov rcx, [rbp+var_30]
cmp rcx, [rbp+var_78]
jz loc_CB47C
mov eax, eax
add r13, rax
cmp rcx, [rbp+var_70]
jnz short loc_CB382
cmp r13, r12
jnb short loc_CB382
mov rdi, r15
lea rsi, [rbp+var_30]
mov rdx, r13
mov rcx, r12
call r14
test eax, eax
jle loc_CB666
mov ebx, eax
mov rdi, r15
lea rsi, [rbp+var_48]
mov rax, r14
mov r14, [rbp+var_38]
mov rdx, r14
mov rcx, [rbp+var_50]
call rax
test eax, eax
jle loc_CB666
mov ecx, ebx
add r13, rcx
mov eax, eax
add r14, rax
mov [rbp+var_38], r14
jmp short loc_CB3B6
loc_CB382:
mov rdi, r15
lea rsi, [rbp+var_48]
mov rbx, [rbp+var_38]
mov rdx, rbx
mov rcx, [rbp+var_50]
call r14
test eax, eax
jle loc_CB666
mov eax, eax
add rbx, rax
mov [rbp+var_38], rbx
mov rax, [rbp+var_68]
cmp [rbp+var_30], rax
jz loc_CB461
loc_CB3B6:
mov rax, [rbp+var_48]
mov r8, [rbp+arg_10]
test r8, r8
jz loc_CB44F
mov ecx, [r15+0Ch]
mov rdx, [r8]
mov esi, 0FFFDh
cmp rax, rdx
ja short loc_CB404
mov rsi, [r8+8]
mov rdi, rax
shr rdi, 8
mov rsi, [rsi+rdi*8]
test rsi, rsi
jz short loc_CB40B
xor edi, edi
test cx, cx
setns dil
movzx eax, al
lea rax, [rax+rax*2]
lea rax, [rsi+rax*4]
mov esi, [rax+rdi*4+4]
loc_CB404:
mov [rbp+var_48], rsi
mov rax, rsi
loc_CB40B:
mov rsi, [rbp+var_30]
mov edi, 0FFFDh
cmp rsi, rdx
ja short loc_CB446
mov rdx, [r8+8]
mov rdi, rsi
shr rdi, 8
mov rdx, [rdx+rdi*8]
test rdx, rdx
jz short loc_CB453
xor edi, edi
test cx, cx
setns dil
movzx ecx, sil
lea rcx, [rcx+rcx*2]
lea rcx, [rdx+rcx*4]
mov edi, [rcx+rdi*4+4]
loc_CB446:
mov [rbp+var_30], rdi
mov rsi, rdi
jmp short loc_CB453
loc_CB44F:
mov rsi, [rbp+var_30]
loc_CB453:
mov ebx, 1
cmp rax, rsi
jnz loc_CB66B
loc_CB461:
cmp r13, r12
jnz loc_CB2FF
loc_CB46A:
xor ebx, ebx
mov rax, [rbp+var_50]
cmp [rbp+var_38], rax
setnz bl
jmp loc_CB66B
loc_CB47C:
xor ebx, ebx
cmp r13, r12
jz loc_CB66B
loc_CB487:
mov rdi, r15
lea rsi, [rbp+var_30]
mov rdx, r13
mov rcx, r12
call r14
test eax, eax
jle loc_CB666
mov r14d, eax
mov rax, [rbp+var_30]
cmp rax, [rbp+var_78]
jnz short loc_CB4C0
mov eax, r14d
add r13, rax
loc_CB4B2:
cmp r13, r12
mov r14, [rbp+var_40]
jnz short loc_CB487
jmp loc_CB66B
loc_CB4C0:
cmp rax, [rbp+var_68]
jnz short loc_CB4EE
mov rdi, r15
lea rsi, [rbp+var_48]
mov rdx, [rbp+var_38]
mov rcx, [rbp+var_50]
call [rbp+var_40]
test eax, eax
jle loc_CB666
mov ecx, r14d
add r13, rcx
mov eax, eax
add [rbp+var_38], rax
jmp short loc_CB4B2
loc_CB4EE:
mov r14, [rbp+var_50]
cmp [rbp+var_38], r14
jz loc_CB67C
lea rsi, [rbp+var_30]
mov rdi, r15
mov rdx, r13
mov rcx, r12
call [rbp+var_40]
test eax, eax
jle loc_CB666
mov eax, eax
add r13, rax
mov rax, [rbp+var_70]
cmp [rbp+var_30], rax
jnz short loc_CB545
cmp r13, r12
jnb short loc_CB545
lea rsi, [rbp+var_30]
mov rdi, r15
mov rdx, r13
mov rcx, r12
call [rbp+var_40]
test eax, eax
jle loc_CB666
mov eax, eax
add r13, rax
loc_CB545:
mov rax, [rbp+var_60]
inc eax
mov [rbp+var_60], rax
loc_CB54F:
mov rbx, [rbp+var_38]
loc_CB553:
cmp rbx, r14
jz loc_CB67C
mov rdi, r15
lea rsi, [rbp+var_48]
mov rdx, rbx
mov rcx, r14
call [rbp+var_40]
test eax, eax
jle loc_CB666
mov rcx, [rbp+var_48]
mov rsi, [rbp+arg_10]
test rsi, rsi
jz loc_CB61A
mov edx, [r15+0Ch]
mov rsi, [rsi]
mov edi, 0FFFDh
cmp rcx, rsi
ja short loc_CB5C8
mov rdi, [rbp+arg_10]
mov rdi, [rdi+8]
mov r8, rcx
shr r8, 8
mov rdi, [rdi+r8*8]
test rdi, rdi
jz short loc_CB5CF
xor r8d, r8d
test dx, dx
setns r8b
movzx ecx, cl
lea rcx, [rcx+rcx*2]
lea rcx, [rdi+rcx*4]
mov edi, [rcx+r8*4+4]
loc_CB5C8:
mov [rbp+var_48], rdi
mov rcx, rdi
loc_CB5CF:
mov rdi, [rbp+var_30]
mov r8d, 0FFFDh
cmp rdi, rsi
ja short loc_CB611
mov rsi, [rbp+arg_10]
mov rsi, [rsi+8]
mov r8, rdi
shr r8, 8
mov rsi, [rsi+r8*8]
test rsi, rsi
jz short loc_CB61E
xor r8d, r8d
test dx, dx
setns r8b
movzx edx, dil
lea rdx, [rdx+rdx*2]
lea rdx, [rsi+rdx*4]
mov r8d, [rdx+r8*4+4]
loc_CB611:
mov [rbp+var_30], r8
mov rdi, r8
jmp short loc_CB61E
loc_CB61A:
mov rdi, [rbp+var_30]
loc_CB61E:
mov eax, eax
add rbx, rax
cmp rcx, rdi
jnz loc_CB553
mov rdi, r15
mov [rbp+var_38], rbx
mov rsi, rbx
mov rdx, r14
mov rcx, r13
mov r8, r12
mov r9d, [rbp+var_54]
push [rbp+var_60]
push [rbp+arg_10]
mov eax, [rbp+arg_8]
push rax
mov eax, [rbp+arg_0]
push rax
call my_wildcmp_unicode_impl
add rsp, 20h
mov ebx, eax
test eax, eax
jg loc_CB54F
jmp short loc_CB66B
loc_CB666:
mov ebx, 1
loc_CB66B:
mov eax, ebx
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_CB67C:
mov ebx, 0FFFFFFFFh
jmp short loc_CB66B
|
long long my_wildcmp_unicode_impl(
long long a1,
long long a2,
unsigned long long a3,
unsigned long long a4,
unsigned long long a5,
int a6,
int a7,
int a8,
unsigned long long *a9,
unsigned int a10)
{
unsigned int v13; // ebx
long long ( *v14)(long long, unsigned __int8 *, unsigned long long, unsigned long long); // r14
int v15; // eax
int v16; // eax
unsigned int v17; // ebx
long long ( *v18)(long long, unsigned long long *, long long, long long); // rax
long long v19; // r14
int v20; // eax
long long v21; // rbx
int v22; // eax
long long v23; // rax
int v24; // ecx
unsigned long long v25; // rdx
long long v26; // rsi
long long v27; // rsi
long long v28; // rsi
long long v29; // rdi
long long v30; // rdx
int v31; // eax
unsigned int v32; // r14d
int v33; // eax
int v34; // eax
unsigned long long v35; // r13
int v36; // eax
unsigned long long v37; // rbx
int v38; // eax
long long v39; // rcx
int v40; // edx
unsigned long long v41; // rsi
long long v42; // rdi
long long v43; // rdi
long long v44; // rdi
long long v45; // r8
long long v46; // rsi
unsigned long long v50; // [rsp+38h] [rbp-48h] BYREF
long long ( *v51)(long long, unsigned __int8 *, unsigned long long, unsigned long long); // [rsp+40h] [rbp-40h]
long long v52; // [rsp+48h] [rbp-38h]
unsigned __int8 v53[48]; // [rsp+50h] [rbp-30h] BYREF
v52 = a2;
v51 = *(long long ( **)(long long, unsigned __int8 *, unsigned long long, unsigned long long))(*(_QWORD *)(a1 + 184)
+ 40LL);
if ( my_string_stack_guard )
{
v13 = 1;
if ( (unsigned int)my_string_stack_guard(a10) )
return v13;
}
if ( a4 == a5 )
return v52 != a3;
while ( 1 )
{
v14 = v51;
v15 = v51(a1, v53, a4, a5);
if ( v15 <= 0 )
return 1;
if ( *(_QWORD *)v53 == a8 )
break;
a4 += (unsigned int)v15;
if ( *(_QWORD *)v53 == a6 && a4 < a5 )
{
v16 = v14(a1, v53, a4, a5);
if ( v16 <= 0 )
return 1;
v17 = v16;
v18 = (long long ( *)(long long, unsigned long long *, long long, long long))v14;
v19 = v52;
v20 = v18(a1, &v50, v52, a3);
if ( v20 <= 0 )
return 1;
a4 += v17;
v52 = (unsigned int)v20 + v19;
LABEL_13:
v23 = v50;
if ( a9 )
{
v24 = *(_DWORD *)(a1 + 12);
v25 = *a9;
v26 = 65533LL;
if ( v50 > *a9 )
goto LABEL_17;
v27 = *(_QWORD *)(a9[1] + 8 * (v50 >> 8));
if ( v27 )
{
v26 = *(unsigned int *)(v27 + 12LL * (unsigned __int8)v50 + 4LL * ((v24 & 0x8000u) == 0) + 4);
LABEL_17:
v50 = v26;
v23 = v26;
}
v28 = *(_QWORD *)v53;
v29 = 65533LL;
if ( *(_QWORD *)v53 > v25 )
{
LABEL_21:
*(_QWORD *)v53 = v29;
v28 = v29;
}
else
{
v30 = *(_QWORD *)(a9[1] + 8LL * (*(_QWORD *)v53 >> 8));
if ( v30 )
{
v29 = *(unsigned int *)(v30 + 12LL * v53[0] + 4LL * ((v24 & 0x8000u) == 0) + 4);
goto LABEL_21;
}
}
}
else
{
v28 = *(_QWORD *)v53;
}
v13 = 1;
if ( v23 != v28 )
return v13;
goto LABEL_24;
}
v21 = v52;
v22 = v14(a1, (unsigned __int8 *)&v50, v52, a3);
if ( v22 <= 0 )
return 1;
v52 = (unsigned int)v22 + v21;
if ( *(_QWORD *)v53 != a7 )
goto LABEL_13;
LABEL_24:
if ( a4 == a5 )
return v52 != a3;
}
v13 = 0;
if ( a4 == a5 )
return v13;
while ( 2 )
{
v31 = v14(a1, v53, a4, a5);
if ( v31 <= 0 )
return 1;
v32 = v31;
if ( *(_QWORD *)v53 == a8 )
{
a4 += (unsigned int)v31;
LABEL_30:
v14 = v51;
if ( a4 == a5 )
return v13;
continue;
}
break;
}
if ( *(_QWORD *)v53 == a7 )
{
v33 = v51(a1, (unsigned __int8 *)&v50, v52, a3);
if ( v33 <= 0 )
return 1;
a4 += v32;
v52 += (unsigned int)v33;
goto LABEL_30;
}
if ( v52 == a3 )
return (unsigned int)-1;
v34 = v51(a1, v53, a4, a5);
if ( v34 <= 0 )
return 1;
v35 = (unsigned int)v34 + a4;
if ( *(_QWORD *)v53 != a6 || v35 >= a5 )
{
LABEL_41:
v37 = v52;
while ( 1 )
{
if ( v37 == a3 )
return (unsigned int)-1;
v38 = v51(a1, (unsigned __int8 *)&v50, v37, a3);
if ( v38 <= 0 )
return 1;
v39 = v50;
if ( !a9 )
{
v44 = *(_QWORD *)v53;
goto LABEL_54;
}
v40 = *(_DWORD *)(a1 + 12);
v41 = *a9;
v42 = 65533LL;
if ( v50 <= *a9 )
{
v43 = *(_QWORD *)(a9[1] + 8 * (v50 >> 8));
if ( !v43 )
goto LABEL_49;
v42 = *(unsigned int *)(v43 + 12LL * (unsigned __int8)v50 + 4LL * ((v40 & 0x8000u) == 0) + 4);
}
v50 = v42;
v39 = v42;
LABEL_49:
v44 = *(_QWORD *)v53;
v45 = 65533LL;
if ( *(_QWORD *)v53 > v41 )
goto LABEL_52;
v46 = *(_QWORD *)(a9[1] + 8LL * (*(_QWORD *)v53 >> 8));
if ( v46 )
{
v45 = *(unsigned int *)(v46 + 12LL * v53[0] + 4LL * ((v40 & 0x8000u) == 0) + 4);
LABEL_52:
*(_QWORD *)v53 = v45;
v44 = v45;
}
LABEL_54:
v37 += (unsigned int)v38;
if ( v39 == v44 )
{
v52 = v37;
v13 = my_wildcmp_unicode_impl(a1, v37, a3, v35, a5, a6, a7, a8, (long long)a9, a10 + 1);
if ( (int)v13 > 0 )
goto LABEL_41;
return v13;
}
}
}
v36 = v51(a1, v53, v35, a5);
if ( v36 > 0 )
{
LODWORD(v35) = v36 + v35;
goto LABEL_41;
}
return 1;
}
|
my_wildcmp_unicode_impl:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV dword ptr [RBP + -0x54],R9D
MOV R12,R8
MOV R13,RCX
MOV qword ptr [RBP + -0x50],RDX
MOV qword ptr [RBP + -0x38],RSI
MOV R15,RDI
MOV EAX,dword ptr [RBP + 0x28]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RDI + 0xb8]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x40],RAX
LEA RAX,[0xd08998]
MOV RAX,qword ptr [RAX]
TEST RAX,RAX
JZ 0x001cb2db
MOV EDI,dword ptr [RBP + 0x28]
CALL RAX
MOV EBX,0x1
TEST EAX,EAX
JNZ 0x001cb66b
LAB_001cb2db:
CMP R13,R12
JZ 0x001cb46a
MOV EAX,dword ptr [RBP + 0x18]
MOV ECX,dword ptr [RBP + 0x10]
CDQE
MOV qword ptr [RBP + -0x78],RAX
MOVSXD RAX,dword ptr [RBP + -0x54]
MOV qword ptr [RBP + -0x70],RAX
MOVSXD RAX,ECX
MOV qword ptr [RBP + -0x68],RAX
LAB_001cb2ff:
MOV RDI,R15
LEA RSI,[RBP + -0x30]
MOV RDX,R13
MOV RCX,R12
MOV R14,qword ptr [RBP + -0x40]
CALL R14
TEST EAX,EAX
JLE 0x001cb666
MOV RCX,qword ptr [RBP + -0x30]
CMP RCX,qword ptr [RBP + -0x78]
JZ 0x001cb47c
MOV EAX,EAX
ADD R13,RAX
CMP RCX,qword ptr [RBP + -0x70]
JNZ 0x001cb382
CMP R13,R12
JNC 0x001cb382
MOV RDI,R15
LEA RSI,[RBP + -0x30]
MOV RDX,R13
MOV RCX,R12
CALL R14
TEST EAX,EAX
JLE 0x001cb666
MOV EBX,EAX
MOV RDI,R15
LEA RSI,[RBP + -0x48]
MOV RAX,R14
MOV R14,qword ptr [RBP + -0x38]
MOV RDX,R14
MOV RCX,qword ptr [RBP + -0x50]
CALL RAX
TEST EAX,EAX
JLE 0x001cb666
MOV ECX,EBX
ADD R13,RCX
MOV EAX,EAX
ADD R14,RAX
MOV qword ptr [RBP + -0x38],R14
JMP 0x001cb3b6
LAB_001cb382:
MOV RDI,R15
LEA RSI,[RBP + -0x48]
MOV RBX,qword ptr [RBP + -0x38]
MOV RDX,RBX
MOV RCX,qword ptr [RBP + -0x50]
CALL R14
TEST EAX,EAX
JLE 0x001cb666
MOV EAX,EAX
ADD RBX,RAX
MOV qword ptr [RBP + -0x38],RBX
MOV RAX,qword ptr [RBP + -0x68]
CMP qword ptr [RBP + -0x30],RAX
JZ 0x001cb461
LAB_001cb3b6:
MOV RAX,qword ptr [RBP + -0x48]
MOV R8,qword ptr [RBP + 0x20]
TEST R8,R8
JZ 0x001cb44f
MOV ECX,dword ptr [R15 + 0xc]
MOV RDX,qword ptr [R8]
MOV ESI,0xfffd
CMP RAX,RDX
JA 0x001cb404
MOV RSI,qword ptr [R8 + 0x8]
MOV RDI,RAX
SHR RDI,0x8
MOV RSI,qword ptr [RSI + RDI*0x8]
TEST RSI,RSI
JZ 0x001cb40b
XOR EDI,EDI
TEST CX,CX
SETNS DIL
MOVZX EAX,AL
LEA RAX,[RAX + RAX*0x2]
LEA RAX,[RSI + RAX*0x4]
MOV ESI,dword ptr [RAX + RDI*0x4 + 0x4]
LAB_001cb404:
MOV qword ptr [RBP + -0x48],RSI
MOV RAX,RSI
LAB_001cb40b:
MOV RSI,qword ptr [RBP + -0x30]
MOV EDI,0xfffd
CMP RSI,RDX
JA 0x001cb446
MOV RDX,qword ptr [R8 + 0x8]
MOV RDI,RSI
SHR RDI,0x8
MOV RDX,qword ptr [RDX + RDI*0x8]
TEST RDX,RDX
JZ 0x001cb453
XOR EDI,EDI
TEST CX,CX
SETNS DIL
MOVZX ECX,SIL
LEA RCX,[RCX + RCX*0x2]
LEA RCX,[RDX + RCX*0x4]
MOV EDI,dword ptr [RCX + RDI*0x4 + 0x4]
LAB_001cb446:
MOV qword ptr [RBP + -0x30],RDI
MOV RSI,RDI
JMP 0x001cb453
LAB_001cb44f:
MOV RSI,qword ptr [RBP + -0x30]
LAB_001cb453:
MOV EBX,0x1
CMP RAX,RSI
JNZ 0x001cb66b
LAB_001cb461:
CMP R13,R12
JNZ 0x001cb2ff
LAB_001cb46a:
XOR EBX,EBX
MOV RAX,qword ptr [RBP + -0x50]
CMP qword ptr [RBP + -0x38],RAX
SETNZ BL
JMP 0x001cb66b
LAB_001cb47c:
XOR EBX,EBX
CMP R13,R12
JZ 0x001cb66b
LAB_001cb487:
MOV RDI,R15
LEA RSI,[RBP + -0x30]
MOV RDX,R13
MOV RCX,R12
CALL R14
TEST EAX,EAX
JLE 0x001cb666
MOV R14D,EAX
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x78]
JNZ 0x001cb4c0
MOV EAX,R14D
ADD R13,RAX
LAB_001cb4b2:
CMP R13,R12
MOV R14,qword ptr [RBP + -0x40]
JNZ 0x001cb487
JMP 0x001cb66b
LAB_001cb4c0:
CMP RAX,qword ptr [RBP + -0x68]
JNZ 0x001cb4ee
MOV RDI,R15
LEA RSI,[RBP + -0x48]
MOV RDX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x50]
CALL qword ptr [RBP + -0x40]
TEST EAX,EAX
JLE 0x001cb666
MOV ECX,R14D
ADD R13,RCX
MOV EAX,EAX
ADD qword ptr [RBP + -0x38],RAX
JMP 0x001cb4b2
LAB_001cb4ee:
MOV R14,qword ptr [RBP + -0x50]
CMP qword ptr [RBP + -0x38],R14
JZ 0x001cb67c
LEA RSI,[RBP + -0x30]
MOV RDI,R15
MOV RDX,R13
MOV RCX,R12
CALL qword ptr [RBP + -0x40]
TEST EAX,EAX
JLE 0x001cb666
MOV EAX,EAX
ADD R13,RAX
MOV RAX,qword ptr [RBP + -0x70]
CMP qword ptr [RBP + -0x30],RAX
JNZ 0x001cb545
CMP R13,R12
JNC 0x001cb545
LEA RSI,[RBP + -0x30]
MOV RDI,R15
MOV RDX,R13
MOV RCX,R12
CALL qword ptr [RBP + -0x40]
TEST EAX,EAX
JLE 0x001cb666
MOV EAX,EAX
ADD R13,RAX
LAB_001cb545:
MOV RAX,qword ptr [RBP + -0x60]
INC EAX
MOV qword ptr [RBP + -0x60],RAX
LAB_001cb54f:
MOV RBX,qword ptr [RBP + -0x38]
LAB_001cb553:
CMP RBX,R14
JZ 0x001cb67c
MOV RDI,R15
LEA RSI,[RBP + -0x48]
MOV RDX,RBX
MOV RCX,R14
CALL qword ptr [RBP + -0x40]
TEST EAX,EAX
JLE 0x001cb666
MOV RCX,qword ptr [RBP + -0x48]
MOV RSI,qword ptr [RBP + 0x20]
TEST RSI,RSI
JZ 0x001cb61a
MOV EDX,dword ptr [R15 + 0xc]
MOV RSI,qword ptr [RSI]
MOV EDI,0xfffd
CMP RCX,RSI
JA 0x001cb5c8
MOV RDI,qword ptr [RBP + 0x20]
MOV RDI,qword ptr [RDI + 0x8]
MOV R8,RCX
SHR R8,0x8
MOV RDI,qword ptr [RDI + R8*0x8]
TEST RDI,RDI
JZ 0x001cb5cf
XOR R8D,R8D
TEST DX,DX
SETNS R8B
MOVZX ECX,CL
LEA RCX,[RCX + RCX*0x2]
LEA RCX,[RDI + RCX*0x4]
MOV EDI,dword ptr [RCX + R8*0x4 + 0x4]
LAB_001cb5c8:
MOV qword ptr [RBP + -0x48],RDI
MOV RCX,RDI
LAB_001cb5cf:
MOV RDI,qword ptr [RBP + -0x30]
MOV R8D,0xfffd
CMP RDI,RSI
JA 0x001cb611
MOV RSI,qword ptr [RBP + 0x20]
MOV RSI,qword ptr [RSI + 0x8]
MOV R8,RDI
SHR R8,0x8
MOV RSI,qword ptr [RSI + R8*0x8]
TEST RSI,RSI
JZ 0x001cb61e
XOR R8D,R8D
TEST DX,DX
SETNS R8B
MOVZX EDX,DIL
LEA RDX,[RDX + RDX*0x2]
LEA RDX,[RSI + RDX*0x4]
MOV R8D,dword ptr [RDX + R8*0x4 + 0x4]
LAB_001cb611:
MOV qword ptr [RBP + -0x30],R8
MOV RDI,R8
JMP 0x001cb61e
LAB_001cb61a:
MOV RDI,qword ptr [RBP + -0x30]
LAB_001cb61e:
MOV EAX,EAX
ADD RBX,RAX
CMP RCX,RDI
JNZ 0x001cb553
MOV RDI,R15
MOV qword ptr [RBP + -0x38],RBX
MOV RSI,RBX
MOV RDX,R14
MOV RCX,R13
MOV R8,R12
MOV R9D,dword ptr [RBP + -0x54]
PUSH qword ptr [RBP + -0x60]
PUSH qword ptr [RBP + 0x20]
MOV EAX,dword ptr [RBP + 0x18]
PUSH RAX
MOV EAX,dword ptr [RBP + 0x10]
PUSH RAX
CALL 0x001cb27e
ADD RSP,0x20
MOV EBX,EAX
TEST EAX,EAX
JG 0x001cb54f
JMP 0x001cb66b
LAB_001cb666:
MOV EBX,0x1
LAB_001cb66b:
MOV EAX,EBX
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001cb67c:
MOV EBX,0xffffffff
JMP 0x001cb66b
|
uint my_wildcmp_unicode_impl
(long param_1,long param_2,long param_3,ulong param_4,ulong param_5,int param_6,
int param_7,int param_8,ulong *param_9,int param_10)
{
long lVar1;
code *pcVar2;
ulong uVar3;
int iVar4;
uint uVar5;
uint uVar6;
short sVar7;
long lVar8;
ulong local_50;
code *local_48;
long local_40;
ulong local_38;
local_48 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28);
local_40 = param_2;
if ((my_string_stack_guard != (code *)0x0) &&
(iVar4 = (*my_string_stack_guard)(param_10), iVar4 != 0)) {
return 1;
}
if (param_4 != param_5) {
do {
pcVar2 = local_48;
uVar5 = (*local_48)(param_1,&local_38,param_4,param_5);
lVar8 = local_40;
if ((int)uVar5 < 1) {
return 1;
}
if (local_38 == (long)param_8) {
do {
if (param_4 == param_5) {
return 0;
}
uVar5 = (*pcVar2)(param_1,&local_38,param_4,param_5);
if ((int)uVar5 < 1) {
return 1;
}
if (local_38 != (long)param_8) {
if (local_38 != (long)param_7) {
if (local_40 == param_3) {
return 0xffffffff;
}
uVar5 = (*local_48)(param_1,&local_38,param_4,param_5);
if (0 < (int)uVar5) {
param_4 = param_4 + uVar5;
if ((local_38 == (long)param_6) && (param_4 < param_5)) {
uVar5 = (*local_48)(param_1,&local_38,param_4,param_5);
if ((int)uVar5 < 1) {
return 1;
}
param_4 = param_4 + uVar5;
}
lVar8 = local_40;
while( true ) {
if (lVar8 == param_3) {
return 0xffffffff;
}
uVar5 = (*local_48)(param_1,&local_50,lVar8,param_3);
if ((int)uVar5 < 1) break;
uVar3 = local_38;
if (param_9 != (ulong *)0x0) {
sVar7 = (short)*(int4 *)(param_1 + 0xc);
uVar3 = 0xfffd;
if ((local_50 <= *param_9) &&
(lVar1 = *(long *)(param_9[1] + (local_50 >> 8) * 8), uVar3 = local_50,
lVar1 != 0)) {
uVar3 = (ulong)*(uint *)(lVar1 + (local_50 & 0xff) * 0xc + 4 +
(ulong)(-1 < sVar7) * 4);
}
local_50 = uVar3;
uVar3 = 0xfffd;
if ((local_38 <= *param_9) &&
(lVar1 = *(long *)(param_9[1] + (local_38 >> 8) * 8), uVar3 = local_38,
lVar1 != 0)) {
uVar3 = (ulong)*(uint *)(lVar1 + (local_38 & 0xff) * 0xc + 4 +
(ulong)(-1 < sVar7) * 4);
}
}
local_38 = uVar3;
lVar8 = lVar8 + (ulong)uVar5;
if ((local_50 == local_38) &&
(local_40 = lVar8,
uVar5 = my_wildcmp_unicode_impl
(param_1,lVar8,param_3,param_4,param_5,param_6,param_7,
param_8,param_9,param_10 + 1), lVar8 = local_40,
(int)uVar5 < 1)) {
return uVar5;
}
}
return 1;
}
return 1;
}
uVar6 = (*local_48)(param_1,&local_50,local_40,param_3);
if ((int)uVar6 < 1) {
return 1;
}
local_40 = local_40 + (ulong)uVar6;
}
param_4 = param_4 + uVar5;
pcVar2 = local_48;
} while( true );
}
param_4 = param_4 + uVar5;
if ((local_38 == (long)param_6) && (param_4 < param_5)) {
uVar5 = (*pcVar2)(param_1,&local_38,param_4,param_5);
lVar8 = local_40;
if ((int)uVar5 < 1) {
return 1;
}
uVar6 = (*pcVar2)(param_1,&local_50,local_40,param_3);
if ((int)uVar6 < 1) {
return 1;
}
param_4 = param_4 + uVar5;
local_40 = lVar8 + (ulong)uVar6;
LAB_001cb3b6:
uVar3 = local_38;
if (param_9 != (ulong *)0x0) {
sVar7 = (short)*(int4 *)(param_1 + 0xc);
uVar3 = 0xfffd;
if ((local_50 <= *param_9) &&
(lVar8 = *(long *)(param_9[1] + (local_50 >> 8) * 8), uVar3 = local_50, lVar8 != 0)) {
uVar3 = (ulong)*(uint *)(lVar8 + (local_50 & 0xff) * 0xc + 4 + (ulong)(-1 < sVar7) * 4);
}
local_50 = uVar3;
uVar3 = 0xfffd;
if ((local_38 <= *param_9) &&
(lVar8 = *(long *)(param_9[1] + (local_38 >> 8) * 8), uVar3 = local_38, lVar8 != 0)) {
uVar3 = (ulong)*(uint *)(lVar8 + (local_38 & 0xff) * 0xc + 4 + (ulong)(-1 < sVar7) * 4);
}
}
local_38 = uVar3;
if (local_50 != local_38) {
return 1;
}
}
else {
uVar5 = (*pcVar2)(param_1,&local_50,local_40,param_3);
if ((int)uVar5 < 1) {
return 1;
}
local_40 = lVar8 + (ulong)uVar5;
if (local_38 != (long)param_7) goto LAB_001cb3b6;
}
} while (param_4 != param_5);
}
return (uint)(local_40 != param_3);
}
|
|
20,103
|
httplib::detail::stream_line_reader::end_with_crlf() const
|
hkr04[P]cpp-mcp/common/httplib.h
|
inline const char *stream_line_reader::ptr() const {
if (glowable_buffer_.empty()) {
return fixed_buffer_;
} else {
return glowable_buffer_.data();
}
}
|
O2
|
c
|
httplib::detail::stream_line_reader::end_with_crlf() const:
leaq 0x20(%rdi), %rcx
movq 0x28(%rdi), %rax
leaq 0x8(%rdi), %rdx
testq %rax, %rax
cmoveq %rdx, %rcx
cmoveq 0x18(%rdi), %rax
cmpq $0x2, %rax
jb 0x29b3f
movq (%rcx), %rcx
cmpb $0xd, -0x2(%rcx,%rax)
jne 0x29b3f
cmpb $0xa, -0x1(%rcx,%rax)
sete %al
retq
xorl %eax, %eax
retq
|
_ZNK7httplib6detail18stream_line_reader13end_with_crlfEv:
lea rcx, [rdi+20h]
mov rax, [rdi+28h]
lea rdx, [rdi+8]
test rax, rax
cmovz rcx, rdx
cmovz rax, [rdi+18h]
cmp rax, 2
jb short loc_29B3F
mov rcx, [rcx]
cmp byte ptr [rcx+rax-2], 0Dh
jnz short loc_29B3F
cmp byte ptr [rcx+rax-1], 0Ah
setz al
retn
loc_29B3F:
xor eax, eax
retn
|
bool httplib::detail::stream_line_reader::end_with_crlf(httplib::detail::stream_line_reader *this)
{
char *v1; // rcx
unsigned long long v2; // rax
long long v3; // rcx
bool result; // al
v1 = (char *)this + 32;
v2 = *((_QWORD *)this + 5);
if ( !v2 )
{
v1 = (char *)this + 8;
v2 = *((_QWORD *)this + 3);
}
result = v2 >= 2 && (v3 = *(_QWORD *)v1, *(_BYTE *)(v3 + v2 - 2) == 13) && *(_BYTE *)(v3 + v2 - 1) == 10;
return result;
}
|
end_with_crlf:
LEA RCX,[RDI + 0x20]
MOV RAX,qword ptr [RDI + 0x28]
LEA RDX,[RDI + 0x8]
TEST RAX,RAX
CMOVZ RCX,RDX
CMOVZ RAX,qword ptr [RDI + 0x18]
CMP RAX,0x2
JC 0x00129b3f
MOV RCX,qword ptr [RCX]
CMP byte ptr [RCX + RAX*0x1 + -0x2],0xd
JNZ 0x00129b3f
CMP byte ptr [RCX + RAX*0x1 + -0x1],0xa
SETZ AL
RET
LAB_00129b3f:
XOR EAX,EAX
RET
|
/* httplib::detail::stream_line_reader::end_with_crlf() const */
int8 __thiscall httplib::detail::stream_line_reader::end_with_crlf(stream_line_reader *this)
{
ulong uVar1;
stream_line_reader *psVar2;
uVar1 = *(ulong *)(this + 0x28);
psVar2 = this + 0x20;
if (uVar1 == 0) {
psVar2 = this + 8;
}
if (uVar1 == 0) {
uVar1 = *(ulong *)(this + 0x18);
}
if ((1 < uVar1) && (*(char *)(*(long *)psVar2 + -2 + uVar1) == '\r')) {
return CONCAT71((int7)(uVar1 >> 8),*(char *)(*(long *)psVar2 + -1 + uVar1) == '\n');
}
return 0;
}
|
|
20,104
|
LefDefParser::defrData::amper_lookup(LefDefParser::YYSTYPE*, char*)
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/def_keywords.cpp
|
int
defrData::amper_lookup(YYSTYPE *pYylval, char *tkn)
{
string defValue;
/* printf("Amper_lookup: %s\n", tkn); */
/* &defines returns a T_STRING */
if (defGetDefine(tkn, defValue)) {
int value;
if (defGetKeyword(defValue.c_str(), &value))
return value;
if (defValue.c_str()[0] == '"')
pYylval->string = ringCopy(defValue.c_str()+1);
else
pYylval->string = ringCopy(defValue.c_str());
return (defValue.c_str()[0] == '\"' ? QSTRING : T_STRING);
}
/* if none of the above, just return the deftoken. */
pYylval->string = ringCopy(tkn);
return T_STRING;
}
|
O3
|
cpp
|
LefDefParser::defrData::amper_lookup(LefDefParser::YYSTYPE*, char*):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
movq 0x4a961(%rip), %r15 # 0x62fa8
addq $0x18, %r15
movq %r15, 0x8(%rsp)
leaq 0x10(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movq %r12, %rsi
callq 0x163ba
leaq 0x218(%r14), %rdi
leaq 0x10(%rsp), %rsi
callq 0x18c60
leaq 0x220(%r14), %rcx
cmpq %rcx, %rax
je 0x186d7
addq $0x28, %rax
leaq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x6260
leaq 0x10(%rsp), %r15
movq (%r15), %rdi
addq $-0x18, %rdi
leaq 0x6(%rsp), %rsi
callq 0x6120
movq 0x8(%rsp), %rax
movq %rax, (%r15)
movq 0x9250(%r14), %rdi
movq %r15, %rsi
callq 0x18cc4
movq 0x9250(%r14), %rcx
addq $0x8, %rcx
cmpq %rcx, %rax
je 0x186ff
movl 0x28(%rax), %ebx
movq 0x8(%rsp), %r15
jmp 0x1872f
movq 0x10(%rsp), %rdi
addq $-0x18, %rdi
leaq 0x6(%rsp), %rsi
callq 0x6120
movq %r14, %rdi
movq %r12, %rsi
callq 0x16c6a
movq %rax, (%rbx)
movl $0x103, %ebx # imm = 0x103
jmp 0x1872f
movq 0x8(%rsp), %rax
xorl %esi, %esi
cmpb $0x22, (%rax)
sete %sil
addq %rax, %rsi
movq %r14, %rdi
callq 0x16c6a
movq %rax, (%rbx)
movq 0x8(%rsp), %r15
xorl %ebx, %ebx
cmpb $0x22, (%r15)
sete %bl
xorl $0x103, %ebx # imm = 0x103
addq $-0x18, %r15
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0x6120
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x18750
movq %rax, %rbx
jmp 0x1876b
movq %rax, %rbx
movq 0x10(%rsp), %rdi
addq $-0x18, %rdi
leaq 0x6(%rsp), %rsi
callq 0x6120
movq 0x8(%rsp), %rdi
addq $-0x18, %rdi
leaq 0x6(%rsp), %rsi
callq 0x6120
movq %rbx, %rdi
callq 0x6300
|
_ZN12LefDefParser8defrData12amper_lookupEPNS_7YYSTYPEEPc:
push r15
push r14
push r12
push rbx
sub rsp, 18h
mov r12, rdx
mov rbx, rsi
mov r14, rdi
mov r15, cs:_ZNSs4_Rep20_S_empty_rep_storageE_ptr
add r15, 18h
mov [rsp+38h+var_30], r15
lea rdi, [rsp+38h+var_28]
lea rdx, [rsp+38h+var_31]
mov rsi, r12
call _ZNSsC2ISaIcEEEPKcRKS0_; std::string::string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rdi, [r14+218h]
lea rsi, [rsp+38h+var_28]
call _ZNSt8_Rb_treeISsSt4pairIKSsSsESt10_Select1stIS2_EN12LefDefParser17defCompareStringsESaIS2_EE4findERS1_; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,LefDefParser::defCompareStrings,std::allocator<std::pair<std::string const,std::string>>>::find(std::string const&)
lea rcx, [r14+220h]
cmp rax, rcx
jz short loc_186D7
add rax, 28h ; '('
lea rdi, [rsp+38h+var_30]; this
mov rsi, rax; std::string *
call __ZNSs6assignERKSs; std::string::assign(std::string const&)
lea r15, [rsp+38h+var_28]
mov rdi, [r15]
add rdi, 0FFFFFFFFFFFFFFE8h
lea rsi, [rsp+38h+var_32]
call __ZNSs4_Rep10_M_disposeERKSaIcE; std::string::_Rep::_M_dispose(std::allocator<char> const&)
mov rax, [rsp+38h+var_30]
mov [r15], rax
mov rdi, [r14+9250h]
mov rsi, r15
call _ZNKSt8_Rb_treeIPKcSt4pairIKS1_iESt10_Select1stIS4_EN12LefDefParser18defCompareCStringsESaIS4_EE4findERS3_; std::_Rb_tree<char const*,std::pair<char const* const,int>,std::_Select1st<std::pair<char const* const,int>>,LefDefParser::defCompareCStrings,std::allocator<std::pair<char const* const,int>>>::find(char const* const&)
mov rcx, [r14+9250h]
add rcx, 8
cmp rax, rcx
jz short loc_186FF
mov ebx, [rax+28h]
mov r15, [rsp+38h+var_30]
jmp short loc_1872F
loc_186D7:
mov rdi, [rsp+38h+var_28]
add rdi, 0FFFFFFFFFFFFFFE8h
lea rsi, [rsp+38h+var_32]
call __ZNSs4_Rep10_M_disposeERKSaIcE; std::string::_Rep::_M_dispose(std::allocator<char> const&)
mov rdi, r14; this
mov rsi, r12; char *
call _ZN12LefDefParser8defrData8ringCopyEPKc; LefDefParser::defrData::ringCopy(char const*)
mov [rbx], rax
mov ebx, 103h
jmp short loc_1872F
loc_186FF:
mov rax, [rsp+38h+var_30]
xor esi, esi
cmp byte ptr [rax], 22h ; '"'
setz sil
add rsi, rax; char *
mov rdi, r14; this
call _ZN12LefDefParser8defrData8ringCopyEPKc; LefDefParser::defrData::ringCopy(char const*)
mov [rbx], rax
mov r15, [rsp+38h+var_30]
xor ebx, ebx
cmp byte ptr [r15], 22h ; '"'
setz bl
xor ebx, 103h
loc_1872F:
add r15, 0FFFFFFFFFFFFFFE8h
lea rsi, [rsp+38h+var_28]
mov rdi, r15
call __ZNSs4_Rep10_M_disposeERKSaIcE; std::string::_Rep::_M_dispose(std::allocator<char> const&)
mov eax, ebx
add rsp, 18h
pop rbx
pop r12
pop r14
pop r15
retn
jmp short $+2
loc_18750:
mov rbx, rax
jmp short loc_1876B
mov rbx, rax
mov rdi, [rsp+arg_8]
add rdi, 0FFFFFFFFFFFFFFE8h
lea rsi, [rsp+6]
call __ZNSs4_Rep10_M_disposeERKSaIcE; std::string::_Rep::_M_dispose(std::allocator<char> const&)
loc_1876B:
mov rdi, [rsp+arg_0]
add rdi, 0FFFFFFFFFFFFFFE8h
lea rsi, [rsp+6]
call __ZNSs4_Rep10_M_disposeERKSaIcE; std::string::_Rep::_M_dispose(std::allocator<char> const&)
mov rdi, rbx
call __Unwind_Resume
|
long long LefDefParser::defrData::amper_lookup(LefDefParser::defrData *this, _QWORD *a2, const char *a3)
{
char *v4; // r15
long long v5; // rax
long long v6; // rax
unsigned int v7; // ebx
char v9; // [rsp+6h] [rbp-32h] BYREF
char v10; // [rsp+7h] [rbp-31h] BYREF
char *v11; // [rsp+8h] [rbp-30h] BYREF
long long v12[5]; // [rsp+10h] [rbp-28h] BYREF
v4 = (char *)&std::string::_Rep::_S_empty_rep_storage + 24;
v11 = (char *)&std::string::_Rep::_S_empty_rep_storage + 24;
std::string::string<std::allocator<char>>(v12, (long long)a3, (long long)&v10);
v5 = std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,LefDefParser::defCompareStrings,std::allocator<std::pair<std::string const,std::string>>>::find(
(char *)this + 536,
v12);
if ( (LefDefParser::defrData *)v5 == (LefDefParser::defrData *)((char *)this + 544) )
{
std::string::_Rep::_M_dispose(v12[0] - 24, &v9);
*a2 = LefDefParser::defrData::ringCopy(this, a3);
v7 = 259;
}
else
{
std::string::assign((std::string *)&v11, (const std::string *)(v5 + 40));
std::string::_Rep::_M_dispose(v12[0] - 24, &v9);
v12[0] = (long long)v11;
v6 = std::_Rb_tree<char const*,std::pair<char const* const,int>,std::_Select1st<std::pair<char const* const,int>>,LefDefParser::defCompareCStrings,std::allocator<std::pair<char const* const,int>>>::find(*((_QWORD *)this + 4682));
if ( v6 == *((_QWORD *)this + 4682) + 8LL )
{
*a2 = LefDefParser::defrData::ringCopy(this, &v11[*v11 == 34]);
v4 = v11;
v7 = (*v11 == 34) ^ 0x103;
}
else
{
v7 = *(_DWORD *)(v6 + 40);
v4 = v11;
}
}
std::string::_Rep::_M_dispose(v4 - 24, v12);
return v7;
}
|
amper_lookup:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R12,RDX
MOV RBX,RSI
MOV R14,RDI
MOV R15,qword ptr [0x00162fa8]
ADD R15,0x18
MOV qword ptr [RSP + 0x8],R15
LAB_00118650:
LEA RDI,[RSP + 0x10]
LEA RDX,[RSP + 0x7]
MOV RSI,R12
CALL 0x001163ba
LEA RDI,[R14 + 0x218]
LAB_00118669:
LEA RSI,[RSP + 0x10]
CALL 0x00118c60
LEA RCX,[R14 + 0x220]
CMP RAX,RCX
JZ 0x001186d7
ADD RAX,0x28
LEA RDI,[RSP + 0x8]
MOV RSI,RAX
CALL 0x00106260
LEA R15,[RSP + 0x10]
MOV RDI,qword ptr [R15]
ADD RDI,-0x18
LEA RSI,[RSP + 0x6]
CALL 0x00106120
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [R15],RAX
MOV RDI,qword ptr [R14 + 0x9250]
LAB_001186b5:
MOV RSI,R15
CALL 0x00118cc4
LAB_001186bd:
MOV RCX,qword ptr [R14 + 0x9250]
ADD RCX,0x8
CMP RAX,RCX
JZ 0x001186ff
MOV EBX,dword ptr [RAX + 0x28]
MOV R15,qword ptr [RSP + 0x8]
JMP 0x0011872f
LAB_001186d7:
MOV RDI,qword ptr [RSP + 0x10]
ADD RDI,-0x18
LEA RSI,[RSP + 0x6]
CALL 0x00106120
MOV RDI,R14
MOV RSI,R12
CALL 0x00116c6a
MOV qword ptr [RBX],RAX
MOV EBX,0x103
JMP 0x0011872f
LAB_001186ff:
MOV RAX,qword ptr [RSP + 0x8]
XOR ESI,ESI
CMP byte ptr [RAX],0x22
SETZ SIL
ADD RSI,RAX
MOV RDI,R14
CALL 0x00116c6a
MOV qword ptr [RBX],RAX
MOV R15,qword ptr [RSP + 0x8]
XOR EBX,EBX
CMP byte ptr [R15],0x22
SETZ BL
XOR EBX,0x103
LAB_0011872f:
ADD R15,-0x18
LEA RSI,[RSP + 0x10]
MOV RDI,R15
CALL 0x00106120
MOV EAX,EBX
ADD RSP,0x18
POP RBX
POP R12
POP R14
POP R15
RET
|
/* LefDefParser::defrData::amper_lookup(LefDefParser::YYSTYPE*, char*) */
uint __thiscall LefDefParser::defrData::amper_lookup(defrData *this,YYSTYPE *param_1,char *param_2)
{
defrData *pdVar1;
long lVar2;
int8 uVar3;
uint uVar4;
char *pcVar5;
allocator local_31;
char *local_30;
char *local_28;
pcVar5 = PTR__S_empty_rep_storage_00162fa8 + 0x18;
/* try { // try from 00118650 to 00118661 has its CatchHandler @ 00118750 */
local_30 = pcVar5;
std::string::string<std::allocator<char>>((string *)&local_28,param_2,&local_31);
/* try { // try from 00118669 to 0011868f has its CatchHandler @ 00118755 */
pdVar1 = (defrData *)
std::
_Rb_tree<std::string,std::pair<std::string_const,std::string>,std::_Select1st<std::pair<std::string_const,std::string>>,LefDefParser::defCompareStrings,std::allocator<std::pair<std::string_const,std::string>>>
::find((_Rb_tree<std::string,std::pair<std::string_const,std::string>,std::_Select1st<std::pair<std::string_const,std::string>>,LefDefParser::defCompareStrings,std::allocator<std::pair<std::string_const,std::string>>>
*)(this + 0x218),(string *)&local_28);
if (pdVar1 == this + 0x220) {
std::string::_Rep::_M_dispose((allocator *)(local_28 + -0x18));
uVar3 = ringCopy(this,param_2);
*(int8 *)param_1 = uVar3;
uVar4 = 0x103;
}
else {
std::string::assign((string *)&local_30);
std::string::_Rep::_M_dispose((allocator *)(local_28 + -0x18));
local_28 = local_30;
/* try { // try from 001186b5 to 001186bc has its CatchHandler @ 0011874e */
lVar2 = std::
_Rb_tree<char_const*,std::pair<char_const*const,int>,std::_Select1st<std::pair<char_const*const,int>>,LefDefParser::defCompareCStrings,std::allocator<std::pair<char_const*const,int>>>
::find(*(_Rb_tree<char_const*,std::pair<char_const*const,int>,std::_Select1st<std::pair<char_const*const,int>>,LefDefParser::defCompareCStrings,std::allocator<std::pair<char_const*const,int>>>
**)(this + 0x9250),&local_28);
if (lVar2 == *(long *)(this + 0x9250) + 8) {
uVar3 = ringCopy(this,local_30 + (*local_30 == '\"'));
*(int8 *)param_1 = uVar3;
uVar4 = *local_30 == '\"' ^ 0x103;
pcVar5 = local_30;
}
else {
uVar4 = *(uint *)(lVar2 + 0x28);
pcVar5 = local_30;
}
}
std::string::_Rep::_M_dispose((allocator *)(pcVar5 + -0x18));
return uVar4;
}
|
|
20,105
|
free_full_pages
|
eloqsql/storage/maria/ma_blockrec.c
|
static my_bool free_full_pages(MARIA_HA *info, MARIA_ROW *row)
{
uchar log_data[FILEID_STORE_SIZE + PAGERANGE_STORE_SIZE];
LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 2];
LSN lsn;
size_t extents_length;
uchar *extents= row->extents;
DBUG_ENTER("free_full_pages");
if (info->s->now_transactional)
{
/* Compact events by removing filler and tail events */
uchar *new_block= 0;
uchar *end, *to, *compact_extent_info;
my_bool res, buff_alloced;
uint extents_count;
alloc_on_stack(*info->stack_end_ptr, compact_extent_info, buff_alloced,
row->extents_count * ROW_EXTENT_SIZE);
if (!compact_extent_info)
DBUG_RETURN(1);
to= compact_extent_info;
for (end= extents + row->extents_count * ROW_EXTENT_SIZE ;
extents < end ;
extents+= ROW_EXTENT_SIZE)
{
uint page_count= uint2korr(extents + ROW_EXTENT_PAGE_SIZE);
page_count&= ~START_EXTENT_BIT;
if (! (page_count & TAIL_BIT) && page_count != 0)
{
/* Found correct extent */
if (!new_block)
new_block= extents; /* First extent in range */
continue;
}
/* Found extent to remove, copy everything found so far */
if (new_block)
{
size_t length= (size_t) (extents - new_block);
memcpy(to, new_block, length);
to+= length;
new_block= 0;
}
}
if (new_block)
{
size_t length= (size_t) (extents - new_block);
memcpy(to, new_block, length);
to+= length;
}
if (!unlikely(extents_length= (uint) (to - compact_extent_info)))
{
/*
No ranges. This happens in the rear case when we have a allocated
place for a blob on a tail page but it did fit into the main page.
*/
stack_alloc_free(compact_extent_info, buff_alloced);
DBUG_RETURN(0);
}
extents_count= (uint) (extents_length / ROW_EXTENT_SIZE);
pagerange_store(log_data + FILEID_STORE_SIZE, extents_count);
log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data;
log_array[TRANSLOG_INTERNAL_PARTS + 0].length= sizeof(log_data);
log_array[TRANSLOG_INTERNAL_PARTS + 1].str= compact_extent_info;
log_array[TRANSLOG_INTERNAL_PARTS + 1].length= extents_length;
res= translog_write_record(&lsn, LOGREC_REDO_FREE_BLOCKS, info->trn,
info,
(translog_size_t) (sizeof(log_data) +
extents_length),
TRANSLOG_INTERNAL_PARTS + 2, log_array,
log_data, NULL);
stack_alloc_free(compact_extent_info, buff_alloced);
if (res)
DBUG_RETURN(1);
}
DBUG_RETURN(_ma_bitmap_free_full_pages(info, row->extents,
row->extents_count));
}
|
O3
|
c
|
free_full_pages:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rsi, %r15
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq 0x10(%rsi), %r14
movq (%rdi), %rax
cmpb $0x0, 0x7e7(%rax)
je 0x5d528
movl 0xac(%r15), %eax
leal (,%rax,8), %r13d
subl %eax, %r13d
leaq -0xa0(%rbp), %r12
movq %r13, (%r12)
movq 0x78(%rbx), %rcx
movq (%rcx), %rcx
subq %r12, %rcx
subq %r13, %rcx
jbe 0x5d3b7
cmpq $0x10000, %rcx # imm = 0x10000
ja 0x5d39a
cmpl $0x1000, %r13d # imm = 0x1000
jb 0x5d3b7
cmpq $0x8001, %rcx # imm = 0x8001
jb 0x5d3b7
movq %r15, -0x48(%rbp)
movq %rbx, -0x40(%rbp)
movq %rsp, %rdi
leaq 0xf(%r13), %rcx
andq $-0x10, %rcx
subq %rcx, %rdi
movq %rdi, %rsp
movb $0x1, %bl
jmp 0x5d3ee
movl $0x10010, %edx # imm = 0x10010
xorl %edi, %edi
movq %r13, %rsi
callq 0x9f901
testq %rax, %rax
je 0x5d490
movq %rax, %rdi
movq %rbx, -0x40(%rbp)
movq %r15, -0x48(%rbp)
movl 0xac(%r15), %eax
leal (,%rax,8), %r13d
subl %eax, %r13d
xorl %ebx, %ebx
movq %rdi, %r15
testl %eax, %eax
je 0x5d473
movl %ebx, -0x38(%rbp)
addq %r14, %r13
xorl %esi, %esi
movq %r14, %r12
movq %rdi, -0x50(%rbp)
movq %rdi, %r15
movzwl 0x5(%r14), %eax
testw %ax, %ax
sets %cl
testl $0xbfff, %eax # imm = 0xBFFF
sete %al
orb %cl, %al
jne 0x5d427
testq %rsi, %rsi
cmoveq %r14, %rsi
jmp 0x5d442
testq %rsi, %rsi
je 0x5d440
movq %r12, %rbx
subq %rsi, %rbx
movq %r15, %rdi
movq %rbx, %rdx
callq 0x29080
addq %rbx, %r15
xorl %esi, %esi
addq $0x7, %r14
addq $0x7, %r12
cmpq %r13, %r14
jb 0x5d407
testq %rsi, %rsi
je 0x5d465
subq %rsi, %r12
movq %r15, %rdi
movq %r12, %rdx
callq 0x29080
addq %r12, %r15
leaq -0xa0(%rbp), %r12
movq -0x50(%rbp), %rdi
movl -0x38(%rbp), %ebx
subq %rdi, %r15
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
andq %r15, %rax
jne 0x5d497
testb %bl, %bl
jne 0x5d489
callq 0x9fb2e
xorl %eax, %eax
jmp 0x5d53a
movb $0x1, %al
jmp 0x5d53a
movq %rdi, %r13
movl %r15d, %ecx
imulq $0x24924925, %rcx, %rcx # imm = 0x24924925
shrq $0x20, %rcx
movl %r15d, %edx
subl %ecx, %edx
shrl %edx
addl %ecx, %edx
shrl $0x2, %edx
leaq -0x34(%rbp), %r10
movw %dx, 0x2(%r10)
movq %r10, -0x80(%rbp)
movq $0x4, -0x78(%rbp)
movq %rdi, -0x70(%rbp)
movq %rax, -0x68(%rbp)
movq -0x40(%rbp), %rcx
movq 0x8(%rcx), %rdx
addl $0x4, %r15d
subq $0x8, %rsp
leaq -0x58(%rbp), %rdi
movl $0x8, %esi
movq %rcx, -0x40(%rbp)
movl %r15d, %r8d
movl $0x4, %r9d
pushq $0x0
pushq %r10
pushq %r12
callq 0x2a8ac
addq $0x20, %rsp
movl %eax, %r14d
testb %bl, %bl
jne 0x5d515
movq %r13, %rdi
callq 0x9fb2e
movb $0x1, %al
testb %r14b, %r14b
jne 0x5d53a
movq -0x48(%rbp), %r15
movq 0x10(%r15), %r14
movq -0x40(%rbp), %rbx
movl 0xac(%r15), %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x416a7
movq %fs:0x28, %rcx
cmpq -0x30(%rbp), %rcx
jne 0x5d558
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x29270
|
free_full_pages:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 78h
mov r15, rsi
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov r14, [rsi+10h]
mov rax, [rdi]
cmp byte ptr [rax+7E7h], 0
jz loc_5D528
mov eax, [r15+0ACh]
lea r13d, ds:0[rax*8]
sub r13d, eax
lea r12, [rbp+var_A0]
mov [r12], r13
mov rcx, [rbx+78h]
mov rcx, [rcx]
sub rcx, r12
sub rcx, r13
jbe short loc_5D3B7
cmp rcx, offset stru_10000
ja short loc_5D39A
cmp r13d, 1000h
jb short loc_5D3B7
cmp rcx, 8001h
jb short loc_5D3B7
loc_5D39A:
mov [rbp+var_48], r15
mov [rbp+var_40], rbx
mov rdi, rsp
lea rcx, [r13+0Fh]
and rcx, 0FFFFFFFFFFFFFFF0h
sub rdi, rcx
mov rsp, rdi
mov bl, 1
jmp short loc_5D3EE
loc_5D3B7:
mov edx, 10010h
xor edi, edi
mov rsi, r13
call my_malloc
test rax, rax
jz loc_5D490
mov rdi, rax
mov [rbp+var_40], rbx
mov [rbp+var_48], r15
mov eax, [r15+0ACh]
lea r13d, ds:0[rax*8]
sub r13d, eax
xor ebx, ebx
loc_5D3EE:
mov r15, rdi
test eax, eax
jz short loc_5D473
mov [rbp+var_38], ebx
add r13, r14
xor esi, esi
mov r12, r14
mov [rbp+var_50], rdi
mov r15, rdi
loc_5D407:
movzx eax, word ptr [r14+5]
test ax, ax
sets cl
test eax, 0BFFFh
setz al
or al, cl
jnz short loc_5D427
test rsi, rsi
cmovz rsi, r14
jmp short loc_5D442
loc_5D427:
test rsi, rsi
jz short loc_5D440
mov rbx, r12
sub rbx, rsi
mov rdi, r15
mov rdx, rbx
call _memcpy
add r15, rbx
loc_5D440:
xor esi, esi
loc_5D442:
add r14, 7
add r12, 7
cmp r14, r13
jb short loc_5D407
test rsi, rsi
jz short loc_5D465
sub r12, rsi
mov rdi, r15
mov rdx, r12
call _memcpy
add r15, r12
loc_5D465:
lea r12, [rbp+var_A0]
mov rdi, [rbp+var_50]
mov ebx, [rbp+var_38]
loc_5D473:
sub r15, rdi
mov eax, 0FFFFFFFFh
and rax, r15
jnz short loc_5D497
test bl, bl
jnz short loc_5D489
call my_free
loc_5D489:
xor eax, eax
jmp loc_5D53A
loc_5D490:
mov al, 1
jmp loc_5D53A
loc_5D497:
mov r13, rdi
mov ecx, r15d
imul rcx, 24924925h
shr rcx, 20h
mov edx, r15d
sub edx, ecx
shr edx, 1
add edx, ecx
shr edx, 2
lea r10, [rbp+var_34]
mov [r10+2], dx
mov [rbp+var_80], r10
mov [rbp+var_78], 4
mov [rbp+var_70], rdi
mov [rbp+var_68], rax
mov rcx, [rbp+var_40]
mov rdx, [rcx+8]
add r15d, 4
sub rsp, 8
lea rdi, [rbp+var_58]
mov esi, 8
mov [rbp+var_40], rcx
mov r8d, r15d
mov r9d, 4
push 0
push r10
push r12
call translog_write_record
add rsp, 20h
mov r14d, eax
test bl, bl
jnz short loc_5D515
mov rdi, r13
call my_free
loc_5D515:
mov al, 1
test r14b, r14b
jnz short loc_5D53A
mov r15, [rbp+var_48]
mov r14, [r15+10h]
mov rbx, [rbp+var_40]
loc_5D528:
mov edx, [r15+0ACh]
mov rdi, rbx
mov rsi, r14
call _ma_bitmap_free_full_pages
loc_5D53A:
mov rcx, fs:28h
cmp rcx, [rbp+var_30]
jnz short loc_5D558
lea rsp, [rbp-28h]
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_5D558:
call ___stack_chk_fail
|
char free_full_pages(long long *a1, long long a2)
{
long long v2; // r15
long long *v3; // rbx
unsigned long long v4; // r14
int v5; // eax
unsigned long long v6; // r13
unsigned long long v7; // rcx
bool v8; // cc
unsigned long long v9; // rcx
char *v10; // rdi
long long v11; // rax
char *v12; // r15
unsigned long long v13; // r13
unsigned long long v14; // rsi
unsigned long long v15; // r12
unsigned long long v16; // r12
unsigned int v17; // r15d
char result; // al
char v19; // r14
_OWORD v20[2]; // [rsp+0h] [rbp-A0h] BYREF
_WORD *v21; // [rsp+20h] [rbp-80h]
long long v22; // [rsp+28h] [rbp-78h]
char *v23; // [rsp+30h] [rbp-70h]
long long v24; // [rsp+38h] [rbp-68h]
char v25[8]; // [rsp+48h] [rbp-58h] BYREF
char *v26; // [rsp+50h] [rbp-50h]
long long v27; // [rsp+58h] [rbp-48h]
long long *v28; // [rsp+60h] [rbp-40h]
int v29; // [rsp+68h] [rbp-38h]
_WORD v30[2]; // [rsp+6Ch] [rbp-34h] BYREF
unsigned long long v31; // [rsp+70h] [rbp-30h]
v2 = a2;
v3 = a1;
v31 = __readfsqword(0x28u);
v4 = *(_QWORD *)(a2 + 16);
if ( !*(_BYTE *)(*a1 + 2023) )
return ma_bitmap_free_full_pages(v3, (unsigned int *)v4, *(_DWORD *)(v2 + 172));
v5 = *(_DWORD *)(a2 + 172);
v6 = (unsigned int)(7 * v5);
*(_QWORD *)&v20[0] = v6;
v7 = *(_QWORD *)a1[15] - (_QWORD)v20;
v8 = v7 <= v6;
v9 = v7 - v6;
if ( v8 || v9 <= (unsigned long long)&stru_10000 && ((unsigned int)v6 < 0x1000 || v9 < 0x8001) )
{
v11 = my_malloc(0LL, (unsigned int)(7 * v5), 65552LL);
if ( !v11 )
return 1;
v10 = (char *)v11;
v28 = v3;
v27 = a2;
v5 = *(_DWORD *)(a2 + 172);
v6 = (unsigned int)(7 * v5);
LODWORD(v3) = 0;
}
else
{
v27 = a2;
v28 = a1;
v10 = (char *)v20 - ((v6 + 15) & 0xFFFFFFFFFFFFFFF0LL);
LOBYTE(v3) = 1;
}
LODWORD(v12) = (_DWORD)v10;
if ( v5 )
{
v29 = (int)v3;
v13 = v4 + v6;
v14 = 0LL;
v15 = v4;
v26 = v10;
v12 = v10;
do
{
if ( *(__int16 *)(v4 + 5) < 0 || (*(_WORD *)(v4 + 5) & 0xBFFF) == 0 )
{
if ( v14 )
{
memcpy(v12, v14, v15 - v14);
v12 += v15 - v14;
}
v14 = 0LL;
}
else if ( !v14 )
{
v14 = v4;
}
v4 += 7LL;
v15 += 7LL;
}
while ( v4 < v13 );
if ( v14 )
{
v16 = v15 - v14;
memcpy(v12, v14, v16);
LODWORD(v12) = v16 + (_DWORD)v12;
}
v10 = v26;
LOBYTE(v3) = v29;
}
v17 = (_DWORD)v12 - (_DWORD)v10;
if ( !v17 )
{
if ( !(_BYTE)v3 )
my_free(v10);
return 0;
}
v30[1] = v17 / 7;
v21 = v30;
v22 = 4LL;
v23 = v10;
v24 = v17;
v19 = translog_write_record((unsigned long long)v25, &byte_8, v28[1], v28, v17 + 4, 4, v20, v30, 0LL);
if ( !(_BYTE)v3 )
my_free(v10);
result = 1;
if ( !v19 )
{
v2 = v27;
v4 = *(_QWORD *)(v27 + 16);
v3 = v28;
return ma_bitmap_free_full_pages(v3, (unsigned int *)v4, *(_DWORD *)(v2 + 172));
}
return result;
}
|
free_full_pages:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x78
MOV R15,RSI
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV R14,qword ptr [RSI + 0x10]
MOV RAX,qword ptr [RDI]
CMP byte ptr [RAX + 0x7e7],0x0
JZ 0x0015d528
MOV EAX,dword ptr [R15 + 0xac]
LEA R13D,[RAX*0x8]
SUB R13D,EAX
LEA R12,[RBP + -0xa0]
MOV qword ptr [R12],R13
MOV RCX,qword ptr [RBX + 0x78]
MOV RCX,qword ptr [RCX]
SUB RCX,R12
SUB RCX,R13
JBE 0x0015d3b7
CMP RCX,0x10000
JA 0x0015d39a
CMP R13D,0x1000
JC 0x0015d3b7
CMP RCX,0x8001
JC 0x0015d3b7
LAB_0015d39a:
MOV qword ptr [RBP + -0x48],R15
MOV qword ptr [RBP + -0x40],RBX
MOV RDI,RSP
LEA RCX,[R13 + 0xf]
AND RCX,-0x10
SUB RDI,RCX
MOV RSP,RDI
MOV BL,0x1
JMP 0x0015d3ee
LAB_0015d3b7:
MOV EDX,0x10010
XOR EDI,EDI
MOV RSI,R13
CALL 0x0019f901
TEST RAX,RAX
JZ 0x0015d490
MOV RDI,RAX
MOV qword ptr [RBP + -0x40],RBX
MOV qword ptr [RBP + -0x48],R15
MOV EAX,dword ptr [R15 + 0xac]
LEA R13D,[RAX*0x8]
SUB R13D,EAX
XOR EBX,EBX
LAB_0015d3ee:
MOV R15,RDI
TEST EAX,EAX
JZ 0x0015d473
MOV dword ptr [RBP + -0x38],EBX
ADD R13,R14
XOR ESI,ESI
MOV R12,R14
MOV qword ptr [RBP + -0x50],RDI
MOV R15,RDI
LAB_0015d407:
MOVZX EAX,word ptr [R14 + 0x5]
TEST AX,AX
SETS CL
TEST EAX,0xbfff
SETZ AL
OR AL,CL
JNZ 0x0015d427
TEST RSI,RSI
CMOVZ RSI,R14
JMP 0x0015d442
LAB_0015d427:
TEST RSI,RSI
JZ 0x0015d440
MOV RBX,R12
SUB RBX,RSI
MOV RDI,R15
MOV RDX,RBX
CALL 0x00129080
ADD R15,RBX
LAB_0015d440:
XOR ESI,ESI
LAB_0015d442:
ADD R14,0x7
ADD R12,0x7
CMP R14,R13
JC 0x0015d407
TEST RSI,RSI
JZ 0x0015d465
SUB R12,RSI
MOV RDI,R15
MOV RDX,R12
CALL 0x00129080
ADD R15,R12
LAB_0015d465:
LEA R12,[RBP + -0xa0]
MOV RDI,qword ptr [RBP + -0x50]
MOV EBX,dword ptr [RBP + -0x38]
LAB_0015d473:
SUB R15,RDI
MOV EAX,0xffffffff
AND RAX,R15
JNZ 0x0015d497
TEST BL,BL
JNZ 0x0015d489
CALL 0x0019fb2e
LAB_0015d489:
XOR EAX,EAX
JMP 0x0015d53a
LAB_0015d490:
MOV AL,0x1
JMP 0x0015d53a
LAB_0015d497:
MOV R13,RDI
MOV ECX,R15D
IMUL RCX,RCX,0x24924925
SHR RCX,0x20
MOV EDX,R15D
SUB EDX,ECX
SHR EDX,0x1
ADD EDX,ECX
SHR EDX,0x2
LEA R10,[RBP + -0x34]
MOV word ptr [R10 + 0x2],DX
MOV qword ptr [RBP + -0x80],R10
MOV qword ptr [RBP + -0x78],0x4
MOV qword ptr [RBP + -0x70],RDI
MOV qword ptr [RBP + -0x68],RAX
MOV RCX,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RCX + 0x8]
ADD R15D,0x4
SUB RSP,0x8
LEA RDI,[RBP + -0x58]
MOV ESI,0x8
MOV qword ptr [RBP + -0x40],RCX
MOV R8D,R15D
MOV R9D,0x4
PUSH 0x0
PUSH R10
PUSH R12
CALL 0x0012a8ac
ADD RSP,0x20
MOV R14D,EAX
TEST BL,BL
JNZ 0x0015d515
MOV RDI,R13
CALL 0x0019fb2e
LAB_0015d515:
MOV AL,0x1
TEST R14B,R14B
JNZ 0x0015d53a
MOV R15,qword ptr [RBP + -0x48]
MOV R14,qword ptr [R15 + 0x10]
MOV RBX,qword ptr [RBP + -0x40]
LAB_0015d528:
MOV EDX,dword ptr [R15 + 0xac]
MOV RDI,RBX
MOV RSI,R14
CALL 0x001416a7
LAB_0015d53a:
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x30]
JNZ 0x0015d558
LEA RSP,[RBP + -0x28]
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0015d558:
CALL 0x00129270
|
int8 free_full_pages(long *param_1,long param_2)
{
int4 uVar1;
long lVar2;
long *plVar3;
ulong *puVar4;
char cVar5;
int8 uVar6;
int iVar7;
ulong uVar8;
ulong *puVar9;
void *__src;
int1 *puVar10;
void *pvVar11;
void *pvVar12;
void *pvVar13;
int1 *__dest;
ulong uVar14;
long in_FS_OFFSET;
ulong local_a8 [4];
int1 *local_88;
int8 local_80;
int1 *local_78;
ulong local_70;
int1 local_60 [8];
int1 *local_58;
long local_50;
long *local_48;
uint local_40;
int1 local_3c [2];
int2 local_3a;
long local_38;
puVar9 = local_a8;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
pvVar11 = *(void **)(param_2 + 0x10);
puVar4 = local_a8;
if (*(char *)(*param_1 + 0x7e7) != '\0') {
iVar7 = *(int *)(param_2 + 0xac);
uVar14 = (ulong)(uint)(iVar7 * 7);
uVar8 = (*(long *)param_1[0xf] - (long)local_a8) - uVar14;
local_a8[0] = uVar14;
if ((uVar14 < (ulong)(*(long *)param_1[0xf] - (long)local_a8)) &&
((0x10000 < uVar8 || ((0xfff < (uint)(iVar7 * 7) && (0x8000 < uVar8)))))) {
__dest = (int1 *)((long)local_a8 - (uVar14 + 0xf & 0xfffffffffffffff0));
uVar8 = CONCAT71((int7)((ulong)param_1 >> 8),1);
puVar9 = (ulong *)__dest;
}
else {
__dest = (int1 *)my_malloc(0,uVar14,0x10010);
if (__dest == (int1 *)0x0) {
uVar6 = 1;
goto LAB_0015d53a;
}
iVar7 = *(int *)(param_2 + 0xac);
uVar14 = (ulong)(uint)(iVar7 * 7);
uVar8 = 0;
puVar9 = local_a8;
}
puVar10 = __dest;
local_50 = param_2;
local_48 = param_1;
if (iVar7 != 0) {
local_40 = (uint)uVar8;
pvVar12 = (void *)(uVar14 + (long)pvVar11);
__src = (void *)0x0;
pvVar13 = pvVar11;
local_58 = __dest;
do {
if ((*(ushort *)((long)pvVar13 + 5) & 0xbfff) == 0 ||
(short)*(ushort *)((long)pvVar13 + 5) < 0) {
if (__src != (void *)0x0) {
*(int8 *)((long)puVar9 + -8) = 0x15d43d;
memcpy(__dest,__src,(long)pvVar11 - (long)__src);
__dest = __dest + ((long)pvVar11 - (long)__src);
}
__src = (void *)0x0;
}
else if (__src == (void *)0x0) {
__src = pvVar13;
}
pvVar13 = (void *)((long)pvVar13 + 7);
pvVar11 = (void *)((long)pvVar11 + 7);
} while (pvVar13 < pvVar12);
if (__src != (void *)0x0) {
*(int8 *)((long)puVar9 + -8) = 0x15d462;
memcpy(__dest,__src,(long)pvVar11 - (long)__src);
__dest = __dest + ((long)pvVar11 - (long)__src);
}
uVar8 = (ulong)local_40;
puVar10 = local_58;
}
plVar3 = local_48;
uVar14 = (long)__dest - (long)puVar10;
if ((uVar14 & 0xffffffff) == 0) {
if ((char)uVar8 == '\0') {
*(int8 *)((long)puVar9 + -8) = 0x15d489;
my_free();
}
uVar6 = 0;
goto LAB_0015d53a;
}
iVar7 = (int)((uVar14 & 0xffffffff) * 0x24924925 >> 0x20);
local_3a = (int2)(((uint)((int)uVar14 - iVar7) >> 1) + iVar7 >> 2);
local_80 = 4;
lVar2 = local_48[1];
local_88 = local_3c;
local_78 = puVar10;
local_70 = uVar14 & 0xffffffff;
*(int8 *)((long)puVar9 + -0x10) = 0;
*(int1 **)((long)puVar9 + -0x18) = local_3c;
*(ulong **)((long)puVar9 + -0x20) = local_a8;
*(int8 *)((long)puVar9 + -0x28) = 0x15d502;
cVar5 = translog_write_record(local_60,8,lVar2,plVar3,(int)uVar14 + 4,4);
if ((char)uVar8 == '\0') {
*(int8 *)((long)puVar9 + -8) = 0x15d515;
my_free(puVar10);
}
uVar6 = 1;
if (cVar5 != '\0') goto LAB_0015d53a;
pvVar11 = *(void **)(local_50 + 0x10);
param_1 = local_48;
puVar4 = puVar9;
param_2 = local_50;
}
puVar9 = puVar4;
uVar1 = *(int4 *)(param_2 + 0xac);
*(int8 *)((long)puVar9 + -8) = 0x15d53a;
uVar6 = _ma_bitmap_free_full_pages(param_1,pvVar11,uVar1);
LAB_0015d53a:
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
*(code **)((long)puVar9 + -8) = _ma_read_block_record2;
__stack_chk_fail();
}
return uVar6;
}
|
|
20,106
|
is_not_initialized
|
eloqsql/build_O0/libmariadb/libmariadb/ma_client_plugin.c
|
static int is_not_initialized(MYSQL *mysql, const char *name)
{
if (initialized)
return 0;
my_set_error(mysql, CR_AUTH_PLUGIN_CANNOT_LOAD,
SQLSTATE_UNKNOWN, ER(CR_AUTH_PLUGIN_CANNOT_LOAD),
name, "not initialized");
return 1;
}
|
O0
|
c
|
is_not_initialized:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpb $0x0, 0x2bc29(%rip) # 0x64cf0
je 0x390d2
movl $0x0, -0x4(%rbp)
jmp 0x3910c
movq -0x10(%rbp), %rdi
leaq 0x29e93(%rip), %rax # 0x62f70
movq (%rax), %rdx
leaq 0x29e99(%rip), %rax # 0x62f80
movq 0x1d8(%rax), %rcx
movq -0x18(%rbp), %r8
movl $0x80b, %esi # imm = 0x80B
leaq 0x160ad(%rip), %r9 # 0x4f1ab
movb $0x0, %al
callq 0x16c30
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
is_not_initialized:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
cmp cs:initialized, 0
jz short loc_390D2
mov [rbp+var_4], 0
jmp short loc_3910C
loc_390D2:
mov rdi, [rbp+var_10]
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
lea rax, client_errors
mov rcx, [rax+1D8h]
mov r8, [rbp+var_18]
mov esi, 80Bh
lea r9, aNotInitialized; "not initialized"
mov al, 0
call my_set_error
mov [rbp+var_4], 1
loc_3910C:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
|
long long is_not_initialized(long long a1, long long a2)
{
if ( initialized )
{
return 0;
}
else
{
my_set_error(a1, 0x80Bu, (long long)SQLSTATE_UNKNOWN, (long long)client_errors[59], a2, "not initialized");
return 1;
}
}
|
is_not_initialized:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
CMP byte ptr [0x00164cf0],0x0
JZ 0x001390d2
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0013910c
LAB_001390d2:
MOV RDI,qword ptr [RBP + -0x10]
LEA RAX,[0x162f70]
MOV RDX,qword ptr [RAX]
LEA RAX,[0x162f80]
MOV RCX,qword ptr [RAX + 0x1d8]
MOV R8,qword ptr [RBP + -0x18]
MOV ESI,0x80b
LEA R9,[0x14f1ab]
MOV AL,0x0
CALL 0x00116c30
MOV dword ptr [RBP + -0x4],0x1
LAB_0013910c:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
bool is_not_initialized(int8 param_1,int8 param_2)
{
bool bVar1;
bVar1 = initialized == '\0';
if (bVar1) {
my_set_error(param_1,0x80b,SQLSTATE_UNKNOWN,PTR_s_Plugin__s_could_not_be_loaded____00163158,
param_2,"not initialized");
}
return bVar1;
}
|
|
20,107
|
ftxui::TerminalInputParser::ParseCSI()
|
Andrewchistyakov[P]flashcards_lyc/build_O1/_deps/ftxui-src/src/ftxui/component/terminal_input_parser.cpp
|
TerminalInputParser::Output TerminalInputParser::ParseCSI() {
bool altered = false;
int argument = 0;
std::vector<int> arguments;
while (true) {
if (!Eat()) {
return UNCOMPLETED;
}
if (Current() == '<') {
altered = true;
continue;
}
if (Current() >= '0' && Current() <= '9') {
argument *= 10; // NOLINT
argument += Current() - '0';
continue;
}
if (Current() == ';') {
arguments.push_back(argument);
argument = 0;
continue;
}
// CSI is terminated by a character in the range 0x40–0x7E
// (ASCII @A–Z[\]^_`a–z{|}~),
if (Current() >= '@' && Current() <= '~' &&
// Note: I don't remember why we exclude '<'
Current() != '<' &&
// To handle F1-F4, we exclude '['.
Current() != '[') {
arguments.push_back(argument);
argument = 0; // NOLINT
switch (Current()) {
case 'M':
return ParseMouse(altered, true, std::move(arguments));
case 'm':
return ParseMouse(altered, false, std::move(arguments));
case 'R':
return ParseCursorReporting(std::move(arguments));
default:
return SPECIAL;
}
}
// Invalid ESC in CSI.
if (Current() == '\x1B') {
return SPECIAL;
}
}
}
|
O1
|
cpp
|
ftxui::TerminalInputParser::ParseCSI():
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
movl $0x0, 0xc(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movl 0x8(%rsi), %eax
incl %eax
movl %eax, 0x8(%rsi)
cmpl 0x18(%rsi), %eax
jge 0x3386d
movq %rsi, %r14
leaq 0x10(%rsp), %r15
leaq 0xc(%rsp), %r12
movslq %eax, %rcx
movq 0x10(%r14), %rdx
movb (%rdx,%rcx), %al
cmpb $0x3c, %al
je 0x33859
leal -0x30(%rax), %esi
cmpb $0x9, %sil
ja 0x3380a
movl 0xc(%rsp), %eax
addl %eax, %eax
leal (%rax,%rax,4), %eax
movl %eax, 0xc(%rsp)
movzbl (%rdx,%rcx), %ecx
addl %ecx, %eax
addl $-0x30, %eax
movl %eax, 0xc(%rsp)
jmp 0x33859
cmpb $0x3b, %al
jne 0x3382b
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x33846
movl 0xc(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%rsp)
jmp 0x33851
leal -0x7f(%rax), %ecx
cmpb $-0x3f, %cl
setb %cl
cmpb $0x5b, %al
sete %dl
orb %cl, %dl
je 0x33899
cmpb $0x1b, %al
jne 0x33859
jmp 0x33928
movq %r15, %rdi
movq %r12, %rdx
callq 0x1fd90
movl $0x0, 0xc(%rsp)
movl 0x8(%r14), %eax
incl %eax
movl %eax, 0x8(%r14)
cmpl 0x18(%r14), %eax
jl 0x337d7
movl $0x0, (%rbx)
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x3388a
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0xb400
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x338b6
movl 0xc(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%rsp)
jmp 0x338c5
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rdx
callq 0x1fd90
movl $0x0, 0xc(%rsp)
movslq 0x8(%r14), %rax
movq 0x10(%r14), %rcx
movzbl (%rcx,%rax), %eax
cmpl $0x6d, %eax
je 0x3396f
cmpl $0x52, %eax
je 0x33933
cmpl $0x4d, %eax
jne 0x33928
movq 0x10(%rsp), %r14
movq 0x18(%rsp), %rax
leaq 0x40(%rsp), %r8
movq %r14, (%r8)
movq %rax, 0x8(%r8)
movq 0x20(%rsp), %r15
movq %r15, 0x10(%r8)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movq %rbx, %rdi
xorl %edx, %edx
movl $0x1, %ecx
jmp 0x339a6
movl $0x3, (%rbx)
jmp 0x33873
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rax
movq 0x20(%rsp), %rsi
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
subq %rdi, %rax
cmpq $0x8, %rax
jne 0x339bf
movl $0x5, (%rbx)
movl (%rdi), %eax
movl %eax, 0x8(%rbx)
movl 0x4(%rdi), %eax
movl %eax, 0x4(%rbx)
jmp 0x339c5
movq 0x10(%rsp), %r14
movq 0x18(%rsp), %rax
leaq 0x28(%rsp), %r8
movq %r14, (%r8)
movq %rax, 0x8(%r8)
movq 0x20(%rsp), %r15
movq %r15, 0x10(%r8)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x33a52
testq %r14, %r14
je 0x33873
subq %r14, %r15
movq %r14, %rdi
movq %r15, %rsi
jmp 0x339d1
movl $0x3, (%rbx)
testq %rdi, %rdi
je 0x33873
subq %rdi, %rsi
callq 0xb400
jmp 0x33873
jmp 0x339dd
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x339f7
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0xb400
movq %rbx, %rdi
callq 0xb780
nop
|
_ZN5ftxui19TerminalInputParser8ParseCSIEv:
push r15
push r14
push r12
push rbx
sub rsp, 58h
mov rbx, rdi
mov [rsp+78h+var_6C], 0
xorps xmm0, xmm0
movaps xmmword ptr [rsp+78h+var_68], xmm0
mov [rsp+78h+var_58], 0
mov eax, [rsi+8]
inc eax
mov [rsi+8], eax
cmp eax, [rsi+18h]
jge loc_3386D
mov r14, rsi
lea r15, [rsp+78h+var_68]
lea r12, [rsp+78h+var_6C]
loc_337D7:
movsxd rcx, eax
mov rdx, [r14+10h]
mov al, [rdx+rcx]
cmp al, 3Ch ; '<'
jz short loc_33859
lea esi, [rax-30h]
cmp sil, 9
ja short loc_3380A
mov eax, [rsp+78h+var_6C]
add eax, eax
lea eax, [rax+rax*4]
mov [rsp+78h+var_6C], eax
movzx ecx, byte ptr [rdx+rcx]
add eax, ecx
add eax, 0FFFFFFD0h
mov [rsp+78h+var_6C], eax
jmp short loc_33859
loc_3380A:
cmp al, 3Bh ; ';'
jnz short loc_3382B
mov rsi, [rsp+78h+var_68+8]
cmp rsi, [rsp+78h+var_58]
jz short loc_33846
mov eax, [rsp+78h+var_6C]
mov [rsi], eax
add rsi, 4
mov [rsp+78h+var_68+8], rsi
jmp short loc_33851
loc_3382B:
lea ecx, [rax-7Fh]
cmp cl, 0C1h
setb cl
cmp al, 5Bh ; '['
setz dl
or dl, cl
jz short loc_33899
cmp al, 1Bh
jnz short loc_33859
jmp loc_33928
loc_33846:
mov rdi, r15
mov rdx, r12
call _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_; std::vector<int>::_M_realloc_insert<int const&>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int const&)
loc_33851:
mov [rsp+78h+var_6C], 0
loc_33859:
mov eax, [r14+8]
inc eax
mov [r14+8], eax
cmp eax, [r14+18h]
jl loc_337D7
loc_3386D:
mov dword ptr [rbx], 0
loc_33873:
mov rdi, [rsp+78h+var_68]; void *
test rdi, rdi
jz short loc_3388A
mov rsi, [rsp+78h+var_58]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_3388A:
mov rax, rbx
add rsp, 58h
pop rbx
pop r12
pop r14
pop r15
retn
loc_33899:
mov rsi, [rsp+78h+var_68+8]
cmp rsi, [rsp+78h+var_58]
jz short loc_338B6
mov eax, [rsp+78h+var_6C]
mov [rsi], eax
add rsi, 4
mov [rsp+78h+var_68+8], rsi
jmp short loc_338C5
loc_338B6:
lea rdi, [rsp+78h+var_68]
lea rdx, [rsp+78h+var_6C]
call _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_; std::vector<int>::_M_realloc_insert<int const&>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int const&)
loc_338C5:
mov [rsp+78h+var_6C], 0
movsxd rax, dword ptr [r14+8]
mov rcx, [r14+10h]
movzx eax, byte ptr [rcx+rax]
cmp eax, 6Dh ; 'm'
jz loc_3396F
cmp eax, 52h ; 'R'
jz short loc_33933
cmp eax, 4Dh ; 'M'
jnz short loc_33928
mov r14, [rsp+78h+var_68]
mov rax, [rsp+78h+var_68+8]
lea r8, [rsp+78h+var_38]
mov [r8], r14
mov [r8+8], rax
mov r15, [rsp+78h+var_58]
mov [r8+10h], r15
xorps xmm0, xmm0
movaps xmmword ptr [rsp+78h+var_68], xmm0
mov [rsp+78h+var_58], 0
mov rdi, rbx
xor edx, edx
mov ecx, 1
jmp short loc_339A6
loc_33928:
mov dword ptr [rbx], 3
jmp loc_33873
loc_33933:
mov rdi, [rsp+78h+var_68]; void *
mov rax, [rsp+78h+var_68+8]
mov rsi, [rsp+78h+var_58]
xorps xmm0, xmm0
movaps xmmword ptr [rsp+78h+var_68], xmm0
mov [rsp+78h+var_58], 0
sub rax, rdi
cmp rax, 8
jnz short loc_339BF
mov dword ptr [rbx], 5
mov eax, [rdi]
mov [rbx+8], eax
mov eax, [rdi+4]
mov [rbx+4], eax
jmp short loc_339C5
loc_3396F:
mov r14, [rsp+78h+var_68]
mov rax, [rsp+78h+var_68+8]
lea r8, [rsp+78h+var_50]
mov [r8], r14
mov [r8+8], rax
mov r15, [rsp+78h+var_58]
mov [r8+10h], r15
xorps xmm0, xmm0
movaps xmmword ptr [rsp+78h+var_68], xmm0
mov [rsp+78h+var_58], 0
mov rdi, rbx
xor edx, edx
xor ecx, ecx
loc_339A6:
call _ZN5ftxui19TerminalInputParser10ParseMouseEbbSt6vectorIiSaIiEE; ftxui::TerminalInputParser::ParseMouse(bool,bool,std::vector<int>)
test r14, r14
jz loc_33873
sub r15, r14
mov rdi, r14
mov rsi, r15
jmp short loc_339D1
loc_339BF:
mov dword ptr [rbx], 3
loc_339C5:
test rdi, rdi
jz loc_33873
sub rsi, rdi; unsigned __int64
loc_339D1:
call __ZdlPvm; operator delete(void *,ulong)
jmp loc_33873
jmp short $+2
loc_339DD:
mov rbx, rax
mov rdi, [rsp+arg_8]; void *
test rdi, rdi
jz short loc_339F7
mov rsi, [rsp+arg_18]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_339F7:
mov rdi, rbx
call __Unwind_Resume
|
ftxui::TerminalInputParser * ftxui::TerminalInputParser::ParseCSI(
ftxui::TerminalInputParser *this,
long long a2)
{
int v3; // eax
long long v5; // rcx
long long v6; // rdx
char v7; // al
char *v8; // rsi
char *v10; // rsi
int v11; // eax
_DWORD *v12; // r14
_BYTE *v13; // r15
long long v14; // rcx
_DWORD *v15; // rdi
_BYTE *v16; // rax
_BYTE *v17; // rsi
unsigned long long v18; // rsi
int v19; // [rsp+Ch] [rbp-6Ch] BYREF
void *v20[2]; // [rsp+10h] [rbp-68h] BYREF
_BYTE *v21; // [rsp+20h] [rbp-58h]
void *v22; // [rsp+28h] [rbp-50h]
void *v23; // [rsp+30h] [rbp-48h]
void *v24; // [rsp+38h] [rbp-40h]
void *v25; // [rsp+40h] [rbp-38h]
void *v26; // [rsp+48h] [rbp-30h]
void *v27; // [rsp+50h] [rbp-28h]
v19 = 0;
*(_OWORD *)v20 = 0LL;
v21 = 0LL;
v3 = *(_DWORD *)(a2 + 8) + 1;
*(_DWORD *)(a2 + 8) = v3;
if ( v3 >= *(_DWORD *)(a2 + 24) )
{
LABEL_14:
*(_DWORD *)this = 0;
goto LABEL_15;
}
while ( 1 )
{
v5 = v3;
v6 = *(_QWORD *)(a2 + 16);
v7 = *(_BYTE *)(v6 + v3);
if ( v7 == 60 )
goto LABEL_13;
if ( (unsigned __int8)(v7 - 48) <= 9u )
{
v19 *= 10;
v19 = *(unsigned __int8 *)(v6 + v5) + v19 - 48;
goto LABEL_13;
}
if ( v7 == 59 )
{
v8 = (char *)v20[1];
if ( v20[1] == v21 )
{
std::vector<int>::_M_realloc_insert<int const&>((long long)v20, (long long)v20[1], &v19);
}
else
{
*(_DWORD *)v20[1] = v19;
v20[1] = v8 + 4;
}
v19 = 0;
goto LABEL_13;
}
if ( (unsigned __int8)(v7 - 127) >= 0xC1u && v7 != 91 )
break;
if ( v7 == 27 )
goto LABEL_25;
LABEL_13:
v3 = *(_DWORD *)(a2 + 8) + 1;
*(_DWORD *)(a2 + 8) = v3;
if ( v3 >= *(_DWORD *)(a2 + 24) )
goto LABEL_14;
}
v10 = (char *)v20[1];
if ( v20[1] == v21 )
{
std::vector<int>::_M_realloc_insert<int const&>((long long)v20, (long long)v20[1], &v19);
}
else
{
*(_DWORD *)v20[1] = v19;
v10 += 4;
v20[1] = v10;
}
v19 = 0;
v11 = *(unsigned __int8 *)(*(_QWORD *)(a2 + 16) + *(int *)(a2 + 8));
switch ( v11 )
{
case 'm':
v12 = v20[0];
v22 = v20[0];
v23 = v20[1];
v13 = v21;
v24 = v21;
*(_OWORD *)v20 = 0LL;
v21 = 0LL;
v14 = 0LL;
goto LABEL_29;
case 'R':
v15 = v20[0];
v16 = v20[1];
v17 = v21;
*(_OWORD *)v20 = 0LL;
v21 = 0LL;
if ( v16 - (_BYTE *)v15 == 8 )
{
*(_DWORD *)this = 5;
*((_DWORD *)this + 2) = *v15;
*((_DWORD *)this + 1) = v15[1];
}
else
{
*(_DWORD *)this = 3;
}
if ( v15 )
{
v18 = v17 - (_BYTE *)v15;
LABEL_34:
operator delete(v15, v18);
}
break;
case 'M':
v12 = v20[0];
v25 = v20[0];
v26 = v20[1];
v13 = v21;
v27 = v21;
*(_OWORD *)v20 = 0LL;
v21 = 0LL;
v14 = 1LL;
LABEL_29:
ftxui::TerminalInputParser::ParseMouse(this, v10, 0LL, v14);
if ( v12 )
{
v15 = v12;
v18 = v13 - (_BYTE *)v12;
goto LABEL_34;
}
break;
default:
LABEL_25:
*(_DWORD *)this = 3;
break;
}
LABEL_15:
if ( v20[0] )
operator delete(v20[0], v21 - (char *)v20[0]);
return this;
}
|
ParseCSI:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV RBX,RDI
MOV dword ptr [RSP + 0xc],0x0
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOV qword ptr [RSP + 0x20],0x0
MOV EAX,dword ptr [RSI + 0x8]
INC EAX
MOV dword ptr [RSI + 0x8],EAX
CMP EAX,dword ptr [RSI + 0x18]
JGE 0x0013386d
MOV R14,RSI
LEA R15,[RSP + 0x10]
LEA R12,[RSP + 0xc]
LAB_001337d7:
MOVSXD RCX,EAX
MOV RDX,qword ptr [R14 + 0x10]
MOV AL,byte ptr [RDX + RCX*0x1]
CMP AL,0x3c
JZ 0x00133859
LEA ESI,[RAX + -0x30]
CMP SIL,0x9
JA 0x0013380a
MOV EAX,dword ptr [RSP + 0xc]
ADD EAX,EAX
LEA EAX,[RAX + RAX*0x4]
MOV dword ptr [RSP + 0xc],EAX
MOVZX ECX,byte ptr [RDX + RCX*0x1]
ADD EAX,ECX
ADD EAX,-0x30
MOV dword ptr [RSP + 0xc],EAX
JMP 0x00133859
LAB_0013380a:
CMP AL,0x3b
JNZ 0x0013382b
MOV RSI,qword ptr [RSP + 0x18]
CMP RSI,qword ptr [RSP + 0x20]
JZ 0x00133846
MOV EAX,dword ptr [RSP + 0xc]
MOV dword ptr [RSI],EAX
ADD RSI,0x4
MOV qword ptr [RSP + 0x18],RSI
JMP 0x00133851
LAB_0013382b:
LEA ECX,[RAX + -0x7f]
CMP CL,0xc1
SETC CL
CMP AL,0x5b
SETZ DL
OR DL,CL
JZ 0x00133899
CMP AL,0x1b
JNZ 0x00133859
JMP 0x00133928
LAB_00133846:
MOV RDI,R15
MOV RDX,R12
CALL 0x0011fd90
LAB_00133851:
MOV dword ptr [RSP + 0xc],0x0
LAB_00133859:
MOV EAX,dword ptr [R14 + 0x8]
INC EAX
MOV dword ptr [R14 + 0x8],EAX
CMP EAX,dword ptr [R14 + 0x18]
JL 0x001337d7
LAB_0013386d:
MOV dword ptr [RBX],0x0
LAB_00133873:
MOV RDI,qword ptr [RSP + 0x10]
TEST RDI,RDI
JZ 0x0013388a
MOV RSI,qword ptr [RSP + 0x20]
SUB RSI,RDI
CALL 0x0010b400
LAB_0013388a:
MOV RAX,RBX
ADD RSP,0x58
POP RBX
POP R12
POP R14
POP R15
RET
LAB_00133899:
MOV RSI,qword ptr [RSP + 0x18]
CMP RSI,qword ptr [RSP + 0x20]
JZ 0x001338b6
MOV EAX,dword ptr [RSP + 0xc]
MOV dword ptr [RSI],EAX
ADD RSI,0x4
MOV qword ptr [RSP + 0x18],RSI
JMP 0x001338c5
LAB_001338b6:
LEA RDI,[RSP + 0x10]
LEA RDX,[RSP + 0xc]
CALL 0x0011fd90
LAB_001338c5:
MOV dword ptr [RSP + 0xc],0x0
MOVSXD RAX,dword ptr [R14 + 0x8]
MOV RCX,qword ptr [R14 + 0x10]
MOVZX EAX,byte ptr [RCX + RAX*0x1]
CMP EAX,0x6d
JZ 0x0013396f
CMP EAX,0x52
JZ 0x00133933
CMP EAX,0x4d
JNZ 0x00133928
MOV R14,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x18]
LEA R8,[RSP + 0x40]
MOV qword ptr [R8],R14
MOV qword ptr [R8 + 0x8],RAX
MOV R15,qword ptr [RSP + 0x20]
MOV qword ptr [R8 + 0x10],R15
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOV qword ptr [RSP + 0x20],0x0
MOV RDI,RBX
XOR EDX,EDX
MOV ECX,0x1
JMP 0x001339a6
LAB_00133928:
MOV dword ptr [RBX],0x3
JMP 0x00133873
LAB_00133933:
MOV RDI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x20]
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOV qword ptr [RSP + 0x20],0x0
SUB RAX,RDI
CMP RAX,0x8
JNZ 0x001339bf
MOV dword ptr [RBX],0x5
MOV EAX,dword ptr [RDI]
MOV dword ptr [RBX + 0x8],EAX
MOV EAX,dword ptr [RDI + 0x4]
MOV dword ptr [RBX + 0x4],EAX
JMP 0x001339c5
LAB_0013396f:
MOV R14,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x18]
LEA R8,[RSP + 0x28]
MOV qword ptr [R8],R14
MOV qword ptr [R8 + 0x8],RAX
MOV R15,qword ptr [RSP + 0x20]
MOV qword ptr [R8 + 0x10],R15
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOV qword ptr [RSP + 0x20],0x0
MOV RDI,RBX
XOR EDX,EDX
XOR ECX,ECX
LAB_001339a6:
CALL 0x00133a52
TEST R14,R14
JZ 0x00133873
SUB R15,R14
MOV RDI,R14
MOV RSI,R15
JMP 0x001339d1
LAB_001339bf:
MOV dword ptr [RBX],0x3
LAB_001339c5:
TEST RDI,RDI
JZ 0x00133873
SUB RSI,RDI
LAB_001339d1:
CALL 0x0010b400
JMP 0x00133873
|
/* ftxui::TerminalInputParser::ParseCSI() */
void ftxui::TerminalInputParser::ParseCSI(void)
{
char cVar1;
int4 *puVar2;
int *piVar3;
int *piVar4;
int iVar5;
long in_RSI;
int4 *in_RDI;
int local_6c;
int4 *local_68;
int *piStack_60;
int *local_58;
int4 *local_50;
int *local_48;
int *local_40;
int4 *local_38;
int *local_30;
int *local_28;
local_6c = 0;
local_68 = (int4 *)0x0;
piStack_60 = (int *)0x0;
local_58 = (int *)0x0;
iVar5 = *(int *)(in_RSI + 8) + 1;
*(int *)(in_RSI + 8) = iVar5;
if (iVar5 < *(int *)(in_RSI + 0x18)) {
do {
cVar1 = *(char *)(*(long *)(in_RSI + 0x10) + (long)iVar5);
if (cVar1 != '<') {
if ((byte)(cVar1 - 0x30U) < 10) {
local_6c = local_6c * 10 + (uint)*(byte *)(*(long *)(in_RSI + 0x10) + (long)iVar5) + -0x30
;
}
else if (cVar1 == ';') {
if (piStack_60 == local_58) {
/* try { // try from 00133846 to 00133850 has its CatchHandler @ 001339dd */
std::vector<int,std::allocator<int>>::_M_realloc_insert<int_const&>
((vector<int,std::allocator<int>> *)&local_68,piStack_60,&local_6c);
}
else {
*piStack_60 = local_6c;
piStack_60 = piStack_60 + 1;
}
local_6c = 0;
}
else {
if (cVar1 != '[' && 0xc0 < (byte)(cVar1 + 0x81U)) {
if (piStack_60 == local_58) {
/* try { // try from 001338b6 to 001338c4 has its CatchHandler @ 001339db */
std::vector<int,std::allocator<int>>::_M_realloc_insert<int_const&>
((vector<int,std::allocator<int>> *)&local_68,piStack_60,&local_6c);
}
else {
*piStack_60 = local_6c;
piStack_60 = piStack_60 + 1;
}
piVar4 = local_58;
piVar3 = piStack_60;
puVar2 = local_68;
local_6c = 0;
cVar1 = *(char *)(*(long *)(in_RSI + 0x10) + (long)*(int *)(in_RSI + 8));
if (cVar1 == 'm') {
local_50 = local_68;
local_48 = piStack_60;
local_40 = local_58;
LAB_001339a6:
local_58 = (int *)0x0;
piStack_60 = (int *)0x0;
local_68 = (int4 *)0x0;
ParseMouse();
}
else {
if (cVar1 != 'R') {
if (cVar1 != 'M') goto LAB_00133928;
local_38 = local_68;
local_30 = piStack_60;
local_28 = local_58;
goto LAB_001339a6;
}
local_68 = (int4 *)0x0;
piStack_60 = (int *)0x0;
local_58 = (int *)0x0;
if ((long)piVar3 - (long)puVar2 == 8) {
*in_RDI = 5;
in_RDI[2] = *puVar2;
in_RDI[1] = puVar2[1];
}
else {
*in_RDI = 3;
}
}
if (puVar2 != (int4 *)0x0) {
operator_delete(puVar2,(long)piVar4 - (long)puVar2);
}
goto LAB_00133873;
}
if (cVar1 == '\x1b') {
LAB_00133928:
*in_RDI = 3;
goto LAB_00133873;
}
}
}
iVar5 = *(int *)(in_RSI + 8) + 1;
*(int *)(in_RSI + 8) = iVar5;
} while (iVar5 < *(int *)(in_RSI + 0x18));
}
*in_RDI = 0;
LAB_00133873:
if (local_68 != (int4 *)0x0) {
operator_delete(local_68,(long)local_58 - (long)local_68);
}
return;
}
|
|
20,108
|
ImageAlphaPremultiply
|
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtextures.c
|
void ImageAlphaPremultiply(Image *image)
{
// Security check to avoid program crash
if ((image->data == NULL) || (image->width == 0) || (image->height == 0)) return;
float alpha = 0.0f;
Color *pixels = LoadImageColors(*image);
for (int i = 0; i < image->width*image->height; i++)
{
if (pixels[i].a == 0)
{
pixels[i].r = 0;
pixels[i].g = 0;
pixels[i].b = 0;
}
else if (pixels[i].a < 255)
{
alpha = (float)pixels[i].a/255.0f;
pixels[i].r = (unsigned char)((float)pixels[i].r*alpha);
pixels[i].g = (unsigned char)((float)pixels[i].g*alpha);
pixels[i].b = (unsigned char)((float)pixels[i].b*alpha);
}
}
RL_FREE(image->data);
int format = image->format;
image->data = pixels;
image->format = PIXELFORMAT_UNCOMPRESSED_R8G8B8A8;
ImageFormat(image, format);
}
|
O3
|
c
|
ImageAlphaPremultiply:
pushq %r14
pushq %rbx
subq $0x18, %rsp
cmpq $0x0, (%rdi)
je 0x9724c
movq %rdi, %rbx
cmpl $0x0, 0x8(%rdi)
je 0x9724c
cmpl $0x0, 0xc(%rbx)
je 0x9724c
movq 0x10(%rbx), %rax
movq %rax, 0x10(%rsp)
movups (%rbx), %xmm0
movups %xmm0, (%rsp)
callq 0x92846
movq %rax, %r14
movl 0xc(%rbx), %eax
imull 0x8(%rbx), %eax
testl %eax, %eax
jle 0x97228
xorl %eax, %eax
movss 0x3c9ff(%rip), %xmm0 # 0xd3b94
movzbl 0x3(%r14,%rax,4), %ecx
cmpl $0xff, %ecx
je 0x97210
testl %ecx, %ecx
jne 0x971b6
movb $0x0, (%r14,%rax,4)
movw $0x0, 0x1(%r14,%rax,4)
jmp 0x97210
movzbl %cl, %ecx
xorps %xmm1, %xmm1
cvtsi2ss %ecx, %xmm1
divss %xmm0, %xmm1
movzbl (%r14,%rax,4), %ecx
xorps %xmm2, %xmm2
cvtsi2ss %ecx, %xmm2
mulss %xmm1, %xmm2
cvttss2si %xmm2, %ecx
movb %cl, (%r14,%rax,4)
movzbl 0x1(%r14,%rax,4), %ecx
xorps %xmm2, %xmm2
cvtsi2ss %ecx, %xmm2
mulss %xmm1, %xmm2
cvttss2si %xmm2, %ecx
movb %cl, 0x1(%r14,%rax,4)
movzbl 0x2(%r14,%rax,4), %ecx
xorps %xmm2, %xmm2
cvtsi2ss %ecx, %xmm2
mulss %xmm1, %xmm2
cvttss2si %xmm2, %ecx
movb %cl, 0x2(%r14,%rax,4)
incq %rax
movslq 0x8(%rbx), %rcx
movslq 0xc(%rbx), %rdx
imulq %rcx, %rdx
cmpq %rdx, %rax
jl 0x97195
movq (%rbx), %rdi
callq 0xa650
movl 0x14(%rbx), %esi
movq %r14, (%rbx)
movl $0x7, 0x14(%rbx)
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r14
jmp 0x94249
addq $0x18, %rsp
popq %rbx
popq %r14
retq
|
ImageAlphaPremultiply:
push r14
push rbx
sub rsp, 18h
cmp qword ptr [rdi], 0
jz loc_9724C
mov rbx, rdi
cmp dword ptr [rdi+8], 0
jz loc_9724C
cmp dword ptr [rbx+0Ch], 0
jz loc_9724C
mov rax, [rbx+10h]
mov [rsp+28h+var_18], rax
movups xmm0, xmmword ptr [rbx]
movups [rsp+28h+var_28], xmm0
call LoadImageColors
mov r14, rax
mov eax, [rbx+0Ch]
imul eax, [rbx+8]
test eax, eax
jle loc_97228
xor eax, eax
movss xmm0, cs:dword_D3B94
loc_97195:
movzx ecx, byte ptr [r14+rax*4+3]
cmp ecx, 0FFh
jz short loc_97210
test ecx, ecx
jnz short loc_971B6
mov byte ptr [r14+rax*4], 0
mov word ptr [r14+rax*4+1], 0
jmp short loc_97210
loc_971B6:
movzx ecx, cl
xorps xmm1, xmm1
cvtsi2ss xmm1, ecx
divss xmm1, xmm0
movzx ecx, byte ptr [r14+rax*4]
xorps xmm2, xmm2
cvtsi2ss xmm2, ecx
mulss xmm2, xmm1
cvttss2si ecx, xmm2
mov [r14+rax*4], cl
movzx ecx, byte ptr [r14+rax*4+1]
xorps xmm2, xmm2
cvtsi2ss xmm2, ecx
mulss xmm2, xmm1
cvttss2si ecx, xmm2
mov [r14+rax*4+1], cl
movzx ecx, byte ptr [r14+rax*4+2]
xorps xmm2, xmm2
cvtsi2ss xmm2, ecx
mulss xmm2, xmm1
cvttss2si ecx, xmm2
mov [r14+rax*4+2], cl
loc_97210:
inc rax
movsxd rcx, dword ptr [rbx+8]
movsxd rdx, dword ptr [rbx+0Ch]
imul rdx, rcx
cmp rax, rdx
jl loc_97195
loc_97228:
mov rdi, [rbx]
call _free
mov esi, [rbx+14h]
mov [rbx], r14
mov dword ptr [rbx+14h], 7
mov rdi, rbx
add rsp, 18h
pop rbx
pop r14
jmp ImageFormat
loc_9724C:
add rsp, 18h
pop rbx
pop r14
retn
|
void ImageAlphaPremultiply(__m128i *a1, long long a2, long long a3, long long a4, long long a5, long long a6)
{
__m128i v6; // xmm0
long long ImageColors; // r14
long long v8; // rax
int v9; // ecx
float v10; // xmm1_4
int v11; // esi
long long v12; // rdx
long long v13; // rcx
int v14; // r8d
int v15; // r9d
if ( a1->m128i_i64[0] && a1->m128i_i32[2] && a1->m128i_i32[3] )
{
v6 = *a1;
ImageColors = LoadImageColors(
*a1,
(long long)a1,
a2,
a3,
a4,
a5,
a6,
a1->m128i_i64[0],
a1->m128i_i64[1],
a1[1].m128i_i64[0]);
if ( a1->m128i_i32[2] * a1->m128i_i32[3] > 0 )
{
v8 = 0LL;
v6.m128i_i32[0] = 1132396544;
do
{
v9 = *(unsigned __int8 *)(ImageColors + 4 * v8 + 3);
if ( v9 != 255 )
{
if ( *(_BYTE *)(ImageColors + 4 * v8 + 3) )
{
v10 = (float)(unsigned __int8)v9 / 255.0;
*(_BYTE *)(ImageColors + 4 * v8) = (int)(float)((float)*(unsigned __int8 *)(ImageColors + 4 * v8) * v10);
*(_BYTE *)(ImageColors + 4 * v8 + 1) = (int)(float)((float)*(unsigned __int8 *)(ImageColors + 4 * v8 + 1)
* v10);
*(_BYTE *)(ImageColors + 4 * v8 + 2) = (int)(float)((float)*(unsigned __int8 *)(ImageColors + 4 * v8 + 2)
* v10);
}
else
{
*(_BYTE *)(ImageColors + 4 * v8) = 0;
*(_WORD *)(ImageColors + 4 * v8 + 1) = 0;
}
}
++v8;
}
while ( v8 < a1->m128i_i32[2] * (long long)a1->m128i_i32[3] );
}
free(a1->m128i_i64[0]);
v11 = a1[1].m128i_i32[1];
a1->m128i_i64[0] = ImageColors;
a1[1].m128i_i32[1] = 7;
ImageFormat(a1->m128i_i64, v11, *(float *)v6.m128i_i32, v12, v13, v14, v15);
}
}
|
ImageAlphaPremultiply:
PUSH R14
PUSH RBX
SUB RSP,0x18
CMP qword ptr [RDI],0x0
JZ 0x0019724c
MOV RBX,RDI
CMP dword ptr [RDI + 0x8],0x0
JZ 0x0019724c
CMP dword ptr [RBX + 0xc],0x0
JZ 0x0019724c
MOV RAX,qword ptr [RBX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
MOVUPS XMM0,xmmword ptr [RBX]
MOVUPS xmmword ptr [RSP],XMM0
CALL 0x00192846
MOV R14,RAX
MOV EAX,dword ptr [RBX + 0xc]
IMUL EAX,dword ptr [RBX + 0x8]
TEST EAX,EAX
JLE 0x00197228
XOR EAX,EAX
MOVSS XMM0,dword ptr [0x001d3b94]
LAB_00197195:
MOVZX ECX,byte ptr [R14 + RAX*0x4 + 0x3]
CMP ECX,0xff
JZ 0x00197210
TEST ECX,ECX
JNZ 0x001971b6
MOV byte ptr [R14 + RAX*0x4],0x0
MOV word ptr [R14 + RAX*0x4 + 0x1],0x0
JMP 0x00197210
LAB_001971b6:
MOVZX ECX,CL
XORPS XMM1,XMM1
CVTSI2SS XMM1,ECX
DIVSS XMM1,XMM0
MOVZX ECX,byte ptr [R14 + RAX*0x4]
XORPS XMM2,XMM2
CVTSI2SS XMM2,ECX
MULSS XMM2,XMM1
CVTTSS2SI ECX,XMM2
MOV byte ptr [R14 + RAX*0x4],CL
MOVZX ECX,byte ptr [R14 + RAX*0x4 + 0x1]
XORPS XMM2,XMM2
CVTSI2SS XMM2,ECX
MULSS XMM2,XMM1
CVTTSS2SI ECX,XMM2
MOV byte ptr [R14 + RAX*0x4 + 0x1],CL
MOVZX ECX,byte ptr [R14 + RAX*0x4 + 0x2]
XORPS XMM2,XMM2
CVTSI2SS XMM2,ECX
MULSS XMM2,XMM1
CVTTSS2SI ECX,XMM2
MOV byte ptr [R14 + RAX*0x4 + 0x2],CL
LAB_00197210:
INC RAX
MOVSXD RCX,dword ptr [RBX + 0x8]
MOVSXD RDX,dword ptr [RBX + 0xc]
IMUL RDX,RCX
CMP RAX,RDX
JL 0x00197195
LAB_00197228:
MOV RDI,qword ptr [RBX]
CALL 0x0010a650
MOV ESI,dword ptr [RBX + 0x14]
MOV qword ptr [RBX],R14
MOV dword ptr [RBX + 0x14],0x7
MOV RDI,RBX
ADD RSP,0x18
POP RBX
POP R14
JMP 0x00194249
LAB_0019724c:
ADD RSP,0x18
POP RBX
POP R14
RET
|
void ImageAlphaPremultiply(long *param_1)
{
byte bVar1;
int4 uVar2;
float fVar3;
long lVar4;
long lVar5;
float fVar6;
if (((*param_1 != 0) && ((int)param_1[1] != 0)) && (*(int *)((long)param_1 + 0xc) != 0)) {
lVar4 = LoadImageColors();
fVar3 = DAT_001d3b94;
if (0 < *(int *)((long)param_1 + 0xc) * (int)param_1[1]) {
lVar5 = 0;
do {
bVar1 = *(byte *)(lVar4 + 3 + lVar5 * 4);
if (bVar1 != 0xff) {
if (bVar1 == 0) {
*(int1 *)(lVar4 + lVar5 * 4) = 0;
*(int2 *)(lVar4 + 1 + lVar5 * 4) = 0;
}
else {
fVar6 = (float)bVar1 / fVar3;
*(char *)(lVar4 + lVar5 * 4) = (char)(int)((float)*(byte *)(lVar4 + lVar5 * 4) * fVar6);
*(char *)(lVar4 + 1 + lVar5 * 4) =
(char)(int)((float)*(byte *)(lVar4 + 1 + lVar5 * 4) * fVar6);
*(char *)(lVar4 + 2 + lVar5 * 4) =
(char)(int)((float)*(byte *)(lVar4 + 2 + lVar5 * 4) * fVar6);
}
}
lVar5 = lVar5 + 1;
} while (lVar5 < (long)*(int *)((long)param_1 + 0xc) * (long)(int)param_1[1]);
}
free((void *)*param_1);
uVar2 = *(int4 *)((long)param_1 + 0x14);
*param_1 = lVar4;
*(int4 *)((long)param_1 + 0x14) = 7;
ImageFormat(param_1,uVar2);
return;
}
return;
}
|
|
20,109
|
js_date_setTime
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_date_setTime(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
// setTime(v)
double v;
if (JS_ThisTimeValue(ctx, &v, this_val) || JS_ToFloat64(ctx, &v, argv[0]))
return JS_EXCEPTION;
return JS_SetThisTimeValue(ctx, this_val, time_clip(v));
}
|
O2
|
c
|
js_date_setTime:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %r8, %r13
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x8(%rsp), %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x4a403
pushq $0x6
popq %r12
testl %eax, %eax
jne 0x4a005
movq (%r13), %rdx
movq 0x8(%r13), %rcx
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x2127f
testl %eax, %eax
je 0x4a018
xorl %eax, %eax
movq %r12, %rdx
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movsd 0x8(%rsp), %xmm0
movapd 0x3b6da(%rip), %xmm1 # 0x85700
andpd %xmm0, %xmm1
movsd 0x3b7de(%rip), %xmm2 # 0x85810
ucomisd %xmm1, %xmm2
jae 0x4a042
movsd 0x3b790(%rip), %xmm0 # 0x857d0
jmp 0x4a053
callq 0xe150
movapd %xmm0, %xmm1
xorpd %xmm0, %xmm0
addsd %xmm1, %xmm0
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x4a767
movq %rdx, %r12
jmp 0x4a007
|
js_date_setTime:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 10h
mov r13, r8
mov rbx, rdx
mov r14, rsi
mov r15, rdi
lea rsi, [rsp+38h+var_30]
mov rdx, r14
mov rcx, rbx
call JS_ThisTimeValue
push 6
pop r12
test eax, eax
jnz short loc_4A005
mov rdx, [r13+0]
mov rcx, [r13+8]
lea rsi, [rsp+38h+var_30]
mov rdi, r15
call JS_ToFloat64
test eax, eax
jz short loc_4A018
loc_4A005:
xor eax, eax
loc_4A007:
mov rdx, r12
add rsp, 10h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_4A018:
movsd xmm0, [rsp+38h+var_30]
movapd xmm1, cs:xmmword_85700
andpd xmm1, xmm0
movsd xmm2, cs:qword_85810
ucomisd xmm2, xmm1
jnb short loc_4A042
movsd xmm0, cs:qword_857D0
jmp short loc_4A053
loc_4A042:
call _trunc
movapd xmm1, xmm0
xorpd xmm0, xmm0
addsd xmm0, xmm1
loc_4A053:
mov rdi, r15
mov rsi, r14
mov rdx, rbx
call JS_SetThisTimeValue
mov r12, rdx
jmp short loc_4A007
|
long long js_date_setTime(long long a1, long long a2, long long a3, long long a4, long long a5)
{
double v8; // xmm0_8
double v9[6]; // [rsp+8h] [rbp-30h] BYREF
if ( (unsigned int)JS_ThisTimeValue(a1, v9, a2, a3)
|| (unsigned int)JS_ToFloat64(a1, (long long)v9, *(_DWORD **)a5, *(_QWORD *)(a5 + 8)) )
{
return 0LL;
}
if ( fabs(v9[0]) <= 8.64e15 )
v8 = trunc(v9[0]) + 0.0;
else
v8 = NAN;
return JS_SetThisTimeValue(a1, a2, a3, v8);
}
|
js_date_setTime:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV R13,R8
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
LEA RSI,[RSP + 0x8]
MOV RDX,R14
MOV RCX,RBX
CALL 0x0014a403
PUSH 0x6
POP R12
TEST EAX,EAX
JNZ 0x0014a005
MOV RDX,qword ptr [R13]
MOV RCX,qword ptr [R13 + 0x8]
LEA RSI,[RSP + 0x8]
MOV RDI,R15
CALL 0x0012127f
TEST EAX,EAX
JZ 0x0014a018
LAB_0014a005:
XOR EAX,EAX
LAB_0014a007:
MOV RDX,R12
ADD RSP,0x10
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
LAB_0014a018:
MOVSD XMM0,qword ptr [RSP + 0x8]
MOVAPD XMM1,xmmword ptr [0x00185700]
ANDPD XMM1,XMM0
MOVSD XMM2,qword ptr [0x00185810]
UCOMISD XMM2,XMM1
JNC 0x0014a042
MOVSD XMM0,qword ptr [0x001857d0]
JMP 0x0014a053
LAB_0014a042:
CALL 0x0010e150
MOVAPD XMM1,XMM0
XORPD XMM0,XMM0
ADDSD XMM0,XMM1
LAB_0014a053:
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
CALL 0x0014a767
MOV R12,RDX
JMP 0x0014a007
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int1 [16]
js_date_setTime(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 *param_5)
{
int iVar1;
double dVar2;
int1 auVar3 [16];
double local_30;
iVar1 = JS_ThisTimeValue(param_1,&local_30,param_2,param_3);
if ((iVar1 == 0) && (iVar1 = JS_ToFloat64(param_1,&local_30,*param_5,param_5[1]), iVar1 == 0)) {
dVar2 = DAT_001857d0;
if ((double)(_DAT_00185700 & (ulong)local_30) <= DAT_00185810) {
dVar2 = trunc(local_30);
dVar2 = dVar2 + 0.0;
}
auVar3 = JS_SetThisTimeValue(dVar2,param_1,param_2,param_3);
}
else {
auVar3 = ZEXT816(6) << 0x40;
}
return auVar3;
}
|
|
20,110
|
count_square
|
eloqsql/storage/myisam/rt_split.c
|
static double count_square(const double *a, int n_dim)
{
const double *end = a + n_dim * 2;
double square = 1.0;
do
{
square *= a[1] - a[0];
a += 2;
}while (a != end);
return square;
}
|
O0
|
c
|
count_square:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
shll %ecx
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movsd 0x82ffe(%rip), %xmm0 # 0x15a2a8
movsd %xmm0, -0x20(%rbp)
movq -0x8(%rbp), %rax
movsd 0x8(%rax), %xmm0
movq -0x8(%rbp), %rax
subsd (%rax), %xmm0
mulsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x20(%rbp)
movq -0x8(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq -0x18(%rbp), %rax
jne 0xd72af
movsd -0x20(%rbp), %xmm0
popq %rbp
retq
nopw (%rax,%rax)
|
count_square_0:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov rax, [rbp+var_8]
mov ecx, [rbp+var_C]
shl ecx, 1
movsxd rcx, ecx
shl rcx, 3
add rax, rcx
mov [rbp+var_18], rax
movsd xmm0, cs:qword_15A2A8
movsd [rbp+var_20], xmm0
loc_D72AF:
mov rax, [rbp+var_8]
movsd xmm0, qword ptr [rax+8]
mov rax, [rbp+var_8]
subsd xmm0, qword ptr [rax]
mulsd xmm0, [rbp+var_20]
movsd [rbp+var_20], xmm0
mov rax, [rbp+var_8]
add rax, 10h
mov [rbp+var_8], rax
mov rax, [rbp+var_8]
cmp rax, [rbp+var_18]
jnz short loc_D72AF
movsd xmm0, [rbp+var_20]
pop rbp
retn
|
double count_square_0(double *a1, int a2)
{
double v3; // [rsp+0h] [rbp-20h]
double *v4; // [rsp+18h] [rbp-8h]
v4 = a1;
v3 = 1.0;
do
{
v3 = (v4[1] - *v4) * v3;
v4 += 2;
}
while ( v4 != &a1[2 * a2] );
return v3;
}
|
count_square:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RBP + -0xc]
SHL ECX,0x1
MOVSXD RCX,ECX
SHL RCX,0x3
ADD RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
MOVSD XMM0,qword ptr [0x0025a2a8]
MOVSD qword ptr [RBP + -0x20],XMM0
LAB_001d72af:
MOV RAX,qword ptr [RBP + -0x8]
MOVSD XMM0,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x8]
SUBSD XMM0,qword ptr [RAX]
MULSD XMM0,qword ptr [RBP + -0x20]
MOVSD qword ptr [RBP + -0x20],XMM0
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x10
MOV qword ptr [RBP + -0x8],RAX
MOV RAX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RBP + -0x18]
JNZ 0x001d72af
MOVSD XMM0,qword ptr [RBP + -0x20]
POP RBP
RET
|
double count_square(double *param_1,int param_2)
{
double local_28;
double *local_10;
local_28 = DAT_0025a2a8;
local_10 = param_1;
do {
local_28 = (local_10[1] - *local_10) * local_28;
local_10 = local_10 + 2;
} while (local_10 != param_1 + (param_2 << 1));
return local_28;
}
|
|
20,111
|
run_mysqlcheck_fixnames
|
eloqsql/client/mysql_upgrade.c
|
static int run_mysqlcheck_fixnames(void)
{
if (opt_systables_only)
{
verbose("Phase %d/%d: Fixing table and database names ... Skipped",
++phase, phases_total);
return 0;
}
verbose("Phase %d/%d: Fixing table and database names",
++phase, phases_total);
print_conn_args("mysqlcheck");
return run_tool(mysqlcheck_path,
NULL, /* Send output from mysqlcheck directly to screen */
defaults_file,
"--all-databases",
"--fix-db-names",
"--fix-table-names",
opt_verbose >= 1 ? "--verbose" : "",
opt_verbose >= 2 ? "--verbose" : "",
opt_verbose >= 3 ? "--verbose" : "",
opt_silent ? "--silent": "",
opt_write_binlog ? "--write-binlog" : "--skip-write-binlog",
"2>&1",
NULL);
}
|
O0
|
c
|
run_mysqlcheck_fixnames:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
cmpb $0x0, 0x3d375c(%rip) # 0x3fe620
je 0x2aef4
movl 0x3d3760(%rip), %esi # 0x3fe62c
addl $0x1, %esi
movl %esi, 0x3d3757(%rip) # 0x3fe62c
leaq 0xc2a14(%rip), %rdi # 0xed8f0
movl $0x7, %edx
movb $0x0, %al
callq 0x2b2e0
movl $0x0, -0x1c(%rbp)
jmp 0x2b009
movl 0x3d3732(%rip), %esi # 0x3fe62c
addl $0x1, %esi
movl %esi, 0x3d3729(%rip) # 0x3fe62c
leaq 0xc2a1f(%rip), %rdi # 0xed929
movl $0x7, %edx
movb $0x0, %al
callq 0x2b2e0
leaq 0xc1321(%rip), %rdi # 0xec23e
callq 0x2c0d0
movl 0x3d37a4(%rip), %ecx # 0x3fe6cc
leaq 0xc7539(%rip), %r15 # 0xf2468
leaq 0xc2546(%rip), %rax # 0xed47c
cmpl $0x1, %ecx
cmovaeq %rax, %r15
movl 0x3d3789(%rip), %ecx # 0x3fe6cc
leaq 0xc751e(%rip), %r14 # 0xf2468
leaq 0xc252b(%rip), %rax # 0xed47c
cmpl $0x2, %ecx
cmovaeq %rax, %r14
movl 0x3d376e(%rip), %ecx # 0x3fe6cc
leaq 0xc7503(%rip), %rbx # 0xf2468
leaq 0xc2510(%rip), %rax # 0xed47c
cmpl $0x3, %ecx
cmovaeq %rax, %rbx
movsbl 0x3d36a7(%rip), %ecx # 0x3fe621
leaq 0xc74e7(%rip), %r11 # 0xf2468
leaq 0xc24fe(%rip), %rax # 0xed486
cmpl $0x0, %ecx
cmovneq %rax, %r11
movsbl 0x3d3733(%rip), %ecx # 0x3fe6c9
leaq 0xc2501(%rip), %r10 # 0xed49e
leaq 0xc24eb(%rip), %rax # 0xed48f
cmpl $0x0, %ecx
cmovneq %rax, %r10
leaq 0x3d346e(%rip), %rdi # 0x3fe420
xorl %eax, %eax
movl %eax, %esi
leaq 0x3d2e23(%rip), %rdx # 0x3fdde0
leaq 0xc241b(%rip), %rcx # 0xed3df
leaq 0xc298b(%rip), %r8 # 0xed956
leaq 0xc2993(%rip), %r9 # 0xed965
leaq 0xc1dcd(%rip), %rax # 0xecda6
movq %r15, (%rsp)
movq %r14, 0x8(%rsp)
movq %rbx, 0x10(%rsp)
movq %r11, 0x18(%rsp)
movq %r10, 0x20(%rsp)
movq %rax, 0x28(%rsp)
movq $0x0, 0x30(%rsp)
movb $0x0, %al
callq 0x2b8a0
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopw (%rax,%rax)
|
run_mysqlcheck_fixnames:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 48h
cmp cs:opt_systables_only, 0
jz short loc_2AEF4
mov esi, cs:phase
add esi, 1
mov cs:phase, esi
lea rdi, aPhaseDDFixingT; "Phase %d/%d: Fixing table and database "...
mov edx, 7
mov al, 0
call verbose
mov [rbp+var_1C], 0
jmp loc_2B009
loc_2AEF4:
mov esi, cs:phase
add esi, 1
mov cs:phase, esi
lea rdi, aPhaseDDFixingT_0; "Phase %d/%d: Fixing table and database "...
mov edx, 7
mov al, 0
call verbose
lea rdi, aMysqlcheck; "mysqlcheck"
call print_conn_args
mov ecx, cs:opt_verbose
lea r15, asc_F2464+4; ""
lea rax, aVerbose; "--verbose"
cmp ecx, 1
cmovnb r15, rax
mov ecx, cs:opt_verbose
lea r14, asc_F2464+4; ""
lea rax, aVerbose; "--verbose"
cmp ecx, 2
cmovnb r14, rax
mov ecx, cs:opt_verbose
lea rbx, asc_F2464+4; ""
lea rax, aVerbose; "--verbose"
cmp ecx, 3
cmovnb rbx, rax
movsx ecx, cs:opt_silent
lea r11, asc_F2464+4; ""
lea rax, aSilent; "--silent"
cmp ecx, 0
cmovnz r11, rax
movsx ecx, cs:opt_write_binlog
lea r10, aSkipWriteBinlo; "--skip-write-binlog"
lea rax, aWriteBinlog; "--write-binlog"
cmp ecx, 0
cmovnz r10, rax
lea rdi, mysqlcheck_path
xor eax, eax
mov esi, eax
lea rdx, defaults_file
lea rcx, aAllDatabases; "--all-databases"
lea r8, aFixDbNames; "--fix-db-names"
lea r9, aFixTableNames; "--fix-table-names"
lea rax, a21; "2>&1"
mov [rsp+60h+var_60], r15
mov [rsp+60h+var_58], r14
mov [rsp+60h+var_50], rbx
mov [rsp+60h+var_48], r11
mov [rsp+60h+var_40], r10
mov [rsp+60h+var_38], rax
mov [rsp+60h+var_30], 0
mov al, 0
call run_tool
mov [rbp+var_1C], eax
loc_2B009:
mov eax, [rbp+var_1C]
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long run_mysqlcheck_fixnames(long long a1, long long a2, long long a3, int a4, int a5, int a6)
{
char *v6; // r15
char *v7; // r14
char *v8; // rbx
char *v9; // r11
const char *v10; // r10
if ( opt_systables_only )
{
verbose((unsigned int)"Phase %d/%d: Fixing table and database names ... Skipped", ++phase, 7, a4, a5, a6);
return 0;
}
else
{
verbose((unsigned int)"Phase %d/%d: Fixing table and database names", ++phase, 7, a4, a5, a6);
print_conn_args("mysqlcheck");
v6 = "";
if ( opt_verbose )
v6 = "--verbose";
v7 = "";
if ( (unsigned int)opt_verbose >= 2 )
v7 = "--verbose";
v8 = "";
if ( (unsigned int)opt_verbose >= 3 )
v8 = "--verbose";
v9 = "";
if ( opt_silent )
v9 = "--silent";
v10 = "--skip-write-binlog";
if ( opt_write_binlog )
v10 = "--write-binlog";
return (unsigned int)run_tool(
(unsigned int)&mysqlcheck_path,
0,
(unsigned int)&defaults_file,
(unsigned int)"--all-databases",
(unsigned int)"--fix-db-names",
(unsigned int)"--fix-table-names",
v6,
v7,
v8,
v9,
v10,
"2>&1",
0LL);
}
}
|
run_mysqlcheck_fixnames:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x48
CMP byte ptr [0x004fe620],0x0
JZ 0x0012aef4
MOV ESI,dword ptr [0x004fe62c]
ADD ESI,0x1
MOV dword ptr [0x004fe62c],ESI
LEA RDI,[0x1ed8f0]
MOV EDX,0x7
MOV AL,0x0
CALL 0x0012b2e0
MOV dword ptr [RBP + -0x1c],0x0
JMP 0x0012b009
LAB_0012aef4:
MOV ESI,dword ptr [0x004fe62c]
ADD ESI,0x1
MOV dword ptr [0x004fe62c],ESI
LEA RDI,[0x1ed929]
MOV EDX,0x7
MOV AL,0x0
CALL 0x0012b2e0
LEA RDI,[0x1ec23e]
CALL 0x0012c0d0
MOV ECX,dword ptr [0x004fe6cc]
LEA R15,[0x1f2468]
LEA RAX,[0x1ed47c]
CMP ECX,0x1
CMOVNC R15,RAX
MOV ECX,dword ptr [0x004fe6cc]
LEA R14,[0x1f2468]
LEA RAX,[0x1ed47c]
CMP ECX,0x2
CMOVNC R14,RAX
MOV ECX,dword ptr [0x004fe6cc]
LEA RBX,[0x1f2468]
LEA RAX,[0x1ed47c]
CMP ECX,0x3
CMOVNC RBX,RAX
MOVSX ECX,byte ptr [0x004fe621]
LEA R11,[0x1f2468]
LEA RAX,[0x1ed486]
CMP ECX,0x0
CMOVNZ R11,RAX
MOVSX ECX,byte ptr [0x004fe6c9]
LEA R10,[0x1ed49e]
LEA RAX,[0x1ed48f]
CMP ECX,0x0
CMOVNZ R10,RAX
LEA RDI,[0x4fe420]
XOR EAX,EAX
MOV ESI,EAX
LEA RDX,[0x4fdde0]
LEA RCX,[0x1ed3df]
LEA R8,[0x1ed956]
LEA R9,[0x1ed965]
LEA RAX,[0x1ecda6]
MOV qword ptr [RSP],R15
MOV qword ptr [RSP + 0x8],R14
MOV qword ptr [RSP + 0x10],RBX
MOV qword ptr [RSP + 0x18],R11
MOV qword ptr [RSP + 0x20],R10
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP + 0x30],0x0
MOV AL,0x0
CALL 0x0012b8a0
MOV dword ptr [RBP + -0x1c],EAX
LAB_0012b009:
MOV EAX,dword ptr [RBP + -0x1c]
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
RET
|
int4 run_mysqlcheck_fixnames(void)
{
char *pcVar1;
char *pcVar2;
char *pcVar3;
char *pcVar4;
char *pcVar5;
int4 local_24;
if (opt_systables_only == '\0') {
phase = phase + 1;
verbose("Phase %d/%d: Fixing table and database names",phase,7);
print_conn_args("mysqlcheck");
pcVar5 = &DAT_001f2468;
if (opt_verbose != 0) {
pcVar5 = "--verbose";
}
pcVar4 = &DAT_001f2468;
if (1 < opt_verbose) {
pcVar4 = "--verbose";
}
pcVar1 = &DAT_001f2468;
if (2 < opt_verbose) {
pcVar1 = "--verbose";
}
pcVar3 = &DAT_001f2468;
if (opt_silent != '\0') {
pcVar3 = "--silent";
}
pcVar2 = "--skip-write-binlog";
if (opt_write_binlog != '\0') {
pcVar2 = "--write-binlog";
}
local_24 = run_tool(mysqlcheck_path,0,defaults_file,"--all-databases","--fix-db-names",
"--fix-table-names",pcVar5,pcVar4,pcVar1,pcVar3,pcVar2,&DAT_001ecda6,0);
}
else {
phase = phase + 1;
verbose("Phase %d/%d: Fixing table and database names ... Skipped",phase,7);
local_24 = 0;
}
return local_24;
}
|
|
20,112
|
maria_ftparser_alloc_param
|
eloqsql/storage/maria/ma_ft_parser.c
|
MYSQL_FTPARSER_PARAM* maria_ftparser_alloc_param(MARIA_HA *info)
{
if (!info->ftparser_param)
{
/*
. info->ftparser_param can not be zero after the initialization,
because it always includes built-in fulltext parser. And built-in
parser can be called even if the table has no fulltext indexes and
no varchar/text fields.
ftb_find_relevance... parser (ftb_find_relevance_parse,
ftb_find_relevance_add_word) calls ftb_check_phrase... parser
(ftb_check_phrase_internal, ftb_phrase_add_word). Thus MAX_PARAM_NR=2.
*/
info->ftparser_param= (MYSQL_FTPARSER_PARAM *)
my_malloc(PSI_INSTRUMENT_ME, MAX_PARAM_NR * sizeof(MYSQL_FTPARSER_PARAM) *
info->s->ftkeys, MYF(MY_WME | MY_ZEROFILL));
init_alloc_root(PSI_INSTRUMENT_ME, &info->ft_memroot,
FTPARSER_MEMROOT_ALLOC_SIZE, 0, MYF(0));
}
return info->ftparser_param;
}
|
O0
|
c
|
maria_ftparser_alloc_param:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x368(%rax)
jne 0x4c006
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl 0x748(%rax), %eax
movl %eax, %esi
shlq $0x7, %rsi
xorl %edi, %edi
movl $0x30, %edx
callq 0xf3860
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x368(%rax)
movq -0x8(%rbp), %rsi
addq $0x328, %rsi # imm = 0x328
xorl %edi, %edi
movl $0x10000, %edx # imm = 0x10000
xorl %eax, %eax
movl %eax, %r8d
movq %r8, %rcx
callq 0xed1a0
movq -0x8(%rbp), %rax
movq 0x368(%rax), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
maria_ftparser_alloc_param:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
cmp qword ptr [rax+368h], 0
jnz short loc_4C006
mov rax, [rbp+var_8]
mov rax, [rax]
mov eax, [rax+748h]
mov esi, eax
shl rsi, 7
xor edi, edi
mov edx, 30h ; '0'
call my_malloc
mov rcx, rax
mov rax, [rbp+var_8]
mov [rax+368h], rcx
mov rsi, [rbp+var_8]
add rsi, 328h
xor edi, edi
mov edx, 10000h
xor eax, eax
mov r8d, eax
mov rcx, r8
call init_alloc_root
loc_4C006:
mov rax, [rbp+var_8]
mov rax, [rax+368h]
add rsp, 10h
pop rbp
retn
|
long long maria_ftparser_alloc_param(_QWORD *a1)
{
if ( !a1[109] )
{
a1[109] = my_malloc(0LL, (unsigned long long)*(unsigned int *)(*a1 + 1864LL) << 7, 48LL);
init_alloc_root(0LL, a1 + 101, 0x10000LL, 0LL);
}
return a1[109];
}
|
maria_ftparser_alloc_param:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x368],0x0
JNZ 0x0014c006
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x748]
MOV ESI,EAX
SHL RSI,0x7
XOR EDI,EDI
MOV EDX,0x30
CALL 0x001f3860
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x368],RCX
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0x328
XOR EDI,EDI
MOV EDX,0x10000
XOR EAX,EAX
MOV R8D,EAX
MOV RCX,R8
CALL 0x001ed1a0
LAB_0014c006:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x368]
ADD RSP,0x10
POP RBP
RET
|
long maria_ftparser_alloc_param(long *param_1)
{
long lVar1;
if (param_1[0x6d] == 0) {
lVar1 = my_malloc(0,(ulong)*(uint *)(*param_1 + 0x748) << 7,0x30);
param_1[0x6d] = lVar1;
init_alloc_root(0,param_1 + 0x65,0x10000,0);
}
return param_1[0x6d];
}
|
|
20,113
|
maria_ftparser_alloc_param
|
eloqsql/storage/maria/ma_ft_parser.c
|
MYSQL_FTPARSER_PARAM* maria_ftparser_alloc_param(MARIA_HA *info)
{
if (!info->ftparser_param)
{
/*
. info->ftparser_param can not be zero after the initialization,
because it always includes built-in fulltext parser. And built-in
parser can be called even if the table has no fulltext indexes and
no varchar/text fields.
ftb_find_relevance... parser (ftb_find_relevance_parse,
ftb_find_relevance_add_word) calls ftb_check_phrase... parser
(ftb_check_phrase_internal, ftb_phrase_add_word). Thus MAX_PARAM_NR=2.
*/
info->ftparser_param= (MYSQL_FTPARSER_PARAM *)
my_malloc(PSI_INSTRUMENT_ME, MAX_PARAM_NR * sizeof(MYSQL_FTPARSER_PARAM) *
info->s->ftkeys, MYF(MY_WME | MY_ZEROFILL));
init_alloc_root(PSI_INSTRUMENT_ME, &info->ft_memroot,
FTPARSER_MEMROOT_ALLOC_SIZE, 0, MYF(0));
}
return info->ftparser_param;
}
|
O3
|
c
|
maria_ftparser_alloc_param:
movq 0x368(%rdi), %rax
testq %rax, %rax
je 0x46762
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rax
movl 0x748(%rax), %esi
shlq $0x7, %rsi
movl $0x30, %edx
xorl %edi, %edi
callq 0x9fdb1
movq %rax, 0x368(%rbx)
leaq 0x328(%rbx), %rsi
movl $0x10000, %edx # imm = 0x10000
xorl %edi, %edi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x9cb44
movq 0x368(%rbx), %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
|
maria_ftparser_alloc_param:
mov rax, [rdi+368h]
test rax, rax
jz short loc_46762
retn
loc_46762:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
mov rax, [rdi]
mov esi, [rax+748h]
shl rsi, 7
mov edx, 30h ; '0'
xor edi, edi
call my_malloc
mov [rbx+368h], rax
lea rsi, [rbx+328h]
mov edx, offset stru_10000
xor edi, edi
xor ecx, ecx
xor r8d, r8d
call init_alloc_root
mov rax, [rbx+368h]
add rsp, 8
pop rbx
pop rbp
retn
|
long long maria_ftparser_alloc_param(_QWORD *a1)
{
long long result; // rax
result = a1[109];
if ( !result )
{
a1[109] = my_malloc(0LL, (unsigned long long)*(unsigned int *)(*a1 + 1864LL) << 7, 48LL);
init_alloc_root(0LL, a1 + 101, &stru_10000, 0LL, 0LL);
return a1[109];
}
return result;
}
|
maria_ftparser_alloc_param:
MOV RAX,qword ptr [RDI + 0x368]
TEST RAX,RAX
JZ 0x00146762
RET
LAB_00146762:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV RAX,qword ptr [RDI]
MOV ESI,dword ptr [RAX + 0x748]
SHL RSI,0x7
MOV EDX,0x30
XOR EDI,EDI
CALL 0x0019fdb1
MOV qword ptr [RBX + 0x368],RAX
LEA RSI,[RBX + 0x328]
MOV EDX,0x10000
XOR EDI,EDI
XOR ECX,ECX
XOR R8D,R8D
CALL 0x0019cb44
MOV RAX,qword ptr [RBX + 0x368]
ADD RSP,0x8
POP RBX
POP RBP
RET
|
long maria_ftparser_alloc_param(long *param_1)
{
long lVar1;
int8 in_R9;
long lVar2;
lVar2 = param_1[0x6d];
if (lVar2 != 0) {
return lVar2;
}
lVar1 = my_malloc(0,(ulong)*(uint *)(*param_1 + 0x748) << 7,0x30);
param_1[0x6d] = lVar1;
init_alloc_root(0,param_1 + 0x65,0x10000,0,0,in_R9,lVar2);
return param_1[0x6d];
}
|
|
20,114
|
my_error
|
eloqsql/mysys/my_error.c
|
void my_error(uint nr, myf MyFlags, ...)
{
const char *format;
va_list args;
char ebuff[ERRMSGSIZE];
DBUG_ENTER("my_error");
DBUG_PRINT("my", ("nr: %d MyFlags: %lu errno: %d", nr, MyFlags, errno));
if (!(format = my_get_err_msg(nr)))
(void) my_snprintf(ebuff, sizeof(ebuff), "Unknown error %d", nr);
else
{
va_start(args,MyFlags);
(void) my_vsnprintf_ex(&my_charset_utf8mb3_general_ci, ebuff,
sizeof(ebuff), format, args);
va_end(args);
}
(*error_handler_hook)(nr, ebuff, MyFlags);
DBUG_VOID_RETURN;
}
|
O0
|
c
|
my_error:
pushq %rbp
movq %rsp, %rbp
subq $0x2f0, %rsp # imm = 0x2F0
testb %al, %al
je 0xf3f97
movaps %xmm0, -0x2c0(%rbp)
movaps %xmm1, -0x2b0(%rbp)
movaps %xmm2, -0x2a0(%rbp)
movaps %xmm3, -0x290(%rbp)
movaps %xmm4, -0x280(%rbp)
movaps %xmm5, -0x270(%rbp)
movaps %xmm6, -0x260(%rbp)
movaps %xmm7, -0x250(%rbp)
movq %r9, -0x2c8(%rbp)
movq %r8, -0x2d0(%rbp)
movq %rcx, -0x2d8(%rbp)
movq %rdx, -0x2e0(%rbp)
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movl %edi, -0x214(%rbp)
movq %rsi, -0x220(%rbp)
jmp 0xf3fcf
movl -0x214(%rbp), %edi
callq 0xf3ea0
movq %rax, -0x228(%rbp)
cmpq $0x0, %rax
jne 0xf4009
leaq -0x210(%rbp), %rdi
movl -0x214(%rbp), %ecx
movl $0x200, %esi # imm = 0x200
leaq 0x69ec5(%rip), %rdx # 0x15dec5
movb $0x0, %al
callq 0x1563d0
jmp 0xf405d
leaq -0x240(%rbp), %rax
leaq -0x2f0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x10, (%rax)
leaq -0x210(%rbp), %rsi
movq -0x228(%rbp), %rcx
leaq -0x240(%rbp), %r8
leaq 0x38a5f4(%rip), %rdi # 0x47e640
movl $0x200, %edx # imm = 0x200
callq 0x153db0
leaq -0x240(%rbp), %rax
leaq 0x1d6f5c(%rip), %rax # 0x2cafc0
movq (%rax), %rax
movl -0x214(%rbp), %edi
leaq -0x210(%rbp), %rsi
movq -0x220(%rbp), %rdx
callq *%rax
jmp 0xf407f
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0xf409a
addq $0x2f0, %rsp # imm = 0x2F0
popq %rbp
retq
callq 0x2a270
nop
|
my_error:
push rbp
mov rbp, rsp
sub rsp, 2F0h
test al, al
jz short loc_F3F97
movaps [rbp+var_2C0], xmm0
movaps [rbp+var_2B0], xmm1
movaps [rbp+var_2A0], xmm2
movaps [rbp+var_290], xmm3
movaps [rbp+var_280], xmm4
movaps [rbp+var_270], xmm5
movaps [rbp+var_260], xmm6
movaps [rbp+var_250], xmm7
loc_F3F97:
mov [rbp+var_2C8], r9
mov [rbp+var_2D0], r8
mov [rbp+var_2D8], rcx
mov [rbp+var_2E0], rdx
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_214], edi
mov [rbp+var_220], rsi
jmp short $+2
loc_F3FCF:
mov edi, [rbp+var_214]
call my_get_err_msg
mov [rbp+var_228], rax
cmp rax, 0
jnz short loc_F4009
lea rdi, [rbp+var_210]
mov ecx, [rbp+var_214]
mov esi, 200h
lea rdx, aUnknownErrorD; "Unknown error %d"
mov al, 0
call my_snprintf
jmp short loc_F405D
loc_F4009:
lea rax, [rbp+var_240]
lea rcx, [rbp+var_2F0]
mov [rax+10h], rcx
lea rcx, [rbp+arg_0]
mov [rax+8], rcx
mov dword ptr [rax+4], 30h ; '0'
mov dword ptr [rax], 10h
lea rsi, [rbp+var_210]
mov rcx, [rbp+var_228]
lea r8, [rbp+var_240]
lea rdi, my_charset_utf8mb3_general_ci
mov edx, 200h
call my_vsnprintf_ex
lea rax, [rbp+var_240]
loc_F405D:
lea rax, error_handler_hook
mov rax, [rax]
mov edi, [rbp+var_214]
lea rsi, [rbp+var_210]
mov rdx, [rbp+var_220]
call rax
jmp short $+2
loc_F407F:
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_F409A
add rsp, 2F0h
pop rbp
retn
loc_F409A:
call ___stack_chk_fail
|
unsigned long long my_error(unsigned int a1, long long a2, ...)
{
int v2; // r8d
int v3; // r9d
va_list va; // [rsp+B0h] [rbp-240h] BYREF
_BYTE *err_msg; // [rsp+C8h] [rbp-228h]
long long v7; // [rsp+D0h] [rbp-220h]
unsigned int v8; // [rsp+DCh] [rbp-214h]
_BYTE v9[520]; // [rsp+E0h] [rbp-210h] BYREF
unsigned long long v10; // [rsp+2E8h] [rbp-8h]
va_start(va, a2);
va_arg(va, _QWORD);
va_arg(va, _QWORD);
va_arg(va, _QWORD);
va_arg(va, _QWORD);
va_end(va);
v10 = __readfsqword(0x28u);
v8 = a1;
v7 = a2;
err_msg = my_get_err_msg(a1);
if ( err_msg )
{
va_start(va, a2);
my_vsnprintf_ex(&my_charset_utf8mb3_general_ci, v9, 512LL, err_msg, va);
}
else
{
my_snprintf((unsigned int)v9, 512, (unsigned int)"Unknown error %d", v8, v2, v3);
}
error_handler_hook();
return __readfsqword(0x28u);
}
|
my_error:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x2f0
TEST AL,AL
JZ 0x001f3f97
MOVAPS xmmword ptr [RBP + -0x2c0],XMM0
MOVAPS xmmword ptr [RBP + -0x2b0],XMM1
MOVAPS xmmword ptr [RBP + -0x2a0],XMM2
MOVAPS xmmword ptr [RBP + -0x290],XMM3
MOVAPS xmmword ptr [RBP + -0x280],XMM4
MOVAPS xmmword ptr [RBP + -0x270],XMM5
MOVAPS xmmword ptr [RBP + -0x260],XMM6
MOVAPS xmmword ptr [RBP + -0x250],XMM7
LAB_001f3f97:
MOV qword ptr [RBP + -0x2c8],R9
MOV qword ptr [RBP + -0x2d0],R8
MOV qword ptr [RBP + -0x2d8],RCX
MOV qword ptr [RBP + -0x2e0],RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV dword ptr [RBP + -0x214],EDI
MOV qword ptr [RBP + -0x220],RSI
JMP 0x001f3fcf
LAB_001f3fcf:
MOV EDI,dword ptr [RBP + -0x214]
CALL 0x001f3ea0
MOV qword ptr [RBP + -0x228],RAX
CMP RAX,0x0
JNZ 0x001f4009
LEA RDI,[RBP + -0x210]
MOV ECX,dword ptr [RBP + -0x214]
MOV ESI,0x200
LEA RDX,[0x25dec5]
MOV AL,0x0
CALL 0x002563d0
JMP 0x001f405d
LAB_001f4009:
LEA RAX,[RBP + -0x240]
LEA RCX,[RBP + -0x2f0]
MOV qword ptr [RAX + 0x10],RCX
LEA RCX,[RBP + 0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV dword ptr [RAX + 0x4],0x30
MOV dword ptr [RAX],0x10
LEA RSI,[RBP + -0x210]
MOV RCX,qword ptr [RBP + -0x228]
LEA R8,[RBP + -0x240]
LEA RDI,[0x57e640]
MOV EDX,0x200
CALL 0x00253db0
LEA RAX,[RBP + -0x240]
LAB_001f405d:
LEA RAX,[0x3cafc0]
MOV RAX,qword ptr [RAX]
MOV EDI,dword ptr [RBP + -0x214]
LEA RSI,[RBP + -0x210]
MOV RDX,qword ptr [RBP + -0x220]
CALL RAX
JMP 0x001f407f
LAB_001f407f:
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001f409a
ADD RSP,0x2f0
POP RBP
RET
LAB_001f409a:
CALL 0x0012a270
|
void my_error(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
int4 param_9,int8 param_10,int8 param_11,int8 param_12,
int8 param_13,int8 param_14)
{
char in_AL;
long in_FS_OFFSET;
int1 local_2f8 [16];
int8 local_2e8;
int8 local_2e0;
int8 local_2d8;
int8 local_2d0;
int8 local_2c8;
int8 local_2b8;
int8 local_2a8;
int8 local_298;
int8 local_288;
int8 local_278;
int8 local_268;
int8 local_258;
int4 local_248;
int4 local_244;
int1 *local_240;
int1 *local_238;
long local_230;
int8 local_228;
int4 local_21c;
int1 local_218 [520];
long local_10;
if (in_AL != '\0') {
local_2c8 = param_1;
local_2b8 = param_2;
local_2a8 = param_3;
local_298 = param_4;
local_288 = param_5;
local_278 = param_6;
local_268 = param_7;
local_258 = param_8;
}
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_2e8 = param_11;
local_2e0 = param_12;
local_2d8 = param_13;
local_2d0 = param_14;
local_228 = param_10;
local_21c = param_9;
local_230 = my_get_err_msg(param_9);
if (local_230 == 0) {
my_snprintf(local_218,0x200,"Unknown error %d",local_21c);
}
else {
local_238 = local_2f8;
local_240 = &stack0x00000008;
local_244 = 0x30;
local_248 = 0x10;
my_vsnprintf_ex(my_charset_utf8mb3_general_ci,local_218,0x200,local_230,&local_248);
}
(*(code *)error_handler_hook)(local_21c,local_218,local_228);
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
20,115
|
ma_update_blob_record
|
eloqsql/storage/maria/ma_dynrec.c
|
my_bool _ma_update_blob_record(MARIA_HA *info, MARIA_RECORD_POS pos,
const uchar *oldrec __attribute__ ((unused)),
const uchar *record)
{
uchar *rec_buff;
int error;
ulong reclength,reclength2,extra;
my_bool buff_alloced;
extra= (ALIGN_SIZE(MARIA_MAX_DYN_BLOCK_HEADER)+MARIA_SPLIT_LENGTH+
MARIA_DYN_DELETE_BLOCK_HEADER);
reclength= (info->s->base.pack_reclength+
_ma_calc_total_blob_length(info,record)+ extra);
#ifdef NOT_USED /* We now support big rows */
if (reclength > MARIA_DYN_MAX_ROW_LENGTH)
{
my_errno=HA_ERR_TO_BIG_ROW;
return 1;
}
#endif
alloc_on_stack(*info->stack_end_ptr, rec_buff, buff_alloced, reclength);
if (!rec_buff)
{
my_errno= HA_ERR_OUT_OF_MEM; /* purecov: inspected */
return(1);
}
reclength2= _ma_rec_pack(info, rec_buff+
ALIGN_SIZE(MARIA_MAX_DYN_BLOCK_HEADER),
record);
if (!reclength2)
{
error= 1;
goto err;
}
DBUG_ASSERT(reclength2 <= reclength);
error=update_dynamic_record(info,pos,
rec_buff+ALIGN_SIZE(MARIA_MAX_DYN_BLOCK_HEADER),
reclength2);
err:
stack_alloc_free(rec_buff, buff_alloced);
return(error != 0);
}
|
O3
|
c
|
ma_update_blob_record:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq (%rdi), %rax
movq 0x3a0(%rax), %r12
movq %rcx, %rsi
callq 0x4a85a
leaq (%r12,%rax), %rsi
addq $0x5c, %rsi
leaq -0x40(%rbp), %rcx
movq %rsi, (%rcx)
movq 0x78(%r14), %rax
movq (%rax), %rax
subq %rcx, %rax
subq %rsi, %rax
jbe 0x4a96c
cmpq $0x10000, %rax # imm = 0x10000
ja 0x4a954
cmpq $0x1000, %rsi # imm = 0x1000
jb 0x4a96c
cmpq $0x8001, %rax # imm = 0x8001
jb 0x4a96c
movq %rsp, %r12
addq $0xf, %rsi
andq $-0x10, %rsi
subq %rsi, %r12
movq %r12, %rsp
movb $0x1, %al
movl %eax, -0x34(%rbp)
jmp 0x4a987
movl $0x10010, %edx # imm = 0x10010
xorl %edi, %edi
callq 0xa63e5
testq %rax, %rax
je 0x4a9c7
movq %rax, %r12
movl $0x0, -0x34(%rbp)
leaq 0x18(%r12), %r13
movq %r14, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x49ecd
testl %eax, %eax
je 0x4a9b5
movl %eax, %ecx
movq %r14, %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x4a362
testb %al, %al
setne %bl
jmp 0x4a9b7
movb $0x1, %bl
cmpb $0x0, -0x34(%rbp)
jne 0x4a9d4
movq %r12, %rdi
callq 0xa6612
jmp 0x4a9d4
callq 0xa8156
movl $0x80, (%rax)
movb $0x1, %bl
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x4a9f4
movl %ebx, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2a270
|
_ma_update_blob_record:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r15, rcx
mov rbx, rsi
mov r14, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov rax, [rdi]
mov r12, [rax+3A0h]
mov rsi, rcx
call _ma_calc_total_blob_length
lea rsi, [r12+rax]
add rsi, 5Ch ; '\'
lea rcx, [rbp+var_40]
mov [rcx], rsi
mov rax, [r14+78h]
mov rax, [rax]
sub rax, rcx
sub rax, rsi
jbe short loc_4A96C
cmp rax, offset stru_10000
ja short loc_4A954
cmp rsi, 1000h
jb short loc_4A96C
cmp rax, 8001h
jb short loc_4A96C
loc_4A954:
mov r12, rsp
add rsi, 0Fh
and rsi, 0FFFFFFFFFFFFFFF0h
sub r12, rsi
mov rsp, r12
mov al, 1
mov [rbp+var_34], eax
jmp short loc_4A987
loc_4A96C:
mov edx, 10010h
xor edi, edi
call my_malloc
test rax, rax
jz short loc_4A9C7
mov r12, rax
mov [rbp+var_34], 0
loc_4A987:
lea r13, [r12+18h]
mov rdi, r14
mov rsi, r13
mov rdx, r15
call _ma_rec_pack
test eax, eax
jz short loc_4A9B5
mov ecx, eax
mov rdi, r14
mov rsi, rbx
mov rdx, r13
call update_dynamic_record
test al, al
setnz bl
jmp short loc_4A9B7
loc_4A9B5:
mov bl, 1
loc_4A9B7:
cmp byte ptr [rbp+var_34], 0
jnz short loc_4A9D4
mov rdi, r12
call my_free
jmp short loc_4A9D4
loc_4A9C7:
call _my_thread_var
mov dword ptr [rax], 80h
mov bl, 1
loc_4A9D4:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_4A9F4
mov eax, ebx
lea rsp, [rbp-28h]
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_4A9F4:
call ___stack_chk_fail
|
long long ma_update_blob_record(long long a1, long long a2, long long a3, unsigned __int8 *a4)
{
long long v6; // r12
unsigned long long v7; // rsi
unsigned long long v8; // rax
bool v9; // cc
unsigned long long v10; // rax
char *v11; // r12
long long v12; // rax
unsigned int v13; // eax
unsigned long long v15; // [rsp+0h] [rbp-40h] BYREF
int v16; // [rsp+Ch] [rbp-34h]
unsigned long long v17; // [rsp+10h] [rbp-30h]
v17 = __readfsqword(0x28u);
v6 = *(_QWORD *)(*(_QWORD *)a1 + 928LL);
v7 = v6 + ma_calc_total_blob_length((_QWORD *)a1, (long long)a4) + 92;
v15 = v7;
v8 = **(_QWORD **)(a1 + 120) - (_QWORD)&v15;
v9 = v8 <= v7;
v10 = v8 - v7;
if ( v9 || v10 <= (unsigned long long)&stru_10000 && (v7 < 0x1000 || v10 < 0x8001) )
{
v12 = my_malloc(0LL, v7, 65552LL);
if ( !v12 )
{
*(_DWORD *)my_thread_var(0LL) = 128;
LOBYTE(a2) = 1;
return (unsigned int)a2;
}
v11 = (char *)v12;
v16 = 0;
}
else
{
v11 = (char *)&v15 - ((v7 + 15) & 0xFFFFFFFFFFFFFFF0LL);
LOBYTE(v10) = 1;
v16 = v10;
}
v13 = ma_rec_pack((unsigned __int8 *)a1, v11 + 24, a4);
if ( v13 )
LOBYTE(a2) = update_dynamic_record((_QWORD *)a1, a2, (long long)(v11 + 24), v13);
else
LOBYTE(a2) = 1;
if ( !(_BYTE)v16 )
my_free(v11);
return (unsigned int)a2;
}
|
_ma_update_blob_record:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R15,RCX
MOV RBX,RSI
MOV R14,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RDI]
MOV R12,qword ptr [RAX + 0x3a0]
MOV RSI,RCX
CALL 0x0014a85a
LEA RSI,[R12 + RAX*0x1]
ADD RSI,0x5c
LEA RCX,[RBP + -0x40]
MOV qword ptr [RCX],RSI
MOV RAX,qword ptr [R14 + 0x78]
MOV RAX,qword ptr [RAX]
SUB RAX,RCX
SUB RAX,RSI
JBE 0x0014a96c
CMP RAX,0x10000
JA 0x0014a954
CMP RSI,0x1000
JC 0x0014a96c
CMP RAX,0x8001
JC 0x0014a96c
LAB_0014a954:
MOV R12,RSP
ADD RSI,0xf
AND RSI,-0x10
SUB R12,RSI
MOV RSP,R12
MOV AL,0x1
MOV dword ptr [RBP + -0x34],EAX
JMP 0x0014a987
LAB_0014a96c:
MOV EDX,0x10010
XOR EDI,EDI
CALL 0x001a63e5
TEST RAX,RAX
JZ 0x0014a9c7
MOV R12,RAX
MOV dword ptr [RBP + -0x34],0x0
LAB_0014a987:
LEA R13,[R12 + 0x18]
MOV RDI,R14
MOV RSI,R13
MOV RDX,R15
CALL 0x00149ecd
TEST EAX,EAX
JZ 0x0014a9b5
MOV ECX,EAX
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R13
CALL 0x0014a362
TEST AL,AL
SETNZ BL
JMP 0x0014a9b7
LAB_0014a9b5:
MOV BL,0x1
LAB_0014a9b7:
CMP byte ptr [RBP + -0x34],0x0
JNZ 0x0014a9d4
MOV RDI,R12
CALL 0x001a6612
JMP 0x0014a9d4
LAB_0014a9c7:
CALL 0x001a8156
MOV dword ptr [RAX],0x80
MOV BL,0x1
LAB_0014a9d4:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0014a9f4
MOV EAX,EBX
LEA RSP,[RBP + -0x28]
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0014a9f4:
CALL 0x0012a270
|
ulong _ma_update_blob_record(long *param_1,int8 param_2,int8 param_3,int8 param_4)
{
long lVar1;
char cVar2;
int iVar3;
long lVar4;
ulong uVar5;
int1 *puVar6;
int4 *puVar7;
int7 uVar8;
ulong *puVar9;
long in_FS_OFFSET;
ulong local_48;
int4 local_3c;
long local_38;
puVar9 = &local_48;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
lVar1 = *(long *)(*param_1 + 0x3a0);
lVar4 = _ma_calc_total_blob_length(param_1,param_4);
lVar1 = lVar1 + lVar4;
local_48 = lVar1 + 0x5c;
uVar5 = (*(long *)param_1[0xf] - (long)&local_48) - local_48;
uVar8 = (int7)((ulong)param_2 >> 8);
if (((ulong)(*(long *)param_1[0xf] - (long)&local_48) < local_48 || uVar5 == 0) ||
((uVar5 < 0x10001 && ((local_48 < 0x1000 || (uVar5 < 0x8001)))))) {
puVar6 = (int1 *)my_malloc(0,local_48,0x10010);
if (puVar6 == (int1 *)0x0) {
puVar7 = (int4 *)_my_thread_var();
*puVar7 = 0x80;
uVar5 = CONCAT71(uVar8,1);
goto LAB_0014a9d4;
}
local_3c = 0;
puVar9 = &local_48;
}
else {
puVar6 = (int1 *)((long)&local_48 - (lVar1 + 0x6bU & 0xfffffffffffffff0));
local_3c = (int4)CONCAT71((int7)(uVar5 >> 8),1);
puVar9 = (ulong *)puVar6;
}
*(int8 *)((long)puVar9 + -8) = 0x14a99a;
iVar3 = _ma_rec_pack(param_1,puVar6 + 0x18,param_4);
if (iVar3 == 0) {
uVar5 = CONCAT71(uVar8,1);
}
else {
*(int8 *)((long)puVar9 + -8) = 0x14a9ae;
cVar2 = update_dynamic_record(param_1,param_2,puVar6 + 0x18,iVar3);
uVar5 = CONCAT71(uVar8,cVar2 != '\0');
}
if ((char)local_3c == '\0') {
*(int8 *)((long)puVar9 + -8) = 0x14a9c5;
my_free(puVar6);
}
LAB_0014a9d4:
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return uVar5 & 0xffffffff;
}
/* WARNING: Subroutine does not return */
*(code **)((long)puVar9 + -8) = _ma_delete_dynamic_record;
__stack_chk_fail();
}
|
|
20,116
|
count_square
|
eloqsql/storage/maria/ma_rt_split.c
|
static double count_square(const double *a, int n_dim)
{
const double *end= a + n_dim * 2;
double square= 1.0;
do
{
square *= a[1] - a[0];
a+= 2;
} while (a != end);
return square;
}
|
O0
|
c
|
count_square:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
shll %ecx
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movsd 0xb4ebe(%rip), %xmm0 # 0x150028
movsd %xmm0, -0x20(%rbp)
movq -0x8(%rbp), %rax
movsd 0x8(%rax), %xmm0
movq -0x8(%rbp), %rax
subsd (%rax), %xmm0
mulsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x20(%rbp)
movq -0x8(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq -0x18(%rbp), %rax
jne 0x9b16f
movsd -0x20(%rbp), %xmm0
popq %rbp
retq
nopw (%rax,%rax)
|
count_square:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov rax, [rbp+var_8]
mov ecx, [rbp+var_C]
shl ecx, 1
movsxd rcx, ecx
shl rcx, 3
add rax, rcx
mov [rbp+var_18], rax
movsd xmm0, cs:qword_150028
movsd [rbp+var_20], xmm0
loc_9B16F:
mov rax, [rbp+var_8]
movsd xmm0, qword ptr [rax+8]
mov rax, [rbp+var_8]
subsd xmm0, qword ptr [rax]
mulsd xmm0, [rbp+var_20]
movsd [rbp+var_20], xmm0
mov rax, [rbp+var_8]
add rax, 10h
mov [rbp+var_8], rax
mov rax, [rbp+var_8]
cmp rax, [rbp+var_18]
jnz short loc_9B16F
movsd xmm0, [rbp+var_20]
pop rbp
retn
|
double count_square(double *a1, int a2)
{
double v3; // [rsp+0h] [rbp-20h]
double *v4; // [rsp+18h] [rbp-8h]
v4 = a1;
v3 = 1.0;
do
{
v3 = (v4[1] - *v4) * v3;
v4 += 2;
}
while ( v4 != &a1[2 * a2] );
return v3;
}
|
count_square:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RBP + -0xc]
SHL ECX,0x1
MOVSXD RCX,ECX
SHL RCX,0x3
ADD RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
MOVSD XMM0,qword ptr [0x00250028]
MOVSD qword ptr [RBP + -0x20],XMM0
LAB_0019b16f:
MOV RAX,qword ptr [RBP + -0x8]
MOVSD XMM0,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x8]
SUBSD XMM0,qword ptr [RAX]
MULSD XMM0,qword ptr [RBP + -0x20]
MOVSD qword ptr [RBP + -0x20],XMM0
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x10
MOV qword ptr [RBP + -0x8],RAX
MOV RAX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RBP + -0x18]
JNZ 0x0019b16f
MOVSD XMM0,qword ptr [RBP + -0x20]
POP RBP
RET
|
double count_square(double *param_1,int param_2)
{
double local_28;
double *local_10;
local_28 = DAT_00250028;
local_10 = param_1;
do {
local_28 = (local_10[1] - *local_10) * local_28;
local_10 = local_10 + 2;
} while (local_10 != param_1 + (param_2 << 1));
return local_28;
}
|
|
20,117
|
POINTonE1_double
|
corpus-core[P]colibri-stateless/build_O3/_deps/blst-src/src/e1.c
|
void blst_p1_add(POINTonE1 *out, const POINTonE1 *a, const POINTonE1 *b)
{ POINTonE1_add(out, a, b); }
|
O3
|
c
|
POINTonE1_double:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x138, %rsp # imm = 0x138
movq %rsi, %r15
movq %rdi, %r12
leaq 0x60(%rdi), %rbx
movl $0x30, %esi
movq %rbx, %rdi
movq %rbx, -0x30(%rbp)
callq 0x70940
movq %rax, -0x38(%rbp)
leaq 0x60(%r15), %r13
movl $0x30, %esi
movq %r13, %rdi
callq 0x70940
movq %rax, %r14
leaq 0x31edd(%rip), %rdx # 0x8cca0
leaq -0xa0(%rbp), %rdi
movabsq $-0x760c000300030003, %rcx # imm = 0x89F3FFFCFFFCFFFD
movq %rbx, %rsi
movq %rdx, %rbx
callq 0x74720
leaq -0x70(%rbp), %rdi
movq %r13, %rsi
movq %rbx, %rdx
movabsq $-0x760c000300030003, %rcx # imm = 0x89F3FFFCFFFCFFFD
callq 0x74720
leaq -0x100(%rbp), %rdi
movq %r12, %rsi
leaq -0x70(%rbp), %rdx
movq %rbx, %rcx
movabsq $-0x760c000300030003, %r8 # imm = 0x89F3FFFCFFFCFFFD
callq 0x74ea0
leaq -0x160(%rbp), %rdi
movq %r15, %rsi
leaq -0xa0(%rbp), %rdx
movq %rbx, %rcx
movabsq $-0x760c000300030003, %r8 # imm = 0x89F3FFFCFFFCFFFD
callq 0x74ea0
leaq -0xd0(%rbp), %rdi
addq $0x30, %r12
movq %r12, %rsi
movq %r13, %rdx
movq %rbx, %rcx
movabsq $-0x760c000300030003, %r8 # imm = 0x89F3FFFCFFFCFFFD
callq 0x74ea0
leaq -0x130(%rbp), %r12
addq $0x30, %r15
movq %r12, %rdi
movq %r15, %rsi
movq -0x30(%rbp), %rdx
movq %rbx, %rcx
movabsq $-0x760c000300030003, %r8 # imm = 0x89F3FFFCFFFCFFFD
movq %r8, %r15
callq 0x74ea0
leaq -0xd0(%rbp), %rdi
movq %rdi, %rsi
leaq -0x70(%rbp), %rdx
movq %rbx, %rcx
movq %r15, %r8
callq 0x74ea0
movq %r12, %rdi
movq %r12, %rsi
leaq -0xa0(%rbp), %rdx
movq %rbx, %rcx
movq %r15, %r8
callq 0x74ea0
movl $0x60, %edx
leaq -0x100(%rbp), %rdi
leaq -0x160(%rbp), %rsi
callq 0x70980
xorq -0x38(%rbp), %r14
xorq $0x1, %r14
andq %r14, %rax
addq $0x138, %rsp # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
POINTonE1_is_equal:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 138h
mov r15, rsi
mov r12, rdi
lea rbx, [rdi+60h]
mov esi, 30h ; '0'
mov rdi, rbx
mov [rbp+var_30], rbx
call vec_is_zero_16x
mov [rbp+var_38], rax
lea r13, [r15+60h]
mov esi, 30h ; '0'
mov rdi, r13
call vec_is_zero_16x
mov r14, rax
lea rdx, BLS12_381_P
lea rdi, [rbp+var_A0]
mov rcx, 89F3FFFCFFFCFFFDh
mov rsi, rbx
mov rbx, rdx
call sqr_mont_384
lea rdi, [rbp+var_70]
mov rsi, r13
mov rdx, rbx
mov rcx, 89F3FFFCFFFCFFFDh
call sqr_mont_384
lea rdi, [rbp+var_100]
mov rsi, r12
lea rdx, [rbp+var_70]
mov rcx, rbx
mov r8, 89F3FFFCFFFCFFFDh
call mul_mont_384
lea rdi, [rbp+var_160]
mov rsi, r15
lea rdx, [rbp+var_A0]
mov rcx, rbx
mov r8, 89F3FFFCFFFCFFFDh
call mul_mont_384
lea rdi, [rbp+var_D0]
add r12, 30h ; '0'
mov rsi, r12
mov rdx, r13
mov rcx, rbx
mov r8, 89F3FFFCFFFCFFFDh
call mul_mont_384
lea r12, [rbp+var_130]
add r15, 30h ; '0'
mov rdi, r12
mov rsi, r15
mov rdx, [rbp+var_30]
mov rcx, rbx
mov r8, 89F3FFFCFFFCFFFDh
mov r15, r8
call mul_mont_384
lea rdi, [rbp+var_D0]
mov rsi, rdi
lea rdx, [rbp+var_70]
mov rcx, rbx
mov r8, r15
call mul_mont_384
mov rdi, r12
mov rsi, r12
lea rdx, [rbp+var_A0]
mov rcx, rbx
mov r8, r15
call mul_mont_384
mov edx, 60h ; '`'
lea rdi, [rbp+var_100]
lea rsi, [rbp+var_160]
call vec_is_equal_16x
xor r14, [rbp+var_38]
xor r14, 1
and rax, r14
add rsp, 138h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long POINTonE1_is_equal(long long a1, long long a2)
{
long long v2; // r14
long long is_equal_16x; // rax
_BYTE v5[48]; // [rsp+0h] [rbp-160h] BYREF
_BYTE v6[48]; // [rsp+30h] [rbp-130h] BYREF
_BYTE v7[48]; // [rsp+60h] [rbp-100h] BYREF
_BYTE v8[48]; // [rsp+90h] [rbp-D0h] BYREF
_BYTE v9[48]; // [rsp+C0h] [rbp-A0h] BYREF
_BYTE v10[56]; // [rsp+F0h] [rbp-70h] BYREF
long long is_zero_16x; // [rsp+128h] [rbp-38h]
long long v12; // [rsp+130h] [rbp-30h]
v12 = a1 + 96;
is_zero_16x = vec_is_zero_16x(a1 + 96, 48LL);
v2 = vec_is_zero_16x(a2 + 96, 48LL);
sqr_mont_384(v9, a1 + 96, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
sqr_mont_384(v10, a2 + 96, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
mul_mont_384(v7, a1, v10, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
mul_mont_384(v5, a2, v9, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
mul_mont_384(v8, a1 + 48, a2 + 96, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
mul_mont_384(v6, a2 + 48, v12, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
mul_mont_384(v8, v8, v10, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
mul_mont_384(v6, v6, v9, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
is_equal_16x = vec_is_equal_16x(v7, v5, 96LL);
return (is_zero_16x ^ v2 ^ 1) & is_equal_16x;
}
|
POINTonE1_is_equal:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x138
MOV R15,RSI
MOV R12,RDI
LEA RBX,[RDI + 0x60]
MOV ESI,0x30
MOV RDI,RBX
MOV qword ptr [RBP + -0x30],RBX
CALL 0x00170940
MOV qword ptr [RBP + -0x38],RAX
LEA R13,[R15 + 0x60]
MOV ESI,0x30
MOV RDI,R13
CALL 0x00170940
MOV R14,RAX
LEA RDX,[0x18cca0]
LEA RDI,[RBP + -0xa0]
MOV RCX,-0x760c000300030003
MOV RSI,RBX
MOV RBX,RDX
CALL 0x00174720
LEA RDI,[RBP + -0x70]
MOV RSI,R13
MOV RDX,RBX
MOV RCX,-0x760c000300030003
CALL 0x00174720
LEA RDI,[RBP + -0x100]
MOV RSI,R12
LEA RDX,[RBP + -0x70]
MOV RCX,RBX
MOV R8,-0x760c000300030003
CALL 0x00174ea0
LEA RDI,[RBP + -0x160]
MOV RSI,R15
LEA RDX,[RBP + -0xa0]
MOV RCX,RBX
MOV R8,-0x760c000300030003
CALL 0x00174ea0
LEA RDI,[RBP + -0xd0]
ADD R12,0x30
MOV RSI,R12
MOV RDX,R13
MOV RCX,RBX
MOV R8,-0x760c000300030003
CALL 0x00174ea0
LEA R12,[RBP + -0x130]
ADD R15,0x30
MOV RDI,R12
MOV RSI,R15
MOV RDX,qword ptr [RBP + -0x30]
MOV RCX,RBX
MOV R8,-0x760c000300030003
MOV R15,R8
CALL 0x00174ea0
LEA RDI,[RBP + -0xd0]
MOV RSI,RDI
LEA RDX,[RBP + -0x70]
MOV RCX,RBX
MOV R8,R15
CALL 0x00174ea0
MOV RDI,R12
MOV RSI,R12
LEA RDX,[RBP + -0xa0]
MOV RCX,RBX
MOV R8,R15
CALL 0x00174ea0
MOV EDX,0x60
LEA RDI,[RBP + -0x100]
LEA RSI,[RBP + -0x160]
CALL 0x00170980
XOR R14,qword ptr [RBP + -0x38]
XOR R14,0x1
AND RAX,R14
ADD RSP,0x138
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
ulong POINTonE1_is_equal(long param_1,long param_2)
{
long lVar1;
long lVar2;
ulong uVar3;
ulong uVar4;
int1 local_168 [48];
int1 local_138 [48];
int1 local_108 [48];
int1 local_d8 [48];
int1 local_a8 [48];
int1 local_78 [56];
ulong local_40;
long local_38;
lVar1 = param_1 + 0x60;
local_38 = lVar1;
local_40 = vec_is_zero_16x(lVar1,0x30);
lVar2 = param_2 + 0x60;
uVar3 = vec_is_zero_16x(lVar2,0x30);
sqr_mont_384(local_a8,lVar1,BLS12_381_P,0x89f3fffcfffcfffd);
sqr_mont_384(local_78,lVar2,BLS12_381_P,0x89f3fffcfffcfffd);
mul_mont_384(local_108,param_1,local_78,BLS12_381_P,0x89f3fffcfffcfffd);
mul_mont_384(local_168,param_2,local_a8,BLS12_381_P,0x89f3fffcfffcfffd);
mul_mont_384(local_d8,param_1 + 0x30,lVar2,BLS12_381_P,0x89f3fffcfffcfffd);
mul_mont_384(local_138,param_2 + 0x30,local_38,BLS12_381_P,0x89f3fffcfffcfffd);
mul_mont_384(local_d8,local_d8,local_78,BLS12_381_P,0x89f3fffcfffcfffd);
mul_mont_384(local_138,local_138,local_a8,BLS12_381_P,0x89f3fffcfffcfffd);
uVar4 = vec_is_equal_16x(local_108,local_168,0x60);
return uVar4 & (uVar3 ^ local_40 ^ 1);
}
|
|
20,118
|
minja::Parser::parseConstant()
|
llama.cpp/common/minja/minja.hpp
|
std::shared_ptr<Value> parseConstant() {
auto start = it;
consumeSpaces();
if (it == end) return nullptr;
if (*it == '"' || *it == '\'') {
auto str = parseString();
if (str) return std::make_shared<Value>(*str);
}
static std::regex prim_tok(R"(true\b|True\b|false\b|False\b|None\b)");
auto token = consumeToken(prim_tok);
if (!token.empty()) {
if (token == "true" || token == "True") return std::make_shared<Value>(true);
if (token == "false" || token == "False") return std::make_shared<Value>(false);
if (token == "None") return std::make_shared<Value>(nullptr);
throw std::runtime_error("Unknown constant token: " + token);
}
auto number = parseNumber(it, end);
if (!number.is_null()) return std::make_shared<Value>(number);
it = start;
return nullptr;
}
|
O3
|
cpp
|
minja::Parser::parseConstant():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x20(%rsi), %r14
movq 0x18(%rsi), %r12
movq 0x20(%rsi), %r13
movq %r13, %rbp
cmpq %r12, %r13
je 0x99cd1
movq %r13, %rbp
movsbl (%rbp), %edi
callq 0x1c930
testl %eax, %eax
je 0x99cd1
incq %rbp
movq %rbp, (%r14)
cmpq %r12, %rbp
jne 0x99cb9
cmpq %r12, %rbp
je 0x99d27
movzbl (%rbp), %eax
cmpl $0x27, %eax
je 0x99ce4
cmpl $0x22, %eax
jne 0x99d32
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x9b05c
movq (%r12), %rdx
testq %rdx, %rdx
je 0x99d32
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x9b64e
movq 0x8(%rsp), %rsi
testq %rsi, %rsi
je 0x99e8f
leaq 0x8(%rsp), %rdi
callq 0x9b7f4
jmp 0x99e8f
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
jmp 0x99e8f
leaq 0x68107(%rip), %rax # 0x101e40
movb (%rax), %al
testb %al, %al
je 0x99ea1
leaq 0x680d6(%rip), %rdx # 0x101e20
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
movl $0x1, %ecx
callq 0x94888
cmpq $0x0, 0x8(%r12)
je 0x99e0e
leaq 0x2d34a(%rip), %rsi # 0xc70bc
leaq 0x8(%rsp), %rdi
callq 0x1cad0
testl %eax, %eax
je 0x99df7
leaq 0x3216c(%rip), %rsi # 0xcbef3
leaq 0x8(%rsp), %rdi
callq 0x1cad0
testl %eax, %eax
je 0x99df7
leaq 0x2d325(%rip), %rsi # 0xc70c1
leaq 0x8(%rsp), %rdi
callq 0x1cad0
testl %eax, %eax
je 0x99e3d
leaq 0x32143(%rip), %rsi # 0xcbef8
leaq 0x8(%rsp), %rdi
callq 0x1cad0
testl %eax, %eax
je 0x99e3d
leaq 0x32772(%rip), %rsi # 0xcc53c
leaq 0x8(%rsp), %rdi
callq 0x1cad0
testl %eax, %eax
jne 0x99ef8
leaq 0x28(%rsp), %rdx
movq $0x0, (%rdx)
leaq 0x7(%rsp), %rsi
movq %rbx, %rdi
callq 0x9b914
jmp 0x99e74
leaq 0x7(%rsp), %rdx
movb $0x1, (%rdx)
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x9b822
jmp 0x99e74
leaq 0x18(%r15), %rcx
leaq 0x28(%rsp), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x9b0dc
cmpb $0x0, 0x28(%rsp)
je 0x99e54
leaq 0x7(%rsp), %rsi
leaq 0x28(%rsp), %rdx
movq %rbx, %rdi
callq 0x9b9fc
jmp 0x99e5d
leaq 0x7(%rsp), %rdx
movb $0x0, (%rdx)
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x9b822
jmp 0x99e74
movq %r13, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
leaq 0x28(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x732fc
movq %r14, %rdi
callq 0x300e0
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x99e8f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1c110
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x67f98(%rip), %rdi # 0x101e40
callq 0x1c3e0
testl %eax, %eax
je 0x99d43
leaq 0x67f64(%rip), %rdi # 0x101e20
leaq 0x342ab(%rip), %rsi # 0xce16e
movl $0x10, %edx
callq 0x68a34
leaq -0x3143a(%rip), %rdi # 0x68a9a
leaq 0x67f45(%rip), %rsi # 0x101e20
leaq 0x66836(%rip), %rdx # 0x100718
callq 0x1ca80
leaq 0x67f52(%rip), %rdi # 0x101e40
callq 0x1c710
jmp 0x99d43
movl $0x10, %edi
callq 0x1c460
movq %rax, %r14
leaq 0x34287(%rip), %rsi # 0xce193
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x2aa27
movb $0x1, %bpl
leaq 0x28(%rsp), %rsi
movq %r14, %rdi
callq 0x1c2c0
xorl %ebp, %ebp
movq 0x66084(%rip), %rsi # 0xfffb8
movq 0x6603d(%rip), %rdx # 0xfff78
movq %r14, %rdi
callq 0x1c7b0
movq %rax, %rbx
leaq 0x67ef3(%rip), %rdi # 0x101e40
callq 0x1c4f0
jmp 0x99fe2
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x99f75
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1c110
testb %bpl, %bpl
jne 0x99f7f
jmp 0x99fae
movq %rax, %rbx
movq %r14, %rdi
callq 0x1caa0
jmp 0x99fae
jmp 0x99fab
jmp 0x99fab
movq %rax, %rbx
leaq 0x28(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x732fc
movq %r14, %rdi
callq 0x300e0
jmp 0x99fae
jmp 0x99fab
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x99fe2
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1c110
jmp 0x99fe2
movq %rax, %rbx
movq 0x8(%rsp), %rsi
testq %rsi, %rsi
je 0x99fe2
leaq 0x8(%rsp), %rdi
callq 0x9b7f4
movq %rbx, %rdi
callq 0x1c7d0
|
_ZN5minja6Parser13parseConstantEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r15, rsi
mov rbx, rdi
lea r14, [rsi+20h]
mov r12, [rsi+18h]
mov r13, [rsi+20h]
mov rbp, r13
cmp r13, r12
jz short loc_99CD1
mov rbp, r13
loc_99CB9:
movsx edi, byte ptr [rbp+0]
call _isspace
test eax, eax
jz short loc_99CD1
inc rbp
mov [r14], rbp
cmp rbp, r12
jnz short loc_99CB9
loc_99CD1:
cmp rbp, r12
jz short loc_99D27
movzx eax, byte ptr [rbp+0]
cmp eax, 27h ; '''
jz short loc_99CE4
cmp eax, 22h ; '"'
jnz short loc_99D32
loc_99CE4:
lea r12, [rsp+78h+var_70]
mov rdi, r12; int
mov rsi, r15; void *
call _ZN5minja6Parser11parseStringB5cxx11Ev; minja::Parser::parseString(void)
mov rdx, [r12]
test rdx, rdx
jz short loc_99D32
lea rsi, [rsp+78h+var_50]
mov rdi, rbx
call _ZNSt12__shared_ptrIN5minja5ValueELN9__gnu_cxx12_Lock_policyE2EEC2ISaIvEJRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEESt20_Sp_alloc_shared_tagIT_EDpOT0_; std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<void>,std::string &>(std::_Sp_alloc_shared_tag<std::allocator<void>>,std::string &)
mov rsi, qword ptr [rsp+78h+var_70]
test rsi, rsi
jz loc_99E8F
lea rdi, [rsp+78h+var_70]
call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*)
jmp loc_99E8F
loc_99D27:
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
jmp loc_99E8F
loc_99D32:
lea rax, _ZGVZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; `guard variable for'minja::Parser::parseConstant(void)::prim_tok
mov al, [rax]
test al, al
jz loc_99EA1
loc_99D43:
lea rdx, _ZZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; int
lea r12, [rsp+78h+var_70]
mov rdi, r12; int
mov rsi, r15; int
mov ecx, 1; int
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
cmp qword ptr [r12+8], 0
jz loc_99E0E
lea rsi, aTrue; "true"
lea rdi, [rsp+78h+var_70]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_99DF7
lea rsi, aTrue_0; "True"
lea rdi, [rsp+78h+var_70]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_99DF7
lea rsi, aFalse; "false"
lea rdi, [rsp+78h+var_70]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz loc_99E3D
lea rsi, aFalse_1; "False"
lea rdi, [rsp+78h+var_70]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_99E3D
lea rsi, aNone_0; "None"
lea rdi, [rsp+78h+var_70]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jnz loc_99EF8
lea rdx, [rsp+78h+var_50]
mov qword ptr [rdx], 0
lea rsi, [rsp+78h+var_71]
mov rdi, rbx
call _ZNSt12__shared_ptrIN5minja5ValueELN9__gnu_cxx12_Lock_policyE2EEC2ISaIvEJDnEEESt20_Sp_alloc_shared_tagIT_EDpOT0_; std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<void>,decltype(nullptr)>(std::_Sp_alloc_shared_tag<std::allocator<void>>,decltype(nullptr) &&)
jmp short loc_99E74
loc_99DF7:
lea rdx, [rsp+78h+var_71]
mov byte ptr [rdx], 1
lea rsi, [rsp+78h+var_50]
mov rdi, rbx
call _ZNSt12__shared_ptrIN5minja5ValueELN9__gnu_cxx12_Lock_policyE2EEC2ISaIvEJbEEESt20_Sp_alloc_shared_tagIT_EDpOT0_; std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<void>,bool>(std::_Sp_alloc_shared_tag<std::allocator<void>>,bool &&)
jmp short loc_99E74
loc_99E0E:
lea rcx, [r15+18h]
lea rdi, [rsp+78h+var_50]
mov rsi, r15
mov rdx, r14
call _ZN5minja6Parser11parseNumberERN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERKSB_; minja::Parser::parseNumber(__gnu_cxx::__normal_iterator<char const*,std::string> &,__gnu_cxx::__normal_iterator<char const*,std::string> const&)
cmp [rsp+78h+var_50], 0
jz short loc_99E54
lea rsi, [rsp+78h+var_71]
lea rdx, [rsp+78h+var_50]
mov rdi, rbx
call _ZNSt12__shared_ptrIN5minja5ValueELN9__gnu_cxx12_Lock_policyE2EEC2ISaIvEJRN8nlohmann16json_abi_v3_11_310basic_jsonINS8_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS8_14adl_serializerESB_IhSaIhEEvEEEEESt20_Sp_alloc_shared_tagIT_EDpOT0_; std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<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> &>(std::_Sp_alloc_shared_tag<std::allocator<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> &)
jmp short loc_99E5D
loc_99E3D:
lea rdx, [rsp+78h+var_71]
mov byte ptr [rdx], 0
lea rsi, [rsp+78h+var_50]
mov rdi, rbx
call _ZNSt12__shared_ptrIN5minja5ValueELN9__gnu_cxx12_Lock_policyE2EEC2ISaIvEJbEEESt20_Sp_alloc_shared_tagIT_EDpOT0_; std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<void>,bool>(std::_Sp_alloc_shared_tag<std::allocator<void>>,bool &&)
jmp short loc_99E74
loc_99E54:
mov [r14], r13
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
loc_99E5D:
lea r14, [rsp+78h+var_50]
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()
loc_99E74:
lea rax, [rsp+78h+var_60]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_99E8F
mov rsi, [rsp+78h+var_60]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_99E8F:
mov rax, rbx
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_99EA1:
lea rdi, _ZGVZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_99D43
lea rdi, _ZZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; minja::Parser::parseConstant(void)::prim_tok
lea rsi, aTrueBTrueBFals; "true\\b|True\\b|false\\b|False\\b|None"...
mov edx, 10h
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type)
lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc
lea rsi, _ZZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_99D43
loc_99EF8:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aUnknownConstan; "Unknown constant token: "
lea rdi, [rsp+78h+var_50]
lea rdx, [rsp+78h+var_70]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&)
mov bpl, 1
lea rsi, [rsp+78h+var_50]
mov rdi, r14
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
mov rbx, rax
lea rdi, _ZGVZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; __guard *
call ___cxa_guard_abort
jmp loc_99FE2
mov rbx, rax
lea rax, [rsp+78h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_99F75
mov rsi, [rsp+78h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_99F75:
test bpl, bpl
jnz short loc_99F7F
jmp short loc_99FAE
mov rbx, rax
loc_99F7F:
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_99FAE
jmp short loc_99FAB
jmp short loc_99FAB
mov rbx, rax
lea r14, [rsp+78h+var_50]
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()
jmp short loc_99FAE
jmp short $+2
loc_99FAB:
mov rbx, rax
loc_99FAE:
lea rax, [rsp+78h+var_60]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_99FE2
mov rsi, [rsp+78h+var_60]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_99FE2
mov rbx, rax
mov rsi, qword ptr [rsp+78h+var_70]
test rsi, rsi
jz short loc_99FE2
lea rdi, [rsp+78h+var_70]
call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*)
loc_99FE2:
mov rdi, rbx
call __Unwind_Resume
|
minja::Parser * minja::Parser::parseConstant(minja::Parser *this, unsigned __int8 **a2)
{
unsigned __int8 **v2; // r14
char *v3; // r12
unsigned __int8 *v4; // r13
unsigned __int8 *v5; // rbp
int v6; // eax
void *exception; // r14
char v9; // [rsp+7h] [rbp-71h] BYREF
int v10[2]; // [rsp+8h] [rbp-70h] BYREF
long long v11; // [rsp+10h] [rbp-68h]
long long v12; // [rsp+18h] [rbp-60h] BYREF
_QWORD v13[2]; // [rsp+28h] [rbp-50h] BYREF
v2 = a2 + 4;
v3 = (char *)a2[3];
v4 = a2[4];
v5 = v4;
if ( v4 != (unsigned __int8 *)v3 )
{
v5 = a2[4];
do
{
if ( !(unsigned int)isspace((unsigned int)(char)*v5) )
break;
*v2 = ++v5;
}
while ( v5 != (unsigned __int8 *)v3 );
}
if ( v5 == (unsigned __int8 *)v3 )
{
*(_OWORD *)this = 0LL;
}
else
{
v6 = *v5;
if ( (v6 == 39 || v6 == 34) && (minja::Parser::parseString[abi:cxx11]((int)v10, a2), *(_QWORD *)v10) )
{
std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<void>,std::string &>(
this,
v13);
if ( *(_QWORD *)v10 )
std::default_delete<std::string>::operator()(v10);
}
else
{
if ( !(_BYTE)`guard variable for'minja::Parser::parseConstant(void)::prim_tok[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseConstant(void)::prim_tok[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseConstant(void)::prim_tok[abi:cxx11],
(long long)"true\\b|True\\b|false\\b|False\\b|None\\b",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseConstant(void)::prim_tok[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseConstant(void)::prim_tok[abi:cxx11]);
}
minja::Parser::consumeToken(
v10,
(long long)a2,
(long long)&minja::Parser::parseConstant(void)::prim_tok[abi:cxx11],
1u);
if ( v11 )
{
if ( !(unsigned int)std::string::compare(v10, "true") || !(unsigned int)std::string::compare(v10, "True") )
{
v9 = 1;
std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<void>,bool>(
this,
v13,
&v9);
}
else if ( !(unsigned int)std::string::compare(v10, "false") || !(unsigned int)std::string::compare(v10, "False") )
{
v9 = 0;
std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<void>,bool>(
this,
v13,
&v9);
}
else
{
if ( (unsigned int)std::string::compare(v10, "None") )
{
exception = __cxa_allocate_exception(0x10uLL);
std::operator+<char>((long long)v13, (long long)"Unknown constant token: ", v10);
std::runtime_error::runtime_error(exception, v13);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v13[0] = 0LL;
std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<void>,decltype(nullptr)>(
this,
&v9,
v13);
}
}
else
{
minja::Parser::parseNumber(v13, a2, v2, a2 + 3);
if ( LOBYTE(v13[0]) )
{
std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<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> &>(
this,
&v9,
v13);
}
else
{
*v2 = v4;
*(_OWORD *)this = 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 *)v13);
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(v13);
}
if ( *(long long **)v10 != &v12 )
operator delete(*(void **)v10, v12 + 1);
}
}
return this;
}
|
parseConstant:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R15,RSI
MOV RBX,RDI
LEA R14,[RSI + 0x20]
MOV R12,qword ptr [RSI + 0x18]
MOV R13,qword ptr [RSI + 0x20]
MOV RBP,R13
CMP R13,R12
JZ 0x00199cd1
MOV RBP,R13
LAB_00199cb9:
MOVSX EDI,byte ptr [RBP]
CALL 0x0011c930
TEST EAX,EAX
JZ 0x00199cd1
INC RBP
MOV qword ptr [R14],RBP
CMP RBP,R12
JNZ 0x00199cb9
LAB_00199cd1:
CMP RBP,R12
JZ 0x00199d27
MOVZX EAX,byte ptr [RBP]
CMP EAX,0x27
JZ 0x00199ce4
CMP EAX,0x22
JNZ 0x00199d32
LAB_00199ce4:
LEA R12,[RSP + 0x8]
MOV RDI,R12
MOV RSI,R15
CALL 0x0019b05c
MOV RDX,qword ptr [R12]
TEST RDX,RDX
JZ 0x00199d32
LAB_00199cfd:
LEA RSI,[RSP + 0x28]
MOV RDI,RBX
CALL 0x0019b64e
LAB_00199d0a:
MOV RSI,qword ptr [RSP + 0x8]
TEST RSI,RSI
JZ 0x00199e8f
LEA RDI,[RSP + 0x8]
CALL 0x0019b7f4
JMP 0x00199e8f
LAB_00199d27:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
JMP 0x00199e8f
LAB_00199d32:
LEA RAX,[0x201e40]
MOV AL,byte ptr [RAX]
TEST AL,AL
JZ 0x00199ea1
LAB_00199d43:
LEA RDX,[0x201e20]
LEA R12,[RSP + 0x8]
MOV RDI,R12
MOV RSI,R15
MOV ECX,0x1
CALL 0x00194888
CMP qword ptr [R12 + 0x8],0x0
JZ 0x00199e0e
LEA RSI,[0x1c70bc]
LEA RDI,[RSP + 0x8]
CALL 0x0011cad0
TEST EAX,EAX
JZ 0x00199df7
LEA RSI,[0x1cbef3]
LEA RDI,[RSP + 0x8]
CALL 0x0011cad0
TEST EAX,EAX
JZ 0x00199df7
LEA RSI,[0x1c70c1]
LEA RDI,[RSP + 0x8]
CALL 0x0011cad0
TEST EAX,EAX
JZ 0x00199e3d
LEA RSI,[0x1cbef8]
LEA RDI,[RSP + 0x8]
CALL 0x0011cad0
TEST EAX,EAX
JZ 0x00199e3d
LEA RSI,[0x1cc53c]
LEA RDI,[RSP + 0x8]
CALL 0x0011cad0
TEST EAX,EAX
JNZ 0x00199ef8
LEA RDX,[RSP + 0x28]
MOV qword ptr [RDX],0x0
LAB_00199de8:
LEA RSI,[RSP + 0x7]
MOV RDI,RBX
CALL 0x0019b914
JMP 0x00199e74
LAB_00199df7:
LEA RDX,[RSP + 0x7]
MOV byte ptr [RDX],0x1
LAB_00199dff:
LEA RSI,[RSP + 0x28]
MOV RDI,RBX
CALL 0x0019b822
JMP 0x00199e74
LAB_00199e0e:
LEA RCX,[R15 + 0x18]
LEA RDI,[RSP + 0x28]
MOV RSI,R15
MOV RDX,R14
CALL 0x0019b0dc
CMP byte ptr [RSP + 0x28],0x0
JZ 0x00199e54
LAB_00199e29:
LEA RSI,[RSP + 0x7]
LEA RDX,[RSP + 0x28]
MOV RDI,RBX
CALL 0x0019b9fc
JMP 0x00199e5d
LAB_00199e3d:
LEA RDX,[RSP + 0x7]
MOV byte ptr [RDX],0x0
LAB_00199e45:
LEA RSI,[RSP + 0x28]
MOV RDI,RBX
CALL 0x0019b822
JMP 0x00199e74
LAB_00199e54:
MOV qword ptr [R14],R13
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
LAB_00199e5d:
LEA R14,[RSP + 0x28]
MOV RDI,R14
XOR ESI,ESI
CALL 0x001732fc
MOV RDI,R14
CALL 0x001300e0
LAB_00199e74:
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00199e8f
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011c110
LAB_00199e8f:
MOV RAX,RBX
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00199ea1:
LEA RDI,[0x201e40]
CALL 0x0011c3e0
TEST EAX,EAX
JZ 0x00199d43
LAB_00199eb5:
LEA RDI,[0x201e20]
LEA RSI,[0x1ce16e]
MOV EDX,0x10
CALL 0x00168a34
LAB_00199ecd:
LEA RDI,[0x168a9a]
LEA RSI,[0x201e20]
LEA RDX,[0x200718]
CALL 0x0011ca80
LEA RDI,[0x201e40]
CALL 0x0011c710
JMP 0x00199d43
LAB_00199ef8:
MOV EDI,0x10
CALL 0x0011c460
MOV R14,RAX
LAB_00199f05:
LEA RSI,[0x1ce193]
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x8]
CALL 0x0012aa27
MOV BPL,0x1
LAB_00199f1e:
LEA RSI,[RSP + 0x28]
MOV RDI,R14
CALL 0x0011c2c0
XOR EBP,EBP
MOV RSI,qword ptr [0x001fffb8]
MOV RDX,qword ptr [0x001fff78]
MOV RDI,R14
CALL 0x0011c7b0
|
/* minja::Parser::parseConstant() */
void minja::Parser::parseConstant(void)
{
char *pcVar1;
char *pcVar2;
int iVar3;
runtime_error *this;
char *pcVar4;
__normal_iterator *in_RSI;
int8 *in_RDI;
string *local_70;
long local_68;
long local_60 [2];
int8 local_50 [4];
pcVar1 = *(char **)(in_RSI + 0x18);
pcVar2 = *(char **)(in_RSI + 0x20);
pcVar4 = pcVar2;
while ((pcVar4 != pcVar1 && (iVar3 = isspace((int)*pcVar4), iVar3 != 0))) {
pcVar4 = pcVar4 + 1;
*(char **)(in_RSI + 0x20) = pcVar4;
}
if (pcVar4 == pcVar1) {
*in_RDI = 0;
in_RDI[1] = 0;
}
else if (((*pcVar4 == '\'') || (*pcVar4 == '\"')) &&
(parseString_abi_cxx11_(), local_70 != (string *)0x0)) {
/* try { // try from 00199cfd to 00199d09 has its CatchHandler @ 00199fcb */
std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::
__shared_ptr<std::allocator<void>,std::__cxx11::string&>();
if (local_70 != (string *)0x0) {
std::default_delete<std::__cxx11::string>::operator()
((default_delete<std::__cxx11::string> *)&local_70,local_70);
}
}
else {
if ((parseConstant()::prim_tok_abi_cxx11_ == '\0') &&
(iVar3 = __cxa_guard_acquire(&parseConstant()::prim_tok_abi_cxx11_), iVar3 != 0)) {
/* try { // try from 00199eb5 to 00199ecc has its CatchHandler @ 00199f43 */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
((basic_regex<char,std::__cxx11::regex_traits<char>> *)
parseConstant()::prim_tok_abi_cxx11_,"true\\b|True\\b|false\\b|False\\b|None\\b",
0x10);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
parseConstant()::prim_tok_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&parseConstant()::prim_tok_abi_cxx11_);
}
consumeToken(&local_70);
if (local_68 == 0) {
/* try { // try from 00199e0e to 00199e21 has its CatchHandler @ 00199fa9 */
parseNumber((__normal_iterator *)local_50,in_RSI);
if (local_50[0]._0_1_ == (data)0x0) {
*(char **)(in_RSI + 0x20) = pcVar2;
*in_RDI = 0;
in_RDI[1] = 0;
}
else {
/* try { // try from 00199e29 to 00199e3a has its CatchHandler @ 00199f8d */
std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::
__shared_ptr<std::allocator<void>,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&>
();
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81((data *)local_50,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)local_50);
}
else {
iVar3 = std::__cxx11::string::compare((char *)&local_70);
if ((iVar3 == 0) || (iVar3 = std::__cxx11::string::compare((char *)&local_70), iVar3 == 0)) {
/* try { // try from 00199dff to 00199e0b has its CatchHandler @ 00199fab */
std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::
__shared_ptr<std::allocator<void>,bool>();
}
else {
iVar3 = std::__cxx11::string::compare((char *)&local_70);
if ((iVar3 == 0) || (iVar3 = std::__cxx11::string::compare((char *)&local_70), iVar3 == 0))
{
/* try { // try from 00199e45 to 00199e51 has its CatchHandler @ 00199f8b */
std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::
__shared_ptr<std::allocator<void>,bool>();
}
else {
iVar3 = std::__cxx11::string::compare((char *)&local_70);
if (iVar3 != 0) {
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00199f05 to 00199f1a has its CatchHandler @ 00199f7c */
std::operator+((char *)local_50,(string *)"Unknown constant token: ");
/* try { // try from 00199f1e to 00199f42 has its CatchHandler @ 00199f57 */
std::runtime_error::runtime_error(this,(string *)local_50);
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_001fffb8,PTR__runtime_error_001fff78);
}
local_50[0] = 0;
/* try { // try from 00199de8 to 00199df4 has its CatchHandler @ 00199f89 */
std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::
__shared_ptr<std::allocator<void>,decltype(nullptr)>();
}
}
}
if (local_70 != (string *)local_60) {
operator_delete(local_70,local_60[0] + 1);
}
}
return;
}
|
|
20,119
|
blst_fr_from_scalar
|
corpus-core[P]colibri-stateless/build_O3/_deps/blst-src/src/exports.c
|
void blst_fr_from_scalar(vec256 ret, const pow256 a)
{
const union {
long one;
char little;
} is_endian = { 1 };
if ((uptr_t)ret == (uptr_t)a && is_endian.little) {
mul_mont_sparse_256(ret, (const limb_t *)a, BLS12_381_rRR,
BLS12_381_r, r0);
} else {
vec256 out;
limbs_from_le_bytes(out, a, 32);
mul_mont_sparse_256(ret, out, BLS12_381_rRR, BLS12_381_r, r0);
vec_zero(out, sizeof(out));
}
}
|
O3
|
c
|
blst_fr_from_scalar:
movabsq $-0x100000001, %r8 # imm = 0xFFFFFFFEFFFFFFFF
cmpq %rsi, %rdi
je 0x63266
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x1f, %eax
xorl %ecx, %ecx
shlq $0x8, %rcx
movzbl (%rsi,%rax), %edx
orq %rdx, %rcx
movq %rax, %rdx
andq $-0x8, %rdx
movq %rcx, -0x20(%rbp,%rdx)
addq $-0x1, %rax
jb 0x63214
leaq 0x27988(%rip), %rdx # 0x8abc0
leaq 0x27471(%rip), %rcx # 0x8a6b0
leaq -0x20(%rbp), %rsi
callq 0x74000
xorl %eax, %eax
movq $0x0, -0x20(%rbp,%rax,8)
incq %rax
cmpq $0x4, %rax
jne 0x6324a
leaq -0x20(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
leaq 0x27953(%rip), %rdx # 0x8abc0
leaq 0x2743c(%rip), %rcx # 0x8a6b0
jmp 0x74000
|
blst_fr_from_scalar:
mov r8, 0FFFFFFFEFFFFFFFFh
cmp rdi, rsi
jz short loc_63266
push rbp
mov rbp, rsp
sub rsp, 20h
mov eax, 1Fh
xor ecx, ecx
loc_63214:
shl rcx, 8
movzx edx, byte ptr [rsi+rax]
or rcx, rdx
mov rdx, rax
and rdx, 0FFFFFFFFFFFFFFF8h
mov [rbp+rdx-20h], rcx
add rax, 0FFFFFFFFFFFFFFFFh
jb short loc_63214
lea rdx, BLS12_381_rRR
lea rcx, BLS12_381_r
lea rsi, [rbp-20h]
call mul_mont_sparse_256
xor eax, eax
loc_6324A:
mov qword ptr [rbp+rax*8-20h], 0
inc rax
cmp rax, 4
jnz short loc_6324A
lea rax, [rbp-20h]
add rsp, 20h
pop rbp
retn
loc_63266:
lea rdx, BLS12_381_rRR
lea rcx, BLS12_381_r
jmp mul_mont_sparse_256
|
_BYTE * blst_fr_from_scalar(long long a1, long long a2)
{
long long v2; // rax
unsigned long long v3; // rcx
long long i; // rax
_BYTE v7[40]; // [rsp-28h] [rbp-28h] BYREF
if ( a1 == a2 )
return (_BYTE *)mul_mont_sparse_256(a1, a2, &BLS12_381_rRR, &BLS12_381_r, 0xFFFFFFFEFFFFFFFFLL);
v2 = 31LL;
v3 = 0LL;
do
{
v3 = *(unsigned __int8 *)(a2 + v2) | (v3 << 8);
*(_QWORD *)&v7[v2 & 0xFFFFFFFFFFFFFFF8LL] = v3;
}
while ( v2-- != 0 );
mul_mont_sparse_256(a1, v7, &BLS12_381_rRR, &BLS12_381_r, 0xFFFFFFFEFFFFFFFFLL);
for ( i = 0LL; i != 4; ++i )
*(_QWORD *)&v7[8 * i] = 0LL;
return v7;
}
|
blst_fr_from_scalar:
MOV R8,-0x100000001
CMP RDI,RSI
JZ 0x00163266
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV EAX,0x1f
XOR ECX,ECX
LAB_00163214:
SHL RCX,0x8
MOVZX EDX,byte ptr [RSI + RAX*0x1]
OR RCX,RDX
MOV RDX,RAX
AND RDX,-0x8
MOV qword ptr [RBP + RDX*0x1 + -0x20],RCX
ADD RAX,-0x1
JC 0x00163214
LEA RDX,[0x18abc0]
LEA RCX,[0x18a6b0]
LEA RSI,[RBP + -0x20]
CALL 0x00174000
XOR EAX,EAX
LAB_0016324a:
MOV qword ptr [RBP + RAX*0x8 + -0x20],0x0
INC RAX
CMP RAX,0x4
JNZ 0x0016324a
LEA RAX,[RBP + -0x20]
ADD RSP,0x20
POP RBP
RET
LAB_00163266:
LEA RDX,[0x18abc0]
LEA RCX,[0x18a6b0]
JMP 0x00174000
|
ulong * blst_fr_from_scalar(long param_1,long param_2)
{
ulong uVar1;
long lVar2;
ulong *puVar3;
ulong uVar4;
bool bVar5;
ulong local_28 [4];
if (param_1 != param_2) {
uVar1 = 0x1f;
uVar4 = 0;
do {
uVar4 = uVar4 << 8 | (ulong)*(byte *)(param_2 + uVar1);
*(ulong *)((long)local_28 + (uVar1 & 0xfffffffffffffff8)) = uVar4;
bVar5 = uVar1 != 0;
uVar1 = uVar1 - 1;
} while (bVar5);
mul_mont_sparse_256(param_1,local_28,BLS12_381_rRR,BLS12_381_r,0xfffffffeffffffff);
lVar2 = 0;
do {
local_28[lVar2] = 0;
lVar2 = lVar2 + 1;
} while (lVar2 != 4);
return local_28;
}
puVar3 = (ulong *)mul_mont_sparse_256(param_1,param_2,BLS12_381_rRR,BLS12_381_r,0xfffffffeffffffff
);
return puVar3;
}
|
|
20,120
|
ma_bitmap_delete_all
|
eloqsql/storage/maria/ma_bitmap.c
|
void _ma_bitmap_delete_all(MARIA_SHARE *share)
{
MARIA_FILE_BITMAP *bitmap= &share->bitmap;
DBUG_ENTER("_ma_bitmap_delete_all");
if (bitmap->map) /* Not in create */
{
bzero(bitmap->map, bitmap->block_size);
bitmap->changed= 1;
bitmap->page= 0;
bitmap->used_size= bitmap->full_tail_size= bitmap->full_head_size= 0;
bitmap->total_size= bitmap->max_total_size;
}
DBUG_VOID_RETURN;
}
|
O3
|
c
|
ma_bitmap_delete_all:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0xa18(%rdi), %rdi
testq %rdi, %rdi
je 0x55c8d
movl 0xb44(%rbx), %edx
xorl %r14d, %r14d
xorl %esi, %esi
callq 0x2a2c0
movb $0x1, 0xa30(%rbx)
movq %r14, 0xa20(%rbx)
movl $0x0, 0xa3c(%rbx)
movq %r14, 0xa34(%rbx)
movl 0xb3c(%rbx), %eax
movl %eax, 0xb38(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
|
_ma_bitmap_delete_all:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rdi
mov rdi, [rdi+0A18h]
test rdi, rdi
jz short loc_55C8D
mov edx, [rbx+0B44h]
xor r14d, r14d
xor esi, esi
call _memset
mov byte ptr [rbx+0A30h], 1
mov [rbx+0A20h], r14
mov dword ptr [rbx+0A3Ch], 0
mov [rbx+0A34h], r14
mov eax, [rbx+0B3Ch]
mov [rbx+0B38h], eax
loc_55C8D:
pop rbx
pop r14
pop rbp
retn
|
long long ma_bitmap_delete_all(long long a1)
{
long long v2; // rdi
long long result; // rax
v2 = *(_QWORD *)(a1 + 2584);
if ( v2 )
{
memset(v2, 0LL, *(unsigned int *)(a1 + 2884));
*(_BYTE *)(a1 + 2608) = 1;
*(_QWORD *)(a1 + 2592) = 0LL;
*(_DWORD *)(a1 + 2620) = 0;
*(_QWORD *)(a1 + 2612) = 0LL;
result = *(unsigned int *)(a1 + 2876);
*(_DWORD *)(a1 + 2872) = result;
}
return result;
}
|
_ma_bitmap_delete_all:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0xa18]
TEST RDI,RDI
JZ 0x00155c8d
MOV EDX,dword ptr [RBX + 0xb44]
XOR R14D,R14D
XOR ESI,ESI
CALL 0x0012a2c0
MOV byte ptr [RBX + 0xa30],0x1
MOV qword ptr [RBX + 0xa20],R14
MOV dword ptr [RBX + 0xa3c],0x0
MOV qword ptr [RBX + 0xa34],R14
MOV EAX,dword ptr [RBX + 0xb3c]
MOV dword ptr [RBX + 0xb38],EAX
LAB_00155c8d:
POP RBX
POP R14
POP RBP
RET
|
void _ma_bitmap_delete_all(long param_1)
{
if (*(void **)(param_1 + 0xa18) != (void *)0x0) {
memset(*(void **)(param_1 + 0xa18),0,(ulong)*(uint *)(param_1 + 0xb44));
*(int1 *)(param_1 + 0xa30) = 1;
*(int8 *)(param_1 + 0xa20) = 0;
*(int4 *)(param_1 + 0xa3c) = 0;
*(int8 *)(param_1 + 0xa34) = 0;
*(int4 *)(param_1 + 0xb38) = *(int4 *)(param_1 + 0xb3c);
}
return;
}
|
|
20,121
|
OpenGL_Init_4_3
|
SDL3Lite/dependencies/OpenGL.h
|
void OpenGL_Init_4_3()
{
glClearBufferData = (PFNGLCLEARBUFFERDATAPROC)OpenGL_Load("glClearBufferData");
glClearBufferSubData = (PFNGLCLEARBUFFERSUBDATAPROC)OpenGL_Load("glClearBufferSubData");
glDispatchCompute = (PFNGLDISPATCHCOMPUTEPROC)OpenGL_Load("glDispatchCompute");
glDispatchComputeIndirect = (PFNGLDISPATCHCOMPUTEINDIRECTPROC)OpenGL_Load("glDispatchComputeIndirect");
glCopyImageSubData = (PFNGLCOPYIMAGESUBDATAPROC)OpenGL_Load("glCopyImageSubData");
glFramebufferParameteri = (PFNGLFRAMEBUFFERPARAMETERIPROC)OpenGL_Load("glFramebufferParameteri");
glGetFramebufferParameteriv = (PFNGLGETFRAMEBUFFERPARAMETERIVPROC)OpenGL_Load("glGetFramebufferParameteriv");
glGetInternalformati64v = (PFNGLGETINTERNALFORMATI64VPROC)OpenGL_Load("glGetInternalformati64v");
glInvalidateTexSubImage = (PFNGLINVALIDATETEXSUBIMAGEPROC)OpenGL_Load("glInvalidateTexSubImage");
glInvalidateTexImage = (PFNGLINVALIDATETEXIMAGEPROC)OpenGL_Load("glInvalidateTexImage");
glInvalidateBufferSubData = (PFNGLINVALIDATEBUFFERSUBDATAPROC)OpenGL_Load("glInvalidateBufferSubData");
glInvalidateBufferData = (PFNGLINVALIDATEBUFFERDATAPROC)OpenGL_Load("glInvalidateBufferData");
glInvalidateFramebuffer = (PFNGLINVALIDATEFRAMEBUFFERPROC)OpenGL_Load("glInvalidateFramebuffer");
glInvalidateSubFramebuffer = (PFNGLINVALIDATESUBFRAMEBUFFERPROC)OpenGL_Load("glInvalidateSubFramebuffer");
glMultiDrawArraysIndirect = (PFNGLMULTIDRAWARRAYSINDIRECTPROC)OpenGL_Load("glMultiDrawArraysIndirect");
glMultiDrawElementsIndirect = (PFNGLMULTIDRAWELEMENTSINDIRECTPROC)OpenGL_Load("glMultiDrawElementsIndirect");
glGetProgramInterfaceiv = (PFNGLGETPROGRAMINTERFACEIVPROC)OpenGL_Load("glGetProgramInterfaceiv");
glGetProgramResourceIndex = (PFNGLGETPROGRAMRESOURCEINDEXPROC)OpenGL_Load("glGetProgramResourceIndex");
glGetProgramResourceName = (PFNGLGETPROGRAMRESOURCENAMEPROC)OpenGL_Load("glGetProgramResourceName");
glGetProgramResourceiv = (PFNGLGETPROGRAMRESOURCEIVPROC)OpenGL_Load("glGetProgramResourceiv");
glGetProgramResourceLocation = (PFNGLGETPROGRAMRESOURCELOCATIONPROC)OpenGL_Load("glGetProgramResourceLocation");
glGetProgramResourceLocationIndex = (PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC)OpenGL_Load("glGetProgramResourceLocationIndex");
glShaderStorageBlockBinding = (PFNGLSHADERSTORAGEBLOCKBINDINGPROC)OpenGL_Load("glShaderStorageBlockBinding");
glTexBufferRange = (PFNGLTEXBUFFERRANGEPROC)OpenGL_Load("glTexBufferRange");
glTexStorage2DMultisample = (PFNGLTEXSTORAGE2DMULTISAMPLEPROC)OpenGL_Load("glTexStorage2DMultisample");
glTexStorage3DMultisample = (PFNGLTEXSTORAGE3DMULTISAMPLEPROC)OpenGL_Load("glTexStorage3DMultisample");
glTextureView = (PFNGLTEXTUREVIEWPROC)OpenGL_Load("glTextureView");
glBindVertexBuffer = (PFNGLBINDVERTEXBUFFERPROC)OpenGL_Load("glBindVertexBuffer");
glVertexAttribFormat = (PFNGLVERTEXATTRIBFORMATPROC)OpenGL_Load("glVertexAttribFormat");
glVertexAttribIFormat = (PFNGLVERTEXATTRIBIFORMATPROC)OpenGL_Load("glVertexAttribIFormat");
glVertexAttribLFormat = (PFNGLVERTEXATTRIBLFORMATPROC)OpenGL_Load("glVertexAttribLFormat");
glVertexAttribBinding = (PFNGLVERTEXATTRIBBINDINGPROC)OpenGL_Load("glVertexAttribBinding");
glVertexBindingDivisor = (PFNGLVERTEXBINDINGDIVISORPROC)OpenGL_Load("glVertexBindingDivisor");
glDebugMessageControl = (PFNGLDEBUGMESSAGECONTROLPROC)OpenGL_Load("glDebugMessageControl");
glDebugMessageInsert = (PFNGLDEBUGMESSAGEINSERTPROC)OpenGL_Load("glDebugMessageInsert");
glDebugMessageCallback = (PFNGLDEBUGMESSAGECALLBACKPROC)OpenGL_Load("glDebugMessageCallback");
glGetDebugMessageLog = (PFNGLGETDEBUGMESSAGELOGPROC)OpenGL_Load("glGetDebugMessageLog");
glPushDebugGroup = (PFNGLPUSHDEBUGGROUPPROC)OpenGL_Load("glPushDebugGroup");
glPopDebugGroup = (PFNGLPOPDEBUGGROUPPROC)OpenGL_Load("glPopDebugGroup");
glObjectLabel = (PFNGLOBJECTLABELPROC)OpenGL_Load("glObjectLabel");
glGetObjectLabel = (PFNGLGETOBJECTLABELPROC)OpenGL_Load("glGetObjectLabel");
glObjectPtrLabel = (PFNGLOBJECTPTRLABELPROC)OpenGL_Load("glObjectPtrLabel");
glGetObjectPtrLabel = (PFNGLGETOBJECTPTRLABELPROC)OpenGL_Load("glGetObjectPtrLabel");
}
|
O3
|
c
|
OpenGL_Init_4_3:
pushq %rax
leaq 0x547d(%rip), %rdi # 0x18995
callq 0xf3a0
movq %rax, 0xa6b4(%rip) # 0x1dbd8
leaq 0x547c(%rip), %rdi # 0x189a7
callq 0xf3a0
movq %rax, 0xa6a9(%rip) # 0x1dbe0
leaq 0x547e(%rip), %rdi # 0x189bc
callq 0xf3a0
movq %rax, 0xa69e(%rip) # 0x1dbe8
leaq 0x547d(%rip), %rdi # 0x189ce
callq 0xf3a0
movq %rax, 0xa693(%rip) # 0x1dbf0
leaq 0x5484(%rip), %rdi # 0x189e8
callq 0xf3a0
movq %rax, 0xa688(%rip) # 0x1dbf8
leaq 0x5484(%rip), %rdi # 0x189fb
callq 0xf3a0
movq %rax, 0xa67d(%rip) # 0x1dc00
leaq 0x5489(%rip), %rdi # 0x18a13
callq 0xf3a0
movq %rax, 0xa672(%rip) # 0x1dc08
leaq 0x5492(%rip), %rdi # 0x18a2f
callq 0xf3a0
movq %rax, 0xa667(%rip) # 0x1dc10
leaq 0x5497(%rip), %rdi # 0x18a47
callq 0xf3a0
movq %rax, 0xa65c(%rip) # 0x1dc18
leaq 0x549c(%rip), %rdi # 0x18a5f
callq 0xf3a0
movq %rax, 0xa651(%rip) # 0x1dc20
leaq 0x549e(%rip), %rdi # 0x18a74
callq 0xf3a0
movq %rax, 0xa646(%rip) # 0x1dc28
leaq 0x54a5(%rip), %rdi # 0x18a8e
callq 0xf3a0
movq %rax, 0xa63b(%rip) # 0x1dc30
leaq 0x54a9(%rip), %rdi # 0x18aa5
callq 0xf3a0
movq %rax, 0xa630(%rip) # 0x1dc38
leaq 0x54ae(%rip), %rdi # 0x18abd
callq 0xf3a0
movq %rax, 0xa625(%rip) # 0x1dc40
leaq 0x54b6(%rip), %rdi # 0x18ad8
callq 0xf3a0
movq %rax, 0xa61a(%rip) # 0x1dc48
leaq 0x54bd(%rip), %rdi # 0x18af2
callq 0xf3a0
movq %rax, 0xa60f(%rip) # 0x1dc50
leaq 0x54c6(%rip), %rdi # 0x18b0e
callq 0xf3a0
movq %rax, 0xa604(%rip) # 0x1dc58
leaq 0x54cb(%rip), %rdi # 0x18b26
callq 0xf3a0
movq %rax, 0xa5f9(%rip) # 0x1dc60
leaq 0x54d2(%rip), %rdi # 0x18b40
callq 0xf3a0
movq %rax, 0xa5ee(%rip) # 0x1dc68
leaq 0x54d8(%rip), %rdi # 0x18b59
callq 0xf3a0
movq %rax, 0xa5e3(%rip) # 0x1dc70
leaq 0x54dc(%rip), %rdi # 0x18b70
callq 0xf3a0
movq %rax, 0xa5d8(%rip) # 0x1dc78
leaq 0x54e6(%rip), %rdi # 0x18b8d
callq 0xf3a0
movq %rax, 0xa5cd(%rip) # 0x1dc80
leaq 0x54f5(%rip), %rdi # 0x18baf
callq 0xf3a0
movq %rax, 0xa5c2(%rip) # 0x1dc88
leaq 0x54fe(%rip), %rdi # 0x18bcb
callq 0xf3a0
movq %rax, 0xa5b7(%rip) # 0x1dc90
leaq 0x54fc(%rip), %rdi # 0x18bdc
callq 0xf3a0
movq %rax, 0xa5ac(%rip) # 0x1dc98
leaq 0x5503(%rip), %rdi # 0x18bf6
callq 0xf3a0
movq %rax, 0xa5a1(%rip) # 0x1dca0
leaq 0x550a(%rip), %rdi # 0x18c10
callq 0xf3a0
movq %rax, 0xa596(%rip) # 0x1dca8
leaq 0x5505(%rip), %rdi # 0x18c1e
callq 0xf3a0
movq %rax, 0xa58b(%rip) # 0x1dcb0
leaq 0x5505(%rip), %rdi # 0x18c31
callq 0xf3a0
movq %rax, 0xa580(%rip) # 0x1dcb8
leaq 0x5507(%rip), %rdi # 0x18c46
callq 0xf3a0
movq %rax, 0xa575(%rip) # 0x1dcc0
leaq 0x550a(%rip), %rdi # 0x18c5c
callq 0xf3a0
movq %rax, 0xa56a(%rip) # 0x1dcc8
leaq 0x550d(%rip), %rdi # 0x18c72
callq 0xf3a0
movq %rax, 0xa55f(%rip) # 0x1dcd0
leaq 0x5510(%rip), %rdi # 0x18c88
callq 0xf3a0
movq %rax, 0xa554(%rip) # 0x1dcd8
leaq 0x5514(%rip), %rdi # 0x18c9f
callq 0xf3a0
movq %rax, 0xa549(%rip) # 0x1dce0
leaq 0x5517(%rip), %rdi # 0x18cb5
callq 0xf3a0
movq %rax, 0xa53e(%rip) # 0x1dce8
leaq 0x5519(%rip), %rdi # 0x18cca
callq 0xf3a0
movq %rax, 0xa533(%rip) # 0x1dcf0
leaq 0x551d(%rip), %rdi # 0x18ce1
callq 0xf3a0
movq %rax, 0xa528(%rip) # 0x1dcf8
leaq 0x551f(%rip), %rdi # 0x18cf6
callq 0xf3a0
movq %rax, 0xa51d(%rip) # 0x1dd00
leaq 0x551d(%rip), %rdi # 0x18d07
callq 0xf3a0
movq %rax, 0xa512(%rip) # 0x1dd08
leaq 0x551a(%rip), %rdi # 0x18d17
callq 0xf3a0
movq %rax, 0xa507(%rip) # 0x1dd10
leaq 0x5515(%rip), %rdi # 0x18d25
callq 0xf3a0
movq %rax, 0xa4fc(%rip) # 0x1dd18
leaq 0x5513(%rip), %rdi # 0x18d36
callq 0xf3a0
movq %rax, 0xa4f1(%rip) # 0x1dd20
leaq 0x5511(%rip), %rdi # 0x18d47
callq 0xf3a0
movq %rax, 0xa4e6(%rip) # 0x1dd28
popq %rax
retq
nopw %cs:(%rax,%rax)
|
OpenGL_Init_4_3:
push rax
lea rdi, aGlclearbufferd_0; "glClearBufferData"
call OpenGL_Load
mov cs:glClearBufferData, rax
lea rdi, aGlclearbuffers_0; "glClearBufferSubData"
call OpenGL_Load
mov cs:glClearBufferSubData, rax
lea rdi, aGldispatchcomp_1; "glDispatchCompute"
call OpenGL_Load
mov cs:glDispatchCompute, rax
lea rdi, aGldispatchcomp_2; "glDispatchComputeIndirect"
call OpenGL_Load
mov cs:glDispatchComputeIndirect, rax
lea rdi, aGlcopyimagesub_0; "glCopyImageSubData"
call OpenGL_Load
mov cs:glCopyImageSubData, rax
lea rdi, aGlframebufferp_0; "glFramebufferParameteri"
call OpenGL_Load
mov cs:glFramebufferParameteri, rax
lea rdi, aGlgetframebuff_2; "glGetFramebufferParameteriv"
call OpenGL_Load
mov cs:glGetFramebufferParameteriv, rax
lea rdi, aGlgetinternalf_2; "glGetInternalformati64v"
call OpenGL_Load
mov cs:glGetInternalformati64v, rax
lea rdi, aGlinvalidatete_1; "glInvalidateTexSubImage"
call OpenGL_Load
mov cs:glInvalidateTexSubImage, rax
lea rdi, aGlinvalidatete_2; "glInvalidateTexImage"
call OpenGL_Load
mov cs:glInvalidateTexImage, rax
lea rdi, aGlinvalidatebu_1; "glInvalidateBufferSubData"
call OpenGL_Load
mov cs:glInvalidateBufferSubData, rax
lea rdi, aGlinvalidatebu_2; "glInvalidateBufferData"
call OpenGL_Load
mov cs:glInvalidateBufferData, rax
lea rdi, aGlinvalidatefr_0; "glInvalidateFramebuffer"
call OpenGL_Load
mov cs:glInvalidateFramebuffer, rax
lea rdi, aGlinvalidatesu_0; "glInvalidateSubFramebuffer"
call OpenGL_Load
mov cs:glInvalidateSubFramebuffer, rax
lea rdi, aGlmultidrawarr_3; "glMultiDrawArraysIndirect"
call OpenGL_Load
mov cs:glMultiDrawArraysIndirect, rax
lea rdi, aGlmultidrawele_5; "glMultiDrawElementsIndirect"
call OpenGL_Load
mov cs:glMultiDrawElementsIndirect, rax
lea rdi, aGlgetprogramin_2; "glGetProgramInterfaceiv"
call OpenGL_Load
mov cs:glGetProgramInterfaceiv, rax
lea rdi, aGlgetprogramre_4; "glGetProgramResourceIndex"
call OpenGL_Load
mov cs:glGetProgramResourceIndex, rax
lea rdi, aGlgetprogramre_5; "glGetProgramResourceName"
call OpenGL_Load
mov cs:glGetProgramResourceName, rax
lea rdi, aGlgetprogramre_6; "glGetProgramResourceiv"
call OpenGL_Load
mov cs:glGetProgramResourceiv, rax
lea rdi, aGlgetprogramre_7; "glGetProgramResourceLocation"
call OpenGL_Load
mov cs:glGetProgramResourceLocation, rax
lea rdi, aGlgetprogramre_8; "glGetProgramResourceLocationIndex"
call OpenGL_Load
mov cs:glGetProgramResourceLocationIndex, rax
lea rdi, aGlshaderstorag_0; "glShaderStorageBlockBinding"
call OpenGL_Load
mov cs:glShaderStorageBlockBinding, rax
lea rdi, aGltexbufferran_0; "glTexBufferRange"
call OpenGL_Load
mov cs:glTexBufferRange, rax
lea rdi, aGltexstorage2d_2; "glTexStorage2DMultisample"
call OpenGL_Load
mov cs:glTexStorage2DMultisample, rax
lea rdi, aGltexstorage3d_2; "glTexStorage3DMultisample"
call OpenGL_Load
mov cs:glTexStorage3DMultisample, rax
lea rdi, aGltextureview_0; "glTextureView"
call OpenGL_Load
mov cs:glTextureView, rax
lea rdi, aGlbindvertexbu_1; "glBindVertexBuffer"
call OpenGL_Load
mov cs:glBindVertexBuffer, rax
lea rdi, aGlvertexattrib_155; "glVertexAttribFormat"
call OpenGL_Load
mov cs:glVertexAttribFormat, rax
lea rdi, aGlvertexattrib_156; "glVertexAttribIFormat"
call OpenGL_Load
mov cs:glVertexAttribIFormat, rax
lea rdi, aGlvertexattrib_157; "glVertexAttribLFormat"
call OpenGL_Load
mov cs:glVertexAttribLFormat, rax
lea rdi, aGlvertexattrib_158; "glVertexAttribBinding"
call OpenGL_Load
mov cs:glVertexAttribBinding, rax
lea rdi, aGlvertexbindin_0; "glVertexBindingDivisor"
call OpenGL_Load
mov cs:glVertexBindingDivisor, rax
lea rdi, aGldebugmessage_2; "glDebugMessageControl"
call OpenGL_Load
mov cs:glDebugMessageControl, rax
lea rdi, aGldebugmessage_3; "glDebugMessageInsert"
call OpenGL_Load
mov cs:glDebugMessageInsert, rax
lea rdi, aGldebugmessage_4; "glDebugMessageCallback"
call OpenGL_Load
mov cs:glDebugMessageCallback, rax
lea rdi, aGlgetdebugmess_0; "glGetDebugMessageLog"
call OpenGL_Load
mov cs:glGetDebugMessageLog, rax
lea rdi, aGlpushdebuggro_0; "glPushDebugGroup"
call OpenGL_Load
mov cs:glPushDebugGroup, rax
lea rdi, aGlpopdebuggrou_0; "glPopDebugGroup"
call OpenGL_Load
mov cs:glPopDebugGroup, rax
lea rdi, aGlobjectlabel_0; "glObjectLabel"
call OpenGL_Load
mov cs:glObjectLabel, rax
lea rdi, aGlgetobjectlab_0; "glGetObjectLabel"
call OpenGL_Load
mov cs:glGetObjectLabel, rax
lea rdi, aGlobjectptrlab_0; "glObjectPtrLabel"
call OpenGL_Load
mov cs:glObjectPtrLabel, rax
lea rdi, aGlgetobjectptr_0; "glGetObjectPtrLabel"
call OpenGL_Load
mov cs:glGetObjectPtrLabel, rax
pop rax
retn
|
void __spoils<rdx,rcx,r8,r9,r10,r11,xmm4,xmm5> OpenGL_Init_4_3()
{
glClearBufferData = OpenGL_Load("glClearBufferData");
glClearBufferSubData = OpenGL_Load("glClearBufferSubData");
glDispatchCompute = OpenGL_Load("glDispatchCompute");
glDispatchComputeIndirect = OpenGL_Load("glDispatchComputeIndirect");
glCopyImageSubData = OpenGL_Load("glCopyImageSubData");
glFramebufferParameteri = OpenGL_Load("glFramebufferParameteri");
glGetFramebufferParameteriv = OpenGL_Load("glGetFramebufferParameteriv");
glGetInternalformati64v = OpenGL_Load("glGetInternalformati64v");
glInvalidateTexSubImage = OpenGL_Load("glInvalidateTexSubImage");
glInvalidateTexImage = OpenGL_Load("glInvalidateTexImage");
glInvalidateBufferSubData = OpenGL_Load("glInvalidateBufferSubData");
glInvalidateBufferData = OpenGL_Load("glInvalidateBufferData");
glInvalidateFramebuffer = OpenGL_Load("glInvalidateFramebuffer");
glInvalidateSubFramebuffer = OpenGL_Load("glInvalidateSubFramebuffer");
glMultiDrawArraysIndirect = OpenGL_Load("glMultiDrawArraysIndirect");
glMultiDrawElementsIndirect = OpenGL_Load("glMultiDrawElementsIndirect");
glGetProgramInterfaceiv = OpenGL_Load("glGetProgramInterfaceiv");
glGetProgramResourceIndex = OpenGL_Load("glGetProgramResourceIndex");
glGetProgramResourceName = OpenGL_Load("glGetProgramResourceName");
glGetProgramResourceiv = OpenGL_Load("glGetProgramResourceiv");
glGetProgramResourceLocation = OpenGL_Load("glGetProgramResourceLocation");
glGetProgramResourceLocationIndex = OpenGL_Load("glGetProgramResourceLocationIndex");
glShaderStorageBlockBinding = OpenGL_Load("glShaderStorageBlockBinding");
glTexBufferRange = OpenGL_Load("glTexBufferRange");
glTexStorage2DMultisample = OpenGL_Load("glTexStorage2DMultisample");
glTexStorage3DMultisample = OpenGL_Load("glTexStorage3DMultisample");
glTextureView = OpenGL_Load("glTextureView");
glBindVertexBuffer = OpenGL_Load("glBindVertexBuffer");
glVertexAttribFormat = OpenGL_Load("glVertexAttribFormat");
glVertexAttribIFormat = OpenGL_Load("glVertexAttribIFormat");
glVertexAttribLFormat = OpenGL_Load("glVertexAttribLFormat");
glVertexAttribBinding = OpenGL_Load("glVertexAttribBinding");
glVertexBindingDivisor = OpenGL_Load("glVertexBindingDivisor");
glDebugMessageControl = OpenGL_Load("glDebugMessageControl");
glDebugMessageInsert = OpenGL_Load("glDebugMessageInsert");
glDebugMessageCallback = OpenGL_Load("glDebugMessageCallback");
glGetDebugMessageLog = OpenGL_Load("glGetDebugMessageLog");
glPushDebugGroup = OpenGL_Load("glPushDebugGroup");
glPopDebugGroup = OpenGL_Load("glPopDebugGroup");
glObjectLabel = OpenGL_Load("glObjectLabel");
glGetObjectLabel = OpenGL_Load("glGetObjectLabel");
glObjectPtrLabel = OpenGL_Load("glObjectPtrLabel");
glGetObjectPtrLabel = OpenGL_Load("glGetObjectPtrLabel");
}
|
OpenGL_Init_4_3:
PUSH RAX
LEA RDI,[0x118995]
CALL 0x0010f3a0
MOV qword ptr [0x0011dbd8],RAX
LEA RDI,[0x1189a7]
CALL 0x0010f3a0
MOV qword ptr [0x0011dbe0],RAX
LEA RDI,[0x1189bc]
CALL 0x0010f3a0
MOV qword ptr [0x0011dbe8],RAX
LEA RDI,[0x1189ce]
CALL 0x0010f3a0
MOV qword ptr [0x0011dbf0],RAX
LEA RDI,[0x1189e8]
CALL 0x0010f3a0
MOV qword ptr [0x0011dbf8],RAX
LEA RDI,[0x1189fb]
CALL 0x0010f3a0
MOV qword ptr [0x0011dc00],RAX
LEA RDI,[0x118a13]
CALL 0x0010f3a0
MOV qword ptr [0x0011dc08],RAX
LEA RDI,[0x118a2f]
CALL 0x0010f3a0
MOV qword ptr [0x0011dc10],RAX
LEA RDI,[0x118a47]
CALL 0x0010f3a0
MOV qword ptr [0x0011dc18],RAX
LEA RDI,[0x118a5f]
CALL 0x0010f3a0
MOV qword ptr [0x0011dc20],RAX
LEA RDI,[0x118a74]
CALL 0x0010f3a0
MOV qword ptr [0x0011dc28],RAX
LEA RDI,[0x118a8e]
CALL 0x0010f3a0
MOV qword ptr [0x0011dc30],RAX
LEA RDI,[0x118aa5]
CALL 0x0010f3a0
MOV qword ptr [0x0011dc38],RAX
LEA RDI,[0x118abd]
CALL 0x0010f3a0
MOV qword ptr [0x0011dc40],RAX
LEA RDI,[0x118ad8]
CALL 0x0010f3a0
MOV qword ptr [0x0011dc48],RAX
LEA RDI,[0x118af2]
CALL 0x0010f3a0
MOV qword ptr [0x0011dc50],RAX
LEA RDI,[0x118b0e]
CALL 0x0010f3a0
MOV qword ptr [0x0011dc58],RAX
LEA RDI,[0x118b26]
CALL 0x0010f3a0
MOV qword ptr [0x0011dc60],RAX
LEA RDI,[0x118b40]
CALL 0x0010f3a0
MOV qword ptr [0x0011dc68],RAX
LEA RDI,[0x118b59]
CALL 0x0010f3a0
MOV qword ptr [0x0011dc70],RAX
LEA RDI,[0x118b70]
CALL 0x0010f3a0
MOV qword ptr [0x0011dc78],RAX
LEA RDI,[0x118b8d]
CALL 0x0010f3a0
MOV qword ptr [0x0011dc80],RAX
LEA RDI,[0x118baf]
CALL 0x0010f3a0
MOV qword ptr [0x0011dc88],RAX
LEA RDI,[0x118bcb]
CALL 0x0010f3a0
MOV qword ptr [0x0011dc90],RAX
LEA RDI,[0x118bdc]
CALL 0x0010f3a0
MOV qword ptr [0x0011dc98],RAX
LEA RDI,[0x118bf6]
CALL 0x0010f3a0
MOV qword ptr [0x0011dca0],RAX
LEA RDI,[0x118c10]
CALL 0x0010f3a0
MOV qword ptr [0x0011dca8],RAX
LEA RDI,[0x118c1e]
CALL 0x0010f3a0
MOV qword ptr [0x0011dcb0],RAX
LEA RDI,[0x118c31]
CALL 0x0010f3a0
MOV qword ptr [0x0011dcb8],RAX
LEA RDI,[0x118c46]
CALL 0x0010f3a0
MOV qword ptr [0x0011dcc0],RAX
LEA RDI,[0x118c5c]
CALL 0x0010f3a0
MOV qword ptr [0x0011dcc8],RAX
LEA RDI,[0x118c72]
CALL 0x0010f3a0
MOV qword ptr [0x0011dcd0],RAX
LEA RDI,[0x118c88]
CALL 0x0010f3a0
MOV qword ptr [0x0011dcd8],RAX
LEA RDI,[0x118c9f]
CALL 0x0010f3a0
MOV qword ptr [0x0011dce0],RAX
LEA RDI,[0x118cb5]
CALL 0x0010f3a0
MOV qword ptr [0x0011dce8],RAX
LEA RDI,[0x118cca]
CALL 0x0010f3a0
MOV qword ptr [0x0011dcf0],RAX
LEA RDI,[0x118ce1]
CALL 0x0010f3a0
MOV qword ptr [0x0011dcf8],RAX
LEA RDI,[0x118cf6]
CALL 0x0010f3a0
MOV qword ptr [0x0011dd00],RAX
LEA RDI,[0x118d07]
CALL 0x0010f3a0
MOV qword ptr [0x0011dd08],RAX
LEA RDI,[0x118d17]
CALL 0x0010f3a0
MOV qword ptr [0x0011dd10],RAX
LEA RDI,[0x118d25]
CALL 0x0010f3a0
MOV qword ptr [0x0011dd18],RAX
LEA RDI,[0x118d36]
CALL 0x0010f3a0
MOV qword ptr [0x0011dd20],RAX
LEA RDI,[0x118d47]
CALL 0x0010f3a0
MOV qword ptr [0x0011dd28],RAX
POP RAX
RET
|
int8 OpenGL_Init_4_3(void)
{
int8 in_RAX;
glClearBufferData = OpenGL_Load("glClearBufferData");
glClearBufferSubData = OpenGL_Load("glClearBufferSubData");
glDispatchCompute = OpenGL_Load("glDispatchCompute");
glDispatchComputeIndirect = OpenGL_Load("glDispatchComputeIndirect");
glCopyImageSubData = OpenGL_Load("glCopyImageSubData");
glFramebufferParameteri = OpenGL_Load("glFramebufferParameteri");
glGetFramebufferParameteriv = OpenGL_Load("glGetFramebufferParameteriv");
glGetInternalformati64v = OpenGL_Load("glGetInternalformati64v");
glInvalidateTexSubImage = OpenGL_Load("glInvalidateTexSubImage");
glInvalidateTexImage = OpenGL_Load("glInvalidateTexImage");
glInvalidateBufferSubData = OpenGL_Load("glInvalidateBufferSubData");
glInvalidateBufferData = OpenGL_Load("glInvalidateBufferData");
glInvalidateFramebuffer = OpenGL_Load("glInvalidateFramebuffer");
glInvalidateSubFramebuffer = OpenGL_Load("glInvalidateSubFramebuffer");
glMultiDrawArraysIndirect = OpenGL_Load("glMultiDrawArraysIndirect");
glMultiDrawElementsIndirect = OpenGL_Load("glMultiDrawElementsIndirect");
glGetProgramInterfaceiv = OpenGL_Load("glGetProgramInterfaceiv");
glGetProgramResourceIndex = OpenGL_Load("glGetProgramResourceIndex");
glGetProgramResourceName = OpenGL_Load("glGetProgramResourceName");
glGetProgramResourceiv = OpenGL_Load("glGetProgramResourceiv");
glGetProgramResourceLocation = OpenGL_Load("glGetProgramResourceLocation");
glGetProgramResourceLocationIndex = OpenGL_Load("glGetProgramResourceLocationIndex");
glShaderStorageBlockBinding = OpenGL_Load("glShaderStorageBlockBinding");
glTexBufferRange = OpenGL_Load("glTexBufferRange");
glTexStorage2DMultisample = OpenGL_Load("glTexStorage2DMultisample");
glTexStorage3DMultisample = OpenGL_Load("glTexStorage3DMultisample");
glTextureView = OpenGL_Load("glTextureView");
glBindVertexBuffer = OpenGL_Load("glBindVertexBuffer");
glVertexAttribFormat = OpenGL_Load("glVertexAttribFormat");
glVertexAttribIFormat = OpenGL_Load("glVertexAttribIFormat");
glVertexAttribLFormat = OpenGL_Load("glVertexAttribLFormat");
glVertexAttribBinding = OpenGL_Load("glVertexAttribBinding");
glVertexBindingDivisor = OpenGL_Load("glVertexBindingDivisor");
glDebugMessageControl = OpenGL_Load("glDebugMessageControl");
glDebugMessageInsert = OpenGL_Load("glDebugMessageInsert");
glDebugMessageCallback = OpenGL_Load("glDebugMessageCallback");
glGetDebugMessageLog = OpenGL_Load("glGetDebugMessageLog");
glPushDebugGroup = OpenGL_Load("glPushDebugGroup");
glPopDebugGroup = OpenGL_Load("glPopDebugGroup");
glObjectLabel = OpenGL_Load("glObjectLabel");
glGetObjectLabel = OpenGL_Load("glGetObjectLabel");
glObjectPtrLabel = OpenGL_Load("glObjectPtrLabel");
glGetObjectPtrLabel = OpenGL_Load("glGetObjectPtrLabel");
return in_RAX;
}
|
|
20,122
|
common_kv_cache_dump_view(llama_kv_cache_view const&, int)
|
monkey531[P]llama/common/common.cpp
|
void common_kv_cache_dump_view(const llama_kv_cache_view & view, int row_size) {
static const char slot_chars[] = ".123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz+";
printf("=== Dumping KV cache. total cells %d, max sequences per cell %d, populated cells %d, total tokens in cache %d, largest empty slot=%d @ %d",
view.n_cells, view.n_seq_max, view.used_cells, view.token_count, view.max_contiguous, view.max_contiguous_idx);
llama_kv_cache_view_cell * c_curr = view.cells;
llama_seq_id * cs_curr = view.cells_sequences;
for (int i = 0; i < view.n_cells; i++, c_curr++, cs_curr += view.n_seq_max) {
if (i % row_size == 0) {
printf("\n%5d: ", i);
}
int seq_count = 0;
for (int j = 0; j < view.n_seq_max; j++) {
if (cs_curr[j] >= 0) { seq_count++; }
}
putchar(slot_chars[std::min(sizeof(slot_chars) - 2, size_t(seq_count))]);
}
printf("\n=== Done dumping\n");
}
|
O2
|
cpp
|
common_kv_cache_dump_view(llama_kv_cache_view const&, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movl (%rdi), %esi
movl 0x4(%rdi), %edx
movl 0xc(%rdi), %ecx
movl 0x8(%rdi), %r8d
movl 0x10(%rdi), %r9d
movl 0x14(%rdi), %eax
movl %eax, (%rsp)
leaq 0x66264(%rip), %rdi # 0x8d754
xorl %eax, %eax
callq 0x20060
movq 0x20(%r14), %r12
pushq $0x3e
popq %r13
leaq 0x6a32a(%rip), %r15 # 0x91830
xorl %ebp, %ebp
cmpl (%r14), %ebp
jge 0x27565
movl %ebp, %eax
cltd
idivl %ebx
testl %edx, %edx
jne 0x27526
leaq 0x662c1(%rip), %rdi # 0x8d7de
movl %ebp, %esi
xorl %eax, %eax
callq 0x20060
movl 0x4(%r14), %eax
xorl %ecx, %ecx
testl %eax, %eax
cmovlel %ecx, %eax
xorl %edx, %edx
cmpq %rcx, %rax
je 0x27548
movl (%r12,%rcx,4), %esi
notl %esi
shrl $0x1f, %esi
addl %esi, %edx
incq %rcx
jmp 0x27533
cmpl $0x3e, %edx
cmovael %r13d, %edx
movsbl (%rdx,%r15), %edi
callq 0x20940
incl %ebp
movslq 0x4(%r14), %rax
leaq (%r12,%rax,4), %r12
jmp 0x27508
leaq 0x6a2a4(%rip), %rdi # 0x91810
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x20a20
|
_Z25common_kv_cache_dump_viewRK19llama_kv_cache_viewi:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov ebx, esi
mov r14, rdi
mov esi, [rdi]
mov edx, [rdi+4]
mov ecx, [rdi+0Ch]
mov r8d, [rdi+8]
mov r9d, [rdi+10h]
mov eax, [rdi+14h]
mov [rsp+38h+var_38], eax
lea rdi, aDumpingKvCache; "=== Dumping KV cache. total cells %d, m"...
xor eax, eax
call _printf
mov r12, [r14+20h]
push 3Eh ; '>'
pop r13
lea r15, _ZZ25common_kv_cache_dump_viewRK19llama_kv_cache_viewiE10slot_chars; ".123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabc"...
xor ebp, ebp
loc_27508:
cmp ebp, [r14]
jge short loc_27565
mov eax, ebp
cdq
idiv ebx
test edx, edx
jnz short loc_27526
lea rdi, a5d; "\n%5d: "
mov esi, ebp
xor eax, eax
call _printf
loc_27526:
mov eax, [r14+4]
xor ecx, ecx
test eax, eax
cmovle eax, ecx
xor edx, edx
loc_27533:
cmp rax, rcx
jz short loc_27548
mov esi, [r12+rcx*4]
not esi
shr esi, 1Fh
add edx, esi
inc rcx
jmp short loc_27533
loc_27548:
cmp edx, 3Eh ; '>'
cmovnb edx, r13d
movsx edi, byte ptr [rdx+r15]
call _putchar
inc ebp
movsxd rax, dword ptr [r14+4]
lea r12, [r12+rax*4]
jmp short loc_27508
loc_27565:
lea rdi, aDoneDumping; "\n=== Done dumping"
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _puts
|
long long common_kv_cache_dump_view(long long a1, int a2)
{
long long v2; // r12
int i; // ebp
long long v4; // rax
long long v5; // rcx
long long v6; // rdx
printf(
"=== Dumping KV cache. total cells %d, max sequences per cell %d, populated cells %d, total tokens in cache %d, large"
"st empty slot=%d @ %d",
*(_DWORD *)a1,
*(_DWORD *)(a1 + 4),
*(_DWORD *)(a1 + 12),
*(_DWORD *)(a1 + 8),
*(_DWORD *)(a1 + 16),
*(_DWORD *)(a1 + 20));
v2 = *(_QWORD *)(a1 + 32);
for ( i = 0; i < *(_DWORD *)a1; ++i )
{
if ( !(i % a2) )
printf("\n%5d: ", i);
v4 = *(unsigned int *)(a1 + 4);
v5 = 0LL;
if ( (int)v4 <= 0 )
v4 = 0LL;
v6 = 0LL;
while ( v4 != v5 )
v6 = (*(_DWORD *)(v2 + 4 * v5++) >= 0) + (unsigned int)v6;
if ( (unsigned int)v6 >= 0x3E )
v6 = 62LL;
putchar((unsigned int)common_kv_cache_dump_view(llama_kv_cache_view const&,int)::slot_chars[v6]);
v2 += 4LL * *(int *)(a1 + 4);
}
return puts("\n=== Done dumping");
}
|
common_kv_cache_dump_view:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV EBX,ESI
MOV R14,RDI
MOV ESI,dword ptr [RDI]
MOV EDX,dword ptr [RDI + 0x4]
MOV ECX,dword ptr [RDI + 0xc]
MOV R8D,dword ptr [RDI + 0x8]
MOV R9D,dword ptr [RDI + 0x10]
MOV EAX,dword ptr [RDI + 0x14]
MOV dword ptr [RSP],EAX
LEA RDI,[0x18d754]
XOR EAX,EAX
CALL 0x00120060
MOV R12,qword ptr [R14 + 0x20]
PUSH 0x3e
POP R13
LEA R15,[0x191830]
XOR EBP,EBP
LAB_00127508:
CMP EBP,dword ptr [R14]
JGE 0x00127565
MOV EAX,EBP
CDQ
IDIV EBX
TEST EDX,EDX
JNZ 0x00127526
LEA RDI,[0x18d7de]
MOV ESI,EBP
XOR EAX,EAX
CALL 0x00120060
LAB_00127526:
MOV EAX,dword ptr [R14 + 0x4]
XOR ECX,ECX
TEST EAX,EAX
CMOVLE EAX,ECX
XOR EDX,EDX
LAB_00127533:
CMP RAX,RCX
JZ 0x00127548
MOV ESI,dword ptr [R12 + RCX*0x4]
NOT ESI
SHR ESI,0x1f
ADD EDX,ESI
INC RCX
JMP 0x00127533
LAB_00127548:
CMP EDX,0x3e
CMOVNC EDX,R13D
MOVSX EDI,byte ptr [RDX + R15*0x1]
CALL 0x00120940
INC EBP
MOVSXD RAX,dword ptr [R14 + 0x4]
LEA R12,[R12 + RAX*0x4]
JMP 0x00127508
LAB_00127565:
LEA RDI,[0x191810]
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x00120a20
|
/* common_kv_cache_dump_view(llama_kv_cache_view const&, int) */
void common_kv_cache_dump_view(llama_kv_cache_view *param_1,int param_2)
{
int8 in_RAX;
ulong uVar1;
uint uVar2;
ulong uVar3;
uint uVar4;
long lVar5;
printf("=== Dumping KV cache. total cells %d, max sequences per cell %d, populated cells %d, total tokens in cache %d, largest empty slot=%d @ %d"
,(ulong)*(uint *)param_1,(ulong)*(uint *)(param_1 + 4),(ulong)*(uint *)(param_1 + 0xc),
(ulong)*(uint *)(param_1 + 8),(ulong)*(uint *)(param_1 + 0x10),
CONCAT44((int)((ulong)in_RAX >> 0x20),*(int4 *)(param_1 + 0x14)));
lVar5 = *(long *)(param_1 + 0x20);
for (uVar4 = 0; (int)uVar4 < *(int *)param_1; uVar4 = uVar4 + 1) {
if ((int)uVar4 % param_2 == 0) {
printf("\n%5d: ",(ulong)uVar4);
}
uVar1 = 0;
uVar3 = (ulong)*(uint *)(param_1 + 4);
if ((int)*(uint *)(param_1 + 4) < 1) {
uVar3 = uVar1;
}
uVar2 = 0;
for (; uVar3 != uVar1; uVar1 = uVar1 + 1) {
uVar2 = uVar2 - ((int)~*(uint *)(lVar5 + uVar1 * 4) >> 0x1f);
}
uVar3 = (ulong)uVar2;
if (0x3d < uVar2) {
uVar3 = 0x3e;
}
putchar((int)".123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz+"[uVar3]);
lVar5 = lVar5 + (long)*(int *)(param_1 + 4) * 4;
}
puts("\n=== Done dumping");
return;
}
|
|
20,123
|
my_mb_wc_eucjpms
|
eloqsql/strings/ctype-eucjpms.c
|
static int
my_mb_wc_eucjpms(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *pwc, const uchar *s, const uchar *e)
{
int hi;
if (s >= e)
return MY_CS_TOOSMALL;
if ((hi= s[0]) < 0x80) /* ASCII code set: [00..7F] -> [U+0000..U+007F] */
{
*pwc= hi;
return 1;
}
if (hi >= 0xA1 && hi <= 0xFE) /* JIS X 0208 code set: [A1..FE][A1..FE] */
{
if (s + 2 > e)
return MY_CS_TOOSMALL2;
return (*pwc= jisx0208_eucjpms_to_unicode[(hi << 8) + s[1]]) ? 2 :
(s[1] < 0xA1 || s[1] > 0xFE) ? MY_CS_ILSEQ : -2;
}
/* JIS-X-0201 HALF WIDTH KATAKANA: [8E][A1..DF] -> [U+FF61..U+FF9F] */
if (hi == 0x8E)
{
if (s + 2 > e)
return MY_CS_TOOSMALL2;
if (s[1] < 0xA1 || s[1] > 0xDF)
return MY_CS_ILSEQ;
*pwc= 0xFEC0 + s[1]; /* 0xFFC0 = 0xFF61 - 0xA1 */
return 2;
}
if (hi == 0x8F) /* JIS X 0212 code set: [8F][A1..FE][A1..FE] */
{
if (s + 3 > e)
return MY_CS_TOOSMALL3;
return (*pwc= jisx0212_eucjpms_to_unicode[(((int) s[1]) << 8) + s[2]]) ?
3 :
(s[1] < 0xA1 || s[1] > 0xFE || s[2] < 0xA1 || s[2] > 0xFE) ?
MY_CS_ILSEQ : -3;
}
return MY_CS_ILSEQ;
}
|
O3
|
c
|
my_mb_wc_eucjpms:
pushq %rbp
movq %rsp, %rbp
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0xb2232
movzbl (%rdx), %edi
testb %dil, %dil
js 0xb2234
movq %rdi, (%rsi)
movl $0x1, %eax
popq %rbp
retq
leal 0x5f(%rdi), %eax
cmpb $0x5d, %al
ja 0xb2280
leaq 0x2(%rdx), %r8
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %r8
ja 0xb2232
movzbl 0x1(%rdx), %eax
shll $0x9, %edi
leal (%rdi,%rax,2), %eax
leaq 0xac206(%rip), %rcx # 0x15e460
movzwl (%rax,%rcx), %ecx
movq %rcx, (%rsi)
movl $0x2, %eax
testq %rcx, %rcx
jne 0xb2232
movb 0x1(%rdx), %al
incb %al
xorl %ecx, %ecx
cmpb $-0x5e, %al
setb %cl
leal -0x2(,%rcx,2), %eax
jmp 0xb2232
cmpq $0x8f, %rdi
je 0xb22c4
cmpl $0x8e, %edi
jne 0xb2306
leaq 0x2(%rdx), %rdi
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %rdi
ja 0xb2232
movzbl 0x1(%rdx), %ecx
leal 0x20(%rcx), %edx
movl $0x0, %eax
cmpb $-0x3f, %dl
jb 0xb2232
addq $0xfec0, %rcx # imm = 0xFEC0
movq %rcx, (%rsi)
movl $0x2, %eax
jmp 0xb2232
leaq 0x3(%rdx), %rdi
movl $0xffffff99, %eax # imm = 0xFFFFFF99
cmpq %rcx, %rdi
ja 0xb2232
movzwl 0x1(%rdx), %eax
rolw $0x8, %ax
movzwl %ax, %eax
leaq 0xcc178(%rip), %rcx # 0x17e460
movzwl (%rcx,%rax,2), %ecx
movq %rcx, (%rsi)
movl $0x3, %eax
testq %rcx, %rcx
jne 0xb2232
movb 0x1(%rdx), %al
incb %al
cmpb $-0x5e, %al
jae 0xb230d
xorl %eax, %eax
jmp 0xb2232
movb 0x2(%rdx), %cl
movl $0x0, %eax
cmpb $-0x5f, %cl
jb 0xb2232
xorl %eax, %eax
cmpb $-0x1, %cl
sete %al
leal (%rax,%rax,2), %eax
addl $-0x3, %eax
jmp 0xb2232
|
my_mb_wc_eucjpms:
push rbp
mov rbp, rsp
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb short loc_B2232
movzx edi, byte ptr [rdx]
test dil, dil
js short loc_B2234
mov [rsi], rdi
mov eax, 1
loc_B2232:
pop rbp
retn
loc_B2234:
lea eax, [rdi+5Fh]
cmp al, 5Dh ; ']'
ja short loc_B2280
lea r8, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp r8, rcx
ja short loc_B2232
movzx eax, byte ptr [rdx+1]
shl edi, 9
lea eax, [rdi+rax*2]
lea rcx, jisx0208_eucjpms_to_unicode
movzx ecx, word ptr [rax+rcx]
mov [rsi], rcx
mov eax, 2
test rcx, rcx
jnz short loc_B2232
mov al, [rdx+1]
inc al
xor ecx, ecx
cmp al, 0A2h
setb cl
lea eax, ds:0FFFFFFFFFFFFFFFEh[rcx*2]
jmp short loc_B2232
loc_B2280:
cmp rdi, 8Fh
jz short loc_B22C4
cmp edi, 8Eh
jnz short loc_B2306
lea rdi, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp rdi, rcx
ja short loc_B2232
movzx ecx, byte ptr [rdx+1]
lea edx, [rcx+20h]
mov eax, 0
cmp dl, 0C1h
jb short loc_B2232
add rcx, 0FEC0h
mov [rsi], rcx
mov eax, 2
jmp loc_B2232
loc_B22C4:
lea rdi, [rdx+3]
mov eax, 0FFFFFF99h
cmp rdi, rcx
ja loc_B2232
movzx eax, word ptr [rdx+1]
rol ax, 8
movzx eax, ax
lea rcx, jisx0212_eucjpms_to_unicode
movzx ecx, word ptr [rcx+rax*2]
mov [rsi], rcx
mov eax, 3
test rcx, rcx
jnz loc_B2232
mov al, [rdx+1]
inc al
cmp al, 0A2h
jnb short loc_B230D
loc_B2306:
xor eax, eax
jmp loc_B2232
loc_B230D:
mov cl, [rdx+2]
mov eax, 0
cmp cl, 0A1h
jb loc_B2232
xor eax, eax
cmp cl, 0FFh
setz al
lea eax, [rax+rax*2]
add eax, 0FFFFFFFDh
jmp loc_B2232
|
long long my_mb_wc_eucjpms(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4)
{
long long result; // rax
long long v5; // rdi
long long v6; // rcx
long long v7; // rcx
long long v8; // rcx
unsigned __int8 v9; // cl
result = 4294967195LL;
if ( (unsigned long long)a3 >= a4 )
return result;
v5 = *a3;
if ( (v5 & 0x80u) == 0LL )
{
*a2 = v5;
return 1LL;
}
if ( (unsigned __int8)(v5 + 95) <= 0x5Du )
{
result = 4294967194LL;
if ( (unsigned long long)(a3 + 2) <= a4 )
{
v6 = jisx0208_eucjpms_to_unicode[256 * (_DWORD)v5 + a3[1]];
*a2 = v6;
result = 2LL;
if ( !v6 )
return 2 * (unsigned int)((unsigned __int8)(a3[1] + 1) < 0xA2u) - 2;
}
return result;
}
if ( v5 != 143 )
{
if ( (_DWORD)v5 == 142 )
{
result = 4294967194LL;
if ( (unsigned long long)(a3 + 2) <= a4 )
{
v7 = a3[1];
result = 0LL;
if ( (unsigned __int8)(v7 + 32) >= 0xC1u )
{
*a2 = v7 + 65216;
return 2LL;
}
}
return result;
}
return 0LL;
}
result = 4294967193LL;
if ( (unsigned long long)(a3 + 3) > a4 )
return result;
v8 = jisx0212_eucjpms_to_unicode[(unsigned __int16)__ROL2__(*(_WORD *)(a3 + 1), 8)];
*a2 = v8;
result = 3LL;
if ( v8 )
return result;
if ( (unsigned __int8)(a3[1] + 1) < 0xA2u )
return 0LL;
v9 = a3[2];
result = 0LL;
if ( v9 >= 0xA1u )
return 3 * (unsigned int)(v9 == 0xFF) - 3;
return result;
}
|
my_mb_wc_eucjpms:
PUSH RBP
MOV RBP,RSP
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x001b2232
MOVZX EDI,byte ptr [RDX]
TEST DIL,DIL
JS 0x001b2234
MOV qword ptr [RSI],RDI
MOV EAX,0x1
LAB_001b2232:
POP RBP
RET
LAB_001b2234:
LEA EAX,[RDI + 0x5f]
CMP AL,0x5d
JA 0x001b2280
LEA R8,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP R8,RCX
JA 0x001b2232
MOVZX EAX,byte ptr [RDX + 0x1]
SHL EDI,0x9
LEA EAX,[RDI + RAX*0x2]
LEA RCX,[0x25e460]
MOVZX ECX,word ptr [RAX + RCX*0x1]
MOV qword ptr [RSI],RCX
MOV EAX,0x2
TEST RCX,RCX
JNZ 0x001b2232
MOV AL,byte ptr [RDX + 0x1]
INC AL
XOR ECX,ECX
CMP AL,0xa2
SETC CL
LEA EAX,[-0x2 + RCX*0x2]
JMP 0x001b2232
LAB_001b2280:
CMP RDI,0x8f
JZ 0x001b22c4
CMP EDI,0x8e
JNZ 0x001b2306
LEA RDI,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP RDI,RCX
JA 0x001b2232
MOVZX ECX,byte ptr [RDX + 0x1]
LEA EDX,[RCX + 0x20]
MOV EAX,0x0
CMP DL,0xc1
JC 0x001b2232
ADD RCX,0xfec0
MOV qword ptr [RSI],RCX
MOV EAX,0x2
JMP 0x001b2232
LAB_001b22c4:
LEA RDI,[RDX + 0x3]
MOV EAX,0xffffff99
CMP RDI,RCX
JA 0x001b2232
MOVZX EAX,word ptr [RDX + 0x1]
ROL AX,0x8
MOVZX EAX,AX
LEA RCX,[0x27e460]
MOVZX ECX,word ptr [RCX + RAX*0x2]
MOV qword ptr [RSI],RCX
MOV EAX,0x3
TEST RCX,RCX
JNZ 0x001b2232
MOV AL,byte ptr [RDX + 0x1]
INC AL
CMP AL,0xa2
JNC 0x001b230d
LAB_001b2306:
XOR EAX,EAX
JMP 0x001b2232
LAB_001b230d:
MOV CL,byte ptr [RDX + 0x2]
MOV EAX,0x0
CMP CL,0xa1
JC 0x001b2232
XOR EAX,EAX
CMP CL,0xff
SETZ AL
LEA EAX,[RAX + RAX*0x2]
ADD EAX,-0x3
JMP 0x001b2232
|
int my_mb_wc_eucjpms(int8 param_1,ulong *param_2,byte *param_3,byte *param_4)
{
byte bVar1;
ushort uVar2;
int iVar3;
iVar3 = -0x65;
if (param_3 < param_4) {
bVar1 = *param_3;
if ((char)bVar1 < '\0') {
if ((byte)(bVar1 + 0x5f) < 0x5e) {
iVar3 = -0x66;
if (param_3 + 2 <= param_4) {
uVar2 = *(ushort *)
(jisx0208_eucjpms_to_unicode + ((uint)bVar1 * 0x200 + (uint)param_3[1] * 2));
*param_2 = (ulong)uVar2;
iVar3 = 2;
if ((ulong)uVar2 == 0) {
iVar3 = (uint)((byte)(param_3[1] + 1) < 0xa2) * 2 + -2;
}
}
}
else {
if ((ulong)bVar1 == 0x8f) {
if (param_4 < param_3 + 3) {
return -0x67;
}
uVar2 = *(ushort *)
(&jisx0212_eucjpms_to_unicode +
(ulong)(ushort)(*(ushort *)(param_3 + 1) << 8 | *(ushort *)(param_3 + 1) >> 8) *
2);
*param_2 = (ulong)uVar2;
if ((ulong)uVar2 != 0) {
return 3;
}
if (0xa1 < (byte)(param_3[1] + 1)) {
if (param_3[2] < 0xa1) {
return 0;
}
return (uint)(param_3[2] == 0xff) * 3 + -3;
}
}
else if (bVar1 == 0x8e) {
if (param_4 < param_3 + 2) {
return -0x66;
}
if ((byte)(param_3[1] + 0x20) < 0xc1) {
return 0;
}
*param_2 = (ulong)param_3[1] + 0xfec0;
return 2;
}
iVar3 = 0;
}
}
else {
*param_2 = (ulong)bVar1;
iVar3 = 1;
}
}
return iVar3;
}
|
|
20,124
|
OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::initializeProtoNodes(unsigned short)
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/subdivisionPlanBuilder.cpp
|
void
SubdivisionPlanBuilder::initializeProtoNodes(LocalIndex subfaceIndex) {
assert(_faceRefiner && _patchBuilder);
// recursive lambda traverses the topology of the neighborhood in the _faceRefiner
// and gathers proto-nodes.
auto traverse = [this](int levelIndex, LocalIndex faceIndex, auto&& traverse) -> int {
using enum NodeType;
int index = (int)_protoNodeStore[levelIndex].size();
ProtoNode& pn = _protoNodeStore[levelIndex].emplace_back();
pn.active = true;
pn.levelIndex = levelIndex;
pn.faceIndex = faceIndex;
pn.hasIrregularPatch = false;
setFaceTags(pn.faceTags, levelIndex, faceIndex);
if (pn.faceTags.hasPatch) {
if (pn.faceTags.isRegular)
pn.nodeType = uint8_t(NODE_REGULAR);
else {
pn.hasIrregularPatch = true;
pn.nodeType = uint8_t(NODE_END);
}
pn.numChildren = 0;
} else {
ConstIndexArray children = _faceRefiner->GetLevel(levelIndex).GetFaceChildFaces(faceIndex);
for (int i=0; i<children.size(); ++i)
pn.children[i] = traverse(levelIndex+1, children[i], traverse);
pn.numChildren = (int)children.size();
pn.hasIrregularPatch = _useDynamicIsolation && levelIndex > 0;
pn.nodeType = uint8_t(NODE_RECURSIVE);
}
return index;
};
if (_faceSize == _regularFaceSize) {
assert(_faceRefiner->GetLevel(0).GetFaceVertices(0).size() == _regularFaceSize);
traverse(0, 0, traverse);
} else {
assert(_faceRefiner->GetLevel(0).GetFaceVertices(0).size() != _regularFaceSize);
assert(subfaceIndex < _faceRefiner->GetLevel(0).GetFaceVertices(0).size());
traverse(1, subfaceIndex, traverse);
}
}
|
O1
|
cpp
|
OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::initializeProtoNodes(unsigned short):
pushq %rax
movq 0x108(%rdi), %rax
testq %rax, %rax
je 0xa7c93
cmpq $0x0, 0x110(%rdi)
je 0xa7c93
movq %rdi, (%rsp)
movl 0x26c(%rdi), %ecx
movq 0x60(%rax), %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
movl (%rax), %eax
cmpl %ecx, 0x27c(%rdi)
jne 0xa7c76
cmpl %ecx, %eax
jne 0xa7cb2
movq %rsp, %rcx
movq %rcx, %rdi
xorl %esi, %esi
xorl %edx, %edx
jmp 0xa7c8c
cmpl %ecx, %eax
je 0xa7cd1
movzwl %si, %edx
cmpl %edx, %eax
jle 0xa7cf0
movq %rsp, %rcx
movq %rcx, %rdi
movl $0x1, %esi
callq 0xa7d10
popq %rax
retq
leaq 0x1c406(%rip), %rdi # 0xc40a0
leaq 0x1c41d(%rip), %rsi # 0xc40be
leaq 0x1c47e(%rip), %rcx # 0xc4126
movl $0x128, %edx # imm = 0x128
callq 0x39560
leaq 0x1c4c4(%rip), %rdi # 0xc417d
leaq 0x1c3fe(%rip), %rsi # 0xc40be
leaq 0x1c45f(%rip), %rcx # 0xc4126
movl $0x150, %edx # imm = 0x150
callq 0x39560
leaq 0x1c4ed(%rip), %rdi # 0xc41c5
leaq 0x1c3df(%rip), %rsi # 0xc40be
leaq 0x1c440(%rip), %rcx # 0xc4126
movl $0x153, %edx # imm = 0x153
callq 0x39560
leaq 0x1c516(%rip), %rdi # 0xc420d
leaq 0x1c3c0(%rip), %rsi # 0xc40be
leaq 0x1c421(%rip), %rcx # 0xc4126
movl $0x154, %edx # imm = 0x154
callq 0x39560
nop
|
_ZN10OpenSubdiv6v3_6_03Tmr22SubdivisionPlanBuilder20initializeProtoNodesEt:
push rax
mov rax, [rdi+108h]
test rax, rax
jz short loc_A7C93
cmp qword ptr [rdi+110h], 0
jz short loc_A7C93
mov [rsp+8+var_8], rdi
mov ecx, [rdi+26Ch]
mov rax, [rax+60h]
mov rax, [rax]
mov rax, [rax+18h]
mov eax, [rax]
cmp [rdi+27Ch], ecx
jnz short loc_A7C76
cmp eax, ecx
jnz short loc_A7CB2
mov rcx, rsp
mov rdi, rcx
xor esi, esi
xor edx, edx
jmp short loc_A7C8C
loc_A7C76:
cmp eax, ecx
jz short loc_A7CD1
movzx edx, si
cmp eax, edx
jle short loc_A7CF0
mov rcx, rsp
mov rdi, rcx
mov esi, 1
loc_A7C8C:
call _ZZN10OpenSubdiv6v3_6_03Tmr22SubdivisionPlanBuilder20initializeProtoNodesEtENK3$_0clIRS3_EEiitOT_; OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::initializeProtoNodes(ushort)::$_0::operator()<$_0&>(int,int,ushort,$_0&)
pop rax
retn
loc_A7C93:
lea rdi, aFacerefinerPat; "_faceRefiner && _patchBuilder"
lea rsi, aWorkspaceLlm4b_52; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidOpensubdiv_157; "void OpenSubdiv::v3_6_0::Tmr::Subdivisi"...
mov edx, 128h
call ___assert_fail
loc_A7CB2:
lea rdi, aFacerefinerGet; "_faceRefiner->GetLevel(0).GetFaceVertic"...
lea rsi, aWorkspaceLlm4b_52; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidOpensubdiv_157; "void OpenSubdiv::v3_6_0::Tmr::Subdivisi"...
mov edx, 150h
call ___assert_fail
loc_A7CD1:
lea rdi, aFacerefinerGet_0; "_faceRefiner->GetLevel(0).GetFaceVertic"...
lea rsi, aWorkspaceLlm4b_52; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidOpensubdiv_157; "void OpenSubdiv::v3_6_0::Tmr::Subdivisi"...
mov edx, 153h
call ___assert_fail
loc_A7CF0:
lea rdi, aSubfaceindexFa; "subfaceIndex < _faceRefiner->GetLevel(0"...
lea rsi, aWorkspaceLlm4b_52; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidOpensubdiv_157; "void OpenSubdiv::v3_6_0::Tmr::Subdivisi"...
mov edx, 154h
call ___assert_fail
|
OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder * OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::initializeProtoNodes(
OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder *this,
unsigned __int16 a2)
{
OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder *v2; // rax
long long v3; // rax
int v4; // ecx
int v5; // eax
long long v6; // rsi
long long v7; // rdx
OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder *v9; // [rsp+0h] [rbp-8h] BYREF
v9 = v2;
v3 = *((_QWORD *)this + 33);
if ( !v3 || !*((_QWORD *)this + 34) )
__assert_fail(
"_faceRefiner && _patchBuilder",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/subdivisionPlanBuilder.cpp",
296LL,
"void OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::initializeProtoNodes(LocalIndex)");
v9 = this;
v4 = *((_DWORD *)this + 155);
v5 = **(_DWORD **)(**(_QWORD **)(v3 + 96) + 24LL);
if ( *((_DWORD *)this + 159) == v4 )
{
if ( v5 != v4 )
__assert_fail(
"_faceRefiner->GetLevel(0).GetFaceVertices(0).size() == _regularFaceSize",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/subdivisionPlanBuilder.cpp",
336LL,
"void OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::initializeProtoNodes(LocalIndex)");
v6 = 0LL;
v7 = 0LL;
}
else
{
if ( v5 == v4 )
__assert_fail(
"_faceRefiner->GetLevel(0).GetFaceVertices(0).size() != _regularFaceSize",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/subdivisionPlanBuilder.cpp",
339LL,
"void OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::initializeProtoNodes(LocalIndex)");
v7 = a2;
if ( v5 <= a2 )
__assert_fail(
"subfaceIndex < _faceRefiner->GetLevel(0).GetFaceVertices(0).size()",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/subdivisionPlanBuilder.cpp",
340LL,
"void OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::initializeProtoNodes(LocalIndex)");
v6 = 1LL;
}
OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::initializeProtoNodes(unsigned short)::$_0::operator()<$_0&>(
&v9,
v6,
v7);
return v9;
}
|
initializeProtoNodes:
PUSH RAX
MOV RAX,qword ptr [RDI + 0x108]
TEST RAX,RAX
JZ 0x001a7c93
CMP qword ptr [RDI + 0x110],0x0
JZ 0x001a7c93
MOV qword ptr [RSP],RDI
MOV ECX,dword ptr [RDI + 0x26c]
MOV RAX,qword ptr [RAX + 0x60]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x18]
MOV EAX,dword ptr [RAX]
CMP dword ptr [RDI + 0x27c],ECX
JNZ 0x001a7c76
CMP EAX,ECX
JNZ 0x001a7cb2
MOV RCX,RSP
MOV RDI,RCX
XOR ESI,ESI
XOR EDX,EDX
JMP 0x001a7c8c
LAB_001a7c76:
CMP EAX,ECX
JZ 0x001a7cd1
MOVZX EDX,SI
CMP EAX,EDX
JLE 0x001a7cf0
MOV RCX,RSP
MOV RDI,RCX
MOV ESI,0x1
LAB_001a7c8c:
CALL 0x001a7d10
POP RAX
RET
LAB_001a7c93:
LEA RDI,[0x1c40a0]
LEA RSI,[0x1c40be]
LEA RCX,[0x1c4126]
MOV EDX,0x128
CALL 0x00139560
LAB_001a7cb2:
LEA RDI,[0x1c417d]
LEA RSI,[0x1c40be]
LEA RCX,[0x1c4126]
MOV EDX,0x150
CALL 0x00139560
LAB_001a7cd1:
LEA RDI,[0x1c41c5]
LEA RSI,[0x1c40be]
LEA RCX,[0x1c4126]
MOV EDX,0x153
CALL 0x00139560
LAB_001a7cf0:
LEA RDI,[0x1c420d]
LEA RSI,[0x1c40be]
LEA RCX,[0x1c4126]
MOV EDX,0x154
CALL 0x00139560
|
/* OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::initializeProtoNodes(unsigned short) */
SubdivisionPlanBuilder * __thiscall
OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::initializeProtoNodes
(SubdivisionPlanBuilder *this,ushort param_1)
{
int iVar1;
int iVar2;
SubdivisionPlanBuilder *local_8;
if ((*(long *)(this + 0x108) == 0) || (*(long *)(this + 0x110) == 0)) {
/* WARNING: Subroutine does not return */
__assert_fail("_faceRefiner && _patchBuilder",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/subdivisionPlanBuilder.cpp"
,0x128,
"void OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::initializeProtoNodes(LocalIndex)"
);
}
iVar2 = *(int *)(this + 0x26c);
iVar1 = **(int **)(**(long **)(*(long *)(this + 0x108) + 0x60) + 0x18);
local_8 = this;
if (*(int *)(this + 0x27c) == iVar2) {
if (iVar1 != iVar2) {
/* WARNING: Subroutine does not return */
__assert_fail("_faceRefiner->GetLevel(0).GetFaceVertices(0).size() == _regularFaceSize",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/subdivisionPlanBuilder.cpp"
,0x150,
"void OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::initializeProtoNodes(LocalIndex)"
);
}
iVar2 = 0;
param_1 = 0;
}
else {
if (iVar1 == iVar2) {
/* WARNING: Subroutine does not return */
__assert_fail("_faceRefiner->GetLevel(0).GetFaceVertices(0).size() != _regularFaceSize",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/subdivisionPlanBuilder.cpp"
,0x153,
"void OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::initializeProtoNodes(LocalIndex)"
);
}
if (iVar1 <= (int)(uint)param_1) {
/* WARNING: Subroutine does not return */
__assert_fail("subfaceIndex < _faceRefiner->GetLevel(0).GetFaceVertices(0).size()",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/subdivisionPlanBuilder.cpp"
,0x154,
"void OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::initializeProtoNodes(LocalIndex)"
);
}
iVar2 = 1;
}
initializeProtoNodes(unsigned_short)::$_0::operator()
((__0 *)&local_8,iVar2,param_1,(__0 *)&local_8);
return local_8;
}
|
|
20,125
|
OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::initializeProtoNodes(unsigned short)
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/subdivisionPlanBuilder.cpp
|
void
SubdivisionPlanBuilder::initializeProtoNodes(LocalIndex subfaceIndex) {
assert(_faceRefiner && _patchBuilder);
// recursive lambda traverses the topology of the neighborhood in the _faceRefiner
// and gathers proto-nodes.
auto traverse = [this](int levelIndex, LocalIndex faceIndex, auto&& traverse) -> int {
using enum NodeType;
int index = (int)_protoNodeStore[levelIndex].size();
ProtoNode& pn = _protoNodeStore[levelIndex].emplace_back();
pn.active = true;
pn.levelIndex = levelIndex;
pn.faceIndex = faceIndex;
pn.hasIrregularPatch = false;
setFaceTags(pn.faceTags, levelIndex, faceIndex);
if (pn.faceTags.hasPatch) {
if (pn.faceTags.isRegular)
pn.nodeType = uint8_t(NODE_REGULAR);
else {
pn.hasIrregularPatch = true;
pn.nodeType = uint8_t(NODE_END);
}
pn.numChildren = 0;
} else {
ConstIndexArray children = _faceRefiner->GetLevel(levelIndex).GetFaceChildFaces(faceIndex);
for (int i=0; i<children.size(); ++i)
pn.children[i] = traverse(levelIndex+1, children[i], traverse);
pn.numChildren = (int)children.size();
pn.hasIrregularPatch = _useDynamicIsolation && levelIndex > 0;
pn.nodeType = uint8_t(NODE_RECURSIVE);
}
return index;
};
if (_faceSize == _regularFaceSize) {
assert(_faceRefiner->GetLevel(0).GetFaceVertices(0).size() == _regularFaceSize);
traverse(0, 0, traverse);
} else {
assert(_faceRefiner->GetLevel(0).GetFaceVertices(0).size() != _regularFaceSize);
assert(subfaceIndex < _faceRefiner->GetLevel(0).GetFaceVertices(0).size());
traverse(1, subfaceIndex, traverse);
}
}
|
O3
|
cpp
|
OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::initializeProtoNodes(unsigned short):
pushq %rax
movq 0x108(%rdi), %rax
testq %rax, %rax
je 0xaa4d5
cmpq $0x0, 0x110(%rdi)
je 0xaa4d5
movq %rdi, (%rsp)
movl 0x26c(%rdi), %ecx
movl 0x27c(%rdi), %edx
movq 0x60(%rax), %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
movl (%rax), %eax
cmpl %ecx, %edx
jne 0xaa4b8
cmpl %edx, %eax
jne 0xaa4f4
movq %rsp, %rcx
movq %rcx, %rdi
xorl %esi, %esi
xorl %edx, %edx
jmp 0xaa4ce
cmpl %ecx, %eax
je 0xaa513
movzwl %si, %edx
cmpl %edx, %eax
jle 0xaa532
movq %rsp, %rcx
movq %rcx, %rdi
movl $0x1, %esi
callq 0xaa552
popq %rax
retq
leaq 0x1d434(%rip), %rdi # 0xc7910
leaq 0x1d44b(%rip), %rsi # 0xc792e
leaq 0x1d4ac(%rip), %rcx # 0xc7996
movl $0x128, %edx # imm = 0x128
callq 0x39540
leaq 0x1d4f2(%rip), %rdi # 0xc79ed
leaq 0x1d42c(%rip), %rsi # 0xc792e
leaq 0x1d48d(%rip), %rcx # 0xc7996
movl $0x150, %edx # imm = 0x150
callq 0x39540
leaq 0x1d51b(%rip), %rdi # 0xc7a35
leaq 0x1d40d(%rip), %rsi # 0xc792e
leaq 0x1d46e(%rip), %rcx # 0xc7996
movl $0x153, %edx # imm = 0x153
callq 0x39540
leaq 0x1d544(%rip), %rdi # 0xc7a7d
leaq 0x1d3ee(%rip), %rsi # 0xc792e
leaq 0x1d44f(%rip), %rcx # 0xc7996
movl $0x154, %edx # imm = 0x154
callq 0x39540
nop
|
_ZN10OpenSubdiv6v3_6_03Tmr22SubdivisionPlanBuilder20initializeProtoNodesEt:
push rax
mov rax, [rdi+108h]
test rax, rax
jz short loc_AA4D5
cmp qword ptr [rdi+110h], 0
jz short loc_AA4D5
mov [rsp+8+var_8], rdi
mov ecx, [rdi+26Ch]
mov edx, [rdi+27Ch]
mov rax, [rax+60h]
mov rax, [rax]
mov rax, [rax+18h]
mov eax, [rax]
cmp edx, ecx
jnz short loc_AA4B8
cmp eax, edx
jnz short loc_AA4F4
mov rcx, rsp
mov rdi, rcx
xor esi, esi
xor edx, edx
jmp short loc_AA4CE
loc_AA4B8:
cmp eax, ecx
jz short loc_AA513
movzx edx, si
cmp eax, edx
jle short loc_AA532
mov rcx, rsp
mov rdi, rcx
mov esi, 1
loc_AA4CE:
call _ZZN10OpenSubdiv6v3_6_03Tmr22SubdivisionPlanBuilder20initializeProtoNodesEtENK3$_0clIRS3_EEiitOT_; OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::initializeProtoNodes(ushort)::$_0::operator()<$_0&>(int,int,ushort,$_0&)
pop rax
retn
loc_AA4D5:
lea rdi, aFacerefinerPat; "_faceRefiner && _patchBuilder"
lea rsi, aWorkspaceLlm4b_52; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidOpensubdiv_157; "void OpenSubdiv::v3_6_0::Tmr::Subdivisi"...
mov edx, 128h
call ___assert_fail
loc_AA4F4:
lea rdi, aFacerefinerGet; "_faceRefiner->GetLevel(0).GetFaceVertic"...
lea rsi, aWorkspaceLlm4b_52; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidOpensubdiv_157; "void OpenSubdiv::v3_6_0::Tmr::Subdivisi"...
mov edx, 150h
call ___assert_fail
loc_AA513:
lea rdi, aFacerefinerGet_0; "_faceRefiner->GetLevel(0).GetFaceVertic"...
lea rsi, aWorkspaceLlm4b_52; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidOpensubdiv_157; "void OpenSubdiv::v3_6_0::Tmr::Subdivisi"...
mov edx, 153h
call ___assert_fail
loc_AA532:
lea rdi, aSubfaceindexFa; "subfaceIndex < _faceRefiner->GetLevel(0"...
lea rsi, aWorkspaceLlm4b_52; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidOpensubdiv_157; "void OpenSubdiv::v3_6_0::Tmr::Subdivisi"...
mov edx, 154h
call ___assert_fail
|
OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder * OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::initializeProtoNodes(
OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder *this,
unsigned __int16 a2)
{
OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder *v2; // rax
long long v3; // rax
int v4; // ecx
int v5; // edx
int v6; // eax
long long v7; // rsi
long long v8; // rdx
OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder *v10; // [rsp+0h] [rbp-8h] BYREF
v10 = v2;
v3 = *((_QWORD *)this + 33);
if ( !v3 || !*((_QWORD *)this + 34) )
__assert_fail(
"_faceRefiner && _patchBuilder",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/subdivisionPlanBuilder.cpp",
296LL,
"void OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::initializeProtoNodes(LocalIndex)");
v10 = this;
v4 = *((_DWORD *)this + 155);
v5 = *((_DWORD *)this + 159);
v6 = **(_DWORD **)(**(_QWORD **)(v3 + 96) + 24LL);
if ( v5 == v4 )
{
if ( v6 != v5 )
__assert_fail(
"_faceRefiner->GetLevel(0).GetFaceVertices(0).size() == _regularFaceSize",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/subdivisionPlanBuilder.cpp",
336LL,
"void OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::initializeProtoNodes(LocalIndex)");
v7 = 0LL;
v8 = 0LL;
}
else
{
if ( v6 == v4 )
__assert_fail(
"_faceRefiner->GetLevel(0).GetFaceVertices(0).size() != _regularFaceSize",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/subdivisionPlanBuilder.cpp",
339LL,
"void OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::initializeProtoNodes(LocalIndex)");
v8 = a2;
if ( v6 <= a2 )
__assert_fail(
"subfaceIndex < _faceRefiner->GetLevel(0).GetFaceVertices(0).size()",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/subdivisionPlanBuilder.cpp",
340LL,
"void OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::initializeProtoNodes(LocalIndex)");
v7 = 1LL;
}
OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::initializeProtoNodes(unsigned short)::$_0::operator()<$_0&>(
&v10,
v7,
v8);
return v10;
}
|
initializeProtoNodes:
PUSH RAX
MOV RAX,qword ptr [RDI + 0x108]
TEST RAX,RAX
JZ 0x001aa4d5
CMP qword ptr [RDI + 0x110],0x0
JZ 0x001aa4d5
MOV qword ptr [RSP],RDI
MOV ECX,dword ptr [RDI + 0x26c]
MOV EDX,dword ptr [RDI + 0x27c]
MOV RAX,qword ptr [RAX + 0x60]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x18]
MOV EAX,dword ptr [RAX]
CMP EDX,ECX
JNZ 0x001aa4b8
CMP EAX,EDX
JNZ 0x001aa4f4
MOV RCX,RSP
MOV RDI,RCX
XOR ESI,ESI
XOR EDX,EDX
JMP 0x001aa4ce
LAB_001aa4b8:
CMP EAX,ECX
JZ 0x001aa513
MOVZX EDX,SI
CMP EAX,EDX
JLE 0x001aa532
MOV RCX,RSP
MOV RDI,RCX
MOV ESI,0x1
LAB_001aa4ce:
CALL 0x001aa552
POP RAX
RET
LAB_001aa4d5:
LEA RDI,[0x1c7910]
LEA RSI,[0x1c792e]
LEA RCX,[0x1c7996]
MOV EDX,0x128
CALL 0x00139540
LAB_001aa4f4:
LEA RDI,[0x1c79ed]
LEA RSI,[0x1c792e]
LEA RCX,[0x1c7996]
MOV EDX,0x150
CALL 0x00139540
LAB_001aa513:
LEA RDI,[0x1c7a35]
LEA RSI,[0x1c792e]
LEA RCX,[0x1c7996]
MOV EDX,0x153
CALL 0x00139540
LAB_001aa532:
LEA RDI,[0x1c7a7d]
LEA RSI,[0x1c792e]
LEA RCX,[0x1c7996]
MOV EDX,0x154
CALL 0x00139540
|
/* OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::initializeProtoNodes(unsigned short) */
SubdivisionPlanBuilder * __thiscall
OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::initializeProtoNodes
(SubdivisionPlanBuilder *this,ushort param_1)
{
int iVar1;
SubdivisionPlanBuilder *local_8;
if ((*(long *)(this + 0x108) == 0) || (*(long *)(this + 0x110) == 0)) {
/* WARNING: Subroutine does not return */
__assert_fail("_faceRefiner && _patchBuilder",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/subdivisionPlanBuilder.cpp"
,0x128,
"void OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::initializeProtoNodes(LocalIndex)"
);
}
iVar1 = **(int **)(**(long **)(*(long *)(this + 0x108) + 0x60) + 0x18);
local_8 = this;
if (*(int *)(this + 0x27c) == *(int *)(this + 0x26c)) {
if (iVar1 != *(int *)(this + 0x27c)) {
/* WARNING: Subroutine does not return */
__assert_fail("_faceRefiner->GetLevel(0).GetFaceVertices(0).size() == _regularFaceSize",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/subdivisionPlanBuilder.cpp"
,0x150,
"void OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::initializeProtoNodes(LocalIndex)"
);
}
iVar1 = 0;
param_1 = 0;
}
else {
if (iVar1 == *(int *)(this + 0x26c)) {
/* WARNING: Subroutine does not return */
__assert_fail("_faceRefiner->GetLevel(0).GetFaceVertices(0).size() != _regularFaceSize",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/subdivisionPlanBuilder.cpp"
,0x153,
"void OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::initializeProtoNodes(LocalIndex)"
);
}
if (iVar1 <= (int)(uint)param_1) {
/* WARNING: Subroutine does not return */
__assert_fail("subfaceIndex < _faceRefiner->GetLevel(0).GetFaceVertices(0).size()",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/subdivisionPlanBuilder.cpp"
,0x154,
"void OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::initializeProtoNodes(LocalIndex)"
);
}
iVar1 = 1;
}
initializeProtoNodes(unsigned_short)::$_0::operator()
((__0 *)&local_8,iVar1,param_1,(__0 *)&local_8);
return local_8;
}
|
|
20,126
|
check_rules
|
eloqsql/strings/ctype-uca.c
|
static int
check_rules(MY_CHARSET_LOADER *loader,
const MY_COLL_RULES *rules,
const MY_UCA_WEIGHT_LEVEL *dst, const MY_UCA_WEIGHT_LEVEL *src)
{
const MY_COLL_RULE *r, *rlast;
for (r= rules->rule, rlast= rules->rule + rules->nrules; r < rlast; r++)
{
if (r->curr[0] > dst->maxchar)
{
my_snprintf(loader->error, sizeof(loader->error),
"Shift character out of range: u%04X", (uint) r->curr[0]);
return TRUE;
}
else if (r->base[0] > src->maxchar)
{
my_snprintf(loader->error, sizeof(loader->error),
"Reset character out of range: u%04X", (uint) r->base[0]);
return TRUE;
}
}
return FALSE;
}
|
O0
|
c
|
check_rules:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x18(%rbp), %rcx
imulq $0xa0, 0x10(%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0x59268
movq -0x30(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x20(%rbp), %rcx
cmpq (%rcx), %rax
jbe 0x59218
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x50(%rax), %rax
movl %eax, %ecx
movl $0x80, %esi
leaq 0x2d1aa(%rip), %rdx # 0x863b2
movb $0x0, %al
callq 0x7fa30
movl $0x1, -0x4(%rbp)
jmp 0x5926f
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq -0x28(%rbp), %rcx
cmpq (%rcx), %rax
jbe 0x59251
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rax
movq (%rax), %rax
movl %eax, %ecx
movl $0x80, %esi
leaq 0x2d195(%rip), %rdx # 0x863d6
movb $0x0, %al
callq 0x7fa30
movl $0x1, -0x4(%rbp)
jmp 0x5926f
jmp 0x59253
jmp 0x59255
movq -0x30(%rbp), %rax
addq $0xa0, %rax
movq %rax, -0x30(%rbp)
jmp 0x591cf
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
check_rules:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_18]
mov rax, [rax+20h]
mov [rbp+var_30], rax
mov rax, [rbp+var_18]
mov rax, [rax+20h]
mov rcx, [rbp+var_18]
imul rcx, [rcx+10h], 0A0h
add rax, rcx
mov [rbp+var_38], rax
loc_591CF:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_38]
jnb loc_59268
mov rax, [rbp+var_30]
mov rax, [rax+50h]
mov rcx, [rbp+var_20]
cmp rax, [rcx]
jbe short loc_59218
mov rdi, [rbp+var_10]
mov rax, [rbp+var_30]
mov rax, [rax+50h]
mov ecx, eax
mov esi, 80h
lea rdx, aShiftCharacter; "Shift character out of range: u%04X"
mov al, 0
call my_snprintf
mov [rbp+var_4], 1
jmp short loc_5926F
loc_59218:
mov rax, [rbp+var_30]
mov rax, [rax]
mov rcx, [rbp+var_28]
cmp rax, [rcx]
jbe short loc_59251
mov rdi, [rbp+var_10]
mov rax, [rbp+var_30]
mov rax, [rax]
mov ecx, eax
mov esi, 80h
lea rdx, aResetCharacter; "Reset character out of range: u%04X"
mov al, 0
call my_snprintf
mov [rbp+var_4], 1
jmp short loc_5926F
loc_59251:
jmp short $+2
loc_59253:
jmp short $+2
loc_59255:
mov rax, [rbp+var_30]
add rax, 0A0h
mov [rbp+var_30], rax
jmp loc_591CF
loc_59268:
mov [rbp+var_4], 0
loc_5926F:
mov eax, [rbp+var_4]
add rsp, 40h
pop rbp
retn
|
long long check_rules(int a1, long long a2, _QWORD *a3, _QWORD *a4, int a5, int a6)
{
_QWORD *i; // [rsp+10h] [rbp-30h]
for ( i = *(_QWORD **)(a2 + 32); (unsigned long long)i < 160LL * *(_QWORD *)(a2 + 16) + *(_QWORD *)(a2 + 32); i += 20 )
{
if ( i[10] > *a3 )
{
my_snprintf(a1, 128, (unsigned int)"Shift character out of range: u%04X", i[10], a5, a6);
return 1;
}
if ( *i > *a4 )
{
my_snprintf(a1, 128, (unsigned int)"Reset character out of range: u%04X", *i, a5, a6);
return 1;
}
}
return 0;
}
|
check_rules:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x20]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x20]
MOV RCX,qword ptr [RBP + -0x18]
IMUL RCX,qword ptr [RCX + 0x10],0xa0
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
LAB_001591cf:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x38]
JNC 0x00159268
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x50]
MOV RCX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RCX]
JBE 0x00159218
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x50]
MOV ECX,EAX
MOV ESI,0x80
LEA RDX,[0x1863b2]
MOV AL,0x0
CALL 0x0017fa30
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0015926f
LAB_00159218:
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RCX]
JBE 0x00159251
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV ECX,EAX
MOV ESI,0x80
LEA RDX,[0x1863d6]
MOV AL,0x0
CALL 0x0017fa30
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0015926f
LAB_00159251:
JMP 0x00159253
LAB_00159253:
JMP 0x00159255
LAB_00159255:
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0xa0
MOV qword ptr [RBP + -0x30],RAX
JMP 0x001591cf
LAB_00159268:
MOV dword ptr [RBP + -0x4],0x0
LAB_0015926f:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x40
POP RBP
RET
|
int4 check_rules(int8 param_1,long param_2,ulong *param_3,ulong *param_4)
{
ulong *local_38;
local_38 = *(ulong **)(param_2 + 0x20);
while( true ) {
if ((ulong *)(*(long *)(param_2 + 0x20) + *(long *)(param_2 + 0x10) * 0xa0) <= local_38) {
return 0;
}
if (*param_3 < local_38[10]) break;
if (*param_4 < *local_38) {
my_snprintf(param_1,0x80,"Reset character out of range: u%04X",*local_38 & 0xffffffff);
return 1;
}
local_38 = local_38 + 0x14;
}
my_snprintf(param_1,0x80,"Shift character out of range: u%04X",local_38[10] & 0xffffffff);
return 1;
}
|
|
20,127
|
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::start_object(unsigned long)
|
hkr04[P]cpp-mcp/common/json.hpp
|
bool start_object(std::size_t len)
{
// check callback for object start
const bool keep = callback(static_cast<int>(ref_stack.size()), parse_event_t::object_start, discarded);
keep_stack.push_back(keep);
auto val = handle_value(BasicJsonType::value_t::object, true);
ref_stack.push_back(val.second);
// check object limit
if (ref_stack.back() && JSON_HEDLEY_UNLIKELY(len != static_cast<std::size_t>(-1) && len > ref_stack.back()->max_size()))
{
JSON_THROW(out_of_range::create(408, concat("excessive object size: ", std::to_string(len)), ref_stack.back()));
}
return true;
}
|
O2
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::start_object(unsigned long):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r15
movq %rdi, %r14
addq $0x80, %rdi
leaq 0x8(%r14), %rbx
movq 0x10(%r14), %rsi
subq 0x8(%r14), %rsi
shrq $0x3, %rsi
leaq 0xa8(%r14), %rcx
xorl %edx, %edx
callq 0x3269a
leaq 0x20(%r14), %rdi
movzbl %al, %esi
callq 0x31996
leaq 0x8(%rsp), %rsi
movb $0x1, (%rsi)
pushq $0x1
popq %rdx
movq %r14, %rdi
callq 0x326be
leaq 0x50(%rsp), %rsi
movb %al, -0x8(%rsi)
movq %rdx, (%rsi)
movq %rbx, %rdi
callq 0x3282a
movq 0x10(%r14), %rax
movq -0x8(%rax), %rdi
testq %rdi, %rdi
sete %al
cmpq $-0x1, %r15
sete %cl
orb %al, %cl
jne 0x31f90
callq 0x32848
cmpq %r15, %rax
jb 0x31f9d
movb $0x1, %al
addq $0x58, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x82d0
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
movq %r15, %rsi
callq 0xa67f
leaq 0x9af4(%rip), %rsi # 0x3bab0
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x3295d
movq 0x10(%r14), %rax
movq -0x8(%rax), %rcx
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0x198, %esi # imm = 0x198
callq 0x32870
xorl %ebp, %ebp
leaq 0x28b17(%rip), %rsi # 0x5ab08
leaq -0x26b24(%rip), %rdx # 0xb4d4
movq %rbx, %rdi
callq 0x8960
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x8b18
jmp 0x32015
movq %rax, %r14
movb $0x1, %bpl
leaq 0x28(%rsp), %rdi
callq 0x8b18
testb %bpl, %bpl
jne 0x32029
jmp 0x32031
movq %rax, %r14
movq %rbx, %rdi
callq 0x8440
movq %r14, %rdi
callq 0x89c0
nop
|
_ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12start_objectEm:
push rbp
push r15
push r14; char
push rbx; int
sub rsp, 58h
mov r15, rsi
mov r14, rdi
add rdi, 80h
lea rbx, [r14+8]
mov rsi, [r14+10h]
sub rsi, [r14+8]
shr rsi, 3
lea rcx, [r14+0A8h]
xor edx, edx
call _ZNKSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEclEiS3_SH_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)>::operator()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)
lea rdi, [r14+20h]
movzx esi, al
call _ZNSt6vectorIbSaIbEE9push_backEb; std::vector<bool>::push_back(bool)
lea rsi, [rsp+78h+var_70]
mov byte ptr [rsi], 1
push 1
pop rdx
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12handle_valueINS1_7value_tEEESt4pairIbPSF_EOT_b; nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>(nlohmann::json_abi_v3_11_3::detail::value_t &&,bool)
lea rsi, [rsp+78h+var_28]
mov [rsi-8], al
mov [rsi], rdx
mov rdi, rbx
call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE9push_backERKSE_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *>>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> * const&)
mov rax, [r14+10h]
mov rdi, [rax-8]
test rdi, rdi
setz al
cmp r15, 0FFFFFFFFFFFFFFFFh
setz cl
or cl, al
jnz short loc_31F90
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8max_sizeEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::max_size(void)
cmp rax, r15
jb short loc_31F9D
loc_31F90:
mov al, 1
add rsp, 58h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_31F9D:
push 20h ; ' '
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+78h+var_50]; this
mov rsi, r15; unsigned __int64
call _ZNSt7__cxx119to_stringEm; std::to_string(ulong)
lea rsi, aExcessiveObjec; "excessive object size: "
lea rdi, [rsp+78h+var_70]
lea rdx, [rsp+78h+var_50]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA24_KcS8_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[24],std::string>(char const(&)[24],std::string &&)
mov rax, [r14+10h]
mov rcx, [rax-8]
mov bpl, 1
lea rdx, [rsp+78h+var_70]
mov rdi, rbx; this
mov esi, 198h; int
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rdi, [rsp+78h+var_70]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_32015
mov r14, rax
mov bpl, 1
loc_32015:
lea rdi, [rsp+78h+var_50]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_32029
jmp short loc_32031
mov r14, rax
loc_32029:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_32031:
mov rdi, r14
call __Unwind_Resume
|
char nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::start_object(
long long a1,
unsigned long long a2)
{
unsigned __int8 v2; // al
long long v3; // rdx
nlohmann::json_abi_v3_11_3::detail::out_of_range *exception; // rbx
char v6; // [rsp+0h] [rbp-78h]
int v7[6]; // [rsp+8h] [rbp-70h] BYREF
char v8; // [rsp+20h] [rbp-58h]
int v9[6]; // [rsp+28h] [rbp-50h] BYREF
char v10; // [rsp+40h] [rbp-38h]
int v11; // [rsp+48h] [rbp-30h]
long long v12; // [rsp+50h] [rbp-28h]
int v13; // [rsp+58h] [rbp-20h]
char v14; // [rsp+60h] [rbp-18h]
v2 = std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &)>::operator()(
a1 + 128,
(*(_QWORD *)(a1 + 16) - *(_QWORD *)(a1 + 8)) >> 3,
0LL,
a1 + 168);
std::vector<bool>::push_back(a1 + 32, v2);
LOBYTE(v7[0]) = 1;
LOBYTE(v11) = nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>(
a1,
v7,
1LL);
v12 = v3;
std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *>>::push_back(a1 + 8);
if ( *(_QWORD *)(*(_QWORD *)(a1 + 16) - 8LL) != 0LL
&& a2 != -1LL
&& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::max_size() < a2 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::out_of_range *)__cxa_allocate_exception(0x20uLL);
std::to_string((std::__cxx11 *)v9, a2);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[24],std::string>(
v7,
"excessive object size: ",
v9);
ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
408,
v6,
v7[0],
v7[2],
v7[4],
v8,
v9[0],
v9[2],
v9[4],
v10,
v11,
v12,
v13,
v14);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return 1;
}
|
start_object:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x58
MOV R15,RSI
MOV R14,RDI
ADD RDI,0x80
LEA RBX,[R14 + 0x8]
MOV RSI,qword ptr [R14 + 0x10]
SUB RSI,qword ptr [R14 + 0x8]
SHR RSI,0x3
LEA RCX,[R14 + 0xa8]
XOR EDX,EDX
CALL 0x0013269a
LEA RDI,[R14 + 0x20]
MOVZX ESI,AL
CALL 0x00131996
LEA RSI,[RSP + 0x8]
MOV byte ptr [RSI],0x1
PUSH 0x1
POP RDX
MOV RDI,R14
CALL 0x001326be
LEA RSI,[RSP + 0x50]
MOV byte ptr [RSI + -0x8],AL
MOV qword ptr [RSI],RDX
MOV RDI,RBX
CALL 0x0013282a
MOV RAX,qword ptr [R14 + 0x10]
MOV RDI,qword ptr [RAX + -0x8]
TEST RDI,RDI
SETZ AL
CMP R15,-0x1
SETZ CL
OR CL,AL
JNZ 0x00131f90
CALL 0x00132848
CMP RAX,R15
JC 0x00131f9d
LAB_00131f90:
MOV AL,0x1
ADD RSP,0x58
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00131f9d:
PUSH 0x20
POP RDI
CALL 0x001082d0
MOV RBX,RAX
LAB_00131fa8:
LEA RDI,[RSP + 0x28]
MOV RSI,R15
CALL 0x0010a67f
LAB_00131fb5:
LEA RSI,[0x13bab0]
LEA RDI,[RSP + 0x8]
LEA RDX,[RSP + 0x28]
CALL 0x0013295d
MOV RAX,qword ptr [R14 + 0x10]
MOV RCX,qword ptr [RAX + -0x8]
MOV BPL,0x1
LAB_00131fd6:
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV ESI,0x198
CALL 0x00132870
XOR EBP,EBP
LEA RSI,[0x15ab08]
LEA RDX,[0x10b4d4]
MOV RDI,RBX
CALL 0x00108960
|
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >::start_object(unsigned long) */
int8 __thiscall
nlohmann::json_abi_v3_11_3::detail::
json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::start_object(json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this,ulong param_1)
{
bool bVar1;
ulong uVar2;
int8 uVar3;
basic_json *extraout_RDX;
detail local_70 [32];
__cxx11 local_50 [32];
int1 local_30;
basic_json *local_28;
bVar1 = (bool)std::
function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)>
::operator()(this + 0x80,(ulong)(*(long *)(this + 0x10) - *(long *)(this + 8)) >> 3,
0,this + 0xa8);
std::vector<bool,std::allocator<bool>>::push_back
((vector<bool,std::allocator<bool>> *)(this + 0x20),bVar1);
local_70[0] = (detail)0x1;
local_30 = handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>(this,local_70,true);
local_28 = extraout_RDX;
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
::push_back((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
*)(this + 8),&local_28);
if (param_1 != 0xffffffffffffffff &&
*(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
**)(*(long *)(this + 0x10) + -8) !=
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)0x0) {
uVar2 = basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::max_size(*(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
**)(*(long *)(this + 0x10) + -8));
if (uVar2 < param_1) {
uVar3 = __cxa_allocate_exception(0x20);
/* try { // try from 00131fa8 to 00131fb4 has its CatchHandler @ 00132026 */
std::__cxx11::to_string(local_50,param_1);
/* try { // try from 00131fb5 to 00131fca has its CatchHandler @ 0013200f */
concat<std::__cxx11::string,char_const(&)[24],std::__cxx11::string>
(local_70,"excessive object size: ",(string *)local_50);
/* try { // try from 00131fd6 to 00131fff has its CatchHandler @ 00132000 */
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar3,0x198,local_70,*(int8 *)(*(long *)(this + 0x10) + -8));
/* WARNING: Subroutine does not return */
__cxa_throw(uVar3,&out_of_range::typeinfo,exception::~exception);
}
}
return 1;
}
|
|
20,128
|
ma_bitmap_set_pagecache_callbacks
|
eloqsql/storage/maria/ma_bitmap.c
|
void _ma_bitmap_set_pagecache_callbacks(PAGECACHE_FILE *file,
MARIA_SHARE *share)
{
pagecache_file_set_null_hooks(file);
file->callback_data= (uchar*) share;
file->flush_log_callback= maria_flush_log_for_page_none;
file->post_write_hook= maria_page_write_failure;
if (share->temporary)
{
file->post_read_hook= &maria_page_crc_check_none;
file->pre_write_hook= &maria_page_filler_set_none;
}
else
{
file->post_read_hook= &maria_page_crc_check_bitmap;
if (share->options & HA_OPTION_PAGE_CHECKSUM)
file->pre_write_hook= &maria_page_crc_set_normal;
else
file->pre_write_hook= &maria_page_filler_set_bitmap;
if (share->now_transactional)
file->flush_log_callback= flush_log_for_bitmap;
}
}
|
O3
|
c
|
ma_bitmap_set_pagecache_callbacks:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
callq 0x3d603
movq %r14, 0x40(%rbx)
leaq -0x142e6(%rip), %rax # 0x3e1e8
movq %rax, 0x38(%rbx)
leaq -0x14357(%rip), %rax # 0x3e182
movq %rax, 0x30(%rbx)
cmpb $0x0, 0x7d9(%r14)
je 0x524ff
leaq -0x143b9(%rip), %rax # 0x3e135
movq %rax, 0x20(%rbx)
leaq -0x1437f(%rip), %rax # 0x3e17a
movq %rax, 0x28(%rbx)
jmp 0x5253e
leaq -0x1444c(%rip), %rax # 0x3e0ba
movq %rax, 0x20(%rbx)
btl $0xb, 0x720(%r14)
jb 0x5251e
leaq -0x143bf(%rip), %rax # 0x3e15d
jmp 0x52525
leaq -0x14526(%rip), %rax # 0x3dfff
movq %rax, 0x28(%rbx)
cmpb $0x0, 0x7e7(%r14)
je 0x5253e
leaq 0x2551(%rip), %rax # 0x54a8b
movq %rax, 0x38(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
|
_ma_bitmap_set_pagecache_callbacks:
push rbp
mov rbp, rsp
push r14
push rbx
mov r14, rsi
mov rbx, rdi
call pagecache_file_set_null_hooks
mov [rbx+40h], r14
lea rax, maria_flush_log_for_page_none
mov [rbx+38h], rax
lea rax, maria_page_write_failure
mov [rbx+30h], rax
cmp byte ptr [r14+7D9h], 0
jz short loc_524FF
lea rax, maria_page_crc_check_none
mov [rbx+20h], rax
lea rax, maria_page_filler_set_none
mov [rbx+28h], rax
jmp short loc_5253E
loc_524FF:
lea rax, maria_page_crc_check_bitmap
mov [rbx+20h], rax
bt dword ptr [r14+720h], 0Bh
jb short loc_5251E
lea rax, maria_page_filler_set_bitmap
jmp short loc_52525
loc_5251E:
lea rax, maria_page_crc_set_normal
loc_52525:
mov [rbx+28h], rax
cmp byte ptr [r14+7E7h], 0
jz short loc_5253E
lea rax, flush_log_for_bitmap
mov [rbx+38h], rax
loc_5253E:
pop rbx
pop r14
pop rbp
retn
|
long long ( * ma_bitmap_set_pagecache_callbacks(_QWORD *a1, long long a2))(long long *a1)
{
long long ( *result)(long long *); // rax
pagecache_file_set_null_hooks((long long)a1);
a1[8] = a2;
a1[7] = maria_flush_log_for_page_none;
a1[6] = maria_page_write_failure;
if ( *(_BYTE *)(a2 + 2009) )
{
a1[4] = maria_page_crc_check_none;
result = (long long ( *)(long long *))maria_page_filler_set_none;
a1[5] = maria_page_filler_set_none;
}
else
{
a1[4] = maria_page_crc_check_bitmap;
if ( _bittest((const signed __int32 *)(a2 + 1824), 0xBu) )
result = maria_page_crc_set_normal;
else
result = maria_page_filler_set_bitmap;
a1[5] = result;
if ( *(_BYTE *)(a2 + 2023) )
{
result = (long long ( *)(long long *))flush_log_for_bitmap;
a1[7] = flush_log_for_bitmap;
}
}
return result;
}
|
_ma_bitmap_set_pagecache_callbacks:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV R14,RSI
MOV RBX,RDI
CALL 0x0013d603
MOV qword ptr [RBX + 0x40],R14
LEA RAX,[0x13e1e8]
MOV qword ptr [RBX + 0x38],RAX
LEA RAX,[0x13e182]
MOV qword ptr [RBX + 0x30],RAX
CMP byte ptr [R14 + 0x7d9],0x0
JZ 0x001524ff
LEA RAX,[0x13e135]
MOV qword ptr [RBX + 0x20],RAX
LEA RAX,[0x13e17a]
MOV qword ptr [RBX + 0x28],RAX
JMP 0x0015253e
LAB_001524ff:
LEA RAX,[0x13e0ba]
MOV qword ptr [RBX + 0x20],RAX
BT dword ptr [R14 + 0x720],0xb
JC 0x0015251e
LEA RAX,[0x13e15d]
JMP 0x00152525
LAB_0015251e:
LEA RAX,[0x13dfff]
LAB_00152525:
MOV qword ptr [RBX + 0x28],RAX
CMP byte ptr [R14 + 0x7e7],0x0
JZ 0x0015253e
LEA RAX,[0x154a8b]
MOV qword ptr [RBX + 0x38],RAX
LAB_0015253e:
POP RBX
POP R14
POP RBP
RET
|
void _ma_bitmap_set_pagecache_callbacks(long param_1,long param_2)
{
code *pcVar1;
pagecache_file_set_null_hooks();
*(long *)(param_1 + 0x40) = param_2;
*(code **)(param_1 + 0x38) = maria_flush_log_for_page_none;
*(code **)(param_1 + 0x30) = maria_page_write_failure;
if (*(char *)(param_2 + 0x7d9) == '\0') {
*(code **)(param_1 + 0x20) = maria_page_crc_check_bitmap;
if ((*(uint *)(param_2 + 0x720) >> 0xb & 1) == 0) {
pcVar1 = maria_page_filler_set_bitmap;
}
else {
pcVar1 = maria_page_crc_set_normal;
}
*(code **)(param_1 + 0x28) = pcVar1;
if (*(char *)(param_2 + 0x7e7) != '\0') {
*(code **)(param_1 + 0x38) = flush_log_for_bitmap;
}
}
else {
*(code **)(param_1 + 0x20) = maria_page_crc_check_none;
*(code **)(param_1 + 0x28) = maria_page_filler_set_none;
}
return;
}
|
|
20,129
|
maria_flush_log_for_page
|
eloqsql/storage/maria/ma_pagecrc.c
|
my_bool maria_flush_log_for_page(PAGECACHE_IO_HOOK_ARGS *args)
{
LSN lsn;
uchar *page= args->page;
MARIA_SHARE *share= (MARIA_SHARE *)args->data;
DBUG_ENTER("maria_flush_log_for_page");
/* share is 0 here only in unittest */
DBUG_ASSERT(!share || share->page_type == PAGECACHE_LSN_PAGE);
lsn= lsn_korr(page);
if (translog_flush(lsn))
DBUG_RETURN(1);
/*
Now when log is written, it's safe to incremented 'open' counter for
the table so that we know it was not closed properly.
*/
if (share && !share->global_changed)
_ma_mark_file_changed_now(share);
DBUG_RETURN(0);
}
|
O0
|
c
|
maria_flush_log_for_page:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x5ed55
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
movq -0x20(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x20(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movl %eax, %eax
shlq $0x20, %rax
movq -0x20(%rbp), %rcx
movl 0x3(%rcx), %ecx
orq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x57b80
cmpb $0x0, %al
je 0x5ed9f
jmp 0x5ed99
movb $0x1, -0x1(%rbp)
jmp 0x5edc2
cmpq $0x0, -0x28(%rbp)
je 0x5edbc
movq -0x28(%rbp), %rax
cmpb $0x0, 0x7df(%rax)
jne 0x5edbc
movq -0x28(%rbp), %rdi
callq 0x37160
jmp 0x5edbe
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
maria_flush_log_for_page:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov rax, [rax+10h]
mov [rbp+var_28], rax
jmp short $+2
loc_5ED55:
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
mov rcx, [rbp+var_20]
movzx ecx, byte ptr [rcx+1]
shl ecx, 8
or eax, ecx
mov rcx, [rbp+var_20]
movzx ecx, byte ptr [rcx+2]
shl ecx, 10h
or eax, ecx
mov eax, eax
shl rax, 20h
mov rcx, [rbp+var_20]
mov ecx, [rcx+3]
or rax, rcx
mov [rbp+var_18], rax
mov rdi, [rbp+var_18]
call translog_flush
cmp al, 0
jz short loc_5ED9F
jmp short $+2
loc_5ED99:
mov [rbp+var_1], 1
jmp short loc_5EDC2
loc_5ED9F:
cmp [rbp+var_28], 0
jz short loc_5EDBC
mov rax, [rbp+var_28]
cmp byte ptr [rax+7DFh], 0
jnz short loc_5EDBC
mov rdi, [rbp+var_28]
call _ma_mark_file_changed_now
loc_5EDBC:
jmp short $+2
loc_5EDBE:
mov [rbp+var_1], 0
loc_5EDC2:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
|
char maria_flush_log_for_page(unsigned __int16 **a1)
{
long long v2; // [rsp+8h] [rbp-28h]
v2 = (long long)a1[2];
if ( translog_flush(*(unsigned int *)((char *)*a1 + 3) | ((unsigned long long)((*((unsigned __int8 *)*a1 + 2) << 16) | (unsigned int)**a1) << 32)) )
return 1;
if ( v2 && !*(_BYTE *)(v2 + 2015) )
ma_mark_file_changed_now(v2);
return 0;
}
|
maria_flush_log_for_page:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x28],RAX
JMP 0x0015ed55
LAB_0015ed55:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RCX + 0x1]
SHL ECX,0x8
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RCX + 0x2]
SHL ECX,0x10
OR EAX,ECX
MOV EAX,EAX
SHL RAX,0x20
MOV RCX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RCX + 0x3]
OR RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00157b80
CMP AL,0x0
JZ 0x0015ed9f
JMP 0x0015ed99
LAB_0015ed99:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0015edc2
LAB_0015ed9f:
CMP qword ptr [RBP + -0x28],0x0
JZ 0x0015edbc
MOV RAX,qword ptr [RBP + -0x28]
CMP byte ptr [RAX + 0x7df],0x0
JNZ 0x0015edbc
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x00137160
LAB_0015edbc:
JMP 0x0015edbe
LAB_0015edbe:
MOV byte ptr [RBP + -0x1],0x0
LAB_0015edc2:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int1 maria_flush_log_for_page(long *param_1)
{
long lVar1;
char cVar2;
int1 local_9;
lVar1 = param_1[2];
cVar2 = translog_flush((ulong)CONCAT34(*(int3 *)*param_1,*(int4 *)(*param_1 + 3)));
if (cVar2 == '\0') {
if ((lVar1 != 0) && (*(char *)(lVar1 + 0x7df) == '\0')) {
_ma_mark_file_changed_now(lVar1);
}
local_9 = 0;
}
else {
local_9 = 1;
}
return local_9;
}
|
|
20,130
|
nglog::tools::SymbolizeAndDemangle(void*, char*, unsigned long, nglog::tools::SymbolizeOptions)
|
ng-log[P]ng-log/src/symbolize.cc
|
static ATTRIBUTE_NOINLINE bool SymbolizeAndDemangle(
void* pc, char* out, size_t out_size, SymbolizeOptions /*options*/) {
auto pc0 = reinterpret_cast<uintptr_t>(pc);
uint64_t start_address = 0;
uint64_t base_address = 0;
FileDescriptor object_fd;
if (out_size < 1) {
return false;
}
out[0] = '\0';
SafeAppendString("(", out, out_size);
if (g_symbolize_open_object_file_callback) {
object_fd.reset(g_symbolize_open_object_file_callback(
pc0, start_address, base_address, out + 1, out_size - 1));
} else {
object_fd = OpenObjectFileContainingPcAndGetStartAddress(
pc0, start_address, base_address, out + 1, out_size - 1);
}
# if defined(PRINT_UNSYMBOLIZED_STACK_TRACES)
{
# else
// Check whether a file name was returned.
if (!object_fd) {
# endif
if (out[1]) {
// The object file containing PC was determined successfully however the
// object file was not opened successfully. This is still considered
// success because the object file name and offset are known and tools
// like asan_symbolize.py can be used for the symbolization.
out[out_size - 1] = '\0'; // Making sure |out| is always null-terminated.
SafeAppendString("+0x", out, out_size);
SafeAppendHexNumber(pc0 - base_address, out, out_size);
SafeAppendString(")", out, out_size);
return true;
}
// Failed to determine the object file containing PC. Bail out.
return false;
}
int elf_type = FileGetElfType(object_fd.get());
if (elf_type == -1) {
return false;
}
if (g_symbolize_callback) {
// Run the call back if it's installed.
// Note: relocation (and much of the rest of this code) will be
// wrong for prelinked shared libraries and PIE executables.
uint64_t relocation = (elf_type == ET_DYN) ? start_address : 0;
int num_bytes_written =
g_symbolize_callback(object_fd.get(), pc, out, out_size, relocation);
if (num_bytes_written > 0) {
out += static_cast<size_t>(num_bytes_written);
out_size -= static_cast<size_t>(num_bytes_written);
}
}
if (!GetSymbolFromObjectFile(object_fd.get(), pc0, out, out_size,
base_address)) {
if (out[1] && !g_symbolize_callback) {
// The object file containing PC was opened successfully however the
// symbol was not found. The object may have been stripped. This is still
// considered success because the object file name and offset are known
// and tools like asan_symbolize.py can be used for the symbolization.
out[out_size - 1] = '\0'; // Making sure |out| is always null-terminated.
SafeAppendString("+0x", out, out_size);
SafeAppendHexNumber(pc0 - base_address, out, out_size);
SafeAppendString(")", out, out_size);
return true;
}
return false;
}
// Symbolization succeeded. Now we try to demangle the symbol.
DemangleInplace(out, out_size);
return true;
}
}
|
O1
|
cpp
|
nglog::tools::SymbolizeAndDemangle(void*, char*, unsigned long, nglog::tools::SymbolizeOptions):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
xorl %r13d, %r13d
movq %r13, 0x18(%rsp)
movq %r13, 0x10(%rsp)
testq %rdx, %rdx
je 0x2053e
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movb $0x0, (%rsi)
leaq 0x22eb(%rip), %rdi # 0x227fd
callq 0x207be
movq 0x1f4fa(%rip), %rax # 0x3fa18
testq %rax, %rax
je 0x20548
leaq 0x1(%r15), %rcx
leaq -0x1(%r14), %r8
leaq 0x18(%rsp), %rsi
leaq 0x10(%rsp), %rdx
movq %r12, %rdi
callq *%rax
movl %eax, %ebx
jmp 0x2056b
movl $0xffffffff, %ebx # imm = 0xFFFFFFFF
jmp 0x2076e
leaq 0x1(%r15), %r8
leaq -0x1(%r14), %r9
leaq 0x28(%rsp), %rdi
leaq 0x18(%rsp), %rdx
leaq 0x10(%rsp), %rcx
movq %r12, %rsi
callq 0x207fb
movl 0x28(%rsp), %ebx
cmpl $-0x1, %ebx
je 0x20706
leaq 0x28(%rsp), %rsi
movl $0x40, %edx
movl %ebx, %edi
xorl %ecx, %ecx
callq 0x20424
cmpq $0x40, %rax
sete %al
cmpl $0x464c457f, 0x28(%rsp) # imm = 0x464C457F
sete %cl
andb %al, %cl
je 0x20715
movq 0x1f468(%rip), %rax # 0x3fa10
testq %rax, %rax
je 0x205e5
xorl %r8d, %r8d
cmpw $0x3, 0x38(%rsp)
movl $0x0, %edx
jne 0x205c2
movq 0x18(%rsp), %rdx
testb %cl, %cl
cmovneq %rdx, %r8
movl %ebx, %edi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq *%rax
xorl %ecx, %ecx
testl %eax, %eax
movl %eax, %eax
cmovgq %rax, %rcx
subq %rcx, %r14
addq %rcx, %r15
movq 0x10(%rsp), %rax
movq %rax, 0x20(%rsp)
leaq 0x28(%rsp), %rsi
movl $0x40, %edx
movl %ebx, %edi
xorl %ecx, %ecx
callq 0x20424
cmpq $0x40, %rax
jne 0x2071a
movq 0x50(%rsp), %rbp
movzwl 0x64(%rsp), %r13d
leaq 0x68(%rsp), %r8
movl %ebx, %edi
movl %r13d, %esi
movq %rbp, %rdx
movl $0x2, %ecx
callq 0x20e00
testb %al, %al
je 0x20688
movl 0x90(%rsp), %ecx
shlq $0x6, %rcx
addq %rbp, %rcx
leaq 0xa8(%rsp), %rsi
movl $0x40, %edx
movl %ebx, %edi
callq 0x20424
cmpq $0x40, %rax
jne 0x2071a
leaq 0x68(%rsp), %rax
movq %rax, (%rsp)
leaq 0xa8(%rsp), %r9
movq %r12, %rdi
movl %ebx, %esi
movq %r15, %rdx
movq %r14, %rcx
movq 0x20(%rsp), %r8
callq 0x20f1f
testb %al, %al
jne 0x206f6
leaq 0x68(%rsp), %rax
movl %ebx, %edi
movl %r13d, %esi
movq %rax, %r13
movq %rbp, %rdx
movl $0xb, %ecx
movq %rax, %r8
callq 0x20e00
testb %al, %al
je 0x2071a
movl 0x90(%rsp), %ecx
shlq $0x6, %rcx
addq %rbp, %rcx
leaq 0xa8(%rsp), %rsi
movl $0x40, %edx
movl %ebx, %edi
callq 0x20424
cmpq $0x40, %rax
jne 0x2071a
movq %r13, (%rsp)
leaq 0xa8(%rsp), %r9
movq %r12, %rdi
movl %ebx, %esi
movq %r15, %rdx
movq %r14, %rcx
movq 0x20(%rsp), %r8
callq 0x20f1f
testb %al, %al
je 0x2071a
movb $0x1, %r13b
movq %r15, %rdi
movq %r14, %rsi
callq 0x20d0a
jmp 0x2076e
cmpb $0x0, 0x1(%r15)
je 0x20715
movb $0x0, -0x1(%r15,%r14)
jmp 0x20734
xorl %r13d, %r13d
jmp 0x2076e
xorl %r13d, %r13d
cmpb $0x0, 0x1(%r15)
je 0x2076e
cmpq $0x0, 0x1f2e4(%rip) # 0x3fa10
jne 0x2076e
movb $0x0, -0x1(%r14,%r15)
leaq 0x36f8(%rip), %rdi # 0x23e33
movq %r15, %rsi
movq %r14, %rdx
callq 0x207be
subq 0x10(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x20c83
leaq 0x2359(%rip), %rdi # 0x22ab9
movq %r15, %rsi
movq %r14, %rdx
callq 0x207be
movb $0x1, %r13b
cmpl $-0x1, %ebx
je 0x2077a
movl %ebx, %edi
callq 0x7a30
movl %r13d, %eax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2079f
jmp 0x20793
movq %rax, %r14
movl $0xffffffff, %ebx # imm = 0xFFFFFFFF
jmp 0x207a2
jmp 0x207b6
movq %rax, %r14
cmpl $-0x1, %ebx
je 0x207ae
movl %ebx, %edi
callq 0x7a30
movq %r14, %rdi
callq 0x7980
movq %rax, %rdi
callq 0x91a1
|
_ZN5nglog5toolsL20SymbolizeAndDemangleEPvPcmNS0_16SymbolizeOptionsE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0E8h
xor r13d, r13d
mov [rsp+118h+var_100], r13
mov [rsp+118h+var_108], r13
test rdx, rdx
jz short loc_2053E
mov r14, rdx
mov r15, rsi
mov r12, rdi
mov byte ptr [rsi], 0
lea rdi, asc_227FC+1; this
call _ZN5nglog5toolsL16SafeAppendStringEPKcPcm; nglog::tools::SafeAppendString(char const*,char *,ulong)
mov rax, cs:_ZN5nglog5tools12_GLOBAL__N_137g_symbolize_open_object_file_callbackE; nglog::tools::`anonymous namespace'::g_symbolize_open_object_file_callback
test rax, rax
jz short loc_20548
lea rcx, [r15+1]
lea r8, [r14-1]
lea rsi, [rsp+118h+var_100]
lea rdx, [rsp+118h+var_108]
mov rdi, r12
call rax ; nglog::tools::`anonymous namespace'::g_symbolize_open_object_file_callback
mov ebx, eax
jmp short loc_2056B
loc_2053E:
mov ebx, 0FFFFFFFFh
jmp loc_2076E
loc_20548:
lea r8, [r15+1]; char *
lea r9, [r14-1]; unsigned __int64
lea rdi, [rsp+118h+var_F0]; this
lea rdx, [rsp+118h+var_100]; unsigned __int64 *
lea rcx, [rsp+118h+var_108]; unsigned __int64 *
mov rsi, r12; unsigned __int64
call _ZN5nglog5toolsL44OpenObjectFileContainingPcAndGetStartAddressEmRmS1_Pcm; nglog::tools::OpenObjectFileContainingPcAndGetStartAddress(ulong,ulong &,ulong &,char *,ulong)
mov ebx, [rsp+118h+var_F0]
loc_2056B:
cmp ebx, 0FFFFFFFFh
jz loc_20706
lea rsi, [rsp+118h+var_F0]; int
mov edx, offset dword_40; void *
mov edi, ebx; this
xor ecx, ecx; unsigned __int64
call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong)
cmp rax, 40h ; '@'
setz al
cmp [rsp+118h+var_F0], 464C457Fh
setz cl
and cl, al
jz loc_20715
mov rax, cs:_ZN5nglog5tools12_GLOBAL__N_120g_symbolize_callbackE; nglog::tools::`anonymous namespace'::g_symbolize_callback
test rax, rax
jz short loc_205E5
xor r8d, r8d
cmp [rsp+118h+var_E0], 3
mov edx, 0
jnz short loc_205C2
mov rdx, [rsp+118h+var_100]
loc_205C2:
test cl, cl
cmovnz r8, rdx
mov edi, ebx
mov rsi, r12
mov rdx, r15
mov rcx, r14
call rax ; nglog::tools::`anonymous namespace'::g_symbolize_callback
xor ecx, ecx
test eax, eax
mov eax, eax
cmovg rcx, rax
sub r14, rcx
add r15, rcx
loc_205E5:
mov rax, [rsp+118h+var_108]
mov [rsp+118h+var_F8], rax
lea rsi, [rsp+118h+var_F0]; int
mov edx, offset dword_40; void *
mov edi, ebx; this
xor ecx, ecx; unsigned __int64
call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong)
cmp rax, 40h ; '@'
jnz loc_2071A
mov rbp, [rsp+118h+var_C8]
movzx r13d, [rsp+118h+var_B4]
lea r8, [rsp+118h+var_B0]
mov edi, ebx; this
mov esi, r13d
mov rdx, rbp
mov ecx, 2
call _ZN5nglog5toolsL22GetSectionHeaderByTypeEitmjP10Elf64_Shdr; nglog::tools::GetSectionHeaderByType(int,ushort,ulong,uint,Elf64_Shdr *)
test al, al
jz short loc_20688
mov ecx, [rsp+118h+var_88]
shl rcx, 6
add rcx, rbp; unsigned __int64
lea rsi, [rsp+118h+var_70]; int
mov edx, offset dword_40; void *
mov edi, ebx; this
call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong)
cmp rax, 40h ; '@'
jnz loc_2071A
lea rax, [rsp+118h+var_B0]
mov [rsp+118h+var_118], rax
lea r9, [rsp+118h+var_70]
mov rdi, r12
mov esi, ebx
mov rdx, r15
mov rcx, r14
mov r8, [rsp+118h+var_F8]
call _ZN5nglog5toolsL10FindSymbolEmiPcmmPK10Elf64_ShdrS4_; nglog::tools::FindSymbol(ulong,int,char *,ulong,ulong,Elf64_Shdr const*,Elf64_Shdr const*)
test al, al
jnz short loc_206F6
loc_20688:
lea rax, [rsp+118h+var_B0]
mov edi, ebx; this
mov esi, r13d
mov r13, rax
mov rdx, rbp
mov ecx, 0Bh
mov r8, rax
call _ZN5nglog5toolsL22GetSectionHeaderByTypeEitmjP10Elf64_Shdr; nglog::tools::GetSectionHeaderByType(int,ushort,ulong,uint,Elf64_Shdr *)
test al, al
jz short loc_2071A
mov ecx, [rsp+118h+var_88]
shl rcx, 6
add rcx, rbp; unsigned __int64
lea rsi, [rsp+118h+var_70]; int
mov edx, offset dword_40; void *
mov edi, ebx; this
call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong)
cmp rax, 40h ; '@'
jnz short loc_2071A
mov [rsp+118h+var_118], r13
lea r9, [rsp+118h+var_70]
mov rdi, r12
mov esi, ebx
mov rdx, r15
mov rcx, r14
mov r8, [rsp+118h+var_F8]
call _ZN5nglog5toolsL10FindSymbolEmiPcmmPK10Elf64_ShdrS4_; nglog::tools::FindSymbol(ulong,int,char *,ulong,ulong,Elf64_Shdr const*,Elf64_Shdr const*)
test al, al
jz short loc_2071A
loc_206F6:
mov r13b, 1
mov rdi, r15; this
mov rsi, r14; char *
call _ZN5nglog5tools12_GLOBAL__N_115DemangleInplaceEPcm; nglog::tools::`anonymous namespace'::DemangleInplace(char *,ulong)
jmp short loc_2076E
loc_20706:
cmp byte ptr [r15+1], 0
jz short loc_20715
mov byte ptr [r15+r14-1], 0
jmp short loc_20734
loc_20715:
xor r13d, r13d
jmp short loc_2076E
loc_2071A:
xor r13d, r13d
cmp byte ptr [r15+1], 0
jz short loc_2076E
cmp cs:_ZN5nglog5tools12_GLOBAL__N_120g_symbolize_callbackE, 0; nglog::tools::`anonymous namespace'::g_symbolize_callback
jnz short loc_2076E
mov byte ptr [r14+r15-1], 0
loc_20734:
lea rdi, a0x_0; "+0x"
mov rsi, r15; char *
mov rdx, r14; char *
call _ZN5nglog5toolsL16SafeAppendStringEPKcPcm; nglog::tools::SafeAppendString(char const*,char *,ulong)
sub r12, [rsp+118h+var_108]
mov rdi, r12; this
mov rsi, r15; unsigned __int64
mov rdx, r14; char *
call _ZN5nglog5toolsL19SafeAppendHexNumberEmPcm; nglog::tools::SafeAppendHexNumber(ulong,char *,ulong)
lea rdi, aVoidNglogAnony+86h; this
mov rsi, r15; char *
mov rdx, r14; char *
call _ZN5nglog5toolsL16SafeAppendStringEPKcPcm; nglog::tools::SafeAppendString(char const*,char *,ulong)
mov r13b, 1
loc_2076E:
cmp ebx, 0FFFFFFFFh
jz short loc_2077A
mov edi, ebx
call _close
loc_2077A:
mov eax, r13d
add rsp, 0E8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_2079F
jmp short $+2
loc_20793:
mov r14, rax
mov ebx, 0FFFFFFFFh
jmp short loc_207A2
jmp short loc_207B6
loc_2079F:
mov r14, rax
loc_207A2:
cmp ebx, 0FFFFFFFFh
jz short loc_207AE
mov edi, ebx
call _close
loc_207AE:
mov rdi, r14
call __Unwind_Resume
loc_207B6:
mov rdi, rax
call __clang_call_terminate
|
long long nglog::tools::SymbolizeAndDemangle(
unsigned long long a1,
nglog::tools::_anonymous_namespace_ *this,
char *a3,
unsigned long long a4)
{
_BYTE *v4; // r13
char *v5; // r14
nglog::tools::_anonymous_namespace_ *v6; // r15
unsigned long long v7; // rcx
unsigned int v8; // ebx
unsigned long long v9; // rax
unsigned long long v10; // rdx
int v11; // eax
long long v12; // rcx
long long v13; // rbp
unsigned long long v14; // rdx
unsigned long long v15; // rcx
unsigned long long v16; // rcx
unsigned long long v18; // [rsp+10h] [rbp-108h] BYREF
unsigned long long v19; // [rsp+18h] [rbp-100h] BYREF
unsigned long long v20; // [rsp+20h] [rbp-F8h]
int v21[4]; // [rsp+28h] [rbp-F0h] BYREF
__int16 v22; // [rsp+38h] [rbp-E0h]
long long v23; // [rsp+50h] [rbp-C8h]
unsigned __int16 v24; // [rsp+64h] [rbp-B4h]
_BYTE v25[40]; // [rsp+68h] [rbp-B0h] BYREF
unsigned int v26; // [rsp+90h] [rbp-88h]
int v27[28]; // [rsp+A8h] [rbp-70h] BYREF
LODWORD(v4) = 0;
v19 = 0LL;
v18 = 0LL;
if ( !a3 )
{
v8 = -1;
goto LABEL_29;
}
v5 = a3;
v6 = this;
*(_BYTE *)this = 0;
nglog::tools::SafeAppendString((nglog::tools *)"(", (const char *)this, a3, a4);
if ( nglog::tools::`anonymous namespace'::g_symbolize_open_object_file_callback )
{
v8 = nglog::tools::`anonymous namespace'::g_symbolize_open_object_file_callback(
a1,
&v19,
&v18,
(char *)this + 1,
v5 - 1);
}
else
{
nglog::tools::OpenObjectFileContainingPcAndGetStartAddress(
(nglog::tools *)v21,
a1,
&v19,
&v18,
(char *)this + 1,
(unsigned long long)(v5 - 1));
v8 = v21[0];
}
if ( v8 == -1 )
{
if ( *((_BYTE *)this + 1) )
{
v5[(_QWORD)this - 1] = 0;
LABEL_28:
nglog::tools::SafeAppendString((nglog::tools *)"+0x", (const char *)v6, v5, v7);
nglog::tools::SafeAppendHexNumber((nglog::tools *)(a1 - v18), (unsigned long long)v6, v5, v15);
nglog::tools::SafeAppendString((nglog::tools *)")", (const char *)v6, v5, v16);
LOBYTE(v4) = 1;
goto LABEL_29;
}
LABEL_24:
LODWORD(v4) = 0;
goto LABEL_29;
}
v9 = nglog::tools::ReadFromOffset(v8, (long long)v21, (char *)&dword_40, 0LL);
if ( v9 != 64 || v21[0] != 1179403647 )
goto LABEL_24;
if ( nglog::tools::`anonymous namespace'::g_symbolize_callback )
{
v10 = 0LL;
if ( v22 == 3 )
v10 = v19;
v11 = nglog::tools::`anonymous namespace'::g_symbolize_callback(v8, a1, this, v5, v10);
v12 = 0LL;
if ( v11 > 0 )
v12 = (unsigned int)v11;
v5 -= v12;
v6 = (nglog::tools::_anonymous_namespace_ *)((char *)this + v12);
}
v20 = v18;
if ( nglog::tools::ReadFromOffset(v8, (long long)v21, (char *)&dword_40, 0LL) == 64 )
{
v13 = v23;
LODWORD(v4) = v24;
if ( (unsigned __int8)nglog::tools::GetSectionHeaderByType((nglog::tools *)v8) )
{
if ( nglog::tools::ReadFromOffset(v8, (long long)v27, (char *)&dword_40, v13 + ((unsigned long long)v26 << 6)) != 64 )
goto LABEL_25;
if ( (unsigned __int8)nglog::tools::FindSymbol(a1, v8, v6, v5, v20, v27, v25) )
{
LABEL_21:
LOBYTE(v4) = 1;
nglog::tools::`anonymous namespace'::DemangleInplace(v6, v5, v14);
goto LABEL_29;
}
}
v4 = v25;
if ( (unsigned __int8)nglog::tools::GetSectionHeaderByType((nglog::tools *)v8)
&& nglog::tools::ReadFromOffset(v8, (long long)v27, (char *)&dword_40, v13 + ((unsigned long long)v26 << 6)) == 64
&& (unsigned __int8)nglog::tools::FindSymbol(a1, v8, v6, v5, v20, v27, v25) )
{
goto LABEL_21;
}
}
LABEL_25:
LODWORD(v4) = 0;
if ( *((_BYTE *)v6 + 1) && !nglog::tools::`anonymous namespace'::g_symbolize_callback )
{
*((_BYTE *)v6 + (_QWORD)v5 - 1) = 0;
goto LABEL_28;
}
LABEL_29:
if ( v8 != -1 )
close(v8);
return (unsigned int)v4;
}
|
SymbolizeAndDemangle:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xe8
XOR R13D,R13D
MOV qword ptr [RSP + 0x18],R13
MOV qword ptr [RSP + 0x10],R13
TEST RDX,RDX
JZ 0x0012053e
MOV R14,RDX
MOV R15,RSI
MOV R12,RDI
MOV byte ptr [RSI],0x0
LEA RDI,[0x1227fd]
CALL 0x001207be
MOV RAX,qword ptr [0x0013fa18]
TEST RAX,RAX
JZ 0x00120548
LEA RCX,[R15 + 0x1]
LEA R8,[R14 + -0x1]
LAB_0012052b:
LEA RSI,[RSP + 0x18]
LEA RDX,[RSP + 0x10]
MOV RDI,R12
CALL RAX
MOV EBX,EAX
JMP 0x0012056b
LAB_0012053e:
MOV EBX,0xffffffff
JMP 0x0012076e
LAB_00120548:
LEA R8,[R15 + 0x1]
LEA R9,[R14 + -0x1]
LAB_00120550:
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x18]
LEA RCX,[RSP + 0x10]
MOV RSI,R12
CALL 0x001207fb
MOV EBX,dword ptr [RSP + 0x28]
LAB_0012056b:
CMP EBX,-0x1
JZ 0x00120706
LAB_00120574:
LEA RSI,[RSP + 0x28]
MOV EDX,0x40
MOV EDI,EBX
XOR ECX,ECX
CALL 0x00120424
CMP RAX,0x40
SETZ AL
CMP dword ptr [RSP + 0x28],0x464c457f
SETZ CL
AND CL,AL
JZ 0x00120715
MOV RAX,qword ptr [0x0013fa10]
TEST RAX,RAX
JZ 0x001205e5
XOR R8D,R8D
CMP word ptr [RSP + 0x38],0x3
MOV EDX,0x0
JNZ 0x001205c2
MOV RDX,qword ptr [RSP + 0x18]
LAB_001205c2:
TEST CL,CL
CMOVNZ R8,RDX
LAB_001205c8:
MOV EDI,EBX
MOV RSI,R12
MOV RDX,R15
MOV RCX,R14
CALL RAX
XOR ECX,ECX
TEST EAX,EAX
MOV EAX,EAX
CMOVG RCX,RAX
SUB R14,RCX
ADD R15,RCX
LAB_001205e5:
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x20],RAX
LAB_001205ef:
LEA RSI,[RSP + 0x28]
MOV EDX,0x40
MOV EDI,EBX
XOR ECX,ECX
CALL 0x00120424
CMP RAX,0x40
JNZ 0x0012071a
MOV RBP,qword ptr [RSP + 0x50]
MOVZX R13D,word ptr [RSP + 0x64]
LEA R8,[RSP + 0x68]
MOV EDI,EBX
MOV ESI,R13D
MOV RDX,RBP
MOV ECX,0x2
CALL 0x00120e00
TEST AL,AL
JZ 0x00120688
MOV ECX,dword ptr [RSP + 0x90]
SHL RCX,0x6
ADD RCX,RBP
LEA RSI,[RSP + 0xa8]
MOV EDX,0x40
MOV EDI,EBX
CALL 0x00120424
CMP RAX,0x40
JNZ 0x0012071a
LEA RAX,[RSP + 0x68]
MOV qword ptr [RSP],RAX
LEA R9,[RSP + 0xa8]
MOV RDI,R12
MOV ESI,EBX
MOV RDX,R15
MOV RCX,R14
MOV R8,qword ptr [RSP + 0x20]
CALL 0x00120f1f
TEST AL,AL
JNZ 0x001206f6
LAB_00120688:
LEA RAX,[RSP + 0x68]
MOV EDI,EBX
MOV ESI,R13D
MOV R13,RAX
MOV RDX,RBP
MOV ECX,0xb
MOV R8,RAX
CALL 0x00120e00
TEST AL,AL
JZ 0x0012071a
MOV ECX,dword ptr [RSP + 0x90]
SHL RCX,0x6
ADD RCX,RBP
LEA RSI,[RSP + 0xa8]
MOV EDX,0x40
MOV EDI,EBX
CALL 0x00120424
CMP RAX,0x40
JNZ 0x0012071a
MOV qword ptr [RSP],R13
LEA R9,[RSP + 0xa8]
MOV RDI,R12
MOV ESI,EBX
MOV RDX,R15
MOV RCX,R14
MOV R8,qword ptr [RSP + 0x20]
CALL 0x00120f1f
TEST AL,AL
JZ 0x0012071a
LAB_001206f6:
MOV R13B,0x1
MOV RDI,R15
MOV RSI,R14
CALL 0x00120d0a
JMP 0x0012076e
LAB_00120706:
CMP byte ptr [R15 + 0x1],0x0
JZ 0x00120715
MOV byte ptr [R15 + R14*0x1 + -0x1],0x0
JMP 0x00120734
LAB_00120715:
XOR R13D,R13D
JMP 0x0012076e
LAB_0012071a:
XOR R13D,R13D
CMP byte ptr [R15 + 0x1],0x0
JZ 0x0012076e
CMP qword ptr [0x0013fa10],0x0
JNZ 0x0012076e
MOV byte ptr [R14 + R15*0x1 + -0x1],0x0
LAB_00120734:
LEA RDI,[0x123e33]
MOV RSI,R15
MOV RDX,R14
CALL 0x001207be
SUB R12,qword ptr [RSP + 0x10]
MOV RDI,R12
MOV RSI,R15
MOV RDX,R14
CALL 0x00120c83
LEA RDI,[0x122ab9]
MOV RSI,R15
MOV RDX,R14
CALL 0x001207be
MOV R13B,0x1
LAB_0012076e:
CMP EBX,-0x1
JZ 0x0012077a
LAB_00120773:
MOV EDI,EBX
CALL 0x00107a30
LAB_0012077a:
MOV EAX,R13D
ADD RSP,0xe8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* nglog::tools::SymbolizeAndDemangle(void*, char*, unsigned long, nglog::tools::SymbolizeOptions)
*/
ulong nglog::tools::SymbolizeAndDemangle(ulong param_1,char *param_2,ulong param_3)
{
char cVar1;
int __fd;
uint uVar2;
long lVar3;
ulong uVar4;
ulong uVar5;
Elf64_Shdr *pEVar6;
ulong local_108;
ulong local_100;
ulong local_f8;
int local_f0 [4];
short local_e0;
ulong local_c8;
ushort local_b4;
Elf64_Shdr local_b0;
Elf64_Shdr local_70;
uVar5 = 0;
local_100 = 0;
local_108 = 0;
if (param_3 == 0) {
__fd = -1;
goto LAB_0012076e;
}
*param_2 = '\0';
SafeAppendString("(",param_2,param_3);
if ((anonymous_namespace)::g_symbolize_open_object_file_callback == (code *)0x0) {
/* try { // try from 00120550 to 00120566 has its CatchHandler @ 00120791 */
OpenObjectFileContainingPcAndGetStartAddress
((tools *)local_f0,param_1,&local_100,&local_108,param_2 + 1,param_3 - 1);
__fd = local_f0[0];
}
else {
/* try { // try from 0012052b to 00120539 has its CatchHandler @ 00120793 */
__fd = (*(anonymous_namespace)::g_symbolize_open_object_file_callback)
(param_1,&local_100,&local_108,param_2 + 1,param_3 - 1);
}
if (__fd == -1) {
if (param_2[1] == '\0') goto LAB_00120715;
param_2[param_3 - 1] = '\0';
}
else {
/* try { // try from 00120574 to 00120586 has its CatchHandler @ 0012079f */
lVar3 = ReadFromOffset(__fd,local_f0,0x40,0);
if (local_f0[0] != 0x464c457f || lVar3 != 0x40) {
LAB_00120715:
uVar5 = 0;
goto LAB_0012076e;
}
if ((anonymous_namespace)::g_symbolize_callback != (code *)0x0) {
uVar5 = 0;
if (local_e0 == 3) {
uVar5 = local_100;
}
uVar4 = 0;
if (local_f0[0] == 0x464c457f && lVar3 == 0x40) {
uVar4 = uVar5;
}
/* try { // try from 001205c8 to 001205d4 has its CatchHandler @ 0012078f */
uVar2 = (*(anonymous_namespace)::g_symbolize_callback)(__fd,param_1,param_2,param_3,uVar4);
uVar5 = 0;
if (0 < (int)uVar2) {
uVar5 = (ulong)uVar2;
}
param_3 = param_3 - uVar5;
param_2 = param_2 + uVar5;
}
local_f8 = local_108;
/* try { // try from 001205ef to 00120703 has its CatchHandler @ 0012079f */
lVar3 = ReadFromOffset(__fd,local_f0,0x40,0);
if (lVar3 == 0x40) {
pEVar6 = (Elf64_Shdr *)(ulong)local_b4;
cVar1 = GetSectionHeaderByType(__fd,local_b4,local_c8,2,&local_b0);
if (cVar1 == '\0') {
LAB_00120688:
pEVar6 = &local_b0;
cVar1 = GetSectionHeaderByType(__fd,local_b4,local_c8,0xb,pEVar6);
if (cVar1 != '\0') {
lVar3 = ReadFromOffset(__fd,&local_70,0x40,(ulong)local_b0.sh_link * 0x40 + local_c8);
if (lVar3 == 0x40) {
cVar1 = FindSymbol(param_1,__fd,param_2,param_3,local_f8,&local_70,pEVar6);
if (cVar1 != '\0') goto LAB_001206f6;
}
}
}
else {
lVar3 = ReadFromOffset(__fd,&local_70,0x40,(ulong)local_b0.sh_link * 0x40 + local_c8);
if (lVar3 == 0x40) {
cVar1 = FindSymbol(param_1,__fd,param_2,param_3,local_f8,&local_70,&local_b0);
if (cVar1 == '\0') goto LAB_00120688;
LAB_001206f6:
uVar5 = CONCAT71((int7)((ulong)pEVar6 >> 8),1);
(anonymous_namespace)::DemangleInplace(param_2,param_3);
goto LAB_0012076e;
}
}
}
uVar5 = 0;
if ((param_2[1] == '\0') || ((anonymous_namespace)::g_symbolize_callback != (code *)0x0))
goto LAB_0012076e;
param_2[param_3 - 1] = '\0';
}
SafeAppendString("+0x",param_2,param_3);
SafeAppendHexNumber(param_1 - local_108,param_2,param_3);
SafeAppendString(")",param_2,param_3);
uVar5 = 1;
LAB_0012076e:
if (__fd != -1) {
/* try { // try from 00120773 to 00120779 has its CatchHandler @ 0012079d */
close(__fd);
}
return uVar5 & 0xffffffff;
}
|
|
20,131
|
print_usage(int, char**)
|
monkey531[P]llama/examples/cvector-generator/cvector-generator.cpp
|
static void print_usage(int, char ** argv) {
printf("\nexample usage:\n");
printf("\n CPU only: %s -m ./llama-3.Q4_K_M.gguf\n", argv[0]);
printf("\n with GPU: %s -m ./llama-3.Q4_K_M.gguf -ngl 99\n", argv[0]);
printf("\n advanced: %s -m ./llama-3.Q4_K_M.gguf -ngl 99 --pca-iter 2000 --pca-batch 100\n", argv[0]);
printf("\n using mean: %s -m ./llama-3.Q4_K_M.gguf --method mean\n", argv[0]);
printf("\n");
}
|
O2
|
cpp
|
print_usage(int, char**):
pushq %rbx
movq %rsi, %rbx
leaq 0x85bbc(%rip), %rdi # 0xad8b2
callq 0x24fe0
movq (%rbx), %rsi
leaq 0x85588(%rip), %rdi # 0xad28d
xorl %eax, %eax
callq 0x24060
movq (%rbx), %rsi
leaq 0x855a5(%rip), %rdi # 0xad2bb
xorl %eax, %eax
callq 0x24060
movq (%rbx), %rsi
leaq 0x855ca(%rip), %rdi # 0xad2f1
xorl %eax, %eax
callq 0x24060
movq (%rbx), %rsi
leaq 0x8560f(%rip), %rdi # 0xad347
xorl %eax, %eax
callq 0x24060
pushq $0xa
popq %rdi
popq %rbx
jmp 0x24e80
|
_ZL11print_usageiPPc:
push rbx
mov rbx, rsi
lea rdi, aExampleUsage; "\nexample usage:"
call _puts
mov rsi, [rbx]
lea rdi, aCpuOnlySMLlama; "\n CPU only: %s -m ./llama-3.Q4_K_"...
xor eax, eax
call _printf
mov rsi, [rbx]
lea rdi, aWithGpuSMLlama; "\n with GPU: %s -m ./llama-3.Q4_K_"...
xor eax, eax
call _printf
mov rsi, [rbx]
lea rdi, aAdvancedSMLlam; "\n advanced: %s -m ./llama-3.Q4_K_"...
xor eax, eax
call _printf
mov rsi, [rbx]
lea rdi, aUsingMeanSMLla; "\n using mean: %s -m ./llama-3.Q4_K_"...
xor eax, eax
call _printf
push 0Ah
pop rdi
pop rbx
jmp _putchar
|
long long print_usage(int a1, char **a2, long long a3, long long a4)
{
puts("\nexample usage:", a2, a3, a4);
printf("\n CPU only: %s -m ./llama-3.Q4_K_M.gguf\n", *a2);
printf("\n with GPU: %s -m ./llama-3.Q4_K_M.gguf -ngl 99\n", *a2);
printf("\n advanced: %s -m ./llama-3.Q4_K_M.gguf -ngl 99 --pca-iter 2000 --pca-batch 100\n", *a2);
printf("\n using mean: %s -m ./llama-3.Q4_K_M.gguf --method mean\n", *a2);
return putchar(10LL);
}
|
print_usage:
PUSH RBX
MOV RBX,RSI
LEA RDI,[0x1ad8b2]
CALL 0x00124fe0
MOV RSI,qword ptr [RBX]
LEA RDI,[0x1ad28d]
XOR EAX,EAX
CALL 0x00124060
MOV RSI,qword ptr [RBX]
LEA RDI,[0x1ad2bb]
XOR EAX,EAX
CALL 0x00124060
MOV RSI,qword ptr [RBX]
LEA RDI,[0x1ad2f1]
XOR EAX,EAX
CALL 0x00124060
MOV RSI,qword ptr [RBX]
LEA RDI,[0x1ad347]
XOR EAX,EAX
CALL 0x00124060
PUSH 0xa
POP RDI
POP RBX
JMP 0x00124e80
|
/* print_usage(int, char**) */
void print_usage(int param_1,char **param_2)
{
puts("\nexample usage:");
printf("\n CPU only: %s -m ./llama-3.Q4_K_M.gguf\n",*param_2);
printf("\n with GPU: %s -m ./llama-3.Q4_K_M.gguf -ngl 99\n",*param_2);
printf("\n advanced: %s -m ./llama-3.Q4_K_M.gguf -ngl 99 --pca-iter 2000 --pca-batch 100\n",
*param_2);
printf("\n using mean: %s -m ./llama-3.Q4_K_M.gguf --method mean\n",*param_2);
putchar(10);
return;
}
|
|
20,132
|
my_setwd
|
eloqsql/mysys/my_getwd.c
|
int my_setwd(const char *dir, myf MyFlags)
{
int res;
size_t length;
char *start, *pos;
DBUG_ENTER("my_setwd");
DBUG_PRINT("my",("dir: '%s' MyFlags %lu", dir, MyFlags));
start=(char *) dir;
if (! dir[0] || (dir[0] == FN_LIBCHAR && dir[1] == 0))
dir=FN_ROOTDIR;
if ((res=chdir((char*) dir)) != 0)
{
my_errno=errno;
if (MyFlags & MY_WME)
my_error(EE_SETWD,MYF(ME_BELL),start,errno);
}
else
{
if (test_if_hard_path(start))
{ /* Hard pathname */
pos= strmake(&curr_dir[0],start,(size_t) FN_REFLEN-1);
if (pos[-1] != FN_LIBCHAR)
{
length=(uint) (pos-(char*) curr_dir);
curr_dir[length]=FN_LIBCHAR; /* must end with '/' */
curr_dir[length+1]='\0';
}
}
else
curr_dir[0]='\0'; /* Don't save name */
}
DBUG_RETURN(res);
}
|
O0
|
c
|
my_setwd:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
jmp 0x7e4a2
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
cmpb $0x0, (%rax)
je 0x7e4cc
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0x7e4d7
movq -0x8(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
jne 0x7e4d7
leaq 0x62323(%rip), %rax # 0xe07f6
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x28580
movl %eax, -0x14(%rbp)
cmpl $0x0, %eax
je 0x7e530
callq 0x28040
movl (%rax), %eax
movl %eax, -0x34(%rbp)
callq 0x841b0
movl -0x34(%rbp), %ecx
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
andq $0x10, %rax
cmpq $0x0, %rax
je 0x7e52e
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
callq 0x28040
movq -0x40(%rbp), %rdx
movl (%rax), %ecx
movl $0x11, %edi
movl $0x4, %esi
movb $0x0, %al
callq 0x7a620
jmp 0x7e5a5
movq -0x28(%rbp), %rdi
callq 0x7e5c0
cmpl $0x0, %eax
je 0x7e599
movq -0x28(%rbp), %rsi
leaq 0x380557(%rip), %rdi # 0x3feaa0
movl $0x1ff, %edx # imm = 0x1FF
callq 0xdafd0
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movsbl -0x1(%rax), %eax
cmpl $0x2f, %eax
je 0x7e597
movq -0x30(%rbp), %rax
leaq 0x380531(%rip), %rcx # 0x3feaa0
subq %rcx, %rax
movl %eax, %eax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rcx
leaq 0x38051d(%rip), %rax # 0x3feaa0
movb $0x2f, (%rax,%rcx)
movq -0x20(%rbp), %rcx
leaq 0x38050e(%rip), %rax # 0x3feaa0
movb $0x0, 0x1(%rax,%rcx)
jmp 0x7e5a3
leaq 0x380500(%rip), %rax # 0x3feaa0
movb $0x0, (%rax)
jmp 0x7e5a5
jmp 0x7e5a7
movl -0x14(%rbp), %eax
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_setwd:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
jmp short $+2
loc_7E4A2:
mov rax, [rbp+var_8]
mov [rbp+var_28], rax
mov rax, [rbp+var_8]
cmp byte ptr [rax], 0
jz short loc_7E4CC
mov rax, [rbp+var_8]
movsx eax, byte ptr [rax]
cmp eax, 2Fh ; '/'
jnz short loc_7E4D7
mov rax, [rbp+var_8]
movsx eax, byte ptr [rax+1]
cmp eax, 0
jnz short loc_7E4D7
loc_7E4CC:
lea rax, word_E07F6
mov [rbp+var_8], rax
loc_7E4D7:
mov rdi, [rbp+var_8]
call _chdir
mov [rbp+var_14], eax
cmp eax, 0
jz short loc_7E530
call ___errno_location
mov eax, [rax]
mov [rbp+var_34], eax
call _my_thread_var
mov ecx, [rbp+var_34]
mov [rax], ecx
mov rax, [rbp+var_10]
and rax, 10h
cmp rax, 0
jz short loc_7E52E
mov rax, [rbp+var_28]
mov [rbp+var_40], rax
call ___errno_location
mov rdx, [rbp+var_40]
mov ecx, [rax]
mov edi, 11h
mov esi, 4
mov al, 0
call my_error
loc_7E52E:
jmp short loc_7E5A5
loc_7E530:
mov rdi, [rbp+var_28]
call test_if_hard_path
cmp eax, 0
jz short loc_7E599
mov rsi, [rbp+var_28]
lea rdi, curr_dir
mov edx, 1FFh
call strmake
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
movsx eax, byte ptr [rax-1]
cmp eax, 2Fh ; '/'
jz short loc_7E597
mov rax, [rbp+var_30]
lea rcx, curr_dir
sub rax, rcx
mov eax, eax
mov [rbp+var_20], rax
mov rcx, [rbp+var_20]
lea rax, curr_dir
mov byte ptr [rax+rcx], 2Fh ; '/'
mov rcx, [rbp+var_20]
lea rax, curr_dir
mov byte ptr [rax+rcx+1], 0
loc_7E597:
jmp short loc_7E5A3
loc_7E599:
lea rax, curr_dir
mov byte ptr [rax], 0
loc_7E5A3:
jmp short $+2
loc_7E5A5:
jmp short $+2
loc_7E5A7:
mov eax, [rbp+var_14]
mov [rbp+var_44], eax
mov eax, [rbp+var_44]
add rsp, 50h
pop rbp
retn
|
long long my_setwd(__int16 *a1, char a2)
{
unsigned int *v2; // rax
int v4; // [rsp+1Ch] [rbp-34h]
long long v5; // [rsp+20h] [rbp-30h]
unsigned int v6; // [rsp+3Ch] [rbp-14h]
__int16 *v7; // [rsp+48h] [rbp-8h]
v7 = a1;
if ( !*(_BYTE *)a1 || *(_BYTE *)a1 == 47 && !*((_BYTE *)a1 + 1) )
v7 = &word_E07F6;
v6 = chdir(v7);
if ( v6 )
{
v4 = *(_DWORD *)__errno_location();
*(_DWORD *)my_thread_var(v7) = v4;
if ( (a2 & 0x10) != 0 )
{
v2 = (unsigned int *)__errno_location();
my_error(0x11u, 4LL, a1, *v2);
}
}
else if ( (unsigned int)test_if_hard_path(a1) )
{
v5 = strmake(curr_dir, a1, 511LL);
if ( *(_BYTE *)(v5 - 1) != 47 )
{
curr_dir[(unsigned int)(v5 - (_QWORD)curr_dir)] = 47;
curr_dir[(unsigned int)(v5 - (_QWORD)curr_dir) + 1] = 0;
}
}
else
{
curr_dir[0] = 0;
}
return v6;
}
|
my_setwd:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
JMP 0x0017e4a2
LAB_0017e4a2:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x8]
CMP byte ptr [RAX],0x0
JZ 0x0017e4cc
MOV RAX,qword ptr [RBP + -0x8]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2f
JNZ 0x0017e4d7
MOV RAX,qword ptr [RBP + -0x8]
MOVSX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x0
JNZ 0x0017e4d7
LAB_0017e4cc:
LEA RAX,[0x1e07f6]
MOV qword ptr [RBP + -0x8],RAX
LAB_0017e4d7:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00128580
MOV dword ptr [RBP + -0x14],EAX
CMP EAX,0x0
JZ 0x0017e530
CALL 0x00128040
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x34],EAX
CALL 0x001841b0
MOV ECX,dword ptr [RBP + -0x34]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x10]
AND RAX,0x10
CMP RAX,0x0
JZ 0x0017e52e
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x40],RAX
CALL 0x00128040
MOV RDX,qword ptr [RBP + -0x40]
MOV ECX,dword ptr [RAX]
MOV EDI,0x11
MOV ESI,0x4
MOV AL,0x0
CALL 0x0017a620
LAB_0017e52e:
JMP 0x0017e5a5
LAB_0017e530:
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x0017e5c0
CMP EAX,0x0
JZ 0x0017e599
MOV RSI,qword ptr [RBP + -0x28]
LEA RDI,[0x4feaa0]
MOV EDX,0x1ff
CALL 0x001dafd0
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOVSX EAX,byte ptr [RAX + -0x1]
CMP EAX,0x2f
JZ 0x0017e597
MOV RAX,qword ptr [RBP + -0x30]
LEA RCX,[0x4feaa0]
SUB RAX,RCX
MOV EAX,EAX
MOV qword ptr [RBP + -0x20],RAX
MOV RCX,qword ptr [RBP + -0x20]
LEA RAX,[0x4feaa0]
MOV byte ptr [RAX + RCX*0x1],0x2f
MOV RCX,qword ptr [RBP + -0x20]
LEA RAX,[0x4feaa0]
MOV byte ptr [RAX + RCX*0x1 + 0x1],0x0
LAB_0017e597:
JMP 0x0017e5a3
LAB_0017e599:
LEA RAX,[0x4feaa0]
MOV byte ptr [RAX],0x0
LAB_0017e5a3:
JMP 0x0017e5a5
LAB_0017e5a5:
JMP 0x0017e5a7
LAB_0017e5a7:
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x44],EAX
MOV EAX,dword ptr [RBP + -0x44]
ADD RSP,0x50
POP RBP
RET
|
int my_setwd(char *param_1,ulong param_2)
{
int iVar1;
int iVar2;
uint uVar3;
int *piVar4;
long lVar5;
char *local_10;
if ((*param_1 == '\0') || ((local_10 = param_1, *param_1 == '/' && (param_1[1] == '\0')))) {
local_10 = "/";
}
iVar1 = chdir(local_10);
if (iVar1 == 0) {
iVar2 = test_if_hard_path(param_1);
if (iVar2 == 0) {
curr_dir = 0;
}
else {
lVar5 = strmake(&curr_dir,param_1,0x1ff);
if (*(char *)(lVar5 + -1) != '/') {
uVar3 = (int)lVar5 - 0x4feaa0;
(&curr_dir)[uVar3] = 0x2f;
(&DAT_004feaa1)[uVar3] = 0;
}
}
}
else {
piVar4 = __errno_location();
iVar2 = *piVar4;
piVar4 = (int *)_my_thread_var();
*piVar4 = iVar2;
if ((param_2 & 0x10) != 0) {
piVar4 = __errno_location();
my_error(0x11,4,param_1,*piVar4);
}
}
return iVar1;
}
|
|
20,133
|
sp_get_linestring_mbr
|
eloqsql/storage/myisam/sp_key.c
|
static int sp_get_linestring_mbr(uchar *(*wkb), uchar *end, uint n_dims,
uchar byte_order, double *mbr)
{
uint n_points;
n_points = uint4korr(*wkb);
(*wkb) += 4;
for (; n_points > 0; --n_points)
{
/* Add next point to mbr */
if (sp_add_point_to_mbr(wkb, end, n_dims, byte_order, mbr))
return -1;
}
return 0;
}
|
O0
|
c
|
sp_get_linestring_mbr:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %cl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movb %al, -0x1d(%rbp)
movq %r8, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x4, %rcx
movq %rcx, (%rax)
cmpl $0x0, -0x2c(%rbp)
jbe 0xd84a1
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
movb -0x1d(%rbp), %al
movq -0x28(%rbp), %r8
movzbl %al, %ecx
callq 0xd8570
cmpl $0x0, %eax
je 0xd8494
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xd84a8
jmp 0xd8496
movl -0x2c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xd8466
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
sp_get_linestring_mbr_0:
push rbp
mov rbp, rsp
sub rsp, 30h
mov al, cl
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov [rbp+var_1D], al
mov [rbp+var_28], r8
mov rax, [rbp+var_10]
mov rax, [rax]
mov eax, [rax]
mov [rbp+var_2C], eax
mov rax, [rbp+var_10]
mov rcx, [rax]
add rcx, 4
mov [rax], rcx
loc_D8466:
cmp [rbp+var_2C], 0
jbe short loc_D84A1
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov edx, [rbp+var_1C]
mov al, [rbp+var_1D]
mov r8, [rbp+var_28]
movzx ecx, al
call sp_add_point_to_mbr_0
cmp eax, 0
jz short loc_D8494
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_D84A8
loc_D8494:
jmp short $+2
loc_D8496:
mov eax, [rbp+var_2C]
add eax, 0FFFFFFFFh
mov [rbp+var_2C], eax
jmp short loc_D8466
loc_D84A1:
mov [rbp+var_4], 0
loc_D84A8:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
|
long long sp_get_linestring_mbr_0(_DWORD **a1, long long a2, unsigned int a3, unsigned __int8 a4, long long a5)
{
int i; // [rsp+4h] [rbp-2Ch]
for ( i = *(*a1)++; i; --i )
{
if ( (unsigned int)sp_add_point_to_mbr_0(a1, a2, a3, a4, a5) )
return (unsigned int)-1;
}
return 0;
}
|
sp_get_linestring_mbr:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV AL,CL
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV byte ptr [RBP + -0x1d],AL
MOV qword ptr [RBP + -0x28],R8
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x2c],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
ADD RCX,0x4
MOV qword ptr [RAX],RCX
LAB_001d8466:
CMP dword ptr [RBP + -0x2c],0x0
JBE 0x001d84a1
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV EDX,dword ptr [RBP + -0x1c]
MOV AL,byte ptr [RBP + -0x1d]
MOV R8,qword ptr [RBP + -0x28]
MOVZX ECX,AL
CALL 0x001d8570
CMP EAX,0x0
JZ 0x001d8494
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001d84a8
LAB_001d8494:
JMP 0x001d8496
LAB_001d8496:
MOV EAX,dword ptr [RBP + -0x2c]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x001d8466
LAB_001d84a1:
MOV dword ptr [RBP + -0x4],0x0
LAB_001d84a8:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4
sp_get_linestring_mbr
(long *param_1,int8 param_2,int4 param_3,int1 param_4,int8 param_5
)
{
int iVar1;
int local_34;
local_34 = *(int *)*param_1;
*param_1 = *param_1 + 4;
while( true ) {
if (local_34 == 0) {
return 0;
}
iVar1 = sp_add_point_to_mbr(param_1,param_2,param_3,param_4,param_5);
if (iVar1 != 0) break;
local_34 = local_34 + -1;
}
return 0xffffffff;
}
|
|
20,134
|
my_strntol_mb2_or_mb4
|
eloqsql/strings/ctype-ucs2.c
|
static long
my_strntol_mb2_or_mb4(CHARSET_INFO *cs,
const char *nptr, size_t l, int base,
char **endptr, int *err)
{
int negative= 0;
int overflow;
int cnv;
my_wc_t wc;
my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc;
register unsigned int cutlim;
register uint32 cutoff;
register uint32 res;
register const uchar *s= (const uchar*) nptr;
register const uchar *e= (const uchar*) nptr+l;
const uchar *save;
*err= 0;
do
{
if ((cnv= mb_wc(cs, &wc, s, e)) > 0)
{
switch (wc)
{
case ' ' : break;
case '\t': break;
case '-' : negative= !negative; break;
case '+' : break;
default : goto bs;
}
}
else /* No more characters or bad multibyte sequence */
{
if (endptr != NULL )
*endptr= (char*) s;
err[0]= (cnv==MY_CS_ILSEQ) ? EILSEQ : EDOM;
return 0;
}
s+= cnv;
} while (1);
bs:
overflow= 0;
res= 0;
save= s;
cutoff= ((uint32)~0L) / (uint32) base;
cutlim= (uint) (((uint32)~0L) % (uint32) base);
do {
if ((cnv= mb_wc(cs, &wc, s, e)) > 0)
{
s+= cnv;
if (wc >= '0' && wc <= '9')
wc-= '0';
else if (wc >= 'A' && wc <= 'Z')
wc= wc - 'A' + 10;
else if (wc >= 'a' && wc <= 'z')
wc= wc - 'a' + 10;
else
break;
if ((int)wc >= base)
break;
if (res > cutoff || (res == cutoff && wc > cutlim))
overflow= 1;
else
{
res*= (uint32) base;
res+= wc;
}
}
else if (cnv == MY_CS_ILSEQ)
{
if (endptr !=NULL )
*endptr = (char*) s;
err[0]= EILSEQ;
return 0;
}
else
{
/* No more characters */
break;
}
} while(1);
if (endptr != NULL)
*endptr = (char *) s;
if (s == save)
{
err[0]= EDOM;
return 0L;
}
if (negative)
{
if (res > (uint32) INT_MIN32)
overflow= 1;
}
else if (res > INT_MAX32)
overflow= 1;
if (overflow)
{
err[0]= ERANGE;
return negative ? INT_MIN32 : INT_MAX32;
}
return (negative ? -((long) res) : (long) res);
}
|
O3
|
c
|
my_strntol_mb2_or_mb4:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, -0x40(%rbp)
movl %ecx, -0x34(%rbp)
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %r14
movq 0xb8(%rdi), %rax
movq 0x28(%rax), %r12
addq %rsi, %r13
movq %r9, -0x50(%rbp)
movl $0x0, (%r9)
leaq -0x30(%rbp), %rsi
movq %r15, %rdx
movq %r13, %rcx
callq *%r12
testl %eax, %eax
jle 0x7ded6
movl $0x0, -0x38(%rbp)
leaq -0x30(%rbp), %rbx
movq -0x30(%rbp), %rcx
cmpq $0x2a, %rcx
jg 0x7dea6
cmpq $0x9, %rcx
je 0x7debe
cmpq $0x20, %rcx
je 0x7debe
jmp 0x7df08
cmpq $0x2b, %rcx
je 0x7debe
cmpq $0x2d, %rcx
jne 0x7df08
xorl %ecx, %ecx
cmpl $0x0, -0x38(%rbp)
sete %cl
movl %ecx, -0x38(%rbp)
movl %eax, %eax
addq %rax, %r15
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %r13, %rcx
callq *%r12
testl %eax, %eax
jg 0x7de8e
movq -0x40(%rbp), %rcx
testq %rcx, %rcx
je 0x7dee2
movq %r15, (%rcx)
testl %eax, %eax
movl $0x54, %eax
movl $0x21, %ecx
cmovel %eax, %ecx
movq -0x50(%rbp), %rax
movl %ecx, (%rax)
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
xorl %edx, %edx
divl -0x34(%rbp)
movl %edx, %ebx
movl %eax, -0x44(%rbp)
leaq -0x30(%rbp), %rsi
movq %r14, %rdi
movq %r15, %rdx
movq %r13, %rcx
callq *%r12
testl %eax, %eax
jle 0x7dfce
movl %ebx, %ecx
movq %rcx, -0x60(%rbp)
xorl %ecx, %ecx
movq %r15, %rbx
xorl %r8d, %r8d
movq %rbx, %rsi
movl %eax, %ebx
addq %rsi, %rbx
movq -0x30(%rbp), %rsi
leaq -0x30(%rsi), %rax
cmpq $0x9, %rax
ja 0x7df59
movq %rax, -0x30(%rbp)
jmp 0x7df7e
leaq -0x41(%rsi), %rax
cmpq $0x19, %rax
ja 0x7df69
addq $-0x37, %rsi
jmp 0x7df77
leaq -0x61(%rsi), %rax
cmpq $0x19, %rax
ja 0x7dfde
addq $-0x57, %rsi
movq %rsi, -0x30(%rbp)
movq %rsi, %rax
cmpl -0x34(%rbp), %eax
jge 0x7dfde
movl $0x1, %esi
cmpl -0x44(%rbp), %ecx
ja 0x7dfa1
jne 0x7df98
movl -0x44(%rbp), %edi
cmpq -0x60(%rbp), %rax
ja 0x7dfa3
imull -0x34(%rbp), %ecx
addl %eax, %ecx
movl %r8d, %esi
movl %ecx, %edi
movl %edi, -0x54(%rbp)
movl %esi, -0x58(%rbp)
movq %r14, %rdi
leaq -0x30(%rbp), %rsi
movq %rbx, %rdx
movq %r13, %rcx
callq *%r12
movl -0x54(%rbp), %edi
movl -0x58(%rbp), %esi
movl %edi, %ecx
movl %esi, %r8d
testl %eax, %eax
jg 0x7df3d
jmp 0x7dfd5
xorl %edi, %edi
movq %r15, %rbx
xorl %esi, %esi
testl %eax, %eax
je 0x7e03d
movl %esi, %r8d
movl %edi, %ecx
movq -0x40(%rbp), %rax
testq %rax, %rax
je 0x7dfea
movq %rbx, (%rax)
cmpq %r15, %rbx
je 0x7e02e
cmpl $0x80000001, %ecx # imm = 0x80000001
movl $0x1, %eax
movl %r8d, %esi
cmovael %eax, %esi
testl %ecx, %ecx
cmovsl %eax, %r8d
movl -0x38(%rbp), %edi
testl %edi, %edi
cmovnel %esi, %r8d
testl %r8d, %r8d
je 0x7e058
testl %edi, %edi
movq -0x50(%rbp), %rax
movl $0x22, (%rax)
movl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
movq $-0x80000000, %rax # imm = 0x80000000
jmp 0x7e062
movq -0x50(%rbp), %rax
movl $0x21, (%rax)
jmp 0x7def7
movq -0x40(%rbp), %rax
testq %rax, %rax
je 0x7e049
movq %rbx, (%rax)
movq -0x50(%rbp), %rax
movl $0x54, (%rax)
jmp 0x7def7
movl %ecx, %ecx
movq %rcx, %rax
negq %rax
testl %edi, %edi
cmoveq %rcx, %rax
jmp 0x7def9
|
my_strntol_mb2_or_mb4:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov [rbp+var_40], r8
mov [rbp+var_34], ecx
mov r13, rdx
mov r15, rsi
mov r14, rdi
mov rax, [rdi+0B8h]
mov r12, [rax+28h]
add r13, rsi
mov [rbp+var_50], r9
mov dword ptr [r9], 0
lea rsi, [rbp+var_30]
mov rdx, r15
mov rcx, r13
call r12
test eax, eax
jle short loc_7DED6
mov [rbp+var_38], 0
lea rbx, [rbp+var_30]
loc_7DE8E:
mov rcx, [rbp+var_30]
cmp rcx, 2Ah ; '*'
jg short loc_7DEA6
cmp rcx, 9
jz short loc_7DEBE
cmp rcx, 20h ; ' '
jz short loc_7DEBE
jmp short loc_7DF08
loc_7DEA6:
cmp rcx, 2Bh ; '+'
jz short loc_7DEBE
cmp rcx, 2Dh ; '-'
jnz short loc_7DF08
xor ecx, ecx
cmp [rbp+var_38], 0
setz cl
mov [rbp+var_38], ecx
loc_7DEBE:
mov eax, eax
add r15, rax
mov rdi, r14
mov rsi, rbx
mov rdx, r15
mov rcx, r13
call r12
test eax, eax
jg short loc_7DE8E
loc_7DED6:
mov rcx, [rbp+var_40]
test rcx, rcx
jz short loc_7DEE2
mov [rcx], r15
loc_7DEE2:
test eax, eax
mov eax, 54h ; 'T'
mov ecx, 21h ; '!'
cmovz ecx, eax
mov rax, [rbp+var_50]
mov [rax], ecx
loc_7DEF7:
xor eax, eax
loc_7DEF9:
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_7DF08:
mov eax, 0FFFFFFFFh
xor edx, edx
div [rbp+var_34]
mov ebx, edx
mov [rbp+var_44], eax
lea rsi, [rbp+var_30]
mov rdi, r14
mov rdx, r15
mov rcx, r13
call r12
test eax, eax
jle loc_7DFCE
mov ecx, ebx
mov [rbp+var_60], rcx
xor ecx, ecx
mov rbx, r15
xor r8d, r8d
loc_7DF3D:
mov rsi, rbx
mov ebx, eax
add rbx, rsi
mov rsi, [rbp+var_30]
lea rax, [rsi-30h]
cmp rax, 9
ja short loc_7DF59
mov [rbp+var_30], rax
jmp short loc_7DF7E
loc_7DF59:
lea rax, [rsi-41h]
cmp rax, 19h
ja short loc_7DF69
add rsi, 0FFFFFFFFFFFFFFC9h
jmp short loc_7DF77
loc_7DF69:
lea rax, [rsi-61h]
cmp rax, 19h
ja short loc_7DFDE
add rsi, 0FFFFFFFFFFFFFFA9h
loc_7DF77:
mov [rbp+var_30], rsi
mov rax, rsi
loc_7DF7E:
cmp eax, [rbp+var_34]
jge short loc_7DFDE
mov esi, 1
cmp ecx, [rbp+var_44]
ja short loc_7DFA1
jnz short loc_7DF98
mov edi, [rbp+var_44]
cmp rax, [rbp+var_60]
ja short loc_7DFA3
loc_7DF98:
imul ecx, [rbp+var_34]
add ecx, eax
mov esi, r8d
loc_7DFA1:
mov edi, ecx
loc_7DFA3:
mov [rbp+var_54], edi
mov [rbp+var_58], esi
mov rdi, r14
lea rsi, [rbp+var_30]
mov rdx, rbx
mov rcx, r13
call r12
mov edi, [rbp+var_54]
mov esi, [rbp+var_58]
mov ecx, edi
mov r8d, esi
test eax, eax
jg loc_7DF3D
jmp short loc_7DFD5
loc_7DFCE:
xor edi, edi
mov rbx, r15
xor esi, esi
loc_7DFD5:
test eax, eax
jz short loc_7E03D
mov r8d, esi
mov ecx, edi
loc_7DFDE:
mov rax, [rbp+var_40]
test rax, rax
jz short loc_7DFEA
mov [rax], rbx
loc_7DFEA:
cmp rbx, r15
jz short loc_7E02E
cmp ecx, 80000001h
mov eax, 1
mov esi, r8d
cmovnb esi, eax
test ecx, ecx
cmovs r8d, eax
mov edi, [rbp+var_38]
test edi, edi
cmovnz r8d, esi
test r8d, r8d
jz short loc_7E058
test edi, edi
mov rax, [rbp+var_50]
mov dword ptr [rax], 22h ; '"'
mov ecx, 7FFFFFFFh
mov rax, 0FFFFFFFF80000000h
jmp short loc_7E062
loc_7E02E:
mov rax, [rbp+var_50]
mov dword ptr [rax], 21h ; '!'
jmp loc_7DEF7
loc_7E03D:
mov rax, [rbp+var_40]
test rax, rax
jz short loc_7E049
mov [rax], rbx
loc_7E049:
mov rax, [rbp+var_50]
mov dword ptr [rax], 54h ; 'T'
jmp loc_7DEF7
loc_7E058:
mov ecx, ecx
mov rax, rcx
neg rax
test edi, edi
loc_7E062:
cmovz rax, rcx
jmp loc_7DEF9
|
long long my_strntol_mb2_or_mb4(long long a1, long long a2, long long a3, unsigned int a4, _QWORD *a5, int *a6)
{
long long v6; // r15
long long ( *v8)(long long, _QWORD *, long long, long long); // r12
long long v9; // r13
int v10; // eax
int v11; // ecx
long long result; // rax
int v13; // eax
long long v14; // rcx
long long v15; // rbx
long long v16; // r8
unsigned long long v17; // rax
long long v18; // rsi
unsigned int v19; // esi
unsigned int v20; // edi
int v21; // esi
bool v22; // zf
unsigned int v24; // [rsp+1Ch] [rbp-44h]
BOOL v26; // [rsp+28h] [rbp-38h]
_QWORD v28[6]; // [rsp+30h] [rbp-30h] BYREF
v6 = a2;
v8 = *(long long ( **)(long long, _QWORD *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL);
v9 = a2 + a3;
*a6 = 0;
v10 = v8(a1, v28, a2, a2 + a3);
if ( v10 <= 0 )
{
LABEL_11:
if ( a5 )
*a5 = v6;
v11 = 33;
if ( !v10 )
v11 = 84;
*a6 = v11;
return 0LL;
}
v26 = 0;
while ( 1 )
{
if ( v28[0] > 42LL )
{
if ( v28[0] != 43LL )
{
if ( v28[0] != 45LL )
break;
v26 = !v26;
}
goto LABEL_10;
}
if ( v28[0] != 9LL && v28[0] != 32LL )
break;
LABEL_10:
v6 += (unsigned int)v10;
v10 = v8(a1, v28, v6, v9);
if ( v10 <= 0 )
goto LABEL_11;
}
v24 = 0xFFFFFFFF / a4;
v13 = v8(a1, v28, v6, v9);
if ( v13 > 0 )
{
LODWORD(v14) = 0;
v15 = v6;
v16 = 0LL;
while ( 1 )
{
v15 += (unsigned int)v13;
v17 = v28[0] - 48LL;
if ( (unsigned long long)(v28[0] - 48LL) > 9 )
{
if ( (unsigned long long)(v28[0] - 65LL) > 0x19 )
{
if ( (unsigned long long)(v28[0] - 97LL) > 0x19 )
goto LABEL_37;
v18 = v28[0] - 87LL;
}
else
{
v18 = v28[0] - 55LL;
}
v28[0] = v18;
v17 = v18;
}
else
{
v28[0] -= 48LL;
}
if ( (int)v17 >= (int)a4 )
goto LABEL_37;
v19 = 1;
if ( (unsigned int)v14 <= v24 )
{
if ( (_DWORD)v14 == v24 )
{
v20 = 0xFFFFFFFF / a4;
if ( v17 > 0xFFFFFFFF % a4 )
goto LABEL_32;
}
LODWORD(v14) = v17 + a4 * v14;
v19 = v16;
}
v20 = v14;
LABEL_32:
v13 = ((long long ( *)(long long, _QWORD *, long long, long long, long long))v8)(a1, v28, v15, v9, v16);
LODWORD(v14) = v20;
v16 = v19;
if ( v13 <= 0 )
goto LABEL_35;
}
}
v20 = 0;
v15 = v6;
v19 = 0;
LABEL_35:
if ( !v13 )
{
if ( a5 )
*a5 = v15;
*a6 = 84;
return 0LL;
}
LODWORD(v16) = v19;
LODWORD(v14) = v20;
LABEL_37:
if ( a5 )
*a5 = v15;
if ( v15 == v6 )
{
*a6 = 33;
return 0LL;
}
v21 = v16;
if ( (unsigned int)v14 >= 0x80000001 )
v21 = 1;
if ( (int)v14 < 0 )
LODWORD(v16) = 1;
if ( v26 )
LODWORD(v16) = v21;
if ( (_DWORD)v16 )
{
v22 = !v26;
*a6 = 34;
v14 = 0x7FFFFFFFLL;
result = 0xFFFFFFFF80000000LL;
}
else
{
v14 = (unsigned int)v14;
result = -(long long)(unsigned int)v14;
v22 = !v26;
}
if ( v22 )
return v14;
return result;
}
|
my_strntol_mb2_or_mb4:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RBP + -0x40],R8
MOV dword ptr [RBP + -0x34],ECX
MOV R13,RDX
MOV R15,RSI
MOV R14,RDI
MOV RAX,qword ptr [RDI + 0xb8]
MOV R12,qword ptr [RAX + 0x28]
ADD R13,RSI
MOV qword ptr [RBP + -0x50],R9
MOV dword ptr [R9],0x0
LEA RSI,[RBP + -0x30]
MOV RDX,R15
MOV RCX,R13
CALL R12
TEST EAX,EAX
JLE 0x0017ded6
MOV dword ptr [RBP + -0x38],0x0
LEA RBX,[RBP + -0x30]
LAB_0017de8e:
MOV RCX,qword ptr [RBP + -0x30]
CMP RCX,0x2a
JG 0x0017dea6
CMP RCX,0x9
JZ 0x0017debe
CMP RCX,0x20
JZ 0x0017debe
JMP 0x0017df08
LAB_0017dea6:
CMP RCX,0x2b
JZ 0x0017debe
CMP RCX,0x2d
JNZ 0x0017df08
XOR ECX,ECX
CMP dword ptr [RBP + -0x38],0x0
SETZ CL
MOV dword ptr [RBP + -0x38],ECX
LAB_0017debe:
MOV EAX,EAX
ADD R15,RAX
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R15
MOV RCX,R13
CALL R12
TEST EAX,EAX
JG 0x0017de8e
LAB_0017ded6:
MOV RCX,qword ptr [RBP + -0x40]
TEST RCX,RCX
JZ 0x0017dee2
MOV qword ptr [RCX],R15
LAB_0017dee2:
TEST EAX,EAX
MOV EAX,0x54
MOV ECX,0x21
CMOVZ ECX,EAX
MOV RAX,qword ptr [RBP + -0x50]
MOV dword ptr [RAX],ECX
LAB_0017def7:
XOR EAX,EAX
LAB_0017def9:
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0017df08:
MOV EAX,0xffffffff
XOR EDX,EDX
DIV dword ptr [RBP + -0x34]
MOV EBX,EDX
MOV dword ptr [RBP + -0x44],EAX
LEA RSI,[RBP + -0x30]
MOV RDI,R14
MOV RDX,R15
MOV RCX,R13
CALL R12
TEST EAX,EAX
JLE 0x0017dfce
MOV ECX,EBX
MOV qword ptr [RBP + -0x60],RCX
XOR ECX,ECX
MOV RBX,R15
XOR R8D,R8D
LAB_0017df3d:
MOV RSI,RBX
MOV EBX,EAX
ADD RBX,RSI
MOV RSI,qword ptr [RBP + -0x30]
LEA RAX,[RSI + -0x30]
CMP RAX,0x9
JA 0x0017df59
MOV qword ptr [RBP + -0x30],RAX
JMP 0x0017df7e
LAB_0017df59:
LEA RAX,[RSI + -0x41]
CMP RAX,0x19
JA 0x0017df69
ADD RSI,-0x37
JMP 0x0017df77
LAB_0017df69:
LEA RAX,[RSI + -0x61]
CMP RAX,0x19
JA 0x0017dfde
ADD RSI,-0x57
LAB_0017df77:
MOV qword ptr [RBP + -0x30],RSI
MOV RAX,RSI
LAB_0017df7e:
CMP EAX,dword ptr [RBP + -0x34]
JGE 0x0017dfde
MOV ESI,0x1
CMP ECX,dword ptr [RBP + -0x44]
JA 0x0017dfa1
JNZ 0x0017df98
MOV EDI,dword ptr [RBP + -0x44]
CMP RAX,qword ptr [RBP + -0x60]
JA 0x0017dfa3
LAB_0017df98:
IMUL ECX,dword ptr [RBP + -0x34]
ADD ECX,EAX
MOV ESI,R8D
LAB_0017dfa1:
MOV EDI,ECX
LAB_0017dfa3:
MOV dword ptr [RBP + -0x54],EDI
MOV dword ptr [RBP + -0x58],ESI
MOV RDI,R14
LEA RSI,[RBP + -0x30]
MOV RDX,RBX
MOV RCX,R13
CALL R12
MOV EDI,dword ptr [RBP + -0x54]
MOV ESI,dword ptr [RBP + -0x58]
MOV ECX,EDI
MOV R8D,ESI
TEST EAX,EAX
JG 0x0017df3d
JMP 0x0017dfd5
LAB_0017dfce:
XOR EDI,EDI
MOV RBX,R15
XOR ESI,ESI
LAB_0017dfd5:
TEST EAX,EAX
JZ 0x0017e03d
MOV R8D,ESI
MOV ECX,EDI
LAB_0017dfde:
MOV RAX,qword ptr [RBP + -0x40]
TEST RAX,RAX
JZ 0x0017dfea
MOV qword ptr [RAX],RBX
LAB_0017dfea:
CMP RBX,R15
JZ 0x0017e02e
CMP ECX,0x80000001
MOV EAX,0x1
MOV ESI,R8D
CMOVNC ESI,EAX
TEST ECX,ECX
CMOVS R8D,EAX
MOV EDI,dword ptr [RBP + -0x38]
TEST EDI,EDI
CMOVNZ R8D,ESI
TEST R8D,R8D
JZ 0x0017e058
TEST EDI,EDI
MOV RAX,qword ptr [RBP + -0x50]
MOV dword ptr [RAX],0x22
MOV ECX,0x7fffffff
MOV RAX,-0x80000000
JMP 0x0017e062
LAB_0017e02e:
MOV RAX,qword ptr [RBP + -0x50]
MOV dword ptr [RAX],0x21
JMP 0x0017def7
LAB_0017e03d:
MOV RAX,qword ptr [RBP + -0x40]
TEST RAX,RAX
JZ 0x0017e049
MOV qword ptr [RAX],RBX
LAB_0017e049:
MOV RAX,qword ptr [RBP + -0x50]
MOV dword ptr [RAX],0x54
JMP 0x0017def7
LAB_0017e058:
MOV ECX,ECX
MOV RAX,RCX
NEG RAX
TEST EDI,EDI
LAB_0017e062:
CMOVZ RAX,RCX
JMP 0x0017def9
|
ulong my_strntol_mb2_or_mb4
(long param_1,long param_2,long param_3,uint param_4,long *param_5,
int4 *param_6)
{
code *pcVar1;
bool bVar2;
bool bVar3;
bool bVar4;
uint uVar5;
uint uVar6;
ulong uVar7;
int4 uVar8;
uint uVar9;
ulong uVar10;
long lVar11;
ulong local_38;
pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28);
param_3 = param_3 + param_2;
*param_6 = 0;
uVar5 = (*pcVar1)(param_1,&local_38,param_2,param_3);
if (0 < (int)uVar5) {
bVar2 = false;
do {
if ((long)local_38 < 0x2b) {
if ((local_38 != 9) && (local_38 != 0x20)) {
LAB_0017df08:
uVar5 = (uint)(0xffffffff / (ulong)param_4);
uVar6 = (*pcVar1)(param_1,&local_38,param_2,param_3);
lVar11 = param_2;
if ((int)uVar6 < 1) {
uVar9 = 0;
bVar3 = false;
goto LAB_0017dfd5;
}
uVar9 = 0;
bVar3 = false;
goto LAB_0017df3d;
}
}
else if (local_38 != 0x2b) {
if (local_38 != 0x2d) goto LAB_0017df08;
bVar2 = !bVar2;
}
param_2 = param_2 + (ulong)uVar5;
uVar5 = (*pcVar1)(param_1,&local_38,param_2,param_3);
} while (0 < (int)uVar5);
}
if (param_5 != (long *)0x0) {
*param_5 = param_2;
}
uVar8 = 0x21;
if (uVar5 == 0) {
uVar8 = 0x54;
}
*param_6 = uVar8;
return 0;
while( true ) {
if ((int)param_4 <= (int)uVar7) goto LAB_0017dfde;
uVar6 = uVar9;
bVar4 = true;
if ((uVar9 <= uVar5) &&
((uVar9 != uVar5 || (uVar6 = uVar5, bVar4 = true, uVar7 <= 0xffffffffU % (ulong)param_4)))) {
uVar6 = uVar9 * param_4 + (int)uVar7;
bVar4 = bVar3;
}
bVar3 = bVar4;
uVar9 = uVar6;
local_38 = uVar7;
uVar6 = (*pcVar1)(param_1,&local_38,lVar11,param_3);
if ((int)uVar6 < 1) break;
LAB_0017df3d:
lVar11 = (ulong)uVar6 + lVar11;
uVar7 = local_38 - 0x30;
if (9 < uVar7) {
if (local_38 - 0x41 < 0x1a) {
uVar7 = local_38 - 0x37;
}
else {
if (0x19 < local_38 - 0x61) goto LAB_0017dfde;
uVar7 = local_38 - 0x57;
}
}
}
LAB_0017dfd5:
if (uVar6 == 0) {
if (param_5 != (long *)0x0) {
*param_5 = lVar11;
}
*param_6 = 0x54;
}
else {
LAB_0017dfde:
if (param_5 != (long *)0x0) {
*param_5 = lVar11;
}
if (lVar11 != param_2) {
bVar4 = bVar3;
if (0x80000000 < uVar9) {
bVar4 = true;
}
if ((int)uVar9 < 0) {
bVar3 = true;
}
if (bVar2) {
bVar3 = bVar4;
}
if (bVar3) {
*param_6 = 0x22;
uVar10 = 0x7fffffff;
uVar7 = 0xffffffff80000000;
}
else {
uVar10 = (ulong)uVar9;
uVar7 = -uVar10;
}
if (!bVar2) {
return uVar10;
}
return uVar7;
}
*param_6 = 0x21;
}
return 0;
}
|
|
20,135
|
translog_close_log_file
|
eloqsql/storage/maria/ma_loghandler.c
|
static my_bool translog_close_log_file(TRANSLOG_FILE *file)
{
int rc= 0;
flush_pagecache_blocks(log_descriptor.pagecache, &file->handler,
FLUSH_RELEASE);
/*
Sync file when we close it
TODO: sync only we have changed the log
*/
if (!file->is_sync)
{
rc= mysql_file_sync(file->handler.file, MYF(MY_WME));
translog_syncs++;
}
rc|= mysql_file_close(file->handler.file, MYF(MY_WME));
my_free(file);
return MY_TEST(rc);
}
|
O0
|
c
|
translog_close_log_file:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movq 0x4254c6(%rip), %rdi # 0x47a660
movq -0x8(%rbp), %rsi
addq $0x8, %rsi
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %r8d
movq %r8, %rcx
callq 0x30b30
movq -0x8(%rbp), %rax
cmpb $0x0, 0x51(%rax)
jne 0x551f0
movq -0x8(%rbp), %rax
movl 0x18(%rax), %edx
leaq 0xfdded(%rip), %rdi # 0x152fb9
movl $0x647, %esi # imm = 0x647
movl $0x10, %ecx
callq 0x5a510
movl %eax, -0xc(%rbp)
movq 0x424273(%rip), %rax # 0x479458
addq $0x1, %rax
movq %rax, 0x424268(%rip) # 0x479458
movq -0x8(%rbp), %rax
movl 0x18(%rax), %edx
leaq 0xfddbb(%rip), %rdi # 0x152fb9
movl $0x64a, %esi # imm = 0x64A
movl $0x10, %ecx
callq 0x51240
orl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rdi
callq 0xf4f60
movl -0xc(%rbp), %edx
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
translog_close_log_file:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov [rbp+var_C], 0
mov rdi, cs:log_descriptor
mov rsi, [rbp+var_8]
add rsi, 8
mov edx, 1
xor eax, eax
mov r8d, eax
mov rcx, r8
call flush_pagecache_blocks_with_filter
mov rax, [rbp+var_8]
cmp byte ptr [rax+51h], 0
jnz short loc_551F0
mov rax, [rbp+var_8]
mov edx, [rax+18h]
lea rdi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 647h
mov ecx, 10h
call inline_mysql_file_sync_3
mov [rbp+var_C], eax
mov rax, cs:translog_syncs
add rax, 1
mov cs:translog_syncs, rax
loc_551F0:
mov rax, [rbp+var_8]
mov edx, [rax+18h]
lea rdi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 64Ah
mov ecx, 10h
call inline_mysql_file_close_2
or eax, [rbp+var_C]
mov [rbp+var_C], eax
mov rdi, [rbp+var_8]
call my_free
mov edx, [rbp+var_C]
xor eax, eax
mov ecx, 1
cmp edx, 0
cmovnz eax, ecx
add rsp, 10h
pop rbp
retn
|
_BOOL8 translog_close_log_file(long long a1)
{
int v2; // [rsp+4h] [rbp-Ch]
int v3; // [rsp+4h] [rbp-Ch]
v2 = 0;
flush_pagecache_blocks_with_filter(log_descriptor[0], a1 + 8, 1u, 0LL, 0LL);
if ( !*(_BYTE *)(a1 + 81) )
{
v2 = inline_mysql_file_sync_3(
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
1607LL,
*(unsigned int *)(a1 + 24),
16LL);
++translog_syncs;
}
v3 = v2 | inline_mysql_file_close_2(
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0x64Au,
*(_DWORD *)(a1 + 24),
16LL);
my_free(a1);
return v3 != 0;
}
|
translog_close_log_file:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],0x0
MOV RDI,qword ptr [0x0057a660]
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0x8
MOV EDX,0x1
XOR EAX,EAX
MOV R8D,EAX
MOV RCX,R8
CALL 0x00130b30
MOV RAX,qword ptr [RBP + -0x8]
CMP byte ptr [RAX + 0x51],0x0
JNZ 0x001551f0
MOV RAX,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RAX + 0x18]
LEA RDI,[0x252fb9]
MOV ESI,0x647
MOV ECX,0x10
CALL 0x0015a510
MOV dword ptr [RBP + -0xc],EAX
MOV RAX,qword ptr [0x00579458]
ADD RAX,0x1
MOV qword ptr [0x00579458],RAX
LAB_001551f0:
MOV RAX,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RAX + 0x18]
LEA RDI,[0x252fb9]
MOV ESI,0x64a
MOV ECX,0x10
CALL 0x00151240
OR EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0xc],EAX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001f4f60
MOV EDX,dword ptr [RBP + -0xc]
XOR EAX,EAX
MOV ECX,0x1
CMP EDX,0x0
CMOVNZ EAX,ECX
ADD RSP,0x10
POP RBP
RET
|
bool translog_close_log_file(long param_1)
{
int iVar1;
int local_14;
local_14 = 0;
flush_pagecache_blocks_with_filter(log_descriptor,param_1 + 8,1,0);
if (*(char *)(param_1 + 0x51) == '\0') {
local_14 = inline_mysql_file_sync
("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0x647,*(int4 *)(param_1 + 0x18),0x10);
translog_syncs = translog_syncs + 1;
}
iVar1 = inline_mysql_file_close
("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",0x64a,
*(int4 *)(param_1 + 0x18),0x10);
my_free(param_1);
return iVar1 != 0 || local_14 != 0;
}
|
|
20,136
|
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_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_array()
|
monkey531[P]llama/common/json.hpp
|
bool end_array()
{
JSON_ASSERT(!ref_stack.empty());
JSON_ASSERT(ref_stack.back()->is_array());
ref_stack.back()->set_parents();
ref_stack.pop_back();
return true;
}
|
O3
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_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_array():
pushq %rax
movq 0x10(%rdi), %rax
cmpq %rax, 0x8(%rdi)
je 0x4d77e
movq -0x8(%rax), %rcx
cmpb $0x2, (%rcx)
jne 0x4d79a
addq $-0x8, %rax
movq %rax, 0x10(%rdi)
movb $0x1, %al
popq %rcx
retq
leaq 0x5d018(%rip), %rdi # 0xaa79d
leaq 0x5b7e5(%rip), %rdx # 0xa8f71
leaq 0x5e51c(%rip), %rcx # 0xabcaf
movl $0x1b01, %esi # imm = 0x1B01
jmp 0x4d7b4
leaq 0x5cffc(%rip), %rdi # 0xaa79d
leaq 0x5b7c9(%rip), %rdx # 0xa8f71
leaq 0x5e790(%rip), %rcx # 0xabf3f
movl $0x1b02, %esi # imm = 0x1B02
xorl %eax, %eax
callq 0x18af0
nop
|
_ZN8nlohmann16json_abi_v3_11_36detail19json_sax_dom_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE9end_arrayEv:
push rax
mov rax, [rdi+10h]
cmp [rdi+8], rax
jz short loc_4D77E
mov rcx, [rax-8]
cmp byte ptr [rcx], 2
jnz short loc_4D79A
add rax, 0FFFFFFFFFFFFFFF8h
mov [rdi+10h], rax
mov al, 1
pop rcx
retn
loc_4D77E:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aRefStackEmpty; "!ref_stack.empty()"
mov esi, 1B01h
jmp short loc_4D7B4
loc_4D79A:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aRefStackBackIs_0; "ref_stack.back()->is_array()"
mov esi, 1B02h
loc_4D7B4:
xor eax, eax
call _ggml_abort
nop
|
char nlohmann::json_abi_v3_11_3::detail::json_sax_dom_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_array(
long long a1)
{
long long v1; // rax
long long v3; // rsi
long long v4; // rdx
long long v5; // rcx
v1 = *(_QWORD *)(a1 + 16);
if ( *(_QWORD *)(a1 + 8) == v1 )
{
v3 = 6913LL;
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
6913LL,
"GGML_ASSERT(%s) failed",
"!ref_stack.empty()");
}
else
{
if ( **(_BYTE **)(v1 - 8) == 2 )
{
*(_QWORD *)(a1 + 16) = v1 - 8;
return 1;
}
v3 = 6914LL;
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
6914LL,
"GGML_ASSERT(%s) failed",
"ref_stack.back()->is_array()");
}
return nlohmann::json_abi_v3_11_3::detail::json_sax_dom_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>>::parse_error<nlohmann::json_abi_v3_11_3::detail::out_of_range>(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
v3,
v4,
v5);
}
|
end_array:
PUSH RAX
MOV RAX,qword ptr [RDI + 0x10]
CMP qword ptr [RDI + 0x8],RAX
JZ 0x0014d77e
MOV RCX,qword ptr [RAX + -0x8]
CMP byte ptr [RCX],0x2
JNZ 0x0014d79a
ADD RAX,-0x8
MOV qword ptr [RDI + 0x10],RAX
MOV AL,0x1
POP RCX
RET
LAB_0014d77e:
LEA RDI,[0x1aa79d]
LEA RDX,[0x1a8f71]
LEA RCX,[0x1abcaf]
MOV ESI,0x1b01
JMP 0x0014d7b4
LAB_0014d79a:
LEA RDI,[0x1aa79d]
LEA RDX,[0x1a8f71]
LEA RCX,[0x1abf3f]
MOV ESI,0x1b02
LAB_0014d7b4:
XOR EAX,EAX
CALL 0x00118af0
|
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_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_array() */
int8 __thiscall
nlohmann::json_abi_v3_11_3::detail::
json_sax_dom_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_array(json_sax_dom_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)
{
long lVar1;
char *pcVar2;
int8 uVar3;
lVar1 = *(long *)(this + 0x10);
if (*(long *)(this + 8) == lVar1) {
pcVar2 = "!ref_stack.empty()";
uVar3 = 0x1b01;
}
else {
if (**(char **)(lVar1 + -8) == '\x02') {
*(long *)(this + 0x10) = lVar1 + -8;
return CONCAT71((int7)((ulong)(lVar1 + -8) >> 8),1);
}
pcVar2 = "ref_stack.back()->is_array()";
uVar3 = 0x1b02;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar3,
"GGML_ASSERT(%s) failed",pcVar2);
}
|
|
20,137
|
ma_scramble_323
|
eloqsql/libmariadb/libmariadb/ma_password.c
|
char *ma_scramble_323(char *to, const char *message, const char *password)
{
struct rand_struct rand_st;
ulong hash_pass[2], hash_message[2];
if (password && password[0])
{
char extra, *to_start=to;
const char *end_scramble323= message + SCRAMBLE_LENGTH_323;
ma_hash_password(hash_pass,password, (uint) strlen(password));
/* Don't use strlen, could be > SCRAMBLE_LENGTH_323 ! */
ma_hash_password(hash_message, message, SCRAMBLE_LENGTH_323);
ma_randominit(&rand_st, hash_pass[0] ^ hash_message[0],
hash_pass[1] ^ hash_message[1]);
for (; message < end_scramble323; message++)
*to++= (char) (floor(rnd(&rand_st) * 31) + 64);
extra=(char) (floor(rnd(&rand_st) * 31));
while (to_start != to)
*(to_start++)^= extra;
}
*to= 0;
return to;
}
|
O0
|
c
|
ma_scramble_323:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x481bf
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x481bf
movq -0x8(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x78(%rbp)
leaq -0x50(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x18(%rbp), %rdi
callq 0x131a0
movq -0x88(%rbp), %rdi
movq -0x80(%rbp), %rsi
movl %eax, %eax
movl %eax, %edx
callq 0x47d70
leaq -0x60(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x8, %edx
callq 0x47d70
movq -0x50(%rbp), %rsi
xorq -0x60(%rbp), %rsi
movq -0x48(%rbp), %rdx
xorq -0x58(%rbp), %rdx
leaq -0x38(%rbp), %rdi
callq 0x47c50
movq -0x10(%rbp), %rax
cmpq -0x78(%rbp), %rax
jae 0x48176
leaq -0x38(%rbp), %rdi
callq 0x47cd0
movsd 0x6ad4(%rip), %xmm1 # 0x4ec10
mulsd %xmm1, %xmm0
callq 0x13730
movsd 0x6acb(%rip), %xmm1 # 0x4ec18
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movb %cl, (%rax)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x48121
leaq -0x38(%rbp), %rdi
callq 0x47cd0
movsd 0x6a89(%rip), %xmm1 # 0x4ec10
mulsd %xmm1, %xmm0
callq 0x13730
cvttsd2si %xmm0, %eax
movb %al, -0x61(%rbp)
movq -0x70(%rbp), %rax
cmpq -0x8(%rbp), %rax
je 0x481bd
movsbl -0x61(%rbp), %edx
movq -0x70(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x70(%rbp)
movsbl (%rax), %ecx
xorl %edx, %ecx
movb %cl, (%rax)
jmp 0x48197
jmp 0x481bf
movq -0x8(%rbp), %rax
movb $0x0, (%rax)
movq -0x8(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
|
ma_scramble_323:
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
cmp [rbp+var_18], 0
jz loc_481BF
mov rax, [rbp+var_18]
movsx eax, byte ptr [rax]
cmp eax, 0
jz loc_481BF
mov rax, [rbp+var_8]
mov [rbp+var_70], rax
mov rax, [rbp+var_10]
add rax, 8
mov [rbp+var_78], rax
lea rax, [rbp+var_50]
mov [rbp+var_88], rax
mov rax, [rbp+var_18]
mov [rbp+var_80], rax
mov rdi, [rbp+var_18]
call _strlen
mov rdi, [rbp+var_88]
mov rsi, [rbp+var_80]
mov eax, eax
mov edx, eax
call ma_hash_password
lea rdi, [rbp+var_60]
mov rsi, [rbp+var_10]
mov edx, 8
call ma_hash_password
mov rsi, [rbp+var_50]
xor rsi, [rbp+var_60]
mov rdx, [rbp+var_48]
xor rdx, [rbp+var_58]
lea rdi, [rbp+var_38]
call ma_randominit
loc_48121:
mov rax, [rbp+var_10]
cmp rax, [rbp+var_78]
jnb short loc_48176
lea rdi, [rbp+var_38]
call rnd
movsd xmm1, cs:qword_4EC10
mulsd xmm0, xmm1
call _floor
movsd xmm1, cs:qword_4EC18
addsd xmm0, xmm1
cvttsd2si eax, xmm0
mov cl, al
mov rax, [rbp+var_8]
mov rdx, rax
add rdx, 1
mov [rbp+var_8], rdx
mov [rax], cl
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp short loc_48121
loc_48176:
lea rdi, [rbp+var_38]
call rnd
movsd xmm1, cs:qword_4EC10
mulsd xmm0, xmm1
call _floor
cvttsd2si eax, xmm0
mov [rbp+var_61], al
loc_48197:
mov rax, [rbp+var_70]
cmp rax, [rbp+var_8]
jz short loc_481BD
movsx edx, [rbp+var_61]
mov rax, [rbp+var_70]
mov rcx, rax
add rcx, 1
mov [rbp+var_70], rcx
movsx ecx, byte ptr [rax]
xor ecx, edx
mov [rax], cl
jmp short loc_48197
loc_481BD:
jmp short $+2
loc_481BF:
mov rax, [rbp+var_8]
mov byte ptr [rax], 0
mov rax, [rbp+var_8]
add rsp, 90h
pop rbp
retn
|
_BYTE * ma_scramble_323(_BYTE *a1, _BYTE *a2, _BYTE *a3)
{
unsigned int v3; // eax
double v4; // xmm0_8
double v5; // xmm0_8
_BYTE *v6; // rax
double v7; // xmm0_8
_BYTE *v8; // rax
_BYTE *v10; // [rsp+10h] [rbp-80h]
_BYTE *v11; // [rsp+18h] [rbp-78h]
_BYTE *v12; // [rsp+20h] [rbp-70h]
char v13; // [rsp+2Fh] [rbp-61h]
_QWORD v14[2]; // [rsp+30h] [rbp-60h] BYREF
_QWORD v15[3]; // [rsp+40h] [rbp-50h] BYREF
_BYTE v16[32]; // [rsp+58h] [rbp-38h] BYREF
_BYTE *v17; // [rsp+78h] [rbp-18h]
_BYTE *v18; // [rsp+80h] [rbp-10h]
_BYTE *v19; // [rsp+88h] [rbp-8h]
v19 = a1;
v18 = a2;
v17 = a3;
if ( a3 && *v17 )
{
v12 = v19;
v11 = v18 + 8;
v10 = v17;
v3 = strlen(v17);
ma_hash_password(v15, v10, v3);
ma_hash_password(v14, v18, 8LL);
ma_randominit((long long)v16, v14[0] ^ v15[0], v14[1] ^ v15[1]);
while ( v18 < v11 )
{
v4 = rnd((long long)v16);
v5 = floor(v4 * 31.0);
v6 = v19++;
*v6 = (int)(v5 + 64.0);
++v18;
}
v7 = rnd((long long)v16);
v13 = (int)floor(v7 * 31.0);
while ( v12 != v19 )
{
v8 = v12++;
*v8 ^= v13;
}
}
*v19 = 0;
return v19;
}
|
ma_scramble_323:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
CMP qword ptr [RBP + -0x18],0x0
JZ 0x001481bf
MOV RAX,qword ptr [RBP + -0x18]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
JZ 0x001481bf
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x70],RAX
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x8
MOV qword ptr [RBP + -0x78],RAX
LEA RAX,[RBP + -0x50]
MOV qword ptr [RBP + -0x88],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x80],RAX
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001131a0
MOV RDI,qword ptr [RBP + -0x88]
MOV RSI,qword ptr [RBP + -0x80]
MOV EAX,EAX
MOV EDX,EAX
CALL 0x00147d70
LEA RDI,[RBP + -0x60]
MOV RSI,qword ptr [RBP + -0x10]
MOV EDX,0x8
CALL 0x00147d70
MOV RSI,qword ptr [RBP + -0x50]
XOR RSI,qword ptr [RBP + -0x60]
MOV RDX,qword ptr [RBP + -0x48]
XOR RDX,qword ptr [RBP + -0x58]
LEA RDI,[RBP + -0x38]
CALL 0x00147c50
LAB_00148121:
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x78]
JNC 0x00148176
LEA RDI,[RBP + -0x38]
CALL 0x00147cd0
MOVSD XMM1,qword ptr [0x0014ec10]
MULSD XMM0,XMM1
CALL 0x00113730
MOVSD XMM1,qword ptr [0x0014ec18]
ADDSD XMM0,XMM1
CVTTSD2SI EAX,XMM0
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x8],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x00148121
LAB_00148176:
LEA RDI,[RBP + -0x38]
CALL 0x00147cd0
MOVSD XMM1,qword ptr [0x0014ec10]
MULSD XMM0,XMM1
CALL 0x00113730
CVTTSD2SI EAX,XMM0
MOV byte ptr [RBP + -0x61],AL
LAB_00148197:
MOV RAX,qword ptr [RBP + -0x70]
CMP RAX,qword ptr [RBP + -0x8]
JZ 0x001481bd
MOVSX EDX,byte ptr [RBP + -0x61]
MOV RAX,qword ptr [RBP + -0x70]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x70],RCX
MOVSX ECX,byte ptr [RAX]
XOR ECX,EDX
MOV byte ptr [RAX],CL
JMP 0x00148197
LAB_001481bd:
JMP 0x001481bf
LAB_001481bf:
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x90
POP RBP
RET
|
byte * ma_scramble_323(byte *param_1,ulong param_2,char *param_3)
{
size_t sVar1;
double dVar2;
byte *local_78;
ulong local_68;
ulong local_60;
ulong local_58;
ulong local_50;
int1 local_40 [32];
char *local_20;
ulong local_18;
byte *local_10;
local_10 = param_1;
if ((param_3 != (char *)0x0) && (*param_3 != '\0')) {
local_20 = param_3;
local_18 = param_2;
sVar1 = strlen(param_3);
ma_hash_password(&local_58,param_3,sVar1 & 0xffffffff);
ma_hash_password(&local_68,local_18,8);
ma_randominit(local_40,local_58 ^ local_68,local_50 ^ local_60);
for (; local_18 < param_2 + 8; local_18 = local_18 + 1) {
dVar2 = (double)rnd(local_40);
dVar2 = floor(dVar2 * DAT_0014ec10);
*local_10 = (byte)(int)(dVar2 + DAT_0014ec18);
local_10 = local_10 + 1;
}
dVar2 = (double)rnd(local_40);
dVar2 = floor(dVar2 * DAT_0014ec10);
local_78 = param_1;
while (local_78 != local_10) {
*local_78 = *local_78 ^ (byte)(int)dVar2;
local_78 = local_78 + 1;
}
}
*local_10 = 0;
return local_10;
}
|
|
20,138
|
ma_scramble_323
|
eloqsql/libmariadb/libmariadb/ma_password.c
|
char *ma_scramble_323(char *to, const char *message, const char *password)
{
struct rand_struct rand_st;
ulong hash_pass[2], hash_message[2];
if (password && password[0])
{
char extra, *to_start=to;
const char *end_scramble323= message + SCRAMBLE_LENGTH_323;
ma_hash_password(hash_pass,password, (uint) strlen(password));
/* Don't use strlen, could be > SCRAMBLE_LENGTH_323 ! */
ma_hash_password(hash_message, message, SCRAMBLE_LENGTH_323);
ma_randominit(&rand_st, hash_pass[0] ^ hash_message[0],
hash_pass[1] ^ hash_message[1]);
for (; message < end_scramble323; message++)
*to++= (char) (floor(rnd(&rand_st) * 31) + 64);
extra=(char) (floor(rnd(&rand_st) * 31));
while (to_start != to)
*(to_start++)^= extra;
}
*to= 0;
return to;
}
|
O3
|
c
|
ma_scramble_323:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
testq %rdx, %rdx
je 0x3277f
movq %rdx, %r15
cmpb $0x0, (%rdx)
je 0x3277f
movq %rsi, %r14
movq %r15, %rdi
callq 0x131c0
movl %eax, %edx
leaq -0x50(%rbp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x323d0
leaq -0x40(%rbp), %r15
movl $0x8, %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x323d0
movq (%r15), %rsi
movq 0x8(%r15), %rcx
xorq (%r12), %rsi
xorq 0x8(%r12), %rcx
movabsq $0x400000011, %r12 # imm = 0x400000011
movq %rsi, %rax
mulq %r12
movq %rsi, %r13
subq %rdx, %r13
shrq %r13
addq %rdx, %r13
shrq $0x1d, %r13
movq %r13, %rax
shlq $0x1e, %rax
subq %rax, %r13
addq %rsi, %r13
movq %rcx, %rax
mulq %r12
movq %rcx, %rsi
subq %rdx, %rsi
shrq %rsi
addq %rdx, %rsi
shrq $0x1d, %rsi
movq %rsi, %rax
shlq $0x1e, %rax
subq %rax, %rsi
addq %rcx, %rsi
xorl %r15d, %r15d
leaq (,%r13,2), %rcx
addq %r13, %rcx
addq %rsi, %rcx
movq %rcx, %rax
mulq %r12
movq %rcx, %r13
subq %rdx, %r13
shrq %r13
addq %rdx, %r13
shrq $0x1d, %r13
movq %r13, %rax
shlq $0x1e, %rax
subq %rax, %r13
addq %rcx, %r13
leaq (%rsi,%r13), %r14
addq $0x21, %r14
xorps %xmm0, %xmm0
cvtsi2sd %r13d, %xmm0
divsd 0x54cd(%rip), %xmm0 # 0x37ba0
mulsd 0x54cd(%rip), %xmm0 # 0x37ba8
callq 0x13780
addsd 0x54c8(%rip), %xmm0 # 0x37bb0
cvttsd2si %xmm0, %eax
movb %al, (%rbx,%r15)
movq %r14, %rax
mulq %r12
incq %r15
movq %r14, %rsi
subq %rdx, %rsi
shrq %rsi
addq %rdx, %rsi
shrq $0x1d, %rsi
movq %rsi, %rax
shlq $0x1e, %rax
subq %rax, %rsi
addq %r14, %rsi
cmpq $0x8, %r15
jne 0x3268a
leal (%r13,%r13,2), %eax
addl %eax, %esi
leaq (%rsi,%rsi,4), %rax
shrq $0x20, %rax
movl %esi, %ecx
subl %eax, %ecx
shrl %ecx
addl %eax, %ecx
shrl $0x1d, %ecx
movl %ecx, %eax
shll $0x1e, %eax
subl %eax, %ecx
addl %esi, %ecx
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
divsd 0x544e(%rip), %xmm0 # 0x37ba0
mulsd 0x544e(%rip), %xmm0 # 0x37ba8
callq 0x13780
cvttsd2si %xmm0, %eax
movd %eax, %xmm0
punpcklbw %xmm0, %xmm0 # xmm0 = xmm0[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
pshuflw $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0,4,5,6,7]
movq (%rbx), %xmm1
pxor %xmm0, %xmm1
movq %xmm1, (%rbx)
addq %r15, %rbx
movb $0x0, (%rbx)
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
ma_scramble_323:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov rbx, rdi
test rdx, rdx
jz loc_3277F
mov r15, rdx
cmp byte ptr [rdx], 0
jz loc_3277F
mov r14, rsi
mov rdi, r15
call _strlen
mov edx, eax
lea r12, [rbp+var_50]
mov rdi, r12
mov rsi, r15
call ma_hash_password
lea r15, [rbp+var_40]
mov edx, 8
mov rdi, r15
mov rsi, r14
call ma_hash_password
mov rsi, [r15]
mov rcx, [r15+8]
xor rsi, [r12]
xor rcx, [r12+8]
mov r12, 400000011h
mov rax, rsi
mul r12
mov r13, rsi
sub r13, rdx
shr r13, 1
add r13, rdx
shr r13, 1Dh
mov rax, r13
shl rax, 1Eh
sub r13, rax
add r13, rsi
mov rax, rcx
mul r12
mov rsi, rcx
sub rsi, rdx
shr rsi, 1
add rsi, rdx
shr rsi, 1Dh
mov rax, rsi
shl rax, 1Eh
sub rsi, rax
add rsi, rcx
xor r15d, r15d
loc_3268A:
lea rcx, ds:0[r13*2]
add rcx, r13
add rcx, rsi
mov rax, rcx
mul r12
mov r13, rcx
sub r13, rdx
shr r13, 1
add r13, rdx
shr r13, 1Dh
mov rax, r13
shl rax, 1Eh
sub r13, rax
add r13, rcx
lea r14, [rsi+r13]
add r14, 21h ; '!'
xorps xmm0, xmm0
cvtsi2sd xmm0, r13d
divsd xmm0, cs:qword_37BA0
mulsd xmm0, cs:qword_37BA8
call _floor
addsd xmm0, cs:qword_37BB0
cvttsd2si eax, xmm0
mov [rbx+r15], al
mov rax, r14
mul r12
inc r15
mov rsi, r14
sub rsi, rdx
shr rsi, 1
add rsi, rdx
shr rsi, 1Dh
mov rax, rsi
shl rax, 1Eh
sub rsi, rax
add rsi, r14
cmp r15, 8
jnz loc_3268A
lea eax, [r13+r13*2+0]
add esi, eax
lea rax, [rsi+rsi*4]
shr rax, 20h
mov ecx, esi
sub ecx, eax
shr ecx, 1
add ecx, eax
shr ecx, 1Dh
mov eax, ecx
shl eax, 1Eh
sub ecx, eax
add ecx, esi
xorps xmm0, xmm0
cvtsi2sd xmm0, ecx
divsd xmm0, cs:qword_37BA0
mulsd xmm0, cs:qword_37BA8
call _floor
cvttsd2si eax, xmm0
movd xmm0, eax
punpcklbw xmm0, xmm0
pshuflw xmm0, xmm0, 0
movq xmm1, qword ptr [rbx]
pxor xmm1, xmm0
movq qword ptr [rbx], xmm1
add rbx, r15
loc_3277F:
mov byte ptr [rbx], 0
mov rax, rbx
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
__m128i * ma_scramble_323(__m128i *a1, unsigned __int8 *a2, unsigned __int8 *a3)
{
__m128i *v3; // rbx
unsigned int v5; // eax
unsigned long long v6; // r13
unsigned long long v7; // rsi
long long i; // r15
__m128i v9; // xmm0
long long v11[2]; // [rsp+0h] [rbp-50h] BYREF
long long v12[8]; // [rsp+10h] [rbp-40h] BYREF
v3 = a1;
if ( a3 && *a3 )
{
v5 = strlen(a3);
ma_hash_password(v11, a3, v5);
ma_hash_password(v12, a2, 8LL);
v6 = (v11[0] ^ v12[0]) % 0x3FFFFFFFuLL;
v7 = (v11[1] ^ v12[1]) % 0x3FFFFFFFuLL;
for ( i = 0LL; i != 8; ++i )
{
v6 = (v7 + 3 * v6) % 0x3FFFFFFF;
a1->m128i_i8[i] = (int)(floor((double)(int)v6 / 1073741823.0 * 31.0) + 64.0);
v7 = (v7 + v6 + 33) % 0x3FFFFFFF;
}
v9 = _mm_cvtsi32_si128((int)floor((double)((3 * (int)v6 + (int)v7) % 0x3FFFFFFFu) / 1073741823.0 * 31.0));
a1->m128i_i64[0] = _mm_xor_si128(_mm_loadl_epi64(a1), _mm_shufflelo_epi16(_mm_unpacklo_epi8(v9, v9), 0)).m128i_u64[0];
v3 = (__m128i *)&a1->m128i_u64[1];
}
v3->m128i_i8[0] = 0;
return v3;
}
|
ma_scramble_323:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RBX,RDI
TEST RDX,RDX
JZ 0x0013277f
MOV R15,RDX
CMP byte ptr [RDX],0x0
JZ 0x0013277f
MOV R14,RSI
MOV RDI,R15
CALL 0x001131c0
MOV EDX,EAX
LEA R12,[RBP + -0x50]
MOV RDI,R12
MOV RSI,R15
CALL 0x001323d0
LEA R15,[RBP + -0x40]
MOV EDX,0x8
MOV RDI,R15
MOV RSI,R14
CALL 0x001323d0
MOV RSI,qword ptr [R15]
MOV RCX,qword ptr [R15 + 0x8]
XOR RSI,qword ptr [R12]
XOR RCX,qword ptr [R12 + 0x8]
MOV R12,0x400000011
MOV RAX,RSI
MUL R12
MOV R13,RSI
SUB R13,RDX
SHR R13,0x1
ADD R13,RDX
SHR R13,0x1d
MOV RAX,R13
SHL RAX,0x1e
SUB R13,RAX
ADD R13,RSI
MOV RAX,RCX
MUL R12
MOV RSI,RCX
SUB RSI,RDX
SHR RSI,0x1
ADD RSI,RDX
SHR RSI,0x1d
MOV RAX,RSI
SHL RAX,0x1e
SUB RSI,RAX
ADD RSI,RCX
XOR R15D,R15D
LAB_0013268a:
LEA RCX,[R13*0x2]
ADD RCX,R13
ADD RCX,RSI
MOV RAX,RCX
MUL R12
MOV R13,RCX
SUB R13,RDX
SHR R13,0x1
ADD R13,RDX
SHR R13,0x1d
MOV RAX,R13
SHL RAX,0x1e
SUB R13,RAX
ADD R13,RCX
LEA R14,[RSI + R13*0x1]
ADD R14,0x21
XORPS XMM0,XMM0
CVTSI2SD XMM0,R13D
DIVSD XMM0,qword ptr [0x00137ba0]
MULSD XMM0,qword ptr [0x00137ba8]
CALL 0x00113780
ADDSD XMM0,qword ptr [0x00137bb0]
CVTTSD2SI EAX,XMM0
MOV byte ptr [RBX + R15*0x1],AL
MOV RAX,R14
MUL R12
INC R15
MOV RSI,R14
SUB RSI,RDX
SHR RSI,0x1
ADD RSI,RDX
SHR RSI,0x1d
MOV RAX,RSI
SHL RAX,0x1e
SUB RSI,RAX
ADD RSI,R14
CMP R15,0x8
JNZ 0x0013268a
LEA EAX,[R13 + R13*0x2]
ADD ESI,EAX
LEA RAX,[RSI + RSI*0x4]
SHR RAX,0x20
MOV ECX,ESI
SUB ECX,EAX
SHR ECX,0x1
ADD ECX,EAX
SHR ECX,0x1d
MOV EAX,ECX
SHL EAX,0x1e
SUB ECX,EAX
ADD ECX,ESI
XORPS XMM0,XMM0
CVTSI2SD XMM0,ECX
DIVSD XMM0,qword ptr [0x00137ba0]
MULSD XMM0,qword ptr [0x00137ba8]
CALL 0x00113780
CVTTSD2SI EAX,XMM0
MOVD XMM0,EAX
PUNPCKLBW XMM0,XMM0
PSHUFLW XMM0,XMM0,0x0
MOVQ XMM1,qword ptr [RBX]
PXOR XMM1,XMM0
MOVQ qword ptr [RBX],XMM1
ADD RBX,R15
LAB_0013277f:
MOV byte ptr [RBX],0x0
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
ulong * ma_scramble_323(ulong *param_1,int8 param_2,char *param_3)
{
int iVar1;
size_t sVar2;
ulong uVar3;
ulong uVar4;
long lVar5;
int1 uVar8;
int1 uVar9;
int1 uVar10;
double dVar6;
int1 auVar7 [16];
ulong local_58;
ulong local_50;
ulong local_48;
ulong local_40;
if ((param_3 != (char *)0x0) && (*param_3 != '\0')) {
sVar2 = strlen(param_3);
ma_hash_password(&local_58,param_3,sVar2 & 0xffffffff);
ma_hash_password(&local_48,param_2,8);
uVar4 = (local_48 ^ local_58) % 0x3fffffff;
uVar3 = (local_40 ^ local_50) % 0x3fffffff;
lVar5 = 0;
do {
uVar4 = (uVar4 * 3 + uVar3) % 0x3fffffff;
dVar6 = floor(((double)(int)uVar4 / _DAT_00137ba0) * _DAT_00137ba8);
*(char *)((long)param_1 + lVar5) = (char)(int)(dVar6 + _DAT_00137bb0);
lVar5 = lVar5 + 1;
uVar3 = (uVar3 + uVar4 + 0x21) % 0x3fffffff;
} while (lVar5 != 8);
dVar6 = floor(((double)((uint)((int)uVar3 + (int)uVar4 * 3) % 0x3fffffff) / _DAT_00137ba0) *
_DAT_00137ba8);
iVar1 = (int)dVar6;
uVar10 = (int1)((uint)iVar1 >> 0x18);
uVar9 = (int1)((uint)iVar1 >> 0x10);
uVar8 = (int1)((uint)iVar1 >> 8);
auVar7._4_4_ = (int)(CONCAT35(CONCAT21(CONCAT11(uVar10,uVar10),uVar9),CONCAT14(uVar9,iVar1)) >>
0x20);
auVar7[3] = uVar8;
auVar7[2] = uVar8;
auVar7[0] = (int1)iVar1;
auVar7[1] = auVar7[0];
auVar7._8_8_ = 0;
auVar7 = pshuflw(auVar7,auVar7,0);
*param_1 = *param_1 ^ auVar7._0_8_;
param_1 = param_1 + 1;
}
*(int1 *)param_1 = 0;
return param_1;
}
|
|
20,139
|
mi_decrement_open_count
|
eloqsql/storage/myisam/mi_locking.c
|
int _mi_decrement_open_count(MI_INFO *info)
{
uchar buff[2];
register MYISAM_SHARE *share=info->s;
int lock_error=0,write_error=0;
if (share->global_changed)
{
uint old_lock=info->lock_type;
share->global_changed=0;
lock_error= my_disable_locking ? 0 : mi_lock_database(info,F_WRLCK);
/* Its not fatal even if we couldn't get the lock ! */
if (share->state.open_count > 0)
{
share->state.open_count--;
mi_int2store(buff,share->state.open_count);
write_error= (mysql_file_pwrite(share->kfile, buff, sizeof(buff),
sizeof(share->state.header),
MYF(MY_NABP)) != 0);
}
if (!lock_error && !my_disable_locking)
lock_error=mi_lock_database(info,old_lock);
}
return MY_TEST(lock_error || write_error);
}
|
O0
|
c
|
mi_decrement_open_count:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpb $0x0, 0x380(%rax)
je 0x3116c
movq -0x8(%rbp), %rax
movl 0x1f4(%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x18(%rbp), %rax
movb $0x0, 0x380(%rax)
leaq 0x3ce2f3(%rip), %rax # 0x3ff398
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x310b4
xorl %eax, %eax
movl %eax, -0x2c(%rbp)
jmp 0x310c5
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x2f9e0
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, 0xec(%rax)
jbe 0x31149
movq -0x18(%rbp), %rax
movl 0xec(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0xec(%rax)
movq -0x18(%rbp), %rax
movl 0xec(%rax), %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
movb %al, -0x9(%rbp)
movl -0x28(%rbp), %eax
shrl $0x8, %eax
movb %al, -0xa(%rbp)
movq -0x18(%rbp), %rax
movl 0x350(%rax), %edx
leaq -0xa(%rbp), %rcx
leaq 0xac3b8(%rip), %rdi # 0xdd4d4
movl $0x28c, %esi # imm = 0x28C
movl $0x2, %r8d
movl $0x18, %r9d
movq $0x4, (%rsp)
callq 0x30ee0
cmpq $0x0, %rax
setne %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x3116a
leaq 0x3ce242(%rip), %rax # 0x3ff398
cmpb $0x0, (%rax)
jne 0x3116a
movq -0x8(%rbp), %rdi
movl -0x24(%rbp), %esi
callq 0x2f9e0
movl %eax, -0x1c(%rbp)
jmp 0x3116c
movb $0x1, %al
cmpl $0x0, -0x1c(%rbp)
movb %al, -0x2d(%rbp)
jne 0x31181
cmpl $0x0, -0x20(%rbp)
setne %al
movb %al, -0x2d(%rbp)
movb -0x2d(%rbp), %dl
xorl %eax, %eax
movl $0x1, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
_mi_decrement_open_count:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_18], rax
mov [rbp+var_1C], 0
mov [rbp+var_20], 0
mov rax, [rbp+var_18]
cmp byte ptr [rax+380h], 0
jz loc_3116C
mov rax, [rbp+var_8]
mov eax, [rax+1F4h]
mov [rbp+var_24], eax
mov rax, [rbp+var_18]
mov byte ptr [rax+380h], 0
lea rax, my_disable_locking
movsx eax, byte ptr [rax]
cmp eax, 0
jz short loc_310B4
xor eax, eax
mov [rbp+var_2C], eax
jmp short loc_310C5
loc_310B4:
mov rdi, [rbp+var_8]
mov esi, 1
call mi_lock_database
mov [rbp+var_2C], eax
loc_310C5:
mov eax, [rbp+var_2C]
mov [rbp+var_1C], eax
mov rax, [rbp+var_18]
cmp dword ptr [rax+0ECh], 0
jbe short loc_31149
mov rax, [rbp+var_18]
mov ecx, [rax+0ECh]
add ecx, 0FFFFFFFFh
mov [rax+0ECh], ecx
mov rax, [rbp+var_18]
mov eax, [rax+0ECh]
mov [rbp+var_28], eax
mov eax, [rbp+var_28]
mov [rbp+var_9], al
mov eax, [rbp+var_28]
shr eax, 8
mov [rbp+var_A], al
mov rax, [rbp+var_18]
mov edx, [rax+350h]
lea rcx, [rbp+var_A]
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 28Ch
mov r8d, 2
mov r9d, 18h
mov [rsp+40h+var_40], 4
call inline_mysql_file_pwrite_0
cmp rax, 0
setnz al
and al, 1
movzx eax, al
mov [rbp+var_20], eax
loc_31149:
cmp [rbp+var_1C], 0
jnz short loc_3116A
lea rax, my_disable_locking
cmp byte ptr [rax], 0
jnz short loc_3116A
mov rdi, [rbp+var_8]
mov esi, [rbp+var_24]
call mi_lock_database
mov [rbp+var_1C], eax
loc_3116A:
jmp short $+2
loc_3116C:
mov al, 1
cmp [rbp+var_1C], 0
mov [rbp+var_2D], al
jnz short loc_31181
cmp [rbp+var_20], 0
setnz al
mov [rbp+var_2D], al
loc_31181:
mov dl, [rbp+var_2D]
xor eax, eax
mov ecx, 1
test dl, 1
cmovnz eax, ecx
add rsp, 40h
pop rbp
retn
|
_BOOL8 mi_decrement_open_count(_DWORD *a1)
{
__int16 v1; // kr00_2
bool v3; // [rsp+13h] [rbp-2Dh]
int v4; // [rsp+14h] [rbp-2Ch]
unsigned int v5; // [rsp+1Ch] [rbp-24h]
BOOL v6; // [rsp+20h] [rbp-20h]
int v7; // [rsp+24h] [rbp-1Ch]
long long v8; // [rsp+28h] [rbp-18h]
_BYTE v9[2]; // [rsp+36h] [rbp-Ah] BYREF
_DWORD *v10; // [rsp+38h] [rbp-8h]
v10 = a1;
v8 = *(_QWORD *)a1;
v7 = 0;
v6 = 0;
if ( *(_BYTE *)(*(_QWORD *)a1 + 896LL) )
{
v5 = v10[125];
*(_BYTE *)(v8 + 896) = 0;
if ( my_disable_locking )
v4 = 0;
else
v4 = mi_lock_database(v10, 1u);
v7 = v4;
if ( *(_DWORD *)(v8 + 236) )
{
v1 = --*(_DWORD *)(v8 + 236);
v9[0] = HIBYTE(v1);
v9[1] = v1;
v6 = inline_mysql_file_pwrite_0(
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_locking.c",
0x28Cu,
*(_DWORD *)(v8 + 848),
(long long)v9,
2LL,
24LL,
4LL) != 0;
}
if ( !v4 && !my_disable_locking )
v7 = mi_lock_database(v10, v5);
}
v3 = 1;
if ( !v7 )
return v6;
return v3;
}
|
_mi_decrement_open_count:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
MOV dword ptr [RBP + -0x1c],0x0
MOV dword ptr [RBP + -0x20],0x0
MOV RAX,qword ptr [RBP + -0x18]
CMP byte ptr [RAX + 0x380],0x0
JZ 0x0013116c
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x1f4]
MOV dword ptr [RBP + -0x24],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX + 0x380],0x0
LEA RAX,[0x4ff398]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
JZ 0x001310b4
XOR EAX,EAX
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x001310c5
LAB_001310b4:
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,0x1
CALL 0x0012f9e0
MOV dword ptr [RBP + -0x2c],EAX
LAB_001310c5:
MOV EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0x1c],EAX
MOV RAX,qword ptr [RBP + -0x18]
CMP dword ptr [RAX + 0xec],0x0
JBE 0x00131149
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RAX + 0xec]
ADD ECX,-0x1
MOV dword ptr [RAX + 0xec],ECX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0xec]
MOV dword ptr [RBP + -0x28],EAX
MOV EAX,dword ptr [RBP + -0x28]
MOV byte ptr [RBP + -0x9],AL
MOV EAX,dword ptr [RBP + -0x28]
SHR EAX,0x8
MOV byte ptr [RBP + -0xa],AL
MOV RAX,qword ptr [RBP + -0x18]
MOV EDX,dword ptr [RAX + 0x350]
LEA RCX,[RBP + -0xa]
LEA RDI,[0x1dd4d4]
MOV ESI,0x28c
MOV R8D,0x2
MOV R9D,0x18
MOV qword ptr [RSP],0x4
CALL 0x00130ee0
CMP RAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
MOV dword ptr [RBP + -0x20],EAX
LAB_00131149:
CMP dword ptr [RBP + -0x1c],0x0
JNZ 0x0013116a
LEA RAX,[0x4ff398]
CMP byte ptr [RAX],0x0
JNZ 0x0013116a
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0x24]
CALL 0x0012f9e0
MOV dword ptr [RBP + -0x1c],EAX
LAB_0013116a:
JMP 0x0013116c
LAB_0013116c:
MOV AL,0x1
CMP dword ptr [RBP + -0x1c],0x0
MOV byte ptr [RBP + -0x2d],AL
JNZ 0x00131181
CMP dword ptr [RBP + -0x20],0x0
SETNZ AL
MOV byte ptr [RBP + -0x2d],AL
LAB_00131181:
MOV DL,byte ptr [RBP + -0x2d]
XOR EAX,EAX
MOV ECX,0x1
TEST DL,0x1
CMOVNZ EAX,ECX
ADD RSP,0x40
POP RBP
RET
|
bool _mi_decrement_open_count(long *param_1)
{
int4 uVar1;
long lVar2;
bool bVar3;
int local_34;
int local_24;
int1 local_12;
int1 local_11;
long *local_10;
lVar2 = *param_1;
local_24 = 0;
bVar3 = false;
if (*(char *)(lVar2 + 0x380) != '\0') {
uVar1 = *(int4 *)((long)param_1 + 500);
*(int1 *)(lVar2 + 0x380) = 0;
local_10 = param_1;
if (my_disable_locking == '\0') {
local_34 = mi_lock_database(param_1,1);
}
else {
local_34 = 0;
}
local_24 = local_34;
if (*(int *)(lVar2 + 0xec) != 0) {
*(int *)(lVar2 + 0xec) = *(int *)(lVar2 + 0xec) + -1;
local_11 = (int1)*(int4 *)(lVar2 + 0xec);
local_12 = (int1)((uint)*(int4 *)(lVar2 + 0xec) >> 8);
lVar2 = inline_mysql_file_pwrite
("/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_locking.c",
0x28c,*(int4 *)(lVar2 + 0x350),&local_12,2,0x18,4);
bVar3 = lVar2 != 0;
}
if ((local_34 == 0) && (my_disable_locking == '\0')) {
local_24 = mi_lock_database(local_10,uVar1);
}
}
return local_24 != 0 || bVar3;
}
|
|
20,140
|
arena_alloc_aligned
|
tsotchke[P]eshkol/src/core/memory/arena.c
|
void* arena_alloc_aligned(Arena* arena, size_t size, size_t alignment) {
assert(arena != NULL);
// Add debug output for zero-sized allocations
if (size == 0) {
fprintf(stderr, "ERROR: Attempted to allocate 0 bytes in arena_alloc_aligned\n");
// Print stack trace if possible
void* buffer[100];
int nptrs = backtrace(buffer, 100);
backtrace_symbols_fd(buffer, nptrs, STDERR_FILENO);
// Continue with a minimum size of 1 instead of failing
size = 1;
}
assert(alignment > 0 && (alignment & (alignment - 1)) == 0); // Power of 2
// Try to allocate from current block
void* result = arena_alloc_from_block(arena, arena->current, size, alignment);
if (result) return result;
// Need a new block
size_t min_size = size + alignment - 1; // Ensure enough space for alignment
Block* block = arena_add_block(arena, min_size);
if (!block) return NULL;
// Allocate from the new block
result = arena_alloc_from_block(arena, block, size, alignment);
assert(result != NULL); // Should always succeed
return result;
}
|
O1
|
c
|
arena_alloc_aligned:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x22c5
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
testq %rsi, %rsi
je 0x22b5
leaq -0x1(%rbx), %rax
movq %rbx, %rcx
xorq %rax, %rcx
cmpq %rax, %rcx
jbe 0x22e4
movq (%r14), %rsi
movq %r14, %rdi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x2322
testq %rax, %rax
jne 0x22ab
leaq (%rbx,%r15), %rax
decq %rax
je 0x2303
movq (%r14), %r12
movq 0x8(%r12), %r13
addq %r13, %r13
cmpq %rax, %r13
cmovbeq %rax, %r13
leaq 0x18(%r13), %rdi
callq 0x10a0
testq %rax, %rax
je 0x226d
xorl %ecx, %ecx
movq %rcx, (%rax)
movq %r13, 0x8(%rax)
movq %rcx, 0x10(%rax)
movq %rax, (%r12)
movq %rax, (%r14)
jmp 0x226f
xorl %eax, %eax
testq %rax, %rax
je 0x22a9
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x2322
testq %rax, %rax
jne 0x22ab
leaq 0x15d1(%rip), %rdi # 0x3862
leaq 0x14d4(%rip), %rsi # 0x376c
leaq 0x151f(%rip), %rcx # 0x37be
movl $0xa5, %edx
callq 0x1070
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
callq 0x10d0
movl $0x1, %r15d
jmp 0x21fd
leaq 0xd68(%rip), %rdi # 0x3034
leaq 0x1499(%rip), %rsi # 0x376c
leaq 0x14e4(%rip), %rcx # 0x37be
movl $0x8b, %edx
callq 0x1070
leaq 0x1543(%rip), %rdi # 0x382e
leaq 0x147a(%rip), %rsi # 0x376c
leaq 0x14c5(%rip), %rcx # 0x37be
movl $0x98, %edx
callq 0x1070
leaq 0x166f(%rip), %rdi # 0x3979
leaq 0x145b(%rip), %rsi # 0x376c
leaq 0x1639(%rip), %rcx # 0x3951
movl $0x6f, %edx
callq 0x1070
|
arena_alloc_aligned:
push r15
push r14
push r13
push r12
push rbx
test rdi, rdi
jz loc_22C5
mov rbx, rdx
mov r15, rsi
mov r14, rdi
test rsi, rsi
jz loc_22B5
loc_21FD:
lea rax, [rbx-1]
mov rcx, rbx
xor rcx, rax
cmp rcx, rax
jbe loc_22E4
mov rsi, [r14]
mov rdi, r14
mov rdx, r15
mov rcx, rbx
call arena_alloc_from_block
test rax, rax
jnz loc_22AB
lea rax, [rbx+r15]
dec rax
jz loc_2303
mov r12, [r14]
mov r13, [r12+8]
add r13, r13
cmp r13, rax
cmovbe r13, rax
lea rdi, [r13+18h]
call _malloc
test rax, rax
jz short loc_226D
xor ecx, ecx
mov [rax], rcx
mov [rax+8], r13
mov [rax+10h], rcx
mov [r12], rax
mov [r14], rax
jmp short loc_226F
loc_226D:
xor eax, eax
loc_226F:
test rax, rax
jz short loc_22A9
mov rdi, r14
mov rsi, rax
mov rdx, r15
mov rcx, rbx
call arena_alloc_from_block
test rax, rax
jnz short loc_22AB
lea rdi, aResultNull; "result != NULL"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidArenaAlloc; "void *arena_alloc_aligned(Arena *, size"...
mov edx, 0A5h
call ___assert_fail
loc_22A9:
xor eax, eax
loc_22AB:
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_22B5:
call arena_alloc_aligned_cold_1
mov r15d, 1
jmp loc_21FD
loc_22C5:
lea rdi, aArenaNull; "arena != NULL"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidArenaAlloc; "void *arena_alloc_aligned(Arena *, size"...
mov edx, 8Bh
call ___assert_fail
loc_22E4:
lea rdi, aAlignment0Alig; "alignment > 0 && (alignment & (alignmen"...
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidArenaAlloc; "void *arena_alloc_aligned(Arena *, size"...
mov edx, 98h
call ___assert_fail
loc_2303:
lea rdi, aMinSize0; "min_size > 0"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aBlockArenaAddB; "Block *arena_add_block(Arena *, size_t)"
mov edx, 6Fh ; 'o'
call ___assert_fail
|
long long arena_alloc_aligned(_QWORD *a1, long long a2, unsigned long long a3)
{
long long v4; // r15
long long result; // rax
_QWORD *v6; // r12
unsigned long long v7; // r13
_QWORD *v8; // rax
if ( !a1 )
__assert_fail(
"arena != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c",
139LL,
"void *arena_alloc_aligned(Arena *, size_t, size_t)");
v4 = a2;
if ( !a2 )
{
arena_alloc_aligned_cold_1();
v4 = 1LL;
}
if ( ((a3 - 1) ^ a3) <= a3 - 1 )
__assert_fail(
"alignment > 0 && (alignment & (alignment - 1)) == 0",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c",
152LL,
"void *arena_alloc_aligned(Arena *, size_t, size_t)");
result = arena_alloc_from_block(a1, *a1, v4, a3);
if ( !result )
{
if ( a3 + v4 == 1 )
__assert_fail(
"min_size > 0",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c",
111LL,
"Block *arena_add_block(Arena *, size_t)");
v6 = (_QWORD *)*a1;
v7 = 2LL * *(_QWORD *)(*a1 + 8LL);
if ( v7 <= a3 + v4 - 1 )
v7 = a3 + v4 - 1;
v8 = (_QWORD *)malloc(v7 + 24);
if ( v8 )
{
*v8 = 0LL;
v8[1] = v7;
v8[2] = 0LL;
*v6 = v8;
*a1 = v8;
}
else
{
v8 = 0LL;
}
if ( v8 )
{
result = arena_alloc_from_block(a1, v8, v4, a3);
if ( !result )
__assert_fail(
"result != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c",
165LL,
"void *arena_alloc_aligned(Arena *, size_t, size_t)");
}
else
{
return 0LL;
}
}
return result;
}
|
arena_alloc_aligned:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
TEST RDI,RDI
JZ 0x001022c5
MOV RBX,RDX
MOV R15,RSI
MOV R14,RDI
TEST RSI,RSI
JZ 0x001022b5
LAB_001021fd:
LEA RAX,[RBX + -0x1]
MOV RCX,RBX
XOR RCX,RAX
CMP RCX,RAX
JBE 0x001022e4
MOV RSI,qword ptr [R14]
MOV RDI,R14
MOV RDX,R15
MOV RCX,RBX
CALL 0x00102322
TEST RAX,RAX
JNZ 0x001022ab
LEA RAX,[RBX + R15*0x1]
DEC RAX
JZ 0x00102303
MOV R12,qword ptr [R14]
MOV R13,qword ptr [R12 + 0x8]
ADD R13,R13
CMP R13,RAX
CMOVBE R13,RAX
LEA RDI,[R13 + 0x18]
CALL 0x001010a0
TEST RAX,RAX
JZ 0x0010226d
XOR ECX,ECX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],R13
MOV qword ptr [RAX + 0x10],RCX
MOV qword ptr [R12],RAX
MOV qword ptr [R14],RAX
JMP 0x0010226f
LAB_0010226d:
XOR EAX,EAX
LAB_0010226f:
TEST RAX,RAX
JZ 0x001022a9
MOV RDI,R14
MOV RSI,RAX
MOV RDX,R15
MOV RCX,RBX
CALL 0x00102322
TEST RAX,RAX
JNZ 0x001022ab
LEA RDI,[0x103862]
LEA RSI,[0x10376c]
LEA RCX,[0x1037be]
MOV EDX,0xa5
CALL 0x00101070
LAB_001022a9:
XOR EAX,EAX
LAB_001022ab:
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
LAB_001022b5:
CALL 0x001010d0
MOV R15D,0x1
JMP 0x001021fd
LAB_001022c5:
LEA RDI,[0x103034]
LEA RSI,[0x10376c]
LEA RCX,[0x1037be]
MOV EDX,0x8b
CALL 0x00101070
LAB_001022e4:
LEA RDI,[0x10382e]
LEA RSI,[0x10376c]
LEA RCX,[0x1037be]
MOV EDX,0x98
CALL 0x00101070
LAB_00102303:
LEA RDI,[0x103979]
LEA RSI,[0x10376c]
LEA RCX,[0x103951]
MOV EDX,0x6f
CALL 0x00101070
|
long arena_alloc_aligned(int8 *param_1,long param_2,ulong param_3)
{
int8 *puVar1;
long lVar2;
ulong uVar3;
int8 *puVar4;
ulong uVar5;
if (param_1 == (int8 *)0x0) {
/* WARNING: Subroutine does not return */
__assert_fail("arena != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c"
,0x8b,"void *arena_alloc_aligned(Arena *, size_t, size_t)");
}
if (param_2 == 0) {
arena_alloc_aligned_cold_1();
param_2 = 1;
}
if (param_3 - 1 < (param_3 ^ param_3 - 1)) {
lVar2 = arena_alloc_from_block(param_1,*param_1,param_2);
if (lVar2 == 0) {
uVar3 = (param_3 + param_2) - 1;
if (uVar3 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("min_size > 0",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c"
,0x6f,"Block *arena_add_block(Arena *, size_t)");
}
puVar1 = (int8 *)*param_1;
uVar5 = puVar1[1] * 2;
if (uVar5 <= uVar3) {
uVar5 = uVar3;
}
puVar4 = (int8 *)malloc(uVar5 + 0x18);
if (puVar4 == (int8 *)0x0) {
puVar4 = (int8 *)0x0;
}
else {
*puVar4 = 0;
puVar4[1] = uVar5;
puVar4[2] = 0;
*puVar1 = puVar4;
*param_1 = puVar4;
}
if (puVar4 == (int8 *)0x0) {
lVar2 = 0;
}
else {
lVar2 = arena_alloc_from_block(param_1,puVar4,param_2,param_3);
if (lVar2 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("result != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c"
,0xa5,"void *arena_alloc_aligned(Arena *, size_t, size_t)");
}
}
}
return lVar2;
}
/* WARNING: Subroutine does not return */
__assert_fail("alignment > 0 && (alignment & (alignment - 1)) == 0",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c",
0x98,"void *arena_alloc_aligned(Arena *, size_t, size_t)");
}
|
|
20,141
|
arena_alloc_aligned
|
tsotchke[P]eshkol/src/core/memory/arena.c
|
void* arena_alloc_aligned(Arena* arena, size_t size, size_t alignment) {
assert(arena != NULL);
// Add debug output for zero-sized allocations
if (size == 0) {
fprintf(stderr, "ERROR: Attempted to allocate 0 bytes in arena_alloc_aligned\n");
// Print stack trace if possible
void* buffer[100];
int nptrs = backtrace(buffer, 100);
backtrace_symbols_fd(buffer, nptrs, STDERR_FILENO);
// Continue with a minimum size of 1 instead of failing
size = 1;
}
assert(alignment > 0 && (alignment & (alignment - 1)) == 0); // Power of 2
// Try to allocate from current block
void* result = arena_alloc_from_block(arena, arena->current, size, alignment);
if (result) return result;
// Need a new block
size_t min_size = size + alignment - 1; // Ensure enough space for alignment
Block* block = arena_add_block(arena, min_size);
if (!block) return NULL;
// Allocate from the new block
result = arena_alloc_from_block(arena, block, size, alignment);
assert(result != NULL); // Should always succeed
return result;
}
|
O3
|
c
|
arena_alloc_aligned:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x228c
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
testq %rsi, %rsi
je 0x227c
leaq -0x1(%rbx), %rax
movq %rbx, %rcx
xorq %rax, %rcx
cmpq %rax, %rcx
jbe 0x22ab
movq (%r14), %rsi
movq %r14, %rdi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x22e9
testq %rax, %rax
jne 0x2272
leaq (%rbx,%r15), %rax
decq %rax
je 0x22ca
movq (%r14), %r12
movq 0x8(%r12), %r13
addq %r13, %r13
cmpq %rax, %r13
cmovbeq %rax, %r13
leaq 0x18(%r13), %rdi
callq 0x10a0
testq %rax, %rax
je 0x2270
xorl %ecx, %ecx
movq %rcx, (%rax)
movq %r13, 0x8(%rax)
movq %rcx, 0x10(%rax)
movq %rax, (%r12)
movq %rax, (%r14)
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x22e9
testq %rax, %rax
jne 0x2272
leaq 0x15fe(%rip), %rdi # 0x3856
leaq 0x1501(%rip), %rsi # 0x3760
leaq 0x154c(%rip), %rcx # 0x37b2
movl $0xa5, %edx
callq 0x1070
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
callq 0x10d0
movl $0x1, %r15d
jmp 0x21d1
leaq 0xda1(%rip), %rdi # 0x3034
leaq 0x14c6(%rip), %rsi # 0x3760
leaq 0x1511(%rip), %rcx # 0x37b2
movl $0x8b, %edx
callq 0x1070
leaq 0x1570(%rip), %rdi # 0x3822
leaq 0x14a7(%rip), %rsi # 0x3760
leaq 0x14f2(%rip), %rcx # 0x37b2
movl $0x98, %edx
callq 0x1070
leaq 0x169c(%rip), %rdi # 0x396d
leaq 0x1488(%rip), %rsi # 0x3760
leaq 0x1666(%rip), %rcx # 0x3945
movl $0x6f, %edx
callq 0x1070
|
arena_alloc_aligned:
push r15
push r14
push r13
push r12
push rbx
test rdi, rdi
jz loc_228C
mov rbx, rdx
mov r15, rsi
mov r14, rdi
test rsi, rsi
jz loc_227C
loc_21D1:
lea rax, [rbx-1]
mov rcx, rbx
xor rcx, rax
cmp rcx, rax
jbe loc_22AB
mov rsi, [r14]
mov rdi, r14
mov rdx, r15
mov rcx, rbx
call arena_alloc_from_block
test rax, rax
jnz short loc_2272
lea rax, [rbx+r15]
dec rax
jz loc_22CA
mov r12, [r14]
mov r13, [r12+8]
add r13, r13
cmp r13, rax
cmovbe r13, rax
lea rdi, [r13+18h]
call _malloc
test rax, rax
jz short loc_2270
xor ecx, ecx
mov [rax], rcx
mov [rax+8], r13
mov [rax+10h], rcx
mov [r12], rax
mov [r14], rax
mov rdi, r14
mov rsi, rax
mov rdx, r15
mov rcx, rbx
call arena_alloc_from_block
test rax, rax
jnz short loc_2272
lea rdi, aResultNull; "result != NULL"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidArenaAlloc; "void *arena_alloc_aligned(Arena *, size"...
mov edx, 0A5h
call ___assert_fail
loc_2270:
xor eax, eax
loc_2272:
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_227C:
call arena_alloc_aligned_cold_1
mov r15d, 1
jmp loc_21D1
loc_228C:
lea rdi, aArenaNull; "arena != NULL"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidArenaAlloc; "void *arena_alloc_aligned(Arena *, size"...
mov edx, 8Bh
call ___assert_fail
loc_22AB:
lea rdi, aAlignment0Alig; "alignment > 0 && (alignment & (alignmen"...
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidArenaAlloc; "void *arena_alloc_aligned(Arena *, size"...
mov edx, 98h
call ___assert_fail
loc_22CA:
lea rdi, aMinSize0; "min_size > 0"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aBlockArenaAddB; "Block *arena_add_block(Arena *, size_t)"
mov edx, 6Fh ; 'o'
call ___assert_fail
|
long long arena_alloc_aligned(_QWORD *a1, long long a2, unsigned long long a3)
{
long long v4; // r15
long long result; // rax
_QWORD *v6; // r12
unsigned long long v7; // r13
_QWORD *v8; // rax
if ( !a1 )
__assert_fail(
"arena != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c",
139LL,
"void *arena_alloc_aligned(Arena *, size_t, size_t)");
v4 = a2;
if ( !a2 )
{
arena_alloc_aligned_cold_1();
v4 = 1LL;
}
if ( ((a3 - 1) ^ a3) <= a3 - 1 )
__assert_fail(
"alignment > 0 && (alignment & (alignment - 1)) == 0",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c",
152LL,
"void *arena_alloc_aligned(Arena *, size_t, size_t)");
result = arena_alloc_from_block(a1, *a1, v4, a3);
if ( !result )
{
if ( a3 + v4 == 1 )
__assert_fail(
"min_size > 0",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c",
111LL,
"Block *arena_add_block(Arena *, size_t)");
v6 = (_QWORD *)*a1;
v7 = 2LL * *(_QWORD *)(*a1 + 8LL);
if ( v7 <= a3 + v4 - 1 )
v7 = a3 + v4 - 1;
v8 = (_QWORD *)malloc(v7 + 24);
if ( v8 )
{
*v8 = 0LL;
v8[1] = v7;
v8[2] = 0LL;
*v6 = v8;
*a1 = v8;
result = arena_alloc_from_block(a1, v8, v4, a3);
if ( !result )
__assert_fail(
"result != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c",
165LL,
"void *arena_alloc_aligned(Arena *, size_t, size_t)");
}
else
{
return 0LL;
}
}
return result;
}
|
arena_alloc_aligned:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
TEST RDI,RDI
JZ 0x0010228c
MOV RBX,RDX
MOV R15,RSI
MOV R14,RDI
TEST RSI,RSI
JZ 0x0010227c
LAB_001021d1:
LEA RAX,[RBX + -0x1]
MOV RCX,RBX
XOR RCX,RAX
CMP RCX,RAX
JBE 0x001022ab
MOV RSI,qword ptr [R14]
MOV RDI,R14
MOV RDX,R15
MOV RCX,RBX
CALL 0x001022e9
TEST RAX,RAX
JNZ 0x00102272
LEA RAX,[RBX + R15*0x1]
DEC RAX
JZ 0x001022ca
MOV R12,qword ptr [R14]
MOV R13,qword ptr [R12 + 0x8]
ADD R13,R13
CMP R13,RAX
CMOVBE R13,RAX
LEA RDI,[R13 + 0x18]
CALL 0x001010a0
TEST RAX,RAX
JZ 0x00102270
XOR ECX,ECX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],R13
MOV qword ptr [RAX + 0x10],RCX
MOV qword ptr [R12],RAX
MOV qword ptr [R14],RAX
MOV RDI,R14
MOV RSI,RAX
MOV RDX,R15
MOV RCX,RBX
CALL 0x001022e9
TEST RAX,RAX
JNZ 0x00102272
LEA RDI,[0x103856]
LEA RSI,[0x103760]
LEA RCX,[0x1037b2]
MOV EDX,0xa5
CALL 0x00101070
LAB_00102270:
XOR EAX,EAX
LAB_00102272:
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
LAB_0010227c:
CALL 0x001010d0
MOV R15D,0x1
JMP 0x001021d1
LAB_0010228c:
LEA RDI,[0x103034]
LEA RSI,[0x103760]
LEA RCX,[0x1037b2]
MOV EDX,0x8b
CALL 0x00101070
LAB_001022ab:
LEA RDI,[0x103822]
LEA RSI,[0x103760]
LEA RCX,[0x1037b2]
MOV EDX,0x98
CALL 0x00101070
LAB_001022ca:
LEA RDI,[0x10396d]
LEA RSI,[0x103760]
LEA RCX,[0x103945]
MOV EDX,0x6f
CALL 0x00101070
|
long arena_alloc_aligned(int8 *param_1,long param_2,ulong param_3)
{
int8 *puVar1;
long lVar2;
ulong uVar3;
int8 *puVar4;
ulong uVar5;
if (param_1 == (int8 *)0x0) {
/* WARNING: Subroutine does not return */
__assert_fail("arena != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c"
,0x8b,"void *arena_alloc_aligned(Arena *, size_t, size_t)");
}
if (param_2 == 0) {
arena_alloc_aligned_cold_1();
param_2 = 1;
}
if (param_3 - 1 < (param_3 ^ param_3 - 1)) {
lVar2 = arena_alloc_from_block(param_1,*param_1,param_2);
if (lVar2 == 0) {
uVar3 = (param_3 + param_2) - 1;
if (uVar3 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("min_size > 0",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c"
,0x6f,"Block *arena_add_block(Arena *, size_t)");
}
puVar1 = (int8 *)*param_1;
uVar5 = puVar1[1] * 2;
if (uVar5 <= uVar3) {
uVar5 = uVar3;
}
puVar4 = (int8 *)malloc(uVar5 + 0x18);
if (puVar4 == (int8 *)0x0) {
lVar2 = 0;
}
else {
*puVar4 = 0;
puVar4[1] = uVar5;
puVar4[2] = 0;
*puVar1 = puVar4;
*param_1 = puVar4;
lVar2 = arena_alloc_from_block(param_1,puVar4,param_2,param_3);
if (lVar2 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("result != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c"
,0xa5,"void *arena_alloc_aligned(Arena *, size_t, size_t)");
}
}
}
return lVar2;
}
/* WARNING: Subroutine does not return */
__assert_fail("alignment > 0 && (alignment & (alignment - 1)) == 0",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c",
0x98,"void *arena_alloc_aligned(Arena *, size_t, size_t)");
}
|
|
20,142
|
ftxui::(anonymous namespace)::UpgradeTopDown(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
|
Andrewchistyakov[P]flashcards_lyc/build_O0/_deps/ftxui-src/src/ftxui/screen/screen.cpp
|
void UpgradeTopDown(std::string& top, std::string& down) {
const auto it_top = tile_encoding.find(top);
if (it_top == tile_encoding.end()) {
return;
}
const auto it_down = tile_encoding.find(down);
if (it_down == tile_encoding.end()) {
return;
}
if (it_top->second.down == 0 && it_down->second.top != 0) {
TileEncoding encoding_top = it_top->second;
encoding_top.down = it_down->second.top;
const auto it_top_down = tile_encoding_inverse.find(encoding_top);
if (it_top_down != tile_encoding_inverse.end()) {
top = it_top_down->second;
}
}
if (it_down->second.top == 0 && it_top->second.down != 0) {
TileEncoding encoding_down = it_down->second;
encoding_down.top = it_top->second.down;
const auto it_down_top = tile_encoding_inverse.find(encoding_down);
if (it_down_top != tile_encoding_inverse.end()) {
down = it_down_top->second;
}
}
}
|
O0
|
cpp
|
ftxui::(anonymous namespace)::UpgradeTopDown(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&):
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rsi
leaq 0x5783d(%rip), %rdi # 0xe04f8
callq 0x89f10
movq %rax, -0x18(%rbp)
leaq 0x5782d(%rip), %rdi # 0xe04f8
callq 0x89f70
movq %rax, -0x20(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x89f40
testb $0x1, %al
jne 0x88ce7
jmp 0x88cec
jmp 0x88ed6
movq -0x10(%rbp), %rsi
leaq 0x57801(%rip), %rdi # 0xe04f8
callq 0x89f10
movq %rax, -0x28(%rbp)
leaq 0x577f1(%rip), %rdi # 0xe04f8
callq 0x89f70
movq %rax, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x89f40
testb $0x1, %al
jne 0x88d23
jmp 0x88d28
jmp 0x88ed6
leaq -0x18(%rbp), %rdi
callq 0x89fa0
movw 0x20(%rax), %ax
shrw $0x6, %ax
andw $0x3, %ax
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x88dff
leaq -0x28(%rbp), %rdi
callq 0x89fa0
movw 0x20(%rax), %ax
shrw $0x2, %ax
andw $0x3, %ax
movzbl %al, %eax
cmpl $0x0, %eax
je 0x88dff
leaq -0x18(%rbp), %rdi
callq 0x89fa0
movw 0x20(%rax), %ax
movw %ax, -0x32(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x89fa0
movw 0x20(%rax), %ax
shrw $0x2, %ax
andw $0x3, %ax
movzbl %al, %eax
movw %ax, %cx
movw -0x32(%rbp), %ax
andw $0x3, %cx
shlw $0x6, %cx
andw $0xff3f, %ax # imm = 0xFF3F
orw %cx, %ax
movw %ax, -0x32(%rbp)
leaq 0x57774(%rip), %rdi # 0xe0528
leaq -0x32(%rbp), %rsi
callq 0x89fc0
movq %rax, -0x40(%rbp)
leaq 0x57760(%rip), %rdi # 0xe0528
callq 0x8a020
movq %rax, -0x48(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x89ff0
testb $0x1, %al
jne 0x88de4
jmp 0x88dfd
leaq -0x40(%rbp), %rdi
callq 0x8a050
movq %rax, %rsi
addq $0x8, %rsi
movq -0x8(%rbp), %rdi
callq 0xd060
jmp 0x88dff
leaq -0x28(%rbp), %rdi
callq 0x89fa0
movw 0x20(%rax), %ax
shrw $0x2, %ax
andw $0x3, %ax
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x88ed6
leaq -0x18(%rbp), %rdi
callq 0x89fa0
movw 0x20(%rax), %ax
shrw $0x6, %ax
andw $0x3, %ax
movzbl %al, %eax
cmpl $0x0, %eax
je 0x88ed6
leaq -0x28(%rbp), %rdi
callq 0x89fa0
movw 0x20(%rax), %ax
movw %ax, -0x4a(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x89fa0
movw 0x20(%rax), %ax
shrw $0x6, %ax
andw $0x3, %ax
movzbl %al, %eax
movw %ax, %cx
movw -0x4a(%rbp), %ax
andw $0x3, %cx
shlw $0x2, %cx
andw $-0xd, %ax
orw %cx, %ax
movw %ax, -0x4a(%rbp)
leaq 0x5769d(%rip), %rdi # 0xe0528
leaq -0x4a(%rbp), %rsi
callq 0x89fc0
movq %rax, -0x58(%rbp)
leaq 0x57689(%rip), %rdi # 0xe0528
callq 0x8a020
movq %rax, -0x60(%rbp)
leaq -0x58(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x89ff0
testb $0x1, %al
jne 0x88ebb
jmp 0x88ed4
leaq -0x58(%rbp), %rdi
callq 0x8a050
movq %rax, %rsi
addq $0x8, %rsi
movq -0x10(%rbp), %rdi
callq 0xd060
jmp 0x88ed6
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
|
_ZN5ftxui12_GLOBAL__N_114UpgradeTopDownERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rsi, [rbp+var_8]
lea rdi, _ZN5ftxui12_GLOBAL__N_113tile_encodingB5cxx11E; ftxui::`anonymous namespace'::tile_encoding
call _ZNKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5ftxui12_GLOBAL__N_112TileEncodingESt4lessIS5_ESaISt4pairIKS5_S8_EEE4findERSC_; std::map<std::string,ftxui::`anonymous namespace'::TileEncoding>::find(std::string const&)
mov [rbp+var_18], rax
lea rdi, _ZN5ftxui12_GLOBAL__N_113tile_encodingB5cxx11E; ftxui::`anonymous namespace'::tile_encoding
call _ZNKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5ftxui12_GLOBAL__N_112TileEncodingESt4lessIS5_ESaISt4pairIKS5_S8_EEE3endEv; std::map<std::string,ftxui::`anonymous namespace'::TileEncoding>::end(void)
mov [rbp+var_20], rax
lea rdi, [rbp+var_18]
lea rsi, [rbp+var_20]
call _ZSteqRKSt23_Rb_tree_const_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5ftxui12_GLOBAL__N_112TileEncodingEEESE_; std::operator==(std::_Rb_tree_const_iterator<std::pair<std::string const,ftxui::`anonymous namespace'::TileEncoding>> const&,std::_Rb_tree_const_iterator<std::pair<std::string const,ftxui::`anonymous namespace'::TileEncoding>> const&)
test al, 1
jnz short loc_88CE7
jmp short loc_88CEC
loc_88CE7:
jmp loc_88ED6
loc_88CEC:
mov rsi, [rbp+var_10]
lea rdi, _ZN5ftxui12_GLOBAL__N_113tile_encodingB5cxx11E; ftxui::`anonymous namespace'::tile_encoding
call _ZNKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5ftxui12_GLOBAL__N_112TileEncodingESt4lessIS5_ESaISt4pairIKS5_S8_EEE4findERSC_; std::map<std::string,ftxui::`anonymous namespace'::TileEncoding>::find(std::string const&)
mov [rbp+var_28], rax
lea rdi, _ZN5ftxui12_GLOBAL__N_113tile_encodingB5cxx11E; ftxui::`anonymous namespace'::tile_encoding
call _ZNKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5ftxui12_GLOBAL__N_112TileEncodingESt4lessIS5_ESaISt4pairIKS5_S8_EEE3endEv; std::map<std::string,ftxui::`anonymous namespace'::TileEncoding>::end(void)
mov [rbp+var_30], rax
lea rdi, [rbp+var_28]
lea rsi, [rbp+var_30]
call _ZSteqRKSt23_Rb_tree_const_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5ftxui12_GLOBAL__N_112TileEncodingEEESE_; std::operator==(std::_Rb_tree_const_iterator<std::pair<std::string const,ftxui::`anonymous namespace'::TileEncoding>> const&,std::_Rb_tree_const_iterator<std::pair<std::string const,ftxui::`anonymous namespace'::TileEncoding>> const&)
test al, 1
jnz short loc_88D23
jmp short loc_88D28
loc_88D23:
jmp loc_88ED6
loc_88D28:
lea rdi, [rbp+var_18]
call _ZNKSt23_Rb_tree_const_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5ftxui12_GLOBAL__N_112TileEncodingEEEptEv; std::_Rb_tree_const_iterator<std::pair<std::string const,ftxui::`anonymous namespace'::TileEncoding>>::operator->(void)
mov ax, [rax+20h]
shr ax, 6
and ax, 3
movzx eax, al
cmp eax, 0
jnz loc_88DFF
lea rdi, [rbp+var_28]
call _ZNKSt23_Rb_tree_const_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5ftxui12_GLOBAL__N_112TileEncodingEEEptEv; std::_Rb_tree_const_iterator<std::pair<std::string const,ftxui::`anonymous namespace'::TileEncoding>>::operator->(void)
mov ax, [rax+20h]
shr ax, 2
and ax, 3
movzx eax, al
cmp eax, 0
jz loc_88DFF
lea rdi, [rbp+var_18]
call _ZNKSt23_Rb_tree_const_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5ftxui12_GLOBAL__N_112TileEncodingEEEptEv; std::_Rb_tree_const_iterator<std::pair<std::string const,ftxui::`anonymous namespace'::TileEncoding>>::operator->(void)
mov ax, [rax+20h]
mov [rbp+var_32], ax
lea rdi, [rbp+var_28]
call _ZNKSt23_Rb_tree_const_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5ftxui12_GLOBAL__N_112TileEncodingEEEptEv; std::_Rb_tree_const_iterator<std::pair<std::string const,ftxui::`anonymous namespace'::TileEncoding>>::operator->(void)
mov ax, [rax+20h]
shr ax, 2
and ax, 3
movzx eax, al
mov cx, ax
mov ax, [rbp+var_32]
and cx, 3
shl cx, 6
and ax, 0FF3Fh
or ax, cx
mov [rbp+var_32], ax
lea rdi, _ZN5ftxui12_GLOBAL__N_121tile_encoding_inverseB5cxx11E; ftxui::`anonymous namespace'::tile_encoding_inverse
lea rsi, [rbp+var_32]
call _ZNKSt3mapIN5ftxui12_GLOBAL__N_112TileEncodingENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIS2_ESaISt4pairIKS2_S8_EEE4findERSC_; std::map<ftxui::`anonymous namespace'::TileEncoding,std::string>::find(ftxui::`anonymous namespace'::TileEncoding const&)
mov [rbp+var_40], rax
lea rdi, _ZN5ftxui12_GLOBAL__N_121tile_encoding_inverseB5cxx11E; ftxui::`anonymous namespace'::tile_encoding_inverse
call _ZNKSt3mapIN5ftxui12_GLOBAL__N_112TileEncodingENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIS2_ESaISt4pairIKS2_S8_EEE3endEv; std::map<ftxui::`anonymous namespace'::TileEncoding,std::string>::end(void)
mov [rbp+var_48], rax
lea rdi, [rbp+var_40]
lea rsi, [rbp+var_48]
call _ZStneRKSt23_Rb_tree_const_iteratorISt4pairIKN5ftxui12_GLOBAL__N_112TileEncodingENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESE_; std::operator!=(std::_Rb_tree_const_iterator<std::pair<ftxui::`anonymous namespace'::TileEncoding const,std::string>> const&,std::_Rb_tree_const_iterator<std::pair<ftxui::`anonymous namespace'::TileEncoding const,std::string>> const&)
test al, 1
jnz short loc_88DE4
jmp short loc_88DFD
loc_88DE4:
lea rdi, [rbp+var_40]
call _ZNKSt23_Rb_tree_const_iteratorISt4pairIKN5ftxui12_GLOBAL__N_112TileEncodingENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEptEv; std::_Rb_tree_const_iterator<std::pair<ftxui::`anonymous namespace'::TileEncoding const,std::string>>::operator->(void)
mov rsi, rax
add rsi, 8
mov rdi, [rbp+var_8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_; std::string::operator=(std::string const&)
loc_88DFD:
jmp short $+2
loc_88DFF:
lea rdi, [rbp+var_28]
call _ZNKSt23_Rb_tree_const_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5ftxui12_GLOBAL__N_112TileEncodingEEEptEv; std::_Rb_tree_const_iterator<std::pair<std::string const,ftxui::`anonymous namespace'::TileEncoding>>::operator->(void)
mov ax, [rax+20h]
shr ax, 2
and ax, 3
movzx eax, al
cmp eax, 0
jnz loc_88ED6
lea rdi, [rbp+var_18]
call _ZNKSt23_Rb_tree_const_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5ftxui12_GLOBAL__N_112TileEncodingEEEptEv; std::_Rb_tree_const_iterator<std::pair<std::string const,ftxui::`anonymous namespace'::TileEncoding>>::operator->(void)
mov ax, [rax+20h]
shr ax, 6
and ax, 3
movzx eax, al
cmp eax, 0
jz loc_88ED6
lea rdi, [rbp+var_28]
call _ZNKSt23_Rb_tree_const_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5ftxui12_GLOBAL__N_112TileEncodingEEEptEv; std::_Rb_tree_const_iterator<std::pair<std::string const,ftxui::`anonymous namespace'::TileEncoding>>::operator->(void)
mov ax, [rax+20h]
mov [rbp+var_4A], ax
lea rdi, [rbp+var_18]
call _ZNKSt23_Rb_tree_const_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5ftxui12_GLOBAL__N_112TileEncodingEEEptEv; std::_Rb_tree_const_iterator<std::pair<std::string const,ftxui::`anonymous namespace'::TileEncoding>>::operator->(void)
mov ax, [rax+20h]
shr ax, 6
and ax, 3
movzx eax, al
mov cx, ax
mov ax, [rbp+var_4A]
and cx, 3
shl cx, 2
and ax, 0FFF3h
or ax, cx
mov [rbp+var_4A], ax
lea rdi, _ZN5ftxui12_GLOBAL__N_121tile_encoding_inverseB5cxx11E; ftxui::`anonymous namespace'::tile_encoding_inverse
lea rsi, [rbp+var_4A]
call _ZNKSt3mapIN5ftxui12_GLOBAL__N_112TileEncodingENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIS2_ESaISt4pairIKS2_S8_EEE4findERSC_; std::map<ftxui::`anonymous namespace'::TileEncoding,std::string>::find(ftxui::`anonymous namespace'::TileEncoding const&)
mov [rbp+var_58], rax
lea rdi, _ZN5ftxui12_GLOBAL__N_121tile_encoding_inverseB5cxx11E; ftxui::`anonymous namespace'::tile_encoding_inverse
call _ZNKSt3mapIN5ftxui12_GLOBAL__N_112TileEncodingENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIS2_ESaISt4pairIKS2_S8_EEE3endEv; std::map<ftxui::`anonymous namespace'::TileEncoding,std::string>::end(void)
mov [rbp+var_60], rax
lea rdi, [rbp+var_58]
lea rsi, [rbp+var_60]
call _ZStneRKSt23_Rb_tree_const_iteratorISt4pairIKN5ftxui12_GLOBAL__N_112TileEncodingENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESE_; std::operator!=(std::_Rb_tree_const_iterator<std::pair<ftxui::`anonymous namespace'::TileEncoding const,std::string>> const&,std::_Rb_tree_const_iterator<std::pair<ftxui::`anonymous namespace'::TileEncoding const,std::string>> const&)
test al, 1
jnz short loc_88EBB
jmp short loc_88ED4
loc_88EBB:
lea rdi, [rbp+var_58]
call _ZNKSt23_Rb_tree_const_iteratorISt4pairIKN5ftxui12_GLOBAL__N_112TileEncodingENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEptEv; std::_Rb_tree_const_iterator<std::pair<ftxui::`anonymous namespace'::TileEncoding const,std::string>>::operator->(void)
mov rsi, rax
add rsi, 8
mov rdi, [rbp+var_10]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_; std::string::operator=(std::string const&)
loc_88ED4:
jmp short $+2
loc_88ED6:
add rsp, 60h
pop rbp
retn
|
long long ftxui::`anonymous namespace'::UpgradeTopDown(long long a1, long long a2)
{
long long result; // rax
long long v3; // rax
long long v4; // rax
long long v5; // [rsp+0h] [rbp-60h] BYREF
long long v6; // [rsp+8h] [rbp-58h] BYREF
__int16 v7; // [rsp+16h] [rbp-4Ah] BYREF
long long v8; // [rsp+18h] [rbp-48h] BYREF
long long v9; // [rsp+20h] [rbp-40h] BYREF
__int16 v10; // [rsp+2Eh] [rbp-32h] BYREF
long long v11; // [rsp+30h] [rbp-30h] BYREF
long long v12; // [rsp+38h] [rbp-28h] BYREF
long long v13; // [rsp+40h] [rbp-20h] BYREF
long long v14; // [rsp+48h] [rbp-18h] BYREF
long long v15; // [rsp+50h] [rbp-10h]
long long v16; // [rsp+58h] [rbp-8h]
v16 = a1;
v15 = a2;
v14 = std::map<std::string,ftxui::`anonymous namespace'::TileEncoding>::find(
&ftxui::`anonymous namespace'::tile_encoding[abi:cxx11],
a1);
v13 = std::map<std::string,ftxui::`anonymous namespace'::TileEncoding>::end(&ftxui::`anonymous namespace'::tile_encoding[abi:cxx11]);
result = std::operator==(&v14, &v13);
if ( (result & 1) == 0 )
{
v12 = std::map<std::string,ftxui::`anonymous namespace'::TileEncoding>::find(
&ftxui::`anonymous namespace'::tile_encoding[abi:cxx11],
v15);
v11 = std::map<std::string,ftxui::`anonymous namespace'::TileEncoding>::end(&ftxui::`anonymous namespace'::tile_encoding[abi:cxx11]);
result = std::operator==(&v12, &v11);
if ( (result & 1) == 0 )
{
if ( ((*(_WORD *)(std::_Rb_tree_const_iterator<std::pair<std::string const,ftxui::`anonymous namespace'::TileEncoding>>::operator->(&v14)
+ 32) >> 6) & 3) == 0
&& ((*(_WORD *)(std::_Rb_tree_const_iterator<std::pair<std::string const,ftxui::`anonymous namespace'::TileEncoding>>::operator->(&v12)
+ 32) >> 2) & 3) != 0 )
{
v10 = *(_WORD *)(std::_Rb_tree_const_iterator<std::pair<std::string const,ftxui::`anonymous namespace'::TileEncoding>>::operator->(&v14)
+ 32);
v10 = (((*(_WORD *)(std::_Rb_tree_const_iterator<std::pair<std::string const,ftxui::`anonymous namespace'::TileEncoding>>::operator->(&v12)
+ 32) >> 2) & 3) << 6) | v10 & 0xFF3F;
v9 = std::map<ftxui::`anonymous namespace'::TileEncoding,std::string>::find(
&ftxui::`anonymous namespace'::tile_encoding_inverse[abi:cxx11],
&v10);
v8 = std::map<ftxui::`anonymous namespace'::TileEncoding,std::string>::end(&ftxui::`anonymous namespace'::tile_encoding_inverse[abi:cxx11]);
if ( (std::operator!=(&v9, &v8) & 1) != 0 )
{
v3 = std::_Rb_tree_const_iterator<std::pair<ftxui::`anonymous namespace'::TileEncoding const,std::string>>::operator->(&v9);
std::string::operator=(v16, v3 + 8);
}
}
result = (*(_WORD *)(std::_Rb_tree_const_iterator<std::pair<std::string const,ftxui::`anonymous namespace'::TileEncoding>>::operator->(&v12)
+ 32) >> 2) & 3;
if ( !(_DWORD)result )
{
result = (*(_WORD *)(std::_Rb_tree_const_iterator<std::pair<std::string const,ftxui::`anonymous namespace'::TileEncoding>>::operator->(&v14)
+ 32) >> 6) & 3;
if ( (_DWORD)result )
{
v7 = *(_WORD *)(std::_Rb_tree_const_iterator<std::pair<std::string const,ftxui::`anonymous namespace'::TileEncoding>>::operator->(&v12)
+ 32);
v7 = (4
* ((*(_WORD *)(std::_Rb_tree_const_iterator<std::pair<std::string const,ftxui::`anonymous namespace'::TileEncoding>>::operator->(&v14)
+ 32) >> 6) & 3)) | v7 & 0xFFF3;
v6 = std::map<ftxui::`anonymous namespace'::TileEncoding,std::string>::find(
&ftxui::`anonymous namespace'::tile_encoding_inverse[abi:cxx11],
&v7);
v5 = std::map<ftxui::`anonymous namespace'::TileEncoding,std::string>::end(&ftxui::`anonymous namespace'::tile_encoding_inverse[abi:cxx11]);
result = std::operator!=(&v6, &v5);
if ( (result & 1) != 0 )
{
v4 = std::_Rb_tree_const_iterator<std::pair<ftxui::`anonymous namespace'::TileEncoding const,std::string>>::operator->(&v6);
return std::string::operator=(v15, v4 + 8);
}
}
}
}
}
return result;
}
|
UpgradeTopDown:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RSI,qword ptr [RBP + -0x8]
LEA RDI,[0x1e04f8]
CALL 0x00189f10
MOV qword ptr [RBP + -0x18],RAX
LEA RDI,[0x1e04f8]
CALL 0x00189f70
MOV qword ptr [RBP + -0x20],RAX
LEA RDI,[RBP + -0x18]
LEA RSI,[RBP + -0x20]
CALL 0x00189f40
TEST AL,0x1
JNZ 0x00188ce7
JMP 0x00188cec
LAB_00188ce7:
JMP 0x00188ed6
LAB_00188cec:
MOV RSI,qword ptr [RBP + -0x10]
LEA RDI,[0x1e04f8]
CALL 0x00189f10
MOV qword ptr [RBP + -0x28],RAX
LEA RDI,[0x1e04f8]
CALL 0x00189f70
MOV qword ptr [RBP + -0x30],RAX
LEA RDI,[RBP + -0x28]
LEA RSI,[RBP + -0x30]
CALL 0x00189f40
TEST AL,0x1
JNZ 0x00188d23
JMP 0x00188d28
LAB_00188d23:
JMP 0x00188ed6
LAB_00188d28:
LEA RDI,[RBP + -0x18]
CALL 0x00189fa0
MOV AX,word ptr [RAX + 0x20]
SHR AX,0x6
AND AX,0x3
MOVZX EAX,AL
CMP EAX,0x0
JNZ 0x00188dff
LEA RDI,[RBP + -0x28]
CALL 0x00189fa0
MOV AX,word ptr [RAX + 0x20]
SHR AX,0x2
AND AX,0x3
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x00188dff
LEA RDI,[RBP + -0x18]
CALL 0x00189fa0
MOV AX,word ptr [RAX + 0x20]
MOV word ptr [RBP + -0x32],AX
LEA RDI,[RBP + -0x28]
CALL 0x00189fa0
MOV AX,word ptr [RAX + 0x20]
SHR AX,0x2
AND AX,0x3
MOVZX EAX,AL
MOV CX,AX
MOV AX,word ptr [RBP + -0x32]
AND CX,0x3
SHL CX,0x6
AND AX,0xff3f
OR AX,CX
MOV word ptr [RBP + -0x32],AX
LEA RDI,[0x1e0528]
LEA RSI,[RBP + -0x32]
CALL 0x00189fc0
MOV qword ptr [RBP + -0x40],RAX
LEA RDI,[0x1e0528]
CALL 0x0018a020
MOV qword ptr [RBP + -0x48],RAX
LEA RDI,[RBP + -0x40]
LEA RSI,[RBP + -0x48]
CALL 0x00189ff0
TEST AL,0x1
JNZ 0x00188de4
JMP 0x00188dfd
LAB_00188de4:
LEA RDI,[RBP + -0x40]
CALL 0x0018a050
MOV RSI,RAX
ADD RSI,0x8
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0010d060
LAB_00188dfd:
JMP 0x00188dff
LAB_00188dff:
LEA RDI,[RBP + -0x28]
CALL 0x00189fa0
MOV AX,word ptr [RAX + 0x20]
SHR AX,0x2
AND AX,0x3
MOVZX EAX,AL
CMP EAX,0x0
JNZ 0x00188ed6
LEA RDI,[RBP + -0x18]
CALL 0x00189fa0
MOV AX,word ptr [RAX + 0x20]
SHR AX,0x6
AND AX,0x3
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x00188ed6
LEA RDI,[RBP + -0x28]
CALL 0x00189fa0
MOV AX,word ptr [RAX + 0x20]
MOV word ptr [RBP + -0x4a],AX
LEA RDI,[RBP + -0x18]
CALL 0x00189fa0
MOV AX,word ptr [RAX + 0x20]
SHR AX,0x6
AND AX,0x3
MOVZX EAX,AL
MOV CX,AX
MOV AX,word ptr [RBP + -0x4a]
AND CX,0x3
SHL CX,0x2
AND AX,0xfff3
OR AX,CX
MOV word ptr [RBP + -0x4a],AX
LEA RDI,[0x1e0528]
LEA RSI,[RBP + -0x4a]
CALL 0x00189fc0
MOV qword ptr [RBP + -0x58],RAX
LEA RDI,[0x1e0528]
CALL 0x0018a020
MOV qword ptr [RBP + -0x60],RAX
LEA RDI,[RBP + -0x58]
LEA RSI,[RBP + -0x60]
CALL 0x00189ff0
TEST AL,0x1
JNZ 0x00188ebb
JMP 0x00188ed4
LAB_00188ebb:
LEA RDI,[RBP + -0x58]
CALL 0x0018a050
MOV RSI,RAX
ADD RSI,0x8
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0010d060
LAB_00188ed4:
JMP 0x00188ed6
LAB_00188ed6:
ADD RSP,0x60
POP RBP
RET
|
/* ftxui::(anonymous namespace)::UpgradeTopDown(std::__cxx11::string&, std::__cxx11::string&) */
void ftxui::(anonymous_namespace)::UpgradeTopDown(string *param_1,string *param_2)
{
ulong uVar1;
long lVar2;
int8 local_68;
int8 local_60;
ushort local_52;
int8 local_50;
int8 local_48;
ushort local_3a;
int8 local_38;
int8 local_30;
int8 local_28;
int8 local_20;
string *local_18;
string *local_10;
local_18 = param_2;
local_10 = param_1;
local_20 = std::
map<std::__cxx11::string,ftxui::(anonymous_namespace)::TileEncoding,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,ftxui::(anonymous_namespace)::TileEncoding>>>
::find((map<std::__cxx11::string,ftxui::(anonymous_namespace)::TileEncoding,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,ftxui::(anonymous_namespace)::TileEncoding>>>
*)tile_encoding_abi_cxx11_,param_1);
local_28 = std::
map<std::__cxx11::string,ftxui::(anonymous_namespace)::TileEncoding,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,ftxui::(anonymous_namespace)::TileEncoding>>>
::end((map<std::__cxx11::string,ftxui::(anonymous_namespace)::TileEncoding,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,ftxui::(anonymous_namespace)::TileEncoding>>>
*)tile_encoding_abi_cxx11_);
uVar1 = std::operator==((_Rb_tree_const_iterator *)&local_20,(_Rb_tree_const_iterator *)&local_28)
;
if ((uVar1 & 1) == 0) {
local_30 = std::
map<std::__cxx11::string,ftxui::(anonymous_namespace)::TileEncoding,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,ftxui::(anonymous_namespace)::TileEncoding>>>
::find((map<std::__cxx11::string,ftxui::(anonymous_namespace)::TileEncoding,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,ftxui::(anonymous_namespace)::TileEncoding>>>
*)tile_encoding_abi_cxx11_,local_18);
local_38 = std::
map<std::__cxx11::string,ftxui::(anonymous_namespace)::TileEncoding,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,ftxui::(anonymous_namespace)::TileEncoding>>>
::end((map<std::__cxx11::string,ftxui::(anonymous_namespace)::TileEncoding,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,ftxui::(anonymous_namespace)::TileEncoding>>>
*)tile_encoding_abi_cxx11_);
uVar1 = std::operator==((_Rb_tree_const_iterator *)&local_30,
(_Rb_tree_const_iterator *)&local_38);
if ((uVar1 & 1) == 0) {
lVar2 = std::
_Rb_tree_const_iterator<std::pair<std::__cxx11::string_const,ftxui::(anonymous_namespace)::TileEncoding>>
::operator->((_Rb_tree_const_iterator<std::pair<std::__cxx11::string_const,ftxui::(anonymous_namespace)::TileEncoding>>
*)&local_20);
if (((*(ushort *)(lVar2 + 0x20) >> 6 & 3) == 0) &&
(lVar2 = std::
_Rb_tree_const_iterator<std::pair<std::__cxx11::string_const,ftxui::(anonymous_namespace)::TileEncoding>>
::operator->((_Rb_tree_const_iterator<std::pair<std::__cxx11::string_const,ftxui::(anonymous_namespace)::TileEncoding>>
*)&local_30), (*(ushort *)(lVar2 + 0x20) >> 2 & 3) != 0)) {
lVar2 = std::
_Rb_tree_const_iterator<std::pair<std::__cxx11::string_const,ftxui::(anonymous_namespace)::TileEncoding>>
::operator->((_Rb_tree_const_iterator<std::pair<std::__cxx11::string_const,ftxui::(anonymous_namespace)::TileEncoding>>
*)&local_20);
local_3a = *(ushort *)(lVar2 + 0x20);
lVar2 = std::
_Rb_tree_const_iterator<std::pair<std::__cxx11::string_const,ftxui::(anonymous_namespace)::TileEncoding>>
::operator->((_Rb_tree_const_iterator<std::pair<std::__cxx11::string_const,ftxui::(anonymous_namespace)::TileEncoding>>
*)&local_30);
local_3a = local_3a & 0xff3f | (*(ushort *)(lVar2 + 0x20) >> 2 & 3) << 6;
local_48 = std::
map<ftxui::(anonymous_namespace)::TileEncoding,std::__cxx11::string,std::less<ftxui::(anonymous_namespace)::TileEncoding>,std::allocator<std::pair<ftxui::(anonymous_namespace)::TileEncoding_const,std::__cxx11::string>>>
::find((map<ftxui::(anonymous_namespace)::TileEncoding,std::__cxx11::string,std::less<ftxui::(anonymous_namespace)::TileEncoding>,std::allocator<std::pair<ftxui::(anonymous_namespace)::TileEncoding_const,std::__cxx11::string>>>
*)tile_encoding_inverse_abi_cxx11_,(TileEncoding *)&local_3a);
local_50 = std::
map<ftxui::(anonymous_namespace)::TileEncoding,std::__cxx11::string,std::less<ftxui::(anonymous_namespace)::TileEncoding>,std::allocator<std::pair<ftxui::(anonymous_namespace)::TileEncoding_const,std::__cxx11::string>>>
::end((map<ftxui::(anonymous_namespace)::TileEncoding,std::__cxx11::string,std::less<ftxui::(anonymous_namespace)::TileEncoding>,std::allocator<std::pair<ftxui::(anonymous_namespace)::TileEncoding_const,std::__cxx11::string>>>
*)tile_encoding_inverse_abi_cxx11_);
uVar1 = std::operator!=((_Rb_tree_const_iterator *)&local_48,
(_Rb_tree_const_iterator *)&local_50);
if ((uVar1 & 1) != 0) {
lVar2 = std::
_Rb_tree_const_iterator<std::pair<ftxui::(anonymous_namespace)::TileEncoding_const,std::__cxx11::string>>
::operator->((_Rb_tree_const_iterator<std::pair<ftxui::(anonymous_namespace)::TileEncoding_const,std::__cxx11::string>>
*)&local_48);
std::__cxx11::string::operator=(local_10,(string *)(lVar2 + 8));
}
}
lVar2 = std::
_Rb_tree_const_iterator<std::pair<std::__cxx11::string_const,ftxui::(anonymous_namespace)::TileEncoding>>
::operator->((_Rb_tree_const_iterator<std::pair<std::__cxx11::string_const,ftxui::(anonymous_namespace)::TileEncoding>>
*)&local_30);
if (((*(ushort *)(lVar2 + 0x20) >> 2 & 3) == 0) &&
(lVar2 = std::
_Rb_tree_const_iterator<std::pair<std::__cxx11::string_const,ftxui::(anonymous_namespace)::TileEncoding>>
::operator->((_Rb_tree_const_iterator<std::pair<std::__cxx11::string_const,ftxui::(anonymous_namespace)::TileEncoding>>
*)&local_20), (*(ushort *)(lVar2 + 0x20) >> 6 & 3) != 0)) {
lVar2 = std::
_Rb_tree_const_iterator<std::pair<std::__cxx11::string_const,ftxui::(anonymous_namespace)::TileEncoding>>
::operator->((_Rb_tree_const_iterator<std::pair<std::__cxx11::string_const,ftxui::(anonymous_namespace)::TileEncoding>>
*)&local_30);
local_52 = *(ushort *)(lVar2 + 0x20);
lVar2 = std::
_Rb_tree_const_iterator<std::pair<std::__cxx11::string_const,ftxui::(anonymous_namespace)::TileEncoding>>
::operator->((_Rb_tree_const_iterator<std::pair<std::__cxx11::string_const,ftxui::(anonymous_namespace)::TileEncoding>>
*)&local_20);
local_52 = local_52 & 0xfff3 | (*(ushort *)(lVar2 + 0x20) >> 6 & 3) << 2;
local_60 = std::
map<ftxui::(anonymous_namespace)::TileEncoding,std::__cxx11::string,std::less<ftxui::(anonymous_namespace)::TileEncoding>,std::allocator<std::pair<ftxui::(anonymous_namespace)::TileEncoding_const,std::__cxx11::string>>>
::find((map<ftxui::(anonymous_namespace)::TileEncoding,std::__cxx11::string,std::less<ftxui::(anonymous_namespace)::TileEncoding>,std::allocator<std::pair<ftxui::(anonymous_namespace)::TileEncoding_const,std::__cxx11::string>>>
*)tile_encoding_inverse_abi_cxx11_,(TileEncoding *)&local_52);
local_68 = std::
map<ftxui::(anonymous_namespace)::TileEncoding,std::__cxx11::string,std::less<ftxui::(anonymous_namespace)::TileEncoding>,std::allocator<std::pair<ftxui::(anonymous_namespace)::TileEncoding_const,std::__cxx11::string>>>
::end((map<ftxui::(anonymous_namespace)::TileEncoding,std::__cxx11::string,std::less<ftxui::(anonymous_namespace)::TileEncoding>,std::allocator<std::pair<ftxui::(anonymous_namespace)::TileEncoding_const,std::__cxx11::string>>>
*)tile_encoding_inverse_abi_cxx11_);
uVar1 = std::operator!=((_Rb_tree_const_iterator *)&local_60,
(_Rb_tree_const_iterator *)&local_68);
if ((uVar1 & 1) != 0) {
lVar2 = std::
_Rb_tree_const_iterator<std::pair<ftxui::(anonymous_namespace)::TileEncoding_const,std::__cxx11::string>>
::operator->((_Rb_tree_const_iterator<std::pair<ftxui::(anonymous_namespace)::TileEncoding_const,std::__cxx11::string>>
*)&local_60);
std::__cxx11::string::operator=(local_18,(string *)(lVar2 + 8));
}
}
}
}
return;
}
|
|
20,143
|
CLI::detail::format_help(std::ostream&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long)
|
MikePodsytnik[P]TCRtrie/build_O3/_deps/cli11-src/include/CLI/impl/StringTools_inl.hpp
|
CLI11_INLINE std::ostream &
format_help(std::ostream &out, std::string name, const std::string &description, std::size_t wid) {
name = " " + name;
out << std::setw(static_cast<int>(wid)) << std::left << name;
if(!description.empty()) {
if(name.length() >= wid)
out << "\n" << std::setw(static_cast<int>(wid)) << "";
for(const char c : description) {
out.put(c);
if(c == '\n') {
out << std::setw(static_cast<int>(wid)) << "";
}
}
}
out << "\n";
return out;
}
|
O3
|
cpp
|
CLI::detail::format_help(std::ostream&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %rbp
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
leaq 0xaf24(%rip), %rsi # 0x37d76
leaq 0x8(%rsp), %r13
movq %r13, %rdi
movq %r12, %rdx
callq 0x11e48
movq %r12, %rdi
movq %r13, %rsi
callq 0x7510
movq (%r13), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x2ce88
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7430
movq (%rbx), %rax
movq -0x18(%rax), %rcx
movslq %ebp, %r13
movq %r13, 0x10(%rbx,%rcx)
movq -0x18(%rax), %rax
movl $0xffffff4f, %ecx # imm = 0xFFFFFF4F
andl 0x18(%rbx,%rax), %ecx
orl $0x20, %ecx
movl %ecx, 0x18(%rbx,%rax)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq %rbx, %rdi
callq 0x74b0
movq 0x8(%r14), %r15
testq %r15, %r15
je 0x2cf4c
cmpq %rbp, 0x8(%r12)
jb 0x2cf0a
leaq 0xae9c(%rip), %rsi # 0x37d73
movl $0x1, %edx
movq %rbx, %rdi
callq 0x74b0
movq (%rbx), %rax
movq -0x18(%rax), %rax
movq %r13, 0x10(%rbx,%rax)
leaq 0xae7d(%rip), %rsi # 0x37d74
movq %rbx, %rdi
xorl %edx, %edx
callq 0x74b0
movq 0x8(%r14), %r15
testq %r15, %r15
je 0x2cf4c
movq (%r14), %r12
addq %r12, %r15
leaq 0xae5d(%rip), %r14 # 0x37d74
movsbl (%r12), %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x7030
cmpl $0xa, %ebp
jne 0x2cf44
movq (%rbx), %rax
movq -0x18(%rax), %rax
movq %r13, 0x10(%rbx,%rax)
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x74b0
incq %r12
cmpq %r15, %r12
jne 0x2cf17
leaq 0xae20(%rip), %rsi # 0x37d73
movl $0x1, %edx
movq %rbx, %rdi
callq 0x74b0
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
_ZN3CLI6detail11format_helpERSoNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS7_m:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov rbp, rcx
mov r14, rdx
mov r12, rsi
mov rbx, rdi
lea rsi, asc_37D75+1; " "
lea r13, [rsp+58h+var_50]
mov rdi, r13
mov rdx, r12
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&)
mov rdi, r12
mov rsi, r13
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [r13+0]; void *
lea rax, [rsp+58h+var_40]
cmp rdi, rax
jz short loc_2CE88
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2CE88:
mov rax, [rbx]
mov rcx, [rax-18h]
movsxd r13, ebp
mov [rbx+rcx+10h], r13
mov rax, [rax-18h]
mov ecx, 0FFFFFF4Fh
and ecx, [rbx+rax+18h]
or ecx, 20h
mov [rbx+rax+18h], ecx
mov rsi, [r12]
mov rdx, [r12+8]
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov r15, [r14+8]
test r15, r15
jz loc_2CF4C
cmp [r12+8], rbp
jb short loc_2CF0A
lea rsi, asc_37D72+1; "\n"
mov edx, 1
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rax, [rbx]
mov rax, [rax-18h]
mov [rbx+rax+10h], r13
lea rsi, asc_37D72+2; ""
mov rdi, rbx
xor edx, edx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov r15, [r14+8]
test r15, r15
jz short loc_2CF4C
loc_2CF0A:
mov r12, [r14]
add r15, r12
lea r14, asc_37D72+2; ""
loc_2CF17:
movsx ebp, byte ptr [r12]
mov rdi, rbx; this
mov esi, ebp; char
call __ZNSo3putEc; std::ostream::put(char)
cmp ebp, 0Ah
jnz short loc_2CF44
mov rax, [rbx]
mov rax, [rax-18h]
mov [rbx+rax+10h], r13
mov rdi, rbx
mov rsi, r14
xor edx, edx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
loc_2CF44:
inc r12
cmp r12, r15
jnz short loc_2CF17
loc_2CF4C:
lea rsi, asc_37D72+1; "\n"
mov edx, 1
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rax, rbx
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
std::ostream * CLI::detail::format_help(std::ostream *this, _QWORD *a2, long long a3, unsigned long long a4)
{
long long v6; // rax
long long v7; // r13
long long v8; // r15
char *v9; // r12
char *v10; // r15
int v11; // ebp
void *v13[2]; // [rsp+8h] [rbp-50h] BYREF
long long v14; // [rsp+18h] [rbp-40h] BYREF
std::operator+<char>((long long)v13, (long long)" ", a2);
std::string::operator=(a2, v13);
if ( v13[0] != &v14 )
operator delete(v13[0], v14 + 1);
v6 = *(_QWORD *)this;
v7 = (int)a4;
*(_QWORD *)((char *)this + *(_QWORD *)(*(_QWORD *)this - 24LL) + 16) = (int)a4;
*(_DWORD *)((char *)this + *(_QWORD *)(v6 - 24) + 24) = *(_DWORD *)((_BYTE *)this + *(_QWORD *)(v6 - 24) + 24) & 0xFFFFFF4F | 0x20;
std::__ostream_insert<char,std::char_traits<char>>(this, *a2, a2[1]);
v8 = *(_QWORD *)(a3 + 8);
if ( v8 )
{
if ( a2[1] < a4
|| (std::__ostream_insert<char,std::char_traits<char>>(this, "\n", 1LL),
*(_QWORD *)((char *)this + *(_QWORD *)(*(_QWORD *)this - 24LL) + 16) = (int)a4,
std::__ostream_insert<char,std::char_traits<char>>(this, "", 0LL),
(v8 = *(_QWORD *)(a3 + 8)) != 0) )
{
v9 = *(char **)a3;
v10 = (char *)(*(_QWORD *)a3 + v8);
do
{
v11 = *v9;
std::ostream::put(this, *v9);
if ( v11 == 10 )
{
*(_QWORD *)((char *)this + *(_QWORD *)(*(_QWORD *)this - 24LL) + 16) = v7;
std::__ostream_insert<char,std::char_traits<char>>(this, "", 0LL);
}
++v9;
}
while ( v9 != v10 );
}
}
std::__ostream_insert<char,std::char_traits<char>>(this, "\n", 1LL);
return this;
}
|
format_help:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RBP,RCX
MOV R14,RDX
MOV R12,RSI
MOV RBX,RDI
LEA RSI,[0x137d76]
LEA R13,[RSP + 0x8]
MOV RDI,R13
MOV RDX,R12
CALL 0x00111e48
MOV RDI,R12
MOV RSI,R13
CALL 0x00107510
MOV RDI,qword ptr [R13]
LEA RAX,[RSP + 0x18]
CMP RDI,RAX
JZ 0x0012ce88
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00107430
LAB_0012ce88:
MOV RAX,qword ptr [RBX]
MOV RCX,qword ptr [RAX + -0x18]
MOVSXD R13,EBP
MOV qword ptr [RBX + RCX*0x1 + 0x10],R13
MOV RAX,qword ptr [RAX + -0x18]
MOV ECX,0xffffff4f
AND ECX,dword ptr [RBX + RAX*0x1 + 0x18]
OR ECX,0x20
MOV dword ptr [RBX + RAX*0x1 + 0x18],ECX
MOV RSI,qword ptr [R12]
MOV RDX,qword ptr [R12 + 0x8]
MOV RDI,RBX
CALL 0x001074b0
MOV R15,qword ptr [R14 + 0x8]
TEST R15,R15
JZ 0x0012cf4c
CMP qword ptr [R12 + 0x8],RBP
JC 0x0012cf0a
LEA RSI,[0x137d73]
MOV EDX,0x1
MOV RDI,RBX
CALL 0x001074b0
MOV RAX,qword ptr [RBX]
MOV RAX,qword ptr [RAX + -0x18]
MOV qword ptr [RBX + RAX*0x1 + 0x10],R13
LEA RSI,[0x137d74]
MOV RDI,RBX
XOR EDX,EDX
CALL 0x001074b0
MOV R15,qword ptr [R14 + 0x8]
TEST R15,R15
JZ 0x0012cf4c
LAB_0012cf0a:
MOV R12,qword ptr [R14]
ADD R15,R12
LEA R14,[0x137d74]
LAB_0012cf17:
MOVSX EBP,byte ptr [R12]
MOV RDI,RBX
MOV ESI,EBP
CALL 0x00107030
CMP EBP,0xa
JNZ 0x0012cf44
MOV RAX,qword ptr [RBX]
MOV RAX,qword ptr [RAX + -0x18]
MOV qword ptr [RBX + RAX*0x1 + 0x10],R13
MOV RDI,RBX
MOV RSI,R14
XOR EDX,EDX
CALL 0x001074b0
LAB_0012cf44:
INC R12
CMP R12,R15
JNZ 0x0012cf17
LAB_0012cf4c:
LEA RSI,[0x137d73]
MOV EDX,0x1
MOV RDI,RBX
CALL 0x001074b0
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* CLI::detail::format_help(std::ostream&, std::__cxx11::string, std::__cxx11::string const&,
unsigned long) */
ostream * CLI::detail::format_help
(ostream *param_1,string *param_2,int8 *param_3,ulong param_4)
{
char cVar1;
char *pcVar2;
long lVar3;
long lVar4;
char *pcVar5;
long *local_50 [2];
long local_40 [2];
std::operator+((char *)local_50,(string *)&DAT_00137d76);
std::__cxx11::string::operator=(param_2,(string *)local_50);
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
lVar4 = *(long *)param_1;
lVar3 = (long)(int)param_4;
*(long *)(param_1 + *(long *)(lVar4 + -0x18) + 0x10) = lVar3;
lVar4 = *(long *)(lVar4 + -0x18);
*(uint *)(param_1 + lVar4 + 0x18) = *(uint *)(param_1 + lVar4 + 0x18) & 0xffffff4f | 0x20;
std::__ostream_insert<char,std::char_traits<char>>
(param_1,*(char **)param_2,*(long *)(param_2 + 8));
lVar4 = param_3[1];
if (lVar4 != 0) {
if (param_4 <= *(ulong *)(param_2 + 8)) {
std::__ostream_insert<char,std::char_traits<char>>(param_1,"\n",1);
*(long *)(param_1 + *(long *)(*(long *)param_1 + -0x18) + 0x10) = lVar3;
std::__ostream_insert<char,std::char_traits<char>>(param_1,"",0);
lVar4 = param_3[1];
if (lVar4 == 0) goto LAB_0012cf4c;
}
pcVar2 = (char *)*param_3;
pcVar5 = pcVar2 + lVar4;
do {
cVar1 = *pcVar2;
std::ostream::put((char)param_1);
if (cVar1 == '\n') {
*(long *)(param_1 + *(long *)(*(long *)param_1 + -0x18) + 0x10) = lVar3;
std::__ostream_insert<char,std::char_traits<char>>(param_1,"",0);
}
pcVar2 = pcVar2 + 1;
} while (pcVar2 != pcVar5);
}
LAB_0012cf4c:
std::__ostream_insert<char,std::char_traits<char>>(param_1,"\n",1);
return param_1;
}
|
|
20,144
|
OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::WriteTreeDigraph(_IO_FILE*, int, bool, bool) const
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/subdivisionPlan.cpp
|
void
SubdivisionPlan::WriteTreeDigraph(FILE* fout, int planIndex, bool showIndices, bool isSubgraph) const {
constexpr int const regularPatchSize = NodeBase::catmarkRegularPatchSize();
constexpr int const terminalPatchSize = NodeBase::catmarkTerminalPatchSize();
int const irregularPatchSize = NodeBase::catmarkIrregularPatchSize(getEndCapType());
auto hashNodeId = [&planIndex](Node const& n) -> uint64_t {
return (uint64_t(planIndex) << 32) + n.treeOffset;
};
if (isSubgraph) {
fprintf(fout, "subgraph cluster_%d {\n", planIndex);
fprintf(fout, " label = \"Plan %d\"; style=filled; color=lightgrey;\n", planIndex);
} else {
fprintf(fout, "digraph {\n");
}
int count = 0;
for (Node node = GetRootNode(); node.IsValid(); ++node, ++count) {
NodeDescriptor const& desc = node.GetDescriptor();
uint64_t nodeID = hashNodeId(node);
int treeOffset = node.treeOffset;
int patchPointsOffset = _tree[node.patchPointsOffset()];
switch (desc.GetType()) {
using enum NodeType;
case NODE_REGULAR: {
fprintf(fout, " %zu [label=\"%d REG (%d)\\ntofs=%d fsup=%d",
nodeID, count, desc.GetDepth(), treeOffset, patchPointsOffset);
if (showIndices)
printNodeIndices(fout, { &_patchPoints[patchPointsOffset], regularPatchSize});
if (desc.HasSharpness()) {
fprintf(fout, "\\n\\nsharp=%f", node.GetSharpness());
}
fprintf(fout, "\", shape=box, style=filled, color=%s]\n", desc.HasSharpness() ? "darksalmon" : "white");
} break;
case NODE_END: {
fprintf(fout, " %zu [label=\"%d END (%d)\\ntofs=%d fsup=%d",
nodeID, count, desc.GetDepth(), treeOffset, patchPointsOffset);
if (showIndices)
printNodeIndices(fout, { &_patchPoints[patchPointsOffset], irregularPatchSize });
fprintf(fout, "\", shape=box, style=filled, color=darkorange]\n");
} break;
case NODE_RECURSIVE: {
fprintf(fout, " %zu [label=\"%d REC (%d)\\ntofs=%d fsup=%d",
nodeID, count, desc.GetDepth(), treeOffset, patchPointsOffset);
if (showIndices && desc.HasEndcap())
printNodeIndices(fout, { &_patchPoints[patchPointsOffset], irregularPatchSize });
fprintf(fout, "\", shape=square, style=filled, color=dodgerblue]\n");
for (int i = 0; i < 4; ++i)
fprintf(fout, " %zu -> %zu [label=\"%d\"]\n", nodeID, hashNodeId(node.GetChild(i)), i);
} break;
case NODE_TERMINAL: {
fprintf(fout, " %zu [label=\"%d TRM (%d)\\ntofs=%d fsup=%d",
nodeID, count, desc.GetDepth(), treeOffset, patchPointsOffset);
if (showIndices) {
printNodeIndices(fout, { &_patchPoints[patchPointsOffset], terminalPatchSize} );
printNodeIndices(fout, { &_patchPoints[patchPointsOffset + terminalPatchSize], irregularPatchSize });
}
fprintf(fout, "\", shape=box, style=filled, color=grey]\n");
fprintf(fout, " %zu -> %zu\n", nodeID, hashNodeId(node.GetChild()));
} break;
default:
assert(0);
}
}
fprintf(fout, "}\n");
}
|
O1
|
cpp
|
OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::WriteTreeDigraph(_IO_FILE*, int, bool, bool) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %ecx, 0x14(%rsp)
movl %edx, %r14d
movq %rsi, %rbx
movq %rdi, %r15
movq (%rdi), %rax
movzbl (%rax), %eax
shrl $0x3, %eax
andl $0xc, %eax
leaq 0x1d260(%rip), %rcx # 0xc3f88
movl (%rax,%rcx), %eax
movl %eax, 0x1c(%rsp)
testl %r8d, %r8d
je 0xa6d5e
leaq 0x1ce33(%rip), %rsi # 0xc3b6e
movq %rbx, %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0x3b0f0
leaq 0x1ce36(%rip), %rsi # 0xc3b85
movq %rbx, %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0x3b0f0
jmp 0xa6d77
leaq 0x1ce55(%rip), %rdi # 0xc3bba
movl $0xa, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x3c370
shlq $0x20, %r14
movl $0x2, %eax
xorl %ecx, %ecx
movl %eax, %r12d
movq 0x40(%r15), %rax
movq %r15, %rsi
movl (%rax,%r12,4), %r15d
movq %r14, 0x28(%rsp)
orq %r12, %r14
movq 0x40(%rsi), %rax
movslq 0x4(%rax,%r12,4), %r13
movl %r15d, %eax
andl $0x3, %eax
leaq 0x1c902(%rip), %rdx # 0xc36b0
movslq (%rdx,%rax,4), %rax
addq %rdx, %rax
movq %rsi, %rbp
movq %rsi, 0x20(%rsp)
movq %rsi, 0x30(%rsp)
jmpq *%rax
movl 0x18(%rsp), %ecx
incl %ecx
movl %eax, %r12d
movq %rdx, 0x20(%rsp)
movq 0x40(%rdx), %rax
movq %r15, %rdx
movl (%rax,%r12,4), %r15d
movq %r13, %r14
orq %r12, %r14
movq %rdx, %rbp
movq 0x40(%rdx), %rax
movslq 0x4(%rax,%r12,4), %r13
movl %r15d, %eax
andl $0x3, %eax
leaq 0x1c8b4(%rip), %rdx # 0xc36b0
movslq (%rdx,%rax,4), %rax
addq %rdx, %rax
jmpq *%rax
movl %r15d, %r8d
shrl $0x3, %r8d
andl $0xf, %r8d
movl %r13d, (%rsp)
leaq 0x1cdaa(%rip), %rsi # 0xc3bc5
movq %rbx, %rdi
movq %r14, %rdx
movl %ecx, 0x18(%rsp)
movq %r12, %r14
movl %r12d, %r9d
xorl %eax, %eax
callq 0x3b0f0
cmpb $0x0, 0x14(%rsp)
je 0xa6e51
shlq $0x2, %r13
addq 0x58(%rbp), %r13
movq %rbx, %rdi
movq %r13, %rsi
movl $0x10, %edx
callq 0x3a720
leaq 0x1cdd7(%rip), %rdx # 0xc3c2f
testb $0x4, %r15b
movq %r14, %r12
movq 0x28(%rsp), %r13
movq %rbp, %r15
movq 0x20(%rsp), %rbp
je 0xa6ea1
movq 0x40(%rbp), %rax
movl (%rax,%r12,4), %ecx
andl $0x7, %ecx
cmpl $0x4, %ecx
jne 0xa718a
cvtss2sd 0x8(%rax,%r12,4), %xmm0
leaq 0x1cd60(%rip), %rsi # 0xc3bf0
movq %rbx, %rdi
movb $0x1, %al
callq 0x3b0f0
leaq 0x1cd83(%rip), %rdx # 0xc3c24
leaq 0x1cd55(%rip), %rsi # 0xc3bfd
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3b0f0
movq 0x40(%rbp), %rax
movl (%rax,%r12,4), %edx
movl $0x2, %ecx
movl %edx, %esi
andl $0x3, %esi
leaq 0x1c7f5(%rip), %rdi # 0xc36c0
movslq (%rdi,%rsi,4), %r8
addq %rdi, %r8
movq %rbp, %rsi
jmpq *%r8
shrl $0x3, %r15d
andl $0xf, %r15d
movl %r13d, (%rsp)
leaq 0x1cd4a(%rip), %rsi # 0xc3c35
movq %rbx, %rdi
movq %r14, %rdx
movl %ecx, 0x18(%rsp)
movl %r15d, %r8d
movl %r12d, %r9d
xorl %eax, %eax
callq 0x3b0f0
cmpb $0x0, 0x14(%rsp)
movq %rbp, %r15
movq 0x20(%rsp), %rbp
je 0xa6f28
shlq $0x2, %r13
addq 0x58(%r15), %r13
movq %rbx, %rdi
movq %r13, %rsi
movl 0x1c(%rsp), %edx
callq 0x3a720
leaq 0x1cd31(%rip), %rdi # 0xc3c60
movl $0x2e, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x3c370
movq 0x40(%rbp), %rax
movl (%rax,%r12,4), %edx
movl $0x2, %ecx
movl %edx, %esi
andl $0x3, %esi
leaq 0x1c766(%rip), %rdi # 0xc36c0
movslq (%rdi,%rsi,4), %r8
addq %rdi, %r8
movq %rbp, %rsi
movq 0x28(%rsp), %r13
jmpq *%r8
movl %r15d, %r8d
shrl $0x3, %r8d
andl $0xf, %r8d
movl %r13d, (%rsp)
leaq 0x1cd0d(%rip), %rsi # 0xc3c8f
movq %rbx, %rdi
movq %r14, 0x38(%rsp)
movq %r14, %rdx
movl %ecx, 0x18(%rsp)
movl %r12d, %r9d
xorl %eax, %eax
callq 0x3b0f0
testb $0x4, %r15b
sete %al
movl 0x14(%rsp), %ecx
xorb $0x1, %cl
orb %al, %cl
movq %r12, 0x40(%rsp)
jne 0xa6fc9
shlq $0x2, %r13
addq 0x58(%rbp), %r13
movq %rbx, %rdi
movq %r13, %rsi
movl 0x1c(%rsp), %edx
callq 0x3a720
leaq 0x1ccea(%rip), %rdi # 0xc3cba
movl $0x31, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x3c370
movq %rbx, %r14
leal 0x2(%r12), %ebx
xorl %r13d, %r13d
movq 0x28(%rsp), %r12
movq 0x20(%rsp), %rbp
movq 0x38(%rsp), %r15
movq 0x40(%rbp), %rax
leal (%rbx,%r13), %ecx
movslq %ecx, %rcx
movslq (%rax,%rcx,4), %rcx
addq %r12, %rcx
movq %r14, %rdi
leaq 0x1ccd4(%rip), %rsi # 0xc3cec
movq %r15, %rdx
movl %r13d, %r8d
xorl %eax, %eax
callq 0x3b0f0
incq %r13
cmpq $0x4, %r13
jne 0xa6ffc
movq %r12, %r13
movq %r14, %rbx
movq 0x30(%rsp), %r15
movq 0x40(%rsp), %r12
jmp 0xa70f1
shrl $0x3, %r15d
andl $0xf, %r15d
movl %r13d, (%rsp)
leaq 0x1ccb1(%rip), %rsi # 0xc3d07
movq %rbx, %rdi
movq %r14, %rdx
movl %ecx, 0x18(%rsp)
movl %r15d, %r8d
movl %r12d, %r9d
xorl %eax, %eax
callq 0x3b0f0
cmpb $0x0, 0x14(%rsp)
movq %rbp, %r15
movq 0x20(%rsp), %rbp
je 0xa70ac
movq %r13, %rsi
shlq $0x2, %rsi
addq 0x58(%r15), %rsi
movq %rbx, %rdi
movl $0x19, %edx
callq 0x3a720
movq 0x58(%r15), %rax
leaq (%rax,%r13,4), %rsi
addq $0x64, %rsi
movq %rbx, %rdi
movl 0x1c(%rsp), %edx
callq 0x3a720
leaq 0x1cc7f(%rip), %rdi # 0xc3d32
movl $0x28, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x3c370
movq 0x40(%rbp), %rax
leal 0x2(%r12), %ecx
movslq %ecx, %rcx
movslq (%rax,%rcx,4), %rcx
movq 0x28(%rsp), %r13
addq %r13, %rcx
leaq 0x1cc77(%rip), %rsi # 0xc3d5b
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x3b0f0
movq 0x40(%rbp), %rax
movl (%rax,%r12,4), %edx
movl $0x2, %ecx
movl %edx, %esi
andl $0x3, %esi
leaq 0x1c5b6(%rip), %rdi # 0xc36c0
movslq (%rdi,%rsi,4), %r8
addq %rdi, %r8
movq %rbp, %rsi
jmpq *%r8
andl $0x4, %edx
cmpl $0x1, %edx
movl $0x3, %ecx
sbbl $0x0, %ecx
jmp 0xa7133
movl $0x6, %ecx
jmp 0xa7133
movl $0x3, %ecx
movq %rbp, %rsi
addl %ecx, %r12d
movq 0x48(%rsi), %rcx
subq %rax, %rcx
shrq $0x2, %rcx
xorl %edx, %edx
cmpl %ecx, %r12d
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmovll %r12d, %eax
cmovlq %rsi, %rdx
testq %rdx, %rdx
je 0xa7163
testl %eax, %eax
jns 0xa6dc4
leaq 0x1cbff(%rip), %rdi # 0xc3d69
movl $0x2, %esi
movl $0x1, %edx
movq %rbx, %rcx
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3c370
leaq 0x1cbdb(%rip), %rdi # 0xc3d6c
leaq 0x1cc28(%rip), %rsi # 0xc3dc0
leaq 0x1cc87(%rip), %rcx # 0xc3e26
movl $0x187, %edx # imm = 0x187
callq 0x39560
nop
|
_ZNK10OpenSubdiv6v3_6_03Tmr15SubdivisionPlan16WriteTreeDigraphEP8_IO_FILEibb:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov [rsp+78h+var_64], ecx
mov r14d, edx
mov rbx, rsi
mov r15, rdi
mov rax, [rdi]
movzx eax, byte ptr [rax]
shr eax, 3
and eax, 0Ch
lea rcx, unk_C3F88
mov eax, [rax+rcx]
mov [rsp+78h+var_5C], eax
test r8d, r8d
jz short loc_A6D5E
lea rsi, aSubgraphCluste; "subgraph cluster_%d {\n"
mov rdi, rbx
mov edx, r14d
xor eax, eax
call _fprintf
lea rsi, aLabelPlanDStyl; " label = \"Plan %d\"; style=filled; co"...
mov rdi, rbx
mov edx, r14d
xor eax, eax
call _fprintf
jmp short loc_A6D77
loc_A6D5E:
lea rdi, aDigraph; "digraph {\n"
mov esi, 0Ah
mov edx, 1
mov rcx, rbx
call _fwrite
loc_A6D77:
shl r14, 20h
mov eax, 2
xor ecx, ecx
mov r12d, eax
mov rax, [r15+40h]
mov rsi, r15
mov r15d, [rax+r12*4]
mov [rsp+78h+var_50], r14
or r14, r12
mov rax, [rsi+40h]
movsxd r13, dword ptr [rax+r12*4+4]
mov eax, r15d
and eax, 3
lea rdx, jpt_A6DC2
movsxd rax, ds:(jpt_A6DC2 - 0C36B0h)[rdx+rax*4]; switch 4 cases
add rax, rdx
mov rbp, rsi
mov [rsp+78h+var_58], rsi
mov [rsp+78h+var_48], rsi
jmp rax; switch jump
loc_A6DC4:
mov ecx, [rsp+78h+var_60]
inc ecx
mov r12d, eax
mov [rsp+78h+var_58], rdx
mov rax, [rdx+40h]
mov rdx, r15
mov r15d, [rax+r12*4]
mov r14, r13
or r14, r12
mov rbp, rdx
mov rax, [rdx+40h]
movsxd r13, dword ptr [rax+r12*4+4]
mov eax, r15d
and eax, 3
lea rdx, jpt_A6DC2
movsxd rax, ds:(jpt_A6DC2 - 0C36B0h)[rdx+rax*4]; switch 4 cases
add rax, rdx
jmp rax; switch jump
loc_A6E05:
mov r8d, r15d; jumptable 00000000000A6DC2 case 0
shr r8d, 3
and r8d, 0Fh
mov [rsp+78h+var_78], r13d
lea rsi, aZuLabelDRegDNt; " %zu [label=\"%d REG (%d)\\ntofs=%d fs"...
mov rdi, rbx
mov rdx, r14
mov [rsp+78h+var_60], ecx
mov r14, r12
mov r9d, r12d
xor eax, eax
call _fprintf
cmp byte ptr [rsp+78h+var_64], 0
jz short loc_A6E51
shl r13, 2
add r13, [rbp+58h]
mov rdi, rbx
mov rsi, r13
mov edx, 10h
call __ZN10OpenSubdiv6v3_6_03Tmr16printNodeIndicesEP8_IO_FILENS0_3Vtr10ConstArrayIiEE; OpenSubdiv::v3_6_0::Tmr::printNodeIndices(_IO_FILE *,OpenSubdiv::v3_6_0::Vtr::ConstArray<int>)
loc_A6E51:
lea rdx, aWhite; "white"
test r15b, 4
mov r12, r14
mov r13, [rsp+78h+var_50]
mov r15, rbp
mov rbp, [rsp+78h+var_58]
jz short loc_A6EA1
mov rax, [rbp+40h]
mov ecx, [rax+r12*4]
and ecx, 7
cmp ecx, 4
jnz loc_A718A
cvtss2sd xmm0, dword ptr [rax+r12*4+8]
lea rsi, aNNsharpF; "\\n\\nsharp=%f"
mov rdi, rbx
mov al, 1
call _fprintf
lea rdx, aDarksalmon; "darksalmon"
loc_A6EA1:
lea rsi, aShapeBoxStyleF; "\", shape=box, style=filled, color=%s]"...
mov rdi, rbx
xor eax, eax
call _fprintf
mov rax, [rbp+40h]
mov edx, [rax+r12*4]
mov ecx, 2
mov esi, edx
and esi, 3
lea rdi, jpt_A6ED5
movsxd r8, ds:(jpt_A6ED5 - 0C36C0h)[rdi+rsi*4]; switch 4 cases
add r8, rdi
mov rsi, rbp
jmp r8; switch jump
loc_A6ED8:
shr r15d, 3; jumptable 00000000000A6DC2 case 3
and r15d, 0Fh
mov [rsp+78h+var_78], r13d
lea rsi, aZuLabelDEndDNt; " %zu [label=\"%d END (%d)\\ntofs=%d fs"...
mov rdi, rbx
mov rdx, r14
mov [rsp+78h+var_60], ecx
mov r8d, r15d
mov r9d, r12d
xor eax, eax
call _fprintf
cmp byte ptr [rsp+78h+var_64], 0
mov r15, rbp
mov rbp, [rsp+78h+var_58]
jz short loc_A6F28
shl r13, 2
add r13, [r15+58h]
mov rdi, rbx
mov rsi, r13
mov edx, [rsp+78h+var_5C]
call __ZN10OpenSubdiv6v3_6_03Tmr16printNodeIndicesEP8_IO_FILENS0_3Vtr10ConstArrayIiEE; OpenSubdiv::v3_6_0::Tmr::printNodeIndices(_IO_FILE *,OpenSubdiv::v3_6_0::Vtr::ConstArray<int>)
loc_A6F28:
lea rdi, aShapeBoxStyleF_0; "\", shape=box, style=filled, color=dark"...
mov esi, 2Eh ; '.'
mov edx, 1
mov rcx, rbx
call _fwrite
mov rax, [rbp+40h]
mov edx, [rax+r12*4]
mov ecx, 2
mov esi, edx
and esi, 3
lea rdi, jpt_A6ED5
movsxd r8, ds:(jpt_A6ED5 - 0C36C0h)[rdi+rsi*4]; switch 4 cases
add r8, rdi
mov rsi, rbp
mov r13, [rsp+78h+var_50]
jmp r8; switch jump
loc_A6F6C:
mov r8d, r15d; jumptable 00000000000A6DC2 case 1
shr r8d, 3
and r8d, 0Fh
mov [rsp+78h+var_78], r13d
lea rsi, aZuLabelDRecDNt; " %zu [label=\"%d REC (%d)\\ntofs=%d fs"...
mov rdi, rbx
mov [rsp+78h+var_40], r14
mov rdx, r14
mov [rsp+78h+var_60], ecx
mov r9d, r12d
xor eax, eax
call _fprintf
test r15b, 4
setz al
mov ecx, [rsp+78h+var_64]
xor cl, 1
or cl, al
mov [rsp+78h+var_38], r12
jnz short loc_A6FC9
shl r13, 2
add r13, [rbp+58h]
mov rdi, rbx
mov rsi, r13
mov edx, [rsp+78h+var_5C]
call __ZN10OpenSubdiv6v3_6_03Tmr16printNodeIndicesEP8_IO_FILENS0_3Vtr10ConstArrayIiEE; OpenSubdiv::v3_6_0::Tmr::printNodeIndices(_IO_FILE *,OpenSubdiv::v3_6_0::Vtr::ConstArray<int>)
loc_A6FC9:
lea rdi, aShapeSquareSty; "\", shape=square, style=filled, color=d"...
mov esi, 31h ; '1'
mov edx, 1
mov rcx, rbx
call _fwrite
mov r14, rbx
lea ebx, [r12+2]
xor r13d, r13d
mov r12, [rsp+78h+var_50]
mov rbp, [rsp+78h+var_58]
mov r15, [rsp+78h+var_40]
loc_A6FFC:
mov rax, [rbp+40h]
lea ecx, [rbx+r13]
movsxd rcx, ecx
movsxd rcx, dword ptr [rax+rcx*4]
add rcx, r12
mov rdi, r14
lea rsi, aZuZuLabelD; " %zu -> %zu [label=\"%d\"]\n"
mov rdx, r15
mov r8d, r13d
xor eax, eax
call _fprintf
inc r13
cmp r13, 4
jnz short loc_A6FFC
mov r13, r12
mov rbx, r14
mov r15, [rsp+78h+var_48]
mov r12, [rsp+78h+var_38]
jmp loc_A70F1
loc_A7043:
shr r15d, 3; jumptable 00000000000A6DC2 case 2
and r15d, 0Fh
mov [rsp+78h+var_78], r13d
lea rsi, aZuLabelDTrmDNt; " %zu [label=\"%d TRM (%d)\\ntofs=%d fs"...
mov rdi, rbx
mov rdx, r14
mov [rsp+78h+var_60], ecx
mov r8d, r15d
mov r9d, r12d
xor eax, eax
call _fprintf
cmp byte ptr [rsp+78h+var_64], 0
mov r15, rbp
mov rbp, [rsp+78h+var_58]
jz short loc_A70AC
mov rsi, r13
shl rsi, 2
add rsi, [r15+58h]
mov rdi, rbx
mov edx, 19h
call __ZN10OpenSubdiv6v3_6_03Tmr16printNodeIndicesEP8_IO_FILENS0_3Vtr10ConstArrayIiEE; OpenSubdiv::v3_6_0::Tmr::printNodeIndices(_IO_FILE *,OpenSubdiv::v3_6_0::Vtr::ConstArray<int>)
mov rax, [r15+58h]
lea rsi, [rax+r13*4]
add rsi, 64h ; 'd'
mov rdi, rbx
mov edx, [rsp+78h+var_5C]
call __ZN10OpenSubdiv6v3_6_03Tmr16printNodeIndicesEP8_IO_FILENS0_3Vtr10ConstArrayIiEE; OpenSubdiv::v3_6_0::Tmr::printNodeIndices(_IO_FILE *,OpenSubdiv::v3_6_0::Vtr::ConstArray<int>)
loc_A70AC:
lea rdi, aShapeBoxStyleF_1; "\", shape=box, style=filled, color=grey"...
mov esi, 28h ; '('
mov edx, 1
mov rcx, rbx
call _fwrite
mov rax, [rbp+40h]
lea ecx, [r12+2]
movsxd rcx, ecx
movsxd rcx, dword ptr [rax+rcx*4]
mov r13, [rsp+78h+var_50]
add rcx, r13
lea rsi, aZuZu; " %zu -> %zu\n"
mov rdi, rbx
mov rdx, r14
xor eax, eax
call _fprintf
loc_A70F1:
mov rax, [rbp+40h]
mov edx, [rax+r12*4]
mov ecx, 2
mov esi, edx
and esi, 3
lea rdi, jpt_A6ED5
movsxd r8, ds:(jpt_A6ED5 - 0C36C0h)[rdi+rsi*4]; switch 4 cases
add r8, rdi
mov rsi, rbp
jmp r8; switch jump
loc_A7117:
and edx, 4; jumptable 00000000000A6ED5 case 0
cmp edx, 1
mov ecx, 3
sbb ecx, 0
jmp short loc_A7133
loc_A7127:
mov ecx, 6; jumptable 00000000000A6ED5 case 1
jmp short loc_A7133
loc_A712E:
mov ecx, 3; jumptable 00000000000A6ED5 case 2
loc_A7133:
mov rsi, rbp
loc_A7136:
add r12d, ecx; jumptable 00000000000A6ED5 case 3
mov rcx, [rsi+48h]
sub rcx, rax
shr rcx, 2
xor edx, edx
cmp r12d, ecx
mov eax, 0FFFFFFFFh
cmovl eax, r12d
cmovl rdx, rsi
test rdx, rdx
jz short loc_A7163
test eax, eax
jns loc_A6DC4
loc_A7163:
lea rdi, asc_C3D69; "}\n"
mov esi, 2
mov edx, 1
mov rcx, rbx
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _fwrite
loc_A718A:
lea rdi, aGetdescriptorG; "GetDescriptor().GetType()==NodeType::NO"...
lea rsi, aWorkspaceLlm4b_51; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aFloatOpensubdi_3; "float OpenSubdiv::v3_6_0::Tmr::Subdivis"...
mov edx, 187h
call ___assert_fail
|
long long OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::WriteTreeDigraph(
unsigned __int8 **a1,
long long a2,
unsigned int a3,
unsigned __int8 a4,
int a5)
{
long long v5; // r14
int v7; // ecx
long long v8; // r12
unsigned int v9; // r15d
long long v10; // r14
long long v11; // r13
unsigned __int8 **v12; // rbp
unsigned __int8 *v13; // rax
unsigned __int8 **v14; // rdx
const char *v15; // rdx
bool v16; // zf
long long v17; // r13
unsigned __int8 **v18; // r15
unsigned __int8 **v19; // rbp
unsigned __int8 *v20; // rax
unsigned __int8 *v21; // rax
int v22; // edx
int v23; // ecx
unsigned __int8 **v24; // rsi
long long v25; // r13
int v26; // r12d
unsigned long long v27; // rcx
unsigned __int8 **v28; // rdx
int v29; // eax
int v32; // [rsp+18h] [rbp-60h]
int v33; // [rsp+1Ch] [rbp-5Ch]
unsigned __int8 **v34; // [rsp+20h] [rbp-58h]
long long v35; // [rsp+28h] [rbp-50h]
v5 = a3;
v33 = *(_DWORD *)((char *)&unk_C3F88 + ((**a1 >> 3) & 0xC));
if ( a5 )
{
fprintf(a2, "subgraph cluster_%d {\n", a3);
fprintf(a2, " label = \"Plan %d\"; style=filled; color=lightgrey;\n", v5);
}
else
{
fwrite("digraph {\n", 10LL, 1LL, a2);
}
v7 = 0;
v8 = 2LL;
v9 = *((_DWORD *)a1[8] + 2);
v35 = v5 << 32;
v10 = (v5 << 32) | 2;
v11 = *((int *)a1[8] + 3);
v12 = a1;
v34 = a1;
switch ( v9 & 3 )
{
case 0u:
LABEL_6:
v32 = v7;
fprintf(a2, " %zu [label=\"%d REG (%d)\\ntofs=%d fsup=%d", v10, v7, (v9 >> 3) & 0xF, v8, v11);
if ( a4 )
OpenSubdiv::v3_6_0::Tmr::printNodeIndices(a2, (long long)&v12[11][4 * v11], 16);
v15 = "white";
v16 = (v9 & 4) == 0;
v17 = v35;
v18 = v12;
v19 = v34;
if ( !v16 )
{
v20 = v34[8];
if ( (*(_DWORD *)&v20[4 * v8] & 7) != 4 )
__assert_fail(
"GetDescriptor().GetType()==NodeType::NODE_REGULAR && GetDescriptor().HasSharpness()",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/../tmr/subdivisionPlan.h",
391LL,
"float OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::Node::GetSharpness() const");
fprintf(a2, "\\n\\nsharp=%f", *(float *)&v20[4 * v8 + 8]);
v15 = "darksalmon";
}
fprintf(a2, "\", shape=box, style=filled, color=%s]\n", v15);
v21 = v34[8];
v22 = *(_DWORD *)&v21[4 * v8];
v23 = 2;
v24 = v34;
switch ( (unsigned long long)v34 )
{
case 0uLL:
LABEL_24:
v23 = ((v22 & 4 | 0x300000000uLL) - 1) >> 32;
goto LABEL_27;
case 1uLL:
LABEL_25:
v23 = 6;
goto LABEL_27;
case 2uLL:
LABEL_26:
v23 = 3;
LABEL_27:
v24 = v19;
break;
case 3uLL:
goto LABEL_28;
}
break;
case 1u:
LABEL_15:
v32 = v7;
fprintf(a2, " %zu [label=\"%d REC (%d)\\ntofs=%d fsup=%d", v10, v7, (v9 >> 3) & 0xF, v8, v11);
if ( !(((v9 & 4) == 0) | a4 ^ 1) )
OpenSubdiv::v3_6_0::Tmr::printNodeIndices(a2, (long long)&v12[11][4 * v11], v33);
fwrite("\", shape=square, style=filled, color=dodgerblue]\n", 49LL, 1LL, a2);
v25 = 0LL;
v19 = v34;
do
{
fprintf(a2, " %zu -> %zu [label=\"%d\"]\n", v10, v35 + *(int *)&v34[8][4 * (int)v8 + 8 + 4 * (int)v25], v25);
++v25;
}
while ( v25 != 4 );
v17 = v35;
v18 = a1;
goto LABEL_23;
case 2u:
LABEL_20:
v32 = v7;
fprintf(a2, " %zu [label=\"%d TRM (%d)\\ntofs=%d fsup=%d", v10, v7, (v9 >> 3) & 0xF, v8, v11);
v18 = v12;
v19 = v34;
if ( a4 )
{
OpenSubdiv::v3_6_0::Tmr::printNodeIndices(a2, (long long)&v18[11][4 * v11], 25);
OpenSubdiv::v3_6_0::Tmr::printNodeIndices(a2, (long long)&v18[11][4 * v11 + 100], v33);
}
fwrite("\", shape=box, style=filled, color=grey]\n", 40LL, 1LL, a2);
v17 = v35;
fprintf(a2, " %zu -> %zu\n", v10, v35 + *(int *)&v34[8][4 * (int)v8 + 8]);
LABEL_23:
v21 = v19[8];
v22 = *(_DWORD *)&v21[4 * v8];
v23 = 2;
v24 = v19;
switch ( (unsigned long long)v19 )
{
case 0uLL:
goto LABEL_24;
case 1uLL:
goto LABEL_25;
case 2uLL:
goto LABEL_26;
case 3uLL:
goto LABEL_28;
}
case 3u:
LABEL_12:
v32 = v7;
fprintf(a2, " %zu [label=\"%d END (%d)\\ntofs=%d fsup=%d", v10, v7, (v9 >> 3) & 0xF, v8, v11);
v18 = v12;
v19 = v34;
if ( a4 )
OpenSubdiv::v3_6_0::Tmr::printNodeIndices(a2, (long long)&v18[11][4 * v11], v33);
fwrite("\", shape=box, style=filled, color=darkorange]\n", 46LL, 1LL, a2);
v21 = v34[8];
v22 = *(_DWORD *)&v21[4 * v8];
v23 = 2;
v24 = v34;
v17 = v35;
switch ( (unsigned long long)v34 )
{
case 0uLL:
goto LABEL_24;
case 1uLL:
goto LABEL_25;
case 2uLL:
goto LABEL_26;
case 3uLL:
goto LABEL_28;
}
}
LABEL_28:
v26 = v23 + v8;
v27 = (unsigned long long)(v24[9] - v21) >> 2;
v28 = 0LL;
v29 = -1;
if ( v26 < (int)v27 )
{
v29 = v26;
v28 = v24;
}
if ( v28 && v29 >= 0 )
{
v7 = v32 + 1;
v8 = (unsigned int)v29;
v34 = v28;
v13 = v28[8];
v14 = v18;
v9 = *(_DWORD *)&v13[4 * v8];
v10 = v8 | v17;
v12 = v14;
v11 = *(int *)&v14[8][4 * v8 + 4];
switch ( v9 & 3 )
{
case 0u:
goto LABEL_6;
case 1u:
goto LABEL_15;
case 2u:
goto LABEL_20;
case 3u:
goto LABEL_12;
}
}
return fwrite("}\n", 2LL, 1LL, a2);
}
|
WriteTreeDigraph:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV dword ptr [RSP + 0x14],ECX
MOV R14D,EDX
MOV RBX,RSI
MOV R15,RDI
MOV RAX,qword ptr [RDI]
MOVZX EAX,byte ptr [RAX]
SHR EAX,0x3
AND EAX,0xc
LEA RCX,[0x1c3f88]
MOV EAX,dword ptr [RAX + RCX*0x1]
MOV dword ptr [RSP + 0x1c],EAX
TEST R8D,R8D
JZ 0x001a6d5e
LEA RSI,[0x1c3b6e]
MOV RDI,RBX
MOV EDX,R14D
XOR EAX,EAX
CALL 0x0013b0f0
LEA RSI,[0x1c3b85]
MOV RDI,RBX
MOV EDX,R14D
XOR EAX,EAX
CALL 0x0013b0f0
JMP 0x001a6d77
LAB_001a6d5e:
LEA RDI,[0x1c3bba]
MOV ESI,0xa
MOV EDX,0x1
MOV RCX,RBX
CALL 0x0013c370
LAB_001a6d77:
SHL R14,0x20
MOV EAX,0x2
XOR ECX,ECX
MOV R12D,EAX
MOV RAX,qword ptr [R15 + 0x40]
MOV RSI,R15
MOV R15D,dword ptr [RAX + R12*0x4]
MOV qword ptr [RSP + 0x28],R14
OR R14,R12
MOV RAX,qword ptr [RSI + 0x40]
MOVSXD R13,dword ptr [RAX + R12*0x4 + 0x4]
MOV EAX,R15D
AND EAX,0x3
LEA RDX,[0x1c36b0]
MOVSXD RAX,dword ptr [RDX + RAX*0x4]
ADD RAX,RDX
MOV RBP,RSI
MOV qword ptr [RSP + 0x20],RSI
MOV qword ptr [RSP + 0x30],RSI
switchD:
JMP RAX
LAB_001a6dc4:
MOV ECX,dword ptr [RSP + 0x18]
INC ECX
MOV R12D,EAX
MOV qword ptr [RSP + 0x20],RDX
MOV RAX,qword ptr [RDX + 0x40]
MOV RDX,R15
MOV R15D,dword ptr [RAX + R12*0x4]
MOV R14,R13
OR R14,R12
MOV RBP,RDX
MOV RAX,qword ptr [RDX + 0x40]
MOVSXD R13,dword ptr [RAX + R12*0x4 + 0x4]
MOV EAX,R15D
AND EAX,0x3
LEA RDX,[0x1c36b0]
MOVSXD RAX,dword ptr [RDX + RAX*0x4]
ADD RAX,RDX
switchD:
JMP RAX
caseD_0:
MOV R8D,R15D
SHR R8D,0x3
AND R8D,0xf
MOV dword ptr [RSP],R13D
LEA RSI,[0x1c3bc5]
MOV RDI,RBX
MOV RDX,R14
MOV dword ptr [RSP + 0x18],ECX
MOV R14,R12
MOV R9D,R12D
XOR EAX,EAX
CALL 0x0013b0f0
CMP byte ptr [RSP + 0x14],0x0
JZ 0x001a6e51
SHL R13,0x2
ADD R13,qword ptr [RBP + 0x58]
MOV RDI,RBX
MOV RSI,R13
MOV EDX,0x10
CALL 0x0013a720
LAB_001a6e51:
LEA RDX,[0x1c3c2f]
TEST R15B,0x4
MOV R12,R14
MOV R13,qword ptr [RSP + 0x28]
MOV R15,RBP
MOV RBP,qword ptr [RSP + 0x20]
JZ 0x001a6ea1
MOV RAX,qword ptr [RBP + 0x40]
MOV ECX,dword ptr [RAX + R12*0x4]
AND ECX,0x7
CMP ECX,0x4
JNZ 0x001a718a
CVTSS2SD XMM0,dword ptr [RAX + R12*0x4 + 0x8]
LEA RSI,[0x1c3bf0]
MOV RDI,RBX
MOV AL,0x1
CALL 0x0013b0f0
LEA RDX,[0x1c3c24]
LAB_001a6ea1:
LEA RSI,[0x1c3bfd]
MOV RDI,RBX
XOR EAX,EAX
CALL 0x0013b0f0
MOV RAX,qword ptr [RBP + 0x40]
MOV EDX,dword ptr [RAX + R12*0x4]
MOV ECX,0x2
MOV ESI,EDX
AND ESI,0x3
LEA RDI,[0x1c36c0]
MOVSXD R8,dword ptr [RDI + RSI*0x4]
ADD R8,RDI
MOV RSI,RBP
switchD:
JMP R8
caseD_3:
SHR R15D,0x3
AND R15D,0xf
MOV dword ptr [RSP],R13D
LEA RSI,[0x1c3c35]
MOV RDI,RBX
MOV RDX,R14
MOV dword ptr [RSP + 0x18],ECX
MOV R8D,R15D
MOV R9D,R12D
XOR EAX,EAX
CALL 0x0013b0f0
CMP byte ptr [RSP + 0x14],0x0
MOV R15,RBP
MOV RBP,qword ptr [RSP + 0x20]
JZ 0x001a6f28
SHL R13,0x2
ADD R13,qword ptr [R15 + 0x58]
MOV RDI,RBX
MOV RSI,R13
MOV EDX,dword ptr [RSP + 0x1c]
CALL 0x0013a720
LAB_001a6f28:
LEA RDI,[0x1c3c60]
MOV ESI,0x2e
MOV EDX,0x1
MOV RCX,RBX
CALL 0x0013c370
MOV RAX,qword ptr [RBP + 0x40]
MOV EDX,dword ptr [RAX + R12*0x4]
MOV ECX,0x2
MOV ESI,EDX
AND ESI,0x3
LEA RDI,[0x1c36c0]
MOVSXD R8,dword ptr [RDI + RSI*0x4]
ADD R8,RDI
MOV RSI,RBP
MOV R13,qword ptr [RSP + 0x28]
switchD:
JMP R8
caseD_1:
MOV R8D,R15D
SHR R8D,0x3
AND R8D,0xf
MOV dword ptr [RSP],R13D
LEA RSI,[0x1c3c8f]
MOV RDI,RBX
MOV qword ptr [RSP + 0x38],R14
MOV RDX,R14
MOV dword ptr [RSP + 0x18],ECX
MOV R9D,R12D
XOR EAX,EAX
CALL 0x0013b0f0
TEST R15B,0x4
SETZ AL
MOV ECX,dword ptr [RSP + 0x14]
XOR CL,0x1
OR CL,AL
MOV qword ptr [RSP + 0x40],R12
JNZ 0x001a6fc9
SHL R13,0x2
ADD R13,qword ptr [RBP + 0x58]
MOV RDI,RBX
MOV RSI,R13
MOV EDX,dword ptr [RSP + 0x1c]
CALL 0x0013a720
LAB_001a6fc9:
LEA RDI,[0x1c3cba]
MOV ESI,0x31
MOV EDX,0x1
MOV RCX,RBX
CALL 0x0013c370
MOV R14,RBX
LEA EBX,[R12 + 0x2]
XOR R13D,R13D
MOV R12,qword ptr [RSP + 0x28]
MOV RBP,qword ptr [RSP + 0x20]
MOV R15,qword ptr [RSP + 0x38]
LAB_001a6ffc:
MOV RAX,qword ptr [RBP + 0x40]
LEA ECX,[RBX + R13*0x1]
MOVSXD RCX,ECX
MOVSXD RCX,dword ptr [RAX + RCX*0x4]
ADD RCX,R12
MOV RDI,R14
LEA RSI,[0x1c3cec]
MOV RDX,R15
MOV R8D,R13D
XOR EAX,EAX
CALL 0x0013b0f0
INC R13
CMP R13,0x4
JNZ 0x001a6ffc
MOV R13,R12
MOV RBX,R14
MOV R15,qword ptr [RSP + 0x30]
MOV R12,qword ptr [RSP + 0x40]
JMP 0x001a70f1
caseD_2:
SHR R15D,0x3
AND R15D,0xf
MOV dword ptr [RSP],R13D
LEA RSI,[0x1c3d07]
MOV RDI,RBX
MOV RDX,R14
MOV dword ptr [RSP + 0x18],ECX
MOV R8D,R15D
MOV R9D,R12D
XOR EAX,EAX
CALL 0x0013b0f0
CMP byte ptr [RSP + 0x14],0x0
MOV R15,RBP
MOV RBP,qword ptr [RSP + 0x20]
JZ 0x001a70ac
MOV RSI,R13
SHL RSI,0x2
ADD RSI,qword ptr [R15 + 0x58]
MOV RDI,RBX
MOV EDX,0x19
CALL 0x0013a720
MOV RAX,qword ptr [R15 + 0x58]
LEA RSI,[RAX + R13*0x4]
ADD RSI,0x64
MOV RDI,RBX
MOV EDX,dword ptr [RSP + 0x1c]
CALL 0x0013a720
LAB_001a70ac:
LEA RDI,[0x1c3d32]
MOV ESI,0x28
MOV EDX,0x1
MOV RCX,RBX
CALL 0x0013c370
MOV RAX,qword ptr [RBP + 0x40]
LEA ECX,[R12 + 0x2]
MOVSXD RCX,ECX
MOVSXD RCX,dword ptr [RAX + RCX*0x4]
MOV R13,qword ptr [RSP + 0x28]
ADD RCX,R13
LEA RSI,[0x1c3d5b]
MOV RDI,RBX
MOV RDX,R14
XOR EAX,EAX
CALL 0x0013b0f0
LAB_001a70f1:
MOV RAX,qword ptr [RBP + 0x40]
MOV EDX,dword ptr [RAX + R12*0x4]
MOV ECX,0x2
MOV ESI,EDX
AND ESI,0x3
LEA RDI,[0x1c36c0]
MOVSXD R8,dword ptr [RDI + RSI*0x4]
ADD R8,RDI
MOV RSI,RBP
switchD:
JMP R8
caseD_0:
AND EDX,0x4
CMP EDX,0x1
MOV ECX,0x3
SBB ECX,0x0
JMP 0x001a7133
caseD_1:
MOV ECX,0x6
JMP 0x001a7133
caseD_2:
MOV ECX,0x3
LAB_001a7133:
MOV RSI,RBP
caseD_3:
ADD R12D,ECX
MOV RCX,qword ptr [RSI + 0x48]
SUB RCX,RAX
SHR RCX,0x2
XOR EDX,EDX
CMP R12D,ECX
MOV EAX,0xffffffff
CMOVL EAX,R12D
CMOVL RDX,RSI
TEST RDX,RDX
JZ 0x001a7163
TEST EAX,EAX
JNS 0x001a6dc4
LAB_001a7163:
LEA RDI,[0x1c3d69]
MOV ESI,0x2
MOV EDX,0x1
MOV RCX,RBX
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0013c370
LAB_001a718a:
LEA RDI,[0x1c3d6c]
LEA RSI,[0x1c3dc0]
LEA RCX,[0x1c3e26]
MOV EDX,0x187
CALL 0x00139560
|
/* OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::WriteTreeDigraph(_IO_FILE*, int, bool, bool) const */
void __thiscall
OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::WriteTreeDigraph
(SubdivisionPlan *this,_IO_FILE *param_1,int param_2,bool param_3,bool param_4)
{
int4 uVar1;
uint uVar2;
int iVar3;
char *pcVar4;
SubdivisionPlan *pSVar5;
int7 in_register_00000081;
uint uVar6;
ulong uVar7;
long lVar8;
ulong uVar9;
ulong uVar10;
ulong uVar11;
int local_60;
SubdivisionPlan *local_58;
uVar1 = *(int4 *)(&DAT_001c3f88 + (**(byte **)this >> 3 & 0xc));
if ((int)CONCAT71(in_register_00000081,param_4) == 0) {
fwrite("digraph {\n",10,1,param_1);
}
else {
fprintf(param_1,"subgraph cluster_%d {\n",(ulong)(uint)param_2);
fprintf(param_1," label = \"Plan %d\"; style=filled; color=lightgrey;\n",(ulong)(uint)param_2);
}
uVar10 = (ulong)(uint)param_2 << 0x20;
uVar9 = 0;
uVar7 = 2;
uVar6 = *(uint *)(*(long *)(this + 0x40) + 8);
uVar11 = uVar10 | 2;
lVar8 = (long)*(int *)(*(long *)(this + 0x40) + 0xc);
local_58 = this;
switch(uVar6 & 3) {
case 1:
goto switchD_001a6dc2_caseD_1;
case 2:
goto switchD_001a6dc2_caseD_2;
case 3:
goto switchD_001a6dc2_caseD_3;
}
switchD_001a6dc2_caseD_0:
local_60 = (int)uVar9;
fprintf(param_1," %zu [label=\"%d REG (%d)\\ntofs=%d fsup=%d",uVar11,uVar9,
(ulong)(uVar6 >> 3 & 0xf),uVar7,(int)lVar8);
if (param_3) {
printNodeIndices((Tmr *)param_1,lVar8 * 4 + *(long *)(this + 0x58),0x10);
}
pcVar4 = "white";
if ((uVar6 & 4) != 0) {
if ((*(uint *)(*(long *)(local_58 + 0x40) + uVar7 * 4) & 7) != 4) {
/* WARNING: Subroutine does not return */
__assert_fail("GetDescriptor().GetType()==NodeType::NODE_REGULAR && GetDescriptor().HasSharpness()"
,
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/../tmr/subdivisionPlan.h"
,0x187,
"float OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::Node::GetSharpness() const");
}
fprintf(param_1,"\\n\\nsharp=%f",(double)*(float *)(*(long *)(local_58 + 0x40) + 8 + uVar7 * 4),
"white");
pcVar4 = "darksalmon";
}
fprintf(param_1,"\", shape=box, style=filled, color=%s]\n",pcVar4);
lVar8 = *(long *)(local_58 + 0x40);
uVar6 = *(uint *)(lVar8 + uVar7 * 4);
iVar3 = 2;
switch(uVar6 & 3) {
case 1:
goto switchD_001a6f69_caseD_1;
case 2:
goto switchD_001a6f69_caseD_2;
case 3:
goto switchD_001a6f69_caseD_3;
}
switchD_001a6f69_caseD_0:
iVar3 = 3 - (uint)((uVar6 & 4) == 0);
goto switchD_001a6f69_caseD_3;
LAB_001a6f28:
fwrite("\", shape=box, style=filled, color=darkorange]\n",0x2e,1,param_1);
lVar8 = *(long *)(local_58 + 0x40);
uVar6 = *(uint *)(lVar8 + uVar7 * 4);
iVar3 = 2;
switch(uVar6 & 3) {
case 1:
switchD_001a6f69_caseD_1:
iVar3 = 6;
case 3:
switchD_001a6f69_caseD_3:
do {
uVar6 = (int)uVar7 + iVar3;
pSVar5 = (SubdivisionPlan *)0x0;
uVar2 = 0xffffffff;
if ((int)uVar6 < (int)((ulong)(*(long *)(local_58 + 0x48) - lVar8) >> 2)) {
pSVar5 = local_58;
uVar2 = uVar6;
}
if ((pSVar5 == (SubdivisionPlan *)0x0) || ((int)uVar2 < 0)) {
fwrite(&DAT_001c3d69,2,1,param_1);
return;
}
uVar9 = (ulong)(local_60 + 1);
uVar7 = (ulong)uVar2;
uVar6 = *(uint *)(*(long *)(pSVar5 + 0x40) + uVar7 * 4);
uVar11 = CONCAT44(param_2,uVar2);
lVar8 = (long)*(int *)(*(long *)(this + 0x40) + 4 + uVar7 * 4);
local_58 = pSVar5;
switch(uVar6 & 3) {
case 0:
goto switchD_001a6dc2_caseD_0;
case 1:
switchD_001a6dc2_caseD_1:
local_60 = (int)uVar9;
fprintf(param_1," %zu [label=\"%d REC (%d)\\ntofs=%d fsup=%d",uVar11,uVar9,
(ulong)(uVar6 >> 3 & 0xf),uVar7,(int)lVar8);
if (param_3 && (uVar6 & 4) != 0) {
printNodeIndices((Tmr *)param_1,lVar8 * 4 + *(long *)(this + 0x58),uVar1);
}
fwrite("\", shape=square, style=filled, color=dodgerblue]\n",0x31,1,param_1);
uVar9 = 0;
do {
fprintf(param_1," %zu -> %zu [label=\"%d\"]\n",uVar11,
(long)*(int *)(*(long *)(local_58 + 0x40) +
(long)((int)uVar7 + 2 + (int)uVar9) * 4) + uVar10,uVar9 & 0xffffffff
);
uVar9 = uVar9 + 1;
} while (uVar9 != 4);
break;
case 2:
switchD_001a6dc2_caseD_2:
local_60 = (int)uVar9;
fprintf(param_1," %zu [label=\"%d TRM (%d)\\ntofs=%d fsup=%d",uVar11,uVar9,
(ulong)(uVar6 >> 3 & 0xf),uVar7,(int)lVar8);
if (param_3) {
printNodeIndices((Tmr *)param_1,lVar8 * 4 + *(long *)(this + 0x58),0x19);
printNodeIndices((Tmr *)param_1,*(long *)(this + 0x58) + lVar8 * 4 + 100,uVar1);
}
fwrite("\", shape=box, style=filled, color=grey]\n",0x28,1,param_1);
fprintf(param_1," %zu -> %zu\n",uVar11,
(long)*(int *)(*(long *)(local_58 + 0x40) + (long)((int)uVar7 + 2) * 4) + uVar10);
break;
case 3:
switchD_001a6dc2_caseD_3:
local_60 = (int)uVar9;
fprintf(param_1," %zu [label=\"%d END (%d)\\ntofs=%d fsup=%d",uVar11,uVar9,
(ulong)(uVar6 >> 3 & 0xf),uVar7,(int)lVar8);
if (param_3) {
printNodeIndices((Tmr *)param_1,lVar8 * 4 + *(long *)(this + 0x58),uVar1);
}
goto LAB_001a6f28;
}
lVar8 = *(long *)(local_58 + 0x40);
uVar6 = *(uint *)(lVar8 + uVar7 * 4);
iVar3 = 2;
switch(uVar6 & 3) {
case 0:
goto switchD_001a6f69_caseD_0;
case 1:
goto switchD_001a6f69_caseD_1;
case 2:
goto switchD_001a6f69_caseD_2;
}
} while( true );
case 2:
switchD_001a6f69_caseD_2:
iVar3 = 3;
goto switchD_001a6f69_caseD_3;
}
goto switchD_001a6f69_caseD_0;
}
|
|
20,145
|
OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::WriteTreeDigraph(_IO_FILE*, int, bool, bool) const
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/subdivisionPlan.cpp
|
void
SubdivisionPlan::WriteTreeDigraph(FILE* fout, int planIndex, bool showIndices, bool isSubgraph) const {
constexpr int const regularPatchSize = NodeBase::catmarkRegularPatchSize();
constexpr int const terminalPatchSize = NodeBase::catmarkTerminalPatchSize();
int const irregularPatchSize = NodeBase::catmarkIrregularPatchSize(getEndCapType());
auto hashNodeId = [&planIndex](Node const& n) -> uint64_t {
return (uint64_t(planIndex) << 32) + n.treeOffset;
};
if (isSubgraph) {
fprintf(fout, "subgraph cluster_%d {\n", planIndex);
fprintf(fout, " label = \"Plan %d\"; style=filled; color=lightgrey;\n", planIndex);
} else {
fprintf(fout, "digraph {\n");
}
int count = 0;
for (Node node = GetRootNode(); node.IsValid(); ++node, ++count) {
NodeDescriptor const& desc = node.GetDescriptor();
uint64_t nodeID = hashNodeId(node);
int treeOffset = node.treeOffset;
int patchPointsOffset = _tree[node.patchPointsOffset()];
switch (desc.GetType()) {
using enum NodeType;
case NODE_REGULAR: {
fprintf(fout, " %zu [label=\"%d REG (%d)\\ntofs=%d fsup=%d",
nodeID, count, desc.GetDepth(), treeOffset, patchPointsOffset);
if (showIndices)
printNodeIndices(fout, { &_patchPoints[patchPointsOffset], regularPatchSize});
if (desc.HasSharpness()) {
fprintf(fout, "\\n\\nsharp=%f", node.GetSharpness());
}
fprintf(fout, "\", shape=box, style=filled, color=%s]\n", desc.HasSharpness() ? "darksalmon" : "white");
} break;
case NODE_END: {
fprintf(fout, " %zu [label=\"%d END (%d)\\ntofs=%d fsup=%d",
nodeID, count, desc.GetDepth(), treeOffset, patchPointsOffset);
if (showIndices)
printNodeIndices(fout, { &_patchPoints[patchPointsOffset], irregularPatchSize });
fprintf(fout, "\", shape=box, style=filled, color=darkorange]\n");
} break;
case NODE_RECURSIVE: {
fprintf(fout, " %zu [label=\"%d REC (%d)\\ntofs=%d fsup=%d",
nodeID, count, desc.GetDepth(), treeOffset, patchPointsOffset);
if (showIndices && desc.HasEndcap())
printNodeIndices(fout, { &_patchPoints[patchPointsOffset], irregularPatchSize });
fprintf(fout, "\", shape=square, style=filled, color=dodgerblue]\n");
for (int i = 0; i < 4; ++i)
fprintf(fout, " %zu -> %zu [label=\"%d\"]\n", nodeID, hashNodeId(node.GetChild(i)), i);
} break;
case NODE_TERMINAL: {
fprintf(fout, " %zu [label=\"%d TRM (%d)\\ntofs=%d fsup=%d",
nodeID, count, desc.GetDepth(), treeOffset, patchPointsOffset);
if (showIndices) {
printNodeIndices(fout, { &_patchPoints[patchPointsOffset], terminalPatchSize} );
printNodeIndices(fout, { &_patchPoints[patchPointsOffset + terminalPatchSize], irregularPatchSize });
}
fprintf(fout, "\", shape=box, style=filled, color=grey]\n");
fprintf(fout, " %zu -> %zu\n", nodeID, hashNodeId(node.GetChild()));
} break;
default:
assert(0);
}
}
fprintf(fout, "}\n");
}
|
O2
|
cpp
|
OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::WriteTreeDigraph(_IO_FILE*, int, bool, bool) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r8d, %ebp
movl %ecx, 0x10(%rsp)
movl %edx, %r15d
movq %rsi, %rbx
movq %rdi, 0x18(%rsp)
movq (%rdi), %rax
movzbl (%rax), %edi
shrl $0x5, %edi
andl $0x3, %edi
callq 0x55720
movl %eax, 0x14(%rsp)
testl %ebp, %ebp
je 0xb19c7
leaq 0x1ce16(%rip), %rsi # 0xce7ba
movq %rbx, %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0x53f90
leaq 0x1ce19(%rip), %rsi # 0xce7d1
movq %rbx, %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0x53f90
jmp 0xb19dc
leaq 0x1ce38(%rip), %rdi # 0xce806
pushq $0xa
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x55ce0
leaq 0x28(%rsp), %r13
movl $0x2, (%r13)
movq 0x18(%rsp), %rcx
movq %rcx, 0x8(%r13)
shlq $0x20, %r15
pushq $0x2
popq %r9
movl 0x10(%rsp), %eax
xorb $0x1, %al
movb %al, 0xf(%rsp)
movq %rcx, %rax
xorl %r10d, %r10d
testq %rax, %rax
je 0xb1c82
testl %r9d, %r9d
js 0xb1c82
movl %r9d, %ecx
movq 0x40(%rax), %rax
movl (%rax,%rcx,4), %r12d
movq %r15, %r14
orq %rcx, %r14
movq 0x18(%rsp), %rax
movq 0x40(%rax), %rax
movslq 0x4(%rax,%rcx,4), %rbp
movl %r12d, %r8d
shrl $0x3, %r8d
andl $0xf, %r8d
movl %r12d, %eax
andl $0x3, %eax
leaq 0x1c89d(%rip), %rcx # 0xce2f0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
movl %r10d, 0x24(%rsp)
jmpq *%rax
movl %ebp, (%rsp)
movq %rbx, %rdi
leaq 0x1cda3(%rip), %rsi # 0xce811
movq %r14, %rdx
movl %r10d, %ecx
xorl %eax, %eax
callq 0x53f90
cmpb $0x0, 0x10(%rsp)
je 0xb1a9d
shlq $0x2, %rbp
movq 0x18(%rsp), %rax
addq 0x58(%rax), %rbp
movq %rbx, %rdi
movq %rbp, %rsi
pushq $0x10
popq %rdx
callq 0x52fd0
leaq 0x1cdd7(%rip), %rdx # 0xce87b
testb $0x4, %r12b
je 0xb1ace
movq %r13, %rdi
callq 0x53740
cvtss2sd %xmm0, %xmm0
movq %rbx, %rdi
leaq 0x1cd7c(%rip), %rsi # 0xce83c
movb $0x1, %al
callq 0x53f90
leaq 0x1cda2(%rip), %rdx # 0xce870
movq %rbx, %rdi
leaq 0x1cd71(%rip), %rsi # 0xce849
xorl %eax, %eax
callq 0x53f90
jmp 0xb1bd2
movl %ebp, (%rsp)
movq %rbx, %rdi
leaq 0x1ce62(%rip), %rsi # 0xce953
movq %r14, %rdx
movl %r10d, %ecx
xorl %eax, %eax
callq 0x53f90
cmpb $0x0, 0x10(%rsp)
je 0xb1b3b
leaq (,%rbp,4), %rsi
movq 0x18(%rsp), %r12
addq 0x58(%r12), %rsi
movq %rbx, %rdi
pushq $0x19
popq %rdx
callq 0x52fd0
movq 0x58(%r12), %rax
leaq (%rax,%rbp,4), %rsi
addq $0x64, %rsi
movq %rbx, %rdi
movl 0x14(%rsp), %edx
callq 0x52fd0
leaq 0x1ce3c(%rip), %rdi # 0xce97e
pushq $0x28
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x55ce0
movq 0x30(%rsp), %rax
movq 0x40(%rax), %rax
movl 0x28(%rsp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movslq (%rax,%rcx,4), %rcx
addq %r15, %rcx
movq %rbx, %rdi
leaq 0x1ce33(%rip), %rsi # 0xce9a7
movq %r14, %rdx
xorl %eax, %eax
callq 0x53f90
jmp 0xb1bd2
movl %ebp, (%rsp)
movq %rbx, %rdi
leaq 0x1ccf4(%rip), %rsi # 0xce881
movq %r14, %rdx
movl %r10d, %ecx
xorl %eax, %eax
callq 0x53f90
cmpb $0x0, 0x10(%rsp)
je 0xb1bbd
shlq $0x2, %rbp
movq 0x18(%rsp), %rax
addq 0x58(%rax), %rbp
movq %rbx, %rdi
movq %rbp, %rsi
movl 0x14(%rsp), %edx
callq 0x52fd0
leaq 0x1cce8(%rip), %rdi # 0xce8ac
pushq $0x2e
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x55ce0
movq %r13, %rdi
callq 0x54740
movl 0x24(%rsp), %r10d
incl %r10d
movq 0x30(%rsp), %rax
movl 0x28(%rsp), %r9d
jmp 0xb1a0a
movl %ebp, (%rsp)
movq %rbx, %rdi
leaq 0x1ccdd(%rip), %rsi # 0xce8db
movq %r14, %rdx
movl %r10d, %ecx
xorl %eax, %eax
callq 0x53f90
testb $0x4, %r12b
sete %al
orb 0xf(%rsp), %al
jne 0xb1c34
shlq $0x2, %rbp
movq 0x18(%rsp), %rax
addq 0x58(%rax), %rbp
movq %rbx, %rdi
movq %rbp, %rsi
movl 0x14(%rsp), %edx
callq 0x52fd0
leaq 0x1cccb(%rip), %rdi # 0xce906
pushq $0x31
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x55ce0
xorl %ebp, %ebp
leaq 0x1cce6(%rip), %r12 # 0xce938
cmpl $0x4, %ebp
je 0xb1bd2
movq %r13, %rdi
movl %ebp, %esi
callq 0x51f20
movslq %eax, %rcx
addq %r15, %rcx
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
movl %ebp, %r8d
xorl %eax, %eax
callq 0x53f90
incl %ebp
jmp 0xb1c52
leaq 0x1cd2c(%rip), %rdi # 0xce9b5
pushq $0x2
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x55ce0
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
_ZNK10OpenSubdiv6v3_6_03Tmr15SubdivisionPlan16WriteTreeDigraphEP8_IO_FILEibb:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov ebp, r8d
mov [rsp+68h+var_58], ecx
mov r15d, edx
mov rbx, rsi
mov [rsp+68h+var_50], rdi
mov rax, [rdi]
movzx edi, byte ptr [rax]
shr edi, 5
and edi, 3
call __ZN10OpenSubdiv6v3_6_03Tmr8NodeBase25catmarkIrregularPatchSizeENS1_10EndCapTypeE; OpenSubdiv::v3_6_0::Tmr::NodeBase::catmarkIrregularPatchSize(OpenSubdiv::v3_6_0::Tmr::EndCapType)
mov [rsp+68h+var_54], eax
test ebp, ebp
jz short loc_B19C7
lea rsi, aSubgraphCluste; "subgraph cluster_%d {\n"
mov rdi, rbx
mov edx, r15d
xor eax, eax
call _fprintf
lea rsi, aLabelPlanDStyl; " label = \"Plan %d\"; style=filled; co"...
mov rdi, rbx
mov edx, r15d
xor eax, eax
call _fprintf
jmp short loc_B19DC
loc_B19C7:
lea rdi, aDigraph; "digraph {\n"
push 0Ah
pop rsi
push 1
pop rdx
mov rcx, rbx
call _fwrite
loc_B19DC:
lea r13, [rsp+68h+var_40]
mov dword ptr [r13+0], 2
mov rcx, [rsp+68h+var_50]
mov [r13+8], rcx
shl r15, 20h
push 2
pop r9
mov eax, [rsp+68h+var_58]
xor al, 1
mov [rsp+68h+var_59], al
mov rax, rcx
xor r10d, r10d
loc_B1A0A:
test rax, rax
jz loc_B1C82
test r9d, r9d
js loc_B1C82
mov ecx, r9d
mov rax, [rax+40h]
mov r12d, [rax+rcx*4]
mov r14, r15
or r14, rcx
mov rax, [rsp+68h+var_50]
mov rax, [rax+40h]
movsxd rbp, dword ptr [rax+rcx*4+4]
mov r8d, r12d
shr r8d, 3
and r8d, 0Fh
mov eax, r12d
and eax, 3
lea rcx, jpt_B1A5F
movsxd rax, ds:(jpt_B1A5F - 0CE2F0h)[rcx+rax*4]; switch 4 cases
add rax, rcx
mov [rsp+68h+var_44], r10d
jmp rax; switch jump
loc_B1A61:
mov [rsp+68h+var_68], ebp; jumptable 00000000000B1A5F case 0
mov rdi, rbx
lea rsi, aZuLabelDRegDNt; " %zu [label=\"%d REG (%d)\\ntofs=%d fs"...
mov rdx, r14
mov ecx, r10d
xor eax, eax
call _fprintf
cmp byte ptr [rsp+68h+var_58], 0
jz short loc_B1A9D
shl rbp, 2
mov rax, [rsp+68h+var_50]
add rbp, [rax+58h]
mov rdi, rbx
mov rsi, rbp
push 10h
pop rdx
call __ZN10OpenSubdiv6v3_6_03Tmr16printNodeIndicesEP8_IO_FILENS0_3Vtr10ConstArrayIiEE; OpenSubdiv::v3_6_0::Tmr::printNodeIndices(_IO_FILE *,OpenSubdiv::v3_6_0::Vtr::ConstArray<int>)
loc_B1A9D:
lea rdx, aWhite; "white"
test r12b, 4
jz short loc_B1ACE
mov rdi, r13; this
call __ZNK10OpenSubdiv6v3_6_03Tmr15SubdivisionPlan4Node12GetSharpnessEv; OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::Node::GetSharpness(void)
cvtss2sd xmm0, xmm0
mov rdi, rbx
lea rsi, aNNsharpF; "\\n\\nsharp=%f"
mov al, 1
call _fprintf
lea rdx, aDarksalmon; "darksalmon"
loc_B1ACE:
mov rdi, rbx
lea rsi, aShapeBoxStyleF; "\", shape=box, style=filled, color=%s]"...
xor eax, eax
call _fprintf
jmp loc_B1BD2
loc_B1AE4:
mov [rsp+68h+var_68], ebp; jumptable 00000000000B1A5F case 2
mov rdi, rbx
lea rsi, aZuLabelDTrmDNt; " %zu [label=\"%d TRM (%d)\\ntofs=%d fs"...
mov rdx, r14
mov ecx, r10d
xor eax, eax
call _fprintf
cmp byte ptr [rsp+68h+var_58], 0
jz short loc_B1B3B
lea rsi, ds:0[rbp*4]
mov r12, [rsp+68h+var_50]
add rsi, [r12+58h]
mov rdi, rbx
push 19h
pop rdx
call __ZN10OpenSubdiv6v3_6_03Tmr16printNodeIndicesEP8_IO_FILENS0_3Vtr10ConstArrayIiEE; OpenSubdiv::v3_6_0::Tmr::printNodeIndices(_IO_FILE *,OpenSubdiv::v3_6_0::Vtr::ConstArray<int>)
mov rax, [r12+58h]
lea rsi, [rax+rbp*4]
add rsi, 64h ; 'd'
mov rdi, rbx
mov edx, [rsp+68h+var_54]
call __ZN10OpenSubdiv6v3_6_03Tmr16printNodeIndicesEP8_IO_FILENS0_3Vtr10ConstArrayIiEE; OpenSubdiv::v3_6_0::Tmr::printNodeIndices(_IO_FILE *,OpenSubdiv::v3_6_0::Vtr::ConstArray<int>)
loc_B1B3B:
lea rdi, aShapeBoxStyleF_0; "\", shape=box, style=filled, color=grey"...
push 28h ; '('
pop rsi
push 1
pop rdx
mov rcx, rbx
call _fwrite
mov rax, [rsp+68h+var_38]
mov rax, [rax+40h]
mov ecx, [rsp+68h+var_40]
add ecx, 2
movsxd rcx, ecx
movsxd rcx, dword ptr [rax+rcx*4]
add rcx, r15
mov rdi, rbx
lea rsi, aZuZu; " %zu -> %zu\n"
mov rdx, r14
xor eax, eax
call _fprintf
jmp short loc_B1BD2
loc_B1B80:
mov [rsp+68h+var_68], ebp; jumptable 00000000000B1A5F case 3
mov rdi, rbx
lea rsi, aZuLabelDEndDNt; " %zu [label=\"%d END (%d)\\ntofs=%d fs"...
mov rdx, r14
mov ecx, r10d
xor eax, eax
call _fprintf
cmp byte ptr [rsp+68h+var_58], 0
jz short loc_B1BBD
shl rbp, 2
mov rax, [rsp+68h+var_50]
add rbp, [rax+58h]
mov rdi, rbx
mov rsi, rbp
mov edx, [rsp+68h+var_54]
call __ZN10OpenSubdiv6v3_6_03Tmr16printNodeIndicesEP8_IO_FILENS0_3Vtr10ConstArrayIiEE; OpenSubdiv::v3_6_0::Tmr::printNodeIndices(_IO_FILE *,OpenSubdiv::v3_6_0::Vtr::ConstArray<int>)
loc_B1BBD:
lea rdi, aShapeBoxStyleF_1; "\", shape=box, style=filled, color=dark"...
push 2Eh ; '.'
pop rsi
push 1
pop rdx
mov rcx, rbx
call _fwrite
loc_B1BD2:
mov rdi, r13
call __ZN10OpenSubdiv6v3_6_03Tmr15SubdivisionPlan4NodeppEv; OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::Node::operator++(void)
mov r10d, [rsp+68h+var_44]
inc r10d
mov rax, [rsp+68h+var_38]
mov r9d, [rsp+68h+var_40]
jmp loc_B1A0A
loc_B1BF1:
mov [rsp+68h+var_68], ebp; jumptable 00000000000B1A5F case 1
mov rdi, rbx
lea rsi, aZuLabelDRecDNt; " %zu [label=\"%d REC (%d)\\ntofs=%d fs"...
mov rdx, r14
mov ecx, r10d
xor eax, eax
call _fprintf
test r12b, 4
setz al
or al, [rsp+68h+var_59]
jnz short loc_B1C34
shl rbp, 2
mov rax, [rsp+68h+var_50]
add rbp, [rax+58h]
mov rdi, rbx
mov rsi, rbp
mov edx, [rsp+68h+var_54]
call __ZN10OpenSubdiv6v3_6_03Tmr16printNodeIndicesEP8_IO_FILENS0_3Vtr10ConstArrayIiEE; OpenSubdiv::v3_6_0::Tmr::printNodeIndices(_IO_FILE *,OpenSubdiv::v3_6_0::Vtr::ConstArray<int>)
loc_B1C34:
lea rdi, aShapeSquareSty; "\", shape=square, style=filled, color=d"...
push 31h ; '1'
pop rsi
push 1
pop rdx
mov rcx, rbx
call _fwrite
xor ebp, ebp
lea r12, aZuZuLabelD; " %zu -> %zu [label=\"%d\"]\n"
loc_B1C52:
cmp ebp, 4
jz loc_B1BD2
mov rdi, r13; this
mov esi, ebp; int
call __ZNK10OpenSubdiv6v3_6_03Tmr15SubdivisionPlan4Node8GetChildEi; OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::Node::GetChild(int)
movsxd rcx, eax
add rcx, r15
mov rdi, rbx
mov rsi, r12
mov rdx, r14
mov r8d, ebp
xor eax, eax
call _fprintf
inc ebp
jmp short loc_B1C52
loc_B1C82:
lea rdi, asc_CE9B5; "}\n"
push 2
pop rsi
push 1
pop rdx
mov rcx, rbx
call _fwrite
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::WriteTreeDigraph(
unsigned __int8 **a1,
long long a2,
unsigned int a3,
unsigned __int8 a4,
int a5,
double a6)
{
long long v7; // r15
long long v8; // r15
unsigned int v9; // r9d
unsigned __int8 **v10; // rax
int v11; // r10d
unsigned int v12; // r12d
unsigned long long v13; // r14
long long v14; // rbp
int v15; // r8d
const char *v16; // rdx
int i; // ebp
int Child; // eax
unsigned int v21; // [rsp+14h] [rbp-54h]
int v22; // [rsp+24h] [rbp-44h]
int v23; // [rsp+28h] [rbp-40h] BYREF
unsigned __int8 **v24; // [rsp+30h] [rbp-38h]
v7 = a3;
v21 = OpenSubdiv::v3_6_0::Tmr::NodeBase::catmarkIrregularPatchSize((**a1 >> 5) & 3);
if ( a5 )
{
fprintf(a2, "subgraph cluster_%d {\n", v7);
fprintf(a2, " label = \"Plan %d\"; style=filled; color=lightgrey;\n", v7);
}
else
{
fwrite("digraph {\n", 10LL, 1LL, a2);
}
v23 = 2;
v24 = a1;
v8 = v7 << 32;
v9 = 2;
v10 = a1;
v11 = 0;
while ( v10 && (v9 & 0x80000000) == 0 )
{
v12 = *(_DWORD *)&v10[8][4 * v9];
v13 = v9 | (unsigned long long)v8;
v14 = *(int *)&a1[8][4 * v9 + 4];
v15 = (v12 >> 3) & 0xF;
v22 = v11;
switch ( v12 & 3 )
{
case 0u:
fprintf(a2, " %zu [label=\"%d REG (%d)\\ntofs=%d fsup=%d", v9 | (unsigned long long)v8, v11, v15, v9, v14);
if ( a4 )
OpenSubdiv::v3_6_0::Tmr::printNodeIndices(a2, (long long)&a1[11][4 * v14], 0x10u);
v16 = "white";
if ( (v12 & 4) != 0 )
{
OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::Node::GetSharpness((OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::Node *)&v23);
a6 = *(float *)&a6;
fprintf(a2, "\\n\\nsharp=%f", a6);
v16 = "darksalmon";
}
fprintf(a2, "\", shape=box, style=filled, color=%s]\n", v16);
break;
case 1u:
fprintf(a2, " %zu [label=\"%d REC (%d)\\ntofs=%d fsup=%d", v9 | (unsigned long long)v8, v11, v15, v9, v14);
if ( !(a4 ^ 1 | ((v12 & 4) == 0)) )
OpenSubdiv::v3_6_0::Tmr::printNodeIndices(a2, (long long)&a1[11][4 * v14], v21);
fwrite("\", shape=square, style=filled, color=dodgerblue]\n", 49LL, 1LL, a2);
for ( i = 0; i != 4; ++i )
{
Child = OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::Node::GetChild(
(OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::Node *)&v23,
i);
fprintf(a2, " %zu -> %zu [label=\"%d\"]\n", v13, v8 + Child, i);
}
break;
case 2u:
fprintf(a2, " %zu [label=\"%d TRM (%d)\\ntofs=%d fsup=%d", v9 | (unsigned long long)v8, v11, v15, v9, v14);
if ( a4 )
{
OpenSubdiv::v3_6_0::Tmr::printNodeIndices(a2, (long long)&a1[11][4 * v14], 0x19u);
OpenSubdiv::v3_6_0::Tmr::printNodeIndices(a2, (long long)&a1[11][4 * v14 + 100], v21);
}
fwrite("\", shape=box, style=filled, color=grey]\n", 40LL, 1LL, a2);
fprintf(a2, " %zu -> %zu\n", v13, v8 + *(int *)&v24[8][4 * v23 + 8]);
break;
case 3u:
fprintf(a2, " %zu [label=\"%d END (%d)\\ntofs=%d fsup=%d", v9 | (unsigned long long)v8, v11, v15, v9, v14);
if ( a4 )
OpenSubdiv::v3_6_0::Tmr::printNodeIndices(a2, (long long)&a1[11][4 * v14], v21);
fwrite("\", shape=box, style=filled, color=darkorange]\n", 46LL, 1LL, a2);
break;
}
OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::Node::operator++(&v23);
v11 = v22 + 1;
v10 = v24;
v9 = v23;
}
return fwrite("}\n", 2LL, 1LL, a2);
}
|
WriteTreeDigraph:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV EBP,R8D
MOV dword ptr [RSP + 0x10],ECX
MOV R15D,EDX
MOV RBX,RSI
MOV qword ptr [RSP + 0x18],RDI
MOV RAX,qword ptr [RDI]
MOVZX EDI,byte ptr [RAX]
SHR EDI,0x5
AND EDI,0x3
CALL 0x00155720
MOV dword ptr [RSP + 0x14],EAX
TEST EBP,EBP
JZ 0x001b19c7
LEA RSI,[0x1ce7ba]
MOV RDI,RBX
MOV EDX,R15D
XOR EAX,EAX
CALL 0x00153f90
LEA RSI,[0x1ce7d1]
MOV RDI,RBX
MOV EDX,R15D
XOR EAX,EAX
CALL 0x00153f90
JMP 0x001b19dc
LAB_001b19c7:
LEA RDI,[0x1ce806]
PUSH 0xa
POP RSI
PUSH 0x1
POP RDX
MOV RCX,RBX
CALL 0x00155ce0
LAB_001b19dc:
LEA R13,[RSP + 0x28]
MOV dword ptr [R13],0x2
MOV RCX,qword ptr [RSP + 0x18]
MOV qword ptr [R13 + 0x8],RCX
SHL R15,0x20
PUSH 0x2
POP R9
MOV EAX,dword ptr [RSP + 0x10]
XOR AL,0x1
MOV byte ptr [RSP + 0xf],AL
MOV RAX,RCX
XOR R10D,R10D
LAB_001b1a0a:
TEST RAX,RAX
JZ 0x001b1c82
TEST R9D,R9D
JS 0x001b1c82
MOV ECX,R9D
MOV RAX,qword ptr [RAX + 0x40]
MOV R12D,dword ptr [RAX + RCX*0x4]
MOV R14,R15
OR R14,RCX
MOV RAX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RAX + 0x40]
MOVSXD RBP,dword ptr [RAX + RCX*0x4 + 0x4]
MOV R8D,R12D
SHR R8D,0x3
AND R8D,0xf
MOV EAX,R12D
AND EAX,0x3
LEA RCX,[0x1ce2f0]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
MOV dword ptr [RSP + 0x24],R10D
switchD:
JMP RAX
caseD_0:
MOV dword ptr [RSP],EBP
MOV RDI,RBX
LEA RSI,[0x1ce811]
MOV RDX,R14
MOV ECX,R10D
XOR EAX,EAX
CALL 0x00153f90
CMP byte ptr [RSP + 0x10],0x0
JZ 0x001b1a9d
SHL RBP,0x2
MOV RAX,qword ptr [RSP + 0x18]
ADD RBP,qword ptr [RAX + 0x58]
MOV RDI,RBX
MOV RSI,RBP
PUSH 0x10
POP RDX
CALL 0x00152fd0
LAB_001b1a9d:
LEA RDX,[0x1ce87b]
TEST R12B,0x4
JZ 0x001b1ace
MOV RDI,R13
CALL 0x00153740
CVTSS2SD XMM0,XMM0
MOV RDI,RBX
LEA RSI,[0x1ce83c]
MOV AL,0x1
CALL 0x00153f90
LEA RDX,[0x1ce870]
LAB_001b1ace:
MOV RDI,RBX
LEA RSI,[0x1ce849]
XOR EAX,EAX
CALL 0x00153f90
JMP 0x001b1bd2
caseD_2:
MOV dword ptr [RSP],EBP
MOV RDI,RBX
LEA RSI,[0x1ce953]
MOV RDX,R14
MOV ECX,R10D
XOR EAX,EAX
CALL 0x00153f90
CMP byte ptr [RSP + 0x10],0x0
JZ 0x001b1b3b
LEA RSI,[RBP*0x4]
MOV R12,qword ptr [RSP + 0x18]
ADD RSI,qword ptr [R12 + 0x58]
MOV RDI,RBX
PUSH 0x19
POP RDX
CALL 0x00152fd0
MOV RAX,qword ptr [R12 + 0x58]
LEA RSI,[RAX + RBP*0x4]
ADD RSI,0x64
MOV RDI,RBX
MOV EDX,dword ptr [RSP + 0x14]
CALL 0x00152fd0
LAB_001b1b3b:
LEA RDI,[0x1ce97e]
PUSH 0x28
POP RSI
PUSH 0x1
POP RDX
MOV RCX,RBX
CALL 0x00155ce0
MOV RAX,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RAX + 0x40]
MOV ECX,dword ptr [RSP + 0x28]
ADD ECX,0x2
MOVSXD RCX,ECX
MOVSXD RCX,dword ptr [RAX + RCX*0x4]
ADD RCX,R15
MOV RDI,RBX
LEA RSI,[0x1ce9a7]
MOV RDX,R14
XOR EAX,EAX
CALL 0x00153f90
JMP 0x001b1bd2
caseD_3:
MOV dword ptr [RSP],EBP
MOV RDI,RBX
LEA RSI,[0x1ce881]
MOV RDX,R14
MOV ECX,R10D
XOR EAX,EAX
CALL 0x00153f90
CMP byte ptr [RSP + 0x10],0x0
JZ 0x001b1bbd
SHL RBP,0x2
MOV RAX,qword ptr [RSP + 0x18]
ADD RBP,qword ptr [RAX + 0x58]
MOV RDI,RBX
MOV RSI,RBP
MOV EDX,dword ptr [RSP + 0x14]
CALL 0x00152fd0
LAB_001b1bbd:
LEA RDI,[0x1ce8ac]
PUSH 0x2e
POP RSI
PUSH 0x1
POP RDX
MOV RCX,RBX
CALL 0x00155ce0
LAB_001b1bd2:
MOV RDI,R13
CALL 0x00154740
MOV R10D,dword ptr [RSP + 0x24]
INC R10D
MOV RAX,qword ptr [RSP + 0x30]
MOV R9D,dword ptr [RSP + 0x28]
JMP 0x001b1a0a
caseD_1:
MOV dword ptr [RSP],EBP
MOV RDI,RBX
LEA RSI,[0x1ce8db]
MOV RDX,R14
MOV ECX,R10D
XOR EAX,EAX
CALL 0x00153f90
TEST R12B,0x4
SETZ AL
OR AL,byte ptr [RSP + 0xf]
JNZ 0x001b1c34
SHL RBP,0x2
MOV RAX,qword ptr [RSP + 0x18]
ADD RBP,qword ptr [RAX + 0x58]
MOV RDI,RBX
MOV RSI,RBP
MOV EDX,dword ptr [RSP + 0x14]
CALL 0x00152fd0
LAB_001b1c34:
LEA RDI,[0x1ce906]
PUSH 0x31
POP RSI
PUSH 0x1
POP RDX
MOV RCX,RBX
CALL 0x00155ce0
XOR EBP,EBP
LEA R12,[0x1ce938]
LAB_001b1c52:
CMP EBP,0x4
JZ 0x001b1bd2
MOV RDI,R13
MOV ESI,EBP
CALL 0x00151f20
MOVSXD RCX,EAX
ADD RCX,R15
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R14
MOV R8D,EBP
XOR EAX,EAX
CALL 0x00153f90
INC EBP
JMP 0x001b1c52
LAB_001b1c82:
LEA RDI,[0x1ce9b5]
PUSH 0x2
POP RSI
PUSH 0x1
POP RDX
MOV RCX,RBX
CALL 0x00155ce0
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::WriteTreeDigraph(_IO_FILE*, int, bool, bool) const */
void __thiscall
OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::WriteTreeDigraph
(SubdivisionPlan *this,_IO_FILE *param_1,int param_2,bool param_3,bool param_4)
{
int4 uVar1;
int iVar2;
char *pcVar3;
uint uVar4;
long lVar5;
int7 in_register_00000081;
ulong uVar6;
ulong uVar7;
uint uVar8;
ulong uVar9;
ulong uVar10;
float fVar11;
uint local_40 [2];
SubdivisionPlan *local_38;
uVar1 = NodeBase::catmarkIrregularPatchSize(**(byte **)this >> 5 & 3);
if ((int)CONCAT71(in_register_00000081,param_4) == 0) {
fwrite("digraph {\n",10,1,param_1);
}
else {
fprintf(param_1,"subgraph cluster_%d {\n",(ulong)(uint)param_2);
fprintf(param_1," label = \"Plan %d\"; style=filled; color=lightgrey;\n",(ulong)(uint)param_2);
}
local_40[0] = 2;
uVar10 = (ulong)(uint)param_2 << 0x20;
uVar8 = 0;
uVar7 = 2;
local_38 = this;
while ((local_38 != (SubdivisionPlan *)0x0 && (-1 < (int)uVar7))) {
uVar4 = *(uint *)(*(long *)(local_38 + 0x40) + uVar7 * 4);
uVar9 = uVar10 | uVar7;
iVar2 = *(int *)(*(long *)(this + 0x40) + 4 + uVar7 * 4);
lVar5 = (long)iVar2;
uVar6 = (ulong)(uVar4 >> 3 & 0xf);
switch(uVar4 & 3) {
case 0:
fprintf(param_1," %zu [label=\"%d REG (%d)\\ntofs=%d fsup=%d",uVar9,(ulong)uVar8,uVar6,uVar7,
iVar2);
if (param_3) {
printNodeIndices((Tmr *)param_1,lVar5 * 4 + *(long *)(this + 0x58),0x10);
}
pcVar3 = "white";
if ((uVar4 & 4) != 0) {
fVar11 = (float)Node::GetSharpness((Node *)local_40);
fprintf(param_1,"\\n\\nsharp=%f",(double)fVar11);
pcVar3 = "darksalmon";
}
fprintf(param_1,"\", shape=box, style=filled, color=%s]\n",pcVar3);
break;
case 1:
fprintf(param_1," %zu [label=\"%d REC (%d)\\ntofs=%d fsup=%d",uVar9,(ulong)uVar8,uVar6,uVar7,
iVar2);
if ((uVar4 & 4) != 0 && param_3) {
printNodeIndices((Tmr *)param_1,lVar5 * 4 + *(long *)(this + 0x58),uVar1);
}
fwrite("\", shape=square, style=filled, color=dodgerblue]\n",0x31,1,param_1);
for (uVar4 = 0; uVar4 != 4; uVar4 = uVar4 + 1) {
iVar2 = Node::GetChild((Node *)local_40,uVar4);
fprintf(param_1," %zu -> %zu [label=\"%d\"]\n",uVar9,(long)iVar2 + uVar10,(ulong)uVar4);
}
break;
case 2:
fprintf(param_1," %zu [label=\"%d TRM (%d)\\ntofs=%d fsup=%d",uVar9,(ulong)uVar8,uVar6,uVar7,
iVar2);
if (param_3) {
printNodeIndices((Tmr *)param_1,lVar5 * 4 + *(long *)(this + 0x58),0x19);
printNodeIndices((Tmr *)param_1,*(long *)(this + 0x58) + lVar5 * 4 + 100,uVar1);
}
fwrite("\", shape=box, style=filled, color=grey]\n",0x28,1,param_1);
fprintf(param_1," %zu -> %zu\n",uVar9,
(long)*(int *)(*(long *)(local_38 + 0x40) + (long)(int)(local_40[0] + 2) * 4) + uVar10
);
break;
case 3:
fprintf(param_1," %zu [label=\"%d END (%d)\\ntofs=%d fsup=%d",uVar9,(ulong)uVar8,uVar6,uVar7,
iVar2);
if (param_3) {
printNodeIndices((Tmr *)param_1,lVar5 * 4 + *(long *)(this + 0x58),uVar1);
}
fwrite("\", shape=box, style=filled, color=darkorange]\n",0x2e,1,param_1);
}
Node::operator++((Node *)local_40);
uVar8 = uVar8 + 1;
uVar7 = (ulong)local_40[0];
}
fwrite(&DAT_001ce9b5,2,1,param_1);
return;
}
|
|
20,146
|
OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::WriteTreeDigraph(_IO_FILE*, int, bool, bool) const
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/subdivisionPlan.cpp
|
void
SubdivisionPlan::WriteTreeDigraph(FILE* fout, int planIndex, bool showIndices, bool isSubgraph) const {
constexpr int const regularPatchSize = NodeBase::catmarkRegularPatchSize();
constexpr int const terminalPatchSize = NodeBase::catmarkTerminalPatchSize();
int const irregularPatchSize = NodeBase::catmarkIrregularPatchSize(getEndCapType());
auto hashNodeId = [&planIndex](Node const& n) -> uint64_t {
return (uint64_t(planIndex) << 32) + n.treeOffset;
};
if (isSubgraph) {
fprintf(fout, "subgraph cluster_%d {\n", planIndex);
fprintf(fout, " label = \"Plan %d\"; style=filled; color=lightgrey;\n", planIndex);
} else {
fprintf(fout, "digraph {\n");
}
int count = 0;
for (Node node = GetRootNode(); node.IsValid(); ++node, ++count) {
NodeDescriptor const& desc = node.GetDescriptor();
uint64_t nodeID = hashNodeId(node);
int treeOffset = node.treeOffset;
int patchPointsOffset = _tree[node.patchPointsOffset()];
switch (desc.GetType()) {
using enum NodeType;
case NODE_REGULAR: {
fprintf(fout, " %zu [label=\"%d REG (%d)\\ntofs=%d fsup=%d",
nodeID, count, desc.GetDepth(), treeOffset, patchPointsOffset);
if (showIndices)
printNodeIndices(fout, { &_patchPoints[patchPointsOffset], regularPatchSize});
if (desc.HasSharpness()) {
fprintf(fout, "\\n\\nsharp=%f", node.GetSharpness());
}
fprintf(fout, "\", shape=box, style=filled, color=%s]\n", desc.HasSharpness() ? "darksalmon" : "white");
} break;
case NODE_END: {
fprintf(fout, " %zu [label=\"%d END (%d)\\ntofs=%d fsup=%d",
nodeID, count, desc.GetDepth(), treeOffset, patchPointsOffset);
if (showIndices)
printNodeIndices(fout, { &_patchPoints[patchPointsOffset], irregularPatchSize });
fprintf(fout, "\", shape=box, style=filled, color=darkorange]\n");
} break;
case NODE_RECURSIVE: {
fprintf(fout, " %zu [label=\"%d REC (%d)\\ntofs=%d fsup=%d",
nodeID, count, desc.GetDepth(), treeOffset, patchPointsOffset);
if (showIndices && desc.HasEndcap())
printNodeIndices(fout, { &_patchPoints[patchPointsOffset], irregularPatchSize });
fprintf(fout, "\", shape=square, style=filled, color=dodgerblue]\n");
for (int i = 0; i < 4; ++i)
fprintf(fout, " %zu -> %zu [label=\"%d\"]\n", nodeID, hashNodeId(node.GetChild(i)), i);
} break;
case NODE_TERMINAL: {
fprintf(fout, " %zu [label=\"%d TRM (%d)\\ntofs=%d fsup=%d",
nodeID, count, desc.GetDepth(), treeOffset, patchPointsOffset);
if (showIndices) {
printNodeIndices(fout, { &_patchPoints[patchPointsOffset], terminalPatchSize} );
printNodeIndices(fout, { &_patchPoints[patchPointsOffset + terminalPatchSize], irregularPatchSize });
}
fprintf(fout, "\", shape=box, style=filled, color=grey]\n");
fprintf(fout, " %zu -> %zu\n", nodeID, hashNodeId(node.GetChild()));
} break;
default:
assert(0);
}
}
fprintf(fout, "}\n");
}
|
O3
|
cpp
|
OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::WriteTreeDigraph(_IO_FILE*, int, bool, bool) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %ecx, 0x14(%rsp)
movl %edx, %r12d
movq %rsi, %rbx
movq %rdi, %r15
movq (%rdi), %rax
movzbl (%rax), %eax
shrl $0x3, %eax
andl $0xc, %eax
leaq 0x1e222(%rip), %rcx # 0xc77f8
movl (%rax,%rcx), %eax
movl %eax, 0x18(%rsp)
testl %r8d, %r8d
je 0xa9641
leaq 0x1ddf5(%rip), %rsi # 0xc73de
xorl %ebp, %ebp
movq %rbx, %rdi
movl %r12d, %edx
xorl %eax, %eax
callq 0x3b0b0
leaq 0x1ddf6(%rip), %rsi # 0xc73f5
movq %rbx, %rdi
movl %r12d, %edx
xorl %eax, %eax
callq 0x3b0b0
shlq $0x20, %r12
movl $0x2, %eax
movl %eax, %r14d
movq 0x40(%r15), %rax
movl (%rax,%r14,4), %r8d
movq %r12, %rdx
orq %r14, %rdx
movslq 0x4(%rax,%r14,4), %r13
movl %r8d, %eax
andl $0x3, %eax
leaq 0x1d8e8(%rip), %rcx # 0xc6f20
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x1dde2(%rip), %rdi # 0xc742a
movl $0xa, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x3c320
shlq $0x20, %r12
movl $0x2, %eax
xorl %ebp, %ebp
movl %eax, %r14d
movq 0x40(%r15), %rax
movl (%rax,%r14,4), %r8d
movq %r12, %rdx
orq %r14, %rdx
movslq 0x4(%rax,%r14,4), %r13
movl %r8d, %eax
andl $0x3, %eax
leaq 0x1d898(%rip), %rcx # 0xc6f20
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
incl %ebp
movl %r14d, %r14d
movq 0x40(%r15), %rax
movl (%rax,%r14,4), %r8d
movq %r12, %rdx
orq %r14, %rdx
movslq 0x4(%rax,%r14,4), %r13
movl %r8d, %eax
andl $0x3, %eax
leaq 0x1d86a(%rip), %rcx # 0xc6f20
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %r12, 0x20(%rsp)
movl %ebp, %ecx
movl %r8d, %r12d
shrl $0x3, %r8d
andl $0xf, %r8d
movl %r13d, (%rsp)
leaq 0x1dd59(%rip), %rsi # 0xc7435
movq %rbx, %rdi
movl %r14d, %r9d
xorl %eax, %eax
callq 0x3b0b0
cmpb $0x0, 0x14(%rsp)
je 0xa9708
shlq $0x2, %r13
addq 0x58(%r15), %r13
movq %rbx, %rdi
movq %r13, %rsi
movl $0x10, %edx
callq 0x3a700
leaq 0x1dd90(%rip), %rdx # 0xc749f
testb $0x4, %r12b
movq 0x20(%rsp), %r12
je 0xa9750
movq 0x40(%r15), %rax
movl (%rax,%r14,4), %ecx
andl $0x7, %ecx
cmpl $0x4, %ecx
jne 0xa99fe
xorps %xmm0, %xmm0
cvtss2sd 0x8(%rax,%r14,4), %xmm0
leaq 0x1dd21(%rip), %rsi # 0xc7460
movq %rbx, %rdi
movb $0x1, %al
callq 0x3b0b0
leaq 0x1dd44(%rip), %rdx # 0xc7494
leaq 0x1dd16(%rip), %rsi # 0xc746d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3b0b0
movq 0x40(%r15), %rax
movl (%rax,%r14,4), %edx
movl $0x2, %ecx
movl %edx, %esi
andl $0x3, %esi
leaq 0x1d7b6(%rip), %rdi # 0xc6f30
movslq (%rdi,%rsi,4), %rsi
addq %rdi, %rsi
jmpq *%rsi
shrl $0x3, %r8d
andl $0xf, %r8d
movl %r13d, (%rsp)
leaq 0x1dd0f(%rip), %rsi # 0xc74a5
movq %rbx, %rdi
movl %ebp, %ecx
movl %r14d, %r9d
xorl %eax, %eax
callq 0x3b0b0
cmpb $0x0, 0x14(%rsp)
je 0xa97c3
shlq $0x2, %r13
addq 0x58(%r15), %r13
movq %rbx, %rdi
movq %r13, %rsi
movl 0x18(%rsp), %edx
callq 0x3a700
leaq 0x1dd06(%rip), %rdi # 0xc74d0
movl $0x2e, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x3c320
movq 0x40(%r15), %rax
movl (%rax,%r14,4), %edx
movl $0x2, %ecx
movl %edx, %esi
andl $0x3, %esi
leaq 0x1d73b(%rip), %rdi # 0xc6f30
movslq (%rdi,%rsi,4), %rsi
addq %rdi, %rsi
jmpq *%rsi
movq %r12, 0x20(%rsp)
movl %r8d, %r12d
shrl $0x3, %r8d
andl $0xf, %r8d
movl %r13d, (%rsp)
leaq 0x1dce6(%rip), %rsi # 0xc74ff
movq %rbx, %rdi
movq %rdx, 0x30(%rsp)
movl %ebp, 0x1c(%rsp)
movl %ebp, %ecx
movq %r14, 0x28(%rsp)
movl %r14d, %r9d
xorl %eax, %eax
callq 0x3b0b0
testb $0x4, %r12b
sete %al
movl 0x14(%rsp), %ecx
xorb $0x1, %cl
orb %al, %cl
jne 0xa985f
shlq $0x2, %r13
addq 0x58(%r15), %r13
movq %rbx, %rdi
movq %r13, %rsi
movl 0x18(%rsp), %edx
callq 0x3a700
leaq 0x1dcc4(%rip), %rdi # 0xc752a
movl $0x31, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x3c320
movq %r15, %r14
movq %rbx, %r15
movq 0x28(%rsp), %rax
leaq 0x2(%rax), %rbx
xorl %ebp, %ebp
movq 0x20(%rsp), %r12
movq 0x30(%rsp), %r13
movq 0x40(%r14), %rax
leal (%rbx,%rbp), %ecx
movslq %ecx, %rcx
movslq (%rax,%rcx,4), %rcx
addq %r12, %rcx
movq %r15, %rdi
leaq 0x1dcae(%rip), %rsi # 0xc755c
movq %r13, %rdx
movl %ebp, %r8d
xorl %eax, %eax
callq 0x3b0b0
incq %rbp
cmpq $0x4, %rbp
jne 0xa9893
movq %r15, %rbx
movq %r14, %r15
movl 0x1c(%rsp), %ebp
movq 0x28(%rsp), %r14
jmp 0xa9982
movl %ebp, %ecx
movq %r12, %rbp
shrl $0x3, %r8d
andl $0xf, %r8d
movl %r13d, (%rsp)
leaq 0x1dc87(%rip), %rsi # 0xc7577
movq %rbx, %rdi
movq %rdx, %r12
movl %ecx, 0x1c(%rsp)
movl %r14d, %r9d
xorl %eax, %eax
callq 0x3b0b0
cmpb $0x0, 0x14(%rsp)
je 0xa993c
leaq (,%r13,4), %rsi
addq 0x58(%r15), %rsi
movq %rbx, %rdi
movl $0x19, %edx
callq 0x3a700
movq 0x58(%r15), %rax
leaq (%rax,%r13,4), %rsi
addq $0x64, %rsi
movq %rbx, %rdi
movl 0x18(%rsp), %edx
callq 0x3a700
leaq 0x1dc5f(%rip), %rdi # 0xc75a2
movl $0x28, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x3c320
movq 0x40(%r15), %rax
leal 0x2(%r14), %ecx
movslq %ecx, %rcx
movslq (%rax,%rcx,4), %rcx
addq %rbp, %rcx
leaq 0x1dc5d(%rip), %rsi # 0xc75cb
movq %rbx, %rdi
movq %r12, %rdx
movq %rbp, %r12
xorl %eax, %eax
callq 0x3b0b0
movl 0x1c(%rsp), %ebp
movq 0x40(%r15), %rax
movl (%rax,%r14,4), %edx
movl $0x2, %ecx
movl %edx, %esi
andl $0x3, %esi
leaq 0x1d595(%rip), %rdi # 0xc6f30
movslq (%rdi,%rsi,4), %rsi
addq %rdi, %rsi
jmpq *%rsi
andl $0x4, %edx
cmpl $0x1, %edx
movl $0x3, %ecx
sbbl $0x0, %ecx
jmp 0xa99c0
movl $0x6, %ecx
jmp 0xa99c0
movl $0x3, %ecx
addl %ecx, %r14d
movq 0x48(%r15), %rcx
subq %rax, %rcx
shrq $0x2, %rcx
cmpl %ecx, %r14d
jl 0xa9691
leaq 0x1dbfb(%rip), %rdi # 0xc75d9
movl $0x2, %esi
movl $0x1, %edx
movq %rbx, %rcx
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3c320
leaq 0x1dbd7(%rip), %rdi # 0xc75dc
leaq 0x1dc24(%rip), %rsi # 0xc7630
leaq 0x1dc83(%rip), %rcx # 0xc7696
movl $0x187, %edx # imm = 0x187
callq 0x39540
nop
|
_ZNK10OpenSubdiv6v3_6_03Tmr15SubdivisionPlan16WriteTreeDigraphEP8_IO_FILEibb:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov [rsp+68h+var_54], ecx
mov r12d, edx
mov rbx, rsi
mov r15, rdi
mov rax, [rdi]
movzx eax, byte ptr [rax]
shr eax, 3
and eax, 0Ch
lea rcx, unk_C77F8
mov eax, [rax+rcx]
mov [rsp+68h+var_50], eax
test r8d, r8d
jz short loc_A9641
lea rsi, aSubgraphCluste; "subgraph cluster_%d {\n"
xor ebp, ebp
mov rdi, rbx
mov edx, r12d
xor eax, eax
call _fprintf
lea rsi, aLabelPlanDStyl; " label = \"Plan %d\"; style=filled; co"...
mov rdi, rbx
mov edx, r12d
xor eax, eax
call _fprintf
shl r12, 20h
mov eax, 2
mov r14d, eax
mov rax, [r15+40h]
mov r8d, [rax+r14*4]
mov rdx, r12
or rdx, r14
movsxd r13, dword ptr [rax+r14*4+4]
mov eax, r8d
and eax, 3
lea rcx, jpt_A963F
movsxd rax, ds:(jpt_A963F - 0C6F20h)[rcx+rax*4]; switch 4 cases
add rax, rcx
jmp rax; switch jump
loc_A9641:
lea rdi, aDigraph; "digraph {\n"
mov esi, 0Ah
mov edx, 1
mov rcx, rbx
call _fwrite
shl r12, 20h
mov eax, 2
xor ebp, ebp
mov r14d, eax
mov rax, [r15+40h]
mov r8d, [rax+r14*4]
mov rdx, r12
or rdx, r14
movsxd r13, dword ptr [rax+r14*4+4]
mov eax, r8d
and eax, 3
lea rcx, jpt_A963F
movsxd rax, ds:(jpt_A963F - 0C6F20h)[rcx+rax*4]; switch 4 cases
add rax, rcx
jmp rax; switch jump
loc_A9691:
inc ebp
mov r14d, r14d
mov rax, [r15+40h]
mov r8d, [rax+r14*4]
mov rdx, r12
or rdx, r14
movsxd r13, dword ptr [rax+r14*4+4]
mov eax, r8d
and eax, 3
lea rcx, jpt_A963F
movsxd rax, ds:(jpt_A963F - 0C6F20h)[rcx+rax*4]; switch 4 cases
add rax, rcx
jmp rax; switch jump
loc_A96BF:
mov [rsp+68h+var_48], r12; jumptable 00000000000A963F case 0
mov ecx, ebp
mov r12d, r8d
shr r8d, 3
and r8d, 0Fh
mov [rsp+68h+var_68], r13d
lea rsi, aZuLabelDRegDNt; " %zu [label=\"%d REG (%d)\\ntofs=%d fs"...
mov rdi, rbx
mov r9d, r14d
xor eax, eax
call _fprintf
cmp byte ptr [rsp+68h+var_54], 0
jz short loc_A9708
shl r13, 2
add r13, [r15+58h]
mov rdi, rbx
mov rsi, r13
mov edx, 10h
call __ZN10OpenSubdiv6v3_6_03Tmr16printNodeIndicesEP8_IO_FILENS0_3Vtr10ConstArrayIiEE; OpenSubdiv::v3_6_0::Tmr::printNodeIndices(_IO_FILE *,OpenSubdiv::v3_6_0::Vtr::ConstArray<int>)
loc_A9708:
lea rdx, aWhite; "white"
test r12b, 4
mov r12, [rsp+68h+var_48]
jz short loc_A9750
mov rax, [r15+40h]
mov ecx, [rax+r14*4]
and ecx, 7
cmp ecx, 4
jnz loc_A99FE
xorps xmm0, xmm0
cvtss2sd xmm0, dword ptr [rax+r14*4+8]
lea rsi, aNNsharpF; "\\n\\nsharp=%f"
mov rdi, rbx
mov al, 1
call _fprintf
lea rdx, aDarksalmon; "darksalmon"
loc_A9750:
lea rsi, aShapeBoxStyleF; "\", shape=box, style=filled, color=%s]"...
mov rdi, rbx
xor eax, eax
call _fprintf
mov rax, [r15+40h]
mov edx, [rax+r14*4]
mov ecx, 2
mov esi, edx
and esi, 3
lea rdi, jpt_A9781
movsxd rsi, ds:(jpt_A9781 - 0C6F30h)[rdi+rsi*4]; switch 4 cases
add rsi, rdi
jmp rsi; switch jump
loc_A9783:
shr r8d, 3; jumptable 00000000000A963F case 3
and r8d, 0Fh
mov [rsp+68h+var_68], r13d
lea rsi, aZuLabelDEndDNt; " %zu [label=\"%d END (%d)\\ntofs=%d fs"...
mov rdi, rbx
mov ecx, ebp
mov r9d, r14d
xor eax, eax
call _fprintf
cmp byte ptr [rsp+68h+var_54], 0
jz short loc_A97C3
shl r13, 2
add r13, [r15+58h]
mov rdi, rbx
mov rsi, r13
mov edx, [rsp+68h+var_50]
call __ZN10OpenSubdiv6v3_6_03Tmr16printNodeIndicesEP8_IO_FILENS0_3Vtr10ConstArrayIiEE; OpenSubdiv::v3_6_0::Tmr::printNodeIndices(_IO_FILE *,OpenSubdiv::v3_6_0::Vtr::ConstArray<int>)
loc_A97C3:
lea rdi, aShapeBoxStyleF_0; "\", shape=box, style=filled, color=dark"...
mov esi, 2Eh ; '.'
mov edx, 1
mov rcx, rbx
call _fwrite
mov rax, [r15+40h]
mov edx, [rax+r14*4]
mov ecx, 2
mov esi, edx
and esi, 3
lea rdi, jpt_A9781
movsxd rsi, ds:(jpt_A9781 - 0C6F30h)[rdi+rsi*4]; switch 4 cases
add rsi, rdi
jmp rsi; switch jump
loc_A97FE:
mov [rsp+68h+var_48], r12; jumptable 00000000000A963F case 1
mov r12d, r8d
shr r8d, 3
and r8d, 0Fh
mov [rsp+68h+var_68], r13d
lea rsi, aZuLabelDRecDNt; " %zu [label=\"%d REC (%d)\\ntofs=%d fs"...
mov rdi, rbx
mov [rsp+68h+var_38], rdx
mov [rsp+68h+var_4C], ebp
mov ecx, ebp
mov [rsp+68h+var_40], r14
mov r9d, r14d
xor eax, eax
call _fprintf
test r12b, 4
setz al
mov ecx, [rsp+68h+var_54]
xor cl, 1
or cl, al
jnz short loc_A985F
shl r13, 2
add r13, [r15+58h]
mov rdi, rbx
mov rsi, r13
mov edx, [rsp+68h+var_50]
call __ZN10OpenSubdiv6v3_6_03Tmr16printNodeIndicesEP8_IO_FILENS0_3Vtr10ConstArrayIiEE; OpenSubdiv::v3_6_0::Tmr::printNodeIndices(_IO_FILE *,OpenSubdiv::v3_6_0::Vtr::ConstArray<int>)
loc_A985F:
lea rdi, aShapeSquareSty; "\", shape=square, style=filled, color=d"...
mov esi, 31h ; '1'
mov edx, 1
mov rcx, rbx
call _fwrite
mov r14, r15
mov r15, rbx
mov rax, [rsp+68h+var_40]
lea rbx, [rax+2]
xor ebp, ebp
mov r12, [rsp+68h+var_48]
mov r13, [rsp+68h+var_38]
loc_A9893:
mov rax, [r14+40h]
lea ecx, [rbx+rbp]
movsxd rcx, ecx
movsxd rcx, dword ptr [rax+rcx*4]
add rcx, r12
mov rdi, r15
lea rsi, aZuZuLabelD; " %zu -> %zu [label=\"%d\"]\n"
mov rdx, r13
mov r8d, ebp
xor eax, eax
call _fprintf
inc rbp
cmp rbp, 4
jnz short loc_A9893
mov rbx, r15
mov r15, r14
mov ebp, [rsp+68h+var_4C]
mov r14, [rsp+68h+var_40]
jmp loc_A9982
loc_A98D8:
mov ecx, ebp; jumptable 00000000000A963F case 2
mov rbp, r12
shr r8d, 3
and r8d, 0Fh
mov [rsp+68h+var_68], r13d
lea rsi, aZuLabelDTrmDNt; " %zu [label=\"%d TRM (%d)\\ntofs=%d fs"...
mov rdi, rbx
mov r12, rdx
mov [rsp+68h+var_4C], ecx
mov r9d, r14d
xor eax, eax
call _fprintf
cmp byte ptr [rsp+68h+var_54], 0
jz short loc_A993C
lea rsi, ds:0[r13*4]
add rsi, [r15+58h]
mov rdi, rbx
mov edx, 19h
call __ZN10OpenSubdiv6v3_6_03Tmr16printNodeIndicesEP8_IO_FILENS0_3Vtr10ConstArrayIiEE; OpenSubdiv::v3_6_0::Tmr::printNodeIndices(_IO_FILE *,OpenSubdiv::v3_6_0::Vtr::ConstArray<int>)
mov rax, [r15+58h]
lea rsi, [rax+r13*4]
add rsi, 64h ; 'd'
mov rdi, rbx
mov edx, [rsp+68h+var_50]
call __ZN10OpenSubdiv6v3_6_03Tmr16printNodeIndicesEP8_IO_FILENS0_3Vtr10ConstArrayIiEE; OpenSubdiv::v3_6_0::Tmr::printNodeIndices(_IO_FILE *,OpenSubdiv::v3_6_0::Vtr::ConstArray<int>)
loc_A993C:
lea rdi, aShapeBoxStyleF_1; "\", shape=box, style=filled, color=grey"...
mov esi, 28h ; '('
mov edx, 1
mov rcx, rbx
call _fwrite
mov rax, [r15+40h]
lea ecx, [r14+2]
movsxd rcx, ecx
movsxd rcx, dword ptr [rax+rcx*4]
add rcx, rbp
lea rsi, aZuZu; " %zu -> %zu\n"
mov rdi, rbx
mov rdx, r12
mov r12, rbp
xor eax, eax
call _fprintf
mov ebp, [rsp+68h+var_4C]
loc_A9982:
mov rax, [r15+40h]
mov edx, [rax+r14*4]
mov ecx, 2
mov esi, edx
and esi, 3
lea rdi, jpt_A9781
movsxd rsi, ds:(jpt_A9781 - 0C6F30h)[rdi+rsi*4]; switch 4 cases
add rsi, rdi
jmp rsi; switch jump
loc_A99A4:
and edx, 4; jumptable 00000000000A9781 case 0
cmp edx, 1
mov ecx, 3
sbb ecx, 0
jmp short loc_A99C0; jumptable 00000000000A9781 case 3
loc_A99B4:
mov ecx, 6; jumptable 00000000000A9781 case 1
jmp short loc_A99C0; jumptable 00000000000A9781 case 3
loc_A99BB:
mov ecx, 3; jumptable 00000000000A9781 case 2
loc_A99C0:
add r14d, ecx; jumptable 00000000000A9781 case 3
mov rcx, [r15+48h]
sub rcx, rax
shr rcx, 2
cmp r14d, ecx
jl loc_A9691
lea rdi, asc_C75D9; "}\n"
mov esi, 2
mov edx, 1
mov rcx, rbx
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _fwrite
loc_A99FE:
lea rdi, aGetdescriptorG; "GetDescriptor().GetType()==NodeType::NO"...
lea rsi, aWorkspaceLlm4b_51; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aFloatOpensubdi_3; "float OpenSubdiv::v3_6_0::Tmr::Subdivis"...
mov edx, 187h
call ___assert_fail
|
long long OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::WriteTreeDigraph(
unsigned __int8 **a1,
long long a2,
unsigned int a3,
unsigned __int8 a4,
int a5)
{
long long v5; // r12
int v6; // ebp
long long v7; // r12
long long v8; // r14
unsigned __int8 *v9; // rax
unsigned int v10; // r8d
long long v11; // rdx
long long v12; // r13
unsigned __int8 *v13; // rax
unsigned __int8 *v14; // rax
char v15; // r12
const char *v16; // rdx
bool v17; // zf
unsigned __int8 *v18; // rax
unsigned __int8 *v19; // rax
int v20; // edx
int v21; // ecx
char v22; // r12
long long v23; // rbp
int v24; // ecx
long long v25; // rbp
long long v26; // r12
long long v27; // rdx
int v30; // [rsp+18h] [rbp-50h]
int v31; // [rsp+1Ch] [rbp-4Ch]
int v32; // [rsp+1Ch] [rbp-4Ch]
long long v33; // [rsp+20h] [rbp-48h]
long long v34; // [rsp+20h] [rbp-48h]
long long v35; // [rsp+30h] [rbp-38h]
v5 = a3;
v30 = *(_DWORD *)((char *)&unk_C77F8 + ((**a1 >> 3) & 0xC));
if ( a5 )
{
v6 = 0;
fprintf(a2, "subgraph cluster_%d {\n", a3);
fprintf(a2, " label = \"Plan %d\"; style=filled; color=lightgrey;\n", v5);
v7 = v5 << 32;
v8 = 2LL;
v9 = a1[8];
v10 = *((_DWORD *)v9 + 2);
v11 = v7 | 2;
v12 = *((int *)v9 + 3);
switch ( v10 & 3 )
{
case 0u:
goto LABEL_5;
case 1u:
goto LABEL_14;
case 2u:
goto LABEL_19;
case 3u:
goto LABEL_11;
}
}
fwrite("digraph {\n", 10LL, 1LL, a2);
v7 = v5 << 32;
v6 = 0;
v8 = 2LL;
v13 = a1[8];
v10 = *((_DWORD *)v13 + 2);
v11 = v7 | 2;
v12 = *((int *)v13 + 3);
switch ( v10 & 3 )
{
case 0u:
LABEL_5:
v33 = v7;
v15 = v10;
fprintf(a2, " %zu [label=\"%d REG (%d)\\ntofs=%d fsup=%d", v11, v6, (v10 >> 3) & 0xF, v8, v12);
if ( a4 )
OpenSubdiv::v3_6_0::Tmr::printNodeIndices(a2, (long long)&a1[11][4 * v12], 16);
v16 = "white";
v17 = (v15 & 4) == 0;
v7 = v33;
if ( !v17 )
{
v18 = a1[8];
if ( (*(_DWORD *)&v18[4 * v8] & 7) != 4 )
__assert_fail(
"GetDescriptor().GetType()==NodeType::NODE_REGULAR && GetDescriptor().HasSharpness()",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/../tmr/subdivisionPlan.h",
391LL,
"float OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::Node::GetSharpness() const");
fprintf(a2, "\\n\\nsharp=%f", *(float *)&v18[4 * v8 + 8]);
v16 = "darksalmon";
}
fprintf(a2, "\", shape=box, style=filled, color=%s]\n", v16);
v19 = a1[8];
v20 = *(_DWORD *)&v19[4 * v8];
v21 = 2;
switch ( v20 & 3 )
{
case 0:
LABEL_23:
v21 = ((v20 & 4 | 0x300000000uLL) - 1) >> 32;
break;
case 1:
LABEL_24:
v21 = 6;
break;
case 2:
LABEL_25:
v21 = 3;
break;
case 3:
goto LABEL_26;
}
break;
case 1u:
LABEL_14:
v34 = v7;
v22 = v10;
v35 = v11;
v31 = v6;
fprintf(a2, " %zu [label=\"%d REC (%d)\\ntofs=%d fsup=%d", v11, v6, (v10 >> 3) & 0xF, v8, v12);
if ( !(((v22 & 4) == 0) | a4 ^ 1) )
OpenSubdiv::v3_6_0::Tmr::printNodeIndices(a2, (long long)&a1[11][4 * v12], v30);
fwrite("\", shape=square, style=filled, color=dodgerblue]\n", 49LL, 1LL, a2);
v23 = 0LL;
v7 = v34;
do
{
fprintf(a2, " %zu -> %zu [label=\"%d\"]\n", v35, v34 + *(int *)&a1[8][4 * (int)v8 + 8 + 4 * (int)v23], v23);
++v23;
}
while ( v23 != 4 );
v6 = v31;
goto LABEL_22;
case 2u:
LABEL_19:
v24 = v6;
v25 = v7;
v26 = v11;
v32 = v24;
fprintf(a2, " %zu [label=\"%d TRM (%d)\\ntofs=%d fsup=%d", v11, v24, (v10 >> 3) & 0xF, v8, v12);
if ( a4 )
{
OpenSubdiv::v3_6_0::Tmr::printNodeIndices(a2, (long long)&a1[11][4 * v12], 25);
OpenSubdiv::v3_6_0::Tmr::printNodeIndices(a2, (long long)&a1[11][4 * v12 + 100], v30);
}
fwrite("\", shape=box, style=filled, color=grey]\n", 40LL, 1LL, a2);
v27 = v26;
v7 = v25;
fprintf(a2, " %zu -> %zu\n", v27, v25 + *(int *)&a1[8][4 * (int)v8 + 8]);
v6 = v32;
LABEL_22:
v19 = a1[8];
v20 = *(_DWORD *)&v19[4 * v8];
v21 = 2;
switch ( v20 & 3 )
{
case 0:
goto LABEL_23;
case 1:
goto LABEL_24;
case 2:
goto LABEL_25;
case 3:
goto LABEL_26;
}
case 3u:
LABEL_11:
fprintf(a2, " %zu [label=\"%d END (%d)\\ntofs=%d fsup=%d", v11, v6, (v10 >> 3) & 0xF, v8, v12);
if ( a4 )
OpenSubdiv::v3_6_0::Tmr::printNodeIndices(a2, (long long)&a1[11][4 * v12], v30);
fwrite("\", shape=box, style=filled, color=darkorange]\n", 46LL, 1LL, a2);
v19 = a1[8];
v20 = *(_DWORD *)&v19[4 * v8];
v21 = 2;
switch ( v20 & 3 )
{
case 0:
goto LABEL_23;
case 1:
goto LABEL_24;
case 2:
goto LABEL_25;
case 3:
goto LABEL_26;
}
}
LABEL_26:
LODWORD(v8) = v21 + v8;
if ( (int)v8 < (int)((unsigned long long)(a1[9] - v19) >> 2) )
{
++v6;
v8 = (unsigned int)v8;
v14 = a1[8];
v10 = *(_DWORD *)&v14[4 * (unsigned int)v8];
v11 = (unsigned int)v8 | (unsigned long long)v7;
v12 = *(int *)&v14[4 * (unsigned int)v8 + 4];
switch ( v10 & 3 )
{
case 0u:
goto LABEL_5;
case 1u:
goto LABEL_14;
case 2u:
goto LABEL_19;
case 3u:
goto LABEL_11;
}
}
return fwrite("}\n", 2LL, 1LL, a2);
}
|
WriteTreeDigraph:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV dword ptr [RSP + 0x14],ECX
MOV R12D,EDX
MOV RBX,RSI
MOV R15,RDI
MOV RAX,qword ptr [RDI]
MOVZX EAX,byte ptr [RAX]
SHR EAX,0x3
AND EAX,0xc
LEA RCX,[0x1c77f8]
MOV EAX,dword ptr [RAX + RCX*0x1]
MOV dword ptr [RSP + 0x18],EAX
TEST R8D,R8D
JZ 0x001a9641
LEA RSI,[0x1c73de]
XOR EBP,EBP
MOV RDI,RBX
MOV EDX,R12D
XOR EAX,EAX
CALL 0x0013b0b0
LEA RSI,[0x1c73f5]
MOV RDI,RBX
MOV EDX,R12D
XOR EAX,EAX
CALL 0x0013b0b0
SHL R12,0x20
MOV EAX,0x2
MOV R14D,EAX
MOV RAX,qword ptr [R15 + 0x40]
MOV R8D,dword ptr [RAX + R14*0x4]
MOV RDX,R12
OR RDX,R14
MOVSXD R13,dword ptr [RAX + R14*0x4 + 0x4]
MOV EAX,R8D
AND EAX,0x3
LEA RCX,[0x1c6f20]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
LAB_001a9641:
LEA RDI,[0x1c742a]
MOV ESI,0xa
MOV EDX,0x1
MOV RCX,RBX
CALL 0x0013c320
SHL R12,0x20
MOV EAX,0x2
XOR EBP,EBP
MOV R14D,EAX
MOV RAX,qword ptr [R15 + 0x40]
MOV R8D,dword ptr [RAX + R14*0x4]
MOV RDX,R12
OR RDX,R14
MOVSXD R13,dword ptr [RAX + R14*0x4 + 0x4]
MOV EAX,R8D
AND EAX,0x3
LEA RCX,[0x1c6f20]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
LAB_001a9691:
INC EBP
MOV R14D,R14D
MOV RAX,qword ptr [R15 + 0x40]
MOV R8D,dword ptr [RAX + R14*0x4]
MOV RDX,R12
OR RDX,R14
MOVSXD R13,dword ptr [RAX + R14*0x4 + 0x4]
MOV EAX,R8D
AND EAX,0x3
LEA RCX,[0x1c6f20]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_0:
MOV qword ptr [RSP + 0x20],R12
MOV ECX,EBP
MOV R12D,R8D
SHR R8D,0x3
AND R8D,0xf
MOV dword ptr [RSP],R13D
LEA RSI,[0x1c7435]
MOV RDI,RBX
MOV R9D,R14D
XOR EAX,EAX
CALL 0x0013b0b0
CMP byte ptr [RSP + 0x14],0x0
JZ 0x001a9708
SHL R13,0x2
ADD R13,qword ptr [R15 + 0x58]
MOV RDI,RBX
MOV RSI,R13
MOV EDX,0x10
CALL 0x0013a700
LAB_001a9708:
LEA RDX,[0x1c749f]
TEST R12B,0x4
MOV R12,qword ptr [RSP + 0x20]
JZ 0x001a9750
MOV RAX,qword ptr [R15 + 0x40]
MOV ECX,dword ptr [RAX + R14*0x4]
AND ECX,0x7
CMP ECX,0x4
JNZ 0x001a99fe
XORPS XMM0,XMM0
CVTSS2SD XMM0,dword ptr [RAX + R14*0x4 + 0x8]
LEA RSI,[0x1c7460]
MOV RDI,RBX
MOV AL,0x1
CALL 0x0013b0b0
LEA RDX,[0x1c7494]
LAB_001a9750:
LEA RSI,[0x1c746d]
MOV RDI,RBX
XOR EAX,EAX
CALL 0x0013b0b0
MOV RAX,qword ptr [R15 + 0x40]
MOV EDX,dword ptr [RAX + R14*0x4]
MOV ECX,0x2
MOV ESI,EDX
AND ESI,0x3
LEA RDI,[0x1c6f30]
MOVSXD RSI,dword ptr [RDI + RSI*0x4]
ADD RSI,RDI
switchD:
JMP RSI
caseD_3:
SHR R8D,0x3
AND R8D,0xf
MOV dword ptr [RSP],R13D
LEA RSI,[0x1c74a5]
MOV RDI,RBX
MOV ECX,EBP
MOV R9D,R14D
XOR EAX,EAX
CALL 0x0013b0b0
CMP byte ptr [RSP + 0x14],0x0
JZ 0x001a97c3
SHL R13,0x2
ADD R13,qword ptr [R15 + 0x58]
MOV RDI,RBX
MOV RSI,R13
MOV EDX,dword ptr [RSP + 0x18]
CALL 0x0013a700
LAB_001a97c3:
LEA RDI,[0x1c74d0]
MOV ESI,0x2e
MOV EDX,0x1
MOV RCX,RBX
CALL 0x0013c320
MOV RAX,qword ptr [R15 + 0x40]
MOV EDX,dword ptr [RAX + R14*0x4]
MOV ECX,0x2
MOV ESI,EDX
AND ESI,0x3
LEA RDI,[0x1c6f30]
MOVSXD RSI,dword ptr [RDI + RSI*0x4]
ADD RSI,RDI
switchD:
JMP RSI
caseD_1:
MOV qword ptr [RSP + 0x20],R12
MOV R12D,R8D
SHR R8D,0x3
AND R8D,0xf
MOV dword ptr [RSP],R13D
LEA RSI,[0x1c74ff]
MOV RDI,RBX
MOV qword ptr [RSP + 0x30],RDX
MOV dword ptr [RSP + 0x1c],EBP
MOV ECX,EBP
MOV qword ptr [RSP + 0x28],R14
MOV R9D,R14D
XOR EAX,EAX
CALL 0x0013b0b0
TEST R12B,0x4
SETZ AL
MOV ECX,dword ptr [RSP + 0x14]
XOR CL,0x1
OR CL,AL
JNZ 0x001a985f
SHL R13,0x2
ADD R13,qword ptr [R15 + 0x58]
MOV RDI,RBX
MOV RSI,R13
MOV EDX,dword ptr [RSP + 0x18]
CALL 0x0013a700
LAB_001a985f:
LEA RDI,[0x1c752a]
MOV ESI,0x31
MOV EDX,0x1
MOV RCX,RBX
CALL 0x0013c320
MOV R14,R15
MOV R15,RBX
MOV RAX,qword ptr [RSP + 0x28]
LEA RBX,[RAX + 0x2]
XOR EBP,EBP
MOV R12,qword ptr [RSP + 0x20]
MOV R13,qword ptr [RSP + 0x30]
LAB_001a9893:
MOV RAX,qword ptr [R14 + 0x40]
LEA ECX,[RBX + RBP*0x1]
MOVSXD RCX,ECX
MOVSXD RCX,dword ptr [RAX + RCX*0x4]
ADD RCX,R12
MOV RDI,R15
LEA RSI,[0x1c755c]
MOV RDX,R13
MOV R8D,EBP
XOR EAX,EAX
CALL 0x0013b0b0
INC RBP
CMP RBP,0x4
JNZ 0x001a9893
MOV RBX,R15
MOV R15,R14
MOV EBP,dword ptr [RSP + 0x1c]
MOV R14,qword ptr [RSP + 0x28]
JMP 0x001a9982
caseD_2:
MOV ECX,EBP
MOV RBP,R12
SHR R8D,0x3
AND R8D,0xf
MOV dword ptr [RSP],R13D
LEA RSI,[0x1c7577]
MOV RDI,RBX
MOV R12,RDX
MOV dword ptr [RSP + 0x1c],ECX
MOV R9D,R14D
XOR EAX,EAX
CALL 0x0013b0b0
CMP byte ptr [RSP + 0x14],0x0
JZ 0x001a993c
LEA RSI,[R13*0x4]
ADD RSI,qword ptr [R15 + 0x58]
MOV RDI,RBX
MOV EDX,0x19
CALL 0x0013a700
MOV RAX,qword ptr [R15 + 0x58]
LEA RSI,[RAX + R13*0x4]
ADD RSI,0x64
MOV RDI,RBX
MOV EDX,dword ptr [RSP + 0x18]
CALL 0x0013a700
LAB_001a993c:
LEA RDI,[0x1c75a2]
MOV ESI,0x28
MOV EDX,0x1
MOV RCX,RBX
CALL 0x0013c320
MOV RAX,qword ptr [R15 + 0x40]
LEA ECX,[R14 + 0x2]
MOVSXD RCX,ECX
MOVSXD RCX,dword ptr [RAX + RCX*0x4]
ADD RCX,RBP
LEA RSI,[0x1c75cb]
MOV RDI,RBX
MOV RDX,R12
MOV R12,RBP
XOR EAX,EAX
CALL 0x0013b0b0
MOV EBP,dword ptr [RSP + 0x1c]
LAB_001a9982:
MOV RAX,qword ptr [R15 + 0x40]
MOV EDX,dword ptr [RAX + R14*0x4]
MOV ECX,0x2
MOV ESI,EDX
AND ESI,0x3
LEA RDI,[0x1c6f30]
MOVSXD RSI,dword ptr [RDI + RSI*0x4]
ADD RSI,RDI
switchD:
JMP RSI
caseD_0:
AND EDX,0x4
CMP EDX,0x1
MOV ECX,0x3
SBB ECX,0x0
JMP 0x001a99c0
caseD_1:
MOV ECX,0x6
JMP 0x001a99c0
caseD_2:
MOV ECX,0x3
caseD_3:
ADD R14D,ECX
MOV RCX,qword ptr [R15 + 0x48]
SUB RCX,RAX
SHR RCX,0x2
CMP R14D,ECX
JL 0x001a9691
LEA RDI,[0x1c75d9]
MOV ESI,0x2
MOV EDX,0x1
MOV RCX,RBX
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0013c320
LAB_001a99fe:
LEA RDI,[0x1c75dc]
LEA RSI,[0x1c7630]
LEA RCX,[0x1c7696]
MOV EDX,0x187
CALL 0x00139540
|
/* OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::WriteTreeDigraph(_IO_FILE*, int, bool, bool) const */
void __thiscall
OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::WriteTreeDigraph
(SubdivisionPlan *this,_IO_FILE *param_1,int param_2,bool param_3,bool param_4)
{
int4 uVar1;
int iVar2;
ulong uVar3;
char *pcVar4;
ulong uVar5;
uint uVar6;
int7 in_register_00000081;
ulong uVar7;
long lVar8;
uint uVar9;
ulong uVar10;
uint local_4c;
uVar7 = (ulong)(uint)param_2;
uVar1 = *(int4 *)(&DAT_001c77f8 + (**(byte **)this >> 3 & 0xc));
if ((int)CONCAT71(in_register_00000081,param_4) == 0) {
fwrite("digraph {\n",10,1,param_1);
local_4c = 0;
uVar10 = 2;
uVar6 = *(uint *)(*(long *)(this + 0x40) + 8);
uVar3 = uVar7 << 0x20 | 2;
lVar8 = (long)*(int *)(*(long *)(this + 0x40) + 0xc);
switch(uVar6 & 3) {
case 1:
goto switchD_001a963f_caseD_1;
case 2:
goto switchD_001a963f_caseD_2;
case 3:
goto switchD_001a963f_caseD_3;
}
}
else {
local_4c = 0;
fprintf(param_1,"subgraph cluster_%d {\n",uVar7);
fprintf(param_1," label = \"Plan %d\"; style=filled; color=lightgrey;\n",(ulong)(uint)param_2);
uVar10 = 2;
uVar6 = *(uint *)(*(long *)(this + 0x40) + 8);
uVar3 = uVar7 << 0x20 | 2;
lVar8 = (long)*(int *)(*(long *)(this + 0x40) + 0xc);
switch(uVar6 & 3) {
case 1:
goto switchD_001a963f_caseD_1;
case 2:
goto switchD_001a963f_caseD_2;
case 3:
goto switchD_001a963f_caseD_3;
}
}
switchD_001a963f_caseD_0:
fprintf(param_1," %zu [label=\"%d REG (%d)\\ntofs=%d fsup=%d",uVar3,(ulong)local_4c,
(ulong)(uVar6 >> 3 & 0xf),uVar10,(int)lVar8);
if (param_3) {
printNodeIndices((Tmr *)param_1,lVar8 * 4 + *(long *)(this + 0x58),0x10);
}
pcVar4 = "white";
if ((uVar6 & 4) != 0) {
if ((*(uint *)(*(long *)(this + 0x40) + uVar10 * 4) & 7) != 4) {
/* WARNING: Subroutine does not return */
__assert_fail("GetDescriptor().GetType()==NodeType::NODE_REGULAR && GetDescriptor().HasSharpness()"
,
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/../tmr/subdivisionPlan.h"
,0x187,
"float OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::Node::GetSharpness() const");
}
fprintf(param_1,"\\n\\nsharp=%f",(double)*(float *)(*(long *)(this + 0x40) + 8 + uVar10 * 4),
"white");
pcVar4 = "darksalmon";
}
fprintf(param_1,"\", shape=box, style=filled, color=%s]\n",pcVar4);
lVar8 = *(long *)(this + 0x40);
uVar6 = *(uint *)(lVar8 + uVar10 * 4);
iVar2 = 2;
switch(uVar6 & 3) {
case 1:
goto switchD_001a97fc_caseD_1;
case 2:
goto switchD_001a97fc_caseD_2;
case 3:
goto switchD_001a97fc_caseD_3;
}
switchD_001a97fc_caseD_0:
iVar2 = 3 - (uint)((uVar6 & 4) == 0);
goto switchD_001a97fc_caseD_3;
LAB_001a97c3:
fwrite("\", shape=box, style=filled, color=darkorange]\n",0x2e,1,param_1);
lVar8 = *(long *)(this + 0x40);
uVar6 = *(uint *)(lVar8 + uVar10 * 4);
iVar2 = 2;
switch(uVar6 & 3) {
case 1:
switchD_001a97fc_caseD_1:
iVar2 = 6;
case 3:
switchD_001a97fc_caseD_3:
do {
uVar9 = (int)uVar10 + iVar2;
uVar10 = (ulong)uVar9;
if ((int)((ulong)(*(long *)(this + 0x48) - lVar8) >> 2) <= (int)uVar9) {
fwrite(&DAT_001c75d9,2,1,param_1);
return;
}
local_4c = local_4c + 1;
uVar6 = *(uint *)(*(long *)(this + 0x40) + uVar10 * 4);
uVar3 = CONCAT44(param_2,uVar9);
lVar8 = (long)*(int *)(*(long *)(this + 0x40) + 4 + uVar10 * 4);
switch(uVar6 & 3) {
case 0:
goto switchD_001a963f_caseD_0;
case 1:
switchD_001a963f_caseD_1:
fprintf(param_1," %zu [label=\"%d REC (%d)\\ntofs=%d fsup=%d",uVar3,(ulong)local_4c,
(ulong)(uVar6 >> 3 & 0xf),uVar10,(int)lVar8);
if (param_3 && (uVar6 & 4) != 0) {
printNodeIndices((Tmr *)param_1,lVar8 * 4 + *(long *)(this + 0x58),uVar1);
}
fwrite("\", shape=square, style=filled, color=dodgerblue]\n",0x31,1,param_1);
uVar5 = 0;
do {
fprintf(param_1," %zu -> %zu [label=\"%d\"]\n",uVar3,
(long)*(int *)(*(long *)(this + 0x40) + (long)((int)uVar10 + 2 + (int)uVar5) * 4)
+ (uVar7 << 0x20),uVar5 & 0xffffffff);
uVar5 = uVar5 + 1;
} while (uVar5 != 4);
break;
case 2:
switchD_001a963f_caseD_2:
fprintf(param_1," %zu [label=\"%d TRM (%d)\\ntofs=%d fsup=%d",uVar3,(ulong)local_4c,
(ulong)(uVar6 >> 3 & 0xf),uVar10,(int)lVar8);
if (param_3) {
printNodeIndices((Tmr *)param_1,lVar8 * 4 + *(long *)(this + 0x58),0x19);
printNodeIndices((Tmr *)param_1,*(long *)(this + 0x58) + lVar8 * 4 + 100,uVar1);
}
fwrite("\", shape=box, style=filled, color=grey]\n",0x28,1,param_1);
fprintf(param_1," %zu -> %zu\n",uVar3,
(long)*(int *)(*(long *)(this + 0x40) + (long)((int)uVar10 + 2) * 4) +
(uVar7 << 0x20));
break;
case 3:
switchD_001a963f_caseD_3:
fprintf(param_1," %zu [label=\"%d END (%d)\\ntofs=%d fsup=%d",uVar3,(ulong)local_4c,
(ulong)(uVar6 >> 3 & 0xf),uVar10,(int)lVar8);
if (param_3) {
printNodeIndices((Tmr *)param_1,lVar8 * 4 + *(long *)(this + 0x58),uVar1);
}
goto LAB_001a97c3;
}
lVar8 = *(long *)(this + 0x40);
uVar6 = *(uint *)(lVar8 + uVar10 * 4);
iVar2 = 2;
switch(uVar6 & 3) {
case 0:
goto switchD_001a97fc_caseD_0;
case 1:
goto switchD_001a97fc_caseD_1;
case 2:
goto switchD_001a97fc_caseD_2;
}
} while( true );
case 2:
switchD_001a97fc_caseD_2:
iVar2 = 3;
goto switchD_001a97fc_caseD_3;
}
goto switchD_001a97fc_caseD_0;
}
|
|
20,147
|
psi_cond_wait
|
eloqsql/mysys/my_thr_init.c
|
ATTRIBUTE_COLD int psi_cond_wait(mysql_cond_t *that, mysql_mutex_t *mutex,
const char *file, uint line)
{
PSI_cond_locker_state state;
PSI_cond_locker *locker= PSI_COND_CALL(start_cond_wait)
(&state, that->m_psi, mutex->m_psi, PSI_COND_WAIT, file, line);
int result= my_cond_wait(&that->m_cond, &mutex->m_mutex);
if (locker)
PSI_COND_CALL(end_cond_wait)(locker, result);
return result;
}
|
O0
|
c
|
psi_cond_wait:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
leaq 0x1c7ab2(%rip), %rax # 0x289300
movq (%rax), %rax
movq 0x1c0(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x30(%rcx), %rsi
movq -0x10(%rbp), %rcx
movq 0x40(%rcx), %rdx
movq -0x18(%rbp), %r8
movl -0x1c(%rbp), %r9d
leaq -0x58(%rbp), %rdi
xorl %ecx, %ecx
callq *%rax
movq %rax, -0x60(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x27490
movl %eax, -0x64(%rbp)
cmpq $0x0, -0x60(%rbp)
je 0xc18ad
leaq 0x1c7a66(%rip), %rax # 0x289300
movq (%rax), %rax
movq 0x1c8(%rax), %rax
movq -0x60(%rbp), %rdi
movl -0x64(%rbp), %esi
callq *%rax
movl -0x64(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
psi_cond_wait:
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_1C], ecx
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+1C0h]
mov rcx, [rbp+var_8]
mov rsi, [rcx+30h]
mov rcx, [rbp+var_10]
mov rdx, [rcx+40h]
mov r8, [rbp+var_18]
mov r9d, [rbp+var_1C]
lea rdi, [rbp+var_58]
xor ecx, ecx
call rax
mov [rbp+var_60], rax
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
call _pthread_cond_wait
mov [rbp+var_64], eax
cmp [rbp+var_60], 0
jz short loc_C18AD
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+1C8h]
mov rdi, [rbp+var_60]
mov esi, [rbp+var_64]
call rax
loc_C18AD:
mov eax, [rbp+var_64]
add rsp, 70h
pop rbp
retn
|
long long psi_cond_wait(long long a1, long long a2, long long a3, unsigned int a4)
{
unsigned int v5; // [rsp+Ch] [rbp-64h]
long long v6; // [rsp+10h] [rbp-60h]
_BYTE v7[60]; // [rsp+18h] [rbp-58h] BYREF
unsigned int v8; // [rsp+54h] [rbp-1Ch]
long long v9; // [rsp+58h] [rbp-18h]
long long v10; // [rsp+60h] [rbp-10h]
long long v11; // [rsp+68h] [rbp-8h]
v11 = a1;
v10 = a2;
v9 = a3;
v8 = a4;
v6 = ((long long ( *)(_BYTE *, _QWORD, _QWORD, _QWORD, long long, _QWORD))PSI_server[56])(
v7,
*(_QWORD *)(a1 + 48),
*(_QWORD *)(a2 + 64),
0LL,
a3,
a4);
v5 = pthread_cond_wait(v11, v10);
if ( v6 )
((void ( *)(long long, _QWORD))PSI_server[57])(v6, v5);
return v5;
}
|
psi_cond_wait:
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 dword ptr [RBP + -0x1c],ECX
LEA RAX,[0x389300]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x1c0]
MOV RCX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RCX + 0x30]
MOV RCX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RCX + 0x40]
MOV R8,qword ptr [RBP + -0x18]
MOV R9D,dword ptr [RBP + -0x1c]
LEA RDI,[RBP + -0x58]
XOR ECX,ECX
CALL RAX
MOV qword ptr [RBP + -0x60],RAX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x00127490
MOV dword ptr [RBP + -0x64],EAX
CMP qword ptr [RBP + -0x60],0x0
JZ 0x001c18ad
LEA RAX,[0x389300]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x1c8]
MOV RDI,qword ptr [RBP + -0x60]
MOV ESI,dword ptr [RBP + -0x64]
CALL RAX
LAB_001c18ad:
MOV EAX,dword ptr [RBP + -0x64]
ADD RSP,0x70
POP RBP
RET
|
int psi_cond_wait(pthread_cond_t *param_1,pthread_mutex_t *param_2,int8 param_3,
int4 param_4)
{
int iVar1;
long lVar2;
int1 local_60 [60];
int4 local_24;
int8 local_20;
pthread_mutex_t *local_18;
pthread_cond_t *local_10;
local_24 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
lVar2 = (**(code **)(PSI_server + 0x1c0))
(local_60,param_1[1].__align,*(int8 *)((long)param_2 + 0x40),0,param_3,
param_4);
iVar1 = pthread_cond_wait(local_10,local_18);
if (lVar2 != 0) {
(**(code **)(PSI_server + 0x1c8))(lVar2,iVar1);
}
return iVar1;
}
|
|
20,148
|
write_hook_for_undo_key_delete
|
eloqsql/storage/maria/ma_key_recover.c
|
my_bool write_hook_for_undo_key_delete(enum translog_record_type type,
TRN *trn, MARIA_HA *tbl_info,
LSN *lsn, void *hook_arg)
{
struct st_msg_to_write_hook_for_undo_key *msg=
(struct st_msg_to_write_hook_for_undo_key *) hook_arg;
MARIA_SHARE *share= tbl_info->s;
if (msg->auto_increment > 0) /* If auto increment key */
{
/* Restore auto increment if no one has changed it in between */
if (share->last_auto_increment == tbl_info->last_auto_increment &&
tbl_info->last_auto_increment != ~(ulonglong) 0)
share->state.auto_increment= tbl_info->last_auto_increment;
}
return write_hook_for_undo_key(type, trn, tbl_info, lsn, hook_arg);
}
|
O0
|
c
|
write_hook_for_undo_key_delete:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jbe 0x700d7
movq -0x38(%rbp), %rax
movq 0x610(%rax), %rax
movq -0x18(%rbp), %rcx
cmpq 0x3e8(%rcx), %rax
jne 0x700d5
movq -0x18(%rbp), %rax
cmpq $-0x1, 0x3e8(%rax)
je 0x700d5
movq -0x18(%rbp), %rax
movq 0x3e8(%rax), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0xd8(%rax)
jmp 0x700d7
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
callq 0x6ff00
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
write_hook_for_undo_key_delete:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov rax, [rbp+var_28]
mov [rbp+var_30], rax
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rbp+var_38], rax
mov rax, [rbp+var_30]
cmp qword ptr [rax+18h], 0
jbe short loc_700D7
mov rax, [rbp+var_38]
mov rax, [rax+610h]
mov rcx, [rbp+var_18]
cmp rax, [rcx+3E8h]
jnz short loc_700D5
mov rax, [rbp+var_18]
cmp qword ptr [rax+3E8h], 0FFFFFFFFFFFFFFFFh
jz short loc_700D5
mov rax, [rbp+var_18]
mov rcx, [rax+3E8h]
mov rax, [rbp+var_38]
mov [rax+0D8h], rcx
loc_700D5:
jmp short $+2
loc_700D7:
mov edi, [rbp+var_4]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_20]
mov r8, [rbp+var_28]
call write_hook_for_undo_key
add rsp, 40h
pop rbp
retn
|
long long write_hook_for_undo_key_delete(unsigned int a1, long long a2, long long *a3, long long a4, long long a5)
{
long long v6; // [rsp+8h] [rbp-38h]
v6 = *a3;
if ( *(_QWORD *)(a5 + 24) && *(_QWORD *)(v6 + 1552) == a3[125] && a3[125] != -1 )
*(_QWORD *)(v6 + 216) = a3[125];
return write_hook_for_undo_key(a1, a2, (long long)a3, a4, a5);
}
|
write_hook_for_undo_key_delete:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV dword ptr [RBP + -0x4],EDI
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 + -0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x30]
CMP qword ptr [RAX + 0x18],0x0
JBE 0x001700d7
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x610]
MOV RCX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RCX + 0x3e8]
JNZ 0x001700d5
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x3e8],-0x1
JZ 0x001700d5
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RAX + 0x3e8]
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0xd8],RCX
LAB_001700d5:
JMP 0x001700d7
LAB_001700d7:
MOV EDI,dword ptr [RBP + -0x4]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x20]
MOV R8,qword ptr [RBP + -0x28]
CALL 0x0016ff00
ADD RSP,0x40
POP RBP
RET
|
void write_hook_for_undo_key_delete
(int4 param_1,int8 param_2,long *param_3,int8 param_4,long param_5)
{
if (((*(long *)(param_5 + 0x18) != 0) && (*(long *)(*param_3 + 0x610) == param_3[0x7d])) &&
(param_3[0x7d] != -1)) {
*(long *)(*param_3 + 0xd8) = param_3[0x7d];
}
write_hook_for_undo_key(param_1,param_2,param_3,param_4,param_5);
return;
}
|
|
20,149
|
ggml_get_rows_back
|
ngxson[P]ggml-easy/ggml/src/ggml.c
|
struct ggml_tensor * ggml_get_rows_back(
struct ggml_context * ctx,
struct ggml_tensor * a,
struct ggml_tensor * b,
struct ggml_tensor * c) {
GGML_ASSERT(ggml_is_matrix(a) && ggml_is_vector(b) && b->type == GGML_TYPE_I32);
GGML_ASSERT(ggml_is_matrix(c) && (a->ne[0] == c->ne[0]));
// TODO: implement non F32 return
//struct ggml_tensor * result = ggml_new_tensor_2d(ctx, a->type, a->ne[0], b->ne[0]);
struct ggml_tensor * result = ggml_new_tensor_2d(ctx, GGML_TYPE_F32, c->ne[0], c->ne[1]);
result->op = GGML_OP_GET_ROWS_BACK;
result->src[0] = a;
result->src[1] = b;
return result;
}
|
O0
|
c
|
ggml_get_rows_back:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movq %rcx, 0x8(%rsp)
movq 0x18(%rsp), %rdi
callq 0x43a50
testb $0x1, %al
jne 0x4e938
jmp 0x4e952
movq 0x10(%rsp), %rdi
callq 0x46140
testb $0x1, %al
jne 0x4e948
jmp 0x4e952
movq 0x10(%rsp), %rax
cmpl $0x1a, (%rax)
je 0x4e973
leaq 0x65c5e(%rip), %rdi # 0xb45b7
movl $0xd18, %esi # imm = 0xD18
leaq 0x65c9d(%rip), %rdx # 0xb4602
leaq 0x661ac(%rip), %rcx # 0xb4b18
movb $0x0, %al
callq 0x46780
movq 0x8(%rsp), %rdi
callq 0x43a50
testb $0x1, %al
jne 0x4e983
jmp 0x4e997
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rsp), %rcx
cmpq 0x10(%rcx), %rax
je 0x4e9b8
leaq 0x65c19(%rip), %rdi # 0xb45b7
movl $0xd19, %esi # imm = 0xD19
leaq 0x65c58(%rip), %rdx # 0xb4602
leaq 0x661aa(%rip), %rcx # 0xb4b5b
movb $0x0, %al
callq 0x46780
movq 0x20(%rsp), %rdi
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rdx
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rcx
xorl %esi, %esi
callq 0x44fe0
movq %rax, (%rsp)
movq (%rsp), %rax
movl $0x27, 0x50(%rax)
movq 0x18(%rsp), %rcx
movq (%rsp), %rax
movq %rcx, 0x98(%rax)
movq 0x10(%rsp), %rcx
movq (%rsp), %rax
movq %rcx, 0xa0(%rax)
movq (%rsp), %rax
addq $0x28, %rsp
retq
nop
|
ggml_get_rows_back:
sub rsp, 28h
mov [rsp+28h+var_8], rdi
mov [rsp+28h+var_10], rsi
mov [rsp+28h+var_18], rdx
mov [rsp+28h+var_20], rcx
mov rdi, [rsp+28h+var_10]
call _ggml_is_matrix
test al, 1
jnz short loc_4E938
jmp short loc_4E952
loc_4E938:
mov rdi, [rsp+28h+var_18]
call _ggml_is_vector
test al, 1
jnz short loc_4E948
jmp short loc_4E952
loc_4E948:
mov rax, [rsp+28h+var_18]
cmp dword ptr [rax], 1Ah
jz short loc_4E973
loc_4E952:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov esi, 0D18h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlIsMatrixAG; "ggml_is_matrix(a) && ggml_is_vector(b) "...
mov al, 0
call _ggml_abort
loc_4E973:
mov rdi, [rsp+28h+var_20]
call _ggml_is_matrix
test al, 1
jnz short loc_4E983
jmp short loc_4E997
loc_4E983:
mov rax, [rsp+28h+var_10]
mov rax, [rax+10h]
mov rcx, [rsp+28h+var_20]
cmp rax, [rcx+10h]
jz short loc_4E9B8
loc_4E997:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov esi, 0D19h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlIsMatrixCA; "ggml_is_matrix(c) && (a->ne[0] == c->ne"...
mov al, 0
call _ggml_abort
loc_4E9B8:
mov rdi, [rsp+28h+var_8]
mov rax, [rsp+28h+var_20]
mov rdx, [rax+10h]
mov rax, [rsp+28h+var_20]
mov rcx, [rax+18h]
xor esi, esi
call _ggml_new_tensor_2d
mov [rsp+28h+var_28], rax
mov rax, [rsp+28h+var_28]
mov dword ptr [rax+50h], 27h ; '''
mov rcx, [rsp+28h+var_10]
mov rax, [rsp+28h+var_28]
mov [rax+98h], rcx
mov rcx, [rsp+28h+var_18]
mov rax, [rsp+28h+var_28]
mov [rax+0A0h], rcx
mov rax, [rsp+28h+var_28]
add rsp, 28h
retn
|
long long ggml_get_rows_back(long long a1, long long a2, _QWORD *a3, long long a4)
{
long long result; // rax
if ( !ggml_is_matrix(a2) || !ggml_is_vector(a3) || *(_DWORD *)a3 != 26 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",
3352,
(long long)"GGML_ASSERT(%s) failed",
"ggml_is_matrix(a) && ggml_is_vector(b) && b->type == GGML_TYPE_I32");
if ( !ggml_is_matrix(a4) || *(_QWORD *)(a2 + 16) != *(_QWORD *)(a4 + 16) )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",
3353,
(long long)"GGML_ASSERT(%s) failed",
"ggml_is_matrix(c) && (a->ne[0] == c->ne[0])");
result = ggml_new_tensor_2d(a1, 0, *(_QWORD *)(a4 + 16), *(_QWORD *)(a4 + 24));
*(_DWORD *)(result + 80) = 39;
*(_QWORD *)(result + 152) = a2;
*(_QWORD *)(result + 160) = a3;
return result;
}
|
ggml_get_rows_back:
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],RDI
MOV qword ptr [RSP + 0x18],RSI
MOV qword ptr [RSP + 0x10],RDX
MOV qword ptr [RSP + 0x8],RCX
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00143a50
TEST AL,0x1
JNZ 0x0014e938
JMP 0x0014e952
LAB_0014e938:
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x00146140
TEST AL,0x1
JNZ 0x0014e948
JMP 0x0014e952
LAB_0014e948:
MOV RAX,qword ptr [RSP + 0x10]
CMP dword ptr [RAX],0x1a
JZ 0x0014e973
LAB_0014e952:
LEA RDI,[0x1b45b7]
MOV ESI,0xd18
LEA RDX,[0x1b4602]
LEA RCX,[0x1b4b18]
MOV AL,0x0
CALL 0x00146780
LAB_0014e973:
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x00143a50
TEST AL,0x1
JNZ 0x0014e983
JMP 0x0014e997
LAB_0014e983:
MOV RAX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RSP + 0x8]
CMP RAX,qword ptr [RCX + 0x10]
JZ 0x0014e9b8
LAB_0014e997:
LEA RDI,[0x1b45b7]
MOV ESI,0xd19
LEA RDX,[0x1b4602]
LEA RCX,[0x1b4b5b]
MOV AL,0x0
CALL 0x00146780
LAB_0014e9b8:
MOV RDI,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RAX + 0x18]
XOR ESI,ESI
CALL 0x00144fe0
MOV qword ptr [RSP],RAX
MOV RAX,qword ptr [RSP]
MOV dword ptr [RAX + 0x50],0x27
MOV RCX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RSP]
MOV qword ptr [RAX + 0x98],RCX
MOV RCX,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP]
MOV qword ptr [RAX + 0xa0],RCX
MOV RAX,qword ptr [RSP]
ADD RSP,0x28
RET
|
long ggml_get_rows_back(int8 param_1,long param_2,int *param_3,long param_4)
{
ulong uVar1;
long lVar2;
uVar1 = ggml_is_matrix(param_2);
if ((((uVar1 & 1) == 0) || (uVar1 = ggml_is_vector(param_3), (uVar1 & 1) == 0)) ||
(*param_3 != 0x1a)) {
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",0xd18,
"GGML_ASSERT(%s) failed",
"ggml_is_matrix(a) && ggml_is_vector(b) && b->type == GGML_TYPE_I32");
}
uVar1 = ggml_is_matrix(param_4);
if (((uVar1 & 1) == 0) || (*(long *)(param_2 + 0x10) != *(long *)(param_4 + 0x10))) {
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",0xd19,
"GGML_ASSERT(%s) failed","ggml_is_matrix(c) && (a->ne[0] == c->ne[0])");
}
lVar2 = ggml_new_tensor_2d(param_1,0,*(int8 *)(param_4 + 0x10),
*(int8 *)(param_4 + 0x18));
*(int4 *)(lVar2 + 0x50) = 0x27;
*(long *)(lVar2 + 0x98) = param_2;
*(int **)(lVar2 + 0xa0) = param_3;
return lVar2;
}
|
|
20,150
|
my_numchars_utf16
|
eloqsql/strings/ctype-ucs2.c
|
static size_t
my_numchars_utf16(CHARSET_INFO *cs,
const char *b, const char *e)
{
size_t nchars= 0;
for ( ; ; nchars++)
{
size_t charlen= my_ismbchar(cs, b, e);
if (!charlen)
break;
b+= charlen;
}
return nchars;
}
|
O3
|
c
|
my_numchars_utf16:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0xb8(%rdi), %rax
callq *0xc0(%rax)
xorl %r12d, %r12d
cmpl $0x2, %eax
jl 0x49c1e
movl %eax, %eax
addq %rax, %r14
incq %r12
movq 0xb8(%r15), %rax
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq *0xc0(%rax)
cmpl $0x1, %eax
jg 0x49bfb
movq %r12, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
my_numchars_utf16:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov rbx, rdx
mov r14, rsi
mov r15, rdi
mov rax, [rdi+0B8h]
call qword ptr [rax+0C0h]
xor r12d, r12d
cmp eax, 2
jl short loc_49C1E
loc_49BFB:
mov eax, eax
add r14, rax
inc r12
mov rax, [r15+0B8h]
mov rdi, r15
mov rsi, r14
mov rdx, rbx
call qword ptr [rax+0C0h]
cmp eax, 1
jg short loc_49BFB
loc_49C1E:
mov rax, r12
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
long long my_numchars_utf16(long long a1, long long a2, long long a3)
{
int v5; // eax
long long v6; // r12
v5 = (*(long long (**)(void))(*(_QWORD *)(a1 + 184) + 192LL))();
v6 = 0LL;
if ( v5 >= 2 )
{
do
{
a2 += (unsigned int)v5;
++v6;
v5 = (*(long long ( **)(long long, long long, long long))(*(_QWORD *)(a1 + 184) + 192LL))(a1, a2, a3);
}
while ( v5 > 1 );
}
return v6;
}
|
my_numchars_utf16:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
MOV RAX,qword ptr [RDI + 0xb8]
CALL qword ptr [RAX + 0xc0]
XOR R12D,R12D
CMP EAX,0x2
JL 0x00149c1e
LAB_00149bfb:
MOV EAX,EAX
ADD R14,RAX
INC R12
MOV RAX,qword ptr [R15 + 0xb8]
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
CALL qword ptr [RAX + 0xc0]
CMP EAX,0x1
JG 0x00149bfb
LAB_00149c1e:
MOV RAX,R12
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
long my_numchars_utf16(long param_1,long param_2,int8 param_3)
{
uint uVar1;
long lVar2;
uVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))();
lVar2 = 0;
while (1 < (int)uVar1) {
param_2 = param_2 + (ulong)uVar1;
lVar2 = lVar2 + 1;
uVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,param_3);
}
return lVar2;
}
|
|
20,151
|
js_map_get
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_map_get(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv, int magic)
{
JSMapState *s = JS_GetOpaque2(ctx, this_val, JS_CLASS_MAP + magic);
JSMapRecord *mr;
JSValue key;
if (!s)
return JS_EXCEPTION;
key = map_normalize_key(ctx, argv[0]);
mr = map_find_record(ctx, s, key);
if (!mr)
return JS_UNDEFINED;
else
return js_dup(mr->value);
}
|
O1
|
c
|
js_map_get:
pushq %r14
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rdi, %r14
leal 0x23(%r9), %ecx
callq 0x2b611
testq %rax, %rax
je 0x53c03
movq (%rbx), %rdx
movq 0x8(%rbx), %rcx
movl %ecx, %esi
xorq $0x7, %rsi
movq %rdx, %rdi
btrq $0x3f, %rdi
xorl %ebx, %ebx
orq %rsi, %rdi
cmoveq %rbx, %rdx
cmoveq %rbx, %rcx
movq %r14, %rdi
movq %rax, %rsi
callq 0x4b4e9
testq %rax, %rax
je 0x53c0c
movq 0x40(%rax), %rcx
movq 0x48(%rax), %rdx
movq %rcx, (%rsp)
cmpl $-0x9, %edx
jb 0x53bf2
movq (%rsp), %rax
incl (%rax)
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
andq %rcx, %rax
movl %ecx, %ebx
jmp 0x53c13
movl $0x6, %edx
xorl %ebx, %ebx
jmp 0x53c11
movl $0x3, %edx
xorl %eax, %eax
orq %rax, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
|
js_map_get:
push r14
push rbx
push rax
mov rbx, r8
mov r14, rdi
lea ecx, [r9+23h]
call JS_GetOpaque2
test rax, rax
jz short loc_53C03
mov rdx, [rbx]
mov rcx, [rbx+8]
mov esi, ecx
xor rsi, 7
mov rdi, rdx
btr rdi, 3Fh ; '?'
xor ebx, ebx
or rdi, rsi
cmovz rdx, rbx
cmovz rcx, rbx
mov rdi, r14
mov rsi, rax
call map_find_record
test rax, rax
jz short loc_53C0C
mov rcx, [rax+40h]
mov rdx, [rax+48h]
mov [rsp+18h+var_18], rcx
cmp edx, 0FFFFFFF7h
jb short loc_53BF2
mov rax, [rsp+18h+var_18]
inc dword ptr [rax]
loc_53BF2:
mov rax, 0FFFFFFFF00000000h
and rax, rcx
mov ebx, ecx
jmp short loc_53C13
loc_53C03:
mov edx, 6
xor ebx, ebx
jmp short loc_53C11
loc_53C0C:
mov edx, 3
loc_53C11:
xor eax, eax
loc_53C13:
or rbx, rax
mov rax, rbx
add rsp, 8
pop rbx
pop r14
retn
|
unsigned long long js_map_get(
long long a1,
long long a2,
int a3,
double a4,
__m128d a5,
long long a6,
long long a7,
int a8)
{
long long Opaque2; // rax
_DWORD *v11; // rdx
long long v12; // rcx
__int128 v13; // rdi
long long v14; // rbx
long long record; // rax
long long v16; // rcx
unsigned long long v17; // rax
Opaque2 = JS_GetOpaque2(a1, a2, a3, a8 + 35);
if ( !Opaque2 )
{
v14 = 0LL;
LABEL_9:
v17 = 0LL;
return v17 | v14;
}
v11 = *(_DWORD **)a7;
v12 = *(_QWORD *)(a7 + 8);
*((_QWORD *)&v13 + 1) = (unsigned int)v12 ^ 7LL;
*(_QWORD *)&v13 = *(_QWORD *)a7 & 0x7FFFFFFFFFFFFFFFLL;
v14 = 0LL;
if ( v13 == 0 )
{
v11 = 0LL;
v12 = 0LL;
}
record = map_find_record(a1, Opaque2, v11, v12, a4, a5);
if ( !record )
goto LABEL_9;
v16 = *(_QWORD *)(record + 64);
if ( (unsigned int)*(_QWORD *)(record + 72) >= 0xFFFFFFF7 )
++**(_DWORD **)(record + 64);
v17 = v16 & 0xFFFFFFFF00000000LL;
v14 = (unsigned int)v16;
return v17 | v14;
}
|
js_map_get:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,R8
MOV R14,RDI
LEA ECX,[R9 + 0x23]
CALL 0x0012b611
TEST RAX,RAX
JZ 0x00153c03
MOV RDX,qword ptr [RBX]
MOV RCX,qword ptr [RBX + 0x8]
MOV ESI,ECX
XOR RSI,0x7
MOV RDI,RDX
BTR RDI,0x3f
XOR EBX,EBX
OR RDI,RSI
CMOVZ RDX,RBX
CMOVZ RCX,RBX
MOV RDI,R14
MOV RSI,RAX
CALL 0x0014b4e9
TEST RAX,RAX
JZ 0x00153c0c
MOV RCX,qword ptr [RAX + 0x40]
MOV RDX,qword ptr [RAX + 0x48]
MOV qword ptr [RSP],RCX
CMP EDX,-0x9
JC 0x00153bf2
MOV RAX,qword ptr [RSP]
INC dword ptr [RAX]
LAB_00153bf2:
MOV RAX,-0x100000000
AND RAX,RCX
MOV EBX,ECX
JMP 0x00153c13
LAB_00153c03:
MOV EDX,0x6
XOR EBX,EBX
JMP 0x00153c11
LAB_00153c0c:
MOV EDX,0x3
LAB_00153c11:
XOR EAX,EAX
LAB_00153c13:
OR RBX,RAX
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R14
RET
|
int1 [16] js_map_get(int8 param_1)
{
int *piVar1;
long lVar2;
ulong uVar3;
ulong uVar4;
int8 uVar5;
ulong *in_R8;
int1 auVar6 [16];
lVar2 = JS_GetOpaque2();
if (lVar2 == 0) {
uVar5 = 6;
}
else {
uVar4 = in_R8[1];
uVar3 = *in_R8;
if ((*in_R8 & 0x7fffffffffffffff) == 0 && (in_R8[1] & 0xffffffff) == 7) {
uVar4 = 0;
uVar3 = 0;
}
lVar2 = map_find_record(param_1,lVar2,uVar3,uVar4);
if (lVar2 != 0) {
piVar1 = *(int **)(lVar2 + 0x40);
uVar5 = *(int8 *)(lVar2 + 0x48);
if (0xfffffff6 < (uint)uVar5) {
*piVar1 = *piVar1 + 1;
}
uVar3 = (ulong)piVar1 & 0xffffffff00000000;
uVar4 = (ulong)piVar1 & 0xffffffff;
goto LAB_00153c13;
}
uVar5 = 3;
}
uVar4 = 0;
uVar3 = 0;
LAB_00153c13:
auVar6._8_8_ = uVar5;
auVar6._0_8_ = uVar4 | uVar3;
return auVar6;
}
|
|
20,152
|
js_map_get
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_map_get(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv, int magic)
{
JSMapState *s = JS_GetOpaque2(ctx, this_val, JS_CLASS_MAP + magic);
JSMapRecord *mr;
JSValue key;
if (!s)
return JS_EXCEPTION;
key = map_normalize_key(ctx, argv[0]);
mr = map_find_record(ctx, s, key);
if (!mr)
return JS_UNDEFINED;
else
return js_dup(mr->value);
}
|
O2
|
c
|
js_map_get:
pushq %r14
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rdi, %r14
leal 0x23(%r9), %ecx
callq 0x24db7
testq %rax, %rax
je 0x482db
movq (%rbx), %rdx
movq 0x8(%rbx), %rcx
movl %ecx, %esi
xorq $0x7, %rsi
movq %rdx, %rdi
btrq $0x3f, %rdi
xorl %ebx, %ebx
orq %rsi, %rdi
cmoveq %rbx, %rdx
cmoveq %rbx, %rcx
movq %r14, %rdi
movq %rax, %rsi
callq 0x413bd
testq %rax, %rax
je 0x482e2
movq 0x40(%rax), %rcx
movq 0x48(%rax), %rdx
cmpl $-0x9, %edx
jb 0x482ca
incl (%rcx)
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
andq %rcx, %rax
movl %ecx, %ebx
jmp 0x482e7
pushq $0x6
popq %rdx
xorl %ebx, %ebx
jmp 0x482e5
pushq $0x3
popq %rdx
xorl %eax, %eax
orq %rax, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
|
js_map_get:
push r14
push rbx
push rax
mov rbx, r8
mov r14, rdi
lea ecx, [r9+23h]
call JS_GetOpaque2
test rax, rax
jz short loc_482DB
mov rdx, [rbx]
mov rcx, [rbx+8]
mov esi, ecx
xor rsi, 7
mov rdi, rdx
btr rdi, 3Fh ; '?'
xor ebx, ebx
or rdi, rsi
cmovz rdx, rbx
cmovz rcx, rbx
mov rdi, r14
mov rsi, rax
call map_find_record
test rax, rax
jz short loc_482E2
mov rcx, [rax+40h]
mov rdx, [rax+48h]
cmp edx, 0FFFFFFF7h
jb short loc_482CA
inc dword ptr [rcx]
loc_482CA:
mov rax, 0FFFFFFFF00000000h
and rax, rcx
mov ebx, ecx
jmp short loc_482E7
loc_482DB:
push 6
pop rdx
xor ebx, ebx
jmp short loc_482E5
loc_482E2:
push 3
pop rdx
loc_482E5:
xor eax, eax
loc_482E7:
or rbx, rax
mov rax, rbx
add rsp, 8
pop rbx
pop r14
retn
|
unsigned long long js_map_get(long long a1, long long a2, int a3, __m128d a4, long long a5, long long a6, int a7)
{
long long Opaque2; // rax
_DWORD *v10; // rdx
long long v11; // rcx
__int128 v12; // rdi
long long v13; // rbx
long long record; // rax
unsigned long long v15; // rcx
unsigned long long v16; // rax
Opaque2 = JS_GetOpaque2(a1, a2, a3, a7 + 35);
if ( !Opaque2 )
{
v13 = 0LL;
LABEL_9:
v16 = 0LL;
return v16 | v13;
}
v10 = *(_DWORD **)a6;
v11 = *(_QWORD *)(a6 + 8);
*((_QWORD *)&v12 + 1) = (unsigned int)v11 ^ 7LL;
*(_QWORD *)&v12 = *(_QWORD *)a6 & 0x7FFFFFFFFFFFFFFFLL;
v13 = 0LL;
if ( v12 == 0 )
{
v10 = 0LL;
v11 = 0LL;
}
record = map_find_record(a1, Opaque2, v10, v11, a4);
if ( !record )
goto LABEL_9;
v15 = *(_QWORD *)(record + 64);
if ( (unsigned int)*(_QWORD *)(record + 72) >= 0xFFFFFFF7 )
++*(_DWORD *)v15;
v16 = v15 & 0xFFFFFFFF00000000LL;
v13 = (unsigned int)v15;
return v16 | v13;
}
|
js_map_get:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,R8
MOV R14,RDI
LEA ECX,[R9 + 0x23]
CALL 0x00124db7
TEST RAX,RAX
JZ 0x001482db
MOV RDX,qword ptr [RBX]
MOV RCX,qword ptr [RBX + 0x8]
MOV ESI,ECX
XOR RSI,0x7
MOV RDI,RDX
BTR RDI,0x3f
XOR EBX,EBX
OR RDI,RSI
CMOVZ RDX,RBX
CMOVZ RCX,RBX
MOV RDI,R14
MOV RSI,RAX
CALL 0x001413bd
TEST RAX,RAX
JZ 0x001482e2
MOV RCX,qword ptr [RAX + 0x40]
MOV RDX,qword ptr [RAX + 0x48]
CMP EDX,-0x9
JC 0x001482ca
INC dword ptr [RCX]
LAB_001482ca:
MOV RAX,-0x100000000
AND RAX,RCX
MOV EBX,ECX
JMP 0x001482e7
LAB_001482db:
PUSH 0x6
POP RDX
XOR EBX,EBX
JMP 0x001482e5
LAB_001482e2:
PUSH 0x3
POP RDX
LAB_001482e5:
XOR EAX,EAX
LAB_001482e7:
OR RBX,RAX
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R14
RET
|
int1 [16] js_map_get(int8 param_1)
{
int *piVar1;
long lVar2;
ulong uVar3;
ulong uVar4;
int8 uVar5;
ulong *in_R8;
int1 auVar6 [16];
lVar2 = JS_GetOpaque2();
if (lVar2 == 0) {
uVar5 = 6;
}
else {
uVar4 = in_R8[1];
uVar3 = *in_R8;
if ((*in_R8 & 0x7fffffffffffffff) == 0 && (in_R8[1] & 0xffffffff) == 7) {
uVar4 = 0;
uVar3 = 0;
}
lVar2 = map_find_record(param_1,lVar2,uVar3,uVar4);
if (lVar2 != 0) {
piVar1 = *(int **)(lVar2 + 0x40);
uVar5 = *(int8 *)(lVar2 + 0x48);
if (0xfffffff6 < (uint)uVar5) {
*piVar1 = *piVar1 + 1;
}
uVar3 = (ulong)piVar1 & 0xffffffff00000000;
uVar4 = (ulong)piVar1 & 0xffffffff;
goto LAB_001482e7;
}
uVar5 = 3;
}
uVar4 = 0;
uVar3 = 0;
LAB_001482e7:
auVar6._8_8_ = uVar5;
auVar6._0_8_ = uVar4 | uVar3;
return auVar6;
}
|
|
20,153
|
PFS_account::aggregate_stages(PFS_user*, PFS_host*)
|
eloqsql/storage/perfschema/pfs_account.cc
|
void PFS_account::aggregate_stages(PFS_user *safe_user, PFS_host *safe_host)
{
if (read_instr_class_stages_stats() == NULL)
return;
if (likely(safe_user != NULL && safe_host != NULL))
{
/*
Aggregate EVENTS_STAGES_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME to:
- EVENTS_STAGES_SUMMARY_BY_USER_BY_EVENT_NAME
- EVENTS_STAGES_SUMMARY_BY_HOST_BY_EVENT_NAME
in parallel.
*/
aggregate_all_stages(write_instr_class_stages_stats(),
safe_user->write_instr_class_stages_stats(),
safe_host->write_instr_class_stages_stats());
return;
}
if (safe_user != NULL)
{
/*
Aggregate EVENTS_STAGES_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME to:
- EVENTS_STAGES_SUMMARY_BY_USER_BY_EVENT_NAME
- EVENTS_STAGES_SUMMARY_GLOBAL_BY_EVENT_NAME
in parallel.
*/
aggregate_all_stages(write_instr_class_stages_stats(),
safe_user->write_instr_class_stages_stats(),
global_instr_class_stages_array);
return;
}
if (safe_host != NULL)
{
/*
Aggregate EVENTS_STAGES_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME to:
- EVENTS_STAGES_SUMMARY_BY_HOST_BY_EVENT_NAME
*/
aggregate_all_stages(write_instr_class_stages_stats(),
safe_host->write_instr_class_stages_stats());
return;
}
/*
Aggregate EVENTS_STAGES_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME to:
- EVENTS_STAGES_SUMMARY_GLOBAL_BY_EVENT_NAME
*/
aggregate_all_stages(write_instr_class_stages_stats(),
global_instr_class_stages_array);
return;
}
|
O3
|
cpp
|
PFS_account::aggregate_stages(PFS_user*, PFS_host*):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0x10(%rdi), %rbx
testq %rbx, %rbx
setne %al
andb 0x1(%rdi), %al
cmpb $0x1, %al
jne 0x41990
movq %rdx, %r14
movq %rsi, %r15
testq %rsi, %rsi
je 0x4199b
testq %r14, %r14
je 0x4199b
testb $0x1, 0x1(%r15)
jne 0x4195f
movq %r15, %rdi
callq 0x42b06
movb $0x1, 0x1(%r15)
movq 0x10(%r15), %r15
cmpb $0x0, 0x1(%r14)
jne 0x41977
movq %r14, %rdi
callq 0x42b06
movb $0x1, 0x1(%r14)
movq 0x10(%r14), %rdx
movq %rbx, %rdi
movq %r15, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x340fb
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
testq %r15, %r15
je 0x419c7
testb $0x1, 0x1(%r15)
jne 0x419b4
movq %r15, %rdi
callq 0x42b06
movb $0x1, 0x1(%r15)
movq 0x10(%r15), %rsi
leaq 0x38d981(%rip), %rax # 0x3cf340
movq (%rax), %rdx
movq %rbx, %rdi
jmp 0x41981
testq %r14, %r14
je 0x419e6
testb $0x1, 0x1(%r14)
jne 0x419e0
movq %r14, %rdi
callq 0x42b06
movb $0x1, 0x1(%r14)
movq 0x10(%r14), %rsi
jmp 0x419f0
leaq 0x38d953(%rip), %rax # 0x3cf340
movq (%rax), %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x34084
|
_ZN11PFS_account16aggregate_stagesEP8PFS_userP8PFS_host:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, [rdi+10h]
test rbx, rbx
setnz al
and al, [rdi+1]
cmp al, 1
jnz short loc_41990
mov r14, rdx
mov r15, rsi
test rsi, rsi
jz short loc_4199B
test r14, r14
jz short loc_4199B
test byte ptr [r15+1], 1
jnz short loc_4195F
mov rdi, r15; this
call _ZN20PFS_connection_slice18reset_stages_statsEv; PFS_connection_slice::reset_stages_stats(void)
mov byte ptr [r15+1], 1
loc_4195F:
mov r15, [r15+10h]
cmp byte ptr [r14+1], 0
jnz short loc_41977
mov rdi, r14; this
call _ZN20PFS_connection_slice18reset_stages_statsEv; PFS_connection_slice::reset_stages_stats(void)
mov byte ptr [r14+1], 1
loc_41977:
mov rdx, [r14+10h]
mov rdi, rbx
mov rsi, r15
loc_41981:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
jmp _Z20aggregate_all_stagesP14PFS_stage_statS0_S0_; aggregate_all_stages(PFS_stage_stat *,PFS_stage_stat *,PFS_stage_stat *)
loc_41990:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_4199B:
test r15, r15
jz short loc_419C7
test byte ptr [r15+1], 1
jnz short loc_419B4
mov rdi, r15; this
call _ZN20PFS_connection_slice18reset_stages_statsEv; PFS_connection_slice::reset_stages_stats(void)
mov byte ptr [r15+1], 1
loc_419B4:
mov rsi, [r15+10h]
lea rax, global_instr_class_stages_array
mov rdx, [rax]
mov rdi, rbx
jmp short loc_41981
loc_419C7:
test r14, r14
jz short loc_419E6
test byte ptr [r14+1], 1
jnz short loc_419E0
mov rdi, r14; this
call _ZN20PFS_connection_slice18reset_stages_statsEv; PFS_connection_slice::reset_stages_stats(void)
mov byte ptr [r14+1], 1
loc_419E0:
mov rsi, [r14+10h]
jmp short loc_419F0
loc_419E6:
lea rax, global_instr_class_stages_array
mov rsi, [rax]
loc_419F0:
mov rdi, rbx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
jmp _Z20aggregate_all_stagesP14PFS_stage_statS0_; aggregate_all_stages(PFS_stage_stat *,PFS_stage_stat *)
|
char PFS_account::aggregate_stages(PFS_account *this, PFS_user *a2, PFS_host *a3)
{
_QWORD *v3; // rbx
char result; // al
long long v6; // r15
long long v7; // rsi
v3 = (_QWORD *)*((_QWORD *)this + 2);
result = *((_BYTE *)this + 1) & (v3 != 0LL);
if ( result == 1 )
{
if ( a2 && a3 )
{
if ( (*((_BYTE *)a2 + 1) & 1) == 0 )
{
PFS_connection_slice::reset_stages_stats(a2);
*((_BYTE *)a2 + 1) = 1;
}
v6 = *((_QWORD *)a2 + 2);
if ( !*((_BYTE *)a3 + 1) )
{
PFS_connection_slice::reset_stages_stats(a3);
*((_BYTE *)a3 + 1) = 1;
}
return aggregate_all_stages((long long)v3, v6, *((_QWORD *)a3 + 2));
}
else if ( a2 )
{
if ( (*((_BYTE *)a2 + 1) & 1) == 0 )
{
PFS_connection_slice::reset_stages_stats(a2);
*((_BYTE *)a2 + 1) = 1;
}
return aggregate_all_stages((long long)v3, *((_QWORD *)a2 + 2), global_instr_class_stages_array);
}
else
{
if ( a3 )
{
if ( (*((_BYTE *)a3 + 1) & 1) == 0 )
{
PFS_connection_slice::reset_stages_stats(a3);
*((_BYTE *)a3 + 1) = 1;
}
v7 = *((_QWORD *)a3 + 2);
}
else
{
v7 = global_instr_class_stages_array;
}
return aggregate_all_stages(v3, v7);
}
}
return result;
}
|
aggregate_stages:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,qword ptr [RDI + 0x10]
TEST RBX,RBX
SETNZ AL
AND AL,byte ptr [RDI + 0x1]
CMP AL,0x1
JNZ 0x00141990
MOV R14,RDX
MOV R15,RSI
TEST RSI,RSI
JZ 0x0014199b
TEST R14,R14
JZ 0x0014199b
TEST byte ptr [R15 + 0x1],0x1
JNZ 0x0014195f
MOV RDI,R15
CALL 0x00142b06
MOV byte ptr [R15 + 0x1],0x1
LAB_0014195f:
MOV R15,qword ptr [R15 + 0x10]
CMP byte ptr [R14 + 0x1],0x0
JNZ 0x00141977
MOV RDI,R14
CALL 0x00142b06
MOV byte ptr [R14 + 0x1],0x1
LAB_00141977:
MOV RDX,qword ptr [R14 + 0x10]
MOV RDI,RBX
MOV RSI,R15
LAB_00141981:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
JMP 0x001340fb
LAB_00141990:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0014199b:
TEST R15,R15
JZ 0x001419c7
TEST byte ptr [R15 + 0x1],0x1
JNZ 0x001419b4
MOV RDI,R15
CALL 0x00142b06
MOV byte ptr [R15 + 0x1],0x1
LAB_001419b4:
MOV RSI,qword ptr [R15 + 0x10]
LEA RAX,[0x4cf340]
MOV RDX,qword ptr [RAX]
MOV RDI,RBX
JMP 0x00141981
LAB_001419c7:
TEST R14,R14
JZ 0x001419e6
TEST byte ptr [R14 + 0x1],0x1
JNZ 0x001419e0
MOV RDI,R14
CALL 0x00142b06
MOV byte ptr [R14 + 0x1],0x1
LAB_001419e0:
MOV RSI,qword ptr [R14 + 0x10]
JMP 0x001419f0
LAB_001419e6:
LEA RAX,[0x4cf340]
MOV RSI,qword ptr [RAX]
LAB_001419f0:
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
JMP 0x00134084
|
/* PFS_account::aggregate_stages(PFS_user*, PFS_host*) */
void __thiscall PFS_account::aggregate_stages(PFS_account *this,PFS_user *param_1,PFS_host *param_2)
{
PFS_stage_stat *pPVar1;
PFS_stage_stat *pPVar2;
PFS_stage_stat *pPVar3;
pPVar1 = *(PFS_stage_stat **)(this + 0x10);
if ((pPVar1 != (PFS_stage_stat *)0x0 & (byte)this[1]) != 1) {
return;
}
if ((param_1 == (PFS_user *)0x0) || (param_2 == (PFS_host *)0x0)) {
if (param_1 == (PFS_user *)0x0) {
pPVar3 = global_instr_class_stages_array;
if (param_2 != (PFS_host *)0x0) {
if (((byte)param_2[1] & 1) == 0) {
PFS_connection_slice::reset_stages_stats((PFS_connection_slice *)param_2);
param_2[1] = (PFS_host)0x1;
}
pPVar3 = *(PFS_stage_stat **)(param_2 + 0x10);
}
aggregate_all_stages(pPVar1,pPVar3);
return;
}
if (((byte)param_1[1] & 1) == 0) {
PFS_connection_slice::reset_stages_stats((PFS_connection_slice *)param_1);
param_1[1] = (PFS_user)0x1;
}
pPVar3 = *(PFS_stage_stat **)(param_1 + 0x10);
pPVar2 = global_instr_class_stages_array;
}
else {
if (((byte)param_1[1] & 1) == 0) {
PFS_connection_slice::reset_stages_stats((PFS_connection_slice *)param_1);
param_1[1] = (PFS_user)0x1;
}
pPVar3 = *(PFS_stage_stat **)(param_1 + 0x10);
if (param_2[1] == (PFS_host)0x0) {
PFS_connection_slice::reset_stages_stats((PFS_connection_slice *)param_2);
param_2[1] = (PFS_host)0x1;
}
pPVar2 = *(PFS_stage_stat **)(param_2 + 0x10);
}
aggregate_all_stages(pPVar1,pPVar3,pPVar2);
return;
}
|
|
20,154
|
common_sampler_clone(common_sampler*)
|
monkey531[P]llama/common/sampling.cpp
|
struct common_sampler * common_sampler_clone(common_sampler * gsmpl) {
return new common_sampler {
/* .params = */ gsmpl->params,
/* .grmr = */ llama_sampler_clone(gsmpl->grmr),
/* .chain = */ llama_sampler_clone(gsmpl->chain),
/* .prev = */ gsmpl->prev,
/* .cur = */ gsmpl->cur,
/* .cur_p = */ gsmpl->cur_p,
};
}
|
O3
|
cpp
|
common_sampler_clone(common_sampler*):
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
movl $0x1b8, %edi # imm = 0x1B8
callq 0x1a890
movq %rax, %rbx
movq %rax, %rdi
movq %r14, %rsi
callq 0x5410e
movq 0x138(%r14), %rdi
callq 0x1a5f0
movq %rax, 0x138(%rbx)
movq 0x140(%r14), %rdi
callq 0x1a5f0
movq %rax, 0x140(%rbx)
movups 0x148(%r14), %xmm0
movups 0x158(%r14), %xmm1
movups %xmm0, 0x148(%rbx)
movups %xmm1, 0x158(%rbx)
movl $0x168, %esi # imm = 0x168
leaq (%rbx,%rsi), %r15
addq %r14, %rsi
movq %r15, %rdi
callq 0x20a64
movl $0x180, %esi # imm = 0x180
movq %rbx, %rdi
addq %rsi, %rdi
addq %r14, %rsi
callq 0xce280
movups 0x198(%r14), %xmm0
movups 0x1a8(%r14), %xmm1
movups %xmm1, 0x1a8(%rbx)
movups %xmm0, 0x198(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%r15), %rdi
testq %rdi, %rdi
je 0xcd1ae
movq 0x178(%rbx), %rsi
subq %rdi, %rsi
callq 0x1a8b0
jmp 0xcd1ae
movq %rax, %r14
jmp 0xcd1b6
movq %rax, %r14
movq %rbx, %rdi
callq 0x21794
movl $0x1b8, %esi # imm = 0x1B8
movq %rbx, %rdi
callq 0x1a8b0
movq %r14, %rdi
callq 0x1af70
|
_Z20common_sampler_cloneP14common_sampler:
push r15
push r14
push rbx
mov r14, rdi
mov edi, 1B8h; unsigned __int64
call __Znwm; operator new(ulong)
mov rbx, rax
mov rdi, rax; this
mov rsi, r14; common_params_sampling *
call _ZN22common_params_samplingC2ERKS_; common_params_sampling::common_params_sampling(common_params_sampling const&)
mov rdi, [r14+138h]
call _llama_sampler_clone
mov [rbx+138h], rax
mov rdi, [r14+140h]
call _llama_sampler_clone
mov [rbx+140h], rax
movups xmm0, xmmword ptr [r14+148h]
movups xmm1, xmmword ptr [r14+158h]
movups xmmword ptr [rbx+148h], xmm0
movups xmmword ptr [rbx+158h], xmm1
mov esi, 168h
lea r15, [rbx+rsi]
add rsi, r14
mov rdi, r15
call _ZNSt6vectorIiSaIiEEC2ERKS1_; std::vector<int>::vector(std::vector<int> const&)
mov esi, 180h
mov rdi, rbx
add rdi, rsi
add rsi, r14
call _ZNSt6vectorI16llama_token_dataSaIS0_EEC2ERKS2_; std::vector<llama_token_data>::vector(std::vector<llama_token_data> const&)
movups xmm0, xmmword ptr [r14+198h]
movups xmm1, xmmword ptr [r14+1A8h]
movups xmmword ptr [rbx+1A8h], xmm1
movups xmmword ptr [rbx+198h], xmm0
mov rax, rbx
pop rbx
pop r14
pop r15
retn
mov r14, rax
mov rdi, [r15]; void *
test rdi, rdi
jz short loc_CD1AE
mov rsi, [rbx+178h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_CD1AE
mov r14, rax
jmp short loc_CD1B6
mov r14, rax
loc_CD1AE:
mov rdi, rbx; this
call _ZN22common_params_samplingD2Ev; common_params_sampling::~common_params_sampling()
loc_CD1B6:
mov esi, 1B8h; unsigned __int64
mov rdi, rbx; void *
call __ZdlPvm; operator delete(void *,ulong)
mov rdi, r14
call __Unwind_Resume
|
long long common_sampler_clone(common_params_sampling *a1)
{
long long v1; // rbx
__int128 v2; // xmm1
__int128 v3; // xmm0
v1 = operator new(0x1B8uLL);
common_params_sampling::common_params_sampling((common_params_sampling *)v1, a1);
*(_QWORD *)(v1 + 312) = llama_sampler_clone(*((_QWORD *)a1 + 39));
*(_QWORD *)(v1 + 320) = llama_sampler_clone(*((_QWORD *)a1 + 40));
v2 = *(_OWORD *)((char *)a1 + 344);
*(_OWORD *)(v1 + 328) = *(_OWORD *)((char *)a1 + 328);
*(_OWORD *)(v1 + 344) = v2;
std::vector<int>::vector(v1 + 360, (long long *)a1 + 45);
std::vector<llama_token_data>::vector(v1 + 384, (char *)a1 + 384);
v3 = *(_OWORD *)((char *)a1 + 408);
*(_OWORD *)(v1 + 424) = *(_OWORD *)((char *)a1 + 424);
*(_OWORD *)(v1 + 408) = v3;
return v1;
}
|
common_sampler_clone:
PUSH R15
PUSH R14
PUSH RBX
MOV R14,RDI
MOV EDI,0x1b8
CALL 0x0011a890
MOV RBX,RAX
LAB_001cd0ed:
MOV RDI,RAX
MOV RSI,R14
CALL 0x0015410e
MOV RDI,qword ptr [R14 + 0x138]
LAB_001cd0ff:
CALL 0x0011a5f0
MOV qword ptr [RBX + 0x138],RAX
MOV RDI,qword ptr [R14 + 0x140]
CALL 0x0011a5f0
MOV qword ptr [RBX + 0x140],RAX
MOVUPS XMM0,xmmword ptr [R14 + 0x148]
MOVUPS XMM1,xmmword ptr [R14 + 0x158]
MOVUPS xmmword ptr [RBX + 0x148],XMM0
MOVUPS xmmword ptr [RBX + 0x158],XMM1
MOV ESI,0x168
LEA R15,[RBX + RSI*0x1]
ADD RSI,R14
MOV RDI,R15
CALL 0x00120a64
MOV ESI,0x180
MOV RDI,RBX
ADD RDI,RSI
ADD RSI,R14
LAB_001cd15e:
CALL 0x001ce280
LAB_001cd163:
MOVUPS XMM0,xmmword ptr [R14 + 0x198]
MOVUPS XMM1,xmmword ptr [R14 + 0x1a8]
MOVUPS xmmword ptr [RBX + 0x1a8],XMM1
MOVUPS xmmword ptr [RBX + 0x198],XMM0
MOV RAX,RBX
POP RBX
POP R14
POP R15
RET
|
/* common_sampler_clone(common_sampler*) */
common_params_sampling * common_sampler_clone(common_sampler *param_1)
{
int8 uVar1;
int8 uVar2;
common_params_sampling *this;
int8 uVar3;
this = (common_params_sampling *)operator_new(0x1b8);
/* try { // try from 001cd0ed to 001cd0f7 has its CatchHandler @ 001cd1a6 */
common_params_sampling::common_params_sampling(this,(common_params_sampling *)param_1);
/* try { // try from 001cd0ff to 001cd14f has its CatchHandler @ 001cd1ab */
uVar3 = llama_sampler_clone(*(int8 *)(param_1 + 0x138));
*(int8 *)(this + 0x138) = uVar3;
uVar3 = llama_sampler_clone(*(int8 *)(param_1 + 0x140));
*(int8 *)(this + 0x140) = uVar3;
uVar3 = *(int8 *)(param_1 + 0x150);
uVar1 = *(int8 *)(param_1 + 0x158);
uVar2 = *(int8 *)(param_1 + 0x160);
*(int8 *)(this + 0x148) = *(int8 *)(param_1 + 0x148);
*(int8 *)(this + 0x150) = uVar3;
*(int8 *)(this + 0x158) = uVar1;
*(int8 *)(this + 0x160) = uVar2;
std::vector<int,std::allocator<int>>::vector
((vector<int,std::allocator<int>> *)(this + 0x168),(vector *)(param_1 + 0x168));
/* try { // try from 001cd15e to 001cd162 has its CatchHandler @ 001cd18a */
std::vector<llama_token_data,std::allocator<llama_token_data>>::vector
((vector<llama_token_data,std::allocator<llama_token_data>> *)(this + 0x180),
(vector *)(param_1 + 0x180));
uVar3 = *(int8 *)(param_1 + 0x198);
uVar1 = *(int8 *)(param_1 + 0x1a0);
uVar2 = *(int8 *)(param_1 + 0x1b0);
*(int8 *)(this + 0x1a8) = *(int8 *)(param_1 + 0x1a8);
*(int8 *)(this + 0x1b0) = uVar2;
*(int8 *)(this + 0x198) = uVar3;
*(int8 *)(this + 0x1a0) = uVar1;
return this;
}
|
|
20,155
|
mi_ft_segiterator_init
|
eloqsql/storage/myisam/ft_update.c
|
void _mi_ft_segiterator_init(MI_INFO *info, uint keynr, const uchar *record,
FT_SEG_ITERATOR *ftsi)
{
DBUG_ENTER("_mi_ft_segiterator_init");
ftsi->num=info->s->keyinfo[keynr].keysegs;
ftsi->seg=info->s->keyinfo[keynr].seg;
ftsi->rec=record;
ftsi->pos= 0; /* Avoid warnings from gcc */
ftsi->len= 0; /* Avoid warnings from gcc */
DBUG_VOID_RETURN;
}
|
O3
|
c
|
mi_ft_segiterator_init:
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rax
movq 0x218(%rax), %rax
movl %esi, %esi
imulq $0x70, %rsi, %rsi
movzwl 0x8(%rax,%rsi), %eax
movl %eax, (%rcx)
movq (%rdi), %rax
movq 0x218(%rax), %rax
movq 0x28(%rax,%rsi), %rax
movq %rax, 0x8(%rcx)
movq %rdx, 0x10(%rcx)
movq $0x0, 0x18(%rcx)
movl $0x0, 0x4(%rcx)
popq %rbp
retq
|
_mi_ft_segiterator_init:
push rbp
mov rbp, rsp
mov rax, [rdi]
mov rax, [rax+218h]
mov esi, esi
imul rsi, 70h ; 'p'
movzx eax, word ptr [rax+rsi+8]
mov [rcx], eax
mov rax, [rdi]
mov rax, [rax+218h]
mov rax, [rax+rsi+28h]
mov [rcx+8], rax
mov [rcx+10h], rdx
mov qword ptr [rcx+18h], 0
mov dword ptr [rcx+4], 0
pop rbp
retn
|
long long mi_ft_segiterator_init(long long a1, unsigned int a2, long long a3, long long a4)
{
long long v4; // rsi
long long result; // rax
v4 = 112LL * a2;
*(_DWORD *)a4 = *(unsigned __int16 *)(*(_QWORD *)(*(_QWORD *)a1 + 536LL) + v4 + 8);
result = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 536LL) + v4 + 40);
*(_QWORD *)(a4 + 8) = result;
*(_QWORD *)(a4 + 16) = a3;
*(_QWORD *)(a4 + 24) = 0LL;
*(_DWORD *)(a4 + 4) = 0;
return result;
}
|
_mi_ft_segiterator_init:
PUSH RBP
MOV RBP,RSP
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0x218]
MOV ESI,ESI
IMUL RSI,RSI,0x70
MOVZX EAX,word ptr [RAX + RSI*0x1 + 0x8]
MOV dword ptr [RCX],EAX
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0x218]
MOV RAX,qword ptr [RAX + RSI*0x1 + 0x28]
MOV qword ptr [RCX + 0x8],RAX
MOV qword ptr [RCX + 0x10],RDX
MOV qword ptr [RCX + 0x18],0x0
MOV dword ptr [RCX + 0x4],0x0
POP RBP
RET
|
void _mi_ft_segiterator_init(long *param_1,uint param_2,int8 param_3,uint *param_4)
{
*param_4 = (uint)*(ushort *)(*(long *)(*param_1 + 0x218) + 8 + (ulong)param_2 * 0x70);
*(int8 *)(param_4 + 2) =
*(int8 *)(*(long *)(*param_1 + 0x218) + 0x28 + (ulong)param_2 * 0x70);
*(int8 *)(param_4 + 4) = param_3;
param_4[6] = 0;
param_4[7] = 0;
param_4[1] = 0;
return;
}
|
|
20,156
|
AssetStore::getMusic(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
GhostEscape/src/core/asset_store.cpp
|
Mix_Music *AssetStore::getMusic(const std::string &file_path)
{
auto iter = music_.find(file_path);
if (iter == music_.end()) // 如果没有找到,则载入。
{
loadMusic(file_path);
iter = music_.find(file_path);
}
if (iter == music_.end()) // 如果载入失败,则返回空指针。
{
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Failed to get music: %s", file_path.c_str());
return nullptr;
}
return iter->second;
}
|
O3
|
cpp
|
AssetStore::getMusic(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x78(%rdi), %r14
movq %r14, %rdi
callq 0x87a8
testq %rax, %rax
jne 0x7098
movq %r15, %rdi
movq %rbx, %rsi
callq 0x6d52
movq %r14, %rdi
movq %rbx, %rsi
callq 0x87a8
testq %rax, %rax
je 0x70aa
movq 0x28(%rax), %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq (%rbx), %rdx
leaq 0x9243(%rip), %rsi # 0x102f7
xorl %ebx, %ebx
xorl %edi, %edi
xorl %eax, %eax
callq 0x5610
jmp 0x709c
nop
|
_ZN10AssetStore8getMusicERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rsi
mov r15, rdi
lea r14, [rdi+78h]
mov rdi, r14
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P9Mix_MusicESaISA_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSC_18_Mod_range_hashingENSC_20_Default_ranged_hashENSC_20_Prime_rehash_policyENSC_17_Hashtable_traitsILb1ELb0ELb1EEEE4findERS7_; std::_Hashtable<std::string,std::pair<std::string const,Mix_Music *>,std::allocator<std::pair<std::string const,Mix_Music *>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(std::string const&)
test rax, rax
jnz short loc_7098
mov rdi, r15
mov rsi, rbx
call _ZN10AssetStore9loadMusicERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; AssetStore::loadMusic(std::string const&)
mov rdi, r14
mov rsi, rbx
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P9Mix_MusicESaISA_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSC_18_Mod_range_hashingENSC_20_Default_ranged_hashENSC_20_Prime_rehash_policyENSC_17_Hashtable_traitsILb1ELb0ELb1EEEE4findERS7_; std::_Hashtable<std::string,std::pair<std::string const,Mix_Music *>,std::allocator<std::pair<std::string const,Mix_Music *>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(std::string const&)
test rax, rax
jz short loc_70AA
loc_7098:
mov rbx, [rax+28h]
loc_709C:
mov rax, rbx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_70AA:
mov rdx, [rbx]
lea rsi, aFailedToGetMus; "Failed to get music: %s"
xor ebx, ebx
xor edi, edi
xor eax, eax
call _SDL_LogError
jmp short loc_709C
|
long long AssetStore::getMusic(long long a1, const char **a2)
{
long long v2; // rax
long long v3; // rbx
v2 = std::_Hashtable<std::string,std::pair<std::string const,Mix_Music *>,std::allocator<std::pair<std::string const,Mix_Music *>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(a1 + 120);
if ( v2 )
return *(_QWORD *)(v2 + 40);
AssetStore::loadMusic(a1, a2);
v2 = std::_Hashtable<std::string,std::pair<std::string const,Mix_Music *>,std::allocator<std::pair<std::string const,Mix_Music *>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(a1 + 120);
if ( v2 )
return *(_QWORD *)(v2 + 40);
v3 = 0LL;
SDL_LogError(0LL, "Failed to get music: %s", *a2);
return v3;
}
|
getMusic:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R15,RDI
LEA R14,[RDI + 0x78]
MOV RDI,R14
CALL 0x001087a8
TEST RAX,RAX
JNZ 0x00107098
MOV RDI,R15
MOV RSI,RBX
CALL 0x00106d52
MOV RDI,R14
MOV RSI,RBX
CALL 0x001087a8
TEST RAX,RAX
JZ 0x001070aa
LAB_00107098:
MOV RBX,qword ptr [RAX + 0x28]
LAB_0010709c:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_001070aa:
MOV RDX,qword ptr [RBX]
LEA RSI,[0x1102f7]
XOR EBX,EBX
XOR EDI,EDI
XOR EAX,EAX
CALL 0x00105610
JMP 0x0010709c
|
/* AssetStore::getMusic(std::__cxx11::string const&) */
int8 __thiscall AssetStore::getMusic(AssetStore *this,string *param_1)
{
long lVar1;
lVar1 = std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,Mix_Music*>,std::allocator<std::pair<std::__cxx11::string_const,Mix_Music*>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
::find((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,Mix_Music*>,std::allocator<std::pair<std::__cxx11::string_const,Mix_Music*>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
*)(this + 0x78),param_1);
if (lVar1 == 0) {
loadMusic(this,param_1);
lVar1 = std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,Mix_Music*>,std::allocator<std::pair<std::__cxx11::string_const,Mix_Music*>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
::find((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,Mix_Music*>,std::allocator<std::pair<std::__cxx11::string_const,Mix_Music*>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
*)(this + 0x78),param_1);
if (lVar1 == 0) {
SDL_LogError(0,"Failed to get music: %s",*(int8 *)param_1);
return 0;
}
}
return *(int8 *)(lVar1 + 0x28);
}
|
|
20,157
|
unpack_fields
|
eloqsql/libmariadb/libmariadb/mariadb_lib.c
|
MYSQL_FIELD *
unpack_fields(const MYSQL *mysql,
MYSQL_DATA *data, MA_MEM_ROOT *alloc, uint fields,
my_bool default_value)
{
MYSQL_ROWS *row;
MYSQL_FIELD *field,*result;
char *p;
unsigned int i, field_count= sizeof(rset_field_offsets)/sizeof(size_t)/2;
field=result=(MYSQL_FIELD*) ma_alloc_root(alloc,sizeof(MYSQL_FIELD)*fields);
if (!result)
return(0);
for (row=data->data; row ; row = row->next,field++)
{
if (field >= result + fields)
goto error;
for (i=0; i < field_count; i++)
{
uint length= (uint)(row->data[i+1] - row->data[i] - 1);
if (!row->data[i] && row->data[i][length])
goto error;
*(char **)(((char *)field) + rset_field_offsets[i*2])=
ma_strdup_root(alloc, (char *)row->data[i]);
*(unsigned int *)(((char *)field) + rset_field_offsets[i*2+1])= length;
}
field->extension= NULL;
if (ma_has_extended_type_info(mysql))
{
if (row->data[i+1] - row->data[i] > 1)
{
size_t len= row->data[i+1] - row->data[i] - 1;
MA_FIELD_EXTENSION *ext= new_ma_field_extension(alloc);
if ((field->extension= ext))
ma_field_extension_init_type_info(alloc, ext, row->data[i], len);
}
i++;
}
p= (char *)row->data[i];
/* filler */
field->charsetnr= uint2korr(p);
p+= 2;
field->length= (uint) uint4korr(p);
p+= 4;
field->type= (enum enum_field_types)uint1korr(p);
p++;
field->flags= uint2korr(p);
p+= 2;
field->decimals= (uint) p[0];
p++;
/* filler */
p+= 2;
if (INTERNAL_NUM_FIELD(field))
field->flags|= NUM_FLAG;
i++;
/* This is used by deprecated function mysql_list_fields only,
however the reported length is not correct, so we always zero it */
if (default_value && row->data[i])
field->def=ma_strdup_root(alloc,(char*) row->data[i]);
else
field->def=0;
field->def_length= 0;
field->max_length= 0;
}
if (field < result + fields)
goto error;
free_rows(data); /* Free old data */
return(result);
error:
free_rows(data);
ma_free_root(alloc, MYF(0));
return(0);
}
|
O0
|
c
|
unpack_fields:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movb %r8b, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movb %al, -0x25(%rbp)
movl $0x6, -0x50(%rbp)
movq -0x20(%rbp), %rdi
movl -0x24(%rbp), %eax
movl %eax, %esi
shlq $0x7, %rsi
callq 0x3f1c0
movq %rax, -0x40(%rbp)
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0x34562
movq $0x0, -0x8(%rbp)
jmp 0x34953
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x3490b
movq -0x38(%rbp), %rax
movq -0x40(%rbp), %rcx
movl -0x24(%rbp), %edx
shlq $0x7, %rdx
addq %rdx, %rcx
cmpq %rcx, %rax
jb 0x34594
jmp 0x34937
movl $0x0, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
cmpl -0x50(%rbp), %eax
jae 0x3466c
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x4c(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
movq -0x30(%rbp), %rcx
movq 0x8(%rcx), %rcx
movl -0x4c(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
subq %rcx, %rax
subq $0x1, %rax
movl %eax, -0x54(%rbp)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x4c(%rbp), %ecx
cmpq $0x0, (%rax,%rcx,8)
jne 0x34606
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x4c(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl -0x54(%rbp), %ecx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x34606
jmp 0x34937
movq -0x20(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x4c(%rbp), %ecx
movq (%rax,%rcx,8), %rsi
callq 0x3f530
movq %rax, %rdx
movq -0x38(%rbp), %rax
movl -0x4c(%rbp), %ecx
shll %ecx
movl %ecx, %ecx
movl %ecx, %esi
leaq 0x4b0cb(%rip), %rcx # 0x7f700
movq (%rcx,%rsi,8), %rcx
movq %rdx, (%rax,%rcx)
movl -0x54(%rbp), %edx
movq -0x38(%rbp), %rax
movl -0x4c(%rbp), %ecx
shll %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movl %ecx, %esi
leaq 0x4b0a9(%rip), %rcx # 0x7f700
movq (%rcx,%rsi,8), %rcx
movl %edx, (%rax,%rcx)
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x3459b
movq -0x38(%rbp), %rax
movq $0x0, 0x78(%rax)
movq -0x10(%rbp), %rdi
callq 0x34960
cmpb $0x0, %al
je 0x3472d
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x4c(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
movq -0x30(%rbp), %rcx
movq 0x8(%rcx), %rcx
movl -0x4c(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
subq %rcx, %rax
cmpq $0x1, %rax
jle 0x34724
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x4c(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
movq -0x30(%rbp), %rcx
movq 0x8(%rcx), %rcx
movl -0x4c(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
subq %rcx, %rax
subq $0x1, %rax
movq %rax, -0x60(%rbp)
movq -0x20(%rbp), %rdi
callq 0x34370
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movq -0x38(%rbp), %rcx
movq %rax, 0x78(%rcx)
cmpq $0x0, %rax
je 0x34722
movq -0x20(%rbp), %rdi
movq -0x68(%rbp), %rsi
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x4c(%rbp), %ecx
movq (%rax,%rcx,8), %rdx
movq -0x60(%rbp), %rcx
callq 0x34990
jmp 0x34724
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x4c(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movzbl (%rax), %eax
movzwl %ax, %eax
movq -0x48(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
addl %ecx, %eax
movzwl %ax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x6c(%rax)
movq -0x48(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movzbl (%rax), %eax
movq -0x48(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x8, %ecx
addl %ecx, %eax
movq -0x48(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
shll $0x10, %ecx
addl %ecx, %eax
movq -0x48(%rbp), %rcx
movzbl 0x3(%rcx), %ecx
shll $0x18, %ecx
addl %ecx, %eax
movl %eax, %eax
movl %eax, %ecx
movq -0x38(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x48(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movzbl (%rax), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x70(%rax)
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movzbl (%rax), %eax
movzwl %ax, %eax
movq -0x48(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
addl %ecx, %eax
movzwl %ax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x64(%rax)
movq -0x48(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movsbl (%rax), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x68(%rax)
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x48(%rbp)
movq -0x38(%rbp), %rax
cmpl $0x9, 0x70(%rax)
ja 0x34850
movq -0x38(%rbp), %rax
cmpl $0x7, 0x70(%rax)
jne 0x34871
movq -0x38(%rbp), %rax
cmpq $0xe, 0x38(%rax)
je 0x34871
movq -0x38(%rbp), %rax
cmpq $0x8, 0x38(%rax)
je 0x34871
movq -0x38(%rbp), %rax
cmpl $0xd, 0x70(%rax)
je 0x34871
movq -0x38(%rbp), %rax
cmpl $0xf6, 0x70(%rax)
je 0x34871
movq -0x38(%rbp), %rax
cmpl $0x0, 0x70(%rax)
jne 0x34881
movq -0x38(%rbp), %rax
movl 0x64(%rax), %ecx
orl $0x8000, %ecx # imm = 0x8000
movl %ecx, 0x64(%rax)
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
movsbl -0x25(%rbp), %eax
cmpl $0x0, %eax
je 0x348ca
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x4c(%rbp), %ecx
cmpq $0x0, (%rax,%rcx,8)
je 0x348ca
movq -0x20(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x4c(%rbp), %ecx
movq (%rax,%rcx,8), %rsi
callq 0x3f530
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x30(%rax)
jmp 0x348d6
movq -0x38(%rbp), %rax
movq $0x0, 0x30(%rax)
movq -0x38(%rbp), %rax
movl $0x0, 0x60(%rax)
movq -0x38(%rbp), %rax
movq $0x0, 0x40(%rax)
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rax
addq $0x80, %rax
movq %rax, -0x38(%rbp)
jmp 0x3456d
movq -0x38(%rbp), %rax
movq -0x40(%rbp), %rcx
movl -0x24(%rbp), %edx
shlq $0x7, %rdx
addq %rdx, %rcx
cmpq %rcx, %rax
jae 0x34924
jmp 0x34937
movq -0x18(%rbp), %rdi
callq 0x30c20
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x34953
movq -0x18(%rbp), %rdi
callq 0x30c20
movq -0x20(%rbp), %rdi
xorl %esi, %esi
callq 0x3f420
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)
|
unpack_fields:
push rbp
mov rbp, rsp
sub rsp, 70h
mov al, r8b
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_24], ecx
mov [rbp+var_25], al
mov [rbp+var_50], 6
mov rdi, [rbp+var_20]
mov eax, [rbp+var_24]
mov esi, eax
shl rsi, 7
call ma_alloc_root
mov [rbp+var_40], rax
mov [rbp+var_38], rax
cmp [rbp+var_40], 0
jnz short loc_34562
mov [rbp+var_8], 0
jmp loc_34953
loc_34562:
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rbp+var_30], rax
loc_3456D:
cmp [rbp+var_30], 0
jz loc_3490B
mov rax, [rbp+var_38]
mov rcx, [rbp+var_40]
mov edx, [rbp+var_24]
shl rdx, 7
add rcx, rdx
cmp rax, rcx
jb short loc_34594
jmp loc_34937
loc_34594:
mov [rbp+var_4C], 0
loc_3459B:
mov eax, [rbp+var_4C]
cmp eax, [rbp+var_50]
jnb loc_3466C
mov rax, [rbp+var_30]
mov rax, [rax+8]
mov ecx, [rbp+var_4C]
add ecx, 1
mov ecx, ecx
mov rax, [rax+rcx*8]
mov rcx, [rbp+var_30]
mov rcx, [rcx+8]
mov edx, [rbp+var_4C]
mov rcx, [rcx+rdx*8]
sub rax, rcx
sub rax, 1
mov [rbp+var_54], eax
mov rax, [rbp+var_30]
mov rax, [rax+8]
mov ecx, [rbp+var_4C]
cmp qword ptr [rax+rcx*8], 0
jnz short loc_34606
mov rax, [rbp+var_30]
mov rax, [rax+8]
mov ecx, [rbp+var_4C]
mov rax, [rax+rcx*8]
mov ecx, [rbp+var_54]
movsx eax, byte ptr [rax+rcx]
cmp eax, 0
jz short loc_34606
jmp loc_34937
loc_34606:
mov rdi, [rbp+var_20]
mov rax, [rbp+var_30]
mov rax, [rax+8]
mov ecx, [rbp+var_4C]
mov rsi, [rax+rcx*8]
call ma_strdup_root
mov rdx, rax
mov rax, [rbp+var_38]
mov ecx, [rbp+var_4C]
shl ecx, 1
mov ecx, ecx
mov esi, ecx
lea rcx, rset_field_offsets
mov rcx, [rcx+rsi*8]
mov [rax+rcx], rdx
mov edx, [rbp+var_54]
mov rax, [rbp+var_38]
mov ecx, [rbp+var_4C]
shl ecx, 1
add ecx, 1
mov ecx, ecx
mov esi, ecx
lea rcx, rset_field_offsets
mov rcx, [rcx+rsi*8]
mov [rax+rcx], edx
mov eax, [rbp+var_4C]
add eax, 1
mov [rbp+var_4C], eax
jmp loc_3459B
loc_3466C:
mov rax, [rbp+var_38]
mov qword ptr [rax+78h], 0
mov rdi, [rbp+var_10]
call ma_has_extended_type_info
cmp al, 0
jz loc_3472D
mov rax, [rbp+var_30]
mov rax, [rax+8]
mov ecx, [rbp+var_4C]
add ecx, 1
mov ecx, ecx
mov rax, [rax+rcx*8]
mov rcx, [rbp+var_30]
mov rcx, [rcx+8]
mov edx, [rbp+var_4C]
mov rcx, [rcx+rdx*8]
sub rax, rcx
cmp rax, 1
jle short loc_34724
mov rax, [rbp+var_30]
mov rax, [rax+8]
mov ecx, [rbp+var_4C]
add ecx, 1
mov ecx, ecx
mov rax, [rax+rcx*8]
mov rcx, [rbp+var_30]
mov rcx, [rcx+8]
mov edx, [rbp+var_4C]
mov rcx, [rcx+rdx*8]
sub rax, rcx
sub rax, 1
mov [rbp+var_60], rax
mov rdi, [rbp+var_20]
call new_ma_field_extension
mov [rbp+var_68], rax
mov rax, [rbp+var_68]
mov rcx, [rbp+var_38]
mov [rcx+78h], rax
cmp rax, 0
jz short loc_34722
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_68]
mov rax, [rbp+var_30]
mov rax, [rax+8]
mov ecx, [rbp+var_4C]
mov rdx, [rax+rcx*8]
mov rcx, [rbp+var_60]
call ma_field_extension_init_type_info
loc_34722:
jmp short $+2
loc_34724:
mov eax, [rbp+var_4C]
add eax, 1
mov [rbp+var_4C], eax
loc_3472D:
mov rax, [rbp+var_30]
mov rax, [rax+8]
mov ecx, [rbp+var_4C]
mov rax, [rax+rcx*8]
mov [rbp+var_48], rax
mov rax, [rbp+var_48]
movzx eax, byte ptr [rax]
movzx eax, ax
mov rcx, [rbp+var_48]
movzx ecx, byte ptr [rcx+1]
movzx ecx, cx
shl ecx, 8
add eax, ecx
movzx ecx, ax
mov rax, [rbp+var_38]
mov [rax+6Ch], ecx
mov rax, [rbp+var_48]
add rax, 2
mov [rbp+var_48], rax
mov rax, [rbp+var_48]
movzx eax, byte ptr [rax]
mov rcx, [rbp+var_48]
movzx ecx, byte ptr [rcx+1]
shl ecx, 8
add eax, ecx
mov rcx, [rbp+var_48]
movzx ecx, byte ptr [rcx+2]
shl ecx, 10h
add eax, ecx
mov rcx, [rbp+var_48]
movzx ecx, byte ptr [rcx+3]
shl ecx, 18h
add eax, ecx
mov eax, eax
mov ecx, eax
mov rax, [rbp+var_38]
mov [rax+38h], rcx
mov rax, [rbp+var_48]
add rax, 4
mov [rbp+var_48], rax
mov rax, [rbp+var_48]
movzx ecx, byte ptr [rax]
mov rax, [rbp+var_38]
mov [rax+70h], ecx
mov rax, [rbp+var_48]
add rax, 1
mov [rbp+var_48], rax
mov rax, [rbp+var_48]
movzx eax, byte ptr [rax]
movzx eax, ax
mov rcx, [rbp+var_48]
movzx ecx, byte ptr [rcx+1]
movzx ecx, cx
shl ecx, 8
add eax, ecx
movzx ecx, ax
mov rax, [rbp+var_38]
mov [rax+64h], ecx
mov rax, [rbp+var_48]
add rax, 2
mov [rbp+var_48], rax
mov rax, [rbp+var_48]
movsx ecx, byte ptr [rax]
mov rax, [rbp+var_38]
mov [rax+68h], ecx
mov rax, [rbp+var_48]
add rax, 1
mov [rbp+var_48], rax
mov rax, [rbp+var_48]
add rax, 2
mov [rbp+var_48], rax
mov rax, [rbp+var_38]
cmp dword ptr [rax+70h], 9
ja short loc_34850
mov rax, [rbp+var_38]
cmp dword ptr [rax+70h], 7
jnz short loc_34871
mov rax, [rbp+var_38]
cmp qword ptr [rax+38h], 0Eh
jz short loc_34871
mov rax, [rbp+var_38]
cmp qword ptr [rax+38h], 8
jz short loc_34871
loc_34850:
mov rax, [rbp+var_38]
cmp dword ptr [rax+70h], 0Dh
jz short loc_34871
mov rax, [rbp+var_38]
cmp dword ptr [rax+70h], 0F6h
jz short loc_34871
mov rax, [rbp+var_38]
cmp dword ptr [rax+70h], 0
jnz short loc_34881
loc_34871:
mov rax, [rbp+var_38]
mov ecx, [rax+64h]
or ecx, 8000h
mov [rax+64h], ecx
loc_34881:
mov eax, [rbp+var_4C]
add eax, 1
mov [rbp+var_4C], eax
movsx eax, [rbp+var_25]
cmp eax, 0
jz short loc_348CA
mov rax, [rbp+var_30]
mov rax, [rax+8]
mov ecx, [rbp+var_4C]
cmp qword ptr [rax+rcx*8], 0
jz short loc_348CA
mov rdi, [rbp+var_20]
mov rax, [rbp+var_30]
mov rax, [rax+8]
mov ecx, [rbp+var_4C]
mov rsi, [rax+rcx*8]
call ma_strdup_root
mov rcx, rax
mov rax, [rbp+var_38]
mov [rax+30h], rcx
jmp short loc_348D6
loc_348CA:
mov rax, [rbp+var_38]
mov qword ptr [rax+30h], 0
loc_348D6:
mov rax, [rbp+var_38]
mov dword ptr [rax+60h], 0
mov rax, [rbp+var_38]
mov qword ptr [rax+40h], 0
mov rax, [rbp+var_30]
mov rax, [rax]
mov [rbp+var_30], rax
mov rax, [rbp+var_38]
add rax, 80h
mov [rbp+var_38], rax
jmp loc_3456D
loc_3490B:
mov rax, [rbp+var_38]
mov rcx, [rbp+var_40]
mov edx, [rbp+var_24]
shl rdx, 7
add rcx, rdx
cmp rax, rcx
jnb short loc_34924
jmp short loc_34937
loc_34924:
mov rdi, [rbp+var_18]
call free_rows
mov rax, [rbp+var_40]
mov [rbp+var_8], rax
jmp short loc_34953
loc_34937:
mov rdi, [rbp+var_18]
call free_rows
mov rdi, [rbp+var_20]
xor esi, esi
call ma_free_root
mov [rbp+var_8], 0
loc_34953:
mov rax, [rbp+var_8]
add rsp, 70h
pop rbp
retn
|
long long unpack_fields(long long a1, _QWORD *a2, long long a3, unsigned int a4, char a5)
{
long long v6; // [rsp+8h] [rbp-68h]
long long v7; // [rsp+10h] [rbp-60h]
unsigned int v8; // [rsp+1Ch] [rbp-54h]
unsigned int i; // [rsp+24h] [rbp-4Ch]
unsigned int v10; // [rsp+24h] [rbp-4Ch]
unsigned __int8 *v11; // [rsp+28h] [rbp-48h]
long long v12; // [rsp+30h] [rbp-40h]
unsigned long long v13; // [rsp+38h] [rbp-38h]
_QWORD *v14; // [rsp+40h] [rbp-30h]
v12 = ma_alloc_root(a3, (unsigned long long)a4 << 7);
v13 = v12;
if ( !v12 )
return 0LL;
v14 = (_QWORD *)*a2;
while ( v14 )
{
if ( v13 >= ((unsigned long long)a4 << 7) + v12 )
goto LABEL_31;
for ( i = 0; i < 6; ++i )
{
v8 = *(_QWORD *)(v14[1] + 8LL * (i + 1)) - *(_QWORD *)(v14[1] + 8LL * i) - 1;
if ( !*(_QWORD *)(v14[1] + 8LL * i) && *(_BYTE *)(*(_QWORD *)(v14[1] + 8LL * i) + v8) )
goto LABEL_31;
*(_QWORD *)(v13 + rset_field_offsets[2 * i]) = ma_strdup_root(a3, *(_QWORD *)(v14[1] + 8LL * i));
*(_DWORD *)(v13 + rset_field_offsets[2 * i + 1]) = v8;
}
*(_QWORD *)(v13 + 120) = 0LL;
if ( (unsigned __int8)ma_has_extended_type_info(a1) )
{
if ( (long long)(*(_QWORD *)(v14[1] + 8LL * (i + 1)) - *(_QWORD *)(v14[1] + 8LL * i)) > 1 )
{
v7 = *(_QWORD *)(v14[1] + 8LL * (i + 1)) - *(_QWORD *)(v14[1] + 8LL * i) - 1LL;
v6 = new_ma_field_extension(a3);
*(_QWORD *)(v13 + 120) = v6;
if ( v6 )
ma_field_extension_init_type_info(a3, v6, *(_QWORD *)(v14[1] + 8LL * i), v7);
}
++i;
}
v11 = *(unsigned __int8 **)(v14[1] + 8LL * i);
*(_DWORD *)(v13 + 108) = (unsigned __int16)((v11[1] << 8) + *v11);
v11 += 2;
*(_QWORD *)(v13 + 56) = (v11[3] << 24) + (v11[2] << 16) + (v11[1] << 8) + (unsigned int)*v11;
v11 += 4;
*(_DWORD *)(v13 + 112) = *v11++;
*(_DWORD *)(v13 + 100) = (unsigned __int16)((v11[1] << 8) + *v11);
*(_DWORD *)(v13 + 104) = (char)v11[2];
if ( *(_DWORD *)(v13 + 112) <= 9u
&& (*(_DWORD *)(v13 + 112) != 7 || *(_QWORD *)(v13 + 56) == 14LL || *(_QWORD *)(v13 + 56) == 8LL)
|| *(_DWORD *)(v13 + 112) == 13
|| *(_DWORD *)(v13 + 112) == 246
|| !*(_DWORD *)(v13 + 112) )
{
*(_DWORD *)(v13 + 100) |= 0x8000u;
}
v10 = i + 1;
if ( a5 && *(_QWORD *)(v14[1] + 8LL * v10) )
*(_QWORD *)(v13 + 48) = ma_strdup_root(a3, *(_QWORD *)(v14[1] + 8LL * v10));
else
*(_QWORD *)(v13 + 48) = 0LL;
*(_DWORD *)(v13 + 96) = 0;
*(_QWORD *)(v13 + 64) = 0LL;
v14 = (_QWORD *)*v14;
v13 += 128LL;
}
if ( v13 >= ((unsigned long long)a4 << 7) + v12 )
{
free_rows((long long)a2);
return v12;
}
LABEL_31:
free_rows((long long)a2);
ma_free_root(a3, 0LL);
return 0LL;
}
|
unpack_fields:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV AL,R8B
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV dword ptr [RBP + -0x24],ECX
MOV byte ptr [RBP + -0x25],AL
MOV dword ptr [RBP + -0x50],0x6
MOV RDI,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RBP + -0x24]
MOV ESI,EAX
SHL RSI,0x7
CALL 0x0013f1c0
MOV qword ptr [RBP + -0x40],RAX
MOV qword ptr [RBP + -0x38],RAX
CMP qword ptr [RBP + -0x40],0x0
JNZ 0x00134562
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00134953
LAB_00134562:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x30],RAX
LAB_0013456d:
CMP qword ptr [RBP + -0x30],0x0
JZ 0x0013490b
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x40]
MOV EDX,dword ptr [RBP + -0x24]
SHL RDX,0x7
ADD RCX,RDX
CMP RAX,RCX
JC 0x00134594
JMP 0x00134937
LAB_00134594:
MOV dword ptr [RBP + -0x4c],0x0
LAB_0013459b:
MOV EAX,dword ptr [RBP + -0x4c]
CMP EAX,dword ptr [RBP + -0x50]
JNC 0x0013466c
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x8]
MOV ECX,dword ptr [RBP + -0x4c]
ADD ECX,0x1
MOV ECX,ECX
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV RCX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RCX + 0x8]
MOV EDX,dword ptr [RBP + -0x4c]
MOV RCX,qword ptr [RCX + RDX*0x8]
SUB RAX,RCX
SUB RAX,0x1
MOV dword ptr [RBP + -0x54],EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x8]
MOV ECX,dword ptr [RBP + -0x4c]
CMP qword ptr [RAX + RCX*0x8],0x0
JNZ 0x00134606
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x8]
MOV ECX,dword ptr [RBP + -0x4c]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV ECX,dword ptr [RBP + -0x54]
MOVSX EAX,byte ptr [RAX + RCX*0x1]
CMP EAX,0x0
JZ 0x00134606
JMP 0x00134937
LAB_00134606:
MOV RDI,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x8]
MOV ECX,dword ptr [RBP + -0x4c]
MOV RSI,qword ptr [RAX + RCX*0x8]
CALL 0x0013f530
MOV RDX,RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RBP + -0x4c]
SHL ECX,0x1
MOV ECX,ECX
MOV ESI,ECX
LEA RCX,[0x17f700]
MOV RCX,qword ptr [RCX + RSI*0x8]
MOV qword ptr [RAX + RCX*0x1],RDX
MOV EDX,dword ptr [RBP + -0x54]
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RBP + -0x4c]
SHL ECX,0x1
ADD ECX,0x1
MOV ECX,ECX
MOV ESI,ECX
LEA RCX,[0x17f700]
MOV RCX,qword ptr [RCX + RSI*0x8]
MOV dword ptr [RAX + RCX*0x1],EDX
MOV EAX,dword ptr [RBP + -0x4c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x4c],EAX
JMP 0x0013459b
LAB_0013466c:
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x78],0x0
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00134960
CMP AL,0x0
JZ 0x0013472d
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x8]
MOV ECX,dword ptr [RBP + -0x4c]
ADD ECX,0x1
MOV ECX,ECX
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV RCX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RCX + 0x8]
MOV EDX,dword ptr [RBP + -0x4c]
MOV RCX,qword ptr [RCX + RDX*0x8]
SUB RAX,RCX
CMP RAX,0x1
JLE 0x00134724
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x8]
MOV ECX,dword ptr [RBP + -0x4c]
ADD ECX,0x1
MOV ECX,ECX
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV RCX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RCX + 0x8]
MOV EDX,dword ptr [RBP + -0x4c]
MOV RCX,qword ptr [RCX + RDX*0x8]
SUB RAX,RCX
SUB RAX,0x1
MOV qword ptr [RBP + -0x60],RAX
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x00134370
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x68]
MOV RCX,qword ptr [RBP + -0x38]
MOV qword ptr [RCX + 0x78],RAX
CMP RAX,0x0
JZ 0x00134722
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x68]
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x8]
MOV ECX,dword ptr [RBP + -0x4c]
MOV RDX,qword ptr [RAX + RCX*0x8]
MOV RCX,qword ptr [RBP + -0x60]
CALL 0x00134990
LAB_00134722:
JMP 0x00134724
LAB_00134724:
MOV EAX,dword ptr [RBP + -0x4c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x4c],EAX
LAB_0013472d:
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x8]
MOV ECX,dword ptr [RBP + -0x4c]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x48]
MOVZX EAX,byte ptr [RAX]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x48]
MOVZX ECX,byte ptr [RCX + 0x1]
MOVZX ECX,CX
SHL ECX,0x8
ADD EAX,ECX
MOVZX ECX,AX
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x6c],ECX
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,0x2
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x48]
MOVZX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x48]
MOVZX ECX,byte ptr [RCX + 0x1]
SHL ECX,0x8
ADD EAX,ECX
MOV RCX,qword ptr [RBP + -0x48]
MOVZX ECX,byte ptr [RCX + 0x2]
SHL ECX,0x10
ADD EAX,ECX
MOV RCX,qword ptr [RBP + -0x48]
MOVZX ECX,byte ptr [RCX + 0x3]
SHL ECX,0x18
ADD EAX,ECX
MOV EAX,EAX
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x38],RCX
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,0x4
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x48]
MOVZX ECX,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x70],ECX
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,0x1
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x48]
MOVZX EAX,byte ptr [RAX]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x48]
MOVZX ECX,byte ptr [RCX + 0x1]
MOVZX ECX,CX
SHL ECX,0x8
ADD EAX,ECX
MOVZX ECX,AX
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x64],ECX
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,0x2
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x48]
MOVSX ECX,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x68],ECX
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,0x1
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,0x2
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x38]
CMP dword ptr [RAX + 0x70],0x9
JA 0x00134850
MOV RAX,qword ptr [RBP + -0x38]
CMP dword ptr [RAX + 0x70],0x7
JNZ 0x00134871
MOV RAX,qword ptr [RBP + -0x38]
CMP qword ptr [RAX + 0x38],0xe
JZ 0x00134871
MOV RAX,qword ptr [RBP + -0x38]
CMP qword ptr [RAX + 0x38],0x8
JZ 0x00134871
LAB_00134850:
MOV RAX,qword ptr [RBP + -0x38]
CMP dword ptr [RAX + 0x70],0xd
JZ 0x00134871
MOV RAX,qword ptr [RBP + -0x38]
CMP dword ptr [RAX + 0x70],0xf6
JZ 0x00134871
MOV RAX,qword ptr [RBP + -0x38]
CMP dword ptr [RAX + 0x70],0x0
JNZ 0x00134881
LAB_00134871:
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RAX + 0x64]
OR ECX,0x8000
MOV dword ptr [RAX + 0x64],ECX
LAB_00134881:
MOV EAX,dword ptr [RBP + -0x4c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x4c],EAX
MOVSX EAX,byte ptr [RBP + -0x25]
CMP EAX,0x0
JZ 0x001348ca
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x8]
MOV ECX,dword ptr [RBP + -0x4c]
CMP qword ptr [RAX + RCX*0x8],0x0
JZ 0x001348ca
MOV RDI,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x8]
MOV ECX,dword ptr [RBP + -0x4c]
MOV RSI,qword ptr [RAX + RCX*0x8]
CALL 0x0013f530
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x30],RCX
JMP 0x001348d6
LAB_001348ca:
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x30],0x0
LAB_001348d6:
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x60],0x0
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x40],0x0
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x80
MOV qword ptr [RBP + -0x38],RAX
JMP 0x0013456d
LAB_0013490b:
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x40]
MOV EDX,dword ptr [RBP + -0x24]
SHL RDX,0x7
ADD RCX,RDX
CMP RAX,RCX
JNC 0x00134924
JMP 0x00134937
LAB_00134924:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00130c20
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00134953
LAB_00134937:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00130c20
MOV RDI,qword ptr [RBP + -0x20]
XOR ESI,ESI
CALL 0x0013f420
MOV qword ptr [RBP + -0x8],0x0
LAB_00134953:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x70
POP RBP
RET
|
ulong unpack_fields(int8 param_1,int8 *param_2,int8 param_3,uint param_4,
char param_5)
{
long lVar1;
long lVar2;
byte *pbVar3;
char cVar4;
uint uVar5;
int8 uVar6;
long lVar7;
uint local_54;
ulong local_40;
int8 *local_38;
ulong local_10;
local_10 = ma_alloc_root(param_3,(ulong)param_4 << 7);
if (local_10 == 0) {
local_10 = 0;
}
else {
local_40 = local_10;
for (local_38 = (int8 *)*param_2; local_38 != (int8 *)0x0;
local_38 = (int8 *)*local_38) {
if (local_10 + (ulong)param_4 * 0x80 <= local_40) goto LAB_00134937;
for (local_54 = 0; local_54 < 6; local_54 = local_54 + 1) {
uVar5 = ((int)*(int8 *)(local_38[1] + (ulong)(local_54 + 1) * 8) -
(int)*(int8 *)(local_38[1] + (ulong)local_54 * 8)) - 1;
if ((*(long *)(local_38[1] + (ulong)local_54 * 8) == 0) &&
(*(char *)(*(long *)(local_38[1] + (ulong)local_54 * 8) + (ulong)uVar5) != '\0'))
goto LAB_00134937;
uVar6 = ma_strdup_root(param_3,*(int8 *)(local_38[1] + (ulong)local_54 * 8));
*(int8 *)(local_40 + *(long *)(rset_field_offsets + (ulong)(local_54 << 1) * 8)) =
uVar6;
*(uint *)(local_40 + *(long *)(rset_field_offsets + (ulong)(local_54 * 2 + 1) * 8)) = uVar5;
}
*(int8 *)(local_40 + 0x78) = 0;
cVar4 = ma_has_extended_type_info(param_1);
if (cVar4 != '\0') {
if (1 < *(long *)(local_38[1] + (ulong)(local_54 + 1) * 8) -
*(long *)(local_38[1] + (ulong)local_54 * 8)) {
lVar1 = *(long *)(local_38[1] + (ulong)(local_54 + 1) * 8);
lVar2 = *(long *)(local_38[1] + (ulong)local_54 * 8);
lVar7 = new_ma_field_extension(param_3);
*(long *)(local_40 + 0x78) = lVar7;
if (lVar7 != 0) {
ma_field_extension_init_type_info
(param_3,lVar7,*(int8 *)(local_38[1] + (ulong)local_54 * 8),
(lVar1 - lVar2) + -1);
}
}
local_54 = local_54 + 1;
}
pbVar3 = *(byte **)(local_38[1] + (ulong)local_54 * 8);
*(uint *)(local_40 + 0x6c) = (uint)*pbVar3 + (uint)pbVar3[1] * 0x100 & 0xffff;
*(ulong *)(local_40 + 0x38) =
(ulong)((uint)pbVar3[2] + (uint)pbVar3[3] * 0x100 + (uint)pbVar3[4] * 0x10000 +
(uint)pbVar3[5] * 0x1000000);
*(uint *)(local_40 + 0x70) = (uint)pbVar3[6];
*(uint *)(local_40 + 100) = (uint)pbVar3[7] + (uint)pbVar3[8] * 0x100 & 0xffff;
*(int *)(local_40 + 0x68) = (int)(char)pbVar3[9];
if (((*(uint *)(local_40 + 0x70) < 10) &&
(((*(int *)(local_40 + 0x70) != 7 || (*(long *)(local_40 + 0x38) == 0xe)) ||
(*(long *)(local_40 + 0x38) == 8)))) ||
(((*(int *)(local_40 + 0x70) == 0xd || (*(int *)(local_40 + 0x70) == 0xf6)) ||
(*(int *)(local_40 + 0x70) == 0)))) {
*(uint *)(local_40 + 100) = *(uint *)(local_40 + 100) | 0x8000;
}
if ((param_5 == '\0') || (*(long *)(local_38[1] + (ulong)(local_54 + 1) * 8) == 0)) {
*(int8 *)(local_40 + 0x30) = 0;
}
else {
uVar6 = ma_strdup_root(param_3,*(int8 *)(local_38[1] + (ulong)(local_54 + 1) * 8));
*(int8 *)(local_40 + 0x30) = uVar6;
}
*(int4 *)(local_40 + 0x60) = 0;
*(int8 *)(local_40 + 0x40) = 0;
local_40 = local_40 + 0x80;
}
if (local_40 < local_10 + (ulong)param_4 * 0x80) {
LAB_00134937:
free_rows(param_2);
ma_free_root(param_3,0);
local_10 = 0;
}
else {
free_rows(param_2);
}
}
return local_10;
}
|
|
20,158
|
unpack_fields
|
eloqsql/libmariadb/libmariadb/mariadb_lib.c
|
MYSQL_FIELD *
unpack_fields(const MYSQL *mysql,
MYSQL_DATA *data, MA_MEM_ROOT *alloc, uint fields,
my_bool default_value)
{
MYSQL_ROWS *row;
MYSQL_FIELD *field,*result;
char *p;
unsigned int i, field_count= sizeof(rset_field_offsets)/sizeof(size_t)/2;
field=result=(MYSQL_FIELD*) ma_alloc_root(alloc,sizeof(MYSQL_FIELD)*fields);
if (!result)
return(0);
for (row=data->data; row ; row = row->next,field++)
{
if (field >= result + fields)
goto error;
for (i=0; i < field_count; i++)
{
uint length= (uint)(row->data[i+1] - row->data[i] - 1);
if (!row->data[i] && row->data[i][length])
goto error;
*(char **)(((char *)field) + rset_field_offsets[i*2])=
ma_strdup_root(alloc, (char *)row->data[i]);
*(unsigned int *)(((char *)field) + rset_field_offsets[i*2+1])= length;
}
field->extension= NULL;
if (ma_has_extended_type_info(mysql))
{
if (row->data[i+1] - row->data[i] > 1)
{
size_t len= row->data[i+1] - row->data[i] - 1;
MA_FIELD_EXTENSION *ext= new_ma_field_extension(alloc);
if ((field->extension= ext))
ma_field_extension_init_type_info(alloc, ext, row->data[i], len);
}
i++;
}
p= (char *)row->data[i];
/* filler */
field->charsetnr= uint2korr(p);
p+= 2;
field->length= (uint) uint4korr(p);
p+= 4;
field->type= (enum enum_field_types)uint1korr(p);
p++;
field->flags= uint2korr(p);
p+= 2;
field->decimals= (uint) p[0];
p++;
/* filler */
p+= 2;
if (INTERNAL_NUM_FIELD(field))
field->flags|= NUM_FLAG;
i++;
/* This is used by deprecated function mysql_list_fields only,
however the reported length is not correct, so we always zero it */
if (default_value && row->data[i])
field->def=ma_strdup_root(alloc,(char*) row->data[i]);
else
field->def=0;
field->def_length= 0;
field->max_length= 0;
}
if (field < result + fields)
goto error;
free_rows(data); /* Free old data */
return(result);
error:
free_rows(data);
ma_free_root(alloc, MYF(0));
return(0);
}
|
O3
|
c
|
unpack_fields:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r8d, -0x3c(%rbp)
movq %rsi, %rbx
movq %rdi, -0x68(%rbp)
movl %ecx, %esi
shlq $0x7, %rsi
movq %rdx, %r14
movq %rdx, %rdi
movq %rsi, -0x50(%rbp)
callq 0x2f423
testq %rax, %rax
je 0x293a7
movq %rbx, -0x48(%rbp)
movq (%rbx), %rcx
movq %rax, -0x38(%rbp)
movq %rax, %r8
testq %rcx, %rcx
movq %r14, %rdi
je 0x29380
movq %rcx, %r13
movq -0x38(%rbp), %r15
movq -0x50(%rbp), %rax
addq %r15, %rax
movq %rax, -0x60(%rbp)
leaq 0x2611f(%rip), %r12 # 0x4f2a0
movq %r15, %r8
movq %rdi, -0x58(%rbp)
cmpq -0x60(%rbp), %r8
jae 0x2938d
xorl %ebx, %ebx
movq %r13, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rbx,%rax), %rsi
movl %esi, %r14d
notl %r14d
addl 0x8(%rbx,%rax), %r14d
movq %rdi, %r15
movq %r8, %r13
callq 0x2f5c6
movq %r13, %r8
movq %r15, %rdi
movq (%r12,%rbx,2), %rcx
movq 0x8(%r12,%rbx,2), %rdx
movq %rax, (%r13,%rcx)
movl %r14d, (%r13,%rdx)
addq $0x8, %rbx
cmpq $0x30, %rbx
jne 0x29198
movq $0x0, 0x78(%r8)
movq -0x68(%rbp), %rax
movq 0x4f0(%rax), %rax
movl $0x6, %r9d
testb $0x8, 0x70(%rax)
movq -0x30(%rbp), %r10
je 0x292cb
movq 0x8(%r10), %rax
movq 0x38(%rax), %rbx
subq 0x30(%rax), %rbx
cmpq $0x2, %rbx
jl 0x292c1
movl $0x20, %esi
callq 0x2f423
testq %rax, %rax
je 0x292b3
movq %rax, %r12
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movq %r13, %r8
movq %rax, 0x78(%r13)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x30(%rax), %rsi
leaq (%rsi,%rbx), %rax
decq %rax
movq %r15, %rdi
movq %rax, -0x70(%rbp)
movzbl 0x1(%rsi), %ebx
testb %bl, %bl
js 0x292c1
leaq (%rsi,%rbx), %r14
addq $0x2, %r14
cmpq %rax, %r14
ja 0x292c1
movzbl (%rsi), %r15d
cmpb $0x1, %r15b
ja 0x292a5
addq $0x2, %rsi
shll $0x4, %r15d
movq -0x58(%rbp), %rdi
movq %rbx, %rdx
callq 0x2f617
movq %r13, %r8
testq %rax, %rax
cmoveq %rax, %rbx
movq %rax, (%r12,%r15)
movq -0x70(%rbp), %rax
movq %rbx, 0x8(%r12,%r15)
movq %r14, %rsi
cmpq %rax, %r14
movq -0x58(%rbp), %rdi
jb 0x2925b
jmp 0x292c1
movq %r13, %r8
movq $0x0, 0x78(%r13)
movq %r15, %rdi
movl $0x7, %r9d
movq -0x30(%rbp), %r10
movq 0x8(%r10), %rax
movq (%rax,%r9,8), %rsi
movzwl (%rsi), %eax
movl %eax, 0x6c(%r8)
movl 0x2(%rsi), %ecx
movq %rcx, 0x38(%r8)
movzbl 0x6(%rsi), %edx
movl %edx, 0x70(%r8)
movzwl 0x7(%rsi), %eax
movl %eax, 0x64(%r8)
movsbl 0x9(%rsi), %esi
movl %esi, 0x68(%r8)
cmpl $0x9, %edx
ja 0x29310
cmpl $0x7, %edx
jne 0x2931d
cmpq $0x8, %rcx
je 0x2931d
cmpl $0xe, %ecx
je 0x2931d
jmp 0x29326
cmpl $0xf6, %edx
je 0x2931d
cmpl $0xd, %edx
jne 0x29326
orl $0x8000, %eax # imm = 0x8000
movl %eax, 0x64(%r8)
cmpb $0x0, -0x3c(%rbp)
je 0x29350
movq 0x8(%r10), %rax
movq 0x8(%rax,%r9,8), %rsi
testq %rsi, %rsi
je 0x29350
movq %r10, %r14
movq %rdi, %rbx
callq 0x2f5c6
movq %r13, %r8
movq %rbx, %rdi
movq %r14, %r10
jmp 0x29352
xorl %eax, %eax
movq %rax, 0x30(%r8)
movl $0x0, 0x60(%r8)
movq $0x0, 0x40(%r8)
subq $-0x80, %r8
movq (%r10), %r10
movq %r10, %r13
testq %r10, %r10
leaq 0x25f26(%rip), %r12 # 0x4f2a0
jne 0x29188
movq -0x38(%rbp), %rax
addq -0x50(%rbp), %rax
cmpq %rax, %r8
jae 0x293ab
movq %rdi, %r14
movq -0x48(%rbp), %rdi
callq 0x2703e
xorl %ebx, %ebx
movq %r14, %rdi
xorl %esi, %esi
callq 0x2f53b
jmp 0x293b8
xorl %ebx, %ebx
jmp 0x293b8
movq -0x48(%rbp), %rdi
callq 0x2703e
movq -0x38(%rbp), %rbx
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
unpack_fields:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov [rbp+var_3C], r8d
mov rbx, rsi
mov [rbp+var_68], rdi
mov esi, ecx
shl rsi, 7
mov r14, rdx
mov rdi, rdx
mov [rbp+var_50], rsi
call ma_alloc_root
test rax, rax
jz loc_293A7
mov [rbp+var_48], rbx
mov rcx, [rbx]
mov [rbp+var_38], rax
mov r8, rax
test rcx, rcx
mov rdi, r14
jz loc_29380
mov r13, rcx
mov r15, [rbp+var_38]
mov rax, [rbp+var_50]
add rax, r15
mov [rbp+var_60], rax
lea r12, rset_field_offsets
mov r8, r15
mov [rbp+var_58], rdi
loc_29188:
cmp r8, [rbp+var_60]
jnb loc_2938D
xor ebx, ebx
mov [rbp+var_30], r13
loc_29198:
mov rax, [rbp+var_30]
mov rax, [rax+8]
mov rsi, [rbx+rax]
mov r14d, esi
not r14d
add r14d, [rbx+rax+8]
mov r15, rdi
mov r13, r8
call ma_strdup_root
mov r8, r13
mov rdi, r15
mov rcx, [r12+rbx*2]
mov rdx, [r12+rbx*2+8]
mov [r13+rcx+0], rax
mov [r13+rdx+0], r14d
add rbx, 8
cmp rbx, 30h ; '0'
jnz short loc_29198
mov qword ptr [r8+78h], 0
mov rax, [rbp+var_68]
mov rax, [rax+4F0h]
mov r9d, 6
test byte ptr [rax+70h], 8
mov r10, [rbp+var_30]
jz loc_292CB
mov rax, [r10+8]
mov rbx, [rax+38h]
sub rbx, [rax+30h]
cmp rbx, 2
jl loc_292C1
mov esi, 20h ; ' '
call ma_alloc_root
test rax, rax
jz loc_292B3
mov r12, rax
xorps xmm0, xmm0
movups xmmword ptr [rax+10h], xmm0
movups xmmword ptr [rax], xmm0
mov r8, r13
mov [r13+78h], rax
mov rax, [rbp+var_30]
mov rax, [rax+8]
mov rsi, [rax+30h]
lea rax, [rsi+rbx]
dec rax
mov rdi, r15
mov [rbp+var_70], rax
loc_2925B:
movzx ebx, byte ptr [rsi+1]
test bl, bl
js short loc_292C1
lea r14, [rsi+rbx]
add r14, 2
cmp r14, rax
ja short loc_292C1
movzx r15d, byte ptr [rsi]
cmp r15b, 1
ja short loc_292A5
add rsi, 2
shl r15d, 4
mov rdi, [rbp+var_58]
mov rdx, rbx
call ma_memdup_root
mov r8, r13
test rax, rax
cmovz rbx, rax
mov [r12+r15], rax
mov rax, [rbp+var_70]
mov [r12+r15+8], rbx
loc_292A5:
mov rsi, r14
cmp r14, rax
mov rdi, [rbp+var_58]
jb short loc_2925B
jmp short loc_292C1
loc_292B3:
mov r8, r13
mov qword ptr [r13+78h], 0
mov rdi, r15
loc_292C1:
mov r9d, 7
mov r10, [rbp+var_30]
loc_292CB:
mov rax, [r10+8]
mov rsi, [rax+r9*8]
movzx eax, word ptr [rsi]
mov [r8+6Ch], eax
mov ecx, [rsi+2]
mov [r8+38h], rcx
movzx edx, byte ptr [rsi+6]
mov [r8+70h], edx
movzx eax, word ptr [rsi+7]
mov [r8+64h], eax
movsx esi, byte ptr [rsi+9]
mov [r8+68h], esi
cmp edx, 9
ja short loc_29310
cmp edx, 7
jnz short loc_2931D
cmp rcx, 8
jz short loc_2931D
cmp ecx, 0Eh
jz short loc_2931D
jmp short loc_29326
loc_29310:
cmp edx, 0F6h
jz short loc_2931D
cmp edx, 0Dh
jnz short loc_29326
loc_2931D:
or eax, 8000h
mov [r8+64h], eax
loc_29326:
cmp byte ptr [rbp+var_3C], 0
jz short loc_29350
mov rax, [r10+8]
mov rsi, [rax+r9*8+8]
test rsi, rsi
jz short loc_29350
mov r14, r10
mov rbx, rdi
call ma_strdup_root
mov r8, r13
mov rdi, rbx
mov r10, r14
jmp short loc_29352
loc_29350:
xor eax, eax
loc_29352:
mov [r8+30h], rax
mov dword ptr [r8+60h], 0
mov qword ptr [r8+40h], 0
sub r8, 0FFFFFFFFFFFFFF80h
mov r10, [r10]
mov r13, r10
test r10, r10
lea r12, rset_field_offsets
jnz loc_29188
loc_29380:
mov rax, [rbp+var_38]
add rax, [rbp+var_50]
cmp r8, rax
jnb short loc_293AB
loc_2938D:
mov r14, rdi
mov rdi, [rbp+var_48]
call free_rows
xor ebx, ebx
mov rdi, r14
xor esi, esi
call ma_free_root
jmp short loc_293B8
loc_293A7:
xor ebx, ebx
jmp short loc_293B8
loc_293AB:
mov rdi, [rbp+var_48]
call free_rows
mov rbx, [rbp+var_38]
loc_293B8:
mov rax, rbx
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long unpack_fields(long long a1, _QWORD *a2, long long a3, unsigned int a4, char a5)
{
long long v6; // rax
unsigned long long v7; // r8
long long v8; // rdi
_QWORD *v9; // r13
long long v10; // rbx
unsigned int v11; // r14d
unsigned long long v12; // r13
long long v13; // rax
long long v14; // rdx
long long v15; // r9
_QWORD *v16; // r10
long long v17; // rbx
_OWORD *v18; // rax
_OWORD *v19; // r12
unsigned __int8 *v20; // rsi
unsigned long long v21; // rax
long long v22; // rbx
unsigned long long v23; // r14
unsigned int v24; // r15d
unsigned int v25; // r15d
long long v26; // rax
unsigned __int16 *v27; // rsi
long long v28; // rcx
unsigned int v29; // edx
int v30; // eax
_QWORD *v31; // r14
long long v32; // rax
long long v33; // rbx
unsigned long long v35; // [rsp+0h] [rbp-70h]
unsigned long long v37; // [rsp+10h] [rbp-60h]
long long v38; // [rsp+18h] [rbp-58h]
unsigned long long v39; // [rsp+20h] [rbp-50h]
long long v42; // [rsp+38h] [rbp-38h]
_QWORD *v43; // [rsp+40h] [rbp-30h]
v39 = (unsigned long long)a4 << 7;
v6 = ma_alloc_root(a3, v39);
if ( !v6 )
return 0LL;
v42 = v6;
v7 = v6;
v8 = a3;
if ( *a2 )
{
v9 = (_QWORD *)*a2;
v37 = v6 + v39;
v7 = v6;
v38 = a3;
do
{
if ( v7 >= v37 )
goto LABEL_35;
v10 = 0LL;
v43 = v9;
do
{
v11 = *(_DWORD *)(v10 + v43[1] + 8) + ~(unsigned int)*(_QWORD *)(v10 + v43[1]);
v12 = v7;
v13 = ma_strdup_root();
v7 = v12;
v14 = *(_QWORD *)((char *)&rset_field_offsets + 2 * v10 + 8);
*(_QWORD *)(v12 + *(_QWORD *)((char *)&rset_field_offsets + 2 * v10)) = v13;
*(_DWORD *)(v12 + v14) = v11;
v10 += 8LL;
}
while ( v10 != 48 );
*(_QWORD *)(v12 + 120) = 0LL;
v15 = 6LL;
v16 = v43;
if ( (*(_BYTE *)(*(_QWORD *)(a1 + 1264) + 112LL) & 8) != 0 )
{
v17 = *(_QWORD *)(v43[1] + 56LL) - *(_QWORD *)(v43[1] + 48LL);
if ( v17 >= 2 )
{
v18 = (_OWORD *)ma_alloc_root(v8, 32LL);
if ( v18 )
{
v19 = v18;
v18[1] = 0LL;
*v18 = 0LL;
v7 = v12;
*(_QWORD *)(v12 + 120) = v18;
v20 = *(unsigned __int8 **)(v43[1] + 48LL);
v21 = (unsigned long long)&v20[v17 - 1];
v35 = v21;
do
{
v22 = v20[1];
if ( (v22 & 0x80u) != 0LL )
break;
v23 = (unsigned long long)&v20[v22 + 2];
if ( v23 > v21 )
break;
v24 = *v20;
if ( (unsigned __int8)v24 <= 1u )
{
v25 = v24;
v26 = ma_memdup_root(v38, v20 + 2, v22);
v7 = v12;
if ( !v26 )
v22 = 0LL;
*(_QWORD *)&v19[v25] = v26;
v21 = v35;
*((_QWORD *)&v19[v25] + 1) = v22;
}
v20 = (unsigned __int8 *)v23;
v8 = v38;
}
while ( v23 < v21 );
}
else
{
v7 = v12;
*(_QWORD *)(v12 + 120) = 0LL;
}
}
v15 = 7LL;
v16 = v43;
}
v27 = *(unsigned __int16 **)(v16[1] + 8 * v15);
*(_DWORD *)(v7 + 108) = *v27;
v28 = *(unsigned int *)(v27 + 1);
*(_QWORD *)(v7 + 56) = v28;
v29 = *((unsigned __int8 *)v27 + 6);
*(_DWORD *)(v7 + 112) = v29;
v30 = *(unsigned __int16 *)((char *)v27 + 7);
*(_DWORD *)(v7 + 100) = v30;
*(_DWORD *)(v7 + 104) = *((char *)v27 + 9);
if ( v29 > 9 )
{
if ( v29 != 246 && v29 != 13 )
goto LABEL_29;
}
else if ( v29 == 7 && v28 != 8 && (_DWORD)v28 != 14 )
{
goto LABEL_29;
}
*(_DWORD *)(v7 + 100) = v30 | 0x8000;
LABEL_29:
if ( a5 && *(_QWORD *)(v16[1] + 8 * v15 + 8) )
{
v31 = v16;
v32 = ma_strdup_root();
v7 = v12;
v16 = v31;
}
else
{
v32 = 0LL;
}
*(_QWORD *)(v7 + 48) = v32;
*(_DWORD *)(v7 + 96) = 0;
*(_QWORD *)(v7 + 64) = 0LL;
v7 += 128LL;
v9 = (_QWORD *)*v16;
}
while ( *v16 );
}
if ( v7 >= v39 + v42 )
{
free_rows((long long)a2);
return v42;
}
else
{
LABEL_35:
free_rows((long long)a2);
v33 = 0LL;
ma_free_root(v8, 0LL);
}
return v33;
}
|
unpack_fields:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV dword ptr [RBP + -0x3c],R8D
MOV RBX,RSI
MOV qword ptr [RBP + -0x68],RDI
MOV ESI,ECX
SHL RSI,0x7
MOV R14,RDX
MOV RDI,RDX
MOV qword ptr [RBP + -0x50],RSI
CALL 0x0012f423
TEST RAX,RAX
JZ 0x001293a7
MOV qword ptr [RBP + -0x48],RBX
MOV RCX,qword ptr [RBX]
MOV qword ptr [RBP + -0x38],RAX
MOV R8,RAX
TEST RCX,RCX
MOV RDI,R14
JZ 0x00129380
MOV R13,RCX
MOV R15,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,R15
MOV qword ptr [RBP + -0x60],RAX
LEA R12,[0x14f2a0]
MOV R8,R15
MOV qword ptr [RBP + -0x58],RDI
LAB_00129188:
CMP R8,qword ptr [RBP + -0x60]
JNC 0x0012938d
XOR EBX,EBX
MOV qword ptr [RBP + -0x30],R13
LAB_00129198:
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x8]
MOV RSI,qword ptr [RBX + RAX*0x1]
MOV R14D,ESI
NOT R14D
ADD R14D,dword ptr [RBX + RAX*0x1 + 0x8]
MOV R15,RDI
MOV R13,R8
CALL 0x0012f5c6
MOV R8,R13
MOV RDI,R15
MOV RCX,qword ptr [R12 + RBX*0x2]
MOV RDX,qword ptr [R12 + RBX*0x2 + 0x8]
MOV qword ptr [R13 + RCX*0x1],RAX
MOV dword ptr [R13 + RDX*0x1],R14D
ADD RBX,0x8
CMP RBX,0x30
JNZ 0x00129198
MOV qword ptr [R8 + 0x78],0x0
MOV RAX,qword ptr [RBP + -0x68]
MOV RAX,qword ptr [RAX + 0x4f0]
MOV R9D,0x6
TEST byte ptr [RAX + 0x70],0x8
MOV R10,qword ptr [RBP + -0x30]
JZ 0x001292cb
MOV RAX,qword ptr [R10 + 0x8]
MOV RBX,qword ptr [RAX + 0x38]
SUB RBX,qword ptr [RAX + 0x30]
CMP RBX,0x2
JL 0x001292c1
MOV ESI,0x20
CALL 0x0012f423
TEST RAX,RAX
JZ 0x001292b3
MOV R12,RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + 0x10],XMM0
MOVUPS xmmword ptr [RAX],XMM0
MOV R8,R13
MOV qword ptr [R13 + 0x78],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x8]
MOV RSI,qword ptr [RAX + 0x30]
LEA RAX,[RSI + RBX*0x1]
DEC RAX
MOV RDI,R15
MOV qword ptr [RBP + -0x70],RAX
LAB_0012925b:
MOVZX EBX,byte ptr [RSI + 0x1]
TEST BL,BL
JS 0x001292c1
LEA R14,[RSI + RBX*0x1]
ADD R14,0x2
CMP R14,RAX
JA 0x001292c1
MOVZX R15D,byte ptr [RSI]
CMP R15B,0x1
JA 0x001292a5
ADD RSI,0x2
SHL R15D,0x4
MOV RDI,qword ptr [RBP + -0x58]
MOV RDX,RBX
CALL 0x0012f617
MOV R8,R13
TEST RAX,RAX
CMOVZ RBX,RAX
MOV qword ptr [R12 + R15*0x1],RAX
MOV RAX,qword ptr [RBP + -0x70]
MOV qword ptr [R12 + R15*0x1 + 0x8],RBX
LAB_001292a5:
MOV RSI,R14
CMP R14,RAX
MOV RDI,qword ptr [RBP + -0x58]
JC 0x0012925b
JMP 0x001292c1
LAB_001292b3:
MOV R8,R13
MOV qword ptr [R13 + 0x78],0x0
MOV RDI,R15
LAB_001292c1:
MOV R9D,0x7
MOV R10,qword ptr [RBP + -0x30]
LAB_001292cb:
MOV RAX,qword ptr [R10 + 0x8]
MOV RSI,qword ptr [RAX + R9*0x8]
MOVZX EAX,word ptr [RSI]
MOV dword ptr [R8 + 0x6c],EAX
MOV ECX,dword ptr [RSI + 0x2]
MOV qword ptr [R8 + 0x38],RCX
MOVZX EDX,byte ptr [RSI + 0x6]
MOV dword ptr [R8 + 0x70],EDX
MOVZX EAX,word ptr [RSI + 0x7]
MOV dword ptr [R8 + 0x64],EAX
MOVSX ESI,byte ptr [RSI + 0x9]
MOV dword ptr [R8 + 0x68],ESI
CMP EDX,0x9
JA 0x00129310
CMP EDX,0x7
JNZ 0x0012931d
CMP RCX,0x8
JZ 0x0012931d
CMP ECX,0xe
JZ 0x0012931d
JMP 0x00129326
LAB_00129310:
CMP EDX,0xf6
JZ 0x0012931d
CMP EDX,0xd
JNZ 0x00129326
LAB_0012931d:
OR EAX,0x8000
MOV dword ptr [R8 + 0x64],EAX
LAB_00129326:
CMP byte ptr [RBP + -0x3c],0x0
JZ 0x00129350
MOV RAX,qword ptr [R10 + 0x8]
MOV RSI,qword ptr [RAX + R9*0x8 + 0x8]
TEST RSI,RSI
JZ 0x00129350
MOV R14,R10
MOV RBX,RDI
CALL 0x0012f5c6
MOV R8,R13
MOV RDI,RBX
MOV R10,R14
JMP 0x00129352
LAB_00129350:
XOR EAX,EAX
LAB_00129352:
MOV qword ptr [R8 + 0x30],RAX
MOV dword ptr [R8 + 0x60],0x0
MOV qword ptr [R8 + 0x40],0x0
SUB R8,-0x80
MOV R10,qword ptr [R10]
MOV R13,R10
TEST R10,R10
LEA R12,[0x14f2a0]
JNZ 0x00129188
LAB_00129380:
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,qword ptr [RBP + -0x50]
CMP R8,RAX
JNC 0x001293ab
LAB_0012938d:
MOV R14,RDI
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x0012703e
XOR EBX,EBX
MOV RDI,R14
XOR ESI,ESI
CALL 0x0012f53b
JMP 0x001293b8
LAB_001293a7:
XOR EBX,EBX
JMP 0x001293b8
LAB_001293ab:
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x0012703e
MOV RBX,qword ptr [RBP + -0x38]
LAB_001293b8:
MOV RAX,RBX
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
ulong unpack_fields(long param_1,long *param_2,int8 param_3,ulong param_4,char param_5)
{
byte bVar1;
ushort uVar2;
int iVar3;
uint uVar4;
long lVar5;
ushort *puVar6;
ulong uVar7;
int8 uVar8;
int8 *puVar9;
byte *pbVar10;
int8 uVar11;
long lVar12;
ulong uVar13;
long lVar14;
byte *pbVar15;
ulong uVar16;
long *plVar17;
byte *pbVar18;
lVar14 = (param_4 & 0xffffffff) * 0x80;
uVar7 = ma_alloc_root(param_3);
if (uVar7 == 0) {
uVar7 = 0;
}
else {
plVar17 = (long *)*param_2;
uVar16 = uVar7;
if (plVar17 != (long *)0x0) {
do {
if (lVar14 + uVar7 <= uVar16) goto LAB_0012938d;
lVar12 = 0;
do {
uVar11 = *(int8 *)(lVar12 + plVar17[1]);
iVar3 = *(int *)(lVar12 + 8 + plVar17[1]);
uVar8 = ma_strdup_root();
lVar5 = *(long *)((long)&DAT_0014f2a8 + lVar12 * 2);
*(int8 *)(uVar16 + *(long *)((long)&rset_field_offsets + lVar12 * 2)) = uVar8;
*(uint *)(uVar16 + lVar5) = ~(uint)uVar11 + iVar3;
lVar12 = lVar12 + 8;
} while (lVar12 != 0x30);
*(int8 *)(uVar16 + 0x78) = 0;
lVar12 = 6;
if ((*(byte *)(*(long *)(param_1 + 0x4f0) + 0x70) & 8) != 0) {
lVar12 = *(long *)(plVar17[1] + 0x38) - *(long *)(plVar17[1] + 0x30);
if (1 < lVar12) {
puVar9 = (int8 *)ma_alloc_root(param_3,0x20);
if (puVar9 == (int8 *)0x0) {
*(int8 *)(uVar16 + 0x78) = 0;
}
else {
puVar9[2] = 0;
puVar9[3] = 0;
*puVar9 = 0;
puVar9[1] = 0;
*(int8 **)(uVar16 + 0x78) = puVar9;
pbVar10 = *(byte **)(plVar17[1] + 0x30) + lVar12 + -1;
pbVar15 = *(byte **)(plVar17[1] + 0x30);
do {
uVar13 = (ulong)pbVar15[1];
if (((char)pbVar15[1] < '\0') || (pbVar18 = pbVar15 + uVar13 + 2, pbVar10 < pbVar18)
) break;
bVar1 = *pbVar15;
if (bVar1 < 2) {
lVar12 = ma_memdup_root(param_3,pbVar15 + 2,uVar13);
if (lVar12 == 0) {
uVar13 = 0;
}
puVar9[(ulong)bVar1 * 2] = lVar12;
puVar9[(ulong)bVar1 * 2 + 1] = uVar13;
}
pbVar15 = pbVar18;
} while (pbVar18 < pbVar10);
}
}
lVar12 = 7;
}
puVar6 = *(ushort **)(plVar17[1] + lVar12 * 8);
*(uint *)(uVar16 + 0x6c) = (uint)*puVar6;
uVar4 = *(uint *)(puVar6 + 1);
*(ulong *)(uVar16 + 0x38) = (ulong)uVar4;
bVar1 = (byte)puVar6[3];
*(uint *)(uVar16 + 0x70) = (uint)bVar1;
uVar2 = *(ushort *)((long)puVar6 + 7);
*(uint *)(uVar16 + 100) = (uint)uVar2;
*(int *)(uVar16 + 0x68) = (int)*(char *)((long)puVar6 + 9);
if (bVar1 < 10) {
if ((bVar1 != 7) || (((ulong)uVar4 == 8 || (uVar4 == 0xe)))) {
LAB_0012931d:
*(uint *)(uVar16 + 100) = uVar2 | 0x8000;
}
}
else if ((bVar1 == 0xf6) || (bVar1 == 0xd)) goto LAB_0012931d;
if ((param_5 == '\0') || (*(long *)(plVar17[1] + 8 + lVar12 * 8) == 0)) {
uVar11 = 0;
}
else {
uVar11 = ma_strdup_root();
}
*(int8 *)(uVar16 + 0x30) = uVar11;
*(int4 *)(uVar16 + 0x60) = 0;
*(int8 *)(uVar16 + 0x40) = 0;
uVar16 = uVar16 + 0x80;
plVar17 = (long *)*plVar17;
} while (plVar17 != (long *)0x0);
}
if (uVar16 < uVar7 + lVar14) {
LAB_0012938d:
free_rows(param_2);
uVar7 = 0;
ma_free_root(param_3,0);
}
else {
free_rows(param_2);
}
}
return uVar7;
}
|
|
20,159
|
google::protobuf::Reflection::IsInlinedStringDonated(google::protobuf::Message const&, google::protobuf::FieldDescriptor const*) const
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/generated_message_reflection.cc
|
bool Reflection::IsInlinedStringDonated(const Message& message,
const FieldDescriptor* field) const {
uint32_t index = schema_.InlinedStringIndex(field);
GOOGLE_DCHECK_GT(index, 0);
return IsIndexInHasBitSet(GetInlinedStringDonatedArray(message), index);
}
|
O0
|
cpp
|
google::protobuf::Reflection::IsInlinedStringDonated(google::protobuf::Message const&, google::protobuf::FieldDescriptor const*) const:
subq $0x88, %rsp
movq %rdi, 0x80(%rsp)
movq %rsi, 0x78(%rsp)
movq %rdx, 0x70(%rsp)
movq 0x80(%rsp), %rdi
movq %rdi, 0x10(%rsp)
addq $0x8, %rdi
movq 0x70(%rsp), %rsi
callq 0x11cee0
movl %eax, 0x6c(%rsp)
xorl %eax, %eax
testb $0x1, %al
jne 0x11d163
jmp 0x11d1f9
movl 0x6c(%rsp), %eax
movb $0x0, 0x2f(%rsp)
cmpl $0x0, %eax
jbe 0x11d173
jmp 0x11d1c1
leaq 0xd4f0a(%rip), %rdx # 0x1f2084
leaq 0x30(%rsp), %rdi
movq %rdi, (%rsp)
movl $0x3, %esi
movl $0x9cd, %ecx # imm = 0x9CD
callq 0x237e0
movq (%rsp), %rdi
movb $0x1, 0x2f(%rsp)
leaq 0xd546b(%rip), %rsi # 0x1f260d
callq 0x230a0
movq %rax, 0x8(%rsp)
jmp 0x11d1ae
movq 0x8(%rsp), %rsi
leaq 0x1b(%rsp), %rdi
callq 0x23250
jmp 0x11d1bf
jmp 0x11d1c1
testb $0x1, 0x2f(%rsp)
jne 0x11d1ca
jmp 0x11d1d4
leaq 0x30(%rsp), %rdi
callq 0x23820
jmp 0x11d158
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
testb $0x1, 0x2f(%rsp)
jne 0x11d1ed
jmp 0x11d1f7
leaq 0x30(%rsp), %rdi
callq 0x23820
jmp 0x11d21e
movq 0x10(%rsp), %rdi
movq 0x78(%rsp), %rsi
callq 0x11eaa0
movq %rax, %rdi
movl 0x6c(%rsp), %esi
callq 0x10d030
andb $0x1, %al
addq $0x88, %rsp
retq
movq 0x20(%rsp), %rdi
callq 0x13750
nopl (%rax,%rax)
|
_ZNK6google8protobuf10Reflection22IsInlinedStringDonatedERKNS0_7MessageEPKNS0_15FieldDescriptorE:
sub rsp, 88h
mov [rsp+88h+var_8], rdi
mov [rsp+88h+var_10], rsi
mov [rsp+88h+var_1C+4], rdx
mov rdi, [rsp+88h+var_8]
mov [rsp+88h+var_78], rdi
add rdi, 8; this
mov rsi, [rsp+88h+var_1C+4]; google::protobuf::FieldDescriptor *
call _ZNK6google8protobuf8internal16ReflectionSchema18InlinedStringIndexEPKNS0_15FieldDescriptorE; google::protobuf::internal::ReflectionSchema::InlinedStringIndex(google::protobuf::FieldDescriptor const*)
mov dword ptr [rsp+88h+var_1C], eax
loc_11D158:
xor eax, eax
test al, 1
jnz short loc_11D163
jmp loc_11D1F9
loc_11D163:
mov eax, dword ptr [rsp+88h+var_1C]
mov [rsp+88h+var_59], 0
cmp eax, 0
jbe short loc_11D173
jmp short loc_11D1C1
loc_11D173:
lea rdx, aWorkspaceLlm4b_17; "/workspace/llm4binary/github2025/aimrt_"...
lea rdi, [rsp+88h+var_58]
mov [rsp+88h+var_88], rdi
mov esi, 3
mov ecx, 9CDh
call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int)
mov rdi, [rsp+88h+var_88]
mov [rsp+88h+var_59], 1
lea rsi, aCheckFailedInd_1; "CHECK failed: (index) > (0): "
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
mov [rsp+88h+var_80], rax
jmp short $+2
loc_11D1AE:
mov rsi, [rsp+88h+var_80]
lea rdi, [rsp+88h+var_6D]
call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &)
jmp short $+2
loc_11D1BF:
jmp short $+2
loc_11D1C1:
test [rsp+88h+var_59], 1
jnz short loc_11D1CA
jmp short loc_11D1D4
loc_11D1CA:
lea rdi, [rsp+88h+var_58]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
loc_11D1D4:
jmp short loc_11D158
mov rcx, rax
mov eax, edx
mov [rsp+arg_18], rcx
mov [rsp+arg_14], eax
test [rsp+arg_27], 1
jnz short loc_11D1ED
jmp short loc_11D1F7
loc_11D1ED:
lea rdi, [rsp+arg_28]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
loc_11D1F7:
jmp short loc_11D21E
loc_11D1F9:
mov rdi, [rsp+88h+var_78]; this
mov rsi, [rsp+88h+var_10]; google::protobuf::Message *
call _ZNK6google8protobuf10Reflection28GetInlinedStringDonatedArrayERKNS0_7MessageE; google::protobuf::Reflection::GetInlinedStringDonatedArray(google::protobuf::Message const&)
mov rdi, rax; this
mov esi, dword ptr [rsp+88h+var_1C]; unsigned int *
call _ZN6google8protobuf12_GLOBAL__N_118IsIndexInHasBitSetEPKjj; google::protobuf::`anonymous namespace'::IsIndexInHasBitSet(uint const*,uint)
and al, 1
add rsp, 88h
retn
loc_11D21E:
mov rdi, [rsp+arg_18]
call __Unwind_Resume
|
bool google::protobuf::Reflection::IsInlinedStringDonated(
google::protobuf::Reflection *this,
const google::protobuf::Message *a2,
const google::protobuf::FieldDescriptor *a3)
{
google::protobuf::_anonymous_namespace_ *InlinedStringDonatedArray; // rax
_DWORD v5[3]; // [rsp+6Ch] [rbp-1Ch]
google::protobuf::Message *v6; // [rsp+78h] [rbp-10h]
google::protobuf::Reflection *v7; // [rsp+80h] [rbp-8h]
v7 = this;
v6 = a2;
*(_QWORD *)&v5[1] = a3;
v5[0] = google::protobuf::internal::ReflectionSchema::InlinedStringIndex(
(google::protobuf::Reflection *)((char *)this + 8),
a3);
InlinedStringDonatedArray = (google::protobuf::_anonymous_namespace_ *)google::protobuf::Reflection::GetInlinedStringDonatedArray(
this,
a2);
return google::protobuf::`anonymous namespace'::IsIndexInHasBitSet(
InlinedStringDonatedArray,
(const unsigned int *)v5[0]);
}
|
__uniq_ptr_impl:
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],RDI
MOV qword ptr [RSP + 0x18],RSI
MOV RDI,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x0011d160
MOV RDI,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x0011d180
MOV RCX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX],RCX
ADD RSP,0x28
RET
|
/* std::__uniq_ptr_impl<google::protobuf::io::ZeroCopyOutputStream,
std::default_delete<google::protobuf::io::ZeroCopyOutputStream>
>::__uniq_ptr_impl(google::protobuf::io::ZeroCopyOutputStream*) */
void __thiscall
std::
__uniq_ptr_impl<google::protobuf::io::ZeroCopyOutputStream,std::default_delete<google::protobuf::io::ZeroCopyOutputStream>>
::__uniq_ptr_impl(__uniq_ptr_impl<google::protobuf::io::ZeroCopyOutputStream,std::default_delete<google::protobuf::io::ZeroCopyOutputStream>>
*this,ZeroCopyOutputStream *param_1)
{
int8 *puVar1;
_ZNSt5tupleIJPN6google8protobuf2io20ZeroCopyOutputStreamESt14default_deleteIS3_EEEC2ILb1ETnNSt9enable_ifIXclsr17_TupleConstraintsIXT_ES4_S6_EE37__is_implicitly_default_constructibleEEbE4typeELb1EEEv
();
puVar1 = (int8 *)_M_ptr(this);
*puVar1 = param_1;
return;
}
|
|
20,160
|
wai_getExecutablePath
|
msxemulator/build_O0/_deps/picotool-src/lib/whereami/whereami.c
|
WAI_FUNCSPEC
int WAI_PREFIX(getExecutablePath)(char* out, int capacity, int* dirname_length)
{
char buffer[PATH_MAX];
char* resolved = NULL;
int length = -1;
bool ok;
for (ok = false; !ok; ok = true)
{
resolved = realpath(WAI_PROC_SELF_EXE, buffer);
if (!resolved)
break;
length = (int)strlen(resolved);
if (length <= capacity)
{
memcpy(out, resolved, length);
if (dirname_length)
{
int i;
for (i = length - 1; i >= 0; --i)
{
if (out[i] == '/')
{
*dirname_length = i;
break;
}
}
}
}
}
return ok ? length : -1;
}
|
O0
|
c
|
wai_getExecutablePath:
subq $0x1038, %rsp # imm = 0x1038
movq %rdi, 0x1030(%rsp)
movl %esi, 0x102c(%rsp)
movq %rdx, 0x1020(%rsp)
movq $0x0, 0x18(%rsp)
movl $0xffffffff, 0x14(%rsp) # imm = 0xFFFFFFFF
movb $0x0, 0x13(%rsp)
movb 0x13(%rsp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0xfa313
jmp 0xfa3ca
leaq 0x20(%rsp), %rsi
leaq 0x7bfa3(%rip), %rdi # 0x1762c2
callq 0xf210
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
jne 0xfa336
jmp 0xfa3ca
movq 0x18(%rsp), %rdi
callq 0xf2c0
movl %eax, 0x14(%rsp)
movl 0x14(%rsp), %eax
cmpl 0x102c(%rsp), %eax
jg 0xfa3be
movq 0x1030(%rsp), %rdi
movq 0x18(%rsp), %rsi
movslq 0x14(%rsp), %rdx
callq 0xf4a0
cmpq $0x0, 0x1020(%rsp)
je 0xfa3bc
movl 0x14(%rsp), %eax
subl $0x1, %eax
movl %eax, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
jl 0xfa3ba
movq 0x1030(%rsp), %rax
movslq 0xc(%rsp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x2f, %eax
jne 0xfa3ab
movl 0xc(%rsp), %ecx
movq 0x1020(%rsp), %rax
movl %ecx, (%rax)
jmp 0xfa3ba
jmp 0xfa3ad
movl 0xc(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0xfa37e
jmp 0xfa3bc
jmp 0xfa3be
jmp 0xfa3c0
movb $0x1, 0x13(%rsp)
jmp 0xfa304
testb $0x1, 0x13(%rsp)
je 0xfa3db
movl 0x14(%rsp), %eax
movl %eax, 0x8(%rsp)
jmp 0xfa3e6
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
movl %eax, 0x8(%rsp)
jmp 0xfa3e6
movl 0x8(%rsp), %eax
addq $0x1038, %rsp # imm = 0x1038
retq
nopw %cs:(%rax,%rax)
|
wai_getExecutablePath:
sub rsp, 1038h
mov [rsp+1038h+var_8], rdi
mov [rsp+1038h+var_C], esi
mov [rsp+1038h+var_18], rdx
mov [rsp+1038h+var_1020], 0
mov [rsp+1038h+var_1024], 0FFFFFFFFh
mov [rsp+1038h+var_1025], 0
loc_FA304:
mov al, [rsp+1038h+var_1025]
xor al, 0FFh
test al, 1
jnz short loc_FA313
jmp loc_FA3CA
loc_FA313:
lea rsi, [rsp+1038h+var_1018]
lea rdi, aProcSelfExe; "/proc/self/exe"
call _realpath
mov [rsp+1038h+var_1020], rax
cmp [rsp+1038h+var_1020], 0
jnz short loc_FA336
jmp loc_FA3CA
loc_FA336:
mov rdi, [rsp+1038h+var_1020]
call _strlen
mov [rsp+1038h+var_1024], eax
mov eax, [rsp+1038h+var_1024]
cmp eax, [rsp+1038h+var_C]
jg short loc_FA3BE
mov rdi, [rsp+1038h+var_8]
mov rsi, [rsp+1038h+var_1020]
movsxd rdx, [rsp+1038h+var_1024]
call _memcpy
cmp [rsp+1038h+var_18], 0
jz short loc_FA3BC
mov eax, [rsp+1038h+var_1024]
sub eax, 1
mov [rsp+1038h+var_102C], eax
loc_FA37E:
cmp [rsp+1038h+var_102C], 0
jl short loc_FA3BA
mov rax, [rsp+1038h+var_8]
movsxd rcx, [rsp+1038h+var_102C]
movsx eax, byte ptr [rax+rcx]
cmp eax, 2Fh ; '/'
jnz short loc_FA3AB
mov ecx, [rsp+1038h+var_102C]
mov rax, [rsp+1038h+var_18]
mov [rax], ecx
jmp short loc_FA3BA
loc_FA3AB:
jmp short $+2
loc_FA3AD:
mov eax, [rsp+1038h+var_102C]
add eax, 0FFFFFFFFh
mov [rsp+1038h+var_102C], eax
jmp short loc_FA37E
loc_FA3BA:
jmp short $+2
loc_FA3BC:
jmp short $+2
loc_FA3BE:
jmp short $+2
loc_FA3C0:
mov [rsp+1038h+var_1025], 1
jmp loc_FA304
loc_FA3CA:
test [rsp+1038h+var_1025], 1
jz short loc_FA3DB
mov eax, [rsp+1038h+var_1024]
mov [rsp+1038h+var_1030], eax
jmp short loc_FA3E6
loc_FA3DB:
mov eax, 0FFFFFFFFh
mov [rsp+1038h+var_1030], eax
jmp short $+2
loc_FA3E6:
mov eax, [rsp+1038h+var_1030]
add rsp, 1038h
retn
|
long long wai_getExecutablePath(long long a1, int a2, int *a3)
{
int j; // [rsp+Ch] [rbp-102Ch]
char i; // [rsp+13h] [rbp-1025h]
int v7; // [rsp+14h] [rbp-1024h]
long long v8; // [rsp+18h] [rbp-1020h]
char v9[4096]; // [rsp+20h] [rbp-1018h] BYREF
int *v10; // [rsp+1020h] [rbp-18h]
int v11; // [rsp+102Ch] [rbp-Ch]
long long v12; // [rsp+1030h] [rbp-8h]
v12 = a1;
v11 = a2;
v10 = a3;
v7 = -1;
for ( i = 0; (i & 1) == 0; i = 1 )
{
v8 = realpath("/proc/self/exe", v9);
if ( !v8 )
break;
v7 = strlen(v8);
if ( v7 <= v11 )
{
memcpy(v12, v8, v7);
if ( v10 )
{
for ( j = v7 - 1; j >= 0; --j )
{
if ( *(_BYTE *)(v12 + j) == 47 )
{
*v10 = j;
break;
}
}
}
}
}
if ( (i & 1) != 0 )
return (unsigned int)v7;
else
return (unsigned int)-1;
}
|
wai_getExecutablePath:
SUB RSP,0x1038
MOV qword ptr [RSP + 0x1030],RDI
MOV dword ptr [RSP + 0x102c],ESI
MOV qword ptr [RSP + 0x1020],RDX
MOV qword ptr [RSP + 0x18],0x0
MOV dword ptr [RSP + 0x14],0xffffffff
MOV byte ptr [RSP + 0x13],0x0
LAB_001fa304:
MOV AL,byte ptr [RSP + 0x13]
XOR AL,0xff
TEST AL,0x1
JNZ 0x001fa313
JMP 0x001fa3ca
LAB_001fa313:
LEA RSI,[RSP + 0x20]
LEA RDI,[0x2762c2]
CALL 0x0010f210
MOV qword ptr [RSP + 0x18],RAX
CMP qword ptr [RSP + 0x18],0x0
JNZ 0x001fa336
JMP 0x001fa3ca
LAB_001fa336:
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x0010f2c0
MOV dword ptr [RSP + 0x14],EAX
MOV EAX,dword ptr [RSP + 0x14]
CMP EAX,dword ptr [RSP + 0x102c]
JG 0x001fa3be
MOV RDI,qword ptr [RSP + 0x1030]
MOV RSI,qword ptr [RSP + 0x18]
MOVSXD RDX,dword ptr [RSP + 0x14]
CALL 0x0010f4a0
CMP qword ptr [RSP + 0x1020],0x0
JZ 0x001fa3bc
MOV EAX,dword ptr [RSP + 0x14]
SUB EAX,0x1
MOV dword ptr [RSP + 0xc],EAX
LAB_001fa37e:
CMP dword ptr [RSP + 0xc],0x0
JL 0x001fa3ba
MOV RAX,qword ptr [RSP + 0x1030]
MOVSXD RCX,dword ptr [RSP + 0xc]
MOVSX EAX,byte ptr [RAX + RCX*0x1]
CMP EAX,0x2f
JNZ 0x001fa3ab
MOV ECX,dword ptr [RSP + 0xc]
MOV RAX,qword ptr [RSP + 0x1020]
MOV dword ptr [RAX],ECX
JMP 0x001fa3ba
LAB_001fa3ab:
JMP 0x001fa3ad
LAB_001fa3ad:
MOV EAX,dword ptr [RSP + 0xc]
ADD EAX,-0x1
MOV dword ptr [RSP + 0xc],EAX
JMP 0x001fa37e
LAB_001fa3ba:
JMP 0x001fa3bc
LAB_001fa3bc:
JMP 0x001fa3be
LAB_001fa3be:
JMP 0x001fa3c0
LAB_001fa3c0:
MOV byte ptr [RSP + 0x13],0x1
JMP 0x001fa304
LAB_001fa3ca:
TEST byte ptr [RSP + 0x13],0x1
JZ 0x001fa3db
MOV EAX,dword ptr [RSP + 0x14]
MOV dword ptr [RSP + 0x8],EAX
JMP 0x001fa3e6
LAB_001fa3db:
MOV EAX,0xffffffff
MOV dword ptr [RSP + 0x8],EAX
JMP 0x001fa3e6
LAB_001fa3e6:
MOV EAX,dword ptr [RSP + 0x8]
ADD RSP,0x1038
RET
|
int wai_getExecutablePath(void *param_1,int param_2,int *param_3)
{
bool bVar1;
char *__s;
size_t sVar2;
int local_1030;
int local_102c;
int local_1024;
char local_1018 [4096];
int *local_18;
int local_c;
void *local_8;
local_1024 = -1;
bVar1 = false;
local_18 = param_3;
local_c = param_2;
local_8 = param_1;
do {
if ((bVar1) || (__s = realpath("/proc/self/exe",local_1018), __s == (char *)0x0)) {
if (bVar1) {
local_1030 = local_1024;
}
else {
local_1030 = -1;
}
return local_1030;
}
sVar2 = strlen(__s);
local_1024 = (int)sVar2;
if ((local_1024 <= local_c) &&
(memcpy(local_8,__s,(long)local_1024), local_102c = local_1024, local_18 != (int *)0x0)) {
do {
local_102c = local_102c + -1;
if (local_102c < 0) goto LAB_001fa3be;
} while (*(char *)((long)local_8 + (long)local_102c) != '/');
*local_18 = local_102c;
}
LAB_001fa3be:
bVar1 = true;
} while( true );
}
|
|
20,161
|
plutovg_span_buffer_intersect
|
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-rasterize.c
|
void plutovg_span_buffer_intersect(plutovg_span_buffer_t* span_buffer, const plutovg_span_buffer_t* a, const plutovg_span_buffer_t* b)
{
plutovg_span_buffer_reset(span_buffer);
plutovg_array_ensure(span_buffer->spans, plutovg_max(a->spans.size, b->spans.size));
plutovg_span_t* a_spans = a->spans.data;
plutovg_span_t* a_end = a_spans + a->spans.size;
plutovg_span_t* b_spans = b->spans.data;
plutovg_span_t* b_end = b_spans + b->spans.size;
while(a_spans < a_end && b_spans < b_end) {
if(b_spans->y > a_spans->y) {
++a_spans;
continue;
}
if(a_spans->y != b_spans->y) {
++b_spans;
continue;
}
int ax1 = a_spans->x;
int ax2 = ax1 + a_spans->len;
int bx1 = b_spans->x;
int bx2 = bx1 + b_spans->len;
if(bx1 < ax1 && bx2 < ax1) {
++b_spans;
continue;
}
if(ax1 < bx1 && ax2 < bx1) {
++a_spans;
continue;
}
int x = plutovg_max(ax1, bx1);
int len = plutovg_min(ax2, bx2) - x;
if(len) {
plutovg_array_ensure(span_buffer->spans, 1);
plutovg_span_t* span = span_buffer->spans.data + span_buffer->spans.size;
span->x = x;
span->len = len;
span->y = a_spans->y;
span->coverage = (a_spans->coverage * b_spans->coverage) / 255;
span_buffer->spans.size += 1;
}
if(ax2 < bx2) {
++a_spans;
} else {
++b_spans;
}
}
}
|
O1
|
c
|
plutovg_span_buffer_intersect:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl $0x0, 0x8(%rdi)
movaps 0x18973(%rip), %xmm0 # 0x45820
movups %xmm0, 0x10(%rdi)
movl 0x8(%rsi), %ecx
movl 0x8(%rdx), %eax
cmpl %eax, %ecx
cmovgl %ecx, %eax
movl 0xc(%rdi), %edx
cmpl %edx, %eax
jle 0x2ceef
testl %edx, %edx
movl $0x8, %ecx
cmovnel %edx, %ecx
movl %ecx, %r12d
leal (%r12,%r12), %ecx
cmpl %eax, %r12d
jl 0x2cecd
movq (%rbx), %rdi
movslq %r12d, %rsi
shlq $0x4, %rsi
callq 0xa540
movq %rax, (%rbx)
movl %r12d, 0xc(%rbx)
movslq 0x8(%r15), %r12
testq %r12, %r12
setg %cl
movslq 0x8(%r14), %r13
testq %r13, %r13
setg %al
andb %al, %cl
cmpb $0x1, %cl
jne 0x2d05e
movq (%r15), %r15
shlq $0x4, %r12
addq %r15, %r12
movq (%r14), %r14
shlq $0x4, %r13
addq %r14, %r13
movl $0x8, %r8d
movl 0x8(%r14), %ecx
movl 0x8(%r15), %edx
cmpl %edx, %ecx
jle 0x2cf47
addq $0x10, %r15
cmpq %r12, %r15
setb %dl
testb %al, %dl
jne 0x2cf2c
jmp 0x2d05e
jne 0x2cf66
movl (%r15), %esi
movl 0x4(%r15), %r9d
addl %esi, %r9d
movl (%r14), %eax
movl 0x4(%r14), %r10d
addl %eax, %r10d
cmpl %esi, %eax
jge 0x2cf83
cmpl %esi, %r10d
jge 0x2cf83
addq $0x10, %r14
cmpq %r13, %r14
setb %al
cmpq %r12, %r15
jae 0x2d05e
cmpq %r13, %r14
jb 0x2cf28
jmp 0x2d05e
cmpl %eax, %esi
jge 0x2cf92
cmpl %eax, %r9d
jge 0x2cf92
addq $0x10, %r15
jmp 0x2cf6a
cmpl %esi, %eax
cmovgl %eax, %esi
cmpl %r10d, %r9d
movl %r10d, %edi
cmovll %r9d, %edi
subl %esi, %edi
je 0x2d040
movl 0x8(%rbx), %eax
movl 0xc(%rbx), %ecx
cmpl %ecx, %eax
jl 0x2d005
movl %edi, 0x8(%rsp)
movl %esi, 0xc(%rsp)
movl %r10d, 0x10(%rsp)
movl %r9d, 0x14(%rsp)
testl %ecx, %ecx
cmovel %r8d, %ecx
movl %ecx, %ebp
leal (,%rbp,2), %ecx
cmpl %eax, %ebp
jle 0x2cfcb
movq (%rbx), %rdi
movslq %ebp, %rsi
shlq $0x4, %rsi
callq 0xa540
movq %rax, (%rbx)
movl %ebp, 0xc(%rbx)
movl $0x8, %r8d
movl 0x14(%rsp), %r9d
movl 0x10(%rsp), %r10d
movl 0xc(%rsp), %esi
movl 0x8(%rsp), %edi
movq (%rbx), %rax
movslq 0x8(%rbx), %rcx
leal 0x1(%rcx), %edx
shlq $0x4, %rcx
movl %esi, (%rax,%rcx)
movl %edi, 0x4(%rax,%rcx)
movl 0x8(%r15), %esi
movl %esi, 0x8(%rax,%rcx)
movzbl 0xc(%r15), %esi
movzbl 0xc(%r14), %edi
imull %esi, %edi
imull $0x8081, %edi, %esi # imm = 0x8081
shrl $0x17, %esi
movb %sil, 0xc(%rax,%rcx)
movl %edx, 0x8(%rbx)
xorl %eax, %eax
xorl %ecx, %ecx
cmpl %r10d, %r9d
setl %al
setge %cl
shll $0x4, %ecx
addq %rcx, %r14
shll $0x4, %eax
addq %rax, %r15
jmp 0x2cf6a
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
plutovg_span_buffer_intersect:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
mov dword ptr [rdi+8], 0
movaps xmm0, cs:xmmword_45820
movups xmmword ptr [rdi+10h], xmm0
mov ecx, [rsi+8]
mov eax, [rdx+8]
cmp ecx, eax
cmovg eax, ecx
mov edx, [rdi+0Ch]
cmp eax, edx
jle short loc_2CEEF
test edx, edx
mov ecx, 8
cmovnz ecx, edx
loc_2CECD:
mov r12d, ecx
lea ecx, [r12+r12]
cmp r12d, eax
jl short loc_2CECD
mov rdi, [rbx]
movsxd rsi, r12d
shl rsi, 4
call _realloc
mov [rbx], rax
mov [rbx+0Ch], r12d
loc_2CEEF:
movsxd r12, dword ptr [r15+8]
test r12, r12
setnle cl
movsxd r13, dword ptr [r14+8]
test r13, r13
setnle al
and cl, al
cmp cl, 1
jnz loc_2D05E
mov r15, [r15]
shl r12, 4
add r12, r15
mov r14, [r14]
shl r13, 4
add r13, r14
mov r8d, 8
loc_2CF28:
mov ecx, [r14+8]
loc_2CF2C:
mov edx, [r15+8]
cmp ecx, edx
jle short loc_2CF47
add r15, 10h
cmp r15, r12
setb dl
test dl, al
jnz short loc_2CF2C
jmp loc_2D05E
loc_2CF47:
jnz short loc_2CF66
mov esi, [r15]
mov r9d, [r15+4]
add r9d, esi
mov eax, [r14]
mov r10d, [r14+4]
add r10d, eax
cmp eax, esi
jge short loc_2CF83
cmp r10d, esi
jge short loc_2CF83
loc_2CF66:
add r14, 10h
loc_2CF6A:
cmp r14, r13
setb al
cmp r15, r12
jnb loc_2D05E
cmp r14, r13
jb short loc_2CF28
jmp loc_2D05E
loc_2CF83:
cmp esi, eax
jge short loc_2CF92
cmp r9d, eax
jge short loc_2CF92
add r15, 10h
jmp short loc_2CF6A
loc_2CF92:
cmp eax, esi
cmovg esi, eax
cmp r9d, r10d
mov edi, r10d
cmovl edi, r9d
sub edi, esi
jz loc_2D040
mov eax, [rbx+8]
mov ecx, [rbx+0Ch]
cmp eax, ecx
jl short loc_2D005
mov [rsp+48h+var_40], edi
mov [rsp+48h+var_3C], esi
mov [rsp+48h+var_38], r10d
mov [rsp+48h+var_34], r9d
test ecx, ecx
cmovz ecx, r8d
loc_2CFCB:
mov ebp, ecx
lea ecx, ds:0[rbp*2]
cmp ebp, eax
jle short loc_2CFCB
mov rdi, [rbx]
movsxd rsi, ebp
shl rsi, 4
call _realloc
mov [rbx], rax
mov [rbx+0Ch], ebp
mov r8d, 8
mov r9d, [rsp+48h+var_34]
mov r10d, [rsp+48h+var_38]
mov esi, [rsp+48h+var_3C]
mov edi, [rsp+48h+var_40]
loc_2D005:
mov rax, [rbx]
movsxd rcx, dword ptr [rbx+8]
lea edx, [rcx+1]
shl rcx, 4
mov [rax+rcx], esi
mov [rax+rcx+4], edi
mov esi, [r15+8]
mov [rax+rcx+8], esi
movzx esi, byte ptr [r15+0Ch]
movzx edi, byte ptr [r14+0Ch]
imul edi, esi
imul esi, edi, 8081h
shr esi, 17h
mov [rax+rcx+0Ch], sil
mov [rbx+8], edx
loc_2D040:
xor eax, eax
xor ecx, ecx
cmp r9d, r10d
setl al
setnl cl
shl ecx, 4
add r14, rcx
shl eax, 4
add r15, rax
jmp loc_2CF6A
loc_2D05E:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
bool plutovg_span_buffer_intersect(_QWORD *a1, long long a2, unsigned long long *a3)
{
int v5; // eax
long long v6; // rdx
long long v7; // rcx
int v8; // r12d
long long v9; // r12
long long v10; // r13
bool result; // al
unsigned long long v12; // r15
unsigned long long v13; // r12
unsigned long long v14; // r14
unsigned long long v15; // r13
int v16; // ecx
long long v17; // rdx
int v18; // esi
int v19; // r9d
int v20; // eax
int v21; // r10d
int v22; // edi
int v23; // edi
int v24; // eax
long long v25; // rcx
int v26; // ebp
long long v27; // rax
long long v28; // rcx
int v29; // edx
int v30; // [rsp+10h] [rbp-38h]
int v31; // [rsp+14h] [rbp-34h]
*((_DWORD *)a1 + 2) = 0;
*((_OWORD *)a1 + 1) = xmmword_45820;
v5 = *((_DWORD *)a3 + 2);
if ( *(_DWORD *)(a2 + 8) > v5 )
v5 = *(_DWORD *)(a2 + 8);
v6 = *((unsigned int *)a1 + 3);
if ( v5 > (int)v6 )
{
LODWORD(v7) = 8;
if ( (_DWORD)v6 )
LODWORD(v7) = *((_DWORD *)a1 + 3);
do
{
v8 = v7;
v7 = (unsigned int)(2 * v7);
}
while ( v8 < v5 );
*a1 = realloc(*a1, 16LL * v8, v6, v7);
*((_DWORD *)a1 + 3) = v8;
}
v9 = *(int *)(a2 + 8);
v10 = *((int *)a3 + 2);
result = v10 > 0;
if ( v10 > 0 && v9 > 0 )
{
v12 = *(_QWORD *)a2;
v13 = *(_QWORD *)a2 + 16 * v9;
v14 = *a3;
v15 = v14 + 16 * v10;
do
{
v16 = *(_DWORD *)(v14 + 8);
while ( 1 )
{
v17 = *(unsigned int *)(v12 + 8);
if ( v16 <= (int)v17 )
break;
v12 += 16LL;
if ( !result || v12 >= v13 )
return result;
}
if ( v16 == (_DWORD)v17
&& ((v18 = *(_DWORD *)v12,
v19 = *(_DWORD *)v12 + *(_DWORD *)(v12 + 4),
v20 = *(_DWORD *)v14,
v21 = *(_DWORD *)v14 + *(_DWORD *)(v14 + 4),
*(_DWORD *)v14 >= *(_DWORD *)v12)
|| v21 >= v18) )
{
if ( v18 >= v20 || v19 >= v20 )
{
if ( v20 > v18 )
v18 = *(_DWORD *)v14;
v22 = v20 + *(_DWORD *)(v14 + 4);
if ( v19 < v21 )
v22 = *(_DWORD *)v12 + *(_DWORD *)(v12 + 4);
v23 = v22 - v18;
if ( v23 )
{
v24 = *((_DWORD *)a1 + 2);
LODWORD(v25) = *((_DWORD *)a1 + 3);
if ( v24 >= (int)v25 )
{
v30 = *(_DWORD *)v14 + *(_DWORD *)(v14 + 4);
v31 = *(_DWORD *)v12 + *(_DWORD *)(v12 + 4);
if ( !(_DWORD)v25 )
LODWORD(v25) = 8;
do
{
v26 = v25;
v25 = (unsigned int)(2 * v25);
}
while ( v26 <= v24 );
*a1 = realloc(*a1, 16LL * v26, v17, v25);
*((_DWORD *)a1 + 3) = v26;
v19 = v31;
v21 = v30;
}
v27 = *a1;
v28 = *((int *)a1 + 2);
v29 = v28 + 1;
v28 *= 16LL;
*(_DWORD *)(v27 + v28) = v18;
*(_DWORD *)(v27 + v28 + 4) = v23;
*(_DWORD *)(v27 + v28 + 8) = *(_DWORD *)(v12 + 8);
*(_BYTE *)(v27 + v28 + 12) = (32897
* *(unsigned __int8 *)(v12 + 12)
* (unsigned int)*(unsigned __int8 *)(v14 + 12)) >> 23;
*((_DWORD *)a1 + 2) = v29;
}
v14 += 16 * (unsigned int)(v19 >= v21);
v12 += 16 * (unsigned int)(v19 < v21);
}
else
{
v12 += 16LL;
}
}
else
{
v14 += 16LL;
}
result = v14 < v15;
}
while ( v12 < v13 && v14 < v15 );
}
return result;
}
|
plutovg_span_buffer_intersect:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
MOV dword ptr [RDI + 0x8],0x0
MOVAPS XMM0,xmmword ptr [0x00145820]
MOVUPS xmmword ptr [RDI + 0x10],XMM0
MOV ECX,dword ptr [RSI + 0x8]
MOV EAX,dword ptr [RDX + 0x8]
CMP ECX,EAX
CMOVG EAX,ECX
MOV EDX,dword ptr [RDI + 0xc]
CMP EAX,EDX
JLE 0x0012ceef
TEST EDX,EDX
MOV ECX,0x8
CMOVNZ ECX,EDX
LAB_0012cecd:
MOV R12D,ECX
LEA ECX,[R12 + R12*0x1]
CMP R12D,EAX
JL 0x0012cecd
MOV RDI,qword ptr [RBX]
MOVSXD RSI,R12D
SHL RSI,0x4
CALL 0x0010a540
MOV qword ptr [RBX],RAX
MOV dword ptr [RBX + 0xc],R12D
LAB_0012ceef:
MOVSXD R12,dword ptr [R15 + 0x8]
TEST R12,R12
SETG CL
MOVSXD R13,dword ptr [R14 + 0x8]
TEST R13,R13
SETG AL
AND CL,AL
CMP CL,0x1
JNZ 0x0012d05e
MOV R15,qword ptr [R15]
SHL R12,0x4
ADD R12,R15
MOV R14,qword ptr [R14]
SHL R13,0x4
ADD R13,R14
MOV R8D,0x8
LAB_0012cf28:
MOV ECX,dword ptr [R14 + 0x8]
LAB_0012cf2c:
MOV EDX,dword ptr [R15 + 0x8]
CMP ECX,EDX
JLE 0x0012cf47
ADD R15,0x10
CMP R15,R12
SETC DL
TEST DL,AL
JNZ 0x0012cf2c
JMP 0x0012d05e
LAB_0012cf47:
JNZ 0x0012cf66
MOV ESI,dword ptr [R15]
MOV R9D,dword ptr [R15 + 0x4]
ADD R9D,ESI
MOV EAX,dword ptr [R14]
MOV R10D,dword ptr [R14 + 0x4]
ADD R10D,EAX
CMP EAX,ESI
JGE 0x0012cf83
CMP R10D,ESI
JGE 0x0012cf83
LAB_0012cf66:
ADD R14,0x10
LAB_0012cf6a:
CMP R14,R13
SETC AL
CMP R15,R12
JNC 0x0012d05e
CMP R14,R13
JC 0x0012cf28
JMP 0x0012d05e
LAB_0012cf83:
CMP ESI,EAX
JGE 0x0012cf92
CMP R9D,EAX
JGE 0x0012cf92
ADD R15,0x10
JMP 0x0012cf6a
LAB_0012cf92:
CMP EAX,ESI
CMOVG ESI,EAX
CMP R9D,R10D
MOV EDI,R10D
CMOVL EDI,R9D
SUB EDI,ESI
JZ 0x0012d040
MOV EAX,dword ptr [RBX + 0x8]
MOV ECX,dword ptr [RBX + 0xc]
CMP EAX,ECX
JL 0x0012d005
MOV dword ptr [RSP + 0x8],EDI
MOV dword ptr [RSP + 0xc],ESI
MOV dword ptr [RSP + 0x10],R10D
MOV dword ptr [RSP + 0x14],R9D
TEST ECX,ECX
CMOVZ ECX,R8D
LAB_0012cfcb:
MOV EBP,ECX
LEA ECX,[RBP*0x2]
CMP EBP,EAX
JLE 0x0012cfcb
MOV RDI,qword ptr [RBX]
MOVSXD RSI,EBP
SHL RSI,0x4
CALL 0x0010a540
MOV qword ptr [RBX],RAX
MOV dword ptr [RBX + 0xc],EBP
MOV R8D,0x8
MOV R9D,dword ptr [RSP + 0x14]
MOV R10D,dword ptr [RSP + 0x10]
MOV ESI,dword ptr [RSP + 0xc]
MOV EDI,dword ptr [RSP + 0x8]
LAB_0012d005:
MOV RAX,qword ptr [RBX]
MOVSXD RCX,dword ptr [RBX + 0x8]
LEA EDX,[RCX + 0x1]
SHL RCX,0x4
MOV dword ptr [RAX + RCX*0x1],ESI
MOV dword ptr [RAX + RCX*0x1 + 0x4],EDI
MOV ESI,dword ptr [R15 + 0x8]
MOV dword ptr [RAX + RCX*0x1 + 0x8],ESI
MOVZX ESI,byte ptr [R15 + 0xc]
MOVZX EDI,byte ptr [R14 + 0xc]
IMUL EDI,ESI
IMUL ESI,EDI,0x8081
SHR ESI,0x17
MOV byte ptr [RAX + RCX*0x1 + 0xc],SIL
MOV dword ptr [RBX + 0x8],EDX
LAB_0012d040:
XOR EAX,EAX
XOR ECX,ECX
CMP R9D,R10D
SETL AL
SETGE CL
SHL ECX,0x4
ADD R14,RCX
SHL EAX,0x4
ADD R15,RAX
JMP 0x0012cf6a
LAB_0012d05e:
ADD RSP,0x18
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 plutovg_span_buffer_intersect(long *param_1,int8 *param_2,int8 *param_3)
{
int iVar1;
int iVar2;
long lVar3;
long lVar4;
void *pvVar5;
int iVar6;
long lVar7;
int iVar8;
int iVar9;
int iVar10;
int *piVar11;
int *piVar12;
int *piVar13;
int *piVar14;
bool bVar15;
*(int4 *)(param_1 + 1) = 0;
lVar3 = _UNK_00145828;
param_1[2] = _DAT_00145820;
param_1[3] = lVar3;
iVar1 = *(int *)(param_3 + 1);
if (*(int *)(param_3 + 1) < *(int *)(param_2 + 1)) {
iVar1 = *(int *)(param_2 + 1);
}
iVar8 = *(int *)((long)param_1 + 0xc);
if (iVar8 < iVar1) {
iVar9 = 8;
if (iVar8 != 0) {
iVar9 = iVar8;
}
do {
iVar8 = iVar9;
iVar9 = iVar8 * 2;
} while (iVar8 < iVar1);
pvVar5 = realloc((void *)*param_1,(long)iVar8 << 4);
*param_1 = (long)pvVar5;
*(int *)((long)param_1 + 0xc) = iVar8;
}
bVar15 = 0 < (long)*(int *)(param_3 + 1);
if (0 < (long)*(int *)(param_2 + 1) && bVar15) {
piVar14 = (int *)*param_2;
piVar11 = piVar14 + (long)*(int *)(param_2 + 1) * 4;
piVar13 = (int *)*param_3;
piVar12 = piVar13 + (long)*(int *)(param_3 + 1) * 4;
do {
while (piVar14[2] < piVar13[2]) {
piVar14 = piVar14 + 4;
if (!(bool)(piVar14 < piVar11 & bVar15)) {
return;
}
}
if (piVar13[2] == piVar14[2]) {
iVar1 = *piVar14;
iVar9 = piVar14[1] + iVar1;
iVar8 = *piVar13;
iVar10 = piVar13[1] + iVar8;
if ((iVar8 < iVar1) && (iVar10 < iVar1)) goto LAB_0012cf66;
if ((iVar1 < iVar8) && (iVar9 < iVar8)) {
piVar14 = piVar14 + 4;
}
else {
if (iVar1 < iVar8) {
iVar1 = iVar8;
}
iVar8 = iVar10;
if (iVar9 < iVar10) {
iVar8 = iVar9;
}
if (iVar8 - iVar1 != 0) {
iVar2 = *(int *)((long)param_1 + 0xc);
if (iVar2 <= (int)param_1[1]) {
if (iVar2 == 0) {
iVar2 = 8;
}
do {
iVar6 = iVar2;
iVar2 = iVar6 * 2;
} while (iVar6 <= (int)param_1[1]);
pvVar5 = realloc((void *)*param_1,(long)iVar6 << 4);
*param_1 = (long)pvVar5;
*(int *)((long)param_1 + 0xc) = iVar6;
}
lVar3 = *param_1;
lVar4 = param_1[1];
lVar7 = (long)(int)lVar4 * 0x10;
*(int *)(lVar3 + lVar7) = iVar1;
*(int *)(lVar3 + 4 + lVar7) = iVar8 - iVar1;
*(int *)(lVar3 + 8 + lVar7) = piVar14[2];
*(char *)(lVar3 + 0xc + lVar7) =
(char)(((uint)*(byte *)(piVar13 + 3) * (uint)*(byte *)(piVar14 + 3)) / 0xff);
*(int *)(param_1 + 1) = (int)lVar4 + 1;
}
piVar13 = piVar13 + (ulong)(iVar10 <= iVar9) * 4;
piVar14 = piVar14 + (ulong)(iVar9 < iVar10) * 4;
}
}
else {
LAB_0012cf66:
piVar13 = piVar13 + 4;
}
bVar15 = piVar13 < piVar12;
} while ((piVar14 < piVar11) && (piVar13 < piVar12));
}
return;
}
|
|
20,162
|
hashcmp
|
eloqsql/mysys/hash.c
|
static int hashcmp(const HASH *hash, HASH_LINK *pos, const uchar *key,
size_t length)
{
size_t rec_keylength;
uchar *rec_key= (uchar*) my_hash_key(hash, pos->data, &rec_keylength, 1);
return ((length && length != rec_keylength) ||
my_strnncoll(hash->charset, (uchar*) rec_key, rec_keylength,
(uchar*) key, rec_keylength));
}
|
O3
|
c
|
hashcmp:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %r15
movq %rdx, %rbx
movq %rdi, %r14
movq 0x50(%rdi), %rax
testq %rax, %rax
je 0x29f9c
leaq -0x28(%rbp), %r12
movq %rsi, %rdi
movq %r12, %rsi
movl $0x1, %edx
callq *%rax
movq %rax, %rsi
movq (%r12), %rdx
jmp 0x29fa7
movq 0x8(%r14), %rdx
movq %rdx, -0x28(%rbp)
addq (%r14), %rsi
testq %r15, %r15
sete %al
cmpq %r15, %rdx
sete %cl
orb %al, %cl
movl $0x1, %eax
cmpb $0x1, %cl
jne 0x29fdf
movq 0x68(%r14), %rdi
movq 0xc0(%rdi), %rax
movq %rbx, %rcx
movq %rdx, %r8
xorl %r9d, %r9d
callq *0x8(%rax)
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
setne %al
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
hashcmp:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 10h
mov r15, rcx
mov rbx, rdx
mov r14, rdi
mov rax, [rdi+50h]
test rax, rax
jz short loc_29F9C
lea r12, [rbp+var_28]
mov rdi, rsi
mov rsi, r12
mov edx, 1
call rax
mov rsi, rax
mov rdx, [r12]
jmp short loc_29FA7
loc_29F9C:
mov rdx, [r14+8]
mov [rbp+var_28], rdx
add rsi, [r14]
loc_29FA7:
test r15, r15
setz al
cmp rdx, r15
setz cl
or cl, al
mov eax, 1
cmp cl, 1
jnz short loc_29FDF
mov rdi, [r14+68h]
mov rax, [rdi+0C0h]
mov rcx, rbx
mov r8, rdx
xor r9d, r9d
call qword ptr [rax+8]
mov ecx, eax
xor eax, eax
test ecx, ecx
setnz al
loc_29FDF:
add rsp, 10h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
_BOOL8 hashcmp(_QWORD *a1, long long a2, long long a3, long long a4)
{
long long ( *v6)(long long, _QWORD *, long long); // rax
long long v7; // rsi
long long v8; // rdx
_BOOL8 result; // rax
_QWORD v10[5]; // [rsp+8h] [rbp-28h] BYREF
v6 = (long long ( *)(long long, _QWORD *, long long))a1[10];
if ( v6 )
{
v7 = v6(a2, v10, 1LL);
v8 = v10[0];
}
else
{
v8 = a1[1];
v10[0] = v8;
v7 = *a1 + a2;
}
result = 1LL;
if ( a4 == 0 || v8 == a4 )
return (*(unsigned int ( **)(_QWORD, long long, long long, long long, long long, _QWORD))(*(_QWORD *)(a1[13] + 192LL)
+ 8LL))(
a1[13],
v7,
v8,
a3,
v8,
0LL) != 0;
return result;
}
|
hashcmp:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV R15,RCX
MOV RBX,RDX
MOV R14,RDI
MOV RAX,qword ptr [RDI + 0x50]
TEST RAX,RAX
JZ 0x00129f9c
LEA R12,[RBP + -0x28]
MOV RDI,RSI
MOV RSI,R12
MOV EDX,0x1
CALL RAX
MOV RSI,RAX
MOV RDX,qword ptr [R12]
JMP 0x00129fa7
LAB_00129f9c:
MOV RDX,qword ptr [R14 + 0x8]
MOV qword ptr [RBP + -0x28],RDX
ADD RSI,qword ptr [R14]
LAB_00129fa7:
TEST R15,R15
SETZ AL
CMP RDX,R15
SETZ CL
OR CL,AL
MOV EAX,0x1
CMP CL,0x1
JNZ 0x00129fdf
MOV RDI,qword ptr [R14 + 0x68]
MOV RAX,qword ptr [RDI + 0xc0]
MOV RCX,RBX
MOV R8,RDX
XOR R9D,R9D
CALL qword ptr [RAX + 0x8]
MOV ECX,EAX
XOR EAX,EAX
TEST ECX,ECX
SETNZ AL
LAB_00129fdf:
ADD RSP,0x10
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
bool hashcmp(long *param_1,long param_2,int8 param_3,long param_4)
{
int iVar1;
bool bVar2;
long local_30;
if ((code *)param_1[10] == (code *)0x0) {
local_30 = param_1[1];
param_2 = param_2 + *param_1;
}
else {
param_2 = (*(code *)param_1[10])(param_2,&local_30,1);
}
bVar2 = true;
if (local_30 == param_4 || param_4 == 0) {
iVar1 = (**(code **)(*(long *)(param_1[0xd] + 0xc0) + 8))
(param_1[0xd],param_2,local_30,param_3,local_30,0);
bVar2 = iVar1 != 0;
}
return bVar2;
}
|
|
20,163
|
JS_GetPrototypePrimitive
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue JS_GetPrototypePrimitive(JSContext *ctx, JSValue val)
{
switch(JS_VALUE_GET_NORM_TAG(val)) {
case JS_TAG_BIG_INT:
val = ctx->class_proto[JS_CLASS_BIG_INT];
break;
case JS_TAG_INT:
case JS_TAG_FLOAT64:
val = ctx->class_proto[JS_CLASS_NUMBER];
break;
case JS_TAG_BOOL:
val = ctx->class_proto[JS_CLASS_BOOLEAN];
break;
case JS_TAG_STRING:
val = ctx->class_proto[JS_CLASS_STRING];
break;
case JS_TAG_SYMBOL:
val = ctx->class_proto[JS_CLASS_SYMBOL];
break;
case JS_TAG_OBJECT:
case JS_TAG_NULL:
case JS_TAG_UNDEFINED:
default:
val = JS_NULL;
break;
}
return val;
}
|
O2
|
c
|
JS_GetPrototypePrimitive:
pushq $0x2
popq %rdx
xorl %eax, %eax
leal 0x9(%rsi), %ecx
cmpl $0xa, %ecx
ja 0x207b8
leaq 0x65f61(%rip), %rsi # 0x86704
movslq (%rsi,%rcx,4), %rcx
addq %rsi, %rcx
jmpq *%rcx
movl $0x228, %ecx # imm = 0x228
movl $0x220, %eax # imm = 0x220
jmp 0x207d8
cmpl $0x7, %esi
jne 0x207e4
pushq $0x48
popq %rcx
pushq $0x40
jmp 0x207d7
pushq $0x68
popq %rcx
pushq $0x60
jmp 0x207d7
pushq $0x78
popq %rcx
pushq $0x70
jmp 0x207d7
pushq $0x58
popq %rcx
pushq $0x50
popq %rax
movq 0x40(%rdi), %rdx
movq (%rdx,%rax), %rax
movq (%rdx,%rcx), %rdx
retq
|
JS_GetPrototypePrimitive:
push 2
pop rdx
xor eax, eax
lea ecx, [rsi+9]; switch 11 cases
cmp ecx, 0Ah
ja short def_207AA; jumptable 00000000000207AA default case
lea rsi, jpt_207AA
movsxd rcx, ds:(jpt_207AA - 86704h)[rsi+rcx*4]
add rcx, rsi
jmp rcx; switch jump
loc_207AC:
mov ecx, 228h; jumptable 00000000000207AA case -9
mov eax, 220h
jmp short loc_207D8
def_207AA:
cmp esi, 7; jumptable 00000000000207AA default case
jnz short locret_207E4; jumptable 00000000000207AA cases -6--1
loc_207BD:
push 48h ; 'H'; jumptable 00000000000207AA case 0
pop rcx
push 40h ; '@'
jmp short loc_207D7
loc_207C4:
push 68h ; 'h'; jumptable 00000000000207AA case 1
pop rcx
push 60h ; '`'
jmp short loc_207D7
loc_207CB:
push 78h ; 'x'; jumptable 00000000000207AA case -8
pop rcx
push 70h ; 'p'
jmp short loc_207D7
loc_207D2:
push 58h ; 'X'; jumptable 00000000000207AA case -7
pop rcx
push 50h ; 'P'
loc_207D7:
pop rax
loc_207D8:
mov rdx, [rdi+40h]
mov rax, [rdx+rax]
mov rdx, [rdx+rcx]
locret_207E4:
retn; jumptable 00000000000207AA cases -6--1
|
long long JS_GetPrototypePrimitive(long long a1, int a2)
{
long long result; // rax
long long v3; // rax
long long v4; // [rsp-8h] [rbp-8h]
result = 0LL;
switch ( a2 )
{
case -9:
v3 = 544LL;
return *(_QWORD *)(*(_QWORD *)(a1 + 64) + v3);
case -8:
v4 = 112LL;
goto LABEL_8;
case -7:
v4 = 80LL;
goto LABEL_8;
case -6:
case -5:
case -4:
case -3:
case -2:
case -1:
return result;
case 0:
goto LABEL_4;
case 1:
v4 = 96LL;
goto LABEL_8;
default:
if ( a2 == 7 )
{
LABEL_4:
v4 = 64LL;
LABEL_8:
v3 = v4;
return *(_QWORD *)(*(_QWORD *)(a1 + 64) + v3);
}
return result;
}
}
|
JS_GetPrototypePrimitive:
PUSH 0x2
POP RDX
XOR EAX,EAX
LEA ECX,[RSI + 0x9]
CMP ECX,0xa
JA 0x001207b8
LEA RSI,[0x186704]
MOVSXD RCX,dword ptr [RSI + RCX*0x4]
ADD RCX,RSI
switchD:
JMP RCX
caseD_fffffff7:
MOV ECX,0x228
MOV EAX,0x220
JMP 0x001207d8
default:
CMP ESI,0x7
JNZ 0x001207e4
caseD_0:
PUSH 0x48
POP RCX
PUSH 0x40
JMP 0x001207d7
caseD_1:
PUSH 0x68
POP RCX
PUSH 0x60
JMP 0x001207d7
caseD_fffffff8:
PUSH 0x78
POP RCX
PUSH 0x70
JMP 0x001207d7
caseD_fffffff9:
PUSH 0x58
POP RCX
PUSH 0x50
LAB_001207d7:
POP RAX
LAB_001207d8:
MOV RDX,qword ptr [RDI + 0x40]
MOV RAX,qword ptr [RDX + RAX*0x1]
MOV RDX,qword ptr [RDX + RCX*0x1]
caseD_fffffffa:
RET
|
int1 [16] JS_GetPrototypePrimitive(long param_1,int param_2)
{
int8 uVar1;
long lVar2;
int1 auVar4 [16];
long lStack_8;
int8 uVar3;
uVar3 = 2;
uVar1 = 0;
switch(param_2) {
case 1:
lVar2 = 0x68;
lStack_8 = 0x60;
break;
case -9:
lVar2 = 0x228;
lStack_8 = 0x220;
break;
case -8:
lVar2 = 0x78;
lStack_8 = 0x70;
break;
case -7:
lVar2 = 0x58;
lStack_8 = 0x50;
break;
case -6:
case -5:
case -4:
case -3:
case -2:
case -1:
goto switchD_001207aa_caseD_fffffffa;
default:
if (param_2 != 7) goto switchD_001207aa_caseD_fffffffa;
case 0:
lVar2 = 0x48;
lStack_8 = 0x40;
}
uVar1 = *(int8 *)(*(long *)(param_1 + 0x40) + lStack_8);
uVar3 = *(int8 *)(*(long *)(param_1 + 0x40) + lVar2);
switchD_001207aa_caseD_fffffffa:
auVar4._8_8_ = uVar3;
auVar4._0_8_ = uVar1;
return auVar4;
}
|
|
20,164
|
mi_log
|
eloqsql/storage/myisam/mi_log.c
|
int mi_log(int activate_log)
{
int error=0;
char buff[FN_REFLEN];
DBUG_ENTER("mi_log");
log_type=activate_log;
if (activate_log)
{
if (!myisam_pid)
myisam_pid=(ulong) getpid();
if (myisam_log_file < 0)
{
if ((myisam_log_file= mysql_file_create(mi_key_file_log,
fn_format(buff,
myisam_log_filename,
"", ".log", 4),
0,
(O_RDWR | O_BINARY | O_APPEND),
MYF(0))) < 0)
DBUG_RETURN(my_errno);
}
}
else if (myisam_log_file >= 0)
{
error= mysql_file_close(myisam_log_file, MYF(0)) ? my_errno : 0 ;
myisam_log_file= -1;
}
DBUG_RETURN(error);
}
|
O3
|
c
|
mi_log:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x270, %rsp # imm = 0x270
movq %fs:0x28, %rax
movq %rax, -0x28(%rbp)
movl %edi, 0xb88e6b(%rip) # 0xc087d8
testl %edi, %edi
je 0x7fa2d
cmpq $0x0, 0xb88e53(%rip) # 0xc087d0
jne 0x7f98d
callq 0x2a9a0
cltq
movq %rax, 0xb88e43(%rip) # 0xc087d0
leaq 0x30eb6c(%rip), %r12 # 0x38e500
cmpl $0x0, (%r12)
jns 0x7fa74
leaq 0xb88e0a(%rip), %rax # 0xc087b0
movl (%rax), %r14d
leaq 0x30eb48(%rip), %rax # 0x38e4f8
movq (%rax), %rsi
leaq 0x6873c(%rip), %rdx # 0xe80f6
leaq 0x63565(%rip), %rcx # 0xe2f26
leaq -0x230(%rbp), %rdi
movl $0x4, %r8d
callq 0x98434
movq %rax, %rbx
leaq 0x30f87b(%rip), %rax # 0x38f258
movq (%rax), %rax
leaq -0x288(%rbp), %rdi
leaq -0x238(%rbp), %r15
movl %r14d, %esi
xorl %edx, %edx
movq %rbx, %rcx
movq %r15, %r8
callq *0x148(%rax)
movq %rax, (%r15)
testq %rax, %rax
jne 0x7faa0
movq %rbx, %rdi
xorl %esi, %esi
movl $0x402, %edx # imm = 0x402
xorl %ecx, %ecx
callq 0xa199c
movl %eax, (%r12)
testl %eax, %eax
jns 0x7fa74
callq 0xa8156
movl (%rax), %eax
jmp 0x7fa81
leaq 0x30eacc(%rip), %r15 # 0x38e500
movl (%r15), %ebx
testl %ebx, %ebx
js 0x7fa74
leaq 0x30f816(%rip), %rax # 0x38f258
movq (%rax), %rax
leaq -0x230(%rbp), %rdi
movl %ebx, %esi
movl $0x4, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x7fac4
movl %ebx, %edi
xorl %esi, %esi
callq 0xa6bb9
testl %eax, %eax
je 0x7fa78
callq 0xa8156
movl (%rax), %eax
jmp 0x7fa7a
xorl %eax, %eax
jmp 0x7fa81
xorl %eax, %eax
movl $0xffffffff, (%r15) # imm = 0xFFFFFFFF
movq %fs:0x28, %rcx
cmpq -0x28(%rbp), %rcx
jne 0x7fadd
addq $0x270, %rsp # imm = 0x270
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq -0x238(%rbp), %rdx
leaq -0x23c(%rbp), %r14
movq %rax, %rdi
movq %rbx, %rsi
movq %r14, %rcx
callq 0x2ec1e
movl (%r14), %eax
jmp 0x7fa1c
leaq -0x288(%rbp), %r14
movq %rax, %rdi
movl %ebx, %esi
movq %r14, %rdx
callq 0x2ec79
movl (%r14), %eax
jmp 0x7fa67
callq 0x2a270
|
mi_log:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 270h
mov rax, fs:28h
mov [rbp+var_28], rax
mov cs:log_type, edi
test edi, edi
jz loc_7FA2D
cmp cs:myisam_pid, 0
jnz short loc_7F98D
call _getpid
cdqe
mov cs:myisam_pid, rax
loc_7F98D:
lea r12, myisam_log_file
cmp dword ptr [r12], 0
jns loc_7FA74
lea rax, mi_key_file_log
mov r14d, [rax]
lea rax, myisam_log_filename
mov rsi, [rax]
lea rdx, asc_E80F2+4; ""
lea rcx, aMyisamLog+6; ".log"
lea rdi, [rbp+var_230]
mov r8d, 4
call fn_format
mov rbx, rax
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_288]
lea r15, [rbp+var_238]
mov esi, r14d
xor edx, edx
mov rcx, rbx
mov r8, r15
call qword ptr [rax+148h]
mov [r15], rax
test rax, rax
jnz loc_7FAA0
mov rdi, rbx
xor esi, esi
mov edx, 402h
xor ecx, ecx
call my_create
loc_7FA1C:
mov [r12], eax
test eax, eax
jns short loc_7FA74
call _my_thread_var
mov eax, [rax]
jmp short loc_7FA81
loc_7FA2D:
lea r15, myisam_log_file
mov ebx, [r15]
test ebx, ebx
js short loc_7FA74
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_230]
mov esi, ebx
mov edx, 4
call qword ptr [rax+158h]
test rax, rax
jnz short loc_7FAC4
mov edi, ebx
xor esi, esi
call my_close
loc_7FA67:
test eax, eax
jz short loc_7FA78
call _my_thread_var
mov eax, [rax]
jmp short loc_7FA7A
loc_7FA74:
xor eax, eax
jmp short loc_7FA81
loc_7FA78:
xor eax, eax
loc_7FA7A:
mov dword ptr [r15], 0FFFFFFFFh
loc_7FA81:
mov rcx, fs:28h
cmp rcx, [rbp+var_28]
jnz short loc_7FADD
add rsp, 270h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_7FAA0:
lea rdx, [rbp+var_238]
lea r14, [rbp+var_23C]
mov rdi, rax
mov rsi, rbx
mov rcx, r14
call mi_log_cold_1
mov eax, [r14]
jmp loc_7FA1C
loc_7FAC4:
lea r14, [rbp+var_288]
mov rdi, rax
mov esi, ebx
mov rdx, r14
call mi_log_cold_2
mov eax, [r14]
jmp short loc_7FA67
loc_7FADD:
call ___stack_chk_fail
|
long long mi_log(int a1)
{
unsigned int v1; // r14d
long long v2; // rbx
long long v3; // rax
long long v4; // rdi
int v5; // eax
long long result; // rax
unsigned int v7; // ebx
long long v8; // rax
long long v9; // rdi
unsigned int v10; // eax
unsigned int v11[19]; // [rsp+8h] [rbp-288h] BYREF
int v12; // [rsp+54h] [rbp-23Ch] BYREF
long long v13; // [rsp+58h] [rbp-238h] BYREF
_BYTE v14[520]; // [rsp+60h] [rbp-230h] BYREF
unsigned long long v15; // [rsp+268h] [rbp-28h]
v15 = __readfsqword(0x28u);
log_type = a1;
if ( a1 )
{
if ( !myisam_pid )
myisam_pid = (int)getpid();
if ( (myisam_log_file & 0x80000000) != 0 )
{
v1 = mi_key_file_log;
v2 = fn_format(v14, myisam_log_filename, "", ".log", 4LL);
v3 = ((long long ( *)(unsigned int *, _QWORD, _QWORD, long long, long long *))PSI_server[41])(
v11,
v1,
0LL,
v2,
&v13);
v13 = v3;
if ( v3 )
{
v4 = v3;
mi_log_cold_1(v3, v2, &v13, (unsigned int *)&v12);
v5 = v12;
}
else
{
v4 = v2;
v5 = my_create(v2, 0LL, 1026LL, 0LL);
}
myisam_log_file = v5;
if ( v5 < 0 )
return *(unsigned int *)my_thread_var(v4);
}
return 0LL;
}
v7 = myisam_log_file;
if ( (myisam_log_file & 0x80000000) != 0 )
return 0LL;
v8 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v14, myisam_log_file, 4LL);
if ( v8 )
{
v9 = v8;
mi_log_cold_2(v8, v7, v11);
v10 = v11[0];
}
else
{
v9 = v7;
v10 = my_close(v7, 0LL);
}
if ( v10 )
result = *(unsigned int *)my_thread_var(v9);
else
result = 0LL;
myisam_log_file = -1;
return result;
}
|
mi_log:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x270
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
MOV dword ptr [0x00d087d8],EDI
TEST EDI,EDI
JZ 0x0017fa2d
CMP qword ptr [0x00d087d0],0x0
JNZ 0x0017f98d
CALL 0x0012a9a0
CDQE
MOV qword ptr [0x00d087d0],RAX
LAB_0017f98d:
LEA R12,[0x48e500]
CMP dword ptr [R12],0x0
JNS 0x0017fa74
LEA RAX,[0xd087b0]
MOV R14D,dword ptr [RAX]
LEA RAX,[0x48e4f8]
MOV RSI,qword ptr [RAX]
LEA RDX,[0x1e80f6]
LEA RCX,[0x1e2f26]
LEA RDI,[RBP + -0x230]
MOV R8D,0x4
CALL 0x00198434
MOV RBX,RAX
LEA RAX,[0x48f258]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x288]
LEA R15,[RBP + -0x238]
MOV ESI,R14D
XOR EDX,EDX
MOV RCX,RBX
MOV R8,R15
CALL qword ptr [RAX + 0x148]
MOV qword ptr [R15],RAX
TEST RAX,RAX
JNZ 0x0017faa0
MOV RDI,RBX
XOR ESI,ESI
MOV EDX,0x402
XOR ECX,ECX
CALL 0x001a199c
LAB_0017fa1c:
MOV dword ptr [R12],EAX
TEST EAX,EAX
JNS 0x0017fa74
CALL 0x001a8156
MOV EAX,dword ptr [RAX]
JMP 0x0017fa81
LAB_0017fa2d:
LEA R15,[0x48e500]
MOV EBX,dword ptr [R15]
TEST EBX,EBX
JS 0x0017fa74
LEA RAX,[0x48f258]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x230]
MOV ESI,EBX
MOV EDX,0x4
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x0017fac4
MOV EDI,EBX
XOR ESI,ESI
CALL 0x001a6bb9
LAB_0017fa67:
TEST EAX,EAX
JZ 0x0017fa78
CALL 0x001a8156
MOV EAX,dword ptr [RAX]
JMP 0x0017fa7a
LAB_0017fa74:
XOR EAX,EAX
JMP 0x0017fa81
LAB_0017fa78:
XOR EAX,EAX
LAB_0017fa7a:
MOV dword ptr [R15],0xffffffff
LAB_0017fa81:
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x28]
JNZ 0x0017fadd
ADD RSP,0x270
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0017faa0:
LEA RDX,[RBP + -0x238]
LEA R14,[RBP + -0x23c]
MOV RDI,RAX
MOV RSI,RBX
MOV RCX,R14
CALL 0x0012ec1e
MOV EAX,dword ptr [R14]
JMP 0x0017fa1c
LAB_0017fac4:
LEA R14,[RBP + -0x288]
MOV RDI,RAX
MOV ESI,EBX
MOV RDX,R14
CALL 0x0012ec79
MOV EAX,dword ptr [R14]
JMP 0x0017fa67
LAB_0017fadd:
CALL 0x0012a270
|
int4 mi_log(int param_1)
{
int iVar1;
__pid_t _Var2;
int4 uVar3;
int8 uVar4;
int4 *puVar5;
long lVar6;
long in_FS_OFFSET;
int local_290 [19];
int local_244;
long local_240;
int1 local_238 [520];
long local_30;
iVar1 = myisam_log_file;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
log_type = param_1;
if (param_1 == 0) {
if (-1 < myisam_log_file) {
lVar6 = (**(code **)(PSI_server + 0x158))(local_238,myisam_log_file,4);
if (lVar6 == 0) {
local_290[0] = my_close(iVar1,0);
}
else {
mi_log_cold_2(lVar6,iVar1,local_290);
}
if (local_290[0] == 0) {
uVar3 = 0;
}
else {
puVar5 = (int4 *)_my_thread_var();
uVar3 = *puVar5;
}
myisam_log_file = -1;
goto LAB_0017fa81;
}
}
else {
if (myisam_pid == 0) {
_Var2 = getpid();
myisam_pid = (long)_Var2;
}
uVar3 = mi_key_file_log;
if (myisam_log_file < 0) {
uVar4 = fn_format(local_238,myisam_log_filename,&DAT_001e80f6,".log",4);
local_240 = (**(code **)(PSI_server + 0x148))(local_290,uVar3,0,uVar4,&local_240);
if (local_240 == 0) {
local_244 = my_create(uVar4,0,0x402,0);
}
else {
mi_log_cold_1(local_240,uVar4,&local_240,&local_244);
}
myisam_log_file = local_244;
if (local_244 < 0) {
puVar5 = (int4 *)_my_thread_var();
uVar3 = *puVar5;
goto LAB_0017fa81;
}
}
}
uVar3 = 0;
LAB_0017fa81:
if (*(long *)(in_FS_OFFSET + 0x28) == local_30) {
return uVar3;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
20,165
|
kv_cache_type_from_str(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
llama.cpp/common/arg.cpp
|
static ggml_type kv_cache_type_from_str(const std::string & s) {
for (const auto & type : kv_cache_types) {
if (ggml_type_name(type) == s) {
return type;
}
}
throw std::runtime_error("Unsupported cache type: " + s);
}
|
O3
|
cpp
|
kv_cache_type_from_str(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
movq 0x1024a2(%rip), %rbx # 0x161ee8
movq 0x1024a3(%rip), %r15 # 0x161ef0
cmpq %r15, %rbx
je 0x5fa7b
movl (%rbx), %edi
callq 0x212f0
movq %r14, %rdi
movq %rax, %rsi
callq 0x20f30
testl %eax, %eax
je 0x5fa6e
addq $0x4, %rbx
jmp 0x5fa4d
movl (%rbx), %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x20630
movq %rax, %rbx
leaq 0xbab07(%rip), %rsi # 0x11a596
leaq 0x8(%rsp), %rdi
movq %r14, %rdx
callq 0x63dc9
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x20460
xorl %ebp, %ebp
movq 0x10150b(%rip), %rsi # 0x160fc0
movq 0x1014c4(%rip), %rdx # 0x160f80
movq %rbx, %rdi
callq 0x20a30
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5fae2
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x20170
testb %bpl, %bpl
jne 0x5faec
jmp 0x5faf4
movq %rax, %r14
movq %rbx, %rdi
callq 0x20ed0
movq %r14, %rdi
callq 0x20ad0
|
_ZL22kv_cache_type_from_strRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push rbx
sub rsp, 28h
mov r14, rdi
mov rbx, cs:_ZL14kv_cache_types; kv_cache_types
mov r15, cs:qword_161EF0
loc_5FA4D:
cmp rbx, r15
jz short loc_5FA7B
mov edi, [rbx]
call _ggml_type_name
mov rdi, r14
mov rsi, rax
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_5FA6E
add rbx, 4
jmp short loc_5FA4D
loc_5FA6E:
mov eax, [rbx]
add rsp, 28h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_5FA7B:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aUnsupportedCac; "Unsupported cache type: "
lea rdi, [rsp+48h+var_40]
mov rdx, r14
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&)
mov bpl, 1
lea rsi, [rsp+48h+var_40]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+48h+var_30]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_5FAE2
mov rsi, [rsp+48h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5FAE2:
test bpl, bpl
jnz short loc_5FAEC
jmp short loc_5FAF4
mov r14, rax
loc_5FAEC:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_5FAF4:
mov rdi, r14
call __Unwind_Resume
|
long long kv_cache_type_from_str(long long a1)
{
unsigned int *v1; // rbx
long long v2; // r15
long long v3; // rax
void *exception; // rbx
_BYTE v6[16]; // [rsp+8h] [rbp-40h] BYREF
v1 = (unsigned int *)kv_cache_types;
v2 = qword_161EF0;
while ( 1 )
{
if ( v1 == (unsigned int *)v2 )
{
exception = __cxa_allocate_exception(0x10uLL);
std::operator+<char>(v6, "Unsupported cache type: ", a1);
std::runtime_error::runtime_error(exception, v6);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v3 = ggml_type_name(*v1);
if ( !(unsigned int)std::string::compare(a1, v3) )
break;
++v1;
}
return *v1;
}
|
kv_cache_type_from_str:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV R14,RDI
MOV RBX,qword ptr [0x00261ee8]
MOV R15,qword ptr [0x00261ef0]
LAB_0015fa4d:
CMP RBX,R15
JZ 0x0015fa7b
MOV EDI,dword ptr [RBX]
CALL 0x001212f0
MOV RDI,R14
MOV RSI,RAX
CALL 0x00120f30
TEST EAX,EAX
JZ 0x0015fa6e
ADD RBX,0x4
JMP 0x0015fa4d
LAB_0015fa6e:
MOV EAX,dword ptr [RBX]
ADD RSP,0x28
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0015fa7b:
MOV EDI,0x10
CALL 0x00120630
MOV RBX,RAX
LAB_0015fa88:
LEA RSI,[0x21a596]
LEA RDI,[RSP + 0x8]
MOV RDX,R14
CALL 0x00163dc9
MOV BPL,0x1
LAB_0015fa9f:
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
CALL 0x00120460
XOR EBP,EBP
MOV RSI,qword ptr [0x00260fc0]
MOV RDX,qword ptr [0x00260f80]
MOV RDI,RBX
CALL 0x00120a30
|
/* kv_cache_type_from_str(std::__cxx11::string const&) */
int4 kv_cache_type_from_str(string *param_1)
{
int4 *puVar1;
int iVar2;
runtime_error *this;
int4 *puVar3;
string local_40 [32];
puVar1 = DAT_00261ef0;
puVar3 = kv_cache_types;
while( true ) {
if (puVar3 == puVar1) {
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0015fa88 to 0015fa9b has its CatchHandler @ 0015fae9 */
std::operator+((char *)local_40,(string *)"Unsupported cache type: ");
/* try { // try from 0015fa9f to 0015fac3 has its CatchHandler @ 0015fac4 */
std::runtime_error::runtime_error(this,local_40);
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_00260fc0,PTR__runtime_error_00260f80);
}
ggml_type_name(*puVar3);
iVar2 = std::__cxx11::string::compare((char *)param_1);
if (iVar2 == 0) break;
puVar3 = puVar3 + 1;
}
return *puVar3;
}
|
|
20,166
|
blst_uint64_from_scalar
|
corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/exports.c
|
void blst_uint64_from_scalar(unsigned long long ret[4], const pow256 a)
{
const union {
long one;
char little;
} is_endian = { 1 };
size_t i;
if ((uptr_t)ret==(uptr_t)a && is_endian.little)
return;
for(i = 0; i < 4; i++) {
unsigned long long w = (unsigned long long)(*a++);
w |= (unsigned long long)(*a++) << 8;
w |= (unsigned long long)(*a++) << 16;
w |= (unsigned long long)(*a++) << 24;
w |= (unsigned long long)(*a++) << 32;
w |= (unsigned long long)(*a++) << 40;
w |= (unsigned long long)(*a++) << 48;
w |= (unsigned long long)(*a++) << 56;
ret[i] = w;
}
}
|
O0
|
c
|
blst_uint64_from_scalar:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq 0x31c0d(%rip), %rax # 0xe8740
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq %rcx, %rax
jne 0xb6b52
movsbl -0x18(%rbp), %eax
cmpl $0x0, %eax
je 0xb6b52
jmp 0xb6c6e
movq $0x0, -0x20(%rbp)
cmpq $0x4, -0x20(%rbp)
jae 0xb6c6e
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movzbl (%rax), %eax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movzbl (%rax), %eax
shlq $0x8, %rax
orq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movzbl (%rax), %eax
shlq $0x10, %rax
orq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movzbl (%rax), %eax
shlq $0x18, %rax
orq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movzbl (%rax), %eax
shlq $0x20, %rax
orq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movzbl (%rax), %eax
shlq $0x28, %rax
orq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movzbl (%rax), %eax
shlq $0x30, %rax
orq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movzbl (%rax), %eax
shlq $0x38, %rax
orq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdx
movq -0x8(%rbp), %rax
movq -0x20(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0xb6b5a
popq %rbp
retq
|
blst_uint64_from_scalar:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, cs:qword_E8740
mov [rbp+var_18], rax
mov rax, [rbp+var_8]
mov rcx, [rbp+var_10]
cmp rax, rcx
jnz short loc_B6B52
movsx eax, byte ptr [rbp+var_18]
cmp eax, 0
jz short loc_B6B52
jmp loc_B6C6E
loc_B6B52:
mov [rbp+var_20], 0
loc_B6B5A:
cmp [rbp+var_20], 4
jnb loc_B6C6E
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
movzx eax, byte ptr [rax]
mov [rbp+var_28], rax
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
movzx eax, byte ptr [rax]
shl rax, 8
or rax, [rbp+var_28]
mov [rbp+var_28], rax
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
movzx eax, byte ptr [rax]
shl rax, 10h
or rax, [rbp+var_28]
mov [rbp+var_28], rax
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
movzx eax, byte ptr [rax]
shl rax, 18h
or rax, [rbp+var_28]
mov [rbp+var_28], rax
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
movzx eax, byte ptr [rax]
shl rax, 20h
or rax, [rbp+var_28]
mov [rbp+var_28], rax
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
movzx eax, byte ptr [rax]
shl rax, 28h
or rax, [rbp+var_28]
mov [rbp+var_28], rax
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
movzx eax, byte ptr [rax]
shl rax, 30h
or rax, [rbp+var_28]
mov [rbp+var_28], rax
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
movzx eax, byte ptr [rax]
shl rax, 38h
or rax, [rbp+var_28]
mov [rbp+var_28], rax
mov rdx, [rbp+var_28]
mov rax, [rbp+var_8]
mov rcx, [rbp+var_20]
mov [rax+rcx*8], rdx
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
jmp loc_B6B5A
loc_B6C6E:
pop rbp
retn
|
long long blst_uint64_from_scalar(long long a1, unsigned __int8 *a2)
{
long long result; // rax
unsigned __int8 *v3; // rax
unsigned long long v4; // [rsp+0h] [rbp-28h]
unsigned long long i; // [rsp+8h] [rbp-20h]
unsigned __int8 *v6; // [rsp+18h] [rbp-10h]
v6 = a2;
result = a1;
if ( (unsigned __int8 *)a1 == a2 )
return 1LL;
for ( i = 0LL; i < 4; ++i )
{
v4 = *(unsigned __int16 *)v6 | ((unsigned long long)v6[2] << 16) | ((unsigned long long)v6[3] << 24) | ((unsigned long long)v6[4] << 32) | ((unsigned long long)v6[5] << 40) | ((unsigned long long)v6[6] << 48);
v3 = v6 + 7;
v6 += 8;
*(_QWORD *)(a1 + 8 * i) = v4 | ((unsigned long long)*v3 << 56);
result = i + 1;
}
return result;
}
|
blst_uint64_from_scalar:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [0x001e8740]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,RCX
JNZ 0x001b6b52
MOVSX EAX,byte ptr [RBP + -0x18]
CMP EAX,0x0
JZ 0x001b6b52
JMP 0x001b6c6e
LAB_001b6b52:
MOV qword ptr [RBP + -0x20],0x0
LAB_001b6b5a:
CMP qword ptr [RBP + -0x20],0x4
JNC 0x001b6c6e
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOVZX EAX,byte ptr [RAX]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOVZX EAX,byte ptr [RAX]
SHL RAX,0x8
OR RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOVZX EAX,byte ptr [RAX]
SHL RAX,0x10
OR RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOVZX EAX,byte ptr [RAX]
SHL RAX,0x18
OR RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOVZX EAX,byte ptr [RAX]
SHL RAX,0x20
OR RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOVZX EAX,byte ptr [RAX]
SHL RAX,0x28
OR RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOVZX EAX,byte ptr [RAX]
SHL RAX,0x30
OR RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOVZX EAX,byte ptr [RAX]
SHL RAX,0x38
OR RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x28],RAX
MOV RDX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + RCX*0x8],RDX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001b6b5a
LAB_001b6c6e:
POP RBP
RET
|
void blst_uint64_from_scalar(int8 *param_1,int8 *param_2)
{
ulong local_28;
char local_20;
int8 *local_18;
if ((param_1 != param_2) || (local_20 = (char)DAT_001e8740, local_20 == '\0')) {
local_18 = param_2;
for (local_28 = 0; local_28 < 4; local_28 = local_28 + 1) {
param_1[local_28] = *local_18;
local_18 = local_18 + 1;
}
}
return;
}
|
|
20,167
|
find_jump_target
|
bluesky950520[P]quickjs/quickjs.c
|
static int find_jump_target(JSFunctionDef *s, int label, int *pop)
{
int i, pos, op;
update_label(s, label, -1);
for (i = 0; i < 10; i++) {
assert(label >= 0 && label < s->label_count);
pos = s->label_slots[label].pos2;
for (;;) {
switch(op = s->byte_code.buf[pos]) {
case OP_source_loc:
case OP_label:
pos += opcode_info[op].size;
continue;
case OP_goto:
label = get_u32(s->byte_code.buf + pos + 1);
break;
case OP_drop:
/* ignore drop opcodes if followed by OP_return_undef */
while (s->byte_code.buf[++pos] == OP_drop)
continue;
if (s->byte_code.buf[pos] == OP_return_undef)
op = OP_return_undef;
/* fall thru */
default:
goto done;
}
break;
}
}
/* cycle detected, could issue a warning */
done:
*pop = op;
update_label(s, label, +1);
return label;
}
|
O0
|
c
|
find_jump_target:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x20(%rsp), %rdi
movl 0x1c(%rsp), %esi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
callq 0xb7340
movl $0x0, 0xc(%rsp)
cmpl $0xa, 0xc(%rsp)
jge 0xc2f40
movq 0x20(%rsp), %rax
movq 0x170(%rax), %rax
movslq 0x1c(%rsp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, 0x8(%rsp)
movq 0x20(%rsp), %rax
movq 0x138(%rax), %rax
movslq 0x8(%rsp), %rcx
movzbl (%rax,%rcx), %eax
movl %eax, (%rsp)
movl %eax, %ecx
subl $0xe, %ecx
movl %eax, 0x4(%rsp)
je 0xc2edf
jmp 0xc2e7c
movl (%rsp), %eax
subl $0x6b, %eax
je 0xc2ebc
jmp 0xc2e86
movl (%rsp), %eax
subl $0xb5, %eax
je 0xc2ea2
jmp 0xc2e92
movl (%rsp), %eax
subl $0xc4, %eax
jne 0xc2f2a
jmp 0xc2ea2
movslq 0x4(%rsp), %rcx
leaq 0x505a2(%rip), %rax # 0x113450
movzbl (%rax,%rcx,4), %eax
addl 0x8(%rsp), %eax
movl %eax, 0x8(%rsp)
jmp 0xc2e57
movq 0x20(%rsp), %rax
movq 0x138(%rax), %rdi
movslq 0x8(%rsp), %rax
addq %rax, %rdi
addq $0x1, %rdi
callq 0x654a0
movl %eax, 0x1c(%rsp)
jmp 0xc2f2c
jmp 0xc2ee1
movq 0x20(%rsp), %rax
movq 0x138(%rax), %rax
movl 0x8(%rsp), %ecx
addl $0x1, %ecx
movl %ecx, 0x8(%rsp)
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
cmpl $0xe, %eax
jne 0xc2f06
jmp 0xc2ee1
movq 0x20(%rsp), %rax
movq 0x138(%rax), %rax
movslq 0x8(%rsp), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x29, %eax
jne 0xc2f28
movl $0x29, 0x4(%rsp)
jmp 0xc2f2a
jmp 0xc2f42
jmp 0xc2f2e
jmp 0xc2f30
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0xc2e2d
jmp 0xc2f42
movl 0x4(%rsp), %ecx
movq 0x10(%rsp), %rax
movl %ecx, (%rax)
movq 0x20(%rsp), %rdi
movl 0x1c(%rsp), %esi
movl $0x1, %edx
callq 0xb7340
movl 0x1c(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax)
|
find_jump_target:
sub rsp, 28h
mov [rsp+28h+var_8], rdi
mov [rsp+28h+var_C], esi
mov [rsp+28h+var_18], rdx
mov rdi, [rsp+28h+var_8]
mov esi, [rsp+28h+var_C]
mov edx, 0FFFFFFFFh
call update_label
mov [rsp+28h+var_1C], 0
loc_C2E2D:
cmp [rsp+28h+var_1C], 0Ah
jge loc_C2F40
mov rax, [rsp+28h+var_8]
mov rax, [rax+170h]
movsxd rcx, [rsp+28h+var_C]
imul rcx, 18h
add rax, rcx
mov eax, [rax+8]
mov [rsp+28h+var_20], eax
loc_C2E57:
mov rax, [rsp+28h+var_8]
mov rax, [rax+138h]
movsxd rcx, [rsp+28h+var_20]
movzx eax, byte ptr [rax+rcx]
mov [rsp+28h+var_28], eax
mov ecx, eax
sub ecx, 0Eh
mov [rsp+28h+var_24], eax
jz short loc_C2EDF
jmp short $+2
loc_C2E7C:
mov eax, [rsp+28h+var_28]
sub eax, 6Bh ; 'k'
jz short loc_C2EBC
jmp short $+2
loc_C2E86:
mov eax, [rsp+28h+var_28]
sub eax, 0B5h
jz short loc_C2EA2
jmp short $+2
loc_C2E92:
mov eax, [rsp+28h+var_28]
sub eax, 0C4h
jnz loc_C2F2A
jmp short $+2
loc_C2EA2:
movsxd rcx, [rsp+28h+var_24]
lea rax, opcode_info
movzx eax, byte ptr [rax+rcx*4]
add eax, [rsp+28h+var_20]
mov [rsp+28h+var_20], eax
jmp short loc_C2E57
loc_C2EBC:
mov rax, [rsp+28h+var_8]
mov rdi, [rax+138h]
movsxd rax, [rsp+28h+var_20]
add rdi, rax
add rdi, 1
call get_u32
mov [rsp+28h+var_C], eax
jmp short loc_C2F2C
loc_C2EDF:
jmp short $+2
loc_C2EE1:
mov rax, [rsp+28h+var_8]
mov rax, [rax+138h]
mov ecx, [rsp+28h+var_20]
add ecx, 1
mov [rsp+28h+var_20], ecx
movsxd rcx, ecx
movzx eax, byte ptr [rax+rcx]
cmp eax, 0Eh
jnz short loc_C2F06
jmp short loc_C2EE1
loc_C2F06:
mov rax, [rsp+28h+var_8]
mov rax, [rax+138h]
movsxd rcx, [rsp+28h+var_20]
movzx eax, byte ptr [rax+rcx]
cmp eax, 29h ; ')'
jnz short loc_C2F28
mov [rsp+28h+var_24], 29h ; ')'
loc_C2F28:
jmp short $+2
loc_C2F2A:
jmp short loc_C2F42
loc_C2F2C:
jmp short $+2
loc_C2F2E:
jmp short $+2
loc_C2F30:
mov eax, [rsp+28h+var_1C]
add eax, 1
mov [rsp+28h+var_1C], eax
jmp loc_C2E2D
loc_C2F40:
jmp short $+2
loc_C2F42:
mov ecx, [rsp+28h+var_24]
mov rax, [rsp+28h+var_18]
mov [rax], ecx
mov rdi, [rsp+28h+var_8]
mov esi, [rsp+28h+var_C]
mov edx, 1
call update_label
mov eax, [rsp+28h+var_C]
add rsp, 28h
retn
|
long long find_jump_target(long long a1, int a2, int *a3)
{
int v4; // [rsp+0h] [rbp-28h]
int v5; // [rsp+4h] [rbp-24h]
int i; // [rsp+8h] [rbp-20h]
int v7; // [rsp+Ch] [rbp-1Ch]
int u32; // [rsp+1Ch] [rbp-Ch]
u32 = a2;
update_label(a1, a2, -1);
v7 = 0;
LABEL_2:
if ( v7 < 10 )
{
for ( i = *(_DWORD *)(24LL * u32 + *(_QWORD *)(a1 + 368) + 8);
;
i += opcode_info[4 * *(unsigned __int8 *)(*(_QWORD *)(a1 + 312) + i)] )
{
v4 = *(unsigned __int8 *)(*(_QWORD *)(a1 + 312) + i);
v5 = v4;
if ( v4 == 14 )
break;
if ( v4 == 107 )
{
u32 = get_u32((unsigned int *)(i + *(_QWORD *)(a1 + 312) + 1LL));
++v7;
goto LABEL_2;
}
if ( v4 != 181 && v4 != 196 )
goto LABEL_13;
}
do
++i;
while ( *(_BYTE *)(*(_QWORD *)(a1 + 312) + i) == 14 );
if ( *(_BYTE *)(*(_QWORD *)(a1 + 312) + i) == 41 )
v5 = 41;
}
LABEL_13:
*a3 = v5;
update_label(a1, u32, 1);
return (unsigned int)u32;
}
|
find_jump_target:
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],RDI
MOV dword ptr [RSP + 0x1c],ESI
MOV qword ptr [RSP + 0x10],RDX
MOV RDI,qword ptr [RSP + 0x20]
MOV ESI,dword ptr [RSP + 0x1c]
MOV EDX,0xffffffff
CALL 0x001b7340
MOV dword ptr [RSP + 0xc],0x0
LAB_001c2e2d:
CMP dword ptr [RSP + 0xc],0xa
JGE 0x001c2f40
MOV RAX,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RAX + 0x170]
MOVSXD RCX,dword ptr [RSP + 0x1c]
IMUL RCX,RCX,0x18
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0x8]
MOV dword ptr [RSP + 0x8],EAX
LAB_001c2e57:
MOV RAX,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RAX + 0x138]
MOVSXD RCX,dword ptr [RSP + 0x8]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV dword ptr [RSP],EAX
MOV ECX,EAX
SUB ECX,0xe
MOV dword ptr [RSP + 0x4],EAX
JZ 0x001c2edf
JMP 0x001c2e7c
LAB_001c2e7c:
MOV EAX,dword ptr [RSP]
SUB EAX,0x6b
JZ 0x001c2ebc
JMP 0x001c2e86
LAB_001c2e86:
MOV EAX,dword ptr [RSP]
SUB EAX,0xb5
JZ 0x001c2ea2
JMP 0x001c2e92
LAB_001c2e92:
MOV EAX,dword ptr [RSP]
SUB EAX,0xc4
JNZ 0x001c2f2a
JMP 0x001c2ea2
LAB_001c2ea2:
MOVSXD RCX,dword ptr [RSP + 0x4]
LEA RAX,[0x213450]
MOVZX EAX,byte ptr [RAX + RCX*0x4]
ADD EAX,dword ptr [RSP + 0x8]
MOV dword ptr [RSP + 0x8],EAX
JMP 0x001c2e57
LAB_001c2ebc:
MOV RAX,qword ptr [RSP + 0x20]
MOV RDI,qword ptr [RAX + 0x138]
MOVSXD RAX,dword ptr [RSP + 0x8]
ADD RDI,RAX
ADD RDI,0x1
CALL 0x001654a0
MOV dword ptr [RSP + 0x1c],EAX
JMP 0x001c2f2c
LAB_001c2edf:
JMP 0x001c2ee1
LAB_001c2ee1:
MOV RAX,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RAX + 0x138]
MOV ECX,dword ptr [RSP + 0x8]
ADD ECX,0x1
MOV dword ptr [RSP + 0x8],ECX
MOVSXD RCX,ECX
MOVZX EAX,byte ptr [RAX + RCX*0x1]
CMP EAX,0xe
JNZ 0x001c2f06
JMP 0x001c2ee1
LAB_001c2f06:
MOV RAX,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RAX + 0x138]
MOVSXD RCX,dword ptr [RSP + 0x8]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
CMP EAX,0x29
JNZ 0x001c2f28
MOV dword ptr [RSP + 0x4],0x29
LAB_001c2f28:
JMP 0x001c2f2a
LAB_001c2f2a:
JMP 0x001c2f42
LAB_001c2f2c:
JMP 0x001c2f2e
LAB_001c2f2e:
JMP 0x001c2f30
LAB_001c2f30:
MOV EAX,dword ptr [RSP + 0xc]
ADD EAX,0x1
MOV dword ptr [RSP + 0xc],EAX
JMP 0x001c2e2d
LAB_001c2f40:
JMP 0x001c2f42
LAB_001c2f42:
MOV ECX,dword ptr [RSP + 0x4]
MOV RAX,qword ptr [RSP + 0x10]
MOV dword ptr [RAX],ECX
MOV RDI,qword ptr [RSP + 0x20]
MOV ESI,dword ptr [RSP + 0x1c]
MOV EDX,0x1
CALL 0x001b7340
MOV EAX,dword ptr [RSP + 0x1c]
ADD RSP,0x28
RET
|
int find_jump_target(long param_1,int param_2,uint *param_3)
{
byte bVar1;
uint local_24;
int local_20;
int local_1c;
int local_c;
update_label(param_1,param_2,0xffffffff);
local_c = param_2;
for (local_1c = 0; local_1c < 10; local_1c = local_1c + 1) {
local_20 = *(int *)(*(long *)(param_1 + 0x170) + (long)local_c * 0x18 + 8);
while( true ) {
bVar1 = *(byte *)(*(long *)(param_1 + 0x138) + (long)local_20);
local_24 = (uint)bVar1;
if (bVar1 == 0xe) goto LAB_001c2ee1;
if (bVar1 == 0x6b) break;
if ((bVar1 != 0xb5) && (bVar1 != 0xc4)) goto LAB_001c2f42;
local_20 = (uint)(byte)opcode_info[(long)(int)local_24 * 4] + local_20;
}
local_c = get_u32(*(long *)(param_1 + 0x138) + (long)local_20 + 1);
}
LAB_001c2f42:
*param_3 = local_24;
update_label(param_1,local_c,1);
return local_c;
LAB_001c2ee1:
do {
local_20 = local_20 + 1;
} while (*(char *)(*(long *)(param_1 + 0x138) + (long)local_20) == '\x0e');
if (*(char *)(*(long *)(param_1 + 0x138) + (long)local_20) == ')') {
local_24 = 0x29;
}
goto LAB_001c2f42;
}
|
|
20,168
|
psi_rwlock_rdlock
|
eloqsql/mysys/my_thr_init.c
|
ATTRIBUTE_COLD
int psi_rwlock_rdlock(mysql_rwlock_t *that, const char *file, uint line)
{
PSI_rwlock_locker_state state;
PSI_rwlock_locker *locker= PSI_RWLOCK_CALL(start_rwlock_rdwait)
(&state, that->m_psi, PSI_RWLOCK_READLOCK, file, line);
int result= rw_rdlock(&that->m_rwlock);
if (locker)
PSI_RWLOCK_CALL(end_rwlock_rdwait)(locker, result);
return result;
}
|
O0
|
c
|
psi_rwlock_rdlock:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
leaq 0x23d12e(%rip), %rax # 0x301fb8
movq (%rax), %rax
movq 0x1a0(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x90(%rcx), %rsi
movq -0x10(%rbp), %rcx
movl -0x14(%rbp), %r8d
leaq -0x48(%rbp), %rdi
xorl %edx, %edx
callq *%rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rdi
callq 0xc65c0
movl %eax, -0x54(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0xc4ee0
leaq 0x23d0eb(%rip), %rax # 0x301fb8
movq (%rax), %rax
movq 0x1a8(%rax), %rax
movq -0x50(%rbp), %rdi
movl -0x54(%rbp), %esi
callq *%rax
movl -0x54(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
|
psi_rwlock_rdlock:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+1A0h]
mov rcx, [rbp+var_8]
mov rsi, [rcx+90h]
mov rcx, [rbp+var_10]
mov r8d, [rbp+var_14]
lea rdi, [rbp+var_48]
xor edx, edx
call rax
mov [rbp+var_50], rax
mov rdi, [rbp+var_8]
call my_rw_rdlock
mov [rbp+var_54], eax
cmp [rbp+var_50], 0
jz short loc_C4EE0
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+1A8h]
mov rdi, [rbp+var_50]
mov esi, [rbp+var_54]
call rax
loc_C4EE0:
mov eax, [rbp+var_54]
add rsp, 60h
pop rbp
retn
|
long long psi_rwlock_rdlock(long long a1, long long a2, unsigned int a3)
{
unsigned int v4; // [rsp+Ch] [rbp-54h]
long long v5; // [rsp+10h] [rbp-50h]
_BYTE v6[52]; // [rsp+18h] [rbp-48h] BYREF
unsigned int v7; // [rsp+4Ch] [rbp-14h]
long long v8; // [rsp+50h] [rbp-10h]
long long v9; // [rsp+58h] [rbp-8h]
v9 = a1;
v8 = a2;
v7 = a3;
v5 = (*((long long ( **)(_BYTE *, _QWORD, _QWORD, long long, _QWORD))PSI_server + 52))(
v6,
*(_QWORD *)(a1 + 144),
0LL,
a2,
a3);
v4 = my_rw_rdlock(v9);
if ( v5 )
(*((void ( **)(long long, _QWORD))PSI_server + 53))(v5, v4);
return v4;
}
|
psi_rwlock_rdlock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
LEA RAX,[0x401fb8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x1a0]
MOV RCX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RCX + 0x90]
MOV RCX,qword ptr [RBP + -0x10]
MOV R8D,dword ptr [RBP + -0x14]
LEA RDI,[RBP + -0x48]
XOR EDX,EDX
CALL RAX
MOV qword ptr [RBP + -0x50],RAX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001c65c0
MOV dword ptr [RBP + -0x54],EAX
CMP qword ptr [RBP + -0x50],0x0
JZ 0x001c4ee0
LEA RAX,[0x401fb8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x1a8]
MOV RDI,qword ptr [RBP + -0x50]
MOV ESI,dword ptr [RBP + -0x54]
CALL RAX
LAB_001c4ee0:
MOV EAX,dword ptr [RBP + -0x54]
ADD RSP,0x60
POP RBP
RET
|
int4 psi_rwlock_rdlock(long param_1,int8 param_2,int4 param_3)
{
int4 uVar1;
long lVar2;
int1 local_50 [52];
int4 local_1c;
int8 local_18;
long local_10;
local_1c = param_3;
local_18 = param_2;
local_10 = param_1;
lVar2 = (**(code **)(PSI_server + 0x1a0))
(local_50,*(int8 *)(param_1 + 0x90),0,param_2,param_3);
uVar1 = my_rw_rdlock(local_10);
if (lVar2 != 0) {
(**(code **)(PSI_server + 0x1a8))(lVar2,uVar1);
}
return uVar1;
}
|
|
20,169
|
ggml_sub_impl
|
7CodeWizard[P]stablediffusion/ggml/src/ggml.c
|
static struct ggml_tensor * ggml_sub_impl(
struct ggml_context * ctx,
struct ggml_tensor * a,
struct ggml_tensor * b,
bool inplace) {
GGML_ASSERT(ggml_are_same_shape(a, b));
bool is_node = false;
if (!inplace && (a->grad || b->grad)) {
is_node = true;
}
struct ggml_tensor * result = inplace ? ggml_view_tensor(ctx, a) : ggml_dup_tensor(ctx, a);
result->op = GGML_OP_SUB;
result->grad = is_node ? ggml_dup_tensor(ctx, result) : NULL;
result->src[0] = a;
result->src[1] = b;
return result;
}
|
O0
|
c
|
ggml_sub_impl:
subq $0x38, %rsp
movb %cl, %al
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
andb $0x1, %al
movb %al, 0x1f(%rsp)
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x11b600
testb $0x1, %al
jne 0x11f4d2
movq 0xb8a93(%rip), %rax # 0x1d7f28
movq (%rax), %rdi
callq 0xb8e0
movq 0xb8b04(%rip), %rax # 0x1d7fa8
movq (%rax), %rdi
leaq 0x6076c(%rip), %rsi # 0x17fc1a
leaq 0x6a1b9(%rip), %rdx # 0x18966e
movl $0xd1a, %ecx # imm = 0xD1A
leaq 0x6ab7b(%rip), %r8 # 0x18a03c
movb $0x0, %al
callq 0xbae0
callq 0x11a4f0
callq 0xb3a0
jmp 0x11f4d4
movb $0x0, 0x1e(%rsp)
testb $0x1, 0x1f(%rsp)
jne 0x11f503
movq 0x28(%rsp), %rax
cmpq $0x0, 0x98(%rax)
jne 0x11f4fe
movq 0x20(%rsp), %rax
cmpq $0x0, 0x98(%rax)
je 0x11f503
movb $0x1, 0x1e(%rsp)
testb $0x1, 0x1f(%rsp)
je 0x11f520
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x11e7e0
movq %rax, 0x8(%rsp)
jmp 0x11f534
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x11cfc0
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movl $0x5, 0x50(%rax)
testb $0x1, 0x1e(%rsp)
je 0x11f566
movq 0x30(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x11cfc0
movq %rax, (%rsp)
jmp 0x11f56e
xorl %eax, %eax
movq %rax, (%rsp)
jmp 0x11f56e
movq (%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x98(%rax)
movq 0x28(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0xa0(%rax)
movq 0x20(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0xa8(%rax)
movq 0x10(%rsp), %rax
addq $0x38, %rsp
retq
nopw (%rax,%rax)
|
ggml_sub_impl:
sub rsp, 38h
mov al, cl
mov [rsp+38h+var_8], rdi
mov [rsp+38h+var_10], rsi
mov [rsp+38h+var_18], rdx
and al, 1
mov [rsp+38h+var_19], al
mov rdi, [rsp+38h+var_10]
mov rsi, [rsp+38h+var_18]
call ggml_are_same_shape
test al, 1
jnz short loc_11F4D2
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n"
lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"...
mov ecx, 0D1Ah
lea r8, aGgmlAreSameSha; "ggml_are_same_shape(a, b)"
mov al, 0
call _fprintf
call ggml_print_backtrace
call _abort
loc_11F4D2:
jmp short $+2
loc_11F4D4:
mov [rsp+38h+var_1A], 0
test [rsp+38h+var_19], 1
jnz short loc_11F503
mov rax, [rsp+38h+var_10]
cmp qword ptr [rax+98h], 0
jnz short loc_11F4FE
mov rax, [rsp+38h+var_18]
cmp qword ptr [rax+98h], 0
jz short loc_11F503
loc_11F4FE:
mov [rsp+38h+var_1A], 1
loc_11F503:
test [rsp+38h+var_19], 1
jz short loc_11F520
mov rdi, [rsp+38h+var_8]
mov rsi, [rsp+38h+var_10]
call ggml_view_tensor
mov [rsp+38h+var_30], rax
jmp short loc_11F534
loc_11F520:
mov rdi, [rsp+38h+var_8]
mov rsi, [rsp+38h+var_10]
call ggml_dup_tensor
mov [rsp+38h+var_30], rax
loc_11F534:
mov rax, [rsp+38h+var_30]
mov [rsp+38h+var_28], rax
mov rax, [rsp+38h+var_28]
mov dword ptr [rax+50h], 5
test [rsp+38h+var_1A], 1
jz short loc_11F566
mov rdi, [rsp+38h+var_8]
mov rsi, [rsp+38h+var_28]
call ggml_dup_tensor
mov [rsp+38h+var_38], rax
jmp short loc_11F56E
loc_11F566:
xor eax, eax
mov [rsp+38h+var_38], rax
jmp short $+2
loc_11F56E:
mov rcx, [rsp+38h+var_38]
mov rax, [rsp+38h+var_28]
mov [rax+98h], rcx
mov rcx, [rsp+38h+var_10]
mov rax, [rsp+38h+var_28]
mov [rax+0A0h], rcx
mov rcx, [rsp+38h+var_18]
mov rax, [rsp+38h+var_28]
mov [rax+0A8h], rcx
mov rax, [rsp+38h+var_28]
add rsp, 38h
retn
|
long long ggml_sub_impl(
long long a1,
unsigned int *a2,
_QWORD *a3,
char a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
double a9,
double a10,
__m128 a11,
__m128 a12)
{
double v12; // xmm4_8
double v13; // xmm5_8
long long v14; // rdi
long long v16; // [rsp+0h] [rbp-38h]
long long v17; // [rsp+8h] [rbp-30h]
char v18; // [rsp+1Eh] [rbp-1Ah]
char v19; // [rsp+1Fh] [rbp-19h]
v19 = a4 & 1;
if ( !ggml_are_same_shape(a2, a3) )
{
fflush(stdout);
v14 = stderr;
fprintf(
stderr,
"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c",
3354,
"ggml_are_same_shape(a, b)");
ggml_print_backtrace();
abort(v14);
}
v18 = 0;
if ( (v19 & 1) == 0 && (*((_QWORD *)a2 + 19) || a3[19]) )
v18 = 1;
if ( (v19 & 1) != 0 )
v17 = (long long)ggml_view_tensor(a1, (long long)a2, a5, a6, a7, a8, v12, v13, a11, a12);
else
v17 = ggml_dup_tensor(a1, a2);
*(_DWORD *)(v17 + 80) = 5;
if ( (v18 & 1) != 0 )
v16 = ggml_dup_tensor(a1, (unsigned int *)v17);
else
v16 = 0LL;
*(_QWORD *)(v17 + 152) = v16;
*(_QWORD *)(v17 + 160) = a2;
*(_QWORD *)(v17 + 168) = a3;
return v17;
}
| |||
20,170
|
ggml_sub_impl
|
7CodeWizard[P]stablediffusion/ggml/src/ggml.c
|
static struct ggml_tensor * ggml_sub_impl(
struct ggml_context * ctx,
struct ggml_tensor * a,
struct ggml_tensor * b,
bool inplace) {
GGML_ASSERT(ggml_are_same_shape(a, b));
bool is_node = false;
if (!inplace && (a->grad || b->grad)) {
is_node = true;
}
struct ggml_tensor * result = inplace ? ggml_view_tensor(ctx, a) : ggml_dup_tensor(ctx, a);
result->op = GGML_OP_SUB;
result->grad = is_node ? ggml_dup_tensor(ctx, result) : NULL;
result->src[0] = a;
result->src[1] = b;
return result;
}
|
O1
|
c
|
ggml_sub_impl:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x10(%rsi), %rax
cmpq 0x10(%rdx), %rax
jne 0x912c3
movq %rdx, %rbx
movq %rsi, %r14
movq 0x18(%rsi), %rax
cmpq 0x18(%rdx), %rax
jne 0x912c3
movq 0x20(%r14), %rax
cmpq 0x20(%rbx), %rax
jne 0x912c3
movq 0x28(%r14), %rax
cmpq 0x28(%rbx), %rax
jne 0x912c3
movq %rdi, %r15
testb %cl, %cl
je 0x9122e
xorl %ebp, %ebp
jmp 0x91245
cmpq $0x0, 0x98(%r14)
jne 0x91242
cmpq $0x0, 0x98(%rbx)
je 0x9122a
movb $0x1, %bpl
testb %cl, %cl
je 0x91256
movq %r15, %rdi
movq %r14, %rsi
callq 0x90b1a
jmp 0x91270
leaq 0x10(%r14), %rcx
movl (%r14), %esi
movq %r15, %rdi
movl $0x4, %edx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x8e8b7
movq %rax, %r12
movl $0x5, 0x50(%rax)
testb %bpl, %bpl
je 0x9129d
movl (%r12), %esi
leaq 0x10(%r12), %rcx
movq %r15, %rdi
movl $0x4, %edx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x8e8b7
jmp 0x9129f
xorl %eax, %eax
movq %rax, 0x98(%r12)
movq %r14, 0xa0(%r12)
movq %rbx, 0xa8(%r12)
movq %r12, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0xce00
|
ggml_sub_impl:
push rbp
push r15
push r14
push r12
push rbx
mov rax, [rsi+10h]
cmp rax, [rdx+10h]
jnz loc_912C3
mov rbx, rdx
mov r14, rsi
mov rax, [rsi+18h]
cmp rax, [rdx+18h]
jnz loc_912C3
mov rax, [r14+20h]
cmp rax, [rbx+20h]
jnz loc_912C3
mov rax, [r14+28h]
cmp rax, [rbx+28h]
jnz loc_912C3
mov r15, rdi
test cl, cl
jz short loc_9122E
loc_9122A:
xor ebp, ebp
jmp short loc_91245
loc_9122E:
cmp qword ptr [r14+98h], 0
jnz short loc_91242
cmp qword ptr [rbx+98h], 0
jz short loc_9122A
loc_91242:
mov bpl, 1
loc_91245:
test cl, cl
jz short loc_91256
mov rdi, r15
mov rsi, r14
call ggml_view_tensor
jmp short loc_91270
loc_91256:
lea rcx, [r14+10h]
mov esi, [r14]
mov rdi, r15
mov edx, 4
xor r8d, r8d
xor r9d, r9d
call ggml_new_tensor_impl
loc_91270:
mov r12, rax
mov dword ptr [rax+50h], 5
test bpl, bpl
jz short loc_9129D
mov esi, [r12]
lea rcx, [r12+10h]
mov rdi, r15
mov edx, 4
xor r8d, r8d
xor r9d, r9d
call ggml_new_tensor_impl
jmp short loc_9129F
loc_9129D:
xor eax, eax
loc_9129F:
mov [r12+98h], rax
mov [r12+0A0h], r14
mov [r12+0A8h], rbx
mov rax, r12
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_912C3:
call ggml_sub_impl_cold_1
|
_QWORD * ggml_sub_impl(
long long a1,
long long a2,
_QWORD *a3,
char a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
double a9,
double a10,
__m128 a11,
__m128 a12)
{
bool v13; // bp
long long v14; // rax
_QWORD *v15; // r12
long long v16; // rax
if ( *(_QWORD *)(a2 + 16) != a3[2]
|| *(_QWORD *)(a2 + 24) != a3[3]
|| *(_QWORD *)(a2 + 32) != a3[4]
|| *(_QWORD *)(a2 + 40) != a3[5] )
{
ggml_sub_impl_cold_1();
}
v13 = !a4 && (*(_QWORD *)(a2 + 152) || a3[19]);
if ( a4 )
v14 = ggml_view_tensor(a1, a2, a5, a6, a7, a8, a9, a10, a11, a12);
else
v14 = ggml_new_tensor_impl(a1, *(_DWORD *)a2, 4, (_QWORD *)(a2 + 16), 0LL, 0LL, a5, a6);
v15 = (_QWORD *)v14;
*(_DWORD *)(v14 + 80) = 5;
if ( v13 )
v16 = ggml_new_tensor_impl(a1, *(_DWORD *)v14, 4, (_QWORD *)(v14 + 16), 0LL, 0LL, a5, a6);
else
v16 = 0LL;
v15[19] = v16;
v15[20] = a2;
v15[21] = a3;
return v15;
}
| |||
20,171
|
ggml_sub_impl
|
7CodeWizard[P]stablediffusion/ggml/src/ggml.c
|
static struct ggml_tensor * ggml_sub_impl(
struct ggml_context * ctx,
struct ggml_tensor * a,
struct ggml_tensor * b,
bool inplace) {
GGML_ASSERT(ggml_are_same_shape(a, b));
bool is_node = false;
if (!inplace && (a->grad || b->grad)) {
is_node = true;
}
struct ggml_tensor * result = inplace ? ggml_view_tensor(ctx, a) : ggml_dup_tensor(ctx, a);
result->op = GGML_OP_SUB;
result->grad = is_node ? ggml_dup_tensor(ctx, result) : NULL;
result->src[0] = a;
result->src[1] = b;
return result;
}
|
O2
|
c
|
ggml_sub_impl:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x67e29
testb %al, %al
je 0x6a14f
testb %bpl, %bpl
je 0x6a0e7
movq %r15, %rdi
movq %r14, %rsi
callq 0x69922
movq %rax, %r12
movl $0x5, 0x50(%rax)
jmp 0x6a125
cmpq $0x0, 0x98(%r14)
jne 0x6a0fb
cmpq $0x0, 0x98(%rbx)
je 0x6a14b
movb $0x1, %bpl
movq %r15, %rdi
movq %r14, %rsi
callq 0x68a65
movq %rax, %r12
movl $0x5, 0x50(%rax)
testb %bpl, %bpl
je 0x6a125
movq %r15, %rdi
movq %r12, %rsi
callq 0x68a65
jmp 0x6a127
xorl %eax, %eax
movq %rax, 0x98(%r12)
movq %r14, 0xa0(%r12)
movq %rbx, 0xa8(%r12)
movq %r12, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorl %ebp, %ebp
jmp 0x6a0fe
movq 0x6bdf2(%rip), %rax # 0xd5f48
movq (%rax), %rdi
callq 0xa6f0
movq 0x6be43(%rip), %rax # 0xd5fa8
movq (%rax), %rdi
leaq 0x300af(%rip), %rsi # 0x9a21e
leaq 0x37708(%rip), %rdx # 0xa187e
leaq 0x38029(%rip), %r8 # 0xa21a6
movl $0xd1a, %ecx # imm = 0xD1A
xorl %eax, %eax
callq 0xa8b0
callq 0x67550
callq 0xa300
|
ggml_sub_impl:
push rbp
push r15
push r14
push r12
push rbx
mov ebp, ecx
mov rbx, rdx
mov r14, rsi
mov r15, rdi
mov rdi, rsi
mov rsi, rdx
call ggml_are_same_shape
test al, al
jz loc_6A14F
test bpl, bpl
jz short loc_6A0E7
mov rdi, r15
mov rsi, r14
call ggml_view_tensor
mov r12, rax
mov dword ptr [rax+50h], 5
jmp short loc_6A125
loc_6A0E7:
cmp qword ptr [r14+98h], 0
jnz short loc_6A0FB
cmp qword ptr [rbx+98h], 0
jz short loc_6A14B
loc_6A0FB:
mov bpl, 1
loc_6A0FE:
mov rdi, r15
mov rsi, r14
call ggml_dup_tensor
mov r12, rax
mov dword ptr [rax+50h], 5
test bpl, bpl
jz short loc_6A125
mov rdi, r15
mov rsi, r12
call ggml_dup_tensor
jmp short loc_6A127
loc_6A125:
xor eax, eax
loc_6A127:
mov [r12+98h], rax
mov [r12+0A0h], r14
mov [r12+0A8h], rbx
mov rax, r12
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_6A14B:
xor ebp, ebp
jmp short loc_6A0FE
loc_6A14F:
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n"
lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"...
lea r8, aGgmlAreSameSha; "ggml_are_same_shape(a, b)"
mov ecx, 0D1Ah
xor eax, eax
call _fprintf
call ggml_print_backtrace
call _abort
|
long long ggml_sub_impl(
long long a1,
unsigned int *a2,
_QWORD *a3,
char a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
double a9,
double a10,
__m128 a11,
__m128 a12)
{
double v14; // xmm4_8
double v15; // xmm5_8
long long v16; // r12
bool v17; // bp
unsigned int *v18; // rax
long long v19; // rax
long long v21; // rdi
if ( !ggml_are_same_shape(a2, a3) )
{
fflush(stdout);
v21 = stderr;
fprintf(
stderr,
"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c",
3354,
"ggml_are_same_shape(a, b)");
ggml_print_backtrace();
abort(v21);
}
if ( a4 )
{
v16 = ggml_view_tensor(a1, (long long)a2, a5, a6, a7, a8, v14, v15, a11, a12);
*(_DWORD *)(v16 + 80) = 5;
LABEL_9:
v19 = 0LL;
goto LABEL_10;
}
v17 = *((_QWORD *)a2 + 19) || a3[19];
v18 = (unsigned int *)ggml_dup_tensor(a1, a2);
v16 = (long long)v18;
v18[20] = 5;
if ( !v17 )
goto LABEL_9;
v19 = ggml_dup_tensor(a1, v18);
LABEL_10:
*(_QWORD *)(v16 + 152) = v19;
*(_QWORD *)(v16 + 160) = a2;
*(_QWORD *)(v16 + 168) = a3;
return v16;
}
|
ggml_sub_impl:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV EBP,ECX
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
MOV RDI,RSI
MOV RSI,RDX
CALL 0x00167e29
TEST AL,AL
JZ 0x0016a14f
TEST BPL,BPL
JZ 0x0016a0e7
MOV RDI,R15
MOV RSI,R14
CALL 0x00169922
MOV R12,RAX
MOV dword ptr [RAX + 0x50],0x5
JMP 0x0016a125
LAB_0016a0e7:
CMP qword ptr [R14 + 0x98],0x0
JNZ 0x0016a0fb
CMP qword ptr [RBX + 0x98],0x0
JZ 0x0016a14b
LAB_0016a0fb:
MOV BPL,0x1
LAB_0016a0fe:
MOV RDI,R15
MOV RSI,R14
CALL 0x00168a65
MOV R12,RAX
MOV dword ptr [RAX + 0x50],0x5
TEST BPL,BPL
JZ 0x0016a125
MOV RDI,R15
MOV RSI,R12
CALL 0x00168a65
JMP 0x0016a127
LAB_0016a125:
XOR EAX,EAX
LAB_0016a127:
MOV qword ptr [R12 + 0x98],RAX
MOV qword ptr [R12 + 0xa0],R14
MOV qword ptr [R12 + 0xa8],RBX
MOV RAX,R12
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0016a14b:
XOR EBP,EBP
JMP 0x0016a0fe
LAB_0016a14f:
MOV RAX,qword ptr [0x001d5f48]
MOV RDI,qword ptr [RAX]
CALL 0x0010a6f0
MOV RAX,qword ptr [0x001d5fa8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x19a21e]
LEA RDX,[0x1a187e]
LEA R8,[0x1a21a6]
MOV ECX,0xd1a
XOR EAX,EAX
CALL 0x0010a8b0
CALL 0x00167550
CALL 0x0010a300
|
long ggml_sub_impl(int8 param_1,long param_2,long param_3,char param_4)
{
bool bVar1;
char cVar2;
long lVar3;
int8 uVar4;
cVar2 = ggml_are_same_shape(param_2,param_3);
if (cVar2 == '\0') {
fflush(*(FILE **)PTR_stdout_001d5f48);
fprintf(*(FILE **)PTR_stderr_001d5fa8,"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c",
0xd1a,"ggml_are_same_shape(a, b)");
ggml_print_backtrace();
/* WARNING: Subroutine does not return */
abort();
}
if (param_4 == '\0') {
if ((*(long *)(param_2 + 0x98) == 0) && (*(long *)(param_3 + 0x98) == 0)) {
bVar1 = false;
}
else {
bVar1 = true;
}
lVar3 = ggml_dup_tensor(param_1,param_2);
*(int4 *)(lVar3 + 0x50) = 5;
if (bVar1) {
uVar4 = ggml_dup_tensor(param_1,lVar3);
goto LAB_0016a127;
}
}
else {
lVar3 = ggml_view_tensor(param_1,param_2);
*(int4 *)(lVar3 + 0x50) = 5;
}
uVar4 = 0;
LAB_0016a127:
*(int8 *)(lVar3 + 0x98) = uVar4;
*(long *)(lVar3 + 0xa0) = param_2;
*(long *)(lVar3 + 0xa8) = param_3;
return lVar3;
}
|
|
20,172
|
my_strntoull_8bit
|
eloqsql/strings/ctype-simple.c
|
ulonglong my_strntoull_8bit(CHARSET_INFO *cs,
const char *nptr, size_t l, int base,
char **endptr, int *err)
{
int negative;
register ulonglong cutoff;
register uint cutlim;
register ulonglong i;
register const char *s, *e;
const char *save;
int overflow;
*err= 0; /* Initialize error indicator */
s = nptr;
e = nptr+l;
for(; s<e && my_isspace(cs,*s); s++);
if (s == e)
{
goto noconv;
}
if (*s == '-')
{
negative = 1;
++s;
}
else if (*s == '+')
{
negative = 0;
++s;
}
else
negative = 0;
save = s;
cutoff = (~(ulonglong) 0) / (unsigned long int) base;
cutlim = (uint) ((~(ulonglong) 0) % (unsigned long int) base);
overflow = 0;
i = 0;
for ( ; s != e; s++)
{
register uchar c= *s;
if (c>='0' && c<='9')
c -= '0';
else if (c>='A' && c<='Z')
c = c - 'A' + 10;
else if (c>='a' && c<='z')
c = c - 'a' + 10;
else
break;
if (c >= base)
break;
if (i > cutoff || (i == cutoff && c > cutlim))
overflow = 1;
else
{
i *= (ulonglong) base;
i += c;
}
}
if (s == save)
goto noconv;
if (endptr != NULL)
*endptr = (char *) s;
if (overflow)
{
err[0]= ERANGE;
return (~(ulonglong) 0);
}
return (negative ? -((longlong) i) : (longlong) i);
noconv:
err[0]= EDOM;
if (endptr != NULL)
*endptr = (char *) nptr;
return 0L;
}
|
O0
|
c
|
my_strntoull_8bit:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq -0x38(%rbp), %rax
movl $0x0, (%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x18(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %rcx
xorl %eax, %eax
cmpq -0x68(%rbp), %rcx
movb %al, -0x76(%rbp)
jae 0x11a608
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x60(%rbp), %rcx
movzbl (%rcx), %ecx
movzbl 0x1(%rax,%rcx), %eax
andl $0x8, %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x76(%rbp)
movb -0x76(%rbp), %al
testb $0x1, %al
jne 0x11a611
jmp 0x11a621
jmp 0x11a613
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x11a5d9
movq -0x60(%rbp), %rax
cmpq -0x68(%rbp), %rax
jne 0x11a630
jmp 0x11a7f1
movq -0x60(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x11a651
movl $0x1, -0x3c(%rbp)
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x11a67b
movq -0x60(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2b, %eax
jne 0x11a672
movl $0x0, -0x3c(%rbp)
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x11a679
movl $0x0, -0x3c(%rbp)
jmp 0x11a67b
movq -0x60(%rbp), %rax
movq %rax, -0x70(%rbp)
movslq -0x24(%rbp), %rcx
movq $-0x1, %rax
xorl %edx, %edx
divq %rcx
movq %rax, -0x48(%rbp)
movslq -0x24(%rbp), %rcx
movq $-0x1, %rax
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, -0x4c(%rbp)
movl $0x0, -0x74(%rbp)
movq $0x0, -0x58(%rbp)
movq -0x60(%rbp), %rax
cmpq -0x68(%rbp), %rax
je 0x11a795
movq -0x60(%rbp), %rax
movb (%rax), %al
movb %al, -0x75(%rbp)
movzbl -0x75(%rbp), %eax
cmpl $0x30, %eax
jl 0x11a6f0
movzbl -0x75(%rbp), %eax
cmpl $0x39, %eax
jg 0x11a6f0
movzbl -0x75(%rbp), %eax
subl $0x30, %eax
movb %al, -0x75(%rbp)
jmp 0x11a738
movzbl -0x75(%rbp), %eax
cmpl $0x41, %eax
jl 0x11a711
movzbl -0x75(%rbp), %eax
cmpl $0x5a, %eax
jg 0x11a711
movzbl -0x75(%rbp), %eax
subl $0x41, %eax
addl $0xa, %eax
movb %al, -0x75(%rbp)
jmp 0x11a736
movzbl -0x75(%rbp), %eax
cmpl $0x61, %eax
jl 0x11a732
movzbl -0x75(%rbp), %eax
cmpl $0x7a, %eax
jg 0x11a732
movzbl -0x75(%rbp), %eax
subl $0x61, %eax
addl $0xa, %eax
movb %al, -0x75(%rbp)
jmp 0x11a734
jmp 0x11a795
jmp 0x11a736
jmp 0x11a738
movzbl -0x75(%rbp), %eax
cmpl -0x24(%rbp), %eax
jl 0x11a743
jmp 0x11a795
movq -0x58(%rbp), %rax
cmpq -0x48(%rbp), %rax
ja 0x11a760
movq -0x58(%rbp), %rax
cmpq -0x48(%rbp), %rax
jne 0x11a769
movzbl -0x75(%rbp), %eax
cmpl -0x4c(%rbp), %eax
jbe 0x11a769
movl $0x1, -0x74(%rbp)
jmp 0x11a782
movslq -0x24(%rbp), %rax
imulq -0x58(%rbp), %rax
movq %rax, -0x58(%rbp)
movzbl -0x75(%rbp), %eax
addq -0x58(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0x11a784
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x11a6bb
movq -0x60(%rbp), %rax
cmpq -0x70(%rbp), %rax
jne 0x11a7a1
jmp 0x11a7f1
cmpq $0x0, -0x30(%rbp)
je 0x11a7b3
movq -0x60(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
cmpl $0x0, -0x74(%rbp)
je 0x11a7cd
movq -0x38(%rbp), %rax
movl $0x22, (%rax)
movq $-0x1, -0x8(%rbp)
jmp 0x11a815
cmpl $0x0, -0x3c(%rbp)
je 0x11a7df
xorl %eax, %eax
subq -0x58(%rbp), %rax
movq %rax, -0x80(%rbp)
jmp 0x11a7e7
movq -0x58(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x11a815
movq -0x38(%rbp), %rax
movl $0x21, (%rax)
cmpq $0x0, -0x30(%rbp)
je 0x11a80d
movq -0x18(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax,%rax)
|
my_strntoull_8bit:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_24], ecx
mov [rbp+var_30], r8
mov [rbp+var_38], r9
mov rax, [rbp+var_38]
mov dword ptr [rax], 0
mov rax, [rbp+var_18]
mov [rbp+var_60], rax
mov rax, [rbp+var_18]
add rax, [rbp+var_20]
mov [rbp+var_68], rax
loc_11A5D9:
mov rcx, [rbp+var_60]
xor eax, eax
cmp rcx, [rbp+var_68]
mov [rbp+var_76], al
jnb short loc_11A608
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov rcx, [rbp+var_60]
movzx ecx, byte ptr [rcx]
movzx eax, byte ptr [rax+rcx+1]
and eax, 8
cmp eax, 0
setnz al
mov [rbp+var_76], al
loc_11A608:
mov al, [rbp+var_76]
test al, 1
jnz short loc_11A611
jmp short loc_11A621
loc_11A611:
jmp short $+2
loc_11A613:
mov rax, [rbp+var_60]
add rax, 1
mov [rbp+var_60], rax
jmp short loc_11A5D9
loc_11A621:
mov rax, [rbp+var_60]
cmp rax, [rbp+var_68]
jnz short loc_11A630
jmp loc_11A7F1
loc_11A630:
mov rax, [rbp+var_60]
movsx eax, byte ptr [rax]
cmp eax, 2Dh ; '-'
jnz short loc_11A651
mov [rbp+var_3C], 1
mov rax, [rbp+var_60]
add rax, 1
mov [rbp+var_60], rax
jmp short loc_11A67B
loc_11A651:
mov rax, [rbp+var_60]
movsx eax, byte ptr [rax]
cmp eax, 2Bh ; '+'
jnz short loc_11A672
mov [rbp+var_3C], 0
mov rax, [rbp+var_60]
add rax, 1
mov [rbp+var_60], rax
jmp short loc_11A679
loc_11A672:
mov [rbp+var_3C], 0
loc_11A679:
jmp short $+2
loc_11A67B:
mov rax, [rbp+var_60]
mov [rbp+var_70], rax
movsxd rcx, [rbp+var_24]
mov rax, 0FFFFFFFFFFFFFFFFh
xor edx, edx
div rcx
mov [rbp+var_48], rax
movsxd rcx, [rbp+var_24]
mov rax, 0FFFFFFFFFFFFFFFFh
xor edx, edx
div rcx
mov eax, edx
mov [rbp+var_4C], eax
mov [rbp+var_74], 0
mov [rbp+var_58], 0
loc_11A6BB:
mov rax, [rbp+var_60]
cmp rax, [rbp+var_68]
jz loc_11A795
mov rax, [rbp+var_60]
mov al, [rax]
mov [rbp+var_75], al
movzx eax, [rbp+var_75]
cmp eax, 30h ; '0'
jl short loc_11A6F0
movzx eax, [rbp+var_75]
cmp eax, 39h ; '9'
jg short loc_11A6F0
movzx eax, [rbp+var_75]
sub eax, 30h ; '0'
mov [rbp+var_75], al
jmp short loc_11A738
loc_11A6F0:
movzx eax, [rbp+var_75]
cmp eax, 41h ; 'A'
jl short loc_11A711
movzx eax, [rbp+var_75]
cmp eax, 5Ah ; 'Z'
jg short loc_11A711
movzx eax, [rbp+var_75]
sub eax, 41h ; 'A'
add eax, 0Ah
mov [rbp+var_75], al
jmp short loc_11A736
loc_11A711:
movzx eax, [rbp+var_75]
cmp eax, 61h ; 'a'
jl short loc_11A732
movzx eax, [rbp+var_75]
cmp eax, 7Ah ; 'z'
jg short loc_11A732
movzx eax, [rbp+var_75]
sub eax, 61h ; 'a'
add eax, 0Ah
mov [rbp+var_75], al
jmp short loc_11A734
loc_11A732:
jmp short loc_11A795
loc_11A734:
jmp short $+2
loc_11A736:
jmp short $+2
loc_11A738:
movzx eax, [rbp+var_75]
cmp eax, [rbp+var_24]
jl short loc_11A743
jmp short loc_11A795
loc_11A743:
mov rax, [rbp+var_58]
cmp rax, [rbp+var_48]
ja short loc_11A760
mov rax, [rbp+var_58]
cmp rax, [rbp+var_48]
jnz short loc_11A769
movzx eax, [rbp+var_75]
cmp eax, [rbp+var_4C]
jbe short loc_11A769
loc_11A760:
mov [rbp+var_74], 1
jmp short loc_11A782
loc_11A769:
movsxd rax, [rbp+var_24]
imul rax, [rbp+var_58]
mov [rbp+var_58], rax
movzx eax, [rbp+var_75]
add rax, [rbp+var_58]
mov [rbp+var_58], rax
loc_11A782:
jmp short $+2
loc_11A784:
mov rax, [rbp+var_60]
add rax, 1
mov [rbp+var_60], rax
jmp loc_11A6BB
loc_11A795:
mov rax, [rbp+var_60]
cmp rax, [rbp+var_70]
jnz short loc_11A7A1
jmp short loc_11A7F1
loc_11A7A1:
cmp [rbp+var_30], 0
jz short loc_11A7B3
mov rcx, [rbp+var_60]
mov rax, [rbp+var_30]
mov [rax], rcx
loc_11A7B3:
cmp [rbp+var_74], 0
jz short loc_11A7CD
mov rax, [rbp+var_38]
mov dword ptr [rax], 22h ; '"'
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp short loc_11A815
loc_11A7CD:
cmp [rbp+var_3C], 0
jz short loc_11A7DF
xor eax, eax
sub rax, [rbp+var_58]
mov [rbp+var_80], rax
jmp short loc_11A7E7
loc_11A7DF:
mov rax, [rbp+var_58]
mov [rbp+var_80], rax
loc_11A7E7:
mov rax, [rbp+var_80]
mov [rbp+var_8], rax
jmp short loc_11A815
loc_11A7F1:
mov rax, [rbp+var_38]
mov dword ptr [rax], 21h ; '!'
cmp [rbp+var_30], 0
jz short loc_11A80D
mov rcx, [rbp+var_18]
mov rax, [rbp+var_30]
mov [rax], rcx
loc_11A80D:
mov [rbp+var_8], 0
loc_11A815:
mov rax, [rbp+var_8]
pop rbp
retn
|
long long my_strntoull_8bit(long long a1, _BYTE *a2, long long a3, int a4, _QWORD *a5, _DWORD *a6)
{
bool v8; // [rsp+Ah] [rbp-76h]
unsigned __int8 v9; // [rsp+Bh] [rbp-75h]
unsigned __int8 v10; // [rsp+Bh] [rbp-75h]
int v11; // [rsp+Ch] [rbp-74h]
_BYTE *v12; // [rsp+10h] [rbp-70h]
_BYTE *v13; // [rsp+18h] [rbp-68h]
_BYTE *v14; // [rsp+20h] [rbp-60h]
unsigned long long v15; // [rsp+28h] [rbp-58h]
unsigned long long v16; // [rsp+38h] [rbp-48h]
int v17; // [rsp+44h] [rbp-3Ch]
*a6 = 0;
v14 = a2;
v13 = &a2[a3];
while ( 1 )
{
v8 = 0;
if ( v14 < v13 )
v8 = (*(_BYTE *)(*(_QWORD *)(a1 + 64) + (unsigned __int8)*v14 + 1LL) & 8) != 0;
if ( !v8 )
break;
++v14;
}
if ( v14 == v13 )
goto LABEL_39;
if ( *v14 == 45 )
{
v17 = 1;
++v14;
}
else
{
v17 = 0;
if ( *v14 == 43 )
++v14;
}
v12 = v14;
v16 = 0xFFFFFFFFFFFFFFFFLL / a4;
v11 = 0;
v15 = 0LL;
while ( v14 != v13 )
{
v9 = *v14;
if ( (unsigned __int8)*v14 < 0x30u || v9 > 0x39u )
{
if ( v9 < 0x41u || v9 > 0x5Au )
{
if ( v9 < 0x61u || v9 > 0x7Au )
break;
v10 = v9 - 97 + 10;
}
else
{
v10 = v9 - 65 + 10;
}
}
else
{
v10 = v9 - 48;
}
if ( v10 >= a4 )
break;
if ( v15 > v16 || v15 == v16 && v10 > (unsigned int)(0xFFFFFFFFFFFFFFFFLL % a4) )
v11 = 1;
else
v15 = v15 * a4 + v10;
++v14;
}
if ( v14 == v12 )
{
LABEL_39:
*a6 = 33;
if ( a5 )
*a5 = a2;
return 0LL;
}
else
{
if ( a5 )
*a5 = v14;
if ( v11 )
{
*a6 = 34;
return -1LL;
}
else if ( v17 )
{
return -(long long)v15;
}
else
{
return v15;
}
}
}
| |||
20,173
|
my_strntoull_8bit
|
eloqsql/strings/ctype-simple.c
|
ulonglong my_strntoull_8bit(CHARSET_INFO *cs,
const char *nptr, size_t l, int base,
char **endptr, int *err)
{
int negative;
register ulonglong cutoff;
register uint cutlim;
register ulonglong i;
register const char *s, *e;
const char *save;
int overflow;
*err= 0; /* Initialize error indicator */
s = nptr;
e = nptr+l;
for(; s<e && my_isspace(cs,*s); s++);
if (s == e)
{
goto noconv;
}
if (*s == '-')
{
negative = 1;
++s;
}
else if (*s == '+')
{
negative = 0;
++s;
}
else
negative = 0;
save = s;
cutoff = (~(ulonglong) 0) / (unsigned long int) base;
cutlim = (uint) ((~(ulonglong) 0) % (unsigned long int) base);
overflow = 0;
i = 0;
for ( ; s != e; s++)
{
register uchar c= *s;
if (c>='0' && c<='9')
c -= '0';
else if (c>='A' && c<='Z')
c = c - 'A' + 10;
else if (c>='a' && c<='z')
c = c - 'a' + 10;
else
break;
if (c >= base)
break;
if (i > cutoff || (i == cutoff && c > cutlim))
overflow = 1;
else
{
i *= (ulonglong) base;
i += c;
}
}
if (s == save)
goto noconv;
if (endptr != NULL)
*endptr = (char *) s;
if (overflow)
{
err[0]= ERANGE;
return (~(ulonglong) 0);
}
return (negative ? -((longlong) i) : (longlong) i);
noconv:
err[0]= EDOM;
if (endptr != NULL)
*endptr = (char *) nptr;
return 0L;
}
|
O3
|
c
|
my_strntoull_8bit:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl $0x0, (%r9)
leaq (%rsi,%rdx), %r11
movq %rsi, %r10
testq %rdx, %rdx
jle 0xb5269
movq 0x40(%rdi), %rax
movq %rsi, %r10
movzbl (%r10), %edx
testb $0x8, 0x1(%rax,%rdx)
je 0xb5269
incq %r10
cmpq %r11, %r10
jb 0xb5256
cmpq %r11, %r10
je 0xb5351
movb (%r10), %dil
leal -0x2b(%rdi), %eax
andb $-0x3, %al
cmpb $0x1, %al
adcq $0x0, %r10
movslq %ecx, %rbx
movq $-0x1, %rax
xorl %edx, %edx
movq %rbx, -0x38(%rbp)
divq %rbx
xorl %r12d, %r12d
cmpq %r11, %r10
je 0xb532e
movq %rdi, -0x30(%rbp)
movq %r10, %r14
xorl %r15d, %r15d
movq %r15, %rdi
movl %r12d, %r13d
movb (%r14), %r12b
leal -0x30(%r12), %ebx
cmpb $0xa, %bl
jb 0xb52dd
leal -0x41(%r12), %ebx
cmpb $0x19, %bl
ja 0xb52cc
addb $-0x37, %r12b
jmp 0xb52da
leal -0x61(%r12), %ebx
cmpb $0x19, %bl
ja 0xb531c
addb $-0x57, %r12b
movl %r12d, %ebx
movzbl %bl, %ebx
cmpl %ecx, %ebx
jge 0xb531c
movl $0x1, %r12d
cmpq %rax, %rdi
jbe 0xb52f4
movq %rdi, %r15
jmp 0xb530b
jne 0xb52fd
movq %rax, %r15
cmpl %edx, %ebx
ja 0xb530b
imulq -0x38(%rbp), %rdi
movl %ebx, %r15d
addq %rdi, %r15
movl %r13d, %r12d
incq %r14
cmpq %r11, %r14
jne 0xb52a9
movq %r15, %rdi
movq %r11, %r14
movl %r12d, %r13d
testl %r13d, %r13d
sete %al
movq %rdi, %r12
movq %r14, %r11
movq -0x30(%rbp), %rdi
jmp 0xb5330
movb $0x1, %al
cmpq %r10, %r11
je 0xb5351
testq %r8, %r8
je 0xb533d
movq %r11, (%r8)
testb %al, %al
je 0xb5364
movq %r12, %rax
negq %rax
cmpb $0x2d, %dil
cmovneq %r12, %rax
jmp 0xb5372
movl $0x21, (%r9)
testq %r8, %r8
je 0xb5360
movq %rsi, (%r8)
xorl %eax, %eax
jmp 0xb5372
movl $0x22, (%r9)
movq $-0x1, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
my_strntoull_8bit:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
mov dword ptr [r9], 0
lea r11, [rsi+rdx]
mov r10, rsi
test rdx, rdx
jle short loc_B5269
mov rax, [rdi+40h]
mov r10, rsi
loc_B5256:
movzx edx, byte ptr [r10]
test byte ptr [rax+rdx+1], 8
jz short loc_B5269
inc r10
cmp r10, r11
jb short loc_B5256
loc_B5269:
cmp r10, r11
jz loc_B5351
mov dil, [r10]
lea eax, [rdi-2Bh]
and al, 0FDh
cmp al, 1
adc r10, 0
movsxd rbx, ecx
mov rax, 0FFFFFFFFFFFFFFFFh
xor edx, edx
mov [rbp+var_38], rbx
div rbx
xor r12d, r12d
cmp r10, r11
jz loc_B532E
mov [rbp+var_30], rdi
mov r14, r10
xor r15d, r15d
loc_B52A9:
mov rdi, r15
mov r13d, r12d
mov r12b, [r14]
lea ebx, [r12-30h]
cmp bl, 0Ah
jb short loc_B52DD
lea ebx, [r12-41h]
cmp bl, 19h
ja short loc_B52CC
add r12b, 0C9h
jmp short loc_B52DA
loc_B52CC:
lea ebx, [r12-61h]
cmp bl, 19h
ja short loc_B531C
add r12b, 0A9h
loc_B52DA:
mov ebx, r12d
loc_B52DD:
movzx ebx, bl
cmp ebx, ecx
jge short loc_B531C
mov r12d, 1
cmp rdi, rax
jbe short loc_B52F4
mov r15, rdi
jmp short loc_B530B
loc_B52F4:
jnz short loc_B52FD
mov r15, rax
cmp ebx, edx
ja short loc_B530B
loc_B52FD:
imul rdi, [rbp+var_38]
mov r15d, ebx
add r15, rdi
mov r12d, r13d
loc_B530B:
inc r14
cmp r14, r11
jnz short loc_B52A9
mov rdi, r15
mov r14, r11
mov r13d, r12d
loc_B531C:
test r13d, r13d
setz al
mov r12, rdi
mov r11, r14
mov rdi, [rbp+var_30]
jmp short loc_B5330
loc_B532E:
mov al, 1
loc_B5330:
cmp r11, r10
jz short loc_B5351
test r8, r8
jz short loc_B533D
mov [r8], r11
loc_B533D:
test al, al
jz short loc_B5364
mov rax, r12
neg rax
cmp dil, 2Dh ; '-'
cmovnz rax, r12
jmp short loc_B5372
loc_B5351:
mov dword ptr [r9], 21h ; '!'
test r8, r8
jz short loc_B5360
mov [r8], rsi
loc_B5360:
xor eax, eax
jmp short loc_B5372
loc_B5364:
mov dword ptr [r9], 22h ; '"'
mov rax, 0FFFFFFFFFFFFFFFFh
loc_B5372:
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long my_strntoull_8bit(
long long a1,
unsigned __int8 *a2,
long long a3,
int a4,
unsigned __int8 **a5,
_DWORD *a6)
{
unsigned __int8 *v6; // r11
unsigned __int8 *v7; // r10
unsigned __int8 v8; // di
unsigned __int8 *v9; // r10
unsigned long long v10; // rax
unsigned long long v11; // r12
unsigned __int8 *v12; // r14
unsigned long long v13; // r15
unsigned long long v14; // rdi
int v15; // r13d
unsigned __int8 v16; // r12
unsigned __int8 v17; // bl
unsigned __int8 v18; // r12
bool v19; // al
long long result; // rax
unsigned __int8 v21; // [rsp+8h] [rbp-30h]
*a6 = 0;
v6 = &a2[a3];
v7 = a2;
if ( a3 > 0 )
{
v7 = a2;
do
{
if ( (*(_BYTE *)(*(_QWORD *)(a1 + 64) + *v7 + 1LL) & 8) == 0 )
break;
++v7;
}
while ( v7 < v6 );
}
if ( v7 == v6 )
goto LABEL_30;
v8 = *v7;
v9 = &v7[((*v7 - 43) & 0xFD) == 0];
v10 = 0xFFFFFFFFFFFFFFFFLL / a4;
v11 = 0LL;
if ( v9 == v6 )
{
v19 = 1;
}
else
{
v21 = v8;
v12 = v9;
v13 = 0LL;
while ( 1 )
{
v14 = v13;
v15 = v11;
v16 = *v12;
v17 = *v12 - 48;
if ( v17 >= 0xAu )
{
if ( (unsigned __int8)(v16 - 65) > 0x19u )
{
if ( (unsigned __int8)(v16 - 97) > 0x19u )
break;
v18 = v16 - 87;
}
else
{
v18 = v16 - 55;
}
v17 = v18;
}
if ( v17 >= a4 )
break;
LODWORD(v11) = 1;
if ( v13 <= v10 )
{
if ( v13 != v10 || (v13 = 0xFFFFFFFFFFFFFFFFLL / a4, v17 <= (unsigned int)(0xFFFFFFFFFFFFFFFFLL % a4)) )
{
v13 = a4 * v14 + v17;
LODWORD(v11) = v15;
}
}
if ( ++v12 == v6 )
{
v14 = v13;
v12 = &a2[a3];
v15 = v11;
break;
}
}
v19 = v15 == 0;
v11 = v14;
v6 = v12;
v8 = v21;
}
if ( v6 == v9 )
{
LABEL_30:
*a6 = 33;
if ( a5 )
*a5 = a2;
return 0LL;
}
else
{
if ( a5 )
*a5 = v6;
if ( v19 )
{
result = -(long long)v11;
if ( v8 != 45 )
return v11;
}
else
{
*a6 = 34;
return -1LL;
}
}
return result;
}
|
my_strntoull_8bit:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV dword ptr [R9],0x0
LEA R11,[RSI + RDX*0x1]
MOV R10,RSI
TEST RDX,RDX
JLE 0x001b5269
MOV RAX,qword ptr [RDI + 0x40]
MOV R10,RSI
LAB_001b5256:
MOVZX EDX,byte ptr [R10]
TEST byte ptr [RAX + RDX*0x1 + 0x1],0x8
JZ 0x001b5269
INC R10
CMP R10,R11
JC 0x001b5256
LAB_001b5269:
CMP R10,R11
JZ 0x001b5351
MOV DIL,byte ptr [R10]
LEA EAX,[RDI + -0x2b]
AND AL,0xfd
CMP AL,0x1
ADC R10,0x0
MOVSXD RBX,ECX
MOV RAX,-0x1
XOR EDX,EDX
MOV qword ptr [RBP + -0x38],RBX
DIV RBX
XOR R12D,R12D
CMP R10,R11
JZ 0x001b532e
MOV qword ptr [RBP + -0x30],RDI
MOV R14,R10
XOR R15D,R15D
LAB_001b52a9:
MOV RDI,R15
MOV R13D,R12D
MOV R12B,byte ptr [R14]
LEA EBX,[R12 + -0x30]
CMP BL,0xa
JC 0x001b52dd
LEA EBX,[R12 + -0x41]
CMP BL,0x19
JA 0x001b52cc
ADD R12B,0xc9
JMP 0x001b52da
LAB_001b52cc:
LEA EBX,[R12 + -0x61]
CMP BL,0x19
JA 0x001b531c
ADD R12B,0xa9
LAB_001b52da:
MOV EBX,R12D
LAB_001b52dd:
MOVZX EBX,BL
CMP EBX,ECX
JGE 0x001b531c
MOV R12D,0x1
CMP RDI,RAX
JBE 0x001b52f4
MOV R15,RDI
JMP 0x001b530b
LAB_001b52f4:
JNZ 0x001b52fd
MOV R15,RAX
CMP EBX,EDX
JA 0x001b530b
LAB_001b52fd:
IMUL RDI,qword ptr [RBP + -0x38]
MOV R15D,EBX
ADD R15,RDI
MOV R12D,R13D
LAB_001b530b:
INC R14
CMP R14,R11
JNZ 0x001b52a9
MOV RDI,R15
MOV R14,R11
MOV R13D,R12D
LAB_001b531c:
TEST R13D,R13D
SETZ AL
MOV R12,RDI
MOV R11,R14
MOV RDI,qword ptr [RBP + -0x30]
JMP 0x001b5330
LAB_001b532e:
MOV AL,0x1
LAB_001b5330:
CMP R11,R10
JZ 0x001b5351
TEST R8,R8
JZ 0x001b533d
MOV qword ptr [R8],R11
LAB_001b533d:
TEST AL,AL
JZ 0x001b5364
MOV RAX,R12
NEG RAX
CMP DIL,0x2d
CMOVNZ RAX,R12
JMP 0x001b5372
LAB_001b5351:
MOV dword ptr [R9],0x21
TEST R8,R8
JZ 0x001b5360
MOV qword ptr [R8],RSI
LAB_001b5360:
XOR EAX,EAX
JMP 0x001b5372
LAB_001b5364:
MOV dword ptr [R9],0x22
MOV RAX,-0x1
LAB_001b5372:
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
ulong my_strntoull_8bit(long param_1,byte *param_2,long param_3,int param_4,ulong *param_5,
int4 *param_6)
{
byte bVar1;
byte bVar2;
int1 auVar3 [16];
int1 auVar4 [16];
ulong uVar5;
ulong uVar6;
ulong uVar7;
byte *pbVar8;
byte *pbVar9;
byte bVar10;
ulong uVar11;
ulong uVar12;
int iVar13;
byte *pbVar14;
bool bVar15;
*param_6 = 0;
pbVar9 = param_2 + param_3;
pbVar8 = param_2;
if (0 < param_3) {
do {
if ((*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)*pbVar8) & 8) == 0) break;
pbVar8 = pbVar8 + 1;
} while (pbVar8 < pbVar9);
}
if (pbVar8 != pbVar9) {
bVar1 = *pbVar8;
pbVar8 = pbVar8 + ((bVar1 - 0x2b & 0xfd) == 0);
auVar3._8_8_ = 0;
auVar3._0_8_ = (long)param_4;
auVar4 = ZEXT816(0) << 0x40 | ZEXT816(0xffffffffffffffff);
uVar6 = SUB168(auVar4 / auVar3,0);
uVar7 = 0;
if (pbVar8 == pbVar9) {
bVar15 = true;
}
else {
uVar11 = uVar7;
pbVar14 = pbVar8;
uVar7 = 0;
do {
iVar13 = (int)uVar11;
bVar2 = *pbVar14;
bVar10 = bVar2 - 0x30;
if (9 < bVar10) {
if ((byte)(bVar2 + 0xbf) < 0x1a) {
bVar10 = bVar2 - 0x37;
}
else {
if (0x19 < (byte)(bVar2 + 0x9f)) goto LAB_001b531c;
bVar10 = bVar2 + 0xa9;
}
}
if (param_4 <= (int)(uint)bVar10) goto LAB_001b531c;
uVar12 = 1;
uVar5 = uVar7;
if ((uVar7 <= uVar6) &&
((uVar7 != uVar6 || (uVar5 = uVar6, (uint)bVar10 <= SUB164(auVar4 % auVar3,0))))) {
uVar12 = uVar11;
uVar5 = (ulong)bVar10 + uVar7 * (long)param_4;
}
uVar7 = uVar5;
pbVar14 = pbVar14 + 1;
uVar11 = uVar12;
} while (pbVar14 != pbVar9);
iVar13 = (int)uVar12;
pbVar14 = pbVar9;
LAB_001b531c:
pbVar9 = pbVar14;
bVar15 = iVar13 == 0;
}
if (pbVar9 != pbVar8) {
if (param_5 != (ulong *)0x0) {
*param_5 = (ulong)pbVar9;
}
if (bVar15) {
if (bVar1 == 0x2d) {
return -uVar7;
}
return uVar7;
}
*param_6 = 0x22;
return 0xffffffffffffffff;
}
}
*param_6 = 0x21;
if (param_5 != (ulong *)0x0) {
*param_5 = (ulong)param_2;
}
return 0;
}
|
|
20,174
|
LefDefParser::defiRow::Destroy()
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiRowTrack.cpp
|
void defiRow::Destroy() {
clear();
if (name_) free(name_);
if (macro_) free(macro_);
free((char*)(propNames_));
free((char*)(propValues_));
free((char*)(propDValues_));
free((char*)(propTypes_));
}
|
O0
|
cpp
|
LefDefParser::defiRow::Destroy():
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x31310
movq 0x8(%rsp), %rax
cmpq $0x0, 0x8(%rax)
je 0x312b2
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x72a0
movq 0x8(%rsp), %rax
cmpq $0x0, 0x18(%rax)
je 0x312cc
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x72a0
movq 0x8(%rsp), %rax
movq 0x68(%rax), %rdi
callq 0x72a0
movq 0x8(%rsp), %rax
movq 0x70(%rax), %rdi
callq 0x72a0
movq 0x8(%rsp), %rax
movq 0x78(%rax), %rdi
callq 0x72a0
movq 0x8(%rsp), %rax
movq 0x80(%rax), %rdi
callq 0x72a0
addq $0x18, %rsp
retq
nopl (%rax)
|
_ZN12LefDefParser7defiRow7DestroyEv:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov rdi, [rsp+18h+var_8]; this
mov [rsp+18h+var_10], rdi
call _ZN12LefDefParser7defiRow5clearEv; LefDefParser::defiRow::clear(void)
mov rax, [rsp+18h+var_10]
cmp qword ptr [rax+8], 0
jz short loc_312B2
mov rax, [rsp+18h+var_10]
mov rdi, [rax+8]
call _free
loc_312B2:
mov rax, [rsp+18h+var_10]
cmp qword ptr [rax+18h], 0
jz short loc_312CC
mov rax, [rsp+18h+var_10]
mov rdi, [rax+18h]
call _free
loc_312CC:
mov rax, [rsp+18h+var_10]
mov rdi, [rax+68h]
call _free
mov rax, [rsp+18h+var_10]
mov rdi, [rax+70h]
call _free
mov rax, [rsp+18h+var_10]
mov rdi, [rax+78h]
call _free
mov rax, [rsp+18h+var_10]
mov rdi, [rax+80h]
call _free
add rsp, 18h
retn
|
long long LefDefParser::defiRow::Destroy(LefDefParser::defiRow *this)
{
LefDefParser::defiRow::clear(this);
if ( *((_QWORD *)this + 1) )
free(*((_QWORD *)this + 1));
if ( *((_QWORD *)this + 3) )
free(*((_QWORD *)this + 3));
free(*((_QWORD *)this + 13));
free(*((_QWORD *)this + 14));
free(*((_QWORD *)this + 15));
return free(*((_QWORD *)this + 16));
}
|
Destroy:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV RDI,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x00131310
MOV RAX,qword ptr [RSP + 0x8]
CMP qword ptr [RAX + 0x8],0x0
JZ 0x001312b2
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX + 0x8]
CALL 0x001072a0
LAB_001312b2:
MOV RAX,qword ptr [RSP + 0x8]
CMP qword ptr [RAX + 0x18],0x0
JZ 0x001312cc
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX + 0x18]
CALL 0x001072a0
LAB_001312cc:
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX + 0x68]
CALL 0x001072a0
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX + 0x70]
CALL 0x001072a0
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX + 0x78]
CALL 0x001072a0
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX + 0x80]
CALL 0x001072a0
ADD RSP,0x18
RET
|
/* LefDefParser::defiRow::Destroy() */
void __thiscall LefDefParser::defiRow::Destroy(defiRow *this)
{
clear(this);
if (*(long *)(this + 8) != 0) {
free(*(void **)(this + 8));
}
if (*(long *)(this + 0x18) != 0) {
free(*(void **)(this + 0x18));
}
free(*(void **)(this + 0x68));
free(*(void **)(this + 0x70));
free(*(void **)(this + 0x78));
free(*(void **)(this + 0x80));
return;
}
|
|
20,175
|
LefDefParser::defiRow::Destroy()
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiRowTrack.cpp
|
void defiRow::Destroy() {
clear();
if (name_) free(name_);
if (macro_) free(macro_);
free((char*)(propNames_));
free((char*)(propValues_));
free((char*)(propDValues_));
free((char*)(propTypes_));
}
|
O3
|
cpp
|
LefDefParser::defiRow::Destroy():
pushq %rbx
movq %rdi, %rbx
callq 0x1f64a
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x1f613
callq 0x7220
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x1f621
callq 0x7220
movq 0x68(%rbx), %rdi
callq 0x7220
movq 0x70(%rbx), %rdi
callq 0x7220
movq 0x78(%rbx), %rdi
callq 0x7220
movq 0x80(%rbx), %rdi
popq %rbx
jmp 0x7220
nop
|
_ZN12LefDefParser7defiRow7DestroyEv:
push rbx
mov rbx, rdi
call _ZN12LefDefParser7defiRow5clearEv; LefDefParser::defiRow::clear(void)
mov rdi, [rbx+8]
test rdi, rdi
jz short loc_1F613
call _free
loc_1F613:
mov rdi, [rbx+18h]
test rdi, rdi
jz short loc_1F621
call _free
loc_1F621:
mov rdi, [rbx+68h]
call _free
mov rdi, [rbx+70h]
call _free
mov rdi, [rbx+78h]
call _free
mov rdi, [rbx+80h]
pop rbx
jmp _free
|
long long LefDefParser::defiRow::Destroy(void **this)
{
void *v2; // rdi
void *v3; // rdi
LefDefParser::defiRow::clear((LefDefParser::defiRow *)this);
v2 = this[1];
if ( v2 )
free(v2);
v3 = this[3];
if ( v3 )
free(v3);
free(this[13]);
free(this[14]);
free(this[15]);
return free(this[16]);
}
|
Destroy:
PUSH RBX
MOV RBX,RDI
CALL 0x0011f64a
MOV RDI,qword ptr [RBX + 0x8]
TEST RDI,RDI
JZ 0x0011f613
CALL 0x00107220
LAB_0011f613:
MOV RDI,qword ptr [RBX + 0x18]
TEST RDI,RDI
JZ 0x0011f621
CALL 0x00107220
LAB_0011f621:
MOV RDI,qword ptr [RBX + 0x68]
CALL 0x00107220
MOV RDI,qword ptr [RBX + 0x70]
CALL 0x00107220
MOV RDI,qword ptr [RBX + 0x78]
CALL 0x00107220
MOV RDI,qword ptr [RBX + 0x80]
POP RBX
JMP 0x00107220
|
/* LefDefParser::defiRow::Destroy() */
void __thiscall LefDefParser::defiRow::Destroy(defiRow *this)
{
clear(this);
if (*(void **)(this + 8) != (void *)0x0) {
free(*(void **)(this + 8));
}
if (*(void **)(this + 0x18) != (void *)0x0) {
free(*(void **)(this + 0x18));
}
free(*(void **)(this + 0x68));
free(*(void **)(this + 0x70));
free(*(void **)(this + 0x78));
free(*(void **)(this + 0x80));
return;
}
|
|
20,176
|
uf_space_endspace
|
eloqsql/storage/maria/ma_packrec.c
|
static void uf_space_endspace(MARIA_COLUMNDEF *rec, MARIA_BIT_BUFF *bit_buff,
uchar *to, uchar *end)
{
uint spaces;
if (get_bit(bit_buff))
bfill(to, (end-to), ' ');
else
{
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(end - spaces, spaces, ' ');
}
}
|
O3
|
c
|
uf_space_endspace:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r13
movl 0x4(%rsi), %eax
testl %eax, %eax
je 0x3ad4d
movl (%r15), %r12d
decl %eax
movl %eax, 0x4(%r15)
btl %eax, %r12d
jae 0x3ad6a
subq %r14, %rbx
movq %r14, %rdi
movl $0x20, %esi
movq %rbx, %rdx
jmp 0x3ae1a
movq %r15, %rdi
callq 0x3a7b0
movl $0x1f, 0x4(%r15)
movl (%r15), %r12d
movl $0x1f, %eax
testl %r12d, %r12d
js 0x3ad3a
movq %r13, %rdx
movl 0x24(%r13), %r13d
movl %eax, %ecx
subl %r13d, %ecx
movq %rdx, -0x30(%rbp)
jae 0x3adb6
subl %eax, %r13d
movl %eax, %eax
leaq 0xa63a8(%rip), %rcx # 0xe1130
andl (%rcx,%rax,4), %r12d
movl %r13d, %ecx
shll %cl, %r12d
movq %r15, %rdi
callq 0x3a7b0
movl $0x20, %eax
subl %r13d, %eax
movl %eax, 0x4(%r15)
movl (%r15), %eax
negl %r13d
movl %r13d, %ecx
shrl %cl, %eax
addl %eax, %r12d
jmp 0x3adcb
movl %ecx, 0x4(%r15)
shrl %cl, %r12d
movl 0x24(%rdx), %eax
leaq 0xa6369(%rip), %rcx # 0xe1130
andl (%rcx,%rax,4), %r12d
movl %r12d, %r13d
leaq (%r14,%r13), %rax
cmpq %rbx, %rax
jbe 0x3adee
movl $0x1, 0x28(%r15)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r13, %r12
negq %r12
cmpq %rbx, %rax
je 0x3ae0c
leaq (%rbx,%r12), %rcx
movq -0x30(%rbp), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x3a96d
addq %r12, %rbx
movq %rbx, %rdi
movl $0x20, %esi
movq %r13, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x292c0
|
uf_space_endspace:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rcx
mov r14, rdx
mov r15, rsi
mov r13, rdi
mov eax, [rsi+4]
test eax, eax
jz short loc_3AD4D
mov r12d, [r15]
dec eax
mov [r15+4], eax
bt r12d, eax
jnb short loc_3AD6A
loc_3AD3A:
sub rbx, r14
mov rdi, r14
mov esi, 20h ; ' '
mov rdx, rbx
jmp loc_3AE1A
loc_3AD4D:
mov rdi, r15
call fill_buffer
mov dword ptr [r15+4], 1Fh
mov r12d, [r15]
mov eax, 1Fh
test r12d, r12d
js short loc_3AD3A
loc_3AD6A:
mov rdx, r13
mov r13d, [r13+24h]
mov ecx, eax
sub ecx, r13d
mov [rbp+var_30], rdx
jnb short loc_3ADB6
sub r13d, eax
mov eax, eax
lea rcx, mask
and r12d, [rcx+rax*4]
mov ecx, r13d
shl r12d, cl
mov rdi, r15
call fill_buffer
mov eax, 20h ; ' '
sub eax, r13d
mov [r15+4], eax
mov eax, [r15]
neg r13d
mov ecx, r13d
shr eax, cl
add r12d, eax
jmp short loc_3ADCB
loc_3ADB6:
mov [r15+4], ecx
shr r12d, cl
mov eax, [rdx+24h]
lea rcx, mask
and r12d, [rcx+rax*4]
loc_3ADCB:
mov r13d, r12d
lea rax, [r14+r13]
cmp rax, rbx
jbe short loc_3ADEE
mov dword ptr [r15+28h], 1
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3ADEE:
mov r12, r13
neg r12
cmp rax, rbx
jz short loc_3AE0C
lea rcx, [rbx+r12]
mov rdi, [rbp+var_30]
mov rsi, r15
mov rdx, r14
call decode_bytes
loc_3AE0C:
add rbx, r12
mov rdi, rbx
mov esi, 20h ; ' '
mov rdx, r13
loc_3AE1A:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _memset
|
unsigned long long uf_space_endspace(long long a1, unsigned int *a2, _BYTE *a3, unsigned long long a4)
{
unsigned int v6; // eax
unsigned int v7; // r12d
unsigned int v8; // eax
unsigned long long result; // rax
unsigned int v10; // r13d
unsigned int v11; // ecx
int v12; // r13d
int v13; // r12d
unsigned int v14; // r12d
v6 = a2[1];
if ( v6 )
{
v7 = *a2;
v8 = v6 - 1;
a2[1] = v8;
if ( _bittest((const int *)&v7, v8) )
return memset(a3, 32LL, a4 - (_QWORD)a3);
}
else
{
fill_buffer((long long)a2);
a2[1] = 31;
v7 = *a2;
v8 = 31;
if ( (*a2 & 0x80000000) != 0 )
return memset(a3, 32LL, a4 - (_QWORD)a3);
}
v10 = *(_DWORD *)(a1 + 36);
v11 = v8 - v10;
if ( v8 >= v10 )
{
a2[1] = v11;
v14 = mask[*(unsigned int *)(a1 + 36)] & (v7 >> v11);
}
else
{
v12 = v10 - v8;
v13 = (mask[v8] & v7) << v12;
fill_buffer((long long)a2);
a2[1] = 32 - v12;
v14 = (*a2 >> -(char)v12) + v13;
}
result = (unsigned long long)&a3[v14];
if ( result <= a4 )
{
if ( result != a4 )
decode_bytes(a1, (long long)a2, a3, (_BYTE *)(a4 - v14));
return memset(a4 - v14, 32LL, v14);
}
else
{
a2[10] = 1;
}
return result;
}
|
uf_space_endspace:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RCX
MOV R14,RDX
MOV R15,RSI
MOV R13,RDI
MOV EAX,dword ptr [RSI + 0x4]
TEST EAX,EAX
JZ 0x0013ad4d
MOV R12D,dword ptr [R15]
DEC EAX
MOV dword ptr [R15 + 0x4],EAX
BT R12D,EAX
JNC 0x0013ad6a
LAB_0013ad3a:
SUB RBX,R14
MOV RDI,R14
MOV ESI,0x20
MOV RDX,RBX
JMP 0x0013ae1a
LAB_0013ad4d:
MOV RDI,R15
CALL 0x0013a7b0
MOV dword ptr [R15 + 0x4],0x1f
MOV R12D,dword ptr [R15]
MOV EAX,0x1f
TEST R12D,R12D
JS 0x0013ad3a
LAB_0013ad6a:
MOV RDX,R13
MOV R13D,dword ptr [R13 + 0x24]
MOV ECX,EAX
SUB ECX,R13D
MOV qword ptr [RBP + -0x30],RDX
JNC 0x0013adb6
SUB R13D,EAX
MOV EAX,EAX
LEA RCX,[0x1e1130]
AND R12D,dword ptr [RCX + RAX*0x4]
MOV ECX,R13D
SHL R12D,CL
MOV RDI,R15
CALL 0x0013a7b0
MOV EAX,0x20
SUB EAX,R13D
MOV dword ptr [R15 + 0x4],EAX
MOV EAX,dword ptr [R15]
NEG R13D
MOV ECX,R13D
SHR EAX,CL
ADD R12D,EAX
JMP 0x0013adcb
LAB_0013adb6:
MOV dword ptr [R15 + 0x4],ECX
SHR R12D,CL
MOV EAX,dword ptr [RDX + 0x24]
LEA RCX,[0x1e1130]
AND R12D,dword ptr [RCX + RAX*0x4]
LAB_0013adcb:
MOV R13D,R12D
LEA RAX,[R14 + R13*0x1]
CMP RAX,RBX
JBE 0x0013adee
MOV dword ptr [R15 + 0x28],0x1
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0013adee:
MOV R12,R13
NEG R12
CMP RAX,RBX
JZ 0x0013ae0c
LEA RCX,[RBX + R12*0x1]
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,R15
MOV RDX,R14
CALL 0x0013a96d
LAB_0013ae0c:
ADD RBX,R12
MOV RDI,RBX
MOV ESI,0x20
MOV RDX,R13
LAB_0013ae1a:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x001292c0
|
void uf_space_endspace(long param_1,uint *param_2,void *param_3,ulong param_4)
{
uint uVar1;
uint uVar2;
uint uVar3;
byte bVar4;
size_t __n;
uint uVar5;
if (param_2[1] == 0) {
fill_buffer(param_2);
param_2[1] = 0x1f;
uVar5 = *param_2;
uVar3 = 0x1f;
if (-1 < (int)uVar5) goto LAB_0013ad6a;
}
else {
uVar5 = *param_2;
uVar3 = param_2[1] - 1;
param_2[1] = uVar3;
if ((uVar5 >> (uVar3 & 0x1f) & 1) == 0) {
LAB_0013ad6a:
uVar1 = *(uint *)(param_1 + 0x24);
if (uVar3 < uVar1) {
uVar2 = (&mask)[uVar3];
bVar4 = (byte)(uVar1 - uVar3);
fill_buffer(param_2);
param_2[1] = 0x20 - (uVar1 - uVar3);
uVar5 = ((uVar5 & uVar2) << (bVar4 & 0x1f)) + (*param_2 >> (-bVar4 & 0x1f));
}
else {
param_2[1] = uVar3 - uVar1;
uVar5 = uVar5 >> ((byte)(uVar3 - uVar1) & 0x1f) & (&mask)[*(uint *)(param_1 + 0x24)];
}
__n = (size_t)uVar5;
if (param_4 < (long)param_3 + __n) {
param_2[10] = 1;
return;
}
if ((long)param_3 + __n != param_4) {
decode_bytes(param_1,param_2,param_3,param_4 + -__n);
}
param_3 = (void *)(param_4 + -__n);
goto LAB_0013ae1a;
}
}
__n = param_4 - (long)param_3;
LAB_0013ae1a:
memset(param_3,0x20,__n);
return;
}
|
|
20,177
|
my_like_range_win1250ch
|
eloqsql/strings/ctype-win1250ch.c
|
static my_bool
my_like_range_win1250ch(CHARSET_INFO *cs __attribute__((unused)),
const char *ptr, size_t ptr_length,
pbool escape, pbool w_one, pbool w_many,
size_t res_length,
char *min_str, char *max_str,
size_t *min_length, size_t *max_length)
{
int only_min_found= 1;
const char *end = ptr + ptr_length;
char *min_org = min_str;
char *min_end = min_str + res_length;
/* return 1; */
for (; ptr != end && min_str != min_end ; ptr++)
{
if (*ptr == escape && ptr+1 != end)
ptr++; /* Skip escape */
else if (*ptr == w_one || *ptr == w_many) /* '_' or '%' in SQL */
break;
*min_str= like_range_prefix_min_win1250ch[(uint) (uchar) (*ptr)];
if (*min_str != min_sort_char)
only_min_found= 0;
min_str++;
*max_str++= like_range_prefix_max_win1250ch[(uint) (uchar) (*ptr)];
}
if (cs->state & MY_CS_BINSORT)
*min_length= (size_t) (min_str - min_org);
else
{
/* 'a\0\0... is the smallest possible string */
*min_length= res_length;
}
/* a\ff\ff... is the biggest possible string */
*max_length= res_length;
while (min_str != min_end)
{
*min_str++ = min_sort_char;
*max_str++ = max_sort_char;
}
return (only_min_found);
}
|
O3
|
c
|
my_like_range_win1250ch:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %r9d, -0x2c(%rbp)
movl %r8d, -0x30(%rbp)
movq %rdi, -0x38(%rbp)
movq 0x20(%rbp), %r10
movq 0x18(%rbp), %r13
movq 0x10(%rbp), %r8
leaq (%r8,%r13), %r11
testq %rdx, %rdx
sete %al
testq %r8, %r8
sete %dil
orb %al, %dil
movb $0x1, %al
jne 0x5cb72
addq %rsi, %rdx
leaq -0x1(%r8), %rbx
movb $0x1, %al
leaq 0x284f95(%rip), %r12 # 0x2e1a90
leaq 0x28508e(%rip), %rdi # 0x2e1b90
movb (%rsi), %r14b
cmpb %cl, %r14b
setne %r9b
leaq 0x1(%rsi), %r15
cmpq %rdx, %r15
sete %r8b
orb %r9b, %r8b
cmpb $0x1, %r8b
jne 0x5cb2f
cmpb -0x30(%rbp), %r14b
je 0x5cb72
movq %rsi, %r15
cmpb -0x2c(%rbp), %r14b
je 0x5cb72
movzbl (%r15), %esi
cmpq $0x20, %rsi
movb (%rsi,%r12), %sil
movb %sil, (%r13)
movzbl %al, %eax
movl $0x0, %esi
cmovnel %esi, %eax
incq %r13
movzbl (%r15), %esi
movb (%rsi,%rdi), %sil
movb %sil, (%r10)
incq %r10
movq %r15, %rsi
incq %rsi
cmpq %rdx, %rsi
je 0x5cb72
leaq -0x1(%rbx), %r8
testq %rbx, %rbx
movq %r8, %rbx
jne 0x5cb02
movq %r13, %rcx
subq 0x18(%rbp), %rcx
movq -0x38(%rbp), %rdx
testb $0x10, 0xc(%rdx)
movq 0x10(%rbp), %rsi
cmoveq %rsi, %rcx
movq 0x28(%rbp), %rdx
movq %rcx, (%rdx)
movq 0x30(%rbp), %rcx
movq %rsi, (%rcx)
cmpq %r11, %r13
je 0x5cbad
movb $0x20, (%r13)
incq %r13
movb $-0x1, (%r10)
incq %r10
jmp 0x5cb97
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
my_like_range_win1250ch:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
mov [rbp+var_2C], r9d
mov [rbp+var_30], r8d
mov [rbp+var_38], rdi
mov r10, [rbp+arg_10]
mov r13, [rbp+arg_8]
mov r8, [rbp+arg_0]
lea r11, [r8+r13]
test rdx, rdx
setz al
test r8, r8
setz dil
or dil, al
mov al, 1
jnz loc_5CB72
add rdx, rsi
lea rbx, [r8-1]
mov al, 1
lea r12, like_range_prefix_min_win1250ch
lea rdi, like_range_prefix_max_win1250ch
loc_5CB02:
mov r14b, [rsi]
cmp r14b, cl
setnz r9b
lea r15, [rsi+1]
cmp r15, rdx
setz r8b
or r8b, r9b
cmp r8b, 1
jnz short loc_5CB2F
cmp r14b, byte ptr [rbp+var_30]
jz short loc_5CB72
mov r15, rsi
cmp r14b, byte ptr [rbp+var_2C]
jz short loc_5CB72
loc_5CB2F:
movzx esi, byte ptr [r15]
cmp rsi, 20h ; ' '
mov sil, [rsi+r12]
mov [r13+0], sil
movzx eax, al
mov esi, 0
cmovnz eax, esi
inc r13
movzx esi, byte ptr [r15]
mov sil, [rsi+rdi]
mov [r10], sil
inc r10
mov rsi, r15
inc rsi
cmp rsi, rdx
jz short loc_5CB72
lea r8, [rbx-1]
test rbx, rbx
mov rbx, r8
jnz short loc_5CB02
loc_5CB72:
mov rcx, r13
sub rcx, [rbp+arg_8]
mov rdx, [rbp+var_38]
test byte ptr [rdx+0Ch], 10h
mov rsi, [rbp+arg_0]
cmovz rcx, rsi
mov rdx, [rbp+arg_18]
mov [rdx], rcx
mov rcx, [rbp+arg_20]
mov [rcx], rsi
loc_5CB97:
cmp r13, r11
jz short loc_5CBAD
mov byte ptr [r13+0], 20h ; ' '
inc r13
mov byte ptr [r10], 0FFh
inc r10
jmp short loc_5CB97
loc_5CBAD:
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
char my_like_range_win1250ch(
long long a1,
unsigned __int8 *a2,
long long a3,
unsigned __int8 a4,
char a5,
char a6,
long long a7,
long long a8,
_BYTE *a9,
long long *a10,
_QWORD *a11)
{
_BYTE *v12; // r13
char result; // al
unsigned __int8 *v14; // rdx
long long v15; // rbx
unsigned __int8 v16; // r14
unsigned __int8 *v17; // r15
long long v18; // rsi
long long v20; // rcx
v12 = (_BYTE *)a8;
result = 1;
if ( a3 != 0 && a7 != 0 )
{
v14 = &a2[a3];
v15 = a7 - 1;
result = 1;
do
{
v16 = *a2;
v17 = a2 + 1;
if ( *a2 != a4 || a2 + 1 == v14 )
{
if ( v16 == a5 )
break;
v17 = a2;
if ( v16 == a6 )
break;
}
v18 = *v17;
*v12 = like_range_prefix_min_win1250ch[v18];
if ( v18 != 32 )
result = 0;
++v12;
*a9++ = like_range_prefix_max_win1250ch[*v17];
a2 = v17 + 1;
if ( v17 + 1 == v14 )
break;
}
while ( v15-- != 0 );
}
v20 = (long long)&v12[-a8];
if ( (*(_BYTE *)(a1 + 12) & 0x10) == 0 )
v20 = a7;
*a10 = v20;
*a11 = a7;
while ( v12 != (_BYTE *)(a7 + a8) )
{
*v12++ = 32;
*a9++ = -1;
}
return result;
}
|
my_like_range_win1250ch:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV dword ptr [RBP + -0x2c],R9D
MOV dword ptr [RBP + -0x30],R8D
MOV qword ptr [RBP + -0x38],RDI
MOV R10,qword ptr [RBP + 0x20]
MOV R13,qword ptr [RBP + 0x18]
MOV R8,qword ptr [RBP + 0x10]
LEA R11,[R8 + R13*0x1]
TEST RDX,RDX
SETZ AL
TEST R8,R8
SETZ DIL
OR DIL,AL
MOV AL,0x1
JNZ 0x0015cb72
ADD RDX,RSI
LEA RBX,[R8 + -0x1]
MOV AL,0x1
LEA R12,[0x3e1a90]
LEA RDI,[0x3e1b90]
LAB_0015cb02:
MOV R14B,byte ptr [RSI]
CMP R14B,CL
SETNZ R9B
LEA R15,[RSI + 0x1]
CMP R15,RDX
SETZ R8B
OR R8B,R9B
CMP R8B,0x1
JNZ 0x0015cb2f
CMP R14B,byte ptr [RBP + -0x30]
JZ 0x0015cb72
MOV R15,RSI
CMP R14B,byte ptr [RBP + -0x2c]
JZ 0x0015cb72
LAB_0015cb2f:
MOVZX ESI,byte ptr [R15]
CMP RSI,0x20
MOV SIL,byte ptr [RSI + R12*0x1]
MOV byte ptr [R13],SIL
MOVZX EAX,AL
MOV ESI,0x0
CMOVNZ EAX,ESI
INC R13
MOVZX ESI,byte ptr [R15]
MOV SIL,byte ptr [RSI + RDI*0x1]
MOV byte ptr [R10],SIL
INC R10
MOV RSI,R15
INC RSI
CMP RSI,RDX
JZ 0x0015cb72
LEA R8,[RBX + -0x1]
TEST RBX,RBX
MOV RBX,R8
JNZ 0x0015cb02
LAB_0015cb72:
MOV RCX,R13
SUB RCX,qword ptr [RBP + 0x18]
MOV RDX,qword ptr [RBP + -0x38]
TEST byte ptr [RDX + 0xc],0x10
MOV RSI,qword ptr [RBP + 0x10]
CMOVZ RCX,RSI
MOV RDX,qword ptr [RBP + 0x28]
MOV qword ptr [RDX],RCX
MOV RCX,qword ptr [RBP + 0x30]
MOV qword ptr [RCX],RSI
LAB_0015cb97:
CMP R13,R11
JZ 0x0015cbad
MOV byte ptr [R13],0x20
INC R13
MOV byte ptr [R10],0xff
INC R10
JMP 0x0015cb97
LAB_0015cbad:
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8
my_like_range_win1250ch
(long param_1,byte *param_2,long param_3,byte param_4,byte param_5,byte param_6,
long param_7,int1 *param_8,int1 *param_9,long *param_10,long *param_11)
{
byte bVar1;
int8 uVar2;
byte *pbVar3;
long lVar4;
int1 *puVar5;
byte *pbVar6;
uVar2 = 1;
puVar5 = param_8;
if (param_7 != 0 && param_3 != 0) {
pbVar3 = param_2 + param_3;
uVar2 = 1;
lVar4 = param_7;
while( true ) {
lVar4 = lVar4 + -1;
bVar1 = *param_2;
pbVar6 = param_2 + 1;
if ((param_2 + 1 == pbVar3 || bVar1 != param_4) &&
((bVar1 == param_5 || (pbVar6 = param_2, bVar1 == param_6)))) break;
bVar1 = *pbVar6;
*puVar5 = like_range_prefix_min_win1250ch[bVar1];
if ((ulong)bVar1 != 0x20) {
uVar2 = 0;
}
puVar5 = puVar5 + 1;
*param_9 = like_range_prefix_max_win1250ch[*pbVar6];
param_9 = param_9 + 1;
param_2 = pbVar6 + 1;
if ((param_2 == pbVar3) || (lVar4 == 0)) break;
}
}
lVar4 = (long)puVar5 - (long)param_8;
if ((*(byte *)(param_1 + 0xc) & 0x10) == 0) {
lVar4 = param_7;
}
*param_10 = lVar4;
*param_11 = param_7;
for (; puVar5 != param_8 + param_7; puVar5 = puVar5 + 1) {
*puVar5 = 0x20;
*param_9 = 0xff;
param_9 = param_9 + 1;
}
return uVar2;
}
|
|
20,178
|
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>::json_value::json_value(nlohmann::json_abi_v3_11_3::detail::value_t)
|
monkey531[P]llama/common/json.hpp
|
json_value(value_t t)
{
switch (t)
{
case value_t::object:
{
object = create<object_t>();
break;
}
case value_t::array:
{
array = create<array_t>();
break;
}
case value_t::string:
{
string = create<string_t>("");
break;
}
case value_t::binary:
{
binary = create<binary_t>();
break;
}
case value_t::boolean:
{
boolean = static_cast<boolean_t>(false);
break;
}
case value_t::number_integer:
{
number_integer = static_cast<number_integer_t>(0);
break;
}
case value_t::number_unsigned:
{
number_unsigned = static_cast<number_unsigned_t>(0);
break;
}
case value_t::number_float:
{
number_float = static_cast<number_float_t>(0.0);
break;
}
case value_t::null:
{
object = nullptr; // silence warning, see #821
break;
}
case value_t::discarded:
default:
{
object = nullptr; // silence warning, see #821
if (JSON_HEDLEY_UNLIKELY(t == value_t::null))
{
JSON_THROW(other_error::create(500, "961c151d2e87f2686a955a9be24d316f1362bf21 3.11.3", nullptr)); // LCOV_EXCL_LINE
}
break;
}
}
}
|
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>::json_value::json_value(nlohmann::json_abi_v3_11_3::detail::value_t):
subq $0x68, %rsp
movb %sil, %al
movq %rdi, 0x60(%rsp)
movb %al, 0x5f(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x10(%rsp)
movzbl 0x5f(%rsp), %eax
movq %rax, 0x18(%rsp)
subq $0x9, %rax
ja 0xc2ae1
movq 0x18(%rsp), %rax
leaq 0xf3782(%rip), %rcx # 0x1b61ac
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
callq 0xc2bd0
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
jmp 0xc2bbb
callq 0xc2cd0
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
jmp 0xc2bbb
leaq 0xf3e25(%rip), %rdi # 0x1b6889
callq 0xc2dd0
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
jmp 0xc2bbb
callq 0xc2ee0
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
jmp 0xc2bbb
movq 0x10(%rsp), %rax
movb $0x0, (%rax)
jmp 0xc2bbb
movq 0x10(%rsp), %rax
movq $0x0, (%rax)
jmp 0xc2bbb
movq 0x10(%rsp), %rax
movq $0x0, (%rax)
jmp 0xc2bbb
movq 0x10(%rsp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, (%rax)
jmp 0xc2bbb
movq 0x10(%rsp), %rax
movq $0x0, (%rax)
jmp 0xc2bbb
jmp 0xc2ae1
movq 0x10(%rsp), %rax
movq $0x0, (%rax)
cmpb $0x0, 0x5f(%rsp)
sete %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0xc2b02
jmp 0xc2bb9
movb $0x1, 0x23(%rsp)
movl $0x20, %edi
callq 0x50540
movq %rax, (%rsp)
leaq 0x37(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x50d80
movq 0x8(%rsp), %rdx
leaq 0xf6e03(%rip), %rsi # 0x1b9933
leaq 0x38(%rsp), %rdi
callq 0x55a00
jmp 0xc2b3c
movq (%rsp), %rdi
xorl %eax, %eax
movl %eax, %ecx
movl $0x1f4, %esi # imm = 0x1F4
leaq 0x38(%rsp), %rdx
callq 0xc2fe0
jmp 0xc2b55
movq (%rsp), %rdi
movb $0x0, 0x23(%rsp)
leaq 0x172743(%rip), %rsi # 0x2352a8
leaq 0x614(%rip), %rdx # 0xc3180
callq 0x50900
jmp 0xc2bca
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
jmp 0xc2b9b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
leaq 0x38(%rsp), %rdi
callq 0x510e0
leaq 0x37(%rsp), %rdi
callq 0x510c0
testb $0x1, 0x23(%rsp)
jne 0xc2bae
jmp 0xc2bb7
movq (%rsp), %rdi
callq 0x50c50
jmp 0xc2bc0
jmp 0xc2bbb
addq $0x68, %rsp
retq
movq 0x28(%rsp), %rdi
callq 0x50950
nopw (%rax,%rax)
|
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10json_valueC2ENS0_6detail7value_tE:
sub rsp, 68h
mov al, sil
mov qword ptr [rsp+68h+var_8], rdi; int
mov [rsp+68h+var_9], al
mov rax, qword ptr [rsp+68h+var_8]
mov qword ptr [rsp+68h+var_58], rax; int
movzx eax, [rsp+68h+var_9]
mov qword ptr [rsp+68h+var_50], rax; char
sub rax, 9; switch 10 cases
ja def_C2A31; jumptable 00000000000C2A31 default case
mov rax, qword ptr [rsp+68h+var_50]
lea rcx, jpt_C2A31
movsxd rax, ds:(jpt_C2A31 - 1B61ACh)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_C2A33:
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createINS2_IS9_SD_St4lessIvESaISt4pairIKS9_SD_EEEEJEEEPT_DpOT0_; jumptable 00000000000C2A31 case 1
mov rcx, rax
mov rax, qword ptr [rsp+68h+var_58]
mov [rax], rcx
jmp loc_C2BBB
loc_C2A48:
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS3_ISD_SaISD_EEJEEEPT_DpOT0_; jumptable 00000000000C2A31 case 2
mov rcx, rax
mov rax, qword ptr [rsp+68h+var_58]
mov [rax], rcx
jmp loc_C2BBB
loc_C2A5D:
lea rdi, aEndIndexOutOfB+19h; jumptable 00000000000C2A31 case 3
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS9_JRA1_KcEEEPT_DpOT0_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::create<std::string,char const(&)[1]>(char const(&)[1] &&)
mov rcx, rax
mov rax, qword ptr [rsp+68h+var_58]
mov [rax], rcx
jmp loc_C2BBB
loc_C2A79:
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createINS0_27byte_container_with_subtypeISC_EEJEEEPT_DpOT0_; jumptable 00000000000C2A31 case 8
mov rcx, rax
mov rax, qword ptr [rsp+68h+var_58]
mov [rax], rcx
jmp loc_C2BBB
loc_C2A8E:
mov rax, qword ptr [rsp+68h+var_58]; jumptable 00000000000C2A31 case 4
mov byte ptr [rax], 0
jmp loc_C2BBB
loc_C2A9B:
mov rax, qword ptr [rsp+68h+var_58]; jumptable 00000000000C2A31 case 5
mov qword ptr [rax], 0
jmp loc_C2BBB
loc_C2AAC:
mov rax, qword ptr [rsp+68h+var_58]; jumptable 00000000000C2A31 case 6
mov qword ptr [rax], 0
jmp loc_C2BBB
loc_C2ABD:
mov rax, qword ptr [rsp+68h+var_58]; jumptable 00000000000C2A31 case 7
xorps xmm0, xmm0
movsd qword ptr [rax], xmm0
jmp loc_C2BBB
loc_C2ACE:
mov rax, qword ptr [rsp+68h+var_58]; jumptable 00000000000C2A31 case 0
mov qword ptr [rax], 0
jmp loc_C2BBB
loc_C2ADF:
jmp short $+2; jumptable 00000000000C2A31 case 9
def_C2A31:
mov rax, qword ptr [rsp+68h+var_58]; jumptable 00000000000C2A31 default case
mov qword ptr [rax], 0
cmp [rsp+68h+var_9], 0
setz al
xor al, 0FFh
xor al, 0FFh
test al, 1
jnz short loc_C2B02
jmp loc_C2BB9
loc_C2B02:
mov [rsp+68h+var_45], 1
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov [rsp+68h+var_68], rax; int
lea rdi, [rsp+68h+var_31]
mov qword ptr [rsp+68h+var_60], rdi; int
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, qword ptr [rsp+68h+var_60]
lea rsi, a961c151d2e87f2; "961c151d2e87f2686a955a9be24d316f1362bf2"...
lea rdi, [rsp+68h+var_31+1]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_C2B3C:
mov rdi, [rsp+68h+var_68]; int
xor eax, eax
mov ecx, eax
mov esi, 1F4h
lea rdx, [rsp+68h+var_31+1]
call _ZN8nlohmann16json_abi_v3_11_36detail11other_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_
jmp short $+2
loc_C2B55:
mov rdi, [rsp+68h+var_68]; void *
mov [rsp+68h+var_45], 0
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail11other_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail11other_errorD2Ev; void (*)(void *)
call ___cxa_throw
jmp short loc_C2BCA
mov rcx, rax
mov eax, edx
mov [rsp+arg_20], rcx
mov [rsp+arg_1C], eax
jmp short loc_C2B9B
mov rcx, rax
mov eax, edx
mov [rsp+arg_20], rcx
mov [rsp+arg_1C], eax
lea rdi, [rsp+arg_30]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_C2B9B:
lea rdi, [rsp+arg_2F]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
test [rsp+arg_1B], 1
jnz short loc_C2BAE
jmp short loc_C2BB7
loc_C2BAE:
mov rdi, [rsp+0]; void *
call ___cxa_free_exception
loc_C2BB7:
jmp short loc_C2BC0
loc_C2BB9:
jmp short $+2
loc_C2BBB:
add rsp, 68h
retn
loc_C2BC0:
mov rdi, [rsp+arg_20]
call __Unwind_Resume
loc_C2BCA:
nop word ptr [rax+rax+00h]
|
json_value:
SUB RSP,0x68
MOV AL,SIL
MOV qword ptr [RSP + 0x60],RDI
MOV byte ptr [RSP + 0x5f],AL
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x10],RAX
MOVZX EAX,byte ptr [RSP + 0x5f]
MOV qword ptr [RSP + 0x18],RAX
SUB RAX,0x9
JA 0x001c2ae1
MOV RAX,qword ptr [RSP + 0x18]
LEA RCX,[0x2b61ac]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
CALL 0x001c2bd0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX],RCX
JMP 0x001c2bbb
caseD_2:
CALL 0x001c2cd0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX],RCX
JMP 0x001c2bbb
caseD_3:
LEA RDI,[0x2b6889]
CALL 0x001c2dd0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX],RCX
JMP 0x001c2bbb
caseD_8:
CALL 0x001c2ee0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX],RCX
JMP 0x001c2bbb
caseD_4:
MOV RAX,qword ptr [RSP + 0x10]
MOV byte ptr [RAX],0x0
JMP 0x001c2bbb
caseD_5:
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX],0x0
JMP 0x001c2bbb
caseD_6:
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX],0x0
JMP 0x001c2bbb
caseD_7:
MOV RAX,qword ptr [RSP + 0x10]
XORPS XMM0,XMM0
MOVSD qword ptr [RAX],XMM0
JMP 0x001c2bbb
caseD_0:
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX],0x0
JMP 0x001c2bbb
caseD_9:
JMP 0x001c2ae1
default:
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX],0x0
CMP byte ptr [RSP + 0x5f],0x0
SETZ AL
XOR AL,0xff
XOR AL,0xff
TEST AL,0x1
JNZ 0x001c2b02
JMP 0x001c2bb9
LAB_001c2b02:
MOV byte ptr [RSP + 0x23],0x1
MOV EDI,0x20
CALL 0x00150540
MOV qword ptr [RSP],RAX
LEA RDI,[RSP + 0x37]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x00150d80
MOV RDX,qword ptr [RSP + 0x8]
LAB_001c2b29:
LEA RSI,[0x2b9933]
LEA RDI,[RSP + 0x38]
CALL 0x00155a00
JMP 0x001c2b3c
LAB_001c2b3c:
MOV RDI,qword ptr [RSP]
XOR EAX,EAX
MOV ECX,EAX
MOV ESI,0x1f4
LEA RDX,[RSP + 0x38]
CALL 0x001c2fe0
JMP 0x001c2b55
LAB_001c2b55:
MOV RDI,qword ptr [RSP]
MOV byte ptr [RSP + 0x23],0x0
LEA RSI,[0x3352a8]
LEA RDX,[0x1c3180]
CALL 0x00150900
LAB_001c2bb9:
JMP 0x001c2bbb
LAB_001c2bbb:
ADD RSP,0x68
RET
|
/* 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>::json_value::json_value(nlohmann::json_abi_v3_11_3::detail::value_t) */
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>
::json_value::json_value(json_value *this,char param_2)
{
ordered_map *poVar1;
vector *pvVar2;
string *psVar3;
byte_container_with_subtype *pbVar4;
int8 uVar5;
allocator local_31;
string local_30 [39];
char local_9;
json_value *local_8;
local_9 = param_2;
local_8 = this;
switch(param_2) {
case '\0':
*(int8 *)this = 0;
break;
case '\x01':
poVar1 = create<nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>>
();
*(ordered_map **)this = poVar1;
break;
case '\x02':
pvVar2 = create<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>>>>
();
*(vector **)this = pvVar2;
break;
case '\x03':
psVar3 = create<std::__cxx11::string,char_const(&)[1]>("");
*(string **)this = psVar3;
break;
case '\x04':
*this = (json_value)0x0;
break;
case '\x05':
*(int8 *)this = 0;
break;
case '\x06':
*(int8 *)this = 0;
break;
case '\a':
*(int8 *)this = 0;
break;
case '\b':
pbVar4 = create<nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<unsigned_char,std::allocator<unsigned_char>>>>
();
*(byte_container_with_subtype **)this = pbVar4;
break;
case '\t':
default:
*(int8 *)this = 0;
if (param_2 == '\0') {
uVar5 = __cxa_allocate_exception(0x20);
std::allocator<char>::allocator();
/* try { // try from 001c2b29 to 001c2b39 has its CatchHandler @ 001c2b73 */
std::__cxx11::string::string<std::allocator<char>>
(local_30,"961c151d2e87f2686a955a9be24d316f1362bf21 3.11.3",&local_31);
/* try { // try from 001c2b3c to 001c2b70 has its CatchHandler @ 001c2b83 */
_ZN8nlohmann16json_abi_v3_11_36detail11other_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_
(uVar5,500,local_30,0);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar5,&detail::other_error::typeinfo,detail::other_error::~other_error);
}
}
return;
}
|
||
20,179
|
text_result
|
xtate/src/output-modules/text-output.c
|
static void text_result(OutItem *item) {
DataLink *pre;
int err = 0;
ipaddress_formatted_t ip_them_fmt = ipaddress_fmt(item->target.ip_them);
switch (item->level) {
case OUT_SUCCESS:
err = fprintf(file, fmt_host, "[+]", ip_them_fmt.string);
break;
case OUT_FAILURE:
err = fprintf(file, fmt_host, "[x]", ip_them_fmt.string);
break;
case OUT_INFO:
err = fprintf(file, fmt_host, "[*]", ip_them_fmt.string);
break;
default:
err = fprintf(file, fmt_host, "[?]", ip_them_fmt.string);
}
if (err < 0)
goto error;
if (!item->no_port) {
err = fprintf(file, fmt_port, item->target.port_them);
if (err < 0)
goto error;
}
err = fprintf(file, fmt_proto, ip_proto_to_string(item->target.ip_proto));
if (err < 0)
goto error;
if (item->classification[0]) {
err = fprintf(file, fmt_cls, item->classification);
if (err < 0)
goto error;
}
if (item->reason[0]) {
err = fprintf(file, fmt_reason, item->reason);
if (err < 0)
goto error;
}
pre = item->scan_report.link;
while (pre->next) {
if (pre->next->link_type == LinkType_String) {
fprintf(file, fmt_report_str, pre->next->name,
pre->next->value_data);
} else if (pre->next->link_type == LinkType_Int) {
fprintf(file, fmt_report_int, pre->next->name,
pre->next->value_int);
} else if (pre->next->link_type == LinkType_Double) {
fprintf(file, fmt_report_double, pre->next->name,
pre->next->value_double);
} else if (pre->next->link_type == LinkType_Bool) {
fprintf(file,
pre->next->value_bool ? fmt_report_true : fmt_report_false,
pre->next->name);
} else if (pre->next->link_type == LinkType_Binary) {
fprintf(file, fmt_report_bin, pre->next->name, pre->next->data_len);
}
pre = pre->next;
}
pre = item->probe_report.link;
while (pre->next) {
if (pre->next->link_type == LinkType_String) {
fprintf(file, fmt_report_str, pre->next->name,
pre->next->value_data);
} else if (pre->next->link_type == LinkType_Int) {
fprintf(file, fmt_report_int, pre->next->name,
pre->next->value_int);
} else if (pre->next->link_type == LinkType_Double) {
fprintf(file, fmt_report_double, pre->next->name,
pre->next->value_double);
} else if (pre->next->link_type == LinkType_Bool) {
fprintf(file,
pre->next->value_bool ? fmt_report_true : fmt_report_false,
pre->next->name);
} else if (pre->next->link_type == LinkType_Binary) {
fprintf(file, fmt_report_bin, pre->next->name, pre->next->data_len);
}
pre = pre->next;
}
pre = item->output_report.link;
while (pre->next) {
if (pre->next->link_type == LinkType_String) {
fprintf(file, fmt_report_str, pre->next->name,
pre->next->value_data);
} else if (pre->next->link_type == LinkType_Int) {
fprintf(file, fmt_report_int, pre->next->name,
pre->next->value_int);
} else if (pre->next->link_type == LinkType_Double) {
fprintf(file, fmt_report_double, pre->next->name,
pre->next->value_double);
} else if (pre->next->link_type == LinkType_Bool) {
fprintf(file,
pre->next->value_bool ? fmt_report_true : fmt_report_false,
pre->next->name);
} else if (pre->next->link_type == LinkType_Binary) {
fprintf(file, fmt_report_bin, pre->next->name, pre->next->data_len);
}
pre = pre->next;
}
err = fprintf(file, "\n");
if (err < 0)
goto error;
return;
error:
LOG(LEVEL_ERROR, "(TextOutput) could not write result to file.\n");
}
|
O3
|
c
|
text_result:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movq 0x28(%rdi), %rax
movq %rax, 0x10(%rsp)
movups 0x18(%rdi), %xmm0
movups %xmm0, (%rsp)
leaq 0x18(%rsp), %rdi
callq 0x44638
movl 0x8(%rbx), %eax
movq 0x17d60b(%rip), %rdi # 0x1a3378
cmpq $0x2, %rax
ja 0x25d83
leaq 0x3e48e(%rip), %rcx # 0x64208
movslq (%rcx,%rax,4), %rdx
addq %rcx, %rdx
jmp 0x25d8a
leaq 0x3e3a2(%rip), %rdx # 0x6412c
leaq 0x3e3eb(%rip), %rsi # 0x6417c
leaq 0x18(%rsp), %rcx
xorl %eax, %eax
callq 0x15220
testl %eax, %eax
js 0x26150
testb $0x2, 0x198(%rbx)
jne 0x25dce
movq 0x17d5c3(%rip), %rdi # 0x1a3378
movl 0x48(%rbx), %edx
leaq 0x3e3c9(%rip), %rsi # 0x64188
xorl %eax, %eax
callq 0x15220
testl %eax, %eax
js 0x26150
movq 0x17d5a3(%rip), %r14 # 0x1a3378
movl 0x10(%rbx), %edi
callq 0x493c8
leaq 0x3e3ae(%rip), %rsi # 0x64192
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x15220
testl %eax, %eax
js 0x26150
cmpb $0x0, 0x50(%rbx)
je 0x25e20
leaq 0x50(%rbx), %rdx
movq 0x17d56e(%rip), %rdi # 0x1a3378
leaq 0x3e388(%rip), %rsi # 0x64199
xorl %eax, %eax
callq 0x15220
testl %eax, %eax
js 0x26150
cmpb $0x0, 0x6e(%rbx)
je 0x25e47
leaq 0x6e(%rbx), %rdx
movq 0x17d547(%rip), %rdi # 0x1a3378
leaq 0x3e36a(%rip), %rsi # 0x641a2
xorl %eax, %eax
callq 0x15220
testl %eax, %eax
js 0x26150
movq 0x98(%rbx), %rax
testq %rax, %rax
je 0x25f41
leaq 0x98(%rbx), %rbp
leaq 0x3e2db(%rip), %r14 # 0x64140
leaq 0x3e371(%rip), %r15 # 0x641dd
leaq 0x3e349(%rip), %r12 # 0x641bc
leaq 0x3e34d(%rip), %r13 # 0x641c7
movl 0x30(%rax), %ecx
cmpq $0x4, %rcx
ja 0x25f30
movslq (%r14,%rcx,4), %rcx
addq %r14, %rcx
jmpq *%rcx
movq 0x17d4e1(%rip), %rdi # 0x1a3378
leaq 0x10(%rax), %rdx
addq $0x48, %rax
leaq 0x3e30a(%rip), %rsi # 0x641b0
movq %rax, %rcx
jmp 0x25f08
movq 0x17d4c6(%rip), %rdi # 0x1a3378
movsd 0x40(%rax), %xmm0
addq $0x10, %rax
movq %r13, %rsi
movq %rax, %rdx
movb $0x1, %al
callq 0x15220
jmp 0x25f30
movq 0x17d4a7(%rip), %rdi # 0x1a3378
cmpb $0x0, 0x40(%rax)
movq %r15, %rsi
leaq 0x3e2f3(%rip), %rcx # 0x641d2
cmovneq %rcx, %rsi
addq $0x10, %rax
movq %rax, %rdx
xorl %eax, %eax
callq 0x15220
jmp 0x25f30
movq 0x17d47e(%rip), %rdi # 0x1a3378
movq 0x40(%rax), %rcx
addq $0x10, %rax
movq %r12, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x15220
jmp 0x25f30
movq 0x17d460(%rip), %rdi # 0x1a3378
movl 0x34(%rax), %ecx
addq $0x10, %rax
leaq 0x3e2ca(%rip), %rsi # 0x641f0
movq %rax, %rdx
xorl %eax, %eax
callq 0x15220
movq (%rbp), %rbp
movq (%rbp), %rax
testq %rax, %rax
jne 0x25e7a
movq 0xf0(%rbx), %rax
testq %rax, %rax
je 0x2603b
leaq 0xf0(%rbx), %rbp
leaq 0x3e1f5(%rip), %r14 # 0x64154
leaq 0x3e277(%rip), %r15 # 0x641dd
leaq 0x3e24f(%rip), %r12 # 0x641bc
leaq 0x3e253(%rip), %r13 # 0x641c7
movl 0x30(%rax), %ecx
cmpq $0x4, %rcx
ja 0x2602a
movslq (%r14,%rcx,4), %rcx
addq %r14, %rcx
jmpq *%rcx
movq 0x17d3e7(%rip), %rdi # 0x1a3378
leaq 0x10(%rax), %rdx
addq $0x48, %rax
leaq 0x3e210(%rip), %rsi # 0x641b0
movq %rax, %rcx
jmp 0x26002
movq 0x17d3cc(%rip), %rdi # 0x1a3378
movsd 0x40(%rax), %xmm0
addq $0x10, %rax
movq %r13, %rsi
movq %rax, %rdx
movb $0x1, %al
callq 0x15220
jmp 0x2602a
movq 0x17d3ad(%rip), %rdi # 0x1a3378
cmpb $0x0, 0x40(%rax)
movq %r15, %rsi
leaq 0x3e1f9(%rip), %rcx # 0x641d2
cmovneq %rcx, %rsi
addq $0x10, %rax
movq %rax, %rdx
xorl %eax, %eax
callq 0x15220
jmp 0x2602a
movq 0x17d384(%rip), %rdi # 0x1a3378
movq 0x40(%rax), %rcx
addq $0x10, %rax
movq %r12, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x15220
jmp 0x2602a
movq 0x17d366(%rip), %rdi # 0x1a3378
movl 0x34(%rax), %ecx
addq $0x10, %rax
leaq 0x3e1d0(%rip), %rsi # 0x641f0
movq %rax, %rdx
xorl %eax, %eax
callq 0x15220
movq (%rbp), %rbp
movq (%rbp), %rax
testq %rax, %rax
jne 0x25f74
movq 0x148(%rbx), %rax
testq %rax, %rax
je 0x26137
addq $0x148, %rbx # imm = 0x148
leaq 0x3e10f(%rip), %rbp # 0x64168
leaq 0x3e190(%rip), %r15 # 0x641f0
leaq 0x3e176(%rip), %r14 # 0x641dd
leaq 0x3e14e(%rip), %r12 # 0x641bc
leaq 0x3e152(%rip), %r13 # 0x641c7
movl 0x30(%rax), %ecx
cmpq $0x4, %rcx
ja 0x26128
movslq (%rbp,%rcx,4), %rcx
addq %rbp, %rcx
jmpq *%rcx
movq 0x17d2e5(%rip), %rdi # 0x1a3378
leaq 0x10(%rax), %rdx
addq $0x48, %rax
leaq 0x3e10e(%rip), %rsi # 0x641b0
movq %rax, %rcx
jmp 0x26104
movq 0x17d2ca(%rip), %rdi # 0x1a3378
movsd 0x40(%rax), %xmm0
addq $0x10, %rax
movq %r13, %rsi
movq %rax, %rdx
movb $0x1, %al
callq 0x15220
jmp 0x26128
movq 0x17d2ab(%rip), %rdi # 0x1a3378
cmpb $0x0, 0x40(%rax)
movq %r14, %rsi
leaq 0x3e0f7(%rip), %rcx # 0x641d2
cmovneq %rcx, %rsi
addq $0x10, %rax
movq %rax, %rdx
xorl %eax, %eax
callq 0x15220
jmp 0x26128
movq 0x17d282(%rip), %rdi # 0x1a3378
movq 0x40(%rax), %rcx
addq $0x10, %rax
movq %r12, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x15220
jmp 0x26128
movq 0x17d264(%rip), %rdi # 0x1a3378
movl 0x34(%rax), %ecx
addq $0x10, %rax
movq %r15, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x15220
movq (%rbx), %rbx
movq (%rbx), %rax
testq %rax, %rax
jne 0x26075
movq 0x17d23a(%rip), %rdi # 0x1a3378
leaq 0x585c6(%rip), %rsi # 0x7e70b
xorl %eax, %eax
callq 0x15220
testl %eax, %eax
jns 0x26163
leaq 0x3e133(%rip), %rsi # 0x6428a
movl $0xffffffff, %edi # imm = 0xFFFFFFFF
xorl %eax, %eax
callq 0x536da
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
text_result:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov rbx, rdi
mov rax, [rdi+28h]
mov [rsp+78h+var_68], rax
movups xmm0, xmmword ptr [rdi+18h]
movups [rsp+78h+var_78], xmm0
lea rdi, [rsp+78h+var_60]
call ipaddress_fmt
mov eax, [rbx+8]
mov rdi, cs:file_3
cmp rax, 2
ja short loc_25D83
lea rcx, unk_64208
movsxd rdx, dword ptr [rcx+rax*4]
add rdx, rcx
jmp short loc_25D8A
loc_25D83:
lea rdx, asc_6412C; "[?]"
loc_25D8A:
lea rsi, fmt_host_1; "%s host: %s"
lea rcx, [rsp+78h+var_60]
xor eax, eax
call _fprintf
test eax, eax
js loc_26150
test byte ptr [rbx+198h], 2
jnz short loc_25DCE
mov rdi, cs:file_3
mov edx, [rbx+48h]
lea rsi, fmt_port_1; " port: %u"
xor eax, eax
call _fprintf
test eax, eax
js loc_26150
loc_25DCE:
mov r14, cs:file_3
mov edi, [rbx+10h]
call ip_proto_to_string
lea rsi, fmt_proto; " in %s"
mov rdi, r14
mov rdx, rax
xor eax, eax
call _fprintf
test eax, eax
js loc_26150
cmp byte ptr [rbx+50h], 0
jz short loc_25E20
lea rdx, [rbx+50h]
mov rdi, cs:file_3
lea rsi, fmt_cls_0; " is \"%s\""
xor eax, eax
call _fprintf
test eax, eax
js loc_26150
loc_25E20:
cmp byte ptr [rbx+6Eh], 0
jz short loc_25E47
lea rdx, [rbx+6Eh]
mov rdi, cs:file_3
lea rsi, fmt_reason_0; " because \"%s\""
xor eax, eax
call _fprintf
test eax, eax
js loc_26150
loc_25E47:
mov rax, [rbx+98h]
test rax, rax
jz loc_25F41
lea rbp, [rbx+98h]
lea r14, jpt_25E8E
lea r15, fmt_report_false_0; ", %s: false"
lea r12, fmt_report_int_0; ", %s: %lu"
lea r13, fmt_report_double_0; ", %s: %.2f"
loc_25E7A:
mov ecx, [rax+30h]
cmp rcx, 4; switch 5 cases
ja def_25E8E; jumptable 0000000000025E8E default case
movsxd rcx, ds:(jpt_25E8E - 64140h)[r14+rcx*4]
add rcx, r14
jmp rcx; switch jump
loc_25E90:
mov rdi, cs:file_3; jumptable 0000000000025E8E case 0
lea rdx, [rax+10h]
add rax, 48h ; 'H'
lea rsi, fmt_report_str_0; ", %s: \"%s\""
mov rcx, rax
jmp short loc_25F08
loc_25EAB:
mov rdi, cs:file_3; jumptable 0000000000025E8E case 4
movsd xmm0, qword ptr [rax+40h]
add rax, 10h
mov rsi, r13
mov rdx, rax
mov al, 1
call _fprintf
jmp short def_25E8E; jumptable 0000000000025E8E default case
loc_25ECA:
mov rdi, cs:file_3; jumptable 0000000000025E8E case 2
cmp byte ptr [rax+40h], 0
mov rsi, r15
lea rcx, fmt_report_true_0; ", %s: true"
cmovnz rsi, rcx
add rax, 10h
mov rdx, rax
xor eax, eax
call _fprintf
jmp short def_25E8E; jumptable 0000000000025E8E default case
loc_25EF3:
mov rdi, cs:file_3; jumptable 0000000000025E8E case 3
mov rcx, [rax+40h]
add rax, 10h
mov rsi, r12
mov rdx, rax
loc_25F08:
xor eax, eax
call _fprintf
jmp short def_25E8E; jumptable 0000000000025E8E default case
loc_25F11:
mov rdi, cs:file_3; jumptable 0000000000025E8E case 1
mov ecx, [rax+34h]
add rax, 10h
lea rsi, fmt_report_bin_0; ", %s: \"(%u bytes bin)\""
mov rdx, rax
xor eax, eax
call _fprintf
def_25E8E:
mov rbp, [rbp+0]; jumptable 0000000000025E8E default case
mov rax, [rbp+0]
test rax, rax
jnz loc_25E7A
loc_25F41:
mov rax, [rbx+0F0h]
test rax, rax
jz loc_2603B
lea rbp, [rbx+0F0h]
lea r14, jpt_25F88
lea r15, fmt_report_false_0; ", %s: false"
lea r12, fmt_report_int_0; ", %s: %lu"
lea r13, fmt_report_double_0; ", %s: %.2f"
loc_25F74:
mov ecx, [rax+30h]
cmp rcx, 4; switch 5 cases
ja def_25F88; jumptable 0000000000025F88 default case
movsxd rcx, ds:(jpt_25F88 - 64154h)[r14+rcx*4]
add rcx, r14
jmp rcx; switch jump
loc_25F8A:
mov rdi, cs:file_3; jumptable 0000000000025F88 case 0
lea rdx, [rax+10h]
add rax, 48h ; 'H'
lea rsi, fmt_report_str_0; ", %s: \"%s\""
mov rcx, rax
jmp short loc_26002
loc_25FA5:
mov rdi, cs:file_3; jumptable 0000000000025F88 case 4
movsd xmm0, qword ptr [rax+40h]
add rax, 10h
mov rsi, r13
mov rdx, rax
mov al, 1
call _fprintf
jmp short def_25F88; jumptable 0000000000025F88 default case
loc_25FC4:
mov rdi, cs:file_3; jumptable 0000000000025F88 case 2
cmp byte ptr [rax+40h], 0
mov rsi, r15
lea rcx, fmt_report_true_0; ", %s: true"
cmovnz rsi, rcx
add rax, 10h
mov rdx, rax
xor eax, eax
call _fprintf
jmp short def_25F88; jumptable 0000000000025F88 default case
loc_25FED:
mov rdi, cs:file_3; jumptable 0000000000025F88 case 3
mov rcx, [rax+40h]
add rax, 10h
mov rsi, r12
mov rdx, rax
loc_26002:
xor eax, eax
call _fprintf
jmp short def_25F88; jumptable 0000000000025F88 default case
loc_2600B:
mov rdi, cs:file_3; jumptable 0000000000025F88 case 1
mov ecx, [rax+34h]
add rax, 10h
lea rsi, fmt_report_bin_0; ", %s: \"(%u bytes bin)\""
mov rdx, rax
xor eax, eax
call _fprintf
def_25F88:
mov rbp, [rbp+0]; jumptable 0000000000025F88 default case
mov rax, [rbp+0]
test rax, rax
jnz loc_25F74
loc_2603B:
mov rax, [rbx+148h]
test rax, rax
jz loc_26137
add rbx, 148h
lea rbp, jpt_2608A
lea r15, fmt_report_bin_0; ", %s: \"(%u bytes bin)\""
lea r14, fmt_report_false_0; ", %s: false"
lea r12, fmt_report_int_0; ", %s: %lu"
lea r13, fmt_report_double_0; ", %s: %.2f"
loc_26075:
mov ecx, [rax+30h]
cmp rcx, 4; switch 5 cases
ja def_2608A; jumptable 000000000002608A default case
movsxd rcx, ss:(jpt_2608A - 64168h)[rbp+rcx*4]
add rcx, rbp
jmp rcx; switch jump
loc_2608C:
mov rdi, cs:file_3; jumptable 000000000002608A case 0
lea rdx, [rax+10h]
add rax, 48h ; 'H'
lea rsi, fmt_report_str_0; ", %s: \"%s\""
mov rcx, rax
jmp short loc_26104
loc_260A7:
mov rdi, cs:file_3; jumptable 000000000002608A case 4
movsd xmm0, qword ptr [rax+40h]
add rax, 10h
mov rsi, r13
mov rdx, rax
mov al, 1
call _fprintf
jmp short def_2608A; jumptable 000000000002608A default case
loc_260C6:
mov rdi, cs:file_3; jumptable 000000000002608A case 2
cmp byte ptr [rax+40h], 0
mov rsi, r14
lea rcx, fmt_report_true_0; ", %s: true"
cmovnz rsi, rcx
add rax, 10h
mov rdx, rax
xor eax, eax
call _fprintf
jmp short def_2608A; jumptable 000000000002608A default case
loc_260EF:
mov rdi, cs:file_3; jumptable 000000000002608A case 3
mov rcx, [rax+40h]
add rax, 10h
mov rsi, r12
mov rdx, rax
loc_26104:
xor eax, eax
call _fprintf
jmp short def_2608A; jumptable 000000000002608A default case
loc_2610D:
mov rdi, cs:file_3; jumptable 000000000002608A case 1
mov ecx, [rax+34h]
add rax, 10h
mov rsi, r15
mov rdx, rax
xor eax, eax
call _fprintf
def_2608A:
mov rbx, [rbx]; jumptable 000000000002608A default case
mov rax, [rbx]
test rax, rax
jnz loc_26075
loc_26137:
mov rdi, cs:file_3
lea rsi, aBenchmarkingUB+1Fh; "\n"
xor eax, eax
call _fprintf
test eax, eax
jns short loc_26163
loc_26150:
lea rsi, aTextoutputCoul_0; "(TextOutput) could not write result to "...
mov edi, 0FFFFFFFFh
xor eax, eax
call LOG
loc_26163:
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long text_result(long long a1, int a2, int a3, int a4, int a5, int a6)
{
unsigned long long v6; // rax
const char *v7; // rdx
int v8; // edx
int v9; // ecx
int v10; // r8d
int v11; // r9d
long long v12; // r14
const char *v13; // rax
const char *v14; // rax
const char *v15; // rbp
const char *v16; // rsi
const char *v17; // rax
const char *v18; // rbp
const char *v19; // rsi
const char *v20; // rax
const char *v21; // rbx
const char *v22; // rsi
long long result; // rax
char v24[96]; // [rsp+18h] [rbp-60h] BYREF
ipaddress_fmt((unsigned int)v24, a2, a3, a4, a5, a6, *(_OWORD *)(a1 + 24), *(_QWORD *)(a1 + 32), *(_QWORD *)(a1 + 40));
v6 = *(unsigned int *)(a1 + 8);
if ( v6 > 2 )
v7 = "[?]";
else
v7 = (char *)dword_64208 + dword_64208[v6];
if ( (int)fprintf(file_3, "%s host: %s", v7, v24) < 0
|| (*(_BYTE *)(a1 + 408) & 2) == 0 && (int)fprintf(file_3, " port: %u", *(_DWORD *)(a1 + 72)) < 0 )
{
return LOG(-1, (unsigned int)"(TextOutput) could not write result to file.\n", v8, v9, v10, v11);
}
v12 = file_3;
v13 = (const char *)ip_proto_to_string(*(unsigned int *)(a1 + 16));
if ( (int)fprintf(v12, " in %s", v13) < 0
|| *(_BYTE *)(a1 + 80) && (int)fprintf(file_3, " is \"%s\"", (const char *)(a1 + 80)) < 0 )
{
return LOG(-1, (unsigned int)"(TextOutput) could not write result to file.\n", v8, v9, v10, v11);
}
if ( *(_BYTE *)(a1 + 110) && (int)fprintf(file_3, " because \"%s\"", (const char *)(a1 + 110)) < 0 )
return LOG(-1, (unsigned int)"(TextOutput) could not write result to file.\n", v8, v9, v10, v11);
v14 = *(const char **)(a1 + 152);
if ( v14 )
{
v15 = (const char *)(a1 + 152);
do
{
switch ( *((_DWORD *)v14 + 12) )
{
case 0:
fprintf(file_3, ", %s: \"%s\"", v14 + 16, v14 + 72);
break;
case 1:
fprintf(file_3, ", %s: \"(%u bytes bin)\"", v14 + 16, *((_DWORD *)v14 + 13));
break;
case 2:
v16 = ", %s: false";
if ( v14[64] )
v16 = ", %s: true";
fprintf(file_3, v16, v14 + 16);
break;
case 3:
fprintf(file_3, ", %s: %lu", v14 + 16, *((_QWORD *)v14 + 8));
break;
case 4:
fprintf(file_3, ", %s: %.2f", v14 + 16, *((double *)v14 + 8));
break;
default:
break;
}
v15 = *(const char **)v15;
v14 = *(const char **)v15;
}
while ( *(_QWORD *)v15 );
}
v17 = *(const char **)(a1 + 240);
if ( v17 )
{
v18 = (const char *)(a1 + 240);
do
{
switch ( *((_DWORD *)v17 + 12) )
{
case 0:
fprintf(file_3, ", %s: \"%s\"", v17 + 16, v17 + 72);
break;
case 1:
fprintf(file_3, ", %s: \"(%u bytes bin)\"", v17 + 16, *((_DWORD *)v17 + 13));
break;
case 2:
v19 = ", %s: false";
if ( v17[64] )
v19 = ", %s: true";
fprintf(file_3, v19, v17 + 16);
break;
case 3:
fprintf(file_3, ", %s: %lu", v17 + 16, *((_QWORD *)v17 + 8));
break;
case 4:
fprintf(file_3, ", %s: %.2f", v17 + 16, *((double *)v17 + 8));
break;
default:
break;
}
v18 = *(const char **)v18;
v17 = *(const char **)v18;
}
while ( *(_QWORD *)v18 );
}
v20 = *(const char **)(a1 + 328);
if ( v20 )
{
v21 = (const char *)(a1 + 328);
do
{
switch ( *((_DWORD *)v20 + 12) )
{
case 0:
fprintf(file_3, ", %s: \"%s\"", v20 + 16, v20 + 72);
break;
case 1:
fprintf(file_3, ", %s: \"(%u bytes bin)\"", v20 + 16, *((_DWORD *)v20 + 13));
break;
case 2:
v22 = ", %s: false";
if ( v20[64] )
v22 = ", %s: true";
fprintf(file_3, v22, v20 + 16);
break;
case 3:
fprintf(file_3, ", %s: %lu", v20 + 16, *((_QWORD *)v20 + 8));
break;
case 4:
fprintf(file_3, ", %s: %.2f", v20 + 16, *((double *)v20 + 8));
break;
default:
break;
}
v21 = *(const char **)v21;
v20 = *(const char **)v21;
}
while ( *(_QWORD *)v21 );
}
result = fprintf(file_3, "\n");
if ( (int)result < 0 )
return LOG(-1, (unsigned int)"(TextOutput) could not write result to file.\n", v8, v9, v10, v11);
return result;
}
|
text_result:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x28]
MOV qword ptr [RSP + 0x10],RAX
MOVUPS XMM0,xmmword ptr [RDI + 0x18]
MOVUPS xmmword ptr [RSP],XMM0
LEA RDI,[RSP + 0x18]
CALL 0x00144638
MOV EAX,dword ptr [RBX + 0x8]
MOV RDI,qword ptr [0x002a3378]
CMP RAX,0x2
JA 0x00125d83
LEA RCX,[0x164208]
MOVSXD RDX,dword ptr [RCX + RAX*0x4]
ADD RDX,RCX
JMP 0x00125d8a
LAB_00125d83:
LEA RDX,[0x16412c]
LAB_00125d8a:
LEA RSI,[0x16417c]
LEA RCX,[RSP + 0x18]
XOR EAX,EAX
CALL 0x00115220
TEST EAX,EAX
JS 0x00126150
TEST byte ptr [RBX + 0x198],0x2
JNZ 0x00125dce
MOV RDI,qword ptr [0x002a3378]
MOV EDX,dword ptr [RBX + 0x48]
LEA RSI,[0x164188]
XOR EAX,EAX
CALL 0x00115220
TEST EAX,EAX
JS 0x00126150
LAB_00125dce:
MOV R14,qword ptr [0x002a3378]
MOV EDI,dword ptr [RBX + 0x10]
CALL 0x001493c8
LEA RSI,[0x164192]
MOV RDI,R14
MOV RDX,RAX
XOR EAX,EAX
CALL 0x00115220
TEST EAX,EAX
JS 0x00126150
CMP byte ptr [RBX + 0x50],0x0
JZ 0x00125e20
LEA RDX,[RBX + 0x50]
MOV RDI,qword ptr [0x002a3378]
LEA RSI,[0x164199]
XOR EAX,EAX
CALL 0x00115220
TEST EAX,EAX
JS 0x00126150
LAB_00125e20:
CMP byte ptr [RBX + 0x6e],0x0
JZ 0x00125e47
LEA RDX,[RBX + 0x6e]
MOV RDI,qword ptr [0x002a3378]
LEA RSI,[0x1641a2]
XOR EAX,EAX
CALL 0x00115220
TEST EAX,EAX
JS 0x00126150
LAB_00125e47:
MOV RAX,qword ptr [RBX + 0x98]
TEST RAX,RAX
JZ 0x00125f41
LEA RBP,[RBX + 0x98]
LEA R14,[0x164140]
LEA R15,[0x1641dd]
LEA R12,[0x1641bc]
LEA R13,[0x1641c7]
LAB_00125e7a:
MOV ECX,dword ptr [RAX + 0x30]
CMP RCX,0x4
JA 0x00125f30
MOVSXD RCX,dword ptr [R14 + RCX*0x4]
ADD RCX,R14
switchD:
JMP RCX
caseD_0:
MOV RDI,qword ptr [0x002a3378]
LEA RDX,[RAX + 0x10]
ADD RAX,0x48
LEA RSI,[0x1641b0]
MOV RCX,RAX
JMP 0x00125f08
caseD_4:
MOV RDI,qword ptr [0x002a3378]
MOVSD XMM0,qword ptr [RAX + 0x40]
ADD RAX,0x10
MOV RSI,R13
MOV RDX,RAX
MOV AL,0x1
CALL 0x00115220
JMP 0x00125f30
caseD_2:
MOV RDI,qword ptr [0x002a3378]
CMP byte ptr [RAX + 0x40],0x0
MOV RSI,R15
LEA RCX,[0x1641d2]
CMOVNZ RSI,RCX
ADD RAX,0x10
MOV RDX,RAX
XOR EAX,EAX
CALL 0x00115220
JMP 0x00125f30
caseD_3:
MOV RDI,qword ptr [0x002a3378]
MOV RCX,qword ptr [RAX + 0x40]
ADD RAX,0x10
MOV RSI,R12
MOV RDX,RAX
LAB_00125f08:
XOR EAX,EAX
CALL 0x00115220
JMP 0x00125f30
caseD_1:
MOV RDI,qword ptr [0x002a3378]
MOV ECX,dword ptr [RAX + 0x34]
ADD RAX,0x10
LEA RSI,[0x1641f0]
MOV RDX,RAX
XOR EAX,EAX
CALL 0x00115220
default:
MOV RBP,qword ptr [RBP]
MOV RAX,qword ptr [RBP]
TEST RAX,RAX
JNZ 0x00125e7a
LAB_00125f41:
MOV RAX,qword ptr [RBX + 0xf0]
TEST RAX,RAX
JZ 0x0012603b
LEA RBP,[RBX + 0xf0]
LEA R14,[0x164154]
LEA R15,[0x1641dd]
LEA R12,[0x1641bc]
LEA R13,[0x1641c7]
LAB_00125f74:
MOV ECX,dword ptr [RAX + 0x30]
CMP RCX,0x4
JA 0x0012602a
MOVSXD RCX,dword ptr [R14 + RCX*0x4]
ADD RCX,R14
switchD:
JMP RCX
caseD_0:
MOV RDI,qword ptr [0x002a3378]
LEA RDX,[RAX + 0x10]
ADD RAX,0x48
LEA RSI,[0x1641b0]
MOV RCX,RAX
JMP 0x00126002
caseD_4:
MOV RDI,qword ptr [0x002a3378]
MOVSD XMM0,qword ptr [RAX + 0x40]
ADD RAX,0x10
MOV RSI,R13
MOV RDX,RAX
MOV AL,0x1
CALL 0x00115220
JMP 0x0012602a
caseD_2:
MOV RDI,qword ptr [0x002a3378]
CMP byte ptr [RAX + 0x40],0x0
MOV RSI,R15
LEA RCX,[0x1641d2]
CMOVNZ RSI,RCX
ADD RAX,0x10
MOV RDX,RAX
XOR EAX,EAX
CALL 0x00115220
JMP 0x0012602a
caseD_3:
MOV RDI,qword ptr [0x002a3378]
MOV RCX,qword ptr [RAX + 0x40]
ADD RAX,0x10
MOV RSI,R12
MOV RDX,RAX
LAB_00126002:
XOR EAX,EAX
CALL 0x00115220
JMP 0x0012602a
caseD_1:
MOV RDI,qword ptr [0x002a3378]
MOV ECX,dword ptr [RAX + 0x34]
ADD RAX,0x10
LEA RSI,[0x1641f0]
MOV RDX,RAX
XOR EAX,EAX
CALL 0x00115220
default:
MOV RBP,qword ptr [RBP]
MOV RAX,qword ptr [RBP]
TEST RAX,RAX
JNZ 0x00125f74
LAB_0012603b:
MOV RAX,qword ptr [RBX + 0x148]
TEST RAX,RAX
JZ 0x00126137
ADD RBX,0x148
LEA RBP,[0x164168]
LEA R15,[0x1641f0]
LEA R14,[0x1641dd]
LEA R12,[0x1641bc]
LEA R13,[0x1641c7]
LAB_00126075:
MOV ECX,dword ptr [RAX + 0x30]
CMP RCX,0x4
JA 0x00126128
MOVSXD RCX,dword ptr [RBP + RCX*0x4]
ADD RCX,RBP
switchD:
JMP RCX
caseD_0:
MOV RDI,qword ptr [0x002a3378]
LEA RDX,[RAX + 0x10]
ADD RAX,0x48
LEA RSI,[0x1641b0]
MOV RCX,RAX
JMP 0x00126104
caseD_4:
MOV RDI,qword ptr [0x002a3378]
MOVSD XMM0,qword ptr [RAX + 0x40]
ADD RAX,0x10
MOV RSI,R13
MOV RDX,RAX
MOV AL,0x1
CALL 0x00115220
JMP 0x00126128
caseD_2:
MOV RDI,qword ptr [0x002a3378]
CMP byte ptr [RAX + 0x40],0x0
MOV RSI,R14
LEA RCX,[0x1641d2]
CMOVNZ RSI,RCX
ADD RAX,0x10
MOV RDX,RAX
XOR EAX,EAX
CALL 0x00115220
JMP 0x00126128
caseD_3:
MOV RDI,qword ptr [0x002a3378]
MOV RCX,qword ptr [RAX + 0x40]
ADD RAX,0x10
MOV RSI,R12
MOV RDX,RAX
LAB_00126104:
XOR EAX,EAX
CALL 0x00115220
JMP 0x00126128
caseD_1:
MOV RDI,qword ptr [0x002a3378]
MOV ECX,dword ptr [RAX + 0x34]
ADD RAX,0x10
MOV RSI,R15
MOV RDX,RAX
XOR EAX,EAX
CALL 0x00115220
default:
MOV RBX,qword ptr [RBX]
MOV RAX,qword ptr [RBX]
TEST RAX,RAX
JNZ 0x00126075
LAB_00126137:
MOV RDI,qword ptr [0x002a3378]
LEA RSI,[0x17e70b]
XOR EAX,EAX
CALL 0x00115220
TEST EAX,EAX
JNS 0x00126163
LAB_00126150:
LEA RSI,[0x16428a]
MOV EDI,0xffffffff
XOR EAX,EAX
CALL 0x001536da
LAB_00126163:
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void text_result(long param_1)
{
FILE *__stream;
int iVar1;
int8 uVar2;
long lVar3;
long lVar4;
int *puVar5;
long *plVar6;
char *pcVar7;
int8 in_R8;
int8 in_R9;
int4 uVar8;
int4 uVar9;
int1 local_60 [48];
uVar2 = *(int8 *)(param_1 + 0x28);
uVar8 = *(int4 *)(param_1 + 0x18);
uVar9 = *(int4 *)(param_1 + 0x20);
ipaddress_fmt(local_60);
if ((ulong)*(uint *)(param_1 + 8) < 3) {
puVar5 = &DAT_00164208 + *(int *)(&DAT_00164208 + (ulong)*(uint *)(param_1 + 8) * 4);
}
else {
puVar5 = &DAT_0016412c;
}
iVar1 = fprintf(file,"%s host: %s",puVar5,local_60,in_R8,in_R9,uVar8,uVar9,uVar2);
if ((-1 < iVar1) &&
(((*(byte *)(param_1 + 0x198) & 2) != 0 ||
(iVar1 = fprintf(file," port: %u",(ulong)*(uint *)(param_1 + 0x48)), -1 < iVar1)))) {
__stream = file;
uVar2 = ip_proto_to_string(*(int4 *)(param_1 + 0x10));
iVar1 = fprintf(__stream," in %s",uVar2);
if ((-1 < iVar1) &&
(((*(char *)(param_1 + 0x50) == '\0' ||
(iVar1 = fprintf(file,fmt_cls,param_1 + 0x50), -1 < iVar1)) &&
((*(char *)(param_1 + 0x6e) == '\0' ||
(iVar1 = fprintf(file," because \"%s\"",param_1 + 0x6e), -1 < iVar1)))))) {
lVar4 = *(long *)(param_1 + 0x98);
if (lVar4 != 0) {
plVar6 = (long *)(param_1 + 0x98);
do {
switch(*(int4 *)(lVar4 + 0x30)) {
case 0:
lVar3 = lVar4 + 0x48;
pcVar7 = fmt_report_str;
goto LAB_00125f08;
case 1:
fprintf(file,", %s: \"(%u bytes bin)\"",lVar4 + 0x10,(ulong)*(uint *)(lVar4 + 0x34));
break;
case 2:
pcVar7 = ", %s: false";
if (*(char *)(lVar4 + 0x40) != '\0') {
pcVar7 = ", %s: true";
}
fprintf(file,pcVar7,lVar4 + 0x10);
break;
case 3:
lVar3 = *(long *)(lVar4 + 0x40);
pcVar7 = ", %s: %lu";
LAB_00125f08:
fprintf(file,pcVar7,lVar4 + 0x10,lVar3);
break;
case 4:
fprintf(file,", %s: %.2f",(int)*(int8 *)(lVar4 + 0x40),lVar4 + 0x10);
}
plVar6 = (long *)*plVar6;
lVar4 = *plVar6;
} while (lVar4 != 0);
}
lVar4 = *(long *)(param_1 + 0xf0);
if (lVar4 != 0) {
plVar6 = (long *)(param_1 + 0xf0);
do {
switch(*(int4 *)(lVar4 + 0x30)) {
case 0:
lVar3 = lVar4 + 0x48;
pcVar7 = fmt_report_str;
goto LAB_00126002;
case 1:
fprintf(file,", %s: \"(%u bytes bin)\"",lVar4 + 0x10,(ulong)*(uint *)(lVar4 + 0x34));
break;
case 2:
pcVar7 = ", %s: false";
if (*(char *)(lVar4 + 0x40) != '\0') {
pcVar7 = ", %s: true";
}
fprintf(file,pcVar7,lVar4 + 0x10);
break;
case 3:
lVar3 = *(long *)(lVar4 + 0x40);
pcVar7 = ", %s: %lu";
LAB_00126002:
fprintf(file,pcVar7,lVar4 + 0x10,lVar3);
break;
case 4:
fprintf(file,", %s: %.2f",(int)*(int8 *)(lVar4 + 0x40),lVar4 + 0x10);
}
plVar6 = (long *)*plVar6;
lVar4 = *plVar6;
} while (lVar4 != 0);
}
lVar4 = *(long *)(param_1 + 0x148);
if (lVar4 != 0) {
plVar6 = (long *)(param_1 + 0x148);
do {
switch(*(int4 *)(lVar4 + 0x30)) {
case 0:
lVar3 = lVar4 + 0x48;
pcVar7 = fmt_report_str;
goto LAB_00126104;
case 1:
fprintf(file,", %s: \"(%u bytes bin)\"",lVar4 + 0x10,(ulong)*(uint *)(lVar4 + 0x34));
break;
case 2:
pcVar7 = ", %s: false";
if (*(char *)(lVar4 + 0x40) != '\0') {
pcVar7 = ", %s: true";
}
fprintf(file,pcVar7,lVar4 + 0x10);
break;
case 3:
lVar3 = *(long *)(lVar4 + 0x40);
pcVar7 = ", %s: %lu";
LAB_00126104:
fprintf(file,pcVar7,lVar4 + 0x10,lVar3);
break;
case 4:
fprintf(file,", %s: %.2f",(int)*(int8 *)(lVar4 + 0x40),lVar4 + 0x10);
}
plVar6 = (long *)*plVar6;
lVar4 = *plVar6;
} while (lVar4 != 0);
}
iVar1 = fprintf(file,"\n");
if (-1 < iVar1) {
return;
}
}
}
LOG(0xffffffff,"(TextOutput) could not write result to file.\n");
return;
}
|
|
20,180
|
nglog::ShellEscape(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
ng-log[P]ng-log/src/logging.cc
|
static string ShellEscape(const string& src) {
string result;
if (!src.empty() && // empty string needs quotes
src.find_first_not_of(kDontNeedShellEscapeChars) == string::npos) {
// only contains chars that don't need quotes; it's fine
result.assign(src);
} else if (src.find_first_of('\'') == string::npos) {
// no single quotes; just wrap it in single quotes
result.assign("'");
result.append(src);
result.append("'");
} else {
// needs double quote escaping
result.assign("\"");
for (size_t i = 0; i < src.size(); ++i) {
switch (src[i]) {
case '\\':
case '$':
case '"':
case '`':
result.append("\\");
}
result.append(src, i, 1);
}
result.append("\"");
}
return result;
}
|
O3
|
cpp
|
nglog::ShellEscape(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
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %r12
movq %r12, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
cmpq $0x0, 0x8(%rsi)
je 0x120db
leaq 0x125ce(%rip), %rsi # 0x24690
movl $0x47, %ecx
movq %r14, %rdi
xorl %edx, %edx
callq 0x78e0
cmpq $-0x1, %rax
je 0x121ae
movq %r14, %rdi
movl $0x27, %esi
xorl %edx, %edx
callq 0x76b0
movq 0x8(%rbx), %rdx
cmpq $-0x1, %rax
je 0x12178
leaq 0x12115(%rip), %r15 # 0x24214
movl $0x1, %r8d
movq %rbx, %rdi
xorl %esi, %esi
movq %r15, %rcx
callq 0x7830
cmpq $0x0, 0x8(%r14)
je 0x121a1
movq %r12, (%rsp)
xorl %r12d, %r12d
movabsq $0x4400000000000005, %rbp # imm = 0x4400000000000005
leaq 0x135c1(%rip), %r13 # 0x256f6
movq (%r14), %rax
movzbl (%rax,%r12), %eax
addl $-0x22, %eax
cmpl $0x3e, %eax
ja 0x12156
btq %rax, %rbp
jae 0x12156
movq %rbx, %rdi
movq %r13, %rsi
callq 0x79c0
movl $0x1, %ecx
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x7720
incq %r12
cmpq 0x8(%r14), %r12
jb 0x12135
movq (%rsp), %r12
jmp 0x121a1
leaq 0x1265f(%rip), %r15 # 0x247de
movl $0x1, %r8d
movq %rbx, %rdi
xorl %esi, %esi
movq %r15, %rcx
callq 0x7830
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x7130
movq %rbx, %rdi
movq %r15, %rsi
callq 0x79c0
jmp 0x121b9
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7280
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r12, (%rsp)
jmp 0x121ce
movq %rax, %r14
movq (%rbx), %rdi
cmpq (%rsp), %rdi
je 0x121e9
movq (%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x8edc
movq %r14, %rdi
callq 0x7930
nop
|
_ZN5nglogL11ShellEscapeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
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
cmp qword ptr [rsi+8], 0
jz short loc_120DB
lea rsi, _ZN5nglogL25kDontNeedShellEscapeCharsE; "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklm"...
mov ecx, 47h ; 'G'
mov rdi, r14
xor edx, edx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE17find_first_not_ofEPKcmm; std::string::find_first_not_of(char const*,ulong,ulong)
cmp rax, 0FFFFFFFFFFFFFFFFh
jz loc_121AE
loc_120DB:
mov rdi, r14
mov esi, 27h ; '''
xor edx, edx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong)
mov rdx, [rbx+8]
cmp rax, 0FFFFFFFFFFFFFFFFh
jz loc_12178
lea r15, a30Thirty20Twen+24h; "\""
mov r8d, 1
mov rdi, rbx
xor esi, esi
mov rcx, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
cmp qword ptr [r14+8], 0
jz loc_121A1
mov [rsp+38h+var_38], r12
xor r12d, r12d
mov rbp, 4400000000000005h
lea r13, asc_256F6; "\\"
loc_12135:
mov rax, [r14]
movzx eax, byte ptr [rax+r12]
add eax, 0FFFFFFDEh
cmp eax, 3Eh ; '>'
ja short loc_12156
bt rbp, rax
jnb short loc_12156
mov rdi, rbx
mov rsi, r13
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
loc_12156:
mov ecx, 1
mov rdi, rbx
mov rsi, r14
mov rdx, r12
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_mm; std::string::append(std::string const&,ulong,ulong)
inc r12
cmp r12, [r14+8]
jb short loc_12135
mov r12, [rsp+38h+var_38]
jmp short loc_121A1
loc_12178:
lea r15, aDataNumCharsTo+59h; "'"
mov r8d, 1
mov rdi, rbx
xor esi, esi
mov rcx, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
mov rsi, [r14]
mov rdx, [r14+8]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
loc_121A1:
mov rdi, rbx
mov rsi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
jmp short loc_121B9
loc_121AE:
mov rdi, rbx
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
loc_121B9:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov [rsp+0], r12
jmp short $+2
loc_121CE:
mov r14, rax
mov rdi, [rbx]; void *
cmp rdi, [rsp+0]
jz short loc_121E9
mov rax, [rsp+0]
mov rsi, [rax]
inc rsi; unsigned __int64
call _ZdlPvm; operator delete(void *,ulong)
loc_121E9:
mov rdi, r14
call __Unwind_Resume
|
long long nglog::ShellEscape(long long a1, _QWORD *a2)
{
long long v2; // rax
long long v3; // rdx
char *v4; // r15
unsigned long long v5; // r12
long long v6; // rbp
unsigned long long v7; // rax
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
if ( a2[1]
&& std::string::find_first_not_of(
a2,
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-_.=/:,@",
0LL,
71LL) == -1 )
{
return std::string::_M_assign(a1, a2);
}
v2 = std::string::find(a2, 39LL, 0LL);
v3 = *(_QWORD *)(a1 + 8);
if ( v2 == -1 )
{
v4 = "'";
std::string::_M_replace(a1, 0LL, v3, "'", 1LL);
std::string::_M_append(a1, *a2);
}
else
{
v4 = "\"";
std::string::_M_replace(a1, 0LL, v3, "\"", 1LL);
if ( a2[1] )
{
v5 = 0LL;
v6 = 0x4400000000000005LL;
do
{
v7 = (unsigned int)*(unsigned __int8 *)(*a2 + v5) - 34;
if ( (unsigned int)v7 <= 0x3E )
{
if ( _bittest64(&v6, v7) )
std::string::append(a1, "\\");
}
std::string::append(a1, a2, v5++, 1LL);
}
while ( v5 < a2[1] );
}
}
return std::string::append(a1, v4);
}
|
ShellEscape:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
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
CMP qword ptr [RSI + 0x8],0x0
JZ 0x001120db
LEA RSI,[0x124690]
MOV ECX,0x47
MOV RDI,R14
XOR EDX,EDX
CALL 0x001078e0
CMP RAX,-0x1
JZ 0x001121ae
LAB_001120db:
MOV RDI,R14
MOV ESI,0x27
XOR EDX,EDX
CALL 0x001076b0
MOV RDX,qword ptr [RBX + 0x8]
CMP RAX,-0x1
JZ 0x00112178
LAB_001120f8:
LEA R15,[0x124214]
MOV R8D,0x1
MOV RDI,RBX
XOR ESI,ESI
MOV RCX,R15
CALL 0x00107830
CMP qword ptr [R14 + 0x8],0x0
JZ 0x001121a1
MOV qword ptr [RSP],R12
XOR R12D,R12D
MOV RBP,0x4400000000000005
LEA R13,[0x1256f6]
LAB_00112135:
MOV RAX,qword ptr [R14]
MOVZX EAX,byte ptr [RAX + R12*0x1]
ADD EAX,-0x22
CMP EAX,0x3e
JA 0x00112156
BT RBP,RAX
JNC 0x00112156
LAB_0011214b:
MOV RDI,RBX
MOV RSI,R13
CALL 0x001079c0
LAB_00112156:
MOV ECX,0x1
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R12
CALL 0x00107720
INC R12
CMP R12,qword ptr [R14 + 0x8]
JC 0x00112135
MOV R12,qword ptr [RSP]
JMP 0x001121a1
LAB_00112178:
LEA R15,[0x1247de]
MOV R8D,0x1
MOV RDI,RBX
XOR ESI,ESI
MOV RCX,R15
CALL 0x00107830
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
MOV RDI,RBX
CALL 0x00107130
LAB_001121a1:
MOV RDI,RBX
MOV RSI,R15
CALL 0x001079c0
JMP 0x001121b9
LAB_001121ae:
MOV RDI,RBX
MOV RSI,R14
CALL 0x00107280
LAB_001121b9:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* nglog::ShellEscape(std::__cxx11::string const&) */
void __thiscall nglog::ShellEscape(nglog *this,string *param_1)
{
uint uVar1;
long lVar2;
ulong uVar3;
*(nglog **)this = this + 0x10;
*(int8 *)(this + 8) = 0;
this[0x10] = (nglog)0x0;
if ((*(long *)(param_1 + 8) == 0) ||
(lVar2 = std::__cxx11::string::find_first_not_of((char *)param_1,0x124690,0), lVar2 != -1)) {
lVar2 = std::__cxx11::string::find((char)param_1,0x27);
if (lVar2 == -1) {
/* try { // try from 00112178 to 001121b8 has its CatchHandler @ 001121c8 */
std::__cxx11::string::_M_replace((ulong)this,0,*(char **)(this + 8),0x1247de);
std::__cxx11::string::_M_append((char *)this,*(ulong *)param_1);
}
else {
/* try { // try from 001120f8 to 00112111 has its CatchHandler @ 001121c8 */
std::__cxx11::string::_M_replace((ulong)this,0,*(char **)(this + 8),0x124214);
if (*(long *)(param_1 + 8) != 0) {
uVar3 = 0;
do {
uVar1 = *(byte *)(*(long *)param_1 + uVar3) - 0x22;
if ((uVar1 < 0x3f) && ((0x4400000000000005U >> ((ulong)uVar1 & 0x3f) & 1) != 0)) {
/* try { // try from 0011214b to 00112168 has its CatchHandler @ 001121ce */
std::__cxx11::string::append((char *)this);
}
std::__cxx11::string::append((string *)this,(ulong)param_1,uVar3);
uVar3 = uVar3 + 1;
} while (uVar3 < *(ulong *)(param_1 + 8));
}
}
std::__cxx11::string::append((char *)this);
}
else {
std::__cxx11::string::_M_assign((string *)this);
}
return;
}
|
|
20,181
|
google::protobuf::DescriptorProto::_internal_mutable_options()
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.h
|
inline ::PROTOBUF_NAMESPACE_ID::MessageOptions* DescriptorProto::_internal_mutable_options() {
_impl_._has_bits_[0] |= 0x00000002u;
if (_impl_.options_ == nullptr) {
auto* p = CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::MessageOptions>(GetArenaForAllocation());
_impl_.options_ = p;
}
return _impl_.options_;
}
|
O0
|
c
|
google::protobuf::DescriptorProto::_internal_mutable_options():
subq $0x28, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq %rax, %rcx
addq $0x10, %rcx
movq %rcx, 0x20(%rsp)
movl $0x0, 0x1c(%rsp)
movq 0x20(%rsp), %rcx
movslq 0x1c(%rsp), %rdx
movl (%rcx,%rdx,4), %esi
orl $0x2, %esi
movl %esi, (%rcx,%rdx,4)
cmpq $0x0, 0xe0(%rax)
jne 0x8114c
movq (%rsp), %rdi
callq 0x80180
movq %rax, %rdi
callq 0x81160
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x8(%rsp)
movq 0x8(%rsp), %rcx
movq %rcx, 0xe0(%rax)
movq (%rsp), %rax
movq 0xe0(%rax), %rax
addq $0x28, %rsp
retq
nopl (%rax)
|
_ZN6google8protobuf15DescriptorProto25_internal_mutable_optionsEv:
sub rsp, 28h
mov [rsp+28h+var_18], rdi
mov rax, [rsp+28h+var_18]
mov [rsp+28h+var_28], rax
mov rcx, rax
add rcx, 10h
mov [rsp+28h+var_8], rcx
mov [rsp+28h+var_C], 0
mov rcx, [rsp+28h+var_8]
movsxd rdx, [rsp+28h+var_C]
mov esi, [rcx+rdx*4]
or esi, 2
mov [rcx+rdx*4], esi
cmp qword ptr [rax+0E0h], 0
jnz short loc_8114C
mov rdi, [rsp+28h+var_28]; this
call _ZNK6google8protobuf11MessageLite21GetArenaForAllocationEv; google::protobuf::MessageLite::GetArenaForAllocation(void)
mov rdi, rax; int
call _ZN6google8protobuf11MessageLite18CreateMaybeMessageINS0_14MessageOptionsEEEPT_PNS0_5ArenaE; google::protobuf::MessageLite::CreateMaybeMessage<google::protobuf::MessageOptions>(google::protobuf::Arena *)
mov rcx, rax
mov rax, [rsp+28h+var_28]
mov [rsp+28h+var_20], rcx
mov rcx, [rsp+28h+var_20]
mov [rax+0E0h], rcx
loc_8114C:
mov rax, [rsp+28h+var_28]
mov rax, [rax+0E0h]
add rsp, 28h
retn
|
long long google::protobuf::DescriptorProto::_internal_mutable_options(
google::protobuf::DescriptorProto *this)
{
int ArenaForAllocation; // eax
*((_DWORD *)this + 4) |= 2u;
if ( !*((_QWORD *)this + 28) )
{
ArenaForAllocation = google::protobuf::MessageLite::GetArenaForAllocation(this);
*((_QWORD *)this + 28) = google::protobuf::MessageLite::CreateMaybeMessage<google::protobuf::MessageOptions>(ArenaForAllocation);
}
return *((_QWORD *)this + 28);
}
|
_internal_mutable_options:
SUB RSP,0x28
MOV qword ptr [RSP + 0x10],RDI
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP],RAX
MOV RCX,RAX
ADD RCX,0x10
MOV qword ptr [RSP + 0x20],RCX
MOV dword ptr [RSP + 0x1c],0x0
MOV RCX,qword ptr [RSP + 0x20]
MOVSXD RDX,dword ptr [RSP + 0x1c]
MOV ESI,dword ptr [RCX + RDX*0x4]
OR ESI,0x2
MOV dword ptr [RCX + RDX*0x4],ESI
CMP qword ptr [RAX + 0xe0],0x0
JNZ 0x0018114c
MOV RDI,qword ptr [RSP]
CALL 0x00180180
MOV RDI,RAX
CALL 0x00181160
MOV RCX,RAX
MOV RAX,qword ptr [RSP]
MOV qword ptr [RSP + 0x8],RCX
MOV RCX,qword ptr [RSP + 0x8]
MOV qword ptr [RAX + 0xe0],RCX
LAB_0018114c:
MOV RAX,qword ptr [RSP]
MOV RAX,qword ptr [RAX + 0xe0]
ADD RSP,0x28
RET
|
/* google::protobuf::DescriptorProto::_internal_mutable_options() */
int8 __thiscall
google::protobuf::DescriptorProto::_internal_mutable_options(DescriptorProto *this)
{
Arena *pAVar1;
MessageOptions *pMVar2;
*(uint *)(this + 0x10) = *(uint *)(this + 0x10) | 2;
if (*(long *)(this + 0xe0) == 0) {
pAVar1 = (Arena *)MessageLite::GetArenaForAllocation((MessageLite *)this);
pMVar2 = MessageLite::CreateMaybeMessage<google::protobuf::MessageOptions>(pAVar1);
*(MessageOptions **)(this + 0xe0) = pMVar2;
}
return *(int8 *)(this + 0xe0);
}
|
|
20,182
|
get_collation_number_internal
|
eloqsql/mysys/charset.c
|
static uint
get_collation_number_internal(const char *name)
{
CHARSET_INFO **cs;
for (cs= all_charsets;
cs < all_charsets + array_elements(all_charsets);
cs++)
{
if (cs[0] && cs[0]->coll_name.str &&
!my_strcasecmp(&my_charset_latin1, cs[0]->coll_name.str, name))
return cs[0]->number;
}
return 0;
}
|
O0
|
c
|
get_collation_number_internal:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
leaq 0x40d21d(%rip), %rax # 0x4bd610
movq %rax, -0x18(%rbp)
leaq 0x40d212(%rip), %rax # 0x4bd610
addq $0x4000, %rax # imm = 0x4000
cmpq %rax, -0x18(%rbp)
jae 0xb046f
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
je 0xb045f
movq -0x18(%rbp), %rax
movq (%rax), %rax
cmpq $0x0, 0x20(%rax)
je 0xb045f
leaq 0x2f7cb7(%rip), %rax # 0x3a80e0
movq 0xc0(%rax), %rax
movq 0x40(%rax), %rax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
movq 0x20(%rcx), %rsi
movq -0x10(%rbp), %rdx
leaq 0x2f7c96(%rip), %rdi # 0x3a80e0
callq *%rax
cmpl $0x0, %eax
jne 0xb045f
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0xb0476
jmp 0xb0461
movq -0x18(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x18(%rbp)
jmp 0xb03f7
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
|
get_collation_number_internal:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
lea rax, all_charsets
mov [rbp+var_18], rax
loc_B03F7:
lea rax, all_charsets
add rax, 4000h
cmp [rbp+var_18], rax
jnb short loc_B046F
mov rax, [rbp+var_18]
cmp qword ptr [rax], 0
jz short loc_B045F
mov rax, [rbp+var_18]
mov rax, [rax]
cmp qword ptr [rax+20h], 0
jz short loc_B045F
lea rax, my_charset_latin1
mov rax, [rax+0C0h]
mov rax, [rax+40h]
mov rcx, [rbp+var_18]
mov rcx, [rcx]
mov rsi, [rcx+20h]
mov rdx, [rbp+var_10]
lea rdi, my_charset_latin1
call rax
cmp eax, 0
jnz short loc_B045F
mov rax, [rbp+var_18]
mov rax, [rax]
mov eax, [rax]
mov [rbp+var_4], eax
jmp short loc_B0476
loc_B045F:
jmp short $+2
loc_B0461:
mov rax, [rbp+var_18]
add rax, 8
mov [rbp+var_18], rax
jmp short loc_B03F7
loc_B046F:
mov [rbp+var_4], 0
loc_B0476:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
|
long long get_collation_number_internal(long long a1)
{
unsigned int **i; // [rsp+8h] [rbp-18h]
for ( i = (unsigned int **)all_charsets; i < &all_charsets[2048]; ++i )
{
if ( *i
&& *((_QWORD *)*i + 4)
&& !(*(unsigned int ( **)(void *, _QWORD, long long))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))(
&my_charset_latin1,
*((_QWORD *)*i + 4),
a1) )
{
return **i;
}
}
return 0;
}
|
get_collation_number_internal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
LEA RAX,[0x5bd610]
MOV qword ptr [RBP + -0x18],RAX
LAB_001b03f7:
LEA RAX,[0x5bd610]
ADD RAX,0x4000
CMP qword ptr [RBP + -0x18],RAX
JNC 0x001b046f
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX],0x0
JZ 0x001b045f
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
CMP qword ptr [RAX + 0x20],0x0
JZ 0x001b045f
LEA RAX,[0x4a80e0]
MOV RAX,qword ptr [RAX + 0xc0]
MOV RAX,qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX]
MOV RSI,qword ptr [RCX + 0x20]
MOV RDX,qword ptr [RBP + -0x10]
LEA RDI,[0x4a80e0]
CALL RAX
CMP EAX,0x0
JNZ 0x001b045f
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001b0476
LAB_001b045f:
JMP 0x001b0461
LAB_001b0461:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x8
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001b03f7
LAB_001b046f:
MOV dword ptr [RBP + -0x4],0x0
LAB_001b0476:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
int4 get_collation_number_internal(int8 param_1)
{
int iVar1;
long *local_20;
local_20 = &all_charsets;
while( true ) {
if ((long *)0x5c160f < local_20) {
return 0;
}
if (((*local_20 != 0) && (*(long *)(*local_20 + 0x20) != 0)) &&
(iVar1 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_004a81a0 + 0x40))
(&my_charset_latin1,*(int8 *)(*local_20 + 0x20),param_1), iVar1 == 0
)) break;
local_20 = local_20 + 1;
}
return *(int4 *)*local_20;
}
|
|
20,183
|
mysql_stmt_attr_set
|
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
|
my_bool STDCALL mysql_stmt_attr_set(MYSQL_STMT *stmt, enum enum_stmt_attr_type attr_type, const void *value)
{
switch (attr_type) {
case STMT_ATTR_UPDATE_MAX_LENGTH:
stmt->update_max_length= *(my_bool *)value;
break;
case STMT_ATTR_CURSOR_TYPE:
if (*(ulong *)value > (unsigned long) CURSOR_TYPE_READ_ONLY)
{
SET_CLIENT_STMT_ERROR(stmt, CR_NOT_IMPLEMENTED, SQLSTATE_UNKNOWN, 0);
return(1);
}
stmt->flags = *(ulong *)value;
break;
case STMT_ATTR_PREFETCH_ROWS:
if (*(ulong *)value == 0)
*(long *)value= MYSQL_DEFAULT_PREFETCH_ROWS;
else
stmt->prefetch_rows= *(long *)value;
break;
case STMT_ATTR_PREBIND_PARAMS:
if (stmt->state > MYSQL_STMT_INITTED)
{
mysql_stmt_internal_reset(stmt, 1);
net_stmt_close(stmt, 0);
stmt->state= MYSQL_STMT_INITTED;
stmt->params= 0;
}
stmt->prebind_params= stmt->param_count= *(unsigned int *)value;
break;
case STMT_ATTR_ARRAY_SIZE:
stmt->array_size= *(unsigned int *)value;
break;
case STMT_ATTR_ROW_SIZE:
stmt->row_size= *(size_t *)value;
break;
case STMT_ATTR_CB_RESULT:
stmt->result_callback= (ps_result_callback)value;
break;
case STMT_ATTR_CB_PARAM:
stmt->param_callback= (ps_param_callback)value;
break;
case STMT_ATTR_CB_USER_DATA:
stmt->user_data= (void *)value;
break;
default:
SET_CLIENT_STMT_ERROR(stmt, CR_NOT_IMPLEMENTED, SQLSTATE_UNKNOWN, 0);
return(1);
}
return(0);
}
|
O3
|
c
|
mysql_stmt_attr_set:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rdi, %rbx
cmpl $0xc7, %esi
jle 0x1f9fb
addl $0xffffff38, %esi # imm = 0xFFFFFF38
cmpl $0x6, %esi
ja 0x1fa73
leaq 0x1864b(%rip), %rax # 0x38000
movslq (%rax,%rsi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
cmpl $0x0, 0x50(%rbx)
je 0x1f9ea
movq %rbx, %rdi
movl $0x1, %esi
callq 0x1fae0
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1fc42
movl $0x0, 0x50(%rbx)
movq $0x0, 0x70(%rbx)
movl (%r14), %eax
movl %eax, 0x64(%rbx)
movl %eax, 0x378(%rbx)
jmp 0x1fad9
testl %esi, %esi
je 0x1fa5f
cmpl $0x1, %esi
je 0x1fa6a
cmpl $0x2, %esi
jne 0x1fa73
movq (%r14), %rax
testq %rax, %rax
je 0x1fad2
movq %rax, 0x318(%rbx)
jmp 0x1fad9
movq %r14, 0x390(%rbx)
jmp 0x1fad9
movq (%r14), %rax
movq %rax, 0x370(%rbx)
jmp 0x1fad9
movq %r14, 0x380(%rbx)
jmp 0x1fad9
movl (%r14), %eax
movl %eax, 0x368(%rbx)
jmp 0x1fad9
movq %r14, 0x388(%rbx)
jmp 0x1fad9
movb (%r14), %al
movb %al, 0x313(%rbx)
jmp 0x1fad9
movq (%r14), %rax
cmpq $0x2, %rax
jb 0x1facc
movl $0x806, 0x108(%rbx) # imm = 0x806
leaq 0x30d(%rbx), %rdi
leaq 0x28f75(%rip), %rax # 0x48a00
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13220
xorl %r14d, %r14d
movb %r14b, 0x312(%rbx)
leaq 0x10c(%rbx), %rdi
leaq 0x28f60(%rip), %rax # 0x48a10
movq 0x1b0(%rax), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x13220
movb %r14b, 0x30b(%rbx)
movb $0x1, %al
jmp 0x1fadb
movq %rax, 0x48(%rbx)
jmp 0x1fad9
movq $0x1, (%r14)
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
|
mysql_stmt_attr_set:
push rbp
mov rbp, rsp
push r14
push rbx
mov r14, rdx
mov rbx, rdi
cmp esi, 0C7h
jle short loc_1F9FB
add esi, 0FFFFFF38h; switch 7 cases
cmp esi, 6
ja def_1F9BC; jumptable 000000000001F9BC default case, case 203
lea rax, jpt_1F9BC
movsxd rcx, ds:(jpt_1F9BC - 38000h)[rax+rsi*4]
add rcx, rax
jmp rcx; switch jump
loc_1F9BE:
cmp dword ptr [rbx+50h], 0; jumptable 000000000001F9BC case 200
jz short loc_1F9EA
mov rdi, rbx
mov esi, 1
call mysql_stmt_internal_reset
mov rdi, rbx
xor esi, esi
call net_stmt_close
mov dword ptr [rbx+50h], 0
mov qword ptr [rbx+70h], 0
loc_1F9EA:
mov eax, [r14]
mov [rbx+64h], eax
mov [rbx+378h], eax
jmp loc_1FAD9
loc_1F9FB:
test esi, esi
jz short loc_1FA5F
cmp esi, 1
jz short loc_1FA6A
cmp esi, 2
jnz short def_1F9BC; jumptable 000000000001F9BC default case, case 203
mov rax, [r14]
test rax, rax
jz loc_1FAD2
mov [rbx+318h], rax
jmp loc_1FAD9
loc_1FA21:
mov [rbx+390h], r14; jumptable 000000000001F9BC case 205
jmp loc_1FAD9
loc_1FA2D:
mov rax, [r14]; jumptable 000000000001F9BC case 202
mov [rbx+370h], rax
jmp loc_1FAD9
loc_1FA3C:
mov [rbx+380h], r14; jumptable 000000000001F9BC case 204
jmp loc_1FAD9
loc_1FA48:
mov eax, [r14]; jumptable 000000000001F9BC case 201
mov [rbx+368h], eax
jmp loc_1FAD9
loc_1FA56:
mov [rbx+388h], r14; jumptable 000000000001F9BC case 206
jmp short loc_1FAD9
loc_1FA5F:
mov al, [r14]
mov [rbx+313h], al
jmp short loc_1FAD9
loc_1FA6A:
mov rax, [r14]
cmp rax, 2
jb short loc_1FACC
def_1F9BC:
mov dword ptr [rbx+108h], 806h; jumptable 000000000001F9BC default case, case 203
lea rdi, [rbx+30Dh]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
xor r14d, r14d
mov [rbx+312h], r14b
lea rdi, [rbx+10Ch]
lea rax, client_errors
mov rsi, [rax+1B0h]
mov edx, 200h
call _strncpy
mov [rbx+30Bh], r14b
mov al, 1
jmp short loc_1FADB
loc_1FACC:
mov [rbx+48h], rax
jmp short loc_1FAD9
loc_1FAD2:
mov qword ptr [r14], 1
loc_1FAD9:
xor eax, eax
loc_1FADB:
pop rbx
pop r14
pop rbp
retn
|
char mysql_stmt_attr_set(long long a1, int a2, int *a3)
{
int v4; // eax
if ( a2 > 199 )
{
switch ( a2 )
{
case 200:
if ( *(_DWORD *)(a1 + 80) )
{
mysql_stmt_internal_reset(a1, 1LL);
net_stmt_close(a1, 0LL);
*(_DWORD *)(a1 + 80) = 0;
*(_QWORD *)(a1 + 112) = 0LL;
}
v4 = *a3;
*(_DWORD *)(a1 + 100) = *a3;
*(_DWORD *)(a1 + 888) = v4;
return 0;
case 201:
*(_DWORD *)(a1 + 872) = *a3;
return 0;
case 202:
*(_QWORD *)(a1 + 880) = *(_QWORD *)a3;
return 0;
case 204:
*(_QWORD *)(a1 + 896) = a3;
return 0;
case 205:
*(_QWORD *)(a1 + 912) = a3;
return 0;
case 206:
*(_QWORD *)(a1 + 904) = a3;
return 0;
default:
goto LABEL_18;
}
}
if ( a2 )
{
if ( a2 != 1 )
{
if ( a2 == 2 )
{
if ( *(_QWORD *)a3 )
*(_QWORD *)(a1 + 792) = *(_QWORD *)a3;
else
*(_QWORD *)a3 = 1LL;
return 0;
}
LABEL_18:
*(_DWORD *)(a1 + 264) = 2054;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 786) = 0;
strncpy(a1 + 268, client_errors[54], 512LL);
*(_BYTE *)(a1 + 779) = 0;
return 1;
}
if ( *(_QWORD *)a3 >= 2uLL )
goto LABEL_18;
*(_QWORD *)(a1 + 72) = *(_QWORD *)a3;
}
else
{
*(_BYTE *)(a1 + 787) = *(_BYTE *)a3;
}
return 0;
}
|
mysql_stmt_attr_set:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV R14,RDX
MOV RBX,RDI
CMP ESI,0xc7
JLE 0x0011f9fb
ADD ESI,0xffffff38
CMP ESI,0x6
JA 0x0011fa73
LEA RAX,[0x138000]
MOVSXD RCX,dword ptr [RAX + RSI*0x4]
ADD RCX,RAX
switchD:
JMP RCX
caseD_c8:
CMP dword ptr [RBX + 0x50],0x0
JZ 0x0011f9ea
MOV RDI,RBX
MOV ESI,0x1
CALL 0x0011fae0
MOV RDI,RBX
XOR ESI,ESI
CALL 0x0011fc42
MOV dword ptr [RBX + 0x50],0x0
MOV qword ptr [RBX + 0x70],0x0
LAB_0011f9ea:
MOV EAX,dword ptr [R14]
MOV dword ptr [RBX + 0x64],EAX
MOV dword ptr [RBX + 0x378],EAX
JMP 0x0011fad9
LAB_0011f9fb:
TEST ESI,ESI
JZ 0x0011fa5f
CMP ESI,0x1
JZ 0x0011fa6a
CMP ESI,0x2
JNZ 0x0011fa73
MOV RAX,qword ptr [R14]
TEST RAX,RAX
JZ 0x0011fad2
MOV qword ptr [RBX + 0x318],RAX
JMP 0x0011fad9
caseD_cd:
MOV qword ptr [RBX + 0x390],R14
JMP 0x0011fad9
caseD_ca:
MOV RAX,qword ptr [R14]
MOV qword ptr [RBX + 0x370],RAX
JMP 0x0011fad9
caseD_cc:
MOV qword ptr [RBX + 0x380],R14
JMP 0x0011fad9
caseD_c9:
MOV EAX,dword ptr [R14]
MOV dword ptr [RBX + 0x368],EAX
JMP 0x0011fad9
caseD_ce:
MOV qword ptr [RBX + 0x388],R14
JMP 0x0011fad9
LAB_0011fa5f:
MOV AL,byte ptr [R14]
MOV byte ptr [RBX + 0x313],AL
JMP 0x0011fad9
LAB_0011fa6a:
MOV RAX,qword ptr [R14]
CMP RAX,0x2
JC 0x0011facc
caseD_cb:
MOV dword ptr [RBX + 0x108],0x806
LEA RDI,[RBX + 0x30d]
LEA RAX,[0x148a00]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113220
XOR R14D,R14D
MOV byte ptr [RBX + 0x312],R14B
LEA RDI,[RBX + 0x10c]
LEA RAX,[0x148a10]
MOV RSI,qword ptr [RAX + 0x1b0]
MOV EDX,0x200
CALL 0x00113220
MOV byte ptr [RBX + 0x30b],R14B
MOV AL,0x1
JMP 0x0011fadb
LAB_0011facc:
MOV qword ptr [RBX + 0x48],RAX
JMP 0x0011fad9
LAB_0011fad2:
MOV qword ptr [R14],0x1
LAB_0011fad9:
XOR EAX,EAX
LAB_0011fadb:
POP RBX
POP R14
POP RBP
RET
|
int8 mysql_stmt_attr_set(long param_1,int param_2,ulong *param_3)
{
ulong uVar1;
if (param_2 < 200) {
if (param_2 == 0) {
*(char *)(param_1 + 0x313) = (char)*param_3;
}
else if (param_2 == 1) {
if (1 < *param_3) goto switchD_0011f9bc_caseD_cb;
*(ulong *)(param_1 + 0x48) = *param_3;
}
else {
if (param_2 != 2) {
switchD_0011f9bc_caseD_cb:
*(int4 *)(param_1 + 0x108) = 0x806;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
strncpy((char *)(param_1 + 0x10c),PTR_s_This_feature_is_not_implemented_o_00148bc0,0x200);
*(int1 *)(param_1 + 0x30b) = 0;
return 1;
}
if (*param_3 == 0) {
*param_3 = 1;
}
else {
*(ulong *)(param_1 + 0x318) = *param_3;
}
}
}
else {
switch(param_2) {
case 200:
if (*(int *)(param_1 + 0x50) != 0) {
mysql_stmt_internal_reset(param_1,1);
net_stmt_close(param_1,0);
*(int4 *)(param_1 + 0x50) = 0;
*(int8 *)(param_1 + 0x70) = 0;
}
uVar1 = *param_3;
*(int *)(param_1 + 100) = (int)uVar1;
*(int *)(param_1 + 0x378) = (int)uVar1;
break;
case 0xc9:
*(int *)(param_1 + 0x368) = (int)*param_3;
break;
case 0xca:
*(ulong *)(param_1 + 0x370) = *param_3;
break;
default:
goto switchD_0011f9bc_caseD_cb;
case 0xcc:
*(ulong **)(param_1 + 0x380) = param_3;
break;
case 0xcd:
*(ulong **)(param_1 + 0x390) = param_3;
break;
case 0xce:
*(ulong **)(param_1 + 0x388) = param_3;
}
}
return 0;
}
|
|
20,184
|
sp_get_polygon_mbr
|
eloqsql/storage/myisam/sp_key.c
|
static int sp_get_polygon_mbr(uchar *(*wkb), uchar *end, uint n_dims,
uchar byte_order, double *mbr)
{
uint n_linear_rings;
uint n_points;
n_linear_rings = uint4korr((*wkb));
(*wkb) += 4;
for (; n_linear_rings > 0; --n_linear_rings)
{
n_points = uint4korr((*wkb));
(*wkb) += 4;
for (; n_points > 0; --n_points)
{
/* Add next point to mbr */
if (sp_add_point_to_mbr(wkb, end, n_dims, byte_order, mbr))
return -1;
}
}
return 0;
}
|
O0
|
c
|
sp_get_polygon_mbr:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %cl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movb %al, -0x1d(%rbp)
movq %r8, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x4, %rcx
movq %rcx, (%rax)
cmpl $0x0, -0x2c(%rbp)
jbe 0xd741e
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl (%rax), %eax
movl %eax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x4, %rcx
movq %rcx, (%rax)
cmpl $0x0, -0x30(%rbp)
jbe 0xd7411
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
movb -0x1d(%rbp), %al
movq -0x28(%rbp), %r8
movzbl %al, %ecx
callq 0xd7430
cmpl $0x0, %eax
je 0xd7404
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xd7425
jmp 0xd7406
movl -0x30(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0xd73d6
jmp 0xd7413
movl -0x2c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xd73b6
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
|
sp_get_polygon_mbr_0:
push rbp
mov rbp, rsp
sub rsp, 30h
mov al, cl
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov [rbp+var_1D], al
mov [rbp+var_28], r8
mov rax, [rbp+var_10]
mov rax, [rax]
mov eax, [rax]
mov [rbp+var_2C], eax
mov rax, [rbp+var_10]
mov rcx, [rax]
add rcx, 4
mov [rax], rcx
loc_D73B6:
cmp [rbp+var_2C], 0
jbe short loc_D741E
mov rax, [rbp+var_10]
mov rax, [rax]
mov eax, [rax]
mov [rbp+var_30], eax
mov rax, [rbp+var_10]
mov rcx, [rax]
add rcx, 4
mov [rax], rcx
loc_D73D6:
cmp [rbp+var_30], 0
jbe short loc_D7411
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov edx, [rbp+var_1C]
mov al, [rbp+var_1D]
mov r8, [rbp+var_28]
movzx ecx, al
call sp_add_point_to_mbr_0
cmp eax, 0
jz short loc_D7404
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_D7425
loc_D7404:
jmp short $+2
loc_D7406:
mov eax, [rbp+var_30]
add eax, 0FFFFFFFFh
mov [rbp+var_30], eax
jmp short loc_D73D6
loc_D7411:
jmp short $+2
loc_D7413:
mov eax, [rbp+var_2C]
add eax, 0FFFFFFFFh
mov [rbp+var_2C], eax
jmp short loc_D73B6
loc_D741E:
mov [rbp+var_4], 0
loc_D7425:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
|
long long sp_get_polygon_mbr_0(_DWORD **a1, long long a2, unsigned int a3, unsigned __int8 a4, long long a5)
{
int j; // [rsp+0h] [rbp-30h]
int i; // [rsp+4h] [rbp-2Ch]
for ( i = *(*a1)++; i; --i )
{
for ( j = *(*a1)++; j; --j )
{
if ( (unsigned int)sp_add_point_to_mbr_0(a1, a2, a3, a4, a5) )
return (unsigned int)-1;
}
}
return 0;
}
|
sp_get_polygon_mbr:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV AL,CL
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV byte ptr [RBP + -0x1d],AL
MOV qword ptr [RBP + -0x28],R8
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x2c],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
ADD RCX,0x4
MOV qword ptr [RAX],RCX
LAB_001d73b6:
CMP dword ptr [RBP + -0x2c],0x0
JBE 0x001d741e
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x30],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
ADD RCX,0x4
MOV qword ptr [RAX],RCX
LAB_001d73d6:
CMP dword ptr [RBP + -0x30],0x0
JBE 0x001d7411
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV EDX,dword ptr [RBP + -0x1c]
MOV AL,byte ptr [RBP + -0x1d]
MOV R8,qword ptr [RBP + -0x28]
MOVZX ECX,AL
CALL 0x001d7430
CMP EAX,0x0
JZ 0x001d7404
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001d7425
LAB_001d7404:
JMP 0x001d7406
LAB_001d7406:
MOV EAX,dword ptr [RBP + -0x30]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x30],EAX
JMP 0x001d73d6
LAB_001d7411:
JMP 0x001d7413
LAB_001d7413:
MOV EAX,dword ptr [RBP + -0x2c]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x001d73b6
LAB_001d741e:
MOV dword ptr [RBP + -0x4],0x0
LAB_001d7425:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4
sp_get_polygon_mbr(long *param_1,int8 param_2,int4 param_3,int1 param_4,
int8 param_5)
{
int iVar1;
int local_38;
int local_34;
local_34 = *(int *)*param_1;
*param_1 = *param_1 + 4;
do {
if (local_34 == 0) {
return 0;
}
local_38 = *(int *)*param_1;
*param_1 = *param_1 + 4;
for (; local_38 != 0; local_38 = local_38 + -1) {
iVar1 = sp_add_point_to_mbr(param_1,param_2,param_3,param_4,param_5);
if (iVar1 != 0) {
return 0xffffffff;
}
}
local_34 = local_34 + -1;
} while( true );
}
|
|
20,185
|
file_write
|
tsotchke[P]eshkol/src/core/utils/file_io.c
|
size_t file_write(File* file, const void* buffer, size_t size) {
assert(buffer != NULL);
if (!file || !file->handle) {
set_last_error(FILE_ERROR_INVALID_HANDLE);
return (size_t)-1;
}
// Write to the file
size_t bytes_written = fwrite(buffer, 1, size, file->handle);
if (bytes_written != size) {
set_last_error(errno_to_file_error(errno));
return (size_t)-1;
}
set_last_error(FILE_ERROR_NONE);
return bytes_written;
}
|
O0
|
c
|
file_write:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x4b1d
jmp 0x4b3c
leaq 0x3328(%rip), %rdi # 0x7e4c
leaq 0x32a6(%rip), %rsi # 0x7dd1
movl $0xe4, %edx
leaq 0x334d(%rip), %rcx # 0x7e84
callq 0x2170
cmpq $0x0, -0x10(%rbp)
je 0x4b4d
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x4b61
movl $0x5, %edi
callq 0x4920
movq $-0x1, -0x8(%rbp)
jmp 0x4bb4
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rdx
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movl $0x1, %esi
callq 0x22d0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
je 0x4ba5
callq 0x2060
movl (%rax), %edi
callq 0x4940
movl %eax, %edi
callq 0x4920
movq $-0x1, -0x8(%rbp)
jmp 0x4bb4
xorl %edi, %edi
callq 0x4920
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nop
|
file_write:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
cmp [rbp+var_18], 0
jz short loc_4B1D
jmp short loc_4B3C
loc_4B1D:
lea rdi, aBufferNull; "buffer != NULL"
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
mov edx, 0E4h
lea rcx, aSizeTFileWrite; "size_t file_write(File *, const void *,"...
call ___assert_fail
loc_4B3C:
cmp [rbp+var_10], 0
jz short loc_4B4D
mov rax, [rbp+var_10]
cmp qword ptr [rax], 0
jnz short loc_4B61
loc_4B4D:
mov edi, 5
call set_last_error
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp short loc_4BB4
loc_4B61:
mov rdi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov rax, [rbp+var_10]
mov rcx, [rax]
mov esi, 1
call _fwrite
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
cmp rax, [rbp+var_20]
jz short loc_4BA5
call ___errno_location
mov edi, [rax]
call errno_to_file_error
mov edi, eax
call set_last_error
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp short loc_4BB4
loc_4BA5:
xor edi, edi
call set_last_error
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
loc_4BB4:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
|
long long file_write(_QWORD *a1, long long a2, long long a3)
{
int *v3; // rax
unsigned int v4; // eax
long long v6; // [rsp+8h] [rbp-28h]
if ( !a2 )
__assert_fail(
"buffer != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/file_io.c",
228LL,
"size_t file_write(File *, const void *, size_t)");
if ( a1 && *a1 )
{
v6 = fwrite(a2, 1LL, a3, *a1);
if ( v6 == a3 )
{
set_last_error(0);
return v6;
}
else
{
v3 = (int *)__errno_location();
v4 = errno_to_file_error(*v3);
set_last_error(v4);
return -1LL;
}
}
else
{
set_last_error(5u);
return -1LL;
}
}
|
file_write:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
CMP qword ptr [RBP + -0x18],0x0
JZ 0x00104b1d
JMP 0x00104b3c
LAB_00104b1d:
LEA RDI,[0x107e16]
LEA RSI,[0x107dad]
MOV EDX,0xe4
LEA RCX,[0x107e4e]
CALL 0x00102170
LAB_00104b3c:
CMP qword ptr [RBP + -0x10],0x0
JZ 0x00104b4d
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX],0x0
JNZ 0x00104b61
LAB_00104b4d:
MOV EDI,0x5
CALL 0x00104920
MOV qword ptr [RBP + -0x8],-0x1
JMP 0x00104bb4
LAB_00104b61:
MOV RDI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
MOV ESI,0x1
CALL 0x001022d0
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x20]
JZ 0x00104ba5
CALL 0x00102060
MOV EDI,dword ptr [RAX]
CALL 0x00104940
MOV EDI,EAX
CALL 0x00104920
MOV qword ptr [RBP + -0x8],-0x1
JMP 0x00104bb4
LAB_00104ba5:
XOR EDI,EDI
CALL 0x00104920
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
LAB_00104bb4:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
size_t file_write(long *param_1,void *param_2,size_t param_3)
{
int4 uVar1;
int *piVar2;
size_t local_10;
if (param_2 != (void *)0x0) {
if ((param_1 == (long *)0x0) || (*param_1 == 0)) {
set_last_error(5);
local_10 = 0xffffffffffffffff;
}
else {
local_10 = fwrite(param_2,1,param_3,(FILE *)*param_1);
if (local_10 == param_3) {
set_last_error(0);
}
else {
piVar2 = __errno_location();
uVar1 = errno_to_file_error(*piVar2);
set_last_error(uVar1);
local_10 = 0xffffffffffffffff;
}
}
return local_10;
}
/* WARNING: Subroutine does not return */
__assert_fail("buffer != NULL","/workspace/llm4binary/github2025/eshkol/src/core/utils/file_io.c",
0xe4,"size_t file_write(File *, const void *, size_t)");
}
|
|
20,186
|
file_write
|
tsotchke[P]eshkol/src/core/utils/file_io.c
|
size_t file_write(File* file, const void* buffer, size_t size) {
assert(buffer != NULL);
if (!file || !file->handle) {
set_last_error(FILE_ERROR_INVALID_HANDLE);
return (size_t)-1;
}
// Write to the file
size_t bytes_written = fwrite(buffer, 1, size, file->handle);
if (bytes_written != size) {
set_last_error(errno_to_file_error(errno));
return (size_t)-1;
}
set_last_error(FILE_ERROR_NONE);
return bytes_written;
}
|
O3
|
c
|
file_write:
pushq %rbx
testq %rsi, %rsi
je 0x417b
movl $0x5, %eax
testq %rdi, %rdi
je 0x4169
movq (%rdi), %rcx
testq %rcx, %rcx
je 0x4169
movq %rdx, %rbx
movq %rsi, %rdx
movl $0x1, %esi
movq %rdx, %rdi
movq %rbx, %rdx
callq 0x22c0
movq %rax, %rcx
xorl %eax, %eax
cmpq %rbx, %rcx
je 0x4170
callq 0x2060
movl (%rax), %edi
callq 0x4002
movq $-0x1, %rbx
movl %eax, 0x500e(%rip) # 0x9184
movq %rbx, %rax
popq %rbx
retq
leaq 0x2ca6(%rip), %rdi # 0x6e28
leaq 0x2c24(%rip), %rsi # 0x6dad
leaq 0x2cd0(%rip), %rcx # 0x6e60
movl $0xe4, %edx
callq 0x2170
|
file_write:
push rbx
test rsi, rsi
jz short loc_417B
mov eax, 5
test rdi, rdi
jz short loc_4169
mov rcx, [rdi]
test rcx, rcx
jz short loc_4169
mov rbx, rdx
mov rdx, rsi
mov esi, 1
mov rdi, rdx
mov rdx, rbx
call _fwrite
mov rcx, rax
xor eax, eax
cmp rcx, rbx
jz short loc_4170
call ___errno_location
mov edi, [rax]
call errno_to_file_error
loc_4169:
mov rbx, 0FFFFFFFFFFFFFFFFh
loc_4170:
mov cs:g_last_error, eax
mov rax, rbx
pop rbx
retn
loc_417B:
lea rdi, aBufferNull; "buffer != NULL"
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aSizeTFileWrite; "size_t file_write(File *, const void *,"...
mov edx, 0E4h
call ___assert_fail
|
long long file_write(_QWORD *a1, long long a2, long long a3)
{
int v3; // eax
long long v4; // rbx
long long v5; // rcx
unsigned int *v6; // rax
if ( !a2 )
__assert_fail(
"buffer != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/file_io.c",
228LL,
"size_t file_write(File *, const void *, size_t)");
v3 = 5;
if ( !a1 || !*a1 )
goto LABEL_6;
v4 = a3;
v5 = fwrite(a2, 1LL, a3, *a1);
v3 = 0;
if ( v5 != v4 )
{
v6 = (unsigned int *)__errno_location(a2);
v3 = errno_to_file_error(*v6);
LABEL_6:
v4 = -1LL;
}
g_last_error = v3;
return v4;
}
|
file_write:
PUSH RBX
TEST RSI,RSI
JZ 0x0010417b
MOV EAX,0x5
TEST RDI,RDI
JZ 0x00104169
MOV RCX,qword ptr [RDI]
TEST RCX,RCX
JZ 0x00104169
MOV RBX,RDX
MOV RDX,RSI
MOV ESI,0x1
MOV RDI,RDX
MOV RDX,RBX
CALL 0x001022c0
MOV RCX,RAX
XOR EAX,EAX
CMP RCX,RBX
JZ 0x00104170
CALL 0x00102060
MOV EDI,dword ptr [RAX]
CALL 0x00104002
LAB_00104169:
MOV RBX,-0x1
LAB_00104170:
MOV dword ptr [0x00109184],EAX
MOV RAX,RBX
POP RBX
RET
LAB_0010417b:
LEA RDI,[0x106e28]
LEA RSI,[0x106dad]
LEA RCX,[0x106e60]
MOV EDX,0xe4
CALL 0x00102170
|
size_t file_write(int8 *param_1,void *param_2,size_t param_3)
{
int4 uVar1;
size_t sVar2;
int *piVar3;
if (param_2 == (void *)0x0) {
/* WARNING: Subroutine does not return */
__assert_fail("buffer != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/file_io.c"
,0xe4,"size_t file_write(File *, const void *, size_t)");
}
uVar1 = 5;
if ((param_1 != (int8 *)0x0) && ((FILE *)*param_1 != (FILE *)0x0)) {
sVar2 = fwrite(param_2,1,param_3,(FILE *)*param_1);
if (sVar2 == param_3) {
g_last_error = 0;
return param_3;
}
piVar3 = __errno_location();
uVar1 = errno_to_file_error(*piVar3);
}
g_last_error = uVar1;
return 0xffffffffffffffff;
}
|
|
20,187
|
ps_fetch_int32
|
eloqsql/libmariadb/libmariadb/ma_stmt_codec.c
|
static
void ps_fetch_int32(MYSQL_BIND *r_param, const MYSQL_FIELD * const field,
unsigned char **row)
{
switch (r_param->buffer_type) {
/* case MYSQL_TYPE_TINY:
ps_fetch_from_1_to_8_bytes(r_param, field, row, 1);
break;
case MYSQL_TYPE_YEAR:
case MYSQL_TYPE_SHORT:
ps_fetch_from_1_to_8_bytes(r_param, field, row, 2);
break; */
case MYSQL_TYPE_INT24:
case MYSQL_TYPE_LONG:
ps_fetch_from_1_to_8_bytes(r_param, field, row, 4);
break;
default:
{
int32 sval= sint4korr(*row);
longlong lval= field->flags & UNSIGNED_FLAG ? (longlong)(uint32) sval : (longlong)sval;
convert_from_long(r_param, field, lval, field->flags & UNSIGNED_FLAG);
(*row) += 4;
}
break;
}
}
|
O3
|
c
|
ps_fetch_int32:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl 0x60(%rdi), %eax
cmpl $0x9, %eax
je 0x27391
cmpl $0x3, %eax
jne 0x273a4
movq %rbx, %rdx
movl $0x4, %ecx
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x26774
movq (%rbx), %rax
movslq (%rax), %rax
movl 0x64(%rsi), %ecx
andl $0x20, %ecx
movl %eax, %edx
cmoveq %rax, %rdx
callq 0x27e4f
addq $0x4, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
|
ps_fetch_int32:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdx
mov eax, [rdi+60h]
cmp eax, 9
jz short loc_27391
cmp eax, 3
jnz short loc_273A4
loc_27391:
mov rdx, rbx
mov ecx, 4
add rsp, 8
pop rbx
pop rbp
jmp ps_fetch_from_1_to_8_bytes
loc_273A4:
mov rax, [rbx]
movsxd rax, dword ptr [rax]
mov ecx, [rsi+64h]
and ecx, 20h
mov edx, eax
cmovz rdx, rax
call convert_from_long
add qword ptr [rbx], 4
add rsp, 8
pop rbx
pop rbp
retn
|
long long ps_fetch_int32(long long a1, long long a2, _BYTE **a3)
{
int v4; // eax
long long result; // rax
long long v6; // rdx
v4 = *(_DWORD *)(a1 + 96);
if ( v4 == 9 || v4 == 3 )
return ps_fetch_from_1_to_8_bytes(a1, a2, a3, 4u);
v6 = *(unsigned int *)*a3;
if ( (*(_DWORD *)(a2 + 100) & 0x20) == 0 )
v6 = *(int *)*a3;
result = convert_from_long(a1, a2, v6, *(_DWORD *)(a2 + 100) & 0x20);
*a3 += 4;
return result;
}
|
ps_fetch_int32:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV EAX,dword ptr [RDI + 0x60]
CMP EAX,0x9
JZ 0x00127391
CMP EAX,0x3
JNZ 0x001273a4
LAB_00127391:
MOV RDX,RBX
MOV ECX,0x4
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x00126774
LAB_001273a4:
MOV RAX,qword ptr [RBX]
MOVSXD RAX,dword ptr [RAX]
MOV ECX,dword ptr [RSI + 0x64]
AND ECX,0x20
MOV EDX,EAX
CMOVZ RDX,RAX
CALL 0x00127e4f
ADD qword ptr [RBX],0x4
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void ps_fetch_int32(long param_1,long param_2,long *param_3)
{
ulong uVar1;
if ((*(int *)(param_1 + 0x60) != 9) && (*(int *)(param_1 + 0x60) != 3)) {
uVar1 = (ulong)*(uint *)*param_3;
if ((*(uint *)(param_2 + 100) & 0x20) == 0) {
uVar1 = (long)(int)*(uint *)*param_3;
}
convert_from_long(param_1,param_2,uVar1);
*param_3 = *param_3 + 4;
return;
}
ps_fetch_from_1_to_8_bytes(param_1,param_2,param_3,4);
return;
}
|
|
20,188
|
string_buffer_putc
|
bluesky950520[P]quickjs/quickjs.c
|
static int string_buffer_putc(StringBuffer *s, uint32_t c)
{
if (unlikely(c >= 0x10000)) {
/* surrogate pair */
if (string_buffer_putc16(s, get_hi_surrogate(c)))
return -1;
c = get_lo_surrogate(c);
}
return string_buffer_putc16(s, c);
}
|
O0
|
c
|
string_buffer_putc:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movl %esi, 0x14(%rsp)
cmpl $0x10000, 0x14(%rsp) # imm = 0x10000
setae %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x4dae4
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movl 0x14(%rsp), %edi
callq 0x7e760
movq 0x8(%rsp), %rdi
movl %eax, %esi
callq 0x7e690
cmpl $0x0, %eax
je 0x4dad7
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
jmp 0x4daf6
movl 0x14(%rsp), %edi
callq 0x7e780
movl %eax, 0x14(%rsp)
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
callq 0x7e690
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nop
|
string_buffer_putc:
sub rsp, 28h
mov [rsp+28h+var_10], rdi
mov [rsp+28h+var_14], esi
cmp [rsp+28h+var_14], 10000h
setnb al
xor al, 0FFh
xor al, 0FFh
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_4DAE4
mov rax, [rsp+28h+var_10]
mov [rsp+28h+var_20], rax
mov edi, [rsp+28h+var_14]
call get_hi_surrogate_0
mov rdi, [rsp+28h+var_20]
mov esi, eax
call string_buffer_putc16
cmp eax, 0
jz short loc_4DAD7
mov [rsp+28h+var_4], 0FFFFFFFFh
jmp short loc_4DAF6
loc_4DAD7:
mov edi, [rsp+28h+var_14]
call get_lo_surrogate_0
mov [rsp+28h+var_14], eax
loc_4DAE4:
mov rdi, [rsp+28h+var_10]
mov esi, [rsp+28h+var_14]
call string_buffer_putc16
mov [rsp+28h+var_4], eax
loc_4DAF6:
mov eax, [rsp+28h+var_4]
add rsp, 28h
retn
|
long long string_buffer_putc(long long a1, unsigned int a2)
{
unsigned int hi_surrogate_0; // eax
unsigned int lo_surrogate_0; // [rsp+14h] [rbp-14h]
lo_surrogate_0 = a2;
if ( a2 < 0x10000 )
return (unsigned int)string_buffer_putc16(a1, lo_surrogate_0);
hi_surrogate_0 = get_hi_surrogate_0(a2);
if ( !(unsigned int)string_buffer_putc16(a1, hi_surrogate_0) )
{
lo_surrogate_0 = get_lo_surrogate_0(a2);
return (unsigned int)string_buffer_putc16(a1, lo_surrogate_0);
}
return (unsigned int)-1;
}
|
string_buffer_putc:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RDI
MOV dword ptr [RSP + 0x14],ESI
CMP dword ptr [RSP + 0x14],0x10000
SETNC AL
XOR AL,0xff
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x0014dae4
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x8],RAX
MOV EDI,dword ptr [RSP + 0x14]
CALL 0x0017e760
MOV RDI,qword ptr [RSP + 0x8]
MOV ESI,EAX
CALL 0x0017e690
CMP EAX,0x0
JZ 0x0014dad7
MOV dword ptr [RSP + 0x24],0xffffffff
JMP 0x0014daf6
LAB_0014dad7:
MOV EDI,dword ptr [RSP + 0x14]
CALL 0x0017e780
MOV dword ptr [RSP + 0x14],EAX
LAB_0014dae4:
MOV RDI,qword ptr [RSP + 0x18]
MOV ESI,dword ptr [RSP + 0x14]
CALL 0x0017e690
MOV dword ptr [RSP + 0x24],EAX
LAB_0014daf6:
MOV EAX,dword ptr [RSP + 0x24]
ADD RSP,0x28
RET
|
int4 string_buffer_putc(int8 param_1,uint param_2)
{
int4 uVar1;
int iVar2;
uint local_14;
local_14 = param_2;
if (0xffff < param_2) {
uVar1 = get_hi_surrogate(param_2);
iVar2 = string_buffer_putc16(param_1,uVar1);
if (iVar2 != 0) {
return 0xffffffff;
}
local_14 = get_lo_surrogate(param_2);
}
uVar1 = string_buffer_putc16(param_1,local_14);
return uVar1;
}
|
|
20,189
|
string_buffer_putc
|
bluesky950520[P]quickjs/quickjs.c
|
static int string_buffer_putc(StringBuffer *s, uint32_t c)
{
if (unlikely(c >= 0x10000)) {
/* surrogate pair */
if (string_buffer_putc16(s, get_hi_surrogate(c)))
return -1;
c = get_lo_surrogate(c);
}
return string_buffer_putc16(s, c);
}
|
O1
|
c
|
string_buffer_putc:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
cmpl $0x10000, %esi # imm = 0x10000
jae 0x33412
movq %r14, %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x477df
movl %ebx, %esi
shrl $0xa, %esi
addl $0xd7c0, %esi # imm = 0xD7C0
movq %r14, %rdi
callq 0x477df
testl %eax, %eax
je 0x33436
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
retq
andl $0x3ff, %ebx # imm = 0x3FF
orl $0xdc00, %ebx # imm = 0xDC00
jmp 0x33401
|
string_buffer_putc:
push r14
push rbx
push rax
mov ebx, esi
mov r14, rdi
cmp esi, 10000h
jnb short loc_33412
loc_33401:
mov rdi, r14
mov esi, ebx
add rsp, 8
pop rbx
pop r14
jmp string_buffer_putc16
loc_33412:
mov esi, ebx
shr esi, 0Ah
add esi, 0D7C0h
mov rdi, r14
call string_buffer_putc16
test eax, eax
jz short loc_33436
mov eax, 0FFFFFFFFh
add rsp, 8
pop rbx
pop r14
retn
loc_33436:
and ebx, 3FFh
or ebx, 0DC00h
jmp short loc_33401
|
long long string_buffer_putc(long long a1, unsigned int a2)
{
unsigned int v2; // ebx
v2 = a2;
if ( a2 < 0x10000 )
return string_buffer_putc16(a1, v2);
if ( !(unsigned int)string_buffer_putc16(a1, (a2 >> 10) + 55232) )
{
v2 = a2 & 0x3FF | 0xDC00;
return string_buffer_putc16(a1, v2);
}
return 0xFFFFFFFFLL;
}
| |||
20,190
|
string_buffer_putc
|
bluesky950520[P]quickjs/quickjs.c
|
static int string_buffer_putc(StringBuffer *s, uint32_t c)
{
if (unlikely(c >= 0x10000)) {
/* surrogate pair */
if (string_buffer_putc16(s, get_hi_surrogate(c)))
return -1;
c = get_lo_surrogate(c);
}
return string_buffer_putc16(s, c);
}
|
O2
|
c
|
string_buffer_putc:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
cmpl $0x10000, %esi # imm = 0x10000
jae 0x2caa4
movq %r14, %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3dcf6
movl %ebx, %esi
shrl $0xa, %esi
addl $0xd7c0, %esi # imm = 0xD7C0
movq %r14, %rdi
callq 0x3dcf6
testl %eax, %eax
je 0x2cac6
pushq $-0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
andl $0x3ff, %ebx # imm = 0x3FF
orl $0xdc00, %ebx # imm = 0xDC00
jmp 0x2ca93
|
string_buffer_putc:
push r14
push rbx
push rax
mov ebx, esi
mov r14, rdi
cmp esi, 10000h
jnb short loc_2CAA4
loc_2CA93:
mov rdi, r14
mov esi, ebx
add rsp, 8
pop rbx
pop r14
jmp string_buffer_putc16
loc_2CAA4:
mov esi, ebx
shr esi, 0Ah
add esi, 0D7C0h
mov rdi, r14
call string_buffer_putc16
test eax, eax
jz short loc_2CAC6
push 0FFFFFFFFFFFFFFFFh
pop rax
add rsp, 8
pop rbx
pop r14
retn
loc_2CAC6:
and ebx, 3FFh
or ebx, 0DC00h
jmp short loc_2CA93
|
long long string_buffer_putc(long long a1, unsigned int a2)
{
unsigned int v2; // ebx
v2 = a2;
if ( a2 < 0x10000 )
return string_buffer_putc16(a1, v2);
if ( !(unsigned int)string_buffer_putc16(a1, (a2 >> 10) + 55232) )
{
v2 = a2 & 0x3FF | 0xDC00;
return string_buffer_putc16(a1, v2);
}
return -1LL;
}
|
string_buffer_putc:
PUSH R14
PUSH RBX
PUSH RAX
MOV EBX,ESI
MOV R14,RDI
CMP ESI,0x10000
JNC 0x0012caa4
LAB_0012ca93:
MOV RDI,R14
MOV ESI,EBX
ADD RSP,0x8
POP RBX
POP R14
JMP 0x0013dcf6
LAB_0012caa4:
MOV ESI,EBX
SHR ESI,0xa
ADD ESI,0xd7c0
MOV RDI,R14
CALL 0x0013dcf6
TEST EAX,EAX
JZ 0x0012cac6
PUSH -0x1
POP RAX
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_0012cac6:
AND EBX,0x3ff
OR EBX,0xdc00
JMP 0x0012ca93
|
int8 string_buffer_putc(int8 param_1,uint param_2)
{
int iVar1;
int8 uVar2;
if (0xffff < param_2) {
iVar1 = string_buffer_putc16(param_1,(param_2 >> 10) + 0xd7c0);
if (iVar1 != 0) {
return 0xffffffffffffffff;
}
param_2 = param_2 & 0x3ff | 0xdc00;
}
uVar2 = string_buffer_putc16(param_1,param_2);
return uVar2;
}
|
|
20,191
|
minja::ExpressionNode::~ExpressionNode()
|
monkey531[P]llama/common/minja.hpp
|
ExpressionNode(const Location & location, std::shared_ptr<Expression> && e) : TemplateNode(location), expr(std::move(e)) {}
|
O1
|
cpp
|
minja::ExpressionNode::~ExpressionNode():
pushq %rbx
movq %rdi, %rbx
leaq 0x6b6d3(%rip), %rax # 0xee428
addq $0x10, %rax
movq %rax, (%rdi)
movq 0x28(%rdi), %rdi
testq %rdi, %rdi
je 0x82d6a
callq 0x42d00
leaq 0x6b3d7(%rip), %rax # 0xee148
addq $0x10, %rax
movq %rax, (%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x82d87
popq %rbx
jmp 0x42d00
popq %rbx
retq
nop
|
_ZN5minja14ExpressionNodeD2Ev:
push rbx
mov rbx, rdi
lea rax, _ZTVN5minja14ExpressionNodeE; `vtable for'minja::ExpressionNode
add rax, 10h
mov [rdi], rax
mov rdi, [rdi+28h]
test rdi, rdi
jz short loc_82D6A
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_82D6A:
lea rax, _ZTVN5minja12TemplateNodeE; `vtable for'minja::TemplateNode
add rax, 10h
mov [rbx], rax
mov rdi, [rbx+10h]
test rdi, rdi
jz short loc_82D87
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_82D87:
pop rbx
retn
|
void minja::ExpressionNode::~ExpressionNode(minja::ExpressionNode *this)
{
volatile signed __int32 *v2; // rdi
volatile signed __int32 *v3; // rdi
*(_QWORD *)this = &`vtable for'minja::ExpressionNode + 2;
v2 = (volatile signed __int32 *)*((_QWORD *)this + 5);
if ( v2 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v2);
*(_QWORD *)this = &`vtable for'minja::TemplateNode + 2;
v3 = (volatile signed __int32 *)*((_QWORD *)this + 2);
if ( v3 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3);
}
|
~ExpressionNode:
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x1ee428]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0x28]
TEST RDI,RDI
JZ 0x00182d6a
CALL 0x00142d00
LAB_00182d6a:
LEA RAX,[0x1ee148]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
MOV RDI,qword ptr [RBX + 0x10]
TEST RDI,RDI
JZ 0x00182d87
POP RBX
JMP 0x00142d00
LAB_00182d87:
POP RBX
RET
|
/* minja::ExpressionNode::~ExpressionNode() */
void __thiscall minja::ExpressionNode::~ExpressionNode(ExpressionNode *this)
{
*(int ***)this = &PTR_do_render_001ee438;
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_001ee158;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x10) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x10));
return;
}
return;
}
|
|
20,192
|
minja::ExpressionNode::~ExpressionNode()
|
monkey531[P]llama/common/minja.hpp
|
ExpressionNode(const Location & location, std::shared_ptr<Expression> && e) : TemplateNode(location), expr(std::move(e)) {}
|
O2
|
cpp
|
minja::ExpressionNode::~ExpressionNode():
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
callq 0x6ef5e
leaq 0x6a2d2(%rip), %rax # 0xdb438
addq $0x10, %rax
movq %rax, (%r14)
andq $0x0, 0x28(%r14)
movups (%rbx), %xmm0
andq $0x0, 0x8(%rbx)
movups %xmm0, 0x20(%r14)
andq $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
|
_ZN5minja14ExpressionNodeC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEE:
push r14
push rbx
push rax
mov rbx, rdx
mov r14, rdi
call _ZN5minja12TemplateNodeC2ERKNS_8LocationE; minja::TemplateNode::TemplateNode(minja::Location const&)
lea rax, _ZTVN5minja14ExpressionNodeE; `vtable for'minja::ExpressionNode
add rax, 10h
mov [r14], rax
and qword ptr [r14+28h], 0
movups xmm0, xmmword ptr [rbx]
and qword ptr [rbx+8], 0
movups xmmword ptr [r14+20h], xmm0
and qword ptr [rbx], 0
add rsp, 8
pop rbx
pop r14
retn
|
long long * minja::ExpressionNode::ExpressionNode(long long a1, _QWORD *a2, __int128 *a3)
{
long long *result; // rax
__int128 v5; // xmm0
minja::TemplateNode::TemplateNode((_QWORD *)a1, a2);
result = &`vtable for'minja::ExpressionNode + 2;
*(_QWORD *)a1 = &`vtable for'minja::ExpressionNode + 2;
*(_QWORD *)(a1 + 40) = 0LL;
v5 = *a3;
*((_QWORD *)a3 + 1) = 0LL;
*(_OWORD *)(a1 + 32) = v5;
*(_QWORD *)a3 = 0LL;
return result;
}
|
ExpressionNode:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV R14,RDI
CALL 0x0016ef5e
LEA RAX,[0x1db438]
ADD RAX,0x10
MOV qword ptr [R14],RAX
AND qword ptr [R14 + 0x28],0x0
MOVUPS XMM0,xmmword ptr [RBX]
AND qword ptr [RBX + 0x8],0x0
MOVUPS xmmword ptr [R14 + 0x20],XMM0
AND qword ptr [RBX],0x0
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* minja::ExpressionNode::ExpressionNode(minja::Location const&,
std::shared_ptr<minja::Expression>&&) */
void __thiscall
minja::ExpressionNode::ExpressionNode(ExpressionNode *this,Location *param_1,shared_ptr *param_2)
{
int8 uVar1;
TemplateNode::TemplateNode((TemplateNode *)this,param_1);
*(int ***)this = &PTR_do_render_001db448;
*(int8 *)(this + 0x28) = 0;
uVar1 = *(int8 *)(param_2 + 8);
*(int8 *)(param_2 + 8) = 0;
*(int8 *)(this + 0x20) = *(int8 *)param_2;
*(int8 *)(this + 0x28) = uVar1;
*(int8 *)param_2 = 0;
return;
}
|
|
20,193
|
ggml_rope_impl
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c
|
static struct ggml_tensor * ggml_rope_impl(
struct ggml_context * ctx,
struct ggml_tensor * a,
struct ggml_tensor * b,
struct ggml_tensor * c,
int n_dims,
int mode,
int n_ctx_orig,
float freq_base,
float freq_scale,
float ext_factor,
float attn_factor,
float beta_fast,
float beta_slow,
bool inplace) {
GGML_ASSERT((mode & 1) == 0 && "mode & 1 == 1 is no longer supported");
GGML_ASSERT(ggml_is_vector(b));
GGML_ASSERT(b->type == GGML_TYPE_I32);
GGML_ASSERT(a->ne[2] == b->ne[0]);
if (c) {
GGML_ASSERT(c->type == GGML_TYPE_F32);
GGML_ASSERT(c->ne[0] >= n_dims / 2);
}
int sections[4] = {0, 0, 0, 0};
struct ggml_tensor * result = inplace ? ggml_view_tensor(ctx, a) : ggml_dup_tensor(ctx, a);
int32_t params[15] = { /*n_past*/ 0, n_dims, mode, /*n_ctx*/ 0, n_ctx_orig };
memcpy(params + 5, &freq_base, sizeof(float));
memcpy(params + 6, &freq_scale, sizeof(float));
memcpy(params + 7, &ext_factor, sizeof(float));
memcpy(params + 8, &attn_factor, sizeof(float));
memcpy(params + 9, &beta_fast, sizeof(float));
memcpy(params + 10, &beta_slow, sizeof(float));
memcpy(params + 11, §ions, sizeof(int)*4);
ggml_set_op_params(result, params, sizeof(params));
result->op = GGML_OP_ROPE;
result->src[0] = a;
result->src[1] = b;
result->src[2] = c;
return result;
}
|
O0
|
c
|
ggml_rope_impl:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movb 0x18(%rbp), %al
movl 0x10(%rbp), %r10d
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movl %r9d, -0x28(%rbp)
movss %xmm0, -0x2c(%rbp)
movss %xmm1, -0x30(%rbp)
movss %xmm2, -0x34(%rbp)
movss %xmm3, -0x38(%rbp)
movss %xmm4, -0x3c(%rbp)
movss %xmm5, -0x40(%rbp)
andb $0x1, %al
movb %al, -0x41(%rbp)
movl -0x28(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x50d10
movb $0x1, %al
testb $0x1, %al
jne 0x50d31
jmp 0x50d10
leaq 0x608a0(%rip), %rdi # 0xb15b7
movl $0xdac, %esi # imm = 0xDAC
leaq 0x608e6(%rip), %rdx # 0xb1609
leaq 0x60f24(%rip), %rcx # 0xb1c4e
movb $0x0, %al
callq 0x48a00
movq -0x18(%rbp), %rdi
callq 0x483a0
testb $0x1, %al
jne 0x50d5f
leaq 0x60872(%rip), %rdi # 0xb15b7
movl $0xdae, %esi # imm = 0xDAE
leaq 0x608b8(%rip), %rdx # 0xb1609
leaq 0x60f30(%rip), %rcx # 0xb1c88
movb $0x0, %al
callq 0x48a00
movq -0x18(%rbp), %rax
cmpl $0x1a, (%rax)
je 0x50d89
leaq 0x60848(%rip), %rdi # 0xb15b7
movl $0xdaf, %esi # imm = 0xDAF
leaq 0x6088e(%rip), %rdx # 0xb1609
leaq 0x60e54(%rip), %rcx # 0xb1bd6
movb $0x0, %al
callq 0x48a00
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x18(%rbp), %rcx
cmpq 0x10(%rcx), %rax
je 0x50dbc
leaq 0x60815(%rip), %rdi # 0xb15b7
movl $0xdb0, %esi # imm = 0xDB0
leaq 0x6085b(%rip), %rdx # 0xb1609
leaq 0x60f15(%rip), %rcx # 0xb1cca
movb $0x0, %al
callq 0x48a00
cmpq $0x0, -0x20(%rbp)
je 0x50e3b
movq -0x20(%rbp), %rax
cmpl $0x0, (%rax)
je 0x50ded
leaq 0x607e4(%rip), %rdi # 0xb15b7
movl $0xdb3, %esi # imm = 0xDB3
leaq 0x6082a(%rip), %rdx # 0xb1609
leaq 0x61b5f(%rip), %rcx # 0xb2945
movb $0x0, %al
callq 0x48a00
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0xb8(%rbp)
movl -0x24(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0xb8(%rbp), %rax
movslq %ecx, %rcx
cmpq %rcx, %rax
jge 0x50e39
leaq 0x60798(%rip), %rdi # 0xb15b7
movl $0xdb4, %esi # imm = 0xDB4
leaq 0x607de(%rip), %rdx # 0xb1609
leaq 0x60e81(%rip), %rcx # 0xb1cb3
movb $0x0, %al
callq 0x48a00
jmp 0x50e3b
leaq -0x60(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x44050
testb $0x1, -0x41(%rbp)
je 0x50e67
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x428f0
movq %rax, -0xc0(%rbp)
jmp 0x50e7b
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x45d90
movq %rax, -0xc0(%rbp)
movq -0xc0(%rbp), %rax
movq %rax, -0x68(%rbp)
leaq -0xb0(%rbp), %rdi
xorl %esi, %esi
movl $0x3c, %edx
callq 0x44050
movl -0x24(%rbp), %eax
movl %eax, -0xac(%rbp)
movl -0x28(%rbp), %eax
movl %eax, -0xa8(%rbp)
movl 0x10(%rbp), %eax
movl %eax, -0xa0(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x9c(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x98(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x94(%rbp)
movl -0x38(%rbp), %eax
movl %eax, -0x90(%rbp)
movl -0x3c(%rbp), %eax
movl %eax, -0x8c(%rbp)
movl -0x40(%rbp), %eax
movl %eax, -0x88(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x84(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x7c(%rbp)
movq -0x68(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
movl $0x3c, %edx
callq 0x4e370
movq -0x68(%rbp), %rax
movl $0x2c, 0x50(%rax)
movq -0x10(%rbp), %rcx
movq -0x68(%rbp), %rax
movq %rcx, 0x98(%rax)
movq -0x18(%rbp), %rcx
movq -0x68(%rbp), %rax
movq %rcx, 0xa0(%rax)
movq -0x20(%rbp), %rcx
movq -0x68(%rbp), %rax
movq %rcx, 0xa8(%rax)
movq -0x68(%rbp), %rax
addq $0xc0, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
ggml_rope_impl:
push rbp
mov rbp, rsp
sub rsp, 0C0h
mov al, [rbp+arg_8]
mov r10d, [rbp+arg_0]
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_24], r8d
mov [rbp+var_28], r9d
movss [rbp+var_2C], xmm0
movss [rbp+var_30], xmm1
movss [rbp+var_34], xmm2
movss [rbp+var_38], xmm3
movss [rbp+var_3C], xmm4
movss [rbp+var_40], xmm5
and al, 1
mov [rbp+var_41], al
mov eax, [rbp+var_28]
and eax, 1
cmp eax, 0
jnz short loc_50D10
mov al, 1
test al, 1
jnz short loc_50D31
jmp short $+2
loc_50D10:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov esi, 0DACh
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aMode10Mode11Is; "(mode & 1) == 0 && \"mode & 1 == 1 is n"...
mov al, 0
call _ggml_abort
loc_50D31:
mov rdi, [rbp+var_18]
call _ggml_is_vector
test al, 1
jnz short loc_50D5F
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov esi, 0DAEh
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlIsVectorB; "ggml_is_vector(b)"
mov al, 0
call _ggml_abort
loc_50D5F:
mov rax, [rbp+var_18]
cmp dword ptr [rax], 1Ah
jz short loc_50D89
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov esi, 0DAFh
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlIsMatrixAG+2Ah; "b->type == GGML_TYPE_I32"
mov al, 0
call _ggml_abort
loc_50D89:
mov rax, [rbp+var_10]
mov rax, [rax+20h]
mov rcx, [rbp+var_18]
cmp rax, [rcx+10h]
jz short loc_50DBC
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov esi, 0DB0h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aANe2BNe0; "a->ne[2] == b->ne[0]"
mov al, 0
call _ggml_abort
loc_50DBC:
cmp [rbp+var_20], 0
jz short loc_50E3B
mov rax, [rbp+var_20]
cmp dword ptr [rax], 0
jz short loc_50DED
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov esi, 0DB3h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGradAccTypeGgm+7; "c->type == GGML_TYPE_F32"
mov al, 0
call _ggml_abort
loc_50DED:
mov rax, [rbp+var_20]
mov rax, [rax+10h]
mov [rbp+var_B8], rax
mov eax, [rbp+var_24]
mov ecx, 2
cdq
idiv ecx
mov ecx, eax
mov rax, [rbp+var_B8]
movsxd rcx, ecx
cmp rax, rcx
jge short loc_50E39
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov esi, 0DB4h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aCNe0NDims2; "c->ne[0] >= n_dims / 2"
mov al, 0
call _ggml_abort
loc_50E39:
jmp short $+2
loc_50E3B:
lea rdi, [rbp+var_60]
xor esi, esi
mov edx, 10h
call _memset
test [rbp+var_41], 1
jz short loc_50E67
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
call _ggml_view_tensor
mov [rbp+var_C0], rax
jmp short loc_50E7B
loc_50E67:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
call _ggml_dup_tensor
mov [rbp+var_C0], rax
loc_50E7B:
mov rax, [rbp+var_C0]
mov [rbp+var_68], rax
lea rdi, [rbp+var_B0]
xor esi, esi
mov edx, 3Ch ; '<'
call _memset
mov eax, [rbp+var_24]
mov [rbp+var_AC], eax
mov eax, [rbp+var_28]
mov [rbp+var_A8], eax
mov eax, [rbp+arg_0]
mov [rbp+var_A0], eax
mov eax, [rbp+var_2C]
mov [rbp+var_9C], eax
mov eax, [rbp+var_30]
mov [rbp+var_98], eax
mov eax, [rbp+var_34]
mov [rbp+var_94], eax
mov eax, [rbp+var_38]
mov [rbp+var_90], eax
mov eax, [rbp+var_3C]
mov [rbp+var_8C], eax
mov eax, [rbp+var_40]
mov [rbp+var_88], eax
mov rax, [rbp+var_60]
mov [rbp+var_84], rax
mov rax, [rbp+var_58]
mov [rbp+var_7C], rax
mov rdi, [rbp+var_68]
lea rsi, [rbp+var_B0]
mov edx, 3Ch ; '<'
call ggml_set_op_params
mov rax, [rbp+var_68]
mov dword ptr [rax+50h], 2Ch ; ','
mov rcx, [rbp+var_10]
mov rax, [rbp+var_68]
mov [rax+98h], rcx
mov rcx, [rbp+var_18]
mov rax, [rbp+var_68]
mov [rax+0A0h], rcx
mov rcx, [rbp+var_20]
mov rax, [rbp+var_68]
mov [rax+0A8h], rcx
mov rax, [rbp+var_68]
add rsp, 0C0h
pop rbp
retn
|
long long ggml_rope_impl(
long long a1,
unsigned int *a2,
_QWORD *a3,
long long a4,
int a5,
int a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
float a11,
float a12,
__m128 a13,
__m128 a14,
int a15,
char a16)
{
double v16; // xmm4_8
double v17; // xmm5_8
long long v19; // [rsp+0h] [rbp-C0h]
_BYTE v20[4]; // [rsp+10h] [rbp-B0h] BYREF
int v21; // [rsp+14h] [rbp-ACh]
int v22; // [rsp+18h] [rbp-A8h]
int v23; // [rsp+20h] [rbp-A0h]
__int32 v24; // [rsp+24h] [rbp-9Ch]
__int32 v25; // [rsp+28h] [rbp-98h]
__int32 v26; // [rsp+2Ch] [rbp-94h]
__int32 v27; // [rsp+30h] [rbp-90h]
float v28; // [rsp+34h] [rbp-8Ch]
float v29; // [rsp+38h] [rbp-88h]
long long v30; // [rsp+3Ch] [rbp-84h]
long long v31; // [rsp+44h] [rbp-7Ch]
long long v32; // [rsp+58h] [rbp-68h]
_QWORD v33[3]; // [rsp+60h] [rbp-60h] BYREF
char v34; // [rsp+7Fh] [rbp-41h]
float v35; // [rsp+80h] [rbp-40h]
float v36; // [rsp+84h] [rbp-3Ch]
__int32 v37; // [rsp+88h] [rbp-38h]
__int32 v38; // [rsp+8Ch] [rbp-34h]
__int32 v39; // [rsp+90h] [rbp-30h]
__int32 v40; // [rsp+94h] [rbp-2Ch]
int v41; // [rsp+98h] [rbp-28h]
int v42; // [rsp+9Ch] [rbp-24h]
long long v43; // [rsp+A0h] [rbp-20h]
_QWORD *v44; // [rsp+A8h] [rbp-18h]
unsigned int *v45; // [rsp+B0h] [rbp-10h]
long long v46; // [rsp+B8h] [rbp-8h]
v46 = a1;
v45 = a2;
v44 = a3;
v43 = a4;
v42 = a5;
v41 = a6;
v40 = a7.m128_i32[0];
v39 = a8.m128_i32[0];
v38 = a9.m128_i32[0];
v37 = a10.m128_i32[0];
v36 = a11;
v35 = a12;
v34 = a16 & 1;
if ( (a6 & 1) != 0 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
3500,
(long long)"GGML_ASSERT(%s) failed",
"(mode & 1) == 0 && \"mode & 1 == 1 is no longer supported\"");
if ( !ggml_is_vector(v44) )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
3502,
(long long)"GGML_ASSERT(%s) failed",
"ggml_is_vector(b)");
if ( *(_DWORD *)v44 != 26 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
3503,
(long long)"GGML_ASSERT(%s) failed",
"b->type == GGML_TYPE_I32");
if ( *((_QWORD *)v45 + 4) != v44[2] )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
3504,
(long long)"GGML_ASSERT(%s) failed",
"a->ne[2] == b->ne[0]");
if ( v43 )
{
if ( *(_DWORD *)v43 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
3507,
(long long)"GGML_ASSERT(%s) failed",
"c->type == GGML_TYPE_F32");
if ( *(_QWORD *)(v43 + 16) < v42 / 2 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
3508,
(long long)"GGML_ASSERT(%s) failed",
"c->ne[0] >= n_dims / 2");
}
memset(v33, 0LL, 16LL);
if ( (v34 & 1) != 0 )
v19 = (long long)ggml_view_tensor(v46, (long long)v45, a7, a8, a9, a10, v16, v17, a13, a14);
else
v19 = ggml_dup_tensor(v46, v45);
v32 = v19;
memset(v20, 0LL, 60LL);
v21 = v42;
v22 = v41;
v23 = a15;
v24 = v40;
v25 = v39;
v26 = v38;
v27 = v37;
v28 = v36;
v29 = v35;
v30 = v33[0];
v31 = v33[1];
ggml_set_op_params(v32, (long long)v20, 0x3CuLL);
*(_DWORD *)(v32 + 80) = 44;
*(_QWORD *)(v32 + 152) = v45;
*(_QWORD *)(v32 + 160) = v44;
*(_QWORD *)(v32 + 168) = v43;
return v32;
}
|
ggml_rope_impl:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xc0
MOV AL,byte ptr [RBP + 0x18]
MOV R10D,dword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV dword ptr [RBP + -0x24],R8D
MOV dword ptr [RBP + -0x28],R9D
MOVSS dword ptr [RBP + -0x2c],XMM0
MOVSS dword ptr [RBP + -0x30],XMM1
MOVSS dword ptr [RBP + -0x34],XMM2
MOVSS dword ptr [RBP + -0x38],XMM3
MOVSS dword ptr [RBP + -0x3c],XMM4
MOVSS dword ptr [RBP + -0x40],XMM5
AND AL,0x1
MOV byte ptr [RBP + -0x41],AL
MOV EAX,dword ptr [RBP + -0x28]
AND EAX,0x1
CMP EAX,0x0
JNZ 0x00150d10
MOV AL,0x1
TEST AL,0x1
JNZ 0x00150d31
JMP 0x00150d10
LAB_00150d10:
LEA RDI,[0x1b15b7]
MOV ESI,0xdac
LEA RDX,[0x1b1609]
LEA RCX,[0x1b1c4e]
MOV AL,0x0
CALL 0x00148a00
LAB_00150d31:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001483a0
TEST AL,0x1
JNZ 0x00150d5f
LEA RDI,[0x1b15b7]
MOV ESI,0xdae
LEA RDX,[0x1b1609]
LEA RCX,[0x1b1c88]
MOV AL,0x0
CALL 0x00148a00
LAB_00150d5f:
MOV RAX,qword ptr [RBP + -0x18]
CMP dword ptr [RAX],0x1a
JZ 0x00150d89
LEA RDI,[0x1b15b7]
MOV ESI,0xdaf
LEA RDX,[0x1b1609]
LEA RCX,[0x1b1bd6]
MOV AL,0x0
CALL 0x00148a00
LAB_00150d89:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x20]
MOV RCX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RCX + 0x10]
JZ 0x00150dbc
LEA RDI,[0x1b15b7]
MOV ESI,0xdb0
LEA RDX,[0x1b1609]
LEA RCX,[0x1b1cca]
MOV AL,0x0
CALL 0x00148a00
LAB_00150dbc:
CMP qword ptr [RBP + -0x20],0x0
JZ 0x00150e3b
MOV RAX,qword ptr [RBP + -0x20]
CMP dword ptr [RAX],0x0
JZ 0x00150ded
LEA RDI,[0x1b15b7]
MOV ESI,0xdb3
LEA RDX,[0x1b1609]
LEA RCX,[0x1b2945]
MOV AL,0x0
CALL 0x00148a00
LAB_00150ded:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0xb8],RAX
MOV EAX,dword ptr [RBP + -0x24]
MOV ECX,0x2
CDQ
IDIV ECX
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0xb8]
MOVSXD RCX,ECX
CMP RAX,RCX
JGE 0x00150e39
LEA RDI,[0x1b15b7]
MOV ESI,0xdb4
LEA RDX,[0x1b1609]
LEA RCX,[0x1b1cb3]
MOV AL,0x0
CALL 0x00148a00
LAB_00150e39:
JMP 0x00150e3b
LAB_00150e3b:
LEA RDI,[RBP + -0x60]
XOR ESI,ESI
MOV EDX,0x10
CALL 0x00144050
TEST byte ptr [RBP + -0x41],0x1
JZ 0x00150e67
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x001428f0
MOV qword ptr [RBP + -0xc0],RAX
JMP 0x00150e7b
LAB_00150e67:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x00145d90
MOV qword ptr [RBP + -0xc0],RAX
LAB_00150e7b:
MOV RAX,qword ptr [RBP + -0xc0]
MOV qword ptr [RBP + -0x68],RAX
LEA RDI,[RBP + -0xb0]
XOR ESI,ESI
MOV EDX,0x3c
CALL 0x00144050
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0xac],EAX
MOV EAX,dword ptr [RBP + -0x28]
MOV dword ptr [RBP + -0xa8],EAX
MOV EAX,dword ptr [RBP + 0x10]
MOV dword ptr [RBP + -0xa0],EAX
MOV EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0x9c],EAX
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x98],EAX
MOV EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x94],EAX
MOV EAX,dword ptr [RBP + -0x38]
MOV dword ptr [RBP + -0x90],EAX
MOV EAX,dword ptr [RBP + -0x3c]
MOV dword ptr [RBP + -0x8c],EAX
MOV EAX,dword ptr [RBP + -0x40]
MOV dword ptr [RBP + -0x88],EAX
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x84],RAX
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x7c],RAX
MOV RDI,qword ptr [RBP + -0x68]
LEA RSI,[RBP + -0xb0]
MOV EDX,0x3c
CALL 0x0014e370
MOV RAX,qword ptr [RBP + -0x68]
MOV dword ptr [RAX + 0x50],0x2c
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RAX + 0x98],RCX
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RAX + 0xa0],RCX
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RAX + 0xa8],RCX
MOV RAX,qword ptr [RBP + -0x68]
ADD RSP,0xc0
POP RBP
RET
|
/* WARNING: Removing unreachable block (ram,0x00150d0e) */
long ggml_rope_impl(int4 param_1,int4 param_2,int4 param_3,int4 param_4,
int4 param_5,int4 param_6,int8 param_7,long param_8,
int *param_9,int *param_10,int param_11,uint param_12,int4 param_13,
byte param_14)
{
ulong uVar1;
long local_c8;
int1 local_b8 [4];
int local_b4;
uint local_b0;
int4 local_a8;
int4 local_a4;
int4 local_a0;
int4 local_9c;
int4 local_98;
int4 local_94;
int4 local_90;
int8 local_8c;
int8 local_84;
long local_70;
int8 local_68;
int8 local_60;
byte local_49;
int4 local_48;
int4 local_44;
int4 local_40;
int4 local_3c;
int4 local_38;
int4 local_34;
uint local_30;
int local_2c;
int *local_28;
int *local_20;
long local_18;
int8 local_10;
local_49 = param_14 & 1;
local_48 = param_6;
local_44 = param_5;
local_40 = param_4;
local_3c = param_3;
local_38 = param_2;
local_34 = param_1;
local_30 = param_12;
local_2c = param_11;
local_28 = param_10;
local_20 = param_9;
local_18 = param_8;
local_10 = param_7;
if ((param_12 & 1) != 0) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
0xdac,"GGML_ASSERT(%s) failed",
"(mode & 1) == 0 && \"mode & 1 == 1 is no longer supported\"");
}
uVar1 = ggml_is_vector(local_20);
if ((uVar1 & 1) == 0) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
0xdae,"GGML_ASSERT(%s) failed","ggml_is_vector(b)");
}
if (*local_20 != 0x1a) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
0xdaf,"GGML_ASSERT(%s) failed","b->type == GGML_TYPE_I32");
}
if (*(long *)(local_18 + 0x20) != *(long *)(local_20 + 4)) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
0xdb0,"GGML_ASSERT(%s) failed","a->ne[2] == b->ne[0]");
}
if (local_28 != (int *)0x0) {
if (*local_28 != 0) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c"
,0xdb3,"GGML_ASSERT(%s) failed","c->type == GGML_TYPE_F32");
}
if (*(long *)(local_28 + 4) < (long)(local_2c / 2)) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c"
,0xdb4,"GGML_ASSERT(%s) failed","c->ne[0] >= n_dims / 2");
}
}
memset(&local_68,0,0x10);
if ((local_49 & 1) == 0) {
local_c8 = ggml_dup_tensor(local_10);
}
else {
local_c8 = ggml_view_tensor(local_10);
}
local_70 = local_c8;
memset(local_b8,0,0x3c);
local_b4 = local_2c;
local_b0 = local_30;
local_a8 = param_13;
local_a4 = local_34;
local_a0 = local_38;
local_9c = local_3c;
local_98 = local_40;
local_94 = local_44;
local_90 = local_48;
local_8c = local_68;
local_84 = local_60;
ggml_set_op_params(local_70,local_b8,0x3c);
*(int4 *)(local_70 + 0x50) = 0x2c;
*(long *)(local_70 + 0x98) = local_18;
*(int **)(local_70 + 0xa0) = local_20;
*(int **)(local_70 + 0xa8) = local_28;
return local_70;
}
|
|
20,194
|
ggml_rope_impl
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c
|
static struct ggml_tensor * ggml_rope_impl(
struct ggml_context * ctx,
struct ggml_tensor * a,
struct ggml_tensor * b,
struct ggml_tensor * c,
int n_dims,
int mode,
int n_ctx_orig,
float freq_base,
float freq_scale,
float ext_factor,
float attn_factor,
float beta_fast,
float beta_slow,
bool inplace) {
GGML_ASSERT((mode & 1) == 0 && "mode & 1 == 1 is no longer supported");
GGML_ASSERT(ggml_is_vector(b));
GGML_ASSERT(b->type == GGML_TYPE_I32);
GGML_ASSERT(a->ne[2] == b->ne[0]);
if (c) {
GGML_ASSERT(c->type == GGML_TYPE_F32);
GGML_ASSERT(c->ne[0] >= n_dims / 2);
}
int sections[4] = {0, 0, 0, 0};
struct ggml_tensor * result = inplace ? ggml_view_tensor(ctx, a) : ggml_dup_tensor(ctx, a);
int32_t params[15] = { /*n_past*/ 0, n_dims, mode, /*n_ctx*/ 0, n_ctx_orig };
memcpy(params + 5, &freq_base, sizeof(float));
memcpy(params + 6, &freq_scale, sizeof(float));
memcpy(params + 7, &ext_factor, sizeof(float));
memcpy(params + 8, &attn_factor, sizeof(float));
memcpy(params + 9, &beta_fast, sizeof(float));
memcpy(params + 10, &beta_slow, sizeof(float));
memcpy(params + 11, §ions, sizeof(int)*4);
ggml_set_op_params(result, params, sizeof(params));
result->op = GGML_OP_ROPE;
result->src[0] = a;
result->src[1] = b;
result->src[2] = c;
return result;
}
|
O1
|
c
|
ggml_rope_impl:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movl %r9d, %ebp
testb $0x1, %bpl
jne 0x1e647
movq %rdx, %r14
cmpq $0x1, 0x18(%rdx)
jne 0x1e628
cmpq $0x1, 0x20(%r14)
jne 0x1e628
cmpq $0x1, 0x28(%r14)
jne 0x1e628
cmpl $0x1a, (%r14)
jne 0x1e666
movq %rsi, %r15
movq 0x20(%rsi), %rax
cmpq 0x10(%r14), %rax
jne 0x1e682
movl %r8d, %r12d
movq %rcx, %rbx
testq %rcx, %rcx
je 0x1e548
cmpl $0x0, (%rbx)
jne 0x1e6ba
movl %r12d, %eax
shrl $0x1f, %eax
addl %r12d, %eax
sarl %eax
cltq
cmpq %rax, 0x10(%rbx)
jl 0x1e6d6
movss %xmm0, 0x8(%rsp)
movss %xmm1, 0xc(%rsp)
movss %xmm2, 0x10(%rsp)
movss %xmm3, 0x14(%rsp)
movss %xmm4, 0x18(%rsp)
movss %xmm5, 0x1c(%rsp)
cmpb $0x0, 0x58(%rsp)
je 0x1e57d
movq %r15, %rsi
callq 0x17260
jmp 0x1e594
movl (%r15), %esi
leaq 0x10(%r15), %rcx
movl $0x4, %edx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x1b871
testq %rax, %rax
movss 0x1c(%rsp), %xmm0
movss 0x18(%rsp), %xmm1
movss 0x14(%rsp), %xmm2
je 0x1e69e
movl 0x50(%rsp), %ecx
movl %r12d, 0x58(%rax)
movl %ebp, 0x5c(%rax)
movl $0x0, 0x60(%rax)
movl %ecx, 0x64(%rax)
movss 0x8(%rsp), %xmm3
movss %xmm3, 0x68(%rax)
movss 0xc(%rsp), %xmm3
movss %xmm3, 0x6c(%rax)
movss 0x10(%rsp), %xmm3
movss %xmm3, 0x70(%rax)
movss %xmm2, 0x74(%rax)
movss %xmm1, 0x78(%rax)
movss %xmm0, 0x7c(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x80(%rax)
movq $0x2c, 0x50(%rax)
movq %r15, 0x98(%rax)
movq %r14, 0xa0(%rax)
movq %rbx, 0xa8(%rax)
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2df40(%rip), %rdi # 0x4c56f
leaq 0x2df8b(%rip), %rdx # 0x4c5c1
leaq 0x2e5de(%rip), %rcx # 0x4cc1b
movl $0xdae, %esi # imm = 0xDAE
jmp 0x1e6f0
leaq 0x2df21(%rip), %rdi # 0x4c56f
leaq 0x2df6c(%rip), %rdx # 0x4c5c1
leaq 0x2e585(%rip), %rcx # 0x4cbe1
movl $0xdac, %esi # imm = 0xDAC
jmp 0x1e6f0
leaq 0x2df02(%rip), %rdi # 0x4c56f
leaq 0x2df4d(%rip), %rdx # 0x4c5c1
leaq 0x2e513(%rip), %rcx # 0x4cb8e
movl $0xdaf, %esi # imm = 0xDAF
jmp 0x1e6f0
leaq 0x2dee6(%rip), %rdi # 0x4c56f
leaq 0x2df31(%rip), %rdx # 0x4c5c1
leaq 0x2e5c6(%rip), %rcx # 0x4cc5d
movl $0xdb0, %esi # imm = 0xDB0
jmp 0x1e6f0
leaq 0x30020(%rip), %rdi # 0x4e6c5
leaq 0x2df15(%rip), %rdx # 0x4c5c1
leaq 0x3013f(%rip), %rcx # 0x4e7f2
movl $0x70, %esi
jmp 0x1e6f0
leaq 0x2deae(%rip), %rdi # 0x4c56f
leaq 0x2def9(%rip), %rdx # 0x4c5c1
leaq 0x2f0e4(%rip), %rcx # 0x4d7b3
movl $0xdb3, %esi # imm = 0xDB3
jmp 0x1e6f0
leaq 0x2de92(%rip), %rdi # 0x4c56f
leaq 0x2dedd(%rip), %rdx # 0x4c5c1
leaq 0x2e55b(%rip), %rcx # 0x4cc46
movl $0xdb4, %esi # imm = 0xDB4
xorl %eax, %eax
callq 0x18ce0
|
ggml_rope_impl:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 20h
mov ebp, r9d
test bpl, 1
jnz loc_1E647
mov r14, rdx
cmp qword ptr [rdx+18h], 1
jnz loc_1E628
cmp qword ptr [r14+20h], 1
jnz loc_1E628
cmp qword ptr [r14+28h], 1
jnz loc_1E628
cmp dword ptr [r14], 1Ah
jnz loc_1E666
mov r15, rsi
mov rax, [rsi+20h]
cmp rax, [r14+10h]
jnz loc_1E682
mov r12d, r8d
mov rbx, rcx
test rcx, rcx
jz short loc_1E548
cmp dword ptr [rbx], 0
jnz loc_1E6BA
mov eax, r12d
shr eax, 1Fh
add eax, r12d
sar eax, 1
cdqe
cmp [rbx+10h], rax
jl loc_1E6D6
loc_1E548:
movss [rsp+48h+var_40], xmm0
movss [rsp+48h+var_3C], xmm1
movss [rsp+48h+var_38], xmm2
movss [rsp+48h+var_34], xmm3
movss [rsp+48h+var_30], xmm4
movss [rsp+48h+var_2C], xmm5
cmp [rsp+48h+arg_8], 0
jz short loc_1E57D
mov rsi, r15
call _ggml_view_tensor
jmp short loc_1E594
loc_1E57D:
mov esi, [r15]
lea rcx, [r15+10h]
mov edx, 4
xor r8d, r8d
xor r9d, r9d
call ggml_new_tensor_impl
loc_1E594:
test rax, rax
movss xmm0, [rsp+48h+var_2C]
movss xmm1, [rsp+48h+var_30]
movss xmm2, [rsp+48h+var_34]
jz loc_1E69E
mov ecx, [rsp+48h+arg_0]
mov [rax+58h], r12d
mov [rax+5Ch], ebp
mov dword ptr [rax+60h], 0
mov [rax+64h], ecx
movss xmm3, [rsp+48h+var_40]
movss dword ptr [rax+68h], xmm3
movss xmm3, [rsp+48h+var_3C]
movss dword ptr [rax+6Ch], xmm3
movss xmm3, [rsp+48h+var_38]
movss dword ptr [rax+70h], xmm3
movss dword ptr [rax+74h], xmm2
movss dword ptr [rax+78h], xmm1
movss dword ptr [rax+7Ch], xmm0
xorps xmm0, xmm0
movups xmmword ptr [rax+80h], xmm0
mov qword ptr [rax+50h], 2Ch ; ','
mov [rax+98h], r15
mov [rax+0A0h], r14
mov [rax+0A8h], rbx
add rsp, 20h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_1E628:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlIsVectorB; "ggml_is_vector(b)"
mov esi, 0DAEh
jmp loc_1E6F0
loc_1E647:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aMode10Mode11Is; "(mode & 1) == 0 && \"mode & 1 == 1 is n"...
mov esi, 0DACh
jmp loc_1E6F0
loc_1E666:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlIsMatrixAG+2Ah; "b->type == GGML_TYPE_I32"
mov esi, 0DAFh
jmp short loc_1E6F0
loc_1E682:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aANe2BNe0; "a->ne[2] == b->ne[0]"
mov esi, 0DB0h
jmp short loc_1E6F0
loc_1E69E:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aTensorNull; "tensor != NULL"
mov esi, 70h ; 'p'
jmp short loc_1E6F0
loc_1E6BA:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGradAccTypeGgm+7; "c->type == GGML_TYPE_F32"
mov esi, 0DB3h
jmp short loc_1E6F0
loc_1E6D6:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aCNe0NDims2; "c->ne[0] >= n_dims / 2"
mov esi, 0DB4h
loc_1E6F0:
xor eax, eax
call _ggml_abort
|
long long ggml_rope_impl(
long long a1,
long long a2,
long long a3,
long long a4,
int a5,
int a6,
double a7,
float a8,
float a9,
float a10,
float a11,
float a12,
int a13,
char a14)
{
long long result; // rax
const char *v19; // rdi
char *v20; // rcx
int v21; // esi
if ( (a6 & 1) != 0 )
{
v19 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c";
v20 = "(mode & 1) == 0 && \"mode & 1 == 1 is no longer supported\"";
v21 = 3500;
goto LABEL_22;
}
if ( *(_QWORD *)(a3 + 24) != 1LL || *(_QWORD *)(a3 + 32) != 1LL || *(_QWORD *)(a3 + 40) != 1LL )
{
v19 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c";
v20 = "ggml_is_vector(b)";
v21 = 3502;
goto LABEL_22;
}
if ( *(_DWORD *)a3 != 26 )
{
v19 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c";
v20 = "b->type == GGML_TYPE_I32";
v21 = 3503;
goto LABEL_22;
}
if ( *(_QWORD *)(a2 + 32) != *(_QWORD *)(a3 + 16) )
{
v19 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c";
v20 = "a->ne[2] == b->ne[0]";
v21 = 3504;
goto LABEL_22;
}
if ( a4 )
{
if ( *(_DWORD *)a4 )
{
v19 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c";
v20 = "c->type == GGML_TYPE_F32";
v21 = 3507;
}
else
{
if ( *(_QWORD *)(a4 + 16) >= a5 / 2 )
goto LABEL_10;
v19 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c";
v20 = "c->ne[0] >= n_dims / 2";
v21 = 3508;
}
LABEL_22:
ggml_abort((_DWORD)v19, v21, (unsigned int)"GGML_ASSERT(%s) failed", (_DWORD)v20, a5, a6);
}
LABEL_10:
if ( a14 )
result = ggml_view_tensor(a1, a2, a7);
else
result = ggml_new_tensor_impl(a1, *(_DWORD *)a2, 4, (long long *)(a2 + 16), 0LL, 0LL, a7);
if ( !result )
{
v19 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-impl.h";
v20 = "tensor != NULL";
v21 = 112;
goto LABEL_22;
}
*(_DWORD *)(result + 88) = a5;
*(_DWORD *)(result + 92) = a6;
*(_DWORD *)(result + 96) = 0;
*(_DWORD *)(result + 100) = a13;
*(_DWORD *)(result + 104) = LODWORD(a7);
*(float *)(result + 108) = a8;
*(float *)(result + 112) = a9;
*(float *)(result + 116) = a10;
*(float *)(result + 120) = a11;
*(float *)(result + 124) = a12;
*(_OWORD *)(result + 128) = 0LL;
*(_QWORD *)(result + 80) = 44LL;
*(_QWORD *)(result + 152) = a2;
*(_QWORD *)(result + 160) = a3;
*(_QWORD *)(result + 168) = a4;
return result;
}
|
ggml_rope_impl:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x20
MOV EBP,R9D
TEST BPL,0x1
JNZ 0x0011e647
MOV R14,RDX
CMP qword ptr [RDX + 0x18],0x1
JNZ 0x0011e628
CMP qword ptr [R14 + 0x20],0x1
JNZ 0x0011e628
CMP qword ptr [R14 + 0x28],0x1
JNZ 0x0011e628
CMP dword ptr [R14],0x1a
JNZ 0x0011e666
MOV R15,RSI
MOV RAX,qword ptr [RSI + 0x20]
CMP RAX,qword ptr [R14 + 0x10]
JNZ 0x0011e682
MOV R12D,R8D
MOV RBX,RCX
TEST RCX,RCX
JZ 0x0011e548
CMP dword ptr [RBX],0x0
JNZ 0x0011e6ba
MOV EAX,R12D
SHR EAX,0x1f
ADD EAX,R12D
SAR EAX,0x1
CDQE
CMP qword ptr [RBX + 0x10],RAX
JL 0x0011e6d6
LAB_0011e548:
MOVSS dword ptr [RSP + 0x8],XMM0
MOVSS dword ptr [RSP + 0xc],XMM1
MOVSS dword ptr [RSP + 0x10],XMM2
MOVSS dword ptr [RSP + 0x14],XMM3
MOVSS dword ptr [RSP + 0x18],XMM4
MOVSS dword ptr [RSP + 0x1c],XMM5
CMP byte ptr [RSP + 0x58],0x0
JZ 0x0011e57d
MOV RSI,R15
CALL 0x00117260
JMP 0x0011e594
LAB_0011e57d:
MOV ESI,dword ptr [R15]
LEA RCX,[R15 + 0x10]
MOV EDX,0x4
XOR R8D,R8D
XOR R9D,R9D
CALL 0x0011b871
LAB_0011e594:
TEST RAX,RAX
MOVSS XMM0,dword ptr [RSP + 0x1c]
MOVSS XMM1,dword ptr [RSP + 0x18]
MOVSS XMM2,dword ptr [RSP + 0x14]
JZ 0x0011e69e
MOV ECX,dword ptr [RSP + 0x50]
MOV dword ptr [RAX + 0x58],R12D
MOV dword ptr [RAX + 0x5c],EBP
MOV dword ptr [RAX + 0x60],0x0
MOV dword ptr [RAX + 0x64],ECX
MOVSS XMM3,dword ptr [RSP + 0x8]
MOVSS dword ptr [RAX + 0x68],XMM3
MOVSS XMM3,dword ptr [RSP + 0xc]
MOVSS dword ptr [RAX + 0x6c],XMM3
MOVSS XMM3,dword ptr [RSP + 0x10]
MOVSS dword ptr [RAX + 0x70],XMM3
MOVSS dword ptr [RAX + 0x74],XMM2
MOVSS dword ptr [RAX + 0x78],XMM1
MOVSS dword ptr [RAX + 0x7c],XMM0
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + 0x80],XMM0
MOV qword ptr [RAX + 0x50],0x2c
MOV qword ptr [RAX + 0x98],R15
MOV qword ptr [RAX + 0xa0],R14
MOV qword ptr [RAX + 0xa8],RBX
ADD RSP,0x20
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0011e628:
LEA RDI,[0x14c56f]
LEA RDX,[0x14c5c1]
LEA RCX,[0x14cc1b]
MOV ESI,0xdae
JMP 0x0011e6f0
LAB_0011e647:
LEA RDI,[0x14c56f]
LEA RDX,[0x14c5c1]
LEA RCX,[0x14cbe1]
MOV ESI,0xdac
JMP 0x0011e6f0
LAB_0011e666:
LEA RDI,[0x14c56f]
LEA RDX,[0x14c5c1]
LEA RCX,[0x14cb8e]
MOV ESI,0xdaf
JMP 0x0011e6f0
LAB_0011e682:
LEA RDI,[0x14c56f]
LEA RDX,[0x14c5c1]
LEA RCX,[0x14cc5d]
MOV ESI,0xdb0
JMP 0x0011e6f0
LAB_0011e69e:
LEA RDI,[0x14e6c5]
LEA RDX,[0x14c5c1]
LEA RCX,[0x14e7f2]
MOV ESI,0x70
JMP 0x0011e6f0
LAB_0011e6ba:
LEA RDI,[0x14c56f]
LEA RDX,[0x14c5c1]
LEA RCX,[0x14d7b3]
MOV ESI,0xdb3
JMP 0x0011e6f0
LAB_0011e6d6:
LEA RDI,[0x14c56f]
LEA RDX,[0x14c5c1]
LEA RCX,[0x14cc46]
MOV ESI,0xdb4
LAB_0011e6f0:
XOR EAX,EAX
CALL 0x00118ce0
|
void ggml_rope_impl(int4 param_1,int4 param_2,int4 param_3,int4 param_4,
int4 param_5,int4 param_6,int8 param_7,int4 *param_8,
int *param_9,int *param_10,int param_11,uint param_12,int4 param_13,
char param_14)
{
long lVar1;
char *pcVar2;
int8 uVar3;
char *pcVar4;
if ((param_12 & 1) == 0) {
if (((*(long *)(param_9 + 6) == 1) && (*(long *)(param_9 + 8) == 1)) &&
(*(long *)(param_9 + 10) == 1)) {
if (*param_9 == 0x1a) {
if (*(long *)(param_8 + 8) == *(long *)(param_9 + 4)) {
if (param_10 != (int *)0x0) {
if (*param_10 != 0) {
pcVar4 =
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c";
pcVar2 = "c->type == GGML_TYPE_F32";
uVar3 = 0xdb3;
goto LAB_0011e6f0;
}
if (*(long *)(param_10 + 4) < (long)(param_11 / 2)) {
pcVar4 =
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c";
pcVar2 = "c->ne[0] >= n_dims / 2";
uVar3 = 0xdb4;
goto LAB_0011e6f0;
}
}
if (param_14 == '\0') {
lVar1 = ggml_new_tensor_impl(param_7,*param_8,4,param_8 + 4,0,0);
}
else {
lVar1 = ggml_view_tensor(param_7,param_8);
}
if (lVar1 != 0) {
*(int *)(lVar1 + 0x58) = param_11;
*(uint *)(lVar1 + 0x5c) = param_12;
*(int4 *)(lVar1 + 0x60) = 0;
*(int4 *)(lVar1 + 100) = param_13;
*(int4 *)(lVar1 + 0x68) = param_1;
*(int4 *)(lVar1 + 0x6c) = param_2;
*(int4 *)(lVar1 + 0x70) = param_3;
*(int4 *)(lVar1 + 0x74) = param_4;
*(int4 *)(lVar1 + 0x78) = param_5;
*(int4 *)(lVar1 + 0x7c) = param_6;
*(int8 *)(lVar1 + 0x80) = 0;
*(int8 *)(lVar1 + 0x88) = 0;
*(int8 *)(lVar1 + 0x50) = 0x2c;
*(int4 **)(lVar1 + 0x98) = param_8;
*(int **)(lVar1 + 0xa0) = param_9;
*(int **)(lVar1 + 0xa8) = param_10;
return;
}
pcVar4 =
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-impl.h";
pcVar2 = "tensor != NULL";
uVar3 = 0x70;
}
else {
pcVar4 =
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c";
pcVar2 = "a->ne[2] == b->ne[0]";
uVar3 = 0xdb0;
}
}
else {
pcVar4 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c"
;
pcVar2 = "b->type == GGML_TYPE_I32";
uVar3 = 0xdaf;
}
}
else {
pcVar4 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c";
pcVar2 = "ggml_is_vector(b)";
uVar3 = 0xdae;
}
}
else {
pcVar4 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c";
pcVar2 = "(mode & 1) == 0 && \"mode & 1 == 1 is no longer supported\"";
uVar3 = 0xdac;
}
LAB_0011e6f0:
/* WARNING: Subroutine does not return */
ggml_abort(pcVar4,uVar3,"GGML_ASSERT(%s) failed",pcVar2);
}
|
|
20,195
|
ggml_rope_impl
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c
|
static struct ggml_tensor * ggml_rope_impl(
struct ggml_context * ctx,
struct ggml_tensor * a,
struct ggml_tensor * b,
struct ggml_tensor * c,
int n_dims,
int mode,
int n_ctx_orig,
float freq_base,
float freq_scale,
float ext_factor,
float attn_factor,
float beta_fast,
float beta_slow,
bool inplace) {
GGML_ASSERT((mode & 1) == 0 && "mode & 1 == 1 is no longer supported");
GGML_ASSERT(ggml_is_vector(b));
GGML_ASSERT(b->type == GGML_TYPE_I32);
GGML_ASSERT(a->ne[2] == b->ne[0]);
if (c) {
GGML_ASSERT(c->type == GGML_TYPE_F32);
GGML_ASSERT(c->ne[0] >= n_dims / 2);
}
int sections[4] = {0, 0, 0, 0};
struct ggml_tensor * result = inplace ? ggml_view_tensor(ctx, a) : ggml_dup_tensor(ctx, a);
int32_t params[15] = { /*n_past*/ 0, n_dims, mode, /*n_ctx*/ 0, n_ctx_orig };
memcpy(params + 5, &freq_base, sizeof(float));
memcpy(params + 6, &freq_scale, sizeof(float));
memcpy(params + 7, &ext_factor, sizeof(float));
memcpy(params + 8, &attn_factor, sizeof(float));
memcpy(params + 9, &beta_fast, sizeof(float));
memcpy(params + 10, &beta_slow, sizeof(float));
memcpy(params + 11, §ions, sizeof(int)*4);
ggml_set_op_params(result, params, sizeof(params));
result->op = GGML_OP_ROPE;
result->src[0] = a;
result->src[1] = b;
result->src[2] = c;
return result;
}
|
O2
|
c
|
ggml_rope_impl:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movss %xmm5, 0x1c(%rsp)
movss %xmm4, 0x18(%rsp)
movss %xmm3, 0x14(%rsp)
movss %xmm2, 0x10(%rsp)
movss %xmm1, 0xc(%rsp)
movss %xmm0, 0x8(%rsp)
movl %r9d, %ebp
testb $0x1, %bpl
jne 0x23a82
movl %r8d, %r12d
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r13
movq %rdx, %rdi
callq 0x1f6d0
testb %al, %al
je 0x23aa1
cmpl $0x1a, (%r14)
jne 0x23abd
movq 0x20(%r15), %rax
cmpq 0x10(%r14), %rax
jne 0x23ad9
testq %rbx, %rbx
je 0x239c7
cmpl $0x0, (%rbx)
jne 0x23af5
movq 0x10(%rbx), %rcx
pushq $0x2
popq %rsi
movl %r12d, %eax
cltd
idivl %esi
cltq
cmpq %rax, %rcx
jl 0x23b11
movq %r13, %rdi
movq %r15, %rsi
cmpb $0x0, 0xa8(%rsp)
je 0x239de
callq 0x1d410
jmp 0x239e3
callq 0x1e7a0
movq %rax, %r13
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %rsi
movaps %xmm0, (%rsi)
movl %r12d, 0x4(%rsi)
movl %ebp, 0x8(%rsi)
movl 0xa0(%rsp), %eax
movl %eax, 0x10(%rsi)
movss 0x8(%rsp), %xmm1
movss %xmm1, 0x14(%rsi)
movss 0xc(%rsp), %xmm1
movss %xmm1, 0x18(%rsi)
movss 0x10(%rsp), %xmm1
movss %xmm1, 0x1c(%rsi)
movss 0x14(%rsp), %xmm1
movss %xmm1, 0x20(%rsi)
movss 0x18(%rsp), %xmm1
movss %xmm1, 0x24(%rsi)
movss 0x1c(%rsp), %xmm1
movss %xmm1, 0x28(%rsi)
movups %xmm0, 0x2c(%rsi)
pushq $0x3c
popq %rdx
movq %r13, %rdi
callq 0x2221d
movl $0x2c, 0x50(%r13)
movq %r15, 0x98(%r13)
movq %r14, 0xa0(%r13)
movq %rbx, 0xa8(%r13)
movq %r13, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2aafa(%rip), %rdi # 0x4e583
leaq 0x2ab45(%rip), %rdx # 0x4e5d5
leaq 0x2b15e(%rip), %rcx # 0x4ebf5
movl $0xdac, %esi # imm = 0xDAC
jmp 0x23b2b
leaq 0x2aadb(%rip), %rdi # 0x4e583
leaq 0x2ab26(%rip), %rdx # 0x4e5d5
leaq 0x2b179(%rip), %rcx # 0x4ec2f
movl $0xdae, %esi # imm = 0xDAE
jmp 0x23b2b
leaq 0x2aabf(%rip), %rdi # 0x4e583
leaq 0x2ab0a(%rip), %rdx # 0x4e5d5
leaq 0x2b0d0(%rip), %rcx # 0x4eba2
movl $0xdaf, %esi # imm = 0xDAF
jmp 0x23b2b
leaq 0x2aaa3(%rip), %rdi # 0x4e583
leaq 0x2aaee(%rip), %rdx # 0x4e5d5
leaq 0x2b183(%rip), %rcx # 0x4ec71
movl $0xdb0, %esi # imm = 0xDB0
jmp 0x23b2b
leaq 0x2aa87(%rip), %rdi # 0x4e583
leaq 0x2aad2(%rip), %rdx # 0x4e5d5
leaq 0x2bcbd(%rip), %rcx # 0x4f7c7
movl $0xdb3, %esi # imm = 0xDB3
jmp 0x23b2b
leaq 0x2aa6b(%rip), %rdi # 0x4e583
leaq 0x2aab6(%rip), %rdx # 0x4e5d5
leaq 0x2b134(%rip), %rcx # 0x4ec5a
movl $0xdb4, %esi # imm = 0xDB4
xorl %eax, %eax
callq 0x1f9b0
|
ggml_rope_impl:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
movss [rsp+98h+var_7C], xmm5
movss [rsp+98h+var_80], xmm4
movss [rsp+98h+var_84], xmm3
movss [rsp+98h+var_88], xmm2
movss [rsp+98h+var_8C], xmm1
movss [rsp+98h+var_90], xmm0
mov ebp, r9d
test bpl, 1
jnz loc_23A82
mov r12d, r8d
mov rbx, rcx
mov r14, rdx
mov r15, rsi
mov r13, rdi
mov rdi, rdx
call _ggml_is_vector
test al, al
jz loc_23AA1
cmp dword ptr [r14], 1Ah
jnz loc_23ABD
mov rax, [r15+20h]
cmp rax, [r14+10h]
jnz loc_23AD9
test rbx, rbx
jz short loc_239C7
cmp dword ptr [rbx], 0
jnz loc_23AF5
mov rcx, [rbx+10h]
push 2
pop rsi
mov eax, r12d
cdq
idiv esi
cdqe
cmp rcx, rax
jl loc_23B11
loc_239C7:
mov rdi, r13
mov rsi, r15
cmp [rsp+98h+arg_8], 0
jz short loc_239DE
call _ggml_view_tensor
jmp short loc_239E3
loc_239DE:
call _ggml_dup_tensor
loc_239E3:
mov r13, rax
xorps xmm0, xmm0
lea rsi, [rsp+98h+var_78]
movaps xmmword ptr [rsi], xmm0
mov [rsi+4], r12d
mov [rsi+8], ebp
mov eax, [rsp+98h+arg_0]
mov [rsi+10h], eax
movss xmm1, [rsp+98h+var_90]
movss dword ptr [rsi+14h], xmm1
movss xmm1, [rsp+98h+var_8C]
movss dword ptr [rsi+18h], xmm1
movss xmm1, [rsp+98h+var_88]
movss dword ptr [rsi+1Ch], xmm1
movss xmm1, [rsp+98h+var_84]
movss dword ptr [rsi+20h], xmm1
movss xmm1, [rsp+98h+var_80]
movss dword ptr [rsi+24h], xmm1
movss xmm1, [rsp+98h+var_7C]
movss dword ptr [rsi+28h], xmm1
movups xmmword ptr [rsi+2Ch], xmm0
push 3Ch ; '<'
pop rdx
mov rdi, r13
call ggml_set_op_params
mov dword ptr [r13+50h], 2Ch ; ','
mov [r13+98h], r15
mov [r13+0A0h], r14
mov [r13+0A8h], rbx
mov rax, r13
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_23A82:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aMode10Mode11Is; "(mode & 1) == 0 && \"mode & 1 == 1 is n"...
mov esi, 0DACh
jmp loc_23B2B
loc_23AA1:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlIsVectorB; "ggml_is_vector(b)"
mov esi, 0DAEh
jmp short loc_23B2B
loc_23ABD:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlIsMatrixAG+2Ah; "b->type == GGML_TYPE_I32"
mov esi, 0DAFh
jmp short loc_23B2B
loc_23AD9:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aANe2BNe0; "a->ne[2] == b->ne[0]"
mov esi, 0DB0h
jmp short loc_23B2B
loc_23AF5:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGradAccTypeGgm+7; "c->type == GGML_TYPE_F32"
mov esi, 0DB3h
jmp short loc_23B2B
loc_23B11:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aCNe0NDims2; "c->ne[0] >= n_dims / 2"
mov esi, 0DB4h
loc_23B2B:
xor eax, eax
call _ggml_abort
|
long long ggml_rope_impl(
long long a1,
long long a2,
_QWORD *a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
int a15,
char a16)
{
unsigned int v16; // ebp
signed int v17; // r12d
long long v20; // rax
long long v21; // rcx
long long v22; // r8
long long v23; // r9
__m128 v24; // xmm4
__m128 v25; // xmm5
long long v26; // r13
char *v28; // rcx
int v29; // esi
char v30; // [rsp+0h] [rbp-98h]
__int32 v31; // [rsp+18h] [rbp-80h]
unsigned __int32 v32; // [rsp+1Ch] [rbp-7Ch]
__int128 v33; // [rsp+20h] [rbp-78h] BYREF
int v34; // [rsp+30h] [rbp-68h]
__int32 v35; // [rsp+34h] [rbp-64h]
__int32 v36; // [rsp+38h] [rbp-60h]
__int32 v37; // [rsp+3Ch] [rbp-5Ch]
__int32 v38; // [rsp+40h] [rbp-58h]
__int32 v39; // [rsp+44h] [rbp-54h]
unsigned __int32 v40; // [rsp+48h] [rbp-50h]
__int128 v41; // [rsp+4Ch] [rbp-4Ch]
v32 = a12.m128_i32[0];
v31 = a11.m128_i32[0];
v16 = a6;
if ( (a6 & 1) != 0 )
{
v28 = "(mode & 1) == 0 && \"mode & 1 == 1 is no longer supported\"";
v29 = 3500;
goto LABEL_18;
}
v17 = a5;
if ( !ggml_is_vector(a3) )
{
v28 = "ggml_is_vector(b)";
v29 = 3502;
goto LABEL_18;
}
if ( *(_DWORD *)a3 != 26 )
{
v28 = "b->type == GGML_TYPE_I32";
v29 = 3503;
goto LABEL_18;
}
if ( *(_QWORD *)(a2 + 32) != a3[2] )
{
v28 = "a->ne[2] == b->ne[0]";
v29 = 3504;
goto LABEL_18;
}
if ( !a4 )
goto LABEL_8;
if ( *(_DWORD *)a4 )
{
v28 = "c->type == GGML_TYPE_F32";
v29 = 3507;
goto LABEL_18;
}
if ( *(_QWORD *)(a4 + 16) < v17 / 2 )
{
v28 = "c->ne[0] >= n_dims / 2";
v29 = 3508;
LABEL_18:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
v29,
(long long)"GGML_ASSERT(%s) failed",
(long long)v28,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v30);
}
LABEL_8:
if ( a16 )
v20 = ggml_view_tensor(a1, a2, a7, a8, a9, a10, a11, a12, a13, a14);
else
v20 = ggml_dup_tensor(a1, (unsigned int *)a2);
v26 = v20;
v33 = 0LL;
*(_QWORD *)((char *)&v33 + 4) = __PAIR64__(v16, v17);
v34 = a15;
v35 = a7.m128_i32[0];
v36 = a8.m128_i32[0];
v37 = a9.m128_i32[0];
v38 = a10.m128_i32[0];
v39 = v31;
v40 = v32;
v41 = 0LL;
ggml_set_op_params(v20, (long long)&v33, 60LL, (__m128)0LL, (__m128)v32, a9, a10, v24, v25, a13, a14, v21, v22, v23);
*(_DWORD *)(v26 + 80) = 44;
*(_QWORD *)(v26 + 152) = a2;
*(_QWORD *)(v26 + 160) = a3;
*(_QWORD *)(v26 + 168) = a4;
return v26;
}
|
ggml_rope_impl:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOVSS dword ptr [RSP + 0x1c],XMM5
MOVSS dword ptr [RSP + 0x18],XMM4
MOVSS dword ptr [RSP + 0x14],XMM3
MOVSS dword ptr [RSP + 0x10],XMM2
MOVSS dword ptr [RSP + 0xc],XMM1
MOVSS dword ptr [RSP + 0x8],XMM0
MOV EBP,R9D
TEST BPL,0x1
JNZ 0x00123a82
MOV R12D,R8D
MOV RBX,RCX
MOV R14,RDX
MOV R15,RSI
MOV R13,RDI
MOV RDI,RDX
CALL 0x0011f6d0
TEST AL,AL
JZ 0x00123aa1
CMP dword ptr [R14],0x1a
JNZ 0x00123abd
MOV RAX,qword ptr [R15 + 0x20]
CMP RAX,qword ptr [R14 + 0x10]
JNZ 0x00123ad9
TEST RBX,RBX
JZ 0x001239c7
CMP dword ptr [RBX],0x0
JNZ 0x00123af5
MOV RCX,qword ptr [RBX + 0x10]
PUSH 0x2
POP RSI
MOV EAX,R12D
CDQ
IDIV ESI
CDQE
CMP RCX,RAX
JL 0x00123b11
LAB_001239c7:
MOV RDI,R13
MOV RSI,R15
CMP byte ptr [RSP + 0xa8],0x0
JZ 0x001239de
CALL 0x0011d410
JMP 0x001239e3
LAB_001239de:
CALL 0x0011e7a0
LAB_001239e3:
MOV R13,RAX
XORPS XMM0,XMM0
LEA RSI,[RSP + 0x20]
MOVAPS xmmword ptr [RSI],XMM0
MOV dword ptr [RSI + 0x4],R12D
MOV dword ptr [RSI + 0x8],EBP
MOV EAX,dword ptr [RSP + 0xa0]
MOV dword ptr [RSI + 0x10],EAX
MOVSS XMM1,dword ptr [RSP + 0x8]
MOVSS dword ptr [RSI + 0x14],XMM1
MOVSS XMM1,dword ptr [RSP + 0xc]
MOVSS dword ptr [RSI + 0x18],XMM1
MOVSS XMM1,dword ptr [RSP + 0x10]
MOVSS dword ptr [RSI + 0x1c],XMM1
MOVSS XMM1,dword ptr [RSP + 0x14]
MOVSS dword ptr [RSI + 0x20],XMM1
MOVSS XMM1,dword ptr [RSP + 0x18]
MOVSS dword ptr [RSI + 0x24],XMM1
MOVSS XMM1,dword ptr [RSP + 0x1c]
MOVSS dword ptr [RSI + 0x28],XMM1
MOVUPS xmmword ptr [RSI + 0x2c],XMM0
PUSH 0x3c
POP RDX
MOV RDI,R13
CALL 0x0012221d
MOV dword ptr [R13 + 0x50],0x2c
MOV qword ptr [R13 + 0x98],R15
MOV qword ptr [R13 + 0xa0],R14
MOV qword ptr [R13 + 0xa8],RBX
MOV RAX,R13
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00123a82:
LEA RDI,[0x14e583]
LEA RDX,[0x14e5d5]
LEA RCX,[0x14ebf5]
MOV ESI,0xdac
JMP 0x00123b2b
LAB_00123aa1:
LEA RDI,[0x14e583]
LEA RDX,[0x14e5d5]
LEA RCX,[0x14ec2f]
MOV ESI,0xdae
JMP 0x00123b2b
LAB_00123abd:
LEA RDI,[0x14e583]
LEA RDX,[0x14e5d5]
LEA RCX,[0x14eba2]
MOV ESI,0xdaf
JMP 0x00123b2b
LAB_00123ad9:
LEA RDI,[0x14e583]
LEA RDX,[0x14e5d5]
LEA RCX,[0x14ec71]
MOV ESI,0xdb0
JMP 0x00123b2b
LAB_00123af5:
LEA RDI,[0x14e583]
LEA RDX,[0x14e5d5]
LEA RCX,[0x14f7c7]
MOV ESI,0xdb3
JMP 0x00123b2b
LAB_00123b11:
LEA RDI,[0x14e583]
LEA RDX,[0x14e5d5]
LEA RCX,[0x14ec5a]
MOV ESI,0xdb4
LAB_00123b2b:
XOR EAX,EAX
CALL 0x0011f9b0
|
long ggml_rope_impl(int4 param_1,int4 param_2,int4 param_3,int4 param_4,
int4 param_5,int4 param_6,int8 param_7,long param_8,
int *param_9,int *param_10,uint param_11,uint param_12,int4 param_13,
char param_14)
{
char cVar1;
long lVar2;
char *pcVar3;
ulong extraout_RDX;
ulong uVar4;
int8 uVar5;
long local_78;
ulong uStack_70;
int4 local_68;
int4 local_64;
int4 local_60;
int4 local_5c;
int4 local_58;
int4 local_54;
int4 local_50;
int8 local_4c;
int8 uStack_44;
if ((param_12 & 1) == 0) {
cVar1 = ggml_is_vector(param_9);
if (cVar1 == '\0') {
pcVar3 = "ggml_is_vector(b)";
uVar5 = 0xdae;
}
else if (*param_9 == 0x1a) {
if (*(long *)(param_8 + 0x20) == *(long *)(param_9 + 4)) {
uVar4 = extraout_RDX;
if (param_10 == (int *)0x0) {
LAB_001239c7:
if (param_14 == '\0') {
lVar2 = ggml_dup_tensor(param_7,param_8,uVar4);
}
else {
lVar2 = ggml_view_tensor();
}
local_78 = (ulong)param_11 << 0x20;
uStack_70 = (ulong)param_12;
local_68 = param_13;
local_4c = 0;
uStack_44 = 0;
local_64 = param_1;
local_60 = param_2;
local_5c = param_3;
local_58 = param_4;
local_54 = param_5;
local_50 = param_6;
ggml_set_op_params(lVar2,&local_78,0x3c);
*(int4 *)(lVar2 + 0x50) = 0x2c;
*(long *)(lVar2 + 0x98) = param_8;
*(int **)(lVar2 + 0xa0) = param_9;
*(int **)(lVar2 + 0xa8) = param_10;
return lVar2;
}
if (*param_10 == 0) {
uVar4 = (long)(int)param_11 % 2 & 0xffffffff;
if ((long)((int)param_11 / 2) <= *(long *)(param_10 + 4)) goto LAB_001239c7;
pcVar3 = "c->ne[0] >= n_dims / 2";
uVar5 = 0xdb4;
}
else {
pcVar3 = "c->type == GGML_TYPE_F32";
uVar5 = 0xdb3;
}
}
else {
pcVar3 = "a->ne[2] == b->ne[0]";
uVar5 = 0xdb0;
}
}
else {
pcVar3 = "b->type == GGML_TYPE_I32";
uVar5 = 0xdaf;
}
}
else {
pcVar3 = "(mode & 1) == 0 && \"mode & 1 == 1 is no longer supported\"";
uVar5 = 0xdac;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
uVar5,"GGML_ASSERT(%s) failed",pcVar3);
}
|
|
20,196
|
ggml_rope_impl
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c
|
static struct ggml_tensor * ggml_rope_impl(
struct ggml_context * ctx,
struct ggml_tensor * a,
struct ggml_tensor * b,
struct ggml_tensor * c,
int n_dims,
int mode,
int n_ctx_orig,
float freq_base,
float freq_scale,
float ext_factor,
float attn_factor,
float beta_fast,
float beta_slow,
bool inplace) {
GGML_ASSERT((mode & 1) == 0 && "mode & 1 == 1 is no longer supported");
GGML_ASSERT(ggml_is_vector(b));
GGML_ASSERT(b->type == GGML_TYPE_I32);
GGML_ASSERT(a->ne[2] == b->ne[0]);
if (c) {
GGML_ASSERT(c->type == GGML_TYPE_F32);
GGML_ASSERT(c->ne[0] >= n_dims / 2);
}
int sections[4] = {0, 0, 0, 0};
struct ggml_tensor * result = inplace ? ggml_view_tensor(ctx, a) : ggml_dup_tensor(ctx, a);
int32_t params[15] = { /*n_past*/ 0, n_dims, mode, /*n_ctx*/ 0, n_ctx_orig };
memcpy(params + 5, &freq_base, sizeof(float));
memcpy(params + 6, &freq_scale, sizeof(float));
memcpy(params + 7, &ext_factor, sizeof(float));
memcpy(params + 8, &attn_factor, sizeof(float));
memcpy(params + 9, &beta_fast, sizeof(float));
memcpy(params + 10, &beta_slow, sizeof(float));
memcpy(params + 11, §ions, sizeof(int)*4);
ggml_set_op_params(result, params, sizeof(params));
result->op = GGML_OP_ROPE;
result->src[0] = a;
result->src[1] = b;
result->src[2] = c;
return result;
}
|
O3
|
c
|
ggml_rope_impl:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movl %r9d, %ebp
testb $0x1, %bpl
jne 0x1d335
movq %rdx, %r14
cmpq $0x1, 0x18(%rdx)
jne 0x1d316
cmpq $0x1, 0x20(%r14)
jne 0x1d316
cmpq $0x1, 0x28(%r14)
jne 0x1d316
cmpl $0x1a, (%r14)
jne 0x1d354
movq %rsi, %r15
movq 0x20(%rsi), %rax
cmpq 0x10(%r14), %rax
jne 0x1d370
movl %r8d, %r12d
movq %rcx, %rbx
testq %rcx, %rcx
je 0x1d236
cmpl $0x0, (%rbx)
jne 0x1d3a8
movl %r12d, %eax
shrl $0x1f, %eax
addl %r12d, %eax
sarl %eax
cltq
cmpq %rax, 0x10(%rbx)
jl 0x1d3c4
movss %xmm0, 0x8(%rsp)
movss %xmm1, 0xc(%rsp)
movss %xmm2, 0x10(%rsp)
movss %xmm3, 0x14(%rsp)
movss %xmm4, 0x18(%rsp)
movss %xmm5, 0x1c(%rsp)
cmpb $0x0, 0x58(%rsp)
je 0x1d26b
movq %r15, %rsi
callq 0x16260
jmp 0x1d282
movl (%r15), %esi
leaq 0x10(%r15), %rcx
movl $0x4, %edx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x1a57f
testq %rax, %rax
movss 0x1c(%rsp), %xmm0
movss 0x18(%rsp), %xmm1
movss 0x14(%rsp), %xmm2
je 0x1d38c
movl 0x50(%rsp), %ecx
movl %r12d, 0x58(%rax)
movl %ebp, 0x5c(%rax)
movl $0x0, 0x60(%rax)
movl %ecx, 0x64(%rax)
movss 0x8(%rsp), %xmm3
movss %xmm3, 0x68(%rax)
movss 0xc(%rsp), %xmm3
movss %xmm3, 0x6c(%rax)
movss 0x10(%rsp), %xmm3
movss %xmm3, 0x70(%rax)
movss %xmm2, 0x74(%rax)
movss %xmm1, 0x78(%rax)
movss %xmm0, 0x7c(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x80(%rax)
movq $0x2c, 0x50(%rax)
movq %r15, 0x98(%rax)
movq %r14, 0xa0(%rax)
movq %rbx, 0xa8(%rax)
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2f2f6(%rip), %rdi # 0x4c613
leaq 0x2f341(%rip), %rdx # 0x4c665
leaq 0x2f994(%rip), %rcx # 0x4ccbf
movl $0xdae, %esi # imm = 0xDAE
jmp 0x1d3de
leaq 0x2f2d7(%rip), %rdi # 0x4c613
leaq 0x2f322(%rip), %rdx # 0x4c665
leaq 0x2f93b(%rip), %rcx # 0x4cc85
movl $0xdac, %esi # imm = 0xDAC
jmp 0x1d3de
leaq 0x2f2b8(%rip), %rdi # 0x4c613
leaq 0x2f303(%rip), %rdx # 0x4c665
leaq 0x2f8c9(%rip), %rcx # 0x4cc32
movl $0xdaf, %esi # imm = 0xDAF
jmp 0x1d3de
leaq 0x2f29c(%rip), %rdi # 0x4c613
leaq 0x2f2e7(%rip), %rdx # 0x4c665
leaq 0x2f97c(%rip), %rcx # 0x4cd01
movl $0xdb0, %esi # imm = 0xDB0
jmp 0x1d3de
leaq 0x313d6(%rip), %rdi # 0x4e769
leaq 0x2f2cb(%rip), %rdx # 0x4c665
leaq 0x314f5(%rip), %rcx # 0x4e896
movl $0x70, %esi
jmp 0x1d3de
leaq 0x2f264(%rip), %rdi # 0x4c613
leaq 0x2f2af(%rip), %rdx # 0x4c665
leaq 0x3049a(%rip), %rcx # 0x4d857
movl $0xdb3, %esi # imm = 0xDB3
jmp 0x1d3de
leaq 0x2f248(%rip), %rdi # 0x4c613
leaq 0x2f293(%rip), %rdx # 0x4c665
leaq 0x2f911(%rip), %rcx # 0x4ccea
movl $0xdb4, %esi # imm = 0xDB4
xorl %eax, %eax
callq 0x17cd0
|
ggml_rope_impl:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 20h
mov ebp, r9d
test bpl, 1
jnz loc_1D335
mov r14, rdx
cmp qword ptr [rdx+18h], 1
jnz loc_1D316
cmp qword ptr [r14+20h], 1
jnz loc_1D316
cmp qword ptr [r14+28h], 1
jnz loc_1D316
cmp dword ptr [r14], 1Ah
jnz loc_1D354
mov r15, rsi
mov rax, [rsi+20h]
cmp rax, [r14+10h]
jnz loc_1D370
mov r12d, r8d
mov rbx, rcx
test rcx, rcx
jz short loc_1D236
cmp dword ptr [rbx], 0
jnz loc_1D3A8
mov eax, r12d
shr eax, 1Fh
add eax, r12d
sar eax, 1
cdqe
cmp [rbx+10h], rax
jl loc_1D3C4
loc_1D236:
movss [rsp+48h+var_40], xmm0
movss [rsp+48h+var_3C], xmm1
movss [rsp+48h+var_38], xmm2
movss [rsp+48h+var_34], xmm3
movss [rsp+48h+var_30], xmm4
movss [rsp+48h+var_2C], xmm5
cmp [rsp+48h+arg_8], 0
jz short loc_1D26B
mov rsi, r15
call _ggml_view_tensor
jmp short loc_1D282
loc_1D26B:
mov esi, [r15]
lea rcx, [r15+10h]
mov edx, 4
xor r8d, r8d
xor r9d, r9d
call ggml_new_tensor_impl
loc_1D282:
test rax, rax
movss xmm0, [rsp+48h+var_2C]
movss xmm1, [rsp+48h+var_30]
movss xmm2, [rsp+48h+var_34]
jz loc_1D38C
mov ecx, [rsp+48h+arg_0]
mov [rax+58h], r12d
mov [rax+5Ch], ebp
mov dword ptr [rax+60h], 0
mov [rax+64h], ecx
movss xmm3, [rsp+48h+var_40]
movss dword ptr [rax+68h], xmm3
movss xmm3, [rsp+48h+var_3C]
movss dword ptr [rax+6Ch], xmm3
movss xmm3, [rsp+48h+var_38]
movss dword ptr [rax+70h], xmm3
movss dword ptr [rax+74h], xmm2
movss dword ptr [rax+78h], xmm1
movss dword ptr [rax+7Ch], xmm0
xorps xmm0, xmm0
movups xmmword ptr [rax+80h], xmm0
mov qword ptr [rax+50h], 2Ch ; ','
mov [rax+98h], r15
mov [rax+0A0h], r14
mov [rax+0A8h], rbx
add rsp, 20h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_1D316:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlIsVectorB; "ggml_is_vector(b)"
mov esi, 0DAEh
jmp loc_1D3DE
loc_1D335:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aMode10Mode11Is; "(mode & 1) == 0 && \"mode & 1 == 1 is n"...
mov esi, 0DACh
jmp loc_1D3DE
loc_1D354:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlIsMatrixAG+2Ah; "b->type == GGML_TYPE_I32"
mov esi, 0DAFh
jmp short loc_1D3DE
loc_1D370:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aANe2BNe0; "a->ne[2] == b->ne[0]"
mov esi, 0DB0h
jmp short loc_1D3DE
loc_1D38C:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aTensorNull; "tensor != NULL"
mov esi, 70h ; 'p'
jmp short loc_1D3DE
loc_1D3A8:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGradAccTypeGgm+7; "c->type == GGML_TYPE_F32"
mov esi, 0DB3h
jmp short loc_1D3DE
loc_1D3C4:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aCNe0NDims2; "c->ne[0] >= n_dims / 2"
mov esi, 0DB4h
loc_1D3DE:
xor eax, eax
call _ggml_abort
|
long long ggml_rope_impl(
long long a1,
long long a2,
long long a3,
long long a4,
int a5,
int a6,
double a7,
float a8,
float a9,
float a10,
float a11,
float a12,
int a13,
char a14)
{
long long result; // rax
const char *v19; // rdi
char *v20; // rcx
int v21; // esi
if ( (a6 & 1) != 0 )
{
v19 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c";
v20 = "(mode & 1) == 0 && \"mode & 1 == 1 is no longer supported\"";
v21 = 3500;
goto LABEL_22;
}
if ( *(_QWORD *)(a3 + 24) != 1LL || *(_QWORD *)(a3 + 32) != 1LL || *(_QWORD *)(a3 + 40) != 1LL )
{
v19 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c";
v20 = "ggml_is_vector(b)";
v21 = 3502;
goto LABEL_22;
}
if ( *(_DWORD *)a3 != 26 )
{
v19 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c";
v20 = "b->type == GGML_TYPE_I32";
v21 = 3503;
goto LABEL_22;
}
if ( *(_QWORD *)(a2 + 32) != *(_QWORD *)(a3 + 16) )
{
v19 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c";
v20 = "a->ne[2] == b->ne[0]";
v21 = 3504;
goto LABEL_22;
}
if ( a4 )
{
if ( *(_DWORD *)a4 )
{
v19 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c";
v20 = "c->type == GGML_TYPE_F32";
v21 = 3507;
}
else
{
if ( *(_QWORD *)(a4 + 16) >= a5 / 2 )
goto LABEL_10;
v19 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c";
v20 = "c->ne[0] >= n_dims / 2";
v21 = 3508;
}
LABEL_22:
ggml_abort((_DWORD)v19, v21, (unsigned int)"GGML_ASSERT(%s) failed", (_DWORD)v20, a5, a6);
}
LABEL_10:
if ( a14 )
result = ggml_view_tensor(a1, a2, a7);
else
result = ggml_new_tensor_impl(a1, *(_DWORD *)a2, 4u, (long long *)(a2 + 16), 0LL, 0LL, a7);
if ( !result )
{
v19 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-impl.h";
v20 = "tensor != NULL";
v21 = 112;
goto LABEL_22;
}
*(_DWORD *)(result + 88) = a5;
*(_DWORD *)(result + 92) = a6;
*(_DWORD *)(result + 96) = 0;
*(_DWORD *)(result + 100) = a13;
*(_DWORD *)(result + 104) = LODWORD(a7);
*(float *)(result + 108) = a8;
*(float *)(result + 112) = a9;
*(float *)(result + 116) = a10;
*(float *)(result + 120) = a11;
*(float *)(result + 124) = a12;
*(_OWORD *)(result + 128) = 0LL;
*(_QWORD *)(result + 80) = 44LL;
*(_QWORD *)(result + 152) = a2;
*(_QWORD *)(result + 160) = a3;
*(_QWORD *)(result + 168) = a4;
return result;
}
|
ggml_rope_impl:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x20
MOV EBP,R9D
TEST BPL,0x1
JNZ 0x0011d335
MOV R14,RDX
CMP qword ptr [RDX + 0x18],0x1
JNZ 0x0011d316
CMP qword ptr [R14 + 0x20],0x1
JNZ 0x0011d316
CMP qword ptr [R14 + 0x28],0x1
JNZ 0x0011d316
CMP dword ptr [R14],0x1a
JNZ 0x0011d354
MOV R15,RSI
MOV RAX,qword ptr [RSI + 0x20]
CMP RAX,qword ptr [R14 + 0x10]
JNZ 0x0011d370
MOV R12D,R8D
MOV RBX,RCX
TEST RCX,RCX
JZ 0x0011d236
CMP dword ptr [RBX],0x0
JNZ 0x0011d3a8
MOV EAX,R12D
SHR EAX,0x1f
ADD EAX,R12D
SAR EAX,0x1
CDQE
CMP qword ptr [RBX + 0x10],RAX
JL 0x0011d3c4
LAB_0011d236:
MOVSS dword ptr [RSP + 0x8],XMM0
MOVSS dword ptr [RSP + 0xc],XMM1
MOVSS dword ptr [RSP + 0x10],XMM2
MOVSS dword ptr [RSP + 0x14],XMM3
MOVSS dword ptr [RSP + 0x18],XMM4
MOVSS dword ptr [RSP + 0x1c],XMM5
CMP byte ptr [RSP + 0x58],0x0
JZ 0x0011d26b
MOV RSI,R15
CALL 0x00116260
JMP 0x0011d282
LAB_0011d26b:
MOV ESI,dword ptr [R15]
LEA RCX,[R15 + 0x10]
MOV EDX,0x4
XOR R8D,R8D
XOR R9D,R9D
CALL 0x0011a57f
LAB_0011d282:
TEST RAX,RAX
MOVSS XMM0,dword ptr [RSP + 0x1c]
MOVSS XMM1,dword ptr [RSP + 0x18]
MOVSS XMM2,dword ptr [RSP + 0x14]
JZ 0x0011d38c
MOV ECX,dword ptr [RSP + 0x50]
MOV dword ptr [RAX + 0x58],R12D
MOV dword ptr [RAX + 0x5c],EBP
MOV dword ptr [RAX + 0x60],0x0
MOV dword ptr [RAX + 0x64],ECX
MOVSS XMM3,dword ptr [RSP + 0x8]
MOVSS dword ptr [RAX + 0x68],XMM3
MOVSS XMM3,dword ptr [RSP + 0xc]
MOVSS dword ptr [RAX + 0x6c],XMM3
MOVSS XMM3,dword ptr [RSP + 0x10]
MOVSS dword ptr [RAX + 0x70],XMM3
MOVSS dword ptr [RAX + 0x74],XMM2
MOVSS dword ptr [RAX + 0x78],XMM1
MOVSS dword ptr [RAX + 0x7c],XMM0
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + 0x80],XMM0
MOV qword ptr [RAX + 0x50],0x2c
MOV qword ptr [RAX + 0x98],R15
MOV qword ptr [RAX + 0xa0],R14
MOV qword ptr [RAX + 0xa8],RBX
ADD RSP,0x20
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0011d316:
LEA RDI,[0x14c613]
LEA RDX,[0x14c665]
LEA RCX,[0x14ccbf]
MOV ESI,0xdae
JMP 0x0011d3de
LAB_0011d335:
LEA RDI,[0x14c613]
LEA RDX,[0x14c665]
LEA RCX,[0x14cc85]
MOV ESI,0xdac
JMP 0x0011d3de
LAB_0011d354:
LEA RDI,[0x14c613]
LEA RDX,[0x14c665]
LEA RCX,[0x14cc32]
MOV ESI,0xdaf
JMP 0x0011d3de
LAB_0011d370:
LEA RDI,[0x14c613]
LEA RDX,[0x14c665]
LEA RCX,[0x14cd01]
MOV ESI,0xdb0
JMP 0x0011d3de
LAB_0011d38c:
LEA RDI,[0x14e769]
LEA RDX,[0x14c665]
LEA RCX,[0x14e896]
MOV ESI,0x70
JMP 0x0011d3de
LAB_0011d3a8:
LEA RDI,[0x14c613]
LEA RDX,[0x14c665]
LEA RCX,[0x14d857]
MOV ESI,0xdb3
JMP 0x0011d3de
LAB_0011d3c4:
LEA RDI,[0x14c613]
LEA RDX,[0x14c665]
LEA RCX,[0x14ccea]
MOV ESI,0xdb4
LAB_0011d3de:
XOR EAX,EAX
CALL 0x00117cd0
|
void ggml_rope_impl(int4 param_1,int4 param_2,int4 param_3,int4 param_4,
int4 param_5,int4 param_6,int8 param_7,int4 *param_8,
int *param_9,int *param_10,int param_11,uint param_12,int4 param_13,
char param_14)
{
long lVar1;
char *pcVar2;
int8 uVar3;
char *pcVar4;
if ((param_12 & 1) == 0) {
if (((*(long *)(param_9 + 6) == 1) && (*(long *)(param_9 + 8) == 1)) &&
(*(long *)(param_9 + 10) == 1)) {
if (*param_9 == 0x1a) {
if (*(long *)(param_8 + 8) == *(long *)(param_9 + 4)) {
if (param_10 != (int *)0x0) {
if (*param_10 != 0) {
pcVar4 =
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c";
pcVar2 = "c->type == GGML_TYPE_F32";
uVar3 = 0xdb3;
goto LAB_0011d3de;
}
if (*(long *)(param_10 + 4) < (long)(param_11 / 2)) {
pcVar4 =
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c";
pcVar2 = "c->ne[0] >= n_dims / 2";
uVar3 = 0xdb4;
goto LAB_0011d3de;
}
}
if (param_14 == '\0') {
lVar1 = ggml_new_tensor_impl(param_7,*param_8,4,param_8 + 4,0,0);
}
else {
lVar1 = ggml_view_tensor(param_7,param_8);
}
if (lVar1 != 0) {
*(int *)(lVar1 + 0x58) = param_11;
*(uint *)(lVar1 + 0x5c) = param_12;
*(int4 *)(lVar1 + 0x60) = 0;
*(int4 *)(lVar1 + 100) = param_13;
*(int4 *)(lVar1 + 0x68) = param_1;
*(int4 *)(lVar1 + 0x6c) = param_2;
*(int4 *)(lVar1 + 0x70) = param_3;
*(int4 *)(lVar1 + 0x74) = param_4;
*(int4 *)(lVar1 + 0x78) = param_5;
*(int4 *)(lVar1 + 0x7c) = param_6;
*(int8 *)(lVar1 + 0x80) = 0;
*(int8 *)(lVar1 + 0x88) = 0;
*(int8 *)(lVar1 + 0x50) = 0x2c;
*(int4 **)(lVar1 + 0x98) = param_8;
*(int **)(lVar1 + 0xa0) = param_9;
*(int **)(lVar1 + 0xa8) = param_10;
return;
}
pcVar4 =
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-impl.h";
pcVar2 = "tensor != NULL";
uVar3 = 0x70;
}
else {
pcVar4 =
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c";
pcVar2 = "a->ne[2] == b->ne[0]";
uVar3 = 0xdb0;
}
}
else {
pcVar4 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c"
;
pcVar2 = "b->type == GGML_TYPE_I32";
uVar3 = 0xdaf;
}
}
else {
pcVar4 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c";
pcVar2 = "ggml_is_vector(b)";
uVar3 = 0xdae;
}
}
else {
pcVar4 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c";
pcVar2 = "(mode & 1) == 0 && \"mode & 1 == 1 is no longer supported\"";
uVar3 = 0xdac;
}
LAB_0011d3de:
/* WARNING: Subroutine does not return */
ggml_abort(pcVar4,uVar3,"GGML_ASSERT(%s) failed",pcVar2);
}
|
|
20,197
|
remove_key
|
eloqsql/storage/myisam/mi_delete.c
|
static uint remove_key(MI_KEYDEF *keyinfo, uint nod_flag,
uchar *keypos, /* Where key starts */
uchar *lastkey, /* key to be removed */
uchar *page_end, /* End of page */
my_off_t *next_block) /* ptr to next block */
{
int s_length;
uchar *start;
DBUG_ENTER("remove_key");
DBUG_PRINT("enter",("keypos: %p page_end: %p",keypos, page_end));
start=keypos;
if (!(keyinfo->flag &
(HA_PACK_KEY | HA_SPACE_PACK_USED | HA_VAR_LENGTH_KEY |
HA_BINARY_PACK_KEY)))
{
s_length=(int) (keyinfo->keylength+nod_flag);
if (next_block && nod_flag)
*next_block= _mi_kpos(nod_flag,keypos+s_length);
}
else
{ /* Let keypos point at next key */
/* Calculate length of key */
if (!(*keyinfo->get_key)(keyinfo,nod_flag,&keypos,lastkey))
DBUG_RETURN(0); /* Error */
if (next_block && nod_flag)
*next_block= _mi_kpos(nod_flag,keypos);
s_length=(int) (keypos-start);
if (keypos != page_end)
{
if (keyinfo->flag & HA_BINARY_PACK_KEY)
{
uchar *old_key=start;
uint next_length,prev_length,prev_pack_length;
get_key_length(next_length,keypos);
get_key_pack_length(prev_length,prev_pack_length,old_key);
if (next_length > prev_length)
{
/* We have to copy data from the current key to the next key */
bmove_upp(keypos, (lastkey+next_length),
(next_length-prev_length));
keypos-=(next_length-prev_length)+prev_pack_length;
store_key_length(keypos,prev_length);
s_length=(int) (keypos-start);
}
}
else
{
/* Check if a variable length first key part */
if ((keyinfo->seg->flag & HA_PACK_KEY) && *keypos & 128)
{
/* Next key is packed against the current one */
uint next_length,prev_length,prev_pack_length,lastkey_length,
rest_length;
if (keyinfo->seg[0].length >= 127)
{
if (!(prev_length=mi_uint2korr(start) & 32767))
goto end;
next_length=mi_uint2korr(keypos) & 32767;
keypos+=2;
prev_pack_length=2;
}
else
{
if (!(prev_length= *start & 127))
goto end; /* Same key as previous*/
next_length= *keypos & 127;
keypos++;
prev_pack_length=1;
}
if (!(*start & 128))
prev_length=0; /* prev key not packed */
if (keyinfo->seg[0].flag & HA_NULL_PART)
lastkey++; /* Skip null marker */
get_key_length(lastkey_length,lastkey);
if (!next_length) /* Same key after */
{
next_length=lastkey_length;
rest_length=0;
}
else
get_key_length(rest_length,keypos);
if (next_length >= prev_length)
{ /* Key after is based on deleted key */
uint pack_length,tmp;
bmove_upp(keypos, (lastkey+next_length),
tmp=(next_length-prev_length));
rest_length+=tmp;
pack_length= prev_length ? get_pack_length(rest_length): 0;
keypos-=tmp+pack_length+prev_pack_length;
s_length=(int) (keypos-start);
if (prev_length) /* Pack against prev key */
{
*keypos++= start[0];
if (prev_pack_length == 2)
*keypos++= start[1];
store_key_length(keypos,rest_length);
}
else
{
/* Next key is not packed anymore */
if (keyinfo->seg[0].flag & HA_NULL_PART)
{
rest_length++; /* Mark not null */
}
if (prev_pack_length == 2)
{
mi_int2store(keypos,rest_length);
}
else
*keypos= rest_length;
}
}
}
}
}
}
end:
bmove((uchar*) start,(uchar*) start+s_length,
(uint) (page_end-start-s_length));
DBUG_RETURN((uint) s_length);
}
|
O3
|
c
|
remove_key:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, %r12
movq %rdx, %r14
movl %esi, %ebx
movq %rdi, %r13
movq %rdx, -0x30(%rbp)
testb $0x2e, 0xa(%rdi)
je 0x2f552
movq %rcx, %r15
movq %r8, -0x48(%rbp)
leaq -0x30(%rbp), %rdx
movq %r13, %rdi
movl %ebx, %esi
callq *0x48(%r13)
testl %eax, %eax
je 0x2f589
movq %r15, -0x40(%rbp)
testq %r12, %r12
sete %al
testl %ebx, %ebx
sete %cl
orb %al, %cl
jne 0x2f4ce
movq -0x30(%rbp), %rsi
movl %ebx, %edi
callq 0x3daca
movq %rax, (%r12)
movq -0x30(%rbp), %rdi
movl %edi, %r15d
subl %r14d, %r15d
movq -0x48(%rbp), %r8
cmpq %r8, %rdi
je 0x2f636
testb $0x20, 0xa(%r13)
jne 0x2f591
movq 0x28(%r13), %rdx
movzwl 0x12(%rdx), %ecx
testb $0x2, %cl
je 0x2f636
movzbl (%rdi), %eax
testb %al, %al
jns 0x2f636
movzwl 0x14(%rdx), %r10d
cmpw $0x7f, %r10w
jb 0x2f65c
movzbl 0x1(%r14), %edx
movzbl (%r14), %r12d
movl %r12d, %esi
andl $0x7f, %esi
shll $0x8, %esi
orl %edx, %esi
je 0x2f636
movzbl 0x1(%rdi), %edx
andl $0x7f, %eax
shll $0x8, %eax
orl %edx, %eax
movl $0x2, %r11d
movl $0x2, %edx
jmp 0x2f676
movzwl 0x12(%r13), %r15d
addl %ebx, %r15d
testq %r12, %r12
sete %al
testl %ebx, %ebx
sete %cl
orb %al, %cl
jne 0x2f636
movslq %r15d, %rsi
addq %r14, %rsi
movl %ebx, %edi
movq %r8, %rbx
callq 0x3daca
movq %rbx, %r8
movq %rax, (%r12)
jmp 0x2f636
xorl %r15d, %r15d
jmp 0x2f64a
cmpb $-0x1, (%rdi)
je 0x2f5a3
leaq 0x1(%rdi), %rax
movq %rax, -0x30(%rbp)
movzbl (%rdi), %ecx
jmp 0x2f5b9
movzwl 0x1(%rdi), %eax
rolw $0x8, %ax
movzwl %ax, %ecx
addq $0x3, %rdi
movq %rdi, -0x30(%rbp)
movq %rdi, %rax
movzbl (%r14), %edx
cmpl $0xff, %edx
je 0x2f5cd
movl $0x1, %r12d
jmp 0x2f5df
movzwl 0x1(%r14), %edx
rolw $0x8, %dx
movzwl %dx, %edx
movl $0x3, %r12d
movl %ecx, %ebx
subl %edx, %ebx
jbe 0x2f636
movl %ecx, %ecx
movq -0x40(%rbp), %rsi
addq %rcx, %rsi
movq %rax, %rdi
movl %edx, %r15d
movq %rbx, %rdx
callq 0x679cc
movl %r15d, %ecx
addl %ebx, %r12d
movq -0x30(%rbp), %rax
subq %r12, %rax
movq %rax, -0x30(%rbp)
cmpl $0xfe, %r15d
ja 0x2f61a
movb %cl, (%rax)
jmp 0x2f62b
movb $-0x1, (%rax)
movq -0x30(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x30(%rbp), %rax
movb %ch, 0x1(%rax)
movl -0x30(%rbp), %r15d
subl %r14d, %r15d
movq -0x48(%rbp), %r8
movslq %r15d, %rsi
addq %r14, %rsi
subl %esi, %r8d
movq %r14, %rdi
movq %r8, %rdx
callq 0x286b0
movl %r15d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movzbl (%r14), %r12d
movl %r12d, %esi
andl $0x7f, %esi
je 0x2f636
andl $0x7f, %eax
movl $0x1, %r11d
movl $0x1, %edx
addq %rdx, %rdi
movq %rdi, -0x30(%rbp)
xorl %edx, %edx
testb %r12b, %r12b
cmovsl %esi, %edx
btl $0x4, %ecx
movq -0x40(%rbp), %rcx
adcq $0x0, %rcx
movzbl (%rcx), %esi
cmpl $0xff, %esi
je 0x2f6a6
movq %rcx, %r9
movl $0x1, %ecx
jmp 0x2f6b9
movq %rcx, %r9
movzwl 0x1(%rcx), %ecx
rolw $0x8, %cx
movzwl %cx, %esi
movl $0x3, %ecx
testl %eax, %eax
je 0x2f6d5
cmpb $-0x1, (%rdi)
je 0x2f6de
leaq 0x1(%rdi), %rsi
movq %rsi, -0x30(%rbp)
movzbl (%rdi), %edi
movl %edi, -0x40(%rbp)
movq %rsi, %rdi
jmp 0x2f6f4
movl $0x0, -0x40(%rbp)
jmp 0x2f6f6
movzwl 0x1(%rdi), %esi
rolw $0x8, %si
movzwl %si, %esi
movl %esi, -0x40(%rbp)
addq $0x3, %rdi
movq %rdi, -0x30(%rbp)
movl %eax, %esi
movl %esi, %ebx
subl %edx, %ebx
jb 0x2f636
movw %r10w, -0x32(%rbp)
addq %rcx, %r9
movl %esi, %esi
addq %r9, %rsi
movq %rbx, %rdx
movq %r11, %r15
callq 0x679cc
movl -0x40(%rbp), %edx
addl %ebx, %edx
xorl %eax, %eax
cmpl $0xff, %edx
setae %al
xorl %ecx, %ecx
testb %r12b, %r12b
leal 0x1(%rax,%rax), %eax
cmovnsl %ecx, %eax
addl %ebx, %r15d
addl %eax, %r15d
movq -0x30(%rbp), %rax
subq %r15, %rax
movl %eax, %r15d
subl %r14d, %r15d
movq %rax, -0x30(%rbp)
testb %r12b, %r12b
js 0x2f774
movq 0x28(%r13), %rcx
movzwl 0x12(%rcx), %ecx
btl $0x4, %ecx
adcl $0x0, %edx
cmpw $0x7f, -0x32(%rbp)
jb 0x2f7b5
movb %dl, 0x1(%rax)
movq -0x30(%rbp), %rax
movb %dh, (%rax)
jmp 0x2f632
movl %edx, %esi
leaq 0x1(%rax), %rcx
movb (%r14), %dl
movq %rcx, -0x30(%rbp)
movb %dl, (%rax)
cmpw $0x7f, -0x32(%rbp)
jb 0x2f79c
movb 0x1(%r14), %al
movq -0x30(%rbp), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, -0x30(%rbp)
movb %al, (%rcx)
movl %esi, %ecx
cmpl $0xfe, %esi
movq -0x48(%rbp), %r8
ja 0x2f7bc
movq -0x30(%rbp), %rax
movb %cl, (%rax)
jmp 0x2f636
movb %dl, (%rax)
jmp 0x2f632
movq -0x30(%rbp), %rax
movb $-0x1, (%rax)
movq -0x30(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x30(%rbp), %rax
movb %ch, 0x1(%rax)
jmp 0x2f636
|
remove_key:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r12, r9
mov r14, rdx
mov ebx, esi
mov r13, rdi
mov [rbp+var_30], rdx
test byte ptr [rdi+0Ah], 2Eh
jz loc_2F552
mov r15, rcx
mov [rbp+var_48], r8
lea rdx, [rbp+var_30]
mov rdi, r13
mov esi, ebx
call qword ptr [r13+48h]
test eax, eax
jz loc_2F589
mov [rbp+var_40], r15
test r12, r12
setz al
test ebx, ebx
setz cl
or cl, al
jnz short loc_2F4CE
mov rsi, [rbp+var_30]
mov edi, ebx
call _mi_kpos
mov [r12], rax
loc_2F4CE:
mov rdi, [rbp+var_30]
mov r15d, edi
sub r15d, r14d
mov r8, [rbp+var_48]
cmp rdi, r8
jz loc_2F636
test byte ptr [r13+0Ah], 20h
jnz loc_2F591
mov rdx, [r13+28h]
movzx ecx, word ptr [rdx+12h]
test cl, 2
jz loc_2F636
movzx eax, byte ptr [rdi]
test al, al
jns loc_2F636
movzx r10d, word ptr [rdx+14h]
cmp r10w, 7Fh
jb loc_2F65C
movzx edx, byte ptr [r14+1]
movzx r12d, byte ptr [r14]
mov esi, r12d
and esi, 7Fh
shl esi, 8
or esi, edx
jz loc_2F636
movzx edx, byte ptr [rdi+1]
and eax, 7Fh
shl eax, 8
or eax, edx
mov r11d, 2
mov edx, 2
jmp loc_2F676
loc_2F552:
movzx r15d, word ptr [r13+12h]
add r15d, ebx
test r12, r12
setz al
test ebx, ebx
setz cl
or cl, al
jnz loc_2F636
movsxd rsi, r15d
add rsi, r14
mov edi, ebx
mov rbx, r8
call _mi_kpos
mov r8, rbx
mov [r12], rax
jmp loc_2F636
loc_2F589:
xor r15d, r15d
jmp loc_2F64A
loc_2F591:
cmp byte ptr [rdi], 0FFh
jz short loc_2F5A3
lea rax, [rdi+1]
mov [rbp+var_30], rax
movzx ecx, byte ptr [rdi]
jmp short loc_2F5B9
loc_2F5A3:
movzx eax, word ptr [rdi+1]
rol ax, 8
movzx ecx, ax
add rdi, 3
mov [rbp+var_30], rdi
mov rax, rdi
loc_2F5B9:
movzx edx, byte ptr [r14]
cmp edx, 0FFh
jz short loc_2F5CD
mov r12d, 1
jmp short loc_2F5DF
loc_2F5CD:
movzx edx, word ptr [r14+1]
rol dx, 8
movzx edx, dx
mov r12d, 3
loc_2F5DF:
mov ebx, ecx
sub ebx, edx
jbe short loc_2F636
mov ecx, ecx
mov rsi, [rbp+var_40]
add rsi, rcx
mov rdi, rax
mov r15d, edx
mov rdx, rbx
call bmove_upp
mov ecx, r15d
add r12d, ebx
mov rax, [rbp+var_30]
sub rax, r12
mov [rbp+var_30], rax
cmp r15d, 0FEh
ja short loc_2F61A
mov [rax], cl
jmp short loc_2F62B
loc_2F61A:
mov byte ptr [rax], 0FFh
mov rax, [rbp+var_30]
mov [rax+2], cl
mov rax, [rbp+var_30]
mov [rax+1], ch
loc_2F62B:
mov r15d, dword ptr [rbp+var_30]
sub r15d, r14d
loc_2F632:
mov r8, [rbp+var_48]
loc_2F636:
movsxd rsi, r15d
add rsi, r14
sub r8d, esi
mov rdi, r14
mov rdx, r8
call _memmove
loc_2F64A:
mov eax, r15d
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_2F65C:
movzx r12d, byte ptr [r14]
mov esi, r12d
and esi, 7Fh
jz short loc_2F636
and eax, 7Fh
mov r11d, 1
mov edx, 1
loc_2F676:
add rdi, rdx
mov [rbp+var_30], rdi
xor edx, edx
test r12b, r12b
cmovs edx, esi
bt ecx, 4
mov rcx, [rbp+var_40]
adc rcx, 0
movzx esi, byte ptr [rcx]
cmp esi, 0FFh
jz short loc_2F6A6
mov r9, rcx
mov ecx, 1
jmp short loc_2F6B9
loc_2F6A6:
mov r9, rcx
movzx ecx, word ptr [rcx+1]
rol cx, 8
movzx esi, cx
mov ecx, 3
loc_2F6B9:
test eax, eax
jz short loc_2F6D5
cmp byte ptr [rdi], 0FFh
jz short loc_2F6DE
lea rsi, [rdi+1]
mov [rbp+var_30], rsi
movzx edi, byte ptr [rdi]
mov dword ptr [rbp+var_40], edi
mov rdi, rsi
jmp short loc_2F6F4
loc_2F6D5:
mov dword ptr [rbp+var_40], 0
jmp short loc_2F6F6
loc_2F6DE:
movzx esi, word ptr [rdi+1]
rol si, 8
movzx esi, si
mov dword ptr [rbp+var_40], esi
add rdi, 3
mov [rbp+var_30], rdi
loc_2F6F4:
mov esi, eax
loc_2F6F6:
mov ebx, esi
sub ebx, edx
jb loc_2F636
mov [rbp+var_32], r10w
add r9, rcx
mov esi, esi
add rsi, r9
mov rdx, rbx
mov r15, r11
call bmove_upp
mov edx, dword ptr [rbp+var_40]
add edx, ebx
xor eax, eax
cmp edx, 0FFh
setnb al
xor ecx, ecx
test r12b, r12b
lea eax, [rax+rax+1]
cmovns eax, ecx
add r15d, ebx
add r15d, eax
mov rax, [rbp+var_30]
sub rax, r15
mov r15d, eax
sub r15d, r14d
mov [rbp+var_30], rax
test r12b, r12b
js short loc_2F774
mov rcx, [r13+28h]
movzx ecx, word ptr [rcx+12h]
bt ecx, 4
adc edx, 0
cmp [rbp+var_32], 7Fh
jb short loc_2F7B5
mov [rax+1], dl
mov rax, [rbp+var_30]
mov [rax], dh
jmp loc_2F632
loc_2F774:
mov esi, edx
lea rcx, [rax+1]
mov dl, [r14]
mov [rbp+var_30], rcx
mov [rax], dl
cmp [rbp+var_32], 7Fh
jb short loc_2F79C
mov al, [r14+1]
mov rcx, [rbp+var_30]
lea rdx, [rcx+1]
mov [rbp+var_30], rdx
mov [rcx], al
loc_2F79C:
mov ecx, esi
cmp esi, 0FEh
mov r8, [rbp+var_48]
ja short loc_2F7BC
mov rax, [rbp+var_30]
mov [rax], cl
jmp loc_2F636
loc_2F7B5:
mov [rax], dl
jmp loc_2F632
loc_2F7BC:
mov rax, [rbp+var_30]
mov byte ptr [rax], 0FFh
mov rax, [rbp+var_30]
mov [rax+2], cl
mov rax, [rbp+var_30]
mov [rax+1], ch
jmp loc_2F636
|
long long remove_key(
long long a1,
unsigned int a2,
unsigned __int8 *a3,
long long a4,
unsigned __int8 *a5,
long long *a6)
{
unsigned __int8 *v10; // rdi
unsigned int v11; // r15d
long long v12; // rdx
__int16 v13; // cx
unsigned __int8 v14; // al
unsigned __int16 v15; // r10
char v16; // r12
int v17; // esi
int v18; // eax
int v19; // r11d
long long v20; // rdx
int v21; // ebx
long long v22; // rax
unsigned __int8 *v23; // rax
unsigned int v24; // ecx
unsigned int v25; // edx
int v26; // r12d
unsigned int v27; // ebx
unsigned int v28; // r15d
unsigned __int8 *v29; // rax
unsigned __int8 *v31; // rdi
unsigned int v32; // edx
unsigned __int8 *v33; // rcx
unsigned int v34; // esi
unsigned __int8 *v35; // r9
long long v36; // rcx
long long v37; // rbx
int v38; // r15d
int v39; // eax
unsigned __int8 *v40; // rax
__int16 v41; // dx
__int16 v42; // si
char v43; // dl
unsigned __int8 v44; // al
unsigned __int8 *v45; // rcx
unsigned __int8 *v46; // [rsp+8h] [rbp-48h]
long long v47; // [rsp+10h] [rbp-40h]
int v48; // [rsp+10h] [rbp-40h]
unsigned __int16 v49; // [rsp+1Eh] [rbp-32h]
unsigned __int8 *v50; // [rsp+20h] [rbp-30h] BYREF
v50 = a3;
if ( (*(_BYTE *)(a1 + 10) & 0x2E) == 0 )
{
v11 = a2 + *(unsigned __int16 *)(a1 + 18);
if ( a6 != 0LL && a2 != 0 )
{
v21 = (int)a5;
v22 = mi_kpos(a2, &a3[v11]);
LODWORD(a5) = v21;
*a6 = v22;
}
goto LABEL_27;
}
v46 = a5;
if ( (*(unsigned int ( **)(long long, _QWORD, unsigned __int8 **))(a1 + 72))(a1, a2, &v50) )
{
v47 = a4;
if ( a6 != 0LL && a2 != 0 )
*a6 = mi_kpos(a2, v50);
v10 = v50;
v11 = (_DWORD)v50 - (_DWORD)a3;
LODWORD(a5) = (_DWORD)v46;
if ( v50 == v46 )
goto LABEL_27;
if ( (*(_BYTE *)(a1 + 10) & 0x20) != 0 )
{
if ( *v50 == 0xFF )
{
v24 = (unsigned __int16)__ROL2__(*(_WORD *)(v50 + 1), 8);
v50 += 3;
v23 = v50;
}
else
{
v23 = ++v50;
v24 = *v10;
}
v25 = *a3;
if ( v25 == 255 )
{
v25 = (unsigned __int16)__ROL2__(*(_WORD *)(a3 + 1), 8);
v26 = 3;
}
else
{
v26 = 1;
}
v27 = v24 - v25;
if ( v24 <= v25 )
goto LABEL_27;
v28 = v25;
bmove_upp(v23, v24 + v47, v24 - v25);
v29 = &v50[-v27 - v26];
v50 = v29;
if ( v28 > 0xFE )
{
*v29 = -1;
v50[2] = v28;
v50[1] = BYTE1(v28);
}
else
{
*v29 = v28;
}
v11 = (_DWORD)v50 - (_DWORD)a3;
}
else
{
v12 = *(_QWORD *)(a1 + 40);
v13 = *(_WORD *)(v12 + 18);
if ( (v13 & 2) == 0 )
goto LABEL_27;
v14 = *v50;
if ( (*v50 & 0x80u) == 0 )
goto LABEL_27;
v15 = *(_WORD *)(v12 + 20);
if ( v15 < 0x7Fu )
{
v16 = *a3;
v17 = *a3 & 0x7F;
if ( (*a3 & 0x7F) == 0 )
goto LABEL_27;
v18 = v14 & 0x7F;
v19 = 1;
v20 = 1LL;
}
else
{
v16 = *a3;
v17 = a3[1] | ((*a3 & 0x7F) << 8);
if ( !v17 )
{
LABEL_27:
memmove(a3, &a3[v11], (unsigned int)a5 - ((_DWORD)a3 + v11));
return v11;
}
v18 = v50[1] | ((v14 & 0x7F) << 8);
v19 = 2;
v20 = 2LL;
}
v31 = &v50[v20];
v50 += v20;
v32 = 0;
if ( v16 < 0 )
v32 = v17;
v33 = (unsigned __int8 *)(((v13 & 0x10) != 0) + v47);
v34 = *v33;
v35 = v33;
if ( v34 == 255 )
{
v34 = (unsigned __int16)__ROL2__(*(_WORD *)(v33 + 1), 8);
v36 = 3LL;
}
else
{
v36 = 1LL;
}
if ( v18 )
{
if ( *v31 == 0xFF )
{
v48 = (unsigned __int16)__ROL2__(*(_WORD *)(v31 + 1), 8);
v31 += 3;
v50 = v31;
}
else
{
v50 = v31 + 1;
v48 = *v31++;
}
v34 = v18;
}
else
{
v48 = 0;
}
v37 = v34 - v32;
if ( v34 < v32 )
goto LABEL_27;
v49 = v15;
v38 = v19;
bmove_upp(v31, &v35[v36 + v34], v37);
v39 = 2 * ((unsigned int)(v37 + v48) >= 0xFF) + 1;
if ( v16 >= 0 )
v39 = 0;
v40 = &v50[-(unsigned int)(v39 + v37 + v38)];
v11 = (_DWORD)v40 - (_DWORD)a3;
v50 = v40;
if ( v16 < 0 )
{
v43 = *a3;
v50 = v40 + 1;
*v40 = v43;
if ( v49 >= 0x7Fu )
{
v44 = a3[1];
v45 = v50++;
*v45 = v44;
}
LODWORD(a5) = (_DWORD)v46;
v42 = v37 + v48;
if ( (unsigned int)(v37 + v48) > 0xFE )
{
*v50 = -1;
v50[2] = v42;
v50[1] = HIBYTE(v42);
}
else
{
*v50 = v42;
}
goto LABEL_27;
}
v41 = ((*(_WORD *)(*(_QWORD *)(a1 + 40) + 18LL) & 0x10) != 0) + v37 + v48;
if ( v49 < 0x7Fu )
{
*v40 = v41;
}
else
{
v40[1] = v41;
*v50 = HIBYTE(v41);
}
}
LODWORD(a5) = (_DWORD)v46;
goto LABEL_27;
}
return 0;
}
|
remove_key:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R12,R9
MOV R14,RDX
MOV EBX,ESI
MOV R13,RDI
MOV qword ptr [RBP + -0x30],RDX
TEST byte ptr [RDI + 0xa],0x2e
JZ 0x0012f552
MOV R15,RCX
MOV qword ptr [RBP + -0x48],R8
LEA RDX,[RBP + -0x30]
MOV RDI,R13
MOV ESI,EBX
CALL qword ptr [R13 + 0x48]
TEST EAX,EAX
JZ 0x0012f589
MOV qword ptr [RBP + -0x40],R15
TEST R12,R12
SETZ AL
TEST EBX,EBX
SETZ CL
OR CL,AL
JNZ 0x0012f4ce
MOV RSI,qword ptr [RBP + -0x30]
MOV EDI,EBX
CALL 0x0013daca
MOV qword ptr [R12],RAX
LAB_0012f4ce:
MOV RDI,qword ptr [RBP + -0x30]
MOV R15D,EDI
SUB R15D,R14D
MOV R8,qword ptr [RBP + -0x48]
CMP RDI,R8
JZ 0x0012f636
TEST byte ptr [R13 + 0xa],0x20
JNZ 0x0012f591
MOV RDX,qword ptr [R13 + 0x28]
MOVZX ECX,word ptr [RDX + 0x12]
TEST CL,0x2
JZ 0x0012f636
MOVZX EAX,byte ptr [RDI]
TEST AL,AL
JNS 0x0012f636
MOVZX R10D,word ptr [RDX + 0x14]
CMP R10W,0x7f
JC 0x0012f65c
MOVZX EDX,byte ptr [R14 + 0x1]
MOVZX R12D,byte ptr [R14]
MOV ESI,R12D
AND ESI,0x7f
SHL ESI,0x8
OR ESI,EDX
JZ 0x0012f636
MOVZX EDX,byte ptr [RDI + 0x1]
AND EAX,0x7f
SHL EAX,0x8
OR EAX,EDX
MOV R11D,0x2
MOV EDX,0x2
JMP 0x0012f676
LAB_0012f552:
MOVZX R15D,word ptr [R13 + 0x12]
ADD R15D,EBX
TEST R12,R12
SETZ AL
TEST EBX,EBX
SETZ CL
OR CL,AL
JNZ 0x0012f636
MOVSXD RSI,R15D
ADD RSI,R14
MOV EDI,EBX
MOV RBX,R8
CALL 0x0013daca
MOV R8,RBX
MOV qword ptr [R12],RAX
JMP 0x0012f636
LAB_0012f589:
XOR R15D,R15D
JMP 0x0012f64a
LAB_0012f591:
CMP byte ptr [RDI],0xff
JZ 0x0012f5a3
LEA RAX,[RDI + 0x1]
MOV qword ptr [RBP + -0x30],RAX
MOVZX ECX,byte ptr [RDI]
JMP 0x0012f5b9
LAB_0012f5a3:
MOVZX EAX,word ptr [RDI + 0x1]
ROL AX,0x8
MOVZX ECX,AX
ADD RDI,0x3
MOV qword ptr [RBP + -0x30],RDI
MOV RAX,RDI
LAB_0012f5b9:
MOVZX EDX,byte ptr [R14]
CMP EDX,0xff
JZ 0x0012f5cd
MOV R12D,0x1
JMP 0x0012f5df
LAB_0012f5cd:
MOVZX EDX,word ptr [R14 + 0x1]
ROL DX,0x8
MOVZX EDX,DX
MOV R12D,0x3
LAB_0012f5df:
MOV EBX,ECX
SUB EBX,EDX
JBE 0x0012f636
MOV ECX,ECX
MOV RSI,qword ptr [RBP + -0x40]
ADD RSI,RCX
MOV RDI,RAX
MOV R15D,EDX
MOV RDX,RBX
CALL 0x001679cc
MOV ECX,R15D
ADD R12D,EBX
MOV RAX,qword ptr [RBP + -0x30]
SUB RAX,R12
MOV qword ptr [RBP + -0x30],RAX
CMP R15D,0xfe
JA 0x0012f61a
MOV byte ptr [RAX],CL
JMP 0x0012f62b
LAB_0012f61a:
MOV byte ptr [RAX],0xff
MOV RAX,qword ptr [RBP + -0x30]
MOV byte ptr [RAX + 0x2],CL
MOV RAX,qword ptr [RBP + -0x30]
MOV byte ptr [RAX + 0x1],CH
LAB_0012f62b:
MOV R15D,dword ptr [RBP + -0x30]
SUB R15D,R14D
LAB_0012f632:
MOV R8,qword ptr [RBP + -0x48]
LAB_0012f636:
MOVSXD RSI,R15D
ADD RSI,R14
SUB R8D,ESI
MOV RDI,R14
MOV RDX,R8
CALL 0x001286b0
LAB_0012f64a:
MOV EAX,R15D
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0012f65c:
MOVZX R12D,byte ptr [R14]
MOV ESI,R12D
AND ESI,0x7f
JZ 0x0012f636
AND EAX,0x7f
MOV R11D,0x1
MOV EDX,0x1
LAB_0012f676:
ADD RDI,RDX
MOV qword ptr [RBP + -0x30],RDI
XOR EDX,EDX
TEST R12B,R12B
CMOVS EDX,ESI
BT ECX,0x4
MOV RCX,qword ptr [RBP + -0x40]
ADC RCX,0x0
MOVZX ESI,byte ptr [RCX]
CMP ESI,0xff
JZ 0x0012f6a6
MOV R9,RCX
MOV ECX,0x1
JMP 0x0012f6b9
LAB_0012f6a6:
MOV R9,RCX
MOVZX ECX,word ptr [RCX + 0x1]
ROL CX,0x8
MOVZX ESI,CX
MOV ECX,0x3
LAB_0012f6b9:
TEST EAX,EAX
JZ 0x0012f6d5
CMP byte ptr [RDI],0xff
JZ 0x0012f6de
LEA RSI,[RDI + 0x1]
MOV qword ptr [RBP + -0x30],RSI
MOVZX EDI,byte ptr [RDI]
MOV dword ptr [RBP + -0x40],EDI
MOV RDI,RSI
JMP 0x0012f6f4
LAB_0012f6d5:
MOV dword ptr [RBP + -0x40],0x0
JMP 0x0012f6f6
LAB_0012f6de:
MOVZX ESI,word ptr [RDI + 0x1]
ROL SI,0x8
MOVZX ESI,SI
MOV dword ptr [RBP + -0x40],ESI
ADD RDI,0x3
MOV qword ptr [RBP + -0x30],RDI
LAB_0012f6f4:
MOV ESI,EAX
LAB_0012f6f6:
MOV EBX,ESI
SUB EBX,EDX
JC 0x0012f636
MOV word ptr [RBP + -0x32],R10W
ADD R9,RCX
MOV ESI,ESI
ADD RSI,R9
MOV RDX,RBX
MOV R15,R11
CALL 0x001679cc
MOV EDX,dword ptr [RBP + -0x40]
ADD EDX,EBX
XOR EAX,EAX
CMP EDX,0xff
SETNC AL
XOR ECX,ECX
TEST R12B,R12B
LEA EAX,[RAX + RAX*0x1 + 0x1]
CMOVNS EAX,ECX
ADD R15D,EBX
ADD R15D,EAX
MOV RAX,qword ptr [RBP + -0x30]
SUB RAX,R15
MOV R15D,EAX
SUB R15D,R14D
MOV qword ptr [RBP + -0x30],RAX
TEST R12B,R12B
JS 0x0012f774
MOV RCX,qword ptr [R13 + 0x28]
MOVZX ECX,word ptr [RCX + 0x12]
BT ECX,0x4
ADC EDX,0x0
CMP word ptr [RBP + -0x32],0x7f
JC 0x0012f7b5
MOV byte ptr [RAX + 0x1],DL
MOV RAX,qword ptr [RBP + -0x30]
MOV byte ptr [RAX],DH
JMP 0x0012f632
LAB_0012f774:
MOV ESI,EDX
LEA RCX,[RAX + 0x1]
MOV DL,byte ptr [R14]
MOV qword ptr [RBP + -0x30],RCX
MOV byte ptr [RAX],DL
CMP word ptr [RBP + -0x32],0x7f
JC 0x0012f79c
MOV AL,byte ptr [R14 + 0x1]
MOV RCX,qword ptr [RBP + -0x30]
LEA RDX,[RCX + 0x1]
MOV qword ptr [RBP + -0x30],RDX
MOV byte ptr [RCX],AL
LAB_0012f79c:
MOV ECX,ESI
CMP ESI,0xfe
MOV R8,qword ptr [RBP + -0x48]
JA 0x0012f7bc
MOV RAX,qword ptr [RBP + -0x30]
MOV byte ptr [RAX],CL
JMP 0x0012f636
LAB_0012f7b5:
MOV byte ptr [RAX],DL
JMP 0x0012f632
LAB_0012f7bc:
MOV RAX,qword ptr [RBP + -0x30]
MOV byte ptr [RAX],0xff
MOV RAX,qword ptr [RBP + -0x30]
MOV byte ptr [RAX + 0x2],CL
MOV RAX,qword ptr [RBP + -0x30]
MOV byte ptr [RAX + 0x1],CH
JMP 0x0012f636
|
int remove_key(long param_1,int param_2,byte *param_3,long param_4,byte *param_5,int8 *param_6
)
{
ushort uVar1;
ushort uVar2;
int iVar3;
uint uVar4;
int8 uVar5;
byte *pbVar6;
byte bVar7;
uint uVar8;
int iVar9;
long lVar10;
int iVar11;
uint uVar12;
ulong uVar13;
byte *pbVar14;
byte bVar15;
int iVar16;
byte *local_38;
local_38 = param_3;
if ((*(byte *)(param_1 + 10) & 0x2e) == 0) {
iVar3 = (uint)*(ushort *)(param_1 + 0x12) + param_2;
if (param_2 != 0 && param_6 != (int8 *)0x0) {
uVar5 = _mi_kpos(param_2,param_3 + iVar3);
*param_6 = uVar5;
}
}
else {
iVar3 = (**(code **)(param_1 + 0x48))(param_1,param_2,&local_38);
if (iVar3 == 0) {
return 0;
}
if (param_2 != 0 && param_6 != (int8 *)0x0) {
uVar5 = _mi_kpos(param_2,local_38);
*param_6 = uVar5;
}
iVar9 = (int)param_3;
iVar3 = (int)local_38 - iVar9;
if (local_38 != param_5) {
if ((*(byte *)(param_1 + 10) & 0x20) == 0) {
uVar1 = *(ushort *)(*(long *)(param_1 + 0x28) + 0x12);
if (((uVar1 & 2) != 0) && (bVar7 = *local_38, (char)bVar7 < '\0')) {
uVar2 = *(ushort *)(*(long *)(param_1 + 0x28) + 0x14);
if (uVar2 < 0x7f) {
bVar15 = *param_3;
uVar12 = bVar15 & 0x7f;
if ((bVar15 & 0x7f) == 0) goto LAB_0012f636;
uVar4 = bVar7 & 0x7f;
iVar16 = 1;
lVar10 = 1;
}
else {
bVar15 = *param_3;
uVar12 = (bVar15 & 0x7f) << 8 | (uint)param_3[1];
if (uVar12 == 0) goto LAB_0012f636;
uVar4 = (bVar7 & 0x7f) << 8 | (uint)local_38[1];
iVar16 = 2;
lVar10 = 2;
}
local_38 = local_38 + lVar10;
uVar8 = 0;
if ((char)bVar15 < '\0') {
uVar8 = uVar12;
}
pbVar6 = (byte *)(param_4 + (ulong)((uVar1 >> 4 & 1) != 0));
uVar13 = (ulong)*pbVar6;
if (*pbVar6 == 0xff) {
uVar13 = (ulong)(ushort)(*(ushort *)(pbVar6 + 1) << 8 | *(ushort *)(pbVar6 + 1) >> 8);
lVar10 = 3;
}
else {
lVar10 = 1;
}
if (uVar4 == 0) {
uVar12 = 0;
}
else {
if (*local_38 == 0xff) {
uVar12 = (uint)(ushort)(*(ushort *)(local_38 + 1) << 8 |
*(ushort *)(local_38 + 1) >> 8);
pbVar14 = local_38 + 3;
}
else {
pbVar14 = local_38 + 1;
uVar12 = (uint)*local_38;
}
uVar13 = (ulong)uVar4;
local_38 = pbVar14;
}
iVar11 = (uint)uVar13 - uVar8;
if (uVar8 <= (uint)uVar13) {
bmove_upp(local_38,pbVar6 + uVar13 + lVar10,iVar11);
uVar12 = uVar12 + iVar11;
iVar3 = (0xfe < uVar12) + 1 + (uint)(0xfe < uVar12);
if (-1 < (char)bVar15) {
iVar3 = 0;
}
pbVar6 = local_38 + -(ulong)(uint)(iVar16 + iVar11 + iVar3);
iVar3 = (int)pbVar6 - iVar9;
if ((char)bVar15 < '\0') {
*pbVar6 = *param_3;
local_38 = pbVar6 + 1;
if (0x7e < uVar2) {
local_38 = pbVar6 + 2;
pbVar6[1] = param_3[1];
}
if (uVar12 < 0xff) {
*local_38 = (byte)uVar12;
}
else {
*local_38 = 0xff;
local_38[2] = (byte)uVar12;
local_38[1] = (byte)(uVar12 >> 8);
}
}
else {
iVar9 = uVar12 + ((*(ushort *)(*(long *)(param_1 + 0x28) + 0x12) >> 4 & 1) != 0);
bVar7 = (byte)iVar9;
local_38 = pbVar6;
if (uVar2 < 0x7f) {
*pbVar6 = bVar7;
}
else {
pbVar6[1] = bVar7;
*pbVar6 = (byte)((uint)iVar9 >> 8);
}
}
}
}
}
else {
if (*local_38 == 0xff) {
uVar12 = (uint)(ushort)(*(ushort *)(local_38 + 1) << 8 | *(ushort *)(local_38 + 1) >> 8);
pbVar6 = local_38 + 3;
}
else {
pbVar6 = local_38 + 1;
uVar12 = (uint)*local_38;
}
uVar4 = (uint)*param_3;
if (*param_3 == 0xff) {
uVar4 = (uint)(ushort)(*(ushort *)(param_3 + 1) << 8 | *(ushort *)(param_3 + 1) >> 8);
iVar16 = 3;
}
else {
iVar16 = 1;
}
iVar11 = uVar12 - uVar4;
local_38 = pbVar6;
if (uVar4 <= uVar12 && iVar11 != 0) {
bmove_upp(pbVar6,param_4 + (ulong)uVar12,iVar11);
local_38 = local_38 + -(ulong)(uint)(iVar16 + iVar11);
if (uVar4 < 0xff) {
*local_38 = (byte)uVar4;
}
else {
*local_38 = 0xff;
local_38[2] = (byte)uVar4;
local_38[1] = (byte)(uVar4 >> 8);
}
iVar3 = (int)local_38 - iVar9;
}
}
}
}
LAB_0012f636:
memmove(param_3,param_3 + iVar3,(ulong)(uint)((int)param_5 - (int)(param_3 + iVar3)));
return iVar3;
}
|
|
20,198
|
test_conc217
|
eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c
|
static int test_conc217(MYSQL *mysql)
{
MYSQL_STMT *stmt= mysql_stmt_init(mysql);
int rc;
SKIP_MAXSCALE;
rc= mariadb_stmt_execute_direct(stmt, "SELECT 1 FROM nonexisting_table", -1);
FAIL_IF(rc==0, "Expected error\n");
rc= mysql_query(mysql, "drop table if exists t_count");
check_mysql_rc(rc, mysql);
mysql_stmt_close(stmt);
check_mysql_rc(rc, mysql);
return OK;
}
|
O0
|
c
|
test_conc217:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x44950
movq %rax, -0x18(%rbp)
cmpq $0x0, 0x6833f(%rip) # 0x811c0
je 0x18ea4
movq 0x68336(%rip), %rdi # 0x811c0
callq 0x3af90
movq %rax, %rdi
leaq 0x4d196(%rip), %rsi # 0x6602f
callq 0x14100
cmpq $0x0, %rax
jne 0x18ef6
leaq 0x4cb1f(%rip), %rdi # 0x659ca
callq 0x14550
cmpq $0x0, %rax
je 0x18f10
leaq 0x4cb0d(%rip), %rdi # 0x659ca
callq 0x14550
movq %rax, %rdi
leaq 0x4d189(%rip), %rsi # 0x66055
callq 0x14600
cmpl $0x0, %eax
je 0x18ef6
leaq 0x4caed(%rip), %rdi # 0x659ca
callq 0x14550
movq %rax, %rdi
leaq 0x4d14c(%rip), %rsi # 0x66038
callq 0x14600
cmpl $0x0, %eax
jne 0x18f10
leaq 0x4d145(%rip), %rdi # 0x66042
movb $0x0, %al
callq 0x2fc40
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x19024
movq -0x18(%rbp), %rdi
leaq 0x4dfef(%rip), %rsi # 0x66f0a
movq $-0x1, %rdx
callq 0x475e0
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x18f5d
leaq 0x4c659(%rip), %rdi # 0x65590
leaq 0x4dfec(%rip), %rsi # 0x66f2a
leaq 0x4d128(%rip), %rdx # 0x6606d
movl $0x11e5, %ecx # imm = 0x11E5
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x19024
jmp 0x18f5f
movq -0x10(%rbp), %rdi
leaq 0x4dfd0(%rip), %rsi # 0x66f3a
callq 0x38a70
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x18fc1
movl -0x1c(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3c3f0
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3c3c0
movl -0x2c(%rbp), %esi
movq -0x28(%rbp), %rdx
movl %eax, %ecx
leaq 0x4c731(%rip), %rdi # 0x656d5
leaq 0x4d0c2(%rip), %r8 # 0x6606d
movl $0x11e7, %r9d # imm = 0x11E7
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x19024
jmp 0x18fc3
movq -0x18(%rbp), %rdi
callq 0x43eb0
cmpl $0x0, -0x1c(%rbp)
je 0x1901b
movl -0x1c(%rbp), %eax
movl %eax, -0x3c(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3c3f0
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3c3c0
movl -0x3c(%rbp), %esi
movq -0x38(%rbp), %rdx
movl %eax, %ecx
leaq 0x4c6d7(%rip), %rdi # 0x656d5
leaq 0x4d068(%rip), %r8 # 0x6606d
movl $0x11e9, %r9d # imm = 0x11E9
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x19024
jmp 0x1901d
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
|
test_conc217:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov rdi, [rbp+var_10]
call mysql_stmt_init
mov [rbp+var_18], rax
cmp cs:mysql_default, 0
jz short loc_18EA4
mov rdi, cs:mysql_default
call mysql_get_server_info
mov rdi, rax
lea rsi, aMaxscale; "maxScale"
call _strstr
cmp rax, 0
jnz short loc_18EF6
loc_18EA4:
lea rdi, aSrv; "srv"
call _getenv
cmp rax, 0
jz short loc_18F10
lea rdi, aSrv; "srv"
call _getenv
mov rdi, rax
lea rsi, aTestDisabledWi+13h; "maxscale"
call _strcmp
cmp eax, 0
jz short loc_18EF6
lea rdi, aSrv; "srv"
call _getenv
mov rdi, rax
lea rsi, aSkysqlHa; "skysql-ha"
call _strcmp
cmp eax, 0
jnz short loc_18F10
loc_18EF6:
lea rdi, aTestDisabledWi; "test disabled with maxscale"
mov al, 0
call diag
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_19024
loc_18F10:
mov rdi, [rbp+var_18]
lea rsi, aSelect1FromNon; "SELECT 1 FROM nonexisting_table"
mov rdx, 0FFFFFFFFFFFFFFFFh
call mariadb_stmt_execute_direct
mov [rbp+var_1C], eax
cmp [rbp+var_1C], 0
jnz short loc_18F5D
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aExpectedError; "Expected error\n"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 11E5h
mov al, 0
call diag
mov [rbp+var_4], 1
jmp loc_19024
loc_18F5D:
jmp short $+2
loc_18F5F:
mov rdi, [rbp+var_10]
lea rsi, aDropTableIfExi_2; "drop table if exists t_count"
call mysql_query
mov [rbp+var_1C], eax
cmp [rbp+var_1C], 0
jz short loc_18FC1
mov eax, [rbp+var_1C]
mov [rbp+var_2C], eax
mov rdi, [rbp+var_10]
call mysql_error
mov [rbp+var_28], rax
mov rdi, [rbp+var_10]
call mysql_errno
mov esi, [rbp+var_2C]
mov rdx, [rbp+var_28]
mov ecx, eax
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov r9d, 11E7h
mov al, 0
call diag
mov [rbp+var_4], 1
jmp short loc_19024
loc_18FC1:
jmp short $+2
loc_18FC3:
mov rdi, [rbp+var_18]
call mysql_stmt_close
cmp [rbp+var_1C], 0
jz short loc_1901B
mov eax, [rbp+var_1C]
mov [rbp+var_3C], eax
mov rdi, [rbp+var_10]
call mysql_error
mov [rbp+var_38], rax
mov rdi, [rbp+var_10]
call mysql_errno
mov esi, [rbp+var_3C]
mov rdx, [rbp+var_38]
mov ecx, eax
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov r9d, 11E9h
mov al, 0
call diag
mov [rbp+var_4], 1
jmp short loc_19024
loc_1901B:
jmp short $+2
loc_1901D:
mov [rbp+var_4], 0
loc_19024:
mov eax, [rbp+var_4]
add rsp, 40h
pop rbp
retn
|
long long test_conc217(long long a1)
{
long long server_info; // rax
char *v2; // rsi
int v3; // edx
int v4; // ecx
int v5; // r8d
int v6; // r9d
long long v7; // rax
long long v8; // rax
int v9; // r8d
int v10; // r9d
int v11; // eax
int v13; // [rsp+18h] [rbp-28h]
int v14; // [rsp+24h] [rbp-1Ch]
long long v15; // [rsp+28h] [rbp-18h]
v15 = mysql_stmt_init(a1);
if ( mysql_default
&& (server_info = mysql_get_server_info(mysql_default), v2 = "maxScale", strstr(server_info, "maxScale"))
|| getenv("srv")
&& ((v7 = getenv("srv"), v2 = "maxscale", !(unsigned int)strcmp(v7, "maxscale"))
|| (v8 = getenv("srv"), v2 = "skysql-ha", !(unsigned int)strcmp(v8, "skysql-ha"))) )
{
diag((unsigned int)"test disabled with maxscale", (_DWORD)v2, v3, v4, v5, v6);
return (unsigned int)-1;
}
else if ( (unsigned int)mariadb_stmt_execute_direct(v15, "SELECT 1 FROM nonexisting_table", -1LL) )
{
v14 = mysql_query(a1, "drop table if exists t_count");
if ( v14 )
{
v13 = mysql_error(a1);
v11 = mysql_errno(a1);
diag(
(unsigned int)"Error (%d): %s (%d) in %s line %d",
v14,
v13,
v11,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
4583);
return 1;
}
else
{
mysql_stmt_close(v15);
return 0;
}
}
else
{
diag(
(unsigned int)"Error: %s (%s: %d)",
(unsigned int)"Expected error\n",
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
4581,
v9,
v10);
return 1;
}
}
|
test_conc217:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00144950
MOV qword ptr [RBP + -0x18],RAX
CMP qword ptr [0x001811c0],0x0
JZ 0x00118ea4
MOV RDI,qword ptr [0x001811c0]
CALL 0x0013af90
MOV RDI,RAX
LEA RSI,[0x16602f]
CALL 0x00114100
CMP RAX,0x0
JNZ 0x00118ef6
LAB_00118ea4:
LEA RDI,[0x1659ca]
CALL 0x00114550
CMP RAX,0x0
JZ 0x00118f10
LEA RDI,[0x1659ca]
CALL 0x00114550
MOV RDI,RAX
LEA RSI,[0x166055]
CALL 0x00114600
CMP EAX,0x0
JZ 0x00118ef6
LEA RDI,[0x1659ca]
CALL 0x00114550
MOV RDI,RAX
LEA RSI,[0x166038]
CALL 0x00114600
CMP EAX,0x0
JNZ 0x00118f10
LAB_00118ef6:
LEA RDI,[0x166042]
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x00119024
LAB_00118f10:
MOV RDI,qword ptr [RBP + -0x18]
LEA RSI,[0x166f0a]
MOV RDX,-0x1
CALL 0x001475e0
MOV dword ptr [RBP + -0x1c],EAX
CMP dword ptr [RBP + -0x1c],0x0
JNZ 0x00118f5d
LEA RDI,[0x165590]
LEA RSI,[0x166f2a]
LEA RDX,[0x16606d]
MOV ECX,0x11e5
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00119024
LAB_00118f5d:
JMP 0x00118f5f
LAB_00118f5f:
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x166f3a]
CALL 0x00138a70
MOV dword ptr [RBP + -0x1c],EAX
CMP dword ptr [RBP + -0x1c],0x0
JZ 0x00118fc1
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x2c],EAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013c3f0
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013c3c0
MOV ESI,dword ptr [RBP + -0x2c]
MOV RDX,qword ptr [RBP + -0x28]
MOV ECX,EAX
LEA RDI,[0x1656d5]
LEA R8,[0x16606d]
MOV R9D,0x11e7
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00119024
LAB_00118fc1:
JMP 0x00118fc3
LAB_00118fc3:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00143eb0
CMP dword ptr [RBP + -0x1c],0x0
JZ 0x0011901b
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x3c],EAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013c3f0
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013c3c0
MOV ESI,dword ptr [RBP + -0x3c]
MOV RDX,qword ptr [RBP + -0x38]
MOV ECX,EAX
LEA RDI,[0x1656d5]
LEA R8,[0x16606d]
MOV R9D,0x11e9
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00119024
LAB_0011901b:
JMP 0x0011901d
LAB_0011901d:
MOV dword ptr [RBP + -0x4],0x0
LAB_00119024:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x40
POP RBP
RET
|
/* WARNING: Removing unreachable block (ram,0x00118fd2) */
int4 test_conc217(int8 param_1)
{
int iVar1;
int4 uVar2;
int8 uVar3;
char *pcVar4;
uVar3 = mysql_stmt_init(param_1);
if (mysql_default != 0) {
pcVar4 = (char *)mysql_get_server_info(mysql_default);
pcVar4 = strstr(pcVar4,"maxScale");
if (pcVar4 != (char *)0x0) goto LAB_00118ef6;
}
pcVar4 = getenv("srv");
if (pcVar4 != (char *)0x0) {
pcVar4 = getenv("srv");
iVar1 = strcmp(pcVar4,"maxscale");
if (iVar1 != 0) {
pcVar4 = getenv("srv");
iVar1 = strcmp(pcVar4,"skysql-ha");
if (iVar1 != 0) goto LAB_00118f10;
}
LAB_00118ef6:
diag("test disabled with maxscale");
return 0xffffffff;
}
LAB_00118f10:
iVar1 = mariadb_stmt_execute_direct(uVar3,"SELECT 1 FROM nonexisting_table",0xffffffffffffffff);
if (iVar1 == 0) {
diag("Error: %s (%s: %d)","Expected error\n",
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",0x11e5)
;
return 1;
}
iVar1 = mysql_query(param_1,"drop table if exists t_count");
if (iVar1 != 0) {
uVar3 = mysql_error(param_1);
uVar2 = mysql_errno(param_1);
diag("Error (%d): %s (%d) in %s line %d",iVar1,uVar3,uVar2,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",0x11e7)
;
return 1;
}
mysql_stmt_close(uVar3);
return 0;
}
|
|
20,199
|
test_conc217
|
eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c
|
static int test_conc217(MYSQL *mysql)
{
MYSQL_STMT *stmt= mysql_stmt_init(mysql);
int rc;
SKIP_MAXSCALE;
rc= mariadb_stmt_execute_direct(stmt, "SELECT 1 FROM nonexisting_table", -1);
FAIL_IF(rc==0, "Expected error\n");
rc= mysql_query(mysql, "drop table if exists t_count");
check_mysql_rc(rc, mysql);
mysql_stmt_close(stmt);
check_mysql_rc(rc, mysql);
return OK;
}
|
O3
|
c
|
test_conc217:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x322b8
movq %rax, %r14
movq 0x4b173(%rip), %rdi # 0x62ce0
testq %rdi, %rdi
je 0x17b8f
callq 0x2d402
leaq 0x2f101(%rip), %rsi # 0x46c7f
movq %rax, %rdi
callq 0x14100
testq %rax, %rax
jne 0x17c31
leaq 0x2ea84(%rip), %rdi # 0x4661a
callq 0x145b0
testq %rax, %rax
je 0x17bc9
movq %rax, %r15
leaq 0x2f0fb(%rip), %rsi # 0x46ca5
movq %rax, %rdi
callq 0x14660
testl %eax, %eax
je 0x17c31
leaq 0x2f0cb(%rip), %rsi # 0x46c88
movq %r15, %rdi
callq 0x14660
testl %eax, %eax
je 0x17c31
leaq 0x2ff8a(%rip), %rsi # 0x47b5a
movq %r14, %rdi
movq $-0x1, %rdx
callq 0x33c38
testl %eax, %eax
je 0x17c46
leaq 0x2ffa0(%rip), %rsi # 0x47b8a
movq %rbx, %rdi
callq 0x2bbf9
testl %eax, %eax
je 0x17c6e
movl %eax, %r15d
movq %rbx, %rdi
callq 0x2dc72
movq %rax, %r14
movq %rbx, %rdi
callq 0x2dc5d
leaq 0x2e712(%rip), %rdi # 0x46325
leaq 0x2f0a3(%rip), %r8 # 0x46cbd
movl %r15d, %esi
movq %r14, %rdx
movl %eax, %ecx
movl $0x11e7, %r9d # imm = 0x11E7
xorl %eax, %eax
callq 0x264ef
jmp 0x17c67
leaq 0x2f05a(%rip), %rdi # 0x46c92
xorl %eax, %eax
callq 0x264ef
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
jmp 0x17c78
leaq 0x2e593(%rip), %rdi # 0x461e0
leaq 0x2ff26(%rip), %rsi # 0x47b7a
leaq 0x2f062(%rip), %rdx # 0x46cbd
movl $0x11e5, %ecx # imm = 0x11E5
xorl %eax, %eax
callq 0x264ef
movl $0x1, %eax
jmp 0x17c78
movq %r14, %rdi
callq 0x31cc9
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
test_conc217:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rdi
call mysql_stmt_init
mov r14, rax
mov rdi, cs:mysql_default
test rdi, rdi
jz short loc_17B8F
call mysql_get_server_info
lea rsi, aMaxscale; "maxScale"
mov rdi, rax
call _strstr
test rax, rax
jnz loc_17C31
loc_17B8F:
lea rdi, aSrv; "srv"
call _getenv
test rax, rax
jz short loc_17BC9
mov r15, rax
lea rsi, aTestDisabledWi+13h; "maxscale"
mov rdi, rax
call _strcmp
test eax, eax
jz short loc_17C31
lea rsi, aSkysqlHa; "skysql-ha"
mov rdi, r15
call _strcmp
test eax, eax
jz short loc_17C31
loc_17BC9:
lea rsi, aSelect1FromNon; "SELECT 1 FROM nonexisting_table"
mov rdi, r14
mov rdx, 0FFFFFFFFFFFFFFFFh
call mariadb_stmt_execute_direct
test eax, eax
jz short loc_17C46
lea rsi, aDropTableIfExi_2; "drop table if exists t_count"
mov rdi, rbx
call mysql_query
test eax, eax
jz short loc_17C6E
mov r15d, eax
mov rdi, rbx
call mysql_error
mov r14, rax
mov rdi, rbx
call mysql_errno
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, r15d
mov rdx, r14
mov ecx, eax
mov r9d, 11E7h
xor eax, eax
call diag
jmp short loc_17C67
loc_17C31:
lea rdi, aTestDisabledWi; "test disabled with maxscale"
xor eax, eax
call diag
mov eax, 0FFFFFFFFh
jmp short loc_17C78
loc_17C46:
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aExpectedError; "Expected error\n"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 11E5h
xor eax, eax
call diag
loc_17C67:
mov eax, 1
jmp short loc_17C78
loc_17C6E:
mov rdi, r14
call mysql_stmt_close
xor eax, eax
loc_17C78:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long test_conc217(long long a1)
{
long long v1; // r14
long long server_info; // rax
char *v3; // rsi
int v4; // edx
int v5; // ecx
int v6; // r8d
int v7; // r9d
long long v8; // rax
long long v9; // r15
int v10; // r8d
int v11; // r9d
int v12; // eax
int v13; // r15d
int v14; // r14d
int v15; // eax
v1 = mysql_stmt_init(a1);
if ( mysql_default
&& (server_info = mysql_get_server_info(mysql_default), v3 = "maxScale", strstr(server_info, "maxScale"))
|| (v8 = getenv("srv")) != 0
&& ((v9 = v8, v3 = "maxscale", !(unsigned int)strcmp(v8, "maxscale"))
|| (v3 = "skysql-ha", !(unsigned int)strcmp(v9, "skysql-ha"))) )
{
diag((unsigned int)"test disabled with maxscale", (_DWORD)v3, v4, v5, v6, v7);
return 0xFFFFFFFFLL;
}
if ( !(unsigned int)mariadb_stmt_execute_direct(v1, "SELECT 1 FROM nonexisting_table", -1LL) )
{
diag(
(unsigned int)"Error: %s (%s: %d)",
(unsigned int)"Expected error\n",
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
4581,
v10,
v11);
return 1LL;
}
v12 = mysql_query(a1, "drop table if exists t_count");
if ( v12 )
{
v13 = v12;
v14 = mysql_error(a1);
v15 = mysql_errno(a1);
diag(
(unsigned int)"Error (%d): %s (%d) in %s line %d",
v13,
v14,
v15,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
4583);
return 1LL;
}
mysql_stmt_close(v1);
return 0LL;
}
|
test_conc217:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
CALL 0x001322b8
MOV R14,RAX
MOV RDI,qword ptr [0x00162ce0]
TEST RDI,RDI
JZ 0x00117b8f
CALL 0x0012d402
LEA RSI,[0x146c7f]
MOV RDI,RAX
CALL 0x00114100
TEST RAX,RAX
JNZ 0x00117c31
LAB_00117b8f:
LEA RDI,[0x14661a]
CALL 0x001145b0
TEST RAX,RAX
JZ 0x00117bc9
MOV R15,RAX
LEA RSI,[0x146ca5]
MOV RDI,RAX
CALL 0x00114660
TEST EAX,EAX
JZ 0x00117c31
LEA RSI,[0x146c88]
MOV RDI,R15
CALL 0x00114660
TEST EAX,EAX
JZ 0x00117c31
LAB_00117bc9:
LEA RSI,[0x147b5a]
MOV RDI,R14
MOV RDX,-0x1
CALL 0x00133c38
TEST EAX,EAX
JZ 0x00117c46
LEA RSI,[0x147b8a]
MOV RDI,RBX
CALL 0x0012bbf9
TEST EAX,EAX
JZ 0x00117c6e
MOV R15D,EAX
MOV RDI,RBX
CALL 0x0012dc72
MOV R14,RAX
MOV RDI,RBX
CALL 0x0012dc5d
LEA RDI,[0x146325]
LEA R8,[0x146cbd]
MOV ESI,R15D
MOV RDX,R14
MOV ECX,EAX
MOV R9D,0x11e7
XOR EAX,EAX
CALL 0x001264ef
JMP 0x00117c67
LAB_00117c31:
LEA RDI,[0x146c92]
XOR EAX,EAX
CALL 0x001264ef
MOV EAX,0xffffffff
JMP 0x00117c78
LAB_00117c46:
LEA RDI,[0x1461e0]
LEA RSI,[0x147b7a]
LEA RDX,[0x146cbd]
MOV ECX,0x11e5
XOR EAX,EAX
CALL 0x001264ef
LAB_00117c67:
MOV EAX,0x1
JMP 0x00117c78
LAB_00117c6e:
MOV RDI,R14
CALL 0x00131cc9
XOR EAX,EAX
LAB_00117c78:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
int8 test_conc217(int8 param_1)
{
int iVar1;
int4 uVar2;
int8 uVar3;
char *pcVar4;
uVar3 = mysql_stmt_init();
if (mysql_default != 0) {
pcVar4 = (char *)mysql_get_server_info();
pcVar4 = strstr(pcVar4,"maxScale");
if (pcVar4 != (char *)0x0) goto LAB_00117c31;
}
pcVar4 = getenv("srv");
if ((pcVar4 == (char *)0x0) ||
((iVar1 = strcmp(pcVar4,"maxscale"), iVar1 != 0 &&
(iVar1 = strcmp(pcVar4,"skysql-ha"), iVar1 != 0)))) {
iVar1 = mariadb_stmt_execute_direct(uVar3,"SELECT 1 FROM nonexisting_table",0xffffffffffffffff);
if (iVar1 == 0) {
diag("Error: %s (%s: %d)","Expected error\n",
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
0x11e5);
}
else {
iVar1 = mysql_query(param_1,"drop table if exists t_count");
if (iVar1 == 0) {
mysql_stmt_close(uVar3);
return 0;
}
uVar3 = mysql_error(param_1);
uVar2 = mysql_errno(param_1);
diag("Error (%d): %s (%d) in %s line %d",iVar1,uVar3,uVar2,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
0x11e7);
}
return 1;
}
LAB_00117c31:
diag("test disabled with maxscale");
return 0xffffffff;
}
|
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.