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
|
|---|---|---|---|---|---|---|---|---|---|---|---|
14,600
|
create_fromuni
|
eloqsql/strings/ctype-simple.c
|
static my_bool
create_fromuni(struct charset_info_st *cs,
MY_CHARSET_LOADER *loader)
{
uni_idx idx[PLANE_NUM];
int i,n;
/*
Check that Unicode map is loaded.
It can be not loaded when the collation is
listed in Index.xml but not specified
in the character set specific XML file.
*/
if (!cs->tab_to_uni)
return TRUE;
/* Clear plane statistics */
bzero(idx,sizeof(idx));
/* Count number of characters in each plane */
for (i=0; i< 0x100; i++)
{
uint16 wc=cs->tab_to_uni[i];
int pl= PLANE_NUMBER(wc);
if (wc || !i)
{
if (!idx[pl].nchars)
{
idx[pl].uidx.from=wc;
idx[pl].uidx.to=wc;
}else
{
idx[pl].uidx.from=wc<idx[pl].uidx.from?wc:idx[pl].uidx.from;
idx[pl].uidx.to=wc>idx[pl].uidx.to?wc:idx[pl].uidx.to;
}
idx[pl].nchars++;
}
}
/* Sort planes in descending order */
qsort(&idx,PLANE_NUM,sizeof(uni_idx),&pcmp);
for (i=0; i < PLANE_NUM; i++)
{
int ch,numchars;
uchar *tab;
/* Skip empty plane */
if (!idx[i].nchars)
break;
numchars=idx[i].uidx.to-idx[i].uidx.from+1;
if (!(idx[i].uidx.tab= tab= (uchar*)
(loader->once_alloc) (numchars *
sizeof(*idx[i].uidx.tab))))
return TRUE;
bzero(tab,numchars*sizeof(*tab));
for (ch=1; ch < PLANE_SIZE; ch++)
{
uint16 wc=cs->tab_to_uni[ch];
if (wc >= idx[i].uidx.from && wc <= idx[i].uidx.to && wc)
{
int ofs= wc - idx[i].uidx.from;
if (!tab[ofs] || tab[ofs] > 0x7F) /* Prefer ASCII*/
{
/*
Some character sets can have double encoding. For example,
in ARMSCII8, the following characters are encoded twice:
Encoding#1 Encoding#2 Unicode Character Name
---------- ---------- ------- --------------
0x27 0xFF U+0027 APOSTROPHE
0x28 0xA5 U+0028 LEFT PARENTHESIS
0x29 0xA4 U+0029 RIGHT PARENTHESIS
0x2C 0xAB U+002C COMMA
0x2D 0xAC U+002D HYPHEN-MINUS
0x2E 0xA9 U+002E FULL STOP
That is, both 0x27 and 0xFF convert to Unicode U+0027.
When converting back from Unicode to ARMSCII,
we prefer the ASCII range, that is we want U+0027
to convert to 0x27 rather than to 0xFF.
*/
tab[ofs]= ch;
}
}
}
}
/* Allocate and fill reverse table for each plane */
n=i;
if (!(cs->tab_from_uni= (MY_UNI_IDX *)
(loader->once_alloc)(sizeof(MY_UNI_IDX) * (n + 1))))
return TRUE;
for (i=0; i< n; i++)
((struct my_uni_idx_st*)cs->tab_from_uni)[i]= idx[i].uidx;
/* Set end-of-list marker */
bzero((char*) &cs->tab_from_uni[i],sizeof(MY_UNI_IDX));
return FALSE;
}
|
O0
|
c
|
create_fromuni:
pushq %rbp
movq %rsp, %rbp
subq $0x1850, %rsp # imm = 0x1850
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x68(%rax)
jne 0x48d07
movb $0x1, -0x1(%rbp)
jmp 0x491da
leaq -0x1820(%rbp), %rdi
xorl %esi, %esi
movl $0x1800, %edx # imm = 0x1800
callq 0x241b0
movl $0x0, -0x1824(%rbp)
cmpl $0x100, -0x1824(%rbp) # imm = 0x100
jge 0x48ef8
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rax
movslq -0x1824(%rbp), %rcx
movw (%rax,%rcx,2), %ax
movw %ax, -0x182a(%rbp)
movzwl -0x182a(%rbp), %eax
sarl $0x8, %eax
movl $0x100, %ecx # imm = 0x100
cltd
idivl %ecx
movl %edx, -0x1830(%rbp)
movzwl -0x182a(%rbp), %eax
cmpl $0x0, %eax
jne 0x48d7f
cmpl $0x0, -0x1824(%rbp)
jne 0x48ee2
movslq -0x1830(%rbp), %rcx
leaq -0x1820(%rbp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, (%rax)
jne 0x48dde
movw -0x182a(%rbp), %cx
movslq -0x1830(%rbp), %rdx
leaq -0x1820(%rbp), %rax
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movw %cx, 0x8(%rax)
movw -0x182a(%rbp), %cx
movslq -0x1830(%rbp), %rdx
leaq -0x1820(%rbp), %rax
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movw %cx, 0xa(%rax)
jmp 0x48ec6
movzwl -0x182a(%rbp), %eax
movslq -0x1830(%rbp), %rdx
leaq -0x1820(%rbp), %rcx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movzwl 0x8(%rcx), %ecx
cmpl %ecx, %eax
jge 0x48e11
movzwl -0x182a(%rbp), %eax
movl %eax, -0x184c(%rbp)
jmp 0x48e30
movslq -0x1830(%rbp), %rcx
leaq -0x1820(%rbp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movzwl 0x8(%rax), %eax
movl %eax, -0x184c(%rbp)
movl -0x184c(%rbp), %eax
movw %ax, %cx
movslq -0x1830(%rbp), %rdx
leaq -0x1820(%rbp), %rax
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movw %cx, 0x8(%rax)
movzwl -0x182a(%rbp), %eax
movslq -0x1830(%rbp), %rdx
leaq -0x1820(%rbp), %rcx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movzwl 0xa(%rcx), %ecx
cmpl %ecx, %eax
jle 0x48e85
movzwl -0x182a(%rbp), %eax
movl %eax, -0x1850(%rbp)
jmp 0x48ea4
movslq -0x1830(%rbp), %rcx
leaq -0x1820(%rbp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movzwl 0xa(%rax), %eax
movl %eax, -0x1850(%rbp)
movl -0x1850(%rbp), %eax
movw %ax, %cx
movslq -0x1830(%rbp), %rdx
leaq -0x1820(%rbp), %rax
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movw %cx, 0xa(%rax)
movslq -0x1830(%rbp), %rcx
leaq -0x1820(%rbp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x48ee4
movl -0x1824(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1824(%rbp)
jmp 0x48d24
leaq -0x1820(%rbp), %rdi
movl $0x100, %esi # imm = 0x100
movl $0x18, %edx
leaq 0x2e0(%rip), %rcx # 0x491f0
callq 0x24620
movl $0x0, -0x1824(%rbp)
cmpl $0x100, -0x1824(%rbp) # imm = 0x100
jge 0x49111
movslq -0x1824(%rbp), %rcx
leaq -0x1820(%rbp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, (%rax)
jne 0x48f4e
jmp 0x49111
movslq -0x1824(%rbp), %rcx
leaq -0x1820(%rbp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movzwl 0xa(%rax), %eax
movslq -0x1824(%rbp), %rdx
leaq -0x1820(%rbp), %rcx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movzwl 0x8(%rcx), %ecx
subl %ecx, %eax
addl $0x1, %eax
movl %eax, -0x1838(%rbp)
movq -0x18(%rbp), %rax
movq 0x80(%rax), %rax
movslq -0x1838(%rbp), %rdi
shlq $0x0, %rdi
callq *%rax
movq %rax, -0x1840(%rbp)
movslq -0x1824(%rbp), %rdx
leaq -0x1820(%rbp), %rcx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movq %rax, 0x10(%rcx)
cmpq $0x0, %rax
jne 0x48fd2
movb $0x1, -0x1(%rbp)
jmp 0x491da
movq -0x1840(%rbp), %rdi
movslq -0x1838(%rbp), %rdx
shlq $0x0, %rdx
xorl %esi, %esi
callq 0x241b0
movl $0x1, -0x1834(%rbp)
cmpl $0x100, -0x1834(%rbp) # imm = 0x100
jge 0x490fb
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rax
movslq -0x1834(%rbp), %rcx
movw (%rax,%rcx,2), %ax
movw %ax, -0x1842(%rbp)
movzwl -0x1842(%rbp), %eax
movslq -0x1824(%rbp), %rdx
leaq -0x1820(%rbp), %rcx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movzwl 0x8(%rcx), %ecx
cmpl %ecx, %eax
jl 0x490e5
movzwl -0x1842(%rbp), %eax
movslq -0x1824(%rbp), %rdx
leaq -0x1820(%rbp), %rcx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movzwl 0xa(%rcx), %ecx
cmpl %ecx, %eax
jg 0x490e5
movzwl -0x1842(%rbp), %eax
cmpl $0x0, %eax
je 0x490e5
movzwl -0x1842(%rbp), %eax
movslq -0x1824(%rbp), %rdx
leaq -0x1820(%rbp), %rcx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movzwl 0x8(%rcx), %ecx
subl %ecx, %eax
movl %eax, -0x1848(%rbp)
movq -0x1840(%rbp), %rax
movslq -0x1848(%rbp), %rcx
cmpb $0x0, (%rax,%rcx)
je 0x490ca
movq -0x1840(%rbp), %rax
movslq -0x1848(%rbp), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x7f, %eax
jle 0x490e3
movl -0x1834(%rbp), %eax
movb %al, %dl
movq -0x1840(%rbp), %rax
movslq -0x1848(%rbp), %rcx
movb %dl, (%rax,%rcx)
jmp 0x490e5
jmp 0x490e7
movl -0x1834(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1834(%rbp)
jmp 0x48ff5
jmp 0x490fd
movl -0x1824(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1824(%rbp)
jmp 0x48f1f
movl -0x1824(%rbp), %eax
movl %eax, -0x1828(%rbp)
movq -0x18(%rbp), %rax
movq 0x80(%rax), %rax
movl -0x1828(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rdi
shlq $0x4, %rdi
callq *%rax
movq -0x10(%rbp), %rcx
movq %rax, 0x70(%rcx)
cmpq $0x0, %rax
jne 0x49151
movb $0x1, -0x1(%rbp)
jmp 0x491da
movl $0x0, -0x1824(%rbp)
movl -0x1824(%rbp), %eax
cmpl -0x1828(%rbp), %eax
jge 0x491b4
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rax
movslq -0x1824(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movslq -0x1824(%rbp), %rdx
leaq -0x1820(%rbp), %rcx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movq 0x8(%rcx), %rdx
movq %rdx, (%rax)
movq 0x10(%rcx), %rcx
movq %rcx, 0x8(%rax)
movl -0x1824(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1824(%rbp)
jmp 0x4915b
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rdi
movslq -0x1824(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x241b0
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x1850, %rsp # imm = 0x1850
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
create_fromuni:
push rbp
mov rbp, rsp
sub rsp, 1850h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
cmp qword ptr [rax+68h], 0
jnz short loc_48D07
mov [rbp+var_1], 1
jmp loc_491DA
loc_48D07:
lea rdi, [rbp+var_1820]
xor esi, esi
mov edx, 1800h
call _memset
mov [rbp+var_1824], 0
loc_48D24:
cmp [rbp+var_1824], 100h
jge loc_48EF8
mov rax, [rbp+var_10]
mov rax, [rax+68h]
movsxd rcx, [rbp+var_1824]
mov ax, [rax+rcx*2]
mov [rbp+var_182A], ax
movzx eax, [rbp+var_182A]
sar eax, 8
mov ecx, 100h
cdq
idiv ecx
mov [rbp+var_1830], edx
movzx eax, [rbp+var_182A]
cmp eax, 0
jnz short loc_48D7F
cmp [rbp+var_1824], 0
jnz loc_48EE2
loc_48D7F:
movsxd rcx, [rbp+var_1830]
lea rax, [rbp+var_1820]
imul rcx, 18h
add rax, rcx
cmp dword ptr [rax], 0
jnz short loc_48DDE
mov cx, [rbp+var_182A]
movsxd rdx, [rbp+var_1830]
lea rax, [rbp+var_1820]
imul rdx, 18h
add rax, rdx
mov [rax+8], cx
mov cx, [rbp+var_182A]
movsxd rdx, [rbp+var_1830]
lea rax, [rbp+var_1820]
imul rdx, 18h
add rax, rdx
mov [rax+0Ah], cx
jmp loc_48EC6
loc_48DDE:
movzx eax, [rbp+var_182A]
movsxd rdx, [rbp+var_1830]
lea rcx, [rbp+var_1820]
imul rdx, 18h
add rcx, rdx
movzx ecx, word ptr [rcx+8]
cmp eax, ecx
jge short loc_48E11
movzx eax, [rbp+var_182A]
mov [rbp+var_184C], eax
jmp short loc_48E30
loc_48E11:
movsxd rcx, [rbp+var_1830]
lea rax, [rbp+var_1820]
imul rcx, 18h
add rax, rcx
movzx eax, word ptr [rax+8]
mov [rbp+var_184C], eax
loc_48E30:
mov eax, [rbp+var_184C]
mov cx, ax
movsxd rdx, [rbp+var_1830]
lea rax, [rbp+var_1820]
imul rdx, 18h
add rax, rdx
mov [rax+8], cx
movzx eax, [rbp+var_182A]
movsxd rdx, [rbp+var_1830]
lea rcx, [rbp+var_1820]
imul rdx, 18h
add rcx, rdx
movzx ecx, word ptr [rcx+0Ah]
cmp eax, ecx
jle short loc_48E85
movzx eax, [rbp+var_182A]
mov [rbp+var_1850], eax
jmp short loc_48EA4
loc_48E85:
movsxd rcx, [rbp+var_1830]
lea rax, [rbp+var_1820]
imul rcx, 18h
add rax, rcx
movzx eax, word ptr [rax+0Ah]
mov [rbp+var_1850], eax
loc_48EA4:
mov eax, [rbp+var_1850]
mov cx, ax
movsxd rdx, [rbp+var_1830]
lea rax, [rbp+var_1820]
imul rdx, 18h
add rax, rdx
mov [rax+0Ah], cx
loc_48EC6:
movsxd rcx, [rbp+var_1830]
lea rax, [rbp+var_1820]
imul rcx, 18h
add rax, rcx
mov ecx, [rax]
add ecx, 1
mov [rax], ecx
loc_48EE2:
jmp short $+2
loc_48EE4:
mov eax, [rbp+var_1824]
add eax, 1
mov [rbp+var_1824], eax
jmp loc_48D24
loc_48EF8:
lea rdi, [rbp+var_1820]
mov esi, 100h
mov edx, 18h
lea rcx, pcmp
call _qsort
mov [rbp+var_1824], 0
loc_48F1F:
cmp [rbp+var_1824], 100h
jge loc_49111
movsxd rcx, [rbp+var_1824]
lea rax, [rbp+var_1820]
imul rcx, 18h
add rax, rcx
cmp dword ptr [rax], 0
jnz short loc_48F4E
jmp loc_49111
loc_48F4E:
movsxd rcx, [rbp+var_1824]
lea rax, [rbp+var_1820]
imul rcx, 18h
add rax, rcx
movzx eax, word ptr [rax+0Ah]
movsxd rdx, [rbp+var_1824]
lea rcx, [rbp+var_1820]
imul rdx, 18h
add rcx, rdx
movzx ecx, word ptr [rcx+8]
sub eax, ecx
add eax, 1
mov [rbp+var_1838], eax
mov rax, [rbp+var_18]
mov rax, [rax+80h]
movsxd rdi, [rbp+var_1838]
shl rdi, 0
call rax
mov [rbp+var_1840], rax
movsxd rdx, [rbp+var_1824]
lea rcx, [rbp+var_1820]
imul rdx, 18h
add rcx, rdx
mov [rcx+10h], rax
cmp rax, 0
jnz short loc_48FD2
mov [rbp+var_1], 1
jmp loc_491DA
loc_48FD2:
mov rdi, [rbp+var_1840]
movsxd rdx, [rbp+var_1838]
shl rdx, 0
xor esi, esi
call _memset
mov [rbp+var_1834], 1
loc_48FF5:
cmp [rbp+var_1834], 100h
jge loc_490FB
mov rax, [rbp+var_10]
mov rax, [rax+68h]
movsxd rcx, [rbp+var_1834]
mov ax, [rax+rcx*2]
mov [rbp+var_1842], ax
movzx eax, [rbp+var_1842]
movsxd rdx, [rbp+var_1824]
lea rcx, [rbp+var_1820]
imul rdx, 18h
add rcx, rdx
movzx ecx, word ptr [rcx+8]
cmp eax, ecx
jl loc_490E5
movzx eax, [rbp+var_1842]
movsxd rdx, [rbp+var_1824]
lea rcx, [rbp+var_1820]
imul rdx, 18h
add rcx, rdx
movzx ecx, word ptr [rcx+0Ah]
cmp eax, ecx
jg short loc_490E5
movzx eax, [rbp+var_1842]
cmp eax, 0
jz short loc_490E5
movzx eax, [rbp+var_1842]
movsxd rdx, [rbp+var_1824]
lea rcx, [rbp+var_1820]
imul rdx, 18h
add rcx, rdx
movzx ecx, word ptr [rcx+8]
sub eax, ecx
mov [rbp+var_1848], eax
mov rax, [rbp+var_1840]
movsxd rcx, [rbp+var_1848]
cmp byte ptr [rax+rcx], 0
jz short loc_490CA
mov rax, [rbp+var_1840]
movsxd rcx, [rbp+var_1848]
movzx eax, byte ptr [rax+rcx]
cmp eax, 7Fh
jle short loc_490E3
loc_490CA:
mov eax, [rbp+var_1834]
mov dl, al
mov rax, [rbp+var_1840]
movsxd rcx, [rbp+var_1848]
mov [rax+rcx], dl
loc_490E3:
jmp short $+2
loc_490E5:
jmp short $+2
loc_490E7:
mov eax, [rbp+var_1834]
add eax, 1
mov [rbp+var_1834], eax
jmp loc_48FF5
loc_490FB:
jmp short $+2
loc_490FD:
mov eax, [rbp+var_1824]
add eax, 1
mov [rbp+var_1824], eax
jmp loc_48F1F
loc_49111:
mov eax, [rbp+var_1824]
mov [rbp+var_1828], eax
mov rax, [rbp+var_18]
mov rax, [rax+80h]
mov ecx, [rbp+var_1828]
add ecx, 1
movsxd rdi, ecx
shl rdi, 4
call rax
mov rcx, [rbp+var_10]
mov [rcx+70h], rax
cmp rax, 0
jnz short loc_49151
mov [rbp+var_1], 1
jmp loc_491DA
loc_49151:
mov [rbp+var_1824], 0
loc_4915B:
mov eax, [rbp+var_1824]
cmp eax, [rbp+var_1828]
jge short loc_491B4
mov rax, [rbp+var_10]
mov rax, [rax+70h]
movsxd rcx, [rbp+var_1824]
shl rcx, 4
add rax, rcx
movsxd rdx, [rbp+var_1824]
lea rcx, [rbp+var_1820]
imul rdx, 18h
add rcx, rdx
mov rdx, [rcx+8]
mov [rax], rdx
mov rcx, [rcx+10h]
mov [rax+8], rcx
mov eax, [rbp+var_1824]
add eax, 1
mov [rbp+var_1824], eax
jmp short loc_4915B
loc_491B4:
mov rax, [rbp+var_10]
mov rdi, [rax+70h]
movsxd rax, [rbp+var_1824]
shl rax, 4
add rdi, rax
xor esi, esi
mov edx, 10h
call _memset
mov [rbp+var_1], 0
loc_491DA:
mov al, [rbp+var_1]
add rsp, 1850h
pop rbp
retn
|
char create_fromuni(long long a1, long long a2)
{
long long v2; // rax
_QWORD *v3; // rax
unsigned __int16 v5; // [rsp+0h] [rbp-1850h]
__int16 v6; // [rsp+4h] [rbp-184Ch]
int v7; // [rsp+8h] [rbp-1848h]
unsigned __int16 v8; // [rsp+Eh] [rbp-1842h]
long long v9; // [rsp+10h] [rbp-1840h]
int v10; // [rsp+18h] [rbp-1838h]
int k; // [rsp+1Ch] [rbp-1834h]
int v12; // [rsp+20h] [rbp-1830h]
unsigned __int16 v13; // [rsp+26h] [rbp-182Ah]
int v14; // [rsp+28h] [rbp-1828h]
int i; // [rsp+2Ch] [rbp-1824h]
int j; // [rsp+2Ch] [rbp-1824h]
int m; // [rsp+2Ch] [rbp-1824h]
_DWORD v18[1538]; // [rsp+30h] [rbp-1820h] BYREF
long long v19; // [rsp+1838h] [rbp-18h]
long long v20; // [rsp+1840h] [rbp-10h]
v20 = a1;
v19 = a2;
if ( !*(_QWORD *)(a1 + 104) )
return 1;
memset(v18, 0LL, 6144LL);
for ( i = 0; i < 256; ++i )
{
v13 = *(_WORD *)(*(_QWORD *)(v20 + 104) + 2LL * i);
v12 = ((int)v13 >> 8) % 256;
if ( v13 || !i )
{
if ( v18[6 * v12] )
{
if ( v13 >= (int)LOWORD(v18[6 * v12 + 2]) )
v6 = v18[6 * v12 + 2];
else
v6 = *(_WORD *)(*(_QWORD *)(v20 + 104) + 2LL * i);
LOWORD(v18[6 * v12 + 2]) = v6;
if ( v13 <= (int)HIWORD(v18[6 * v12 + 2]) )
v5 = HIWORD(v18[6 * v12 + 2]);
else
v5 = v13;
HIWORD(v18[6 * v12 + 2]) = v5;
}
else
{
LOWORD(v18[6 * v12 + 2]) = v13;
HIWORD(v18[6 * v12 + 2]) = v13;
}
++v18[6 * v12];
}
}
qsort(v18, 256LL, 24LL, pcmp);
for ( j = 0; j < 256 && v18[6 * j]; ++j )
{
v10 = HIWORD(v18[6 * j + 2]) - LOWORD(v18[6 * j + 2]) + 1;
v9 = (*(long long ( **)(_QWORD))(v19 + 128))(v10);
*(_QWORD *)&v18[6 * j + 4] = v9;
if ( !v9 )
return 1;
memset(v9, 0LL, v10);
for ( k = 1; k < 256; ++k )
{
v8 = *(_WORD *)(*(_QWORD *)(v20 + 104) + 2LL * k);
if ( v8 >= (int)LOWORD(v18[6 * j + 2]) && v8 <= (int)HIWORD(v18[6 * j + 2]) )
{
if ( v8 )
{
v7 = v8 - LOWORD(v18[6 * j + 2]);
if ( !*(_BYTE *)(v9 + v7) || *(unsigned __int8 *)(v9 + v7) > 0x7Fu )
*(_BYTE *)(v9 + v7) = k;
}
}
}
}
v14 = j;
v2 = (*(long long ( **)(long long))(v19 + 128))(16LL * (j + 1));
*(_QWORD *)(v20 + 112) = v2;
if ( !v2 )
return 1;
for ( m = 0; m < v14; ++m )
{
v3 = (_QWORD *)(16LL * m + *(_QWORD *)(v20 + 112));
*v3 = *(_QWORD *)&v18[6 * m + 2];
v3[1] = *(_QWORD *)&v18[6 * m + 4];
}
memset(16LL * m + *(_QWORD *)(v20 + 112), 0LL, 16LL);
return 0;
}
|
create_fromuni:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x1850
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x68],0x0
JNZ 0x00148d07
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001491da
LAB_00148d07:
LEA RDI,[RBP + -0x1820]
XOR ESI,ESI
MOV EDX,0x1800
CALL 0x001241b0
MOV dword ptr [RBP + -0x1824],0x0
LAB_00148d24:
CMP dword ptr [RBP + -0x1824],0x100
JGE 0x00148ef8
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x68]
MOVSXD RCX,dword ptr [RBP + -0x1824]
MOV AX,word ptr [RAX + RCX*0x2]
MOV word ptr [RBP + -0x182a],AX
MOVZX EAX,word ptr [RBP + -0x182a]
SAR EAX,0x8
MOV ECX,0x100
CDQ
IDIV ECX
MOV dword ptr [RBP + -0x1830],EDX
MOVZX EAX,word ptr [RBP + -0x182a]
CMP EAX,0x0
JNZ 0x00148d7f
CMP dword ptr [RBP + -0x1824],0x0
JNZ 0x00148ee2
LAB_00148d7f:
MOVSXD RCX,dword ptr [RBP + -0x1830]
LEA RAX,[RBP + -0x1820]
IMUL RCX,RCX,0x18
ADD RAX,RCX
CMP dword ptr [RAX],0x0
JNZ 0x00148dde
MOV CX,word ptr [RBP + -0x182a]
MOVSXD RDX,dword ptr [RBP + -0x1830]
LEA RAX,[RBP + -0x1820]
IMUL RDX,RDX,0x18
ADD RAX,RDX
MOV word ptr [RAX + 0x8],CX
MOV CX,word ptr [RBP + -0x182a]
MOVSXD RDX,dword ptr [RBP + -0x1830]
LEA RAX,[RBP + -0x1820]
IMUL RDX,RDX,0x18
ADD RAX,RDX
MOV word ptr [RAX + 0xa],CX
JMP 0x00148ec6
LAB_00148dde:
MOVZX EAX,word ptr [RBP + -0x182a]
MOVSXD RDX,dword ptr [RBP + -0x1830]
LEA RCX,[RBP + -0x1820]
IMUL RDX,RDX,0x18
ADD RCX,RDX
MOVZX ECX,word ptr [RCX + 0x8]
CMP EAX,ECX
JGE 0x00148e11
MOVZX EAX,word ptr [RBP + -0x182a]
MOV dword ptr [RBP + -0x184c],EAX
JMP 0x00148e30
LAB_00148e11:
MOVSXD RCX,dword ptr [RBP + -0x1830]
LEA RAX,[RBP + -0x1820]
IMUL RCX,RCX,0x18
ADD RAX,RCX
MOVZX EAX,word ptr [RAX + 0x8]
MOV dword ptr [RBP + -0x184c],EAX
LAB_00148e30:
MOV EAX,dword ptr [RBP + -0x184c]
MOV CX,AX
MOVSXD RDX,dword ptr [RBP + -0x1830]
LEA RAX,[RBP + -0x1820]
IMUL RDX,RDX,0x18
ADD RAX,RDX
MOV word ptr [RAX + 0x8],CX
MOVZX EAX,word ptr [RBP + -0x182a]
MOVSXD RDX,dword ptr [RBP + -0x1830]
LEA RCX,[RBP + -0x1820]
IMUL RDX,RDX,0x18
ADD RCX,RDX
MOVZX ECX,word ptr [RCX + 0xa]
CMP EAX,ECX
JLE 0x00148e85
MOVZX EAX,word ptr [RBP + -0x182a]
MOV dword ptr [RBP + -0x1850],EAX
JMP 0x00148ea4
LAB_00148e85:
MOVSXD RCX,dword ptr [RBP + -0x1830]
LEA RAX,[RBP + -0x1820]
IMUL RCX,RCX,0x18
ADD RAX,RCX
MOVZX EAX,word ptr [RAX + 0xa]
MOV dword ptr [RBP + -0x1850],EAX
LAB_00148ea4:
MOV EAX,dword ptr [RBP + -0x1850]
MOV CX,AX
MOVSXD RDX,dword ptr [RBP + -0x1830]
LEA RAX,[RBP + -0x1820]
IMUL RDX,RDX,0x18
ADD RAX,RDX
MOV word ptr [RAX + 0xa],CX
LAB_00148ec6:
MOVSXD RCX,dword ptr [RBP + -0x1830]
LEA RAX,[RBP + -0x1820]
IMUL RCX,RCX,0x18
ADD RAX,RCX
MOV ECX,dword ptr [RAX]
ADD ECX,0x1
MOV dword ptr [RAX],ECX
LAB_00148ee2:
JMP 0x00148ee4
LAB_00148ee4:
MOV EAX,dword ptr [RBP + -0x1824]
ADD EAX,0x1
MOV dword ptr [RBP + -0x1824],EAX
JMP 0x00148d24
LAB_00148ef8:
LEA RDI,[RBP + -0x1820]
MOV ESI,0x100
MOV EDX,0x18
LEA RCX,[0x1491f0]
CALL 0x00124620
MOV dword ptr [RBP + -0x1824],0x0
LAB_00148f1f:
CMP dword ptr [RBP + -0x1824],0x100
JGE 0x00149111
MOVSXD RCX,dword ptr [RBP + -0x1824]
LEA RAX,[RBP + -0x1820]
IMUL RCX,RCX,0x18
ADD RAX,RCX
CMP dword ptr [RAX],0x0
JNZ 0x00148f4e
JMP 0x00149111
LAB_00148f4e:
MOVSXD RCX,dword ptr [RBP + -0x1824]
LEA RAX,[RBP + -0x1820]
IMUL RCX,RCX,0x18
ADD RAX,RCX
MOVZX EAX,word ptr [RAX + 0xa]
MOVSXD RDX,dword ptr [RBP + -0x1824]
LEA RCX,[RBP + -0x1820]
IMUL RDX,RDX,0x18
ADD RCX,RDX
MOVZX ECX,word ptr [RCX + 0x8]
SUB EAX,ECX
ADD EAX,0x1
MOV dword ptr [RBP + -0x1838],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x80]
MOVSXD RDI,dword ptr [RBP + -0x1838]
SHL RDI,0x0
CALL RAX
MOV qword ptr [RBP + -0x1840],RAX
MOVSXD RDX,dword ptr [RBP + -0x1824]
LEA RCX,[RBP + -0x1820]
IMUL RDX,RDX,0x18
ADD RCX,RDX
MOV qword ptr [RCX + 0x10],RAX
CMP RAX,0x0
JNZ 0x00148fd2
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001491da
LAB_00148fd2:
MOV RDI,qword ptr [RBP + -0x1840]
MOVSXD RDX,dword ptr [RBP + -0x1838]
SHL RDX,0x0
XOR ESI,ESI
CALL 0x001241b0
MOV dword ptr [RBP + -0x1834],0x1
LAB_00148ff5:
CMP dword ptr [RBP + -0x1834],0x100
JGE 0x001490fb
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x68]
MOVSXD RCX,dword ptr [RBP + -0x1834]
MOV AX,word ptr [RAX + RCX*0x2]
MOV word ptr [RBP + -0x1842],AX
MOVZX EAX,word ptr [RBP + -0x1842]
MOVSXD RDX,dword ptr [RBP + -0x1824]
LEA RCX,[RBP + -0x1820]
IMUL RDX,RDX,0x18
ADD RCX,RDX
MOVZX ECX,word ptr [RCX + 0x8]
CMP EAX,ECX
JL 0x001490e5
MOVZX EAX,word ptr [RBP + -0x1842]
MOVSXD RDX,dword ptr [RBP + -0x1824]
LEA RCX,[RBP + -0x1820]
IMUL RDX,RDX,0x18
ADD RCX,RDX
MOVZX ECX,word ptr [RCX + 0xa]
CMP EAX,ECX
JG 0x001490e5
MOVZX EAX,word ptr [RBP + -0x1842]
CMP EAX,0x0
JZ 0x001490e5
MOVZX EAX,word ptr [RBP + -0x1842]
MOVSXD RDX,dword ptr [RBP + -0x1824]
LEA RCX,[RBP + -0x1820]
IMUL RDX,RDX,0x18
ADD RCX,RDX
MOVZX ECX,word ptr [RCX + 0x8]
SUB EAX,ECX
MOV dword ptr [RBP + -0x1848],EAX
MOV RAX,qword ptr [RBP + -0x1840]
MOVSXD RCX,dword ptr [RBP + -0x1848]
CMP byte ptr [RAX + RCX*0x1],0x0
JZ 0x001490ca
MOV RAX,qword ptr [RBP + -0x1840]
MOVSXD RCX,dword ptr [RBP + -0x1848]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
CMP EAX,0x7f
JLE 0x001490e3
LAB_001490ca:
MOV EAX,dword ptr [RBP + -0x1834]
MOV DL,AL
MOV RAX,qword ptr [RBP + -0x1840]
MOVSXD RCX,dword ptr [RBP + -0x1848]
MOV byte ptr [RAX + RCX*0x1],DL
LAB_001490e3:
JMP 0x001490e5
LAB_001490e5:
JMP 0x001490e7
LAB_001490e7:
MOV EAX,dword ptr [RBP + -0x1834]
ADD EAX,0x1
MOV dword ptr [RBP + -0x1834],EAX
JMP 0x00148ff5
LAB_001490fb:
JMP 0x001490fd
LAB_001490fd:
MOV EAX,dword ptr [RBP + -0x1824]
ADD EAX,0x1
MOV dword ptr [RBP + -0x1824],EAX
JMP 0x00148f1f
LAB_00149111:
MOV EAX,dword ptr [RBP + -0x1824]
MOV dword ptr [RBP + -0x1828],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x80]
MOV ECX,dword ptr [RBP + -0x1828]
ADD ECX,0x1
MOVSXD RDI,ECX
SHL RDI,0x4
CALL RAX
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RCX + 0x70],RAX
CMP RAX,0x0
JNZ 0x00149151
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001491da
LAB_00149151:
MOV dword ptr [RBP + -0x1824],0x0
LAB_0014915b:
MOV EAX,dword ptr [RBP + -0x1824]
CMP EAX,dword ptr [RBP + -0x1828]
JGE 0x001491b4
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x70]
MOVSXD RCX,dword ptr [RBP + -0x1824]
SHL RCX,0x4
ADD RAX,RCX
MOVSXD RDX,dword ptr [RBP + -0x1824]
LEA RCX,[RBP + -0x1820]
IMUL RDX,RDX,0x18
ADD RCX,RDX
MOV RDX,qword ptr [RCX + 0x8]
MOV qword ptr [RAX],RDX
MOV RCX,qword ptr [RCX + 0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV EAX,dword ptr [RBP + -0x1824]
ADD EAX,0x1
MOV dword ptr [RBP + -0x1824],EAX
JMP 0x0014915b
LAB_001491b4:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x70]
MOVSXD RAX,dword ptr [RBP + -0x1824]
SHL RAX,0x4
ADD RDI,RAX
XOR ESI,ESI
MOV EDX,0x10
CALL 0x001241b0
MOV byte ptr [RBP + -0x1],0x0
LAB_001491da:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x1850
POP RBP
RET
|
int1 create_fromuni(long param_1,long param_2)
{
ushort uVar1;
ushort uVar2;
int iVar3;
void *__s;
long lVar4;
int8 *puVar5;
uint uVar6;
int local_183c;
int local_182c;
int local_1828 [2];
ushort auStack_1820 [4];
int8 auStack_1818 [767];
long local_20;
long local_18;
int1 local_9;
if (*(long *)(param_1 + 0x68) == 0) {
local_9 = 1;
}
else {
local_20 = param_2;
local_18 = param_1;
memset(local_1828,0,0x1800);
for (local_182c = 0; local_182c < 0x100; local_182c = local_182c + 1) {
uVar1 = *(ushort *)(*(long *)(local_18 + 0x68) + (long)local_182c * 2);
uVar6 = (uint)((int)(uint)uVar1 >> 8) % 0x100;
if ((uVar1 != 0) || (local_182c == 0)) {
if (local_1828[(long)(int)uVar6 * 6] == 0) {
auStack_1820[(long)(int)uVar6 * 0xc] = uVar1;
auStack_1820[(long)(int)uVar6 * 0xc + 1] = uVar1;
}
else {
uVar2 = uVar1;
if (auStack_1820[(long)(int)uVar6 * 0xc] <= uVar1) {
uVar2 = auStack_1820[(long)(int)uVar6 * 0xc];
}
auStack_1820[(long)(int)uVar6 * 0xc] = uVar2;
if (uVar1 <= auStack_1820[(long)(int)uVar6 * 0xc + 1]) {
uVar1 = auStack_1820[(long)(int)uVar6 * 0xc + 1];
}
auStack_1820[(long)(int)uVar6 * 0xc + 1] = uVar1;
}
local_1828[(long)(int)uVar6 * 6] = local_1828[(long)(int)uVar6 * 6] + 1;
}
}
qsort(local_1828,0x100,0x18,pcmp);
local_182c = 0;
while ((iVar3 = local_182c, local_182c < 0x100 && (local_1828[(long)local_182c * 6] != 0))) {
iVar3 = ((uint)auStack_1820[(long)local_182c * 0xc + 1] -
(uint)auStack_1820[(long)local_182c * 0xc]) + 1;
__s = (void *)(**(code **)(local_20 + 0x80))((long)iVar3);
auStack_1818[(long)local_182c * 3] = __s;
if (__s == (void *)0x0) {
return 1;
}
memset(__s,0,(long)iVar3);
for (local_183c = 1; local_183c < 0x100; local_183c = local_183c + 1) {
uVar1 = *(ushort *)(*(long *)(local_18 + 0x68) + (long)local_183c * 2);
if ((((auStack_1820[(long)local_182c * 0xc] <= uVar1) &&
(uVar1 <= auStack_1820[(long)local_182c * 0xc + 1])) && (uVar1 != 0)) &&
((iVar3 = (uint)uVar1 - (uint)auStack_1820[(long)local_182c * 0xc],
*(char *)((long)__s + (long)iVar3) == '\0' ||
(0x7f < *(byte *)((long)__s + (long)iVar3))))) {
*(char *)((long)__s + (long)iVar3) = (char)local_183c;
}
}
local_182c = local_182c + 1;
}
lVar4 = (**(code **)(local_20 + 0x80))((long)(local_182c + 1) << 4);
*(long *)(local_18 + 0x70) = lVar4;
if (lVar4 == 0) {
local_9 = 1;
}
else {
for (local_182c = 0; local_182c < iVar3; local_182c = local_182c + 1) {
puVar5 = (int8 *)(*(long *)(local_18 + 0x70) + (long)local_182c * 0x10);
*puVar5 = *(int8 *)(auStack_1820 + (long)local_182c * 0xc);
puVar5[1] = auStack_1818[(long)local_182c * 3];
}
memset((void *)(*(long *)(local_18 + 0x70) + (long)local_182c * 0x10),0,0x10);
local_9 = 0;
}
}
return local_9;
}
|
|
14,601
|
Mic::getMicVolume[abi:cxx11]()
|
mihussein[P]Hlemon/src/mic.cpp
|
std::string Mic::getMicVolume() {
std::string icon = iconColor("MIC");
std::string format = "";
if (Mic::is_muted) {
format = " " + icon + " off ";
} else {
format = " " + icon + " " + std::to_string(Mic::current_percent) + "% ";
}
/*std::string format = " %{F" + color + "}" + icon + " " + std::to_string(Mic::current_percent) + "%" + " %{F-}";*/
return format;
}
|
O0
|
cpp
|
Mic::getMicVolume[abi:cxx11]():
pushq %rbp
movq %rsp, %rbp
subq $0x160, %rsp # imm = 0x160
movq %rdi, -0x158(%rbp)
movq %rdi, %rax
movq %rax, -0x150(%rbp)
movq %rdi, -0x8(%rbp)
leaq -0x49(%rbp), %rdi
movq %rdi, -0x148(%rbp)
callq 0x57f0
movq -0x148(%rbp), %rdx
leaq 0xe4b(%rip), %rsi # 0x11789
leaq -0x48(%rbp), %rdi
callq 0x9c60
jmp 0x10949
leaq -0x28(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0xb000
jmp 0x10958
leaq -0x48(%rbp), %rdi
callq 0x58a8
leaq -0x49(%rbp), %rdi
callq 0x54c0
movb $0x0, -0x5d(%rbp)
leaq -0x5e(%rbp), %rdi
movq %rdi, -0x160(%rbp)
callq 0x57f0
movq -0x158(%rbp), %rdi
movq -0x160(%rbp), %rdx
leaq 0xa77(%rip), %rsi # 0x1140a
callq 0x9c60
jmp 0x1099a
leaq -0x5e(%rbp), %rdi
callq 0x54c0
testb $0x1, 0x7b96(%rip) # 0x18540
je 0x10a85
leaq 0x89b(%rip), %rsi # 0x11252
leaq -0xa0(%rbp), %rdi
leaq -0x28(%rbp), %rdx
callq 0x9f60
jmp 0x109c9
leaq 0xdbd(%rip), %rdx # 0x1178d
leaq -0x80(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x9e40
jmp 0x109e2
movq -0x158(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x5590
leaq -0x80(%rbp), %rdi
callq 0x58a8
leaq -0xa0(%rbp), %rdi
callq 0x58a8
jmp 0x10bbf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x10a2f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x58a8
leaq -0x49(%rbp), %rdi
callq 0x54c0
jmp 0x10c03
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x5e(%rbp), %rdi
callq 0x54c0
jmp 0x10bfa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x10bee
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x58a8
jmp 0x10bee
leaq 0x7c6(%rip), %rsi # 0x11252
leaq -0x120(%rbp), %rdi
leaq -0x28(%rbp), %rdx
callq 0x9f60
jmp 0x10a9e
leaq 0x7ad(%rip), %rdx # 0x11252
leaq -0x100(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0x9e40
jmp 0x10aba
movl 0x7a7c(%rip), %esi # 0x1853c
leaq -0x140(%rbp), %rdi
callq 0xa070
jmp 0x10ace
leaq -0xe0(%rbp), %rdi
leaq -0x100(%rbp), %rsi
leaq -0x140(%rbp), %rdx
callq 0x9e90
jmp 0x10aea
leaq 0x760(%rip), %rdx # 0x11251
leaq -0xc0(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
callq 0x9e40
jmp 0x10b06
movq -0x158(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0x5590
leaq -0xc0(%rbp), %rdi
callq 0x58a8
leaq -0xe0(%rbp), %rdi
callq 0x58a8
leaq -0x140(%rbp), %rdi
callq 0x58a8
leaq -0x100(%rbp), %rdi
callq 0x58a8
leaq -0x120(%rbp), %rdi
callq 0x58a8
jmp 0x10bbf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x10bb1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x10ba5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x10b99
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0xe0(%rbp), %rdi
callq 0x58a8
leaq -0x140(%rbp), %rdi
callq 0x58a8
leaq -0x100(%rbp), %rdi
callq 0x58a8
leaq -0x120(%rbp), %rdi
callq 0x58a8
jmp 0x10bee
movb $0x1, -0x5d(%rbp)
testb $0x1, -0x5d(%rbp)
jne 0x10bd5
movq -0x158(%rbp), %rdi
callq 0x58a8
leaq -0x28(%rbp), %rdi
callq 0x58a8
movq -0x150(%rbp), %rax
addq $0x160, %rsp # imm = 0x160
popq %rbp
retq
movq -0x158(%rbp), %rdi
callq 0x58a8
leaq -0x28(%rbp), %rdi
callq 0x58a8
movq -0x58(%rbp), %rdi
callq 0x57e0
|
_ZN3Mic12getMicVolumeB5cxx11Ev:
push rbp
mov rbp, rsp
sub rsp, 160h
mov [rbp+var_158], rdi
mov rax, rdi
mov [rbp+var_150], rax
mov [rbp+var_8], rdi
lea rdi, [rbp+var_49]
mov [rbp+var_148], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, [rbp+var_148]
lea rsi, aMic; "MIC"
lea rdi, [rbp+var_48]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_10949:
lea rdi, [rbp+var_28]
lea rsi, [rbp+var_48]
call _Z9iconColorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; iconColor(std::string)
jmp short $+2
loc_10958:
lea rdi, [rbp+var_48]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_49]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov [rbp+var_5D], 0
lea rdi, [rbp+var_5E]
mov [rbp+var_160], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdi, [rbp+var_158]
mov rdx, [rbp+var_160]
lea rsi, aErrorInitializ+1Ch; ""
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_1099A:
lea rdi, [rbp+var_5E]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
test cs:_ZN3Mic8is_mutedE, 1; Mic::is_muted
jz loc_10A85
lea rsi, asc_11251+1; " "
lea rdi, [rbp+var_A0]
lea rdx, [rbp+var_28]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&)
jmp short $+2
loc_109C9:
lea rdx, aOff; " off "
lea rdi, [rbp+var_80]
lea rsi, [rbp+var_A0]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_109E2:
mov rdi, [rbp+var_158]
lea rsi, [rbp+var_80]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
lea rdi, [rbp+var_80]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_A0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_10BBF
mov rcx, rax
mov eax, edx
mov [rbp+var_58], rcx
mov [rbp+var_5C], eax
jmp short loc_10A2F
mov rcx, rax
mov eax, edx
mov [rbp+var_58], rcx
mov [rbp+var_5C], eax
lea rdi, [rbp+var_48]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_10A2F:
lea rdi, [rbp+var_49]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_10C03
mov rcx, rax
mov eax, edx
mov [rbp+var_58], rcx
mov [rbp+var_5C], eax
lea rdi, [rbp+var_5E]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_10BFA
mov rcx, rax
mov eax, edx
mov [rbp+var_58], rcx
mov [rbp+var_5C], eax
jmp loc_10BEE
mov rcx, rax
mov eax, edx
mov [rbp+var_58], rcx
mov [rbp+var_5C], eax
lea rdi, [rbp+var_A0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_10BEE
loc_10A85:
lea rsi, asc_11251+1; " "
lea rdi, [rbp+var_120]
lea rdx, [rbp+var_28]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&)
jmp short $+2
loc_10A9E:
lea rdx, asc_11251+1; " "
lea rdi, [rbp+var_100]
lea rsi, [rbp+var_120]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_10ABA:
mov esi, cs:_ZN3Mic15current_percentE; int
lea rdi, [rbp+var_140]; this
call _ZNSt7__cxx119to_stringEi; std::to_string(int)
jmp short $+2
loc_10ACE:
lea rdi, [rbp+var_E0]
lea rsi, [rbp+var_100]
lea rdx, [rbp+var_140]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&)
jmp short $+2
loc_10AEA:
lea rdx, asc_11251; "% "
lea rdi, [rbp+var_C0]
lea rsi, [rbp+var_E0]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_10B06:
mov rdi, [rbp+var_158]
lea rsi, [rbp+var_C0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
lea rdi, [rbp+var_C0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_E0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_140]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_100]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_120]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_10BBF
mov rcx, rax
mov eax, edx
mov [rbp+var_58], rcx
mov [rbp+var_5C], eax
jmp short loc_10BB1
mov rcx, rax
mov eax, edx
mov [rbp+var_58], rcx
mov [rbp+var_5C], eax
jmp short loc_10BA5
mov rcx, rax
mov eax, edx
mov [rbp+var_58], rcx
mov [rbp+var_5C], eax
jmp short loc_10B99
mov rcx, rax
mov eax, edx
mov [rbp+var_58], rcx
mov [rbp+var_5C], eax
lea rdi, [rbp+var_E0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_10B99:
lea rdi, [rbp+var_140]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_10BA5:
lea rdi, [rbp+var_100]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_10BB1:
lea rdi, [rbp+var_120]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_10BEE
loc_10BBF:
mov [rbp+var_5D], 1
test [rbp+var_5D], 1
jnz short loc_10BD5
mov rdi, [rbp+var_158]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_10BD5:
lea rdi, [rbp+var_28]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rax, [rbp+var_150]
add rsp, 160h
pop rbp
retn
loc_10BEE:
mov rdi, [rbp+var_158]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_10BFA:
lea rdi, [rbp+var_28]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_10C03:
mov rdi, [rbp+var_58]
call __Unwind_Resume
|
long long Mic::getMicVolume[abi:cxx11](long long a1, long long a2, long long a3)
{
long long v3; // rdx
_BYTE v5[32]; // [rsp+20h] [rbp-140h] BYREF
_BYTE v6[32]; // [rsp+40h] [rbp-120h] BYREF
_BYTE v7[32]; // [rsp+60h] [rbp-100h] BYREF
_BYTE v8[32]; // [rsp+80h] [rbp-E0h] BYREF
_BYTE v9[32]; // [rsp+A0h] [rbp-C0h] BYREF
_BYTE v10[32]; // [rsp+C0h] [rbp-A0h] BYREF
_BYTE v11[34]; // [rsp+E0h] [rbp-80h] BYREF
char v12; // [rsp+102h] [rbp-5Eh] BYREF
char v13; // [rsp+103h] [rbp-5Dh]
char v14; // [rsp+117h] [rbp-49h] BYREF
_BYTE v15[32]; // [rsp+118h] [rbp-48h] BYREF
_BYTE v16[32]; // [rsp+138h] [rbp-28h] BYREF
long long v17; // [rsp+158h] [rbp-8h]
v17 = a1;
std::allocator<char>::allocator(&v14, a2, a3);
std::string::basic_string<std::allocator<char>>((long long)v15, (long long)"MIC", (long long)&v14);
iconColor((long long)v16, (long long)v15);
std::string::~string(v15);
std::allocator<char>::~allocator(&v14);
v13 = 0;
std::allocator<char>::allocator(&v12, v15, v3);
std::string::basic_string<std::allocator<char>>(a1, (long long)"", (long long)&v12);
std::allocator<char>::~allocator(&v12);
if ( (Mic::is_muted & 1) != 0 )
{
std::operator+<char>((long long)v10, (long long)" ", (long long)v16);
std::operator+<char>((long long)v11, (long long)v10, " off ");
std::string::operator=(a1, v11);
std::string::~string(v11);
std::string::~string(v10);
}
else
{
std::operator+<char>((long long)v6, (long long)" ", (long long)v16);
std::operator+<char>((long long)v7, (long long)v6, " ");
std::to_string((std::__cxx11 *)v5, Mic::current_percent);
std::operator+<char>((long long)v8, (long long)v7, (long long)v5);
std::operator+<char>((long long)v9, (long long)v8, "% ");
std::string::operator=(a1, v9);
std::string::~string(v9);
std::string::~string(v8);
std::string::~string(v5);
std::string::~string(v7);
std::string::~string(v6);
}
v13 = 1;
std::string::~string(v16);
return a1;
}
|
getMicVolume[abi:cxx11]:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x160
MOV qword ptr [RBP + -0x158],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0x150],RAX
MOV qword ptr [RBP + -0x8],RDI
LEA RDI,[RBP + -0x49]
MOV qword ptr [RBP + -0x148],RDI
CALL 0x001057f0
MOV RDX,qword ptr [RBP + -0x148]
LAB_00110937:
LEA RSI,[0x111789]
LEA RDI,[RBP + -0x48]
CALL 0x00109c60
JMP 0x00110949
LAB_00110949:
LEA RDI,[RBP + -0x28]
LEA RSI,[RBP + -0x48]
CALL 0x0010b000
JMP 0x00110958
LAB_00110958:
LEA RDI,[RBP + -0x48]
CALL 0x001058a8
LEA RDI,[RBP + -0x49]
CALL 0x001054c0
MOV byte ptr [RBP + -0x5d],0x0
LEA RDI,[RBP + -0x5e]
MOV qword ptr [RBP + -0x160],RDI
CALL 0x001057f0
MOV RDI,qword ptr [RBP + -0x158]
MOV RDX,qword ptr [RBP + -0x160]
LAB_0011098c:
LEA RSI,[0x11140a]
CALL 0x00109c60
JMP 0x0011099a
LAB_0011099a:
LEA RDI,[RBP + -0x5e]
CALL 0x001054c0
TEST byte ptr [0x00118540],0x1
JZ 0x00110a85
LAB_001109b0:
LEA RSI,[0x111252]
LEA RDI,[RBP + -0xa0]
LEA RDX,[RBP + -0x28]
CALL 0x00109f60
JMP 0x001109c9
LAB_001109c9:
LEA RDX,[0x11178d]
LEA RDI,[RBP + -0x80]
LEA RSI,[RBP + -0xa0]
CALL 0x00109e40
JMP 0x001109e2
LAB_001109e2:
MOV RDI,qword ptr [RBP + -0x158]
LEA RSI,[RBP + -0x80]
CALL 0x00105590
LEA RDI,[RBP + -0x80]
CALL 0x001058a8
LEA RDI,[RBP + -0xa0]
CALL 0x001058a8
JMP 0x00110bbf
LAB_00110a85:
LEA RSI,[0x111252]
LEA RDI,[RBP + -0x120]
LEA RDX,[RBP + -0x28]
CALL 0x00109f60
JMP 0x00110a9e
LAB_00110a9e:
LEA RDX,[0x111252]
LEA RDI,[RBP + -0x100]
LEA RSI,[RBP + -0x120]
CALL 0x00109e40
JMP 0x00110aba
LAB_00110aba:
MOV ESI,dword ptr [0x0011853c]
LAB_00110ac0:
LEA RDI,[RBP + -0x140]
CALL 0x0010a070
JMP 0x00110ace
LAB_00110ace:
LEA RDI,[RBP + -0xe0]
LEA RSI,[RBP + -0x100]
LEA RDX,[RBP + -0x140]
CALL 0x00109e90
JMP 0x00110aea
LAB_00110aea:
LEA RDX,[0x111251]
LEA RDI,[RBP + -0xc0]
LEA RSI,[RBP + -0xe0]
CALL 0x00109e40
LAB_00110b04:
JMP 0x00110b06
LAB_00110b06:
MOV RDI,qword ptr [RBP + -0x158]
LEA RSI,[RBP + -0xc0]
CALL 0x00105590
LEA RDI,[RBP + -0xc0]
CALL 0x001058a8
LEA RDI,[RBP + -0xe0]
CALL 0x001058a8
LEA RDI,[RBP + -0x140]
CALL 0x001058a8
LEA RDI,[RBP + -0x100]
CALL 0x001058a8
LEA RDI,[RBP + -0x120]
CALL 0x001058a8
JMP 0x00110bbf
LAB_00110bbf:
MOV byte ptr [RBP + -0x5d],0x1
TEST byte ptr [RBP + -0x5d],0x1
JNZ 0x00110bd5
MOV RDI,qword ptr [RBP + -0x158]
CALL 0x001058a8
LAB_00110bd5:
LEA RDI,[RBP + -0x28]
CALL 0x001058a8
MOV RAX,qword ptr [RBP + -0x150]
ADD RSP,0x160
POP RBP
RET
|
/* WARNING: Removing unreachable block (ram,0x00110bc9) */
/* Mic::getMicVolume[abi:cxx11]() */
Mic * __thiscall Mic::getMicVolume_abi_cxx11_(Mic *this)
{
__cxx11 local_148 [32];
string local_128 [32];
string local_108 [32];
string local_e8 [32];
string local_c8 [32];
string local_a8 [32];
string local_88 [34];
allocator local_66;
int1 local_65;
allocator local_51;
string local_50 [32];
string local_30 [32];
Mic *local_10;
local_10 = this;
std::allocator<char>::allocator();
/* try { // try from 00110937 to 00110946 has its CatchHandler @ 00110a0c */
std::__cxx11::string::string<std::allocator<char>>(local_50,"MIC",&local_51);
/* try { // try from 00110949 to 00110955 has its CatchHandler @ 00110a1a */
iconColor(local_30,local_50);
std::__cxx11::string::~string(local_50);
std::allocator<char>::~allocator((allocator<char> *)&local_51);
local_65 = 0;
std::allocator<char>::allocator();
/* try { // try from 0011098c to 00110997 has its CatchHandler @ 00110a3d */
std::__cxx11::string::string<std::allocator<char>>((string *)this,"",&local_66);
std::allocator<char>::~allocator((allocator<char> *)&local_66);
if ((is_muted & 1) == 0) {
/* try { // try from 00110a85 to 00110a9b has its CatchHandler @ 00110a57 */
std::operator+((char *)local_128,(string *)&DAT_00111252);
/* try { // try from 00110a9e to 00110ab7 has its CatchHandler @ 00110b57 */
std::operator+(local_108,(char *)local_128);
/* try { // try from 00110ac0 to 00110acb has its CatchHandler @ 00110b65 */
std::__cxx11::to_string(local_148,current_percent);
/* try { // try from 00110ace to 00110ae7 has its CatchHandler @ 00110b73 */
std::operator+(local_e8,local_108);
/* try { // try from 00110aea to 00110b03 has its CatchHandler @ 00110b81 */
std::operator+(local_c8,(char *)local_e8);
std::__cxx11::string::operator=((string *)this,local_c8);
std::__cxx11::string::~string(local_c8);
std::__cxx11::string::~string(local_e8);
std::__cxx11::string::~string((string *)local_148);
std::__cxx11::string::~string(local_108);
std::__cxx11::string::~string(local_128);
}
else {
/* try { // try from 001109b0 to 001109c6 has its CatchHandler @ 00110a57 */
std::operator+((char *)local_a8,(string *)&DAT_00111252);
/* try { // try from 001109c9 to 001109df has its CatchHandler @ 00110a68 */
std::operator+(local_88,(char *)local_a8);
std::__cxx11::string::operator=((string *)this,local_88);
std::__cxx11::string::~string(local_88);
std::__cxx11::string::~string(local_a8);
}
local_65 = 1;
std::__cxx11::string::~string(local_30);
return this;
}
|
|
14,602
|
Mic::getMicVolume[abi:cxx11]()
|
mihussein[P]Hlemon/src/mic.cpp
|
std::string Mic::getMicVolume() {
std::string icon = iconColor("MIC");
std::string format = "";
if (Mic::is_muted) {
format = " " + icon + " off ";
} else {
format = " " + icon + " " + std::to_string(Mic::current_percent) + "% ";
}
/*std::string format = " %{F" + color + "}" + icon + " " + std::to_string(Mic::current_percent) + "%" + " %{F-}";*/
return format;
}
|
O2
|
cpp
|
Mic::getMicVolume[abi:cxx11]():
pushq %r14
pushq %rbx
subq $0xe8, %rsp
movq %rdi, %rbx
leaq 0xd6c(%rip), %rsi # 0x97a2
leaq 0xc8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x593c
leaq 0x48(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
callq 0x5fc6
leaq 0xc8(%rsp), %rdi
callq 0x46e8
leaq 0x99c(%rip), %rsi # 0x940a
leaq 0x28(%rsp), %rdx
movq %rbx, %rdi
callq 0x593c
cmpb $0x1, 0x49de(%rip) # 0xd460
jne 0x8ad2
leaq 0x7c7(%rip), %rsi # 0x9252
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x5a4c
leaq 0xd05(%rip), %rdx # 0x97a6
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x59c6
leaq 0x28(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4460
movq %r14, %rdi
callq 0x46e8
leaq 0x8(%rsp), %rdi
jmp 0x8b85
leaq 0x779(%rip), %rsi # 0x9252
leaq 0x88(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x5a4c
leaq 0x760(%rip), %rdx # 0x9252
leaq 0xa8(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x59c6
movl 0x494f(%rip), %esi # 0xd45c
leaq 0x68(%rsp), %rdi
callq 0x5ac2
leaq 0x8(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
leaq 0x68(%rsp), %rdx
callq 0x59e5
leaq 0x71c(%rip), %rdx # 0x9251
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x59c6
leaq 0x28(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4460
movq %r14, %rdi
callq 0x46e8
leaq 0x8(%rsp), %rdi
callq 0x46e8
leaq 0x68(%rsp), %rdi
callq 0x46e8
leaq 0xa8(%rsp), %rdi
callq 0x46e8
leaq 0x88(%rsp), %rdi
callq 0x46e8
leaq 0x48(%rsp), %rdi
callq 0x46e8
movq %rbx, %rax
addq $0xe8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x46e8
jmp 0x8bb4
movq %rax, %r14
leaq 0x68(%rsp), %rdi
callq 0x46e8
jmp 0x8bc3
movq %rax, %r14
leaq 0xa8(%rsp), %rdi
callq 0x46e8
jmp 0x8bd5
movq %rax, %r14
leaq 0x88(%rsp), %rdi
jmp 0x8be7
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x46e8
jmp 0x8bf3
jmp 0x8bf0
movq %rax, %r14
movq %rbx, %rdi
callq 0x46e8
jmp 0x8c00
movq %rax, %r14
leaq 0x48(%rsp), %rdi
callq 0x46e8
movq %r14, %rdi
callq 0x4630
movq %rax, %r14
leaq 0xc8(%rsp), %rdi
jmp 0x8c05
movq %rax, %r14
jmp 0x8c0a
|
_ZN3Mic12getMicVolumeB5cxx11Ev:
push r14
push rbx
sub rsp, 0E8h
mov rbx, rdi
lea rsi, aMic; "MIC"
lea rdi, [rsp+0F8h+var_30]
lea rdx, [rsp+0F8h+var_D0]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rdi, [rsp+0F8h+var_B0]
lea rsi, [rsp+0F8h+var_30]
call _Z9iconColorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; iconColor(std::string)
lea rdi, [rsp+0F8h+var_30]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rsi, aErrorInitializ+1Ch; ""
lea rdx, [rsp+0F8h+var_D0]
mov rdi, rbx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
cmp cs:_ZN3Mic8is_mutedE, 1; Mic::is_muted
jnz short loc_8AD2
lea rsi, asc_9251+1; " "
lea rdi, [rsp+0F8h+var_F0]
lea rdx, [rsp+0F8h+var_B0]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&)
lea rdx, aOff; " off "
lea rdi, [rsp+0F8h+var_D0]
lea rsi, [rsp+0F8h+var_F0]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
lea r14, [rsp+0F8h+var_D0]
mov rdi, rbx
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, r14; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0F8h+var_F0]
jmp loc_8B85
loc_8AD2:
lea rsi, asc_9251+1; " "
lea rdi, [rsp+0F8h+var_70]
lea rdx, [rsp+0F8h+var_B0]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&)
lea rdx, asc_9251+1; " "
lea rdi, [rsp+0F8h+var_50]
lea rsi, [rsp+0F8h+var_70]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
mov esi, cs:_ZN3Mic15current_percentE; int
lea rdi, [rsp+0F8h+var_90]; this
call _ZNSt7__cxx119to_stringEi; std::to_string(int)
lea rdi, [rsp+0F8h+var_F0]
lea rsi, [rsp+0F8h+var_50]
lea rdx, [rsp+0F8h+var_90]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&)
lea rdx, asc_9251; "% "
lea rdi, [rsp+0F8h+var_D0]
lea rsi, [rsp+0F8h+var_F0]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
lea r14, [rsp+0F8h+var_D0]
mov rdi, rbx
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, r14; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0F8h+var_F0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0F8h+var_90]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0F8h+var_50]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0F8h+var_70]; void *
loc_8B85:
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0F8h+var_B0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rax, rbx
add rsp, 0E8h
pop rbx
pop r14
retn
mov r14, rax
lea rdi, [rsp+arg_0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_8BB4
mov r14, rax
loc_8BB4:
lea rdi, [rsp+arg_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_8BC3
mov r14, rax
loc_8BC3:
lea rdi, [rsp+arg_A0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_8BD5
mov r14, rax
loc_8BD5:
lea rdi, [rsp+arg_80]
jmp short loc_8BE7
mov r14, rax
lea rdi, [rsp+arg_0]; void *
loc_8BE7:
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_8BF3
jmp short $+2
loc_8BF0:
mov r14, rax
loc_8BF3:
mov rdi, rbx; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_8C00
mov r14, rax
loc_8C00:
lea rdi, [rsp+arg_40]; void *
loc_8C05:
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_8C0A:
mov rdi, r14
call __Unwind_Resume
mov r14, rax
lea rdi, [rsp+arg_C0]
jmp short loc_8C05
mov r14, rax
jmp short loc_8C0A
|
_QWORD * Mic::getMicVolume[abi:cxx11](_QWORD *a1)
{
_BYTE *v2; // rdi
_BYTE v4[32]; // [rsp+8h] [rbp-F0h] BYREF
_BYTE v5[32]; // [rsp+28h] [rbp-D0h] BYREF
_BYTE v6[32]; // [rsp+48h] [rbp-B0h] BYREF
_QWORD v7[4]; // [rsp+68h] [rbp-90h] BYREF
_BYTE v8[32]; // [rsp+88h] [rbp-70h] BYREF
_QWORD v9[4]; // [rsp+A8h] [rbp-50h] BYREF
_QWORD v10[6]; // [rsp+C8h] [rbp-30h] BYREF
std::string::basic_string<std::allocator<char>>(v10, (long long)"MIC");
iconColor((long long)v6, (long long)v10);
std::string::~string(v10);
std::string::basic_string<std::allocator<char>>(a1, (long long)"");
if ( Mic::is_muted == 1 )
{
std::operator+<char>((long long)v4, (long long)" ", (long long)v6);
std::operator+<char>((long long)v5, (long long)v4, " off ");
std::string::operator=(a1, v5);
std::string::~string(v5);
v2 = v4;
}
else
{
std::operator+<char>((long long)v8, (long long)" ", (long long)v6);
std::operator+<char>((long long)v9, (long long)v8, " ");
std::to_string((std::__cxx11 *)v7, Mic::current_percent);
std::operator+<char>((long long)v4, v9, v7);
std::operator+<char>((long long)v5, (long long)v4, "% ");
std::string::operator=(a1, v5);
std::string::~string(v5);
std::string::~string(v4);
std::string::~string(v7);
std::string::~string(v9);
v2 = v8;
}
std::string::~string(v2);
std::string::~string(v6);
return a1;
}
|
getMicVolume[abi:cxx11]:
PUSH R14
PUSH RBX
SUB RSP,0xe8
MOV RBX,RDI
LAB_00108a2f:
LEA RSI,[0x1097a2]
LEA RDI,[RSP + 0xc8]
LEA RDX,[RSP + 0x28]
CALL 0x0010593c
LAB_00108a48:
LEA RDI,[RSP + 0x48]
LEA RSI,[RSP + 0xc8]
CALL 0x00105fc6
LEA RDI,[RSP + 0xc8]
CALL 0x001046e8
LAB_00108a67:
LEA RSI,[0x10940a]
LEA RDX,[RSP + 0x28]
MOV RDI,RBX
CALL 0x0010593c
CMP byte ptr [0x0010d460],0x1
JNZ 0x00108ad2
LAB_00108a84:
LEA RSI,[0x109252]
LEA RDI,[RSP + 0x8]
LEA RDX,[RSP + 0x48]
CALL 0x00105a4c
LAB_00108a9a:
LEA RDX,[0x1097a6]
LEA RDI,[RSP + 0x28]
LEA RSI,[RSP + 0x8]
CALL 0x001059c6
LEA R14,[RSP + 0x28]
MOV RDI,RBX
MOV RSI,R14
CALL 0x00104460
MOV RDI,R14
CALL 0x001046e8
LEA RDI,[RSP + 0x8]
JMP 0x00108b85
LAB_00108ad2:
LEA RSI,[0x109252]
LEA RDI,[RSP + 0x88]
LEA RDX,[RSP + 0x48]
CALL 0x00105a4c
LAB_00108aeb:
LEA RDX,[0x109252]
LEA RDI,[RSP + 0xa8]
LEA RSI,[RSP + 0x88]
CALL 0x001059c6
MOV ESI,dword ptr [0x0010d45c]
LAB_00108b0d:
LEA RDI,[RSP + 0x68]
CALL 0x00105ac2
LAB_00108b17:
LEA RDI,[RSP + 0x8]
LEA RSI,[RSP + 0xa8]
LEA RDX,[RSP + 0x68]
CALL 0x001059e5
LAB_00108b2e:
LEA RDX,[0x109251]
LEA RDI,[RSP + 0x28]
LEA RSI,[RSP + 0x8]
CALL 0x001059c6
LAB_00108b44:
LEA R14,[RSP + 0x28]
MOV RDI,RBX
MOV RSI,R14
CALL 0x00104460
MOV RDI,R14
CALL 0x001046e8
LEA RDI,[RSP + 0x8]
CALL 0x001046e8
LEA RDI,[RSP + 0x68]
CALL 0x001046e8
LEA RDI,[RSP + 0xa8]
CALL 0x001046e8
LEA RDI,[RSP + 0x88]
LAB_00108b85:
CALL 0x001046e8
LEA RDI,[RSP + 0x48]
CALL 0x001046e8
MOV RAX,RBX
ADD RSP,0xe8
POP RBX
POP R14
RET
|
/* Mic::getMicVolume[abi:cxx11]() */
Mic * __thiscall Mic::getMicVolume_abi_cxx11_(Mic *this)
{
string *this_00;
string local_f0 [32];
allocator local_d0 [32];
string local_b0 [32];
__cxx11 local_90 [32];
string local_70 [32];
string local_50 [32];
string local_30 [32];
/* try { // try from 00108a2f to 00108a47 has its CatchHandler @ 00108c1f */
std::__cxx11::string::string<std::allocator<char>>(local_30,"MIC",local_d0);
/* try { // try from 00108a48 to 00108a59 has its CatchHandler @ 00108c12 */
iconColor(local_b0,local_30);
std::__cxx11::string::~string(local_30);
/* try { // try from 00108a67 to 00108a7a has its CatchHandler @ 00108bfd */
std::__cxx11::string::string<std::allocator<char>>((string *)this,"",local_d0);
if (is_muted == '\x01') {
/* try { // try from 00108a84 to 00108a99 has its CatchHandler @ 00108bf0 */
std::operator+((char *)local_f0,(string *)&DAT_00109252);
/* try { // try from 00108a9a to 00108aaf has its CatchHandler @ 00108bdf */
std::operator+((string *)local_d0,(char *)local_f0);
std::__cxx11::string::operator=((string *)this,(string *)local_d0);
std::__cxx11::string::~string((string *)local_d0);
this_00 = local_f0;
}
else {
/* try { // try from 00108ad2 to 00108aea has its CatchHandler @ 00108bee */
std::operator+((char *)local_70,(string *)&DAT_00109252);
/* try { // try from 00108aeb to 00108b06 has its CatchHandler @ 00108bd2 */
std::operator+(local_50,(char *)local_70);
/* try { // try from 00108b0d to 00108b16 has its CatchHandler @ 00108bc0 */
std::__cxx11::to_string(local_90,current_percent);
/* try { // try from 00108b17 to 00108b2d has its CatchHandler @ 00108bb1 */
std::operator+(local_f0,local_50);
/* try { // try from 00108b2e to 00108b43 has its CatchHandler @ 00108ba2 */
std::operator+((string *)local_d0,(char *)local_f0);
std::__cxx11::string::operator=((string *)this,(string *)local_d0);
std::__cxx11::string::~string((string *)local_d0);
std::__cxx11::string::~string(local_f0);
std::__cxx11::string::~string((string *)local_90);
std::__cxx11::string::~string(local_50);
this_00 = local_70;
}
std::__cxx11::string::~string(this_00);
std::__cxx11::string::~string(local_b0);
return this;
}
|
|
14,603
|
mult
|
eloqsql/strings/dtoa.c
|
static Bigint *mult(Bigint *a, Bigint *b, Stack_alloc *alloc)
{
Bigint *c;
int k, wa, wb, wc;
ULong *x, *xa, *xae, *xb, *xbe, *xc, *xc0;
ULong y;
ULLong carry, z;
if (a->wds < b->wds)
{
c= a;
a= b;
b= c;
}
k= a->k;
wa= a->wds;
wb= b->wds;
wc= wa + wb;
if (wc > a->maxwds)
k++;
c= Balloc(k, alloc);
for (x= c->p.x, xa= x + wc; x < xa; x++)
*x= 0;
xa= a->p.x;
xae= xa + wa;
xb= b->p.x;
xbe= xb + wb;
xc0= c->p.x;
for (; xb < xbe; xc0++)
{
if ((y= *xb++))
{
x= xa;
xc= xc0;
carry= 0;
do
{
z= *x++ * (ULLong)y + *xc + carry;
carry= z >> 32;
*xc++= (ULong) (z & FFFFFFFF);
}
while (x < xae);
*xc= (ULong) carry;
}
}
for (xc0= c->p.x, xc= xc0 + wc; wc > 0 && !*--xc; --wc) ;
c->wds= wc;
return c;
}
|
O0
|
c
|
mult:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0x14(%rcx), %eax
jge 0x818bf
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0x2c(%rbp)
movl -0x28(%rbp), %eax
addl -0x2c(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jle 0x818fb
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %edi
movq -0x18(%rbp), %rsi
callq 0x81420
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movslq -0x30(%rbp), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x8194b
movq -0x38(%rbp), %rax
movl $0x0, (%rax)
movq -0x38(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x38(%rbp)
jmp 0x81929
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movslq -0x28(%rbp), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x68(%rbp)
movq -0x50(%rbp), %rax
cmpq -0x58(%rbp), %rax
jae 0x81a54
movq -0x50(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x50(%rbp)
movl (%rax), %eax
movl %eax, -0x6c(%rbp)
cmpl $0x0, %eax
je 0x81a41
movq -0x40(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x60(%rbp)
movq $0x0, -0x78(%rbp)
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x38(%rbp)
movl (%rax), %eax
movl -0x6c(%rbp), %ecx
imulq %rcx, %rax
movq -0x60(%rbp), %rcx
movl (%rcx), %ecx
addq %rcx, %rax
addq -0x78(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rax
shrq $0x20, %rax
movq %rax, -0x78(%rbp)
movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF
andq -0x80(%rbp), %rax
movl %eax, %ecx
movq -0x60(%rbp), %rax
movq %rax, %rdx
addq $0x4, %rdx
movq %rdx, -0x60(%rbp)
movl %ecx, (%rax)
movq -0x38(%rbp), %rax
cmpq -0x48(%rbp), %rax
jb 0x819d5
movq -0x78(%rbp), %rax
movl %eax, %ecx
movq -0x60(%rbp), %rax
movl %ecx, (%rax)
jmp 0x81a43
movq -0x68(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x68(%rbp)
jmp 0x81992
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movslq -0x30(%rbp), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x60(%rbp)
xorl %eax, %eax
cmpl $0x0, -0x30(%rbp)
movb %al, -0x81(%rbp)
jle 0x81a9e
movq -0x60(%rbp), %rax
movq %rax, %rcx
addq $-0x4, %rcx
movq %rcx, -0x60(%rbp)
cmpl $0x0, -0x4(%rax)
setne %al
xorb $-0x1, %al
movb %al, -0x81(%rbp)
movb -0x81(%rbp), %al
testb $0x1, %al
jne 0x81aaa
jmp 0x81ab7
jmp 0x81aac
movl -0x30(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x81a72
movl -0x30(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x20(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
nop
|
mult:
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_8]
mov eax, [rax+14h]
mov rcx, [rbp+var_10]
cmp eax, [rcx+14h]
jge short loc_818BF
mov rax, [rbp+var_8]
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov [rbp+var_8], rax
mov rax, [rbp+var_20]
mov [rbp+var_10], rax
loc_818BF:
mov rax, [rbp+var_8]
mov eax, [rax+8]
mov [rbp+var_24], eax
mov rax, [rbp+var_8]
mov eax, [rax+14h]
mov [rbp+var_28], eax
mov rax, [rbp+var_10]
mov eax, [rax+14h]
mov [rbp+var_2C], eax
mov eax, [rbp+var_28]
add eax, [rbp+var_2C]
mov [rbp+var_30], eax
mov eax, [rbp+var_30]
mov rcx, [rbp+var_8]
cmp eax, [rcx+0Ch]
jle short loc_818FB
mov eax, [rbp+var_24]
add eax, 1
mov [rbp+var_24], eax
loc_818FB:
mov edi, [rbp+var_24]
mov rsi, [rbp+var_18]
call Balloc
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
mov rax, [rax]
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
movsxd rcx, [rbp+var_30]
shl rcx, 2
add rax, rcx
mov [rbp+var_40], rax
loc_81929:
mov rax, [rbp+var_38]
cmp rax, [rbp+var_40]
jnb short loc_8194B
mov rax, [rbp+var_38]
mov dword ptr [rax], 0
mov rax, [rbp+var_38]
add rax, 4
mov [rbp+var_38], rax
jmp short loc_81929
loc_8194B:
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_40], rax
mov rax, [rbp+var_40]
movsxd rcx, [rbp+var_28]
shl rcx, 2
add rax, rcx
mov [rbp+var_48], rax
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_50], rax
mov rax, [rbp+var_50]
movsxd rcx, [rbp+var_2C]
shl rcx, 2
add rax, rcx
mov [rbp+var_58], rax
mov rax, [rbp+var_20]
mov rax, [rax]
mov [rbp+var_68], rax
loc_81992:
mov rax, [rbp+var_50]
cmp rax, [rbp+var_58]
jnb loc_81A54
mov rax, [rbp+var_50]
mov rcx, rax
add rcx, 4
mov [rbp+var_50], rcx
mov eax, [rax]
mov [rbp+var_6C], eax
cmp eax, 0
jz loc_81A41
mov rax, [rbp+var_40]
mov [rbp+var_38], rax
mov rax, [rbp+var_68]
mov [rbp+var_60], rax
mov [rbp+var_78], 0
loc_819D5:
mov rax, [rbp+var_38]
mov rcx, rax
add rcx, 4
mov [rbp+var_38], rcx
mov eax, [rax]
mov ecx, [rbp+var_6C]
imul rax, rcx
mov rcx, [rbp+var_60]
mov ecx, [rcx]
add rax, rcx
add rax, [rbp+var_78]
mov [rbp+var_80], rax
mov rax, [rbp+var_80]
shr rax, 20h
mov [rbp+var_78], rax
mov rax, 0FFFFFFFFh
and rax, [rbp+var_80]
mov ecx, eax
mov rax, [rbp+var_60]
mov rdx, rax
add rdx, 4
mov [rbp+var_60], rdx
mov [rax], ecx
mov rax, [rbp+var_38]
cmp rax, [rbp+var_48]
jb short loc_819D5
mov rax, [rbp+var_78]
mov ecx, eax
mov rax, [rbp+var_60]
mov [rax], ecx
loc_81A41:
jmp short $+2
loc_81A43:
mov rax, [rbp+var_68]
add rax, 4
mov [rbp+var_68], rax
jmp loc_81992
loc_81A54:
mov rax, [rbp+var_20]
mov rax, [rax]
mov [rbp+var_68], rax
mov rax, [rbp+var_68]
movsxd rcx, [rbp+var_30]
shl rcx, 2
add rax, rcx
mov [rbp+var_60], rax
loc_81A72:
xor eax, eax
cmp [rbp+var_30], 0
mov [rbp+var_81], al
jle short loc_81A9E
mov rax, [rbp+var_60]
mov rcx, rax
add rcx, 0FFFFFFFFFFFFFFFCh
mov [rbp+var_60], rcx
cmp dword ptr [rax-4], 0
setnz al
xor al, 0FFh
mov [rbp+var_81], al
loc_81A9E:
mov al, [rbp+var_81]
test al, 1
jnz short loc_81AAA
jmp short loc_81AB7
loc_81AAA:
jmp short $+2
loc_81AAC:
mov eax, [rbp+var_30]
add eax, 0FFFFFFFFh
mov [rbp+var_30], eax
jmp short loc_81A72
loc_81AB7:
mov ecx, [rbp+var_30]
mov rax, [rbp+var_20]
mov [rax+14h], ecx
mov rax, [rbp+var_20]
add rsp, 90h
pop rbp
retn
|
long long mult(unsigned int **a1, unsigned int **a2, long long a3)
{
unsigned int *v3; // rax
unsigned int *v4; // rax
_DWORD *v5; // rax
long long v6; // rax
char v8; // [rsp+Fh] [rbp-81h]
unsigned long long v9; // [rsp+10h] [rbp-80h]
unsigned long long v10; // [rsp+18h] [rbp-78h]
unsigned int v11; // [rsp+24h] [rbp-6Ch]
_DWORD *v12; // [rsp+28h] [rbp-68h]
_DWORD *v13; // [rsp+30h] [rbp-60h]
long long v14; // [rsp+30h] [rbp-60h]
unsigned long long v15; // [rsp+38h] [rbp-58h]
unsigned int *v16; // [rsp+40h] [rbp-50h]
unsigned long long v17; // [rsp+48h] [rbp-48h]
unsigned long long v18; // [rsp+50h] [rbp-40h]
unsigned int *v19; // [rsp+50h] [rbp-40h]
_DWORD *v20; // [rsp+58h] [rbp-38h]
unsigned int *v21; // [rsp+58h] [rbp-38h]
int v22; // [rsp+60h] [rbp-30h]
int v23; // [rsp+64h] [rbp-2Ch]
int v24; // [rsp+68h] [rbp-28h]
int v25; // [rsp+6Ch] [rbp-24h]
long long v26; // [rsp+70h] [rbp-20h]
unsigned int **v27; // [rsp+80h] [rbp-10h]
unsigned int **v28; // [rsp+88h] [rbp-8h]
v28 = a1;
v27 = a2;
if ( *((_DWORD *)a1 + 5) < *((_DWORD *)a2 + 5) )
{
v28 = a2;
v27 = a1;
}
v25 = *((_DWORD *)v28 + 2);
v24 = *((_DWORD *)v28 + 5);
v23 = *((_DWORD *)v27 + 5);
v22 = v23 + v24;
if ( v23 + v24 > *((_DWORD *)v28 + 3) )
++v25;
v26 = Balloc(v25, a3);
v20 = *(_DWORD **)v26;
v18 = 4LL * v22 + *(_QWORD *)v26;
while ( (unsigned long long)v20 < v18 )
*v20++ = 0;
v19 = *v28;
v17 = (unsigned long long)&(*v28)[v24];
v16 = *v27;
v15 = (unsigned long long)&(*v27)[v23];
v12 = *(_DWORD **)v26;
while ( (unsigned long long)v16 < v15 )
{
v3 = v16++;
v11 = *v3;
if ( *v3 )
{
v21 = v19;
v13 = v12;
v10 = 0LL;
do
{
v4 = v21++;
v9 = v10 + (unsigned int)*v13 + v11 * (unsigned long long)*v4;
v10 = HIDWORD(v9);
v5 = v13++;
*v5 = v9;
}
while ( (unsigned long long)v21 < v17 );
*v13 = HIDWORD(v9);
}
++v12;
}
v14 = 4LL * v22 + *(_QWORD *)v26;
while ( 1 )
{
v8 = 0;
if ( v22 > 0 )
{
v6 = v14;
v14 -= 4LL;
v8 = ~(*(_DWORD *)(v6 - 4) != 0);
}
if ( (v8 & 1) == 0 )
break;
--v22;
}
*(_DWORD *)(v26 + 20) = v22;
return v26;
}
|
mult:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x14]
MOV RCX,qword ptr [RBP + -0x10]
CMP EAX,dword ptr [RCX + 0x14]
JGE 0x001818bf
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x8],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x10],RAX
LAB_001818bf:
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x8]
MOV dword ptr [RBP + -0x24],EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x14]
MOV dword ptr [RBP + -0x28],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x14]
MOV dword ptr [RBP + -0x2c],EAX
MOV EAX,dword ptr [RBP + -0x28]
ADD EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0x30],EAX
MOV EAX,dword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x8]
CMP EAX,dword ptr [RCX + 0xc]
JLE 0x001818fb
MOV EAX,dword ptr [RBP + -0x24]
ADD EAX,0x1
MOV dword ptr [RBP + -0x24],EAX
LAB_001818fb:
MOV EDI,dword ptr [RBP + -0x24]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x00181420
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOVSXD RCX,dword ptr [RBP + -0x30]
SHL RCX,0x2
ADD RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
LAB_00181929:
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x40]
JNC 0x0018194b
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x4
MOV qword ptr [RBP + -0x38],RAX
JMP 0x00181929
LAB_0018194b:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOVSXD RCX,dword ptr [RBP + -0x28]
SHL RCX,0x2
ADD RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOVSXD RCX,dword ptr [RBP + -0x2c]
SHL RCX,0x2
ADD RAX,RCX
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x68],RAX
LAB_00181992:
MOV RAX,qword ptr [RBP + -0x50]
CMP RAX,qword ptr [RBP + -0x58]
JNC 0x00181a54
MOV RAX,qword ptr [RBP + -0x50]
MOV RCX,RAX
ADD RCX,0x4
MOV qword ptr [RBP + -0x50],RCX
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x6c],EAX
CMP EAX,0x0
JZ 0x00181a41
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RBP + -0x60],RAX
MOV qword ptr [RBP + -0x78],0x0
LAB_001819d5:
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,RAX
ADD RCX,0x4
MOV qword ptr [RBP + -0x38],RCX
MOV EAX,dword ptr [RAX]
MOV ECX,dword ptr [RBP + -0x6c]
IMUL RAX,RCX
MOV RCX,qword ptr [RBP + -0x60]
MOV ECX,dword ptr [RCX]
ADD RAX,RCX
ADD RAX,qword ptr [RBP + -0x78]
MOV qword ptr [RBP + -0x80],RAX
MOV RAX,qword ptr [RBP + -0x80]
SHR RAX,0x20
MOV qword ptr [RBP + -0x78],RAX
MOV RAX,0xffffffff
AND RAX,qword ptr [RBP + -0x80]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x60]
MOV RDX,RAX
ADD RDX,0x4
MOV qword ptr [RBP + -0x60],RDX
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x48]
JC 0x001819d5
MOV RAX,qword ptr [RBP + -0x78]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x60]
MOV dword ptr [RAX],ECX
LAB_00181a41:
JMP 0x00181a43
LAB_00181a43:
MOV RAX,qword ptr [RBP + -0x68]
ADD RAX,0x4
MOV qword ptr [RBP + -0x68],RAX
JMP 0x00181992
LAB_00181a54:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x68]
MOVSXD RCX,dword ptr [RBP + -0x30]
SHL RCX,0x2
ADD RAX,RCX
MOV qword ptr [RBP + -0x60],RAX
LAB_00181a72:
XOR EAX,EAX
CMP dword ptr [RBP + -0x30],0x0
MOV byte ptr [RBP + -0x81],AL
JLE 0x00181a9e
MOV RAX,qword ptr [RBP + -0x60]
MOV RCX,RAX
ADD RCX,-0x4
MOV qword ptr [RBP + -0x60],RCX
CMP dword ptr [RAX + -0x4],0x0
SETNZ AL
XOR AL,0xff
MOV byte ptr [RBP + -0x81],AL
LAB_00181a9e:
MOV AL,byte ptr [RBP + -0x81]
TEST AL,0x1
JNZ 0x00181aaa
JMP 0x00181ab7
LAB_00181aaa:
JMP 0x00181aac
LAB_00181aac:
MOV EAX,dword ptr [RBP + -0x30]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x30],EAX
JMP 0x00181a72
LAB_00181ab7:
MOV ECX,dword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0x14],ECX
MOV RAX,qword ptr [RBP + -0x20]
ADD RSP,0x90
POP RBP
RET
|
long * mult(int8 *param_1,int8 *param_2,int8 param_3)
{
int iVar1;
int iVar2;
uint uVar3;
uint *puVar4;
uint *puVar5;
long *plVar6;
int4 *puVar7;
ulong uVar8;
uint *puVar9;
uint *puVar10;
bool bVar11;
ulong local_80;
uint *local_70;
uint *local_68;
uint *local_58;
uint *local_40;
int local_38;
int local_2c;
int8 *local_18;
int8 *local_10;
local_18 = param_2;
local_10 = param_1;
if (*(int *)((long)param_1 + 0x14) < *(int *)((long)param_2 + 0x14)) {
local_18 = param_1;
local_10 = param_2;
}
local_2c = *(int *)(local_10 + 1);
iVar1 = *(int *)((long)local_10 + 0x14);
iVar2 = *(int *)((long)local_18 + 0x14);
local_38 = iVar1 + iVar2;
if (*(int *)((long)local_10 + 0xc) < local_38) {
local_2c = local_2c + 1;
}
plVar6 = (long *)Balloc(local_2c,param_3);
local_40 = (uint *)*plVar6;
puVar7 = local_40 + local_38;
for (; local_40 < puVar7; local_40 = local_40 + 1) {
*local_40 = 0;
}
puVar4 = (uint *)*local_10;
puVar5 = (uint *)*local_18;
local_70 = (uint *)*plVar6;
local_58 = puVar5;
while (local_58 < puVar5 + iVar2) {
uVar3 = *local_58;
if (uVar3 != 0) {
local_68 = local_70;
local_80 = 0;
local_40 = puVar4;
do {
puVar9 = local_40 + 1;
uVar8 = (ulong)*local_40 * (ulong)uVar3 + (ulong)*local_68 + local_80;
local_80 = uVar8 >> 0x20;
puVar10 = local_68 + 1;
*local_68 = (uint)uVar8;
local_68 = puVar10;
local_40 = puVar9;
} while (puVar9 < puVar4 + iVar1);
*puVar10 = (uint)(uVar8 >> 0x20);
}
local_70 = local_70 + 1;
local_58 = local_58 + 1;
}
local_68 = (uint *)(*plVar6 + (long)local_38 * 4);
while( true ) {
bVar11 = false;
if (0 < local_38) {
bVar11 = *(int *)((long)local_68 + -4) == 0;
local_68 = (uint *)((long)local_68 + -4);
}
if (!bVar11) break;
local_38 = local_38 + -1;
}
*(int *)((long)plVar6 + 0x14) = local_38;
return plVar6;
}
|
|
14,604
|
gguf_write_to_buf
|
7CodeWizard[P]stablediffusion/ggml/src/ggml.c
|
static void gguf_write_to_buf(const struct gguf_context * ctx, struct gguf_buf * buf, bool only_meta) {
// write header
gguf_bwrite_el(buf, &ctx->header.magic, sizeof(ctx->header.magic));
gguf_bwrite_el(buf, &ctx->header.version, sizeof(ctx->header.version));
gguf_bwrite_el(buf, &ctx->header.n_tensors, sizeof(ctx->header.n_tensors));
gguf_bwrite_el(buf, &ctx->header.n_kv, sizeof(ctx->header.n_kv));
// write key-value pairs
for (uint32_t i = 0; i < ctx->header.n_kv; ++i) {
struct gguf_kv * kv = &ctx->kv[i];
gguf_bwrite_str(buf, &kv->key);
gguf_bwrite_el (buf, &kv->type, sizeof(kv->type));
switch (kv->type) {
case GGUF_TYPE_UINT8: gguf_bwrite_el( buf, &kv->value.uint8, sizeof(kv->value.uint8) ); break;
case GGUF_TYPE_INT8: gguf_bwrite_el (buf, &kv->value.int8, sizeof(kv->value.int8) ); break;
case GGUF_TYPE_UINT16: gguf_bwrite_el (buf, &kv->value.uint16, sizeof(kv->value.uint16) ); break;
case GGUF_TYPE_INT16: gguf_bwrite_el (buf, &kv->value.int16, sizeof(kv->value.int16) ); break;
case GGUF_TYPE_UINT32: gguf_bwrite_el (buf, &kv->value.uint32, sizeof(kv->value.uint32) ); break;
case GGUF_TYPE_INT32: gguf_bwrite_el (buf, &kv->value.int32, sizeof(kv->value.int32) ); break;
case GGUF_TYPE_FLOAT32: gguf_bwrite_el (buf, &kv->value.float32, sizeof(kv->value.float32)); break;
case GGUF_TYPE_UINT64: gguf_bwrite_el (buf, &kv->value.uint64, sizeof(kv->value.uint64) ); break;
case GGUF_TYPE_INT64: gguf_bwrite_el (buf, &kv->value.int64, sizeof(kv->value.int64) ); break;
case GGUF_TYPE_FLOAT64: gguf_bwrite_el (buf, &kv->value.float64, sizeof(kv->value.float64)); break;
case GGUF_TYPE_BOOL: gguf_bwrite_el (buf, &kv->value.bool_, sizeof(kv->value.bool_) ); break;
case GGUF_TYPE_STRING: gguf_bwrite_str(buf, &kv->value.str ); break;
case GGUF_TYPE_ARRAY:
{
gguf_bwrite_el(buf, &kv->value.arr.type, sizeof(kv->value.arr.type));
gguf_bwrite_el(buf, &kv->value.arr.n, sizeof(kv->value.arr.n) );
switch (kv->value.arr.type) {
case GGUF_TYPE_UINT8:
case GGUF_TYPE_INT8:
case GGUF_TYPE_UINT16:
case GGUF_TYPE_INT16:
case GGUF_TYPE_UINT32:
case GGUF_TYPE_INT32:
case GGUF_TYPE_FLOAT32:
case GGUF_TYPE_UINT64:
case GGUF_TYPE_INT64:
case GGUF_TYPE_FLOAT64:
case GGUF_TYPE_BOOL:
{
gguf_bwrite_el(buf, kv->value.arr.data, kv->value.arr.n * GGUF_TYPE_SIZE[kv->value.arr.type]);
} break;
case GGUF_TYPE_STRING:
{
for (uint32_t j = 0; j < kv->value.arr.n; ++j) {
gguf_bwrite_str(buf, &((struct gguf_str *) kv->value.arr.data)[j]);
}
} break;
case GGUF_TYPE_ARRAY:
case GGUF_TYPE_COUNT: GGML_ASSERT(false && "invalid type"); break;
}
} break;
case GGUF_TYPE_COUNT: GGML_ASSERT(false && "invalid type");
}
}
// write tensor infos
for (uint32_t i = 0; i < ctx->header.n_tensors; ++i) {
struct gguf_tensor_info * info = &ctx->infos[i];
gguf_bwrite_str(buf, &info->name);
gguf_bwrite_el (buf, &info->n_dims, sizeof(info->n_dims));
for (uint32_t j = 0; j < info->n_dims; ++j) {
gguf_bwrite_el(buf, &info->ne[j], sizeof(info->ne[j]));
}
gguf_bwrite_el(buf, &info->type, sizeof(info->type));
gguf_bwrite_el(buf, &info->offset, sizeof(info->offset));
}
// we require the data section to be aligned, so take into account any padding
{
const size_t offset = buf->offset;
const size_t offset_pad = GGML_PAD(offset, ctx->alignment);
if (offset_pad != offset) {
uint8_t pad = 0;
for (size_t i = 0; i < offset_pad - offset; ++i) {
gguf_bwrite_el(buf, &pad, sizeof(pad));
}
}
}
if (only_meta) {
return;
}
size_t offset = 0;
// write tensor data
for (uint32_t i = 0; i < ctx->header.n_tensors; ++i) {
struct gguf_tensor_info * info = &ctx->infos[i];
const size_t size = info->size;
const size_t size_pad = GGML_PAD(size, ctx->alignment);
gguf_bwrite_el(buf, info->data, size);
if (size_pad != size) {
uint8_t pad = 0;
for (size_t j = 0; j < size_pad - size; ++j) {
gguf_bwrite_el(buf, &pad, sizeof(pad));
}
}
GGML_ASSERT(offset == info->offset);
offset += size_pad;
}
}
|
O1
|
c
|
gguf_write_to_buf:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, (%rsp)
movq %rsi, %rbx
movq %rdi, %r14
movl $0x4, %esi
movq %rbx, %rdi
callq 0xb2de5
movq (%rbx), %rax
testq %rax, %rax
je 0x9e8c3
movq 0x10(%rbx), %rcx
movl (%r14), %edx
movl %edx, (%rax,%rcx)
addq $0x4, 0x10(%rbx)
movl $0x4, %esi
movq %rbx, %rdi
callq 0xb2de5
movq (%rbx), %rax
testq %rax, %rax
je 0x9e8e8
movq 0x10(%rbx), %rcx
movl 0x4(%r14), %edx
movl %edx, (%rax,%rcx)
addq $0x4, 0x10(%rbx)
movl $0x8, %esi
movq %rbx, %rdi
callq 0xb2de5
movq (%rbx), %rax
testq %rax, %rax
je 0x9e90e
movq 0x10(%rbx), %rcx
movq 0x8(%r14), %rdx
movq %rdx, (%rax,%rcx)
addq $0x8, 0x10(%rbx)
movl $0x8, %esi
movq %rbx, %rdi
callq 0xb2de5
movq (%rbx), %rax
testq %rax, %rax
je 0x9e934
movq 0x10(%rbx), %rcx
movq 0x10(%r14), %rdx
movq %rdx, (%rax,%rcx)
addq $0x8, 0x10(%rbx)
cmpq $0x0, 0x10(%r14)
movq %r14, 0x8(%rsp)
je 0x9eb4a
xorl %ebp, %ebp
leaq 0x26d5a(%rip), %r13 # 0xc56ac
leaq (,%rbp,2), %r15
addq %rbp, %r15
shlq $0x4, %r15
addq 0x18(%r14), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0xb2d8a
movl $0x4, %esi
movq %rbx, %rdi
callq 0xb2de5
movq (%rbx), %rax
testq %rax, %rax
je 0x9e990
movq 0x10(%rbx), %rcx
movl 0x10(%r15), %edx
movl %edx, (%rax,%rcx)
addq $0x4, 0x10(%rbx)
movl 0x10(%r15), %eax
cmpq $0xd, %rax
ja 0x9eb01
movslq (%r13,%rax,4), %rax
addq %r13, %rax
jmpq *%rax
movl $0x1, %esi
movq %rbx, %rdi
callq 0xb2de5
movq (%rbx), %rax
testq %rax, %rax
je 0x9e9cd
movq 0x10(%rbx), %rcx
movb 0x18(%r15), %dl
movb %dl, (%rax,%rcx)
incq 0x10(%rbx)
jmp 0x9eb01
movl $0x8, %esi
movq %rbx, %rdi
callq 0xb2de5
movq (%rbx), %rax
testq %rax, %rax
je 0x9e9f7
movq 0x10(%rbx), %rcx
movq 0x18(%r15), %rdx
movq %rdx, (%rax,%rcx)
addq $0x8, 0x10(%rbx)
jmp 0x9eb01
movl $0x4, %esi
movq %rbx, %rdi
callq 0xb2de5
movq (%rbx), %rax
testq %rax, %rax
je 0x9ea21
movq 0x10(%rbx), %rcx
movl 0x18(%r15), %edx
movl %edx, (%rax,%rcx)
addq $0x4, 0x10(%rbx)
jmp 0x9eb01
movl $0x2, %esi
movq %rbx, %rdi
callq 0xb2de5
movq (%rbx), %rax
testq %rax, %rax
je 0x9ea4d
movq 0x10(%rbx), %rcx
movzwl 0x18(%r15), %edx
movw %dx, (%rax,%rcx)
addq $0x2, 0x10(%rbx)
jmp 0x9eb01
movl $0x4, %esi
movq %rbx, %rdi
callq 0xb2de5
movq (%rbx), %rax
testq %rax, %rax
je 0x9ea77
movq 0x10(%rbx), %rcx
movl 0x18(%r15), %edx
movl %edx, (%rax,%rcx)
addq $0x4, 0x10(%rbx)
movl $0x8, %esi
movq %rbx, %rdi
callq 0xb2de5
movq (%rbx), %rax
testq %rax, %rax
je 0x9ea9d
movq 0x10(%rbx), %rcx
movq 0x20(%r15), %rdx
movq %rdx, (%rax,%rcx)
addq $0x8, 0x10(%rbx)
movl 0x18(%r15), %eax
cmpq $0xd, %rax
ja 0x9eb01
movl $0x1cff, %ecx # imm = 0x1CFF
btl %eax, %ecx
jae 0x9eb14
movq 0x28(%r15), %r14
leaq 0x26d8f(%rip), %rcx # 0xc5850
movq (%rcx,%rax,8), %r12
imulq 0x20(%r15), %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0xb2de5
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x9eaec
addq 0x10(%rbx), %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0xa4c0
addq %r12, 0x10(%rbx)
jmp 0x9eb01
addq $0x18, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0xb2d8a
incl %ebp
movq 0x8(%rsp), %r14
cmpq %rbp, 0x10(%r14)
ja 0x9e952
jmp 0x9eb4a
cmpl $0x8, %eax
jne 0x9ed50
cmpq $0x0, 0x20(%r15)
je 0x9eb01
movl $0x1, %r14d
xorl %esi, %esi
shlq $0x4, %rsi
addq 0x28(%r15), %rsi
movq %rbx, %rdi
callq 0xb2d8a
movl %r14d, %esi
incl %r14d
cmpq %rsi, 0x20(%r15)
ja 0x9eb2c
jmp 0x9eb01
cmpq $0x0, 0x8(%r14)
movq %r14, %rbp
je 0x9ec38
xorl %r12d, %r12d
movq 0x20(%rbp), %r14
imulq $0x58, %r12, %r15
addq %r14, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0xb2d8a
movl $0x4, %esi
movq %rbx, %rdi
callq 0xb2de5
movq (%rbx), %rax
testq %rax, %rax
je 0x9eb91
movq 0x10(%rbx), %rcx
movl 0x10(%r15), %edx
movl %edx, (%rax,%rcx)
addq $0x4, 0x10(%rbx)
cmpl $0x0, 0x10(%r15)
je 0x9ebe0
movl %r12d, %eax
imulq $0x58, %rax, %rax
addq %rax, %r14
addq $0x18, %r14
xorl %r13d, %r13d
movl $0x8, %esi
movq %rbx, %rdi
callq 0xb2de5
movq (%rbx), %rax
testq %rax, %rax
je 0x9ebcf
movq 0x10(%rbx), %rcx
movq (%r14,%r13,8), %rdx
movq %rdx, (%rax,%rcx)
addq $0x8, 0x10(%rbx)
incq %r13
movl 0x10(%r15), %eax
cmpq %rax, %r13
jb 0x9ebae
movl $0x4, %esi
movq %rbx, %rdi
callq 0xb2de5
movq (%rbx), %rax
testq %rax, %rax
je 0x9ec00
movq 0x10(%rbx), %rcx
movl 0x38(%r15), %edx
movl %edx, (%rax,%rcx)
addq $0x4, 0x10(%rbx)
movl $0x8, %esi
movq %rbx, %rdi
callq 0xb2de5
movq (%rbx), %rax
testq %rax, %rax
je 0x9ec26
movq 0x10(%rbx), %rcx
movq 0x40(%r15), %rdx
movq %rdx, (%rax,%rcx)
addq $0x8, 0x10(%rbx)
incl %r12d
cmpq %r12, 0x8(%rbp)
ja 0x9eb5b
movq 0x10(%rbx), %rax
movq 0x28(%rbp), %r14
leaq (%rax,%r14), %rcx
decq %rcx
negq %r14
andq %rcx, %r14
subq %rax, %r14
je 0x9ec78
movl $0x1, %esi
movq %rbx, %rdi
callq 0xb2de5
movq (%rbx), %rax
testq %rax, %rax
je 0x9ec6f
movq 0x10(%rbx), %rcx
movb $0x0, (%rax,%rcx)
incq 0x10(%rbx)
decq %r14
jne 0x9ec52
cmpb $0x0, (%rsp)
jne 0x9ed37
cmpq $0x0, 0x8(%rbp)
je 0x9ed37
xorl %r13d, %r13d
xorl %eax, %eax
movq %rax, (%rsp)
imulq $0x58, %r13, %rax
movq 0x20(%rbp), %r12
movq 0x28(%rbp), %rbp
movq 0x48(%r12,%rax), %r14
movq %rax, 0x10(%rsp)
movq 0x50(%r12,%rax), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0xb2de5
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x9ecd3
addq 0x10(%rbx), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0xa4c0
leaq (%r15,%rbp), %rax
decq %rax
addq %r15, 0x10(%rbx)
negq %rbp
andq %rax, %rbp
movq %rbp, %r14
subq %r15, %r14
je 0x9ed12
movl $0x1, %esi
movq %rbx, %rdi
callq 0xb2de5
movq (%rbx), %rax
testq %rax, %rax
je 0x9ed09
movq 0x10(%rbx), %rcx
movb $0x0, (%rax,%rcx)
incq 0x10(%rbx)
decq %r14
jne 0x9ecec
addq 0x10(%rsp), %r12
movq (%rsp), %rax
cmpq 0x40(%r12), %rax
jne 0x9ed46
addq %rbp, %rax
incl %r13d
movq 0x8(%rsp), %rbp
cmpq %r13, 0x8(%rbp)
ja 0x9ec92
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x116ad
callq 0x11623
callq 0x11668
|
gguf_write_to_buf:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov dword ptr [rsp+48h+var_48], edx
mov rbx, rsi
mov r14, rdi
mov esi, 4
mov rdi, rbx
call gguf_buf_grow
mov rax, [rbx]
test rax, rax
jz short loc_9E8C3
mov rcx, [rbx+10h]
mov edx, [r14]
mov [rax+rcx], edx
loc_9E8C3:
add qword ptr [rbx+10h], 4
mov esi, 4
mov rdi, rbx
call gguf_buf_grow
mov rax, [rbx]
test rax, rax
jz short loc_9E8E8
mov rcx, [rbx+10h]
mov edx, [r14+4]
mov [rax+rcx], edx
loc_9E8E8:
add qword ptr [rbx+10h], 4
mov esi, 8
mov rdi, rbx
call gguf_buf_grow
mov rax, [rbx]
test rax, rax
jz short loc_9E90E
mov rcx, [rbx+10h]
mov rdx, [r14+8]
mov [rax+rcx], rdx
loc_9E90E:
add qword ptr [rbx+10h], 8
mov esi, 8
mov rdi, rbx
call gguf_buf_grow
mov rax, [rbx]
test rax, rax
jz short loc_9E934
mov rcx, [rbx+10h]
mov rdx, [r14+10h]
mov [rax+rcx], rdx
loc_9E934:
add qword ptr [rbx+10h], 8
cmp qword ptr [r14+10h], 0
mov [rsp+48h+var_40], r14
jz loc_9EB4A
xor ebp, ebp
lea r13, jpt_9E9AB
loc_9E952:
lea r15, ds:0[rbp*2]
add r15, rbp
shl r15, 4
add r15, [r14+18h]
mov rdi, rbx
mov rsi, r15
call gguf_bwrite_str
mov esi, 4
mov rdi, rbx
call gguf_buf_grow
mov rax, [rbx]
test rax, rax
jz short loc_9E990
mov rcx, [rbx+10h]
mov edx, [r15+10h]
mov [rax+rcx], edx
loc_9E990:
add qword ptr [rbx+10h], 4
mov eax, [r15+10h]
cmp rax, 0Dh; switch 14 cases
ja def_9E9AB; jumptable 000000000009E9AB default case
movsxd rax, ds:(jpt_9E9AB - 0C56ACh)[r13+rax*4]
add rax, r13
jmp rax; switch jump
loc_9E9AD:
mov esi, 1; jumptable 000000000009E9AB cases 0,1,7
mov rdi, rbx
call gguf_buf_grow
mov rax, [rbx]
test rax, rax
jz short loc_9E9CD
mov rcx, [rbx+10h]
mov dl, [r15+18h]
mov [rax+rcx], dl
loc_9E9CD:
inc qword ptr [rbx+10h]
jmp def_9E9AB; jumptable 000000000009E9AB default case
loc_9E9D6:
mov esi, 8; jumptable 000000000009E9AB cases 10-12
mov rdi, rbx
call gguf_buf_grow
mov rax, [rbx]
test rax, rax
jz short loc_9E9F7
mov rcx, [rbx+10h]
mov rdx, [r15+18h]
mov [rax+rcx], rdx
loc_9E9F7:
add qword ptr [rbx+10h], 8
jmp def_9E9AB; jumptable 000000000009E9AB default case
loc_9EA01:
mov esi, 4; jumptable 000000000009E9AB cases 4-6
mov rdi, rbx
call gguf_buf_grow
mov rax, [rbx]
test rax, rax
jz short loc_9EA21
mov rcx, [rbx+10h]
mov edx, [r15+18h]
mov [rax+rcx], edx
loc_9EA21:
add qword ptr [rbx+10h], 4
jmp def_9E9AB; jumptable 000000000009E9AB default case
loc_9EA2B:
mov esi, 2; jumptable 000000000009E9AB cases 2,3
mov rdi, rbx
call gguf_buf_grow
mov rax, [rbx]
test rax, rax
jz short loc_9EA4D
mov rcx, [rbx+10h]
movzx edx, word ptr [r15+18h]
mov [rax+rcx], dx
loc_9EA4D:
add qword ptr [rbx+10h], 2
jmp def_9E9AB; jumptable 000000000009E9AB default case
loc_9EA57:
mov esi, 4; jumptable 000000000009E9AB case 9
mov rdi, rbx
call gguf_buf_grow
mov rax, [rbx]
test rax, rax
jz short loc_9EA77
mov rcx, [rbx+10h]
mov edx, [r15+18h]
mov [rax+rcx], edx
loc_9EA77:
add qword ptr [rbx+10h], 4
mov esi, 8
mov rdi, rbx
call gguf_buf_grow
mov rax, [rbx]
test rax, rax
jz short loc_9EA9D
mov rcx, [rbx+10h]
mov rdx, [r15+20h]
mov [rax+rcx], rdx
loc_9EA9D:
add qword ptr [rbx+10h], 8
mov eax, [r15+18h]
cmp rax, 0Dh
ja short def_9E9AB; jumptable 000000000009E9AB default case
mov ecx, 1CFFh
bt ecx, eax
jnb short loc_9EB14
mov r14, [r15+28h]
lea rcx, GGUF_TYPE_SIZE
mov r12, [rcx+rax*8]
imul r12, [r15+20h]
mov rdi, rbx
mov rsi, r12
call gguf_buf_grow
mov rdi, [rbx]
test rdi, rdi
jz short loc_9EAEC
add rdi, [rbx+10h]
mov rsi, r14
mov rdx, r12
call _memcpy
loc_9EAEC:
add [rbx+10h], r12
jmp short def_9E9AB; jumptable 000000000009E9AB default case
loc_9EAF2:
add r15, 18h; jumptable 000000000009E9AB case 8
mov rdi, rbx
mov rsi, r15
call gguf_bwrite_str
def_9E9AB:
inc ebp; jumptable 000000000009E9AB default case
mov r14, [rsp+48h+var_40]
cmp [r14+10h], rbp
ja loc_9E952
jmp short loc_9EB4A
loc_9EB14:
cmp eax, 8
jnz loc_9ED50
cmp qword ptr [r15+20h], 0
jz short def_9E9AB; jumptable 000000000009E9AB default case
mov r14d, 1
xor esi, esi
loc_9EB2C:
shl rsi, 4
add rsi, [r15+28h]
mov rdi, rbx
call gguf_bwrite_str
mov esi, r14d
inc r14d
cmp [r15+20h], rsi
ja short loc_9EB2C
jmp short def_9E9AB; jumptable 000000000009E9AB default case
loc_9EB4A:
cmp qword ptr [r14+8], 0
mov rbp, r14
jz loc_9EC38
xor r12d, r12d
loc_9EB5B:
mov r14, [rbp+20h]
imul r15, r12, 58h ; 'X'
add r15, r14
mov rdi, rbx
mov rsi, r15
call gguf_bwrite_str
mov esi, 4
mov rdi, rbx
call gguf_buf_grow
mov rax, [rbx]
test rax, rax
jz short loc_9EB91
mov rcx, [rbx+10h]
mov edx, [r15+10h]
mov [rax+rcx], edx
loc_9EB91:
add qword ptr [rbx+10h], 4
cmp dword ptr [r15+10h], 0
jz short loc_9EBE0
mov eax, r12d
imul rax, 58h ; 'X'
add r14, rax
add r14, 18h
xor r13d, r13d
loc_9EBAE:
mov esi, 8
mov rdi, rbx
call gguf_buf_grow
mov rax, [rbx]
test rax, rax
jz short loc_9EBCF
mov rcx, [rbx+10h]
mov rdx, [r14+r13*8]
mov [rax+rcx], rdx
loc_9EBCF:
add qword ptr [rbx+10h], 8
inc r13
mov eax, [r15+10h]
cmp r13, rax
jb short loc_9EBAE
loc_9EBE0:
mov esi, 4
mov rdi, rbx
call gguf_buf_grow
mov rax, [rbx]
test rax, rax
jz short loc_9EC00
mov rcx, [rbx+10h]
mov edx, [r15+38h]
mov [rax+rcx], edx
loc_9EC00:
add qword ptr [rbx+10h], 4
mov esi, 8
mov rdi, rbx
call gguf_buf_grow
mov rax, [rbx]
test rax, rax
jz short loc_9EC26
mov rcx, [rbx+10h]
mov rdx, [r15+40h]
mov [rax+rcx], rdx
loc_9EC26:
add qword ptr [rbx+10h], 8
inc r12d
cmp [rbp+8], r12
ja loc_9EB5B
loc_9EC38:
mov rax, [rbx+10h]
mov r14, [rbp+28h]
lea rcx, [rax+r14]
dec rcx
neg r14
and r14, rcx
sub r14, rax
jz short loc_9EC78
loc_9EC52:
mov esi, 1
mov rdi, rbx
call gguf_buf_grow
mov rax, [rbx]
test rax, rax
jz short loc_9EC6F
mov rcx, [rbx+10h]
mov byte ptr [rax+rcx], 0
loc_9EC6F:
inc qword ptr [rbx+10h]
dec r14
jnz short loc_9EC52
loc_9EC78:
cmp byte ptr [rsp+48h+var_48], 0
jnz loc_9ED37
cmp qword ptr [rbp+8], 0
jz loc_9ED37
xor r13d, r13d
xor eax, eax
loc_9EC92:
mov [rsp+48h+var_48], rax
imul rax, r13, 58h ; 'X'
mov r12, [rbp+20h]
mov rbp, [rbp+28h]
mov r14, [r12+rax+48h]
mov [rsp+48h+var_38], rax
mov r15, [r12+rax+50h]
mov rdi, rbx
mov rsi, r15
call gguf_buf_grow
mov rdi, [rbx]
test rdi, rdi
jz short loc_9ECD3
add rdi, [rbx+10h]
mov rsi, r14
mov rdx, r15
call _memcpy
loc_9ECD3:
lea rax, [r15+rbp]
dec rax
add [rbx+10h], r15
neg rbp
and rbp, rax
mov r14, rbp
sub r14, r15
jz short loc_9ED12
loc_9ECEC:
mov esi, 1
mov rdi, rbx
call gguf_buf_grow
mov rax, [rbx]
test rax, rax
jz short loc_9ED09
mov rcx, [rbx+10h]
mov byte ptr [rax+rcx], 0
loc_9ED09:
inc qword ptr [rbx+10h]
dec r14
jnz short loc_9ECEC
loc_9ED12:
add r12, [rsp+48h+var_38]
mov rax, [rsp+48h+var_48]
cmp rax, [r12+40h]
jnz short loc_9ED46
add rax, rbp
inc r13d
mov rbp, [rsp+48h+var_40]
cmp [rbp+8], r13
ja loc_9EC92
loc_9ED37:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_9ED46:
call gguf_write_to_buf_cold_3
loc_9ED4B:
call gguf_write_to_buf_cold_1; jumptable 000000000009E9AB case 13
loc_9ED50:
call gguf_write_to_buf_cold_2
|
long long gguf_write_to_buf(long long a1, long long *a2, char a3)
{
_QWORD *v4; // r14
unsigned long long v5; // rbp
long long v6; // r15
unsigned long long v7; // rax
int v8; // ecx
long long v9; // r14
long long v10; // r12
unsigned int v11; // r14d
unsigned long long v12; // rsi
_QWORD *v13; // rbp
unsigned long long v14; // r12
long long v15; // r14
long long v16; // r15
long long v17; // r14
unsigned long long v18; // r13
long long result; // rax
long long i; // r14
unsigned long long v21; // r13
long long v22; // r12
long long v23; // rbp
long long v24; // r14
long long v25; // r15
long long v26; // rbp
long long v27; // r14
long long v29; // [rsp+0h] [rbp-48h]
v4 = (_QWORD *)a1;
gguf_buf_grow(a2, 4LL);
if ( *a2 )
*(_DWORD *)(*a2 + a2[2]) = *(_DWORD *)a1;
a2[2] += 4LL;
gguf_buf_grow(a2, 4LL);
if ( *a2 )
*(_DWORD *)(*a2 + a2[2]) = *(_DWORD *)(a1 + 4);
a2[2] += 4LL;
gguf_buf_grow(a2, 8LL);
if ( *a2 )
*(_QWORD *)(*a2 + a2[2]) = *(_QWORD *)(a1 + 8);
a2[2] += 8LL;
gguf_buf_grow(a2, 8LL);
if ( *a2 )
*(_QWORD *)(*a2 + a2[2]) = *(_QWORD *)(a1 + 16);
a2[2] += 8LL;
if ( *(_QWORD *)(a1 + 16) )
{
v5 = 0LL;
do
{
v6 = v4[3] + 48 * v5;
gguf_bwrite_str(a2, v6);
gguf_buf_grow(a2, 4LL);
if ( *a2 )
*(_DWORD *)(*a2 + a2[2]) = *(_DWORD *)(v6 + 16);
a2[2] += 4LL;
switch ( *(_DWORD *)(v6 + 16) )
{
case 0:
case 1:
case 7:
gguf_buf_grow(a2, 1LL);
if ( *a2 )
*(_BYTE *)(*a2 + a2[2]) = *(_BYTE *)(v6 + 24);
++a2[2];
break;
case 2:
case 3:
gguf_buf_grow(a2, 2LL);
if ( *a2 )
*(_WORD *)(*a2 + a2[2]) = *(_WORD *)(v6 + 24);
a2[2] += 2LL;
break;
case 4:
case 5:
case 6:
gguf_buf_grow(a2, 4LL);
if ( *a2 )
*(_DWORD *)(*a2 + a2[2]) = *(_DWORD *)(v6 + 24);
a2[2] += 4LL;
break;
case 8:
gguf_bwrite_str(a2, v6 + 24);
break;
case 9:
gguf_buf_grow(a2, 4LL);
if ( *a2 )
*(_DWORD *)(*a2 + a2[2]) = *(_DWORD *)(v6 + 24);
a2[2] += 4LL;
gguf_buf_grow(a2, 8LL);
if ( *a2 )
*(_QWORD *)(*a2 + a2[2]) = *(_QWORD *)(v6 + 32);
a2[2] += 8LL;
v7 = *(unsigned int *)(v6 + 24);
if ( v7 <= 0xD )
{
v8 = 7423;
if ( _bittest(&v8, v7) )
{
v9 = *(_QWORD *)(v6 + 40);
v10 = *(_QWORD *)(v6 + 32) * GGUF_TYPE_SIZE[v7];
gguf_buf_grow(a2, v10);
if ( *a2 )
memcpy(a2[2] + *a2, v9, v10);
a2[2] += v10;
}
else
{
if ( (_DWORD)v7 != 8 )
gguf_write_to_buf_cold_2();
if ( *(_QWORD *)(v6 + 32) )
{
v11 = 1;
v12 = 0LL;
do
{
gguf_bwrite_str(a2, *(_QWORD *)(v6 + 40) + 16 * v12);
v12 = v11++;
}
while ( *(_QWORD *)(v6 + 32) > v12 );
}
}
}
break;
case 0xA:
case 0xB:
case 0xC:
gguf_buf_grow(a2, 8LL);
if ( *a2 )
*(_QWORD *)(*a2 + a2[2]) = *(_QWORD *)(v6 + 24);
a2[2] += 8LL;
break;
case 0xD:
gguf_write_to_buf_cold_1();
default:
break;
}
v5 = (unsigned int)(v5 + 1);
v4 = (_QWORD *)a1;
}
while ( *(_QWORD *)(a1 + 16) > v5 );
}
v13 = v4;
if ( v4[1] )
{
v14 = 0LL;
do
{
v15 = v13[4];
v16 = v15 + 88 * v14;
gguf_bwrite_str(a2, v16);
gguf_buf_grow(a2, 4LL);
if ( *a2 )
*(_DWORD *)(*a2 + a2[2]) = *(_DWORD *)(v16 + 16);
a2[2] += 4LL;
if ( *(_DWORD *)(v16 + 16) )
{
v17 = 88LL * (unsigned int)v14 + v15 + 24;
v18 = 0LL;
do
{
gguf_buf_grow(a2, 8LL);
if ( *a2 )
*(_QWORD *)(*a2 + a2[2]) = *(_QWORD *)(v17 + 8 * v18);
a2[2] += 8LL;
++v18;
}
while ( v18 < *(unsigned int *)(v16 + 16) );
}
gguf_buf_grow(a2, 4LL);
if ( *a2 )
*(_DWORD *)(*a2 + a2[2]) = *(_DWORD *)(v16 + 56);
a2[2] += 4LL;
gguf_buf_grow(a2, 8LL);
if ( *a2 )
*(_QWORD *)(*a2 + a2[2]) = *(_QWORD *)(v16 + 64);
a2[2] += 8LL;
v14 = (unsigned int)(v14 + 1);
}
while ( v13[1] > v14 );
}
result = a2[2];
for ( i = ((result + v13[5] - 1) & -v13[5]) - result; i; --i )
{
gguf_buf_grow(a2, 1LL);
result = *a2;
if ( *a2 )
*(_BYTE *)(result + a2[2]) = 0;
++a2[2];
}
if ( !a3 && v13[1] )
{
v21 = 0LL;
result = 0LL;
do
{
v29 = result;
v22 = v13[4];
v23 = v13[5];
v24 = *(_QWORD *)(v22 + 88 * v21 + 72);
v25 = *(_QWORD *)(v22 + 88 * v21 + 80);
gguf_buf_grow(a2, v25);
if ( *a2 )
memcpy(a2[2] + *a2, v24, v25);
a2[2] += v25;
v26 = (v25 + v23 - 1) & -v23;
v27 = v26 - v25;
if ( v26 != v25 )
{
do
{
gguf_buf_grow(a2, 1LL);
if ( *a2 )
*(_BYTE *)(*a2 + a2[2]) = 0;
++a2[2];
--v27;
}
while ( v27 );
}
if ( v29 != *(_QWORD *)(88 * v21 + v22 + 64) )
gguf_write_to_buf_cold_3();
result = v26 + v29;
v21 = (unsigned int)(v21 + 1);
v13 = (_QWORD *)a1;
}
while ( *(_QWORD *)(a1 + 8) > v21 );
}
return result;
}
| |||
14,605
|
gguf_write_to_buf
|
7CodeWizard[P]stablediffusion/ggml/src/ggml.c
|
static void gguf_write_to_buf(const struct gguf_context * ctx, struct gguf_buf * buf, bool only_meta) {
// write header
gguf_bwrite_el(buf, &ctx->header.magic, sizeof(ctx->header.magic));
gguf_bwrite_el(buf, &ctx->header.version, sizeof(ctx->header.version));
gguf_bwrite_el(buf, &ctx->header.n_tensors, sizeof(ctx->header.n_tensors));
gguf_bwrite_el(buf, &ctx->header.n_kv, sizeof(ctx->header.n_kv));
// write key-value pairs
for (uint32_t i = 0; i < ctx->header.n_kv; ++i) {
struct gguf_kv * kv = &ctx->kv[i];
gguf_bwrite_str(buf, &kv->key);
gguf_bwrite_el (buf, &kv->type, sizeof(kv->type));
switch (kv->type) {
case GGUF_TYPE_UINT8: gguf_bwrite_el( buf, &kv->value.uint8, sizeof(kv->value.uint8) ); break;
case GGUF_TYPE_INT8: gguf_bwrite_el (buf, &kv->value.int8, sizeof(kv->value.int8) ); break;
case GGUF_TYPE_UINT16: gguf_bwrite_el (buf, &kv->value.uint16, sizeof(kv->value.uint16) ); break;
case GGUF_TYPE_INT16: gguf_bwrite_el (buf, &kv->value.int16, sizeof(kv->value.int16) ); break;
case GGUF_TYPE_UINT32: gguf_bwrite_el (buf, &kv->value.uint32, sizeof(kv->value.uint32) ); break;
case GGUF_TYPE_INT32: gguf_bwrite_el (buf, &kv->value.int32, sizeof(kv->value.int32) ); break;
case GGUF_TYPE_FLOAT32: gguf_bwrite_el (buf, &kv->value.float32, sizeof(kv->value.float32)); break;
case GGUF_TYPE_UINT64: gguf_bwrite_el (buf, &kv->value.uint64, sizeof(kv->value.uint64) ); break;
case GGUF_TYPE_INT64: gguf_bwrite_el (buf, &kv->value.int64, sizeof(kv->value.int64) ); break;
case GGUF_TYPE_FLOAT64: gguf_bwrite_el (buf, &kv->value.float64, sizeof(kv->value.float64)); break;
case GGUF_TYPE_BOOL: gguf_bwrite_el (buf, &kv->value.bool_, sizeof(kv->value.bool_) ); break;
case GGUF_TYPE_STRING: gguf_bwrite_str(buf, &kv->value.str ); break;
case GGUF_TYPE_ARRAY:
{
gguf_bwrite_el(buf, &kv->value.arr.type, sizeof(kv->value.arr.type));
gguf_bwrite_el(buf, &kv->value.arr.n, sizeof(kv->value.arr.n) );
switch (kv->value.arr.type) {
case GGUF_TYPE_UINT8:
case GGUF_TYPE_INT8:
case GGUF_TYPE_UINT16:
case GGUF_TYPE_INT16:
case GGUF_TYPE_UINT32:
case GGUF_TYPE_INT32:
case GGUF_TYPE_FLOAT32:
case GGUF_TYPE_UINT64:
case GGUF_TYPE_INT64:
case GGUF_TYPE_FLOAT64:
case GGUF_TYPE_BOOL:
{
gguf_bwrite_el(buf, kv->value.arr.data, kv->value.arr.n * GGUF_TYPE_SIZE[kv->value.arr.type]);
} break;
case GGUF_TYPE_STRING:
{
for (uint32_t j = 0; j < kv->value.arr.n; ++j) {
gguf_bwrite_str(buf, &((struct gguf_str *) kv->value.arr.data)[j]);
}
} break;
case GGUF_TYPE_ARRAY:
case GGUF_TYPE_COUNT: GGML_ASSERT(false && "invalid type"); break;
}
} break;
case GGUF_TYPE_COUNT: GGML_ASSERT(false && "invalid type");
}
}
// write tensor infos
for (uint32_t i = 0; i < ctx->header.n_tensors; ++i) {
struct gguf_tensor_info * info = &ctx->infos[i];
gguf_bwrite_str(buf, &info->name);
gguf_bwrite_el (buf, &info->n_dims, sizeof(info->n_dims));
for (uint32_t j = 0; j < info->n_dims; ++j) {
gguf_bwrite_el(buf, &info->ne[j], sizeof(info->ne[j]));
}
gguf_bwrite_el(buf, &info->type, sizeof(info->type));
gguf_bwrite_el(buf, &info->offset, sizeof(info->offset));
}
// we require the data section to be aligned, so take into account any padding
{
const size_t offset = buf->offset;
const size_t offset_pad = GGML_PAD(offset, ctx->alignment);
if (offset_pad != offset) {
uint8_t pad = 0;
for (size_t i = 0; i < offset_pad - offset; ++i) {
gguf_bwrite_el(buf, &pad, sizeof(pad));
}
}
}
if (only_meta) {
return;
}
size_t offset = 0;
// write tensor data
for (uint32_t i = 0; i < ctx->header.n_tensors; ++i) {
struct gguf_tensor_info * info = &ctx->infos[i];
const size_t size = info->size;
const size_t size_pad = GGML_PAD(size, ctx->alignment);
gguf_bwrite_el(buf, info->data, size);
if (size_pad != size) {
uint8_t pad = 0;
for (size_t j = 0; j < size_pad - size; ++j) {
gguf_bwrite_el(buf, &pad, sizeof(pad));
}
}
GGML_ASSERT(offset == info->offset);
offset += size_pad;
}
}
|
O2
|
c
|
gguf_write_to_buf:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, 0x10(%rsp)
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x4
popq %r15
movq %rsi, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x8eb88
leaq 0x4(%r14), %rsi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x8eb88
leaq 0x8(%r14), %rsi
pushq $0x8
popq %r15
movq %rbx, %rdi
movq %rsi, 0x20(%rsp)
movq %r15, %rdx
callq 0x8eb88
movq %r14, 0x8(%rsp)
leaq 0x10(%r14), %rbp
movq %rbx, %rdi
movq %rbp, %rsi
movq %r15, %rdx
callq 0x8eb88
xorl %r15d, %r15d
movl %r15d, %r15d
cmpq %r15, (%rbp)
jbe 0x78d54
movq 0x8(%rsp), %rax
movq 0x18(%rax), %r14
imulq $0x30, %r15, %r12
leaq (%r14,%r12), %r13
movq %rbx, %rdi
movq %r13, %rsi
callq 0x8ebbf
addq %r12, %r14
addq $0x10, %r14
movq %rbx, %rdi
movq %r14, %rsi
pushq $0x4
popq %rdx
callq 0x8eb88
movl (%r14), %eax
cmpq $0xd, %rax
ja 0x78cc0
leaq 0x287c5(%rip), %rcx # 0xa1440
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
addq $0x18, %r13
movq %rbx, %rdi
movq %r13, %rsi
pushq $0x1
jmp 0x78cba
addq $0x18, %r13
movq %rbx, %rdi
movq %r13, %rsi
pushq $0x8
jmp 0x78cba
addq $0x18, %r13
movq %rbx, %rdi
movq %r13, %rsi
pushq $0x4
jmp 0x78cba
addq $0x18, %r13
movq %rbx, %rdi
movq %r13, %rsi
pushq $0x2
popq %rdx
callq 0x8eb88
incl %r15d
jmp 0x78c2d
leaq 0x18(%r13), %rsi
movq %rbx, %rdi
pushq $0x4
popq %rdx
callq 0x8eb88
leaq 0x20(%r13), %r12
movq %rbx, %rdi
movq %r12, %rsi
pushq $0x8
popq %rdx
callq 0x8eb88
movl 0x18(%r13), %eax
cmpq $0xd, %rax
ja 0x78cc0
movl $0x1cff, %ecx # imm = 0x1CFF
btl %eax, %ecx
jae 0x78d27
movq 0x28(%r13), %rsi
leaq 0x288d8(%rip), %rcx # 0xa15e0
movq (%rcx,%rax,8), %rdx
imulq 0x20(%r13), %rdx
movq %rbx, %rdi
jmp 0x78cbb
addq $0x18, %r13
movq %rbx, %rdi
movq %r13, %rsi
callq 0x8ebbf
jmp 0x78cc0
cmpl $0x8, %eax
jne 0x78f52
xorl %eax, %eax
movl %eax, %r14d
cmpq %r14, (%r12)
jbe 0x78cc0
movq %r14, %rsi
shlq $0x4, %rsi
addq 0x28(%r13), %rsi
movq %rbx, %rdi
callq 0x8ebbf
leal 0x1(%r14), %eax
jmp 0x78d32
xorl %r12d, %r12d
pushq $0x8
popq %r13
movl %r12d, %r12d
movq 0x20(%rsp), %rax
cmpq %r12, (%rax)
jbe 0x78df6
imulq $0x58, %r12, %r14
movq 0x8(%rsp), %rax
movq 0x20(%rax), %rbp
leaq (%r14,%rbp), %rsi
movq %rbx, %rdi
movq %rsi, 0x18(%rsp)
callq 0x8ebbf
leaq (%r14,%rbp), %r15
addq $0x10, %r15
movq %rbx, %rdi
movq %r15, %rsi
pushq $0x4
popq %rdx
callq 0x8eb88
addq %rbp, %r14
addq $0x18, %r14
xorl %ebp, %ebp
movl (%r15), %eax
cmpq %rax, %rbp
jae 0x78dc8
movq %rbx, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x8eb88
incq %rbp
addq $0x8, %r14
jmp 0x78da9
movq 0x18(%rsp), %r14
leaq 0x38(%r14), %rsi
movq %rbx, %rdi
pushq $0x4
popq %rdx
callq 0x8eb88
addq $0x40, %r14
movq %rbx, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x8eb88
incl %r12d
jmp 0x78d5b
movq 0x10(%rbx), %rax
movq 0x8(%rsp), %rcx
movq 0x28(%rcx), %r12
leaq (%rax,%r12), %rcx
decq %rcx
negq %r12
andq %rcx, %r12
subq %rax, %r12
jne 0x78e2b
cmpb $0x0, 0x10(%rsp)
je 0x78e4e
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7(%rsp), %r14
movb $0x0, (%r14)
pushq $0x1
popq %r15
subq $0x1, %r12
jb 0x78e15
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x8eb88
jmp 0x78e38
xorl %r14d, %r14d
xorl %ebp, %ebp
movl %ebp, %ebp
movq 0x20(%rsp), %rax
cmpq %rbp, (%rax)
jbe 0x78e1c
imulq $0x58, %rbp, %rcx
movq 0x8(%rsp), %rax
movq 0x20(%rax), %r12
movq 0x28(%rax), %r13
movq 0x48(%r12,%rcx), %rsi
movq %r14, 0x18(%rsp)
movq %rcx, 0x10(%rsp)
movq 0x50(%r12,%rcx), %r14
leaq (%r14,%r13), %rax
decq %rax
negq %r13
andq %rax, %r13
movq %rbx, %rdi
movq %r14, %rdx
callq 0x8eb88
movq %r13, %r15
subq %r14, %r15
movq 0x18(%rsp), %r14
jne 0x78ebc
addq 0x10(%rsp), %r12
cmpq 0x40(%r12), %r14
jne 0x78ed9
addq %r13, %r14
incl %ebp
jmp 0x78e53
movb $0x0, 0x6(%rsp)
subq $0x1, %r15
jb 0x78ea9
movq %rbx, %rdi
leaq 0x6(%rsp), %rsi
pushq $0x1
popq %rdx
callq 0x8eb88
jmp 0x78ec1
movq 0x5d068(%rip), %rax # 0xd5f48
movq (%rax), %rdi
callq 0xa6f0
movq 0x5d0b9(%rip), %rax # 0xd5fa8
movq (%rax), %rdi
leaq 0x21325(%rip), %rsi # 0x9a21e
leaq 0x2897e(%rip), %rdx # 0xa187e
leaq 0x2b54e(%rip), %r8 # 0xa4455
movl $0x4d23, %ecx # imm = 0x4D23
xorl %eax, %eax
callq 0xa8b0
callq 0x67550
callq 0xa300
movq 0x5d024(%rip), %rax # 0xd5f48
movq (%rax), %rdi
callq 0xa6f0
movq 0x5d075(%rip), %rax # 0xd5fa8
movq (%rax), %rdi
leaq 0x212e1(%rip), %rsi # 0x9a21e
leaq 0x2893a(%rip), %rdx # 0xa187e
leaq 0x29a4f(%rip), %r8 # 0xa299a
movl $0x4cef, %ecx # imm = 0x4CEF
jmp 0x78f0c
movq 0x5cfef(%rip), %rax # 0xd5f48
movq (%rax), %rdi
callq 0xa6f0
movq 0x5d040(%rip), %rax # 0xd5fa8
movq (%rax), %rdi
leaq 0x212ac(%rip), %rsi # 0x9a21e
leaq 0x28905(%rip), %rdx # 0xa187e
leaq 0x29a1a(%rip), %r8 # 0xa299a
movl $0x4cec, %ecx # imm = 0x4CEC
jmp 0x78f0c
|
gguf_write_to_buf:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov dword ptr [rsp+58h+var_48], edx
mov rbx, rsi
mov r14, rdi
push 4
pop r15
mov rdi, rsi
mov rsi, r14
mov rdx, r15
call gguf_bwrite_el
lea rsi, [r14+4]
mov rdi, rbx
mov rdx, r15
call gguf_bwrite_el
lea rsi, [r14+8]
push 8
pop r15
mov rdi, rbx
mov [rsp+58h+var_38], rsi
mov rdx, r15
call gguf_bwrite_el
mov [rsp+58h+var_50], r14
lea rbp, [r14+10h]
mov rdi, rbx
mov rsi, rbp
mov rdx, r15
call gguf_bwrite_el
xor r15d, r15d
loc_78C2D:
mov r15d, r15d
cmp [rbp+0], r15
jbe loc_78D54
mov rax, [rsp+58h+var_50]
mov r14, [rax+18h]
imul r12, r15, 30h ; '0'
lea r13, [r14+r12]
mov rdi, rbx
mov rsi, r13
call gguf_bwrite_str
add r14, r12
add r14, 10h
mov rdi, rbx
mov rsi, r14
push 4
pop rdx
call gguf_bwrite_el
mov eax, [r14]
cmp rax, 0Dh; switch 14 cases
ja short def_78C82; jumptable 0000000000078C82 default case
lea rcx, jpt_78C82
movsxd rax, ds:(jpt_78C82 - 0A1440h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_78C84:
add r13, 18h; jumptable 0000000000078C82 cases 0,1,7
mov rdi, rbx
mov rsi, r13
push 1
jmp short loc_78CBA
loc_78C92:
add r13, 18h; jumptable 0000000000078C82 cases 10-12
mov rdi, rbx
mov rsi, r13
push 8
jmp short loc_78CBA
loc_78CA0:
add r13, 18h; jumptable 0000000000078C82 cases 4-6
mov rdi, rbx
mov rsi, r13
push 4
jmp short loc_78CBA
loc_78CAE:
add r13, 18h; jumptable 0000000000078C82 cases 2,3
mov rdi, rbx
mov rsi, r13
push 2
loc_78CBA:
pop rdx
loc_78CBB:
call gguf_bwrite_el
def_78C82:
inc r15d; jumptable 0000000000078C82 default case
jmp loc_78C2D
loc_78CC8:
lea rsi, [r13+18h]; jumptable 0000000000078C82 case 9
mov rdi, rbx
push 4
pop rdx
call gguf_bwrite_el
lea r12, [r13+20h]
mov rdi, rbx
mov rsi, r12
push 8
pop rdx
call gguf_bwrite_el
mov eax, [r13+18h]
cmp rax, 0Dh
ja short def_78C82; jumptable 0000000000078C82 default case
mov ecx, 1CFFh
bt ecx, eax
jnb short loc_78D27
mov rsi, [r13+28h]
lea rcx, GGUF_TYPE_SIZE
mov rdx, [rcx+rax*8]
imul rdx, [r13+20h]
mov rdi, rbx
jmp short loc_78CBB
loc_78D16:
add r13, 18h; jumptable 0000000000078C82 case 8
mov rdi, rbx
mov rsi, r13
call gguf_bwrite_str
jmp short def_78C82; jumptable 0000000000078C82 default case
loc_78D27:
cmp eax, 8
jnz loc_78F52
xor eax, eax
loc_78D32:
mov r14d, eax
cmp [r12], r14
jbe short def_78C82; jumptable 0000000000078C82 default case
mov rsi, r14
shl rsi, 4
add rsi, [r13+28h]
mov rdi, rbx
call gguf_bwrite_str
lea eax, [r14+1]
jmp short loc_78D32
loc_78D54:
xor r12d, r12d
push 8
pop r13
loc_78D5B:
mov r12d, r12d
mov rax, [rsp+58h+var_38]
cmp [rax], r12
jbe loc_78DF6
imul r14, r12, 58h ; 'X'
mov rax, [rsp+58h+var_50]
mov rbp, [rax+20h]
lea rsi, [r14+rbp]
mov rdi, rbx
mov [rsp+58h+var_40], rsi
call gguf_bwrite_str
lea r15, [r14+rbp]
add r15, 10h
mov rdi, rbx
mov rsi, r15
push 4
pop rdx
call gguf_bwrite_el
add r14, rbp
add r14, 18h
xor ebp, ebp
loc_78DA9:
mov eax, [r15]
cmp rbp, rax
jnb short loc_78DC8
mov rdi, rbx
mov rsi, r14
mov rdx, r13
call gguf_bwrite_el
inc rbp
add r14, 8
jmp short loc_78DA9
loc_78DC8:
mov r14, [rsp+58h+var_40]
lea rsi, [r14+38h]
mov rdi, rbx
push 4
pop rdx
call gguf_bwrite_el
add r14, 40h ; '@'
mov rdi, rbx
mov rsi, r14
mov rdx, r13
call gguf_bwrite_el
inc r12d
jmp loc_78D5B
loc_78DF6:
mov rax, [rbx+10h]
mov rcx, [rsp+58h+var_50]
mov r12, [rcx+28h]
lea rcx, [rax+r12]
dec rcx
neg r12
and r12, rcx
sub r12, rax
jnz short loc_78E2B
loc_78E15:
cmp byte ptr [rsp+58h+var_48], 0
jz short loc_78E4E
loc_78E1C:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_78E2B:
lea r14, [rsp+58h+var_51]
mov byte ptr [r14], 0
push 1
pop r15
loc_78E38:
sub r12, 1
jb short loc_78E15
mov rdi, rbx
mov rsi, r14
mov rdx, r15
call gguf_bwrite_el
jmp short loc_78E38
loc_78E4E:
xor r14d, r14d
xor ebp, ebp
loc_78E53:
mov ebp, ebp
mov rax, [rsp+58h+var_38]
cmp [rax], rbp
jbe short loc_78E1C
imul rcx, rbp, 58h ; 'X'
mov rax, [rsp+58h+var_50]
mov r12, [rax+20h]
mov r13, [rax+28h]
mov rsi, [r12+rcx+48h]
mov [rsp+58h+var_40], r14
mov [rsp+58h+var_48], rcx
mov r14, [r12+rcx+50h]
lea rax, [r14+r13]
dec rax
neg r13
and r13, rax
mov rdi, rbx
mov rdx, r14
call gguf_bwrite_el
mov r15, r13
sub r15, r14
mov r14, [rsp+58h+var_40]
jnz short loc_78EBC
loc_78EA9:
add r12, [rsp+58h+var_48]
cmp r14, [r12+40h]
jnz short loc_78ED9
add r14, r13
inc ebp
jmp short loc_78E53
loc_78EBC:
mov [rsp+58h+var_52], 0
loc_78EC1:
sub r15, 1
jb short loc_78EA9
mov rdi, rbx
lea rsi, [rsp+58h+var_52]
push 1
pop rdx
call gguf_bwrite_el
jmp short loc_78EC1
loc_78ED9:
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, aOffsetInfoOffs; "offset == info->offset"
mov ecx, 4D23h
loc_78F0C:
xor eax, eax
call _fprintf
call ggml_print_backtrace
call _abort
loc_78F1D:
mov rax, cs:stdout_ptr; jumptable 0000000000078C82 case 13
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, aFalseInvalidTy; "false && \"invalid type\""
mov ecx, 4CEFh
jmp short loc_78F0C
loc_78F52:
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, aFalseInvalidTy; "false && \"invalid type\""
mov ecx, 4CECh
jmp short loc_78F0C
|
long long gguf_write_to_buf(_QWORD *a1, long long a2, int a3)
{
_QWORD *v4; // rbp
unsigned int v5; // r15d
long long v6; // r13
long long v7; // rdi
long long v8; // rsi
long long v9; // rdx
unsigned long long v10; // rax
int v11; // ecx
unsigned int i; // eax
unsigned int v13; // r14d
unsigned int j; // r12d
long long v15; // r14
unsigned int *v16; // r15
long long v17; // r14
unsigned long long k; // rbp
long long result; // rax
long long v20; // r12
bool v21; // cf
long long v22; // r14
unsigned int n; // ebp
long long v24; // r12
long long v25; // r13
long long v26; // rsi
long long v27; // r14
long long v28; // r13
bool v29; // zf
long long v30; // r15
long long v31; // r14
long long v32; // rdi
long long v33; // [rsp-8h] [rbp-60h]
char ii; // [rsp+6h] [rbp-52h] BYREF
char m; // [rsp+7h] [rbp-51h] BYREF
_QWORD *v36; // [rsp+8h] [rbp-50h]
long long v37; // [rsp+10h] [rbp-48h]
long long v38; // [rsp+18h] [rbp-40h]
_QWORD *v39; // [rsp+20h] [rbp-38h]
LODWORD(v37) = a3;
gguf_bwrite_el(a2, a1, 4LL);
gguf_bwrite_el(a2, (char *)a1 + 4, 4LL);
v39 = a1 + 1;
gguf_bwrite_el(a2, a1 + 1, 8LL);
v36 = a1;
v4 = a1 + 2;
gguf_bwrite_el(a2, a1 + 2, 8LL);
v5 = 0;
while ( *v4 > (unsigned long long)v5 )
{
v6 = v36[3] + 48LL * v5;
gguf_bwrite_str(a2);
gguf_bwrite_el(a2, v6 + 16, 4LL);
switch ( *(_DWORD *)(v6 + 16) )
{
case 0:
case 1:
case 7:
v7 = a2;
v8 = v6 + 24;
v33 = 1LL;
goto LABEL_8;
case 2:
case 3:
v7 = a2;
v8 = v6 + 24;
v33 = 2LL;
goto LABEL_8;
case 4:
case 5:
case 6:
v7 = a2;
v8 = v6 + 24;
v33 = 4LL;
goto LABEL_8;
case 8:
gguf_bwrite_str(a2);
goto LABEL_10;
case 9:
gguf_bwrite_el(a2, v6 + 24, 4LL);
gguf_bwrite_el(a2, v6 + 32, 8LL);
v10 = *(unsigned int *)(v6 + 24);
if ( v10 > 0xD )
goto LABEL_10;
v11 = 7423;
if ( _bittest(&v11, v10) )
{
v8 = *(_QWORD *)(v6 + 40);
v9 = *(_QWORD *)(v6 + 32) * GGUF_TYPE_SIZE[v10];
v7 = a2;
LABEL_9:
gguf_bwrite_el(v7, v8, v9);
}
else
{
if ( (_DWORD)v10 != 8 )
{
fflush(stdout);
v32 = stderr;
fprintf(
stderr,
"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c",
19692LL,
"false && \"invalid type\"");
goto LABEL_40;
}
for ( i = 0; ; i = v13 + 1 )
{
v13 = i;
if ( *(_QWORD *)(v6 + 32) <= (unsigned long long)i )
break;
gguf_bwrite_str(a2);
}
}
LABEL_10:
++v5;
break;
case 0xA:
case 0xB:
case 0xC:
v7 = a2;
v8 = v6 + 24;
v33 = 8LL;
LABEL_8:
v9 = v33;
goto LABEL_9;
case 0xD:
fflush(stdout);
v32 = stderr;
fprintf(
stderr,
"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c",
19695LL,
"false && \"invalid type\"");
goto LABEL_40;
default:
goto LABEL_10;
}
}
for ( j = 0; *v39 > (unsigned long long)j; ++j )
{
v15 = 88LL * j;
v38 = v15 + v36[4];
gguf_bwrite_str(a2);
v16 = (unsigned int *)(v38 + 16);
gguf_bwrite_el(a2, v16, 4LL);
v17 = v38 + 24;
for ( k = 0LL; k < *v16; ++k )
{
gguf_bwrite_el(a2, v17, 8LL);
v17 += 8LL;
}
gguf_bwrite_el(a2, v38 + 56, 4LL);
gguf_bwrite_el(a2, v38 + 64, 8LL);
}
result = *(_QWORD *)(a2 + 16);
v20 = ((result + v36[5] - 1) & -v36[5]) - result;
if ( v20 )
{
for ( m = 0; ; result = gguf_bwrite_el(a2, &m, 1LL) )
{
v21 = v20-- == 0;
if ( v21 )
break;
}
}
if ( !(_BYTE)v37 )
{
v22 = 0LL;
for ( n = 0; ; ++n )
{
result = (long long)v39;
if ( *v39 <= (unsigned long long)n )
return result;
v24 = v36[4];
v25 = v36[5];
v26 = *(_QWORD *)(v24 + 88LL * n + 72);
v38 = v22;
v37 = 88LL * n;
v27 = *(_QWORD *)(v24 + v37 + 80);
v28 = (v27 + v25 - 1) & -v25;
gguf_bwrite_el(a2, v26, v27);
v30 = v28 - v27;
v29 = v28 == v27;
v31 = v38;
if ( !v29 )
{
for ( ii = 0; ; gguf_bwrite_el(a2, &ii, 1LL) )
{
v21 = v30-- == 0;
if ( v21 )
break;
}
}
if ( v31 != *(_QWORD *)(v37 + v24 + 64) )
break;
v22 = v28 + v31;
}
fflush(stdout);
v32 = stderr;
fprintf(
stderr,
"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c",
19747LL,
"offset == info->offset");
LABEL_40:
ggml_print_backtrace();
abort(v32);
}
return result;
}
|
gguf_write_to_buf:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV dword ptr [RSP + 0x10],EDX
MOV RBX,RSI
MOV R14,RDI
PUSH 0x4
POP R15
MOV RDI,RSI
MOV RSI,R14
MOV RDX,R15
CALL 0x0018eb88
LEA RSI,[R14 + 0x4]
MOV RDI,RBX
MOV RDX,R15
CALL 0x0018eb88
LEA RSI,[R14 + 0x8]
PUSH 0x8
POP R15
MOV RDI,RBX
MOV qword ptr [RSP + 0x20],RSI
MOV RDX,R15
CALL 0x0018eb88
MOV qword ptr [RSP + 0x8],R14
LEA RBP,[R14 + 0x10]
MOV RDI,RBX
MOV RSI,RBP
MOV RDX,R15
CALL 0x0018eb88
XOR R15D,R15D
LAB_00178c2d:
MOV R15D,R15D
CMP qword ptr [RBP],R15
JBE 0x00178d54
MOV RAX,qword ptr [RSP + 0x8]
MOV R14,qword ptr [RAX + 0x18]
IMUL R12,R15,0x30
LEA R13,[R14 + R12*0x1]
MOV RDI,RBX
MOV RSI,R13
CALL 0x0018ebbf
ADD R14,R12
ADD R14,0x10
MOV RDI,RBX
MOV RSI,R14
PUSH 0x4
POP RDX
CALL 0x0018eb88
MOV EAX,dword ptr [R14]
CMP RAX,0xd
JA 0x00178cc0
LEA RCX,[0x1a1440]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_0:
ADD R13,0x18
MOV RDI,RBX
MOV RSI,R13
PUSH 0x1
JMP 0x00178cba
caseD_a:
ADD R13,0x18
MOV RDI,RBX
MOV RSI,R13
PUSH 0x8
JMP 0x00178cba
caseD_4:
ADD R13,0x18
MOV RDI,RBX
MOV RSI,R13
PUSH 0x4
JMP 0x00178cba
caseD_2:
ADD R13,0x18
MOV RDI,RBX
MOV RSI,R13
PUSH 0x2
LAB_00178cba:
POP RDX
LAB_00178cbb:
CALL 0x0018eb88
default:
INC R15D
JMP 0x00178c2d
caseD_9:
LEA RSI,[R13 + 0x18]
MOV RDI,RBX
PUSH 0x4
POP RDX
CALL 0x0018eb88
LEA R12,[R13 + 0x20]
MOV RDI,RBX
MOV RSI,R12
PUSH 0x8
POP RDX
CALL 0x0018eb88
MOV EAX,dword ptr [R13 + 0x18]
CMP RAX,0xd
JA 0x00178cc0
MOV ECX,0x1cff
BT ECX,EAX
JNC 0x00178d27
MOV RSI,qword ptr [R13 + 0x28]
LEA RCX,[0x1a15e0]
MOV RDX,qword ptr [RCX + RAX*0x8]
IMUL RDX,qword ptr [R13 + 0x20]
MOV RDI,RBX
JMP 0x00178cbb
caseD_8:
ADD R13,0x18
MOV RDI,RBX
MOV RSI,R13
CALL 0x0018ebbf
JMP 0x00178cc0
LAB_00178d27:
CMP EAX,0x8
JNZ 0x00178f52
XOR EAX,EAX
LAB_00178d32:
MOV R14D,EAX
CMP qword ptr [R12],R14
JBE 0x00178cc0
MOV RSI,R14
SHL RSI,0x4
ADD RSI,qword ptr [R13 + 0x28]
MOV RDI,RBX
CALL 0x0018ebbf
LEA EAX,[R14 + 0x1]
JMP 0x00178d32
LAB_00178d54:
XOR R12D,R12D
PUSH 0x8
POP R13
LAB_00178d5b:
MOV R12D,R12D
MOV RAX,qword ptr [RSP + 0x20]
CMP qword ptr [RAX],R12
JBE 0x00178df6
IMUL R14,R12,0x58
MOV RAX,qword ptr [RSP + 0x8]
MOV RBP,qword ptr [RAX + 0x20]
LEA RSI,[R14 + RBP*0x1]
MOV RDI,RBX
MOV qword ptr [RSP + 0x18],RSI
CALL 0x0018ebbf
LEA R15,[R14 + RBP*0x1]
ADD R15,0x10
MOV RDI,RBX
MOV RSI,R15
PUSH 0x4
POP RDX
CALL 0x0018eb88
ADD R14,RBP
ADD R14,0x18
XOR EBP,EBP
LAB_00178da9:
MOV EAX,dword ptr [R15]
CMP RBP,RAX
JNC 0x00178dc8
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R13
CALL 0x0018eb88
INC RBP
ADD R14,0x8
JMP 0x00178da9
LAB_00178dc8:
MOV R14,qword ptr [RSP + 0x18]
LEA RSI,[R14 + 0x38]
MOV RDI,RBX
PUSH 0x4
POP RDX
CALL 0x0018eb88
ADD R14,0x40
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R13
CALL 0x0018eb88
INC R12D
JMP 0x00178d5b
LAB_00178df6:
MOV RAX,qword ptr [RBX + 0x10]
MOV RCX,qword ptr [RSP + 0x8]
MOV R12,qword ptr [RCX + 0x28]
LEA RCX,[RAX + R12*0x1]
DEC RCX
NEG R12
AND R12,RCX
SUB R12,RAX
JNZ 0x00178e2b
LAB_00178e15:
CMP byte ptr [RSP + 0x10],0x0
JZ 0x00178e4e
LAB_00178e1c:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00178e2b:
LEA R14,[RSP + 0x7]
MOV byte ptr [R14],0x0
PUSH 0x1
POP R15
LAB_00178e38:
SUB R12,0x1
JC 0x00178e15
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
CALL 0x0018eb88
JMP 0x00178e38
LAB_00178e4e:
XOR R14D,R14D
XOR EBP,EBP
LAB_00178e53:
MOV EBP,EBP
MOV RAX,qword ptr [RSP + 0x20]
CMP qword ptr [RAX],RBP
JBE 0x00178e1c
IMUL RCX,RBP,0x58
MOV RAX,qword ptr [RSP + 0x8]
MOV R12,qword ptr [RAX + 0x20]
MOV R13,qword ptr [RAX + 0x28]
MOV RSI,qword ptr [R12 + RCX*0x1 + 0x48]
MOV qword ptr [RSP + 0x18],R14
MOV qword ptr [RSP + 0x10],RCX
MOV R14,qword ptr [R12 + RCX*0x1 + 0x50]
LEA RAX,[R14 + R13*0x1]
DEC RAX
NEG R13
AND R13,RAX
MOV RDI,RBX
MOV RDX,R14
CALL 0x0018eb88
MOV R15,R13
SUB R15,R14
MOV R14,qword ptr [RSP + 0x18]
JNZ 0x00178ebc
LAB_00178ea9:
ADD R12,qword ptr [RSP + 0x10]
CMP R14,qword ptr [R12 + 0x40]
JNZ 0x00178ed9
ADD R14,R13
INC EBP
JMP 0x00178e53
LAB_00178ebc:
MOV byte ptr [RSP + 0x6],0x0
LAB_00178ec1:
SUB R15,0x1
JC 0x00178ea9
MOV RDI,RBX
LEA RSI,[RSP + 0x6]
PUSH 0x1
POP RDX
CALL 0x0018eb88
JMP 0x00178ec1
LAB_00178ed9:
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,[0x1a4455]
MOV ECX,0x4d23
LAB_00178f0c:
XOR EAX,EAX
CALL 0x0010a8b0
CALL 0x00167550
CALL 0x0010a300
caseD_d:
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,[0x1a299a]
MOV ECX,0x4cef
JMP 0x00178f0c
LAB_00178f52:
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,[0x1a299a]
MOV ECX,0x4cec
JMP 0x00178f0c
|
void gguf_write_to_buf(long param_1,long param_2,int4 param_3)
{
uint uVar1;
int8 uVar2;
ulong uVar3;
FILE *__stream;
char *pcVar4;
long lVar5;
int4 *puVar6;
long lVar7;
long lVar8;
uint uVar9;
uint *puVar10;
bool bVar11;
long lStack_60;
int1 local_52;
int1 local_51;
long local_50;
long local_48;
long local_40;
ulong *local_38;
local_48 = CONCAT44(local_48._4_4_,param_3);
gguf_bwrite_el(param_2,param_1,4);
gguf_bwrite_el(param_2,param_1 + 4,4);
local_38 = (ulong *)(param_1 + 8);
gguf_bwrite_el(param_2,local_38,8);
local_50 = param_1;
gguf_bwrite_el(param_2,(ulong *)(param_1 + 0x10),8);
for (uVar9 = 0; (ulong)uVar9 < *(ulong *)(param_1 + 0x10); uVar9 = uVar9 + 1) {
lVar7 = *(long *)(local_50 + 0x18);
lVar5 = (ulong)uVar9 * 0x30;
lVar8 = lVar7 + lVar5;
gguf_bwrite_str(param_2,lVar8);
puVar6 = (int4 *)(lVar7 + lVar5 + 0x10);
gguf_bwrite_el(param_2,puVar6,4);
switch(*puVar6) {
case 0:
case 1:
case 7:
lStack_60 = 1;
break;
case 2:
case 3:
lStack_60 = 2;
break;
case 4:
case 5:
case 6:
lStack_60 = 4;
break;
case 8:
gguf_bwrite_str(param_2,lVar8 + 0x18);
goto switchD_00178c82_default;
case 9:
gguf_bwrite_el(param_2,lVar8 + 0x18,4);
gguf_bwrite_el(param_2,(ulong *)(lVar8 + 0x20),8);
uVar1 = *(uint *)(lVar8 + 0x18);
if (0xd < (ulong)uVar1) goto switchD_00178c82_default;
if ((0x1cffU >> (uVar1 & 0x1f) & 1) != 0) {
lVar7 = *(long *)(lVar8 + 0x28);
lStack_60 = *(long *)(GGUF_TYPE_SIZE + (ulong)uVar1 * 8) * *(long *)(lVar8 + 0x20);
goto LAB_00178cbb;
}
if (uVar1 == 8) {
for (uVar1 = 0; (ulong)uVar1 < *(ulong *)(lVar8 + 0x20); uVar1 = uVar1 + 1) {
gguf_bwrite_str(param_2,(ulong)uVar1 * 0x10 + *(long *)(lVar8 + 0x28));
}
goto switchD_00178c82_default;
}
fflush(*(FILE **)PTR_stdout_001d5f48);
__stream = *(FILE **)PTR_stderr_001d5fa8;
pcVar4 = "false && \"invalid type\"";
uVar2 = 0x4cec;
goto LAB_00178f0c;
case 10:
case 0xb:
case 0xc:
lStack_60 = 8;
break;
case 0xd:
fflush(*(FILE **)PTR_stdout_001d5f48);
__stream = *(FILE **)PTR_stderr_001d5fa8;
pcVar4 = "false && \"invalid type\"";
uVar2 = 0x4cef;
goto LAB_00178f0c;
default:
goto switchD_00178c82_default;
}
lVar7 = lVar8 + 0x18;
LAB_00178cbb:
gguf_bwrite_el(param_2,lVar7,lStack_60);
switchD_00178c82_default:
}
for (uVar9 = 0; (ulong)uVar9 < *local_38; uVar9 = uVar9 + 1) {
lVar7 = (ulong)uVar9 * 0x58;
lVar8 = *(long *)(local_50 + 0x20);
local_40 = lVar7 + lVar8;
gguf_bwrite_str(param_2);
puVar10 = (uint *)(lVar7 + lVar8 + 0x10);
gguf_bwrite_el(param_2,puVar10,4);
lVar8 = lVar7 + lVar8 + 0x18;
for (uVar3 = 0; lVar7 = local_40, uVar3 < *puVar10; uVar3 = uVar3 + 1) {
gguf_bwrite_el(param_2,lVar8,8);
lVar8 = lVar8 + 8;
}
gguf_bwrite_el(param_2,local_40 + 0x38,4);
gguf_bwrite_el(param_2,lVar7 + 0x40,8);
}
lVar8 = (-*(long *)(local_50 + 0x28) &
(*(long *)(param_2 + 0x10) + *(long *)(local_50 + 0x28)) - 1U) - *(long *)(param_2 + 0x10)
;
if (lVar8 != 0) {
local_51 = 0;
while (bVar11 = lVar8 != 0, lVar8 = lVar8 + -1, bVar11) {
gguf_bwrite_el(param_2,&local_51,1);
}
}
if ((char)local_48 == '\0') {
local_40 = 0;
for (uVar9 = 0; (ulong)uVar9 < *local_38; uVar9 = uVar9 + 1) {
local_48 = (ulong)uVar9 * 0x58;
lVar8 = *(long *)(local_50 + 0x20);
lVar7 = *(long *)(lVar8 + 0x50 + local_48);
uVar3 = -*(long *)(local_50 + 0x28) & (lVar7 + *(long *)(local_50 + 0x28)) - 1U;
gguf_bwrite_el(param_2,*(int8 *)(lVar8 + 0x48 + local_48),lVar7);
lVar5 = local_40;
lVar7 = uVar3 - lVar7;
if (lVar7 != 0) {
local_52 = 0;
while (bVar11 = lVar7 != 0, lVar7 = lVar7 + -1, bVar11) {
gguf_bwrite_el(param_2,&local_52,1);
}
}
if (lVar5 != *(long *)(lVar8 + local_48 + 0x40)) {
fflush(*(FILE **)PTR_stdout_001d5f48);
__stream = *(FILE **)PTR_stderr_001d5fa8;
pcVar4 = "offset == info->offset";
uVar2 = 0x4d23;
LAB_00178f0c:
fprintf(__stream,"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c"
,uVar2,pcVar4);
ggml_print_backtrace();
/* WARNING: Subroutine does not return */
abort();
}
local_40 = lVar5 + uVar3;
}
}
return;
}
|
|
14,606
|
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 0xad000
movq %rax, -0x40(%rbp)
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0xa23a2
movq $0x0, -0x8(%rbp)
jmp 0xa2793
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0xa274b
movq -0x38(%rbp), %rax
movq -0x40(%rbp), %rcx
movl -0x24(%rbp), %edx
shlq $0x7, %rdx
addq %rdx, %rcx
cmpq %rcx, %rax
jb 0xa23d4
jmp 0xa2777
movl $0x0, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
cmpl -0x50(%rbp), %eax
jae 0xa24ac
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 0xa2446
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 0xa2446
jmp 0xa2777
movq -0x20(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x4c(%rbp), %ecx
movq (%rax,%rcx,8), %rsi
callq 0xad370
movq %rax, %rdx
movq -0x38(%rbp), %rax
movl -0x4c(%rbp), %ecx
shll %ecx
movl %ecx, %ecx
movl %ecx, %esi
leaq 0x20eddb(%rip), %rcx # 0x2b1250
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 0x20edb9(%rip), %rcx # 0x2b1250
movq (%rcx,%rsi,8), %rcx
movl %edx, (%rax,%rcx)
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0xa23db
movq -0x38(%rbp), %rax
movq $0x0, 0x78(%rax)
movq -0x10(%rbp), %rdi
callq 0xa27a0
cmpb $0x0, %al
je 0xa256d
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 0xa2564
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 0xa21b0
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movq -0x38(%rbp), %rcx
movq %rax, 0x78(%rcx)
cmpq $0x0, %rax
je 0xa2562
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 0xa27d0
jmp 0xa2564
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 0xa2690
movq -0x38(%rbp), %rax
cmpl $0x7, 0x70(%rax)
jne 0xa26b1
movq -0x38(%rbp), %rax
cmpq $0xe, 0x38(%rax)
je 0xa26b1
movq -0x38(%rbp), %rax
cmpq $0x8, 0x38(%rax)
je 0xa26b1
movq -0x38(%rbp), %rax
cmpl $0xd, 0x70(%rax)
je 0xa26b1
movq -0x38(%rbp), %rax
cmpl $0xf6, 0x70(%rax)
je 0xa26b1
movq -0x38(%rbp), %rax
cmpl $0x0, 0x70(%rax)
jne 0xa26c1
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 0xa270a
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x4c(%rbp), %ecx
cmpq $0x0, (%rax,%rcx,8)
je 0xa270a
movq -0x20(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x4c(%rbp), %ecx
movq (%rax,%rcx,8), %rsi
callq 0xad370
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x30(%rax)
jmp 0xa2716
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 0xa23ad
movq -0x38(%rbp), %rax
movq -0x40(%rbp), %rcx
movl -0x24(%rbp), %edx
shlq $0x7, %rdx
addq %rdx, %rcx
cmpq %rcx, %rax
jae 0xa2764
jmp 0xa2777
movq -0x18(%rbp), %rdi
callq 0x9ea60
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xa2793
movq -0x18(%rbp), %rdi
callq 0x9ea60
movq -0x20(%rbp), %rdi
xorl %esi, %esi
callq 0xad260
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_A23A2
mov [rbp+var_8], 0
jmp loc_A2793
loc_A23A2:
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rbp+var_30], rax
loc_A23AD:
cmp [rbp+var_30], 0
jz loc_A274B
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_A23D4
jmp loc_A2777
loc_A23D4:
mov [rbp+var_4C], 0
loc_A23DB:
mov eax, [rbp+var_4C]
cmp eax, [rbp+var_50]
jnb loc_A24AC
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_A2446
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_A2446
jmp loc_A2777
loc_A2446:
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_A23DB
loc_A24AC:
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_A256D
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_A2564
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_A2562
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_A2562:
jmp short $+2
loc_A2564:
mov eax, [rbp+var_4C]
add eax, 1
mov [rbp+var_4C], eax
loc_A256D:
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_A2690
mov rax, [rbp+var_38]
cmp dword ptr [rax+70h], 7
jnz short loc_A26B1
mov rax, [rbp+var_38]
cmp qword ptr [rax+38h], 0Eh
jz short loc_A26B1
mov rax, [rbp+var_38]
cmp qword ptr [rax+38h], 8
jz short loc_A26B1
loc_A2690:
mov rax, [rbp+var_38]
cmp dword ptr [rax+70h], 0Dh
jz short loc_A26B1
mov rax, [rbp+var_38]
cmp dword ptr [rax+70h], 0F6h
jz short loc_A26B1
mov rax, [rbp+var_38]
cmp dword ptr [rax+70h], 0
jnz short loc_A26C1
loc_A26B1:
mov rax, [rbp+var_38]
mov ecx, [rax+64h]
or ecx, 8000h
mov [rax+64h], ecx
loc_A26C1:
mov eax, [rbp+var_4C]
add eax, 1
mov [rbp+var_4C], eax
movsx eax, [rbp+var_25]
cmp eax, 0
jz short loc_A270A
mov rax, [rbp+var_30]
mov rax, [rax+8]
mov ecx, [rbp+var_4C]
cmp qword ptr [rax+rcx*8], 0
jz short loc_A270A
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_A2716
loc_A270A:
mov rax, [rbp+var_38]
mov qword ptr [rax+30h], 0
loc_A2716:
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_A23AD
loc_A274B:
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_A2764
jmp short loc_A2777
loc_A2764:
mov rdi, [rbp+var_18]
call free_rows
mov rax, [rbp+var_40]
mov [rbp+var_8], rax
jmp short loc_A2793
loc_A2777:
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_A2793:
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 0x001ad000
MOV qword ptr [RBP + -0x40],RAX
MOV qword ptr [RBP + -0x38],RAX
CMP qword ptr [RBP + -0x40],0x0
JNZ 0x001a23a2
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001a2793
LAB_001a23a2:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x30],RAX
LAB_001a23ad:
CMP qword ptr [RBP + -0x30],0x0
JZ 0x001a274b
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 0x001a23d4
JMP 0x001a2777
LAB_001a23d4:
MOV dword ptr [RBP + -0x4c],0x0
LAB_001a23db:
MOV EAX,dword ptr [RBP + -0x4c]
CMP EAX,dword ptr [RBP + -0x50]
JNC 0x001a24ac
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 0x001a2446
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 0x001a2446
JMP 0x001a2777
LAB_001a2446:
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 0x001ad370
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,[0x3b1250]
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,[0x3b1250]
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 0x001a23db
LAB_001a24ac:
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x78],0x0
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001a27a0
CMP AL,0x0
JZ 0x001a256d
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 0x001a2564
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 0x001a21b0
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 0x001a2562
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 0x001a27d0
LAB_001a2562:
JMP 0x001a2564
LAB_001a2564:
MOV EAX,dword ptr [RBP + -0x4c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x4c],EAX
LAB_001a256d:
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 0x001a2690
MOV RAX,qword ptr [RBP + -0x38]
CMP dword ptr [RAX + 0x70],0x7
JNZ 0x001a26b1
MOV RAX,qword ptr [RBP + -0x38]
CMP qword ptr [RAX + 0x38],0xe
JZ 0x001a26b1
MOV RAX,qword ptr [RBP + -0x38]
CMP qword ptr [RAX + 0x38],0x8
JZ 0x001a26b1
LAB_001a2690:
MOV RAX,qword ptr [RBP + -0x38]
CMP dword ptr [RAX + 0x70],0xd
JZ 0x001a26b1
MOV RAX,qword ptr [RBP + -0x38]
CMP dword ptr [RAX + 0x70],0xf6
JZ 0x001a26b1
MOV RAX,qword ptr [RBP + -0x38]
CMP dword ptr [RAX + 0x70],0x0
JNZ 0x001a26c1
LAB_001a26b1:
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RAX + 0x64]
OR ECX,0x8000
MOV dword ptr [RAX + 0x64],ECX
LAB_001a26c1:
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 0x001a270a
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 0x001a270a
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 0x001ad370
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x30],RCX
JMP 0x001a2716
LAB_001a270a:
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x30],0x0
LAB_001a2716:
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 0x001a23ad
LAB_001a274b:
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 0x001a2764
JMP 0x001a2777
LAB_001a2764:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x0019ea60
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001a2793
LAB_001a2777:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x0019ea60
MOV RDI,qword ptr [RBP + -0x20]
XOR ESI,ESI
CALL 0x001ad260
MOV qword ptr [RBP + -0x8],0x0
LAB_001a2793:
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_001a2777;
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_001a2777;
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_001a2777:
free_rows(param_2);
ma_free_root(param_3,0);
local_10 = 0;
}
else {
free_rows(param_2);
}
}
return local_10;
}
|
|
14,607
|
translog_scanner_get_page
|
eloqsql/storage/maria/ma_loghandler.c
|
static my_bool
translog_scanner_get_page(TRANSLOG_SCANNER_DATA *scanner)
{
TRANSLOG_VALIDATOR_DATA data;
DBUG_ENTER("translog_scanner_get_page");
data.addr= &scanner->page_addr;
data.was_recovered= 0;
DBUG_RETURN((scanner->page=
translog_get_page(&data, scanner->buffer,
(scanner->use_direct_link ?
&scanner->direct_link :
NULL))) ==
NULL);
}
|
O0
|
c
|
translog_scanner_get_page:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x2000, %rax # imm = 0x2000
movq %rax, -0x18(%rbp)
movb $0x0, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movsbl 0x202d(%rax), %eax
cmpl $0x0, %eax
je 0x32d86
movq -0x8(%rbp), %rax
addq $0x2020, %rax # imm = 0x2020
movq %rax, -0x28(%rbp)
jmp 0x32d8e
xorl %eax, %eax
movq %rax, -0x28(%rbp)
jmp 0x32d8e
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
leaq -0x18(%rbp), %rdi
callq 0x301f0
movq -0x8(%rbp), %rcx
movq %rax, 0x2018(%rcx)
cmpq $0x0, %rax
sete %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
translog_scanner_get_page:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
add rax, 2000h
mov [rbp+var_18], rax
mov [rbp+var_10], 0
mov rax, [rbp+var_8]
mov [rbp+var_20], rax
mov rax, [rbp+var_8]
movsx eax, byte ptr [rax+202Dh]
cmp eax, 0
jz short loc_32D86
mov rax, [rbp+var_8]
add rax, 2020h
mov [rbp+var_28], rax
jmp short loc_32D8E
loc_32D86:
xor eax, eax
mov [rbp+var_28], rax
jmp short $+2
loc_32D8E:
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_28]
lea rdi, [rbp+var_18]
call translog_get_page
mov rcx, [rbp+var_8]
mov [rcx+2018h], rax
cmp rax, 0
setz al
and al, 1
movzx eax, al
mov [rbp+var_29], al
mov al, [rbp+var_29]
add rsp, 30h
pop rbp
retn
|
_BOOL8 translog_scanner_get_page(long long a1)
{
long long page; // rax
long long *v3; // [rsp+18h] [rbp-18h] BYREF
char v4; // [rsp+20h] [rbp-10h]
long long v5; // [rsp+28h] [rbp-8h]
v5 = a1;
v3 = (long long *)(a1 + 0x2000);
v4 = 0;
if ( *(_BYTE *)(a1 + 8237) )
page = translog_get_page(&v3, a1, (_QWORD *)(v5 + 8224));
else
page = translog_get_page(&v3, a1, 0LL);
*(_QWORD *)(v5 + 8216) = page;
return page == 0;
}
|
translog_scanner_get_page:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x2000
MOV qword ptr [RBP + -0x18],RAX
MOV byte ptr [RBP + -0x10],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOVSX EAX,byte ptr [RAX + 0x202d]
CMP EAX,0x0
JZ 0x00132d86
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x2020
MOV qword ptr [RBP + -0x28],RAX
JMP 0x00132d8e
LAB_00132d86:
XOR EAX,EAX
MOV qword ptr [RBP + -0x28],RAX
JMP 0x00132d8e
LAB_00132d8e:
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
LEA RDI,[RBP + -0x18]
CALL 0x001301f0
MOV RCX,qword ptr [RBP + -0x8]
MOV qword ptr [RCX + 0x2018],RAX
CMP RAX,0x0
SETZ AL
AND AL,0x1
MOVZX EAX,AL
MOV byte ptr [RBP + -0x29],AL
MOV AL,byte ptr [RBP + -0x29]
ADD RSP,0x30
POP RBP
RET
|
bool translog_scanner_get_page(long param_1)
{
long lVar1;
long local_30;
long local_20;
int1 local_18;
long local_10;
local_20 = param_1 + 0x2000;
local_18 = 0;
if (*(char *)(param_1 + 0x202d) == '\0') {
local_30 = 0;
}
else {
local_30 = param_1 + 0x2020;
}
local_10 = param_1;
lVar1 = translog_get_page(&local_20,param_1,local_30);
*(long *)(local_10 + 0x2018) = lVar1;
return lVar1 == 0;
}
|
|
14,608
|
ok1
|
eloqsql/unittest/mytap/tap.c
|
void
ok1(int const pass)
{
va_list ap;
memset(&ap, 0, sizeof(ap));
if (!pass && *g_test.todo == '\0')
++g_test.failed;
vemit_tap(pass, NULL, ap);
if (*g_test.todo != '\0')
emit_dir("todo", g_test.todo);
emit_endl();
}
|
O0
|
c
|
ok1:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
leaq -0x20(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x25190
cmpl $0x0, -0x4(%rbp)
jne 0x26dfc
movsbl 0x36a584(%rip), %eax # 0x39136c
cmpl $0x0, %eax
jne 0x26dfc
movl 0x36a575(%rip), %eax # 0x391368
addl $0x1, %eax
movl %eax, 0x36a56c(%rip) # 0x391368
movl -0x4(%rbp), %edi
leaq -0x20(%rbp), %rdx
xorl %eax, %eax
movl %eax, %esi
callq 0x26c90
movsbl 0x36a559(%rip), %eax # 0x39136c
cmpl $0x0, %eax
je 0x26e2f
leaq 0x5b7fd(%rip), %rdi # 0x8261c
leaq 0x36a53a(%rip), %rsi # 0x391360
addq $0xc, %rsi
callq 0x26d70
callq 0x271d0
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
ok1:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_4], edi
lea rdi, [rbp+var_20]
xor esi, esi
mov edx, 18h
call _memset
cmp [rbp+var_4], 0
jnz short loc_26DFC
movsx eax, cs:byte_39136C
cmp eax, 0
jnz short loc_26DFC
mov eax, cs:dword_391368
add eax, 1
mov cs:dword_391368, eax
loc_26DFC:
mov edi, [rbp+var_4]
lea rdx, [rbp+var_20]
xor eax, eax
mov esi, eax
call vemit_tap
movsx eax, cs:byte_39136C
cmp eax, 0
jz short loc_26E2F
lea rdi, aTodo; "todo"
lea rsi, g_test
add rsi, 0Ch
call emit_dir
loc_26E2F:
call emit_endl
add rsp, 20h
pop rbp
retn
|
long long ok1(int a1)
{
_BYTE v2[28]; // [rsp+0h] [rbp-20h] BYREF
int v3; // [rsp+1Ch] [rbp-4h]
v3 = a1;
memset(v2, 0LL, 24LL);
if ( !v3 && !byte_39136C )
++dword_391368;
vemit_tap(v3, 0LL, (long long)v2);
if ( byte_39136C )
emit_dir("todo", (const char *)&g_test + 12);
return emit_endl();
}
|
ok1:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x4],EDI
LEA RDI,[RBP + -0x20]
XOR ESI,ESI
MOV EDX,0x18
CALL 0x00125190
CMP dword ptr [RBP + -0x4],0x0
JNZ 0x00126dfc
MOVSX EAX,byte ptr [0x0049136c]
CMP EAX,0x0
JNZ 0x00126dfc
MOV EAX,dword ptr [0x00491368]
ADD EAX,0x1
MOV dword ptr [0x00491368],EAX
LAB_00126dfc:
MOV EDI,dword ptr [RBP + -0x4]
LEA RDX,[RBP + -0x20]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x00126c90
MOVSX EAX,byte ptr [0x0049136c]
CMP EAX,0x0
JZ 0x00126e2f
LEA RDI,[0x18261c]
LEA RSI,[0x491360]
ADD RSI,0xc
CALL 0x00126d70
LAB_00126e2f:
CALL 0x001271d0
ADD RSP,0x20
POP RBP
RET
|
void ok1(int param_1)
{
int1 local_28 [28];
int local_c;
local_c = param_1;
memset(local_28,0,0x18);
if ((local_c == 0) && (DAT_0049136c == '\0')) {
DAT_00491368 = DAT_00491368 + 1;
}
vemit_tap(local_c,0,local_28);
if (DAT_0049136c != '\0') {
emit_dir(&DAT_0018261c,&DAT_0049136c);
}
emit_endl();
return;
}
|
|
14,609
|
testing::internal::ThreadLocal<std::vector<testing::internal::TraceInfo, std::allocator<testing::internal::TraceInfo>>>::GetOrCreateValue() const
|
AlayaLite/build_O3/_deps/googletest-src/googletest/include/gtest/internal/gtest-port.h
|
T* GetOrCreateValue() const {
ThreadLocalValueHolderBase* const holder =
static_cast<ThreadLocalValueHolderBase*>(pthread_getspecific(key_));
if (holder != nullptr) {
return CheckedDowncastToActualType<ValueHolder>(holder)->pointer();
}
ValueHolder* const new_holder = default_factory_->MakeNewHolder();
ThreadLocalValueHolderBase* const holder_base = new_holder;
GTEST_CHECK_POSIX_SUCCESS_(pthread_setspecific(key_, holder_base));
return new_holder->pointer();
}
|
O3
|
c
|
testing::internal::ThreadLocal<std::vector<testing::internal::TraceInfo, std::allocator<testing::internal::TraceInfo>>>::GetOrCreateValue() const:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
movl (%rdi), %edi
callq 0x11cd0
testq %rax, %rax
je 0x79411
movq %rax, %rdi
callq 0x794b7
movq %rax, %rbx
jmp 0x79492
movq 0x8(%r14), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq %rax, %rbx
movl (%r14), %edi
movq %rax, %rsi
callq 0x11440
testl %eax, %eax
je 0x79492
movl %eax, %ebp
leaq 0xed8a(%rip), %rdx # 0x881c0
leaq 0xc(%rsp), %rdi
movl $0x3, %esi
movl $0x73b, %ecx # imm = 0x73B
callq 0x5830c
movq 0x3ab87(%rip), %rdi # 0xb3fd8
leaq 0xf032(%rip), %rsi # 0x8848a
movl $0x26, %edx
callq 0x11b90
movq 0x3ab6f(%rip), %rdi # 0xb3fd8
leaq 0xede4(%rip), %rsi # 0x88254
movl $0x12, %edx
callq 0x11b90
movq 0x3ab57(%rip), %rdi # 0xb3fd8
movl %ebp, %esi
callq 0x113b0
leaq 0xc(%rsp), %rdi
callq 0x5844e
addq $0x8, %rbx
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq 0xc(%rsp), %rdi
callq 0x5844e
movq %rbx, %rdi
callq 0x11760
|
_ZNK7testing8internal11ThreadLocalISt6vectorINS0_9TraceInfoESaIS3_EEE16GetOrCreateValueEv:
push rbp
push r14
push rbx
sub rsp, 10h
mov r14, rdi
mov edi, [rdi]
call _pthread_getspecific
test rax, rax
jz short loc_79411
mov rdi, rax; lpsrc
call _ZN7testing8internal27CheckedDowncastToActualTypeINS0_11ThreadLocalISt6vectorINS0_9TraceInfoESaIS4_EEE11ValueHolderENS0_26ThreadLocalValueHolderBaseEEEPT_PT0_; testing::internal::CheckedDowncastToActualType<testing::internal::ThreadLocal<std::vector<testing::internal::TraceInfo>>::ValueHolder,testing::internal::ThreadLocalValueHolderBase>(testing::internal::ThreadLocalValueHolderBase *)
mov rbx, rax
jmp loc_79492
loc_79411:
mov rdi, [r14+8]
mov rax, [rdi]
call qword ptr [rax+10h]
mov rbx, rax
mov edi, [r14]
mov rsi, rax
call _pthread_setspecific
test eax, eax
jz short loc_79492
mov ebp, eax
lea rdx, aWorkspaceLlm4b_15; "/workspace/llm4binary/github2025/AlayaL"...
lea rdi, [rsp+28h+var_1C]
mov esi, 3
mov ecx, 73Bh
call _ZN7testing8internal8GTestLogC2ENS0_16GTestLogSeverityEPKci; testing::internal::GTestLog::GTestLog(testing::internal::GTestLogSeverity,char const*,int)
mov rdi, cs:_ZSt4cerr_ptr
lea rsi, aPthreadSetspec_0; "pthread_setspecific(key_, holder_base)"
mov edx, 26h ; '&'
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, cs:_ZSt4cerr_ptr
lea rsi, aFailedWithErro; "failed with error "
mov edx, 12h
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, cs:_ZSt4cerr_ptr
mov esi, ebp
call __ZNSolsEi; std::ostream::operator<<(int)
lea rdi, [rsp+28h+var_1C]; this
call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog()
loc_79492:
add rbx, 8
mov rax, rbx
add rsp, 10h
pop rbx
pop r14
pop rbp
retn
mov rbx, rax
lea rdi, [rsp+arg_4]; this
call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog()
mov rdi, rbx
call __Unwind_Resume
|
long long testing::internal::ThreadLocal<std::vector<testing::internal::TraceInfo>>::GetOrCreateValue(
unsigned int *a1)
{
void *v1; // rax
long long v2; // rbx
unsigned int v3; // eax
unsigned int v4; // ebp
int v6; // [rsp+0h] [rbp-28h]
_DWORD v7[7]; // [rsp+Ch] [rbp-1Ch] BYREF
v1 = (void *)pthread_getspecific(*a1);
if ( v1 )
{
v2 = testing::internal::CheckedDowncastToActualType<testing::internal::ThreadLocal<std::vector<testing::internal::TraceInfo>>::ValueHolder,testing::internal::ThreadLocalValueHolderBase>(
v1,
v6);
}
else
{
v2 = (*(long long ( **)(_QWORD))(**((_QWORD **)a1 + 1) + 16LL))(*((_QWORD *)a1 + 1));
v3 = pthread_setspecific(*a1, v2);
if ( v3 )
{
v4 = v3;
testing::internal::GTestLog::GTestLog(
v7,
3,
"/workspace/llm4binary/github2025/AlayaLite/build_O3/_deps/googletest-src/googletest/include/gtest/internal/gtest-port.h",
1851);
std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, "pthread_setspecific(key_, holder_base)", 38LL);
std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, "failed with error ", 18LL);
std::ostream::operator<<(&std::cerr, v4);
testing::internal::GTestLog::~GTestLog((testing::internal::GTestLog *)v7);
}
}
return v2 + 8;
}
|
GetOrCreateValue:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV R14,RDI
MOV EDI,dword ptr [RDI]
CALL 0x00111cd0
TEST RAX,RAX
JZ 0x00179411
MOV RDI,RAX
CALL 0x001794b7
MOV RBX,RAX
JMP 0x00179492
LAB_00179411:
MOV RDI,qword ptr [R14 + 0x8]
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x10]
MOV RBX,RAX
MOV EDI,dword ptr [R14]
MOV RSI,RAX
CALL 0x00111440
TEST EAX,EAX
JZ 0x00179492
MOV EBP,EAX
LEA RDX,[0x1881c0]
LEA RDI,[RSP + 0xc]
MOV ESI,0x3
MOV ECX,0x73b
CALL 0x0015830c
LAB_0017944a:
MOV RDI,qword ptr [0x001b3fd8]
LEA RSI,[0x18848a]
MOV EDX,0x26
CALL 0x00111b90
MOV RDI,qword ptr [0x001b3fd8]
LEA RSI,[0x188254]
MOV EDX,0x12
CALL 0x00111b90
MOV RDI,qword ptr [0x001b3fd8]
MOV ESI,EBP
CALL 0x001113b0
LAB_00179488:
LEA RDI,[RSP + 0xc]
CALL 0x0015844e
LAB_00179492:
ADD RBX,0x8
MOV RAX,RBX
ADD RSP,0x10
POP RBX
POP R14
POP RBP
RET
|
/* testing::internal::ThreadLocal<std::vector<testing::internal::TraceInfo,
std::allocator<testing::internal::TraceInfo> > >::GetOrCreateValue() const */
ValueHolder * __thiscall
testing::internal::
ThreadLocal<std::vector<testing::internal::TraceInfo,std::allocator<testing::internal::TraceInfo>>>
::GetOrCreateValue(ThreadLocal<std::vector<testing::internal::TraceInfo,std::allocator<testing::internal::TraceInfo>>>
*this)
{
int iVar1;
ThreadLocalValueHolderBase *pTVar2;
ValueHolder *__pointer;
GTestLog local_1c [4];
pTVar2 = (ThreadLocalValueHolderBase *)pthread_getspecific(*(pthread_key_t *)this);
if (pTVar2 == (ThreadLocalValueHolderBase *)0x0) {
__pointer = (ValueHolder *)(**(code **)(**(long **)(this + 8) + 0x10))();
iVar1 = pthread_setspecific(*(pthread_key_t *)this,__pointer);
if (iVar1 != 0) {
GTestLog::GTestLog(local_1c,3,
"/workspace/llm4binary/github2025/AlayaLite/build_O3/_deps/googletest-src/googletest/include/gtest/internal/gtest-port.h"
,0x73b);
/* try { // try from 0017944a to 00179487 has its CatchHandler @ 001794a2 */
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)PTR_cerr_001b3fd8,"pthread_setspecific(key_, holder_base)",0x26);
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)PTR_cerr_001b3fd8,"failed with error ",0x12);
std::ostream::operator<<((ostream *)PTR_cerr_001b3fd8,iVar1);
GTestLog::~GTestLog(local_1c);
}
}
else {
__pointer = CheckedDowncastToActualType<testing::internal::ThreadLocal<std::vector<testing::internal::TraceInfo,std::allocator<testing::internal::TraceInfo>>>::ValueHolder,testing::internal::ThreadLocalValueHolderBase>
(pTVar2);
}
return __pointer + 8;
}
|
|
14,610
|
my_clear_highest_bit(unsigned int)
|
eloqsql/include/my_bit.h
|
static inline uint32 my_clear_highest_bit(uint32 v)
{
uint32 w=v >> 1;
w|= w >> 1;
w|= w >> 2;
w|= w >> 4;
w|= w >> 8;
w|= w >> 16;
return v & w;
}
|
O0
|
c
|
my_clear_highest_bit(unsigned int):
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
shrl %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
shrl %eax
orl -0x8(%rbp), %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
shrl $0x2, %eax
orl -0x8(%rbp), %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
shrl $0x4, %eax
orl -0x8(%rbp), %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
shrl $0x8, %eax
orl -0x8(%rbp), %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
shrl $0x10, %eax
orl -0x8(%rbp), %eax
movl %eax, -0x8(%rbp)
movl -0x4(%rbp), %eax
andl -0x8(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_ZL20my_clear_highest_bitj:
push rbp
mov rbp, rsp
mov [rbp+var_4], edi
mov eax, [rbp+var_4]
shr eax, 1
mov [rbp+var_8], eax
mov eax, [rbp+var_8]
shr eax, 1
or eax, [rbp+var_8]
mov [rbp+var_8], eax
mov eax, [rbp+var_8]
shr eax, 2
or eax, [rbp+var_8]
mov [rbp+var_8], eax
mov eax, [rbp+var_8]
shr eax, 4
or eax, [rbp+var_8]
mov [rbp+var_8], eax
mov eax, [rbp+var_8]
shr eax, 8
or eax, [rbp+var_8]
mov [rbp+var_8], eax
mov eax, [rbp+var_8]
shr eax, 10h
or eax, [rbp+var_8]
mov [rbp+var_8], eax
mov eax, [rbp+var_4]
and eax, [rbp+var_8]
pop rbp
retn
|
long long my_clear_highest_bit(unsigned int a1)
{
unsigned int v2; // [rsp+0h] [rbp-8h]
unsigned int v3; // [rsp+0h] [rbp-8h]
v2 = (a1 >> 1) | (a1 >> 2) | (((a1 >> 1) | (a1 >> 2)) >> 2);
v3 = v2 | (v2 >> 4) | ((v2 | (v2 >> 4)) >> 8);
return (v3 | HIWORD(v3)) & a1;
}
|
my_clear_highest_bit:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x4],EDI
MOV EAX,dword ptr [RBP + -0x4]
SHR EAX,0x1
MOV dword ptr [RBP + -0x8],EAX
MOV EAX,dword ptr [RBP + -0x8]
SHR EAX,0x1
OR EAX,dword ptr [RBP + -0x8]
MOV dword ptr [RBP + -0x8],EAX
MOV EAX,dword ptr [RBP + -0x8]
SHR EAX,0x2
OR EAX,dword ptr [RBP + -0x8]
MOV dword ptr [RBP + -0x8],EAX
MOV EAX,dword ptr [RBP + -0x8]
SHR EAX,0x4
OR EAX,dword ptr [RBP + -0x8]
MOV dword ptr [RBP + -0x8],EAX
MOV EAX,dword ptr [RBP + -0x8]
SHR EAX,0x8
OR EAX,dword ptr [RBP + -0x8]
MOV dword ptr [RBP + -0x8],EAX
MOV EAX,dword ptr [RBP + -0x8]
SHR EAX,0x10
OR EAX,dword ptr [RBP + -0x8]
MOV dword ptr [RBP + -0x8],EAX
MOV EAX,dword ptr [RBP + -0x4]
AND EAX,dword ptr [RBP + -0x8]
POP RBP
RET
|
/* my_clear_highest_bit(unsigned int) */
uint my_clear_highest_bit(uint param_1)
{
uint uVar1;
uVar1 = param_1 >> 1 | param_1;
uVar1 = uVar1 >> 3 | uVar1 >> 1;
uVar1 = uVar1 >> 4 | uVar1;
uVar1 = uVar1 >> 8 | uVar1;
return param_1 & (uVar1 >> 0x10 | uVar1);
}
|
|
14,611
|
LefDefParser::defiNonDefault::numCuts(int) const
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiNonDefault.cpp
|
int defiNonDefault::numCuts(int index) const {
char msg[160];
if (index < 0 || index >= numMinCuts_) {
sprintf (msg, "ERROR (DEFPARS-6090): The index number %d specified for the NONDEFAULT LAYER is invalid.\nValid index is from 0 to %d. Specify a valid index number and then try again.",
index, numLayers_);
defiError(0, 6090, msg, defData);
return 0;
}
return numCuts_[index];
}
|
O3
|
cpp
|
LefDefParser::defiNonDefault::numCuts(int) const:
pushq %r15
pushq %r14
pushq %rbx
subq $0xa0, %rsp
movl %esi, %edx
movq %rdi, %r14
testl %esi, %esi
js 0x2c0eb
cmpl %edx, 0x78(%r14)
jle 0x2c0eb
movq 0x88(%r14), %rax
movl %edx, %ecx
movl (%rax,%rcx,4), %ebx
jmp 0x2c11b
movl 0xc(%r14), %ecx
leaq 0x198b7(%rip), %rsi # 0x459ad
xorl %ebx, %ebx
movq %rsp, %r15
movq %r15, %rdi
xorl %eax, %eax
callq 0x7060
movq 0xb8(%r14), %rcx
xorl %edi, %edi
movl $0x17ca, %esi # imm = 0x17CA
movq %r15, %rdx
callq 0x1bb18
movl %ebx, %eax
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %r15
retq
|
_ZNK12LefDefParser14defiNonDefault7numCutsEi:
push r15
push r14
push rbx
sub rsp, 0A0h
mov edx, esi
mov r14, rdi
test esi, esi
js short loc_2C0EB
cmp [r14+78h], edx
jle short loc_2C0EB
mov rax, [r14+88h]
mov ecx, edx
mov ebx, [rax+rcx*4]
jmp short loc_2C11B
loc_2C0EB:
mov ecx, [r14+0Ch]
lea rsi, aErrorDefpars60_8; "ERROR (DEFPARS-6090): The index number "...
xor ebx, ebx
mov r15, rsp
mov rdi, r15
xor eax, eax
call _sprintf
mov rcx, [r14+0B8h]; LefDefParser::defrData *
xor edi, edi; this
mov esi, 17CAh; int
mov rdx, r15; char *
call _ZN12LefDefParser9defiErrorEiiPKcPNS_8defrDataE; LefDefParser::defiError(int,int,char const*,LefDefParser::defrData *)
loc_2C11B:
mov eax, ebx
add rsp, 0A0h
pop rbx
pop r14
pop r15
retn
|
long long LefDefParser::defiNonDefault::numCuts(LefDefParser::defiNonDefault *this, int a2)
{
unsigned int v2; // ebx
LefDefParser::defrData *v3; // r8
char v5[184]; // [rsp+0h] [rbp-B8h] BYREF
if ( a2 < 0 || *((_DWORD *)this + 30) <= a2 )
{
v2 = 0;
sprintf(
v5,
"ERROR (DEFPARS-6090): The index number %d specified for the NONDEFAULT LAYER is invalid.\n"
"Valid index is from 0 to %d. Specify a valid index number and then try again.",
a2,
*((_DWORD *)this + 3));
LefDefParser::defiError(0LL, 6090, v5, *((LefDefParser::defrData **)this + 23), v3);
}
else
{
return *(unsigned int *)(*((_QWORD *)this + 17) + 4LL * (unsigned int)a2);
}
return v2;
}
|
numCuts:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0xa0
MOV EDX,ESI
MOV R14,RDI
TEST ESI,ESI
JS 0x0012c0eb
CMP dword ptr [R14 + 0x78],EDX
JLE 0x0012c0eb
MOV RAX,qword ptr [R14 + 0x88]
MOV ECX,EDX
MOV EBX,dword ptr [RAX + RCX*0x4]
JMP 0x0012c11b
LAB_0012c0eb:
MOV ECX,dword ptr [R14 + 0xc]
LEA RSI,[0x1459ad]
XOR EBX,EBX
MOV R15,RSP
MOV RDI,R15
XOR EAX,EAX
CALL 0x00107060
MOV RCX,qword ptr [R14 + 0xb8]
XOR EDI,EDI
MOV ESI,0x17ca
MOV RDX,R15
CALL 0x0011bb18
LAB_0012c11b:
MOV EAX,EBX
ADD RSP,0xa0
POP RBX
POP R14
POP R15
RET
|
/* LefDefParser::defiNonDefault::numCuts(int) const */
int4 __thiscall LefDefParser::defiNonDefault::numCuts(defiNonDefault *this,int param_1)
{
int4 uVar1;
char acStack_b8 [160];
if ((param_1 < 0) || (*(int *)(this + 0x78) <= param_1)) {
uVar1 = 0;
sprintf(acStack_b8,
"ERROR (DEFPARS-6090): The index number %d specified for the NONDEFAULT LAYER is invalid.\nValid index is from 0 to %d. Specify a valid index number and then try again."
,(ulong)(uint)param_1,(ulong)*(uint *)(this + 0xc));
defiError(0,0x17ca,acStack_b8,*(defrData **)(this + 0xb8));
}
else {
uVar1 = *(int4 *)(*(long *)(this + 0x88) + (ulong)(uint)param_1 * 4);
}
return uVar1;
}
|
|
14,612
|
partitioned_key_cache_write
|
eloqsql/mysys/mf_keycache.c
|
static
int partitioned_key_cache_write(PARTITIONED_KEY_CACHE_CB *keycache,
File file, void *file_extra,
my_off_t filepos, int level,
uchar *buff, uint length,
uint block_length __attribute__((unused)),
int dont_write)
{
uint w_length;
ulonglong *part_map= (ulonglong *) file_extra;
uint offset= (uint) (filepos % keycache->key_cache_block_size);
DBUG_ENTER("partitioned_key_cache_write");
DBUG_PRINT("enter",
("fd: %u pos: %lu length: %u block_length: %u"
" key_block_length: %u",
(uint) file, (ulong) filepos, length, block_length,
keycache ? keycache->key_cache_block_size : 0));
/* Write data in key_cache_block_size increments */
do
{
SIMPLE_KEY_CACHE_CB *partition= get_key_cache_partition_for_write(keycache,
file,
filepos,
part_map);
w_length = length;
set_if_smaller(w_length, keycache->key_cache_block_size - offset );
if (simple_key_cache_write(partition,
file, 0, filepos, level,
buff, w_length, block_length,
dont_write))
DBUG_RETURN(1);
filepos+= w_length;
buff+= w_length;
offset= 0;
} while ((length-= w_length));
DBUG_RETURN(0);
}
|
O0
|
c
|
partitioned_key_cache_write:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movl 0x20(%rbp), %eax
movl 0x18(%rbp), %eax
movl 0x10(%rbp), %eax
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
movq %r9, -0x38(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
movl 0x18(%rcx), %ecx
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, -0x4c(%rbp)
jmp 0xe8307
jmp 0xe8309
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x28(%rbp), %rdx
movq -0x48(%rbp), %rcx
callq 0xe8780
movq %rax, -0x58(%rbp)
movl 0x10(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movq -0x10(%rbp), %rcx
movl 0x18(%rcx), %ecx
subl -0x4c(%rbp), %ecx
cmpl %ecx, %eax
jbe 0xe8345
movq -0x10(%rbp), %rax
movl 0x18(%rax), %eax
subl -0x4c(%rbp), %eax
movl %eax, -0x3c(%rbp)
jmp 0xe8347
movq -0x58(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x28(%rbp), %rcx
movl -0x2c(%rbp), %r8d
movq -0x38(%rbp), %r9
movl -0x3c(%rbp), %r11d
movl 0x18(%rbp), %r10d
movl 0x20(%rbp), %eax
xorl %edx, %edx
movl %r11d, (%rsp)
movl %r10d, 0x8(%rsp)
movl %eax, 0x10(%rsp)
callq 0xe6410
cmpl $0x0, %eax
je 0xe8389
jmp 0xe8380
movl $0x1, -0x4(%rbp)
jmp 0xe83c8
movl -0x3c(%rbp), %eax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movl -0x3c(%rbp), %ecx
movq -0x38(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movl $0x0, -0x4c(%rbp)
movl -0x3c(%rbp), %ecx
movl 0x10(%rbp), %eax
subl %ecx, %eax
movl %eax, 0x10(%rbp)
cmpl $0x0, %eax
jne 0xe8309
jmp 0xe83c1
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
partitioned_key_cache_write:
push rbp
mov rbp, rsp
sub rsp, 70h
mov eax, [rbp+arg_10]
mov eax, [rbp+arg_8]
mov eax, [rbp+arg_0]
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_2C], r8d
mov [rbp+var_38], r9
mov rax, [rbp+var_20]
mov [rbp+var_48], rax
mov rax, [rbp+var_28]
mov rcx, [rbp+var_10]
mov ecx, [rcx+18h]
xor edx, edx
div rcx
mov eax, edx
mov [rbp+var_4C], eax
jmp short $+2
loc_E8307:
jmp short $+2
loc_E8309:
mov rdi, [rbp+var_10]
mov esi, [rbp+var_14]
mov rdx, [rbp+var_28]
mov rcx, [rbp+var_48]
call get_key_cache_partition_for_write
mov [rbp+var_58], rax
mov eax, [rbp+arg_0]
mov [rbp+var_3C], eax
mov eax, [rbp+var_3C]
mov rcx, [rbp+var_10]
mov ecx, [rcx+18h]
sub ecx, [rbp+var_4C]
cmp eax, ecx
jbe short loc_E8345
mov rax, [rbp+var_10]
mov eax, [rax+18h]
sub eax, [rbp+var_4C]
mov [rbp+var_3C], eax
loc_E8345:
jmp short $+2
loc_E8347:
mov rdi, [rbp+var_58]
mov esi, [rbp+var_14]
mov rcx, [rbp+var_28]
mov r8d, [rbp+var_2C]
mov r9, [rbp+var_38]
mov r11d, [rbp+var_3C]
mov r10d, [rbp+arg_8]
mov eax, [rbp+arg_10]
xor edx, edx
mov [rsp+70h+var_70], r11d
mov [rsp+70h+var_68], r10d
mov [rsp+70h+var_60], eax
call simple_key_cache_write
cmp eax, 0
jz short loc_E8389
jmp short $+2
loc_E8380:
mov [rbp+var_4], 1
jmp short loc_E83C8
loc_E8389:
mov eax, [rbp+var_3C]
add rax, [rbp+var_28]
mov [rbp+var_28], rax
mov ecx, [rbp+var_3C]
mov rax, [rbp+var_38]
mov ecx, ecx
add rax, rcx
mov [rbp+var_38], rax
mov [rbp+var_4C], 0
mov ecx, [rbp+var_3C]
mov eax, [rbp+arg_0]
sub eax, ecx
mov [rbp+arg_0], eax
cmp eax, 0
jnz loc_E8309
jmp short $+2
loc_E83C1:
mov [rbp+var_4], 0
loc_E83C8:
mov eax, [rbp+var_4]
add rsp, 70h
pop rbp
retn
|
long long partitioned_key_cache_write(
long long a1,
unsigned int a2,
long long a3,
unsigned long long a4,
int a5,
long long a6,
unsigned int a7,
int a8,
int a9)
{
_QWORD *v10; // [rsp+18h] [rbp-58h]
int v11; // [rsp+24h] [rbp-4Ch]
unsigned int v13; // [rsp+34h] [rbp-3Ch]
unsigned long long v16; // [rsp+48h] [rbp-28h]
v16 = a4;
v11 = a4 % *(unsigned int *)(a1 + 24);
do
{
v10 = (_QWORD *)get_key_cache_partition_for_write(a1, a2, v16, a3);
v13 = a7;
if ( a7 > *(_DWORD *)(a1 + 24) - v11 )
v13 = *(_DWORD *)(a1 + 24) - v11;
if ( (unsigned int)simple_key_cache_write(v10, a2, 0LL, v16, a5, a6, v13, a8, a9) )
return 1;
v16 += v13;
a6 += v13;
v11 = 0;
a7 -= v13;
}
while ( a7 );
return 0;
}
|
partitioned_key_cache_write:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV EAX,dword ptr [RBP + 0x20]
MOV EAX,dword ptr [RBP + 0x18]
MOV EAX,dword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV dword ptr [RBP + -0x2c],R8D
MOV qword ptr [RBP + -0x38],R9
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RCX + 0x18]
XOR EDX,EDX
DIV RCX
MOV EAX,EDX
MOV dword ptr [RBP + -0x4c],EAX
JMP 0x001e8307
LAB_001e8307:
JMP 0x001e8309
LAB_001e8309:
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x14]
MOV RDX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x48]
CALL 0x001e8780
MOV qword ptr [RBP + -0x58],RAX
MOV EAX,dword ptr [RBP + 0x10]
MOV dword ptr [RBP + -0x3c],EAX
MOV EAX,dword ptr [RBP + -0x3c]
MOV RCX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RCX + 0x18]
SUB ECX,dword ptr [RBP + -0x4c]
CMP EAX,ECX
JBE 0x001e8345
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x18]
SUB EAX,dword ptr [RBP + -0x4c]
MOV dword ptr [RBP + -0x3c],EAX
LAB_001e8345:
JMP 0x001e8347
LAB_001e8347:
MOV RDI,qword ptr [RBP + -0x58]
MOV ESI,dword ptr [RBP + -0x14]
MOV RCX,qword ptr [RBP + -0x28]
MOV R8D,dword ptr [RBP + -0x2c]
MOV R9,qword ptr [RBP + -0x38]
MOV R11D,dword ptr [RBP + -0x3c]
MOV R10D,dword ptr [RBP + 0x18]
MOV EAX,dword ptr [RBP + 0x20]
XOR EDX,EDX
MOV dword ptr [RSP],R11D
MOV dword ptr [RSP + 0x8],R10D
MOV dword ptr [RSP + 0x10],EAX
CALL 0x001e6410
CMP EAX,0x0
JZ 0x001e8389
JMP 0x001e8380
LAB_001e8380:
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001e83c8
LAB_001e8389:
MOV EAX,dword ptr [RBP + -0x3c]
ADD RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x28],RAX
MOV ECX,dword ptr [RBP + -0x3c]
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
MOV dword ptr [RBP + -0x4c],0x0
MOV ECX,dword ptr [RBP + -0x3c]
MOV EAX,dword ptr [RBP + 0x10]
SUB EAX,ECX
MOV dword ptr [RBP + 0x10],EAX
CMP EAX,0x0
JNZ 0x001e8309
JMP 0x001e83c1
LAB_001e83c1:
MOV dword ptr [RBP + -0x4],0x0
LAB_001e83c8:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x70
POP RBP
RET
|
int4
partitioned_key_cache_write
(long param_1,int4 param_2,int8 param_3,ulong param_4,int4 param_5,
long param_6,uint param_7,int4 param_8,int4 param_9)
{
int iVar1;
int8 uVar2;
int local_54;
uint local_44;
long local_40;
ulong local_30;
local_54 = (int)(param_4 % (ulong)*(uint *)(param_1 + 0x18));
local_40 = param_6;
local_30 = param_4;
while( true ) {
uVar2 = get_key_cache_partition_for_write(param_1,param_2,local_30,param_3);
local_44 = param_7;
if ((uint)(*(int *)(param_1 + 0x18) - local_54) < param_7) {
local_44 = *(int *)(param_1 + 0x18) - local_54;
}
iVar1 = simple_key_cache_write
(uVar2,param_2,0,local_30,param_5,local_40,local_44,param_8,param_9);
if (iVar1 != 0) break;
local_30 = local_44 + local_30;
local_40 = local_40 + (ulong)local_44;
local_54 = 0;
param_7 = param_7 - local_44;
if (param_7 == 0) {
return 0;
}
}
return 1;
}
|
|
14,613
|
qdevtools::QObjectTreeModel::data(QModelIndex const&, int) const
|
HuaiminNotSleepYet[P]QDevTools/qdevtools.cpp
|
QVariant QObjectTreeModel::data(const QModelIndex& index, int role) const
{
if (!index.isValid() || role != Qt::DisplayRole)
return {};
QObject* obj = static_cast<QObject*>(index.internalPointer());
switch (index.column()) {
case 0: return obj->metaObject()->className();
case 1: return obj->objectName();
case 2: return QString::asprintf("%p", obj);
case 3: return QString::asprintf("%p", obj->thread());
}
return {};
}
|
O0
|
cpp
|
qdevtools::QObjectTreeModel::data(QModelIndex const&, int) const:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x90(%rbp)
movq %rdi, %rax
movq %rax, -0x88(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x18(%rbp), %rdi
callq 0x1b290
testb $0x1, %al
jne 0x1354a
jmp 0x13550
cmpl $0x0, -0x1c(%rbp)
je 0x13561
movq -0x90(%rbp), %rdi
callq 0x1b240
jmp 0x136d2
movq -0x18(%rbp), %rdi
callq 0x1b2d0
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
callq 0x1b540
movl %eax, %ecx
movq %rcx, -0x98(%rbp)
subl $0x3, %eax
ja 0x136c6
movq -0x98(%rbp), %rax
leaq 0x27fd5(%rip), %rcx # 0x3b56c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x28(%rbp), %rdi
movq (%rdi), %rax
callq *(%rax)
movq %rax, %rdi
callq 0xf520
movq -0x90(%rbp), %rdi
movq %rax, %rsi
callq 0x1b560
jmp 0x136d2
movq -0x28(%rbp), %rsi
leaq -0x40(%rbp), %rdi
movq %rdi, -0xa0(%rbp)
callq 0xf930
movq -0x90(%rbp), %rdi
movq -0xa0(%rbp), %rsi
callq 0xfcc0
jmp 0x135ee
leaq -0x40(%rbp), %rdi
callq 0x1b1e0
jmp 0x136d2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x1b1e0
jmp 0x136e2
movq -0x28(%rbp), %rdx
leaq 0x28253(%rip), %rsi # 0x3b874
xorl %eax, %eax
leaq -0x68(%rbp), %rdi
movq %rdi, -0xa8(%rbp)
callq 0xf0c0
movq -0x90(%rbp), %rdi
movq -0xa8(%rbp), %rsi
callq 0xfcc0
jmp 0x13648
leaq -0x68(%rbp), %rdi
callq 0x1b1e0
jmp 0x136d2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x1b1e0
jmp 0x136e2
movq -0x28(%rbp), %rdi
callq 0xf3a0
movq %rax, %rdx
leaq 0x281f7(%rip), %rsi # 0x3b874
xorl %eax, %eax
leaq -0x80(%rbp), %rdi
movq %rdi, -0xb0(%rbp)
callq 0xf0c0
movq -0x90(%rbp), %rdi
movq -0xb0(%rbp), %rsi
callq 0xfcc0
jmp 0x136a4
leaq -0x80(%rbp), %rdi
callq 0x1b1e0
jmp 0x136d2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x1b1e0
jmp 0x136e2
movq -0x90(%rbp), %rdi
callq 0x1b240
movq -0x88(%rbp), %rax
addq $0xb0, %rsp
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0xf410
nopl (%rax,%rax)
|
_ZNK9qdevtools16QObjectTreeModel4dataERK11QModelIndexi:
push rbp
mov rbp, rsp
sub rsp, 0B0h
mov [rbp+var_90], rdi
mov rax, rdi
mov [rbp+var_88], rax
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_1C], ecx
mov rdi, [rbp+var_18]; this
call _ZNK11QModelIndex7isValidEv; QModelIndex::isValid(void)
test al, 1
jnz short loc_1354A
jmp short loc_13550
loc_1354A:
cmp [rbp+var_1C], 0
jz short loc_13561
loc_13550:
mov rdi, [rbp+var_90]; this
call _ZN8QVariantC2Ev; QVariant::QVariant(void)
jmp loc_136D2
loc_13561:
mov rdi, [rbp+var_18]; this
call _ZNK11QModelIndex15internalPointerEv; QModelIndex::internalPointer(void)
mov [rbp+var_28], rax
mov rdi, [rbp+var_18]; this
call _ZNK11QModelIndex6columnEv; QModelIndex::column(void)
mov ecx, eax
mov [rbp+var_98], rcx
sub eax, 3; switch 4 cases
ja def_1359E; jumptable 000000000001359E default case
mov rax, [rbp+var_98]
lea rcx, jpt_1359E
movsxd rax, ds:(jpt_1359E - 3B56Ch)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_135A0:
mov rdi, [rbp+var_28]; jumptable 000000000001359E case 0
mov rax, [rdi]
call qword ptr [rax]
mov rdi, rax; this
call __ZNK11QMetaObject9classNameEv; QMetaObject::className(void)
mov rdi, [rbp+var_90]; this
mov rsi, rax; char *
call _ZN8QVariantC2EPKc; QVariant::QVariant(char const*)
jmp loc_136D2
loc_135C5:
mov rsi, [rbp+var_28]; jumptable 000000000001359E case 1
lea rdi, [rbp+var_40]; this
mov [rbp+var_A0], rdi
call __ZNK7QObject10objectNameEv; QObject::objectName(void)
mov rdi, [rbp+var_90]; this
mov rsi, [rbp+var_A0]; QString *
call __ZN8QVariantC1ERK7QString; QVariant::QVariant(QString const&)
jmp short $+2
loc_135EE:
lea rdi, [rbp+var_40]; this
call _ZN7QStringD2Ev; QString::~QString()
jmp loc_136D2
mov rcx, rax
mov eax, edx
mov [rbp+var_48], rcx
mov [rbp+var_4C], eax
lea rdi, [rbp+var_40]; this
call _ZN7QStringD2Ev; QString::~QString()
jmp loc_136E2
loc_13616:
mov rdx, [rbp+var_28]; jumptable 000000000001359E case 2
lea rsi, aP; "%p"
xor eax, eax
lea rdi, [rbp+var_68]; this
mov [rbp+var_A8], rdi
call __ZN7QString8asprintfEPKcz; QString::asprintf(char const*,...)
mov rdi, [rbp+var_90]; this
mov rsi, [rbp+var_A8]; QString *
call __ZN8QVariantC1ERK7QString; QVariant::QVariant(QString const&)
jmp short $+2
loc_13648:
lea rdi, [rbp+var_68]; this
call _ZN7QStringD2Ev; QString::~QString()
jmp short loc_136D2
mov rcx, rax
mov eax, edx
mov [rbp+var_48], rcx
mov [rbp+var_4C], eax
lea rdi, [rbp+var_68]; this
call _ZN7QStringD2Ev; QString::~QString()
jmp short loc_136E2
loc_1366A:
mov rdi, [rbp+var_28]; jumptable 000000000001359E case 3
call __ZNK7QObject6threadEv; QObject::thread(void)
mov rdx, rax
lea rsi, aP; "%p"
xor eax, eax
lea rdi, [rbp+var_80]; this
mov [rbp+var_B0], rdi
call __ZN7QString8asprintfEPKcz; QString::asprintf(char const*,...)
mov rdi, [rbp+var_90]; this
mov rsi, [rbp+var_B0]; QString *
call __ZN8QVariantC1ERK7QString; QVariant::QVariant(QString const&)
jmp short $+2
loc_136A4:
lea rdi, [rbp+var_80]; this
call _ZN7QStringD2Ev; QString::~QString()
jmp short loc_136D2
mov rcx, rax
mov eax, edx
mov [rbp+var_48], rcx
mov [rbp+var_4C], eax
lea rdi, [rbp+var_80]; this
call _ZN7QStringD2Ev; QString::~QString()
jmp short loc_136E2
def_1359E:
mov rdi, [rbp+var_90]; jumptable 000000000001359E default case
call _ZN8QVariantC2Ev; QVariant::QVariant(void)
loc_136D2:
mov rax, [rbp+var_88]
add rsp, 0B0h
pop rbp
retn
loc_136E2:
mov rdi, [rbp+var_48]
call __Unwind_Resume
|
qdevtools::QObjectTreeModel * qdevtools::QObjectTreeModel::data(
qdevtools::QObjectTreeModel *this,
const QModelIndex *a2,
QModelIndex *a3,
int a4)
{
QMetaObject *v4; // rax
const char *v5; // rax
const void *v6; // rax
_BYTE v8[24]; // [rsp+30h] [rbp-80h] BYREF
_BYTE v9[28]; // [rsp+48h] [rbp-68h] BYREF
_BYTE v10[24]; // [rsp+70h] [rbp-40h] BYREF
QObject *v11; // [rsp+88h] [rbp-28h]
int v12; // [rsp+94h] [rbp-1Ch]
QModelIndex *v13; // [rsp+98h] [rbp-18h]
const QModelIndex *v14; // [rsp+A0h] [rbp-10h]
qdevtools::QObjectTreeModel *v15; // [rsp+A8h] [rbp-8h]
v15 = this;
v14 = a2;
v13 = a3;
v12 = a4;
if ( (QModelIndex::isValid(a3) & 1) != 0 && !v12 )
{
v11 = (QObject *)QModelIndex::internalPointer(v13);
switch ( (unsigned int)QModelIndex::column(v13) )
{
case 0u:
v4 = (QMetaObject *)(**(long long ( ***)(QObject *))v11)(v11);
v5 = (const char *)QMetaObject::className(v4);
QVariant::QVariant(this, v5);
break;
case 1u:
QObject::objectName((QObject *)v10);
QVariant::QVariant(this, (const QString *)v10);
QString::~QString((QString *)v10);
break;
case 2u:
QString::asprintf((QString *)v9, "%p", v11);
QVariant::QVariant(this, (const QString *)v9);
QString::~QString((QString *)v9);
break;
case 3u:
v6 = (const void *)QObject::thread(v11);
QString::asprintf((QString *)v8, "%p", v6);
QVariant::QVariant(this, (const QString *)v8);
QString::~QString((QString *)v8);
break;
default:
goto LABEL_9;
}
}
else
{
LABEL_9:
QVariant::QVariant(this);
}
return this;
}
|
data:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xb0
MOV qword ptr [RBP + -0x90],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0x88],RAX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],ECX
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x0011b290
TEST AL,0x1
JNZ 0x0011354a
JMP 0x00113550
LAB_0011354a:
CMP dword ptr [RBP + -0x1c],0x0
JZ 0x00113561
LAB_00113550:
MOV RDI,qword ptr [RBP + -0x90]
CALL 0x0011b240
JMP 0x001136d2
LAB_00113561:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x0011b2d0
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x0011b540
MOV ECX,EAX
MOV qword ptr [RBP + -0x98],RCX
SUB EAX,0x3
JA 0x001136c6
MOV RAX,qword ptr [RBP + -0x98]
LEA RCX,[0x13b56c]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_0:
MOV RDI,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX]
MOV RDI,RAX
CALL 0x0010f520
MOV RDI,qword ptr [RBP + -0x90]
MOV RSI,RAX
CALL 0x0011b560
JMP 0x001136d2
caseD_1:
MOV RSI,qword ptr [RBP + -0x28]
LEA RDI,[RBP + -0x40]
MOV qword ptr [RBP + -0xa0],RDI
CALL 0x0010f930
MOV RDI,qword ptr [RBP + -0x90]
MOV RSI,qword ptr [RBP + -0xa0]
LAB_001135e7:
CALL 0x0010fcc0
LAB_001135ec:
JMP 0x001135ee
LAB_001135ee:
LEA RDI,[RBP + -0x40]
CALL 0x0011b1e0
JMP 0x001136d2
caseD_2:
MOV RDX,qword ptr [RBP + -0x28]
LEA RSI,[0x13b874]
XOR EAX,EAX
LEA RDI,[RBP + -0x68]
MOV qword ptr [RBP + -0xa8],RDI
CALL 0x0010f0c0
MOV RDI,qword ptr [RBP + -0x90]
MOV RSI,qword ptr [RBP + -0xa8]
LAB_00113641:
CALL 0x0010fcc0
LAB_00113646:
JMP 0x00113648
LAB_00113648:
LEA RDI,[RBP + -0x68]
CALL 0x0011b1e0
JMP 0x001136d2
caseD_3:
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x0010f3a0
MOV RDX,RAX
LEA RSI,[0x13b874]
XOR EAX,EAX
LEA RDI,[RBP + -0x80]
MOV qword ptr [RBP + -0xb0],RDI
CALL 0x0010f0c0
MOV RDI,qword ptr [RBP + -0x90]
MOV RSI,qword ptr [RBP + -0xb0]
LAB_0011369d:
CALL 0x0010fcc0
LAB_001136a2:
JMP 0x001136a4
LAB_001136a4:
LEA RDI,[RBP + -0x80]
CALL 0x0011b1e0
JMP 0x001136d2
default:
MOV RDI,qword ptr [RBP + -0x90]
CALL 0x0011b240
LAB_001136d2:
MOV RAX,qword ptr [RBP + -0x88]
ADD RSP,0xb0
POP RBP
RET
|
/* qdevtools::QObjectTreeModel::data(QModelIndex const&, int) const */
QModelIndex * qdevtools::QObjectTreeModel::data(QModelIndex *param_1,int param_2)
{
int4 uVar1;
ulong uVar2;
char *pcVar3;
int8 uVar4;
int in_ECX;
QModelIndex *in_RDX;
int4 in_register_00000034;
QString local_88 [24];
QString local_70 [40];
QString local_48 [24];
int8 *local_30;
int local_24;
QModelIndex *local_20;
int8 local_18;
QModelIndex *local_10;
local_18 = CONCAT44(in_register_00000034,param_2);
local_24 = in_ECX;
local_20 = in_RDX;
local_10 = param_1;
uVar2 = QModelIndex::isValid(in_RDX);
if (((uVar2 & 1) == 0) || (local_24 != 0)) {
QVariant::QVariant((QVariant_conflict *)param_1);
}
else {
local_30 = (int8 *)QModelIndex::internalPointer(local_20);
uVar1 = QModelIndex::column(local_20);
switch(uVar1) {
case 0:
(**(code **)*local_30)();
pcVar3 = (char *)QMetaObject::className();
QVariant::QVariant((QVariant_conflict *)param_1,pcVar3);
break;
case 1:
QObject::objectName();
/* try { // try from 001135e7 to 001135eb has its CatchHandler @ 001135fc */
QVariant::QVariant((QVariant_conflict *)param_1,local_48);
QString::~QString(local_48);
break;
case 2:
QString::asprintf((char *)local_70,&DAT_0013b874,local_30);
/* try { // try from 00113641 to 00113645 has its CatchHandler @ 00113653 */
QVariant::QVariant((QVariant_conflict *)param_1,local_70);
QString::~QString(local_70);
break;
case 3:
uVar4 = QObject::thread();
QString::asprintf((char *)local_88,&DAT_0013b874,uVar4);
/* try { // try from 0011369d to 001136a1 has its CatchHandler @ 001136af */
QVariant::QVariant((QVariant_conflict *)param_1,local_88);
QString::~QString(local_88);
break;
default:
QVariant::QVariant((QVariant_conflict *)param_1);
}
}
return param_1;
}
|
|
14,614
|
qdevtools::QObjectTreeModel::data(QModelIndex const&, int) const
|
HuaiminNotSleepYet[P]QDevTools/qdevtools.cpp
|
QVariant QObjectTreeModel::data(const QModelIndex& index, int role) const
{
if (!index.isValid() || role != Qt::DisplayRole)
return {};
QObject* obj = static_cast<QObject*>(index.internalPointer());
switch (index.column()) {
case 0: return obj->metaObject()->className();
case 1: return obj->objectName();
case 2: return QString::asprintf("%p", obj);
case 3: return QString::asprintf("%p", obj->thread());
}
return {};
}
|
O2
|
cpp
|
qdevtools::QObjectTreeModel::data(QModelIndex const&, int) const:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movl %ecx, %ebp
movq %rdx, %r14
movq %rdi, %rbx
movq %rdx, %rdi
callq 0x14546
testl %ebp, %ebp
sete %cl
testb %al, %cl
je 0x11265
movl 0x4(%r14), %eax
cmpq $0x3, %rax
ja 0x11265
movq 0x8(%r14), %rdx
leaq 0xf330(%rip), %rcx # 0x2056c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq (%rdx), %rax
movq %rdx, %rdi
callq *(%rax)
movq %rax, %rdi
callq 0xf530
movq %rbx, %rdi
movq %rax, %rsi
callq 0x145dc
jmp 0x112f0
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
andq $0x0, 0x10(%rbx)
movq $0x2, 0x18(%rbx)
jmp 0x112f0
leaq 0xf603(%rip), %rsi # 0x20884
leaq 0x8(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0xf0c0
movq %rbx, %rdi
movq %r14, %rsi
callq 0xfce0
jmp 0x112e6
movq %rdx, %rdi
callq 0xf3a0
leaq 0xf5d8(%rip), %rsi # 0x20884
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xf0c0
movq %rbx, %rdi
movq %r14, %rsi
callq 0xfce0
jmp 0x112e6
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rdx, %rsi
callq 0xf940
movq %rbx, %rdi
movq %r14, %rsi
callq 0xfce0
leaq 0x8(%rsp), %rdi
callq 0x14530
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x11300
jmp 0x11300
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x14530
movq %rbx, %rdi
callq 0xf410
|
_ZNK9qdevtools16QObjectTreeModel4dataERK11QModelIndexi:
push rbp
push r14
push rbx
sub rsp, 20h
mov ebp, ecx
mov r14, rdx
mov rbx, rdi
mov rdi, rdx; this
call _ZNK11QModelIndex7isValidEv; QModelIndex::isValid(void)
test ebp, ebp
setz cl
test cl, al
jz short def_11243; jumptable 0000000000011243 default case
mov eax, [r14+4]
cmp rax, 3; switch 4 cases
ja short def_11243; jumptable 0000000000011243 default case
mov rdx, [r14+8]
lea rcx, jpt_11243
movsxd rax, ds:(jpt_11243 - 2056Ch)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_11245:
mov rax, [rdx]; jumptable 0000000000011243 case 0
mov rdi, rdx
call qword ptr [rax]
mov rdi, rax; this
call __ZNK11QMetaObject9classNameEv; QMetaObject::className(void)
mov rdi, rbx; this
mov rsi, rax; char *
call _ZN8QVariantC2EPKc; QVariant::QVariant(char const*)
jmp loc_112F0
def_11243:
xorps xmm0, xmm0; jumptable 0000000000011243 default case
movups xmmword ptr [rbx], xmm0
and qword ptr [rbx+10h], 0
mov qword ptr [rbx+18h], 2
jmp short loc_112F0
loc_1127A:
lea rsi, aP; jumptable 0000000000011243 case 2
lea r14, [rsp+38h+var_30]
mov rdi, r14; this
xor eax, eax
call __ZN7QString8asprintfEPKcz; QString::asprintf(char const*,...)
mov rdi, rbx; this
mov rsi, r14; QString *
call __ZN8QVariantC1ERK7QString; QVariant::QVariant(QString const&)
jmp short loc_112E6
loc_1129D:
mov rdi, rdx; jumptable 0000000000011243 case 3
call __ZNK7QObject6threadEv; QObject::thread(void)
lea rsi, aP; "%p"
lea r14, [rsp+38h+var_30]
mov rdi, r14; this
mov rdx, rax
xor eax, eax
call __ZN7QString8asprintfEPKcz; QString::asprintf(char const*,...)
mov rdi, rbx; this
mov rsi, r14; QString *
call __ZN8QVariantC1ERK7QString; QVariant::QVariant(QString const&)
jmp short loc_112E6
loc_112CB:
lea r14, [rsp+38h+var_30]; jumptable 0000000000011243 case 1
mov rdi, r14; this
mov rsi, rdx
call __ZNK7QObject10objectNameEv; QObject::objectName(void)
mov rdi, rbx; this
mov rsi, r14; QString *
call __ZN8QVariantC1ERK7QString; QVariant::QVariant(QString const&)
loc_112E6:
lea rdi, [rsp+38h+var_30]
call _ZN17QArrayDataPointerIDsED2Ev; QArrayDataPointer<char16_t>::~QArrayDataPointer()
loc_112F0:
mov rax, rbx
add rsp, 20h
pop rbx
pop r14
pop rbp
retn
jmp short loc_11300
jmp short $+2
loc_11300:
mov rbx, rax
lea rdi, [rsp+arg_0]
call _ZN17QArrayDataPointerIDsED2Ev; QArrayDataPointer<char16_t>::~QArrayDataPointer()
mov rdi, rbx
call __Unwind_Resume
|
qdevtools::QObjectTreeModel * qdevtools::QObjectTreeModel::data(
qdevtools::QObjectTreeModel *this,
const QModelIndex *a2,
long long a3,
int a4)
{
long long ( ***v5)(_QWORD, const QModelIndex *); // rdx
QMetaObject *v6; // rax
const char *v7; // rax
long long v8; // rdx
long long v9; // rcx
long long v10; // r8
long long v11; // r9
const void *v12; // rax
_BYTE v14[48]; // [rsp+8h] [rbp-30h] BYREF
if ( ((unsigned __int8)QModelIndex::isValid((QModelIndex *)a3) & (a4 == 0)) != 0 )
{
v5 = *(long long ( ****)(_QWORD, const QModelIndex *))(a3 + 8);
switch ( *(_DWORD *)(a3 + 4) )
{
case 0:
v6 = (QMetaObject *)(**v5)(*(_QWORD *)(a3 + 8), a2);
v7 = (const char *)QMetaObject::className(v6);
QVariant::QVariant(this, v7);
return this;
case 1:
QObject::objectName((QObject *)v14);
QVariant::QVariant(this, (const QString *)v14);
goto LABEL_8;
case 2:
QString::asprintf((QString *)v14, "%p", v5);
QVariant::QVariant(this, (const QString *)v14);
goto LABEL_8;
case 3:
v12 = (const void *)QObject::thread(*(QObject **)(a3 + 8));
QString::asprintf((QString *)v14, "%p", v12);
QVariant::QVariant(this, (const QString *)v14);
LABEL_8:
QArrayDataPointer<char16_t>::~QArrayDataPointer(v14, v14, v8, v9, v10, v11);
break;
default:
goto LABEL_4;
}
}
else
{
LABEL_4:
*(_OWORD *)this = 0LL;
*((_QWORD *)this + 2) = 0LL;
*((_QWORD *)this + 3) = 2LL;
}
return this;
}
|
data:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x20
MOV EBP,ECX
MOV R14,RDX
MOV RBX,RDI
MOV RDI,RDX
CALL 0x00114546
TEST EBP,EBP
SETZ CL
TEST CL,AL
JZ 0x00111265
MOV EAX,dword ptr [R14 + 0x4]
CMP RAX,0x3
JA 0x00111265
MOV RDX,qword ptr [R14 + 0x8]
LEA RCX,[0x12056c]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_0:
MOV RAX,qword ptr [RDX]
MOV RDI,RDX
CALL qword ptr [RAX]
MOV RDI,RAX
CALL 0x0010f530
MOV RDI,RBX
MOV RSI,RAX
CALL 0x001145dc
JMP 0x001112f0
LAB_00111265:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
AND qword ptr [RBX + 0x10],0x0
MOV qword ptr [RBX + 0x18],0x2
JMP 0x001112f0
caseD_2:
LEA RSI,[0x120884]
LEA R14,[RSP + 0x8]
MOV RDI,R14
XOR EAX,EAX
CALL 0x0010f0c0
LAB_00111290:
MOV RDI,RBX
MOV RSI,R14
CALL 0x0010fce0
LAB_0011129b:
JMP 0x001112e6
caseD_3:
MOV RDI,RDX
CALL 0x0010f3a0
LEA RSI,[0x120884]
LEA R14,[RSP + 0x8]
MOV RDI,R14
MOV RDX,RAX
XOR EAX,EAX
CALL 0x0010f0c0
LAB_001112be:
MOV RDI,RBX
MOV RSI,R14
CALL 0x0010fce0
LAB_001112c9:
JMP 0x001112e6
caseD_1:
LEA R14,[RSP + 0x8]
MOV RDI,R14
MOV RSI,RDX
CALL 0x0010f940
LAB_001112db:
MOV RDI,RBX
MOV RSI,R14
CALL 0x0010fce0
LAB_001112e6:
LEA RDI,[RSP + 0x8]
CALL 0x00114530
LAB_001112f0:
MOV RAX,RBX
ADD RSP,0x20
POP RBX
POP R14
POP RBP
RET
|
/* qdevtools::QObjectTreeModel::data(QModelIndex const&, int) const */
QModelIndex * qdevtools::QObjectTreeModel::data(QModelIndex *param_1,int param_2)
{
byte bVar1;
char *pcVar2;
int8 uVar3;
int in_ECX;
QModelIndex *in_RDX;
QString local_30 [24];
bVar1 = QModelIndex::isValid(in_RDX);
if (((in_ECX == 0 & bVar1) == 0) || (3 < *(uint *)(in_RDX + 4))) {
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
*(int8 *)(param_1 + 0x10) = 0;
*(int8 *)(param_1 + 0x18) = 2;
}
else {
switch(*(uint *)(in_RDX + 4)) {
case 0:
(**(code **)**(int8 **)(in_RDX + 8))(*(int8 **)(in_RDX + 8));
pcVar2 = (char *)QMetaObject::className();
QVariant::QVariant((QVariant_conflict *)param_1,pcVar2);
return param_1;
case 1:
QObject::objectName();
/* try { // try from 001112db to 001112e5 has its CatchHandler @ 001112fc */
QVariant::QVariant((QVariant_conflict *)param_1,local_30);
break;
case 2:
QString::asprintf((char *)local_30,&DAT_00120884);
/* try { // try from 00111290 to 0011129a has its CatchHandler @ 00111300 */
QVariant::QVariant((QVariant_conflict *)param_1,local_30);
break;
case 3:
uVar3 = QObject::thread();
QString::asprintf((char *)local_30,&DAT_00120884,uVar3);
/* try { // try from 001112be to 001112c8 has its CatchHandler @ 001112fe */
QVariant::QVariant((QVariant_conflict *)param_1,local_30);
}
QArrayDataPointer<char16_t>::~QArrayDataPointer((QArrayDataPointer<char16_t> *)local_30);
}
return param_1;
}
|
|
14,615
|
qdevtools::QObjectTreeModel::data(QModelIndex const&, int) const
|
HuaiminNotSleepYet[P]QDevTools/qdevtools.cpp
|
QVariant QObjectTreeModel::data(const QModelIndex& index, int role) const
{
if (!index.isValid() || role != Qt::DisplayRole)
return {};
QObject* obj = static_cast<QObject*>(index.internalPointer());
switch (index.column()) {
case 0: return obj->metaObject()->className();
case 1: return obj->objectName();
case 2: return QString::asprintf("%p", obj);
case 3: return QString::asprintf("%p", obj->thread());
}
return {};
}
|
O3
|
cpp
|
qdevtools::QObjectTreeModel::data(QModelIndex const&, int) const:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl 0x4(%rdx), %eax
movl (%rdx), %esi
orl %eax, %esi
js 0x11aec
testl %ecx, %ecx
jne 0x11aec
cmpq $0x0, 0x10(%rdx)
je 0x11aec
cmpl $0x3, %eax
ja 0x11aec
movq 0x8(%rdx), %rdx
movl %eax, %eax
leaq 0x10aa6(%rip), %rcx # 0x2256c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq (%rdx), %rax
movq %rdx, %rdi
callq *(%rax)
movq %rax, %rdi
callq 0xf530
movq %rbx, %rdi
movq %rax, %rsi
callq 0x15d7e
jmp 0x11b02
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
movq $0x2, 0x18(%rbx)
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
leaq 0x10d70(%rip), %rsi # 0x22884
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0xf0c0
movq %rbx, %rdi
movq %r14, %rsi
callq 0xfcb0
jmp 0x11b73
movq %rdx, %rdi
callq 0xf3a0
leaq 0x10d47(%rip), %rsi # 0x22884
movq %rsp, %r14
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xf0c0
movq %rbx, %rdi
movq %r14, %rsi
callq 0xfcb0
jmp 0x11b73
movq %rsp, %r14
movq %r14, %rdi
movq %rdx, %rsi
callq 0xf930
movq %rbx, %rdi
movq %r14, %rsi
callq 0xfcb0
movq (%rsp), %rax
testq %rax, %rax
je 0x11b02
lock
decl (%rax)
jne 0x11b02
movq (%rsp), %rdi
movl $0x2, %esi
movl $0x8, %edx
callq 0xf610
jmp 0x11b02
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x11bd9
movq %rsp, %rsi
callq 0x10193
jmp 0x11bd9
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x11bd9
movq %rsp, %rsi
callq 0x10161
jmp 0x11bd9
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x11bd9
movq %rsp, %rsi
callq 0x1017a
movq %rbx, %rdi
callq 0xf410
|
_ZNK9qdevtools16QObjectTreeModel4dataERK11QModelIndexi:
push r14
push rbx
sub rsp, 18h
mov rbx, rdi
mov eax, [rdx+4]
mov esi, [rdx]
or esi, eax
js short def_11ACD; jumptable 0000000000011ACD default case
test ecx, ecx
jnz short def_11ACD; jumptable 0000000000011ACD default case
cmp qword ptr [rdx+10h], 0
jz short def_11ACD; jumptable 0000000000011ACD default case
cmp eax, 3; switch 4 cases
ja short def_11ACD; jumptable 0000000000011ACD default case
mov rdx, [rdx+8]
mov eax, eax
lea rcx, jpt_11ACD
movsxd rax, ds:(jpt_11ACD - 2256Ch)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_11ACF:
mov rax, [rdx]; jumptable 0000000000011ACD case 0
mov rdi, rdx
call qword ptr [rax]
mov rdi, rax; this
call __ZNK11QMetaObject9classNameEv; QMetaObject::className(void)
mov rdi, rbx; this
mov rsi, rax; char *
call _ZN8QVariantC2EPKc; QVariant::QVariant(char const*)
jmp short loc_11B02
def_11ACD:
xorps xmm0, xmm0; jumptable 0000000000011ACD default case
movups xmmword ptr [rbx], xmm0
mov qword ptr [rbx+10h], 0
mov qword ptr [rbx+18h], 2
loc_11B02:
mov rax, rbx
add rsp, 18h
pop rbx
pop r14
retn
loc_11B0D:
lea rsi, aP; jumptable 0000000000011ACD case 2
mov r14, rsp
mov rdi, r14; this
xor eax, eax
call __ZN7QString8asprintfEPKcz; QString::asprintf(char const*,...)
mov rdi, rbx; this
mov rsi, r14; QString *
call __ZN8QVariantC1ERK7QString; QVariant::QVariant(QString const&)
jmp short loc_11B73
loc_11B2E:
mov rdi, rdx; jumptable 0000000000011ACD case 3
call __ZNK7QObject6threadEv; QObject::thread(void)
lea rsi, aP; "%p"
mov r14, rsp
mov rdi, r14; this
mov rdx, rax
xor eax, eax
call __ZN7QString8asprintfEPKcz; QString::asprintf(char const*,...)
mov rdi, rbx; this
mov rsi, r14; QString *
call __ZN8QVariantC1ERK7QString; QVariant::QVariant(QString const&)
jmp short loc_11B73
loc_11B5A:
mov r14, rsp; jumptable 0000000000011ACD case 1
mov rdi, r14; this
mov rsi, rdx
call __ZNK7QObject10objectNameEv; QObject::objectName(void)
mov rdi, rbx; this
mov rsi, r14; QString *
call __ZN8QVariantC1ERK7QString; QVariant::QVariant(QString const&)
loc_11B73:
mov rax, [rsp+28h+var_28]
test rax, rax
jz short loc_11B02
lock dec dword ptr [rax]
jnz short loc_11B02
mov rdi, [rsp+28h+var_28]
mov esi, 2
mov edx, 8
call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long)
jmp loc_11B02
mov rbx, rax
mov rdi, [rsp+0]
test rdi, rdi
jz short loc_11BD9
mov rsi, rsp
call _ZNK9qdevtools16QObjectTreeModel4dataERK11QModelIndexi_cold_3; qdevtools::QObjectTreeModel::data(QModelIndex const&,int) [clone]
jmp short loc_11BD9
mov rbx, rax
mov rdi, [rsp+0]
test rdi, rdi
jz short loc_11BD9
mov rsi, rsp
call _ZNK9qdevtools16QObjectTreeModel4dataERK11QModelIndexi_cold_1; qdevtools::QObjectTreeModel::data(QModelIndex const&,int) [clone]
jmp short loc_11BD9
mov rbx, rax
mov rdi, [rsp+0]
test rdi, rdi
jz short loc_11BD9
mov rsi, rsp
call _ZNK9qdevtools16QObjectTreeModel4dataERK11QModelIndexi_cold_2; qdevtools::QObjectTreeModel::data(QModelIndex const&,int) [clone]
loc_11BD9:
mov rdi, rbx
call __Unwind_Resume
|
QVariant * qdevtools::QObjectTreeModel::data(QVariant *this, long long a2, long long a3, int a4)
{
unsigned int v4; // eax
long long v5; // rsi
long long ( ***v6)(void *, long long); // rdx
QMetaObject *v7; // rax
const char *v8; // rax
const void *v10; // rax
volatile signed __int32 *v11[5]; // [rsp+0h] [rbp-28h] BYREF
v4 = *(_DWORD *)(a3 + 4);
v5 = v4 | *(_DWORD *)a3;
if ( ((v4 | *(_DWORD *)a3) & 0x80000000) != 0 || a4 || !*(_QWORD *)(a3 + 16) )
{
LABEL_6:
*(_OWORD *)this = 0LL;
*((_QWORD *)this + 2) = 0LL;
*((_QWORD *)this + 3) = 2LL;
}
else
{
v6 = *(long long ( ****)(void *, long long))(a3 + 8);
switch ( v4 )
{
case 0u:
v7 = (QMetaObject *)(**v6)(v6, v5);
v8 = (const char *)QMetaObject::className(v7);
QVariant::QVariant(this, v8);
return this;
case 1u:
QObject::objectName((QObject *)v11);
QVariant::QVariant(this, (const QString *)v11);
goto LABEL_11;
case 2u:
QString::asprintf((QString *)v11, "%p", v6);
QVariant::QVariant(this, (const QString *)v11);
goto LABEL_11;
case 3u:
v10 = (const void *)QObject::thread((QObject *)v6);
QString::asprintf((QString *)v11, "%p", v10);
QVariant::QVariant(this, (const QString *)v11);
LABEL_11:
if ( v11[0] && !_InterlockedDecrement(v11[0]) )
QArrayData::deallocate(v11[0], 2LL);
break;
default:
goto LABEL_6;
}
}
return this;
}
|
data:
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
MOV EAX,dword ptr [RDX + 0x4]
MOV ESI,dword ptr [RDX]
OR ESI,EAX
JS 0x00111aec
TEST ECX,ECX
JNZ 0x00111aec
CMP qword ptr [RDX + 0x10],0x0
JZ 0x00111aec
CMP EAX,0x3
JA 0x00111aec
MOV RDX,qword ptr [RDX + 0x8]
MOV EAX,EAX
LEA RCX,[0x12256c]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_0:
MOV RAX,qword ptr [RDX]
MOV RDI,RDX
CALL qword ptr [RAX]
MOV RDI,RAX
CALL 0x0010f530
MOV RDI,RBX
MOV RSI,RAX
CALL 0x00115d7e
JMP 0x00111b02
LAB_00111aec:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
MOV qword ptr [RBX + 0x10],0x0
MOV qword ptr [RBX + 0x18],0x2
LAB_00111b02:
MOV RAX,RBX
ADD RSP,0x18
POP RBX
POP R14
RET
caseD_2:
LEA RSI,[0x122884]
MOV R14,RSP
MOV RDI,R14
XOR EAX,EAX
CALL 0x0010f0c0
LAB_00111b21:
MOV RDI,RBX
MOV RSI,R14
CALL 0x0010fcb0
LAB_00111b2c:
JMP 0x00111b73
caseD_3:
MOV RDI,RDX
CALL 0x0010f3a0
LEA RSI,[0x122884]
MOV R14,RSP
MOV RDI,R14
MOV RDX,RAX
XOR EAX,EAX
CALL 0x0010f0c0
LAB_00111b4d:
MOV RDI,RBX
MOV RSI,R14
CALL 0x0010fcb0
LAB_00111b58:
JMP 0x00111b73
caseD_1:
MOV R14,RSP
MOV RDI,R14
MOV RSI,RDX
CALL 0x0010f930
LAB_00111b68:
MOV RDI,RBX
MOV RSI,R14
CALL 0x0010fcb0
LAB_00111b73:
MOV RAX,qword ptr [RSP]
TEST RAX,RAX
JZ 0x00111b02
DEC.LOCK dword ptr [RAX]
JNZ 0x00111b02
MOV RDI,qword ptr [RSP]
MOV ESI,0x2
MOV EDX,0x8
CALL 0x0010f610
JMP 0x00111b02
|
/* qdevtools::QObjectTreeModel::data(QModelIndex const&, int) const */
QModelIndex * qdevtools::QObjectTreeModel::data(QModelIndex *param_1,int param_2)
{
uint uVar1;
char *pcVar2;
int8 uVar3;
int in_ECX;
uint *in_RDX;
QArrayData *local_28 [3];
uVar1 = in_RDX[1];
if (((((int)(*in_RDX | uVar1) < 0) || (in_ECX != 0)) || (*(long *)(in_RDX + 4) == 0)) ||
(3 < uVar1)) {
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
*(int8 *)(param_1 + 0x10) = 0;
*(int8 *)(param_1 + 0x18) = 2;
}
else {
switch(uVar1) {
case 0:
(**(code **)**(int8 **)(in_RDX + 2))(*(int8 **)(in_RDX + 2));
pcVar2 = (char *)QMetaObject::className();
QVariant::QVariant((QVariant *)param_1,pcVar2);
return param_1;
case 1:
QObject::objectName();
/* try { // try from 00111b68 to 00111b72 has its CatchHandler @ 00111b99 */
QVariant::QVariant((QVariant *)param_1,(QString *)local_28);
break;
case 2:
QString::asprintf((char *)local_28,&DAT_00122884);
/* try { // try from 00111b21 to 00111b2b has its CatchHandler @ 00111bc5 */
QVariant::QVariant((QVariant *)param_1,(QString *)local_28);
break;
case 3:
uVar3 = QObject::thread();
QString::asprintf((char *)local_28,&DAT_00122884,uVar3);
/* try { // try from 00111b4d to 00111b57 has its CatchHandler @ 00111baf */
QVariant::QVariant((QVariant *)param_1,(QString *)local_28);
}
if (local_28[0] != (QArrayData *)0x0) {
LOCK();
*(int *)local_28[0] = *(int *)local_28[0] + -1;
UNLOCK();
if (*(int *)local_28[0] == 0) {
QArrayData::deallocate(local_28[0],2,8);
}
}
}
return param_1;
}
|
|
14,616
|
PFS_connection_slice::reset_stages_stats()
|
eloqsql/storage/perfschema/pfs_con_slice.cc
|
void PFS_connection_slice::reset_stages_stats()
{
PFS_stage_stat *stat= m_instr_class_stages_stats;
PFS_stage_stat *stat_last= stat + stage_class_max;
for ( ; stat < stat_last; stat++)
stat->reset();
}
|
O3
|
cpp
|
PFS_connection_slice::reset_stages_stats():
pushq %rbp
movq %rsp, %rbp
leaq 0x38cedb(%rip), %rax # 0x3cd0d0
movq (%rax), %rax
testq %rax, %rax
jle 0x40227
movq 0x10(%rdi), %rcx
shlq $0x5, %rax
addq %rcx, %rax
xorps %xmm0, %xmm0
movups %xmm0, (%rcx)
movq $-0x1, 0x10(%rcx)
movq $0x0, 0x18(%rcx)
addq $0x20, %rcx
cmpq %rax, %rcx
jb 0x4020b
popq %rbp
retq
nop
|
_ZN20PFS_connection_slice18reset_stages_statsEv:
push rbp
mov rbp, rsp
lea rax, stage_class_max
mov rax, [rax]
test rax, rax
jle short loc_40227
mov rcx, [rdi+10h]
shl rax, 5
add rax, rcx
xorps xmm0, xmm0
loc_4020B:
movups xmmword ptr [rcx], xmm0
mov qword ptr [rcx+10h], 0FFFFFFFFFFFFFFFFh
mov qword ptr [rcx+18h], 0
add rcx, 20h ; ' '
cmp rcx, rax
jb short loc_4020B
loc_40227:
pop rbp
retn
|
unsigned long long PFS_connection_slice::reset_stages_stats(PFS_connection_slice *this)
{
unsigned long long result; // rax
unsigned long long v2; // rcx
result = stage_class_max;
if ( stage_class_max > 0 )
{
v2 = *((_QWORD *)this + 2);
result = v2 + 32 * stage_class_max;
do
{
*(_OWORD *)v2 = 0LL;
*(_QWORD *)(v2 + 16) = -1LL;
*(_QWORD *)(v2 + 24) = 0LL;
v2 += 32LL;
}
while ( v2 < result );
}
return result;
}
|
reset_stages_stats:
PUSH RBP
MOV RBP,RSP
LEA RAX,[0x4cd0d0]
MOV RAX,qword ptr [RAX]
TEST RAX,RAX
JLE 0x00140227
MOV RCX,qword ptr [RDI + 0x10]
SHL RAX,0x5
ADD RAX,RCX
XORPS XMM0,XMM0
LAB_0014020b:
MOVUPS xmmword ptr [RCX],XMM0
MOV qword ptr [RCX + 0x10],-0x1
MOV qword ptr [RCX + 0x18],0x0
ADD RCX,0x20
CMP RCX,RAX
JC 0x0014020b
LAB_00140227:
POP RBP
RET
|
/* PFS_connection_slice::reset_stages_stats() */
void __thiscall PFS_connection_slice::reset_stages_stats(PFS_connection_slice *this)
{
int8 *puVar1;
int8 *puVar2;
if (0 < stage_class_max) {
puVar2 = *(int8 **)(this + 0x10);
puVar1 = puVar2 + stage_class_max * 4;
do {
*puVar2 = 0;
puVar2[1] = 0;
puVar2[2] = 0xffffffffffffffff;
puVar2[3] = 0;
puVar2 = puVar2 + 4;
} while (puVar2 < puVar1);
}
return;
}
|
|
14,617
|
common_set_adapter_lora(llama_context*, std::vector<common_adapter_lora_info, std::allocator<common_adapter_lora_info>>&)
|
monkey531[P]llama/common/common.cpp
|
void common_set_adapter_lora(struct llama_context * ctx, std::vector<common_adapter_lora_info> & lora) {
llama_clear_adapter_lora(ctx);
for (auto & la : lora) {
if (la.scale != 0.0f) {
llama_set_adapter_lora(ctx, la.ptr, la.scale);
}
}
}
|
O1
|
cpp
|
common_set_adapter_lora(llama_context*, std::vector<common_adapter_lora_info, std::allocator<common_adapter_lora_info>>&):
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
callq 0x1b980
movq (%r14), %r15
movq 0x8(%r14), %r14
cmpq %r14, %r15
je 0x7560e
movss 0x20(%r15), %xmm0
ucomiss 0x7d180(%rip), %xmm0 # 0xf2778
jne 0x755fc
jnp 0x75608
movq 0x28(%r15), %rsi
movq %rbx, %rdi
callq 0x1b960
addq $0x30, %r15
jmp 0x755e6
popq %rbx
popq %r14
popq %r15
retq
|
_Z23common_set_adapter_loraP13llama_contextRSt6vectorI24common_adapter_lora_infoSaIS2_EE:
push r15
push r14
push rbx
mov r14, rsi
mov rbx, rdi
call _llama_clear_adapter_lora
mov r15, [r14]
mov r14, [r14+8]
loc_755E6:
cmp r15, r14
jz short loc_7560E
movss xmm0, dword ptr [r15+20h]
ucomiss xmm0, cs:dword_F2778
jnz short loc_755FC
jnp short loc_75608
loc_755FC:
mov rsi, [r15+28h]
mov rdi, rbx
call _llama_set_adapter_lora
loc_75608:
add r15, 30h ; '0'
jmp short loc_755E6
loc_7560E:
pop rbx
pop r14
pop r15
retn
|
long long common_set_adapter_lora(long long a1, long long *a2)
{
long long result; // rax
long long v3; // r15
long long v4; // r14
result = llama_clear_adapter_lora();
v3 = *a2;
v4 = a2[1];
while ( v3 != v4 )
{
if ( *(float *)(v3 + 32) != 0.0 )
result = llama_set_adapter_lora(a1, *(_QWORD *)(v3 + 40));
v3 += 48LL;
}
return result;
}
|
common_set_adapter_lora:
PUSH R15
PUSH R14
PUSH RBX
MOV R14,RSI
MOV RBX,RDI
CALL 0x0011b980
MOV R15,qword ptr [R14]
MOV R14,qword ptr [R14 + 0x8]
LAB_001755e6:
CMP R15,R14
JZ 0x0017560e
MOVSS XMM0,dword ptr [R15 + 0x20]
UCOMISS XMM0,dword ptr [0x001f2778]
JNZ 0x001755fc
JNP 0x00175608
LAB_001755fc:
MOV RSI,qword ptr [R15 + 0x28]
MOV RDI,RBX
CALL 0x0011b960
LAB_00175608:
ADD R15,0x30
JMP 0x001755e6
LAB_0017560e:
POP RBX
POP R14
POP R15
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* common_set_adapter_lora(llama_context*, std::vector<common_adapter_lora_info,
std::allocator<common_adapter_lora_info> >&) */
void common_set_adapter_lora(llama_context *param_1,vector *param_2)
{
long lVar1;
long lVar2;
llama_clear_adapter_lora();
lVar1 = *(long *)(param_2 + 8);
for (lVar2 = *(long *)param_2; lVar2 != lVar1; lVar2 = lVar2 + 0x30) {
if ((*(float *)(lVar2 + 0x20) != _DAT_001f2778) ||
(NAN(*(float *)(lVar2 + 0x20)) || NAN(_DAT_001f2778))) {
llama_set_adapter_lora(param_1,*(int8 *)(lVar2 + 0x28));
}
}
return;
}
|
|
14,618
|
ggml_log_internal
|
ngxson[P]ggml-easy/ggml/src/ggml.c
|
void ggml_log_internal(enum ggml_log_level level, const char * format, ...) {
va_list args;
va_start(args, format);
ggml_log_internal_v(level, format, args);
va_end(args);
}
|
O2
|
c
|
ggml_log_internal:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x170, %rsp # imm = 0x170
movq %rsi, %r14
leaq 0xc0(%rsp), %rsi
movq %rdx, 0x10(%rsi)
movq %rcx, 0x18(%rsi)
movq %r8, 0x20(%rsi)
movq %r9, 0x28(%rsi)
testb %al, %al
je 0x1f3ec
movaps %xmm0, 0xf0(%rsp)
movaps %xmm1, 0x100(%rsp)
movaps %xmm2, 0x110(%rsp)
movaps %xmm3, 0x120(%rsp)
movaps %xmm4, 0x130(%rsp)
movaps %xmm5, 0x140(%rsp)
movaps %xmm6, 0x150(%rsp)
movaps %xmm7, 0x160(%rsp)
movq %rsi, 0x10(%rsp)
leaq 0x1a0(%rsp), %rax
movq %rax, 0x8(%rsp)
movabsq $0x3000000010, %rax # imm = 0x3000000010
movq %rax, (%rsp)
testq %r14, %r14
je 0x1f4a3
movl %edi, %ebx
movq %rsp, %rcx
movq 0x10(%rcx), %rax
movq %rax, 0x30(%rsp)
movaps (%rcx), %xmm0
movaps %xmm0, 0x20(%rsp)
leaq 0x40(%rsp), %rdi
movl $0x80, %esi
movq %r14, %rdx
callq 0x1cea0
cmpl $0x7f, %eax
jg 0x1f458
movq 0x8f477(%rip), %rdx # 0xae8c0
leaq 0x40(%rsp), %rsi
movl %ebx, %edi
callq *0x4f3a2(%rip) # 0x6e7f8
jmp 0x1f4a3
movl %eax, %r15d
leal 0x1(%r15), %r12d
pushq $0x1
popq %rsi
movq %r12, %rdi
callq 0x1cf30
movq %rax, %r13
leaq 0x20(%rsp), %rcx
movq %rax, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x1cea0
movl %r15d, %eax
movb $0x0, (%r13,%rax)
movq 0x8f430(%rip), %rdx # 0xae8c0
movl %ebx, %edi
movq %r13, %rsi
callq *0x4f35d(%rip) # 0x6e7f8
movq %r13, %rdi
callq 0x1db70
addq $0x170, %rsp # imm = 0x170
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
|
ggml_log_internal:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 170h
mov r14, rsi
lea rsi, [rsp+198h+var_D8]
mov [rsi+10h], rdx
mov [rsi+18h], rcx
mov [rsi+20h], r8
mov [rsi+28h], r9
test al, al
jz short loc_1F3EC
movaps [rsp+198h+var_A8], xmm0
movaps [rsp+198h+var_98], xmm1
movaps [rsp+198h+var_88], xmm2
movaps [rsp+198h+var_78], xmm3
movaps [rsp+198h+var_68], xmm4
movaps [rsp+198h+var_58], xmm5
movaps [rsp+198h+var_48], xmm6
movaps [rsp+198h+var_38], xmm7
loc_1F3EC:
mov [rsp+198h+var_188], rsi
lea rax, [rsp+198h+arg_0]
mov [rsp+198h+var_190], rax
mov rax, 3000000010h
mov [rsp+198h+var_198], rax
test r14, r14
jz loc_1F4A3
mov ebx, edi
mov rcx, rsp
mov rax, [rcx+10h]
mov [rsp+198h+var_168], rax
movaps xmm0, xmmword ptr [rcx]
movaps [rsp+198h+var_178], xmm0
lea rdi, [rsp+198h+var_158]
mov esi, 80h
mov rdx, r14
call _vsnprintf
cmp eax, 7Fh
jg short loc_1F458
mov rdx, cs:g_logger_state_1
lea rsi, [rsp+198h+var_158]
mov edi, ebx
call cs:g_logger_state_0
jmp short loc_1F4A3
loc_1F458:
mov r15d, eax
lea r12d, [r15+1]
push 1
pop rsi
mov rdi, r12
call _calloc
mov r13, rax
lea rcx, [rsp+198h+var_178]
mov rdi, rax
mov rsi, r12
mov rdx, r14
call _vsnprintf
mov eax, r15d
mov byte ptr [r13+rax+0], 0
mov rdx, cs:g_logger_state_1
mov edi, ebx
mov rsi, r13
call cs:g_logger_state_0
mov rdi, r13
call _free
loc_1F4A3:
add rsp, 170h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
|
long long ggml_log_internal(
__m128 a1,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
long long a9,
long long a10,
long long a11,
long long a12,
long long a13,
long long a14)
{
long long result; // rax
int v15; // eax
unsigned int v16; // r15d
long long v17; // r12
long long v18; // r13
_BYTE v19[128]; // [rsp+40h] [rbp-158h] BYREF
long long v20; // [rsp+D0h] [rbp-C8h]
long long v21; // [rsp+D8h] [rbp-C0h]
long long v22; // [rsp+E0h] [rbp-B8h]
long long v23; // [rsp+E8h] [rbp-B0h]
__m128 v24; // [rsp+F0h] [rbp-A8h]
__m128 v25; // [rsp+100h] [rbp-98h]
__m128 v26; // [rsp+110h] [rbp-88h]
__m128 v27; // [rsp+120h] [rbp-78h]
__m128 v28; // [rsp+130h] [rbp-68h]
__m128 v29; // [rsp+140h] [rbp-58h]
__m128 v30; // [rsp+150h] [rbp-48h]
__m128 v31; // [rsp+160h] [rbp-38h]
v24 = a1;
v25 = a2;
v26 = a3;
v27 = a4;
v28 = a5;
v29 = a6;
v30 = a7;
v31 = a8;
v20 = a11;
v21 = a12;
v22 = a13;
v23 = a14;
result = 0x3000000010LL;
if ( a10 )
{
v15 = vsnprintf(v19, 128LL, a10);
if ( v15 > 127 )
{
v16 = v15;
v17 = (unsigned int)(v15 + 1);
v18 = calloc(v17, 1LL);
vsnprintf(v18, v17, a10);
*(_BYTE *)(v18 + v16) = 0;
g_logger_state_0();
return free(v18, v18);
}
else
{
return g_logger_state_0();
}
}
return result;
}
|
ggml_log_internal:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x170
MOV R14,RSI
LEA RSI,[RSP + 0xc0]
MOV qword ptr [RSI + 0x10],RDX
MOV qword ptr [RSI + 0x18],RCX
MOV qword ptr [RSI + 0x20],R8
MOV qword ptr [RSI + 0x28],R9
TEST AL,AL
JZ 0x0011f3ec
MOVAPS xmmword ptr [RSP + 0xf0],XMM0
MOVAPS xmmword ptr [RSP + 0x100],XMM1
MOVAPS xmmword ptr [RSP + 0x110],XMM2
MOVAPS xmmword ptr [RSP + 0x120],XMM3
MOVAPS xmmword ptr [RSP + 0x130],XMM4
MOVAPS xmmword ptr [RSP + 0x140],XMM5
MOVAPS xmmword ptr [RSP + 0x150],XMM6
MOVAPS xmmword ptr [RSP + 0x160],XMM7
LAB_0011f3ec:
MOV qword ptr [RSP + 0x10],RSI
LEA RAX,[RSP + 0x1a0]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,0x3000000010
MOV qword ptr [RSP],RAX
TEST R14,R14
JZ 0x0011f4a3
MOV EBX,EDI
MOV RCX,RSP
MOV RAX,qword ptr [RCX + 0x10]
MOV qword ptr [RSP + 0x30],RAX
MOVAPS XMM0,xmmword ptr [RCX]
MOVAPS xmmword ptr [RSP + 0x20],XMM0
LEA RDI,[RSP + 0x40]
MOV ESI,0x80
MOV RDX,R14
CALL 0x0011cea0
CMP EAX,0x7f
JG 0x0011f458
MOV RDX,qword ptr [0x001ae8c0]
LEA RSI,[RSP + 0x40]
MOV EDI,EBX
CALL qword ptr [0x0016e7f8]
JMP 0x0011f4a3
LAB_0011f458:
MOV R15D,EAX
LEA R12D,[R15 + 0x1]
PUSH 0x1
POP RSI
MOV RDI,R12
CALL 0x0011cf30
MOV R13,RAX
LEA RCX,[RSP + 0x20]
MOV RDI,RAX
MOV RSI,R12
MOV RDX,R14
CALL 0x0011cea0
MOV EAX,R15D
MOV byte ptr [R13 + RAX*0x1],0x0
MOV RDX,qword ptr [0x001ae8c0]
MOV EDI,EBX
MOV RSI,R13
CALL qword ptr [0x0016e7f8]
MOV RDI,R13
CALL 0x0011db70
LAB_0011f4a3:
ADD RSP,0x170
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
void ggml_log_internal(int4 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,char *param_10,int8 param_11,int8 param_12,
int8 param_13,int8 param_14)
{
char in_AL;
uint uVar1;
char *__s;
int8 local_198;
int1 *puStack_190;
int1 *local_188;
int8 local_178;
int1 *puStack_170;
int1 *local_168;
char local_158 [128];
int1 local_d8 [16];
int8 local_c8;
int8 local_c0;
int8 local_b8;
int8 local_b0;
int4 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
int8 local_68;
int8 local_58;
int8 local_48;
int8 local_38;
local_188 = local_d8;
if (in_AL != '\0') {
local_a8 = param_1;
local_98 = param_2;
local_88 = param_3;
local_78 = param_4;
local_68 = param_5;
local_58 = param_6;
local_48 = param_7;
local_38 = param_8;
}
puStack_190 = &stack0x00000008;
local_198 = 0x3000000010;
if (param_10 != (char *)0x0) {
local_178 = 0x3000000010;
puStack_170 = puStack_190;
local_168 = local_188;
local_c8 = param_11;
local_c0 = param_12;
local_b8 = param_13;
local_b0 = param_14;
uVar1 = vsnprintf(local_158,0x80,param_10,&local_198);
if ((int)uVar1 < 0x80) {
(*(code *)g_logger_state_0)(param_9,local_158,g_logger_state_1);
}
else {
__s = (char *)calloc((ulong)(uVar1 + 1),1);
vsnprintf(__s,(ulong)(uVar1 + 1),param_10,&local_178);
__s[uVar1] = '\0';
(*(code *)g_logger_state_0)(param_9,__s,g_logger_state_1);
free(__s);
}
}
return;
}
|
|
14,619
|
ggml_log_internal
|
ngxson[P]ggml-easy/ggml/src/ggml.c
|
void ggml_log_internal(enum ggml_log_level level, const char * format, ...) {
va_list args;
va_start(args, format);
ggml_log_internal_v(level, format, args);
va_end(args);
}
|
O3
|
c
|
ggml_log_internal:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x170, %rsp # imm = 0x170
movq %rsi, %r14
leaq 0xc0(%rsp), %rsi
movq %rdx, 0x10(%rsi)
movq %rcx, 0x18(%rsi)
movq %r8, 0x20(%rsi)
movq %r9, 0x28(%rsi)
testb %al, %al
je 0x18ec0
movaps %xmm0, 0xf0(%rsp)
movaps %xmm1, 0x100(%rsp)
movaps %xmm2, 0x110(%rsp)
movaps %xmm3, 0x120(%rsp)
movaps %xmm4, 0x130(%rsp)
movaps %xmm5, 0x140(%rsp)
movaps %xmm6, 0x150(%rsp)
movaps %xmm7, 0x160(%rsp)
movq %rsi, 0x10(%rsp)
leaq 0x1a0(%rsp), %rax
movq %rax, 0x8(%rsp)
movabsq $0x3000000010, %rax # imm = 0x3000000010
movq %rax, (%rsp)
testq %r14, %r14
je 0x18f79
movl %edi, %ebx
movq %rsp, %rcx
movq 0x10(%rcx), %rax
movq %rax, 0x30(%rsp)
movaps (%rcx), %xmm0
movaps %xmm0, 0x20(%rsp)
leaq 0x40(%rsp), %rdi
movl $0x80, %esi
movq %r14, %rdx
callq 0x16a90
cmpl $0x7f, %eax
jg 0x18f2c
movq 0x922b3(%rip), %rdx # 0xab1d0
leaq 0x40(%rsp), %rsi
movl %ebx, %edi
callq *0x521de(%rip) # 0x6b108
jmp 0x18f79
movl %eax, %r15d
leal 0x1(%r15), %r12d
movl $0x1, %esi
movq %r12, %rdi
callq 0x16b20
movq %rax, %r13
leaq 0x20(%rsp), %rcx
movq %rax, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x16a90
movl %r15d, %eax
movb $0x0, (%r13,%rax)
movq 0x9226a(%rip), %rdx # 0xab1d0
movl %ebx, %edi
movq %r13, %rsi
callq *0x52197(%rip) # 0x6b108
movq %r13, %rdi
callq 0x173b0
addq $0x170, %rsp # imm = 0x170
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
|
ggml_log_internal:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 170h
mov r14, rsi
lea rsi, [rsp+198h+var_D8]
mov [rsi+10h], rdx
mov [rsi+18h], rcx
mov [rsi+20h], r8
mov [rsi+28h], r9
test al, al
jz short loc_18EC0
movaps [rsp+198h+var_A8], xmm0
movaps [rsp+198h+var_98], xmm1
movaps [rsp+198h+var_88], xmm2
movaps [rsp+198h+var_78], xmm3
movaps [rsp+198h+var_68], xmm4
movaps [rsp+198h+var_58], xmm5
movaps [rsp+198h+var_48], xmm6
movaps [rsp+198h+var_38], xmm7
loc_18EC0:
mov [rsp+198h+var_188], rsi
lea rax, [rsp+198h+arg_0]
mov [rsp+198h+var_190], rax
mov rax, 3000000010h
mov [rsp+198h+var_198], rax
test r14, r14
jz loc_18F79
mov ebx, edi
mov rcx, rsp
mov rax, [rcx+10h]
mov [rsp+198h+var_168], rax
movaps xmm0, xmmword ptr [rcx]
movaps [rsp+198h+var_178], xmm0
lea rdi, [rsp+198h+var_158]
mov esi, 80h
mov rdx, r14
call _vsnprintf
cmp eax, 7Fh
jg short loc_18F2C
mov rdx, cs:g_logger_state_1
lea rsi, [rsp+198h+var_158]
mov edi, ebx
call cs:g_logger_state_0
jmp short loc_18F79
loc_18F2C:
mov r15d, eax
lea r12d, [r15+1]
mov esi, 1
mov rdi, r12
call _calloc
mov r13, rax
lea rcx, [rsp+198h+var_178]
mov rdi, rax
mov rsi, r12
mov rdx, r14
call _vsnprintf
mov eax, r15d
mov byte ptr [r13+rax+0], 0
mov rdx, cs:g_logger_state_1
mov edi, ebx
mov rsi, r13
call cs:g_logger_state_0
mov rdi, r13
call _free
loc_18F79:
add rsp, 170h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
|
long long ggml_log_internal(
unsigned int a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
long long result; // rax
int v15; // eax
unsigned int v16; // r15d
long long v17; // r12
long long v18; // r13
_BYTE v19[128]; // [rsp+40h] [rbp-158h] BYREF
long long v20; // [rsp+D0h] [rbp-C8h]
long long v21; // [rsp+D8h] [rbp-C0h]
long long v22; // [rsp+E0h] [rbp-B8h]
long long v23; // [rsp+E8h] [rbp-B0h]
__m128 v24; // [rsp+F0h] [rbp-A8h]
__m128 v25; // [rsp+100h] [rbp-98h]
__m128 v26; // [rsp+110h] [rbp-88h]
__m128 v27; // [rsp+120h] [rbp-78h]
__m128 v28; // [rsp+130h] [rbp-68h]
__m128 v29; // [rsp+140h] [rbp-58h]
__m128 v30; // [rsp+150h] [rbp-48h]
__m128 v31; // [rsp+160h] [rbp-38h]
v24 = a7;
v25 = a8;
v26 = a9;
v27 = a10;
v28 = a11;
v29 = a12;
v30 = a13;
v31 = a14;
v20 = a3;
v21 = a4;
v22 = a5;
v23 = a6;
result = 0x3000000010LL;
if ( a2 )
{
v15 = vsnprintf(v19, 128LL, a2);
if ( v15 > 127 )
{
v16 = v15;
v17 = (unsigned int)(v15 + 1);
v18 = calloc(v17, 1LL);
vsnprintf(v18, v17, a2);
*(_BYTE *)(v18 + v16) = 0;
g_logger_state_0(a1, v18);
return free(v18);
}
else
{
return g_logger_state_0(a1, (long long)v19);
}
}
return result;
}
|
ggml_log_internal:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x170
MOV R14,RSI
LEA RSI,[RSP + 0xc0]
MOV qword ptr [RSI + 0x10],RDX
MOV qword ptr [RSI + 0x18],RCX
MOV qword ptr [RSI + 0x20],R8
MOV qword ptr [RSI + 0x28],R9
TEST AL,AL
JZ 0x00118ec0
MOVAPS xmmword ptr [RSP + 0xf0],XMM0
MOVAPS xmmword ptr [RSP + 0x100],XMM1
MOVAPS xmmword ptr [RSP + 0x110],XMM2
MOVAPS xmmword ptr [RSP + 0x120],XMM3
MOVAPS xmmword ptr [RSP + 0x130],XMM4
MOVAPS xmmword ptr [RSP + 0x140],XMM5
MOVAPS xmmword ptr [RSP + 0x150],XMM6
MOVAPS xmmword ptr [RSP + 0x160],XMM7
LAB_00118ec0:
MOV qword ptr [RSP + 0x10],RSI
LEA RAX,[RSP + 0x1a0]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,0x3000000010
MOV qword ptr [RSP],RAX
TEST R14,R14
JZ 0x00118f79
MOV EBX,EDI
MOV RCX,RSP
MOV RAX,qword ptr [RCX + 0x10]
MOV qword ptr [RSP + 0x30],RAX
MOVAPS XMM0,xmmword ptr [RCX]
MOVAPS xmmword ptr [RSP + 0x20],XMM0
LEA RDI,[RSP + 0x40]
MOV ESI,0x80
MOV RDX,R14
CALL 0x00116a90
CMP EAX,0x7f
JG 0x00118f2c
MOV RDX,qword ptr [0x001ab1d0]
LEA RSI,[RSP + 0x40]
MOV EDI,EBX
CALL qword ptr [0x0016b108]
JMP 0x00118f79
LAB_00118f2c:
MOV R15D,EAX
LEA R12D,[R15 + 0x1]
MOV ESI,0x1
MOV RDI,R12
CALL 0x00116b20
MOV R13,RAX
LEA RCX,[RSP + 0x20]
MOV RDI,RAX
MOV RSI,R12
MOV RDX,R14
CALL 0x00116a90
MOV EAX,R15D
MOV byte ptr [R13 + RAX*0x1],0x0
MOV RDX,qword ptr [0x001ab1d0]
MOV EDI,EBX
MOV RSI,R13
CALL qword ptr [0x0016b108]
MOV RDI,R13
CALL 0x001173b0
LAB_00118f79:
ADD RSP,0x170
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
void ggml_log_internal(int4 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,char *param_10,int8 param_11,int8 param_12,
int8 param_13,int8 param_14)
{
char in_AL;
uint uVar1;
char *__s;
int8 local_198;
int1 *puStack_190;
int1 *local_188;
int8 local_178;
int1 *puStack_170;
int1 *local_168;
char local_158 [128];
int1 local_d8 [16];
int8 local_c8;
int8 local_c0;
int8 local_b8;
int8 local_b0;
int4 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
int8 local_68;
int8 local_58;
int8 local_48;
int8 local_38;
local_188 = local_d8;
if (in_AL != '\0') {
local_a8 = param_1;
local_98 = param_2;
local_88 = param_3;
local_78 = param_4;
local_68 = param_5;
local_58 = param_6;
local_48 = param_7;
local_38 = param_8;
}
puStack_190 = &stack0x00000008;
local_198 = 0x3000000010;
if (param_10 != (char *)0x0) {
local_178 = 0x3000000010;
puStack_170 = puStack_190;
local_168 = local_188;
local_c8 = param_11;
local_c0 = param_12;
local_b8 = param_13;
local_b0 = param_14;
uVar1 = vsnprintf(local_158,0x80,param_10,&local_198);
if ((int)uVar1 < 0x80) {
(*(code *)g_logger_state_0)(param_9,local_158,g_logger_state_1);
}
else {
__s = (char *)calloc((ulong)(uVar1 + 1),1);
vsnprintf(__s,(ulong)(uVar1 + 1),param_10,&local_178);
__s[uVar1] = '\0';
(*(code *)g_logger_state_0)(param_9,__s,g_logger_state_1);
free(__s);
}
}
return;
}
|
|
14,620
|
js_string_memcmp
|
bluesky950520[P]quickjs/quickjs.c
|
static int js_string_memcmp(const JSString *p1, const JSString *p2, int len)
{
int res;
if (likely(!p1->is_wide_char)) {
if (likely(!p2->is_wide_char))
res = memcmp(p1->u.str8, p2->u.str8, len);
else
res = -memcmp16_8(p2->u.str16, p1->u.str8, len);
} else {
if (!p2->is_wide_char)
res = memcmp16_8(p1->u.str16, p2->u.str8, len);
else
res = memcmp16(p1->u.str16, p2->u.str16, len);
}
return res;
}
|
O2
|
c
|
js_string_memcmp:
movq %rdi, %rcx
testb $-0x80, 0x7(%rdi)
movq 0x4(%rsi), %rax
jne 0x3856c
testl %eax, %eax
js 0x3857d
addq $0x18, %rcx
addq $0x18, %rsi
movslq %edx, %rdx
movq %rcx, %rdi
jmp 0xe4e0
addq $0x18, %rcx
addq $0x18, %rsi
testl %eax, %eax
js 0x38598
movq %rcx, %rdi
jmp 0x385b9
pushq %rax
addq $0x18, %rsi
addq $0x18, %rcx
movq %rsi, %rdi
movq %rcx, %rsi
callq 0x385b9
negl %eax
addq $0x8, %rsp
retq
xorl %edi, %edi
testl %edx, %edx
cmovlel %edi, %edx
cmpq %rdi, %rdx
je 0x385b6
movzwl (%rcx,%rdi,2), %eax
movzwl (%rsi,%rdi,2), %r8d
incq %rdi
subl %r8d, %eax
je 0x3859f
retq
xorl %eax, %eax
retq
|
js_string_memcmp:
mov rcx, rdi
test byte ptr [rdi+7], 80h
mov rax, [rsi+4]
jnz short loc_3856C
test eax, eax
js short loc_3857D
add rcx, 18h
add rsi, 18h
movsxd rdx, edx
mov rdi, rcx
jmp _memcmp
loc_3856C:
add rcx, 18h
add rsi, 18h
test eax, eax
js short loc_38598
mov rdi, rcx
jmp short memcmp16_8
loc_3857D:
push rax
add rsi, 18h
add rcx, 18h
mov rdi, rsi
mov rsi, rcx
call memcmp16_8
neg eax
add rsp, 8
retn
loc_38598:
xor edi, edi
test edx, edx
cmovle edx, edi
loc_3859F:
cmp rdx, rdi
jz short loc_385B6
movzx eax, word ptr [rcx+rdi*2]
movzx r8d, word ptr [rsi+rdi*2]
inc rdi
sub eax, r8d
jz short loc_3859F
retn
loc_385B6:
xor eax, eax
retn
|
long long js_string_memcmp(long long a1, long long a2, long long a3)
{
long long v3; // rax
long long result; // rax
long long v5; // rcx
long long v6; // rsi
long long v7; // rdi
int v8; // eax
int v9; // r8d
v3 = *(_QWORD *)(a2 + 4);
if ( *(char *)(a1 + 7) < 0 )
{
v5 = a1 + 24;
v6 = a2 + 24;
if ( (int)v3 < 0 )
{
v7 = 0LL;
if ( (int)a3 <= 0 )
a3 = 0LL;
while ( a3 != v7 )
{
v8 = *(unsigned __int16 *)(v5 + 2 * v7);
v9 = *(unsigned __int16 *)(v6 + 2 * v7++);
result = (unsigned int)(v8 - v9);
if ( (_DWORD)result )
return result;
}
return 0LL;
}
else
{
return memcmp16_8(v5, v6);
}
}
else if ( (int)v3 < 0 )
{
return (unsigned int)-memcmp16_8(a2 + 24, a1 + 24);
}
else
{
return memcmp(a1 + 24, a2 + 24, (int)a3);
}
}
|
js_string_memcmp:
MOV RCX,RDI
TEST byte ptr [RDI + 0x7],0x80
MOV RAX,qword ptr [RSI + 0x4]
JNZ 0x0013856c
TEST EAX,EAX
JS 0x0013857d
ADD RCX,0x18
ADD RSI,0x18
MOVSXD RDX,EDX
MOV RDI,RCX
JMP 0x0010e4e0
LAB_0013856c:
ADD RCX,0x18
ADD RSI,0x18
TEST EAX,EAX
JS 0x00138598
MOV RDI,RCX
JMP 0x001385b9
LAB_0013857d:
PUSH RAX
ADD RSI,0x18
ADD RCX,0x18
MOV RDI,RSI
MOV RSI,RCX
CALL 0x001385b9
NEG EAX
ADD RSP,0x8
RET
LAB_00138598:
XOR EDI,EDI
TEST EDX,EDX
CMOVLE EDX,EDI
LAB_0013859f:
CMP RDX,RDI
JZ 0x001385b6
MOVZX EAX,word ptr [RCX + RDI*0x2]
MOVZX R8D,word ptr [RSI + RDI*0x2]
INC RDI
SUB EAX,R8D
JZ 0x0013859f
RET
LAB_001385b6:
XOR EAX,EAX
RET
|
int js_string_memcmp(long param_1,long param_2,uint param_3)
{
long lVar1;
long lVar2;
int iVar3;
ulong uVar4;
ulong uVar5;
iVar3 = (int)*(int8 *)(param_2 + 4);
if ((*(byte *)(param_1 + 7) & 0x80) != 0) {
if (-1 < iVar3) {
iVar3 = memcmp16_8(param_1 + 0x18);
return iVar3;
}
uVar5 = 0;
uVar4 = (ulong)param_3;
if ((int)param_3 < 1) {
uVar4 = uVar5;
}
do {
if (uVar4 == uVar5) {
return 0;
}
lVar1 = uVar5 * 2;
lVar2 = uVar5 * 2;
uVar5 = uVar5 + 1;
iVar3 = (uint)*(ushort *)(param_1 + 0x18 + lVar1) - (uint)*(ushort *)(param_2 + 0x18 + lVar2);
} while (iVar3 == 0);
return iVar3;
}
if (-1 < iVar3) {
iVar3 = memcmp((void *)(param_1 + 0x18),(void *)(param_2 + 0x18),(long)(int)param_3);
return iVar3;
}
iVar3 = memcmp16_8(param_2 + 0x18,param_1 + 0x18);
return -iVar3;
}
|
|
14,621
|
client_mpvio_read_packet
|
eloqsql/libmariadb/plugins/auth/my_auth.c
|
static int client_mpvio_read_packet(struct st_plugin_vio *mpv, uchar **buf)
{
MCPVIO_EXT *mpvio= (MCPVIO_EXT*)mpv;
MYSQL *mysql= mpvio->mysql;
ulong pkt_len;
/* there are cached data left, feed it to a plugin */
if (mpvio->cached_server_reply.pkt)
{
*buf= mpvio->cached_server_reply.pkt;
mpvio->cached_server_reply.pkt= 0;
mpvio->packets_read++;
return mpvio->cached_server_reply.pkt_len;
}
if (mpvio->packets_read == 0)
{
/*
the server handshake packet came from the wrong plugin,
or it's mysql_change_user(). Either way, there is no data
for a plugin to read. send a dummy packet to the server
to initiate a dialog.
*/
if (client_mpvio_write_packet(mpv, 0, 0))
return (int)packet_error;
}
/* otherwise read the data */
if ((pkt_len= ma_net_safe_read(mysql)) == packet_error)
return (int)packet_error;
mpvio->last_read_packet_len= pkt_len;
*buf= mysql->net.read_pos;
/* was it a request to change plugins ? */
if (pkt_len && **buf == 254)
return (int)packet_error; /* if yes, this plugin shan't continue */
/*
the server sends \1\255 or \1\254 instead of just \255 or \254 -
for us to not confuse it with an error or "change plugin" packets.
We remove this escaping \1 here.
See also server_mpvio_write_packet() where the escaping is done.
*/
if (pkt_len && **buf == 1)
{
(*buf)++;
pkt_len--;
}
mpvio->packets_read++;
return pkt_len;
}
|
O0
|
c
|
client_mpvio_read_packet:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0x71956
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
movq $0x0, 0x30(%rax)
movq -0x20(%rbp), %rax
movl 0x40(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x40(%rax)
movq -0x20(%rbp), %rax
movl 0x38(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x71a27
movq -0x20(%rbp), %rax
cmpl $0x0, 0x40(%rax)
jne 0x71983
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
movq %rdx, %rsi
callq 0x71a30
cmpl $0x0, %eax
je 0x71981
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x71a27
jmp 0x71983
movq -0x28(%rbp), %rdi
callq 0x478c0
movq %rax, -0x30(%rbp)
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
cmpq %rcx, %rax
jne 0x719a6
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x71a27
movq -0x30(%rbp), %rax
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x4c(%rax)
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
cmpq $0x0, -0x30(%rbp)
je 0x719e3
movq -0x18(%rbp), %rax
movq (%rax), %rax
movzbl (%rax), %eax
cmpl $0xfe, %eax
jne 0x719e3
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x71a27
cmpq $0x0, -0x30(%rbp)
je 0x71a13
movq -0x18(%rbp), %rax
movq (%rax), %rax
movzbl (%rax), %eax
cmpl $0x1, %eax
jne 0x71a13
movq -0x18(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq -0x30(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movl 0x40(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x40(%rax)
movq -0x30(%rbp), %rax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
|
client_mpvio_read_packet:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
mov rax, [rax+18h]
mov [rbp+var_28], rax
mov rax, [rbp+var_20]
cmp qword ptr [rax+30h], 0
jz short loc_71956
mov rax, [rbp+var_20]
mov rcx, [rax+30h]
mov rax, [rbp+var_18]
mov [rax], rcx
mov rax, [rbp+var_20]
mov qword ptr [rax+30h], 0
mov rax, [rbp+var_20]
mov ecx, [rax+40h]
add ecx, 1
mov [rax+40h], ecx
mov rax, [rbp+var_20]
mov eax, [rax+38h]
mov [rbp+var_4], eax
jmp loc_71A27
loc_71956:
mov rax, [rbp+var_20]
cmp dword ptr [rax+40h], 0
jnz short loc_71983
mov rdi, [rbp+var_10]
xor eax, eax
mov edx, eax
mov rsi, rdx
call client_mpvio_write_packet
cmp eax, 0
jz short loc_71981
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_71A27
loc_71981:
jmp short $+2
loc_71983:
mov rdi, [rbp+var_28]
call ma_net_safe_read
mov [rbp+var_30], rax
mov ecx, 0FFFFFFFFh
cmp rax, rcx
jnz short loc_719A6
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_71A27
loc_719A6:
mov rax, [rbp+var_30]
mov ecx, eax
mov rax, [rbp+var_20]
mov [rax+4Ch], ecx
mov rax, [rbp+var_28]
mov rcx, [rax+20h]
mov rax, [rbp+var_18]
mov [rax], rcx
cmp [rbp+var_30], 0
jz short loc_719E3
mov rax, [rbp+var_18]
mov rax, [rax]
movzx eax, byte ptr [rax]
cmp eax, 0FEh
jnz short loc_719E3
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_71A27
loc_719E3:
cmp [rbp+var_30], 0
jz short loc_71A13
mov rax, [rbp+var_18]
mov rax, [rax]
movzx eax, byte ptr [rax]
cmp eax, 1
jnz short loc_71A13
mov rax, [rbp+var_18]
mov rcx, [rax]
add rcx, 1
mov [rax], rcx
mov rax, [rbp+var_30]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_30], rax
loc_71A13:
mov rax, [rbp+var_20]
mov ecx, [rax+40h]
add ecx, 1
mov [rax+40h], ecx
mov rax, [rbp+var_30]
mov [rbp+var_4], eax
loc_71A27:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
|
long long client_mpvio_read_packet(long long a1, _QWORD *a2, long long a3, long long a4, int a5, int a6)
{
long long v7; // [rsp+0h] [rbp-30h]
long long v8; // [rsp+8h] [rbp-28h]
_QWORD *v9; // [rsp+18h] [rbp-18h]
v9 = a2;
v8 = *(_QWORD *)(a1 + 24);
if ( *(_QWORD *)(a1 + 48) )
{
*a2 = *(_QWORD *)(a1 + 48);
*(_QWORD *)(a1 + 48) = 0LL;
++*(_DWORD *)(a1 + 64);
return *(unsigned int *)(a1 + 56);
}
else if ( *(_DWORD *)(a1 + 64) || (a2 = 0LL, !(unsigned int)client_mpvio_write_packet(a1, 0LL)) )
{
v7 = ma_net_safe_read(v8, (long long)a2, a3, a4, a5, a6);
if ( v7 == 0xFFFFFFFFLL )
{
return (unsigned int)-1;
}
else
{
*(_DWORD *)(a1 + 76) = v7;
*v9 = *(_QWORD *)(v8 + 32);
if ( v7 && *(unsigned __int8 *)*v9 == 254 )
{
return (unsigned int)-1;
}
else
{
if ( v7 && *(_BYTE *)*v9 == 1 )
{
++*v9;
LODWORD(v7) = v7 - 1;
}
++*(_DWORD *)(a1 + 64);
return (unsigned int)v7;
}
}
}
else
{
return (unsigned int)-1;
}
}
|
client_mpvio_read_packet:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x20]
CMP qword ptr [RAX + 0x30],0x0
JZ 0x00171956
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RAX + 0x30]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0x30],0x0
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RAX + 0x40]
ADD ECX,0x1
MOV dword ptr [RAX + 0x40],ECX
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0x38]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00171a27
LAB_00171956:
MOV RAX,qword ptr [RBP + -0x20]
CMP dword ptr [RAX + 0x40],0x0
JNZ 0x00171983
MOV RDI,qword ptr [RBP + -0x10]
XOR EAX,EAX
MOV EDX,EAX
MOV RSI,RDX
CALL 0x00171a30
CMP EAX,0x0
JZ 0x00171981
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x00171a27
LAB_00171981:
JMP 0x00171983
LAB_00171983:
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x001478c0
MOV qword ptr [RBP + -0x30],RAX
MOV ECX,0xffffffff
CMP RAX,RCX
JNZ 0x001719a6
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x00171a27
LAB_001719a6:
MOV RAX,qword ptr [RBP + -0x30]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0x4c],ECX
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RAX + 0x20]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
CMP qword ptr [RBP + -0x30],0x0
JZ 0x001719e3
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0xfe
JNZ 0x001719e3
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x00171a27
LAB_001719e3:
CMP qword ptr [RBP + -0x30],0x0
JZ 0x00171a13
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x1
JNZ 0x00171a13
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RAX]
ADD RCX,0x1
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x30],RAX
LAB_00171a13:
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RAX + 0x40]
ADD ECX,0x1
MOV dword ptr [RAX + 0x40],ECX
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x4],EAX
LAB_00171a27:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 client_mpvio_read_packet(long param_1,long *param_2)
{
long lVar1;
int iVar2;
long local_38;
int4 local_c;
lVar1 = *(long *)(param_1 + 0x18);
if (*(long *)(param_1 + 0x30) == 0) {
if ((*(int *)(param_1 + 0x40) == 0) &&
(iVar2 = client_mpvio_write_packet(param_1,0), iVar2 != 0)) {
local_c = 0xffffffff;
}
else {
local_38 = ma_net_safe_read(lVar1);
if (local_38 == 0xffffffff) {
local_c = 0xffffffff;
}
else {
*(int *)(param_1 + 0x4c) = (int)local_38;
*param_2 = *(long *)(lVar1 + 0x20);
if ((local_38 == 0) || (*(char *)*param_2 != -2)) {
if ((local_38 != 0) && (*(char *)*param_2 == '\x01')) {
*param_2 = *param_2 + 1;
local_38 = local_38 + -1;
}
*(int *)(param_1 + 0x40) = *(int *)(param_1 + 0x40) + 1;
local_c = (int4)local_38;
}
else {
local_c = 0xffffffff;
}
}
}
}
else {
*param_2 = *(long *)(param_1 + 0x30);
*(int8 *)(param_1 + 0x30) = 0;
*(int *)(param_1 + 0x40) = *(int *)(param_1 + 0x40) + 1;
local_c = *(int4 *)(param_1 + 0x38);
}
return local_c;
}
|
|
14,622
|
get_charset_name
|
eloqsql/mysys/charset.c
|
const char *get_charset_name(uint charset_number)
{
my_pthread_once(&charsets_initialized, init_available_charsets);
if (charset_number < array_elements(all_charsets))
{
CHARSET_INFO *cs= all_charsets[charset_number];
if (cs && (cs->number == charset_number) && cs->coll_name.str)
return cs->coll_name.str;
}
return "?"; /* this mimics find_type() */
}
|
O0
|
c
|
get_charset_name:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0xc(%rbp)
leaq 0x3623e2(%rip), %rdi # 0x395e94
leaq -0x479(%rip), %rsi # 0x33640
callq 0x24250
cmpl $0x800, -0xc(%rbp) # imm = 0x800
jae 0x33b08
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0x35a34d(%rip), %rax # 0x38de20
movq (%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x33b06
movq -0x18(%rbp), %rax
movl (%rax), %eax
cmpl -0xc(%rbp), %eax
jne 0x33b06
movq -0x18(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x33b06
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x33b13
jmp 0x33b08
leaq 0x4cab4(%rip), %rax # 0x805c3
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
|
get_charset_name:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_C], edi
lea rdi, charsets_initialized
lea rsi, init_available_charsets
call _pthread_once
cmp [rbp+var_C], 800h
jnb short loc_33B08
mov eax, [rbp+var_C]
mov ecx, eax
lea rax, all_charsets
mov rax, [rax+rcx*8]
mov [rbp+var_18], rax
cmp [rbp+var_18], 0
jz short loc_33B06
mov rax, [rbp+var_18]
mov eax, [rax]
cmp eax, [rbp+var_C]
jnz short loc_33B06
mov rax, [rbp+var_18]
cmp qword ptr [rax+20h], 0
jz short loc_33B06
mov rax, [rbp+var_18]
mov rax, [rax+20h]
mov [rbp+var_8], rax
jmp short loc_33B13
loc_33B06:
jmp short $+2
loc_33B08:
lea rax, asc_805C3; "?"
mov [rbp+var_8], rax
loc_33B13:
mov rax, [rbp+var_8]
add rsp, 20h
pop rbp
retn
|
const char * get_charset_name(unsigned int a1)
{
long long v2; // [rsp+8h] [rbp-18h]
pthread_once(&charsets_initialized, init_available_charsets);
if ( a1 < 0x800 && (v2 = all_charsets[a1]) != 0 && *(_DWORD *)v2 == a1 && *(_QWORD *)(v2 + 32) )
return *(const char **)(v2 + 32);
else
return "?";
}
|
get_charset_name:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0xc],EDI
LEA RDI,[0x495e94]
LEA RSI,[0x133640]
CALL 0x00124250
CMP dword ptr [RBP + -0xc],0x800
JNC 0x00133b08
MOV EAX,dword ptr [RBP + -0xc]
MOV ECX,EAX
LEA RAX,[0x48de20]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x18],RAX
CMP qword ptr [RBP + -0x18],0x0
JZ 0x00133b06
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX]
CMP EAX,dword ptr [RBP + -0xc]
JNZ 0x00133b06
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x20],0x0
JZ 0x00133b06
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x20]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00133b13
LAB_00133b06:
JMP 0x00133b08
LAB_00133b08:
LEA RAX,[0x1805c3]
MOV qword ptr [RBP + -0x8],RAX
LAB_00133b13:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x20
POP RBP
RET
|
int * get_charset_name(uint param_1)
{
uint *puVar1;
int *local_10;
pthread_once(&charsets_initialized,init_available_charsets);
if ((((param_1 < 0x800) && (puVar1 = (uint *)(&all_charsets)[param_1], puVar1 != (uint *)0x0)) &&
(*puVar1 == param_1)) && (*(long *)(puVar1 + 8) != 0)) {
local_10 = *(int **)(puVar1 + 8);
}
else {
local_10 = &DAT_001805c3;
}
return local_10;
}
|
|
14,623
|
Stop_log_event::do_shall_skip(rpl_group_info*)
|
eloqsql/sql/log_event.h
|
virtual enum_skip_reason do_shall_skip(rpl_group_info *rgi)
{
/*
Events from ourself should be skipped, but they should not
decrease the slave skip counter.
*/
if (this->server_id == global_system_variables.server_id)
return Log_event::EVENT_SKIP_IGNORE;
else
return Log_event::EVENT_SKIP_NOT;
}
|
O0
|
c
|
Stop_log_event::do_shall_skip(rpl_group_info*):
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl 0x40(%rax), %eax
leaq 0xf5c2b6(%rip), %rcx # 0x1cc9580
cmpq 0x2b8(%rcx), %rax
jne 0xd6d2dc
movl $0x1, -0x4(%rbp)
jmp 0xd6d2e3
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
|
_ZN14Stop_log_event13do_shall_skipEP14rpl_group_info:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
mov eax, [rax+40h]
lea rcx, global_system_variables
cmp rax, [rcx+2B8h]
jnz short loc_D6D2DC
mov [rbp+var_4], 1
jmp short loc_D6D2E3
loc_D6D2DC:
mov [rbp+var_4], 0
loc_D6D2E3:
mov eax, [rbp+var_4]
pop rbp
retn
|
_BOOL8 Stop_log_event::do_shall_skip(Stop_log_event *this, rpl_group_info *a2)
{
return *((unsigned int *)this + 16) == global_system_variables[87];
}
|
set_const:
PUSH RBP
MOV RBP,RSP
MOV AL,SIL
MOV qword ptr [RBP + -0x8],RDI
AND AL,0x1
MOV byte ptr [RBP + -0x9],AL
MOV RAX,qword ptr [RBP + -0x8]
MOV CL,byte ptr [RBP + -0x9]
AND CL,0x1
MOV byte ptr [RAX + 0x11],CL
POP RBP
RET
|
/* Regexp_processor_pcre::set_const(bool) */
void __thiscall Regexp_processor_pcre::set_const(Regexp_processor_pcre *this,bool param_1)
{
this[0x11] = (Regexp_processor_pcre)param_1;
return;
}
|
|
14,624
|
Engine::getPieceValue(chess::Piece)
|
Razamindset[P]pawnstar-chess-engine/src/engine/engine.cpp
|
int Engine::getPieceValue(Piece piece) {
switch (piece) {
case PieceGenType::PAWN:
return 100;
case PieceGenType::KNIGHT:
return 300;
case PieceGenType::BISHOP:
return 320;
case PieceGenType::ROOK:
return 500;
case PieceGenType::QUEEN:
return 900;
default:
return 0; // King has no material value
}
}
|
O0
|
cpp
|
Engine::getPieceValue(chess::Piece):
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movb %al, -0x5(%rbp)
movq %rdi, -0x10(%rbp)
leaq -0x5(%rbp), %rdi
callq 0xa260
decl %eax
movl %eax, %ecx
movq %rcx, -0x18(%rbp)
subl $0xf, %eax
ja 0xf4a9
movq -0x18(%rbp), %rax
leaq 0x15985(%rip), %rcx # 0x24df8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x64, -0x4(%rbp)
jmp 0xf4b0
movl $0x12c, -0x4(%rbp) # imm = 0x12C
jmp 0xf4b0
movl $0x140, -0x4(%rbp) # imm = 0x140
jmp 0xf4b0
movl $0x1f4, -0x4(%rbp) # imm = 0x1F4
jmp 0xf4b0
movl $0x384, -0x4(%rbp) # imm = 0x384
jmp 0xf4b0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
|
_ZN6Engine13getPieceValueEN5chess5PieceE:
push rbp
mov rbp, rsp
sub rsp, 20h
mov al, sil
mov [rbp+var_5], al
mov [rbp+var_10], rdi
lea rdi, [rbp+var_5]
call _ZNK5chess5PiececviEv; chess::Piece::operator int(void)
dec eax; switch 16 cases
mov ecx, eax
mov [rbp+var_18], rcx
sub eax, 0Fh
ja short def_F47A; jumptable 000000000000F47A default case, cases 3,5-7,9-15
mov rax, [rbp+var_18]
lea rcx, jpt_F47A
movsxd rax, ds:(jpt_F47A - 24DF8h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_F47C:
mov [rbp+var_4], 64h ; 'd'; jumptable 000000000000F47A case 1
jmp short loc_F4B0
loc_F485:
mov [rbp+var_4], 12Ch; jumptable 000000000000F47A case 2
jmp short loc_F4B0
loc_F48E:
mov [rbp+var_4], 140h; jumptable 000000000000F47A case 4
jmp short loc_F4B0
loc_F497:
mov [rbp+var_4], 1F4h; jumptable 000000000000F47A case 8
jmp short loc_F4B0
loc_F4A0:
mov [rbp+var_4], 384h; jumptable 000000000000F47A case 16
jmp short loc_F4B0
def_F47A:
mov [rbp+var_4], 0; jumptable 000000000000F47A default case, cases 3,5-7,9-15
loc_F4B0:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
|
long long Engine::getPieceValue(long long a1, unsigned __int8 a2)
{
unsigned __int8 v3; // [rsp+1Bh] [rbp-5h] BYREF
unsigned int v4; // [rsp+1Ch] [rbp-4h]
v3 = a2;
switch ( (unsigned int)chess::Piece::operator int(&v3) )
{
case 1u:
v4 = 100;
break;
case 2u:
v4 = 300;
break;
case 4u:
v4 = 320;
break;
case 8u:
v4 = 500;
break;
case 0x10u:
v4 = 900;
break;
default:
v4 = 0;
break;
}
return v4;
}
|
getPieceValue:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV AL,SIL
MOV byte ptr [RBP + -0x5],AL
MOV qword ptr [RBP + -0x10],RDI
LEA RDI,[RBP + -0x5]
CALL 0x0010a260
DEC EAX
MOV ECX,EAX
MOV qword ptr [RBP + -0x18],RCX
SUB EAX,0xf
JA 0x0010f4a9
MOV RAX,qword ptr [RBP + -0x18]
LEA RCX,[0x124df8]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
MOV dword ptr [RBP + -0x4],0x64
JMP 0x0010f4b0
caseD_2:
MOV dword ptr [RBP + -0x4],0x12c
JMP 0x0010f4b0
caseD_4:
MOV dword ptr [RBP + -0x4],0x140
JMP 0x0010f4b0
caseD_8:
MOV dword ptr [RBP + -0x4],0x1f4
JMP 0x0010f4b0
caseD_10:
MOV dword ptr [RBP + -0x4],0x384
JMP 0x0010f4b0
caseD_3:
MOV dword ptr [RBP + -0x4],0x0
LAB_0010f4b0:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
/* Engine::getPieceValue(chess::Piece) */
int4 __thiscall Engine::getPieceValue(int8 param_1,Piece param_2)
{
int iVar1;
Piece local_d;
int4 local_c;
local_d = param_2;
iVar1 = chess::Piece::operator_cast_to_int(&local_d);
switch(iVar1) {
case 1:
local_c = 100;
break;
case 2:
local_c = 300;
break;
default:
local_c = 0;
break;
case 4:
local_c = 0x140;
break;
case 8:
local_c = 500;
break;
case 0x10:
local_c = 900;
}
return local_c;
}
|
|
14,625
|
Engine::getPieceValue(chess::Piece)
|
Razamindset[P]pawnstar-chess-engine/src/engine/engine.cpp
|
int Engine::getPieceValue(Piece piece) {
switch (piece) {
case PieceGenType::PAWN:
return 100;
case PieceGenType::KNIGHT:
return 300;
case PieceGenType::BISHOP:
return 320;
case PieceGenType::ROOK:
return 500;
case PieceGenType::QUEEN:
return 900;
default:
return 0; // King has no material value
}
}
|
O1
|
cpp
|
Engine::getPieceValue(chess::Piece):
movzbl %sil, %ecx
leal -0x1(%rcx), %eax
cmpl $0x7, %eax
ja 0x6c4c
leaq 0x9ef7(%rip), %rcx # 0x10b34
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x64, %eax
retq
cmpl $0x10, %ecx
jne 0x6c57
movl $0x384, %eax # imm = 0x384
retq
xorl %eax, %eax
retq
movl $0x140, %eax # imm = 0x140
retq
movl $0x1f4, %eax # imm = 0x1F4
retq
movl $0x12c, %eax # imm = 0x12C
retq
|
_ZN6Engine13getPieceValueEN5chess5PieceE:
movzx ecx, sil
lea eax, [rcx-1]; switch 8 cases
cmp eax, 7
ja short def_6C44; jumptable 0000000000006C44 default case
lea rcx, jpt_6C44
movsxd rax, ds:(jpt_6C44 - 10B34h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_6C46:
mov eax, 64h ; 'd'; jumptable 0000000000006C44 case 1
retn
def_6C44:
cmp ecx, 10h; jumptable 0000000000006C44 default case
jnz short loc_6C57; jumptable 0000000000006C44 cases 3,5-7
mov eax, 384h
retn
loc_6C57:
xor eax, eax; jumptable 0000000000006C44 cases 3,5-7
retn
loc_6C5A:
mov eax, 140h; jumptable 0000000000006C44 case 4
retn
loc_6C60:
mov eax, 1F4h; jumptable 0000000000006C44 case 8
retn
loc_6C66:
mov eax, 12Ch; jumptable 0000000000006C44 case 2
retn
|
long long Engine::getPieceValue(long long a1, char a2)
{
long long result; // rax
switch ( a2 )
{
case 1:
result = 100LL;
break;
case 2:
result = 300LL;
break;
case 3:
case 5:
case 6:
case 7:
goto LABEL_5;
case 4:
result = 320LL;
break;
case 8:
result = 500LL;
break;
default:
if ( a2 == 16 )
result = 900LL;
else
LABEL_5:
result = 0LL;
break;
}
return result;
}
|
getPieceValue:
MOVZX ECX,SIL
LEA EAX,[RCX + -0x1]
CMP EAX,0x7
JA 0x00106c4c
LEA RCX,[0x110b34]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
MOV EAX,0x64
RET
default:
CMP ECX,0x10
JNZ 0x00106c57
MOV EAX,0x384
RET
caseD_3:
XOR EAX,EAX
RET
caseD_4:
MOV EAX,0x140
RET
caseD_8:
MOV EAX,0x1f4
RET
caseD_2:
MOV EAX,0x12c
RET
|
/* Engine::getPieceValue(chess::Piece) */
int8 __thiscall Engine::getPieceValue(int8 param_1,char param_2)
{
switch(param_2) {
case '\x01':
return 100;
case '\x02':
return 300;
case '\x03':
case '\x05':
case '\x06':
case '\a':
goto switchD_00106c44_caseD_3;
case '\x04':
return 0x140;
case '\b':
return 500;
default:
if (param_2 == '\x10') {
return 900;
}
switchD_00106c44_caseD_3:
return 0;
}
}
|
|
14,626
|
Engine::getPieceValue(chess::Piece)
|
Razamindset[P]pawnstar-chess-engine/src/engine/engine.cpp
|
int Engine::getPieceValue(Piece piece) {
switch (piece) {
case PieceGenType::PAWN:
return 100;
case PieceGenType::KNIGHT:
return 300;
case PieceGenType::BISHOP:
return 320;
case PieceGenType::ROOK:
return 500;
case PieceGenType::QUEEN:
return 900;
default:
return 0; // King has no material value
}
}
|
O2
|
cpp
|
Engine::getPieceValue(chess::Piece):
movzbl %sil, %ecx
leal -0x1(%rcx), %eax
cmpl $0x7, %eax
ja 0x5cec
leaq 0xa075(%rip), %rcx # 0xfd54
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
pushq $0x64
popq %rax
retq
cmpl $0x10, %ecx
jne 0x5cf7
movl $0x384, %eax # imm = 0x384
retq
xorl %eax, %eax
retq
movl $0x140, %eax # imm = 0x140
retq
movl $0x1f4, %eax # imm = 0x1F4
retq
movl $0x12c, %eax # imm = 0x12C
retq
|
_ZN6Engine13getPieceValueEN5chess5PieceE:
movzx ecx, sil
lea eax, [rcx-1]; switch 8 cases
cmp eax, 7
ja short def_5CE6; jumptable 0000000000005CE6 default case
lea rcx, jpt_5CE6
movsxd rax, ds:(jpt_5CE6 - 0FD54h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_5CE8:
push 64h ; 'd'; jumptable 0000000000005CE6 case 1
pop rax
retn
def_5CE6:
cmp ecx, 10h; jumptable 0000000000005CE6 default case
jnz short loc_5CF7; jumptable 0000000000005CE6 cases 3,5-7
mov eax, 384h
retn
loc_5CF7:
xor eax, eax; jumptable 0000000000005CE6 cases 3,5-7
retn
loc_5CFA:
mov eax, 140h; jumptable 0000000000005CE6 case 4
retn
loc_5D00:
mov eax, 1F4h; jumptable 0000000000005CE6 case 8
retn
loc_5D06:
mov eax, 12Ch; jumptable 0000000000005CE6 case 2
retn
|
long long Engine::getPieceValue(long long a1, char a2)
{
long long result; // rax
switch ( a2 )
{
case 1:
result = 100LL;
break;
case 2:
result = 300LL;
break;
case 3:
case 5:
case 6:
case 7:
goto LABEL_5;
case 4:
result = 320LL;
break;
case 8:
result = 500LL;
break;
default:
if ( a2 == 16 )
result = 900LL;
else
LABEL_5:
result = 0LL;
break;
}
return result;
}
|
getPieceValue:
MOVZX ECX,SIL
LEA EAX,[RCX + -0x1]
CMP EAX,0x7
JA 0x00105cec
LEA RCX,[0x10fd54]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
PUSH 0x64
POP RAX
RET
default:
CMP ECX,0x10
JNZ 0x00105cf7
MOV EAX,0x384
RET
caseD_3:
XOR EAX,EAX
RET
caseD_4:
MOV EAX,0x140
RET
caseD_8:
MOV EAX,0x1f4
RET
caseD_2:
MOV EAX,0x12c
RET
|
/* Engine::getPieceValue(chess::Piece) */
int8 __thiscall Engine::getPieceValue(int8 param_1,char param_2)
{
switch(param_2) {
case '\x01':
return 100;
case '\x02':
return 300;
case '\x03':
case '\x05':
case '\x06':
case '\a':
goto switchD_00105ce6_caseD_3;
case '\x04':
return 0x140;
case '\b':
return 500;
default:
if (param_2 == '\x10') {
return 900;
}
switchD_00105ce6_caseD_3:
return 0;
}
}
|
|
14,627
|
Engine::getPieceValue(chess::Piece)
|
Razamindset[P]pawnstar-chess-engine/src/engine/engine.cpp
|
int Engine::getPieceValue(Piece piece) {
switch (piece) {
case PieceGenType::PAWN:
return 100;
case PieceGenType::KNIGHT:
return 300;
case PieceGenType::BISHOP:
return 320;
case PieceGenType::ROOK:
return 500;
case PieceGenType::QUEEN:
return 900;
default:
return 0; // King has no material value
}
}
|
O3
|
cpp
|
Engine::getPieceValue(chess::Piece):
movzbl %sil, %ecx
leal -0x1(%rcx), %eax
cmpl $0x7, %eax
ja 0x5ac4
leaq 0x904f(%rip), %rcx # 0xeb04
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x64, %eax
retq
cmpl $0x10, %ecx
jne 0x5acf
movl $0x384, %eax # imm = 0x384
retq
xorl %eax, %eax
retq
movl $0x140, %eax # imm = 0x140
retq
movl $0x1f4, %eax # imm = 0x1F4
retq
movl $0x12c, %eax # imm = 0x12C
retq
|
_ZN6Engine13getPieceValueEN5chess5PieceE:
movzx ecx, sil
lea eax, [rcx-1]; switch 8 cases
cmp eax, 7
ja short def_5ABC; jumptable 0000000000005ABC default case
lea rcx, jpt_5ABC
movsxd rax, ds:(jpt_5ABC - 0EB04h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_5ABE:
mov eax, 64h ; 'd'; jumptable 0000000000005ABC case 1
retn
def_5ABC:
cmp ecx, 10h; jumptable 0000000000005ABC default case
jnz short loc_5ACF; jumptable 0000000000005ABC cases 3,5-7
mov eax, 384h
retn
loc_5ACF:
xor eax, eax; jumptable 0000000000005ABC cases 3,5-7
retn
loc_5AD2:
mov eax, 140h; jumptable 0000000000005ABC case 4
retn
loc_5AD8:
mov eax, 1F4h; jumptable 0000000000005ABC case 8
retn
loc_5ADE:
mov eax, 12Ch; jumptable 0000000000005ABC case 2
retn
|
long long Engine::getPieceValue(long long a1, char a2)
{
long long result; // rax
switch ( a2 )
{
case 1:
result = 100LL;
break;
case 2:
result = 300LL;
break;
case 3:
case 5:
case 6:
case 7:
goto LABEL_5;
case 4:
result = 320LL;
break;
case 8:
result = 500LL;
break;
default:
if ( a2 == 16 )
result = 900LL;
else
LABEL_5:
result = 0LL;
break;
}
return result;
}
|
getPieceValue:
MOVZX ECX,SIL
LEA EAX,[RCX + -0x1]
CMP EAX,0x7
JA 0x00105ac4
LEA RCX,[0x10eb04]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
MOV EAX,0x64
RET
default:
CMP ECX,0x10
JNZ 0x00105acf
MOV EAX,0x384
RET
caseD_3:
XOR EAX,EAX
RET
caseD_4:
MOV EAX,0x140
RET
caseD_8:
MOV EAX,0x1f4
RET
caseD_2:
MOV EAX,0x12c
RET
|
/* Engine::getPieceValue(chess::Piece) */
int8 __thiscall Engine::getPieceValue(int8 param_1,char param_2)
{
switch(param_2) {
case '\x01':
return 100;
case '\x02':
return 300;
case '\x03':
case '\x05':
case '\x06':
case '\a':
goto switchD_00105abc_caseD_3;
case '\x04':
return 0x140;
case '\b':
return 500;
default:
if (param_2 == '\x10') {
return 900;
}
switchD_00105abc_caseD_3:
return 0;
}
}
|
|
14,628
|
EnumerateDeviceExtensionProperties(VkPhysicalDevice_T*, char const*, unsigned int*, VkExtensionProperties*)
|
HansKristian-Work[P]pyroveil/layer/pyroveil.cpp
|
static VKAPI_ATTR VkResult VKAPI_CALL EnumerateDeviceExtensionProperties(
VkPhysicalDevice physicalDevice, const char *pLayerName, uint32_t *pPropertyCount, VkExtensionProperties *pProperties)
{
auto *layer = getInstanceLayer(physicalDevice);
uint32_t count = 0;
VkResult vr;
vr = layer->getTable()->EnumerateDeviceExtensionProperties(physicalDevice, pLayerName, &count, nullptr);
if (vr)
return vr;
std::vector<VkExtensionProperties> props(count);
vr = layer->getTable()->EnumerateDeviceExtensionProperties(physicalDevice, pLayerName, &count, props.data());
if (vr)
return vr;
// Filter out extensions we cannot deal with yet in SPIRV-Cross.
auto itr = std::remove_if(props.begin(), props.end(), [layer, pProperties](const VkExtensionProperties &ext) {
for (auto &disabledExt : layer->disabledExtensions)
{
if (disabledExt == ext.extensionName)
{
// Only log once.
if (pProperties)
fprintf(stderr, "pyroveil: Disabling extension %s.\n", ext.extensionName);
return true;
}
}
return false;
});
props.erase(itr, props.end());
if (!pProperties)
{
*pPropertyCount = uint32_t(props.size());
vr = VK_SUCCESS;
}
else
{
vr = *pPropertyCount < props.size() ? VK_INCOMPLETE : VK_SUCCESS;
auto to_copy = std::min<uint32_t>(*pPropertyCount, props.size());
std::copy(props.begin(), props.begin() + to_copy, pProperties);
}
return vr;
}
|
O1
|
cpp
|
EnumerateDeviceExtensionProperties(VkPhysicalDevice_T*, char const*, unsigned int*, VkExtensionProperties*):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
movq (%rdi), %r13
leaq 0x559457(%rip), %rdi # 0x5e4038
callq 0x80290
testl %eax, %eax
jne 0x8aefc
movq 0x5593db(%rip), %rdi # 0x5e3fd0
xorl %r9d, %r9d
movq %r13, %rax
xorl %edx, %edx
divq %rdi
movq 0x5593c1(%rip), %rax # 0x5e3fc8
movq (%rax,%rdx,8), %rax
testq %rax, %rax
je 0x8ac4e
movq (%rax), %r8
movq %rax, %r9
cmpq %r13, 0x8(%r8)
je 0x8ac4e
movq %rdx, %rcx
movq %r8, %r10
movq (%r8), %r8
testq %r8, %r8
je 0x8ac4b
movq 0x8(%r8), %rsi
movq %rsi, %rax
xorl %edx, %edx
divq %rdi
movl $0x0, %r9d
cmpq %rcx, %rdx
jne 0x8ac4e
movq %r10, %r9
cmpq %r13, %rsi
jne 0x8ac1f
jmp 0x8ac4e
xorl %r9d, %r9d
testq %r9, %r9
je 0x8ac58
movq (%r9), %rax
jmp 0x8ac5a
xorl %eax, %eax
movq %rbx, -0x68(%rbp)
testq %rax, %rax
je 0x8ac69
movq 0x10(%rax), %rbx
jmp 0x8ac6b
xorl %ebx, %ebx
leaq 0x5593c6(%rip), %rdi # 0x5e4038
callq 0x7efe0
leaq -0x4c(%rbp), %rdx
movl $0x0, (%rdx)
movq %r12, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq *0x18(%rbx)
movl %eax, %r13d
testl %eax, %eax
jne 0x8aeea
movq %r14, -0x48(%rbp)
leaq -0x4c(%rbp), %r13
movl (%r13), %esi
leaq -0x40(%rbp), %r14
leaq -0x60(%rbp), %rdx
movq %r14, %rdi
callq 0x8e9dc
movq (%r14), %rcx
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq *0x18(%rbx)
movl %eax, %r13d
testl %eax, %eax
movq -0x48(%rbp), %rax
jne 0x8aed5
movq -0x40(%rbp), %r15
movq -0x38(%rbp), %r14
movq %rbx, -0x78(%rbp)
movq %rax, -0x70(%rbp)
movq %rbx, -0x60(%rbp)
movq %rax, -0x58(%rbp)
movq %r14, %rbx
subq %r15, %r14
sarq $0x2, %r14
movabsq $0xfc0fc0fc0fc0fc1, %rax # imm = 0xFC0FC0FC0FC0FC1
imulq %rax, %r14
sarq $0x2, %r14
testq %r14, %r14
jle 0x8ad82
incq %r14
leaq -0x60(%rbp), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x8b130
testb %al, %al
jne 0x8adef
leaq 0x104(%r15), %r12
movq %r13, %rdi
movq %r12, %rsi
callq 0x8b130
testb %al, %al
jne 0x8adf2
leaq 0x208(%r15), %r12
movq %r13, %rdi
movq %r12, %rsi
callq 0x8b130
testb %al, %al
jne 0x8adf2
leaq 0x30c(%r15), %r12
movq %r13, %rdi
movq %r12, %rsi
callq 0x8b130
testb %al, %al
jne 0x8adf2
addq $0x410, %r15 # imm = 0x410
decq %r14
cmpq $0x1, %r14
jg 0x8ad11
movq %rbx, %rax
subq %r15, %rax
sarq $0x2, %rax
movabsq $0xfc0fc0fc0fc0fc1, %rcx # imm = 0xFC0FC0FC0FC0FC1
imulq %rcx, %rax
cmpq $0x1, %rax
je 0x8addd
cmpq $0x2, %rax
je 0x8adc6
movq %rbx, %r12
cmpq $0x3, %rax
jne 0x8adf2
leaq -0x60(%rbp), %rdi
movq %r15, %rsi
callq 0x8b130
testb %al, %al
jne 0x8adef
addq $0x104, %r15 # imm = 0x104
leaq -0x60(%rbp), %rdi
movq %r15, %rsi
callq 0x8b130
testb %al, %al
jne 0x8adef
addq $0x104, %r15 # imm = 0x104
leaq -0x60(%rbp), %rdi
movq %r15, %rsi
callq 0x8b130
testb %al, %al
cmoveq %rbx, %r15
movq %r15, %r12
cmpq %rbx, %r12
sete %al
leaq 0x104(%r12), %r15
cmpq %rbx, %r15
sete %cl
orb %al, %cl
jne 0x8ae40
leaq -0x78(%rbp), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x8b130
testb %al, %al
jne 0x8ae34
movl $0x104, %edx # imm = 0x104
movq %r12, %rdi
movq %r15, %rsi
callq 0x7f1b0
addq $0x104, %r12 # imm = 0x104
addq $0x104, %r15 # imm = 0x104
cmpq %rbx, %r15
jne 0x8ae0e
movq -0x38(%rbp), %rax
cmpq %rax, %r12
je 0x8ae5f
movq -0x38(%rbp), %rcx
movq %rcx, %rdx
subq %rax, %rdx
addq %rdx, %r12
cmpq %r12, %rcx
je 0x8ae5f
movq %r12, -0x38(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0x8aeba
movq -0x68(%rbp), %rax
movl (%rax), %ebx
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %r14
subq %rsi, %r14
sarq $0x2, %r14
movabsq $0xfc0fc0fc0fc0fc1, %rax # imm = 0xFC0FC0FC0FC0FC1
imulq %rax, %r14
cmpl %r14d, %ebx
movl %r14d, %eax
cmovbl %ebx, %eax
testl %eax, %eax
je 0x8aeac
movl %eax, %eax
movq %rax, %rcx
shlq $0x8, %rcx
leaq (%rcx,%rax,4), %rdx
movq -0x48(%rbp), %rdi
callq 0x80670
xorl %eax, %eax
cmpq %rbx, %r14
seta %al
leal (%rax,%rax,4), %r13d
jmp 0x8aed5
movq -0x38(%rbp), %rax
subq -0x40(%rbp), %rax
shrq $0x2, %rax
imull $0xc0fc0fc1, %eax, %eax # imm = 0xC0FC0FC1
movq -0x68(%rbp), %rcx
movl %eax, (%rcx)
xorl %r13d, %r13d
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x8aeea
movq -0x30(%rbp), %rsi
subq %rdi, %rsi
callq 0x7f6e0
movl %r13d, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x7ee10
movq %rax, %rbx
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x8af1b
movq -0x30(%rbp), %rsi
subq %rdi, %rsi
callq 0x7f6e0
movq %rbx, %rdi
callq 0x809f0
|
_ZL34EnumerateDeviceExtensionPropertiesP18VkPhysicalDevice_TPKcPjP21VkExtensionProperties:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov r14, rcx
mov rbx, rdx
mov r15, rsi
mov r12, rdi
mov r13, [rdi]
lea rdi, _ZL10globalLock; globalLock
call _pthread_mutex_lock
test eax, eax
jnz loc_8AEFC
mov rdi, cs:qword_5E3FD0
xor r9d, r9d
mov rax, r13
xor edx, edx
div rdi
mov rax, cs:_ZL12instanceData; instanceData
mov rax, [rax+rdx*8]
test rax, rax
jz short loc_8AC4E
mov r8, [rax]
mov r9, rax
cmp [r8+8], r13
jz short loc_8AC4E
mov rcx, rdx
loc_8AC1F:
mov r10, r8
mov r8, [r8]
test r8, r8
jz short loc_8AC4B
mov rsi, [r8+8]
mov rax, rsi
xor edx, edx
div rdi
mov r9d, 0
cmp rdx, rcx
jnz short loc_8AC4E
mov r9, r10
cmp rsi, r13
jnz short loc_8AC1F
jmp short loc_8AC4E
loc_8AC4B:
xor r9d, r9d
loc_8AC4E:
test r9, r9
jz short loc_8AC58
mov rax, [r9]
jmp short loc_8AC5A
loc_8AC58:
xor eax, eax
loc_8AC5A:
mov [rbp+var_68], rbx
test rax, rax
jz short loc_8AC69
mov rbx, [rax+10h]
jmp short loc_8AC6B
loc_8AC69:
xor ebx, ebx
loc_8AC6B:
lea rdi, _ZL10globalLock; globalLock
call _pthread_mutex_unlock
lea rdx, [rbp+var_4C]
mov dword ptr [rdx], 0
mov rdi, r12
mov rsi, r15
xor ecx, ecx
call qword ptr [rbx+18h]
mov r13d, eax
test eax, eax
jnz loc_8AEEA
mov [rbp+var_48], r14
lea r13, [rbp+var_4C]
mov esi, [r13+0]
lea r14, [rbp+var_40]
lea rdx, [rbp+var_60]
mov rdi, r14
call _ZNSt6vectorI21VkExtensionPropertiesSaIS0_EEC2EmRKS1_; std::vector<VkExtensionProperties>::vector(ulong,std::allocator<VkExtensionProperties> const&)
mov rcx, [r14]
mov rdi, r12
mov rsi, r15
mov rdx, r13
call qword ptr [rbx+18h]
mov r13d, eax
test eax, eax
mov rax, [rbp+var_48]
jnz loc_8AED5
mov r15, [rbp+var_40]
mov r14, [rbp+var_38]
mov [rbp+var_78], rbx
mov [rbp+var_70], rax
mov [rbp+var_60], rbx
mov [rbp+var_58], rax
mov rbx, r14
sub r14, r15
sar r14, 2
mov rax, 0FC0FC0FC0FC0FC1h
imul r14, rax
sar r14, 2
test r14, r14
jle short loc_8AD82
inc r14
lea r13, [rbp+var_60]
loc_8AD11:
mov rdi, r13
mov rsi, r15
call _ZN9__gnu_cxx5__ops10_Iter_predIZL34EnumerateDeviceExtensionPropertiesP18VkPhysicalDevice_TPKcPjP21VkExtensionPropertiesE3$_0EclINS_17__normal_iteratorIS8_St6vectorIS7_SaIS7_EEEEEEbT_; __gnu_cxx::__ops::_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T *,char const*,uint *,VkExtensionProperties *)::$_0>::operator()<__gnu_cxx::__normal_iterator<VkExtensionProperties *,std::vector<VkExtensionProperties>>>(__gnu_cxx::__normal_iterator<VkExtensionProperties *,std::vector<VkExtensionProperties>>)
test al, al
jnz loc_8ADEF
lea r12, [r15+104h]
mov rdi, r13
mov rsi, r12
call _ZN9__gnu_cxx5__ops10_Iter_predIZL34EnumerateDeviceExtensionPropertiesP18VkPhysicalDevice_TPKcPjP21VkExtensionPropertiesE3$_0EclINS_17__normal_iteratorIS8_St6vectorIS7_SaIS7_EEEEEEbT_; __gnu_cxx::__ops::_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T *,char const*,uint *,VkExtensionProperties *)::$_0>::operator()<__gnu_cxx::__normal_iterator<VkExtensionProperties *,std::vector<VkExtensionProperties>>>(__gnu_cxx::__normal_iterator<VkExtensionProperties *,std::vector<VkExtensionProperties>>)
test al, al
jnz loc_8ADF2
lea r12, [r15+208h]
mov rdi, r13
mov rsi, r12
call _ZN9__gnu_cxx5__ops10_Iter_predIZL34EnumerateDeviceExtensionPropertiesP18VkPhysicalDevice_TPKcPjP21VkExtensionPropertiesE3$_0EclINS_17__normal_iteratorIS8_St6vectorIS7_SaIS7_EEEEEEbT_; __gnu_cxx::__ops::_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T *,char const*,uint *,VkExtensionProperties *)::$_0>::operator()<__gnu_cxx::__normal_iterator<VkExtensionProperties *,std::vector<VkExtensionProperties>>>(__gnu_cxx::__normal_iterator<VkExtensionProperties *,std::vector<VkExtensionProperties>>)
test al, al
jnz loc_8ADF2
lea r12, [r15+30Ch]
mov rdi, r13
mov rsi, r12
call _ZN9__gnu_cxx5__ops10_Iter_predIZL34EnumerateDeviceExtensionPropertiesP18VkPhysicalDevice_TPKcPjP21VkExtensionPropertiesE3$_0EclINS_17__normal_iteratorIS8_St6vectorIS7_SaIS7_EEEEEEbT_; __gnu_cxx::__ops::_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T *,char const*,uint *,VkExtensionProperties *)::$_0>::operator()<__gnu_cxx::__normal_iterator<VkExtensionProperties *,std::vector<VkExtensionProperties>>>(__gnu_cxx::__normal_iterator<VkExtensionProperties *,std::vector<VkExtensionProperties>>)
test al, al
jnz loc_8ADF2
add r15, 410h
dec r14
cmp r14, 1
jg short loc_8AD11
loc_8AD82:
mov rax, rbx
sub rax, r15
sar rax, 2
mov rcx, 0FC0FC0FC0FC0FC1h
imul rax, rcx
cmp rax, 1
jz short loc_8ADDD
cmp rax, 2
jz short loc_8ADC6
mov r12, rbx
cmp rax, 3
jnz short loc_8ADF2
lea rdi, [rbp+var_60]
mov rsi, r15
call _ZN9__gnu_cxx5__ops10_Iter_predIZL34EnumerateDeviceExtensionPropertiesP18VkPhysicalDevice_TPKcPjP21VkExtensionPropertiesE3$_0EclINS_17__normal_iteratorIS8_St6vectorIS7_SaIS7_EEEEEEbT_; __gnu_cxx::__ops::_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T *,char const*,uint *,VkExtensionProperties *)::$_0>::operator()<__gnu_cxx::__normal_iterator<VkExtensionProperties *,std::vector<VkExtensionProperties>>>(__gnu_cxx::__normal_iterator<VkExtensionProperties *,std::vector<VkExtensionProperties>>)
test al, al
jnz short loc_8ADEF
add r15, 104h
loc_8ADC6:
lea rdi, [rbp+var_60]
mov rsi, r15
call _ZN9__gnu_cxx5__ops10_Iter_predIZL34EnumerateDeviceExtensionPropertiesP18VkPhysicalDevice_TPKcPjP21VkExtensionPropertiesE3$_0EclINS_17__normal_iteratorIS8_St6vectorIS7_SaIS7_EEEEEEbT_; __gnu_cxx::__ops::_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T *,char const*,uint *,VkExtensionProperties *)::$_0>::operator()<__gnu_cxx::__normal_iterator<VkExtensionProperties *,std::vector<VkExtensionProperties>>>(__gnu_cxx::__normal_iterator<VkExtensionProperties *,std::vector<VkExtensionProperties>>)
test al, al
jnz short loc_8ADEF
add r15, 104h
loc_8ADDD:
lea rdi, [rbp+var_60]
mov rsi, r15
call _ZN9__gnu_cxx5__ops10_Iter_predIZL34EnumerateDeviceExtensionPropertiesP18VkPhysicalDevice_TPKcPjP21VkExtensionPropertiesE3$_0EclINS_17__normal_iteratorIS8_St6vectorIS7_SaIS7_EEEEEEbT_; __gnu_cxx::__ops::_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T *,char const*,uint *,VkExtensionProperties *)::$_0>::operator()<__gnu_cxx::__normal_iterator<VkExtensionProperties *,std::vector<VkExtensionProperties>>>(__gnu_cxx::__normal_iterator<VkExtensionProperties *,std::vector<VkExtensionProperties>>)
test al, al
cmovz r15, rbx
loc_8ADEF:
mov r12, r15
loc_8ADF2:
cmp r12, rbx
setz al
lea r15, [r12+104h]
cmp r15, rbx
setz cl
or cl, al
jnz short loc_8AE40
lea r13, [rbp+var_78]
loc_8AE0E:
mov rdi, r13
mov rsi, r15
call _ZN9__gnu_cxx5__ops10_Iter_predIZL34EnumerateDeviceExtensionPropertiesP18VkPhysicalDevice_TPKcPjP21VkExtensionPropertiesE3$_0EclINS_17__normal_iteratorIS8_St6vectorIS7_SaIS7_EEEEEEbT_; __gnu_cxx::__ops::_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T *,char const*,uint *,VkExtensionProperties *)::$_0>::operator()<__gnu_cxx::__normal_iterator<VkExtensionProperties *,std::vector<VkExtensionProperties>>>(__gnu_cxx::__normal_iterator<VkExtensionProperties *,std::vector<VkExtensionProperties>>)
test al, al
jnz short loc_8AE34
mov edx, 104h
mov rdi, r12
mov rsi, r15
call _memcpy
add r12, 104h
loc_8AE34:
add r15, 104h
cmp r15, rbx
jnz short loc_8AE0E
loc_8AE40:
mov rax, [rbp+var_38]
cmp r12, rax
jz short loc_8AE5F
mov rcx, [rbp+var_38]
mov rdx, rcx
sub rdx, rax
add r12, rdx
cmp rcx, r12
jz short loc_8AE5F
mov [rbp+var_38], r12
loc_8AE5F:
cmp [rbp+var_48], 0
jz short loc_8AEBA
mov rax, [rbp+var_68]
mov ebx, [rax]
mov rsi, [rbp+var_40]
mov r14, [rbp+var_38]
sub r14, rsi
sar r14, 2
mov rax, 0FC0FC0FC0FC0FC1h
imul r14, rax
cmp ebx, r14d
mov eax, r14d
cmovb eax, ebx
test eax, eax
jz short loc_8AEAC
mov eax, eax
mov rcx, rax
shl rcx, 8
lea rdx, [rcx+rax*4]
mov rdi, [rbp+var_48]
call _memmove
loc_8AEAC:
xor eax, eax
cmp r14, rbx
setnbe al
lea r13d, [rax+rax*4]
jmp short loc_8AED5
loc_8AEBA:
mov rax, [rbp+var_38]
sub rax, [rbp+var_40]
shr rax, 2
imul eax, 0C0FC0FC1h
mov rcx, [rbp+var_68]
mov [rcx], eax
xor r13d, r13d
loc_8AED5:
mov rdi, [rbp+var_40]; void *
test rdi, rdi
jz short loc_8AEEA
mov rsi, [rbp+var_30]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8AEEA:
mov eax, r13d
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_8AEFC:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
mov rbx, rax
mov rdi, [rbp+var_40]; void *
test rdi, rdi
jz short loc_8AF1B
mov rsi, [rbp+var_30]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8AF1B:
mov rdi, rbx
call __Unwind_Resume
|
long long EnumerateDeviceExtensionProperties(unsigned long long *a1, long long a2, unsigned int *a3, long long a4)
{
unsigned long long v6; // r13
int v7; // eax
long long *v8; // r9
long long **v9; // rax
long long *v10; // r8
long long *v11; // r10
long long v12; // rax
long long v13; // rbx
unsigned int v14; // r13d
char *v15; // r15
char *v16; // rbx
long long v17; // r14
long long v18; // r14
char *v19; // r12
long long v20; // rax
char *v21; // r15
unsigned long long v22; // rbx
unsigned long long v23; // r14
unsigned int v24; // eax
_QWORD v26[2]; // [rsp+8h] [rbp-78h] BYREF
unsigned int *v27; // [rsp+18h] [rbp-68h]
_QWORD v28[2]; // [rsp+20h] [rbp-60h] BYREF
unsigned int v29; // [rsp+34h] [rbp-4Ch] BYREF
long long v30; // [rsp+38h] [rbp-48h]
void *v31; // [rsp+40h] [rbp-40h] BYREF
char *v32; // [rsp+48h] [rbp-38h]
long long v33; // [rsp+50h] [rbp-30h]
v6 = *a1;
v7 = pthread_mutex_lock(&globalLock);
if ( v7 )
std::__throw_system_error(v7);
v8 = 0LL;
v9 = *(long long ***)(instanceData + 8 * (v6 % qword_5E3FD0));
if ( v9 )
{
v10 = *v9;
v8 = *(long long **)(instanceData + 8 * (v6 % qword_5E3FD0));
if ( (*v9)[1] != v6 )
{
while ( 1 )
{
v11 = v10;
v10 = (long long *)*v10;
if ( !v10 )
break;
v8 = 0LL;
if ( v10[1] % (unsigned long long)qword_5E3FD0 == v6 % qword_5E3FD0 )
{
v8 = v11;
if ( v10[1] != v6 )
continue;
}
goto LABEL_9;
}
v8 = 0LL;
}
}
LABEL_9:
if ( v8 )
v12 = *v8;
else
v12 = 0LL;
v27 = a3;
if ( v12 )
v13 = *(_QWORD *)(v12 + 16);
else
v13 = 0LL;
pthread_mutex_unlock(&globalLock);
v29 = 0;
v14 = (*(long long ( **)(unsigned long long *, long long, unsigned int *, _QWORD))(v13 + 24))(a1, a2, &v29, 0LL);
if ( !v14 )
{
v30 = a4;
std::vector<VkExtensionProperties>::vector(&v31, v29, v28);
v14 = (*(long long ( **)(unsigned long long *, long long, unsigned int *, void *))(v13 + 24))(a1, a2, &v29, v31);
if ( v14 )
{
LABEL_47:
if ( v31 )
operator delete(v31, v33 - (_QWORD)v31);
return v14;
}
v15 = (char *)v31;
v26[0] = v13;
v26[1] = v30;
v28[0] = v13;
v28[1] = v30;
v16 = v32;
v17 = (0xFC0FC0FC0FC0FC1LL * ((v32 - (_BYTE *)v31) >> 2)) >> 2;
if ( v17 > 0 )
{
v18 = v17 + 1;
while ( !(unsigned __int8)__gnu_cxx::__ops::_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T *,char const*,unsigned int *,VkExtensionProperties *)::$_0>::operator()<__gnu_cxx::__normal_iterator<VkExtensionProperties *,std::vector<VkExtensionProperties>>>(
v28,
v15) )
{
v19 = v15 + 260;
if ( (unsigned __int8)__gnu_cxx::__ops::_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T *,char const*,unsigned int *,VkExtensionProperties *)::$_0>::operator()<__gnu_cxx::__normal_iterator<VkExtensionProperties *,std::vector<VkExtensionProperties>>>(
v28,
v15 + 260) )
goto LABEL_34;
v19 = v15 + 520;
if ( (unsigned __int8)__gnu_cxx::__ops::_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T *,char const*,unsigned int *,VkExtensionProperties *)::$_0>::operator()<__gnu_cxx::__normal_iterator<VkExtensionProperties *,std::vector<VkExtensionProperties>>>(
v28,
v15 + 520) )
goto LABEL_34;
v19 = v15 + 780;
if ( (unsigned __int8)__gnu_cxx::__ops::_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T *,char const*,unsigned int *,VkExtensionProperties *)::$_0>::operator()<__gnu_cxx::__normal_iterator<VkExtensionProperties *,std::vector<VkExtensionProperties>>>(
v28,
v15 + 780) )
goto LABEL_34;
v15 += 1040;
if ( --v18 <= 1 )
goto LABEL_24;
}
goto LABEL_33;
}
LABEL_24:
v20 = 0xFC0FC0FC0FC0FC1LL * ((v16 - v15) >> 2);
if ( v20 == 1 )
goto LABEL_31;
if ( v20 != 2 )
{
v19 = v16;
if ( v20 != 3 )
{
LABEL_34:
v21 = v19 + 260;
if ( v19 != v16 && v19 + 260 != v16 )
{
do
{
if ( !(unsigned __int8)__gnu_cxx::__ops::_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T *,char const*,unsigned int *,VkExtensionProperties *)::$_0>::operator()<__gnu_cxx::__normal_iterator<VkExtensionProperties *,std::vector<VkExtensionProperties>>>(
v26,
v21) )
{
memcpy(v19);
v19 += 260;
}
v21 += 260;
}
while ( v21 != v16 );
}
if ( v19 != v32 )
v32 = v19;
if ( v30 )
{
v22 = *v27;
v23 = 0xFC0FC0FC0FC0FC1LL * ((v32 - (_BYTE *)v31) >> 2);
v24 = -1057222719 * ((v32 - (_BYTE *)v31) >> 2);
if ( (unsigned int)v22 < (unsigned int)v23 )
v24 = *v27;
if ( v24 )
memmove(v30, v31, 260LL * v24);
v14 = 5 * (v23 > v22);
}
else
{
*v27 = -1057222719 * ((unsigned long long)(v32 - (_BYTE *)v31) >> 2);
v14 = 0;
}
goto LABEL_47;
}
if ( (unsigned __int8)__gnu_cxx::__ops::_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T *,char const*,unsigned int *,VkExtensionProperties *)::$_0>::operator()<__gnu_cxx::__normal_iterator<VkExtensionProperties *,std::vector<VkExtensionProperties>>>(
v28,
v15) )
goto LABEL_33;
v15 += 260;
}
if ( !(unsigned __int8)__gnu_cxx::__ops::_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T *,char const*,unsigned int *,VkExtensionProperties *)::$_0>::operator()<__gnu_cxx::__normal_iterator<VkExtensionProperties *,std::vector<VkExtensionProperties>>>(
v28,
v15) )
{
v15 += 260;
LABEL_31:
if ( !(unsigned __int8)__gnu_cxx::__ops::_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T *,char const*,unsigned int *,VkExtensionProperties *)::$_0>::operator()<__gnu_cxx::__normal_iterator<VkExtensionProperties *,std::vector<VkExtensionProperties>>>(
v28,
v15) )
v15 = v16;
}
LABEL_33:
v19 = v15;
goto LABEL_34;
}
return v14;
}
|
EnumerateDeviceExtensionProperties:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV R14,RCX
MOV RBX,RDX
MOV R15,RSI
MOV R12,RDI
MOV R13,qword ptr [RDI]
LEA RDI,[0x6e4038]
CALL 0x00180290
TEST EAX,EAX
JNZ 0x0018aefc
MOV RDI,qword ptr [0x006e3fd0]
XOR R9D,R9D
MOV RAX,R13
XOR EDX,EDX
DIV RDI
MOV RAX,qword ptr [0x006e3fc8]
MOV RAX,qword ptr [RAX + RDX*0x8]
TEST RAX,RAX
JZ 0x0018ac4e
MOV R8,qword ptr [RAX]
MOV R9,RAX
CMP qword ptr [R8 + 0x8],R13
JZ 0x0018ac4e
MOV RCX,RDX
LAB_0018ac1f:
MOV R10,R8
MOV R8,qword ptr [R8]
TEST R8,R8
JZ 0x0018ac4b
MOV RSI,qword ptr [R8 + 0x8]
MOV RAX,RSI
XOR EDX,EDX
DIV RDI
MOV R9D,0x0
CMP RDX,RCX
JNZ 0x0018ac4e
MOV R9,R10
CMP RSI,R13
JNZ 0x0018ac1f
JMP 0x0018ac4e
LAB_0018ac4b:
XOR R9D,R9D
LAB_0018ac4e:
TEST R9,R9
JZ 0x0018ac58
MOV RAX,qword ptr [R9]
JMP 0x0018ac5a
LAB_0018ac58:
XOR EAX,EAX
LAB_0018ac5a:
MOV qword ptr [RBP + -0x68],RBX
TEST RAX,RAX
JZ 0x0018ac69
MOV RBX,qword ptr [RAX + 0x10]
JMP 0x0018ac6b
LAB_0018ac69:
XOR EBX,EBX
LAB_0018ac6b:
LEA RDI,[0x6e4038]
CALL 0x0017efe0
LEA RDX,[RBP + -0x4c]
MOV dword ptr [RDX],0x0
MOV RDI,R12
MOV RSI,R15
XOR ECX,ECX
CALL qword ptr [RBX + 0x18]
MOV R13D,EAX
TEST EAX,EAX
JNZ 0x0018aeea
MOV qword ptr [RBP + -0x48],R14
LEA R13,[RBP + -0x4c]
MOV ESI,dword ptr [R13]
LEA R14,[RBP + -0x40]
LEA RDX,[RBP + -0x60]
MOV RDI,R14
CALL 0x0018e9dc
MOV RCX,qword ptr [R14]
LAB_0018acb6:
MOV RDI,R12
MOV RSI,R15
MOV RDX,R13
CALL qword ptr [RBX + 0x18]
LAB_0018acc2:
MOV R13D,EAX
TEST EAX,EAX
MOV RAX,qword ptr [RBP + -0x48]
JNZ 0x0018aed5
MOV R15,qword ptr [RBP + -0x40]
MOV R14,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x78],RBX
MOV qword ptr [RBP + -0x70],RAX
MOV qword ptr [RBP + -0x60],RBX
MOV qword ptr [RBP + -0x58],RAX
MOV RBX,R14
SUB R14,R15
SAR R14,0x2
MOV RAX,0xfc0fc0fc0fc0fc1
IMUL R14,RAX
SAR R14,0x2
TEST R14,R14
JLE 0x0018ad82
INC R14
LEA R13,[RBP + -0x60]
LAB_0018ad11:
MOV RDI,R13
MOV RSI,R15
CALL 0x0018b130
TEST AL,AL
JNZ 0x0018adef
LEA R12,[R15 + 0x104]
MOV RDI,R13
MOV RSI,R12
CALL 0x0018b130
TEST AL,AL
JNZ 0x0018adf2
LEA R12,[R15 + 0x208]
MOV RDI,R13
MOV RSI,R12
CALL 0x0018b130
TEST AL,AL
JNZ 0x0018adf2
LEA R12,[R15 + 0x30c]
MOV RDI,R13
MOV RSI,R12
CALL 0x0018b130
TEST AL,AL
JNZ 0x0018adf2
ADD R15,0x410
DEC R14
CMP R14,0x1
JG 0x0018ad11
LAB_0018ad82:
MOV RAX,RBX
SUB RAX,R15
SAR RAX,0x2
MOV RCX,0xfc0fc0fc0fc0fc1
IMUL RAX,RCX
CMP RAX,0x1
JZ 0x0018addd
CMP RAX,0x2
JZ 0x0018adc6
MOV R12,RBX
CMP RAX,0x3
JNZ 0x0018adf2
LEA RDI,[RBP + -0x60]
MOV RSI,R15
CALL 0x0018b130
TEST AL,AL
JNZ 0x0018adef
ADD R15,0x104
LAB_0018adc6:
LEA RDI,[RBP + -0x60]
MOV RSI,R15
CALL 0x0018b130
TEST AL,AL
JNZ 0x0018adef
ADD R15,0x104
LAB_0018addd:
LEA RDI,[RBP + -0x60]
MOV RSI,R15
CALL 0x0018b130
TEST AL,AL
CMOVZ R15,RBX
LAB_0018adef:
MOV R12,R15
LAB_0018adf2:
CMP R12,RBX
SETZ AL
LEA R15,[R12 + 0x104]
CMP R15,RBX
SETZ CL
OR CL,AL
JNZ 0x0018ae40
LEA R13,[RBP + -0x78]
LAB_0018ae0e:
MOV RDI,R13
MOV RSI,R15
CALL 0x0018b130
TEST AL,AL
JNZ 0x0018ae34
MOV EDX,0x104
MOV RDI,R12
MOV RSI,R15
CALL 0x0017f1b0
ADD R12,0x104
LAB_0018ae34:
ADD R15,0x104
CMP R15,RBX
JNZ 0x0018ae0e
LAB_0018ae40:
MOV RAX,qword ptr [RBP + -0x38]
CMP R12,RAX
JZ 0x0018ae5f
MOV RCX,qword ptr [RBP + -0x38]
MOV RDX,RCX
SUB RDX,RAX
ADD R12,RDX
CMP RCX,R12
JZ 0x0018ae5f
MOV qword ptr [RBP + -0x38],R12
LAB_0018ae5f:
CMP qword ptr [RBP + -0x48],0x0
JZ 0x0018aeba
MOV RAX,qword ptr [RBP + -0x68]
MOV EBX,dword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x40]
MOV R14,qword ptr [RBP + -0x38]
SUB R14,RSI
SAR R14,0x2
MOV RAX,0xfc0fc0fc0fc0fc1
IMUL R14,RAX
CMP EBX,R14D
MOV EAX,R14D
CMOVC EAX,EBX
TEST EAX,EAX
JZ 0x0018aeac
MOV EAX,EAX
MOV RCX,RAX
SHL RCX,0x8
LEA RDX,[RCX + RAX*0x4]
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x00180670
LAB_0018aeac:
XOR EAX,EAX
CMP R14,RBX
SETA AL
LEA R13D,[RAX + RAX*0x4]
JMP 0x0018aed5
LAB_0018aeba:
MOV RAX,qword ptr [RBP + -0x38]
SUB RAX,qword ptr [RBP + -0x40]
SHR RAX,0x2
IMUL EAX,EAX,-0x3f03f03f
MOV RCX,qword ptr [RBP + -0x68]
MOV dword ptr [RCX],EAX
XOR R13D,R13D
LAB_0018aed5:
MOV RDI,qword ptr [RBP + -0x40]
TEST RDI,RDI
JZ 0x0018aeea
MOV RSI,qword ptr [RBP + -0x30]
SUB RSI,RDI
CALL 0x0017f6e0
LAB_0018aeea:
MOV EAX,R13D
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0018aefc:
MOV EDI,EAX
CALL 0x0017ee10
|
/* EnumerateDeviceExtensionProperties(VkPhysicalDevice_T*, char const*, unsigned int*,
VkExtensionProperties*) */
int EnumerateDeviceExtensionProperties
(VkPhysicalDevice_T *param_1,char *param_2,uint *param_3,
VkExtensionProperties *param_4)
{
uint uVar1;
long *plVar2;
void *pvVar3;
bool bVar4;
int iVar5;
long lVar6;
ulong uVar7;
long *plVar8;
long *plVar9;
void *__dest;
long lVar10;
ulong uVar11;
void *pvVar12;
long local_80;
VkExtensionProperties *local_78;
uint *local_70;
long local_68;
VkExtensionProperties *local_60;
uint local_54;
VkExtensionProperties *local_50;
void *local_48;
void *local_40;
long local_38;
uVar7 = *(ulong *)param_1;
iVar5 = pthread_mutex_lock((pthread_mutex_t *)globalLock);
if (iVar5 != 0) {
/* WARNING: Subroutine does not return */
std::__throw_system_error(iVar5);
}
plVar8 = *(long **)(instanceData + (uVar7 % DAT_006e3fd0) * 8);
plVar9 = (long *)0x0;
if ((plVar8 != (long *)0x0) &&
(plVar2 = (long *)*plVar8, plVar9 = plVar8, ((long *)*plVar8)[1] != uVar7)) {
while (plVar8 = plVar2, plVar2 = (long *)*plVar8, plVar2 != (long *)0x0) {
plVar9 = (long *)0x0;
if (((ulong)plVar2[1] % DAT_006e3fd0 != uVar7 % DAT_006e3fd0) ||
(plVar9 = plVar8, plVar2[1] == uVar7)) goto LAB_0018ac4e;
}
plVar9 = (long *)0x0;
}
LAB_0018ac4e:
if (plVar9 == (long *)0x0) {
lVar6 = 0;
}
else {
lVar6 = *plVar9;
}
if (lVar6 == 0) {
lVar6 = 0;
}
else {
lVar6 = *(long *)(lVar6 + 0x10);
}
local_70 = param_3;
pthread_mutex_unlock((pthread_mutex_t *)globalLock);
local_54 = 0;
iVar5 = (**(code **)(lVar6 + 0x18))(param_1,param_2,&local_54,0);
if (iVar5 != 0) {
return iVar5;
}
local_50 = param_4;
std::vector<VkExtensionProperties,std::allocator<VkExtensionProperties>>::vector
((ulong)&local_48,(allocator *)(ulong)local_54);
/* try { // try from 0018acb6 to 0018acc1 has its CatchHandler @ 0018af03 */
iVar5 = (**(code **)(lVar6 + 0x18))(param_1,param_2,&local_54,local_48);
pvVar3 = local_40;
if (iVar5 != 0) goto LAB_0018aed5;
local_78 = local_50;
local_60 = local_50;
lVar10 = ((long)local_40 - (long)local_48 >> 2) * 0xfc0fc0fc0fc0fc1 >> 2;
pvVar12 = local_48;
local_80 = lVar6;
local_68 = lVar6;
if (0 < lVar10) {
lVar10 = lVar10 + 1;
do {
bVar4 = __gnu_cxx::__ops::
_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T*,char_const*,unsigned_int*,VkExtensionProperties*)::$_0>
::operator()((_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T*,char_const*,unsigned_int*,VkExtensionProperties*)::__0>
*)&local_68,pvVar12);
__dest = pvVar12;
if (bVar4) goto LAB_0018adf2;
bVar4 = __gnu_cxx::__ops::
_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T*,char_const*,unsigned_int*,VkExtensionProperties*)::$_0>
::operator()((_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T*,char_const*,unsigned_int*,VkExtensionProperties*)::__0>
*)&local_68,(void *)((long)pvVar12 + 0x104));
__dest = (void *)((long)pvVar12 + 0x104);
if (bVar4) goto LAB_0018adf2;
bVar4 = __gnu_cxx::__ops::
_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T*,char_const*,unsigned_int*,VkExtensionProperties*)::$_0>
::operator()((_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T*,char_const*,unsigned_int*,VkExtensionProperties*)::__0>
*)&local_68,(void *)((long)pvVar12 + 0x208));
__dest = (void *)((long)pvVar12 + 0x208);
if (bVar4) goto LAB_0018adf2;
bVar4 = __gnu_cxx::__ops::
_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T*,char_const*,unsigned_int*,VkExtensionProperties*)::$_0>
::operator()((_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T*,char_const*,unsigned_int*,VkExtensionProperties*)::__0>
*)&local_68,(void *)((long)pvVar12 + 0x30c));
__dest = (void *)((long)pvVar12 + 0x30c);
if (bVar4) goto LAB_0018adf2;
pvVar12 = (void *)((long)pvVar12 + 0x410);
lVar10 = lVar10 + -1;
} while (1 < lVar10);
}
lVar6 = ((long)pvVar3 - (long)pvVar12 >> 2) * 0xfc0fc0fc0fc0fc1;
if (lVar6 == 1) {
LAB_0018addd:
bVar4 = __gnu_cxx::__ops::
_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T*,char_const*,unsigned_int*,VkExtensionProperties*)::$_0>
::operator()((_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T*,char_const*,unsigned_int*,VkExtensionProperties*)::__0>
*)&local_68,pvVar12);
__dest = pvVar12;
if (!bVar4) {
__dest = pvVar3;
}
}
else if (lVar6 == 2) {
LAB_0018adc6:
bVar4 = __gnu_cxx::__ops::
_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T*,char_const*,unsigned_int*,VkExtensionProperties*)::$_0>
::operator()((_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T*,char_const*,unsigned_int*,VkExtensionProperties*)::__0>
*)&local_68,pvVar12);
__dest = pvVar12;
if (!bVar4) {
pvVar12 = (void *)((long)pvVar12 + 0x104);
goto LAB_0018addd;
}
}
else {
__dest = pvVar3;
if ((lVar6 == 3) &&
(bVar4 = __gnu_cxx::__ops::
_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T*,char_const*,unsigned_int*,VkExtensionProperties*)::$_0>
::operator()((_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T*,char_const*,unsigned_int*,VkExtensionProperties*)::__0>
*)&local_68,pvVar12), __dest = pvVar12, !bVar4)) {
pvVar12 = (void *)((long)pvVar12 + 0x104);
goto LAB_0018adc6;
}
}
LAB_0018adf2:
pvVar12 = (void *)((long)__dest + 0x104);
if (pvVar12 != pvVar3 && __dest != pvVar3) {
do {
bVar4 = __gnu_cxx::__ops::
_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T*,char_const*,unsigned_int*,VkExtensionProperties*)::$_0>
::operator()((_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T*,char_const*,unsigned_int*,VkExtensionProperties*)::__0>
*)&local_80,pvVar12);
if (!bVar4) {
memcpy(__dest,pvVar12,0x104);
__dest = (void *)((long)__dest + 0x104);
}
pvVar12 = (void *)((long)pvVar12 + 0x104);
} while (pvVar12 != pvVar3);
}
if ((__dest != local_40) && (local_40 != __dest)) {
local_40 = __dest;
}
if (local_50 == (VkExtensionProperties *)0x0) {
*local_70 = (int)((ulong)((long)local_40 - (long)local_48) >> 2) * -0x3f03f03f;
iVar5 = 0;
}
else {
uVar1 = *local_70;
uVar11 = ((long)local_40 - (long)local_48 >> 2) * 0xfc0fc0fc0fc0fc1;
uVar7 = uVar11 & 0xffffffff;
if (uVar1 < (uint)uVar11) {
uVar7 = (ulong)uVar1;
}
if ((int)uVar7 != 0) {
memmove(local_50,local_48,uVar7 * 0x104);
}
iVar5 = (uint)(uVar1 <= uVar11 && uVar11 - uVar1 != 0) * 5;
}
LAB_0018aed5:
if (local_48 != (void *)0x0) {
operator_delete(local_48,local_38 - (long)local_48);
}
return iVar5;
}
|
|
14,629
|
EnumerateDeviceExtensionProperties(VkPhysicalDevice_T*, char const*, unsigned int*, VkExtensionProperties*)
|
HansKristian-Work[P]pyroveil/layer/pyroveil.cpp
|
static VKAPI_ATTR VkResult VKAPI_CALL EnumerateDeviceExtensionProperties(
VkPhysicalDevice physicalDevice, const char *pLayerName, uint32_t *pPropertyCount, VkExtensionProperties *pProperties)
{
auto *layer = getInstanceLayer(physicalDevice);
uint32_t count = 0;
VkResult vr;
vr = layer->getTable()->EnumerateDeviceExtensionProperties(physicalDevice, pLayerName, &count, nullptr);
if (vr)
return vr;
std::vector<VkExtensionProperties> props(count);
vr = layer->getTable()->EnumerateDeviceExtensionProperties(physicalDevice, pLayerName, &count, props.data());
if (vr)
return vr;
// Filter out extensions we cannot deal with yet in SPIRV-Cross.
auto itr = std::remove_if(props.begin(), props.end(), [layer, pProperties](const VkExtensionProperties &ext) {
for (auto &disabledExt : layer->disabledExtensions)
{
if (disabledExt == ext.extensionName)
{
// Only log once.
if (pProperties)
fprintf(stderr, "pyroveil: Disabling extension %s.\n", ext.extensionName);
return true;
}
}
return false;
});
props.erase(itr, props.end());
if (!pProperties)
{
*pPropertyCount = uint32_t(props.size());
vr = VK_SUCCESS;
}
else
{
vr = *pPropertyCount < props.size() ? VK_INCOMPLETE : VK_SUCCESS;
auto to_copy = std::min<uint32_t>(*pPropertyCount, props.size());
std::copy(props.begin(), props.begin() + to_copy, pProperties);
}
return vr;
}
|
O2
|
cpp
|
EnumerateDeviceExtensionProperties(VkPhysicalDevice_T*, char const*, unsigned int*, VkExtensionProperties*):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rcx, -0x38(%rbp)
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, %r15
callq 0xab3a9
movq %rax, %rbx
leaq -0x3c(%rbp), %rdx
andl $0x0, (%rdx)
movq %r15, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
callq *0x18(%rax)
movl %eax, %r12d
testl %eax, %eax
jne 0xab326
movq %r13, -0x70(%rbp)
leaq -0x3c(%rbp), %r12
movl (%r12), %esi
leaq -0x58(%rbp), %r13
leaq -0x68(%rbp), %rdx
movq %r13, %rdi
callq 0xaef82
movq (%r13), %rcx
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq *0x18(%rbx)
movl %eax, %r12d
testl %eax, %eax
jne 0xab31d
movq -0x58(%rbp), %r12
movq -0x50(%rbp), %r15
movq %rbx, -0x80(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x78(%rbp)
leaq -0x68(%rbp), %r14
movq %rbx, (%r14)
movq %rax, 0x8(%r14)
movq %r15, -0x30(%rbp)
subq %r12, %r15
movl $0x104, %ecx # imm = 0x104
movq %r15, %rax
cqto
idivq %rcx
movq %rax, %rbx
sarq $0x2, %rbx
testq %rbx, %rbx
jle 0xab1f4
movq %r14, %rdi
movq %r12, %rsi
callq 0xab3f6
testb %al, %al
jne 0xab258
leaq 0x104(%r12), %r13
movq %r14, %rdi
movq %r13, %rsi
callq 0xab3f6
testb %al, %al
jne 0xab25b
leaq 0x208(%r12), %r13
movq %r14, %rdi
movq %r13, %rsi
callq 0xab3f6
testb %al, %al
jne 0xab25b
leaq 0x30c(%r12), %r13
movq %r14, %rdi
movq %r13, %rsi
callq 0xab3f6
testb %al, %al
jne 0xab25b
addq $0x410, %r12 # imm = 0x410
decq %rbx
addq $-0x410, %r15 # imm = 0xFBF0
jmp 0xab17c
movl $0x104, %ecx # imm = 0x104
movq %r15, %rax
cqto
idivq %rcx
cmpq $0x1, %rax
je 0xab245
cmpq $0x2, %rax
je 0xab22e
cmpq $0x3, %rax
jne 0xab338
leaq -0x68(%rbp), %rdi
movq %r12, %rsi
callq 0xab3f6
testb %al, %al
jne 0xab258
addq $0x104, %r12 # imm = 0x104
leaq -0x68(%rbp), %rdi
movq %r12, %rsi
callq 0xab3f6
testb %al, %al
jne 0xab258
addq $0x104, %r12 # imm = 0x104
leaq -0x68(%rbp), %rdi
movq %r12, %rsi
callq 0xab3f6
testb %al, %al
cmoveq -0x30(%rbp), %r12
movq %r12, %r13
movq -0x30(%rbp), %r12
cmpq %r12, %r13
movq -0x38(%rbp), %r15
je 0xab2a8
leaq -0x80(%rbp), %rbx
movq %r13, %r14
addq $0x104, %r13 # imm = 0x104
cmpq %r12, %r13
je 0xab2a3
movq %rbx, %rdi
movq %r13, %rsi
callq 0xab3f6
testb %al, %al
jne 0xab26f
movl $0x104, %edx # imm = 0x104
movq %r14, %rdi
movq %r13, %rsi
callq 0xa25c0
addq $0x104, %r14 # imm = 0x104
jmp 0xab26f
movq %r14, %rsi
jmp 0xab2ab
movq %r13, %rsi
leaq -0x58(%rbp), %rdi
movq 0x8(%rdi), %rdx
callq 0xaefd4
testq %r15, %r15
movq -0x70(%rbp), %rsi
je 0xab306
movl (%rsi), %r14d
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rax
subq %rsi, %rax
movl $0x104, %ecx # imm = 0x104
cqto
idivq %rcx
movq %rax, %rbx
cmpl %ebx, %r14d
cmovbl %r14d, %eax
testl %eax, %eax
je 0xab2f8
movl %eax, %eax
imulq $0x104, %rax, %rdx # imm = 0x104
movq %r15, %rdi
callq 0xa4ed0
xorl %eax, %eax
cmpq %r14, %rbx
seta %al
leal (%rax,%rax,4), %r12d
jmp 0xab31d
movq -0x50(%rbp), %rax
subq -0x58(%rbp), %rax
movl $0x104, %ecx # imm = 0x104
cqto
idivq %rcx
movl %eax, (%rsi)
xorl %r12d, %r12d
leaq -0x58(%rbp), %rdi
callq 0xaf01e
movl %r12d, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq -0x38(%rbp), %r15
movq -0x30(%rbp), %rsi
jmp 0xab2ab
jmp 0xab347
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0xaf01e
movq %rbx, %rdi
callq 0xa55e0
|
_ZL34EnumerateDeviceExtensionPropertiesP18VkPhysicalDevice_TPKcPjP21VkExtensionProperties:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov [rbp+var_38], rcx
mov r13, rdx
mov r14, rsi
mov r15, rdi
call _ZL16getInstanceLayerP18VkPhysicalDevice_T; getInstanceLayer(VkPhysicalDevice_T *)
mov rbx, rax
lea rdx, [rbp+var_3C]
and dword ptr [rdx], 0
mov rdi, r15
mov rsi, r14
xor ecx, ecx
call qword ptr [rax+18h]
mov r12d, eax
test eax, eax
jnz loc_AB326
mov [rbp+var_70], r13
lea r12, [rbp+var_3C]
mov esi, [r12]
lea r13, [rbp+var_58]
lea rdx, [rbp+var_68]
mov rdi, r13
call _ZNSt6vectorI21VkExtensionPropertiesSaIS0_EEC2EmRKS1_; std::vector<VkExtensionProperties>::vector(ulong,std::allocator<VkExtensionProperties> const&)
mov rcx, [r13+0]
mov rdi, r15
mov rsi, r14
mov rdx, r12
call qword ptr [rbx+18h]
mov r12d, eax
test eax, eax
jnz loc_AB31D
mov r12, [rbp+var_58]
mov r15, [rbp+var_50]
mov [rbp+var_80], rbx
mov rax, [rbp+var_38]
mov [rbp+var_78], rax
lea r14, [rbp+var_68]
mov [r14], rbx
mov [r14+8], rax
mov [rbp+var_30], r15
sub r15, r12
mov ecx, 104h
mov rax, r15
cqo
idiv rcx
mov rbx, rax
sar rbx, 2
loc_AB17C:
test rbx, rbx
jle short loc_AB1F4
mov rdi, r14
mov rsi, r12
call _ZN9__gnu_cxx5__ops10_Iter_predIZL34EnumerateDeviceExtensionPropertiesP18VkPhysicalDevice_TPKcPjP21VkExtensionPropertiesE3$_0EclINS_17__normal_iteratorIS8_St6vectorIS7_SaIS7_EEEEEEbT_; __gnu_cxx::__ops::_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T *,char const*,uint *,VkExtensionProperties *)::$_0>::operator()<__gnu_cxx::__normal_iterator<VkExtensionProperties *,std::vector<VkExtensionProperties>>>(__gnu_cxx::__normal_iterator<VkExtensionProperties *,std::vector<VkExtensionProperties>>)
test al, al
jnz loc_AB258
lea r13, [r12+104h]
mov rdi, r14
mov rsi, r13
call _ZN9__gnu_cxx5__ops10_Iter_predIZL34EnumerateDeviceExtensionPropertiesP18VkPhysicalDevice_TPKcPjP21VkExtensionPropertiesE3$_0EclINS_17__normal_iteratorIS8_St6vectorIS7_SaIS7_EEEEEEbT_; __gnu_cxx::__ops::_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T *,char const*,uint *,VkExtensionProperties *)::$_0>::operator()<__gnu_cxx::__normal_iterator<VkExtensionProperties *,std::vector<VkExtensionProperties>>>(__gnu_cxx::__normal_iterator<VkExtensionProperties *,std::vector<VkExtensionProperties>>)
test al, al
jnz loc_AB25B
lea r13, [r12+208h]
mov rdi, r14
mov rsi, r13
call _ZN9__gnu_cxx5__ops10_Iter_predIZL34EnumerateDeviceExtensionPropertiesP18VkPhysicalDevice_TPKcPjP21VkExtensionPropertiesE3$_0EclINS_17__normal_iteratorIS8_St6vectorIS7_SaIS7_EEEEEEbT_; __gnu_cxx::__ops::_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T *,char const*,uint *,VkExtensionProperties *)::$_0>::operator()<__gnu_cxx::__normal_iterator<VkExtensionProperties *,std::vector<VkExtensionProperties>>>(__gnu_cxx::__normal_iterator<VkExtensionProperties *,std::vector<VkExtensionProperties>>)
test al, al
jnz loc_AB25B
lea r13, [r12+30Ch]
mov rdi, r14
mov rsi, r13
call _ZN9__gnu_cxx5__ops10_Iter_predIZL34EnumerateDeviceExtensionPropertiesP18VkPhysicalDevice_TPKcPjP21VkExtensionPropertiesE3$_0EclINS_17__normal_iteratorIS8_St6vectorIS7_SaIS7_EEEEEEbT_; __gnu_cxx::__ops::_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T *,char const*,uint *,VkExtensionProperties *)::$_0>::operator()<__gnu_cxx::__normal_iterator<VkExtensionProperties *,std::vector<VkExtensionProperties>>>(__gnu_cxx::__normal_iterator<VkExtensionProperties *,std::vector<VkExtensionProperties>>)
test al, al
jnz short loc_AB25B
add r12, 410h
dec rbx
add r15, 0FFFFFFFFFFFFFBF0h
jmp short loc_AB17C
loc_AB1F4:
mov ecx, 104h
mov rax, r15
cqo
idiv rcx
cmp rax, 1
jz short loc_AB245
cmp rax, 2
jz short loc_AB22E
cmp rax, 3
jnz loc_AB338
lea rdi, [rbp+var_68]
mov rsi, r12
call _ZN9__gnu_cxx5__ops10_Iter_predIZL34EnumerateDeviceExtensionPropertiesP18VkPhysicalDevice_TPKcPjP21VkExtensionPropertiesE3$_0EclINS_17__normal_iteratorIS8_St6vectorIS7_SaIS7_EEEEEEbT_; __gnu_cxx::__ops::_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T *,char const*,uint *,VkExtensionProperties *)::$_0>::operator()<__gnu_cxx::__normal_iterator<VkExtensionProperties *,std::vector<VkExtensionProperties>>>(__gnu_cxx::__normal_iterator<VkExtensionProperties *,std::vector<VkExtensionProperties>>)
test al, al
jnz short loc_AB258
add r12, 104h
loc_AB22E:
lea rdi, [rbp+var_68]
mov rsi, r12
call _ZN9__gnu_cxx5__ops10_Iter_predIZL34EnumerateDeviceExtensionPropertiesP18VkPhysicalDevice_TPKcPjP21VkExtensionPropertiesE3$_0EclINS_17__normal_iteratorIS8_St6vectorIS7_SaIS7_EEEEEEbT_; __gnu_cxx::__ops::_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T *,char const*,uint *,VkExtensionProperties *)::$_0>::operator()<__gnu_cxx::__normal_iterator<VkExtensionProperties *,std::vector<VkExtensionProperties>>>(__gnu_cxx::__normal_iterator<VkExtensionProperties *,std::vector<VkExtensionProperties>>)
test al, al
jnz short loc_AB258
add r12, 104h
loc_AB245:
lea rdi, [rbp+var_68]
mov rsi, r12
call _ZN9__gnu_cxx5__ops10_Iter_predIZL34EnumerateDeviceExtensionPropertiesP18VkPhysicalDevice_TPKcPjP21VkExtensionPropertiesE3$_0EclINS_17__normal_iteratorIS8_St6vectorIS7_SaIS7_EEEEEEbT_; __gnu_cxx::__ops::_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T *,char const*,uint *,VkExtensionProperties *)::$_0>::operator()<__gnu_cxx::__normal_iterator<VkExtensionProperties *,std::vector<VkExtensionProperties>>>(__gnu_cxx::__normal_iterator<VkExtensionProperties *,std::vector<VkExtensionProperties>>)
test al, al
cmovz r12, [rbp+var_30]
loc_AB258:
mov r13, r12
loc_AB25B:
mov r12, [rbp+var_30]
cmp r13, r12
mov r15, [rbp+var_38]
jz short loc_AB2A8
lea rbx, [rbp+var_80]
mov r14, r13
loc_AB26F:
add r13, 104h
cmp r13, r12
jz short loc_AB2A3
mov rdi, rbx
mov rsi, r13
call _ZN9__gnu_cxx5__ops10_Iter_predIZL34EnumerateDeviceExtensionPropertiesP18VkPhysicalDevice_TPKcPjP21VkExtensionPropertiesE3$_0EclINS_17__normal_iteratorIS8_St6vectorIS7_SaIS7_EEEEEEbT_; __gnu_cxx::__ops::_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T *,char const*,uint *,VkExtensionProperties *)::$_0>::operator()<__gnu_cxx::__normal_iterator<VkExtensionProperties *,std::vector<VkExtensionProperties>>>(__gnu_cxx::__normal_iterator<VkExtensionProperties *,std::vector<VkExtensionProperties>>)
test al, al
jnz short loc_AB26F
mov edx, 104h
mov rdi, r14
mov rsi, r13
call _memcpy
add r14, 104h
jmp short loc_AB26F
loc_AB2A3:
mov rsi, r14
jmp short loc_AB2AB
loc_AB2A8:
mov rsi, r13
loc_AB2AB:
lea rdi, [rbp+var_58]
mov rdx, [rdi+8]
call _ZNSt6vectorI21VkExtensionPropertiesSaIS0_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS0_S2_EES7_; std::vector<VkExtensionProperties>::erase(__gnu_cxx::__normal_iterator<VkExtensionProperties const*,std::vector<VkExtensionProperties>>,__gnu_cxx::__normal_iterator<VkExtensionProperties const*,std::vector<VkExtensionProperties>>)
test r15, r15
mov rsi, [rbp+var_70]
jz short loc_AB306
mov r14d, [rsi]
mov rsi, [rbp+var_58]
mov rax, [rbp+var_50]
sub rax, rsi
mov ecx, 104h
cqo
idiv rcx
mov rbx, rax
cmp r14d, ebx
cmovb eax, r14d
test eax, eax
jz short loc_AB2F8
mov eax, eax
imul rdx, rax, 104h
mov rdi, r15
call _memmove
loc_AB2F8:
xor eax, eax
cmp rbx, r14
setnbe al
lea r12d, [rax+rax*4]
jmp short loc_AB31D
loc_AB306:
mov rax, [rbp+var_50]
sub rax, [rbp+var_58]
mov ecx, 104h
cqo
idiv rcx
mov [rsi], eax
xor r12d, r12d
loc_AB31D:
lea rdi, [rbp+var_58]
call _ZNSt12_Vector_baseI21VkExtensionPropertiesSaIS0_EED2Ev; std::_Vector_base<VkExtensionProperties>::~_Vector_base()
loc_AB326:
mov eax, r12d
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_AB338:
mov r15, [rbp+var_38]
mov rsi, [rbp+var_30]
jmp loc_AB2AB
jmp short $+2
loc_AB347:
mov rbx, rax
lea rdi, [rbp+var_58]
call _ZNSt12_Vector_baseI21VkExtensionPropertiesSaIS0_EED2Ev; std::_Vector_base<VkExtensionProperties>::~_Vector_base()
mov rdi, rbx
call __Unwind_Resume
|
long long EnumerateDeviceExtensionProperties(long long a1, _DWORD *a2, _DWORD *a3, long long a4)
{
long long InstanceLayer; // rbx
unsigned int v6; // r12d
long long v7; // rdx
_DWORD *v8; // r12
long long v9; // r15
long long v10; // rdx
long long i; // rbx
_DWORD *v12; // r13
long long v13; // rax
_DWORD *v14; // r12
long long v15; // r15
_DWORD *v16; // r14
_DWORD *v17; // rsi
unsigned long long v18; // r14
long long v19; // rax
unsigned long long v20; // rbx
_QWORD v22[2]; // [rsp+0h] [rbp-80h] BYREF
_DWORD *v23; // [rsp+10h] [rbp-70h]
_QWORD v24[2]; // [rsp+18h] [rbp-68h] BYREF
_DWORD *v25; // [rsp+28h] [rbp-58h] BYREF
_DWORD *v26; // [rsp+30h] [rbp-50h]
unsigned int v27; // [rsp+44h] [rbp-3Ch] BYREF
long long v28; // [rsp+48h] [rbp-38h]
_DWORD *v29; // [rsp+50h] [rbp-30h]
v28 = a4;
InstanceLayer = getInstanceLayer();
v27 = 0;
v6 = (*(long long ( **)(long long, _DWORD *, unsigned int *, _QWORD))(InstanceLayer + 24))(a1, a2, &v27, 0LL);
if ( !v6 )
{
v23 = a3;
std::vector<VkExtensionProperties>::vector(&v25, v27, v24);
v6 = (*(long long ( **)(long long, _DWORD *, unsigned int *, _DWORD *))(InstanceLayer + 24))(
a1,
a2,
&v27,
v25);
if ( v6 )
{
LABEL_34:
std::_Vector_base<VkExtensionProperties>::~_Vector_base(&v25, a2, v7);
return v6;
}
v8 = v25;
v22[0] = InstanceLayer;
v22[1] = v28;
v24[0] = InstanceLayer;
v24[1] = v28;
v29 = v26;
v9 = (char *)v26 - (char *)v25;
v10 = ((char *)v26 - (char *)v25) % 260;
for ( i = (((char *)v26 - (char *)v25) / 260) >> 2; i > 0; --i )
{
if ( (unsigned __int8)__gnu_cxx::__ops::_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T *,char const*,unsigned int *,VkExtensionProperties *)::$_0>::operator()<__gnu_cxx::__normal_iterator<VkExtensionProperties *,std::vector<VkExtensionProperties>>>(
v24,
v8,
v10) )
goto LABEL_19;
v12 = v8 + 65;
if ( (unsigned __int8)__gnu_cxx::__ops::_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T *,char const*,unsigned int *,VkExtensionProperties *)::$_0>::operator()<__gnu_cxx::__normal_iterator<VkExtensionProperties *,std::vector<VkExtensionProperties>>>(
v24,
v8 + 65,
v10) )
goto LABEL_20;
v12 = v8 + 130;
if ( (unsigned __int8)__gnu_cxx::__ops::_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T *,char const*,unsigned int *,VkExtensionProperties *)::$_0>::operator()<__gnu_cxx::__normal_iterator<VkExtensionProperties *,std::vector<VkExtensionProperties>>>(
v24,
v8 + 130,
v10) )
goto LABEL_20;
v12 = v8 + 195;
if ( (unsigned __int8)__gnu_cxx::__ops::_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T *,char const*,unsigned int *,VkExtensionProperties *)::$_0>::operator()<__gnu_cxx::__normal_iterator<VkExtensionProperties *,std::vector<VkExtensionProperties>>>(
v24,
v8 + 195,
v10) )
goto LABEL_20;
v8 += 260;
v9 -= 1040LL;
}
v13 = v9 / 260;
v10 = v9 % 260;
if ( v9 / 260 != 1 )
{
if ( v13 != 2 )
{
if ( v13 != 3 )
{
v15 = v28;
v17 = v29;
goto LABEL_27;
}
if ( (unsigned __int8)__gnu_cxx::__ops::_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T *,char const*,unsigned int *,VkExtensionProperties *)::$_0>::operator()<__gnu_cxx::__normal_iterator<VkExtensionProperties *,std::vector<VkExtensionProperties>>>(
v24,
v8,
v10) )
{
LABEL_19:
v12 = v8;
LABEL_20:
v14 = v29;
v15 = v28;
if ( v12 == v29 )
{
v17 = v12;
}
else
{
v16 = v12;
while ( 1 )
{
v12 += 65;
if ( v12 == v14 )
break;
if ( !(unsigned __int8)__gnu_cxx::__ops::_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T *,char const*,unsigned int *,VkExtensionProperties *)::$_0>::operator()<__gnu_cxx::__normal_iterator<VkExtensionProperties *,std::vector<VkExtensionProperties>>>(
v22,
v12,
v10) )
{
memcpy(v16, v12, 260LL);
v16 += 65;
}
}
v17 = v16;
}
LABEL_27:
std::vector<VkExtensionProperties>::erase(&v25, v17, v26);
a2 = v23;
if ( v15 )
{
v18 = (unsigned int)*v23;
a2 = v25;
v19 = ((char *)v26 - (char *)v25) / 260;
v7 = ((char *)v26 - (char *)v25) % 260;
v20 = v19;
if ( (unsigned int)v18 < (unsigned int)v19 )
LODWORD(v19) = *v23;
if ( (_DWORD)v19 )
memmove(v15, v25, 260LL * (unsigned int)v19);
v6 = 5 * (v20 > v18);
}
else
{
v7 = ((char *)v26 - (char *)v25) % 260;
*v23 = ((char *)v26 - (char *)v25) / 260;
v6 = 0;
}
goto LABEL_34;
}
v8 += 65;
}
if ( (unsigned __int8)__gnu_cxx::__ops::_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T *,char const*,unsigned int *,VkExtensionProperties *)::$_0>::operator()<__gnu_cxx::__normal_iterator<VkExtensionProperties *,std::vector<VkExtensionProperties>>>(
v24,
v8,
v10) )
goto LABEL_19;
v8 += 65;
}
if ( !(unsigned __int8)__gnu_cxx::__ops::_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T *,char const*,unsigned int *,VkExtensionProperties *)::$_0>::operator()<__gnu_cxx::__normal_iterator<VkExtensionProperties *,std::vector<VkExtensionProperties>>>(
v24,
v8,
v10) )
v8 = v29;
goto LABEL_19;
}
return v6;
}
|
EnumerateDeviceExtensionProperties:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV qword ptr [RBP + -0x38],RCX
MOV R13,RDX
MOV R14,RSI
MOV R15,RDI
CALL 0x001ab3a9
MOV RBX,RAX
LEA RDX,[RBP + -0x3c]
AND dword ptr [RDX],0x0
MOV RDI,R15
MOV RSI,R14
XOR ECX,ECX
CALL qword ptr [RAX + 0x18]
MOV R12D,EAX
TEST EAX,EAX
JNZ 0x001ab326
MOV qword ptr [RBP + -0x70],R13
LEA R12,[RBP + -0x3c]
MOV ESI,dword ptr [R12]
LEA R13,[RBP + -0x58]
LEA RDX,[RBP + -0x68]
MOV RDI,R13
CALL 0x001aef82
MOV RCX,qword ptr [R13]
LAB_001ab12b:
MOV RDI,R15
MOV RSI,R14
MOV RDX,R12
CALL qword ptr [RBX + 0x18]
LAB_001ab137:
MOV R12D,EAX
TEST EAX,EAX
JNZ 0x001ab31d
MOV R12,qword ptr [RBP + -0x58]
MOV R15,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x80],RBX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x78],RAX
LEA R14,[RBP + -0x68]
MOV qword ptr [R14],RBX
MOV qword ptr [R14 + 0x8],RAX
MOV qword ptr [RBP + -0x30],R15
SUB R15,R12
MOV ECX,0x104
MOV RAX,R15
CQO
IDIV RCX
MOV RBX,RAX
SAR RBX,0x2
LAB_001ab17c:
TEST RBX,RBX
JLE 0x001ab1f4
MOV RDI,R14
MOV RSI,R12
CALL 0x001ab3f6
TEST AL,AL
JNZ 0x001ab258
LEA R13,[R12 + 0x104]
MOV RDI,R14
MOV RSI,R13
CALL 0x001ab3f6
TEST AL,AL
JNZ 0x001ab25b
LEA R13,[R12 + 0x208]
MOV RDI,R14
MOV RSI,R13
CALL 0x001ab3f6
TEST AL,AL
JNZ 0x001ab25b
LEA R13,[R12 + 0x30c]
MOV RDI,R14
MOV RSI,R13
CALL 0x001ab3f6
TEST AL,AL
JNZ 0x001ab25b
ADD R12,0x410
DEC RBX
ADD R15,-0x410
JMP 0x001ab17c
LAB_001ab1f4:
MOV ECX,0x104
MOV RAX,R15
CQO
IDIV RCX
CMP RAX,0x1
JZ 0x001ab245
CMP RAX,0x2
JZ 0x001ab22e
CMP RAX,0x3
JNZ 0x001ab338
LEA RDI,[RBP + -0x68]
MOV RSI,R12
CALL 0x001ab3f6
TEST AL,AL
JNZ 0x001ab258
ADD R12,0x104
LAB_001ab22e:
LEA RDI,[RBP + -0x68]
MOV RSI,R12
CALL 0x001ab3f6
TEST AL,AL
JNZ 0x001ab258
ADD R12,0x104
LAB_001ab245:
LEA RDI,[RBP + -0x68]
MOV RSI,R12
CALL 0x001ab3f6
TEST AL,AL
CMOVZ R12,qword ptr [RBP + -0x30]
LAB_001ab258:
MOV R13,R12
LAB_001ab25b:
MOV R12,qword ptr [RBP + -0x30]
CMP R13,R12
MOV R15,qword ptr [RBP + -0x38]
JZ 0x001ab2a8
LEA RBX,[RBP + -0x80]
MOV R14,R13
LAB_001ab26f:
ADD R13,0x104
CMP R13,R12
JZ 0x001ab2a3
MOV RDI,RBX
MOV RSI,R13
CALL 0x001ab3f6
TEST AL,AL
JNZ 0x001ab26f
MOV EDX,0x104
MOV RDI,R14
MOV RSI,R13
CALL 0x001a25c0
ADD R14,0x104
JMP 0x001ab26f
LAB_001ab2a3:
MOV RSI,R14
JMP 0x001ab2ab
LAB_001ab2a8:
MOV RSI,R13
LAB_001ab2ab:
LEA RDI,[RBP + -0x58]
MOV RDX,qword ptr [RDI + 0x8]
LAB_001ab2b3:
CALL 0x001aefd4
LAB_001ab2b8:
TEST R15,R15
MOV RSI,qword ptr [RBP + -0x70]
JZ 0x001ab306
MOV R14D,dword ptr [RSI]
MOV RSI,qword ptr [RBP + -0x58]
MOV RAX,qword ptr [RBP + -0x50]
SUB RAX,RSI
MOV ECX,0x104
CQO
IDIV RCX
MOV RBX,RAX
CMP R14D,EBX
CMOVC EAX,R14D
TEST EAX,EAX
JZ 0x001ab2f8
MOV EAX,EAX
IMUL RDX,RAX,0x104
MOV RDI,R15
CALL 0x001a4ed0
LAB_001ab2f8:
XOR EAX,EAX
CMP RBX,R14
SETA AL
LEA R12D,[RAX + RAX*0x4]
JMP 0x001ab31d
LAB_001ab306:
MOV RAX,qword ptr [RBP + -0x50]
SUB RAX,qword ptr [RBP + -0x58]
MOV ECX,0x104
CQO
IDIV RCX
MOV dword ptr [RSI],EAX
XOR R12D,R12D
LAB_001ab31d:
LEA RDI,[RBP + -0x58]
CALL 0x001af01e
LAB_001ab326:
MOV EAX,R12D
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001ab338:
MOV R15,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RBP + -0x30]
JMP 0x001ab2ab
|
/* EnumerateDeviceExtensionProperties(VkPhysicalDevice_T*, char const*, unsigned int*,
VkExtensionProperties*) */
int EnumerateDeviceExtensionProperties
(VkPhysicalDevice_T *param_1,char *param_2,uint *param_3,
VkExtensionProperties *param_4)
{
uint uVar1;
bool bVar2;
int iVar3;
long lVar4;
ulong uVar5;
ulong uVar6;
long lVar7;
void *pvVar8;
void *__src;
void *__dest;
long lVar9;
VkExtensionProperties *__dest_00;
long local_88;
VkExtensionProperties *local_80;
uint *local_78;
long local_70;
VkExtensionProperties *local_68;
void *local_60;
void *local_58;
uint local_44;
VkExtensionProperties *local_40;
void *local_38;
local_40 = param_4;
lVar4 = getInstanceLayer(param_1);
local_44 = 0;
iVar3 = (**(code **)(lVar4 + 0x18))(param_1,param_2,&local_44,0);
if (iVar3 != 0) {
return iVar3;
}
local_78 = param_3;
std::vector<VkExtensionProperties,std::allocator<VkExtensionProperties>>::vector
((vector<VkExtensionProperties,std::allocator<VkExtensionProperties>> *)&local_60,
(ulong)local_44,(allocator *)&local_70);
/* try { // try from 001ab12b to 001ab136 has its CatchHandler @ 001ab347 */
iVar3 = (**(code **)(lVar4 + 0x18))(param_1,param_2,&local_44,local_60);
if (iVar3 != 0) goto LAB_001ab31d;
local_80 = local_40;
local_68 = local_40;
local_38 = local_58;
lVar9 = (long)local_58 - (long)local_60;
pvVar8 = local_60;
local_88 = lVar4;
local_70 = lVar4;
for (lVar7 = lVar9 / 0x104 >> 2; 0 < lVar7; lVar7 = lVar7 + -1) {
bVar2 = __gnu_cxx::__ops::
_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T*,char_const*,unsigned_int*,VkExtensionProperties*)::$_0>
::operator()((_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T*,char_const*,unsigned_int*,VkExtensionProperties*)::__0>
*)&local_70,pvVar8);
__dest = pvVar8;
if (bVar2) goto LAB_001ab25b;
bVar2 = __gnu_cxx::__ops::
_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T*,char_const*,unsigned_int*,VkExtensionProperties*)::$_0>
::operator()((_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T*,char_const*,unsigned_int*,VkExtensionProperties*)::__0>
*)&local_70,(void *)((long)pvVar8 + 0x104));
__dest = (void *)((long)pvVar8 + 0x104);
if (bVar2) goto LAB_001ab25b;
bVar2 = __gnu_cxx::__ops::
_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T*,char_const*,unsigned_int*,VkExtensionProperties*)::$_0>
::operator()((_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T*,char_const*,unsigned_int*,VkExtensionProperties*)::__0>
*)&local_70,(void *)((long)pvVar8 + 0x208));
__dest = (void *)((long)pvVar8 + 0x208);
if (bVar2) goto LAB_001ab25b;
bVar2 = __gnu_cxx::__ops::
_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T*,char_const*,unsigned_int*,VkExtensionProperties*)::$_0>
::operator()((_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T*,char_const*,unsigned_int*,VkExtensionProperties*)::__0>
*)&local_70,(void *)((long)pvVar8 + 0x30c));
__dest = (void *)((long)pvVar8 + 0x30c);
if (bVar2) goto LAB_001ab25b;
pvVar8 = (void *)((long)pvVar8 + 0x410);
lVar9 = lVar9 + -0x410;
}
lVar4 = lVar9 / 0x104;
if (lVar4 == 1) {
LAB_001ab245:
bVar2 = __gnu_cxx::__ops::
_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T*,char_const*,unsigned_int*,VkExtensionProperties*)::$_0>
::operator()((_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T*,char_const*,unsigned_int*,VkExtensionProperties*)::__0>
*)&local_70,pvVar8);
__dest = pvVar8;
if (!bVar2) {
__dest = local_38;
}
LAB_001ab25b:
pvVar8 = local_38;
__dest_00 = local_40;
if (__dest != local_38) {
__src = __dest;
while (__src = (void *)((long)__src + 0x104), __src != pvVar8) {
bVar2 = __gnu_cxx::__ops::
_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T*,char_const*,unsigned_int*,VkExtensionProperties*)::$_0>
::operator()((_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T*,char_const*,unsigned_int*,VkExtensionProperties*)::__0>
*)&local_88,__src);
if (!bVar2) {
memcpy(__dest,__src,0x104);
__dest = (void *)((long)__dest + 0x104);
}
}
}
}
else {
if (lVar4 == 2) {
LAB_001ab22e:
bVar2 = __gnu_cxx::__ops::
_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T*,char_const*,unsigned_int*,VkExtensionProperties*)::$_0>
::operator()((_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T*,char_const*,unsigned_int*,VkExtensionProperties*)::__0>
*)&local_70,pvVar8);
__dest = pvVar8;
if (!bVar2) {
pvVar8 = (void *)((long)pvVar8 + 0x104);
goto LAB_001ab245;
}
goto LAB_001ab25b;
}
__dest = local_38;
__dest_00 = local_40;
if (lVar4 == 3) {
bVar2 = __gnu_cxx::__ops::
_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T*,char_const*,unsigned_int*,VkExtensionProperties*)::$_0>
::operator()((_Iter_pred<EnumerateDeviceExtensionProperties(VkPhysicalDevice_T*,char_const*,unsigned_int*,VkExtensionProperties*)::__0>
*)&local_70,pvVar8,lVar9 % 0x104);
__dest = pvVar8;
if (!bVar2) {
pvVar8 = (void *)((long)pvVar8 + 0x104);
goto LAB_001ab22e;
}
goto LAB_001ab25b;
}
}
/* try { // try from 001ab2b3 to 001ab2b7 has its CatchHandler @ 001ab345 */
std::vector<VkExtensionProperties,std::allocator<VkExtensionProperties>>::erase
(&local_60,__dest,local_58);
if (__dest_00 == (VkExtensionProperties *)0x0) {
*local_78 = (uint)(((long)local_58 - (long)local_60) / 0x104);
iVar3 = 0;
}
else {
uVar1 = *local_78;
uVar5 = ((long)local_58 - (long)local_60) / 0x104;
uVar6 = uVar5 & 0xffffffff;
if (uVar1 < (uint)uVar5) {
uVar6 = (ulong)uVar1;
}
if ((int)uVar6 != 0) {
memmove(__dest_00,local_60,uVar6 * 0x104);
}
iVar3 = (uint)(uVar1 < uVar5) * 5;
}
LAB_001ab31d:
std::_Vector_base<VkExtensionProperties,std::allocator<VkExtensionProperties>>::~_Vector_base
((_Vector_base<VkExtensionProperties,std::allocator<VkExtensionProperties>> *)&local_60)
;
return iVar3;
}
|
|
14,630
|
add_cfg_dir
|
eloqsql/libmariadb/libmariadb/ma_default.c
|
static int add_cfg_dir(char **cfg_dirs, const char *directory)
{
int i;
for (i = 0; i < MAX_CONFIG_DIRS && cfg_dirs[i]; i++)
if (!strcmp(cfg_dirs[i], directory)) /* already present */
return 0;
if (i < MAX_CONFIG_DIRS) {
cfg_dirs[i]= strdup(directory);
return 0;
}
return 1;
}
|
O0
|
c
|
add_cfg_dir:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
xorl %eax, %eax
cmpl $0x6, -0x1c(%rbp)
movb %al, -0x1d(%rbp)
jge 0x46e85
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
setne %al
movb %al, -0x1d(%rbp)
movb -0x1d(%rbp), %al
testb $0x1, %al
jne 0x46e8e
jmp 0x46ebe
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x18(%rbp), %rsi
callq 0x135f0
cmpl $0x0, %eax
jne 0x46eb1
movl $0x0, -0x4(%rbp)
jmp 0x46eec
jmp 0x46eb3
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x46e67
cmpl $0x6, -0x1c(%rbp)
jge 0x46ee5
movq -0x18(%rbp), %rdi
callq 0x137a0
movq %rax, %rdx
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl $0x0, -0x4(%rbp)
jmp 0x46eec
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
add_cfg_dir:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], 0
loc_46E67:
xor eax, eax
cmp [rbp+var_1C], 6
mov [rbp+var_1D], al
jge short loc_46E85
mov rax, [rbp+var_10]
movsxd rcx, [rbp+var_1C]
cmp qword ptr [rax+rcx*8], 0
setnz al
mov [rbp+var_1D], al
loc_46E85:
mov al, [rbp+var_1D]
test al, 1
jnz short loc_46E8E
jmp short loc_46EBE
loc_46E8E:
mov rax, [rbp+var_10]
movsxd rcx, [rbp+var_1C]
mov rdi, [rax+rcx*8]
mov rsi, [rbp+var_18]
call _strcmp
cmp eax, 0
jnz short loc_46EB1
mov [rbp+var_4], 0
jmp short loc_46EEC
loc_46EB1:
jmp short $+2
loc_46EB3:
mov eax, [rbp+var_1C]
add eax, 1
mov [rbp+var_1C], eax
jmp short loc_46E67
loc_46EBE:
cmp [rbp+var_1C], 6
jge short loc_46EE5
mov rdi, [rbp+var_18]
call _strdup
mov rdx, rax
mov rax, [rbp+var_10]
movsxd rcx, [rbp+var_1C]
mov [rax+rcx*8], rdx
mov [rbp+var_4], 0
jmp short loc_46EEC
loc_46EE5:
mov [rbp+var_4], 1
loc_46EEC:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
|
long long add_cfg_dir(long long a1, long long a2)
{
bool v3; // [rsp+3h] [rbp-1Dh]
int i; // [rsp+4h] [rbp-1Ch]
for ( i = 0; ; ++i )
{
v3 = 0;
if ( i < 6 )
v3 = *(_QWORD *)(a1 + 8LL * i) != 0LL;
if ( !v3 )
break;
if ( !(unsigned int)strcmp(*(_QWORD *)(a1 + 8LL * i), a2) )
return 0;
}
if ( i >= 6 )
{
return 1;
}
else
{
*(_QWORD *)(a1 + 8LL * i) = strdup(a2);
return 0;
}
}
|
add_cfg_dir:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],0x0
LAB_00146e67:
XOR EAX,EAX
CMP dword ptr [RBP + -0x1c],0x6
MOV byte ptr [RBP + -0x1d],AL
JGE 0x00146e85
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,dword ptr [RBP + -0x1c]
CMP qword ptr [RAX + RCX*0x8],0x0
SETNZ AL
MOV byte ptr [RBP + -0x1d],AL
LAB_00146e85:
MOV AL,byte ptr [RBP + -0x1d]
TEST AL,0x1
JNZ 0x00146e8e
JMP 0x00146ebe
LAB_00146e8e:
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,dword ptr [RBP + -0x1c]
MOV RDI,qword ptr [RAX + RCX*0x8]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x001135f0
CMP EAX,0x0
JNZ 0x00146eb1
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00146eec
LAB_00146eb1:
JMP 0x00146eb3
LAB_00146eb3:
MOV EAX,dword ptr [RBP + -0x1c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x1c],EAX
JMP 0x00146e67
LAB_00146ebe:
CMP dword ptr [RBP + -0x1c],0x6
JGE 0x00146ee5
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001137a0
MOV RDX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,dword ptr [RBP + -0x1c]
MOV qword ptr [RAX + RCX*0x8],RDX
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00146eec
LAB_00146ee5:
MOV dword ptr [RBP + -0x4],0x1
LAB_00146eec:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
int4 add_cfg_dir(long param_1,char *param_2)
{
int iVar1;
char *pcVar2;
bool bVar3;
int local_24;
local_24 = 0;
while( true ) {
bVar3 = false;
if (local_24 < 6) {
bVar3 = *(long *)(param_1 + (long)local_24 * 8) != 0;
}
if (!bVar3) break;
iVar1 = strcmp(*(char **)(param_1 + (long)local_24 * 8),param_2);
if (iVar1 == 0) {
return 0;
}
local_24 = local_24 + 1;
}
if (local_24 < 6) {
pcVar2 = strdup(param_2);
*(char **)(param_1 + (long)local_24 * 8) = pcVar2;
return 0;
}
return 1;
}
|
|
14,631
|
mysql_once_init
|
eloqsql/libmariadb/libmariadb/mariadb_lib.c
|
static int mysql_once_init()
#else
static void mysql_once_init()
#endif
{
ma_init(); /* Will init threads */
init_client_errs();
get_default_configuration_dirs();
set_default_charset_by_name(MARIADB_DEFAULT_CHARSET, 0);
if (mysql_client_plugin_init())
{
#ifdef _WIN32
return 1;
#else
return;
#endif
}
if (!mysql_port)
{
#if !__has_feature(memory_sanitizer) /* work around MSAN deficiency */
struct servent *serv_ptr;
#endif
char *env;
mysql_port = MARIADB_PORT;
#if !__has_feature(memory_sanitizer) /* work around MSAN deficiency */
if ((serv_ptr = getservbyname("mysql", "tcp")))
mysql_port = (uint)ntohs((ushort)serv_ptr->s_port);
#endif
if ((env = getenv("MYSQL_TCP_PORT")))
mysql_port =(uint)atoi(env);
}
if (!mysql_unix_port)
{
char *env;
#ifdef _WIN32
mysql_unix_port = (char*)MARIADB_NAMEDPIPE;
#else
mysql_unix_port = (char*)MARIADB_UNIX_ADDR;
#endif
if ((env = getenv("MYSQL_UNIX_PORT")) ||
(env = getenv("MARIADB_UNIX_PORT")))
mysql_unix_port = env;
}
|
O0
|
c
|
mysql_once_init:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
callq 0x49290
callq 0x6bcb0
movb $0x0, %al
callq 0x6ade0
leaq 0x843c1(%rip), %rdi # 0xcae91
xorl %esi, %esi
callq 0x6ad20
movb $0x0, %al
callq 0x595a0
cmpl $0x0, %eax
je 0x46ae8
jmp 0x46be8
leaq 0x3a4c99(%rip), %rax # 0x3eb788
cmpl $0x0, (%rax)
jne 0x46b65
leaq 0x3a4c8d(%rip), %rax # 0x3eb788
movl $0xcea, (%rax) # imm = 0xCEA
leaq 0x86aab(%rip), %rdi # 0xcd5b3
leaq 0x84552(%rip), %rsi # 0xcb061
callq 0x36700
movq %rax, -0x8(%rbp)
cmpq $0x0, %rax
je 0x46b39
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
movzwl %ax, %edi
callq 0x36ad0
movzwl %ax, %ecx
leaq 0x3a4c51(%rip), %rax # 0x3eb788
movl %ecx, (%rax)
leaq 0x84525(%rip), %rdi # 0xcb065
callq 0x36760
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
je 0x46b63
movq -0x10(%rbp), %rdi
callq 0x36300
movl %eax, %ecx
leaq 0x3a4c27(%rip), %rax # 0x3eb788
movl %ecx, (%rax)
jmp 0x46b65
leaq 0x3a4c24(%rip), %rax # 0x3eb790
cmpq $0x0, (%rax)
jne 0x46bbf
leaq 0x3a4c17(%rip), %rax # 0x3eb790
leaq 0x844f4(%rip), %rcx # 0xcb074
movq %rcx, (%rax)
leaq 0x844fa(%rip), %rdi # 0xcb084
callq 0x36760
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x46baf
leaq 0x844f4(%rip), %rdi # 0xcb094
callq 0x36760
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x46bbd
movq -0x18(%rbp), %rcx
leaq 0x3a4bd6(%rip), %rax # 0x3eb790
movq %rcx, (%rax)
jmp 0x46bbf
leaq 0x3a4bfa(%rip), %rax # 0x3eb7c0
cmpb $0x0, (%rax)
jne 0x46bd0
callq 0x52570
xorl %eax, %eax
movl %eax, %esi
movq %rsi, %rdi
callq 0x5a720
callq 0x46bf0
movb $0x1, 0x3a4bc4(%rip) # 0x3eb7ac
addq $0x20, %rsp
popq %rbp
retq
nop
|
mysql_once_init:
push rbp
mov rbp, rsp
sub rsp, 20h
call ma_init
call init_client_errs
mov al, 0
call get_default_configuration_dirs
lea rdi, aUtf8mb4; "utf8mb4"
xor esi, esi
call set_default_charset_by_name
mov al, 0
call mysql_client_plugin_init
cmp eax, 0
jz short loc_46AE8
jmp loc_46BE8
loc_46AE8:
lea rax, mysql_port
cmp dword ptr [rax], 0
jnz short loc_46B65
lea rax, mysql_port
mov dword ptr [rax], 0CEAh
lea rdi, aEtcMysql+5; "mysql"
lea rsi, aTcp; "tcp"
call _getservbyname
mov [rbp+var_8], rax
cmp rax, 0
jz short loc_46B39
mov rax, [rbp+var_8]
mov eax, [rax+10h]
movzx edi, ax
call _ntohs
movzx ecx, ax
lea rax, mysql_port
mov [rax], ecx
loc_46B39:
lea rdi, aMysqlTcpPort; "MYSQL_TCP_PORT"
call _getenv
mov [rbp+var_10], rax
cmp rax, 0
jz short loc_46B63
mov rdi, [rbp+var_10]
call _atoi
mov ecx, eax
lea rax, mysql_port
mov [rax], ecx
loc_46B63:
jmp short $+2
loc_46B65:
lea rax, mysql_unix_port
cmp qword ptr [rax], 0
jnz short loc_46BBF
lea rax, mysql_unix_port
lea rcx, aTmpMysqlSock; "/tmp/mysql.sock"
mov [rax], rcx
lea rdi, aMysqlUnixPort; "MYSQL_UNIX_PORT"
call _getenv
mov [rbp+var_18], rax
cmp rax, 0
jnz short loc_46BAF
lea rdi, aMariadbUnixPor; "MARIADB_UNIX_PORT"
call _getenv
mov [rbp+var_18], rax
cmp rax, 0
jz short loc_46BBD
loc_46BAF:
mov rcx, [rbp+var_18]
lea rax, mysql_unix_port
mov [rax], rcx
loc_46BBD:
jmp short $+2
loc_46BBF:
lea rax, mysql_ps_subsystem_initialized
cmp byte ptr [rax], 0
jnz short loc_46BD0
call mysql_init_ps_subsystem
loc_46BD0:
xor eax, eax
mov esi, eax
mov rdi, rsi
call ma_tls_start
call ignore_sigpipe
mov cs:mysql_client_init, 1
loc_46BE8:
add rsp, 20h
pop rbp
retn
|
long long mysql_once_init()
{
long long result; // rax
long long v1; // [rsp+8h] [rbp-18h]
long long v2; // [rsp+10h] [rbp-10h]
long long v3; // [rsp+18h] [rbp-8h]
ma_init();
init_client_errs();
get_default_configuration_dirs();
set_default_charset_by_name("utf8mb4", 0LL);
result = mysql_client_plugin_init();
if ( !(_DWORD)result )
{
if ( !mysql_port )
{
mysql_port = 3306;
v3 = getservbyname("mysql", "tcp");
if ( v3 )
mysql_port = (unsigned __int16)ntohs((unsigned __int16)*(_DWORD *)(v3 + 16));
v2 = getenv("MYSQL_TCP_PORT");
if ( v2 )
mysql_port = atoi(v2);
}
if ( !mysql_unix_port )
{
mysql_unix_port = "/tmp/mysql.sock";
v1 = getenv("MYSQL_UNIX_PORT");
if ( v1 || (v1 = getenv("MARIADB_UNIX_PORT")) != 0 )
mysql_unix_port = v1;
}
if ( !mysql_ps_subsystem_initialized )
mysql_init_ps_subsystem();
ma_tls_start(0LL);
result = ignore_sigpipe();
mysql_client_init = 1;
}
return result;
}
|
mysql_once_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
CALL 0x00149290
CALL 0x0016bcb0
MOV AL,0x0
CALL 0x0016ade0
LEA RDI,[0x1cae91]
XOR ESI,ESI
CALL 0x0016ad20
MOV AL,0x0
CALL 0x001595a0
CMP EAX,0x0
JZ 0x00146ae8
JMP 0x00146be8
LAB_00146ae8:
LEA RAX,[0x4eb788]
CMP dword ptr [RAX],0x0
JNZ 0x00146b65
LEA RAX,[0x4eb788]
MOV dword ptr [RAX],0xcea
LEA RDI,[0x1cd5b3]
LEA RSI,[0x1cb061]
CALL 0x00136700
MOV qword ptr [RBP + -0x8],RAX
CMP RAX,0x0
JZ 0x00146b39
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x10]
MOVZX EDI,AX
CALL 0x00136ad0
MOVZX ECX,AX
LEA RAX,[0x4eb788]
MOV dword ptr [RAX],ECX
LAB_00146b39:
LEA RDI,[0x1cb065]
CALL 0x00136760
MOV qword ptr [RBP + -0x10],RAX
CMP RAX,0x0
JZ 0x00146b63
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00136300
MOV ECX,EAX
LEA RAX,[0x4eb788]
MOV dword ptr [RAX],ECX
LAB_00146b63:
JMP 0x00146b65
LAB_00146b65:
LEA RAX,[0x4eb790]
CMP qword ptr [RAX],0x0
JNZ 0x00146bbf
LEA RAX,[0x4eb790]
LEA RCX,[0x1cb074]
MOV qword ptr [RAX],RCX
LEA RDI,[0x1cb084]
CALL 0x00136760
MOV qword ptr [RBP + -0x18],RAX
CMP RAX,0x0
JNZ 0x00146baf
LEA RDI,[0x1cb094]
CALL 0x00136760
MOV qword ptr [RBP + -0x18],RAX
CMP RAX,0x0
JZ 0x00146bbd
LAB_00146baf:
MOV RCX,qword ptr [RBP + -0x18]
LEA RAX,[0x4eb790]
MOV qword ptr [RAX],RCX
LAB_00146bbd:
JMP 0x00146bbf
LAB_00146bbf:
LEA RAX,[0x4eb7c0]
CMP byte ptr [RAX],0x0
JNZ 0x00146bd0
CALL 0x00152570
LAB_00146bd0:
XOR EAX,EAX
MOV ESI,EAX
MOV RDI,RSI
CALL 0x0015a720
CALL 0x00146bf0
MOV byte ptr [0x004eb7ac],0x1
LAB_00146be8:
ADD RSP,0x20
POP RBP
RET
|
void mysql_once_init(void)
{
uint16_t uVar1;
int iVar2;
servent *psVar3;
char *__nptr;
char *local_20;
ma_init();
init_client_errs();
get_default_configuration_dirs();
set_default_charset_by_name("utf8mb4",0);
iVar2 = mysql_client_plugin_init();
if (iVar2 == 0) {
if (mysql_port == 0) {
mysql_port = 0xcea;
psVar3 = getservbyname("mysql","tcp");
if (psVar3 != (servent *)0x0) {
uVar1 = ntohs((uint16_t)psVar3->s_port);
mysql_port = (uint)uVar1;
}
__nptr = getenv("MYSQL_TCP_PORT");
if (__nptr != (char *)0x0) {
mysql_port = atoi(__nptr);
}
}
if (mysql_unix_port == (char *)0x0) {
mysql_unix_port = "/tmp/mysql.sock";
local_20 = getenv("MYSQL_UNIX_PORT");
if ((local_20 != (char *)0x0) ||
(local_20 = getenv("MARIADB_UNIX_PORT"), local_20 != (char *)0x0)) {
mysql_unix_port = local_20;
}
}
if (mysql_ps_subsystem_initialized == '\0') {
mysql_init_ps_subsystem();
}
ma_tls_start(0);
ignore_sigpipe();
mysql_client_init = 1;
}
return;
}
|
|
14,632
|
CLI::Formatter::make_option_usage[abi:cxx11](CLI::Option const*) const
|
MikePodsytnik[P]TCRtrie/build_O2/_deps/cli11-src/include/CLI/impl/Formatter_inl.hpp
|
CLI11_INLINE std::string Formatter::make_option_usage(const Option *opt) const {
// Note that these are positionals usages
std::stringstream out;
out << make_option_name(opt, true);
if(opt->get_expected_max() >= detail::expected_max_vector_size)
out << "...";
else if(opt->get_expected_max() > 1)
out << "(" << opt->get_expected() << "x)";
return opt->get_required() ? out.str() : "[" + out.str() + "]";
}
|
O2
|
cpp
|
CLI::Formatter::make_option_usage[abi:cxx11](CLI::Option const*) const:
pushq %r15
pushq %r14
pushq %rbx
subq $0x1d0, %rsp # imm = 0x1D0
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x48(%rsp), %rdi
callq 0x7320
movq (%r15), %rax
leaq 0x8(%rsp), %rdi
pushq $0x1
popq %rcx
movq %r15, %rsi
movq %r14, %rdx
callq *0x60(%rax)
leaq 0x58(%rsp), %r15
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x7400
leaq 0x8(%rsp), %rdi
callq 0x7860
movl 0x174(%r14), %eax
cmpl $0x1fffffff, %eax # imm = 0x1FFFFFFF
jle 0xd41e
leaq 0x1caeb(%rip), %rsi # 0x29f07
jmp 0xd44b
cmpl $0x2, %eax
jl 0xd453
leaq 0x1bff7(%rip), %rsi # 0x29421
movq %r15, %rdi
callq 0x7460
movl 0x170(%r14), %esi
movq %rax, %rdi
callq 0x7760
movq %rax, %r15
leaq 0x1cae0(%rip), %rsi # 0x29f2b
movq %r15, %rdi
callq 0x7460
cmpb $0x1, 0x20(%r14)
jne 0xd469
leaq 0x60(%rsp), %rsi
movq %rbx, %rdi
callq 0x7690
jmp 0xd4b6
leaq 0x60(%rsp), %rsi
leaq 0x28(%rsp), %rdi
callq 0x7690
leaq 0x1caeb(%rip), %rsi # 0x29f6a
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0xfad9
leaq 0x1ca47(%rip), %rdx # 0x29edc
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0xfaba
leaq 0x8(%rsp), %rdi
callq 0x7860
leaq 0x28(%rsp), %rdi
callq 0x7860
leaq 0x48(%rsp), %rdi
callq 0x7380
movq %rbx, %rax
addq $0x1d0, %rsp # imm = 0x1D0
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x7860
jmp 0xd4e2
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
jmp 0xd4f3
jmp 0xd4fc
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x7860
jmp 0xd4ff
jmp 0xd4fc
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x7380
movq %rbx, %rdi
callq 0x7770
nop
|
_ZNK3CLI9Formatter17make_option_usageB5cxx11EPKNS_6OptionE:
push r15
push r14
push rbx
sub rsp, 1D0h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
lea rdi, [rsp+1E8h+var_1A0]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void)
mov rax, [r15]
lea rdi, [rsp+1E8h+var_1E0]
push 1
pop rcx
mov rsi, r15
mov rdx, r14
call qword ptr [rax+60h]
lea r15, [rsp+1E8h+var_190]
lea rsi, [rsp+1E8h+var_1E0]
mov rdi, r15
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
lea rdi, [rsp+1E8h+var_1E0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov eax, [r14+174h]
cmp eax, 1FFFFFFFh
jle short loc_D41E
lea rsi, asc_29F06+1; "..."
jmp short loc_D44B
loc_D41E:
cmp eax, 2
jl short loc_D453
lea rsi, aFailedParsingN+16h; "("
mov rdi, r15
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov esi, [r14+170h]
mov rdi, rax
call __ZNSolsEi; std::ostream::operator<<(int)
mov r15, rax
lea rsi, asc_29F2B; "x)"
loc_D44B:
mov rdi, r15
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
loc_D453:
cmp byte ptr [r14+20h], 1
jnz short loc_D469
lea rsi, [rsp+1E8h+var_188]
mov rdi, rbx
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
jmp short loc_D4B6
loc_D469:
lea rsi, [rsp+1E8h+var_188]
lea rdi, [rsp+1E8h+var_1C0]
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
lea rsi, aNotInRange+0Eh; "["
lea rdi, [rsp+1E8h+var_1E0]
lea rdx, [rsp+1E8h+var_1C0]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
lea rdx, aOfTheFollowing+26h; "]"
lea rsi, [rsp+1E8h+var_1E0]
mov rdi, rbx
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
lea rdi, [rsp+1E8h+var_1E0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+1E8h+var_1C0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_D4B6:
lea rdi, [rsp+1E8h+var_1A0]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
mov rax, rbx
add rsp, 1D0h
pop rbx
pop r14
pop r15
retn
mov rbx, rax
lea rdi, [rsp+arg_0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_D4E2
mov rbx, rax
loc_D4E2:
lea rdi, [rsp+arg_20]
jmp short loc_D4F3
jmp short loc_D4FC
mov rbx, rax
lea rdi, [rsp+arg_0]; void *
loc_D4F3:
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_D4FF
jmp short $+2
loc_D4FC:
mov rbx, rax
loc_D4FF:
lea rdi, [rsp+arg_40]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
mov rdi, rbx
call __Unwind_Resume
|
long long CLI::Formatter::make_option_usage[abi:cxx11](long long a1, long long a2, long long a3)
{
_BYTE *v4; // r15
int v5; // eax
char *v6; // rsi
long long v7; // rax
_BYTE v9[32]; // [rsp+8h] [rbp-1E0h] BYREF
_BYTE v10[32]; // [rsp+28h] [rbp-1C0h] BYREF
_BYTE v11[16]; // [rsp+48h] [rbp-1A0h] BYREF
_BYTE v12[8]; // [rsp+58h] [rbp-190h] BYREF
_BYTE v13[392]; // [rsp+60h] [rbp-188h] BYREF
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v11);
(*(void ( **)(_BYTE *, long long, long long, long long))(*(_QWORD *)a2 + 96LL))(v9, a2, a3, 1LL);
v4 = v12;
std::operator<<<char>(v12, v9);
std::string::~string(v9);
v5 = *(_DWORD *)(a3 + 372);
if ( v5 <= 0x1FFFFFFF )
{
if ( v5 < 2 )
goto LABEL_6;
v7 = std::operator<<<std::char_traits<char>>(v12, "(");
v4 = (_BYTE *)std::ostream::operator<<(v7, *(unsigned int *)(a3 + 368));
v6 = "x)";
}
else
{
v6 = "...";
}
std::operator<<<std::char_traits<char>>(v4, v6);
LABEL_6:
if ( *(_BYTE *)(a3 + 32) == 1 )
{
std::stringbuf::str(a1, v13);
}
else
{
std::stringbuf::str(v10, v13);
std::operator+<char>(v9, "[", v10);
std::operator+<char>(a1, v9, "]");
std::string::~string(v9);
std::string::~string(v10);
}
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(v11);
return a1;
}
|
make_option_usage[abi:cxx11]:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x1d0
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
LEA RDI,[RSP + 0x48]
CALL 0x00107320
MOV RAX,qword ptr [R15]
LAB_0010d3da:
LEA RDI,[RSP + 0x8]
PUSH 0x1
POP RCX
MOV RSI,R15
MOV RDX,R14
CALL qword ptr [RAX + 0x60]
LAB_0010d3eb:
LEA R15,[RSP + 0x58]
LEA RSI,[RSP + 0x8]
MOV RDI,R15
CALL 0x00107400
LEA RDI,[RSP + 0x8]
CALL 0x00107860
MOV EAX,dword ptr [R14 + 0x174]
CMP EAX,0x1fffffff
JLE 0x0010d41e
LEA RSI,[0x129f07]
JMP 0x0010d44b
LAB_0010d41e:
CMP EAX,0x2
JL 0x0010d453
LAB_0010d423:
LEA RSI,[0x129421]
MOV RDI,R15
CALL 0x00107460
MOV ESI,dword ptr [R14 + 0x170]
MOV RDI,RAX
CALL 0x00107760
MOV R15,RAX
LEA RSI,[0x129f2b]
LAB_0010d44b:
MOV RDI,R15
CALL 0x00107460
LAB_0010d453:
CMP byte ptr [R14 + 0x20],0x1
JNZ 0x0010d469
LEA RSI,[RSP + 0x60]
MOV RDI,RBX
CALL 0x00107690
JMP 0x0010d4b6
LAB_0010d469:
LEA RSI,[RSP + 0x60]
LAB_0010d46e:
LEA RDI,[RSP + 0x28]
CALL 0x00107690
LAB_0010d478:
LEA RSI,[0x129f6a]
LEA RDI,[RSP + 0x8]
LEA RDX,[RSP + 0x28]
CALL 0x0010fad9
LAB_0010d48e:
LEA RDX,[0x129edc]
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
CALL 0x0010faba
LAB_0010d4a2:
LEA RDI,[RSP + 0x8]
CALL 0x00107860
LEA RDI,[RSP + 0x28]
CALL 0x00107860
LAB_0010d4b6:
LEA RDI,[RSP + 0x48]
CALL 0x00107380
MOV RAX,RBX
ADD RSP,0x1d0
POP RBX
POP R14
POP R15
RET
|
/* CLI::Formatter::make_option_usage[abi:cxx11](CLI::Option const*) const */
Option * CLI::Formatter::make_option_usage_abi_cxx11_(Option *param_1)
{
ostream *poVar1;
long in_RDX;
long *in_RSI;
char *pcVar2;
string local_1e0 [32];
string local_1c0 [32];
stringstream local_1a0 [16];
ostream local_190 [376];
std::__cxx11::stringstream::stringstream(local_1a0);
/* try { // try from 0010d3da to 0010d3ea has its CatchHandler @ 0010d4fa */
(**(code **)(*in_RSI + 0x60))(local_1e0);
/* try { // try from 0010d3eb to 0010d3fc has its CatchHandler @ 0010d4eb */
poVar1 = local_190;
std::operator<<(poVar1,local_1e0);
std::__cxx11::string::~string(local_1e0);
if (*(int *)(in_RDX + 0x174) < 0x20000000) {
if (*(int *)(in_RDX + 0x174) < 2) goto LAB_0010d453;
/* try { // try from 0010d423 to 0010d466 has its CatchHandler @ 0010d4fc */
poVar1 = std::operator<<(poVar1,"(");
poVar1 = (ostream *)std::ostream::operator<<(poVar1,*(int *)(in_RDX + 0x170));
pcVar2 = "x)";
}
else {
pcVar2 = "...";
}
std::operator<<(poVar1,pcVar2);
LAB_0010d453:
if (*(char *)(in_RDX + 0x20) == '\x01') {
std::__cxx11::stringbuf::str();
}
else {
/* try { // try from 0010d46e to 0010d477 has its CatchHandler @ 0010d4e9 */
std::__cxx11::stringbuf::str();
/* try { // try from 0010d478 to 0010d48d has its CatchHandler @ 0010d4df */
std::operator+((char *)local_1e0,(string *)0x129f6a);
/* try { // try from 0010d48e to 0010d4a1 has its CatchHandler @ 0010d4d0 */
std::operator+((string *)param_1,(char *)local_1e0);
std::__cxx11::string::~string(local_1e0);
std::__cxx11::string::~string(local_1c0);
}
std::__cxx11::stringstream::~stringstream(local_1a0);
return param_1;
}
|
|
14,633
|
my_uca_coll_init_utf8mb4
|
eloqsql/strings/ctype-uca.c
|
static my_bool
my_uca_coll_init_utf8mb4(struct charset_info_st *cs, MY_CHARSET_LOADER *loader)
{
if (my_coll_init_uca(cs, loader))
return TRUE;
if (my_uca_collation_can_optimize_no_contractions(cs))
my_uca_handler_map(cs, &my_uca_package_utf8mb4,
&my_uca_package_no_contractions_utf8mb4);
return FALSE;
}
|
O0
|
c
|
my_uca_coll_init_utf8mb4:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x7d900
cmpb $0x0, %al
je 0x80177
movb $0x1, -0x1(%rbp)
jmp 0x8019f
movq -0x10(%rbp), %rdi
callq 0x898f0
cmpb $0x0, %al
je 0x8019b
movq -0x10(%rbp), %rdi
leaq 0x2867e1(%rip), %rsi # 0x306970
leaq 0x2867fa(%rip), %rdx # 0x306990
callq 0x89950
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
my_uca_coll_init_utf8mb4:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call my_coll_init_uca
cmp al, 0
jz short loc_80177
mov [rbp+var_1], 1
jmp short loc_8019F
loc_80177:
mov rdi, [rbp+var_10]
call my_uca_collation_can_optimize_no_contractions
cmp al, 0
jz short loc_8019B
mov rdi, [rbp+var_10]
lea rsi, my_uca_package_utf8mb4
lea rdx, my_uca_package_no_contractions_utf8mb4
call my_uca_handler_map
loc_8019B:
mov [rbp+var_1], 0
loc_8019F:
mov al, [rbp+var_1]
add rsp, 20h
pop rbp
retn
|
char my_uca_coll_init_utf8mb4(long long a1, long long a2)
{
if ( (unsigned __int8)my_coll_init_uca(a1, a2) )
return 1;
if ( (unsigned __int8)my_uca_collation_can_optimize_no_contractions(a1) )
my_uca_handler_map(a1, my_uca_package_utf8mb4, my_uca_package_no_contractions_utf8mb4);
return 0;
}
|
my_uca_coll_init_utf8mb4:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x0017d900
CMP AL,0x0
JZ 0x00180177
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0018019f
LAB_00180177:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001898f0
CMP AL,0x0
JZ 0x0018019b
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x406970]
LEA RDX,[0x406990]
CALL 0x00189950
LAB_0018019b:
MOV byte ptr [RBP + -0x1],0x0
LAB_0018019f:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x20
POP RBP
RET
|
int1 my_uca_coll_init_utf8mb4(int8 param_1,int8 param_2)
{
char cVar1;
int1 local_9;
cVar1 = my_coll_init_uca(param_1,param_2);
if (cVar1 == '\0') {
cVar1 = my_uca_collation_can_optimize_no_contractions(param_1);
if (cVar1 != '\0') {
my_uca_handler_map(param_1,my_uca_package_utf8mb4,my_uca_package_no_contractions_utf8mb4);
}
local_9 = 0;
}
else {
local_9 = 1;
}
return local_9;
}
|
|
14,634
|
aggregate_thread_status(PFS_thread*, PFS_account*, PFS_user*, PFS_host*)
|
eloqsql/storage/perfschema/pfs_instr.cc
|
void aggregate_thread_status(PFS_thread *thread,
PFS_account *safe_account,
PFS_user *safe_user,
PFS_host *safe_host)
{
THD *thd= thread->m_thd;
if (thd == NULL)
return;
if (likely(safe_account != NULL))
{
safe_account->aggregate_status_stats(&thd->status_var);
return;
}
if (safe_user != NULL)
{
safe_user->aggregate_status_stats(&thd->status_var);
}
if (safe_host != NULL)
{
safe_host->aggregate_status_stats(&thd->status_var);
}
return;
}
|
O3
|
cpp
|
aggregate_thread_status(PFS_thread*, PFS_account*, PFS_user*, PFS_host*):
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq 0x1608(%rdi), %rbx
testq %rbx, %rbx
je 0x31eac
testq %rsi, %rsi
je 0x31e89
addq $0xc80, %rbx # imm = 0xC80
addq $0x30, %rsi
movq %rsi, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x3a196
movq %rcx, %r14
testq %rdx, %rdx
je 0x31ea4
leaq 0xc80(%rbx), %rsi
addq $0x30, %rdx
movq %rdx, %rdi
callq 0x3a196
movq %r14, %rsi
testq %r14, %r14
jne 0x31e6f
popq %rbx
popq %r14
popq %rbp
retq
|
_Z23aggregate_thread_statusP10PFS_threadP11PFS_accountP8PFS_userP8PFS_host:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, [rdi+1608h]
test rbx, rbx
jz short loc_31EAC
test rsi, rsi
jz short loc_31E89
loc_31E6F:
add rbx, 0C80h
add rsi, 30h ; '0'
mov rdi, rsi
mov rsi, rbx
pop rbx
pop r14
pop rbp
jmp _ZN16PFS_status_stats14aggregate_fromEPK17system_status_var; PFS_status_stats::aggregate_from(system_status_var const*)
loc_31E89:
mov r14, rcx
test rdx, rdx
jz short loc_31EA4
lea rsi, [rbx+0C80h]
add rdx, 30h ; '0'
mov rdi, rdx
call _ZN16PFS_status_stats14aggregate_fromEPK17system_status_var; PFS_status_stats::aggregate_from(system_status_var const*)
loc_31EA4:
mov rsi, r14
test r14, r14
jnz short loc_31E6F
loc_31EAC:
pop rbx
pop r14
pop rbp
retn
|
long long aggregate_thread_status(PFS_thread *a1, PFS_account *a2, PFS_user *a3, PFS_host *a4)
{
long long v4; // rbx
long long result; // rax
v4 = *((_QWORD *)a1 + 705);
if ( v4 )
{
if ( a2 )
return PFS_status_stats::aggregate_from((char *)a2 + 48, v4 + 3200);
if ( a3 )
result = PFS_status_stats::aggregate_from((char *)a3 + 48, v4 + 3200);
a2 = a4;
if ( a4 )
return PFS_status_stats::aggregate_from((char *)a2 + 48, v4 + 3200);
}
return result;
}
|
aggregate_thread_status:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,qword ptr [RDI + 0x1608]
TEST RBX,RBX
JZ 0x00131eac
TEST RSI,RSI
JZ 0x00131e89
LAB_00131e6f:
ADD RBX,0xc80
ADD RSI,0x30
MOV RDI,RSI
MOV RSI,RBX
POP RBX
POP R14
POP RBP
JMP 0x0013a196
LAB_00131e89:
MOV R14,RCX
TEST RDX,RDX
JZ 0x00131ea4
LEA RSI,[RBX + 0xc80]
ADD RDX,0x30
MOV RDI,RDX
CALL 0x0013a196
LAB_00131ea4:
MOV RSI,R14
TEST R14,R14
JNZ 0x00131e6f
LAB_00131eac:
POP RBX
POP R14
POP RBP
RET
|
/* aggregate_thread_status(PFS_thread*, PFS_account*, PFS_user*, PFS_host*) */
void aggregate_thread_status
(PFS_thread *param_1,PFS_account *param_2,PFS_user *param_3,PFS_host *param_4)
{
long lVar1;
lVar1 = *(long *)(param_1 + 0x1608);
if (lVar1 == 0) {
return;
}
if (param_2 == (PFS_account *)0x0) {
if (param_3 != (PFS_user *)0x0) {
PFS_status_stats::aggregate_from
((PFS_status_stats *)(param_3 + 0x30),(system_status_var *)(lVar1 + 0xc80));
}
param_2 = (PFS_account *)param_4;
if (param_4 == (PFS_host *)0x0) {
return;
}
}
PFS_status_stats::aggregate_from
((PFS_status_stats *)((PFS_host *)param_2 + 0x30),(system_status_var *)(lVar1 + 0xc80));
return;
}
|
|
14,635
|
uf_space_endspace_selected
|
eloqsql/storage/maria/ma_packrec.c
|
static void uf_space_endspace_selected(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 (get_bit(bit_buff))
{
if ((spaces=get_bits(bit_buff,rec->space_length_bits))+to > end)
{
bit_buff->error=1;
return;
}
if (to+spaces != end)
decode_bytes(rec,bit_buff,to,end-spaces);
bfill(end - spaces, spaces, ' ');
}
else
decode_bytes(rec,bit_buff,to,end);
}
}
|
O0
|
c
|
uf_space_endspace_selected:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x4(%rax)
je 0x3b1e7
movq -0x10(%rbp), %rax
movl (%rax), %eax
movq -0x10(%rbp), %rdx
movl 0x4(%rdx), %ecx
addl $-0x1, %ecx
movl %ecx, 0x4(%rdx)
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
jne 0x3b20b
jmp 0x3b229
movq -0x10(%rbp), %rdi
callq 0x3a9f0
movq -0x10(%rbp), %rax
movl $0x1f, 0x4(%rax)
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x80000000, %eax # imm = 0x80000000
cmpl $0x0, %eax
je 0x3b229
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rax
subq %rax, %rdx
movl $0x20, %esi
callq 0x2a2c0
jmp 0x3b367
movq -0x10(%rbp), %rax
cmpl $0x0, 0x4(%rax)
je 0x3b25b
movq -0x10(%rbp), %rax
movl (%rax), %eax
movq -0x10(%rbp), %rdx
movl 0x4(%rdx), %ecx
addl $-0x1, %ecx
movl %ecx, 0x4(%rdx)
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
jne 0x3b283
jmp 0x3b350
movq -0x10(%rbp), %rdi
callq 0x3a9f0
movq -0x10(%rbp), %rax
movl $0x1f, 0x4(%rax)
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x80000000, %eax # imm = 0x80000000
cmpl $0x0, %eax
je 0x3b350
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x8(%rbp), %rcx
cmpl 0x24(%rcx), %eax
jb 0x3b2c6
movq -0x10(%rbp), %rax
movl (%rax), %eax
movq -0x8(%rbp), %rcx
movl 0x24(%rcx), %esi
movq -0x10(%rbp), %rdx
movl 0x4(%rdx), %ecx
subl %esi, %ecx
movl %ecx, 0x4(%rdx)
shrl %cl, %eax
movq -0x8(%rbp), %rcx
movl 0x24(%rcx), %ecx
movl %ecx, %edx
leaq 0x2830c2(%rip), %rcx # 0x2be380
andl (%rcx,%rdx,4), %eax
movl %eax, -0x28(%rbp)
jmp 0x3b2d9
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x24(%rax), %esi
callq 0x3a1a0
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %ecx
movl %ecx, -0x24(%rbp)
movq -0x18(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
cmpq -0x20(%rbp), %rax
jbe 0x3b2fb
movq -0x10(%rbp), %rax
movl $0x1, 0x28(%rax)
jmp 0x3b367
movq -0x18(%rbp), %rax
movl -0x24(%rbp), %ecx
addq %rcx, %rax
cmpq -0x20(%rbp), %rax
je 0x3b32e
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movl -0x24(%rbp), %eax
movl %eax, %r8d
xorl %eax, %eax
subq %r8, %rax
addq %rax, %rcx
callq 0x3ad30
movq -0x20(%rbp), %rdi
movl -0x24(%rbp), %eax
movl %eax, %ecx
xorl %eax, %eax
subq %rcx, %rax
addq %rax, %rdi
movl -0x24(%rbp), %eax
movl %eax, %edx
movl $0x20, %esi
callq 0x2a2c0
jmp 0x3b365
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x3ad30
jmp 0x3b367
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
|
uf_space_endspace_selected:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov rax, [rbp+var_10]
cmp dword ptr [rax+4], 0
jz short loc_3B1E7
mov rax, [rbp+var_10]
mov eax, [rax]
mov rdx, [rbp+var_10]
mov ecx, [rdx+4]
add ecx, 0FFFFFFFFh
mov [rdx+4], ecx
mov edx, 1
shl edx, cl
mov ecx, edx
and eax, ecx
cmp eax, 0
jnz short loc_3B20B
jmp short loc_3B229
loc_3B1E7:
mov rdi, [rbp+var_10]
call fill_buffer
mov rax, [rbp+var_10]
mov dword ptr [rax+4], 1Fh
mov rax, [rbp+var_10]
mov eax, [rax]
and eax, 80000000h
cmp eax, 0
jz short loc_3B229
loc_3B20B:
mov rdi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov rax, [rbp+var_18]
sub rdx, rax
mov esi, 20h ; ' '
call _memset
jmp loc_3B367
loc_3B229:
mov rax, [rbp+var_10]
cmp dword ptr [rax+4], 0
jz short loc_3B25B
mov rax, [rbp+var_10]
mov eax, [rax]
mov rdx, [rbp+var_10]
mov ecx, [rdx+4]
add ecx, 0FFFFFFFFh
mov [rdx+4], ecx
mov edx, 1
shl edx, cl
mov ecx, edx
and eax, ecx
cmp eax, 0
jnz short loc_3B283
jmp loc_3B350
loc_3B25B:
mov rdi, [rbp+var_10]
call fill_buffer
mov rax, [rbp+var_10]
mov dword ptr [rax+4], 1Fh
mov rax, [rbp+var_10]
mov eax, [rax]
and eax, 80000000h
cmp eax, 0
jz loc_3B350
loc_3B283:
mov rax, [rbp+var_10]
mov eax, [rax+4]
mov rcx, [rbp+var_8]
cmp eax, [rcx+24h]
jb short loc_3B2C6
mov rax, [rbp+var_10]
mov eax, [rax]
mov rcx, [rbp+var_8]
mov esi, [rcx+24h]
mov rdx, [rbp+var_10]
mov ecx, [rdx+4]
sub ecx, esi
mov [rdx+4], ecx
shr eax, cl
mov rcx, [rbp+var_8]
mov ecx, [rcx+24h]
mov edx, ecx
lea rcx, mask
and eax, [rcx+rdx*4]
mov [rbp+var_28], eax
jmp short loc_3B2D9
loc_3B2C6:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_8]
mov esi, [rax+24h]
call fill_and_get_bits
mov [rbp+var_28], eax
loc_3B2D9:
mov ecx, [rbp+var_28]
mov [rbp+var_24], ecx
mov rax, [rbp+var_18]
mov ecx, ecx
add rax, rcx
cmp rax, [rbp+var_20]
jbe short loc_3B2FB
mov rax, [rbp+var_10]
mov dword ptr [rax+28h], 1
jmp short loc_3B367
loc_3B2FB:
mov rax, [rbp+var_18]
mov ecx, [rbp+var_24]
add rax, rcx
cmp rax, [rbp+var_20]
jz short loc_3B32E
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_20]
mov eax, [rbp+var_24]
mov r8d, eax
xor eax, eax
sub rax, r8
add rcx, rax
call decode_bytes
loc_3B32E:
mov rdi, [rbp+var_20]
mov eax, [rbp+var_24]
mov ecx, eax
xor eax, eax
sub rax, rcx
add rdi, rax
mov eax, [rbp+var_24]
mov edx, eax
mov esi, 20h ; ' '
call _memset
jmp short loc_3B365
loc_3B350:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_20]
call decode_bytes
loc_3B365:
jmp short $+2
loc_3B367:
add rsp, 30h
pop rbp
retn
|
long long uf_space_endspace_selected(long long a1, int *a2, _BYTE *a3, _BYTE *a4)
{
int v4; // eax
int v5; // ecx
long long result; // rax
int v7; // eax
int v8; // ecx
unsigned int v9; // eax
int v10; // ecx
unsigned int bits; // [rsp+8h] [rbp-28h]
if ( !a2[1] )
{
fill_buffer((long long)a2);
a2[1] = 31;
if ( *a2 >= 0 )
goto LABEL_6;
return memset(a3, 32LL, a4 - a3);
}
v4 = *a2;
v5 = a2[1] - 1;
a2[1] = v5;
if ( ((1 << v5) & v4) != 0 )
return memset(a3, 32LL, a4 - a3);
LABEL_6:
if ( a2[1] )
{
v7 = *a2;
v8 = a2[1] - 1;
a2[1] = v8;
if ( ((1 << v8) & v7) == 0 )
return decode_bytes(a1, (long long)a2, a3, a4);
}
else
{
fill_buffer((long long)a2);
a2[1] = 31;
if ( *a2 >= 0 )
return decode_bytes(a1, (long long)a2, a3, a4);
}
if ( (unsigned int)a2[1] < *(_DWORD *)(a1 + 36) )
{
bits = fill_and_get_bits(a2, *(_DWORD *)(a1 + 36));
}
else
{
v9 = *a2;
v10 = a2[1] - *(_DWORD *)(a1 + 36);
a2[1] = v10;
bits = mask[*(unsigned int *)(a1 + 36)] & (v9 >> v10);
}
if ( &a3[bits] <= a4 )
{
if ( &a3[bits] != a4 )
decode_bytes(a1, (long long)a2, a3, &a4[-bits]);
return memset(&a4[-bits], 32LL, bits);
}
else
{
result = (long long)a2;
a2[10] = 1;
}
return result;
}
|
uf_space_endspace_selected:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x4],0x0
JZ 0x0013b1e7
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
MOV RDX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RDX + 0x4]
ADD ECX,-0x1
MOV dword ptr [RDX + 0x4],ECX
MOV EDX,0x1
SHL EDX,CL
MOV ECX,EDX
AND EAX,ECX
CMP EAX,0x0
JNZ 0x0013b20b
JMP 0x0013b229
LAB_0013b1e7:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013a9f0
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x4],0x1f
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
AND EAX,0x80000000
CMP EAX,0x0
JZ 0x0013b229
LAB_0013b20b:
MOV RDI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x18]
SUB RDX,RAX
MOV ESI,0x20
CALL 0x0012a2c0
JMP 0x0013b367
LAB_0013b229:
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x4],0x0
JZ 0x0013b25b
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
MOV RDX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RDX + 0x4]
ADD ECX,-0x1
MOV dword ptr [RDX + 0x4],ECX
MOV EDX,0x1
SHL EDX,CL
MOV ECX,EDX
AND EAX,ECX
CMP EAX,0x0
JNZ 0x0013b283
JMP 0x0013b350
LAB_0013b25b:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013a9f0
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x4],0x1f
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
AND EAX,0x80000000
CMP EAX,0x0
JZ 0x0013b350
LAB_0013b283:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x4]
MOV RCX,qword ptr [RBP + -0x8]
CMP EAX,dword ptr [RCX + 0x24]
JC 0x0013b2c6
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RCX + 0x24]
MOV RDX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RDX + 0x4]
SUB ECX,ESI
MOV dword ptr [RDX + 0x4],ECX
SHR EAX,CL
MOV RCX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RCX + 0x24]
MOV EDX,ECX
LEA RCX,[0x3be380]
AND EAX,dword ptr [RCX + RDX*0x4]
MOV dword ptr [RBP + -0x28],EAX
JMP 0x0013b2d9
LAB_0013b2c6:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RAX + 0x24]
CALL 0x0013a1a0
MOV dword ptr [RBP + -0x28],EAX
LAB_0013b2d9:
MOV ECX,dword ptr [RBP + -0x28]
MOV dword ptr [RBP + -0x24],ECX
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,ECX
ADD RAX,RCX
CMP RAX,qword ptr [RBP + -0x20]
JBE 0x0013b2fb
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x28],0x1
JMP 0x0013b367
LAB_0013b2fb:
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0x24]
ADD RAX,RCX
CMP RAX,qword ptr [RBP + -0x20]
JZ 0x0013b32e
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RBP + -0x24]
MOV R8D,EAX
XOR EAX,EAX
SUB RAX,R8
ADD RCX,RAX
CALL 0x0013ad30
LAB_0013b32e:
MOV RDI,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RBP + -0x24]
MOV ECX,EAX
XOR EAX,EAX
SUB RAX,RCX
ADD RDI,RAX
MOV EAX,dword ptr [RBP + -0x24]
MOV EDX,EAX
MOV ESI,0x20
CALL 0x0012a2c0
JMP 0x0013b365
LAB_0013b350:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x20]
CALL 0x0013ad30
LAB_0013b365:
JMP 0x0013b367
LAB_0013b367:
ADD RSP,0x30
POP RBP
RET
|
void uf_space_endspace_selected(long param_1,uint *param_2,void *param_3,ulong param_4)
{
uint uVar1;
uint local_30;
if (param_2[1] == 0) {
fill_buffer(param_2);
param_2[1] = 0x1f;
uVar1 = *param_2 & 0x80000000;
}
else {
uVar1 = param_2[1];
param_2[1] = uVar1 - 1;
uVar1 = *param_2 & 1 << ((byte)(uVar1 - 1) & 0x1f);
}
if (uVar1 == 0) {
if (param_2[1] == 0) {
fill_buffer(param_2);
param_2[1] = 0x1f;
uVar1 = *param_2 & 0x80000000;
}
else {
uVar1 = param_2[1];
param_2[1] = uVar1 - 1;
uVar1 = *param_2 & 1 << ((byte)(uVar1 - 1) & 0x1f);
}
if (uVar1 == 0) {
decode_bytes(param_1,param_2,param_3,param_4);
}
else {
if (param_2[1] < *(uint *)(param_1 + 0x24)) {
local_30 = fill_and_get_bits(param_2,*(int4 *)(param_1 + 0x24));
}
else {
uVar1 = param_2[1] - *(int *)(param_1 + 0x24);
param_2[1] = uVar1;
local_30 = *param_2 >> ((byte)uVar1 & 0x1f) &
*(uint *)(mask + (ulong)*(uint *)(param_1 + 0x24) * 4);
}
if (param_4 < (long)param_3 + (ulong)local_30) {
param_2[10] = 1;
}
else {
if ((long)param_3 + (ulong)local_30 != param_4) {
decode_bytes(param_1,param_2,param_3,param_4 - local_30);
}
memset((void *)(param_4 - local_30),0x20,(ulong)local_30);
}
}
}
else {
memset(param_3,0x20,param_4 - (long)param_3);
}
return;
}
|
|
14,636
|
MasterCommandHandler::handleShotCommand(std::__cxx11::basic_istringstream<char, std::char_traits<char>, std::allocator<char>>&)
|
666mxvbee[P]BattleShip/lib/Commands/MasterCommandHandler.cpp
|
void MasterCommandHandler::handleShotCommand(std::istringstream& iss) {
uint64_t x, y;
if (!(iss >> x >> y)) {
std::cout << "Master: Invalid shot command. Use 'shot X Y'.\n";
return;
}
if (!settings_.getStart()) {
std::cout << "Master: Game not started yet.\n";
return;
}
int currentQueue = manager_.readQueueFromFile("../game_data/queue.txt");
if (currentQueue != 1) {
std::cout << "Master: It's not your turn.\n";
return;
}
std::string result = masterLogic_.handleShot(x, y);
masterLogic_.processShotResult(result, x, y);
manager_.writeShotToFile("../game_data/shots.txt", 1, x, y, result);
if (result == "miss") {
manager_.writeQueueToFile("../game_data/queue.txt", 2);
}
else if (result == "hit" || result == "hit_and_sunk") {
if (masterLogic_.allShipsSunk()) {
std::cout << "Master: All Slave ships have been sunk. Master wins!\n";
settings_.exitGame();
saveSettingsToFile("../game_data/queue.txt", settings_);
}
}
saveSettingsToFile("../game_data/settings.txt", settings_);
}
|
O0
|
cpp
|
MasterCommandHandler::handleShotCommand(std::__cxx11::basic_istringstream<char, std::char_traits<char>, std::allocator<char>>&):
pushq %rbp
movq %rsp, %rbp
subq $0x1b0, %rsp # imm = 0x1B0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x148(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x74c0
movq %rax, %rdi
leaq -0x20(%rbp), %rsi
callq 0x74c0
movq %rax, %rdi
movq (%rdi), %rax
addq -0x18(%rax), %rdi
callq 0x71a0
testb $0x1, %al
jne 0x3d73c
jmp 0x3d754
movq 0x2084d(%rip), %rdi # 0x5df90
leaq 0x429f(%rip), %rsi # 0x419e9
callq 0x7380
jmp 0x3dbcc
movq -0x148(%rbp), %rax
movq (%rax), %rdi
callq 0xa4c0
testb $0x1, %al
jne 0x3d77f
movq 0x20822(%rip), %rdi # 0x5df90
leaq 0x42a3(%rip), %rsi # 0x41a18
callq 0x7380
jmp 0x3dbcc
movq -0x148(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x158(%rbp)
leaq -0x49(%rbp), %rdi
movq %rdi, -0x150(%rbp)
callq 0x7650
movq -0x150(%rbp), %rdx
leaq 0x4288(%rip), %rsi # 0x41a37
leaq -0x48(%rbp), %rdi
callq 0xb110
jmp 0x3d7ba
movq -0x158(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x37a40
movl %eax, -0x15c(%rbp)
jmp 0x3d7d2
leaq -0x48(%rbp), %rdi
callq 0x7e50
leaq -0x49(%rbp), %rdi
callq 0x73d0
movl -0x15c(%rbp), %eax
movl %eax, -0x24(%rbp)
cmpl $0x1, -0x24(%rbp)
je 0x3d83c
movq 0x20796(%rip), %rdi # 0x5df90
leaq 0x424d(%rip), %rsi # 0x41a4e
callq 0x7380
jmp 0x3dbcc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x3d82e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x7e50
leaq -0x49(%rbp), %rdi
callq 0x73d0
jmp 0x3dc10
movq -0x148(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
leaq -0x80(%rbp), %rdi
movq %rdi, -0x168(%rbp)
callq 0x38640
movq -0x148(%rbp), %rax
movq -0x168(%rbp), %rsi
movq 0x10(%rax), %rdi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x38810
jmp 0x3d880
movq -0x148(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x178(%rbp)
leaq -0xa1(%rbp), %rdi
movq %rdi, -0x170(%rbp)
callq 0x7650
movq -0x170(%rbp), %rdx
leaq 0x41b8(%rip), %rsi # 0x41a6b
leaq -0xa0(%rbp), %rdi
callq 0xb110
jmp 0x3d8c1
movq -0x178(%rbp), %rdi
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %r8
leaq -0xa0(%rbp), %rsi
movl $0x1, %edx
leaq -0x80(%rbp), %r9
callq 0x37d30
jmp 0x3d8e7
leaq -0xa0(%rbp), %rdi
callq 0x7e50
leaq -0xa1(%rbp), %rdi
callq 0x73d0
leaq 0x3ad4(%rip), %rsi # 0x413da
leaq -0x80(%rbp), %rdi
callq 0xb230
movb %al, -0x179(%rbp)
jmp 0x3d917
movb -0x179(%rbp), %al
testb $0x1, %al
jne 0x3d926
jmp 0x3da1d
movq -0x148(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x190(%rbp)
leaq -0xc9(%rbp), %rdi
movq %rdi, -0x188(%rbp)
callq 0x7650
movq -0x188(%rbp), %rdx
leaq 0x40de(%rip), %rsi # 0x41a37
leaq -0xc8(%rbp), %rdi
callq 0xb110
jmp 0x3d967
movq -0x190(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
movl $0x2, %edx
callq 0x37bd0
jmp 0x3d981
leaq -0xc8(%rbp), %rdi
callq 0x7e50
leaq -0xc9(%rbp), %rdi
callq 0x73d0
jmp 0x3db64
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x3dc07
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x3d9d5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x7e50
leaq -0xa1(%rbp), %rdi
callq 0x73d0
jmp 0x3dc07
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x3da0c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x7e50
leaq -0xc9(%rbp), %rdi
callq 0x73d0
jmp 0x3dc07
leaq 0x39b2(%rip), %rsi # 0x413d6
leaq -0x80(%rbp), %rdi
callq 0xb230
movb %al, -0x191(%rbp)
jmp 0x3da35
movb -0x191(%rbp), %al
testb $0x1, %al
jne 0x3da68
jmp 0x3da41
leaq 0x3981(%rip), %rsi # 0x413c9
leaq -0x80(%rbp), %rdi
callq 0xb230
movb %al, -0x192(%rbp)
jmp 0x3da59
movb -0x192(%rbp), %al
testb $0x1, %al
jne 0x3da68
jmp 0x3db62
movq -0x148(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x392b0
movb %al, -0x193(%rbp)
jmp 0x3da80
movb -0x193(%rbp), %al
testb $0x1, %al
jne 0x3da8f
jmp 0x3db60
movq 0x204fa(%rip), %rdi # 0x5df90
leaq 0x3fe5(%rip), %rsi # 0x41a82
callq 0x7380
jmp 0x3daa4
movq -0x148(%rbp), %rax
movq (%rax), %rsi
leaq -0xf0(%rbp), %rdi
callq 0xa640
jmp 0x3dabc
leaq -0xf0(%rbp), %rdi
callq 0x7e50
leaq -0x111(%rbp), %rdi
movq %rdi, -0x1a0(%rbp)
callq 0x7650
movq -0x1a0(%rbp), %rdx
leaq 0x3f4e(%rip), %rsi # 0x41a37
leaq -0x110(%rbp), %rdi
callq 0xb110
jmp 0x3daf7
movq -0x148(%rbp), %rax
movq (%rax), %rsi
leaq -0x110(%rbp), %rdi
callq 0x3dfb0
jmp 0x3db0f
leaq -0x110(%rbp), %rdi
callq 0x7e50
leaq -0x111(%rbp), %rdi
callq 0x73d0
jmp 0x3db60
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x3db4f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x7e50
leaq -0x111(%rbp), %rdi
callq 0x73d0
jmp 0x3dc07
jmp 0x3db62
jmp 0x3db64
leaq -0x139(%rbp), %rdi
movq %rdi, -0x1a8(%rbp)
callq 0x7650
movq -0x1a8(%rbp), %rdx
leaq 0x3abc(%rip), %rsi # 0x41641
leaq -0x138(%rbp), %rdi
callq 0xb110
jmp 0x3db93
movq -0x148(%rbp), %rax
movq (%rax), %rsi
leaq -0x138(%rbp), %rdi
callq 0x3dfb0
jmp 0x3dbab
leaq -0x138(%rbp), %rdi
callq 0x7e50
leaq -0x139(%rbp), %rdi
callq 0x73d0
leaq -0x80(%rbp), %rdi
callq 0x7e50
addq $0x1b0, %rsp # imm = 0x1B0
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x3dbfb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x138(%rbp), %rdi
callq 0x7e50
leaq -0x139(%rbp), %rdi
callq 0x73d0
leaq -0x80(%rbp), %rdi
callq 0x7e50
movq -0x58(%rbp), %rdi
callq 0x7640
nopl (%rax)
|
_ZN20MasterCommandHandler17handleShotCommandERNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE:
push rbp
mov rbp, rsp
sub rsp, 1B0h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov [rbp+var_148], rax
mov rdi, [rbp+var_10]
lea rsi, [rbp+var_18]
call __ZNSirsERm; std::istream::operator>>(ulong &)
mov rdi, rax
lea rsi, [rbp+var_20]
call __ZNSirsERm; std::istream::operator>>(ulong &)
mov rdi, rax
mov rax, [rdi]
add rdi, [rax-18h]
call __ZNKSt9basic_iosIcSt11char_traitsIcEEntEv; std::ios::operator!(void)
test al, 1
jnz short loc_3D73C
jmp short loc_3D754
loc_3D73C:
mov rdi, cs:_ZSt4cout_ptr
lea rsi, aMasterInvalidS_0; "Master: Invalid shot command. Use 'shot"...
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp loc_3DBCC
loc_3D754:
mov rax, [rbp+var_148]
mov rdi, [rax]; this
call _ZNK8Settings8getStartEv; Settings::getStart(void)
test al, 1
jnz short loc_3D77F
mov rdi, cs:_ZSt4cout_ptr
lea rsi, aMasterGameNotS; "Master: Game not started yet.\n"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp loc_3DBCC
loc_3D77F:
mov rax, [rbp+var_148]
mov rax, [rax+8]
mov [rbp+var_158], rax
lea rdi, [rbp+var_49]
mov [rbp+var_150], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, [rbp+var_150]
lea rsi, aGameDataQueueT; "../game_data/queue.txt"
lea rdi, [rbp+var_48]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_3D7BA:
mov rdi, [rbp+var_158]
lea rsi, [rbp+var_48]
call _ZN14ReadWriteQueue17readQueueFromFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; ReadWriteQueue::readQueueFromFile(std::string const&)
mov [rbp+var_15C], eax
jmp short $+2
loc_3D7D2:
lea rdi, [rbp+var_48]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rbp+var_49]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov eax, [rbp+var_15C]
mov [rbp+var_24], eax
cmp [rbp+var_24], 1
jz short loc_3D83C
mov rdi, cs:_ZSt4cout_ptr
lea rsi, aMasterItSNotYo; "Master: It's not your turn.\n"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp loc_3DBCC
mov rcx, rax
mov eax, edx
mov [rbp+var_58], rcx
mov [rbp+var_5C], eax
jmp short loc_3D82E
mov rcx, rax
mov eax, edx
mov [rbp+var_58], rcx
mov [rbp+var_5C], eax
lea rdi, [rbp+var_48]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_3D82E:
lea rdi, [rbp+var_49]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_3DC10
loc_3D83C:
mov rax, [rbp+var_148]
mov rsi, [rax+10h]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_20]
lea rdi, [rbp+var_80]
mov [rbp+var_168], rdi
call _ZN6Master10handleShotB5cxx11Emm; Master::handleShot(ulong,ulong)
mov rax, [rbp+var_148]
mov rsi, [rbp+var_168]
mov rdi, [rax+10h]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_20]
call _ZN6Master17processShotResultERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmm; Master::processShotResult(std::string const&,ulong,ulong)
jmp short $+2
loc_3D880:
mov rax, [rbp+var_148]
mov rax, [rax+8]
mov [rbp+var_178], rax
lea rdi, [rbp+var_A1]
mov [rbp+var_170], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, [rbp+var_170]
lea rsi, aGameDataShotsT; "../game_data/shots.txt"
lea rdi, [rbp+var_A0]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_3D8C1:
mov rdi, [rbp+var_178]
mov rcx, [rbp+var_18]
mov r8, [rbp+var_20]
lea rsi, [rbp+var_A0]
mov edx, 1
lea r9, [rbp+var_80]
call _ZN14ReadWriteQueue15writeShotToFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEimmS7_; ReadWriteQueue::writeShotToFile(std::string const&,int,ulong,ulong,std::string const&)
jmp short $+2
loc_3D8E7:
lea rdi, [rbp+var_A0]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rbp+var_A1]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
lea rsi, aMiss; "miss"
lea rdi, [rbp+var_80]
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
mov [rbp+var_179], al
jmp short $+2
loc_3D917:
mov al, [rbp+var_179]
test al, 1
jnz short loc_3D926
jmp loc_3DA1D
loc_3D926:
mov rax, [rbp+var_148]
mov rax, [rax+8]
mov [rbp+var_190], rax
lea rdi, [rbp+var_C9]
mov [rbp+var_188], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, [rbp+var_188]
lea rsi, aGameDataQueueT; "../game_data/queue.txt"
lea rdi, [rbp+var_C8]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_3D967:
mov rdi, [rbp+var_190]
lea rsi, [rbp+var_C8]
mov edx, 2
call _ZN14ReadWriteQueue16writeQueueToFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; ReadWriteQueue::writeQueueToFile(std::string const&,int)
jmp short $+2
loc_3D981:
lea rdi, [rbp+var_C8]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rbp+var_C9]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_3DB64
mov rcx, rax
mov eax, edx
mov [rbp+var_58], rcx
mov [rbp+var_5C], eax
jmp loc_3DC07
mov rcx, rax
mov eax, edx
mov [rbp+var_58], rcx
mov [rbp+var_5C], eax
jmp short loc_3D9D5
mov rcx, rax
mov eax, edx
mov [rbp+var_58], rcx
mov [rbp+var_5C], eax
lea rdi, [rbp+var_A0]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_3D9D5:
lea rdi, [rbp+var_A1]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_3DC07
mov rcx, rax
mov eax, edx
mov [rbp+var_58], rcx
mov [rbp+var_5C], eax
jmp short loc_3DA0C
mov rcx, rax
mov eax, edx
mov [rbp+var_58], rcx
mov [rbp+var_5C], eax
lea rdi, [rbp+var_C8]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_3DA0C:
lea rdi, [rbp+var_C9]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_3DC07
loc_3DA1D:
lea rsi, aHit; "hit"
lea rdi, [rbp+var_80]
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
mov [rbp+var_191], al
jmp short $+2
loc_3DA35:
mov al, [rbp+var_191]
test al, 1
jnz short loc_3DA68
jmp short $+2
loc_3DA41:
lea rsi, aHitAndSunk; "hit_and_sunk"
lea rdi, [rbp+var_80]
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
mov [rbp+var_192], al
jmp short $+2
loc_3DA59:
mov al, [rbp+var_192]
test al, 1
jnz short loc_3DA68
jmp loc_3DB62
loc_3DA68:
mov rax, [rbp+var_148]
mov rdi, [rax+10h]; this
call _ZNK6Master12allShipsSunkEv; Master::allShipsSunk(void)
mov [rbp+var_193], al
jmp short $+2
loc_3DA80:
mov al, [rbp+var_193]
test al, 1
jnz short loc_3DA8F
jmp loc_3DB60
loc_3DA8F:
mov rdi, cs:_ZSt4cout_ptr
lea rsi, aMasterAllSlave; "Master: All Slave ships have been sunk."...
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_3DAA4:
mov rax, [rbp+var_148]
mov rsi, [rax]
lea rdi, [rbp+var_F0]
call _ZN8Settings8exitGameB5cxx11Ev; Settings::exitGame(void)
jmp short $+2
loc_3DABC:
lea rdi, [rbp+var_F0]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rbp+var_111]
mov [rbp+var_1A0], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, [rbp+var_1A0]
lea rsi, aGameDataQueueT; "../game_data/queue.txt"
lea rdi, [rbp+var_110]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_3DAF7:
mov rax, [rbp+var_148]
mov rsi, [rax]
lea rdi, [rbp+var_110]
call _Z18saveSettingsToFileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK8Settings; saveSettingsToFile(std::string const&,Settings const&)
jmp short $+2
loc_3DB0F:
lea rdi, [rbp+var_110]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rbp+var_111]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_3DB60
mov rcx, rax
mov eax, edx
mov [rbp+var_58], rcx
mov [rbp+var_5C], eax
jmp short loc_3DB4F
mov rcx, rax
mov eax, edx
mov [rbp+var_58], rcx
mov [rbp+var_5C], eax
lea rdi, [rbp+var_110]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_3DB4F:
lea rdi, [rbp+var_111]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_3DC07
loc_3DB60:
jmp short $+2
loc_3DB62:
jmp short $+2
loc_3DB64:
lea rdi, [rbp+var_139]
mov [rbp+var_1A8], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, [rbp+var_1A8]
lea rsi, aGameDataSettin; "../game_data/settings.txt"
lea rdi, [rbp+var_138]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_3DB93:
mov rax, [rbp+var_148]
mov rsi, [rax]
lea rdi, [rbp+var_138]
call _Z18saveSettingsToFileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK8Settings; saveSettingsToFile(std::string const&,Settings const&)
jmp short $+2
loc_3DBAB:
lea rdi, [rbp+var_138]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rbp+var_139]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
lea rdi, [rbp+var_80]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_3DBCC:
add rsp, 1B0h
pop rbp
retn
mov rcx, rax
mov eax, edx
mov [rbp+var_58], rcx
mov [rbp+var_5C], eax
jmp short loc_3DBFB
mov rcx, rax
mov eax, edx
mov [rbp+var_58], rcx
mov [rbp+var_5C], eax
lea rdi, [rbp+var_138]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_3DBFB:
lea rdi, [rbp+var_139]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
loc_3DC07:
lea rdi, [rbp+var_80]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_3DC10:
mov rdi, [rbp+var_58]
call __Unwind_Resume
|
long long MasterCommandHandler::handleShotCommand(long long *a1, long long a2)
{
long long v2; // rax
_QWORD *v3; // rax
std::mutex *v5; // [rsp+20h] [rbp-190h]
std::mutex *v6; // [rsp+38h] [rbp-178h]
int QueueFromFile; // [rsp+54h] [rbp-15Ch]
std::mutex *v8; // [rsp+58h] [rbp-158h]
char v9; // [rsp+77h] [rbp-139h] BYREF
_QWORD v10[4]; // [rsp+78h] [rbp-138h] BYREF
char v11; // [rsp+9Fh] [rbp-111h] BYREF
_QWORD v12[4]; // [rsp+A0h] [rbp-110h] BYREF
_BYTE v13[39]; // [rsp+C0h] [rbp-F0h] BYREF
char v14; // [rsp+E7h] [rbp-C9h] BYREF
_QWORD v15[4]; // [rsp+E8h] [rbp-C8h] BYREF
char v16; // [rsp+10Fh] [rbp-A1h] BYREF
_QWORD v17[4]; // [rsp+110h] [rbp-A0h] BYREF
_QWORD v18[4]; // [rsp+130h] [rbp-80h] BYREF
char v19; // [rsp+167h] [rbp-49h] BYREF
_QWORD v20[4]; // [rsp+168h] [rbp-48h] BYREF
int v21; // [rsp+18Ch] [rbp-24h]
unsigned long long v22; // [rsp+190h] [rbp-20h] BYREF
long long v23[3]; // [rsp+198h] [rbp-18h] BYREF
v23[2] = (long long)a1;
v23[1] = a2;
v2 = std::istream::operator>>(a2, v23);
v3 = (_QWORD *)std::istream::operator>>(v2, &v22);
if ( (std::ios::operator!((char *)v3 + *(_QWORD *)(*v3 - 24LL)) & 1) != 0 )
return std::operator<<<std::char_traits<char>>(&std::cout, "Master: Invalid shot command. Use 'shot X Y'.\n");
if ( (Settings::getStart((Settings *)*a1) & 1) == 0 )
return std::operator<<<std::char_traits<char>>(&std::cout, "Master: Game not started yet.\n");
v8 = (std::mutex *)a1[1];
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>(v20, (long long)"../game_data/queue.txt", (long long)&v19);
QueueFromFile = ReadWriteQueue::readQueueFromFile(v8, (long long)v20);
std::string::~string((long long)v20);
std::allocator<char>::~allocator(&v19);
v21 = QueueFromFile;
if ( QueueFromFile != 1 )
return std::operator<<<std::char_traits<char>>(&std::cout, "Master: It's not your turn.\n");
Master::handleShot[abi:cxx11](v18, (Settings **)a1[2], v23[0], v22);
Master::processShotResult(a1[2], (long long)v18, v23[0], v22);
v6 = (std::mutex *)a1[1];
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>(v17, (long long)"../game_data/shots.txt", (long long)&v16);
ReadWriteQueue::writeShotToFile(v6, (long long)v17, 1u, v23[0], v22, (long long)v18);
std::string::~string((long long)v17);
std::allocator<char>::~allocator(&v16);
if ( std::operator==<char>((long long)v18, (long long)"miss") )
{
v5 = (std::mutex *)a1[1];
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>(v15, (long long)"../game_data/queue.txt", (long long)&v14);
ReadWriteQueue::writeQueueToFile(v5, (long long)v15, 2u);
std::string::~string((long long)v15);
std::allocator<char>::~allocator(&v14);
}
else if ( (std::operator==<char>((long long)v18, (long long)"hit")
|| std::operator==<char>((long long)v18, (long long)"hit_and_sunk"))
&& (Master::allShipsSunk((Settings **)a1[2]) & 1) != 0 )
{
std::operator<<<std::char_traits<char>>(&std::cout, "Master: All Slave ships have been sunk. Master wins!\n");
Settings::exitGame[abi:cxx11]((long long)v13, *a1);
std::string::~string((long long)v13);
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>(v12, (long long)"../game_data/queue.txt", (long long)&v11);
saveSettingsToFile(v12, *a1);
std::string::~string((long long)v12);
std::allocator<char>::~allocator(&v11);
}
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>(v10, (long long)"../game_data/settings.txt", (long long)&v9);
saveSettingsToFile(v10, *a1);
std::string::~string((long long)v10);
std::allocator<char>::~allocator(&v9);
return std::string::~string((long long)v18);
}
|
handleShotCommand:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x1b0
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x148],RAX
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[RBP + -0x18]
CALL 0x001074c0
MOV RDI,RAX
LEA RSI,[RBP + -0x20]
CALL 0x001074c0
MOV RDI,RAX
MOV RAX,qword ptr [RDI]
ADD RDI,qword ptr [RAX + -0x18]
CALL 0x001071a0
TEST AL,0x1
JNZ 0x0013d73c
JMP 0x0013d754
LAB_0013d73c:
MOV RDI,qword ptr [0x0015df90]
LEA RSI,[0x1419e9]
CALL 0x00107380
JMP 0x0013dbcc
LAB_0013d754:
MOV RAX,qword ptr [RBP + -0x148]
MOV RDI,qword ptr [RAX]
CALL 0x0010a4c0
TEST AL,0x1
JNZ 0x0013d77f
MOV RDI,qword ptr [0x0015df90]
LEA RSI,[0x141a18]
CALL 0x00107380
JMP 0x0013dbcc
LAB_0013d77f:
MOV RAX,qword ptr [RBP + -0x148]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x158],RAX
LEA RDI,[RBP + -0x49]
MOV qword ptr [RBP + -0x150],RDI
CALL 0x00107650
MOV RDX,qword ptr [RBP + -0x150]
LAB_0013d7a8:
LEA RSI,[0x141a37]
LEA RDI,[RBP + -0x48]
CALL 0x0010b110
JMP 0x0013d7ba
LAB_0013d7ba:
MOV RDI,qword ptr [RBP + -0x158]
LEA RSI,[RBP + -0x48]
CALL 0x00137a40
LAB_0013d7ca:
MOV dword ptr [RBP + -0x15c],EAX
JMP 0x0013d7d2
LAB_0013d7d2:
LEA RDI,[RBP + -0x48]
CALL 0x00107e50
LEA RDI,[RBP + -0x49]
CALL 0x001073d0
MOV EAX,dword ptr [RBP + -0x15c]
MOV dword ptr [RBP + -0x24],EAX
CMP dword ptr [RBP + -0x24],0x1
JZ 0x0013d83c
MOV RDI,qword ptr [0x0015df90]
LEA RSI,[0x141a4e]
CALL 0x00107380
JMP 0x0013dbcc
LAB_0013d83c:
MOV RAX,qword ptr [RBP + -0x148]
MOV RSI,qword ptr [RAX + 0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x20]
LEA RDI,[RBP + -0x80]
MOV qword ptr [RBP + -0x168],RDI
CALL 0x00138640
MOV RAX,qword ptr [RBP + -0x148]
MOV RSI,qword ptr [RBP + -0x168]
MOV RDI,qword ptr [RAX + 0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x20]
LAB_0013d879:
CALL 0x00138810
JMP 0x0013d880
LAB_0013d880:
MOV RAX,qword ptr [RBP + -0x148]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x178],RAX
LEA RDI,[RBP + -0xa1]
MOV qword ptr [RBP + -0x170],RDI
CALL 0x00107650
MOV RDX,qword ptr [RBP + -0x170]
LAB_0013d8ac:
LEA RSI,[0x141a6b]
LEA RDI,[RBP + -0xa0]
CALL 0x0010b110
JMP 0x0013d8c1
LAB_0013d8c1:
MOV RDI,qword ptr [RBP + -0x178]
MOV RCX,qword ptr [RBP + -0x18]
MOV R8,qword ptr [RBP + -0x20]
LAB_0013d8d0:
LEA RSI,[RBP + -0xa0]
MOV EDX,0x1
LEA R9,[RBP + -0x80]
CALL 0x00137d30
JMP 0x0013d8e7
LAB_0013d8e7:
LEA RDI,[RBP + -0xa0]
CALL 0x00107e50
LEA RDI,[RBP + -0xa1]
CALL 0x001073d0
LAB_0013d8ff:
LEA RSI,[0x1413da]
LEA RDI,[RBP + -0x80]
CALL 0x0010b230
MOV byte ptr [RBP + -0x179],AL
JMP 0x0013d917
LAB_0013d917:
MOV AL,byte ptr [RBP + -0x179]
TEST AL,0x1
JNZ 0x0013d926
JMP 0x0013da1d
LAB_0013d926:
MOV RAX,qword ptr [RBP + -0x148]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x190],RAX
LEA RDI,[RBP + -0xc9]
MOV qword ptr [RBP + -0x188],RDI
CALL 0x00107650
MOV RDX,qword ptr [RBP + -0x188]
LAB_0013d952:
LEA RSI,[0x141a37]
LEA RDI,[RBP + -0xc8]
CALL 0x0010b110
JMP 0x0013d967
LAB_0013d967:
MOV RDI,qword ptr [RBP + -0x190]
LEA RSI,[RBP + -0xc8]
MOV EDX,0x2
CALL 0x00137bd0
JMP 0x0013d981
LAB_0013d981:
LEA RDI,[RBP + -0xc8]
CALL 0x00107e50
LEA RDI,[RBP + -0xc9]
CALL 0x001073d0
JMP 0x0013db64
LAB_0013da1d:
LEA RSI,[0x1413d6]
LEA RDI,[RBP + -0x80]
CALL 0x0010b230
MOV byte ptr [RBP + -0x191],AL
JMP 0x0013da35
LAB_0013da35:
MOV AL,byte ptr [RBP + -0x191]
TEST AL,0x1
JNZ 0x0013da68
JMP 0x0013da41
LAB_0013da41:
LEA RSI,[0x1413c9]
LEA RDI,[RBP + -0x80]
CALL 0x0010b230
MOV byte ptr [RBP + -0x192],AL
JMP 0x0013da59
LAB_0013da59:
MOV AL,byte ptr [RBP + -0x192]
TEST AL,0x1
JNZ 0x0013da68
JMP 0x0013db62
LAB_0013da68:
MOV RAX,qword ptr [RBP + -0x148]
MOV RDI,qword ptr [RAX + 0x10]
CALL 0x001392b0
MOV byte ptr [RBP + -0x193],AL
JMP 0x0013da80
LAB_0013da80:
MOV AL,byte ptr [RBP + -0x193]
TEST AL,0x1
JNZ 0x0013da8f
JMP 0x0013db60
LAB_0013da8f:
MOV RDI,qword ptr [0x0015df90]
LEA RSI,[0x141a82]
CALL 0x00107380
JMP 0x0013daa4
LAB_0013daa4:
MOV RAX,qword ptr [RBP + -0x148]
MOV RSI,qword ptr [RAX]
LEA RDI,[RBP + -0xf0]
CALL 0x0010a640
JMP 0x0013dabc
LAB_0013dabc:
LEA RDI,[RBP + -0xf0]
CALL 0x00107e50
LEA RDI,[RBP + -0x111]
MOV qword ptr [RBP + -0x1a0],RDI
CALL 0x00107650
MOV RDX,qword ptr [RBP + -0x1a0]
LAB_0013dae2:
LEA RSI,[0x141a37]
LEA RDI,[RBP + -0x110]
CALL 0x0010b110
JMP 0x0013daf7
LAB_0013daf7:
MOV RAX,qword ptr [RBP + -0x148]
MOV RSI,qword ptr [RAX]
LAB_0013db01:
LEA RDI,[RBP + -0x110]
CALL 0x0013dfb0
JMP 0x0013db0f
LAB_0013db0f:
LEA RDI,[RBP + -0x110]
CALL 0x00107e50
LEA RDI,[RBP + -0x111]
CALL 0x001073d0
JMP 0x0013db60
LAB_0013db60:
JMP 0x0013db62
LAB_0013db62:
JMP 0x0013db64
LAB_0013db64:
LEA RDI,[RBP + -0x139]
MOV qword ptr [RBP + -0x1a8],RDI
CALL 0x00107650
MOV RDX,qword ptr [RBP + -0x1a8]
LAB_0013db7e:
LEA RSI,[0x141641]
LEA RDI,[RBP + -0x138]
CALL 0x0010b110
JMP 0x0013db93
LAB_0013db93:
MOV RAX,qword ptr [RBP + -0x148]
MOV RSI,qword ptr [RAX]
LAB_0013db9d:
LEA RDI,[RBP + -0x138]
CALL 0x0013dfb0
LAB_0013dba9:
JMP 0x0013dbab
LAB_0013dbab:
LEA RDI,[RBP + -0x138]
CALL 0x00107e50
LEA RDI,[RBP + -0x139]
CALL 0x001073d0
LEA RDI,[RBP + -0x80]
CALL 0x00107e50
LAB_0013dbcc:
ADD RSP,0x1b0
POP RBP
RET
|
/* MasterCommandHandler::handleShotCommand(std::__cxx11::istringstream&) */
void __thiscall
MasterCommandHandler::handleShotCommand(MasterCommandHandler *this,istringstream *param_1)
{
ReadWriteQueue *pRVar1;
bool bVar2;
byte bVar3;
int iVar4;
istream *this_00;
long *plVar5;
ulong uVar6;
allocator local_141;
string local_140 [39];
allocator local_119;
string local_118 [32];
string local_f8 [39];
allocator local_d1;
string local_d0 [39];
allocator local_a9;
string local_a8 [32];
string local_88 [55];
allocator local_51;
string local_50 [36];
int local_2c;
ulong local_28;
ulong local_20;
istringstream *local_18;
MasterCommandHandler *local_10;
local_18 = param_1;
local_10 = this;
this_00 = (istream *)std::istream::operator>>((istream *)param_1,&local_20);
plVar5 = (long *)std::istream::operator>>(this_00,&local_28);
uVar6 = std::ios::operator!((ios *)((long)plVar5 + *(long *)(*plVar5 + -0x18)));
if ((uVar6 & 1) == 0) {
uVar6 = Settings::getStart(*(Settings **)this);
if ((uVar6 & 1) == 0) {
std::operator<<((ostream *)PTR_cout_0015df90,"Master: Game not started yet.\n");
}
else {
pRVar1 = *(ReadWriteQueue **)(this + 8);
std::allocator<char>::allocator();
/* try { // try from 0013d7a8 to 0013d7b7 has its CatchHandler @ 0013d80b */
std::__cxx11::string::string<std::allocator<char>>
(local_50,"../game_data/queue.txt",&local_51);
/* try { // try from 0013d7ba to 0013d7c9 has its CatchHandler @ 0013d819 */
iVar4 = ReadWriteQueue::readQueueFromFile(pRVar1,local_50);
std::__cxx11::string::~string(local_50);
std::allocator<char>::~allocator((allocator<char> *)&local_51);
local_2c = iVar4;
if (iVar4 == 1) {
Master::handleShot_abi_cxx11_((ulong)local_88,*(ulong *)(this + 0x10));
/* try { // try from 0013d879 to 0013d87d has its CatchHandler @ 0013d99e */
Master::processShotResult(*(Master **)(this + 0x10),local_88,local_20,local_28);
pRVar1 = *(ReadWriteQueue **)(this + 8);
std::allocator<char>::allocator();
/* try { // try from 0013d8ac to 0013d8be has its CatchHandler @ 0013d9af */
std::__cxx11::string::string<std::allocator<char>>
(local_a8,"../game_data/shots.txt",&local_a9);
/* try { // try from 0013d8d0 to 0013d8e4 has its CatchHandler @ 0013d9bd */
ReadWriteQueue::writeShotToFile(pRVar1,local_a8,1,local_20,local_28,local_88);
std::__cxx11::string::~string(local_a8);
std::allocator<char>::~allocator((allocator<char> *)&local_a9);
/* try { // try from 0013d8ff to 0013d90e has its CatchHandler @ 0013d99e */
bVar2 = std::operator==(local_88,"miss");
if (bVar2) {
pRVar1 = *(ReadWriteQueue **)(this + 8);
std::allocator<char>::allocator();
/* try { // try from 0013d952 to 0013d964 has its CatchHandler @ 0013d9e6 */
std::__cxx11::string::string<std::allocator<char>>
(local_d0,"../game_data/queue.txt",&local_d1);
/* try { // try from 0013d967 to 0013d97e has its CatchHandler @ 0013d9f4 */
ReadWriteQueue::writeQueueToFile(pRVar1,local_d0,2);
std::__cxx11::string::~string(local_d0);
std::allocator<char>::~allocator((allocator<char> *)&local_d1);
}
else {
/* try { // try from 0013da1d to 0013dab9 has its CatchHandler @ 0013d99e */
bVar2 = std::operator==(local_88,"hit");
if (((bVar2) || (bVar2 = std::operator==(local_88,"hit_and_sunk"), bVar2)) &&
(bVar3 = Master::allShipsSunk(*(Master **)(this + 0x10)), (bVar3 & 1) != 0)) {
std::operator<<((ostream *)PTR_cout_0015df90,
"Master: All Slave ships have been sunk. Master wins!\n");
Settings::exitGame_abi_cxx11_();
std::__cxx11::string::~string(local_f8);
std::allocator<char>::allocator();
/* try { // try from 0013dae2 to 0013daf4 has its CatchHandler @ 0013db29 */
std::__cxx11::string::string<std::allocator<char>>
(local_118,"../game_data/queue.txt",&local_119);
/* try { // try from 0013db01 to 0013db0c has its CatchHandler @ 0013db37 */
saveSettingsToFile(local_118,*(Settings **)this);
std::__cxx11::string::~string(local_118);
std::allocator<char>::~allocator((allocator<char> *)&local_119);
}
}
std::allocator<char>::allocator();
/* try { // try from 0013db7e to 0013db90 has its CatchHandler @ 0013dbd5 */
std::__cxx11::string::string<std::allocator<char>>
(local_140,"../game_data/settings.txt",&local_141);
/* try { // try from 0013db9d to 0013dba8 has its CatchHandler @ 0013dbe3 */
saveSettingsToFile(local_140,*(Settings **)this);
std::__cxx11::string::~string(local_140);
std::allocator<char>::~allocator((allocator<char> *)&local_141);
std::__cxx11::string::~string(local_88);
}
else {
std::operator<<((ostream *)PTR_cout_0015df90,"Master: It\'s not your turn.\n");
}
}
}
else {
std::operator<<((ostream *)PTR_cout_0015df90,"Master: Invalid shot command. Use \'shot X Y\'.\n"
);
}
return;
}
|
|
14,637
|
MasterCommandHandler::handleShotCommand(std::__cxx11::basic_istringstream<char, std::char_traits<char>, std::allocator<char>>&)
|
666mxvbee[P]BattleShip/lib/Commands/MasterCommandHandler.cpp
|
void MasterCommandHandler::handleShotCommand(std::istringstream& iss) {
uint64_t x, y;
if (!(iss >> x >> y)) {
std::cout << "Master: Invalid shot command. Use 'shot X Y'.\n";
return;
}
if (!settings_.getStart()) {
std::cout << "Master: Game not started yet.\n";
return;
}
int currentQueue = manager_.readQueueFromFile("../game_data/queue.txt");
if (currentQueue != 1) {
std::cout << "Master: It's not your turn.\n";
return;
}
std::string result = masterLogic_.handleShot(x, y);
masterLogic_.processShotResult(result, x, y);
manager_.writeShotToFile("../game_data/shots.txt", 1, x, y, result);
if (result == "miss") {
manager_.writeQueueToFile("../game_data/queue.txt", 2);
}
else if (result == "hit" || result == "hit_and_sunk") {
if (masterLogic_.allShipsSunk()) {
std::cout << "Master: All Slave ships have been sunk. Master wins!\n";
settings_.exitGame();
saveSettingsToFile("../game_data/queue.txt", settings_);
}
}
saveSettingsToFile("../game_data/settings.txt", settings_);
}
|
O1
|
cpp
|
MasterCommandHandler::handleShotCommand(std::__cxx11::basic_istringstream<char, std::char_traits<char>, std::allocator<char>>&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x70, %rsp
movq %rsi, %rax
movq %rdi, %rbx
leaq 0x48(%rsp), %rsi
movq %rax, %rdi
callq 0x51d0
leaq 0x40(%rsp), %rsi
movq %rax, %rdi
callq 0x51d0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
je 0x1833e
movq 0xcc73(%rip), %rdi # 0x24fa0
leaq 0x361a(%rip), %rsi # 0x1b94e
movl $0x2e, %edx
jmp 0x18512
movq (%rbx), %rdi
callq 0x6c5c
testb %al, %al
je 0x184ea
movq 0x8(%rbx), %r14
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x363a(%rip), %rsi # 0x1b99c
leaq 0x3649(%rip), %rdx # 0x1b9b2
leaq 0x20(%rsp), %rdi
callq 0x603a
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x150b4
movl %eax, %ebp
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x18399
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x53a0
cmpl $0x1, %ebp
jne 0x184ff
movq 0x10(%rbx), %rsi
movq 0x48(%rsp), %rdx
movq 0x40(%rsp), %rcx
leaq 0x20(%rsp), %r14
movq %r14, %rdi
callq 0x15750
movq 0x10(%rbx), %rdi
movq 0x48(%rsp), %rdx
movq 0x40(%rsp), %rcx
movq %r14, %rsi
callq 0x157fe
movq 0x8(%rbx), %r14
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x35e8(%rip), %rsi # 0x1b9d0
leaq 0x35f7(%rip), %rdx # 0x1b9e6
movq %rsp, %rdi
callq 0x603a
movq 0x48(%rsp), %rcx
movq 0x40(%rsp), %r8
movq %rsp, %rsi
leaq 0x20(%rsp), %r9
movq %r14, %rdi
movl $0x1, %edx
callq 0x152fc
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x1842c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x53a0
leaq 0x2ed5(%rip), %rsi # 0x1b308
leaq 0x20(%rsp), %rdi
callq 0x7462
testl %eax, %eax
je 0x18524
leaq 0x2eb8(%rip), %rsi # 0x1b304
leaq 0x20(%rsp), %rdi
callq 0x7462
testl %eax, %eax
je 0x18473
leaq 0x2e96(%rip), %rsi # 0x1b2f7
leaq 0x20(%rsp), %rdi
callq 0x7462
testl %eax, %eax
jne 0x18567
movq 0x10(%rbx), %rdi
callq 0x161e4
testb %al, %al
je 0x18567
movq 0xcb15(%rip), %rdi # 0x24fa0
leaq 0x3555(%rip), %rsi # 0x1b9e7
movl $0x35, %edx
callq 0x5420
movq (%rbx), %rsi
leaq 0x50(%rsp), %rdi
callq 0x6d40
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x184c4
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x53a0
movq %rsp, %rdi
movq %r12, (%rdi)
leaq 0x34cb(%rip), %rsi # 0x1b99c
leaq 0x34da(%rip), %rdx # 0x1b9b2
callq 0x603a
movq (%rbx), %rsi
movq %rsp, %rdi
callq 0x18614
jmp 0x18551
movq 0xcaaf(%rip), %rdi # 0x24fa0
leaq 0x3485(%rip), %rsi # 0x1b97d
movl $0x1e, %edx
jmp 0x18512
movq 0xca9a(%rip), %rdi # 0x24fa0
leaq 0x34a6(%rip), %rsi # 0x1b9b3
movl $0x1c, %edx
callq 0x5420
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rbx), %r14
movq %rsp, %rdi
movq %r12, (%rdi)
leaq 0x3467(%rip), %rsi # 0x1b99c
leaq 0x3476(%rip), %rdx # 0x1b9b2
callq 0x603a
movq %rsp, %rsi
movq %r14, %rdi
movl $0x2, %edx
callq 0x151d4
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x18567
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x53a0
movq %rsp, %rdi
movq %r12, (%rdi)
leaq 0x3032(%rip), %rsi # 0x1b5a6
leaq 0x3044(%rip), %rdx # 0x1b5bf
callq 0x603a
movq (%rbx), %rsi
movq %rsp, %rdi
callq 0x18614
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x185a1
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x53a0
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x18517
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x53a0
jmp 0x18517
jmp 0x185cd
jmp 0x185ec
jmp 0x185cd
jmp 0x185ec
jmp 0x185cd
jmp 0x185ec
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x185ef
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x53a0
jmp 0x185ef
jmp 0x185ec
jmp 0x185ec
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x1860b
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x53a0
jmp 0x1860b
movq %rax, %rbx
movq %rbx, %rdi
callq 0x5600
nop
|
_ZN20MasterCommandHandler17handleShotCommandERNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 70h
mov rax, rsi
mov rbx, rdi
lea rsi, [rsp+98h+var_50]
mov rdi, rax
call __ZNSi10_M_extractImEERSiRT_; std::istream::_M_extract<ulong>(ulong &)
lea rsi, [rsp+98h+var_58]
mov rdi, rax
call __ZNSi10_M_extractImEERSiRT_; std::istream::_M_extract<ulong>(ulong &)
mov rcx, [rax]
mov rcx, [rcx-18h]
test byte ptr [rax+rcx+20h], 5
jz short loc_1833E
mov rdi, cs:_ZSt4cout_ptr
lea rsi, aMasterInvalidS_0; "Master: Invalid shot command. Use 'shot"...
mov edx, 2Eh ; '.'
jmp loc_18512
loc_1833E:
mov rdi, [rbx]; this
call _ZNK8Settings8getStartEv; Settings::getStart(void)
test al, al
jz loc_184EA
mov r14, [rbx+8]
lea r15, [rsp+98h+var_68]
mov [r15-10h], r15
lea rsi, aGameDataQueueT; "../game_data/queue.txt"
lea rdx, aGameDataQueueT+16h; ""
lea rdi, [rsp+98h+var_78]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rsi, [rsp+98h+var_78]
mov rdi, r14
call _ZN14ReadWriteQueue17readQueueFromFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; ReadWriteQueue::readQueueFromFile(std::string const&)
mov ebp, eax
mov rdi, [rsp+98h+var_78]; void *
cmp rdi, r15
jz short loc_18399
mov rsi, [rsp+98h+var_68]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_18399:
cmp ebp, 1
jnz loc_184FF
mov rsi, [rbx+10h]
mov rdx, [rsp+98h+var_50]
mov rcx, [rsp+98h+var_58]
lea r14, [rsp+98h+var_78]
mov rdi, r14
call _ZN6Master10handleShotB5cxx11Emm; Master::handleShot(ulong,ulong)
mov rdi, [rbx+10h]
mov rdx, [rsp+98h+var_50]
mov rcx, [rsp+98h+var_58]
mov rsi, r14
call _ZN6Master17processShotResultERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmm; Master::processShotResult(std::string const&,ulong,ulong)
mov r14, [rbx+8]
lea r12, [rsp+98h+var_88]
mov [r12-10h], r12
lea rsi, aGameDataShotsT; "../game_data/shots.txt"
lea rdx, aGameDataShotsT+16h; ""
mov rdi, rsp
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rcx, [rsp+98h+var_50]
mov r8, [rsp+98h+var_58]
mov rsi, rsp
lea r9, [rsp+98h+var_78]
mov rdi, r14
mov edx, 1
call _ZN14ReadWriteQueue15writeShotToFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEimmS7_; ReadWriteQueue::writeShotToFile(std::string const&,int,ulong,ulong,std::string const&)
mov rdi, [rsp+98h+var_98]; void *
cmp rdi, r12
jz short loc_1842C
mov rsi, [rsp+98h+var_88]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1842C:
lea rsi, aMiss; "miss"
lea rdi, [rsp+98h+var_78]
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz loc_18524
lea rsi, aHit; "hit"
lea rdi, [rsp+98h+var_78]
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_18473
lea rsi, aHitAndSunk; "hit_and_sunk"
lea rdi, [rsp+98h+var_78]
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jnz loc_18567
loc_18473:
mov rdi, [rbx+10h]; this
call _ZNK6Master12allShipsSunkEv; Master::allShipsSunk(void)
test al, al
jz loc_18567
mov rdi, cs:_ZSt4cout_ptr
lea rsi, aMasterAllSlave; "Master: All Slave ships have been sunk."...
mov edx, 35h ; '5'
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rsi, [rbx]
lea rdi, [rsp+98h+var_48]
call _ZN8Settings8exitGameB5cxx11Ev; Settings::exitGame(void)
lea rax, [rsp+98h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_184C4
mov rsi, [rsp+98h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_184C4:
mov rdi, rsp
mov [rdi], r12
lea rsi, aGameDataQueueT; "../game_data/queue.txt"
lea rdx, aGameDataQueueT+16h; ""
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rsi, [rbx]
mov rdi, rsp
call _Z18saveSettingsToFileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK8Settings; saveSettingsToFile(std::string const&,Settings const&)
jmp short loc_18551
loc_184EA:
mov rdi, cs:_ZSt4cout_ptr
lea rsi, aMasterGameNotS; "Master: Game not started yet.\n"
mov edx, 1Eh
jmp short loc_18512
loc_184FF:
mov rdi, cs:_ZSt4cout_ptr
lea rsi, aMasterItSNotYo; "Master: It's not your turn.\n"
mov edx, 1Ch
loc_18512:
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
loc_18517:
add rsp, 70h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_18524:
mov r14, [rbx+8]
mov rdi, rsp
mov [rdi], r12
lea rsi, aGameDataQueueT; "../game_data/queue.txt"
lea rdx, aGameDataQueueT+16h; ""
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rsi, rsp
mov rdi, r14
mov edx, 2
call _ZN14ReadWriteQueue16writeQueueToFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; ReadWriteQueue::writeQueueToFile(std::string const&,int)
loc_18551:
mov rdi, [rsp+98h+var_98]; void *
cmp rdi, r12
jz short loc_18567
mov rsi, [rsp+98h+var_88]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_18567:
mov rdi, rsp
mov [rdi], r12
lea rsi, aGameDataSettin; "../game_data/settings.txt"
lea rdx, aGameDataSettin+19h; ""
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rsi, [rbx]
mov rdi, rsp
call _Z18saveSettingsToFileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK8Settings; saveSettingsToFile(std::string const&,Settings const&)
mov rdi, [rsp+98h+var_98]; void *
cmp rdi, r12
jz short loc_185A1
mov rsi, [rsp+98h+var_88]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_185A1:
mov rdi, [rsp+98h+var_78]; void *
cmp rdi, r15
jz loc_18517
mov rsi, [rsp+98h+var_68]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp loc_18517
jmp short loc_185CD
jmp short loc_185EC
jmp short loc_185CD
jmp short loc_185EC
jmp short loc_185CD
jmp short loc_185EC
loc_185CD:
mov rbx, rax
mov rdi, [rsp+0]; void *
cmp rdi, r12
jz short loc_185EF
mov rsi, [rsp+arg_8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_185EF
jmp short loc_185EC
jmp short $+2
loc_185EC:
mov rbx, rax
loc_185EF:
mov rdi, [rsp+arg_18]; void *
cmp rdi, r15
jz short loc_1860B
mov rsi, [rsp+arg_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_1860B
mov rbx, rax
loc_1860B:
mov rdi, rbx
call __Unwind_Resume
|
void MasterCommandHandler::handleShotCommand(long long *a1, long long a2)
{
long long v2; // rax
_QWORD *v3; // rax
const char *v4; // rsi
long long v5; // rdx
long long v6; // r14
int QueueFromFile; // ebp
long long v8; // r14
long long v9; // r14
void *v10[2]; // [rsp+0h] [rbp-98h] BYREF
_QWORD v11[2]; // [rsp+10h] [rbp-88h] BYREF
void *v12[2]; // [rsp+20h] [rbp-78h] BYREF
_QWORD v13[2]; // [rsp+30h] [rbp-68h] BYREF
unsigned long long v14; // [rsp+40h] [rbp-58h] BYREF
unsigned long long v15; // [rsp+48h] [rbp-50h] BYREF
long long *v16; // [rsp+50h] [rbp-48h] BYREF
long long v17; // [rsp+60h] [rbp-38h] BYREF
v2 = std::istream::_M_extract<unsigned long>(a2, &v15);
v3 = (_QWORD *)std::istream::_M_extract<unsigned long>(v2, &v14);
if ( (*((_BYTE *)v3 + *(_QWORD *)(*v3 - 24LL) + 32) & 5) != 0 )
{
v4 = "Master: Invalid shot command. Use 'shot X Y'.\n";
v5 = 46LL;
LABEL_18:
std::__ostream_insert<char,std::char_traits<char>>(&std::cout, v4, v5);
return;
}
if ( !(unsigned __int8)Settings::getStart((Settings *)*a1) )
{
v4 = "Master: Game not started yet.\n";
v5 = 30LL;
goto LABEL_18;
}
v6 = a1[1];
v12[0] = v13;
std::string::_M_construct<char const*>(v12, "../game_data/queue.txt", (long long)"");
QueueFromFile = ReadWriteQueue::readQueueFromFile(v6, v12);
if ( v12[0] != v13 )
operator delete(v12[0], v13[0] + 1LL);
if ( QueueFromFile != 1 )
{
v4 = "Master: It's not your turn.\n";
v5 = 28LL;
goto LABEL_18;
}
Master::handleShot[abi:cxx11](v12, (Settings **)a1[2], v15, v14);
Master::processShotResult(a1[2], v12, v15, v14);
v8 = a1[1];
v10[0] = v11;
std::string::_M_construct<char const*>(v10, "../game_data/shots.txt", (long long)"");
ReadWriteQueue::writeShotToFile(v8, v10, 1u, v15, v14, v12);
if ( v10[0] != v11 )
operator delete(v10[0], v11[0] + 1LL);
if ( !(unsigned int)std::string::compare(v12, (long long)"miss") )
{
v9 = a1[1];
v10[0] = v11;
std::string::_M_construct<char const*>(v10, "../game_data/queue.txt", (long long)"");
ReadWriteQueue::writeQueueToFile(v9, v10, 2u);
LABEL_21:
if ( v10[0] != v11 )
operator delete(v10[0], v11[0] + 1LL);
goto LABEL_23;
}
if ( (!(unsigned int)std::string::compare(v12, (long long)"hit")
|| !(unsigned int)std::string::compare(v12, (long long)"hit_and_sunk"))
&& (unsigned __int8)Master::allShipsSunk((Ship ***)a1[2]) )
{
std::__ostream_insert<char,std::char_traits<char>>(
&std::cout,
"Master: All Slave ships have been sunk. Master wins!\n",
53LL);
Settings::exitGame[abi:cxx11](&v16, *a1);
if ( v16 != &v17 )
operator delete(v16, v17 + 1);
v10[0] = v11;
std::string::_M_construct<char const*>(v10, "../game_data/queue.txt", (long long)"");
saveSettingsToFile(v10, *a1);
goto LABEL_21;
}
LABEL_23:
v10[0] = v11;
std::string::_M_construct<char const*>(v10, "../game_data/settings.txt", (long long)"");
saveSettingsToFile(v10, *a1);
if ( v10[0] != v11 )
operator delete(v10[0], v11[0] + 1LL);
if ( v12[0] != v13 )
operator delete(v12[0], v13[0] + 1LL);
}
|
handleShotCommand:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x70
MOV RAX,RSI
MOV RBX,RDI
LEA RSI,[RSP + 0x48]
MOV RDI,RAX
CALL 0x001051d0
LEA RSI,[RSP + 0x40]
MOV RDI,RAX
CALL 0x001051d0
MOV RCX,qword ptr [RAX]
MOV RCX,qword ptr [RCX + -0x18]
TEST byte ptr [RAX + RCX*0x1 + 0x20],0x5
JZ 0x0011833e
MOV RDI,qword ptr [0x00124fa0]
LEA RSI,[0x11b94e]
MOV EDX,0x2e
JMP 0x00118512
LAB_0011833e:
MOV RDI,qword ptr [RBX]
CALL 0x00106c5c
TEST AL,AL
JZ 0x001184ea
MOV R14,qword ptr [RBX + 0x8]
LEA R15,[RSP + 0x30]
MOV qword ptr [R15 + -0x10],R15
LAB_0011835b:
LEA RSI,[0x11b99c]
LEA RDX,[0x11b9b2]
LEA RDI,[RSP + 0x20]
CALL 0x0010603a
LAB_00118373:
LEA RSI,[RSP + 0x20]
MOV RDI,R14
CALL 0x001150b4
LAB_00118380:
MOV EBP,EAX
MOV RDI,qword ptr [RSP + 0x20]
CMP RDI,R15
JZ 0x00118399
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
CALL 0x001053a0
LAB_00118399:
CMP EBP,0x1
JNZ 0x001184ff
MOV RSI,qword ptr [RBX + 0x10]
MOV RDX,qword ptr [RSP + 0x48]
MOV RCX,qword ptr [RSP + 0x40]
LEA R14,[RSP + 0x20]
MOV RDI,R14
CALL 0x00115750
MOV RDI,qword ptr [RBX + 0x10]
MOV RDX,qword ptr [RSP + 0x48]
MOV RCX,qword ptr [RSP + 0x40]
LAB_001183cb:
MOV RSI,R14
CALL 0x001157fe
MOV R14,qword ptr [RBX + 0x8]
LEA R12,[RSP + 0x10]
MOV qword ptr [R12 + -0x10],R12
LAB_001183e1:
LEA RSI,[0x11b9d0]
LEA RDX,[0x11b9e6]
MOV RDI,RSP
CALL 0x0010603a
MOV RCX,qword ptr [RSP + 0x48]
MOV R8,qword ptr [RSP + 0x40]
LAB_00118401:
MOV RSI,RSP
LEA R9,[RSP + 0x20]
MOV RDI,R14
MOV EDX,0x1
CALL 0x001152fc
MOV RDI,qword ptr [RSP]
CMP RDI,R12
JZ 0x0011842c
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x001053a0
LAB_0011842c:
LEA RSI,[0x11b308]
LEA RDI,[RSP + 0x20]
CALL 0x00107462
TEST EAX,EAX
JZ 0x00118524
LEA RSI,[0x11b304]
LEA RDI,[RSP + 0x20]
CALL 0x00107462
TEST EAX,EAX
JZ 0x00118473
LEA RSI,[0x11b2f7]
LEA RDI,[RSP + 0x20]
CALL 0x00107462
TEST EAX,EAX
JNZ 0x00118567
LAB_00118473:
MOV RDI,qword ptr [RBX + 0x10]
LAB_00118477:
CALL 0x001161e4
TEST AL,AL
JZ 0x00118567
MOV RDI,qword ptr [0x00124fa0]
LEA RSI,[0x11b9e7]
MOV EDX,0x35
CALL 0x00105420
MOV RSI,qword ptr [RBX]
LEA RDI,[RSP + 0x50]
CALL 0x00106d40
LEA RAX,[RSP + 0x60]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001184c4
MOV RSI,qword ptr [RSP + 0x60]
INC RSI
CALL 0x001053a0
LAB_001184c4:
MOV RDI,RSP
MOV qword ptr [RDI],R12
LAB_001184ca:
LEA RSI,[0x11b99c]
LEA RDX,[0x11b9b2]
CALL 0x0010603a
MOV RSI,qword ptr [RBX]
LAB_001184e0:
MOV RDI,RSP
CALL 0x00118614
LAB_001184e8:
JMP 0x00118551
LAB_001184ea:
MOV RDI,qword ptr [0x00124fa0]
LEA RSI,[0x11b97d]
MOV EDX,0x1e
JMP 0x00118512
LAB_001184ff:
MOV RDI,qword ptr [0x00124fa0]
LEA RSI,[0x11b9b3]
MOV EDX,0x1c
LAB_00118512:
CALL 0x00105420
LAB_00118517:
ADD RSP,0x70
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00118524:
MOV R14,qword ptr [RBX + 0x8]
MOV RDI,RSP
MOV qword ptr [RDI],R12
LAB_0011852e:
LEA RSI,[0x11b99c]
LEA RDX,[0x11b9b2]
CALL 0x0010603a
LAB_00118541:
MOV RSI,RSP
MOV RDI,R14
MOV EDX,0x2
CALL 0x001151d4
LAB_00118551:
MOV RDI,qword ptr [RSP]
CMP RDI,R12
JZ 0x00118567
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x001053a0
LAB_00118567:
MOV RDI,RSP
MOV qword ptr [RDI],R12
LAB_0011856d:
LEA RSI,[0x11b5a6]
LEA RDX,[0x11b5bf]
CALL 0x0010603a
MOV RSI,qword ptr [RBX]
LAB_00118583:
MOV RDI,RSP
CALL 0x00118614
LAB_0011858b:
MOV RDI,qword ptr [RSP]
CMP RDI,R12
JZ 0x001185a1
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x001053a0
LAB_001185a1:
MOV RDI,qword ptr [RSP + 0x20]
CMP RDI,R15
JZ 0x00118517
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
CALL 0x001053a0
JMP 0x00118517
|
/* MasterCommandHandler::handleShotCommand(std::__cxx11::istringstream&) */
void __thiscall
MasterCommandHandler::handleShotCommand(MasterCommandHandler *this,istringstream *param_1)
{
ReadWriteQueue *pRVar1;
char cVar2;
int iVar3;
istream *piVar4;
long lVar5;
char *pcVar6;
long *local_98 [2];
long local_88 [2];
long *local_78 [2];
long local_68 [2];
ulong local_58;
ulong local_50;
long *local_48;
long local_38 [2];
piVar4 = std::istream::_M_extract<unsigned_long>((ulong *)param_1);
piVar4 = std::istream::_M_extract<unsigned_long>((ulong *)piVar4);
if (((byte)piVar4[*(long *)(*(long *)piVar4 + -0x18) + 0x20] & 5) != 0) {
pcVar6 = "Master: Invalid shot command. Use \'shot X Y\'.\n";
lVar5 = 0x2e;
LAB_00118512:
std::__ostream_insert<char,std::char_traits<char>>((ostream *)PTR_cout_00124fa0,pcVar6,lVar5);
return;
}
cVar2 = Settings::getStart(*(Settings **)this);
if (cVar2 == '\0') {
pcVar6 = "Master: Game not started yet.\n";
lVar5 = 0x1e;
goto LAB_00118512;
}
pRVar1 = *(ReadWriteQueue **)(this + 8);
/* try { // try from 0011835b to 00118372 has its CatchHandler @ 00118608 */
local_78[0] = local_68;
std::__cxx11::string::_M_construct<char_const*>(local_78,"../game_data/queue.txt","");
/* try { // try from 00118373 to 0011837f has its CatchHandler @ 001185ec */
iVar3 = ReadWriteQueue::readQueueFromFile(pRVar1,(string *)local_78);
if (local_78[0] != local_68) {
operator_delete(local_78[0],local_68[0] + 1);
}
if (iVar3 != 1) {
pcVar6 = "Master: It\'s not your turn.\n";
lVar5 = 0x1c;
goto LAB_00118512;
}
Master::handleShot_abi_cxx11_((ulong)local_78,*(ulong *)(this + 0x10));
/* try { // try from 001183cb to 001183d2 has its CatchHandler @ 001185ea */
Master::processShotResult(*(string **)(this + 0x10),(ulong)local_78,local_50);
pRVar1 = *(ReadWriteQueue **)(this + 8);
local_98[0] = local_88;
/* try { // try from 001183e1 to 001183f6 has its CatchHandler @ 001185e8 */
std::__cxx11::string::_M_construct<char_const*>(local_98,"../game_data/shots.txt","");
/* try { // try from 00118401 to 00118415 has its CatchHandler @ 001185cd */
ReadWriteQueue::writeShotToFile(pRVar1,(string *)local_98,1,local_50,local_58,(string *)local_78);
if (local_98[0] != local_88) {
operator_delete(local_98[0],local_88[0] + 1);
}
iVar3 = std::__cxx11::string::compare((string *)local_78,"miss");
if (iVar3 == 0) {
pRVar1 = *(ReadWriteQueue **)(this + 8);
local_98[0] = local_88;
/* try { // try from 0011852e to 00118540 has its CatchHandler @ 001185c7 */
std::__cxx11::string::_M_construct<char_const*>(local_98,"../game_data/queue.txt","");
/* try { // try from 00118541 to 00118550 has its CatchHandler @ 001185c5 */
ReadWriteQueue::writeQueueToFile(pRVar1,(string *)local_98,2);
}
else {
iVar3 = std::__cxx11::string::compare((string *)local_78,"hit");
/* try { // try from 00118477 to 001184a8 has its CatchHandler @ 001185ea */
if (((iVar3 != 0) &&
(iVar3 = std::__cxx11::string::compare((string *)local_78,"hit_and_sunk"), iVar3 != 0)) ||
(cVar2 = Master::allShipsSunk(*(Master **)(this + 0x10)), cVar2 == '\0')) goto LAB_00118567;
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)PTR_cout_00124fa0,"Master: All Slave ships have been sunk. Master wins!\n"
,0x35);
Settings::exitGame_abi_cxx11_();
if (local_48 != local_38) {
operator_delete(local_48,local_38[0] + 1);
}
local_98[0] = local_88;
/* try { // try from 001184ca to 001184dc has its CatchHandler @ 001185c3 */
std::__cxx11::string::_M_construct<char_const*>(local_98,"../game_data/queue.txt","");
/* try { // try from 001184e0 to 001184e7 has its CatchHandler @ 001185c1 */
saveSettingsToFile((string *)local_98,*(Settings **)this);
}
if (local_98[0] != local_88) {
operator_delete(local_98[0],local_88[0] + 1);
}
LAB_00118567:
local_98[0] = local_88;
/* try { // try from 0011856d to 0011857f has its CatchHandler @ 001185cb */
std::__cxx11::string::_M_construct<char_const*>(local_98,"../game_data/settings.txt","");
/* try { // try from 00118583 to 0011858a has its CatchHandler @ 001185c9 */
saveSettingsToFile((string *)local_98,*(Settings **)this);
if (local_98[0] != local_88) {
operator_delete(local_98[0],local_88[0] + 1);
}
if (local_78[0] == local_68) {
return;
}
operator_delete(local_78[0],local_68[0] + 1);
return;
}
|
|
14,638
|
MasterCommandHandler::handleShotCommand(std::__cxx11::basic_istringstream<char, std::char_traits<char>, std::allocator<char>>&)
|
666mxvbee[P]BattleShip/lib/Commands/MasterCommandHandler.cpp
|
void MasterCommandHandler::handleShotCommand(std::istringstream& iss) {
uint64_t x, y;
if (!(iss >> x >> y)) {
std::cout << "Master: Invalid shot command. Use 'shot X Y'.\n";
return;
}
if (!settings_.getStart()) {
std::cout << "Master: Game not started yet.\n";
return;
}
int currentQueue = manager_.readQueueFromFile("../game_data/queue.txt");
if (currentQueue != 1) {
std::cout << "Master: It's not your turn.\n";
return;
}
std::string result = masterLogic_.handleShot(x, y);
masterLogic_.processShotResult(result, x, y);
manager_.writeShotToFile("../game_data/shots.txt", 1, x, y, result);
if (result == "miss") {
manager_.writeQueueToFile("../game_data/queue.txt", 2);
}
else if (result == "hit" || result == "hit_and_sunk") {
if (masterLogic_.allShipsSunk()) {
std::cout << "Master: All Slave ships have been sunk. Master wins!\n";
settings_.exitGame();
saveSettingsToFile("../game_data/queue.txt", settings_);
}
}
saveSettingsToFile("../game_data/settings.txt", settings_);
}
|
O3
|
cpp
|
MasterCommandHandler::handleShotCommand(std::__cxx11::basic_istringstream<char, std::char_traits<char>, std::allocator<char>>&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x70, %rsp
movq %rsi, %rax
movq %rdi, %rbx
leaq 0x48(%rsp), %rsi
movq %rax, %rdi
callq 0x51d0
leaq 0x40(%rsp), %rsi
movq %rax, %rdi
callq 0x51d0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
je 0x182a4
movq 0xcd0d(%rip), %rdi # 0x24fa0
leaq 0x36ea(%rip), %rsi # 0x1b984
movl $0x2e, %edx
jmp 0x18478
movq (%rbx), %rdi
callq 0x6c00
testb %al, %al
je 0x18450
movq 0x8(%rbx), %r14
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x370a(%rip), %rsi # 0x1b9d2
leaq 0x3719(%rip), %rdx # 0x1b9e8
leaq 0x20(%rsp), %rdi
callq 0x5fea
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x15070
movl %eax, %ebp
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x182ff
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x53a0
cmpl $0x1, %ebp
jne 0x18465
movq 0x10(%rbx), %rsi
movq 0x48(%rsp), %rdx
movq 0x40(%rsp), %rcx
leaq 0x20(%rsp), %r14
movq %r14, %rdi
callq 0x15710
movq 0x10(%rbx), %rdi
movq 0x48(%rsp), %rdx
movq 0x40(%rsp), %rcx
movq %r14, %rsi
callq 0x157be
movq 0x8(%rbx), %r14
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x36b8(%rip), %rsi # 0x1ba06
leaq 0x36c7(%rip), %rdx # 0x1ba1c
movq %rsp, %rdi
callq 0x5fea
movq 0x48(%rsp), %rcx
movq 0x40(%rsp), %r8
movq %rsp, %rsi
leaq 0x20(%rsp), %r9
movq %r14, %rdi
movl $0x1, %edx
callq 0x152b8
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x18392
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x53a0
leaq 0x2f6f(%rip), %rsi # 0x1b308
leaq 0x20(%rsp), %rdi
callq 0x7410
testl %eax, %eax
je 0x1848a
leaq 0x2f52(%rip), %rsi # 0x1b304
leaq 0x20(%rsp), %rdi
callq 0x7410
testl %eax, %eax
je 0x183d9
leaq 0x2f30(%rip), %rsi # 0x1b2f7
leaq 0x20(%rsp), %rdi
callq 0x7410
testl %eax, %eax
jne 0x184cd
movq 0x10(%rbx), %rdi
callq 0x16144
testb %al, %al
je 0x184cd
movq 0xcbaf(%rip), %rdi # 0x24fa0
leaq 0x3625(%rip), %rsi # 0x1ba1d
movl $0x35, %edx
callq 0x5420
movq (%rbx), %rsi
leaq 0x50(%rsp), %rdi
callq 0x6ce4
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1842a
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x53a0
movq %rsp, %rdi
movq %r12, (%rdi)
leaq 0x359b(%rip), %rsi # 0x1b9d2
leaq 0x35aa(%rip), %rdx # 0x1b9e8
callq 0x5fea
movq (%rbx), %rsi
movq %rsp, %rdi
callq 0x1857c
jmp 0x184b7
movq 0xcb49(%rip), %rdi # 0x24fa0
leaq 0x3555(%rip), %rsi # 0x1b9b3
movl $0x1e, %edx
jmp 0x18478
movq 0xcb34(%rip), %rdi # 0x24fa0
leaq 0x3576(%rip), %rsi # 0x1b9e9
movl $0x1c, %edx
callq 0x5420
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rbx), %r14
movq %rsp, %rdi
movq %r12, (%rdi)
leaq 0x3537(%rip), %rsi # 0x1b9d2
leaq 0x3546(%rip), %rdx # 0x1b9e8
callq 0x5fea
movq %rsp, %rsi
movq %r14, %rdi
movl $0x2, %edx
callq 0x15190
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x184cd
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x53a0
movq %rsp, %rdi
movq %r12, (%rdi)
leaq 0x3102(%rip), %rsi # 0x1b5dc
leaq 0x3114(%rip), %rdx # 0x1b5f5
callq 0x5fea
movq (%rbx), %rsi
movq %rsp, %rdi
callq 0x1857c
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x18507
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x53a0
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x1847d
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x53a0
jmp 0x1847d
jmp 0x18533
jmp 0x18552
jmp 0x18533
jmp 0x18552
jmp 0x18533
jmp 0x18552
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x18555
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x53a0
jmp 0x18555
jmp 0x18552
jmp 0x18552
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x18571
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x53a0
jmp 0x18571
movq %rax, %rbx
movq %rbx, %rdi
callq 0x5600
nopl (%rax)
|
_ZN20MasterCommandHandler17handleShotCommandERNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 70h
mov rax, rsi
mov rbx, rdi
lea rsi, [rsp+98h+var_50]
mov rdi, rax
call __ZNSi10_M_extractImEERSiRT_; std::istream::_M_extract<ulong>(ulong &)
lea rsi, [rsp+98h+var_58]
mov rdi, rax
call __ZNSi10_M_extractImEERSiRT_; std::istream::_M_extract<ulong>(ulong &)
mov rcx, [rax]
mov rcx, [rcx-18h]
test byte ptr [rax+rcx+20h], 5
jz short loc_182A4
mov rdi, cs:_ZSt4cout_ptr
lea rsi, aMasterInvalidS_0; "Master: Invalid shot command. Use 'shot"...
mov edx, 2Eh ; '.'
jmp loc_18478
loc_182A4:
mov rdi, [rbx]; this
call _ZNK8Settings8getStartEv; Settings::getStart(void)
test al, al
jz loc_18450
mov r14, [rbx+8]
lea r15, [rsp+98h+var_68]
mov [r15-10h], r15
lea rsi, aGameDataQueueT; "../game_data/queue.txt"
lea rdx, aGameDataQueueT+16h; ""
lea rdi, [rsp+98h+var_78]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rsi, [rsp+98h+var_78]
mov rdi, r14
call _ZN14ReadWriteQueue17readQueueFromFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; ReadWriteQueue::readQueueFromFile(std::string const&)
mov ebp, eax
mov rdi, [rsp+98h+var_78]; void *
cmp rdi, r15
jz short loc_182FF
mov rsi, [rsp+98h+var_68]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_182FF:
cmp ebp, 1
jnz loc_18465
mov rsi, [rbx+10h]
mov rdx, [rsp+98h+var_50]
mov rcx, [rsp+98h+var_58]
lea r14, [rsp+98h+var_78]
mov rdi, r14
call _ZN6Master10handleShotB5cxx11Emm; Master::handleShot(ulong,ulong)
mov rdi, [rbx+10h]
mov rdx, [rsp+98h+var_50]
mov rcx, [rsp+98h+var_58]
mov rsi, r14
call _ZN6Master17processShotResultERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmm; Master::processShotResult(std::string const&,ulong,ulong)
mov r14, [rbx+8]
lea r12, [rsp+98h+var_88]
mov [r12-10h], r12
lea rsi, aGameDataShotsT; "../game_data/shots.txt"
lea rdx, aGameDataShotsT+16h; ""
mov rdi, rsp
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rcx, [rsp+98h+var_50]
mov r8, [rsp+98h+var_58]
mov rsi, rsp
lea r9, [rsp+98h+var_78]
mov rdi, r14
mov edx, 1
call _ZN14ReadWriteQueue15writeShotToFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEimmS7_; ReadWriteQueue::writeShotToFile(std::string const&,int,ulong,ulong,std::string const&)
mov rdi, [rsp+98h+var_98]; void *
cmp rdi, r12
jz short loc_18392
mov rsi, [rsp+98h+var_88]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_18392:
lea rsi, aMiss; "miss"
lea rdi, [rsp+98h+var_78]
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz loc_1848A
lea rsi, aHit; "hit"
lea rdi, [rsp+98h+var_78]
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_183D9
lea rsi, aHitAndSunk; "hit_and_sunk"
lea rdi, [rsp+98h+var_78]
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jnz loc_184CD
loc_183D9:
mov rdi, [rbx+10h]; this
call _ZNK6Master12allShipsSunkEv; Master::allShipsSunk(void)
test al, al
jz loc_184CD
mov rdi, cs:_ZSt4cout_ptr
lea rsi, aMasterAllSlave; "Master: All Slave ships have been sunk."...
mov edx, 35h ; '5'
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rsi, [rbx]
lea rdi, [rsp+98h+var_48]
call _ZN8Settings8exitGameB5cxx11Ev; Settings::exitGame(void)
lea rax, [rsp+98h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_1842A
mov rsi, [rsp+98h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1842A:
mov rdi, rsp
mov [rdi], r12
lea rsi, aGameDataQueueT; "../game_data/queue.txt"
lea rdx, aGameDataQueueT+16h; ""
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rsi, [rbx]
mov rdi, rsp
call _Z18saveSettingsToFileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK8Settings; saveSettingsToFile(std::string const&,Settings const&)
jmp short loc_184B7
loc_18450:
mov rdi, cs:_ZSt4cout_ptr
lea rsi, aMasterGameNotS; "Master: Game not started yet.\n"
mov edx, 1Eh
jmp short loc_18478
loc_18465:
mov rdi, cs:_ZSt4cout_ptr
lea rsi, aMasterItSNotYo; "Master: It's not your turn.\n"
mov edx, 1Ch
loc_18478:
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
loc_1847D:
add rsp, 70h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_1848A:
mov r14, [rbx+8]
mov rdi, rsp
mov [rdi], r12
lea rsi, aGameDataQueueT; "../game_data/queue.txt"
lea rdx, aGameDataQueueT+16h; ""
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rsi, rsp
mov rdi, r14
mov edx, 2
call _ZN14ReadWriteQueue16writeQueueToFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; ReadWriteQueue::writeQueueToFile(std::string const&,int)
loc_184B7:
mov rdi, [rsp+98h+var_98]; void *
cmp rdi, r12
jz short loc_184CD
mov rsi, [rsp+98h+var_88]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_184CD:
mov rdi, rsp
mov [rdi], r12
lea rsi, aGameDataSettin; "../game_data/settings.txt"
lea rdx, aGameDataSettin+19h; ""
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rsi, [rbx]
mov rdi, rsp
call _Z18saveSettingsToFileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK8Settings; saveSettingsToFile(std::string const&,Settings const&)
mov rdi, [rsp+98h+var_98]; void *
cmp rdi, r12
jz short loc_18507
mov rsi, [rsp+98h+var_88]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_18507:
mov rdi, [rsp+98h+var_78]; void *
cmp rdi, r15
jz loc_1847D
mov rsi, [rsp+98h+var_68]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp loc_1847D
jmp short loc_18533
jmp short loc_18552
jmp short loc_18533
jmp short loc_18552
jmp short loc_18533
jmp short loc_18552
loc_18533:
mov rbx, rax
mov rdi, [rsp+0]; void *
cmp rdi, r12
jz short loc_18555
mov rsi, [rsp+arg_8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_18555
jmp short loc_18552
jmp short $+2
loc_18552:
mov rbx, rax
loc_18555:
mov rdi, [rsp+arg_18]; void *
cmp rdi, r15
jz short loc_18571
mov rsi, [rsp+arg_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_18571
mov rbx, rax
loc_18571:
mov rdi, rbx
call __Unwind_Resume
|
void MasterCommandHandler::handleShotCommand(long long *a1, long long a2)
{
long long v2; // rax
_QWORD *v3; // rax
const char *v4; // rsi
long long v5; // rdx
long long v6; // r14
int QueueFromFile; // ebp
long long v8; // r14
long long v9; // r14
void *v10[2]; // [rsp+0h] [rbp-98h] BYREF
_QWORD v11[2]; // [rsp+10h] [rbp-88h] BYREF
void *v12[2]; // [rsp+20h] [rbp-78h] BYREF
_QWORD v13[2]; // [rsp+30h] [rbp-68h] BYREF
unsigned long long v14; // [rsp+40h] [rbp-58h] BYREF
unsigned long long v15; // [rsp+48h] [rbp-50h] BYREF
long long *v16; // [rsp+50h] [rbp-48h] BYREF
long long v17; // [rsp+60h] [rbp-38h] BYREF
v2 = std::istream::_M_extract<unsigned long>(a2, &v15);
v3 = (_QWORD *)std::istream::_M_extract<unsigned long>(v2, &v14);
if ( (*((_BYTE *)v3 + *(_QWORD *)(*v3 - 24LL) + 32) & 5) != 0 )
{
v4 = "Master: Invalid shot command. Use 'shot X Y'.\n";
v5 = 46LL;
LABEL_18:
std::__ostream_insert<char,std::char_traits<char>>(&std::cout, v4, v5);
return;
}
if ( !(unsigned __int8)Settings::getStart((Settings *)*a1) )
{
v4 = "Master: Game not started yet.\n";
v5 = 30LL;
goto LABEL_18;
}
v6 = a1[1];
v12[0] = v13;
std::string::_M_construct<char const*>((long long)v12, "../game_data/queue.txt", (long long)"");
QueueFromFile = ReadWriteQueue::readQueueFromFile(v6, v12);
if ( v12[0] != v13 )
operator delete(v12[0], v13[0] + 1LL);
if ( QueueFromFile != 1 )
{
v4 = "Master: It's not your turn.\n";
v5 = 28LL;
goto LABEL_18;
}
Master::handleShot[abi:cxx11](v12, (Settings **)a1[2], v15, v14);
Master::processShotResult(a1[2], v12, v15, v14);
v8 = a1[1];
v10[0] = v11;
std::string::_M_construct<char const*>((long long)v10, "../game_data/shots.txt", (long long)"");
ReadWriteQueue::writeShotToFile(v8, v10, 1u, v15, v14, v12);
if ( v10[0] != v11 )
operator delete(v10[0], v11[0] + 1LL);
if ( !(unsigned int)std::string::compare(v12, (long long)"miss") )
{
v9 = a1[1];
v10[0] = v11;
std::string::_M_construct<char const*>((long long)v10, "../game_data/queue.txt", (long long)"");
ReadWriteQueue::writeQueueToFile(v9, v10, 2u);
LABEL_21:
if ( v10[0] != v11 )
operator delete(v10[0], v11[0] + 1LL);
goto LABEL_23;
}
if ( (!(unsigned int)std::string::compare(v12, (long long)"hit")
|| !(unsigned int)std::string::compare(v12, (long long)"hit_and_sunk"))
&& (unsigned __int8)Master::allShipsSunk((Ship ***)a1[2]) )
{
std::__ostream_insert<char,std::char_traits<char>>(
&std::cout,
"Master: All Slave ships have been sunk. Master wins!\n",
53LL);
Settings::exitGame[abi:cxx11](&v16, *a1);
if ( v16 != &v17 )
operator delete(v16, v17 + 1);
v10[0] = v11;
std::string::_M_construct<char const*>((long long)v10, "../game_data/queue.txt", (long long)"");
saveSettingsToFile(v10, *a1);
goto LABEL_21;
}
LABEL_23:
v10[0] = v11;
std::string::_M_construct<char const*>((long long)v10, "../game_data/settings.txt", (long long)"");
saveSettingsToFile(v10, *a1);
if ( v10[0] != v11 )
operator delete(v10[0], v11[0] + 1LL);
if ( v12[0] != v13 )
operator delete(v12[0], v13[0] + 1LL);
}
|
handleShotCommand:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x70
MOV RAX,RSI
MOV RBX,RDI
LEA RSI,[RSP + 0x48]
MOV RDI,RAX
CALL 0x001051d0
LEA RSI,[RSP + 0x40]
MOV RDI,RAX
CALL 0x001051d0
MOV RCX,qword ptr [RAX]
MOV RCX,qword ptr [RCX + -0x18]
TEST byte ptr [RAX + RCX*0x1 + 0x20],0x5
JZ 0x001182a4
MOV RDI,qword ptr [0x00124fa0]
LEA RSI,[0x11b984]
MOV EDX,0x2e
JMP 0x00118478
LAB_001182a4:
MOV RDI,qword ptr [RBX]
CALL 0x00106c00
TEST AL,AL
JZ 0x00118450
MOV R14,qword ptr [RBX + 0x8]
LEA R15,[RSP + 0x30]
MOV qword ptr [R15 + -0x10],R15
LAB_001182c1:
LEA RSI,[0x11b9d2]
LEA RDX,[0x11b9e8]
LEA RDI,[RSP + 0x20]
CALL 0x00105fea
LAB_001182d9:
LEA RSI,[RSP + 0x20]
MOV RDI,R14
CALL 0x00115070
LAB_001182e6:
MOV EBP,EAX
MOV RDI,qword ptr [RSP + 0x20]
CMP RDI,R15
JZ 0x001182ff
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
CALL 0x001053a0
LAB_001182ff:
CMP EBP,0x1
JNZ 0x00118465
MOV RSI,qword ptr [RBX + 0x10]
MOV RDX,qword ptr [RSP + 0x48]
MOV RCX,qword ptr [RSP + 0x40]
LEA R14,[RSP + 0x20]
MOV RDI,R14
CALL 0x00115710
MOV RDI,qword ptr [RBX + 0x10]
MOV RDX,qword ptr [RSP + 0x48]
MOV RCX,qword ptr [RSP + 0x40]
LAB_00118331:
MOV RSI,R14
CALL 0x001157be
MOV R14,qword ptr [RBX + 0x8]
LEA R12,[RSP + 0x10]
MOV qword ptr [R12 + -0x10],R12
LAB_00118347:
LEA RSI,[0x11ba06]
LEA RDX,[0x11ba1c]
MOV RDI,RSP
CALL 0x00105fea
MOV RCX,qword ptr [RSP + 0x48]
MOV R8,qword ptr [RSP + 0x40]
LAB_00118367:
MOV RSI,RSP
LEA R9,[RSP + 0x20]
MOV RDI,R14
MOV EDX,0x1
CALL 0x001152b8
MOV RDI,qword ptr [RSP]
CMP RDI,R12
JZ 0x00118392
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x001053a0
LAB_00118392:
LEA RSI,[0x11b308]
LEA RDI,[RSP + 0x20]
CALL 0x00107410
TEST EAX,EAX
JZ 0x0011848a
LEA RSI,[0x11b304]
LEA RDI,[RSP + 0x20]
CALL 0x00107410
TEST EAX,EAX
JZ 0x001183d9
LEA RSI,[0x11b2f7]
LEA RDI,[RSP + 0x20]
CALL 0x00107410
TEST EAX,EAX
JNZ 0x001184cd
LAB_001183d9:
MOV RDI,qword ptr [RBX + 0x10]
LAB_001183dd:
CALL 0x00116144
TEST AL,AL
JZ 0x001184cd
MOV RDI,qword ptr [0x00124fa0]
LEA RSI,[0x11ba1d]
MOV EDX,0x35
CALL 0x00105420
MOV RSI,qword ptr [RBX]
LEA RDI,[RSP + 0x50]
CALL 0x00106ce4
LEA RAX,[RSP + 0x60]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0011842a
MOV RSI,qword ptr [RSP + 0x60]
INC RSI
CALL 0x001053a0
LAB_0011842a:
MOV RDI,RSP
MOV qword ptr [RDI],R12
LAB_00118430:
LEA RSI,[0x11b9d2]
LEA RDX,[0x11b9e8]
CALL 0x00105fea
MOV RSI,qword ptr [RBX]
LAB_00118446:
MOV RDI,RSP
CALL 0x0011857c
LAB_0011844e:
JMP 0x001184b7
LAB_00118450:
MOV RDI,qword ptr [0x00124fa0]
LEA RSI,[0x11b9b3]
MOV EDX,0x1e
JMP 0x00118478
LAB_00118465:
MOV RDI,qword ptr [0x00124fa0]
LEA RSI,[0x11b9e9]
MOV EDX,0x1c
LAB_00118478:
CALL 0x00105420
LAB_0011847d:
ADD RSP,0x70
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0011848a:
MOV R14,qword ptr [RBX + 0x8]
MOV RDI,RSP
MOV qword ptr [RDI],R12
LAB_00118494:
LEA RSI,[0x11b9d2]
LEA RDX,[0x11b9e8]
CALL 0x00105fea
LAB_001184a7:
MOV RSI,RSP
MOV RDI,R14
MOV EDX,0x2
CALL 0x00115190
LAB_001184b7:
MOV RDI,qword ptr [RSP]
CMP RDI,R12
JZ 0x001184cd
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x001053a0
LAB_001184cd:
MOV RDI,RSP
MOV qword ptr [RDI],R12
LAB_001184d3:
LEA RSI,[0x11b5dc]
LEA RDX,[0x11b5f5]
CALL 0x00105fea
MOV RSI,qword ptr [RBX]
LAB_001184e9:
MOV RDI,RSP
CALL 0x0011857c
LAB_001184f1:
MOV RDI,qword ptr [RSP]
CMP RDI,R12
JZ 0x00118507
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x001053a0
LAB_00118507:
MOV RDI,qword ptr [RSP + 0x20]
CMP RDI,R15
JZ 0x0011847d
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
CALL 0x001053a0
JMP 0x0011847d
|
/* MasterCommandHandler::handleShotCommand(std::__cxx11::istringstream&) */
void __thiscall
MasterCommandHandler::handleShotCommand(MasterCommandHandler *this,istringstream *param_1)
{
ReadWriteQueue *pRVar1;
char cVar2;
int iVar3;
istream *piVar4;
long lVar5;
char *pcVar6;
long *local_98 [2];
long local_88 [2];
long *local_78 [2];
long local_68 [2];
ulong local_58;
ulong local_50;
long *local_48;
long local_38 [2];
piVar4 = std::istream::_M_extract<unsigned_long>((ulong *)param_1);
piVar4 = std::istream::_M_extract<unsigned_long>((ulong *)piVar4);
if (((byte)piVar4[*(long *)(*(long *)piVar4 + -0x18) + 0x20] & 5) != 0) {
pcVar6 = "Master: Invalid shot command. Use \'shot X Y\'.\n";
lVar5 = 0x2e;
LAB_00118478:
std::__ostream_insert<char,std::char_traits<char>>((ostream *)PTR_cout_00124fa0,pcVar6,lVar5);
return;
}
cVar2 = Settings::getStart(*(Settings **)this);
if (cVar2 == '\0') {
pcVar6 = "Master: Game not started yet.\n";
lVar5 = 0x1e;
goto LAB_00118478;
}
pRVar1 = *(ReadWriteQueue **)(this + 8);
/* try { // try from 001182c1 to 001182d8 has its CatchHandler @ 0011856e */
local_78[0] = local_68;
std::__cxx11::string::_M_construct<char_const*>(local_78,"../game_data/queue.txt","");
/* try { // try from 001182d9 to 001182e5 has its CatchHandler @ 00118552 */
iVar3 = ReadWriteQueue::readQueueFromFile(pRVar1,(string *)local_78);
if (local_78[0] != local_68) {
operator_delete(local_78[0],local_68[0] + 1);
}
if (iVar3 != 1) {
pcVar6 = "Master: It\'s not your turn.\n";
lVar5 = 0x1c;
goto LAB_00118478;
}
Master::handleShot_abi_cxx11_((ulong)local_78,*(ulong *)(this + 0x10));
/* try { // try from 00118331 to 00118338 has its CatchHandler @ 00118550 */
Master::processShotResult(*(string **)(this + 0x10),(ulong)local_78,local_50);
pRVar1 = *(ReadWriteQueue **)(this + 8);
local_98[0] = local_88;
/* try { // try from 00118347 to 0011835c has its CatchHandler @ 0011854e */
std::__cxx11::string::_M_construct<char_const*>(local_98,"../game_data/shots.txt","");
/* try { // try from 00118367 to 0011837b has its CatchHandler @ 00118533 */
ReadWriteQueue::writeShotToFile(pRVar1,(string *)local_98,1,local_50,local_58,(string *)local_78);
if (local_98[0] != local_88) {
operator_delete(local_98[0],local_88[0] + 1);
}
iVar3 = std::__cxx11::string::compare((string *)local_78,"miss");
if (iVar3 == 0) {
pRVar1 = *(ReadWriteQueue **)(this + 8);
local_98[0] = local_88;
/* try { // try from 00118494 to 001184a6 has its CatchHandler @ 0011852d */
std::__cxx11::string::_M_construct<char_const*>(local_98,"../game_data/queue.txt","");
/* try { // try from 001184a7 to 001184b6 has its CatchHandler @ 0011852b */
ReadWriteQueue::writeQueueToFile(pRVar1,(string *)local_98,2);
}
else {
iVar3 = std::__cxx11::string::compare((string *)local_78,"hit");
/* try { // try from 001183dd to 0011840e has its CatchHandler @ 00118550 */
if (((iVar3 != 0) &&
(iVar3 = std::__cxx11::string::compare((string *)local_78,"hit_and_sunk"), iVar3 != 0)) ||
(cVar2 = Master::allShipsSunk(*(Master **)(this + 0x10)), cVar2 == '\0')) goto LAB_001184cd;
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)PTR_cout_00124fa0,"Master: All Slave ships have been sunk. Master wins!\n"
,0x35);
Settings::exitGame_abi_cxx11_();
if (local_48 != local_38) {
operator_delete(local_48,local_38[0] + 1);
}
local_98[0] = local_88;
/* try { // try from 00118430 to 00118442 has its CatchHandler @ 00118529 */
std::__cxx11::string::_M_construct<char_const*>(local_98,"../game_data/queue.txt","");
/* try { // try from 00118446 to 0011844d has its CatchHandler @ 00118527 */
saveSettingsToFile((string *)local_98,*(Settings **)this);
}
if (local_98[0] != local_88) {
operator_delete(local_98[0],local_88[0] + 1);
}
LAB_001184cd:
local_98[0] = local_88;
/* try { // try from 001184d3 to 001184e5 has its CatchHandler @ 00118531 */
std::__cxx11::string::_M_construct<char_const*>(local_98,"../game_data/settings.txt","");
/* try { // try from 001184e9 to 001184f0 has its CatchHandler @ 0011852f */
saveSettingsToFile((string *)local_98,*(Settings **)this);
if (local_98[0] != local_88) {
operator_delete(local_98[0],local_88[0] + 1);
}
if (local_78[0] == local_68) {
return;
}
operator_delete(local_78[0],local_68[0] + 1);
return;
}
|
|
14,639
|
train_context::build_v_diff(bool)
|
monkey531[P]llama/examples/cvector-generator/cvector-generator.cpp
|
void build_v_diff(bool transpose) {
printf("build_v_diff\n");
for (int il = 0; il < n_layers - 1; il++) {
auto & diff_tmp = v_diff_tmp[il];
int n_elem = diff_tmp.size() / sizeof(float);
GGML_ASSERT(n_elem % n_embd == 0);
int n_rows = n_elem / n_embd;
struct ggml_tensor * diff = transpose
? ggml_new_tensor_2d(ctx_ggml, GGML_TYPE_F32, n_rows, n_embd)
: ggml_new_tensor_2d(ctx_ggml, GGML_TYPE_F32, n_embd, n_rows);
ggml_set_name(diff, (std::string("diff_") + std::to_string(il)).c_str());
diff->data = malloc(ggml_nbytes(diff)); // TODO: get rid of this malloc if possible
if (transpose) {
// copy data & transpose
float * arr = (float *) diff_tmp.data();
for (int ir = 0; ir < n_rows; ++ir) {
for (int ic = 0; ic < n_embd; ++ic) {
float f = arr[ir*n_embd + ic];
ggml_set_f32_nd(diff, ir, ic, 0, 0, f);
}
}
} else {
// only copy
memcpy(diff->data, diff_tmp.data(), ggml_nbytes(diff));
}
v_diff.push_back(diff);
print_debug_tensor(diff);
// free memory of diff_tmp
diff_tmp.resize(0);
}
}
|
O2
|
cpp
|
train_context::build_v_diff(bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movl %esi, 0x14(%rsp)
movq %rdi, %r14
leaq 0x848e7(%rip), %rdi # 0xad8c2
callq 0x24fe0
leaq 0x40(%r14), %rax
movq %rax, 0x18(%rsp)
xorl %r13d, %r13d
movslq 0xc(%r14), %rax
decq %rax
cmpq %rax, %r13
jge 0x29176
movq 0x70(%r14), %rcx
imulq $0x18, %r13, %rdx
movq 0x8(%rcx,%rdx), %rax
movq %rcx, 0x30(%rsp)
movq %rdx, 0x28(%rsp)
subq (%rcx,%rdx), %rax
shrq $0x2, %rax
movl 0x8(%r14), %ecx
cltd
idivl %ecx
testl %edx, %edx
jne 0x29188
movl %eax, %ebp
movq (%r14), %rdi
cmpb $0x0, 0x14(%rsp)
movl %ecx, %eax
cmovnel %ebp, %eax
cmovel %ebp, %ecx
movslq %eax, %rdx
movslq %ecx, %rcx
xorl %esi, %esi
callq 0x24d90
movq %rax, %rbx
movq %rax, 0x8(%rsp)
leaq 0x58(%rsp), %r12
movq %r12, %rdi
leaq 0x84501(%rip), %rsi # 0xad561
leaq 0x7(%rsp), %rdx
callq 0x291dc
leaq 0x78(%rsp), %r15
movq %r15, %rdi
movl %r13d, %esi
callq 0x2b10a
leaq 0x38(%rsp), %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x2b0a3
movq %r13, 0x20(%rsp)
movq 0x38(%rsp), %rsi
movq %rbx, %rdi
callq 0x25260
movq 0x30(%rsp), %rbx
addq 0x28(%rsp), %rbx
leaq 0x38(%rsp), %rdi
callq 0x254d8
movq %r15, %rdi
movq %rbx, %r15
callq 0x254d8
leaq 0x58(%rsp), %rdi
callq 0x254d8
movq 0x8(%rsp), %rdi
callq 0x240f0
movq %rax, %rdi
callq 0x24db0
movq 0x8(%rsp), %rdi
movq %rax, 0xf8(%rdi)
movq (%rbx), %r13
cmpb $0x0, 0x14(%rsp)
je 0x29130
xorl %ebx, %ebx
testl %ebp, %ebp
cmovlel %ebx, %ebp
cmpl %ebp, %ebx
je 0x29146
xorl %r12d, %r12d
movl 0x8(%r14), %eax
cmpl %eax, %r12d
jge 0x2912c
imull %ebx, %eax
addl %r12d, %eax
cltq
movss (%r13,%rax,4), %xmm0
movq 0x8(%rsp), %rdi
movl %ebx, %esi
movl %r12d, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x244d0
incl %r12d
jmp 0x290fb
incl %ebx
jmp 0x290f4
movq %rax, %rbx
callq 0x240f0
movq %rbx, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x24880
movq 0x18(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x2a094
movq 0x8(%rsp), %rdi
callq 0x27fc9
movq %r15, %rdi
xorl %esi, %esi
callq 0x2af60
movq 0x20(%rsp), %r13
incq %r13
jmp 0x28fec
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x841fa(%rip), %rdi # 0xad389
leaq 0x8425e(%rip), %rdx # 0xad3f4
leaq 0x843af(%rip), %rcx # 0xad54c
movl $0xeb, %esi
xorl %eax, %eax
callq 0x25150
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x254d8
jmp 0x291bb
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x254d8
jmp 0x291ca
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x254d8
movq %rbx, %rdi
callq 0x25250
|
_ZN13train_context12build_v_diffEb:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 98h
mov [rsp+0C8h+var_B4], esi
mov r14, rdi
lea rdi, aBuildVDiff; "build_v_diff"
call _puts
lea rax, [r14+40h]
mov [rsp+0C8h+var_B0], rax
xor r13d, r13d
loc_28FEC:
movsxd rax, dword ptr [r14+0Ch]
dec rax
cmp r13, rax
jge loc_29176
mov rcx, [r14+70h]
imul rdx, r13, 18h
mov rax, [rcx+rdx+8]
mov [rsp+0C8h+var_98], rcx
mov [rsp+0C8h+var_A0], rdx
sub rax, [rcx+rdx]
shr rax, 2
mov ecx, [r14+8]
cdq
idiv ecx
test edx, edx
jnz loc_29188
mov ebp, eax
mov rdi, [r14]
cmp byte ptr [rsp+0C8h+var_B4], 0
mov eax, ecx
cmovnz eax, ebp
cmovz ecx, ebp
movsxd rdx, eax
movsxd rcx, ecx
xor esi, esi
call _ggml_new_tensor_2d
mov rbx, rax
mov [rsp+0C8h+var_C0], rax
lea r12, [rsp+0C8h+var_70]
mov rdi, r12
lea rsi, aDiff; "diff_"
lea rdx, [rsp+0C8h+var_C1]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea r15, [rsp+0C8h+var_50]
mov rdi, r15; this
mov esi, r13d; int
call _ZNSt7__cxx119to_stringEi; std::to_string(int)
lea rdi, [rsp+0C8h+var_90]
mov rsi, r12
mov rdx, r15
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&)
mov [rsp+0C8h+var_A8], r13
mov rsi, [rsp+0C8h+var_90]
mov rdi, rbx
call _ggml_set_name
mov rbx, [rsp+0C8h+var_98]
add rbx, [rsp+0C8h+var_A0]
lea rdi, [rsp+0C8h+var_90]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r15; void *
mov r15, rbx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0C8h+var_70]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, [rsp+0C8h+var_C0]
call _ggml_nbytes
mov rdi, rax
call _malloc
mov rdi, [rsp+0C8h+var_C0]
mov [rdi+0F8h], rax
mov r13, [rbx]
cmp byte ptr [rsp+0C8h+var_B4], 0
jz short loc_29130
xor ebx, ebx
test ebp, ebp
cmovle ebp, ebx
loc_290F4:
cmp ebx, ebp
jz short loc_29146
xor r12d, r12d
loc_290FB:
mov eax, [r14+8]
cmp r12d, eax
jge short loc_2912C
imul eax, ebx
add eax, r12d
cdqe
movss xmm0, dword ptr [r13+rax*4+0]
mov rdi, [rsp+0C8h+var_C0]
mov esi, ebx
mov edx, r12d
xor ecx, ecx
xor r8d, r8d
call _ggml_set_f32_nd
inc r12d
jmp short loc_290FB
loc_2912C:
inc ebx
jmp short loc_290F4
loc_29130:
mov rbx, rax
call _ggml_nbytes
mov rdi, rbx
mov rsi, r13
mov rdx, rax
call _memcpy
loc_29146:
mov rdi, [rsp+0C8h+var_B0]
lea rsi, [rsp+0C8h+var_C0]
call _ZNSt6vectorIP11ggml_tensorSaIS1_EE9push_backERKS1_; std::vector<ggml_tensor *>::push_back(ggml_tensor * const&)
mov rdi, [rsp+0C8h+var_C0]
call _ZL18print_debug_tensorP11ggml_tensorb; print_debug_tensor(ggml_tensor *,bool)
mov rdi, r15
xor esi, esi
call _ZNSt6vectorIhSaIhEE6resizeEm; std::vector<uchar>::resize(ulong)
mov r13, [rsp+0C8h+var_A8]
inc r13
jmp loc_28FEC
loc_29176:
add rsp, 98h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_29188:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aNElemNEmbd0; "n_elem % n_embd == 0"
mov esi, 0EBh
xor eax, eax
call _ggml_abort
mov rbx, rax
lea rdi, [rsp+0C8h+var_90]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_291BB
mov rbx, rax
loc_291BB:
lea rdi, [rsp+0C8h+var_50]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_291CA
mov rbx, rax
loc_291CA:
lea rdi, [rsp+0C8h+var_70]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call __Unwind_Resume
|
long long train_context::build_v_diff(train_context *this, long long a2, long long a3, long long a4)
{
long long i; // r13
long long result; // rax
long long v7; // rcx
long long v8; // rax
unsigned long long v9; // rax
int v10; // ecx
int v11; // eax
int v12; // edx
int v13; // ebp
int v14; // eax
const char *v15; // rbx
_QWORD *v16; // rbx
_QWORD *v17; // r15
long long v18; // rax
long long v19; // rax
const char *v20; // rdi
long long v21; // r13
unsigned int v22; // ebx
unsigned int j; // r12d
int v24; // eax
long long v25; // rbx
long long v26; // rax
long long v27; // rbx
char v28; // [rsp+7h] [rbp-C1h] BYREF
const char *v29; // [rsp+8h] [rbp-C0h] BYREF
int v30; // [rsp+14h] [rbp-B4h]
char *v31; // [rsp+18h] [rbp-B0h]
long long v32; // [rsp+20h] [rbp-A8h]
long long v33; // [rsp+28h] [rbp-A0h]
long long v34; // [rsp+30h] [rbp-98h]
_QWORD v35[4]; // [rsp+38h] [rbp-90h] BYREF
_BYTE v36[32]; // [rsp+58h] [rbp-70h] BYREF
_BYTE v37[80]; // [rsp+78h] [rbp-50h] BYREF
v30 = a2;
puts("build_v_diff", a2, a3, a4);
v31 = (char *)this + 64;
for ( i = 0LL; ; i = v32 + 1 )
{
result = *((int *)this + 3) - 1LL;
if ( i >= result )
break;
v7 = *((_QWORD *)this + 14);
v8 = *(_QWORD *)(v7 + 24 * i + 8);
v34 = v7;
v33 = 24 * i;
v9 = (unsigned long long)(v8 - *(_QWORD *)(v7 + 24 * i)) >> 2;
v10 = *((_DWORD *)this + 2);
v12 = (int)v9 % v10;
v11 = (int)v9 / v10;
if ( v12 )
{
v27 = ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/examples/cvector-generator/cvector-generator.cpp",
235LL,
"GGML_ASSERT(%s) failed",
"n_elem % n_embd == 0");
std::string::~string(v35);
std::string::~string(v37);
std::string::~string(v36);
_Unwind_Resume(v27);
}
v13 = v11;
v14 = *((_DWORD *)this + 2);
if ( (_BYTE)v30 )
v14 = v13;
else
v10 = v13;
v15 = (const char *)ggml_new_tensor_2d(*(_QWORD *)this, 0LL, v14, v10);
v29 = v15;
std::string::basic_string<std::allocator<char>>(v36, "diff_", &v28);
std::to_string((std::__cxx11 *)v37, i);
std::operator+<char>(v35, v36, v37);
v32 = i;
ggml_set_name(v15, v35[0]);
v16 = (_QWORD *)(v33 + v34);
std::string::~string(v35);
v17 = v16;
std::string::~string(v37);
std::string::~string(v36);
v18 = ggml_nbytes(v29);
v19 = malloc(v18);
v20 = v29;
*((_QWORD *)v29 + 31) = v19;
v21 = *v16;
if ( (_BYTE)v30 )
{
v22 = 0;
if ( v13 <= 0 )
v13 = 0;
while ( v22 != v13 )
{
for ( j = 0; ; ++j )
{
v24 = *((_DWORD *)this + 2);
if ( (int)j >= v24 )
break;
ggml_set_f32_nd(v29, v22, j, 0LL, 0LL, *(float *)(v21 + 4LL * (int)(j + v22 * v24)));
}
++v22;
}
}
else
{
v25 = v19;
v26 = ggml_nbytes(v20);
memcpy(v25, v21, v26);
}
std::vector<ggml_tensor *>::push_back(v31, &v29);
print_debug_tensor(v29);
std::vector<unsigned char>::resize(v17, 0LL);
}
return result;
}
|
build_v_diff:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x98
MOV dword ptr [RSP + 0x14],ESI
MOV R14,RDI
LEA RDI,[0x1ad8c2]
CALL 0x00124fe0
LEA RAX,[R14 + 0x40]
MOV qword ptr [RSP + 0x18],RAX
XOR R13D,R13D
LAB_00128fec:
MOVSXD RAX,dword ptr [R14 + 0xc]
DEC RAX
CMP R13,RAX
JGE 0x00129176
MOV RCX,qword ptr [R14 + 0x70]
IMUL RDX,R13,0x18
MOV RAX,qword ptr [RCX + RDX*0x1 + 0x8]
MOV qword ptr [RSP + 0x30],RCX
MOV qword ptr [RSP + 0x28],RDX
SUB RAX,qword ptr [RCX + RDX*0x1]
SHR RAX,0x2
MOV ECX,dword ptr [R14 + 0x8]
CDQ
IDIV ECX
TEST EDX,EDX
JNZ 0x00129188
MOV EBP,EAX
MOV RDI,qword ptr [R14]
CMP byte ptr [RSP + 0x14],0x0
MOV EAX,ECX
CMOVNZ EAX,EBP
CMOVZ ECX,EBP
MOVSXD RDX,EAX
MOVSXD RCX,ECX
XOR ESI,ESI
CALL 0x00124d90
MOV RBX,RAX
MOV qword ptr [RSP + 0x8],RAX
LEA R12,[RSP + 0x58]
MOV RDI,R12
LEA RSI,[0x1ad561]
LEA RDX,[RSP + 0x7]
CALL 0x001291dc
LAB_0012906a:
LEA R15,[RSP + 0x78]
MOV RDI,R15
MOV ESI,R13D
CALL 0x0012b10a
LAB_0012907a:
LEA RDI,[RSP + 0x38]
MOV RSI,R12
MOV RDX,R15
CALL 0x0012b0a3
MOV qword ptr [RSP + 0x20],R13
MOV RSI,qword ptr [RSP + 0x38]
LAB_00129094:
MOV RDI,RBX
CALL 0x00125260
LAB_0012909c:
MOV RBX,qword ptr [RSP + 0x30]
ADD RBX,qword ptr [RSP + 0x28]
LEA RDI,[RSP + 0x38]
CALL 0x001254d8
MOV RDI,R15
MOV R15,RBX
CALL 0x001254d8
LEA RDI,[RSP + 0x58]
CALL 0x001254d8
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x001240f0
MOV RDI,RAX
CALL 0x00124db0
MOV RDI,qword ptr [RSP + 0x8]
MOV qword ptr [RDI + 0xf8],RAX
MOV R13,qword ptr [RBX]
CMP byte ptr [RSP + 0x14],0x0
JZ 0x00129130
XOR EBX,EBX
TEST EBP,EBP
CMOVLE EBP,EBX
LAB_001290f4:
CMP EBX,EBP
JZ 0x00129146
XOR R12D,R12D
LAB_001290fb:
MOV EAX,dword ptr [R14 + 0x8]
CMP R12D,EAX
JGE 0x0012912c
IMUL EAX,EBX
ADD EAX,R12D
CDQE
MOVSS XMM0,dword ptr [R13 + RAX*0x4]
MOV RDI,qword ptr [RSP + 0x8]
MOV ESI,EBX
MOV EDX,R12D
XOR ECX,ECX
XOR R8D,R8D
CALL 0x001244d0
INC R12D
JMP 0x001290fb
LAB_0012912c:
INC EBX
JMP 0x001290f4
LAB_00129130:
MOV RBX,RAX
CALL 0x001240f0
MOV RDI,RBX
MOV RSI,R13
MOV RDX,RAX
CALL 0x00124880
LAB_00129146:
MOV RDI,qword ptr [RSP + 0x18]
LEA RSI,[RSP + 0x8]
CALL 0x0012a094
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x00127fc9
MOV RDI,R15
XOR ESI,ESI
CALL 0x0012af60
MOV R13,qword ptr [RSP + 0x20]
INC R13
JMP 0x00128fec
LAB_00129176:
ADD RSP,0x98
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00129188:
LEA RDI,[0x1ad389]
LEA RDX,[0x1ad3f4]
LEA RCX,[0x1ad54c]
MOV ESI,0xeb
XOR EAX,EAX
CALL 0x00125150
|
/* train_context::build_v_diff(bool) */
void __thiscall train_context::build_v_diff(train_context *this,bool param_1)
{
void *__src;
ulong uVar1;
ggml_tensor *pgVar2;
size_t sVar3;
void *__dest;
int iVar4;
int iVar5;
vector<unsigned_char,std::allocator<unsigned_char>> *this_00;
int iVar6;
ulong uVar7;
int7 in_register_00000031;
ggml_tensor **ppgVar8;
int iVar9;
long lVar10;
allocator local_c1;
ggml_tensor *local_c0;
int4 local_b4;
train_context *local_b0;
long local_a8;
long local_a0;
long local_98;
int8 local_90 [4];
string local_70 [32];
__cxx11 local_50 [32];
local_b4 = (int4)CONCAT71(in_register_00000031,param_1);
puts("build_v_diff");
local_b0 = this + 0x40;
lVar10 = 0;
while( true ) {
if ((long)*(int *)(this + 0xc) + -1 <= lVar10) {
return;
}
local_98 = *(long *)(this + 0x70);
local_a0 = lVar10 * 0x18;
uVar1 = (ulong)(*(long *)(local_98 + 8 + local_a0) - *(long *)(local_98 + local_a0)) >> 2;
iVar5 = *(int *)(this + 8);
uVar1 = (ulong)(uint)((int)uVar1 >> 0x1f) << 0x20 | uVar1 & 0xffffffff;
uVar7 = (long)uVar1 / (long)iVar5;
if ((int)((long)uVar1 % (long)iVar5) != 0) break;
iVar6 = (int)uVar7;
iVar4 = iVar5;
iVar9 = iVar6;
if ((char)local_b4 == '\0') {
iVar4 = iVar6;
iVar9 = iVar5;
}
pgVar2 = (ggml_tensor *)ggml_new_tensor_2d(*(int8 *)this,0,(long)iVar9,(long)iVar4);
local_c0 = pgVar2;
std::__cxx11::string::string<std::allocator<char>>(local_70,"diff_",&local_c1);
/* try { // try from 0012906a to 00129079 has its CatchHandler @ 001291c7 */
std::__cxx11::to_string(local_50,(int)lVar10);
/* try { // try from 0012907a to 00129089 has its CatchHandler @ 001291b8 */
std::operator+((string *)local_90,local_70);
local_a8 = lVar10;
/* try { // try from 00129094 to 0012909b has its CatchHandler @ 001291a9 */
ggml_set_name(pgVar2,local_90[0]);
this_00 = (vector<unsigned_char,std::allocator<unsigned_char>> *)(local_98 + local_a0);
std::__cxx11::string::~string((string *)local_90);
std::__cxx11::string::~string((string *)local_50);
std::__cxx11::string::~string(local_70);
sVar3 = ggml_nbytes(local_c0);
__dest = malloc(sVar3);
*(void **)(local_c0 + 0xf8) = __dest;
__src = *(void **)this_00;
if ((char)local_b4 == '\0') {
sVar3 = ggml_nbytes();
memcpy(__dest,__src,sVar3);
}
else {
uVar7 = uVar7 & 0xffffffff;
iVar5 = 0;
if (iVar6 < 1) {
uVar7 = 0;
iVar5 = 0;
}
for (; iVar5 != (int)uVar7; iVar5 = iVar5 + 1) {
for (iVar9 = 0; iVar9 < *(int *)(this + 8); iVar9 = iVar9 + 1) {
ggml_set_f32_nd(*(int4 *)
((long)__src + (long)(*(int *)(this + 8) * iVar5 + iVar9) * 4),local_c0,
iVar5,iVar9,0,0);
}
}
}
ppgVar8 = &local_c0;
std::vector<ggml_tensor*,std::allocator<ggml_tensor*>>::push_back
((vector<ggml_tensor*,std::allocator<ggml_tensor*>> *)local_b0,ppgVar8);
print_debug_tensor(local_c0,SUB81(ppgVar8,0));
std::vector<unsigned_char,std::allocator<unsigned_char>>::resize(this_00,0);
lVar10 = local_a8 + 1;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/examples/cvector-generator/cvector-generator.cpp"
,0xeb,"GGML_ASSERT(%s) failed","n_elem % n_embd == 0");
}
|
|
14,640
|
long minja::Value::get<long>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, long) const
|
monkey531[P]llama/common/minja.hpp
|
T get(const std::string & key, T default_value) const {
if (!contains(key)) return default_value;
return at(key).get<T>();
}
|
O1
|
cpp
|
long minja::Value::get<long>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, long) const:
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
callq 0x98926
testb %al, %al
je 0xb20aa
movq %rsp, %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x8f404
movq %r14, %rdi
movq %rbx, %rsi
callq 0x984ea
movq %rax, %rdi
callq 0x8b378
movq %rax, %rbx
leaq 0x40(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x5cc1e
movq %r14, %rdi
callq 0x62398
movq -0x8(%r14), %rdi
testq %rdi, %rdi
je 0xb2056
callq 0x71c94
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0xb2065
callq 0x71c94
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0xb2074
callq 0x71c94
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0xb20aa
movq 0x80efb(%rip), %rax # 0x132f80
cmpb $0x0, (%rax)
je 0xb2095
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0xb209f
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0xb20aa
movq (%rdi), %rax
callq *0x18(%rax)
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x8b2ec
movq %rbx, %rdi
callq 0x1c030
|
_ZNK5minja5Value3getIlEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES2_:
push r15
push r14
push rbx
sub rsp, 50h
mov rbx, rdx
mov r15, rsi
mov r14, rdi
call _ZNK5minja5Value8containsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::contains(std::string const&)
test al, al
jz loc_B20AA
mov rbx, rsp
mov rdi, rbx
mov rsi, r15
call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&)
mov rdi, r14; this
mov rsi, rbx; minja::Value *
call _ZN5minja5Value2atERKS0_; minja::Value::at(minja::Value const&)
mov rdi, rax
call _ZNK5minja5Value3getIlEET_v; minja::Value::get<long>(void)
mov rbx, rax
lea r14, [rsp+68h+var_28]
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [r14-8]
test rdi, rdi
jz short loc_B2056
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_B2056:
mov rdi, [rsp+68h+var_40]
test rdi, rdi
jz short loc_B2065
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_B2065:
mov rdi, [rsp+68h+var_50]
test rdi, rdi
jz short loc_B2074
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_B2074:
mov rdi, [rsp+68h+var_60]
test rdi, rdi
jz short loc_B20AA
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_B2095
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_B209F
loc_B2095:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_B209F:
cmp eax, 1
jnz short loc_B20AA
mov rax, [rdi]
call qword ptr [rax+18h]
loc_B20AA:
mov rax, rbx
add rsp, 50h
pop rbx
pop r14
pop r15
retn
mov rbx, rax
mov rdi, rsp; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
mov rdi, rbx
call __Unwind_Resume
|
long long minja::Value::get<long>(minja::Value *this, long long a2, long long a3)
{
unsigned long long v4; // rax
long long v5; // rdi
signed __int32 v6; // eax
long long v8; // [rsp+0h] [rbp-68h] BYREF
long long v9; // [rsp+8h] [rbp-60h]
volatile signed __int32 *v10; // [rsp+18h] [rbp-50h]
volatile signed __int32 *v11; // [rsp+28h] [rbp-40h]
volatile signed __int32 *v12; // [rsp+38h] [rbp-30h]
char v13[40]; // [rsp+40h] [rbp-28h] BYREF
if ( minja::Value::contains((long long)this, a2) )
{
minja::Value::Value((long long)&v8, a2);
v4 = minja::Value::at(this, (const minja::Value *)&v8);
a3 = minja::Value::get<long>(v4);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(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 ( v12 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v12);
if ( v11 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v11);
if ( v10 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v10);
v5 = v9;
if ( v9 )
{
if ( _libc_single_threaded )
{
v6 = *(_DWORD *)(v9 + 12);
*(_DWORD *)(v9 + 12) = v6 - 1;
}
else
{
v6 = _InterlockedExchangeAdd((volatile signed __int32 *)(v9 + 12), 0xFFFFFFFF);
}
if ( v6 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v5 + 24LL))(v5, 0LL);
}
}
return a3;
}
|
get<long>:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x50
MOV RBX,RDX
MOV R15,RSI
MOV R14,RDI
CALL 0x00198926
TEST AL,AL
JZ 0x001b20aa
MOV RBX,RSP
MOV RDI,RBX
MOV RSI,R15
CALL 0x0018f404
LAB_001b201b:
MOV RDI,R14
MOV RSI,RBX
CALL 0x001984ea
MOV RDI,RAX
CALL 0x0018b378
LAB_001b202e:
MOV RBX,RAX
LEA R14,[RSP + 0x40]
MOV RDI,R14
XOR ESI,ESI
CALL 0x0015cc1e
MOV RDI,R14
CALL 0x00162398
MOV RDI,qword ptr [R14 + -0x8]
TEST RDI,RDI
JZ 0x001b2056
CALL 0x00171c94
LAB_001b2056:
MOV RDI,qword ptr [RSP + 0x28]
TEST RDI,RDI
JZ 0x001b2065
CALL 0x00171c94
LAB_001b2065:
MOV RDI,qword ptr [RSP + 0x18]
TEST RDI,RDI
JZ 0x001b2074
CALL 0x00171c94
LAB_001b2074:
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x001b20aa
MOV RAX,qword ptr [0x00232f80]
CMP byte ptr [RAX],0x0
JZ 0x001b2095
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x001b209f
LAB_001b2095:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_001b209f:
CMP EAX,0x1
JNZ 0x001b20aa
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_001b20aa:
MOV RAX,RBX
ADD RSP,0x50
POP RBX
POP R14
POP R15
RET
|
/* long minja::Value::get<long>(std::__cxx11::string const&, long) const */
long __thiscall minja::Value::get<long>(Value *this,string *param_1,long param_2)
{
int *piVar1;
char cVar2;
int iVar3;
Value *this_00;
Value aVStack_68 [8];
long *local_60;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_50;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_40;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_30;
data local_28 [16];
cVar2 = contains(this,param_1);
if (cVar2 != '\0') {
Value(aVStack_68,param_1);
/* try { // try from 001b201b to 001b202d has its CatchHandler @ 001b20b7 */
this_00 = (Value *)at(this,aVStack_68);
param_2 = get<long>(this_00);
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(local_28,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_28);
if (local_30 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_30);
}
if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_40);
}
if (local_50 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_50);
}
if (local_60 != (long *)0x0) {
if (*PTR___libc_single_threaded_00232f80 == '\0') {
LOCK();
piVar1 = (int *)((long)local_60 + 0xc);
iVar3 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar3 = *(int *)((long)local_60 + 0xc);
*(int *)((long)local_60 + 0xc) = iVar3 + -1;
}
if (iVar3 == 1) {
(**(code **)(*local_60 + 0x18))();
}
}
}
return param_2;
}
|
|
14,641
|
quantize_iq2_s
|
monkey531[P]llama/ggml/src/ggml-quants.c
|
size_t quantize_iq2_s(const float * restrict src, void * restrict dst, int64_t nrow, int64_t n_per_row, const float * quant_weights) {
GGML_ASSERT(n_per_row%QK_K == 0);
int64_t nblock = n_per_row/QK_K;
char * qrow = (char *)dst;
for (int64_t row = 0; row < nrow; ++row) {
quantize_row_iq2_s_impl(src, qrow, n_per_row, quant_weights);
src += n_per_row;
qrow += nblock*sizeof(block_iq2_s);
}
return nrow * nblock * sizeof(block_iq2_s);
}
|
O0
|
c
|
quantize_iq2_s:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x28(%rsp)
movq %r8, 0x20(%rsp)
movq 0x28(%rsp), %rax
movl $0x100, %ecx # imm = 0x100
cqto
idivq %rcx
cmpq $0x0, %rdx
je 0x87e13
leaq 0x3b2d7(%rip), %rdi # 0xc30d0
movl $0x1336, %esi # imm = 0x1336
leaq 0x2c7fc(%rip), %rdx # 0xb4601
leaq 0x3b39c(%rip), %rcx # 0xc31a8
movb $0x0, %al
callq 0x46770
movq 0x28(%rsp), %rax
movl $0x100, %ecx # imm = 0x100
cqto
idivq %rcx
movq %rax, 0x18(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x10(%rsp)
movq $0x0, 0x8(%rsp)
movq 0x8(%rsp), %rax
cmpq 0x30(%rsp), %rax
jge 0x87e92
movq 0x40(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq 0x20(%rsp), %rcx
callq 0x87eb0
movq 0x28(%rsp), %rax
shlq $0x2, %rax
addq 0x40(%rsp), %rax
movq %rax, 0x40(%rsp)
imulq $0x52, 0x18(%rsp), %rax
addq 0x10(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
jmp 0x87e3a
movq 0x30(%rsp), %rax
imulq 0x18(%rsp), %rax
imulq $0x52, %rax, %rax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
|
quantize_iq2_s:
sub rsp, 48h
mov [rsp+48h+var_8], rdi
mov [rsp+48h+var_10], rsi
mov [rsp+48h+var_18], rdx
mov [rsp+48h+var_20], rcx
mov [rsp+48h+var_28], r8
mov rax, [rsp+48h+var_20]
mov ecx, 100h
cqo
idiv rcx
cmp rdx, 0
jz short loc_87E13
lea rdi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"...
mov esi, 1336h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aNPerRowQkK0; "n_per_row%QK_K == 0"
mov al, 0
call _ggml_abort
loc_87E13:
mov rax, [rsp+48h+var_20]
mov ecx, 100h
cqo
idiv rcx
mov [rsp+48h+var_30], rax
mov rax, [rsp+48h+var_10]
mov [rsp+48h+var_38], rax
mov [rsp+48h+var_40], 0
loc_87E3A:
mov rax, [rsp+48h+var_40]
cmp rax, [rsp+48h+var_18]
jge short loc_87E92
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_38]
mov rdx, [rsp+48h+var_20]
mov rcx, [rsp+48h+var_28]
call quantize_row_iq2_s_impl
mov rax, [rsp+48h+var_20]
shl rax, 2
add rax, [rsp+48h+var_8]
mov [rsp+48h+var_8], rax
imul rax, [rsp+48h+var_30], 52h ; 'R'
add rax, [rsp+48h+var_38]
mov [rsp+48h+var_38], rax
mov rax, [rsp+48h+var_40]
add rax, 1
mov [rsp+48h+var_40], rax
jmp short loc_87E3A
loc_87E92:
mov rax, [rsp+48h+var_18]
imul rax, [rsp+48h+var_30]
imul rax, 52h ; 'R'
add rsp, 48h
retn
|
long long quantize_iq2_s(long long a1, long long a2, long long a3, long long a4, long long a5)
{
long long i; // [rsp+8h] [rbp-40h]
long long v8; // [rsp+18h] [rbp-30h]
if ( a4 % 256 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-quants.c",
4918,
(long long)"GGML_ASSERT(%s) failed",
"n_per_row%QK_K == 0");
v8 = a4 / 256;
for ( i = 0LL; i < a3; ++i )
{
quantize_row_iq2_s_impl(a1, a2, a4, a5);
a1 += 4 * a4;
a2 += 82 * v8;
}
return 82 * v8 * a3;
}
|
quantize_iq2_s:
SUB RSP,0x48
MOV qword ptr [RSP + 0x40],RDI
MOV qword ptr [RSP + 0x38],RSI
MOV qword ptr [RSP + 0x30],RDX
MOV qword ptr [RSP + 0x28],RCX
MOV qword ptr [RSP + 0x20],R8
MOV RAX,qword ptr [RSP + 0x28]
MOV ECX,0x100
CQO
IDIV RCX
CMP RDX,0x0
JZ 0x00187e13
LEA RDI,[0x1c30d0]
MOV ESI,0x1336
LEA RDX,[0x1b4601]
LEA RCX,[0x1c31a8]
MOV AL,0x0
CALL 0x00146770
LAB_00187e13:
MOV RAX,qword ptr [RSP + 0x28]
MOV ECX,0x100
CQO
IDIV RCX
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x8],0x0
LAB_00187e3a:
MOV RAX,qword ptr [RSP + 0x8]
CMP RAX,qword ptr [RSP + 0x30]
JGE 0x00187e92
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x28]
MOV RCX,qword ptr [RSP + 0x20]
CALL 0x00187eb0
MOV RAX,qword ptr [RSP + 0x28]
SHL RAX,0x2
ADD RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x40],RAX
IMUL RAX,qword ptr [RSP + 0x18],0x52
ADD RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x8]
ADD RAX,0x1
MOV qword ptr [RSP + 0x8],RAX
JMP 0x00187e3a
LAB_00187e92:
MOV RAX,qword ptr [RSP + 0x30]
IMUL RAX,qword ptr [RSP + 0x18]
IMUL RAX,RAX,0x52
ADD RSP,0x48
RET
|
long quantize_iq2_s(long param_1,long param_2,long param_3,long param_4,int8 param_5)
{
long local_40;
long local_38;
long local_8;
if (param_4 % 0x100 != 0) {
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-quants.c",
0x1336,"GGML_ASSERT(%s) failed","n_per_row%QK_K == 0");
}
local_38 = param_2;
local_8 = param_1;
for (local_40 = 0; local_40 < param_3; local_40 = local_40 + 1) {
quantize_row_iq2_s_impl(local_8,local_38,param_4,param_5);
local_8 = param_4 * 4 + local_8;
local_38 = (param_4 / 0x100) * 0x52 + local_38;
}
return param_3 * (param_4 / 0x100) * 0x52;
}
|
|
14,642
|
minja::VariableExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const
|
monkey531[P]llama/common/./minja.hpp
|
Value do_evaluate(const std::shared_ptr<Context> & context) const override {
if (!context->contains(name)) {
return Value();
}
return context->at(name);
}
|
O3
|
cpp
|
minja::VariableExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdx), %r12
addq $0x20, %r14
leaq 0x8(%rsp), %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0x425aa
movq (%r12), %rax
movq %r12, %rdi
movq %r13, %rsi
callq *0x20(%rax)
movl %eax, %ebp
leaq 0x48(%rsp), %r12
movq %r12, %rdi
xorl %esi, %esi
callq 0x3d970
movq %r12, %rdi
callq 0x4a5c0
movq -0x8(%r12), %rdi
testq %rdi, %rdi
je 0x59d51
callq 0x2f80e
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x59d60
callq 0x2f80e
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x59d6f
callq 0x2f80e
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x59da5
movq 0x96220(%rip), %rax # 0xeffa0
cmpb $0x0, (%rax)
je 0x59d90
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0x59d9a
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0x59da5
movq (%rdi), %rax
callq *0x18(%rax)
testb %bpl, %bpl
je 0x59e3c
movq (%r15), %r15
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x425aa
movq (%r15), %rax
movq %r15, %rdi
movq %r12, %rsi
callq *0x18(%rax)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x4ed98
leaq 0x48(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x3d970
movq %r14, %rdi
callq 0x4a5c0
movq -0x8(%r14), %rdi
testq %rdi, %rdi
je 0x59dfd
callq 0x2f80e
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x59e0c
callq 0x2f80e
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x59e1b
callq 0x2f80e
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x59e8f
movq 0x96174(%rip), %rax # 0xeffa0
cmpb $0x0, (%rax)
je 0x59e7a
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0x59e84
leaq 0x40(%rbx), %r14
movq $0x0, 0x48(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x30(%rbx)
movb $0x0, 0x40(%rbx)
movq %r14, %rdi
movl $0x1, %esi
callq 0x3d970
movq %r14, %rdi
movl $0x1, %esi
callq 0x3d970
jmp 0x59e8f
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0x59e8f
movq (%rdi), %rax
callq *0x18(%rax)
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x59ea3
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x3d8e4
movq %rbx, %rdi
callq 0x18b90
|
_ZNK5minja12VariableExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov r15, rdx
mov r14, rsi
mov rbx, rdi
mov r12, [rdx]
add r14, 20h ; ' '
lea r13, [rsp+88h+var_80]
mov rdi, r13
mov rsi, r14
call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&)
mov rax, [r12]
mov rdi, r12
mov rsi, r13
call qword ptr [rax+20h]
mov ebp, eax
lea r12, [rsp+88h+var_40]
mov rdi, r12
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, r12
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [r12-8]
test rdi, rdi
jz short loc_59D51
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_59D51:
mov rdi, [rsp+88h+var_58]
test rdi, rdi
jz short loc_59D60
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_59D60:
mov rdi, [rsp+88h+var_68]
test rdi, rdi
jz short loc_59D6F
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_59D6F:
mov rdi, [rsp+88h+var_78]
test rdi, rdi
jz short loc_59DA5
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_59D90
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_59D9A
loc_59D90:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_59D9A:
cmp eax, 1
jnz short loc_59DA5
mov rax, [rdi]
call qword ptr [rax+18h]
loc_59DA5:
test bpl, bpl
jz loc_59E3C
mov r15, [r15]
lea r12, [rsp+88h+var_80]
mov rdi, r12
mov rsi, r14
call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&)
mov rax, [r15]
mov rdi, r15
mov rsi, r12
call qword ptr [rax+18h]
mov rdi, rbx; this
mov rsi, rax; minja::Value *
call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&)
lea r14, [rsp+88h+var_40]
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [r14-8]
test rdi, rdi
jz short loc_59DFD
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_59DFD:
mov rdi, [rsp+88h+var_58]
test rdi, rdi
jz short loc_59E0C
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_59E0C:
mov rdi, [rsp+88h+var_68]
test rdi, rdi
jz short loc_59E1B
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_59E1B:
mov rdi, [rsp+88h+var_78]
test rdi, rdi
jz short loc_59E8F
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_59E7A
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_59E84
loc_59E3C:
lea r14, [rbx+40h]
mov qword ptr [rbx+48h], 0
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
movups xmmword ptr [rbx+10h], xmm0
movups xmmword ptr [rbx+20h], xmm0
movups xmmword ptr [rbx+30h], xmm0
mov byte ptr [rbx+40h], 0
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
jmp short loc_59E8F
loc_59E7A:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_59E84:
cmp eax, 1
jnz short loc_59E8F
mov rax, [rdi]
call qword ptr [rax+18h]
loc_59E8F:
mov rax, rbx
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_59EA3:
mov rbx, rax
lea rdi, [rsp+arg_0]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
mov rdi, rbx
call __Unwind_Resume
|
minja::Value * minja::VariableExpr::do_evaluate(minja::Value *this, long long a2, long long *a3)
{
long long v5; // r12
char v6; // bp
long long v7; // rdi
signed __int32 v8; // eax
long long v9; // r15
const minja::Value *v10; // rax
long long v11; // rdi
signed __int32 v12; // eax
__int128 v14; // [rsp+8h] [rbp-80h] BYREF
volatile signed __int32 *v15; // [rsp+20h] [rbp-68h]
volatile signed __int32 *v16; // [rsp+30h] [rbp-58h]
volatile signed __int32 *v17; // [rsp+40h] [rbp-48h]
void **v18[8]; // [rsp+48h] [rbp-40h] BYREF
v5 = *a3;
minja::Value::Value(&v14);
v6 = (*(long long ( **)(long long, __int128 *))(*(_QWORD *)v5 + 32LL))(v5, &v14);
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 *)v18);
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(v18);
if ( v17 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v17);
if ( v16 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v16);
if ( v15 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v15);
v7 = *((_QWORD *)&v14 + 1);
if ( *((_QWORD *)&v14 + 1) )
{
if ( _libc_single_threaded )
{
v8 = *(_DWORD *)(*((_QWORD *)&v14 + 1) + 12LL);
*(_DWORD *)(*((_QWORD *)&v14 + 1) + 12LL) = v8 - 1;
}
else
{
v8 = _InterlockedExchangeAdd((volatile signed __int32 *)(*((_QWORD *)&v14 + 1) + 12LL), 0xFFFFFFFF);
}
if ( v8 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v7 + 24LL))(v7, 0LL);
}
if ( v6 )
{
v9 = *a3;
minja::Value::Value(&v14);
v10 = (const minja::Value *)(*(long long ( **)(long long, __int128 *))(*(_QWORD *)v9 + 24LL))(v9, &v14);
minja::Value::Value(this, v10);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v18);
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(v18);
if ( v17 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v17);
if ( v16 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v16);
if ( v15 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v15);
v11 = *((_QWORD *)&v14 + 1);
if ( *((_QWORD *)&v14 + 1) )
{
if ( _libc_single_threaded )
{
v12 = *(_DWORD *)(*((_QWORD *)&v14 + 1) + 12LL);
*(_DWORD *)(*((_QWORD *)&v14 + 1) + 12LL) = v12 - 1;
}
else
{
v12 = _InterlockedExchangeAdd((volatile signed __int32 *)(*((_QWORD *)&v14 + 1) + 12LL), 0xFFFFFFFF);
}
if ( v12 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v11 + 24LL))(v11, 0LL);
}
}
else
{
*((_QWORD *)this + 9) = 0LL;
*(_OWORD *)this = 0LL;
*((_OWORD *)this + 1) = 0LL;
*((_OWORD *)this + 2) = 0LL;
*((_OWORD *)this + 3) = 0LL;
*((_BYTE *)this + 64) = 0;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)this + 64);
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 *)this + 64);
}
return this;
}
|
do_evaluate:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV R15,RDX
MOV R14,RSI
MOV RBX,RDI
MOV R12,qword ptr [RDX]
ADD R14,0x20
LEA R13,[RSP + 0x8]
MOV RDI,R13
MOV RSI,R14
CALL 0x001425aa
MOV RAX,qword ptr [R12]
LAB_00159d20:
MOV RDI,R12
MOV RSI,R13
CALL qword ptr [RAX + 0x20]
LAB_00159d29:
MOV EBP,EAX
LEA R12,[RSP + 0x48]
MOV RDI,R12
XOR ESI,ESI
CALL 0x0013d970
MOV RDI,R12
CALL 0x0014a5c0
MOV RDI,qword ptr [R12 + -0x8]
TEST RDI,RDI
JZ 0x00159d51
CALL 0x0012f80e
LAB_00159d51:
MOV RDI,qword ptr [RSP + 0x30]
TEST RDI,RDI
JZ 0x00159d60
CALL 0x0012f80e
LAB_00159d60:
MOV RDI,qword ptr [RSP + 0x20]
TEST RDI,RDI
JZ 0x00159d6f
CALL 0x0012f80e
LAB_00159d6f:
MOV RDI,qword ptr [RSP + 0x10]
TEST RDI,RDI
JZ 0x00159da5
MOV RAX,qword ptr [0x001effa0]
CMP byte ptr [RAX],0x0
JZ 0x00159d90
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x00159d9a
LAB_00159d90:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_00159d9a:
CMP EAX,0x1
JNZ 0x00159da5
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_00159da5:
TEST BPL,BPL
JZ 0x00159e3c
MOV R15,qword ptr [R15]
LEA R12,[RSP + 0x8]
MOV RDI,R12
MOV RSI,R14
CALL 0x001425aa
MOV RAX,qword ptr [R15]
LAB_00159dc4:
MOV RDI,R15
MOV RSI,R12
CALL qword ptr [RAX + 0x18]
MOV RDI,RBX
MOV RSI,RAX
CALL 0x0014ed98
LAB_00159dd8:
LEA R14,[RSP + 0x48]
MOV RDI,R14
XOR ESI,ESI
CALL 0x0013d970
MOV RDI,R14
CALL 0x0014a5c0
MOV RDI,qword ptr [R14 + -0x8]
TEST RDI,RDI
JZ 0x00159dfd
CALL 0x0012f80e
LAB_00159dfd:
MOV RDI,qword ptr [RSP + 0x30]
TEST RDI,RDI
JZ 0x00159e0c
CALL 0x0012f80e
LAB_00159e0c:
MOV RDI,qword ptr [RSP + 0x20]
TEST RDI,RDI
JZ 0x00159e1b
CALL 0x0012f80e
LAB_00159e1b:
MOV RDI,qword ptr [RSP + 0x10]
TEST RDI,RDI
JZ 0x00159e8f
MOV RAX,qword ptr [0x001effa0]
CMP byte ptr [RAX],0x0
JZ 0x00159e7a
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x00159e84
LAB_00159e3c:
LEA R14,[RBX + 0x40]
MOV qword ptr [RBX + 0x48],0x0
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
MOVUPS xmmword ptr [RBX + 0x10],XMM0
MOVUPS xmmword ptr [RBX + 0x20],XMM0
MOVUPS xmmword ptr [RBX + 0x30],XMM0
MOV byte ptr [RBX + 0x40],0x0
MOV RDI,R14
MOV ESI,0x1
CALL 0x0013d970
MOV RDI,R14
MOV ESI,0x1
CALL 0x0013d970
JMP 0x00159e8f
LAB_00159e7a:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_00159e84:
CMP EAX,0x1
JNZ 0x00159e8f
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_00159e8f:
MOV RAX,RBX
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* minja::VariableExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const */
shared_ptr * minja::VariableExpr::do_evaluate(shared_ptr *param_1)
{
int *piVar1;
long *plVar2;
char cVar3;
int iVar4;
Value *pVVar5;
int8 *in_RDX;
long in_RSI;
bool bVar6;
Value local_80 [8];
long *local_78;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_68;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_58;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_48;
data local_40 [16];
plVar2 = (long *)*in_RDX;
minja::Value::Value(local_80,(string *)(in_RSI + 0x20));
/* try { // try from 00159d20 to 00159d28 has its CatchHandler @ 00159ea3 */
cVar3 = (**(code **)(*plVar2 + 0x20))(plVar2,local_80);
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(local_40,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(local_40);
if (local_48 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_48);
}
if (local_58 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_58);
}
if (local_68 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_68);
}
if (local_78 != (long *)0x0) {
if (*PTR___libc_single_threaded_001effa0 == '\0') {
LOCK();
piVar1 = (int *)((long)local_78 + 0xc);
iVar4 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar4 = *(int *)((long)local_78 + 0xc);
*(int *)((long)local_78 + 0xc) = iVar4 + -1;
}
if (iVar4 == 1) {
(**(code **)(*local_78 + 0x18))();
}
}
if (cVar3 == '\0') {
bVar6 = (bool)((char)param_1 + '@');
*(int8 *)(param_1 + 0x48) = 0;
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
*(int8 *)(param_1 + 0x10) = 0;
*(int8 *)(param_1 + 0x18) = 0;
*(int8 *)(param_1 + 0x20) = 0;
*(int8 *)(param_1 + 0x28) = 0;
*(int8 *)(param_1 + 0x30) = 0;
*(int8 *)(param_1 + 0x38) = 0;
param_1[0x40] = (shared_ptr)0x0;
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(bVar6);
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(bVar6);
}
else {
plVar2 = (long *)*in_RDX;
minja::Value::Value(local_80,(string *)(in_RSI + 0x20));
/* try { // try from 00159dc4 to 00159dd7 has its CatchHandler @ 00159ea1 */
pVVar5 = (Value *)(**(code **)(*plVar2 + 0x18))(plVar2,local_80);
minja::Value::Value((Value *)param_1,pVVar5);
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(local_40,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(local_40);
if (local_48 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_48);
}
if (local_58 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_58);
}
if (local_68 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_68);
}
if (local_78 != (long *)0x0) {
if (*PTR___libc_single_threaded_001effa0 == '\0') {
LOCK();
piVar1 = (int *)((long)local_78 + 0xc);
iVar4 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar4 = *(int *)((long)local_78 + 0xc);
*(int *)((long)local_78 + 0xc) = iVar4 + -1;
}
if (iVar4 == 1) {
(**(code **)(*local_78 + 0x18))();
}
}
}
return param_1;
}
|
|
14,643
|
ma_sp_make_key
|
eloqsql/storage/maria/ma_sp_key.c
|
MARIA_KEY *_ma_sp_make_key(MARIA_HA *info, MARIA_KEY *ret_key, uint keynr,
uchar *key, const uchar *record, my_off_t filepos,
ulonglong trid)
{
HA_KEYSEG *keyseg;
MARIA_KEYDEF *keyinfo = &info->s->keyinfo[keynr];
uint len = 0;
const uchar *pos;
uint dlen;
uchar *dptr;
double mbr[SPDIMS * 2];
uint i;
DBUG_ENTER("_ma_sp_make_key");
keyseg = &keyinfo->seg[-1];
pos = record + keyseg->start;
ret_key->data= key;
dlen = _ma_calc_blob_length(keyseg->bit_start, pos);
memcpy(&dptr, pos + keyseg->bit_start, sizeof(char*));
if (!dptr)
{
my_errno= HA_ERR_NULL_IN_SPATIAL;
DBUG_RETURN(0);
}
sp_mbr_from_wkb(dptr + 4, dlen - 4, SPDIMS, mbr); /* SRID */
for (i = 0, keyseg = keyinfo->seg; keyseg->type; keyseg++, i++)
{
uint length = keyseg->length, start= keyseg->start;
double val;
DBUG_ASSERT(length == 8);
DBUG_ASSERT(!(start % 8));
DBUG_ASSERT(start < sizeof(mbr));
DBUG_ASSERT(keyseg->type == HA_KEYTYPE_DOUBLE);
val= mbr[start / sizeof (double)];
if (isnan(val))
{
bzero(key, length);
key+= length;
len+= length;
continue;
}
if (keyseg->flag & HA_SWAP_KEY)
{
mi_float8store(key, val);
}
else
{
float8store((uchar *)key, val);
}
key += length;
len+= length;
}
_ma_dpointer(info->s, key, filepos);
ret_key->keyinfo= keyinfo;
ret_key->data_length= len;
ret_key->ref_length= info->s->rec_reflength;
ret_key->flag= 0;
if (_ma_have_versioning(info) && trid)
{
ret_key->ref_length+= transid_store_packed(info,
key + ret_key->ref_length,
trid);
}
DBUG_EXECUTE("key", _ma_print_key(DBUG_FILE, ret_key););
DBUG_RETURN(ret_key);
}
|
O3
|
c
|
ma_sp_make_key:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r9, -0x38(%rbp)
movq %rcx, %r14
movq %rdi, -0x40(%rbp)
movq (%rdi), %rax
movq 0x570(%rax), %rbx
movl %edx, %eax
imulq $0x118, %rax, %r12 # imm = 0x118
movq 0xc0(%rbx,%r12), %r15
movl -0x18(%r15), %r13d
addq %r8, %r13
movq %rsi, -0x48(%rbp)
movq %rcx, (%rsi)
movzbl -0x6(%r15), %edi
movq %r13, %rsi
callq 0x4af3b
movzbl -0x6(%r15), %ecx
movq (%rcx,%r13), %rcx
testq %rcx, %rcx
je 0x79719
addq %r12, %rbx
leaq 0x4(%rcx), %rdx
addl $-0x4, %eax
leaq -0x50(%rbp), %rdi
movq %rdx, (%rdi)
movapd 0x94113(%rip), %xmm0 # 0x10d740
leaq -0x70(%rbp), %rdx
movapd %xmm0, (%rdx)
movapd %xmm0, 0x10(%rdx)
leaq (%rcx,%rax), %rsi
addq $0x4, %rsi
movl $0x1, %ecx
callq 0x7979c
movq 0xc0(%rbx), %r12
cmpb $0x0, 0x18(%r12)
movq %rbx, -0x30(%rbp)
je 0x79728
addq $0x8, %r12
xorl %r15d, %r15d
movzwl 0xc(%r12), %ebx
movl (%r12), %eax
andl $-0x8, %eax
movsd -0x70(%rbp,%rax), %xmm0
ucomisd %xmm0, %xmm0
jp 0x79707
testb $0x40, 0xa(%r12)
jne 0x79696
movsd %xmm0, (%r14)
jmp 0x796eb
movq %xmm0, %rax
movq %rax, %rcx
shrq $0x38, %rcx
movq %rax, %rdx
shrq $0x30, %rdx
movq %rax, %rsi
shrq $0x28, %rsi
movq %rax, %rdi
shrq $0x20, %rdi
movl %eax, %r8d
shrl $0x18, %r8d
movl %eax, %r9d
shrl $0x10, %r9d
movl %eax, %r10d
shrl $0x8, %r10d
movb %cl, (%r14)
movb %dl, 0x1(%r14)
movb %sil, 0x2(%r14)
movb %dil, 0x3(%r14)
movb %r8b, 0x4(%r14)
movb %r9b, 0x5(%r14)
movb %r10b, 0x6(%r14)
movb %al, 0x7(%r14)
movq %rbx, %r13
addq %r13, %r14
addl %ebx, %r15d
cmpb $0x0, 0x30(%r12)
leaq 0x20(%r12), %r12
jne 0x7966a
jmp 0x7972b
movl %ebx, %r13d
movq %r14, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x2b2f0
jmp 0x796ee
callq 0xc5c9a
movl $0x9e, (%rax)
xorl %ebx, %ebx
jmp 0x7978a
xorl %r15d, %r15d
movq -0x40(%rbp), %r12
movq (%r12), %rdi
movq %r14, %rsi
movq -0x38(%rbp), %rdx
callq 0x3f150
movq -0x48(%rbp), %rbx
movq -0x30(%rbp), %rax
movq %rax, 0x8(%rbx)
movl %r15d, 0x10(%rbx)
movq (%r12), %rax
movl 0x740(%rax), %eax
movl %eax, 0x14(%rbx)
movl $0x0, 0x18(%rbx)
movq 0x10(%rbp), %rdx
testq %rdx, %rdx
je 0x7978a
movl 0x618(%r12), %ecx
andl $0x1, %ecx
je 0x7978a
addq %rax, %r14
movq %r12, %rdi
movq %r14, %rsi
callq 0x42e70
addl %eax, 0x14(%rbx)
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
_ma_sp_make_key:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov [rbp+var_38], r9
mov r14, rcx
mov [rbp+var_40], rdi
mov rax, [rdi]
mov rbx, [rax+570h]
mov eax, edx
imul r12, rax, 118h
mov r15, [rbx+r12+0C0h]
mov r13d, [r15-18h]
add r13, r8
mov [rbp+var_48], rsi
mov [rsi], rcx
movzx edi, byte ptr [r15-6]
mov rsi, r13
call _ma_calc_blob_length
movzx ecx, byte ptr [r15-6]
mov rcx, [rcx+r13]
test rcx, rcx
jz loc_79719
add rbx, r12
lea rdx, [rcx+4]
add eax, 0FFFFFFFCh
lea rdi, [rbp+var_50]
mov [rdi], rdx
movapd xmm0, cs:xmmword_10D740
lea rdx, [rbp+var_70]
movapd xmmword ptr [rdx], xmm0
movapd xmmword ptr [rdx+10h], xmm0
lea rsi, [rcx+rax]
add rsi, 4
mov ecx, 1
call sp_get_geometry_mbr
mov r12, [rbx+0C0h]
cmp byte ptr [r12+18h], 0
mov [rbp+var_30], rbx
jz loc_79728
add r12, 8
xor r15d, r15d
loc_7966A:
movzx ebx, word ptr [r12+0Ch]
mov eax, [r12]
and eax, 0FFFFFFF8h
movsd xmm0, [rbp+rax+var_70]
ucomisd xmm0, xmm0
jp loc_79707
test byte ptr [r12+0Ah], 40h
jnz short loc_79696
movsd qword ptr [r14], xmm0
jmp short loc_796EB
loc_79696:
movq rax, xmm0
mov rcx, rax
shr rcx, 38h
mov rdx, rax
shr rdx, 30h
mov rsi, rax
shr rsi, 28h
mov rdi, rax
shr rdi, 20h
mov r8d, eax
shr r8d, 18h
mov r9d, eax
shr r9d, 10h
mov r10d, eax
shr r10d, 8
mov [r14], cl
mov [r14+1], dl
mov [r14+2], sil
mov [r14+3], dil
mov [r14+4], r8b
mov [r14+5], r9b
mov [r14+6], r10b
mov [r14+7], al
loc_796EB:
mov r13, rbx
loc_796EE:
add r14, r13
add r15d, ebx
cmp byte ptr [r12+30h], 0
lea r12, [r12+20h]
jnz loc_7966A
jmp short loc_7972B
loc_79707:
mov r13d, ebx
mov rdi, r14
xor esi, esi
mov rdx, r13
call _memset
jmp short loc_796EE
loc_79719:
call _my_thread_var
mov dword ptr [rax], 9Eh
xor ebx, ebx
jmp short loc_7978A
loc_79728:
xor r15d, r15d
loc_7972B:
mov r12, [rbp+var_40]
mov rdi, [r12]
mov rsi, r14
mov rdx, [rbp+var_38]
call _ma_dpointer
mov rbx, [rbp+var_48]
mov rax, [rbp+var_30]
mov [rbx+8], rax
mov [rbx+10h], r15d
mov rax, [r12]
mov eax, [rax+740h]
mov [rbx+14h], eax
mov dword ptr [rbx+18h], 0
mov rdx, [rbp+arg_0]
test rdx, rdx
jz short loc_7978A
mov ecx, [r12+618h]
and ecx, 1
jz short loc_7978A
add r14, rax
mov rdi, r12
mov rsi, r14
call transid_store_packed
add [rbx+14h], eax
loc_7978A:
mov rax, rbx
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
_QWORD * ma_sp_make_key(
long long *a1,
_QWORD *a2,
unsigned int a3,
_BYTE *a4,
long long a5,
long long a6,
long long a7)
{
_BYTE *v7; // r14
long long v8; // rbx
long long v9; // r12
long long v10; // r15
unsigned __int8 *v11; // r13
long long v12; // rdi
int v13; // eax
long long v14; // rcx
long long v15; // rbx
long long v16; // r12
bool v17; // zf
long long v18; // r12
int v19; // r15d
long long v20; // rbx
long long v21; // xmm0_8
_QWORD *v22; // rbx
long long *v23; // r12
long long v24; // rax
_OWORD v26[2]; // [rsp+0h] [rbp-70h] BYREF
long long v27; // [rsp+20h] [rbp-50h] BYREF
_QWORD *v28; // [rsp+28h] [rbp-48h]
long long *v29; // [rsp+30h] [rbp-40h]
long long v30; // [rsp+38h] [rbp-38h]
long long v31; // [rsp+40h] [rbp-30h]
v30 = a6;
v7 = a4;
v29 = a1;
v8 = *(_QWORD *)(*a1 + 1392);
v9 = 280LL * a3;
v10 = *(_QWORD *)(v8 + v9 + 192);
v11 = (unsigned __int8 *)(a5 + *(unsigned int *)(v10 - 24));
v28 = a2;
*a2 = a4;
v12 = *(unsigned __int8 *)(v10 - 6);
v13 = ma_calc_blob_length(v12, v11);
v14 = *(_QWORD *)&v11[*(unsigned __int8 *)(v10 - 6)];
if ( v14 )
{
v15 = v9 + v8;
v27 = v14 + 4;
v26[0] = xmmword_10D740;
v26[1] = xmmword_10D740;
((void ( *)(long long *, long long, _OWORD *, long long))sp_get_geometry_mbr)(
&v27,
v14 + (unsigned int)(v13 - 4) + 4,
v26,
1LL);
v16 = *(_QWORD *)(v15 + 192);
v17 = *(_BYTE *)(v16 + 24) == 0;
v31 = v15;
if ( v17 )
{
v19 = 0;
}
else
{
v18 = v16 + 8;
v19 = 0;
do
{
v20 = *(unsigned __int16 *)(v18 + 12);
v21 = *(_QWORD *)((char *)v26 + (*(_DWORD *)v18 & 0xFFFFFFF8));
if ( (*(_BYTE *)(v18 + 10) & 0x40) != 0 )
{
*v7 = HIBYTE(v21);
v7[1] = BYTE6(v21);
v7[2] = BYTE5(v21);
v7[3] = BYTE4(v21);
v7[4] = BYTE3(v21);
v7[5] = BYTE2(v21);
v7[6] = BYTE1(v21);
v7[7] = v21;
}
else
{
*(_QWORD *)v7 = v21;
}
v7 += v20;
v19 += v20;
v17 = *(_BYTE *)(v18 + 48) == 0;
v18 += 32LL;
}
while ( !v17 );
}
v23 = v29;
ma_dpointer(*v29, (long long)v7, v30);
v22 = v28;
v28[1] = v31;
*((_DWORD *)v22 + 4) = v19;
v24 = *(unsigned int *)(*v23 + 1856);
*(_QWORD *)((char *)v22 + 20) = (unsigned int)v24;
if ( a7 && (v23[195] & 1) != 0 )
*((_DWORD *)v22 + 5) += transid_store_packed((long long)v23, &v7[v24], a7);
}
else
{
*(_DWORD *)my_thread_var(v12) = 158;
return 0LL;
}
return v22;
}
|
_ma_sp_make_key:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RBP + -0x38],R9
MOV R14,RCX
MOV qword ptr [RBP + -0x40],RDI
MOV RAX,qword ptr [RDI]
MOV RBX,qword ptr [RAX + 0x570]
MOV EAX,EDX
IMUL R12,RAX,0x118
MOV R15,qword ptr [RBX + R12*0x1 + 0xc0]
MOV R13D,dword ptr [R15 + -0x18]
ADD R13,R8
MOV qword ptr [RBP + -0x48],RSI
MOV qword ptr [RSI],RCX
MOVZX EDI,byte ptr [R15 + -0x6]
MOV RSI,R13
CALL 0x0014af3b
MOVZX ECX,byte ptr [R15 + -0x6]
MOV RCX,qword ptr [RCX + R13*0x1]
TEST RCX,RCX
JZ 0x00179719
ADD RBX,R12
LEA RDX,[RCX + 0x4]
ADD EAX,-0x4
LEA RDI,[RBP + -0x50]
MOV qword ptr [RDI],RDX
MOVAPD XMM0,xmmword ptr [0x0020d740]
LEA RDX,[RBP + -0x70]
MOVAPD xmmword ptr [RDX],XMM0
MOVAPD xmmword ptr [RDX + 0x10],XMM0
LEA RSI,[RCX + RAX*0x1]
ADD RSI,0x4
MOV ECX,0x1
CALL 0x0017979c
MOV R12,qword ptr [RBX + 0xc0]
CMP byte ptr [R12 + 0x18],0x0
MOV qword ptr [RBP + -0x30],RBX
JZ 0x00179728
ADD R12,0x8
XOR R15D,R15D
LAB_0017966a:
MOVZX EBX,word ptr [R12 + 0xc]
MOV EAX,dword ptr [R12]
AND EAX,0xfffffff8
MOVSD XMM0,qword ptr [RBP + RAX*0x1 + -0x70]
UCOMISD XMM0,XMM0
JP 0x00179707
TEST byte ptr [R12 + 0xa],0x40
JNZ 0x00179696
MOVSD qword ptr [R14],XMM0
JMP 0x001796eb
LAB_00179696:
MOVQ RAX,XMM0
MOV RCX,RAX
SHR RCX,0x38
MOV RDX,RAX
SHR RDX,0x30
MOV RSI,RAX
SHR RSI,0x28
MOV RDI,RAX
SHR RDI,0x20
MOV R8D,EAX
SHR R8D,0x18
MOV R9D,EAX
SHR R9D,0x10
MOV R10D,EAX
SHR R10D,0x8
MOV byte ptr [R14],CL
MOV byte ptr [R14 + 0x1],DL
MOV byte ptr [R14 + 0x2],SIL
MOV byte ptr [R14 + 0x3],DIL
MOV byte ptr [R14 + 0x4],R8B
MOV byte ptr [R14 + 0x5],R9B
MOV byte ptr [R14 + 0x6],R10B
MOV byte ptr [R14 + 0x7],AL
LAB_001796eb:
MOV R13,RBX
LAB_001796ee:
ADD R14,R13
ADD R15D,EBX
CMP byte ptr [R12 + 0x30],0x0
LEA R12,[R12 + 0x20]
JNZ 0x0017966a
JMP 0x0017972b
LAB_00179707:
MOV R13D,EBX
MOV RDI,R14
XOR ESI,ESI
MOV RDX,R13
CALL 0x0012b2f0
JMP 0x001796ee
LAB_00179719:
CALL 0x001c5c9a
MOV dword ptr [RAX],0x9e
XOR EBX,EBX
JMP 0x0017978a
LAB_00179728:
XOR R15D,R15D
LAB_0017972b:
MOV R12,qword ptr [RBP + -0x40]
MOV RDI,qword ptr [R12]
MOV RSI,R14
MOV RDX,qword ptr [RBP + -0x38]
CALL 0x0013f150
MOV RBX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBX + 0x8],RAX
MOV dword ptr [RBX + 0x10],R15D
MOV RAX,qword ptr [R12]
MOV EAX,dword ptr [RAX + 0x740]
MOV dword ptr [RBX + 0x14],EAX
MOV dword ptr [RBX + 0x18],0x0
MOV RDX,qword ptr [RBP + 0x10]
TEST RDX,RDX
JZ 0x0017978a
MOV ECX,dword ptr [R12 + 0x618]
AND ECX,0x1
JZ 0x0017978a
ADD R14,RAX
MOV RDI,R12
MOV RSI,R14
CALL 0x00142e70
ADD dword ptr [RBX + 0x14],EAX
LAB_0017978a:
MOV RAX,RBX
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int8 *
_ma_sp_make_key(long *param_1,int8 *param_2,ulong param_3,double *param_4,long param_5,
int8 param_6,long param_7)
{
uint *puVar1;
double dVar2;
ushort uVar3;
uint uVar4;
long lVar5;
long *plVar6;
int4 *puVar7;
long lVar8;
int8 *puVar9;
long lVar10;
uint *puVar11;
int iVar12;
double local_78 [4];
long local_58;
int8 *local_50;
long *local_48;
int8 local_40;
long local_38;
lVar8 = *(long *)(*param_1 + 0x570);
lVar10 = (param_3 & 0xffffffff) * 0x118;
lVar5 = *(long *)(lVar8 + 0xc0 + lVar10);
param_5 = (ulong)*(uint *)(lVar5 + -0x18) + param_5;
*param_2 = param_4;
local_50 = param_2;
local_48 = param_1;
local_40 = param_6;
_ma_calc_blob_length(*(int1 *)(lVar5 + -6),param_5);
local_58 = *(long *)((ulong)*(byte *)(lVar5 + -6) + param_5);
if (local_58 == 0) {
puVar7 = (int4 *)_my_thread_var();
*puVar7 = 0x9e;
puVar9 = (int8 *)0x0;
}
else {
lVar8 = lVar8 + lVar10;
local_58 = local_58 + 4;
local_78[0] = _DAT_0020d740;
local_78[1] = (double)_UNK_0020d748;
local_78[2] = _DAT_0020d740;
local_78[3] = (double)_UNK_0020d748;
sp_get_geometry_mbr();
lVar5 = *(long *)(lVar8 + 0xc0);
local_38 = lVar8;
if (*(char *)(lVar5 + 0x18) == '\0') {
iVar12 = 0;
}
else {
puVar11 = (uint *)(lVar5 + 8);
iVar12 = 0;
do {
uVar3 = (ushort)puVar11[3];
dVar2 = *(double *)((long)local_78 + (ulong)(*puVar11 & 0xfffffff8));
if (NAN(dVar2)) {
memset(param_4,0,(ulong)uVar3);
}
else if ((*(byte *)((long)puVar11 + 10) & 0x40) == 0) {
*param_4 = dVar2;
}
else {
*(char *)param_4 = (char)((ulong)dVar2 >> 0x38);
*(char *)((long)param_4 + 1) = (char)((ulong)dVar2 >> 0x30);
*(char *)((long)param_4 + 2) = (char)((ulong)dVar2 >> 0x28);
*(char *)((long)param_4 + 3) = (char)((ulong)dVar2 >> 0x20);
*(char *)((long)param_4 + 4) = (char)((ulong)dVar2 >> 0x18);
*(char *)((long)param_4 + 5) = (char)((ulong)dVar2 >> 0x10);
*(char *)((long)param_4 + 6) = (char)((ulong)dVar2 >> 8);
*(char *)((long)param_4 + 7) = SUB81(dVar2,0);
}
param_4 = (double *)((long)param_4 + (ulong)uVar3);
iVar12 = iVar12 + (uint)uVar3;
puVar1 = puVar11 + 0xc;
puVar11 = puVar11 + 8;
} while ((char)*puVar1 != '\0');
}
plVar6 = local_48;
_ma_dpointer(*local_48,param_4,local_40);
puVar9 = local_50;
local_50[1] = local_38;
*(int *)(local_50 + 2) = iVar12;
uVar4 = *(uint *)(*plVar6 + 0x740);
*(uint *)((long)local_50 + 0x14) = uVar4;
*(int4 *)(local_50 + 3) = 0;
if ((param_7 != 0) && ((*(uint *)(plVar6 + 0xc3) & 1) != 0)) {
iVar12 = transid_store_packed(plVar6,(long)param_4 + (ulong)uVar4);
*(int *)((long)puVar9 + 0x14) = *(int *)((long)puVar9 + 0x14) + iVar12;
}
}
return puVar9;
}
|
|
14,644
|
my_is_printable
|
eloqsql/strings/ctype.c
|
static inline my_bool
my_is_printable(my_wc_t wc)
{
/*
Blocks:
U+0000 .. U+001F control
U+0020 .. U+007E printable
U+007F .. U+009F control
U+00A0 .. U+00FF printable
U+0100 .. U+10FFFF As of Unicode-6.1.0, this range does not have any
characters of the "Cc" (Other, control) category.
Should be mostly safe to print.
Except for the surrogate halfs,
which are encoding components, not real characters.
*/
if (wc >= 0x20 && wc <= 0x7E) /* Quickly detect ASCII printable */
return TRUE;
if (wc <= 0x9F) /* The rest of U+0000..U+009F are control characters */
{
/* NL, CR, TAB are Ok */
return (wc == '\r' || wc == '\n' || wc == '\t');
}
/*
Surrogate halfs (when alone) print badly in terminals:
SELECT _ucs2 0xD800;
Let's escape them as well.
*/
if (wc >= 0xD800 && wc <= 0xDFFF)
return FALSE;
return TRUE;
}
|
O0
|
c
|
my_is_printable:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
cmpq $0x20, -0x10(%rbp)
jb 0x6c64c
cmpq $0x7e, -0x10(%rbp)
ja 0x6c64c
movb $0x1, -0x1(%rbp)
jmp 0x6c6a4
cmpq $0x9f, -0x10(%rbp)
ja 0x6c686
movb $0x1, %al
cmpq $0xd, -0x10(%rbp)
movb %al, -0x11(%rbp)
je 0x6c679
movb $0x1, %al
cmpq $0xa, -0x10(%rbp)
movb %al, -0x11(%rbp)
je 0x6c679
cmpq $0x9, -0x10(%rbp)
sete %al
movb %al, -0x11(%rbp)
movb -0x11(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x1(%rbp)
jmp 0x6c6a4
cmpq $0xd800, -0x10(%rbp) # imm = 0xD800
jb 0x6c6a0
cmpq $0xdfff, -0x10(%rbp) # imm = 0xDFFF
ja 0x6c6a0
movb $0x0, -0x1(%rbp)
jmp 0x6c6a4
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
popq %rbp
retq
nopl (%rax)
|
my_is_printable:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
cmp [rbp+var_10], 20h ; ' '
jb short loc_6C64C
cmp [rbp+var_10], 7Eh ; '~'
ja short loc_6C64C
mov [rbp+var_1], 1
jmp short loc_6C6A4
loc_6C64C:
cmp [rbp+var_10], 9Fh
ja short loc_6C686
mov al, 1
cmp [rbp+var_10], 0Dh
mov [rbp+var_11], al
jz short loc_6C679
mov al, 1
cmp [rbp+var_10], 0Ah
mov [rbp+var_11], al
jz short loc_6C679
cmp [rbp+var_10], 9
setz al
mov [rbp+var_11], al
loc_6C679:
mov al, [rbp+var_11]
and al, 1
movzx eax, al
mov [rbp+var_1], al
jmp short loc_6C6A4
loc_6C686:
cmp [rbp+var_10], 0D800h
jb short loc_6C6A0
cmp [rbp+var_10], 0DFFFh
ja short loc_6C6A0
mov [rbp+var_1], 0
jmp short loc_6C6A4
loc_6C6A0:
mov [rbp+var_1], 1
loc_6C6A4:
mov al, [rbp+var_1]
pop rbp
retn
|
bool my_is_printable(unsigned long long a1)
{
bool v2; // [rsp+1h] [rbp-11h]
if ( a1 >= 0x20 && a1 <= 0x7E )
return 1;
if ( a1 > 0x9F )
return a1 < 0xD800 || a1 > 0xDFFF;
v2 = 1;
if ( a1 != 13 )
{
v2 = 1;
if ( a1 != 10 )
return a1 == 9;
}
return v2;
}
|
my_is_printable:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
CMP qword ptr [RBP + -0x10],0x20
JC 0x0016c64c
CMP qword ptr [RBP + -0x10],0x7e
JA 0x0016c64c
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0016c6a4
LAB_0016c64c:
CMP qword ptr [RBP + -0x10],0x9f
JA 0x0016c686
MOV AL,0x1
CMP qword ptr [RBP + -0x10],0xd
MOV byte ptr [RBP + -0x11],AL
JZ 0x0016c679
MOV AL,0x1
CMP qword ptr [RBP + -0x10],0xa
MOV byte ptr [RBP + -0x11],AL
JZ 0x0016c679
CMP qword ptr [RBP + -0x10],0x9
SETZ AL
MOV byte ptr [RBP + -0x11],AL
LAB_0016c679:
MOV AL,byte ptr [RBP + -0x11]
AND AL,0x1
MOVZX EAX,AL
MOV byte ptr [RBP + -0x1],AL
JMP 0x0016c6a4
LAB_0016c686:
CMP qword ptr [RBP + -0x10],0xd800
JC 0x0016c6a0
CMP qword ptr [RBP + -0x10],0xdfff
JA 0x0016c6a0
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0016c6a4
LAB_0016c6a0:
MOV byte ptr [RBP + -0x1],0x1
LAB_0016c6a4:
MOV AL,byte ptr [RBP + -0x1]
POP RBP
RET
|
bool my_is_printable(ulong param_1)
{
int1 local_19;
int1 local_9;
if ((param_1 < 0x20) || (0x7e < param_1)) {
if (param_1 < 0xa0) {
local_19 = true;
if ((param_1 != 0xd) && (local_19 = true, param_1 != 10)) {
local_19 = param_1 == 9;
}
local_9 = local_19;
}
else if ((param_1 < 0xd800) || (0xdfff < param_1)) {
local_9 = true;
}
else {
local_9 = false;
}
}
else {
local_9 = true;
}
return local_9;
}
|
|
14,645
|
testing::internal::Int32FromGTestEnv(char const*, int)
|
giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest-port.cc
|
int32_t Int32FromGTestEnv(const char* flag, int32_t default_value) {
#if defined(GTEST_GET_INT32_FROM_ENV_)
return GTEST_GET_INT32_FROM_ENV_(flag, default_value);
#else
const std::string env_var = FlagToEnvVar(flag);
const char* const string_value = posix::GetEnv(env_var.c_str());
if (string_value == nullptr) {
// The environment variable is not set.
return default_value;
}
int32_t result = default_value;
if (!ParseInt32(Message() << "Environment variable " << env_var, string_value,
&result)) {
printf("The default value %s is used.\n",
(Message() << default_value).GetString().c_str());
fflush(stdout);
return default_value;
}
return result;
#endif // defined(GTEST_GET_INT32_FROM_ENV_)
}
|
O1
|
cpp
|
testing::internal::Int32FromGTestEnv(char const*, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movl %esi, %ebx
movq %rdi, %rsi
leaq 0x30(%rsp), %r14
movq %r14, %rdi
callq 0x175a5
movq (%r14), %rdi
callq 0x8660
testq %rax, %rax
je 0x17828
movq %rax, %r15
movl %ebx, 0x4(%rsp)
leaq 0x10(%rsp), %rdi
callq 0x1cd64
movq 0x10(%rsp), %r14
leaq 0x10(%r14), %r12
leaq 0x2ad74(%rip), %rsi # 0x424df
movl $0x15, %edx
movq %r12, %rdi
callq 0x85b0
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq %r12, %rdi
callq 0x85b0
leaq 0x10(%rsp), %rdi
leaq 0x4(%rsp), %rdx
movq %r15, %rsi
callq 0x17310
movl %eax, %ebp
testq %r14, %r14
je 0x177ac
movq (%r14), %rax
movq %r14, %rdi
callq *0x8(%rax)
testb %bpl, %bpl
je 0x177b7
movl 0x4(%rsp), %ebx
jmp 0x17828
leaq 0x8(%rsp), %rdi
callq 0x1cd64
movq 0x8(%rsp), %r14
leaq 0x10(%r14), %rdi
movl %ebx, %esi
callq 0x8950
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x1cfc7
leaq 0x20(%rsp), %r15
movq -0x10(%r15), %rsi
leaq 0x2ad07(%rip), %rdi # 0x424f5
xorl %eax, %eax
callq 0x8080
movq -0x10(%r15), %rdi
cmpq %r15, %rdi
je 0x1780b
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x84e0
testq %r14, %r14
je 0x17819
movq (%r14), %rax
movq %r14, %rdi
callq *0x8(%rax)
movq 0x41760(%rip), %rax # 0x58f80
movq (%rax), %rdi
callq 0x8600
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x17843
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x84e0
movl %ebx, %eax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x17870
movq %rax, %rbx
testq %r14, %r14
je 0x17865
movq (%r14), %rax
movq %r14, %rdi
callq *0x8(%rax)
movq $0x0, 0x8(%rsp)
jmp 0x1788f
movq %rax, %rbx
jmp 0x1788f
movq %rax, %rbx
testq %r14, %r14
je 0x17886
movq (%r14), %rax
movq %r14, %rdi
callq *0x8(%rax)
movq $0x0, 0x10(%rsp)
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x178aa
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x84e0
movq %rbx, %rdi
callq 0x8990
|
_ZN7testing8internal17Int32FromGTestEnvEPKci:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 50h
mov ebx, esi
mov rsi, rdi
lea r14, [rsp+78h+var_48]
mov rdi, r14
call _ZN7testing8internalL12FlagToEnvVarB5cxx11EPKc; testing::internal::FlagToEnvVar(char const*)
mov rdi, [r14]
call _getenv
test rax, rax
jz loc_17828
mov r15, rax
mov dword ptr [rsp+78h+var_74], ebx
lea rdi, [rsp+78h+var_68]; this
call _ZN7testing7MessageC2Ev; testing::Message::Message(void)
mov r14, [rsp+78h+var_68]
lea r12, [r14+10h]
lea rsi, aEnvironmentVar; "Environment variable "
mov edx, 15h
mov rdi, r12
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rsi, [rsp+78h+var_48]
mov rdx, [rsp+78h+var_40]
mov rdi, r12
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rdi, [rsp+78h+var_68]; this
lea rdx, [rsp+78h+var_74]; char *
mov rsi, r15; testing::Message *
call _ZN7testing8internal10ParseInt32ERKNS_7MessageEPKcPi; testing::internal::ParseInt32(testing::Message const&,char const*,int *)
mov ebp, eax
test r14, r14
jz short loc_177AC
mov rax, [r14]
mov rdi, r14
call qword ptr [rax+8]
loc_177AC:
test bpl, bpl
jz short loc_177B7
mov ebx, dword ptr [rsp+78h+var_74]
jmp short loc_17828
loc_177B7:
lea rdi, [rsp+78h+var_70]; this
call _ZN7testing7MessageC2Ev; testing::Message::Message(void)
mov r14, [rsp+78h+var_70]
lea rdi, [r14+10h]
mov esi, ebx
call __ZNSolsEi; std::ostream::operator<<(int)
lea rdi, [rsp+78h+var_68]
mov rsi, r14
call _ZN7testing8internal20StringStreamToStringEPNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE; testing::internal::StringStreamToString(std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>> *)
lea r15, [rsp+78h+var_58]
mov rsi, [r15-10h]
lea rdi, aTheDefaultValu; "The default value %s is used.\n"
xor eax, eax
call _printf
mov rdi, [r15-10h]; void *
cmp rdi, r15
jz short loc_1780B
mov rsi, [rsp+78h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1780B:
test r14, r14
jz short loc_17819
mov rax, [r14]
mov rdi, r14
call qword ptr [rax+8]
loc_17819:
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
loc_17828:
lea rax, [rsp+78h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_17843
mov rsi, [rsp+78h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_17843:
mov eax, ebx
add rsp, 50h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
jmp short loc_17870
mov rbx, rax
test r14, r14
jz short loc_17865
mov rax, [r14]
mov rdi, r14
call qword ptr [rax+8]
loc_17865:
mov [rsp+arg_0], 0
jmp short loc_1788F
loc_17870:
mov rbx, rax
jmp short loc_1788F
mov rbx, rax
test r14, r14
jz short loc_17886
mov rax, [r14]
mov rdi, r14
call qword ptr [rax+8]
loc_17886:
mov [rsp+arg_8], 0
loc_1788F:
lea rax, [rsp+arg_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_178AA
mov rsi, [rsp+arg_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_178AA:
mov rdi, rbx
call __Unwind_Resume
|
long long testing::internal::Int32FromGTestEnv(testing::internal *this, const char *a2)
{
unsigned int v2; // ebx
long long v3; // rax
const testing::Message *v4; // r15
void *v5; // r14
char *v6; // r12
int *v7; // rcx
char v8; // bp
long long v9; // r14
int v10; // edx
int v11; // ecx
int v12; // r8d
int v13; // r9d
char v15[4]; // [rsp+4h] [rbp-74h] BYREF
long long v16; // [rsp+8h] [rbp-70h] BYREF
void *v17[2]; // [rsp+10h] [rbp-68h] BYREF
long long v18; // [rsp+20h] [rbp-58h] BYREF
void *v19[2]; // [rsp+30h] [rbp-48h] BYREF
long long v20; // [rsp+40h] [rbp-38h] BYREF
v2 = (unsigned int)a2;
testing::internal::FlagToEnvVar[abi:cxx11]((long long)v19, (const char *)this);
v3 = getenv(v19[0]);
if ( v3 )
{
v4 = (const testing::Message *)v3;
*(_DWORD *)v15 = (_DWORD)a2;
testing::Message::Message((testing::Message *)v17);
v5 = v17[0];
v6 = (char *)v17[0] + 16;
std::__ostream_insert<char,std::char_traits<char>>((char *)v17[0] + 16, "Environment variable ", 21LL);
std::__ostream_insert<char,std::char_traits<char>>(v6, v19[0], v19[1]);
v8 = testing::internal::ParseInt32((testing::internal *)v17, v4, v15, v7);
if ( v5 )
(*(void ( **)(void *))(*(_QWORD *)v5 + 8LL))(v5);
if ( v8 )
{
v2 = *(_DWORD *)v15;
}
else
{
testing::Message::Message((testing::Message *)&v16);
v9 = v16;
std::ostream::operator<<(v16 + 16, (unsigned int)a2);
testing::internal::StringStreamToString((unsigned int)v17, v9, v10, v11, v12, v13);
printf("The default value %s is used.\n", (const char *)v17[0]);
if ( v17[0] != &v18 )
operator delete(v17[0], v18 + 1);
if ( v9 )
(*(void ( **)(long long))(*(_QWORD *)v9 + 8LL))(v9);
fflush(stdout);
}
}
if ( v19[0] != &v20 )
operator delete(v19[0], v20 + 1);
return v2;
}
|
Int32FromGTestEnv:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x50
MOV EBX,ESI
MOV RSI,RDI
LEA R14,[RSP + 0x30]
MOV RDI,R14
CALL 0x001175a5
MOV RDI,qword ptr [R14]
CALL 0x00108660
TEST RAX,RAX
JZ 0x00117828
MOV R15,RAX
MOV dword ptr [RSP + 0x4],EBX
LAB_00117751:
LEA RDI,[RSP + 0x10]
CALL 0x0011cd64
MOV R14,qword ptr [RSP + 0x10]
LEA R12,[R14 + 0x10]
LAB_00117764:
LEA RSI,[0x1424df]
MOV EDX,0x15
MOV RDI,R12
CALL 0x001085b0
MOV RSI,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RSP + 0x38]
MOV RDI,R12
CALL 0x001085b0
LEA RDI,[RSP + 0x10]
LEA RDX,[RSP + 0x4]
MOV RSI,R15
CALL 0x00117310
LAB_0011779c:
MOV EBP,EAX
TEST R14,R14
JZ 0x001177ac
MOV RAX,qword ptr [R14]
MOV RDI,R14
CALL qword ptr [RAX + 0x8]
LAB_001177ac:
TEST BPL,BPL
JZ 0x001177b7
MOV EBX,dword ptr [RSP + 0x4]
JMP 0x00117828
LAB_001177b7:
LEA RDI,[RSP + 0x8]
CALL 0x0011cd64
MOV R14,qword ptr [RSP + 0x8]
LEA RDI,[R14 + 0x10]
LAB_001177ca:
MOV ESI,EBX
CALL 0x00108950
LEA RDI,[RSP + 0x10]
MOV RSI,R14
CALL 0x0011cfc7
LAB_001177de:
LEA R15,[RSP + 0x20]
MOV RSI,qword ptr [R15 + -0x10]
LEA RDI,[0x1424f5]
XOR EAX,EAX
CALL 0x00108080
MOV RDI,qword ptr [R15 + -0x10]
CMP RDI,R15
JZ 0x0011780b
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x001084e0
LAB_0011780b:
TEST R14,R14
JZ 0x00117819
MOV RAX,qword ptr [R14]
MOV RDI,R14
CALL qword ptr [RAX + 0x8]
LAB_00117819:
MOV RAX,qword ptr [0x00158f80]
MOV RDI,qword ptr [RAX]
CALL 0x00108600
LAB_00117828:
LEA RAX,[RSP + 0x40]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00117843
MOV RSI,qword ptr [RSP + 0x40]
INC RSI
CALL 0x001084e0
LAB_00117843:
MOV EAX,EBX
ADD RSP,0x50
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* testing::internal::Int32FromGTestEnv(char const*, int) */
int testing::internal::Int32FromGTestEnv(char *param_1,int param_2)
{
ostream *poVar1;
long *plVar2;
char cVar3;
char *pcVar4;
int iVar5;
int local_74;
long *local_70;
long *local_68 [2];
long local_58 [2];
long *local_48;
long local_40;
long local_38 [2];
FlagToEnvVar_abi_cxx11_((internal *)&local_48,param_1);
pcVar4 = getenv((char *)local_48);
iVar5 = param_2;
if (pcVar4 != (char *)0x0) {
/* try { // try from 00117751 to 0011775a has its CatchHandler @ 00117870 */
local_74 = param_2;
Message::Message((Message *)local_68);
plVar2 = local_68[0];
poVar1 = (ostream *)(local_68[0] + 2);
/* try { // try from 00117764 to 0011779b has its CatchHandler @ 00117875 */
std::__ostream_insert<char,std::char_traits<char>>(poVar1,"Environment variable ",0x15);
std::__ostream_insert<char,std::char_traits<char>>(poVar1,(char *)local_48,local_40);
cVar3 = ParseInt32((Message *)local_68,pcVar4,&local_74);
if (plVar2 != (long *)0x0) {
(**(code **)(*plVar2 + 8))(plVar2);
}
iVar5 = local_74;
if (cVar3 == '\0') {
/* try { // try from 001177b7 to 001177c0 has its CatchHandler @ 00117852 */
Message::Message((Message *)&local_70);
/* try { // try from 001177ca to 001177dd has its CatchHandler @ 00117854 */
std::ostream::operator<<((ostream *)(local_70 + 2),param_2);
StringStreamToString((stringstream *)local_68);
printf("The default value %s is used.\n",local_68[0]);
if (local_68[0] != local_58) {
operator_delete(local_68[0],local_58[0] + 1);
}
if (local_70 != (long *)0x0) {
(**(code **)(*local_70 + 8))(local_70);
}
fflush(*(FILE **)PTR_stdout_00158f80);
iVar5 = param_2;
}
}
if (local_48 != local_38) {
operator_delete(local_48,local_38[0] + 1);
}
return iVar5;
}
|
|
14,646
|
ma_hashtbl_init
|
eloqsql/libmariadb/libmariadb/ma_hashtbl.c
|
my_bool _ma_hashtbl_init(MA_HASHTBL *hash,uint size,uint key_offset,uint key_length,
hash_get_key get_key,
void (*free_element)(void*),uint flags CALLER_INFO_PROTO)
{
hash->records=0;
if (ma_init_dynamic_array_ci(&hash->array,sizeof(MA_HASHTBL_LINK),size,0))
{
hash->free=0; /* Allow call to hash_free */
return(TRUE);
}
hash->key_offset=key_offset;
hash->key_length=key_length;
hash->blength=1;
hash->current_record= NO_RECORD; /* For the future */
hash->get_key=get_key;
hash->free=free_element;
hash->flags=flags;
if (flags & MA_HASHTBL_CASE_INSENSITIVE)
hash->calc_hashnr=calc_hashnr_caseup;
else
hash->calc_hashnr=calc_hashnr;
return(0);
}
|
O3
|
c
|
ma_hashtbl_init:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r14
movq %r8, %r15
movl %ecx, %r12d
movl %edx, %r13d
movl %esi, %edx
movq %rdi, %rbx
movl $0x0, 0x8(%rdi)
addq $0x18, %rdi
movl $0x10, %esi
xorl %ecx, %ecx
callq 0x32364
testb %al, %al
je 0x3263e
movq $0x0, 0x38(%rbx)
movb $0x1, %al
jmp 0x3267b
movl 0x10(%rbp), %eax
movl %r13d, (%rbx)
movl %r12d, 0x4(%rbx)
movabsq $-0xffffffff, %rcx # imm = 0xFFFFFFFF00000001
movq %rcx, 0xc(%rbx)
movq %r15, 0x30(%rbx)
movq %r14, 0x38(%rbx)
movl %eax, 0x14(%rbx)
testb $0x1, %al
jne 0x3266e
leaq 0x80(%rip), %rax # 0x326ec
jmp 0x32675
leaq 0x15(%rip), %rax # 0x3268a
movq %rax, 0x40(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
_ma_hashtbl_init:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, r9
mov r15, r8
mov r12d, ecx
mov r13d, edx
mov edx, esi
mov rbx, rdi
mov dword ptr [rdi+8], 0
add rdi, 18h
mov esi, 10h
xor ecx, ecx
call ma_init_dynamic_array
test al, al
jz short loc_3263E
mov qword ptr [rbx+38h], 0
mov al, 1
jmp short loc_3267B
loc_3263E:
mov eax, [rbp+arg_0]
mov [rbx], r13d
mov [rbx+4], r12d
mov rcx, 0FFFFFFFF00000001h
mov [rbx+0Ch], rcx
mov [rbx+30h], r15
mov [rbx+38h], r14
mov [rbx+14h], eax
test al, 1
jnz short loc_3266E
lea rax, calc_hashnr
jmp short loc_32675
loc_3266E:
lea rax, calc_hashnr_caseup
loc_32675:
mov [rbx+40h], rax
xor eax, eax
loc_3267B:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
char ma_hashtbl_init(long long a1, unsigned int a2, int a3, int a4, long long a5, long long a6, int a7)
{
long long ( *v12)(); // rax
*(_DWORD *)(a1 + 8) = 0;
if ( (unsigned __int8)ma_init_dynamic_array(a1 + 24, 0x10u, a2, 0) )
{
*(_QWORD *)(a1 + 56) = 0LL;
return 1;
}
else
{
*(_DWORD *)a1 = a3;
*(_DWORD *)(a1 + 4) = a4;
*(_QWORD *)(a1 + 12) = 0xFFFFFFFF00000001LL;
*(_QWORD *)(a1 + 48) = a5;
*(_QWORD *)(a1 + 56) = a6;
*(_DWORD *)(a1 + 20) = a7;
if ( (a7 & 1) != 0 )
v12 = calc_hashnr_caseup;
else
v12 = calc_hashnr;
*(_QWORD *)(a1 + 64) = v12;
return 0;
}
}
|
_ma_hashtbl_init:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,R9
MOV R15,R8
MOV R12D,ECX
MOV R13D,EDX
MOV EDX,ESI
MOV RBX,RDI
MOV dword ptr [RDI + 0x8],0x0
ADD RDI,0x18
MOV ESI,0x10
XOR ECX,ECX
CALL 0x00132364
TEST AL,AL
JZ 0x0013263e
MOV qword ptr [RBX + 0x38],0x0
MOV AL,0x1
JMP 0x0013267b
LAB_0013263e:
MOV EAX,dword ptr [RBP + 0x10]
MOV dword ptr [RBX],R13D
MOV dword ptr [RBX + 0x4],R12D
MOV RCX,-0xffffffff
MOV qword ptr [RBX + 0xc],RCX
MOV qword ptr [RBX + 0x30],R15
MOV qword ptr [RBX + 0x38],R14
MOV dword ptr [RBX + 0x14],EAX
TEST AL,0x1
JNZ 0x0013266e
LEA RAX,[0x1326ec]
JMP 0x00132675
LAB_0013266e:
LEA RAX,[0x13268a]
LAB_00132675:
MOV qword ptr [RBX + 0x40],RAX
XOR EAX,EAX
LAB_0013267b:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8
_ma_hashtbl_init(int4 *param_1,int4 param_2,int4 param_3,int4 param_4,
int8 param_5,int8 param_6,uint param_7)
{
char cVar1;
int8 uVar2;
code *pcVar3;
param_1[2] = 0;
cVar1 = ma_init_dynamic_array(param_1 + 6,0x10,param_2,0);
if (cVar1 == '\0') {
*param_1 = param_3;
param_1[1] = param_4;
*(int8 *)(param_1 + 3) = 0xffffffff00000001;
*(int8 *)(param_1 + 0xc) = param_5;
*(int8 *)(param_1 + 0xe) = param_6;
param_1[5] = param_7;
if ((param_7 & 1) == 0) {
pcVar3 = calc_hashnr;
}
else {
pcVar3 = calc_hashnr_caseup;
}
*(code **)(param_1 + 0x10) = pcVar3;
uVar2 = 0;
}
else {
*(int8 *)(param_1 + 0xe) = 0;
uVar2 = 1;
}
return uVar2;
}
|
|
14,647
|
testing::internal::StringStreamToString(std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char>>*)
|
giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest.cc
|
std::string StringStreamToString(::std::stringstream* ss) {
const ::std::string& str = ss->str();
const char* const start = str.c_str();
const char* const end = start + str.length();
std::string result;
result.reserve(static_cast<size_t>(2 * (end - start)));
for (const char* ch = start; ch != end; ++ch) {
if (*ch == '\0') {
result += "\\0"; // Replaces NUL with "\\0";
} else {
result += *ch;
}
}
return result;
}
|
O1
|
cpp
|
testing::internal::StringStreamToString(std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char>>*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
addq $0x18, %rsi
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x88d0
movq (%r14), %r12
movq 0x8(%r14), %r13
leaq 0x10(%rbx), %r15
movq %r15, (%rbx)
movq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
leaq (,%r13,2), %rsi
movq %rbx, %rdi
callq 0x88b0
testq %r13, %r13
je 0x1d049
xorl %ebp, %ebp
leaq 0x25ceb(%rip), %r14 # 0x42d0c
movb (%r12,%rbp), %al
testb %al, %al
je 0x1d036
movsbl %al, %esi
movq %rbx, %rdi
callq 0x8410
jmp 0x1d041
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8a50
incq %rbp
cmpq %rbp, %r13
jne 0x1d021
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1d064
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x84e0
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1d078
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x1d08e
movq (%r15), %rsi
incq %rsi
callq 0x84e0
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1d0a9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x84e0
movq %r14, %rdi
callq 0x8990
|
_ZN7testing8internal20StringStreamToStringEPNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov rbx, rdi
add rsi, 18h
lea r14, [rsp+58h+var_50]
mov rdi, r14
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
mov r12, [r14]
mov r13, [r14+8]
lea r15, [rbx+10h]
mov [rbx], r15
mov qword ptr [rbx+8], 0
mov byte ptr [rbx+10h], 0
lea rsi, ds:0[r13*2]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
test r13, r13
jz short loc_1D049
xor ebp, ebp
lea r14, a0; "\\0"
loc_1D021:
mov al, [r12+rbp]
test al, al
jz short loc_1D036
movsx esi, al
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
jmp short loc_1D041
loc_1D036:
mov rdi, rbx
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
loc_1D041:
inc rbp
cmp r13, rbp
jnz short loc_1D021
loc_1D049:
lea rax, [rsp+58h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_1D064
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1D064:
mov rax, rbx
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_1D078:
mov r14, rax
mov rdi, [rbx]; void *
cmp rdi, r15
jz short loc_1D08E
mov rsi, [r15]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1D08E:
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_1D0A9
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1D0A9:
mov rdi, r14
call __Unwind_Resume
|
long long testing::internal::StringStreamToString(long long a1, long long a2)
{
void *v2; // r12
char *v3; // r13
char *i; // rbp
char v5; // al
void *v7[2]; // [rsp+8h] [rbp-50h] BYREF
long long v8; // [rsp+18h] [rbp-40h] BYREF
std::stringbuf::str(v7, a2 + 24);
v2 = v7[0];
v3 = (char *)v7[1];
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
std::string::reserve(a1, 2LL * (_QWORD)v3);
if ( v3 )
{
for ( i = 0LL; i != v3; ++i )
{
v5 = i[(_QWORD)v2];
if ( v5 )
std::string::push_back(a1, (unsigned int)v5);
else
std::string::append(a1, "\\0");
}
}
if ( v7[0] != &v8 )
operator delete(v7[0], v8 + 1);
return a1;
}
|
StringStreamToString:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RBX,RDI
ADD RSI,0x18
LEA R14,[RSP + 0x8]
MOV RDI,R14
CALL 0x001088d0
MOV R12,qword ptr [R14]
MOV R13,qword ptr [R14 + 0x8]
LEA R15,[RBX + 0x10]
MOV qword ptr [RBX],R15
MOV qword ptr [RBX + 0x8],0x0
MOV byte ptr [RBX + 0x10],0x0
LEA RSI,[R13*0x2]
LAB_0011d00b:
MOV RDI,RBX
CALL 0x001088b0
TEST R13,R13
JZ 0x0011d049
XOR EBP,EBP
LEA R14,[0x142d0c]
LAB_0011d021:
MOV AL,byte ptr [R12 + RBP*0x1]
TEST AL,AL
JZ 0x0011d036
LAB_0011d029:
MOVSX ESI,AL
MOV RDI,RBX
CALL 0x00108410
JMP 0x0011d041
LAB_0011d036:
MOV RDI,RBX
MOV RSI,R14
CALL 0x00108a50
LAB_0011d041:
INC RBP
CMP R13,RBP
JNZ 0x0011d021
LAB_0011d049:
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0011d064
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001084e0
LAB_0011d064:
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* testing::internal::StringStreamToString(std::__cxx11::stringstream*) */
stringstream * testing::internal::StringStreamToString(stringstream *param_1)
{
long lVar1;
long *local_50;
long local_48;
long local_40 [2];
std::__cxx11::stringbuf::str();
*(stringstream **)param_1 = param_1 + 0x10;
*(int8 *)(param_1 + 8) = 0;
param_1[0x10] = (stringstream)0x0;
/* try { // try from 0011d00b to 0011d012 has its CatchHandler @ 0011d076 */
std::__cxx11::string::reserve((ulong)param_1);
if (local_48 != 0) {
lVar1 = 0;
do {
if (*(char *)((long)local_50 + lVar1) == '\0') {
std::__cxx11::string::append((char *)param_1);
}
else {
/* try { // try from 0011d029 to 0011d040 has its CatchHandler @ 0011d078 */
std::__cxx11::string::push_back((char)param_1);
}
lVar1 = lVar1 + 1;
} while (local_48 != lVar1);
}
if (local_50 != local_40) {
operator_delete(local_50,local_40[0] + 1);
}
return param_1;
}
|
|
14,648
|
google::protobuf::io::EpsCopyOutputStream::GetDirectBufferPointer(void**, int*, unsigned char**)
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/coded_stream.cc
|
bool EpsCopyOutputStream::GetDirectBufferPointer(void** data, int* size,
uint8_t** pp) {
if (had_error_) {
*pp = buffer_;
return false;
}
*size = Flush(*pp);
if (had_error_) {
*pp = buffer_;
return false;
}
*data = buffer_end_;
while (*size == 0) {
if (!stream_->Next(data, size)) {
*pp = Error();
return false;
}
}
*pp = SetInitialBuffer(*data, *size);
return true;
}
|
O0
|
cpp
|
google::protobuf::io::EpsCopyOutputStream::GetDirectBufferPointer(void**, int*, unsigned char**):
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
movq %rcx, 0x10(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
testb $0x1, 0x38(%rax)
je 0x20cd3
movq 0x8(%rsp), %rcx
addq $0x10, %rcx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
movb $0x0, 0x37(%rsp)
jmp 0x20d90
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rax
movq (%rax), %rsi
callq 0x206a0
movl %eax, %edx
movq 0x8(%rsp), %rax
movq 0x18(%rsp), %rcx
movl %edx, (%rcx)
testb $0x1, 0x38(%rax)
je 0x20d11
movq 0x8(%rsp), %rcx
addq $0x10, %rcx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
movb $0x0, 0x37(%rsp)
jmp 0x20d90
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rcx
movq 0x20(%rsp), %rax
movq %rcx, (%rax)
movq 0x18(%rsp), %rax
cmpl $0x0, (%rax)
jne 0x20d67
movq 0x8(%rsp), %rax
movq 0x30(%rax), %rdi
movq 0x20(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq (%rdi), %rax
callq *0x10(%rax)
testb $0x1, %al
jne 0x20d65
movq 0x8(%rsp), %rdi
callq 0x22770
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
movb $0x0, 0x37(%rsp)
jmp 0x20d90
jmp 0x20d22
movq 0x8(%rsp), %rdi
movq 0x20(%rsp), %rax
movq (%rax), %rsi
movq 0x18(%rsp), %rax
movl (%rax), %edx
callq 0x1d460
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
movb $0x1, 0x37(%rsp)
movb 0x37(%rsp), %al
andb $0x1, %al
addq $0x38, %rsp
retq
nopl (%rax,%rax)
|
_ZN6google8protobuf2io19EpsCopyOutputStream22GetDirectBufferPointerEPPvPiPPh:
sub rsp, 38h
mov [rsp+38h+var_10], rdi
mov [rsp+38h+var_18], rsi
mov [rsp+38h+var_20], rdx
mov [rsp+38h+var_28], rcx
mov rax, [rsp+38h+var_10]
mov [rsp+38h+var_30], rax
test byte ptr [rax+38h], 1
jz short loc_20CD3
mov rcx, [rsp+38h+var_30]
add rcx, 10h
mov rax, [rsp+38h+var_28]
mov [rax], rcx
mov [rsp+38h+var_1], 0
jmp loc_20D90
loc_20CD3:
mov rdi, [rsp+38h+var_30]; this
mov rax, [rsp+38h+var_28]
mov rsi, [rax]; unsigned __int8 *
call _ZN6google8protobuf2io19EpsCopyOutputStream5FlushEPh; google::protobuf::io::EpsCopyOutputStream::Flush(uchar *)
mov edx, eax
mov rax, [rsp+38h+var_30]
mov rcx, [rsp+38h+var_20]
mov [rcx], edx
test byte ptr [rax+38h], 1
jz short loc_20D11
mov rcx, [rsp+38h+var_30]
add rcx, 10h
mov rax, [rsp+38h+var_28]
mov [rax], rcx
mov [rsp+38h+var_1], 0
jmp short loc_20D90
loc_20D11:
mov rax, [rsp+38h+var_30]
mov rcx, [rax+8]
mov rax, [rsp+38h+var_18]
mov [rax], rcx
loc_20D22:
mov rax, [rsp+38h+var_20]
cmp dword ptr [rax], 0
jnz short loc_20D67
mov rax, [rsp+38h+var_30]
mov rdi, [rax+30h]
mov rsi, [rsp+38h+var_18]
mov rdx, [rsp+38h+var_20]
mov rax, [rdi]
call qword ptr [rax+10h]
test al, 1
jnz short loc_20D65
mov rdi, [rsp+38h+var_30]; this
call _ZN6google8protobuf2io19EpsCopyOutputStream5ErrorEv; google::protobuf::io::EpsCopyOutputStream::Error(void)
mov rcx, rax
mov rax, [rsp+38h+var_28]
mov [rax], rcx
mov [rsp+38h+var_1], 0
jmp short loc_20D90
loc_20D65:
jmp short loc_20D22
loc_20D67:
mov rdi, [rsp+38h+var_30]; this
mov rax, [rsp+38h+var_18]
mov rsi, [rax]; void *
mov rax, [rsp+38h+var_20]
mov edx, [rax]; int
call _ZN6google8protobuf2io19EpsCopyOutputStream16SetInitialBufferEPvi; google::protobuf::io::EpsCopyOutputStream::SetInitialBuffer(void *,int)
mov rcx, rax
mov rax, [rsp+38h+var_28]
mov [rax], rcx
mov [rsp+38h+var_1], 1
loc_20D90:
mov al, [rsp+38h+var_1]
and al, 1
add rsp, 38h
retn
|
char google::protobuf::io::EpsCopyOutputStream::GetDirectBufferPointer(
char **this,
char **a2,
int *a3,
unsigned __int8 **a4)
{
if ( ((_BYTE)this[7] & 1) != 0 )
{
*a4 = (unsigned __int8 *)(this + 2);
return 0;
}
else
{
*a3 = google::protobuf::io::EpsCopyOutputStream::Flush((google::protobuf::io::EpsCopyOutputStream *)this, *a4);
if ( ((_BYTE)this[7] & 1) != 0 )
{
*a4 = (unsigned __int8 *)(this + 2);
return 0;
}
else
{
*a2 = this[1];
while ( !*a3 )
{
if ( ((*(long long ( **)(char *, char **, int *))(*(_QWORD *)this[6] + 16LL))(this[6], a2, a3) & 1) == 0 )
{
*a4 = (unsigned __int8 *)google::protobuf::io::EpsCopyOutputStream::Error((google::protobuf::io::EpsCopyOutputStream *)this);
return 0;
}
}
*a4 = (unsigned __int8 *)google::protobuf::io::EpsCopyOutputStream::SetInitialBuffer(
(google::protobuf::io::EpsCopyOutputStream *)this,
*a2,
*a3);
return 1;
}
}
}
|
GetDirectBufferPointer:
SUB RSP,0x38
MOV qword ptr [RSP + 0x28],RDI
MOV qword ptr [RSP + 0x20],RSI
MOV qword ptr [RSP + 0x18],RDX
MOV qword ptr [RSP + 0x10],RCX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x8],RAX
TEST byte ptr [RAX + 0x38],0x1
JZ 0x00120cd3
MOV RCX,qword ptr [RSP + 0x8]
ADD RCX,0x10
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX],RCX
MOV byte ptr [RSP + 0x37],0x0
JMP 0x00120d90
LAB_00120cd3:
MOV RDI,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RAX]
CALL 0x001206a0
MOV EDX,EAX
MOV RAX,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RSP + 0x18]
MOV dword ptr [RCX],EDX
TEST byte ptr [RAX + 0x38],0x1
JZ 0x00120d11
MOV RCX,qword ptr [RSP + 0x8]
ADD RCX,0x10
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX],RCX
MOV byte ptr [RSP + 0x37],0x0
JMP 0x00120d90
LAB_00120d11:
MOV RAX,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RAX],RCX
LAB_00120d22:
MOV RAX,qword ptr [RSP + 0x18]
CMP dword ptr [RAX],0x0
JNZ 0x00120d67
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX + 0x30]
MOV RSI,qword ptr [RSP + 0x20]
MOV RDX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x10]
TEST AL,0x1
JNZ 0x00120d65
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x00122770
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX],RCX
MOV byte ptr [RSP + 0x37],0x0
JMP 0x00120d90
LAB_00120d65:
JMP 0x00120d22
LAB_00120d67:
MOV RDI,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RAX]
MOV RAX,qword ptr [RSP + 0x18]
MOV EDX,dword ptr [RAX]
CALL 0x0011d460
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX],RCX
MOV byte ptr [RSP + 0x37],0x1
LAB_00120d90:
MOV AL,byte ptr [RSP + 0x37]
AND AL,0x1
ADD RSP,0x38
RET
|
/* google::protobuf::io::EpsCopyOutputStream::GetDirectBufferPointer(void**, int*, unsigned char**)
*/
int1 __thiscall
google::protobuf::io::EpsCopyOutputStream::GetDirectBufferPointer
(EpsCopyOutputStream *this,void **param_1,int *param_2,uchar **param_3)
{
int iVar1;
ulong uVar2;
uchar *puVar3;
if (((byte)this[0x38] & 1) == 0) {
iVar1 = Flush(this,*param_3);
*param_2 = iVar1;
if (((byte)this[0x38] & 1) == 0) {
*param_1 = *(void **)(this + 8);
do {
if (*param_2 != 0) {
puVar3 = (uchar *)SetInitialBuffer(this,*param_1,*param_2);
*param_3 = puVar3;
return 1;
}
uVar2 = (**(code **)(**(long **)(this + 0x30) + 0x10))
(*(long **)(this + 0x30),param_1,param_2);
} while ((uVar2 & 1) != 0);
puVar3 = (uchar *)Error(this);
*param_3 = puVar3;
}
else {
*param_3 = (uchar *)(this + 0x10);
}
}
else {
*param_3 = (uchar *)(this + 0x10);
}
return 0;
}
|
|
14,649
|
sp_package::validate_public_routines(THD*, sp_package*)
|
eloqsql/sql/sp_head.cc
|
bool sp_package::validate_public_routines(THD *thd, sp_package *spec)
{
/*
Check that all routines declared in CREATE PACKAGE
have implementations in CREATE PACKAGE BODY.
*/
List_iterator<LEX> it(spec->m_routine_declarations);
for (LEX *lex; (lex= it++); )
{
bool found= false;
DBUG_ASSERT(lex->sphead);
List_iterator<LEX> it2(m_routine_implementations);
for (LEX *lex2; (lex2= it2++); )
{
DBUG_ASSERT(lex2->sphead);
if (Sp_handler::eq_routine_name(lex2->sphead->m_name,
lex->sphead->m_name) &&
lex2->sphead->eq_routine_spec(lex->sphead))
{
found= true;
break;
}
}
if (!found)
{
my_error(ER_PACKAGE_ROUTINE_IN_SPEC_NOT_DEFINED_IN_BODY, MYF(0),
ErrConvDQName(lex->sphead).ptr());
return true;
}
}
return false;
}
|
O0
|
cpp
|
sp_package::validate_public_routines(THD*, sp_package*):
pushq %rbp
movq %rsp, %rbp
subq $0x2e0, %rsp # imm = 0x2E0
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x228(%rbp)
movq %rsi, -0x230(%rbp)
movq %rdx, -0x238(%rbp)
movq -0x228(%rbp), %rax
movq %rax, -0x2a8(%rbp)
movq -0x238(%rbp), %rsi
addq $0xaf8, %rsi # imm = 0xAF8
leaq -0x258(%rbp), %rdi
callq 0x90ea80
leaq -0x258(%rbp), %rdi
xorl %esi, %esi
callq 0x90eab0
movq %rax, -0x260(%rbp)
cmpq $0x0, %rax
je 0x901a75
movb $0x0, -0x261(%rbp)
jmp 0x90190d
movq -0x2a8(%rbp), %rsi
addq $0xae0, %rsi # imm = 0xAE0
leaq -0x288(%rbp), %rdi
callq 0x90ea80
leaq -0x288(%rbp), %rdi
xorl %esi, %esi
callq 0x90eab0
movq %rax, -0x290(%rbp)
cmpq $0x0, %rax
je 0x9019b2
jmp 0x901944
jmp 0x901946
movq -0x290(%rbp), %rax
movq 0x1960(%rax), %rdi
addq $0x20, %rdi
addq $0x10, %rdi
movq -0x260(%rbp), %rax
movq 0x1960(%rax), %rsi
addq $0x20, %rsi
addq $0x10, %rsi
callq 0x90ead0
testb $0x1, %al
jne 0x90197d
jmp 0x9019ad
movq -0x290(%rbp), %rax
movq 0x1960(%rax), %rdi
movq -0x260(%rbp), %rax
movq 0x1960(%rax), %rsi
callq 0x901740
testb $0x1, %al
jne 0x9019a4
jmp 0x9019ad
movb $0x1, -0x261(%rbp)
jmp 0x9019b2
jmp 0x901927
testb $0x1, -0x261(%rbp)
jne 0x901a70
movq -0x260(%rbp), %rax
movq 0x1960(%rax), %rcx
movq %rcx, -0x2b8(%rbp)
xorl %eax, %eax
cmpq $0x0, %rcx
movq %rax, -0x2b0(%rbp)
je 0x9019f5
movq -0x2b8(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x2b0(%rbp)
movq -0x2b0(%rbp), %rsi
leaq -0x218(%rbp), %rdi
movq %rdi, -0x2c8(%rbp)
callq 0x853ff0
movq -0x2c8(%rbp), %rdi
callq 0x854030
movq %rax, -0x2c0(%rbp)
jmp 0x901a24
movq -0x2c0(%rbp), %rdx
xorl %eax, %eax
movl %eax, %esi
movl $0xfff, %edi # imm = 0xFFF
callq 0x131c1e0
jmp 0x901a3b
leaq -0x218(%rbp), %rdi
callq 0x854060
movb $0x1, -0x219(%rbp)
jmp 0x901a7c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x298(%rbp)
movl %eax, -0x29c(%rbp)
leaq -0x218(%rbp), %rdi
callq 0x854060
jmp 0x901aab
jmp 0x9018e5
movb $0x0, -0x219(%rbp)
movb -0x219(%rbp), %al
movb %al, -0x2c9(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x901ad7
movb -0x2c9(%rbp), %al
andb $0x1, %al
addq $0x2e0, %rsp # imm = 0x2E0
popq %rbp
retq
movq -0x298(%rbp), %rax
movq %rax, -0x2d8(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x901ad7
movq -0x2d8(%rbp), %rdi
callq 0x775a20
callq 0x7754c0
nopl (%rax)
|
_ZN10sp_package24validate_public_routinesEP3THDPS_:
push rbp
mov rbp, rsp
sub rsp, 2E0h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_228], rdi
mov [rbp+var_230], rsi
mov [rbp+var_238], rdx
mov rax, [rbp+var_228]
mov [rbp+var_2A8], rax
mov rsi, [rbp+var_238]
add rsi, 0AF8h
lea rdi, [rbp+var_258]
call _ZN13List_iteratorI3LEXEC2ER4ListIS0_E; List_iterator<LEX>::List_iterator(List<LEX> &)
loc_9018E5:
lea rdi, [rbp+var_258]
xor esi, esi
call _ZN13List_iteratorI3LEXEppEi; List_iterator<LEX>::operator++(int)
mov [rbp+var_260], rax
cmp rax, 0
jz loc_901A75
mov [rbp+var_261], 0
jmp short $+2
loc_90190D:
mov rsi, [rbp+var_2A8]
add rsi, 0AE0h
lea rdi, [rbp+var_288]
call _ZN13List_iteratorI3LEXEC2ER4ListIS0_E; List_iterator<LEX>::List_iterator(List<LEX> &)
loc_901927:
lea rdi, [rbp+var_288]
xor esi, esi
call _ZN13List_iteratorI3LEXEppEi; List_iterator<LEX>::operator++(int)
mov [rbp+var_290], rax
cmp rax, 0
jz short loc_9019B2
jmp short $+2
loc_901944:
jmp short $+2
loc_901946:
mov rax, [rbp+var_290]
mov rdi, [rax+1960h]
add rdi, 20h ; ' '
add rdi, 10h
mov rax, [rbp+var_260]
mov rsi, [rax+1960h]
add rsi, 20h ; ' '
add rsi, 10h
call _ZN10Sp_handler15eq_routine_nameERK25st_mysql_const_lex_stringS2_; Sp_handler::eq_routine_name(st_mysql_const_lex_string const&,st_mysql_const_lex_string const&)
test al, 1
jnz short loc_90197D
jmp short loc_9019AD
loc_90197D:
mov rax, [rbp+var_290]
mov rdi, [rax+1960h]; this
mov rax, [rbp+var_260]
mov rsi, [rax+1960h]; sp_head *
call _ZNK7sp_head15eq_routine_specEPKS_; sp_head::eq_routine_spec(sp_head const*)
test al, 1
jnz short loc_9019A4
jmp short loc_9019AD
loc_9019A4:
mov [rbp+var_261], 1
jmp short loc_9019B2
loc_9019AD:
jmp loc_901927
loc_9019B2:
test [rbp+var_261], 1
jnz loc_901A70
mov rax, [rbp+var_260]
mov rcx, [rax+1960h]
mov [rbp+var_2B8], rcx
xor eax, eax
cmp rcx, 0
mov [rbp+var_2B0], rax
jz short loc_9019F5
mov rax, [rbp+var_2B8]
add rax, 20h ; ' '
mov [rbp+var_2B0], rax
loc_9019F5:
mov rsi, [rbp+var_2B0]; Database_qualified_name *
lea rdi, [rbp+var_218]; this
mov [rbp+var_2C8], rdi
call _ZN13ErrConvDQNameC2EPK23Database_qualified_name; ErrConvDQName::ErrConvDQName(Database_qualified_name const*)
mov rdi, [rbp+var_2C8]; this
call _ZNK7ErrConv3ptrEv; ErrConv::ptr(void)
mov [rbp+var_2C0], rax
jmp short $+2
loc_901A24:
mov rdx, [rbp+var_2C0]
xor eax, eax
mov esi, eax
mov edi, 0FFFh
call my_error
jmp short $+2
loc_901A3B:
lea rdi, [rbp+var_218]; this
call _ZN13ErrConvDQNameD2Ev; ErrConvDQName::~ErrConvDQName()
mov [rbp+var_219], 1
jmp short loc_901A7C
mov rcx, rax
mov eax, edx
mov [rbp+var_298], rcx
mov [rbp+var_29C], eax
lea rdi, [rbp+var_218]; this
call _ZN13ErrConvDQNameD2Ev; ErrConvDQName::~ErrConvDQName()
jmp short loc_901AAB
loc_901A70:
jmp loc_9018E5
loc_901A75:
mov [rbp+var_219], 0
loc_901A7C:
mov al, [rbp+var_219]
mov [rbp+var_2C9], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_901AD7
mov al, [rbp+var_2C9]
and al, 1
add rsp, 2E0h
pop rbp
retn
loc_901AAB:
mov rax, [rbp+var_298]
mov [rbp+var_2D8], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_901AD7
mov rdi, [rbp+var_2D8]
call __Unwind_Resume
loc_901AD7:
call ___stack_chk_fail
|
char sp_package::validate_public_routines(sp_package *this, THD *a2, sp_package *a3)
{
int v3; // ecx
int v4; // r8d
int v5; // r9d
int v7; // [rsp+20h] [rbp-2C0h]
long long v8; // [rsp+28h] [rbp-2B8h]
Database_qualified_name *v9; // [rsp+30h] [rbp-2B0h]
long long v10; // [rsp+50h] [rbp-290h]
_BYTE v11[39]; // [rsp+58h] [rbp-288h] BYREF
char v12; // [rsp+7Fh] [rbp-261h]
long long v13; // [rsp+80h] [rbp-260h]
_BYTE v14[32]; // [rsp+88h] [rbp-258h] BYREF
sp_package *v15; // [rsp+A8h] [rbp-238h]
THD *v16; // [rsp+B0h] [rbp-230h]
sp_package *v17; // [rsp+B8h] [rbp-228h]
char v18; // [rsp+C7h] [rbp-219h]
_BYTE v19[528]; // [rsp+C8h] [rbp-218h] BYREF
unsigned long long v20; // [rsp+2D8h] [rbp-8h]
v20 = __readfsqword(0x28u);
v17 = this;
v16 = a2;
v15 = a3;
List_iterator<LEX>::List_iterator(v14, (char *)a3 + 2808);
do
{
v13 = List_iterator<LEX>::operator++(v14, 0LL);
if ( !v13 )
{
v18 = 0;
return v18 & 1;
}
v12 = 0;
List_iterator<LEX>::List_iterator(v11, (char *)this + 2784);
while ( 1 )
{
v10 = List_iterator<LEX>::operator++(v11, 0LL);
if ( !v10 )
break;
if ( (Sp_handler::eq_routine_name(*(_QWORD *)(v10 + 6496) + 48LL, *(_QWORD *)(v13 + 6496) + 48LL) & 1) != 0
&& sp_head::eq_routine_spec(*(sp_head **)(v10 + 6496), *(sp_pcontext ***)(v13 + 6496)) )
{
v12 = 1;
break;
}
}
}
while ( (v12 & 1) != 0 );
v8 = *(_QWORD *)(v13 + 6496);
v9 = 0LL;
if ( v8 )
v9 = (Database_qualified_name *)(v8 + 32);
ErrConvDQName::ErrConvDQName((ErrConvDQName *)v19, v9);
v7 = ErrConv::ptr((ErrConv *)v19);
my_error(4095, 0, v7, v3, v4, v5);
ErrConvDQName::~ErrConvDQName((ErrConvDQName *)v19);
v18 = 1;
return v18 & 1;
}
|
_M_key:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x8]
CALL 0x00901300
ADD RSP,0x10
POP RBP
RET
|
/* std::_Rb_tree<unsigned long, std::pair<unsigned long const, std::__cxx11::string >,
std::_Select1st<std::pair<unsigned long const, std::__cxx11::string > >, std::less<unsigned
long>, std::allocator<std::pair<unsigned long const, std::__cxx11::string > >
>::_Auto_node::_M_key() const */
void __thiscall
std::
_Rb_tree<unsigned_long,std::pair<unsigned_long_const,std::__cxx11::string>,std::_Select1st<std::pair<unsigned_long_const,std::__cxx11::string>>,std::less<unsigned_long>,std::allocator<std::pair<unsigned_long_const,std::__cxx11::string>>>
::_Auto_node::_M_key(_Auto_node *this)
{
_Rb_tree<unsigned_long,std::pair<unsigned_long_const,std::__cxx11::string>,std::_Select1st<std::pair<unsigned_long_const,std::__cxx11::string>>,std::less<unsigned_long>,std::allocator<std::pair<unsigned_long_const,std::__cxx11::string>>>
::_S_key(*(_Rb_tree_node **)(this + 8));
return;
}
|
|
14,650
|
sp_package::validate_public_routines(THD*, sp_package*)
|
eloqsql/sql/sp_head.cc
|
bool sp_package::validate_public_routines(THD *thd, sp_package *spec)
{
/*
Check that all routines declared in CREATE PACKAGE
have implementations in CREATE PACKAGE BODY.
*/
List_iterator<LEX> it(spec->m_routine_declarations);
for (LEX *lex; (lex= it++); )
{
bool found= false;
DBUG_ASSERT(lex->sphead);
List_iterator<LEX> it2(m_routine_implementations);
for (LEX *lex2; (lex2= it2++); )
{
DBUG_ASSERT(lex2->sphead);
if (Sp_handler::eq_routine_name(lex2->sphead->m_name,
lex->sphead->m_name) &&
lex2->sphead->eq_routine_spec(lex->sphead))
{
found= true;
break;
}
}
if (!found)
{
my_error(ER_PACKAGE_ROUTINE_IN_SPEC_NOT_DEFINED_IN_BODY, MYF(0),
ErrConvDQName(lex->sphead).ptr());
return true;
}
}
return false;
}
|
O3
|
cpp
|
sp_package::validate_public_routines(THD*, sp_package*):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x238, %rsp # imm = 0x238
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq 0xaf8(%rdx), %rcx
movq 0x8(%rcx), %r12
testq %r12, %r12
je 0x764a46
movq %rdi, -0x248(%rbp)
movq %rcx, -0x250(%rbp)
movq 0xae0(%rdi), %rbx
movq 0x8(%rbx), %r14
testq %r14, %r14
je 0x7649da
movq 0x1960(%r14), %rax
movq 0x1960(%r12), %r8
leaq 0xe41703(%rip), %rcx # 0x15a6048
movq (%rcx), %rdi
movq 0x30(%rax), %rsi
movq 0x38(%rax), %rdx
movq 0x30(%r8), %rcx
movq 0x38(%r8), %r8
movq 0xc0(%rdi), %rax
xorl %r9d, %r9d
callq *0x8(%rax)
testl %eax, %eax
jne 0x7649b0
movq 0x1960(%r14), %r13
movq 0x1960(%r12), %r15
movq 0x88(%r13), %rdi
movq (%rdi), %rax
callq *0x30(%rax)
movl %eax, %r14d
movq 0x88(%r15), %rdi
movq (%rdi), %rax
callq *0x30(%rax)
cmpl %eax, %r14d
jne 0x7649b0
movq 0x9d0(%r13), %rax
movl 0x28(%rax), %eax
movq 0x9d0(%r15), %rcx
cmpl 0x28(%rcx), %eax
je 0x7649b8
movq (%rbx), %rbx
jmp 0x764922
movq -0x250(%rbp), %rcx
movq (%rcx), %rcx
movq 0x8(%rcx), %r12
xorl %eax, %eax
testq %r12, %r12
movq -0x248(%rbp), %rdi
jne 0x764914
jmp 0x764a48
movq 0x1960(%r12), %rax
leaq 0x20(%rax), %rdx
testq %rax, %rax
cmoveq %rax, %rdx
leaq -0x238(%rbp), %rbx
movb $0x0, (%rbx)
leaq 0xc3987a(%rip), %rax # 0x139e278
movq %rax, -0x8(%rbx)
movq %rdx, 0x200(%rbx)
movl 0x8(%rdx), %ecx
movq (%rdx), %r8
movl 0x18(%rdx), %r9d
movq 0x10(%rdx), %rax
movq %rax, (%rsp)
leaq 0x6272cf(%rip), %rdx # 0xd8bcf1
movl $0x200, %esi # imm = 0x200
movq %rbx, %rdi
xorl %eax, %eax
callq 0xd3acb6
movl $0xfff, %edi # imm = 0xFFF
xorl %esi, %esi
movq %rbx, %rdx
xorl %eax, %eax
callq 0xcf1ebf
movb $0x1, %al
jmp 0x764a48
xorl %eax, %eax
movq %fs:0x28, %rcx
cmpq -0x30(%rbp), %rcx
jne 0x764a69
addq $0x238, %rsp # imm = 0x238
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x6286b0
|
_ZN10sp_package24validate_public_routinesEP3THDPS_:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 238h
mov rax, fs:28h
mov [rbp+var_30], rax
mov rcx, [rdx+0AF8h]
mov r12, [rcx+8]
test r12, r12
jz loc_764A46
mov [rbp+var_248], rdi
loc_764914:
mov [rbp+var_250], rcx
mov rbx, [rdi+0AE0h]
loc_764922:
mov r14, [rbx+8]
test r14, r14
jz loc_7649DA
mov rax, [r14+1960h]
mov r8, [r12+1960h]
lea rcx, system_charset_info
mov rdi, [rcx]
mov rsi, [rax+30h]
mov rdx, [rax+38h]
mov rcx, [r8+30h]
mov r8, [r8+38h]
mov rax, [rdi+0C0h]
xor r9d, r9d
call qword ptr [rax+8]
test eax, eax
jnz short loc_7649B0
mov r13, [r14+1960h]
mov r15, [r12+1960h]
mov rdi, [r13+88h]
mov rax, [rdi]
call qword ptr [rax+30h]
mov r14d, eax
mov rdi, [r15+88h]
mov rax, [rdi]
call qword ptr [rax+30h]
cmp r14d, eax
jnz short loc_7649B0
mov rax, [r13+9D0h]
mov eax, [rax+28h]
mov rcx, [r15+9D0h]
cmp eax, [rcx+28h]
jz short loc_7649B8
loc_7649B0:
mov rbx, [rbx]
jmp loc_764922
loc_7649B8:
mov rcx, [rbp+var_250]
mov rcx, [rcx]
mov r12, [rcx+8]
xor eax, eax
test r12, r12
mov rdi, [rbp+var_248]
jnz loc_764914
jmp short loc_764A48
loc_7649DA:
mov rax, [r12+1960h]
lea rdx, [rax+20h]
test rax, rax
cmovz rdx, rax
lea rbx, [rbp+var_238]
mov byte ptr [rbx], 0
lea rax, off_139E278
mov [rbx-8], rax
mov [rbx+200h], rdx
mov ecx, [rdx+8]
mov r8, [rdx]
mov r9d, [rdx+18h]
mov rax, [rdx+10h]
mov [rsp+260h+var_260], rax
lea rdx, aSS_0; "%.*s.%.*s"
mov esi, 200h
mov rdi, rbx
xor eax, eax
call my_snprintf
mov edi, 0FFFh
xor esi, esi
mov rdx, rbx
xor eax, eax
call my_error
mov al, 1
jmp short loc_764A48
loc_764A46:
xor eax, eax
loc_764A48:
mov rcx, fs:28h
cmp rcx, [rbp+var_30]
jnz short loc_764A69
add rsp, 238h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_764A69:
call ___stack_chk_fail
|
char sp_package::validate_public_routines(sp_package *this, THD *a2, sp_package *a3)
{
long long *v3; // rcx
long long v4; // r12
_QWORD *i; // rbx
long long v6; // r14
long long v7; // r13
long long v8; // r15
int v9; // r14d
char result; // al
long long v11; // rax
long long v12; // rdx
int v13; // ecx
int v14; // r8d
int v15; // r9d
long long *v16; // [rsp+10h] [rbp-250h]
sp_package *v17; // [rsp+18h] [rbp-248h]
_BYTE v18[512]; // [rsp+28h] [rbp-238h] BYREF
long long v19; // [rsp+228h] [rbp-38h]
unsigned long long v20; // [rsp+230h] [rbp-30h]
v20 = __readfsqword(0x28u);
v3 = (long long *)*((_QWORD *)a3 + 351);
v4 = v3[1];
if ( !v4 )
return 0;
v17 = this;
while ( 2 )
{
v16 = v3;
for ( i = (_QWORD *)*((_QWORD *)this + 348); ; i = (_QWORD *)*i )
{
v6 = i[1];
if ( !v6 )
{
v11 = *(_QWORD *)(v4 + 6496);
v12 = v11 + 32;
if ( !v11 )
v12 = 0LL;
v18[0] = 0;
v19 = v12;
my_snprintf(
(unsigned int)v18,
512,
(unsigned int)"%.*s.%.*s",
*(_DWORD *)(v12 + 8),
*(_QWORD *)v12,
*(_DWORD *)(v12 + 24));
my_error(4095, 0, (unsigned int)v18, v13, v14, v15);
return 1;
}
if ( !(*(unsigned int ( **)(long long, _QWORD, _QWORD, _QWORD, _QWORD, _QWORD))(*(_QWORD *)(system_charset_info + 192)
+ 8LL))(
system_charset_info,
*(_QWORD *)(*(_QWORD *)(v6 + 6496) + 48LL),
*(_QWORD *)(*(_QWORD *)(v6 + 6496) + 56LL),
*(_QWORD *)(*(_QWORD *)(v4 + 6496) + 48LL),
*(_QWORD *)(*(_QWORD *)(v4 + 6496) + 56LL),
0LL) )
{
v7 = *(_QWORD *)(v6 + 6496);
v8 = *(_QWORD *)(v4 + 6496);
v9 = (*(long long ( **)(_QWORD))(**(_QWORD **)(v7 + 136) + 48LL))(*(_QWORD *)(v7 + 136));
if ( v9 == (*(unsigned int ( **)(_QWORD))(**(_QWORD **)(v8 + 136) + 48LL))(*(_QWORD *)(v8 + 136))
&& *(_DWORD *)(*(_QWORD *)(v7 + 2512) + 40LL) == *(_DWORD *)(*(_QWORD *)(v8 + 2512) + 40LL) )
{
break;
}
}
}
v3 = (long long *)*v16;
v4 = *(_QWORD *)(*v16 + 8);
result = 0;
this = v17;
if ( v4 )
continue;
break;
}
return result;
}
| |||
14,651
|
testing::internal::FilePath::RemoveFileName() const
|
giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest-filepath.cc
|
FilePath FilePath::RemoveFileName() const {
const char* const last_sep = FindLastPathSeparator();
std::string dir;
if (last_sep) {
dir = std::string(c_str(), static_cast<size_t>(last_sep + 1 - c_str()));
} else {
dir = kCurrentDirectoryString;
}
return FilePath(dir);
}
|
O1
|
cpp
|
testing::internal::FilePath::RemoveFileName() const:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
movq (%rsi), %r14
movq %r14, %rdi
movl $0x2f, %esi
callq 0x8560
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
movq $0x0, -0x8(%r15)
movb $0x0, (%r15)
testq %rax, %rax
je 0x15162
incq %rax
leaq 0x58(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x48(%rsp), %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x39504
leaq 0x28(%rsp), %rdi
leaq 0x48(%rsp), %r14
movq %r14, %rsi
callq 0x8670
movq (%r14), %rdi
cmpq %r12, %rdi
je 0x1517d
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x84e0
jmp 0x1517d
leaq 0x2bc5c(%rip), %rcx # 0x40dc5
leaq 0x28(%rsp), %rdi
movl $0x2, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x88a0
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0x39594
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq 0x8(%rsp), %rcx
cmpq %r14, %rcx
je 0x151bc
movq %rcx, (%rbx)
movq 0x18(%rsp), %rax
movq %rax, 0x10(%rbx)
jmp 0x151c3
movups (%r14), %xmm0
movups %xmm0, (%rax)
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rbx)
movq %r14, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movb $0x0, 0x18(%rsp)
movq %rbx, %rdi
callq 0x15dde
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x151fe
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x84e0
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x15215
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x84e0
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x15226
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x15240
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x84e0
movq %rbx, %rdi
callq 0x8990
|
_ZNK7testing8internal8FilePath14RemoveFileNameEv:
push r15
push r14
push r12
push rbx
sub rsp, 68h
mov rbx, rdi
mov r14, [rsi]
mov rdi, r14
mov esi, 2Fh ; '/'
call _strrchr
lea r15, [rsp+88h+var_50]
mov [r15-10h], r15
mov qword ptr [r15-8], 0
mov byte ptr [r15], 0
test rax, rax
jz short loc_15162
inc rax
lea r12, [rsp+88h+var_30]
mov [r12-10h], r12
lea rdi, [rsp+88h+var_40]
mov rsi, r14
mov rdx, rax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rdi, [rsp+88h+var_60]
lea r14, [rsp+88h+var_40]
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [r14]; void *
cmp rdi, r12
jz short loc_1517D
mov rsi, [rsp+88h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_1517D
loc_15162:
lea rcx, _ZN7testing8internalL23kCurrentDirectoryStringE; "./"
lea rdi, [rsp+88h+var_60]
mov r8d, 2
xor esi, esi
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
loc_1517D:
lea r14, [rsp+88h+var_70]
mov [r14-10h], r14
mov rsi, [rsp+88h+var_60]
mov rdx, [rsp+88h+var_58]
add rdx, rsi
lea rdi, [rsp+88h+var_80]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
lea rax, [rbx+10h]
mov [rbx], rax
mov rcx, [rsp+88h+var_80]
cmp rcx, r14
jz short loc_151BC
mov [rbx], rcx
mov rax, [rsp+88h+var_70]
mov [rbx+10h], rax
jmp short loc_151C3
loc_151BC:
movups xmm0, xmmword ptr [r14]
movups xmmword ptr [rax], xmm0
loc_151C3:
mov rax, [rsp+88h+var_78]
mov [rbx+8], rax
mov [rsp+88h+var_80], r14
mov [rsp+88h+var_78], 0
mov byte ptr [rsp+88h+var_70], 0
mov rdi, rbx; this
call _ZN7testing8internal8FilePath9NormalizeEv; testing::internal::FilePath::Normalize(void)
mov rdi, [rsp+88h+var_80]; void *
cmp rdi, r14
jz short loc_151FE
mov rsi, [rsp+88h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_151FE:
mov rdi, [rsp+88h+var_60]; void *
cmp rdi, r15
jz short loc_15215
mov rsi, [rsp+88h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_15215:
mov rax, rbx
add rsp, 68h
pop rbx
pop r12
pop r14
pop r15
retn
jmp short $+2
loc_15226:
mov rbx, rax
mov rdi, [rsp+arg_20]; void *
cmp rdi, r15
jz short loc_15240
mov rsi, [rsp+arg_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_15240:
mov rdi, rbx
call __Unwind_Resume
|
testing::internal::FilePath * testing::internal::FilePath::RemoveFileName(
testing::internal::FilePath *this,
_QWORD *a2)
{
long long v2; // r14
long long v3; // rax
void *v5; // [rsp+8h] [rbp-80h] BYREF
long long v6; // [rsp+10h] [rbp-78h]
__int128 v7; // [rsp+18h] [rbp-70h] BYREF
void *v8; // [rsp+28h] [rbp-60h] BYREF
long long v9; // [rsp+30h] [rbp-58h]
_QWORD v10[2]; // [rsp+38h] [rbp-50h] BYREF
void *v11[2]; // [rsp+48h] [rbp-40h] BYREF
_QWORD v12[6]; // [rsp+58h] [rbp-30h] BYREF
v2 = *a2;
v3 = strrchr(*a2, 47LL);
v8 = v10;
v9 = 0LL;
LOBYTE(v10[0]) = 0;
if ( v3 )
{
v11[0] = v12;
std::string::_M_construct<char const*>(v11, v2, v3 + 1);
std::string::operator=(&v8, v11);
if ( v11[0] != v12 )
operator delete(v11[0], v12[0] + 1LL);
}
else
{
std::string::_M_replace(&v8, 0LL, 0LL, "./", 2LL);
}
v5 = &v7;
std::string::_M_construct<char *>(&v5, v8, (char *)v8 + v9);
*(_QWORD *)this = (char *)this + 16;
if ( v5 == &v7 )
{
*((_OWORD *)this + 1) = v7;
}
else
{
*(_QWORD *)this = v5;
*((_QWORD *)this + 2) = v7;
}
*((_QWORD *)this + 1) = v6;
v5 = &v7;
v6 = 0LL;
LOBYTE(v7) = 0;
testing::internal::FilePath::Normalize(this);
if ( v5 != &v7 )
operator delete(v5, v7 + 1);
if ( v8 != v10 )
operator delete(v8, v10[0] + 1LL);
return this;
}
|
RemoveFileName:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV RBX,RDI
MOV R14,qword ptr [RSI]
MOV RDI,R14
MOV ESI,0x2f
CALL 0x00108560
LEA R15,[RSP + 0x38]
MOV qword ptr [R15 + -0x10],R15
MOV qword ptr [R15 + -0x8],0x0
MOV byte ptr [R15],0x0
TEST RAX,RAX
JZ 0x00115162
INC RAX
LEA R12,[RSP + 0x58]
MOV qword ptr [R12 + -0x10],R12
LAB_00115129:
LEA RDI,[RSP + 0x48]
MOV RSI,R14
MOV RDX,RAX
CALL 0x00139504
LEA RDI,[RSP + 0x28]
LEA R14,[RSP + 0x48]
MOV RSI,R14
CALL 0x00108670
MOV RDI,qword ptr [R14]
CMP RDI,R12
JZ 0x0011517d
MOV RSI,qword ptr [RSP + 0x58]
INC RSI
CALL 0x001084e0
JMP 0x0011517d
LAB_00115162:
LEA RCX,[0x140dc5]
LEA RDI,[RSP + 0x28]
MOV R8D,0x2
XOR ESI,ESI
XOR EDX,EDX
CALL 0x001088a0
LAB_0011517d:
LEA R14,[RSP + 0x18]
MOV qword ptr [R14 + -0x10],R14
MOV RSI,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x30]
ADD RDX,RSI
LEA RDI,[RSP + 0x8]
CALL 0x00139594
LAB_0011519d:
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
MOV RCX,qword ptr [RSP + 0x8]
CMP RCX,R14
JZ 0x001151bc
MOV qword ptr [RBX],RCX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RBX + 0x10],RAX
JMP 0x001151c3
LAB_001151bc:
MOVUPS XMM0,xmmword ptr [R14]
MOVUPS xmmword ptr [RAX],XMM0
LAB_001151c3:
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RBX + 0x8],RAX
MOV qword ptr [RSP + 0x8],R14
MOV qword ptr [RSP + 0x10],0x0
MOV byte ptr [RSP + 0x18],0x0
MOV RDI,RBX
CALL 0x00115dde
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R14
JZ 0x001151fe
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001084e0
LAB_001151fe:
MOV RDI,qword ptr [RSP + 0x28]
CMP RDI,R15
JZ 0x00115215
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x001084e0
LAB_00115215:
MOV RAX,RBX
ADD RSP,0x68
POP RBX
POP R12
POP R14
POP R15
RET
|
/* testing::internal::FilePath::RemoveFileName() const */
void testing::internal::FilePath::RemoveFileName(void)
{
char *__s;
char *pcVar1;
int8 *in_RSI;
FilePath *in_RDI;
int1 *local_80;
int8 local_78;
int1 local_70;
int7 uStack_6f;
int8 uStack_68;
int1 *local_60;
long local_58;
int1 local_50;
int7 uStack_4f;
long *local_40 [2];
long local_30 [2];
__s = (char *)*in_RSI;
pcVar1 = strrchr(__s,0x2f);
local_58 = 0;
local_50 = 0;
local_60 = &local_50;
if (pcVar1 == (char *)0x0) {
/* try { // try from 00115162 to 0011519c has its CatchHandler @ 00115226 */
std::__cxx11::string::_M_replace((ulong)&local_60,0,(char *)0x0,0x140dc5);
}
else {
/* try { // try from 00115129 to 00115138 has its CatchHandler @ 00115224 */
local_40[0] = local_30;
std::__cxx11::string::_M_construct<char_const*>(local_40,__s,pcVar1 + 1);
std::__cxx11::string::operator=((string *)&local_60,(string *)local_40);
if (local_40[0] != local_30) {
operator_delete(local_40[0],local_30[0] + 1);
}
}
local_80 = &local_70;
std::__cxx11::string::_M_construct<char*>(&local_80,local_60,local_60 + local_58);
*(FilePath **)in_RDI = in_RDI + 0x10;
if (local_80 == &local_70) {
*(ulong *)(in_RDI + 0x10) = CONCAT71(uStack_6f,local_70);
*(int8 *)(in_RDI + 0x18) = uStack_68;
}
else {
*(int1 **)in_RDI = local_80;
*(ulong *)(in_RDI + 0x10) = CONCAT71(uStack_6f,local_70);
}
*(int8 *)(in_RDI + 8) = local_78;
local_78 = 0;
local_70 = 0;
local_80 = &local_70;
Normalize(in_RDI);
if (local_80 != &local_70) {
operator_delete(local_80,CONCAT71(uStack_6f,local_70) + 1);
}
if (local_60 != &local_50) {
operator_delete(local_60,CONCAT71(uStack_4f,local_50) + 1);
}
return;
}
|
|
14,652
|
translog_get_horizon
|
eloqsql/storage/maria/ma_loghandler.c
|
TRANSLOG_ADDRESS translog_get_horizon()
{
TRANSLOG_ADDRESS res;
DBUG_ASSERT(translog_status == TRANSLOG_OK ||
translog_status == TRANSLOG_READONLY);
translog_lock();
res= log_descriptor.horizon;
translog_unlock();
return res;
}
|
O0
|
c
|
translog_get_horizon:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
jmp 0x54bca
callq 0x500f0
movq 0xc25432(%rip), %rax # 0xc7a008
movq %rax, -0x8(%rbp)
callq 0x501e0
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
|
translog_get_horizon:
push rbp
mov rbp, rsp
sub rsp, 10h
jmp short $+2
loc_54BCA:
call translog_lock
mov rax, cs:qword_C7A008
mov [rbp+var_8], rax
call translog_unlock
mov rax, [rbp+var_8]
add rsp, 10h
pop rbp
retn
|
long long translog_get_horizon()
{
long long v1; // [rsp+8h] [rbp-8h]
translog_lock();
v1 = qword_C7A008;
translog_unlock();
return v1;
}
|
translog_get_horizon:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
JMP 0x00154bca
LAB_00154bca:
CALL 0x001500f0
MOV RAX,qword ptr [0x00d7a008]
MOV qword ptr [RBP + -0x8],RAX
CALL 0x001501e0
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x10
POP RBP
RET
|
int8 translog_get_horizon(void)
{
int8 uVar1;
translog_lock();
uVar1 = DAT_00d7a008;
translog_unlock();
return uVar1;
}
|
|
14,653
|
nglog::base::GetLogger(nglog::LogSeverity)
|
ng-log[P]ng-log/src/logging.cc
|
base::Logger* base::GetLogger(LogSeverity severity) {
std::lock_guard<std::mutex> l{log_mutex};
return LogDestination::log_destination(severity)->GetLoggerImpl();
}
|
O1
|
cpp
|
nglog::base::GetLogger(nglog::LogSeverity):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebp
leaq 0x3ab10(%rip), %rdi # 0x562b8
callq 0x89e0
testl %eax, %eax
jne 0x1b81e
movl %ebp, %eax
leaq 0x2ba46(%rip), %rcx # 0x47200
leaq (%rcx,%rax,8), %rbx
cmpq $0x0, (%rbx)
jne 0x1b7fa
movl $0xd0, %edi
callq 0xa980
movq %rax, %r14
movq %rax, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0x19e80
movq %rsp, %r15
movq $0x0, (%r15)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2215e
movq %r15, %rdi
callq 0x20eb0
movq (%rbx), %rax
movq 0xc8(%rax), %rbx
leaq 0x3aaad(%rip), %rdi # 0x562b8
callq 0x8490
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x83f0
movq %rax, %rbx
movl $0xd0, %esi
movq %r14, %rdi
callq 0xa9cc
jmp 0x1b83a
movq %rax, %rbx
leaq 0x3aa77(%rip), %rdi # 0x562b8
callq 0x8490
movq %rbx, %rdi
callq 0x8bb0
|
_ZN5nglog4base9GetLoggerENS_11LogSeverityE:
push rbp
push r15
push r14
push rbx
push rax
mov ebp, edi
lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex
call _pthread_mutex_lock
test eax, eax
jnz short loc_1B81E
mov eax, ebp
lea rcx, _ZN5nglog14LogDestination17log_destinations_E; nglog::LogDestination::log_destinations_
lea rbx, [rcx+rax*8]
cmp qword ptr [rbx], 0
jnz short loc_1B7FA
mov edi, 0D0h; unsigned __int64
call _Znwm; operator new(ulong)
mov r14, rax
mov rdi, rax
mov esi, ebp
xor edx, edx
call _ZN5nglog14LogDestinationC2ENS_11LogSeverityEPKc; nglog::LogDestination::LogDestination(nglog::LogSeverity,char const*)
mov r15, rsp
mov qword ptr [r15], 0
mov rdi, rbx
mov rsi, r14
call _ZNSt15__uniq_ptr_implIN5nglog14LogDestinationESt14default_deleteIS1_EE5resetEPS1_; std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset(nglog::LogDestination*)
mov rdi, r15
call _ZNSt10unique_ptrIN5nglog14LogDestinationESt14default_deleteIS1_EED2Ev; std::unique_ptr<nglog::LogDestination>::~unique_ptr()
loc_1B7FA:
mov rax, [rbx]
mov rbx, [rax+0C8h]
lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex
call _pthread_mutex_unlock
mov rax, rbx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_1B81E:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
mov rbx, rax
mov esi, 0D0h; unsigned __int64
mov rdi, r14; void *
call _ZdlPvm; operator delete(void *,ulong)
jmp short loc_1B83A
mov rbx, rax
loc_1B83A:
lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex
call _pthread_mutex_unlock
mov rdi, rbx
call __Unwind_Resume
|
long long nglog::base::GetLogger(unsigned int a1)
{
long long v1; // rax
int v2; // eax
char *v3; // rbx
long long v4; // r14
long long v5; // rbx
long long v7; // [rsp-8h] [rbp-28h] BYREF
v7 = v1;
v2 = pthread_mutex_lock(&nglog::log_mutex);
if ( v2 )
std::__throw_system_error(v2);
v3 = (char *)&nglog::LogDestination::log_destinations_ + 8 * a1;
if ( !*(_QWORD *)v3 )
{
v4 = operator new(208LL);
nglog::LogDestination::LogDestination(v4, a1, 0LL);
v7 = 0LL;
std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset(
(char *)&nglog::LogDestination::log_destinations_ + 8 * a1,
v4);
std::unique_ptr<nglog::LogDestination>::~unique_ptr(&v7);
}
v5 = *(_QWORD *)(*(_QWORD *)v3 + 200LL);
pthread_mutex_unlock(&nglog::log_mutex);
return v5;
}
|
GetLogger:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EBP,EDI
LEA RDI,[0x1562b8]
CALL 0x001089e0
TEST EAX,EAX
JNZ 0x0011b81e
MOV EAX,EBP
LEA RCX,[0x147200]
LEA RBX,[RCX + RAX*0x8]
CMP qword ptr [RBX],0x0
JNZ 0x0011b7fa
LAB_0011b7c4:
MOV EDI,0xd0
CALL 0x0010a980
LAB_0011b7ce:
MOV R14,RAX
MOV RDI,RAX
MOV ESI,EBP
XOR EDX,EDX
CALL 0x00119e80
LAB_0011b7dd:
MOV R15,RSP
MOV qword ptr [R15],0x0
MOV RDI,RBX
MOV RSI,R14
CALL 0x0012215e
MOV RDI,R15
CALL 0x00120eb0
LAB_0011b7fa:
MOV RAX,qword ptr [RBX]
MOV RBX,qword ptr [RAX + 0xc8]
LEA RDI,[0x1562b8]
CALL 0x00108490
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0011b81e:
MOV EDI,EAX
CALL 0x001083f0
|
/* nglog::base::GetLogger(nglog::LogSeverity) */
int8 nglog::base::GetLogger(uint param_1)
{
__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>> *this;
int8 uVar1;
int iVar2;
int8 in_RAX;
LogDestination *pLVar3;
int8 local_28;
local_28 = in_RAX;
iVar2 = pthread_mutex_lock((pthread_mutex_t *)log_mutex);
if (iVar2 == 0) {
this = (__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>> *)
(&LogDestination::log_destinations_ + param_1);
if (*(long *)this == 0) {
/* try { // try from 0011b7c4 to 0011b7cd has its CatchHandler @ 0011b837 */
pLVar3 = (LogDestination *)operator_new(0xd0);
/* try { // try from 0011b7ce to 0011b7dc has its CatchHandler @ 0011b825 */
LogDestination::LogDestination(pLVar3,param_1,0);
local_28 = 0;
std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset
(this,pLVar3);
std::unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::~unique_ptr
((unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>> *)
&local_28);
}
uVar1 = *(int8 *)(*(long *)this + 200);
pthread_mutex_unlock((pthread_mutex_t *)log_mutex);
return uVar1;
}
/* WARNING: Subroutine does not return */
std::__throw_system_error(iVar2);
}
|
|
14,654
|
dequantize_row_tq1_0
|
monkey531[P]llama/ggml/src/ggml-quants.c
|
void dequantize_row_tq1_0(const block_tq1_0 * restrict x, float * restrict y, int64_t k) {
assert(k % QK_K == 0);
const int64_t nb = k / QK_K;
const uint8_t pow3[6] = {1, 3, 9, 27, 81, 243};
for (int64_t i = 0; i < nb; ++i) {
const float d = GGML_FP16_TO_FP32(x[i].d);
for (size_t j = 0; j < sizeof(x->qs) - sizeof(x->qs) % 32; j += 32) {
for (size_t n = 0; n < 5; ++n) {
for (size_t m = 0; m < 32; ++m) {
uint8_t q = x[i].qs[j + m] * pow3[n];
int16_t xi = ((uint16_t) q * 3) >> 8;
*y++ = (float) (xi - 1) * d;
}
}
}
for (size_t j = sizeof(x->qs) - sizeof(x->qs) % 32; j < sizeof(x->qs); j += 16) {
for (size_t n = 0; n < 5; ++n) {
for (size_t m = 0; m < 16; ++m) {
uint8_t q = x[i].qs[j + m] * pow3[n];
int16_t xi = ((uint16_t) q * 3) >> 8;
*y++ = (float) (xi - 1) * d;
}
}
}
for (size_t n = 0; n < 4; ++n) {
for (size_t j = 0; j < sizeof(x->qh); ++j) {
uint8_t q = x[i].qh[j] * pow3[n];
int16_t xi = ((uint16_t) q * 3) >> 8;
*y++ = (float) (xi - 1) * d;
}
}
}
}
|
O3
|
c
|
dequantize_row_tq1_0:
leaq 0xff(%rdx), %r8
testq %rdx, %rdx
cmovnsq %rdx, %r8
cmpq $0x100, %rdx # imm = 0x100
jl 0x32038
pushq %r14
pushq %rbx
sarq $0x8, %r8
xorl %edx, %edx
movq 0x3805f(%rip), %r9 # 0x69fa8
leaq 0x1cc28(%rip), %r10 # 0x4eb78
movq %rdi, %r11
imulq $0x36, %rdx, %rax
movzwl 0x34(%rdi,%rax), %eax
movss (%r9,%rax,4), %xmm0
xorl %ebx, %ebx
movb (%rbx,%r10), %cl
xorl %r14d, %r14d
movl %ecx, %eax
mulb (%r11,%r14)
movzbl %al, %eax
leal (%rax,%rax,2), %eax
shrl $0x8, %eax
decl %eax
xorps %xmm1, %xmm1
cvtsi2ss %eax, %xmm1
mulss %xmm0, %xmm1
movss %xmm1, (%rsi)
addq $0x4, %rsi
incq %r14
cmpq $0x20, %r14
jne 0x31f6b
incq %rbx
cmpq $0x5, %rbx
jne 0x31f64
xorl %ebx, %ebx
movb (%rbx,%r10), %cl
movl $0x20, %r14d
movl %ecx, %eax
mulb (%r11,%r14)
movzbl %al, %eax
leal (%rax,%rax,2), %eax
shrl $0x8, %eax
decl %eax
xorps %xmm1, %xmm1
cvtsi2ss %eax, %xmm1
mulss %xmm0, %xmm1
movss %xmm1, (%rsi)
addq $0x4, %rsi
incq %r14
cmpq $0x30, %r14
jne 0x31fad
incq %rbx
cmpq $0x5, %rbx
jne 0x31fa3
xorl %ebx, %ebx
movb (%rbx,%r10), %cl
movl $0x30, %r14d
movl %ecx, %eax
mulb (%r11,%r14)
movzbl %al, %eax
leal (%rax,%rax,2), %eax
shrl $0x8, %eax
decl %eax
xorps %xmm1, %xmm1
cvtsi2ss %eax, %xmm1
mulss %xmm0, %xmm1
movss %xmm1, (%rsi)
addq $0x4, %rsi
incq %r14
cmpq $0x34, %r14
jne 0x31fef
incq %rbx
cmpq $0x4, %rbx
jne 0x31fe5
incq %rdx
addq $0x36, %r11
cmpq %r8, %rdx
jne 0x31f53
popq %rbx
popq %r14
retq
|
dequantize_row_tq1_0:
lea r8, [rdx+0FFh]
test rdx, rdx
cmovns r8, rdx
cmp rdx, 100h
jl locret_32038
push r14
push rbx
sar r8, 8
xor edx, edx
mov r9, cs:ggml_table_f32_f16_ptr
lea r10, unk_4EB78
mov r11, rdi
loc_31F53:
imul rax, rdx, 36h ; '6'
movzx eax, word ptr [rdi+rax+34h]
movss xmm0, dword ptr [r9+rax*4]
xor ebx, ebx
loc_31F64:
mov cl, [rbx+r10]
xor r14d, r14d
loc_31F6B:
mov eax, ecx
mul byte ptr [r11+r14]
movzx eax, al
lea eax, [rax+rax*2]
shr eax, 8
dec eax
xorps xmm1, xmm1
cvtsi2ss xmm1, eax
mulss xmm1, xmm0
movss dword ptr [rsi], xmm1
add rsi, 4
inc r14
cmp r14, 20h ; ' '
jnz short loc_31F6B
inc rbx
cmp rbx, 5
jnz short loc_31F64
xor ebx, ebx
loc_31FA3:
mov cl, [rbx+r10]
mov r14d, 20h ; ' '
loc_31FAD:
mov eax, ecx
mul byte ptr [r11+r14]
movzx eax, al
lea eax, [rax+rax*2]
shr eax, 8
dec eax
xorps xmm1, xmm1
cvtsi2ss xmm1, eax
mulss xmm1, xmm0
movss dword ptr [rsi], xmm1
add rsi, 4
inc r14
cmp r14, 30h ; '0'
jnz short loc_31FAD
inc rbx
cmp rbx, 5
jnz short loc_31FA3
xor ebx, ebx
loc_31FE5:
mov cl, [rbx+r10]
mov r14d, 30h ; '0'
loc_31FEF:
mov eax, ecx
mul byte ptr [r11+r14]
movzx eax, al
lea eax, [rax+rax*2]
shr eax, 8
dec eax
xorps xmm1, xmm1
cvtsi2ss xmm1, eax
mulss xmm1, xmm0
movss dword ptr [rsi], xmm1
add rsi, 4
inc r14
cmp r14, 34h ; '4'
jnz short loc_31FEF
inc rbx
cmp rbx, 4
jnz short loc_31FE5
inc rdx
add r11, 36h ; '6'
cmp rdx, r8
jnz loc_31F53
pop rbx
pop r14
locret_32038:
retn
|
long long dequantize_row_tq1_0(long long a1, float *a2, long long a3)
{
long long v3; // r8
long long v4; // r8
long long v5; // rdx
long long v6; // r11
float v7; // xmm0_4
long long i; // rbx
char v9; // cl
long long j; // r14
long long k; // rbx
char v12; // cl
long long m; // r14
long long n; // rbx
char v15; // cl
long long ii; // r14
long long result; // rax
v3 = a3 + 255;
if ( a3 >= 0 )
v3 = a3;
if ( a3 >= 256 )
{
v4 = v3 >> 8;
v5 = 0LL;
v6 = a1;
do
{
v7 = ggml_table_f32_f16[*(unsigned __int16 *)(a1 + 54 * v5 + 52)];
for ( i = 0LL; i != 5; ++i )
{
v9 = byte_4EB78[i];
for ( j = 0LL; j != 32; ++j )
*a2++ = (float)(int)(((3 * (unsigned int)(unsigned __int8)(*(_BYTE *)(v6 + j) * v9)) >> 8) - 1) * v7;
}
for ( k = 0LL; k != 5; ++k )
{
v12 = byte_4EB78[k];
for ( m = 32LL; m != 48; ++m )
*a2++ = (float)(int)(((3 * (unsigned int)(unsigned __int8)(*(_BYTE *)(v6 + m) * v12)) >> 8) - 1) * v7;
}
for ( n = 0LL; n != 4; ++n )
{
v15 = byte_4EB78[n];
for ( ii = 48LL; ii != 52; ++ii )
{
result = ((3 * (unsigned int)(unsigned __int8)(*(_BYTE *)(v6 + ii) * v15)) >> 8) - 1;
*a2++ = (float)(int)result * v7;
}
}
++v5;
v6 += 54LL;
}
while ( v5 != v4 );
}
return result;
}
|
dequantize_row_tq1_0:
LEA R8,[RDX + 0xff]
TEST RDX,RDX
CMOVNS R8,RDX
CMP RDX,0x100
JL 0x00132038
PUSH R14
PUSH RBX
SAR R8,0x8
XOR EDX,EDX
MOV R9,qword ptr [0x00169fa8]
LEA R10,[0x14eb78]
MOV R11,RDI
LAB_00131f53:
IMUL RAX,RDX,0x36
MOVZX EAX,word ptr [RDI + RAX*0x1 + 0x34]
MOVSS XMM0,dword ptr [R9 + RAX*0x4]
XOR EBX,EBX
LAB_00131f64:
MOV CL,byte ptr [RBX + R10*0x1]
XOR R14D,R14D
LAB_00131f6b:
MOV EAX,ECX
MUL byte ptr [R11 + R14*0x1]
MOVZX EAX,AL
LEA EAX,[RAX + RAX*0x2]
SHR EAX,0x8
DEC EAX
XORPS XMM1,XMM1
CVTSI2SS XMM1,EAX
MULSS XMM1,XMM0
MOVSS dword ptr [RSI],XMM1
ADD RSI,0x4
INC R14
CMP R14,0x20
JNZ 0x00131f6b
INC RBX
CMP RBX,0x5
JNZ 0x00131f64
XOR EBX,EBX
LAB_00131fa3:
MOV CL,byte ptr [RBX + R10*0x1]
MOV R14D,0x20
LAB_00131fad:
MOV EAX,ECX
MUL byte ptr [R11 + R14*0x1]
MOVZX EAX,AL
LEA EAX,[RAX + RAX*0x2]
SHR EAX,0x8
DEC EAX
XORPS XMM1,XMM1
CVTSI2SS XMM1,EAX
MULSS XMM1,XMM0
MOVSS dword ptr [RSI],XMM1
ADD RSI,0x4
INC R14
CMP R14,0x30
JNZ 0x00131fad
INC RBX
CMP RBX,0x5
JNZ 0x00131fa3
XOR EBX,EBX
LAB_00131fe5:
MOV CL,byte ptr [RBX + R10*0x1]
MOV R14D,0x30
LAB_00131fef:
MOV EAX,ECX
MUL byte ptr [R11 + R14*0x1]
MOVZX EAX,AL
LEA EAX,[RAX + RAX*0x2]
SHR EAX,0x8
DEC EAX
XORPS XMM1,XMM1
CVTSI2SS XMM1,EAX
MULSS XMM1,XMM0
MOVSS dword ptr [RSI],XMM1
ADD RSI,0x4
INC R14
CMP R14,0x34
JNZ 0x00131fef
INC RBX
CMP RBX,0x4
JNZ 0x00131fe5
INC RDX
ADD R11,0x36
CMP RDX,R8
JNZ 0x00131f53
POP RBX
POP R14
LAB_00132038:
RET
|
void dequantize_row_tq1_0(long param_1,float *param_2,long param_3)
{
float fVar1;
char cVar2;
int *puVar3;
byte bVar4;
long lVar5;
long lVar6;
long lVar7;
long lVar8;
long lVar9;
puVar3 = PTR_ggml_table_f32_f16_00169fa8;
lVar7 = param_3 + 0xff;
if (-1 < param_3) {
lVar7 = param_3;
}
if (0xff < param_3) {
lVar5 = 0;
lVar8 = param_1;
do {
fVar1 = *(float *)(puVar3 + (ulong)*(ushort *)(param_1 + 0x34 + lVar5 * 0x36) * 4);
lVar6 = 0;
do {
cVar2 = (&DAT_0014eb78)[lVar6];
lVar9 = 0;
do {
bVar4 = cVar2 * *(char *)(lVar8 + lVar9);
*param_2 = (float)(int)(((uint)bVar4 + (uint)bVar4 * 2 >> 8) - 1) * fVar1;
param_2 = param_2 + 1;
lVar9 = lVar9 + 1;
} while (lVar9 != 0x20);
lVar6 = lVar6 + 1;
} while (lVar6 != 5);
lVar6 = 0;
do {
cVar2 = (&DAT_0014eb78)[lVar6];
lVar9 = 0x20;
do {
bVar4 = cVar2 * *(char *)(lVar8 + lVar9);
*param_2 = (float)(int)(((uint)bVar4 + (uint)bVar4 * 2 >> 8) - 1) * fVar1;
param_2 = param_2 + 1;
lVar9 = lVar9 + 1;
} while (lVar9 != 0x30);
lVar6 = lVar6 + 1;
} while (lVar6 != 5);
lVar6 = 0;
do {
cVar2 = (&DAT_0014eb78)[lVar6];
lVar9 = 0x30;
do {
bVar4 = cVar2 * *(char *)(lVar8 + lVar9);
*param_2 = (float)(int)(((uint)bVar4 + (uint)bVar4 * 2 >> 8) - 1) * fVar1;
param_2 = param_2 + 1;
lVar9 = lVar9 + 1;
} while (lVar9 != 0x34);
lVar6 = lVar6 + 1;
} while (lVar6 != 4);
lVar5 = lVar5 + 1;
lVar8 = lVar8 + 0x36;
} while (lVar5 != lVar7 >> 8);
}
return;
}
|
|
14,655
|
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::unget()
|
llama.cpp/common/./json.hpp
|
void unget()
{
next_unget = true;
--position.chars_read_total;
// in case we "unget" a newline, we have to also decrement the lines_read
if (position.chars_read_current_line == 0)
{
if (position.lines_read > 0)
{
--position.lines_read;
}
}
else
{
--position.chars_read_current_line;
}
if (JSON_HEDLEY_LIKELY(current != char_traits<char_type>::eof()))
{
JSON_ASSERT(!token_string.empty());
token_string.pop_back();
}
}
|
O3
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::unget():
movb $0x1, 0x18(%rdi)
decq 0x20(%rdi)
movq 0x28(%rdi), %rax
testq %rax, %rax
je 0x1d2d3
leaq 0x28(%rdi), %rcx
jmp 0x1d2e0
movq 0x30(%rdi), %rax
testq %rax, %rax
je 0x1d2e6
leaq 0x30(%rdi), %rcx
decq %rax
movq %rax, (%rcx)
cmpl $-0x1, 0x14(%rdi)
je 0x1d2f0
decq 0x40(%rdi)
retq
nop
|
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5ungetEv:
mov byte ptr [rdi+18h], 1
dec qword ptr [rdi+20h]
mov rax, [rdi+28h]
test rax, rax
jz short loc_1D2D3
lea rcx, [rdi+28h]
jmp short loc_1D2E0
loc_1D2D3:
mov rax, [rdi+30h]
test rax, rax
jz short loc_1D2E6
lea rcx, [rdi+30h]
loc_1D2E0:
dec rax
mov [rcx], rax
loc_1D2E6:
cmp dword ptr [rdi+14h], 0FFFFFFFFh
jz short locret_1D2F0
dec qword ptr [rdi+40h]
locret_1D2F0:
retn
|
long long nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(
long long a1)
{
long long result; // rax
_QWORD *v2; // rcx
*(_BYTE *)(a1 + 24) = 1;
--*(_QWORD *)(a1 + 32);
result = *(_QWORD *)(a1 + 40);
if ( result )
{
v2 = (_QWORD *)(a1 + 40);
}
else
{
result = *(_QWORD *)(a1 + 48);
if ( !result )
goto LABEL_6;
v2 = (_QWORD *)(a1 + 48);
}
*v2 = --result;
LABEL_6:
if ( *(_DWORD *)(a1 + 20) != -1 )
--*(_QWORD *)(a1 + 64);
return result;
}
|
unget:
MOV byte ptr [RDI + 0x18],0x1
DEC qword ptr [RDI + 0x20]
MOV RAX,qword ptr [RDI + 0x28]
TEST RAX,RAX
JZ 0x0011d2d3
LEA RCX,[RDI + 0x28]
JMP 0x0011d2e0
LAB_0011d2d3:
MOV RAX,qword ptr [RDI + 0x30]
TEST RAX,RAX
JZ 0x0011d2e6
LEA RCX,[RDI + 0x30]
LAB_0011d2e0:
DEC RAX
MOV qword ptr [RCX],RAX
LAB_0011d2e6:
CMP dword ptr [RDI + 0x14],-0x1
JZ 0x0011d2f0
DEC qword ptr [RDI + 0x40]
LAB_0011d2f0:
RET
|
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>,
nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > > >::unget() */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::unget(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*this)
{
long lVar1;
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*plVar2;
this[0x18] = (lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
)0x1;
*(long *)(this + 0x20) = *(long *)(this + 0x20) + -1;
lVar1 = *(long *)(this + 0x28);
if (lVar1 == 0) {
lVar1 = *(long *)(this + 0x30);
if (lVar1 == 0) goto LAB_0011d2e6;
plVar2 = this + 0x30;
}
else {
plVar2 = this + 0x28;
}
*(long *)plVar2 = lVar1 + -1;
LAB_0011d2e6:
if (*(int *)(this + 0x14) != -1) {
*(long *)(this + 0x40) = *(long *)(this + 0x40) + -1;
}
return;
}
|
|
14,656
|
my_xml_parse
|
eloqsql/strings/xml.c
|
int my_xml_parse(MY_XML_PARSER *p,const char *str, size_t len)
{
my_xml_attr_rewind(p);
p->beg=str;
p->cur=str;
p->end=str+len;
while ( p->cur < p->end )
{
MY_XML_ATTR a;
if (p->cur[0] == '<')
{
int lex;
int question=0;
int exclam=0;
lex=my_xml_scan(p,&a);
if (MY_XML_COMMENT == lex)
continue;
if (lex == MY_XML_CDATA)
{
a.beg+= 9;
a.end-= 3;
my_xml_value(p, a.beg, (size_t) (a.end-a.beg));
continue;
}
lex=my_xml_scan(p,&a);
if (MY_XML_SLASH == lex)
{
if (MY_XML_IDENT != (lex=my_xml_scan(p,&a)))
{
sprintf(p->errstr,"%s unexpected (ident wanted)",lex2str(lex));
return MY_XML_ERROR;
}
if (MY_XML_OK != my_xml_leave(p,a.beg,(size_t) (a.end-a.beg)))
return MY_XML_ERROR;
lex=my_xml_scan(p,&a);
goto gt;
}
if (MY_XML_EXCLAM == lex)
{
lex=my_xml_scan(p,&a);
exclam=1;
}
else if (MY_XML_QUESTION == lex)
{
lex=my_xml_scan(p,&a);
question=1;
}
if (MY_XML_IDENT == lex)
{
p->current_node_type= MY_XML_NODE_TAG;
if (MY_XML_OK != my_xml_enter(p,a.beg,(size_t) (a.end-a.beg)))
return MY_XML_ERROR;
}
else
{
sprintf(p->errstr,"%s unexpected (ident or '/' wanted)",
lex2str(lex));
return MY_XML_ERROR;
}
while ((MY_XML_IDENT == (lex=my_xml_scan(p,&a))) ||
((MY_XML_STRING == lex && exclam)))
{
MY_XML_ATTR b;
if (MY_XML_EQ == (lex=my_xml_scan(p,&b)))
{
lex=my_xml_scan(p,&b);
if ( (lex == MY_XML_IDENT) || (lex == MY_XML_STRING) )
{
p->current_node_type= MY_XML_NODE_ATTR;
if ((MY_XML_OK != my_xml_enter(p,a.beg,(size_t) (a.end-a.beg))) ||
(MY_XML_OK != my_xml_value(p,b.beg,(size_t) (b.end-b.beg))) ||
(MY_XML_OK != my_xml_leave(p,a.beg,(size_t) (a.end-a.beg))))
return MY_XML_ERROR;
}
else
{
sprintf(p->errstr,"%s unexpected (ident or string wanted)",
lex2str(lex));
return MY_XML_ERROR;
}
}
else if (MY_XML_IDENT == lex)
{
p->current_node_type= MY_XML_NODE_ATTR;
if ((MY_XML_OK != my_xml_enter(p,a.beg,(size_t) (a.end-a.beg))) ||
(MY_XML_OK != my_xml_leave(p,a.beg,(size_t) (a.end-a.beg))))
return MY_XML_ERROR;
}
else if ((MY_XML_STRING == lex) && exclam)
{
/*
We are in <!DOCTYPE>, e.g.
<!DOCTYPE name SYSTEM "SystemLiteral">
<!DOCTYPE name PUBLIC "PublidLiteral" "SystemLiteral">
Just skip "SystemLiteral" and "PublicidLiteral"
*/
}
else
break;
}
if (lex == MY_XML_SLASH)
{
if (MY_XML_OK != my_xml_leave(p,NULL,0))
return MY_XML_ERROR;
lex=my_xml_scan(p,&a);
}
gt:
if (question)
{
if (lex != MY_XML_QUESTION)
{
sprintf(p->errstr,"%s unexpected ('?' wanted)",lex2str(lex));
return MY_XML_ERROR;
}
if (MY_XML_OK != my_xml_leave(p,NULL,0))
return MY_XML_ERROR;
lex=my_xml_scan(p,&a);
}
if (exclam)
{
if (MY_XML_OK != my_xml_leave(p,NULL,0))
return MY_XML_ERROR;
}
if (lex != MY_XML_GT)
{
sprintf(p->errstr,"%s unexpected ('>' wanted)",lex2str(lex));
return MY_XML_ERROR;
}
}
else
{
a.beg=p->cur;
for ( ; (p->cur < p->end) && (p->cur[0] != '<') ; p->cur++);
a.end=p->cur;
if (!(p->flags & MY_XML_FLAG_SKIP_TEXT_NORMALIZATION))
my_xml_norm_text(&a);
if (a.beg != a.end)
{
my_xml_value(p,a.beg,(size_t) (a.end-a.beg));
}
}
}
if (p->attr.start[0])
{
sprintf(p->errstr,"unexpected END-OF-INPUT");
return MY_XML_ERROR;
}
return MY_XML_OK;
}
|
O3
|
c
|
my_xml_parse:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x118(%rdi), %rcx
movq %rcx, 0x120(%rdi)
movq %rsi, 0x128(%rdi)
movq %rsi, 0x130(%rdi)
leaq (%rsi,%rdx), %rax
movq %rax, 0x138(%rdi)
testq %rdx, %rdx
jle 0xd8be5
leaq -0x40(%rbp), %r15
cmpb $0x3c, (%rsi)
jne 0xd8927
movq %rbx, %rdi
movq %r15, %rsi
callq 0xd8caf
cmpl $0x43, %eax
je 0xd8bc7
cmpl $0x44, %eax
jne 0xd898c
movq 0x150(%rbx), %rax
testq %rax, %rax
je 0xd8bc7
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
addq $0x9, %rsi
subq %rsi, %rdx
addq $-0x3, %rdx
jmp 0xd8982
movq %rsi, -0x40(%rbp)
movq %rsi, %rdx
cmpq %rax, %rsi
jae 0xd894d
subq %rsi, %rax
movq %rsi, %rdx
cmpb $0x3c, (%rdx)
je 0xd894d
incq %rdx
movq %rdx, 0x130(%rbx)
decq %rax
jne 0xd8939
movq %rdx, -0x38(%rbp)
testb $0x2, (%rbx)
jne 0xd8966
movq %r15, %rdi
callq 0xd92e7
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
cmpq %rdx, %rsi
je 0xd8bc7
movq 0x150(%rbx), %rax
testq %rax, %rax
je 0xd8bc7
subq %rsi, %rdx
movq %rbx, %rdi
callq *%rax
jmp 0xd8bc7
movq %rbx, %rdi
movq %r15, %rsi
callq 0xd8caf
cmpl $0x2f, %eax
jne 0xd89de
movq %rbx, %rdi
movq %r15, %rsi
callq 0xd8caf
cmpl $0x49, %eax
jne 0xd8c45
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
subq %rsi, %rdx
movq %rbx, %rdi
callq 0xd8fad
testl %eax, %eax
jne 0xd8c97
movq %rbx, %rdi
movq %r15, %rsi
callq 0xd8caf
movl %eax, %r13d
jmp 0xd8bc1
movl %eax, %r14d
cmpl $0x21, %eax
sete %r12b
cmpl $0x3f, %eax
je 0xd89f3
cmpl $0x21, %r14d
jne 0xd8a00
movq %rbx, %rdi
movq %r15, %rsi
callq 0xd8caf
jmp 0xd8a06
movb $0x1, %r12b
movl %r14d, %eax
cmpl $0x49, %eax
jne 0xd8c31
movl $0x0, 0x4(%rbx)
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
subq %rsi, %rdx
movq %rbx, %rdi
callq 0xd9170
testl %eax, %eax
jne 0xd8c97
movb %r12b, -0x29(%rbp)
movl %r14d, %r12d
xorl $0x21, %r12d
movq %rbx, %rdi
movq %r15, %rsi
callq 0xd8caf
movl %eax, %r13d
xorl $0x53, %eax
orl %r12d, %eax
sete %al
cmpl $0x49, %r13d
je 0xd8a61
testb %al, %al
je 0xd8b4a
movq %rbx, %rdi
leaq -0x50(%rbp), %rsi
callq 0xd8caf
cmpl $0x49, %eax
je 0xd8aef
movl %eax, %r13d
cmpl $0x3d, %eax
jne 0xd8b2e
movq %rbx, %rdi
leaq -0x50(%rbp), %rsi
callq 0xd8caf
cmpl $0x53, %eax
je 0xd8a98
cmpl $0x49, %eax
jne 0xd8c59
movl $0x1, 0x4(%rbx)
movq -0x40(%rbp), %r13
movq -0x38(%rbp), %r15
subq %r13, %r15
movq %rbx, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0xd9170
testl %eax, %eax
jne 0xd8c97
movq 0x150(%rbx), %rax
testq %rax, %rax
je 0xd8ae4
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
subq %rsi, %rdx
movq %rbx, %rdi
callq *%rax
testl %eax, %eax
jne 0xd8c97
movq %rbx, %rdi
movq %r13, %rsi
movq %r15, %rdx
jmp 0xd8b20
movl $0x1, 0x4(%rbx)
movq -0x40(%rbp), %r15
movq -0x38(%rbp), %r13
subq %r15, %r13
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0xd9170
testl %eax, %eax
jne 0xd8c97
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0xd8fad
testl %eax, %eax
je 0xd8b3a
jmp 0xd8c97
cmpl $0x21, %r14d
jne 0xd8b46
cmpl $0x53, %r13d
jne 0xd8b46
movq %rbx, %rdi
leaq -0x40(%rbp), %r15
jmp 0xd8a3f
leaq -0x40(%rbp), %r15
cmpl $0x2f, %r13d
movb -0x29(%rbp), %r12b
jne 0xd8b76
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xd8fad
testl %eax, %eax
jne 0xd8c97
movq %rbx, %rdi
movq %r15, %rsi
callq 0xd8caf
movl %eax, %r13d
testb %r12b, %r12b
jne 0xd8ba7
cmpl $0x3f, %r13d
jne 0xd8c6d
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xd8fad
testl %eax, %eax
jne 0xd8c97
movq %rbx, %rdi
movq %r15, %rsi
callq 0xd8caf
movl %eax, %r13d
cmpl $0x21, %r14d
jne 0xd8bc1
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xd8fad
testl %eax, %eax
jne 0xd8c97
cmpl $0x3e, %r13d
jne 0xd8c1c
movq 0x130(%rbx), %rsi
movq 0x138(%rbx), %rax
cmpq %rax, %rsi
jb 0xd88e0
movq 0x118(%rbx), %rcx
cmpb $0x0, (%rcx)
je 0xd8c14
addq $0x8, %rbx
leaq 0x8d67(%rip), %rcx # 0xe195c
movl $0x1, %r14d
movl $0x80, %edx
movq %rbx, %rdi
movl $0x1, %esi
xorl %eax, %eax
callq 0x298e0
jmp 0xd8c9d
xorl %r14d, %r14d
jmp 0xd8c9d
addq $0x8, %rbx
movl %r13d, %edi
callq 0xd8f12
leaq 0x8d12(%rip), %rcx # 0xe1941
jmp 0xd8c80
addq $0x8, %rbx
movl %eax, %edi
callq 0xd8f12
leaq 0x8c98(%rip), %rcx # 0xe18db
jmp 0xd8c80
addq $0x8, %rbx
movl %eax, %edi
callq 0xd8f12
leaq 0x8c67(%rip), %rcx # 0xe18be
jmp 0xd8c80
addq $0x8, %rbx
movl %eax, %edi
callq 0xd8f12
leaq 0x8c94(%rip), %rcx # 0xe18ff
jmp 0xd8c80
addq $0x8, %rbx
movl %r13d, %edi
callq 0xd8f12
leaq 0x8ca6(%rip), %rcx # 0xe1926
movl $0x80, %edx
movq %rbx, %rdi
movl $0x1, %esi
movq %rax, %r8
xorl %eax, %eax
callq 0x298e0
movl $0x1, %r14d
movl %r14d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
my_xml_parse:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov rbx, rdi
mov rcx, [rdi+118h]
mov [rdi+120h], rcx
mov [rdi+128h], rsi
mov [rdi+130h], rsi
lea rax, [rsi+rdx]
mov [rdi+138h], rax
test rdx, rdx
jle loc_D8BE5
lea r15, [rbp+var_40]
loc_D88E0:
cmp byte ptr [rsi], 3Ch ; '<'
jnz short loc_D8927
mov rdi, rbx
mov rsi, r15
call my_xml_scan
cmp eax, 43h ; 'C'
jz loc_D8BC7
cmp eax, 44h ; 'D'
jnz loc_D898C
mov rax, [rbx+150h]
test rax, rax
jz loc_D8BC7
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_38]
add rsi, 9
sub rdx, rsi
add rdx, 0FFFFFFFFFFFFFFFDh
jmp short loc_D8982
loc_D8927:
mov [rbp+var_40], rsi
mov rdx, rsi
cmp rsi, rax
jnb short loc_D894D
sub rax, rsi
mov rdx, rsi
loc_D8939:
cmp byte ptr [rdx], 3Ch ; '<'
jz short loc_D894D
inc rdx
mov [rbx+130h], rdx
dec rax
jnz short loc_D8939
loc_D894D:
mov [rbp+var_38], rdx
test byte ptr [rbx], 2
jnz short loc_D8966
mov rdi, r15
call my_xml_norm_text
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_38]
loc_D8966:
cmp rsi, rdx
jz loc_D8BC7
mov rax, [rbx+150h]
test rax, rax
jz loc_D8BC7
sub rdx, rsi
loc_D8982:
mov rdi, rbx
call rax
jmp loc_D8BC7
loc_D898C:
mov rdi, rbx
mov rsi, r15
call my_xml_scan
cmp eax, 2Fh ; '/'
jnz short loc_D89DE
mov rdi, rbx
mov rsi, r15
call my_xml_scan
cmp eax, 49h ; 'I'
jnz loc_D8C45
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_38]
sub rdx, rsi
mov rdi, rbx
call my_xml_leave
test eax, eax
jnz loc_D8C97
mov rdi, rbx
mov rsi, r15
call my_xml_scan
mov r13d, eax
jmp loc_D8BC1
loc_D89DE:
mov r14d, eax
cmp eax, 21h ; '!'
setz r12b
cmp eax, 3Fh ; '?'
jz short loc_D89F3
cmp r14d, 21h ; '!'
jnz short loc_D8A00
loc_D89F3:
mov rdi, rbx
mov rsi, r15
call my_xml_scan
jmp short loc_D8A06
loc_D8A00:
mov r12b, 1
mov eax, r14d
loc_D8A06:
cmp eax, 49h ; 'I'
jnz loc_D8C31
mov dword ptr [rbx+4], 0
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_38]
sub rdx, rsi
mov rdi, rbx
call my_xml_enter
test eax, eax
jnz loc_D8C97
mov [rbp+var_29], r12b
mov r12d, r14d
xor r12d, 21h
mov rdi, rbx
loc_D8A3F:
mov rsi, r15
call my_xml_scan
mov r13d, eax
xor eax, 53h
or eax, r12d
setz al
cmp r13d, 49h ; 'I'
jz short loc_D8A61
test al, al
jz loc_D8B4A
loc_D8A61:
mov rdi, rbx
lea rsi, [rbp+var_50]
call my_xml_scan
cmp eax, 49h ; 'I'
jz short loc_D8AEF
mov r13d, eax
cmp eax, 3Dh ; '='
jnz loc_D8B2E
mov rdi, rbx
lea rsi, [rbp+var_50]
call my_xml_scan
cmp eax, 53h ; 'S'
jz short loc_D8A98
cmp eax, 49h ; 'I'
jnz loc_D8C59
loc_D8A98:
mov dword ptr [rbx+4], 1
mov r13, [rbp+var_40]
mov r15, [rbp+var_38]
sub r15, r13
mov rdi, rbx
mov rsi, r13
mov rdx, r15
call my_xml_enter
test eax, eax
jnz loc_D8C97
mov rax, [rbx+150h]
test rax, rax
jz short loc_D8AE4
mov rsi, [rbp+var_50]
mov rdx, [rbp+var_48]
sub rdx, rsi
mov rdi, rbx
call rax
test eax, eax
jnz loc_D8C97
loc_D8AE4:
mov rdi, rbx
mov rsi, r13
mov rdx, r15
jmp short loc_D8B20
loc_D8AEF:
mov dword ptr [rbx+4], 1
mov r15, [rbp+var_40]
mov r13, [rbp+var_38]
sub r13, r15
mov rdi, rbx
mov rsi, r15
mov rdx, r13
call my_xml_enter
test eax, eax
jnz loc_D8C97
mov rdi, rbx
mov rsi, r15
mov rdx, r13
loc_D8B20:
call my_xml_leave
test eax, eax
jz short loc_D8B3A
jmp loc_D8C97
loc_D8B2E:
cmp r14d, 21h ; '!'
jnz short loc_D8B46
cmp r13d, 53h ; 'S'
jnz short loc_D8B46
loc_D8B3A:
mov rdi, rbx
lea r15, [rbp+var_40]
jmp loc_D8A3F
loc_D8B46:
lea r15, [rbp+var_40]
loc_D8B4A:
cmp r13d, 2Fh ; '/'
mov r12b, [rbp+var_29]
jnz short loc_D8B76
mov rdi, rbx
xor esi, esi
xor edx, edx
call my_xml_leave
test eax, eax
jnz loc_D8C97
mov rdi, rbx
mov rsi, r15
call my_xml_scan
mov r13d, eax
loc_D8B76:
test r12b, r12b
jnz short loc_D8BA7
cmp r13d, 3Fh ; '?'
jnz loc_D8C6D
mov rdi, rbx
xor esi, esi
xor edx, edx
call my_xml_leave
test eax, eax
jnz loc_D8C97
mov rdi, rbx
mov rsi, r15
call my_xml_scan
mov r13d, eax
loc_D8BA7:
cmp r14d, 21h ; '!'
jnz short loc_D8BC1
mov rdi, rbx
xor esi, esi
xor edx, edx
call my_xml_leave
test eax, eax
jnz loc_D8C97
loc_D8BC1:
cmp r13d, 3Eh ; '>'
jnz short loc_D8C1C
loc_D8BC7:
mov rsi, [rbx+130h]
mov rax, [rbx+138h]
cmp rsi, rax
jb loc_D88E0
mov rcx, [rbx+118h]
loc_D8BE5:
cmp byte ptr [rcx], 0
jz short loc_D8C14
add rbx, 8
lea rcx, aUnexpectedEndO; "unexpected END-OF-INPUT"
mov r14d, 1
mov edx, 80h
mov rdi, rbx
mov esi, 1
xor eax, eax
call ___sprintf_chk
jmp loc_D8C9D
loc_D8C14:
xor r14d, r14d
jmp loc_D8C9D
loc_D8C1C:
add rbx, 8
mov edi, r13d
call lex2str
lea rcx, aSUnexpectedWan; "%s unexpected ('>' wanted)"
jmp short loc_D8C80
loc_D8C31:
add rbx, 8
mov edi, eax
call lex2str
lea rcx, aSUnexpectedIde; "%s unexpected (ident or '/' wanted)"
jmp short loc_D8C80
loc_D8C45:
add rbx, 8
mov edi, eax
call lex2str
lea rcx, aSUnexpectedIde_0; "%s unexpected (ident wanted)"
jmp short loc_D8C80
loc_D8C59:
add rbx, 8
mov edi, eax
call lex2str
lea rcx, aSUnexpectedIde_1; "%s unexpected (ident or string wanted)"
jmp short loc_D8C80
loc_D8C6D:
add rbx, 8
mov edi, r13d
call lex2str
lea rcx, aSUnexpectedWan_0; "%s unexpected ('?' wanted)"
loc_D8C80:
mov edx, 80h
mov rdi, rbx
mov esi, 1
mov r8, rax
xor eax, eax
call ___sprintf_chk
loc_D8C97:
mov r14d, 1
loc_D8C9D:
mov eax, r14d
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long my_xml_parse(long long a1, _BYTE *a2, long long a3)
{
_BYTE *v4; // rcx
_BYTE *v5; // rax
int v6; // eax
void ( *v7)(long long, _BYTE *, long long); // rax
long long v8; // rdx
_BYTE *v9; // rdx
long long v10; // rax
unsigned int v11; // eax
unsigned int v12; // eax
unsigned int v13; // r13d
unsigned int v14; // r14d
bool v15; // r12
long long i; // rdi
unsigned int v17; // eax
unsigned int v18; // eax
_BYTE *v19; // r13
long long v20; // r15
unsigned int ( *v21)(long long, _QWORD, _QWORD); // rax
long long v22; // rdi
_BYTE *v23; // rsi
long long v24; // rdx
_BYTE *v25; // r15
long long v26; // r13
bool v27; // r12
unsigned int v28; // r14d
long long v29; // rax
long long v30; // rax
long long v31; // rax
long long v32; // rax
long long v33; // rax
_QWORD v35[2]; // [rsp+0h] [rbp-50h] BYREF
_BYTE *v36; // [rsp+10h] [rbp-40h] BYREF
_BYTE *v37; // [rsp+18h] [rbp-38h]
bool v38; // [rsp+27h] [rbp-29h]
v4 = *(_BYTE **)(a1 + 280);
*(_QWORD *)(a1 + 288) = v4;
*(_QWORD *)(a1 + 296) = a2;
*(_QWORD *)(a1 + 304) = a2;
v5 = &a2[a3];
*(_QWORD *)(a1 + 312) = &a2[a3];
if ( a3 <= 0 )
goto LABEL_57;
while ( *a2 != 60 )
{
v36 = a2;
v9 = a2;
if ( a2 < v5 )
{
v10 = v5 - a2;
v9 = a2;
do
{
if ( *v9 == 60 )
break;
*(_QWORD *)(a1 + 304) = ++v9;
--v10;
}
while ( v10 );
}
v37 = v9;
if ( (*(_BYTE *)a1 & 2) == 0 )
{
my_xml_norm_text(&v36);
a2 = v36;
v9 = v37;
}
if ( a2 != v9 )
{
v7 = *(void ( **)(long long, _BYTE *, long long))(a1 + 336);
if ( v7 )
{
v8 = v9 - a2;
LABEL_16:
v7(a1, a2, v8);
}
}
LABEL_55:
a2 = *(_BYTE **)(a1 + 304);
v5 = *(_BYTE **)(a1 + 312);
if ( a2 >= v5 )
{
v4 = *(_BYTE **)(a1 + 280);
LABEL_57:
if ( *v4 )
{
v28 = 1;
__sprintf_chk(a1 + 8, 1LL, 128LL, "unexpected END-OF-INPUT");
}
else
{
return 0;
}
return v28;
}
}
v6 = my_xml_scan(a1, &v36);
if ( v6 == 67 )
goto LABEL_55;
if ( v6 == 68 )
{
v7 = *(void ( **)(long long, _BYTE *, long long))(a1 + 336);
if ( !v7 )
goto LABEL_55;
a2 = v36 + 9;
v8 = v37 - (v36 + 9) - 3;
goto LABEL_16;
}
v11 = my_xml_scan(a1, &v36);
if ( v11 == 47 )
{
v12 = my_xml_scan(a1, &v36);
if ( v12 == 73 )
{
if ( !(unsigned int)my_xml_leave(a1, v36, v37 - v36) )
{
v13 = my_xml_scan(a1, &v36);
goto LABEL_54;
}
}
else
{
v31 = lex2str(v12);
__sprintf_chk(a1 + 8, 1LL, 128LL, "%s unexpected (ident wanted)", v31);
}
return 1;
}
v14 = v11;
v15 = v11 == 33;
if ( v11 == 63 || v11 == 33 )
v11 = my_xml_scan(a1, &v36);
else
v15 = 1;
if ( v11 != 73 )
{
v30 = lex2str(v11);
__sprintf_chk(a1 + 8, 1LL, 128LL, "%s unexpected (ident or '/' wanted)", v30);
return 1;
}
*(_DWORD *)(a1 + 4) = 0;
if ( (unsigned int)my_xml_enter(a1, v36, v37 - v36) )
return 1;
v38 = v15;
for ( i = a1; ; i = a1 )
{
v13 = my_xml_scan(i, &v36);
if ( v13 != 73 )
{
if ( v14 ^ 0x21 | v13 ^ 0x53 )
break;
}
v17 = my_xml_scan(a1, v35);
if ( v17 == 73 )
{
*(_DWORD *)(a1 + 4) = 1;
v25 = v36;
v26 = v37 - v36;
if ( (unsigned int)my_xml_enter(a1, v36, v37 - v36) )
return 1;
v22 = a1;
v23 = v25;
v24 = v26;
LABEL_40:
if ( (unsigned int)my_xml_leave(v22, v23, v24) )
return 1;
continue;
}
v13 = v17;
if ( v17 == 61 )
{
v18 = my_xml_scan(a1, v35);
if ( v18 != 83 && v18 != 73 )
{
v32 = lex2str(v18);
__sprintf_chk(a1 + 8, 1LL, 128LL, "%s unexpected (ident or string wanted)", v32);
return 1;
}
*(_DWORD *)(a1 + 4) = 1;
v19 = v36;
v20 = v37 - v36;
if ( (unsigned int)my_xml_enter(a1, v36, v37 - v36) )
return 1;
v21 = *(unsigned int ( **)(long long, _QWORD, _QWORD))(a1 + 336);
if ( v21 )
{
if ( v21(a1, v35[0], v35[1] - v35[0]) )
return 1;
}
v22 = a1;
v23 = v19;
v24 = v20;
goto LABEL_40;
}
if ( v14 != 33 || v17 != 83 )
break;
}
v27 = v38;
if ( v13 == 47 )
{
if ( (unsigned int)my_xml_leave(a1, 0LL, 0LL) )
return 1;
v13 = my_xml_scan(a1, &v36);
}
if ( v27 )
goto LABEL_52;
if ( v13 == 63 )
{
if ( (unsigned int)my_xml_leave(a1, 0LL, 0LL) )
return 1;
v13 = my_xml_scan(a1, &v36);
LABEL_52:
if ( v14 != 33 || !(unsigned int)my_xml_leave(a1, 0LL, 0LL) )
{
LABEL_54:
if ( v13 == 62 )
goto LABEL_55;
v29 = lex2str(v13);
__sprintf_chk(a1 + 8, 1LL, 128LL, "%s unexpected ('>' wanted)", v29);
}
}
else
{
v33 = lex2str(v13);
__sprintf_chk(a1 + 8, 1LL, 128LL, "%s unexpected ('?' wanted)", v33);
}
return 1;
}
|
my_xml_parse:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RBX,RDI
MOV RCX,qword ptr [RDI + 0x118]
MOV qword ptr [RDI + 0x120],RCX
MOV qword ptr [RDI + 0x128],RSI
MOV qword ptr [RDI + 0x130],RSI
LEA RAX,[RSI + RDX*0x1]
MOV qword ptr [RDI + 0x138],RAX
TEST RDX,RDX
JLE 0x001d8be5
LEA R15,[RBP + -0x40]
LAB_001d88e0:
CMP byte ptr [RSI],0x3c
JNZ 0x001d8927
MOV RDI,RBX
MOV RSI,R15
CALL 0x001d8caf
CMP EAX,0x43
JZ 0x001d8bc7
CMP EAX,0x44
JNZ 0x001d898c
MOV RAX,qword ptr [RBX + 0x150]
TEST RAX,RAX
JZ 0x001d8bc7
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x38]
ADD RSI,0x9
SUB RDX,RSI
ADD RDX,-0x3
JMP 0x001d8982
LAB_001d8927:
MOV qword ptr [RBP + -0x40],RSI
MOV RDX,RSI
CMP RSI,RAX
JNC 0x001d894d
SUB RAX,RSI
MOV RDX,RSI
LAB_001d8939:
CMP byte ptr [RDX],0x3c
JZ 0x001d894d
INC RDX
MOV qword ptr [RBX + 0x130],RDX
DEC RAX
JNZ 0x001d8939
LAB_001d894d:
MOV qword ptr [RBP + -0x38],RDX
TEST byte ptr [RBX],0x2
JNZ 0x001d8966
MOV RDI,R15
CALL 0x001d92e7
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x38]
LAB_001d8966:
CMP RSI,RDX
JZ 0x001d8bc7
MOV RAX,qword ptr [RBX + 0x150]
TEST RAX,RAX
JZ 0x001d8bc7
SUB RDX,RSI
LAB_001d8982:
MOV RDI,RBX
CALL RAX
JMP 0x001d8bc7
LAB_001d898c:
MOV RDI,RBX
MOV RSI,R15
CALL 0x001d8caf
CMP EAX,0x2f
JNZ 0x001d89de
MOV RDI,RBX
MOV RSI,R15
CALL 0x001d8caf
CMP EAX,0x49
JNZ 0x001d8c45
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x38]
SUB RDX,RSI
MOV RDI,RBX
CALL 0x001d8fad
TEST EAX,EAX
JNZ 0x001d8c97
MOV RDI,RBX
MOV RSI,R15
CALL 0x001d8caf
MOV R13D,EAX
JMP 0x001d8bc1
LAB_001d89de:
MOV R14D,EAX
CMP EAX,0x21
SETZ R12B
CMP EAX,0x3f
JZ 0x001d89f3
CMP R14D,0x21
JNZ 0x001d8a00
LAB_001d89f3:
MOV RDI,RBX
MOV RSI,R15
CALL 0x001d8caf
JMP 0x001d8a06
LAB_001d8a00:
MOV R12B,0x1
MOV EAX,R14D
LAB_001d8a06:
CMP EAX,0x49
JNZ 0x001d8c31
MOV dword ptr [RBX + 0x4],0x0
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x38]
SUB RDX,RSI
MOV RDI,RBX
CALL 0x001d9170
TEST EAX,EAX
JNZ 0x001d8c97
MOV byte ptr [RBP + -0x29],R12B
MOV R12D,R14D
XOR R12D,0x21
MOV RDI,RBX
LAB_001d8a3f:
MOV RSI,R15
CALL 0x001d8caf
MOV R13D,EAX
XOR EAX,0x53
OR EAX,R12D
SETZ AL
CMP R13D,0x49
JZ 0x001d8a61
TEST AL,AL
JZ 0x001d8b4a
LAB_001d8a61:
MOV RDI,RBX
LEA RSI,[RBP + -0x50]
CALL 0x001d8caf
CMP EAX,0x49
JZ 0x001d8aef
MOV R13D,EAX
CMP EAX,0x3d
JNZ 0x001d8b2e
MOV RDI,RBX
LEA RSI,[RBP + -0x50]
CALL 0x001d8caf
CMP EAX,0x53
JZ 0x001d8a98
CMP EAX,0x49
JNZ 0x001d8c59
LAB_001d8a98:
MOV dword ptr [RBX + 0x4],0x1
MOV R13,qword ptr [RBP + -0x40]
MOV R15,qword ptr [RBP + -0x38]
SUB R15,R13
MOV RDI,RBX
MOV RSI,R13
MOV RDX,R15
CALL 0x001d9170
TEST EAX,EAX
JNZ 0x001d8c97
MOV RAX,qword ptr [RBX + 0x150]
TEST RAX,RAX
JZ 0x001d8ae4
MOV RSI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x48]
SUB RDX,RSI
MOV RDI,RBX
CALL RAX
TEST EAX,EAX
JNZ 0x001d8c97
LAB_001d8ae4:
MOV RDI,RBX
MOV RSI,R13
MOV RDX,R15
JMP 0x001d8b20
LAB_001d8aef:
MOV dword ptr [RBX + 0x4],0x1
MOV R15,qword ptr [RBP + -0x40]
MOV R13,qword ptr [RBP + -0x38]
SUB R13,R15
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R13
CALL 0x001d9170
TEST EAX,EAX
JNZ 0x001d8c97
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R13
LAB_001d8b20:
CALL 0x001d8fad
TEST EAX,EAX
JZ 0x001d8b3a
JMP 0x001d8c97
LAB_001d8b2e:
CMP R14D,0x21
JNZ 0x001d8b46
CMP R13D,0x53
JNZ 0x001d8b46
LAB_001d8b3a:
MOV RDI,RBX
LEA R15,[RBP + -0x40]
JMP 0x001d8a3f
LAB_001d8b46:
LEA R15,[RBP + -0x40]
LAB_001d8b4a:
CMP R13D,0x2f
MOV R12B,byte ptr [RBP + -0x29]
JNZ 0x001d8b76
MOV RDI,RBX
XOR ESI,ESI
XOR EDX,EDX
CALL 0x001d8fad
TEST EAX,EAX
JNZ 0x001d8c97
MOV RDI,RBX
MOV RSI,R15
CALL 0x001d8caf
MOV R13D,EAX
LAB_001d8b76:
TEST R12B,R12B
JNZ 0x001d8ba7
CMP R13D,0x3f
JNZ 0x001d8c6d
MOV RDI,RBX
XOR ESI,ESI
XOR EDX,EDX
CALL 0x001d8fad
TEST EAX,EAX
JNZ 0x001d8c97
MOV RDI,RBX
MOV RSI,R15
CALL 0x001d8caf
MOV R13D,EAX
LAB_001d8ba7:
CMP R14D,0x21
JNZ 0x001d8bc1
MOV RDI,RBX
XOR ESI,ESI
XOR EDX,EDX
CALL 0x001d8fad
TEST EAX,EAX
JNZ 0x001d8c97
LAB_001d8bc1:
CMP R13D,0x3e
JNZ 0x001d8c1c
LAB_001d8bc7:
MOV RSI,qword ptr [RBX + 0x130]
MOV RAX,qword ptr [RBX + 0x138]
CMP RSI,RAX
JC 0x001d88e0
MOV RCX,qword ptr [RBX + 0x118]
LAB_001d8be5:
CMP byte ptr [RCX],0x0
JZ 0x001d8c14
ADD RBX,0x8
LEA RCX,[0x1e195c]
MOV R14D,0x1
MOV EDX,0x80
MOV RDI,RBX
MOV ESI,0x1
XOR EAX,EAX
CALL 0x001298e0
JMP 0x001d8c9d
LAB_001d8c14:
XOR R14D,R14D
JMP 0x001d8c9d
LAB_001d8c1c:
ADD RBX,0x8
MOV EDI,R13D
CALL 0x001d8f12
LEA RCX,[0x1e1941]
JMP 0x001d8c80
LAB_001d8c31:
ADD RBX,0x8
MOV EDI,EAX
CALL 0x001d8f12
LEA RCX,[0x1e18db]
JMP 0x001d8c80
LAB_001d8c45:
ADD RBX,0x8
MOV EDI,EAX
CALL 0x001d8f12
LEA RCX,[0x1e18be]
JMP 0x001d8c80
LAB_001d8c59:
ADD RBX,0x8
MOV EDI,EAX
CALL 0x001d8f12
LEA RCX,[0x1e18ff]
JMP 0x001d8c80
LAB_001d8c6d:
ADD RBX,0x8
MOV EDI,R13D
CALL 0x001d8f12
LEA RCX,[0x1e1926]
LAB_001d8c80:
MOV EDX,0x80
MOV RDI,RBX
MOV ESI,0x1
MOV R8,RAX
XOR EAX,EAX
CALL 0x001298e0
LAB_001d8c97:
MOV R14D,0x1
LAB_001d8c9d:
MOV EAX,R14D
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Type propagation algorithm not settling */
bool my_xml_parse(byte *param_1,char *param_2,long param_3)
{
char cVar1;
int iVar2;
int iVar3;
code *pcVar4;
int8 uVar5;
char *pcVar6;
char *pcVar7;
long lVar8;
bool bVar9;
long local_58;
long local_50;
char *local_48;
char *local_40;
char local_31;
pcVar7 = *(char **)(param_1 + 0x118);
*(char **)(param_1 + 0x120) = pcVar7;
*(char **)(param_1 + 0x128) = param_2;
*(char **)(param_1 + 0x130) = param_2;
pcVar6 = param_2 + param_3;
*(char **)(param_1 + 0x138) = pcVar6;
if (0 < param_3) {
do {
if (*param_2 == '<') {
iVar2 = my_xml_scan(param_1,&local_48);
if (iVar2 != 0x43) {
if (iVar2 == 0x44) {
pcVar4 = *(code **)(param_1 + 0x150);
if (pcVar4 != (code *)0x0) {
pcVar7 = local_40 + (-3 - (long)(local_48 + 9));
pcVar6 = local_48 + 9;
goto LAB_001d8982;
}
}
else {
iVar2 = my_xml_scan(param_1,&local_48);
if (iVar2 != 0x2f) {
bVar9 = iVar2 == 0x21;
if ((iVar2 == 0x3f) || (iVar2 == 0x21)) {
iVar3 = my_xml_scan(param_1,&local_48);
}
else {
bVar9 = true;
iVar3 = iVar2;
}
if (iVar3 == 0x49) {
param_1[4] = 0;
param_1[5] = 0;
param_1[6] = 0;
param_1[7] = 0;
iVar3 = my_xml_enter(param_1,local_48,(long)local_40 - (long)local_48);
local_31 = bVar9;
do {
if (iVar3 != 0) {
return true;
}
LAB_001d8a3f:
iVar3 = my_xml_scan(param_1,&local_48);
if ((iVar3 != 0x49) && (iVar3 != 0x53 || iVar2 != 0x21)) goto LAB_001d8b4a;
iVar3 = my_xml_scan(param_1,&local_58);
pcVar6 = local_48;
if (iVar3 == 0x49) {
param_1[4] = 1;
param_1[5] = 0;
param_1[6] = 0;
param_1[7] = 0;
lVar8 = (long)local_40 - (long)local_48;
iVar3 = my_xml_enter(param_1,local_48,lVar8);
goto joined_r0x001d8b11;
}
if (iVar3 != 0x3d) goto LAB_001d8b2e;
iVar3 = my_xml_scan(param_1,&local_58);
pcVar6 = local_48;
if ((iVar3 != 0x53) && (iVar3 != 0x49)) {
uVar5 = lex2str(iVar3);
pcVar6 = "%s unexpected (ident or string wanted)";
goto LAB_001d8c80;
}
param_1[4] = 1;
param_1[5] = 0;
param_1[6] = 0;
param_1[7] = 0;
lVar8 = (long)local_40 - (long)local_48;
iVar3 = my_xml_enter(param_1,local_48,lVar8);
if (iVar3 != 0) {
return true;
}
if (*(code **)(param_1 + 0x150) != (code *)0x0) {
iVar3 = (**(code **)(param_1 + 0x150))(param_1,local_58,local_50 - local_58);
joined_r0x001d8b11:
if (iVar3 != 0) {
return true;
}
}
iVar3 = my_xml_leave(param_1,pcVar6,lVar8);
} while( true );
}
uVar5 = lex2str(iVar3);
pcVar6 = "%s unexpected (ident or \'/\' wanted)";
LAB_001d8c80:
__sprintf_chk(param_1 + 8,1,0x80,pcVar6,uVar5);
return true;
}
iVar2 = my_xml_scan(param_1,&local_48);
if (iVar2 != 0x49) {
uVar5 = lex2str(iVar2);
pcVar6 = "%s unexpected (ident wanted)";
goto LAB_001d8c80;
}
iVar2 = my_xml_leave(param_1,local_48,(long)local_40 - (long)local_48);
if (iVar2 != 0) {
return true;
}
iVar3 = my_xml_scan(param_1,&local_48);
LAB_001d8bc1:
if (iVar3 != 0x3e) {
uVar5 = lex2str(iVar3);
pcVar6 = "%s unexpected (\'>\' wanted)";
goto LAB_001d8c80;
}
}
}
}
else {
local_40 = param_2;
if (param_2 < pcVar6) {
lVar8 = (long)pcVar6 - (long)param_2;
do {
if (*local_40 == '<') break;
local_40 = local_40 + 1;
*(char **)(param_1 + 0x130) = local_40;
lVar8 = lVar8 + -1;
} while (lVar8 != 0);
}
local_48 = param_2;
if ((*param_1 & 2) == 0) {
my_xml_norm_text(&local_48);
}
if ((local_48 != local_40) && (pcVar4 = *(code **)(param_1 + 0x150), pcVar4 != (code *)0x0))
{
pcVar7 = local_40 + -(long)local_48;
pcVar6 = local_48;
LAB_001d8982:
(*pcVar4)(param_1,pcVar6,pcVar7);
}
}
param_2 = *(char **)(param_1 + 0x130);
pcVar6 = *(char **)(param_1 + 0x138);
} while (param_2 < pcVar6);
pcVar7 = *(char **)(param_1 + 0x118);
}
cVar1 = *pcVar7;
if (cVar1 != '\0') {
__sprintf_chk(param_1 + 8,1,0x80,"unexpected END-OF-INPUT");
}
return cVar1 != '\0';
LAB_001d8b2e:
if ((iVar2 != 0x21) || (iVar3 != 0x53)) {
LAB_001d8b4a:
cVar1 = local_31;
if (iVar3 == 0x2f) {
iVar3 = my_xml_leave(param_1,0,0);
if (iVar3 != 0) {
return true;
}
iVar3 = my_xml_scan(param_1,&local_48);
}
if (cVar1 == '\0') {
if (iVar3 != 0x3f) {
uVar5 = lex2str(iVar3);
pcVar6 = "%s unexpected (\'?\' wanted)";
goto LAB_001d8c80;
}
iVar3 = my_xml_leave(param_1,0,0);
if (iVar3 != 0) {
return true;
}
iVar3 = my_xml_scan(param_1,&local_48);
}
if ((iVar2 == 0x21) && (iVar2 = my_xml_leave(param_1,0,0), iVar2 != 0)) {
return true;
}
goto LAB_001d8bc1;
}
goto LAB_001d8a3f;
}
|
|
14,657
|
Settings::setWidth(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
666mxvbee[P]BattleShip/lib/Settings/Settings.cpp
|
std::string Settings::setWidth(const std::string& N) {
std::lock_guard<std::mutex> lock(settings_mutex);
std::regex valid_number_regex("^\\d+$");
if (!std::regex_match(N, valid_number_regex)) {
return "failed";
}
uint64_t value = std::stoull(N);
width = value;
return "ok";
}
|
O0
|
cpp
|
Settings::setWidth(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x80(%rbp)
movq %rdi, %rax
movq %rax, -0x78(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rsi
movq %rsi, -0x70(%rbp)
leaq -0x20(%rbp), %rdi
callq 0xb200
leaq 0x36a65(%rip), %rsi # 0x4028f
leaq -0x40(%rbp), %rdi
movl $0x10, %edx
callq 0xb3a0
jmp 0x983a
movq -0x18(%rbp), %rdi
leaq -0x40(%rbp), %rsi
xorl %edx, %edx
callq 0xb440
movb %al, -0x81(%rbp)
jmp 0x9851
movb -0x81(%rbp), %al
testb $0x1, %al
jne 0x98d7
jmp 0x985d
leaq -0x4d(%rbp), %rdi
movq %rdi, -0x90(%rbp)
callq 0x7650
movq -0x80(%rbp), %rdi
movq -0x90(%rbp), %rdx
leaq 0x36a09(%rip), %rsi # 0x40288
callq 0xb110
jmp 0x9886
leaq -0x4d(%rbp), %rdi
callq 0x73d0
movl $0x1, -0x54(%rbp)
jmp 0x995b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x9983
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x997a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x4d(%rbp), %rdi
callq 0x73d0
jmp 0x997a
movq -0x18(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0xb490
movq %rax, -0x98(%rbp)
jmp 0x98f2
movq -0x70(%rbp), %rax
movq -0x98(%rbp), %rcx
movq %rcx, -0x60(%rbp)
movq -0x60(%rbp), %rcx
movq %rcx, 0x48(%rax)
leaq -0x61(%rbp), %rdi
movq %rdi, -0xa0(%rbp)
callq 0x7650
movq -0x80(%rbp), %rdi
movq -0xa0(%rbp), %rdx
leaq 0x3695a(%rip), %rsi # 0x40285
callq 0xb110
jmp 0x9932
leaq -0x61(%rbp), %rdi
callq 0x73d0
movl $0x1, -0x54(%rbp)
jmp 0x995b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x61(%rbp), %rdi
callq 0x73d0
jmp 0x997a
leaq -0x40(%rbp), %rdi
callq 0xb4d0
leaq -0x20(%rbp), %rdi
callq 0xb290
movq -0x78(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
leaq -0x40(%rbp), %rdi
callq 0xb4d0
leaq -0x20(%rbp), %rdi
callq 0xb290
movq -0x48(%rbp), %rdi
callq 0x7640
nopw %cs:(%rax,%rax)
|
_ZN8Settings8setWidthERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
mov rbp, rsp
sub rsp, 0A0h
mov [rbp+var_80], rdi
mov rax, rdi
mov [rbp+var_78], rax
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rsi, [rbp+var_10]
mov [rbp+var_70], rsi
lea rdi, [rbp+var_20]
call _ZNSt10lock_guardISt5mutexEC2ERS0_; std::lock_guard<std::mutex>::lock_guard(std::mutex&)
lea rsi, aD; "^\\d+$"
lea rdi, [rbp+var_40]
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)
jmp short $+2
loc_983A:
mov rdi, [rbp+var_18]
lea rsi, [rbp+var_40]
xor edx, edx
call _ZSt11regex_matchISt11char_traitsIcESaIcEcNSt7__cxx1112regex_traitsIcEEEbRKNS3_12basic_stringIT1_T_T0_EERKNS3_11basic_regexIS7_T2_EENSt15regex_constants15match_flag_typeE; std::regex_match<std::char_traits<char>,std::allocator<char>,char,std::regex_traits<char>>(std::string const&,std::basic_regex<char,std::regex_traits<char>> const&,std::regex_constants::match_flag_type)
mov [rbp+var_81], al
jmp short $+2
loc_9851:
mov al, [rbp+var_81]
test al, 1
jnz short loc_98D7
jmp short $+2
loc_985D:
lea rdi, [rbp+var_4D]
mov [rbp+var_90], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdi, [rbp+var_80]
mov rdx, [rbp+var_90]
lea rsi, aFailed; "failed"
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_9886:
lea rdi, [rbp+var_4D]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov [rbp+var_54], 1
jmp loc_995B
mov rcx, rax
mov eax, edx
mov [rbp+var_48], rcx
mov [rbp+var_4C], eax
jmp loc_9983
mov rcx, rax
mov eax, edx
mov [rbp+var_48], rcx
mov [rbp+var_4C], eax
jmp loc_997A
mov rcx, rax
mov eax, edx
mov [rbp+var_48], rcx
mov [rbp+var_4C], eax
lea rdi, [rbp+var_4D]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_997A
loc_98D7:
mov rdi, [rbp+var_18]
xor eax, eax
mov esi, eax
mov edx, 0Ah
call _ZNSt7__cxx116stoullERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi; std::stoull(std::string const&,ulong *,int)
mov [rbp+var_98], rax
jmp short $+2
loc_98F2:
mov rax, [rbp+var_70]
mov rcx, [rbp+var_98]
mov [rbp+var_60], rcx
mov rcx, [rbp+var_60]
mov [rax+48h], rcx
lea rdi, [rbp+var_61]
mov [rbp+var_A0], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdi, [rbp+var_80]
mov rdx, [rbp+var_A0]
lea rsi, aOk; "ok"
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_9932:
lea rdi, [rbp+var_61]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov [rbp+var_54], 1
jmp short loc_995B
mov rcx, rax
mov eax, edx
mov [rbp+var_48], rcx
mov [rbp+var_4C], eax
lea rdi, [rbp+var_61]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_997A
loc_995B:
lea rdi, [rbp+var_40]
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; std::basic_regex<char,std::regex_traits<char>>::~basic_regex()
lea rdi, [rbp+var_20]
call _ZNSt10lock_guardISt5mutexED2Ev; std::lock_guard<std::mutex>::~lock_guard()
mov rax, [rbp+var_78]
add rsp, 0A0h
pop rbp
retn
loc_997A:
lea rdi, [rbp+var_40]
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; std::basic_regex<char,std::regex_traits<char>>::~basic_regex()
loc_9983:
lea rdi, [rbp+var_20]
call _ZNSt10lock_guardISt5mutexED2Ev; std::lock_guard<std::mutex>::~lock_guard()
mov rdi, [rbp+var_48]
call __Unwind_Resume
|
long long Settings::setWidth(long long a1, long long a2, long long a3)
{
char v4; // [rsp+3Fh] [rbp-61h] BYREF
long long v5; // [rsp+40h] [rbp-60h]
int v6; // [rsp+4Ch] [rbp-54h]
char v7; // [rsp+53h] [rbp-4Dh] BYREF
_BYTE v8[32]; // [rsp+60h] [rbp-40h] BYREF
_BYTE v9[8]; // [rsp+80h] [rbp-20h] BYREF
long long v10; // [rsp+88h] [rbp-18h]
long long v11; // [rsp+90h] [rbp-10h]
long long v12; // [rsp+98h] [rbp-8h]
v12 = a1;
v11 = a2;
v10 = a3;
std::lock_guard<std::mutex>::lock_guard(v9);
std::basic_regex<char,std::regex_traits<char>>::basic_regex(v8, "^\\d+$", 16LL);
if ( (std::regex_match<std::char_traits<char>,std::allocator<char>,char,std::regex_traits<char>>(v10, v8, 0LL) & 1) != 0 )
{
v5 = std::stoull(v10, 0LL, 10LL);
*(_QWORD *)(a2 + 72) = v5;
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>(a1, "ok", &v4);
std::allocator<char>::~allocator(&v4);
}
else
{
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>(a1, "failed", &v7);
std::allocator<char>::~allocator(&v7);
}
v6 = 1;
std::basic_regex<char,std::regex_traits<char>>::~basic_regex(v8);
std::lock_guard<std::mutex>::~lock_guard(v9);
return a1;
}
|
setWidth:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xa0
MOV qword ptr [RBP + -0x80],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0x78],RAX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RSI,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x70],RSI
LEA RDI,[RBP + -0x20]
CALL 0x0010b200
LAB_00109823:
LEA RSI,[0x14028f]
LEA RDI,[RBP + -0x40]
MOV EDX,0x10
CALL 0x0010b3a0
JMP 0x0010983a
LAB_0010983a:
MOV RDI,qword ptr [RBP + -0x18]
LAB_0010983e:
LEA RSI,[RBP + -0x40]
XOR EDX,EDX
CALL 0x0010b440
MOV byte ptr [RBP + -0x81],AL
JMP 0x00109851
LAB_00109851:
MOV AL,byte ptr [RBP + -0x81]
TEST AL,0x1
JNZ 0x001098d7
JMP 0x0010985d
LAB_0010985d:
LEA RDI,[RBP + -0x4d]
MOV qword ptr [RBP + -0x90],RDI
CALL 0x00107650
MOV RDI,qword ptr [RBP + -0x80]
MOV RDX,qword ptr [RBP + -0x90]
LAB_00109878:
LEA RSI,[0x140288]
CALL 0x0010b110
JMP 0x00109886
LAB_00109886:
LEA RDI,[RBP + -0x4d]
CALL 0x001073d0
MOV dword ptr [RBP + -0x54],0x1
JMP 0x0010995b
LAB_001098d7:
MOV RDI,qword ptr [RBP + -0x18]
LAB_001098db:
XOR EAX,EAX
MOV ESI,EAX
MOV EDX,0xa
CALL 0x0010b490
MOV qword ptr [RBP + -0x98],RAX
JMP 0x001098f2
LAB_001098f2:
MOV RAX,qword ptr [RBP + -0x70]
MOV RCX,qword ptr [RBP + -0x98]
MOV qword ptr [RBP + -0x60],RCX
MOV RCX,qword ptr [RBP + -0x60]
MOV qword ptr [RAX + 0x48],RCX
LEA RDI,[RBP + -0x61]
MOV qword ptr [RBP + -0xa0],RDI
CALL 0x00107650
MOV RDI,qword ptr [RBP + -0x80]
MOV RDX,qword ptr [RBP + -0xa0]
LAB_00109924:
LEA RSI,[0x140285]
CALL 0x0010b110
LAB_00109930:
JMP 0x00109932
LAB_00109932:
LEA RDI,[RBP + -0x61]
CALL 0x001073d0
MOV dword ptr [RBP + -0x54],0x1
JMP 0x0010995b
LAB_0010995b:
LEA RDI,[RBP + -0x40]
CALL 0x0010b4d0
LEA RDI,[RBP + -0x20]
CALL 0x0010b290
MOV RAX,qword ptr [RBP + -0x78]
ADD RSP,0xa0
POP RBP
RET
|
/* Settings::setWidth(std::__cxx11::string const&) */
string * Settings::setWidth(string *param_1)
{
bool bVar1;
string *in_RDX;
mutex *in_RSI;
allocator local_69;
int8 local_68;
int4 local_5c;
allocator local_55 [13];
basic_regex<char,std::__cxx11::regex_traits<char>> local_48 [32];
lock_guard<std::mutex> local_28 [8];
string *local_20;
string *local_10;
local_20 = in_RDX;
local_10 = param_1;
std::lock_guard<std::mutex>::lock_guard(local_28,in_RSI);
/* try { // try from 00109823 to 00109837 has its CatchHandler @ 0010989b */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
(local_48,"^\\d+$",0x10);
/* try { // try from 0010983e to 00109848 has its CatchHandler @ 001098ac */
bVar1 = std::
regex_match<std::char_traits<char>,std::allocator<char>,char,std::__cxx11::regex_traits<char>>
(local_20,local_48,0);
if (bVar1) {
/* try { // try from 001098db to 001098e8 has its CatchHandler @ 001098ac */
local_68 = std::__cxx11::stoull(local_20,(ulong *)0x0,10);
*(int8 *)(in_RSI + 0x48) = local_68;
std::allocator<char>::allocator();
/* try { // try from 00109924 to 0010992f has its CatchHandler @ 00109944 */
std::__cxx11::string::string<std::allocator<char>>(param_1,"ok",&local_69);
std::allocator<char>::~allocator((allocator<char> *)&local_69);
}
else {
std::allocator<char>::allocator();
/* try { // try from 00109878 to 00109883 has its CatchHandler @ 001098bd */
std::__cxx11::string::string<std::allocator<char>>(param_1,"failed",local_55);
std::allocator<char>::~allocator((allocator<char> *)local_55);
}
local_5c = 1;
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex(local_48);
std::lock_guard<std::mutex>::~lock_guard(local_28);
return param_1;
}
|
|
14,658
|
Settings::setWidth(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
666mxvbee[P]BattleShip/lib/Settings/Settings.cpp
|
std::string Settings::setWidth(const std::string& N) {
std::lock_guard<std::mutex> lock(settings_mutex);
std::regex valid_number_regex("^\\d+$");
if (!std::regex_match(N, valid_number_regex)) {
return "failed";
}
uint64_t value = std::stoull(N);
width = value;
return "ok";
}
|
O1
|
cpp
|
Settings::setWidth(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x5520
testl %eax, %eax
jne 0x6449
leaq 0x13ec5(%rip), %rsi # 0x1a20f
leaq 0x28(%rsp), %rdi
movl $0x10, %edx
callq 0x7334
movq (%r15), %rdi
movq 0x8(%r15), %rsi
addq %rdi, %rsi
xorps %xmm0, %xmm0
movq %rsp, %rdx
movaps %xmm0, 0x10(%rdx)
movaps %xmm0, (%rdx)
leaq 0x28(%rsp), %rcx
xorl %r8d, %r8d
callq 0x12b45
movl %eax, %ebp
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x6395
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x53a0
testb %bpl, %bpl
je 0x63e2
movq (%r15), %r12
callq 0x5050
movq %rax, %r15
movl (%rax), %ebp
movl $0x0, (%rax)
movq %rsp, %r13
movq %r12, %rdi
movq %r13, %rsi
movl $0xa, %edx
callq 0x5480
cmpq %r12, (%r13)
je 0x6450
movl (%r15), %ecx
testl %ecx, %ecx
je 0x6401
cmpl $0x22, %ecx
jne 0x6404
leaq 0x14087(%rip), %rdi # 0x1a464
callq 0x5500
leaq 0x10(%r14), %rax
movq %rax, (%r14)
leaq 0x13e18(%rip), %rsi # 0x1a208
leaq 0x13e17(%rip), %rdx # 0x1a20e
movq %r14, %rdi
callq 0x603a
jmp 0x6425
movl %ebp, (%r15)
movq %rax, 0x48(%rbx)
leaq 0x10(%r14), %rax
movq %rax, (%r14)
leaq 0x13def(%rip), %rsi # 0x1a205
leaq 0x13dea(%rip), %rdx # 0x1a207
movq %r14, %rdi
callq 0x603a
leaq 0x28(%rsp), %rdi
callq 0x739c
movq %rbx, %rdi
callq 0x52f0
movq %r14, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x5260
leaq 0x1400d(%rip), %rdi # 0x1a464
callq 0x5200
jmp 0x645e
movq %rax, %r14
jmp 0x648a
movq %rax, %r14
cmpl $0x0, (%r15)
jne 0x648a
movl %ebp, (%r15)
jmp 0x648a
movq %rax, %r14
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x648a
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x53a0
leaq 0x28(%rsp), %rdi
callq 0x739c
jmp 0x6499
movq %rax, %r14
movq %rbx, %rdi
callq 0x52f0
movq %r14, %rdi
callq 0x5600
nop
|
_ZN8Settings8setWidthERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r15, rdx
mov rbx, rsi
mov r14, rdi
mov rdi, rsi
call _pthread_mutex_lock
test eax, eax
jnz loc_6449
lea rsi, aD; "^\\d+$"
lea rdi, [rsp+78h+var_50]
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)
mov rdi, [r15]
mov rsi, [r15+8]
add rsi, rdi
xorps xmm0, xmm0
mov rdx, rsp
movaps xmmword ptr [rdx+10h], xmm0
movaps xmmword ptr [rdx], xmm0
lea rcx, [rsp+78h+var_50]
xor r8d, r8d
call _ZNSt8__detail17__regex_algo_implIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS5_9sub_matchISB_EEEcNS5_12regex_traitsIcEELNS_20_RegexExecutorPolicyE0ELb1EEEbT_SI_RNS5_13match_resultsISI_T0_EERKNS5_11basic_regexIT1_T2_EENSt15regex_constants15match_flag_typeE; std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,true>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> &,std::basic_regex<char,std::regex_traits<char>> const&,std::regex_constants::match_flag_type)
mov ebp, eax
mov rdi, [rsp+78h+var_78]; void *
test rdi, rdi
jz short loc_6395
mov rsi, [rsp+78h+var_68]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_6395:
test bpl, bpl
jz short loc_63E2
mov r12, [r15]
call ___errno_location
mov r15, rax
mov ebp, [rax]
mov dword ptr [rax], 0
mov r13, rsp
mov rdi, r12
mov rsi, r13
mov edx, 0Ah
call _strtoull
cmp [r13+0], r12
jz loc_6450
mov ecx, [r15]
test ecx, ecx
jz short loc_6401
cmp ecx, 22h ; '"'
jnz short loc_6404
lea rdi, aStoull; "stoull"
call __ZSt20__throw_out_of_rangePKc; std::__throw_out_of_range(char const*)
loc_63E2:
lea rax, [r14+10h]
mov [r14], rax
lea rsi, aFailed; "failed"
lea rdx, aFailed+6; ""
mov rdi, r14
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
jmp short loc_6425
loc_6401:
mov [r15], ebp
loc_6404:
mov [rbx+48h], rax
lea rax, [r14+10h]
mov [r14], rax
lea rsi, aOk; "ok"
lea rdx, aOk+2; ""
mov rdi, r14
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
loc_6425:
lea rdi, [rsp+78h+var_50]
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; std::basic_regex<char,std::regex_traits<char>>::~basic_regex()
mov rdi, rbx
call _pthread_mutex_unlock
mov rax, r14
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_6449:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
loc_6450:
lea rdi, aStoull; "stoull"
call __ZSt24__throw_invalid_argumentPKc; std::__throw_invalid_argument(char const*)
jmp short $+2
loc_645E:
mov r14, rax
jmp short loc_648A
mov r14, rax
cmp dword ptr [r15], 0
jnz short loc_648A
mov [r15], ebp
jmp short loc_648A
mov r14, rax
mov rdi, [rsp+78h+var_78]; void *
test rdi, rdi
jz short loc_648A
mov rsi, [rsp+78h+var_68]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_648A:
lea rdi, [rsp+78h+var_50]
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; std::basic_regex<char,std::regex_traits<char>>::~basic_regex()
jmp short loc_6499
mov r14, rax
loc_6499:
mov rdi, rbx
call _pthread_mutex_unlock
mov rdi, r14
call __Unwind_Resume
|
_QWORD * Settings::setWidth(_QWORD *a1, long long a2, long long *a3)
{
int v6; // eax
long long v7; // rdi
long long v8; // rsi
char v9; // bp
long long v10; // r12
int *v11; // r15
int v12; // ebp
long long v13; // rax
long long v15; // r14
__int128 v16; // [rsp+0h] [rbp-78h] BYREF
__int128 v17; // [rsp+10h] [rbp-68h]
_BYTE v18[80]; // [rsp+28h] [rbp-50h] BYREF
v6 = pthread_mutex_lock(a2);
if ( v6 )
std::__throw_system_error(v6);
std::basic_regex<char,std::regex_traits<char>>::basic_regex(v18, "^\\d+$", 16LL);
v7 = *a3;
v8 = *a3 + a3[1];
v17 = 0LL;
v16 = 0LL;
v9 = std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,true>(
v7,
v8,
&v16,
v18,
0LL);
if ( (_QWORD)v16 )
operator delete((void *)v16, v17 - v16);
if ( v9 )
{
v10 = *a3;
v11 = (int *)__errno_location();
v12 = *v11;
*v11 = 0;
v13 = strtoull(v10, &v16, 10LL);
if ( (_QWORD)v16 == v10 )
{
v15 = std::__throw_invalid_argument("stoull");
std::basic_regex<char,std::regex_traits<char>>::~basic_regex(v18);
pthread_mutex_unlock(a2);
_Unwind_Resume(v15);
}
if ( *v11 )
{
if ( *v11 == 34 )
std::__throw_out_of_range("stoull");
}
else
{
*v11 = v12;
}
*(_QWORD *)(a2 + 72) = v13;
*a1 = a1 + 2;
std::string::_M_construct<char const*>(a1, "ok", (long long)"");
}
else
{
*a1 = a1 + 2;
std::string::_M_construct<char const*>(a1, "failed", (long long)"");
}
std::basic_regex<char,std::regex_traits<char>>::~basic_regex(v18);
pthread_mutex_unlock(a2);
return a1;
}
|
setWidth:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R15,RDX
MOV RBX,RSI
MOV R14,RDI
MOV RDI,RSI
CALL 0x00105520
TEST EAX,EAX
JNZ 0x00106449
LAB_00106343:
LEA RSI,[0x11a20f]
LEA RDI,[RSP + 0x28]
MOV EDX,0x10
CALL 0x00107334
MOV RDI,qword ptr [R15]
MOV RSI,qword ptr [R15 + 0x8]
ADD RSI,RDI
XORPS XMM0,XMM0
MOV RDX,RSP
MOVAPS xmmword ptr [RDX + 0x10],XMM0
MOVAPS xmmword ptr [RDX],XMM0
LAB_00106370:
LEA RCX,[RSP + 0x28]
XOR R8D,R8D
CALL 0x00112b45
MOV EBP,EAX
MOV RDI,qword ptr [RSP]
TEST RDI,RDI
JZ 0x00106395
MOV RSI,qword ptr [RSP + 0x10]
SUB RSI,RDI
CALL 0x001053a0
LAB_00106395:
TEST BPL,BPL
JZ 0x001063e2
MOV R12,qword ptr [R15]
CALL 0x00105050
MOV R15,RAX
MOV EBP,dword ptr [RAX]
MOV dword ptr [RAX],0x0
MOV R13,RSP
MOV RDI,R12
MOV RSI,R13
MOV EDX,0xa
CALL 0x00105480
CMP qword ptr [R13],R12
JZ 0x00106450
MOV ECX,dword ptr [R15]
TEST ECX,ECX
JZ 0x00106401
CMP ECX,0x22
JNZ 0x00106404
LAB_001063d6:
LEA RDI,[0x11a464]
CALL 0x00105500
LAB_001063e2:
LEA RAX,[R14 + 0x10]
MOV qword ptr [R14],RAX
LAB_001063e9:
LEA RSI,[0x11a208]
LEA RDX,[0x11a20e]
MOV RDI,R14
CALL 0x0010603a
JMP 0x00106425
LAB_00106401:
MOV dword ptr [R15],EBP
LAB_00106404:
MOV qword ptr [RBX + 0x48],RAX
LEA RAX,[R14 + 0x10]
MOV qword ptr [R14],RAX
LAB_0010640f:
LEA RSI,[0x11a205]
LEA RDX,[0x11a207]
MOV RDI,R14
CALL 0x0010603a
LAB_00106425:
LEA RDI,[RSP + 0x28]
CALL 0x0010739c
MOV RDI,RBX
CALL 0x001052f0
MOV RAX,R14
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00106449:
MOV EDI,EAX
CALL 0x00105260
LAB_00106450:
LEA RDI,[0x11a464]
CALL 0x00105200
LAB_0010645c:
JMP 0x0010645e
LAB_0010645e:
MOV R14,RAX
JMP 0x0010648a
LAB_0010648a:
LEA RDI,[RSP + 0x28]
CALL 0x0010739c
JMP 0x00106499
LAB_00106499:
MOV RDI,RBX
CALL 0x001052f0
MOV RDI,R14
CALL 0x00105600
|
/* Settings::setWidth(std::__cxx11::string const&) */
string * Settings::setWidth(string *param_1)
{
char *__nptr;
bool bVar1;
int iVar2;
int *piVar3;
ulonglong uVar4;
int8 uVar5;
long *in_RDX;
pthread_mutex_t *in_RSI;
char *local_78;
int8 uStack_70;
long local_68;
int8 uStack_60;
basic_regex<char,std::__cxx11::regex_traits<char>> local_50 [32];
iVar2 = pthread_mutex_lock(in_RSI);
if (iVar2 != 0) {
/* WARNING: Subroutine does not return */
std::__throw_system_error(iVar2);
}
/* try { // try from 00106343 to 00106358 has its CatchHandler @ 00106496 */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
(local_50,"^\\d+$",0x10);
local_68 = 0;
uStack_60 = 0;
local_78 = (char *)0x0;
uStack_70 = 0;
/* try { // try from 00106370 to 0010637c has its CatchHandler @ 00106471 */
bVar1 = std::__detail::
__regex_algo_impl<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>,char,std::__cxx11::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,true>
(*in_RDX,in_RDX[1] + *in_RDX,&local_78,local_50,0);
if (local_78 != (char *)0x0) {
operator_delete(local_78,local_68 - (long)local_78);
}
if (bVar1) {
__nptr = (char *)*in_RDX;
piVar3 = __errno_location();
iVar2 = *piVar3;
*piVar3 = 0;
uVar4 = strtoull(__nptr,&local_78,10);
if (local_78 == __nptr) {
/* try { // try from 00106450 to 0010645b has its CatchHandler @ 00106463 */
uVar5 = std::__throw_invalid_argument("stoull");
/* catch() { ... } // from try @ 0010640f with catch @ 0010645c */
/* catch() { ... } // from try @ 001063e9 with catch @ 0010645e */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex(local_50);
pthread_mutex_unlock(in_RSI);
/* WARNING: Subroutine does not return */
_Unwind_Resume(uVar5);
}
if (*piVar3 == 0) {
*piVar3 = iVar2;
}
else if (*piVar3 == 0x22) {
/* try { // try from 001063d6 to 001063e1 has its CatchHandler @ 00106463 */
std::__throw_out_of_range("stoull");
goto LAB_001063e2;
}
*(ulonglong *)((long)in_RSI + 0x48) = uVar4;
*(string **)param_1 = param_1 + 0x10;
/* try { // try from 0010640f to 00106424 has its CatchHandler @ 0010645c */
std::__cxx11::string::_M_construct<char_const*>(param_1,&DAT_0011a205,&DAT_0011a207);
}
else {
LAB_001063e2:
*(string **)param_1 = param_1 + 0x10;
/* try { // try from 001063e9 to 001063fe has its CatchHandler @ 0010645e */
std::__cxx11::string::_M_construct<char_const*>(param_1,"failed","");
}
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex(local_50);
pthread_mutex_unlock(in_RSI);
return param_1;
}
|
|
14,659
|
testing::internal::ExecDeathTestChildMain(void*)
|
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest-death-test.cc
|
static int ExecDeathTestChildMain(void* child_arg) {
ExecDeathTestArgs* const args = static_cast<ExecDeathTestArgs*>(child_arg);
GTEST_DEATH_TEST_CHECK_SYSCALL_(close(args->close_fd));
// We need to execute the test program in the same environment where
// it was originally invoked. Therefore we change to the original
// working directory first.
const char* const original_dir =
UnitTest::GetInstance()->original_working_dir();
// We can safely call chdir() as it's a direct system call.
if (chdir(original_dir) != 0) {
DeathTestAbort(std::string("chdir(\"") + original_dir +
"\") failed: " + GetLastErrnoDescription());
return EXIT_FAILURE;
}
// We can safely call execv() as it's almost a direct system call. We
// cannot use execvp() as it's a libc function and thus potentially
// unsafe. Since execv() doesn't search the PATH, the user must
// invoke the test program via a valid path that contains at least
// one path separator.
execv(args->argv[0], args->argv);
DeathTestAbort(std::string("execv(") + args->argv[0] + ", ...) in " +
original_dir + " failed: " + GetLastErrnoDescription());
return EXIT_FAILURE;
}
|
O0
|
cpp
|
testing::internal::ExecDeathTestChildMain(void*):
subq $0x2f8, %rsp # imm = 0x2F8
movq %rdi, 0x2f0(%rsp)
movq 0x2f0(%rsp), %rax
movq %rax, 0x2e8(%rsp)
jmp 0xdc8b1
movq 0x2e8(%rsp), %rax
movl 0x8(%rax), %edi
callq 0x14df0
movl %eax, 0x2e4(%rsp)
xorl %eax, %eax
cmpl $-0x1, 0x2e4(%rsp)
movb %al, 0x27(%rsp)
jne 0xdc8e7
callq 0x14050
cmpl $0x4, (%rax)
sete %al
movb %al, 0x27(%rsp)
movb 0x27(%rsp), %al
testb $0x1, %al
jne 0xdc8b1
cmpl $-0x1, 0x2e4(%rsp)
jne 0xdcb5d
leaq 0x1ff(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x14c90
movq 0x18(%rsp), %rdx
leaq 0x35f0b(%rip), %rsi # 0x112826
leaq 0x200(%rsp), %rdi
callq 0x1a6a0
jmp 0xdc92a
leaq 0x35e21(%rip), %rdx # 0x112752
leaq 0x220(%rsp), %rdi
leaq 0x200(%rsp), %rsi
callq 0x39e60
jmp 0xdc948
leaq 0x35eeb(%rip), %rdx # 0x11283a
leaq 0x240(%rsp), %rdi
leaq 0x220(%rsp), %rsi
callq 0x39e60
jmp 0xdc966
movl $0x4a3, 0x1c4(%rsp) # imm = 0x4A3
leaq 0x1c8(%rsp), %rdi
leaq 0x1c4(%rsp), %rsi
callq 0xe2830
jmp 0xdc988
leaq 0x260(%rsp), %rdi
leaq 0x240(%rsp), %rsi
leaq 0x1c8(%rsp), %rdx
callq 0x8bed0
jmp 0xdc9a7
leaq 0x37489(%rip), %rdx # 0x113e37
leaq 0x280(%rsp), %rdi
leaq 0x260(%rsp), %rsi
callq 0x39e60
jmp 0xdc9c5
leaq 0x37bbf(%rip), %rdx # 0x11458b
leaq 0x2a0(%rsp), %rdi
leaq 0x280(%rsp), %rsi
callq 0x39e60
jmp 0xdc9e3
leaq 0x36060(%rip), %rdx # 0x112a4a
leaq 0x2c0(%rsp), %rdi
leaq 0x2a0(%rsp), %rsi
callq 0x39e60
jmp 0xdca01
leaq 0x2c0(%rsp), %rdi
callq 0xb0ee0
jmp 0xdca10
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f0(%rsp)
movl %eax, 0x1ec(%rsp)
jmp 0xdcb4b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f0(%rsp)
movl %eax, 0x1ec(%rsp)
jmp 0xdcb3e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f0(%rsp)
movl %eax, 0x1ec(%rsp)
jmp 0xdcb31
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f0(%rsp)
movl %eax, 0x1ec(%rsp)
jmp 0xdcb24
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f0(%rsp)
movl %eax, 0x1ec(%rsp)
jmp 0xdcb17
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f0(%rsp)
movl %eax, 0x1ec(%rsp)
jmp 0xdcb0a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f0(%rsp)
movl %eax, 0x1ec(%rsp)
jmp 0xdcafd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f0(%rsp)
movl %eax, 0x1ec(%rsp)
jmp 0xdcaf0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f0(%rsp)
movl %eax, 0x1ec(%rsp)
leaq 0x2c0(%rsp), %rdi
callq 0x1aac0
leaq 0x2a0(%rsp), %rdi
callq 0x1aac0
leaq 0x280(%rsp), %rdi
callq 0x1aac0
leaq 0x260(%rsp), %rdi
callq 0x1aac0
leaq 0x1c8(%rsp), %rdi
callq 0x1aac0
leaq 0x240(%rsp), %rdi
callq 0x1aac0
leaq 0x220(%rsp), %rdi
callq 0x1aac0
leaq 0x200(%rsp), %rdi
callq 0x1aac0
leaq 0x1ff(%rsp), %rdi
callq 0x14750
jmp 0xdcf17
jmp 0xdcb5f
callq 0xe28c0
testb $0x1, %al
jne 0xdc8af
callq 0xbc480
movq %rax, %rdi
callq 0xbe9a0
movq %rax, 0x1b8(%rsp)
movq 0x1b8(%rsp), %rdi
callq 0x14ac0
cmpl $0x0, %eax
je 0xdcd19
leaq 0x137(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x14c90
movq 0x10(%rsp), %rdx
leaq 0x379ec(%rip), %rsi # 0x1145a1
leaq 0x138(%rsp), %rdi
callq 0x1a6a0
jmp 0xdcbc4
movq 0x1b8(%rsp), %rdx
leaq 0x158(%rsp), %rdi
leaq 0x138(%rsp), %rsi
callq 0x39e60
jmp 0xdcbe3
leaq 0x379bf(%rip), %rdx # 0x1145a9
leaq 0x178(%rsp), %rdi
leaq 0x158(%rsp), %rsi
callq 0x39e60
jmp 0xdcc01
leaq 0x110(%rsp), %rdi
callq 0xb0d80
jmp 0xdcc10
leaq 0x198(%rsp), %rdi
leaq 0x178(%rsp), %rsi
leaq 0x110(%rsp), %rdx
callq 0x8bed0
jmp 0xdcc2f
leaq 0x198(%rsp), %rdi
callq 0xb0ee0
jmp 0xdcc3e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f0(%rsp)
movl %eax, 0x1ec(%rsp)
jmp 0xdcd07
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f0(%rsp)
movl %eax, 0x1ec(%rsp)
jmp 0xdccfa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f0(%rsp)
movl %eax, 0x1ec(%rsp)
jmp 0xdcced
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f0(%rsp)
movl %eax, 0x1ec(%rsp)
jmp 0xdcce0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f0(%rsp)
movl %eax, 0x1ec(%rsp)
jmp 0xdccd3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f0(%rsp)
movl %eax, 0x1ec(%rsp)
leaq 0x198(%rsp), %rdi
callq 0x1aac0
leaq 0x110(%rsp), %rdi
callq 0x1aac0
leaq 0x178(%rsp), %rdi
callq 0x1aac0
leaq 0x158(%rsp), %rdi
callq 0x1aac0
leaq 0x138(%rsp), %rdi
callq 0x1aac0
leaq 0x137(%rsp), %rdi
callq 0x14750
jmp 0xdcf17
movq 0x2e8(%rsp), %rax
movq (%rax), %rsi
movq (%rsi), %rdi
callq 0x14630
leaq 0x4f(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x14c90
movq 0x8(%rsp), %rdx
leaq 0x3786e(%rip), %rsi # 0x1145b5
leaq 0x50(%rsp), %rdi
callq 0x1a6a0
jmp 0xdcd53
movq 0x2e8(%rsp), %rax
movq (%rax), %rax
movq (%rax), %rdx
leaq 0x70(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x39e60
jmp 0xdcd72
leaq 0x37843(%rip), %rdx # 0x1145bc
leaq 0x90(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x39e60
jmp 0xdcd8d
movq 0x1b8(%rsp), %rdx
leaq 0xb0(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x39e60
jmp 0xdcdac
leaq 0x377f8(%rip), %rdx # 0x1145ab
leaq 0xd0(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x39e60
jmp 0xdcdca
leaq 0x28(%rsp), %rdi
callq 0xb0d80
jmp 0xdcdd6
leaq 0xf0(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
leaq 0x28(%rsp), %rdx
callq 0x8bed0
jmp 0xdcdf2
leaq 0xf0(%rsp), %rdi
callq 0xb0ee0
jmp 0xdce01
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f0(%rsp)
movl %eax, 0x1ec(%rsp)
jmp 0xdcf0d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f0(%rsp)
movl %eax, 0x1ec(%rsp)
jmp 0xdcf03
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f0(%rsp)
movl %eax, 0x1ec(%rsp)
jmp 0xdcef9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f0(%rsp)
movl %eax, 0x1ec(%rsp)
jmp 0xdceec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f0(%rsp)
movl %eax, 0x1ec(%rsp)
jmp 0xdcedf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f0(%rsp)
movl %eax, 0x1ec(%rsp)
jmp 0xdced2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f0(%rsp)
movl %eax, 0x1ec(%rsp)
jmp 0xdcec8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f0(%rsp)
movl %eax, 0x1ec(%rsp)
leaq 0xf0(%rsp), %rdi
callq 0x1aac0
leaq 0x28(%rsp), %rdi
callq 0x1aac0
leaq 0xd0(%rsp), %rdi
callq 0x1aac0
leaq 0xb0(%rsp), %rdi
callq 0x1aac0
leaq 0x90(%rsp), %rdi
callq 0x1aac0
leaq 0x70(%rsp), %rdi
callq 0x1aac0
leaq 0x50(%rsp), %rdi
callq 0x1aac0
leaq 0x4f(%rsp), %rdi
callq 0x14750
movq 0x1f0(%rsp), %rdi
callq 0x14c80
nopw %cs:(%rax,%rax)
|
_ZN7testing8internalL22ExecDeathTestChildMainEPv:
sub rsp, 2F8h
mov [rsp+2F8h+var_8], rdi
mov rax, [rsp+2F8h+var_8]
mov [rsp+2F8h+var_10], rax
loc_DC8AF:
jmp short $+2
loc_DC8B1:
mov rax, [rsp+2F8h+var_10]
mov edi, [rax+8]; this
call _close
mov [rsp+2F8h+var_14], eax
xor eax, eax
cmp [rsp+2F8h+var_14], 0FFFFFFFFh
mov [rsp+2F8h+var_2D1], al
jnz short loc_DC8E7
call ___errno_location
cmp dword ptr [rax], 4
setz al
mov [rsp+2F8h+var_2D1], al
loc_DC8E7:
mov al, [rsp+2F8h+var_2D1]
test al, 1
jnz short loc_DC8B1
cmp [rsp+2F8h+var_14], 0FFFFFFFFh
jnz loc_DCB5D
lea rdi, [rsp+2F8h+var_F9]
mov [rsp+2F8h+var_2E0], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, [rsp+2F8h+var_2E0]
lea rsi, aCheckFailedFil; "CHECK failed: File "
lea rdi, [rsp+2F8h+var_F8]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_DC92A:
lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github2025/AlayaL"...
lea rdi, [rsp+2F8h+var_D8]
lea rsi, [rsp+2F8h+var_F8]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_DC948:
lea rdx, aLine; ", line "
lea rdi, [rsp+2F8h+var_B8]
lea rsi, [rsp+2F8h+var_D8]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_DC966:
mov [rsp+2F8h+var_134], 4A3h
lea rdi, [rsp+2F8h+var_130]
lea rsi, [rsp+2F8h+var_134]
call _ZN7testing8internal18StreamableToStringIiEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; testing::internal::StreamableToString<int>(int const&)
jmp short $+2
loc_DC988:
lea rdi, [rsp+2F8h+var_98]
lea rsi, [rsp+2F8h+var_B8]
lea rdx, [rsp+2F8h+var_130]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&)
jmp short $+2
loc_DC9A7:
lea rdx, asc_113E36+1; ": "
lea rdi, [rsp+2F8h+var_78]
lea rsi, [rsp+2F8h+var_98]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_DC9C5:
lea rdx, aCloseArgsClose; "close(args->close_fd)"
lea rdi, [rsp+2F8h+var_58]
lea rsi, [rsp+2F8h+var_78]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_DC9E3:
lea rdx, aFcntlPipeFd1FS+1Dh; " != -1"
lea rdi, [rsp+2F8h+var_38]
lea rsi, [rsp+2F8h+var_58]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_DCA01:
lea rdi, [rsp+2F8h+var_38]
call _ZN7testing8internalL14DeathTestAbortERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::DeathTestAbort(std::string const&)
jmp short $+2
loc_DCA10:
mov rcx, rax
mov eax, edx
mov [rsp+2F8h+var_108], rcx
mov [rsp+2F8h+var_10C], eax
jmp loc_DCB4B
mov rcx, rax
mov eax, edx
mov [rsp+2F8h+var_108], rcx
mov [rsp+2F8h+var_10C], eax
jmp loc_DCB3E
mov rcx, rax
mov eax, edx
mov [rsp+2F8h+var_108], rcx
mov [rsp+2F8h+var_10C], eax
jmp loc_DCB31
mov rcx, rax
mov eax, edx
mov [rsp+2F8h+var_108], rcx
mov [rsp+2F8h+var_10C], eax
jmp loc_DCB24
mov rcx, rax
mov eax, edx
mov [rsp+2F8h+var_108], rcx
mov [rsp+2F8h+var_10C], eax
jmp loc_DCB17
mov rcx, rax
mov eax, edx
mov [rsp+2F8h+var_108], rcx
mov [rsp+2F8h+var_10C], eax
jmp short loc_DCB0A
mov rcx, rax
mov eax, edx
mov [rsp+2F8h+var_108], rcx
mov [rsp+2F8h+var_10C], eax
jmp short loc_DCAFD
mov rcx, rax
mov eax, edx
mov [rsp+2F8h+var_108], rcx
mov [rsp+2F8h+var_10C], eax
jmp short loc_DCAF0
mov rcx, rax
mov eax, edx
mov [rsp+2F8h+var_108], rcx
mov [rsp+2F8h+var_10C], eax
lea rdi, [rsp+2F8h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_DCAF0:
lea rdi, [rsp+2F8h+var_58]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_DCAFD:
lea rdi, [rsp+2F8h+var_78]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_DCB0A:
lea rdi, [rsp+2F8h+var_98]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_DCB17:
lea rdi, [rsp+2F8h+var_130]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_DCB24:
lea rdi, [rsp+2F8h+var_B8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_DCB31:
lea rdi, [rsp+2F8h+var_D8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_DCB3E:
lea rdi, [rsp+2F8h+var_F8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_DCB4B:
lea rdi, [rsp+2F8h+var_F9]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_DCF17
loc_DCB5D:
jmp short $+2
loc_DCB5F:
call _ZN7testing8internal11AlwaysFalseEv; testing::internal::AlwaysFalse(void)
test al, 1
jnz loc_DC8AF
call _ZN7testing8UnitTest11GetInstanceEv; testing::UnitTest::GetInstance(void)
mov rdi, rax; this
call _ZNK7testing8UnitTest20original_working_dirEv; testing::UnitTest::original_working_dir(void)
mov [rsp+2F8h+var_140], rax
mov rdi, [rsp+2F8h+var_140]
call _chdir
cmp eax, 0
jz loc_DCD19
lea rdi, [rsp+2F8h+var_1C1]
mov [rsp+2F8h+var_2E8], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, [rsp+2F8h+var_2E8]
lea rsi, aChdir_0; "chdir(\""
lea rdi, [rsp+2F8h+var_1C0]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_DCBC4:
mov rdx, [rsp+2F8h+var_140]
lea rdi, [rsp+2F8h+var_1A0]
lea rsi, [rsp+2F8h+var_1C0]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_DCBE3:
lea rdx, aFailed_1; "\") failed: "
lea rdi, [rsp+2F8h+var_180]
lea rsi, [rsp+2F8h+var_1A0]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_DCC01:
lea rdi, [rsp+2F8h+var_1E8]
call _ZN7testing8internal23GetLastErrnoDescriptionB5cxx11Ev; testing::internal::GetLastErrnoDescription(void)
jmp short $+2
loc_DCC10:
lea rdi, [rsp+2F8h+var_160]
lea rsi, [rsp+2F8h+var_180]
lea rdx, [rsp+2F8h+var_1E8]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&)
jmp short $+2
loc_DCC2F:
lea rdi, [rsp+2F8h+var_160]
call _ZN7testing8internalL14DeathTestAbortERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::DeathTestAbort(std::string const&)
jmp short $+2
loc_DCC3E:
mov rcx, rax
mov eax, edx
mov [rsp+2F8h+var_108], rcx
mov [rsp+2F8h+var_10C], eax
jmp loc_DCD07
mov rcx, rax
mov eax, edx
mov [rsp+2F8h+var_108], rcx
mov [rsp+2F8h+var_10C], eax
jmp loc_DCCFA
mov rcx, rax
mov eax, edx
mov [rsp+2F8h+var_108], rcx
mov [rsp+2F8h+var_10C], eax
jmp short loc_DCCED
mov rcx, rax
mov eax, edx
mov [rsp+2F8h+var_108], rcx
mov [rsp+2F8h+var_10C], eax
jmp short loc_DCCE0
mov rcx, rax
mov eax, edx
mov [rsp+2F8h+var_108], rcx
mov [rsp+2F8h+var_10C], eax
jmp short loc_DCCD3
mov rcx, rax
mov eax, edx
mov [rsp+2F8h+var_108], rcx
mov [rsp+2F8h+var_10C], eax
lea rdi, [rsp+2F8h+var_160]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_DCCD3:
lea rdi, [rsp+2F8h+var_1E8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_DCCE0:
lea rdi, [rsp+2F8h+var_180]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_DCCED:
lea rdi, [rsp+2F8h+var_1A0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_DCCFA:
lea rdi, [rsp+2F8h+var_1C0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_DCD07:
lea rdi, [rsp+2F8h+var_1C1]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_DCF17
loc_DCD19:
mov rax, [rsp+2F8h+var_10]
mov rsi, [rax]
mov rdi, [rsi]
call _execv
lea rdi, [rsp+2F8h+var_2A9]
mov [rsp+2F8h+var_2F0], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, [rsp+2F8h+var_2F0]
lea rsi, aExecv_0; "execv("
lea rdi, [rsp+2F8h+var_2A8]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_DCD53:
mov rax, [rsp+2F8h+var_10]
mov rax, [rax]
mov rdx, [rax]
lea rdi, [rsp+2F8h+var_288]
lea rsi, [rsp+2F8h+var_2A8]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_DCD72:
lea rdx, aIn; ", ...) in "
lea rdi, [rsp+2F8h+var_268]
lea rsi, [rsp+2F8h+var_288]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_DCD8D:
mov rdx, [rsp+2F8h+var_140]
lea rdi, [rsp+2F8h+var_248]
lea rsi, [rsp+2F8h+var_268]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_DCDAC:
lea rdx, aFailed_1+2; " failed: "
lea rdi, [rsp+2F8h+var_228]
lea rsi, [rsp+2F8h+var_248]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_DCDCA:
lea rdi, [rsp+2F8h+var_2D0]
call _ZN7testing8internal23GetLastErrnoDescriptionB5cxx11Ev; testing::internal::GetLastErrnoDescription(void)
jmp short $+2
loc_DCDD6:
lea rdi, [rsp+2F8h+var_208]
lea rsi, [rsp+2F8h+var_228]
lea rdx, [rsp+2F8h+var_2D0]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&)
jmp short $+2
loc_DCDF2:
lea rdi, [rsp+2F8h+var_208]
call _ZN7testing8internalL14DeathTestAbortERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::DeathTestAbort(std::string const&)
jmp short $+2
loc_DCE01:
mov rcx, rax
mov eax, edx
mov [rsp+2F8h+var_108], rcx
mov [rsp+2F8h+var_10C], eax
jmp loc_DCF0D
mov rcx, rax
mov eax, edx
mov [rsp+2F8h+var_108], rcx
mov [rsp+2F8h+var_10C], eax
jmp loc_DCF03
mov rcx, rax
mov eax, edx
mov [rsp+2F8h+var_108], rcx
mov [rsp+2F8h+var_10C], eax
jmp loc_DCEF9
mov rcx, rax
mov eax, edx
mov [rsp+2F8h+var_108], rcx
mov [rsp+2F8h+var_10C], eax
jmp loc_DCEEC
mov rcx, rax
mov eax, edx
mov [rsp+2F8h+var_108], rcx
mov [rsp+2F8h+var_10C], eax
jmp short loc_DCEDF
mov rcx, rax
mov eax, edx
mov [rsp+2F8h+var_108], rcx
mov [rsp+2F8h+var_10C], eax
jmp short loc_DCED2
mov rcx, rax
mov eax, edx
mov [rsp+2F8h+var_108], rcx
mov [rsp+2F8h+var_10C], eax
jmp short loc_DCEC8
mov rcx, rax
mov eax, edx
mov [rsp+2F8h+var_108], rcx
mov [rsp+2F8h+var_10C], eax
lea rdi, [rsp+2F8h+var_208]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_DCEC8:
lea rdi, [rsp+2F8h+var_2D0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_DCED2:
lea rdi, [rsp+2F8h+var_228]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_DCEDF:
lea rdi, [rsp+2F8h+var_248]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_DCEEC:
lea rdi, [rsp+2F8h+var_268]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_DCEF9:
lea rdi, [rsp+2F8h+var_288]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_DCF03:
lea rdi, [rsp+2F8h+var_2A8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_DCF0D:
lea rdi, [rsp+2F8h+var_2A9]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
loc_DCF17:
mov rdi, [rsp+2F8h+var_108]
call __Unwind_Resume
|
void __noreturn testing::internal::ExecDeathTestChildMain(testing::internal *this, void *a2)
{
testing::UnitTest *v2; // rdi
long long v3; // rdx
int v4; // edx
int v5; // ecx
int v6; // r8d
int v7; // r9d
testing::UnitTest *Instance; // rax
long long v9; // rdx
long long *v10; // rsi
long long v11; // rdx
bool v12; // [rsp+27h] [rbp-2D1h]
_BYTE v13[39]; // [rsp+28h] [rbp-2D0h] BYREF
char v14; // [rsp+4Fh] [rbp-2A9h] BYREF
_BYTE v15[32]; // [rsp+50h] [rbp-2A8h] BYREF
_BYTE v16[32]; // [rsp+70h] [rbp-288h] BYREF
_BYTE v17[32]; // [rsp+90h] [rbp-268h] BYREF
_BYTE v18[32]; // [rsp+B0h] [rbp-248h] BYREF
_BYTE v19[32]; // [rsp+D0h] [rbp-228h] BYREF
_BYTE v20[32]; // [rsp+F0h] [rbp-208h] BYREF
_BYTE v21[39]; // [rsp+110h] [rbp-1E8h] BYREF
char v22; // [rsp+137h] [rbp-1C1h] BYREF
_BYTE v23[32]; // [rsp+138h] [rbp-1C0h] BYREF
_BYTE v24[32]; // [rsp+158h] [rbp-1A0h] BYREF
_BYTE v25[32]; // [rsp+178h] [rbp-180h] BYREF
_BYTE v26[32]; // [rsp+198h] [rbp-160h] BYREF
long long v27; // [rsp+1B8h] [rbp-140h]
int v28; // [rsp+1C4h] [rbp-134h] BYREF
_BYTE v29[36]; // [rsp+1C8h] [rbp-130h] BYREF
char v30; // [rsp+1FFh] [rbp-F9h] BYREF
_BYTE v31[32]; // [rsp+200h] [rbp-F8h] BYREF
_BYTE v32[32]; // [rsp+220h] [rbp-D8h] BYREF
_BYTE v33[32]; // [rsp+240h] [rbp-B8h] BYREF
_BYTE v34[32]; // [rsp+260h] [rbp-98h] BYREF
_BYTE v35[32]; // [rsp+280h] [rbp-78h] BYREF
_BYTE v36[32]; // [rsp+2A0h] [rbp-58h] BYREF
_BYTE v37[36]; // [rsp+2C0h] [rbp-38h] BYREF
int v38; // [rsp+2E4h] [rbp-14h]
long long **v39; // [rsp+2E8h] [rbp-10h]
testing::internal *v40; // [rsp+2F0h] [rbp-8h]
v40 = this;
v39 = (long long **)this;
while ( 1 )
{
v2 = (testing::UnitTest *)*((unsigned int *)v39 + 2);
v38 = close(v2);
v12 = 0;
if ( v38 == -1 )
v12 = *(_DWORD *)__errno_location(v2, a2) == 4;
if ( !v12 )
{
if ( v38 == -1 )
{
std::allocator<char>::allocator(&v30, a2, v3);
std::string::basic_string<std::allocator<char>>((long long)v31, (long long)"CHECK failed: File ", (long long)&v30);
std::operator+<char>(
(long long)v32,
(long long)v31,
(long long)"/workspace/llm4binary/github2025/AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest-death-test.cc");
std::operator+<char>((long long)v33, (long long)v32, (long long)", line ");
v28 = 1187;
testing::internal::StreamableToString<int>((unsigned int)v29, (unsigned int)&v28, v4, v5, v6, v7);
std::operator+<char>((long long)v34, (long long)v33, (long long)v29);
std::operator+<char>((long long)v35, (long long)v34, (long long)": ");
std::operator+<char>((long long)v36, (long long)v35, (long long)"close(args->close_fd)");
std::operator+<char>((long long)v37, (long long)v36, (long long)" != -1");
testing::internal::DeathTestAbort((testing::internal *)v37);
}
if ( (testing::internal::AlwaysFalse(v2) & 1) == 0 )
{
Instance = (testing::UnitTest *)testing::UnitTest::GetInstance(v2);
v27 = testing::UnitTest::original_working_dir(Instance);
if ( (unsigned int)chdir(v27, a2) )
{
std::allocator<char>::allocator(&v22, a2, v9);
std::string::basic_string<std::allocator<char>>((long long)v23, (long long)"chdir(\"", (long long)&v22);
std::operator+<char>((long long)v24, (long long)v23, v27);
std::operator+<char>((long long)v25, (long long)v24, (long long)"\") failed: ");
testing::internal::GetLastErrnoDescription[abi:cxx11]((long long)v21, (int)v24);
std::operator+<char>((long long)v26, (long long)v25, (long long)v21);
testing::internal::DeathTestAbort((testing::internal *)v26);
}
v10 = *v39;
execv(**v39);
std::allocator<char>::allocator(&v14, v10, v11);
std::string::basic_string<std::allocator<char>>((long long)v15, (long long)"execv(", (long long)&v14);
std::operator+<char>((long long)v16, (long long)v15, **v39);
std::operator+<char>((long long)v17, (long long)v16, (long long)", ...) in ");
std::operator+<char>((long long)v18, (long long)v17, v27);
std::operator+<char>((long long)v19, (long long)v18, (long long)" failed: ");
testing::internal::GetLastErrnoDescription[abi:cxx11]((long long)v13, (int)v18);
std::operator+<char>((long long)v20, (long long)v19, (long long)v13);
testing::internal::DeathTestAbort((testing::internal *)v20);
}
}
}
}
|
ExecDeathTestChildMain:
SUB RSP,0x2f8
MOV qword ptr [RSP + 0x2f0],RDI
MOV RAX,qword ptr [RSP + 0x2f0]
MOV qword ptr [RSP + 0x2e8],RAX
LAB_001dc8af:
JMP 0x001dc8b1
LAB_001dc8b1:
MOV RAX,qword ptr [RSP + 0x2e8]
MOV EDI,dword ptr [RAX + 0x8]
CALL 0x00114df0
MOV dword ptr [RSP + 0x2e4],EAX
XOR EAX,EAX
CMP dword ptr [RSP + 0x2e4],-0x1
MOV byte ptr [RSP + 0x27],AL
JNZ 0x001dc8e7
CALL 0x00114050
CMP dword ptr [RAX],0x4
SETZ AL
MOV byte ptr [RSP + 0x27],AL
LAB_001dc8e7:
MOV AL,byte ptr [RSP + 0x27]
TEST AL,0x1
JNZ 0x001dc8b1
CMP dword ptr [RSP + 0x2e4],-0x1
JNZ 0x001dcb5d
LEA RDI,[RSP + 0x1ff]
MOV qword ptr [RSP + 0x18],RDI
CALL 0x00114c90
MOV RDX,qword ptr [RSP + 0x18]
LAB_001dc914:
LEA RSI,[0x212826]
LEA RDI,[RSP + 0x200]
CALL 0x0011a6a0
JMP 0x001dc92a
LAB_001dc92a:
LEA RDX,[0x212752]
LEA RDI,[RSP + 0x220]
LEA RSI,[RSP + 0x200]
CALL 0x00139e60
JMP 0x001dc948
LAB_001dc948:
LEA RDX,[0x21283a]
LEA RDI,[RSP + 0x240]
LEA RSI,[RSP + 0x220]
CALL 0x00139e60
JMP 0x001dc966
LAB_001dc966:
MOV dword ptr [RSP + 0x1c4],0x4a3
LAB_001dc971:
LEA RDI,[RSP + 0x1c8]
LEA RSI,[RSP + 0x1c4]
CALL 0x001e2830
JMP 0x001dc988
LAB_001dc988:
LEA RDI,[RSP + 0x260]
LEA RSI,[RSP + 0x240]
LEA RDX,[RSP + 0x1c8]
CALL 0x0018bed0
JMP 0x001dc9a7
LAB_001dc9a7:
LEA RDX,[0x213e37]
LEA RDI,[RSP + 0x280]
LEA RSI,[RSP + 0x260]
CALL 0x00139e60
JMP 0x001dc9c5
LAB_001dc9c5:
LEA RDX,[0x21458b]
LEA RDI,[RSP + 0x2a0]
LEA RSI,[RSP + 0x280]
CALL 0x00139e60
JMP 0x001dc9e3
LAB_001dc9e3:
LEA RDX,[0x212a4a]
LEA RDI,[RSP + 0x2c0]
LEA RSI,[RSP + 0x2a0]
CALL 0x00139e60
JMP 0x001dca01
LAB_001dca01:
LEA RDI,[RSP + 0x2c0]
CALL 0x001b0ee0
LAB_001dca0e:
JMP 0x001dca10
LAB_001dca10:
MOV RCX,RAX
MOV EAX,EDX
MOV qword ptr [RSP + 0x1f0],RCX
MOV dword ptr [RSP + 0x1ec],EAX
JMP 0x001dcb4b
LAB_001dcb4b:
LEA RDI,[RSP + 0x1ff]
CALL 0x00114750
JMP 0x001dcf17
LAB_001dcb5d:
JMP 0x001dcb5f
LAB_001dcb5f:
CALL 0x001e28c0
TEST AL,0x1
JNZ 0x001dc8af
CALL 0x001bc480
MOV RDI,RAX
CALL 0x001be9a0
MOV qword ptr [RSP + 0x1b8],RAX
MOV RDI,qword ptr [RSP + 0x1b8]
CALL 0x00114ac0
CMP EAX,0x0
JZ 0x001dcd19
LEA RDI,[RSP + 0x137]
MOV qword ptr [RSP + 0x10],RDI
CALL 0x00114c90
MOV RDX,qword ptr [RSP + 0x10]
LAB_001dcbae:
LEA RSI,[0x2145a1]
LEA RDI,[RSP + 0x138]
CALL 0x0011a6a0
JMP 0x001dcbc4
LAB_001dcbc4:
MOV RDX,qword ptr [RSP + 0x1b8]
LAB_001dcbcc:
LEA RDI,[RSP + 0x158]
LEA RSI,[RSP + 0x138]
CALL 0x00139e60
JMP 0x001dcbe3
LAB_001dcbe3:
LEA RDX,[0x2145a9]
LEA RDI,[RSP + 0x178]
LEA RSI,[RSP + 0x158]
CALL 0x00139e60
JMP 0x001dcc01
LAB_001dcc01:
LEA RDI,[RSP + 0x110]
CALL 0x001b0d80
JMP 0x001dcc10
LAB_001dcc10:
LEA RDI,[RSP + 0x198]
LEA RSI,[RSP + 0x178]
LEA RDX,[RSP + 0x110]
CALL 0x0018bed0
JMP 0x001dcc2f
LAB_001dcc2f:
LEA RDI,[RSP + 0x198]
CALL 0x001b0ee0
JMP 0x001dcc3e
LAB_001dcc3e:
MOV RCX,RAX
MOV EAX,EDX
MOV qword ptr [RSP + 0x1f0],RCX
MOV dword ptr [RSP + 0x1ec],EAX
JMP 0x001dcd07
LAB_001dcd07:
LEA RDI,[RSP + 0x137]
CALL 0x00114750
JMP 0x001dcf17
LAB_001dcd19:
MOV RAX,qword ptr [RSP + 0x2e8]
MOV RSI,qword ptr [RAX]
MOV RDI,qword ptr [RSI]
CALL 0x00114630
LEA RDI,[RSP + 0x4f]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x00114c90
MOV RDX,qword ptr [RSP + 0x8]
LAB_001dcd40:
LEA RSI,[0x2145b5]
LEA RDI,[RSP + 0x50]
CALL 0x0011a6a0
JMP 0x001dcd53
LAB_001dcd53:
MOV RAX,qword ptr [RSP + 0x2e8]
MOV RAX,qword ptr [RAX]
MOV RDX,qword ptr [RAX]
LAB_001dcd61:
LEA RDI,[RSP + 0x70]
LEA RSI,[RSP + 0x50]
CALL 0x00139e60
JMP 0x001dcd72
LAB_001dcd72:
LEA RDX,[0x2145bc]
LEA RDI,[RSP + 0x90]
LEA RSI,[RSP + 0x70]
CALL 0x00139e60
JMP 0x001dcd8d
LAB_001dcd8d:
MOV RDX,qword ptr [RSP + 0x1b8]
LAB_001dcd95:
LEA RDI,[RSP + 0xb0]
LEA RSI,[RSP + 0x90]
CALL 0x00139e60
JMP 0x001dcdac
LAB_001dcdac:
LEA RDX,[0x2145ab]
LEA RDI,[RSP + 0xd0]
LEA RSI,[RSP + 0xb0]
CALL 0x00139e60
JMP 0x001dcdca
LAB_001dcdca:
LEA RDI,[RSP + 0x28]
CALL 0x001b0d80
JMP 0x001dcdd6
LAB_001dcdd6:
LEA RDI,[RSP + 0xf0]
LEA RSI,[RSP + 0xd0]
LEA RDX,[RSP + 0x28]
CALL 0x0018bed0
JMP 0x001dcdf2
LAB_001dcdf2:
LEA RDI,[RSP + 0xf0]
CALL 0x001b0ee0
LAB_001dcdff:
JMP 0x001dce01
LAB_001dce01:
MOV RCX,RAX
MOV EAX,EDX
MOV qword ptr [RSP + 0x1f0],RCX
MOV dword ptr [RSP + 0x1ec],EAX
JMP 0x001dcf0d
LAB_001dcf0d:
LEA RDI,[RSP + 0x4f]
CALL 0x00114750
LAB_001dcf17:
MOV RDI,qword ptr [RSP + 0x1f0]
CALL 0x00114c80
|
/* testing::internal::ExecDeathTestChildMain(void*) */
void testing::internal::ExecDeathTestChildMain(void *param_1)
{
int iVar1;
int *piVar2;
ulong uVar3;
UnitTest *this;
bool bVar4;
int1 auVar5 [12];
internal local_2d0 [39];
allocator local_2a9;
string local_2a8 [32];
string local_288 [32];
string local_268 [32];
string local_248 [32];
string local_228 [32];
string local_208 [32];
internal local_1e8 [39];
allocator local_1c1;
string local_1c0 [32];
string local_1a0 [32];
string local_180 [32];
string local_160 [32];
char *local_140;
int local_134;
internal local_130 [36];
int4 local_10c;
int8 local_108;
allocator local_f9;
string local_f8 [32];
string local_d8 [32];
string local_b8 [32];
string local_98 [32];
string local_78 [32];
string local_58 [32];
string local_38 [36];
int local_14;
int8 *local_10;
void *local_8;
local_10 = (int8 *)param_1;
local_8 = param_1;
while( true ) {
do {
local_14 = close(*(int *)(local_10 + 1));
bVar4 = false;
if (local_14 == -1) {
piVar2 = __errno_location();
bVar4 = *piVar2 == 4;
}
} while (bVar4);
if (local_14 == -1) break;
uVar3 = AlwaysFalse();
if ((uVar3 & 1) == 0) {
this = (UnitTest *)UnitTest::GetInstance();
local_140 = (char *)UnitTest::original_working_dir(this);
iVar1 = chdir(local_140);
if (iVar1 == 0) {
execv(*(char **)*local_10,(char **)*local_10);
std::allocator<char>::allocator();
/* try { // try from 001dcd40 to 001dcd50 has its CatchHandler @ 001dce01 */
std::__cxx11::string::string<std::allocator<char>>(local_2a8,"execv(",&local_2a9);
/* try { // try from 001dcd61 to 001dcd6f has its CatchHandler @ 001dce1a */
std::operator+(local_288,(char *)local_2a8);
/* try { // try from 001dcd72 to 001dcd8a has its CatchHandler @ 001dce33 */
std::operator+(local_268,(char *)local_288);
/* try { // try from 001dcd95 to 001dcda9 has its CatchHandler @ 001dce4c */
std::operator+(local_248,(char *)local_268);
/* try { // try from 001dcdac to 001dcdc7 has its CatchHandler @ 001dce65 */
std::operator+(local_228,(char *)local_248);
/* try { // try from 001dcdca to 001dcdd3 has its CatchHandler @ 001dce7b */
GetLastErrnoDescription_abi_cxx11_(local_2d0);
/* try { // try from 001dcdd6 to 001dcdef has its CatchHandler @ 001dce91 */
std::operator+(local_208,local_228);
/* try { // try from 001dcdf2 to 001dcdfe has its CatchHandler @ 001dcea7 */
auVar5 = DeathTestAbort(local_208);
local_10c = auVar5._8_4_;
local_108 = auVar5._0_8_;
/* catch() { ... } // from try @ 001dcd40 with catch @ 001dce01 */
std::allocator<char>::~allocator((allocator<char> *)&local_2a9);
}
else {
std::allocator<char>::allocator();
/* try { // try from 001dcbae to 001dcbc1 has its CatchHandler @ 001dcc3e */
std::__cxx11::string::string<std::allocator<char>>(local_1c0,"chdir(\"",&local_1c1);
/* try { // try from 001dcbcc to 001dcbe0 has its CatchHandler @ 001dcc57 */
std::operator+(local_1a0,(char *)local_1c0);
/* try { // try from 001dcbe3 to 001dcbfe has its CatchHandler @ 001dcc70 */
std::operator+(local_180,(char *)local_1a0);
/* try { // try from 001dcc01 to 001dcc0d has its CatchHandler @ 001dcc86 */
GetLastErrnoDescription_abi_cxx11_(local_1e8);
/* try { // try from 001dcc10 to 001dcc2c has its CatchHandler @ 001dcc9c */
std::operator+(local_160,local_180);
/* try { // try from 001dcc2f to 001dcc3b has its CatchHandler @ 001dccb2 */
auVar5 = DeathTestAbort(local_160);
local_10c = auVar5._8_4_;
local_108 = auVar5._0_8_;
/* catch() { ... } // from try @ 001dcbae with catch @ 001dcc3e */
std::allocator<char>::~allocator((allocator<char> *)&local_1c1);
}
LAB_001dcf17:
/* WARNING: Subroutine does not return */
_Unwind_Resume(local_108);
}
}
std::allocator<char>::allocator();
/* try { // try from 001dc914 to 001dc927 has its CatchHandler @ 001dca10 */
std::__cxx11::string::string<std::allocator<char>>(local_f8,"CHECK failed: File ",&local_f9);
/* try { // try from 001dc92a to 001dc945 has its CatchHandler @ 001dca29 */
std::operator+(local_d8,(char *)local_f8);
/* try { // try from 001dc948 to 001dc963 has its CatchHandler @ 001dca42 */
std::operator+(local_b8,(char *)local_d8);
local_134 = 0x4a3;
/* try { // try from 001dc971 to 001dc985 has its CatchHandler @ 001dca5b */
StreamableToString<int>(local_130,&local_134);
/* try { // try from 001dc988 to 001dc9a4 has its CatchHandler @ 001dca74 */
std::operator+(local_98,local_b8);
/* try { // try from 001dc9a7 to 001dc9c2 has its CatchHandler @ 001dca8d */
std::operator+(local_78,(char *)local_98);
/* try { // try from 001dc9c5 to 001dc9e0 has its CatchHandler @ 001dcaa3 */
std::operator+(local_58,(char *)local_78);
/* try { // try from 001dc9e3 to 001dc9fe has its CatchHandler @ 001dcab9 */
std::operator+(local_38,(char *)local_58);
/* try { // try from 001dca01 to 001dca0d has its CatchHandler @ 001dcacf */
auVar5 = DeathTestAbort(local_38);
local_10c = auVar5._8_4_;
local_108 = auVar5._0_8_;
/* catch() { ... } // from try @ 001dc914 with catch @ 001dca10 */
std::allocator<char>::~allocator((allocator<char> *)&local_f9);
goto LAB_001dcf17;
}
|
|
14,660
|
buffer_grow
|
corpus-core[P]colibri-stateless/src/util/bytes.c
|
void buffer_grow(buffer_t* buffer, size_t min_len) {
if (buffer->data.data == NULL) {
if (buffer->allocated > 0 && (size_t) buffer->allocated > min_len) min_len = (size_t) buffer->allocated;
buffer->data.data = safe_malloc(min_len);
buffer->allocated = (int32_t) min_len;
}
else if (buffer->allocated >= 0 && (size_t) buffer->allocated < min_len) {
size_t new_len = (size_t) buffer->allocated;
while (new_len < min_len) new_len = (new_len + 1) * 3 / 2;
buffer->data.data = safe_realloc(buffer->data.data, new_len);
buffer->allocated = (int32_t) new_len;
}
}
|
O0
|
c
|
buffer_grow:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x18b52
movq -0x8(%rbp), %rax
cmpl $0x0, 0x10(%rax)
jle 0x18b2f
movq -0x8(%rbp), %rax
movslq 0x10(%rax), %rax
cmpq -0x10(%rbp), %rax
jbe 0x18b2f
movq -0x8(%rbp), %rax
movslq 0x10(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x185a0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x10(%rax)
jmp 0x18bc0
movq -0x8(%rbp), %rax
cmpl $0x0, 0x10(%rax)
jl 0x18bbe
movq -0x8(%rbp), %rax
movslq 0x10(%rax), %rax
cmpq -0x10(%rbp), %rax
jae 0x18bbe
movq -0x8(%rbp), %rax
movslq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x10(%rbp), %rax
jae 0x18b95
movq -0x18(%rbp), %rax
addq $0x1, %rax
imulq $0x3, %rax, %rax
shrq %rax
movq %rax, -0x18(%rbp)
jmp 0x18b76
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x186c0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x10(%rax)
jmp 0x18bc0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
buffer_grow:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
cmp qword ptr [rax+8], 0
jnz short loc_18B52
mov rax, [rbp+var_8]
cmp dword ptr [rax+10h], 0
jle short loc_18B2F
mov rax, [rbp+var_8]
movsxd rax, dword ptr [rax+10h]
cmp rax, [rbp+var_10]
jbe short loc_18B2F
mov rax, [rbp+var_8]
movsxd rax, dword ptr [rax+10h]
mov [rbp+var_10], rax
loc_18B2F:
mov rdi, [rbp+var_10]
call safe_malloc
mov rcx, rax
mov rax, [rbp+var_8]
mov [rax+8], rcx
mov rax, [rbp+var_10]
mov ecx, eax
mov rax, [rbp+var_8]
mov [rax+10h], ecx
jmp short loc_18BC0
loc_18B52:
mov rax, [rbp+var_8]
cmp dword ptr [rax+10h], 0
jl short loc_18BBE
mov rax, [rbp+var_8]
movsxd rax, dword ptr [rax+10h]
cmp rax, [rbp+var_10]
jnb short loc_18BBE
mov rax, [rbp+var_8]
movsxd rax, dword ptr [rax+10h]
mov [rbp+var_18], rax
loc_18B76:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_10]
jnb short loc_18B95
mov rax, [rbp+var_18]
add rax, 1
imul rax, 3
shr rax, 1
mov [rbp+var_18], rax
jmp short loc_18B76
loc_18B95:
mov rax, [rbp+var_8]
mov rdi, [rax+8]
mov rsi, [rbp+var_18]
call safe_realloc
mov rcx, rax
mov rax, [rbp+var_8]
mov [rax+8], rcx
mov rax, [rbp+var_18]
mov ecx, eax
mov rax, [rbp+var_8]
mov [rax+10h], ecx
loc_18BBE:
jmp short $+2
loc_18BC0:
add rsp, 20h
pop rbp
retn
|
unsigned long long buffer_grow(unsigned long long a1, unsigned long long a2)
{
unsigned long long result; // rax
unsigned long long i; // [rsp+8h] [rbp-18h]
long long v4; // [rsp+10h] [rbp-10h]
v4 = a2;
if ( *(_QWORD *)(a1 + 8) )
{
result = a1;
if ( *(int *)(a1 + 16) >= 0 )
{
result = *(int *)(a1 + 16);
if ( result < a2 )
{
for ( i = *(int *)(a1 + 16); i < a2; i = (3 * (i + 1)) >> 1 )
;
*(_QWORD *)(a1 + 8) = safe_realloc(*(_QWORD *)(a1 + 8), i);
result = a1;
*(_DWORD *)(a1 + 16) = i;
}
}
}
else
{
if ( *(int *)(a1 + 16) > 0 && *(int *)(a1 + 16) > a2 )
v4 = *(int *)(a1 + 16);
*(_QWORD *)(a1 + 8) = safe_malloc(v4);
result = a1;
*(_DWORD *)(a1 + 16) = v4;
}
return result;
}
|
buffer_grow:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x8],0x0
JNZ 0x00118b52
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x10],0x0
JLE 0x00118b2f
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RAX,dword ptr [RAX + 0x10]
CMP RAX,qword ptr [RBP + -0x10]
JBE 0x00118b2f
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RAX,dword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x10],RAX
LAB_00118b2f:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001185a0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x10],ECX
JMP 0x00118bc0
LAB_00118b52:
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x10],0x0
JL 0x00118bbe
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RAX,dword ptr [RAX + 0x10]
CMP RAX,qword ptr [RBP + -0x10]
JNC 0x00118bbe
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RAX,dword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x18],RAX
LAB_00118b76:
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x10]
JNC 0x00118b95
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
IMUL RAX,RAX,0x3
SHR RAX,0x1
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00118b76
LAB_00118b95:
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x8]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x001186c0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x10],ECX
LAB_00118bbe:
JMP 0x00118bc0
LAB_00118bc0:
ADD RSP,0x20
POP RBP
RET
|
void buffer_grow(long param_1,ulong param_2)
{
int8 uVar1;
ulong local_20;
ulong local_18;
if (*(long *)(param_1 + 8) == 0) {
local_18 = param_2;
if ((0 < *(int *)(param_1 + 0x10)) && (param_2 < (ulong)(long)*(int *)(param_1 + 0x10))) {
local_18 = (ulong)*(int *)(param_1 + 0x10);
}
uVar1 = safe_malloc(local_18);
*(int8 *)(param_1 + 8) = uVar1;
*(int *)(param_1 + 0x10) = (int)local_18;
}
else if ((-1 < *(int *)(param_1 + 0x10)) && ((ulong)(long)*(int *)(param_1 + 0x10) < param_2)) {
for (local_20 = (ulong)*(int *)(param_1 + 0x10); local_20 < param_2;
local_20 = (local_20 + 1) * 3 >> 1) {
}
uVar1 = safe_realloc(*(int8 *)(param_1 + 8),local_20);
*(int8 *)(param_1 + 8) = uVar1;
*(int *)(param_1 + 0x10) = (int)local_20;
}
return;
}
|
|
14,661
|
buffer_grow
|
corpus-core[P]colibri-stateless/src/util/bytes.c
|
void buffer_grow(buffer_t* buffer, size_t min_len) {
if (buffer->data.data == NULL) {
if (buffer->allocated > 0 && (size_t) buffer->allocated > min_len) min_len = (size_t) buffer->allocated;
buffer->data.data = safe_malloc(min_len);
buffer->allocated = (int32_t) min_len;
}
else if (buffer->allocated >= 0 && (size_t) buffer->allocated < min_len) {
size_t new_len = (size_t) buffer->allocated;
while (new_len < min_len) new_len = (new_len + 1) * 3 / 2;
buffer->data.data = safe_realloc(buffer->data.data, new_len);
buffer->allocated = (int32_t) new_len;
}
}
|
O3
|
c
|
buffer_grow:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
movl 0x10(%rbx), %r14d
testq %rdi, %rdi
je 0x12627
testl %r14d, %r14d
setns %al
cmpq %rsi, %r14
setb %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x1264b
leaq (%r14,%r14,2), %r14
addq $0x3, %r14
shrq %r14
cmpq %rsi, %r14
jb 0x1260d
movq %r14, %rsi
callq 0x1259d
jmp 0x12643
cmpq %rsi, %r14
movq %r14, %r15
cmovbeq %rsi, %r15
testl %r14d, %r14d
cmovleq %rsi, %r15
movq %r15, %rdi
callq 0x12540
movq %r15, %r14
movq %rax, 0x8(%rbx)
movl %r14d, 0x10(%rbx)
popq %rbx
popq %r14
popq %r15
retq
|
buffer_grow:
push r15
push r14
push rbx
mov rbx, rdi
mov rdi, [rdi+8]
mov r14d, [rbx+10h]
test rdi, rdi
jz short loc_12627
test r14d, r14d
setns al
cmp r14, rsi
setb cl
and cl, al
cmp cl, 1
jnz short loc_1264B
loc_1260D:
lea r14, [r14+r14*2]
add r14, 3
shr r14, 1
cmp r14, rsi
jb short loc_1260D
mov rsi, r14
call safe_realloc
jmp short loc_12643
loc_12627:
cmp r14, rsi
mov r15, r14
cmovbe r15, rsi
test r14d, r14d
cmovle r15, rsi
mov rdi, r15
call safe_malloc
mov r14, r15
loc_12643:
mov [rbx+8], rax
mov [rbx+10h], r14d
loc_1264B:
pop rbx
pop r14
pop r15
retn
|
char buffer_grow(long long a1, unsigned long long a2)
{
long long v3; // rdi
unsigned long long v4; // r14
long long v5; // rax
long long v6; // r15
v3 = *(_QWORD *)(a1 + 8);
v4 = *(unsigned int *)(a1 + 16);
if ( !v3 )
{
v6 = *(unsigned int *)(a1 + 16);
if ( v4 <= a2 )
v6 = a2;
if ( (int)v4 <= 0 )
v6 = a2;
v5 = safe_malloc(v6);
LODWORD(v4) = v6;
goto LABEL_10;
}
LOBYTE(v5) = (v4 & 0x80000000) == 0LL;
if ( (v4 & 0x80000000) == 0LL && v4 < a2 )
{
do
v4 = (3 * v4 + 3) >> 1;
while ( v4 < a2 );
v5 = safe_realloc(v3, v4);
LABEL_10:
*(_QWORD *)(a1 + 8) = v5;
*(_DWORD *)(a1 + 16) = v4;
}
return v5;
}
|
buffer_grow:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x8]
MOV R14D,dword ptr [RBX + 0x10]
TEST RDI,RDI
JZ 0x00112627
TEST R14D,R14D
SETNS AL
CMP R14,RSI
SETC CL
AND CL,AL
CMP CL,0x1
JNZ 0x0011264b
LAB_0011260d:
LEA R14,[R14 + R14*0x2]
ADD R14,0x3
SHR R14,0x1
CMP R14,RSI
JC 0x0011260d
MOV RSI,R14
CALL 0x0011259d
JMP 0x00112643
LAB_00112627:
CMP R14,RSI
MOV R15,R14
CMOVBE R15,RSI
TEST R14D,R14D
CMOVLE R15,RSI
MOV RDI,R15
CALL 0x00112540
MOV R14,R15
LAB_00112643:
MOV qword ptr [RBX + 0x8],RAX
MOV dword ptr [RBX + 0x10],R14D
LAB_0011264b:
POP RBX
POP R14
POP R15
RET
|
void buffer_grow(long param_1,ulong param_2)
{
uint uVar1;
int8 uVar2;
ulong uVar3;
uVar1 = *(uint *)(param_1 + 0x10);
uVar3 = (ulong)uVar1;
if (*(long *)(param_1 + 8) == 0) {
if (uVar3 <= param_2) {
uVar3 = param_2;
}
if ((int)uVar1 < 1) {
uVar3 = param_2;
}
uVar2 = safe_malloc(uVar3);
}
else {
if (param_2 <= uVar3 || (int)uVar1 < 0) {
return;
}
do {
uVar3 = uVar3 * 3 + 3 >> 1;
} while (uVar3 < param_2);
uVar2 = safe_realloc(*(long *)(param_1 + 8),uVar3);
}
*(int8 *)(param_1 + 8) = uVar2;
*(int *)(param_1 + 0x10) = (int)uVar3;
return;
}
|
|
14,662
|
do_send_quit(st_command*)
|
eloqsql/client/mysqltest.cc
|
void do_send_quit(struct st_command *command)
{
char *p= command->first_argument, *name;
struct st_connection *con;
DBUG_ENTER("do_send_quit");
DBUG_PRINT("enter",("name: '%s'",p));
if (!*p)
die("Missing connection name in send_quit");
name= p;
while (*p && !my_isspace(charset_info,*p))
p++;
if (*p)
*p++= 0;
command->last_argument= p;
if (!(con= find_connection_by_name(name)))
die("connection '%s' not found in connection pool", name);
simple_command(con->mysql,COM_QUIT,0,0,1);
DBUG_VOID_RETURN;
}
|
O0
|
cpp
|
do_send_quit(st_command*):
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x6872a
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
jne 0x68741
leaq 0xe3d47(%rip), %rdi # 0x14c481
movb $0x0, %al
callq 0x62b40
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpb $0x0, (%rcx)
movb %al, -0x21(%rbp)
je 0x6877c
movq 0x28dc2a(%rip), %rax # 0x2f6388
movq 0x40(%rax), %rax
movq -0x10(%rbp), %rcx
movzbl (%rcx), %ecx
movzbl 0x1(%rax,%rcx), %eax
andl $0x8, %eax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
testb $0x1, %al
jne 0x68785
jmp 0x68793
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x68749
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
je 0x687ae
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movb $0x0, (%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rdi
callq 0x686a0
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x687df
movq -0x18(%rbp), %rsi
leaq 0xe3cce(%rip), %rdi # 0x14c4a6
movb $0x0, %al
callq 0x62b40
movq -0x20(%rbp), %rax
movq (%rax), %rdi
movl $0x1, %r8d
xorl %eax, %eax
movl %eax, %r9d
movl %r8d, %esi
movq %r9, %rdx
movq %r9, %rcx
callq 0x7b890
jmp 0x68801
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
_Z12do_send_quitP10st_command:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov rax, [rax+10h]
mov [rbp+var_10], rax
jmp short $+2
loc_6872A:
mov rax, [rbp+var_10]
cmp byte ptr [rax], 0
jnz short loc_68741
lea rdi, aMissingConnect; "Missing connection name in send_quit"
mov al, 0
call _ZL3diePKcz; die(char const*,...)
loc_68741:
mov rax, [rbp+var_10]
mov [rbp+var_18], rax
loc_68749:
mov rcx, [rbp+var_10]
xor eax, eax
cmp byte ptr [rcx], 0
mov [rbp+var_21], al
jz short loc_6877C
mov rax, cs:_ZL12charset_info; charset_info
mov rax, [rax+40h]
mov rcx, [rbp+var_10]
movzx ecx, byte ptr [rcx]
movzx eax, byte ptr [rax+rcx+1]
and eax, 8
cmp eax, 0
setnz al
xor al, 0FFh
mov [rbp+var_21], al
loc_6877C:
mov al, [rbp+var_21]
test al, 1
jnz short loc_68785
jmp short loc_68793
loc_68785:
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp short loc_68749
loc_68793:
mov rax, [rbp+var_10]
cmp byte ptr [rax], 0
jz short loc_687AE
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
mov byte ptr [rax], 0
loc_687AE:
mov rcx, [rbp+var_10]
mov rax, [rbp+var_8]
mov [rax+18h], rcx
mov rdi, [rbp+var_18]; char *
call _Z23find_connection_by_namePKc; find_connection_by_name(char const*)
mov [rbp+var_20], rax
cmp rax, 0
jnz short loc_687DF
mov rsi, [rbp+var_18]
lea rdi, aConnectionSNot; "connection '%s' not found in connection"...
mov al, 0
call _ZL3diePKcz; die(char const*,...)
loc_687DF:
mov rax, [rbp+var_20]
mov rdi, [rax]
mov r8d, 1
xor eax, eax
mov r9d, eax
mov esi, r8d
mov rdx, r9
mov rcx, r9
call ma_simple_command
jmp short $+2
loc_68801:
add rsp, 30h
pop rbp
retn
|
long long do_send_quit(long long a1)
{
_BYTE *v1; // rax
char v3; // [rsp+Fh] [rbp-21h]
_QWORD *connection_by_name; // [rsp+10h] [rbp-20h]
char *v5; // [rsp+18h] [rbp-18h]
_BYTE *v6; // [rsp+20h] [rbp-10h]
v6 = *(_BYTE **)(a1 + 16);
if ( !*v6 )
die("Missing connection name in send_quit");
v5 = *(char **)(a1 + 16);
while ( 1 )
{
v3 = 0;
if ( *v6 )
v3 = ~((*(_BYTE *)(*((_QWORD *)charset_info + 8) + (unsigned __int8)*v6 + 1LL) & 8) != 0);
if ( (v3 & 1) == 0 )
break;
++v6;
}
if ( *v6 )
{
v1 = v6++;
*v1 = 0;
}
*(_QWORD *)(a1 + 24) = v6;
connection_by_name = (_QWORD *)find_connection_by_name(v5);
if ( !connection_by_name )
die("connection '%s' not found in connection pool", v5);
return ma_simple_command(*connection_by_name, 1LL, 0LL, 0LL);
}
|
do_send_quit:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0016872a
LAB_0016872a:
MOV RAX,qword ptr [RBP + -0x10]
CMP byte ptr [RAX],0x0
JNZ 0x00168741
LEA RDI,[0x24c481]
MOV AL,0x0
CALL 0x00162b40
LAB_00168741:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x18],RAX
LAB_00168749:
MOV RCX,qword ptr [RBP + -0x10]
XOR EAX,EAX
CMP byte ptr [RCX],0x0
MOV byte ptr [RBP + -0x21],AL
JZ 0x0016877c
MOV RAX,qword ptr [0x003f6388]
MOV RAX,qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RCX]
MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1]
AND EAX,0x8
CMP EAX,0x0
SETNZ AL
XOR AL,0xff
MOV byte ptr [RBP + -0x21],AL
LAB_0016877c:
MOV AL,byte ptr [RBP + -0x21]
TEST AL,0x1
JNZ 0x00168785
JMP 0x00168793
LAB_00168785:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x00168749
LAB_00168793:
MOV RAX,qword ptr [RBP + -0x10]
CMP byte ptr [RAX],0x0
JZ 0x001687ae
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOV byte ptr [RAX],0x0
LAB_001687ae:
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x18],RCX
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001686a0
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,0x0
JNZ 0x001687df
MOV RSI,qword ptr [RBP + -0x18]
LEA RDI,[0x24c4a6]
MOV AL,0x0
CALL 0x00162b40
LAB_001687df:
MOV RAX,qword ptr [RBP + -0x20]
MOV RDI,qword ptr [RAX]
MOV R8D,0x1
XOR EAX,EAX
MOV R9D,EAX
MOV ESI,R8D
MOV RDX,R9
MOV RCX,R9
CALL 0x0017b890
JMP 0x00168801
LAB_00168801:
ADD RSP,0x30
POP RBP
RET
|
/* do_send_quit(st_command*) */
void do_send_quit(st_command *param_1)
{
byte *pbVar1;
int8 *puVar2;
bool bVar3;
byte *local_18;
pbVar1 = *(byte **)(param_1 + 0x10);
local_18 = pbVar1;
if (*pbVar1 == 0) {
die("Missing connection name in send_quit");
}
while( true ) {
bVar3 = false;
if (*local_18 != 0) {
bVar3 = (*(byte *)(*(long *)(charset_info + 0x40) + 1 + (ulong)*local_18) & 8) == 0;
}
if (!bVar3) break;
local_18 = local_18 + 1;
}
if (*local_18 != 0) {
*local_18 = 0;
local_18 = local_18 + 1;
}
*(byte **)(param_1 + 0x18) = local_18;
puVar2 = (int8 *)find_connection_by_name((char *)pbVar1);
if (puVar2 == (int8 *)0x0) {
die("connection \'%s\' not found in connection pool",pbVar1);
}
ma_simple_command(*puVar2,1,0,0);
return;
}
|
|
14,663
|
nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::erase(__gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>>, __gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>>)
|
monkey531[P]llama/common/json.hpp
|
iterator erase(iterator first, iterator last)
{
if (first == last)
{
return first;
}
const auto elements_affected = std::distance(first, last);
const auto offset = std::distance(Container::begin(), first);
// This is the start situation. We need to delete elements_affected
// elements (3 in this example: e, f, g), and need to return an
// iterator past the last deleted element (h in this example).
// Note that offset is the distance from the start of the vector
// to first. We will need this later.
// [ a, b, c, d, e, f, g, h, i, j ]
// ^ ^
// first last
// Since we cannot move const Keys, we re-construct them in place.
// We start at first and re-construct (viz. copy) the elements from
// the back of the vector. Example for first iteration:
// ,--------.
// v | destroy e and re-construct with h
// [ a, b, c, d, e, f, g, h, i, j ]
// ^ ^
// it it + elements_affected
for (auto it = first; std::next(it, elements_affected) != Container::end(); ++it)
{
it->~value_type(); // destroy but keep allocation
new (&*it) value_type{std::move(*std::next(it, elements_affected))}; // "move" next element to it
}
// [ a, b, c, d, h, i, j, h, i, j ]
// ^ ^
// first last
// remove the unneeded elements at the end of the vector
Container::resize(this->size() - static_cast<size_type>(elements_affected));
// [ a, b, c, d, h, i, j ]
// ^ ^
// first last
// first is now pointing past the last deleted element, but we cannot
// use this iterator, because it may have been invalidated by the
// resize call. Instead, we can return begin() + offset.
return Container::begin() + offset;
}
|
O3
|
cpp
|
nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::erase(__gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>>, __gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>>):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
cmpq %rdx, %rsi
je 0x5f0d6
movq %rdx, %r15
movq %rdi, %r14
movq %rdx, %rax
subq %rbx, %rax
sarq $0x4, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
movq %rax, 0x10(%rsp)
movq (%rdi), %rax
movq %rax, 0x8(%rsp)
leaq 0x10(%rbx), %rbp
movq %rdx, %r12
negq %r12
cmpq 0x8(%r14), %r15
je 0x5f0a6
leaq 0x10(%rbp), %r13
movq %r13, %rdi
xorl %esi, %esi
callq 0x58aa4
movq %r13, %rdi
callq 0x5df92
movq -0x10(%rbp), %rdi
cmpq %rdi, %rbp
je 0x5f08c
movq (%rbp), %rsi
incq %rsi
callq 0x1a8f0
leaq -0x10(%rbp), %rdi
movq %r15, %rsi
callq 0x5f0e8
addq $0x30, %r15
addq $0x30, %rbp
addq $-0x30, %r12
jmp 0x5f05b
subq 0x8(%rsp), %rbx
addq (%r14), %r12
negq %r12
sarq $0x4, %r12
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %r12
subq 0x10(%rsp), %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x5f140
addq (%r14), %rbx
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE5eraseEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEESP_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rsi
cmp rsi, rdx
jz loc_5F0D6
mov r15, rdx
mov r14, rdi
mov rax, rdx
sub rax, rbx
sar rax, 4
mov rcx, 0AAAAAAAAAAAAAAABh
imul rax, rcx
mov [rsp+48h+var_38], rax
mov rax, [rdi]
mov [rsp+48h+var_40], rax
lea rbp, [rbx+10h]
mov r12, rdx
neg r12
loc_5F05B:
cmp r15, [r14+8]
jz short loc_5F0A6
lea r13, [rbp+10h]
mov rdi, r13
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, r13
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [rbp-10h]; void *
cmp rbp, rdi
jz short loc_5F08C
mov rsi, [rbp+0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5F08C:
lea rdi, [rbp-10h]
mov rsi, r15
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS8_11ordered_mapESt6vectorS5_blmdSaNS8_14adl_serializerESB_IhSaIhEEvEEEC2EOSG_; std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::pair(std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>&&)
add r15, 30h ; '0'
add rbp, 30h ; '0'
add r12, 0FFFFFFFFFFFFFFD0h
jmp short loc_5F05B
loc_5F0A6:
sub rbx, [rsp+48h+var_40]
add r12, [r14]
neg r12
sar r12, 4
mov rax, 0AAAAAAAAAAAAAAABh
imul r12, rax
sub r12, [rsp+48h+var_38]
mov rdi, r14
mov rsi, r12
call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE6resizeEm; std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::resize(ulong)
add rbx, [r14]
loc_5F0D6:
mov rax, rbx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::erase(
long long *a1,
long long a2,
long long a3)
{
long long v3; // rbx
long long v4; // r15
char *v6; // rbp
long long v7; // r12
char *v8; // rdi
long long v10; // [rsp+8h] [rbp-40h]
unsigned long long v11; // [rsp+10h] [rbp-38h]
v3 = a2;
if ( a2 != a3 )
{
v4 = a3;
v11 = 0xAAAAAAAAAAAAAAABLL * ((a3 - a2) >> 4);
v10 = *a1;
v6 = (char *)(a2 + 16);
v7 = -a3;
while ( v4 != a1[1] )
{
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v6 + 16);
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(v6 + 16);
v8 = (char *)*((_QWORD *)v6 - 2);
if ( v6 != v8 )
operator delete(v8, *(_QWORD *)v6 + 1LL);
std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::pair(
v6 - 16,
v4);
v4 += 48LL;
v6 += 48;
v7 -= 48LL;
}
std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::resize(
a1,
0xAAAAAAAAAAAAAAABLL * (-(*a1 + v7) >> 4) - v11);
return *a1 + a2 - v10;
}
return v3;
}
|
erase:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RSI
CMP RSI,RDX
JZ 0x0015f0d6
MOV R15,RDX
MOV R14,RDI
MOV RAX,RDX
SUB RAX,RBX
SAR RAX,0x4
MOV RCX,-0x5555555555555555
IMUL RAX,RCX
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RDI]
MOV qword ptr [RSP + 0x8],RAX
LEA RBP,[RBX + 0x10]
MOV R12,RDX
NEG R12
LAB_0015f05b:
CMP R15,qword ptr [R14 + 0x8]
JZ 0x0015f0a6
LEA R13,[RBP + 0x10]
MOV RDI,R13
XOR ESI,ESI
CALL 0x00158aa4
MOV RDI,R13
CALL 0x0015df92
MOV RDI,qword ptr [RBP + -0x10]
CMP RBP,RDI
JZ 0x0015f08c
MOV RSI,qword ptr [RBP]
INC RSI
CALL 0x0011a8f0
LAB_0015f08c:
LEA RDI,[RBP + -0x10]
MOV RSI,R15
CALL 0x0015f0e8
ADD R15,0x30
ADD RBP,0x30
ADD R12,-0x30
JMP 0x0015f05b
LAB_0015f0a6:
SUB RBX,qword ptr [RSP + 0x8]
ADD R12,qword ptr [R14]
NEG R12
SAR R12,0x4
MOV RAX,-0x5555555555555555
IMUL R12,RAX
SUB R12,qword ptr [RSP + 0x10]
MOV RDI,R14
MOV RSI,R12
CALL 0x0015f140
ADD RBX,qword ptr [R14]
LAB_0015f0d6:
MOV RAX,RBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::string,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::string const,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> > > >::erase(__gnu_cxx::__normal_iterator<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> >*, std::vector<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> >, 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> > > > >, __gnu_cxx::__normal_iterator<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> >*, std::vector<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> >, 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> > > > >) */
pair * __thiscall
nlohmann::json_abi_v3_11_3::
ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
::erase(ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
*this,pair *param_2,pair *param_3)
{
long lVar1;
long lVar2;
long *plVar3;
long lVar4;
if (param_2 != param_3) {
lVar2 = (long)param_3 - (long)param_2;
lVar1 = *(long *)this;
plVar3 = (long *)(param_2 + 0x10);
lVar4 = -(long)param_3;
for (; param_3 != *(pair **)(this + 8); param_3 = param_3 + 0x30) {
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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 *)(plVar3 + 2),0));
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)(plVar3 + 2));
if (plVar3 != (long *)plVar3[-2]) {
operator_delete((long *)plVar3[-2],*plVar3 + 1);
}
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>>
::pair((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>>
*)(plVar3 + -2),param_3);
plVar3 = plVar3 + 6;
lVar4 = lVar4 + -0x30;
}
std::
vector<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>>,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>>>>
::resize((vector<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>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
*)this,(-(lVar4 + *(long *)this) >> 4) * -0x5555555555555555 +
(lVar2 >> 4) * 0x5555555555555555);
param_2 = param_2 + (*(long *)this - lVar1);
}
return param_2;
}
|
|
14,664
|
is_backtrace_needed
|
bluesky950520[P]quickjs/quickjs.c
|
static BOOL is_backtrace_needed(JSContext *ctx, JSValue obj)
{
JSObject *p;
if (JS_VALUE_GET_TAG(obj) != JS_TAG_OBJECT)
return FALSE;
p = JS_VALUE_GET_OBJ(obj);
if (p->class_id != JS_CLASS_ERROR)
return FALSE;
if (find_own_property1(p, JS_ATOM_stack))
return FALSE;
return TRUE;
}
|
O0
|
c
|
is_backtrace_needed:
subq $0x68, %rsp
movq %rsi, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
movq %rdi, 0x10(%rsp)
movq 0x20(%rsp), %rax
cmpl $-0x1, %eax
je 0x7384a
movl $0x0, 0x2c(%rsp)
jmp 0x7394a
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movzwl 0x6(%rax), %eax
cmpl $0x3, %eax
je 0x7386f
movl $0x0, 0x2c(%rsp)
jmp 0x7394a
movq 0x8(%rsp), %rax
movq %rax, 0x58(%rsp)
movl $0x36, 0x54(%rsp)
movq 0x58(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x48(%rsp)
movl 0x54(%rsp), %eax
movq 0x48(%rsp), %rcx
movl 0x20(%rcx), %ecx
andq %rcx, %rax
movq %rax, 0x30(%rsp)
movq 0x48(%rsp), %rdi
callq 0x63ba0
xorl %ecx, %ecx
subq 0x30(%rsp), %rcx
subq $0x1, %rcx
movl (%rax,%rcx,4), %eax
movq %rax, 0x30(%rsp)
movq 0x48(%rsp), %rdi
callq 0x32570
movq %rax, 0x38(%rsp)
cmpq $0x0, 0x30(%rsp)
je 0x73927
movq 0x38(%rsp), %rax
movq 0x30(%rsp), %rcx
subq $0x1, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
movl 0x4(%rax), %eax
cmpl 0x54(%rsp), %eax
sete %al
testb $0x1, %al
jne 0x73906
jmp 0x73912
movq 0x40(%rsp), %rax
movq %rax, 0x60(%rsp)
jmp 0x73930
movq 0x40(%rsp), %rax
movl (%rax), %eax
andl $0x3ffffff, %eax # imm = 0x3FFFFFF
movl %eax, %eax
movq %rax, 0x30(%rsp)
jmp 0x738cf
movq $0x0, 0x60(%rsp)
cmpq $0x0, 0x60(%rsp)
je 0x73942
movl $0x0, 0x2c(%rsp)
jmp 0x7394a
movl $0x1, 0x2c(%rsp)
movl 0x2c(%rsp), %eax
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)
|
is_backtrace_needed:
sub rsp, 68h
mov [rsp+68h+var_50], rsi
mov [rsp+68h+var_48], rdx
mov [rsp+68h+var_58], rdi
mov rax, [rsp+68h+var_48]
cmp eax, 0FFFFFFFFh
jz short loc_7384A
mov [rsp+68h+var_3C], 0
jmp loc_7394A
loc_7384A:
mov rax, [rsp+68h+var_50]
mov [rsp+68h+var_60], rax
mov rax, [rsp+68h+var_60]
movzx eax, word ptr [rax+6]
cmp eax, 3
jz short loc_7386F
mov [rsp+68h+var_3C], 0
jmp loc_7394A
loc_7386F:
mov rax, [rsp+68h+var_60]
mov [rsp+68h+var_10], rax
mov [rsp+68h+var_14], 36h ; '6'
mov rax, [rsp+68h+var_10]
mov rax, [rax+18h]
mov [rsp+68h+var_20], rax
mov eax, [rsp+68h+var_14]
mov rcx, [rsp+68h+var_20]
mov ecx, [rcx+20h]
and rax, rcx
mov [rsp+68h+var_38], rax
mov rdi, [rsp+68h+var_20]
call prop_hash_end
xor ecx, ecx
sub rcx, [rsp+68h+var_38]
sub rcx, 1
mov eax, [rax+rcx*4]
mov [rsp+68h+var_38], rax
mov rdi, [rsp+68h+var_20]
call get_shape_prop
mov [rsp+68h+var_30], rax
loc_738CF:
cmp [rsp+68h+var_38], 0
jz short loc_73927
mov rax, [rsp+68h+var_30]
mov rcx, [rsp+68h+var_38]
sub rcx, 1
shl rcx, 3
add rax, rcx
mov [rsp+68h+var_28], rax
mov rax, [rsp+68h+var_28]
mov eax, [rax+4]
cmp eax, [rsp+68h+var_14]
setz al
test al, 1
jnz short loc_73906
jmp short loc_73912
loc_73906:
mov rax, [rsp+68h+var_28]
mov [rsp+68h+var_8], rax
jmp short loc_73930
loc_73912:
mov rax, [rsp+68h+var_28]
mov eax, [rax]
and eax, 3FFFFFFh
mov eax, eax
mov [rsp+68h+var_38], rax
jmp short loc_738CF
loc_73927:
mov [rsp+68h+var_8], 0
loc_73930:
cmp [rsp+68h+var_8], 0
jz short loc_73942
mov [rsp+68h+var_3C], 0
jmp short loc_7394A
loc_73942:
mov [rsp+68h+var_3C], 1
loc_7394A:
mov eax, [rsp+68h+var_3C]
add rsp, 68h
retn
|
_BOOL8 is_backtrace_needed(long long a1, long long a2, int a3)
{
long long v5; // [rsp+30h] [rbp-38h]
long long v6; // [rsp+30h] [rbp-38h]
long long shape_prop; // [rsp+38h] [rbp-30h]
_DWORD *v8; // [rsp+40h] [rbp-28h]
long long v9; // [rsp+48h] [rbp-20h]
long long v10; // [rsp+60h] [rbp-8h]
if ( a3 == -1 )
{
if ( *(_WORD *)(a2 + 6) == 3 )
{
v9 = *(_QWORD *)(a2 + 24);
v5 = *(_DWORD *)(v9 + 32) & 0x36LL;
v6 = *(unsigned int *)(prop_hash_end(v9) + 4 * (-v5 - 1));
shape_prop = get_shape_prop(v9);
while ( v6 )
{
v8 = (_DWORD *)(8 * (v6 - 1) + shape_prop);
if ( v8[1] == 54 )
{
v10 = 8 * (v6 - 1) + shape_prop;
return v10 == 0;
}
v6 = *v8 & 0x3FFFFFF;
}
v10 = 0LL;
return v10 == 0;
}
else
{
return 0;
}
}
else
{
return 0;
}
}
|
is_backtrace_needed:
SUB RSP,0x68
MOV qword ptr [RSP + 0x18],RSI
MOV qword ptr [RSP + 0x20],RDX
MOV qword ptr [RSP + 0x10],RDI
MOV RAX,qword ptr [RSP + 0x20]
CMP EAX,-0x1
JZ 0x0017384a
MOV dword ptr [RSP + 0x2c],0x0
JMP 0x0017394a
LAB_0017384a:
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x8]
MOVZX EAX,word ptr [RAX + 0x6]
CMP EAX,0x3
JZ 0x0017386f
MOV dword ptr [RSP + 0x2c],0x0
JMP 0x0017394a
LAB_0017386f:
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x58],RAX
MOV dword ptr [RSP + 0x54],0x36
MOV RAX,qword ptr [RSP + 0x58]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + 0x48],RAX
MOV EAX,dword ptr [RSP + 0x54]
MOV RCX,qword ptr [RSP + 0x48]
MOV ECX,dword ptr [RCX + 0x20]
AND RAX,RCX
MOV qword ptr [RSP + 0x30],RAX
MOV RDI,qword ptr [RSP + 0x48]
CALL 0x00163ba0
XOR ECX,ECX
SUB RCX,qword ptr [RSP + 0x30]
SUB RCX,0x1
MOV EAX,dword ptr [RAX + RCX*0x4]
MOV qword ptr [RSP + 0x30],RAX
MOV RDI,qword ptr [RSP + 0x48]
CALL 0x00132570
MOV qword ptr [RSP + 0x38],RAX
LAB_001738cf:
CMP qword ptr [RSP + 0x30],0x0
JZ 0x00173927
MOV RAX,qword ptr [RSP + 0x38]
MOV RCX,qword ptr [RSP + 0x30]
SUB RCX,0x1
SHL RCX,0x3
ADD RAX,RCX
MOV qword ptr [RSP + 0x40],RAX
MOV RAX,qword ptr [RSP + 0x40]
MOV EAX,dword ptr [RAX + 0x4]
CMP EAX,dword ptr [RSP + 0x54]
SETZ AL
TEST AL,0x1
JNZ 0x00173906
JMP 0x00173912
LAB_00173906:
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x60],RAX
JMP 0x00173930
LAB_00173912:
MOV RAX,qword ptr [RSP + 0x40]
MOV EAX,dword ptr [RAX]
AND EAX,0x3ffffff
MOV EAX,EAX
MOV qword ptr [RSP + 0x30],RAX
JMP 0x001738cf
LAB_00173927:
MOV qword ptr [RSP + 0x60],0x0
LAB_00173930:
CMP qword ptr [RSP + 0x60],0x0
JZ 0x00173942
MOV dword ptr [RSP + 0x2c],0x0
JMP 0x0017394a
LAB_00173942:
MOV dword ptr [RSP + 0x2c],0x1
LAB_0017394a:
MOV EAX,dword ptr [RSP + 0x2c]
ADD RSP,0x68
RET
|
int4 is_backtrace_needed(int8 param_1,long param_2,int param_3)
{
uint uVar1;
long lVar2;
long lVar3;
int4 local_3c;
ulong local_38;
uint *local_8;
if (param_3 == -1) {
if (*(short *)(param_2 + 6) == 3) {
lVar3 = *(long *)(param_2 + 0x18);
uVar1 = *(uint *)(lVar3 + 0x20);
lVar2 = prop_hash_end(lVar3);
uVar1 = *(uint *)(lVar2 + (-1 - (ulong)(uVar1 & 0x36)) * 4);
lVar3 = get_shape_prop(lVar3);
while (local_38 = (ulong)uVar1, local_38 != 0) {
local_8 = (uint *)(lVar3 + (local_38 - 1) * 8);
if (local_8[1] == 0x36) goto LAB_00173930;
uVar1 = *local_8 & 0x3ffffff;
}
local_8 = (uint *)0x0;
LAB_00173930:
if (local_8 == (uint *)0x0) {
local_3c = 1;
}
else {
local_3c = 0;
}
}
else {
local_3c = 0;
}
}
else {
local_3c = 0;
}
return local_3c;
}
|
|
14,665
|
lunasvg::SVGGraphicsElement::getStrokeData(lunasvg::SVGLayoutState const&) const
|
dmazzella[P]pylunasvg/lunasvg/source/svgelement.cpp
|
StrokeData SVGGraphicsElement::getStrokeData(const SVGLayoutState& state) const
{
LengthContext lengthContext(this);
StrokeData strokeData(lengthContext.valueForLength(state.stroke_width(), LengthDirection::Diagonal));
strokeData.setMiterLimit(state.stroke_miterlimit());
strokeData.setLineCap(state.stroke_linecap());
strokeData.setLineJoin(state.stroke_linejoin());
strokeData.setDashOffset(lengthContext.valueForLength(state.stroke_dashoffset(), LengthDirection::Diagonal));
DashArray dashArray;
for(const auto& dash : state.stroke_dasharray())
dashArray.push_back(lengthContext.valueForLength(dash, LengthDirection::Diagonal));
strokeData.setDashArray(std::move(dashArray));
return strokeData;
}
|
O0
|
cpp
|
lunasvg::SVGGraphicsElement::getStrokeData(lunasvg::SVGLayoutState const&) const:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdi, -0xa8(%rbp)
movq %rdi, %rax
movq %rax, -0xb8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x28(%rbp), %rdi
movq %rdi, -0xb0(%rbp)
xorl %edx, %edx
callq 0x20050
movb $0x0, -0x29(%rbp)
movq -0x18(%rbp), %rdi
callq 0x20960
movq -0xb0(%rbp), %rdi
movq %rax, %rsi
movl $0x2, %edx
callq 0x49a10
movq -0xa8(%rbp), %rdi
callq 0x20980
movq -0x18(%rbp), %rdi
callq 0x209f0
movss %xmm0, -0x9c(%rbp)
jmp 0x1a68e
movss -0x9c(%rbp), %xmm0
movq -0xa8(%rbp), %rdi
callq 0x209d0
jmp 0x1a6a4
movq -0x18(%rbp), %rdi
callq 0x20a30
movb %al, -0xb9(%rbp)
jmp 0x1a6b5
movq -0xa8(%rbp), %rdi
movb -0xb9(%rbp), %al
movzbl %al, %esi
callq 0x20a10
jmp 0x1a6cc
movq -0x18(%rbp), %rdi
callq 0x20a70
movb %al, -0xba(%rbp)
jmp 0x1a6dd
movq -0xa8(%rbp), %rdi
movb -0xba(%rbp), %al
movzbl %al, %esi
callq 0x20a50
jmp 0x1a6f4
movq -0x18(%rbp), %rdi
callq 0x20ab0
movq %rax, -0xc8(%rbp)
jmp 0x1a706
movq -0xc8(%rbp), %rsi
leaq -0x28(%rbp), %rdi
movl $0x2, %edx
callq 0x49a10
movss %xmm0, -0xcc(%rbp)
jmp 0x1a725
movss -0xcc(%rbp), %xmm0
movq -0xa8(%rbp), %rdi
callq 0x20a90
jmp 0x1a73b
leaq -0x58(%rbp), %rdi
callq 0x20ad0
movq -0x18(%rbp), %rdi
callq 0x20af0
movq %rax, -0xd8(%rbp)
jmp 0x1a756
movq -0xd8(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rdi
callq 0x20b10
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %rdi
callq 0x20b40
movq %rax, -0x70(%rbp)
leaq -0x68(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x20b70
testb $0x1, %al
jne 0x1a78e
jmp 0x1a7ff
leaq -0x68(%rbp), %rdi
callq 0x20bb0
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rsi
leaq -0x28(%rbp), %rdi
movl $0x2, %edx
callq 0x49a10
movss %xmm0, -0xdc(%rbp)
jmp 0x1a7b7
movss -0xdc(%rbp), %xmm0
movss %xmm0, -0x7c(%rbp)
leaq -0x58(%rbp), %rdi
leaq -0x7c(%rbp), %rsi
callq 0x20bd0
jmp 0x1a7d3
jmp 0x1a7d5
leaq -0x68(%rbp), %rdi
callq 0x20c00
jmp 0x1a77b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x1a88b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x1a864
leaq -0x98(%rbp), %rdi
movq %rdi, -0xe8(%rbp)
leaq -0x58(%rbp), %rsi
callq 0x20c50
movq -0xa8(%rbp), %rdi
movq -0xe8(%rbp), %rsi
callq 0x20c20
jmp 0x1a82b
leaq -0x98(%rbp), %rdi
callq 0x20c80
movb $0x1, -0x29(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x20c80
testb $0x1, -0x29(%rbp)
jne 0x1a87b
jmp 0x1a86f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x20c80
leaq -0x58(%rbp), %rdi
callq 0x20c80
jmp 0x1a88b
movq -0xa8(%rbp), %rdi
callq 0x20ce0
movq -0xb8(%rbp), %rax
addq $0xf0, %rsp
popq %rbp
retq
movq -0xa8(%rbp), %rdi
callq 0x20ce0
movq -0x38(%rbp), %rdi
callq 0xb6c0
|
_ZNK7lunasvg18SVGGraphicsElement13getStrokeDataERKNS_14SVGLayoutStateE:
push rbp
mov rbp, rsp
sub rsp, 0F0h
mov [rbp+var_A8], rdi
mov rax, rdi
mov [rbp+var_B8], rax
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rsi, [rbp+var_10]
lea rdi, [rbp+var_28]
mov [rbp+var_B0], rdi
xor edx, edx
call _ZN7lunasvg13LengthContextC2EPKNS_10SVGElementENS_5UnitsE; lunasvg::LengthContext::LengthContext(lunasvg::SVGElement const*,lunasvg::Units)
mov [rbp+var_29], 0
mov rdi, [rbp+var_18]; this
call _ZNK7lunasvg14SVGLayoutState12stroke_widthEv; lunasvg::SVGLayoutState::stroke_width(void)
mov rdi, [rbp+var_B0]
mov rsi, rax
mov edx, 2
call _ZNK7lunasvg13LengthContext14valueForLengthERKNS_6LengthENS_15LengthDirectionE; lunasvg::LengthContext::valueForLength(lunasvg::Length const&,lunasvg::LengthDirection)
mov rdi, [rbp+var_A8]; this
call _ZN7lunasvg10StrokeDataC2Ef; lunasvg::StrokeData::StrokeData(float)
mov rdi, [rbp+var_18]; this
call _ZNK7lunasvg14SVGLayoutState17stroke_miterlimitEv; lunasvg::SVGLayoutState::stroke_miterlimit(void)
movss [rbp+var_9C], xmm0
jmp short $+2
loc_1A68E:
movss xmm0, [rbp+var_9C]; float
mov rdi, [rbp+var_A8]; this
call _ZN7lunasvg10StrokeData13setMiterLimitEf; lunasvg::StrokeData::setMiterLimit(float)
jmp short $+2
loc_1A6A4:
mov rdi, [rbp+var_18]; this
call _ZNK7lunasvg14SVGLayoutState14stroke_linecapEv; lunasvg::SVGLayoutState::stroke_linecap(void)
mov [rbp+var_B9], al
jmp short $+2
loc_1A6B5:
mov rdi, [rbp+var_A8]
mov al, [rbp+var_B9]
movzx esi, al
call _ZN7lunasvg10StrokeData10setLineCapENS_7LineCapE; lunasvg::StrokeData::setLineCap(lunasvg::LineCap)
jmp short $+2
loc_1A6CC:
mov rdi, [rbp+var_18]; this
call _ZNK7lunasvg14SVGLayoutState15stroke_linejoinEv; lunasvg::SVGLayoutState::stroke_linejoin(void)
mov [rbp+var_BA], al
jmp short $+2
loc_1A6DD:
mov rdi, [rbp+var_A8]
mov al, [rbp+var_BA]
movzx esi, al
call _ZN7lunasvg10StrokeData11setLineJoinENS_8LineJoinE; lunasvg::StrokeData::setLineJoin(lunasvg::LineJoin)
jmp short $+2
loc_1A6F4:
mov rdi, [rbp+var_18]; this
call _ZNK7lunasvg14SVGLayoutState17stroke_dashoffsetEv; lunasvg::SVGLayoutState::stroke_dashoffset(void)
mov [rbp+var_C8], rax
jmp short $+2
loc_1A706:
mov rsi, [rbp+var_C8]
lea rdi, [rbp+var_28]
mov edx, 2
call _ZNK7lunasvg13LengthContext14valueForLengthERKNS_6LengthENS_15LengthDirectionE; lunasvg::LengthContext::valueForLength(lunasvg::Length const&,lunasvg::LengthDirection)
movss [rbp+var_CC], xmm0
jmp short $+2
loc_1A725:
movss xmm0, [rbp+var_CC]; float
mov rdi, [rbp+var_A8]; this
call _ZN7lunasvg10StrokeData13setDashOffsetEf; lunasvg::StrokeData::setDashOffset(float)
jmp short $+2
loc_1A73B:
lea rdi, [rbp+var_58]
call _ZNSt6vectorIfSaIfEEC2Ev; std::vector<float>::vector(void)
mov rdi, [rbp+var_18]; this
call _ZNK7lunasvg14SVGLayoutState16stroke_dasharrayEv; lunasvg::SVGLayoutState::stroke_dasharray(void)
mov [rbp+var_D8], rax
jmp short $+2
loc_1A756:
mov rax, [rbp+var_D8]
mov [rbp+var_60], rax
mov rdi, [rbp+var_60]
call _ZNKSt6vectorIN7lunasvg6LengthESaIS1_EE5beginEv; std::vector<lunasvg::Length>::begin(void)
mov [rbp+var_68], rax
mov rdi, [rbp+var_60]
call _ZNKSt6vectorIN7lunasvg6LengthESaIS1_EE3endEv; std::vector<lunasvg::Length>::end(void)
mov [rbp+var_70], rax
loc_1A77B:
lea rdi, [rbp+var_68]
lea rsi, [rbp+var_70]
call _ZN9__gnu_cxxneIPKN7lunasvg6LengthESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_; __gnu_cxx::operator!=<lunasvg::Length const*,std::vector<lunasvg::Length>>(__gnu_cxx::__normal_iterator<lunasvg::Length const*,std::vector<lunasvg::Length>> const&,__gnu_cxx::__normal_iterator<lunasvg::Length const*,std::vector<lunasvg::Length>> const&)
test al, 1
jnz short loc_1A78E
jmp short loc_1A7FF
loc_1A78E:
lea rdi, [rbp+var_68]
call _ZNK9__gnu_cxx17__normal_iteratorIPKN7lunasvg6LengthESt6vectorIS2_SaIS2_EEEdeEv; __gnu_cxx::__normal_iterator<lunasvg::Length const*,std::vector<lunasvg::Length>>::operator*(void)
mov [rbp+var_78], rax
mov rsi, [rbp+var_78]
lea rdi, [rbp+var_28]
mov edx, 2
call _ZNK7lunasvg13LengthContext14valueForLengthERKNS_6LengthENS_15LengthDirectionE; lunasvg::LengthContext::valueForLength(lunasvg::Length const&,lunasvg::LengthDirection)
movss [rbp+var_DC], xmm0
jmp short $+2
loc_1A7B7:
movss xmm0, [rbp+var_DC]
movss [rbp+var_7C], xmm0
lea rdi, [rbp+var_58]
lea rsi, [rbp+var_7C]
call _ZNSt6vectorIfSaIfEE9push_backEOf; std::vector<float>::push_back(float &&)
jmp short $+2
loc_1A7D3:
jmp short $+2
loc_1A7D5:
lea rdi, [rbp+var_68]
call _ZN9__gnu_cxx17__normal_iteratorIPKN7lunasvg6LengthESt6vectorIS2_SaIS2_EEEppEv; __gnu_cxx::__normal_iterator<lunasvg::Length const*,std::vector<lunasvg::Length>>::operator++(void)
jmp short loc_1A77B
mov rcx, rax
mov eax, edx
mov [rbp+var_38], rcx
mov [rbp+var_3C], eax
jmp loc_1A88B
mov rcx, rax
mov eax, edx
mov [rbp+var_38], rcx
mov [rbp+var_3C], eax
jmp short loc_1A864
loc_1A7FF:
lea rdi, [rbp+var_98]
mov [rbp+var_E8], rdi
lea rsi, [rbp+var_58]
call _ZNSt6vectorIfSaIfEEC2EOS1_; std::vector<float>::vector(std::vector<float>&&)
mov rdi, [rbp+var_A8]
mov rsi, [rbp+var_E8]
call _ZN7lunasvg10StrokeData12setDashArrayESt6vectorIfSaIfEE; lunasvg::StrokeData::setDashArray(std::vector<float>)
jmp short $+2
loc_1A82B:
lea rdi, [rbp+var_98]
call _ZNSt6vectorIfSaIfEED2Ev; std::vector<float>::~vector()
mov [rbp+var_29], 1
lea rdi, [rbp+var_58]
call _ZNSt6vectorIfSaIfEED2Ev; std::vector<float>::~vector()
test [rbp+var_29], 1
jnz short loc_1A87B
jmp short loc_1A86F
mov rcx, rax
mov eax, edx
mov [rbp+var_38], rcx
mov [rbp+var_3C], eax
lea rdi, [rbp+var_98]
call _ZNSt6vectorIfSaIfEED2Ev; std::vector<float>::~vector()
loc_1A864:
lea rdi, [rbp+var_58]
call _ZNSt6vectorIfSaIfEED2Ev; std::vector<float>::~vector()
jmp short loc_1A88B
loc_1A86F:
mov rdi, [rbp+var_A8]; this
call _ZN7lunasvg10StrokeDataD2Ev; lunasvg::StrokeData::~StrokeData()
loc_1A87B:
mov rax, [rbp+var_B8]
add rsp, 0F0h
pop rbp
retn
loc_1A88B:
mov rdi, [rbp+var_A8]; this
call _ZN7lunasvg10StrokeDataD2Ev; lunasvg::StrokeData::~StrokeData()
mov rdi, [rbp+var_38]
call __Unwind_Resume
|
lunasvg::SVGGraphicsElement * lunasvg::SVGGraphicsElement::getStrokeData(
lunasvg::SVGGraphicsElement *this,
const lunasvg::SVGLayoutState *a2,
lunasvg::SVGLayoutState *a3)
{
long long v3; // rax
float v4; // xmm0_4
float v6; // [rsp+24h] [rbp-CCh]
long long v7; // [rsp+28h] [rbp-C8h]
unsigned __int8 v8; // [rsp+36h] [rbp-BAh]
unsigned __int8 v9; // [rsp+37h] [rbp-B9h]
_BYTE v10[28]; // [rsp+58h] [rbp-98h] BYREF
float v11; // [rsp+74h] [rbp-7Ch] BYREF
long long v12; // [rsp+78h] [rbp-78h]
long long v13; // [rsp+80h] [rbp-70h] BYREF
long long v14; // [rsp+88h] [rbp-68h] BYREF
long long v15; // [rsp+90h] [rbp-60h]
_BYTE v16[28]; // [rsp+98h] [rbp-58h] BYREF
char v17; // [rsp+C7h] [rbp-29h]
_BYTE v18[16]; // [rsp+C8h] [rbp-28h] BYREF
lunasvg::SVGLayoutState *v19; // [rsp+D8h] [rbp-18h]
const lunasvg::SVGLayoutState *v20; // [rsp+E0h] [rbp-10h]
lunasvg::SVGGraphicsElement *v21; // [rsp+E8h] [rbp-8h]
v21 = this;
v20 = a2;
v19 = a3;
lunasvg::LengthContext::LengthContext(v18, a2, 0LL);
v17 = 0;
v3 = lunasvg::SVGLayoutState::stroke_width(v19);
v4 = lunasvg::LengthContext::valueForLength(v18, v3, 2LL);
lunasvg::StrokeData::StrokeData(this, v4);
lunasvg::SVGLayoutState::stroke_miterlimit(v19);
lunasvg::StrokeData::setMiterLimit(this, v4);
v9 = lunasvg::SVGLayoutState::stroke_linecap(v19);
lunasvg::StrokeData::setLineCap(this, v9);
v8 = lunasvg::SVGLayoutState::stroke_linejoin(v19);
lunasvg::StrokeData::setLineJoin(this, v8);
v7 = lunasvg::SVGLayoutState::stroke_dashoffset(v19);
v6 = lunasvg::LengthContext::valueForLength(v18, v7, 2LL);
lunasvg::StrokeData::setDashOffset(this, v6);
std::vector<float>::vector(v16);
v15 = lunasvg::SVGLayoutState::stroke_dasharray(v19);
v14 = std::vector<lunasvg::Length>::begin(v15);
v13 = std::vector<lunasvg::Length>::end(v15);
while ( (__gnu_cxx::operator!=<lunasvg::Length const*,std::vector<lunasvg::Length>>(&v14, &v13) & 1) != 0 )
{
v12 = __gnu_cxx::__normal_iterator<lunasvg::Length const*,std::vector<lunasvg::Length>>::operator*(&v14);
v11 = lunasvg::LengthContext::valueForLength(v18, v12, 2LL);
std::vector<float>::push_back(v16, &v11);
__gnu_cxx::__normal_iterator<lunasvg::Length const*,std::vector<lunasvg::Length>>::operator++(&v14);
}
std::vector<float>::vector(v10, v16);
lunasvg::StrokeData::setDashArray(this, v10);
std::vector<float>::~vector(v10);
v17 = 1;
std::vector<float>::~vector(v16);
if ( (v17 & 1) == 0 )
lunasvg::StrokeData::~StrokeData(this);
return this;
}
|
getStrokeData:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xf0
MOV qword ptr [RBP + -0xa8],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0xb8],RAX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RSI,qword ptr [RBP + -0x10]
LEA RDI,[RBP + -0x28]
MOV qword ptr [RBP + -0xb0],RDI
XOR EDX,EDX
CALL 0x00120050
MOV byte ptr [RBP + -0x29],0x0
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00120960
MOV RDI,qword ptr [RBP + -0xb0]
MOV RSI,RAX
MOV EDX,0x2
CALL 0x00149a10
MOV RDI,qword ptr [RBP + -0xa8]
CALL 0x00120980
MOV RDI,qword ptr [RBP + -0x18]
LAB_0011a67f:
CALL 0x001209f0
MOVSS dword ptr [RBP + -0x9c],XMM0
JMP 0x0011a68e
LAB_0011a68e:
MOVSS XMM0,dword ptr [RBP + -0x9c]
MOV RDI,qword ptr [RBP + -0xa8]
CALL 0x001209d0
JMP 0x0011a6a4
LAB_0011a6a4:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00120a30
MOV byte ptr [RBP + -0xb9],AL
JMP 0x0011a6b5
LAB_0011a6b5:
MOV RDI,qword ptr [RBP + -0xa8]
MOV AL,byte ptr [RBP + -0xb9]
MOVZX ESI,AL
CALL 0x00120a10
JMP 0x0011a6cc
LAB_0011a6cc:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00120a70
MOV byte ptr [RBP + -0xba],AL
JMP 0x0011a6dd
LAB_0011a6dd:
MOV RDI,qword ptr [RBP + -0xa8]
MOV AL,byte ptr [RBP + -0xba]
MOVZX ESI,AL
CALL 0x00120a50
JMP 0x0011a6f4
LAB_0011a6f4:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00120ab0
MOV qword ptr [RBP + -0xc8],RAX
JMP 0x0011a706
LAB_0011a706:
MOV RSI,qword ptr [RBP + -0xc8]
LEA RDI,[RBP + -0x28]
MOV EDX,0x2
CALL 0x00149a10
MOVSS dword ptr [RBP + -0xcc],XMM0
JMP 0x0011a725
LAB_0011a725:
MOVSS XMM0,dword ptr [RBP + -0xcc]
MOV RDI,qword ptr [RBP + -0xa8]
CALL 0x00120a90
JMP 0x0011a73b
LAB_0011a73b:
LEA RDI,[RBP + -0x58]
CALL 0x00120ad0
MOV RDI,qword ptr [RBP + -0x18]
LAB_0011a748:
CALL 0x00120af0
MOV qword ptr [RBP + -0xd8],RAX
JMP 0x0011a756
LAB_0011a756:
MOV RAX,qword ptr [RBP + -0xd8]
MOV qword ptr [RBP + -0x60],RAX
MOV RDI,qword ptr [RBP + -0x60]
CALL 0x00120b10
MOV qword ptr [RBP + -0x68],RAX
MOV RDI,qword ptr [RBP + -0x60]
CALL 0x00120b40
MOV qword ptr [RBP + -0x70],RAX
LAB_0011a77b:
LEA RDI,[RBP + -0x68]
LEA RSI,[RBP + -0x70]
CALL 0x00120b70
TEST AL,0x1
JNZ 0x0011a78e
JMP 0x0011a7ff
LAB_0011a78e:
LEA RDI,[RBP + -0x68]
CALL 0x00120bb0
MOV qword ptr [RBP + -0x78],RAX
MOV RSI,qword ptr [RBP + -0x78]
LEA RDI,[RBP + -0x28]
MOV EDX,0x2
CALL 0x00149a10
MOVSS dword ptr [RBP + -0xdc],XMM0
JMP 0x0011a7b7
LAB_0011a7b7:
MOVSS XMM0,dword ptr [RBP + -0xdc]
MOVSS dword ptr [RBP + -0x7c],XMM0
LEA RDI,[RBP + -0x58]
LEA RSI,[RBP + -0x7c]
CALL 0x00120bd0
JMP 0x0011a7d3
LAB_0011a7d3:
JMP 0x0011a7d5
LAB_0011a7d5:
LEA RDI,[RBP + -0x68]
CALL 0x00120c00
JMP 0x0011a77b
LAB_0011a7ff:
LEA RDI,[RBP + -0x98]
MOV qword ptr [RBP + -0xe8],RDI
LEA RSI,[RBP + -0x58]
CALL 0x00120c50
MOV RDI,qword ptr [RBP + -0xa8]
MOV RSI,qword ptr [RBP + -0xe8]
LAB_0011a824:
CALL 0x00120c20
LAB_0011a829:
JMP 0x0011a82b
LAB_0011a82b:
LEA RDI,[RBP + -0x98]
CALL 0x00120c80
MOV byte ptr [RBP + -0x29],0x1
LEA RDI,[RBP + -0x58]
CALL 0x00120c80
TEST byte ptr [RBP + -0x29],0x1
JNZ 0x0011a87b
JMP 0x0011a86f
LAB_0011a86f:
MOV RDI,qword ptr [RBP + -0xa8]
CALL 0x00120ce0
LAB_0011a87b:
MOV RAX,qword ptr [RBP + -0xb8]
ADD RSP,0xf0
POP RBP
RET
|
/* lunasvg::SVGGraphicsElement::getStrokeData(lunasvg::SVGLayoutState const&) const */
SVGLayoutState * lunasvg::SVGGraphicsElement::getStrokeData(SVGLayoutState *param_1)
{
int1 uVar1;
bool bVar2;
int8 uVar3;
SVGLayoutState *in_RDX;
int8 in_RSI;
float fVar4;
vector<float,std::allocator<float>> local_a0 [28];
float local_84;
int8 local_80;
int8 local_78;
int8 local_70;
vector<lunasvg::Length,std::allocator<lunasvg::Length>> *local_68;
vector<float,std::allocator<float>> local_60 [47];
byte local_31;
LengthContext local_30 [16];
SVGLayoutState *local_20;
SVGLayoutState *local_10;
local_20 = in_RDX;
local_10 = param_1;
LengthContext::LengthContext(local_30,in_RSI,0);
local_31 = 0;
uVar3 = SVGLayoutState::stroke_width(local_20);
fVar4 = (float)LengthContext::valueForLength(local_30,uVar3,2);
StrokeData::StrokeData((StrokeData *)param_1,fVar4);
/* try { // try from 0011a67f to 0011a738 has its CatchHandler @ 0011a7e0 */
fVar4 = (float)SVGLayoutState::stroke_miterlimit(local_20);
StrokeData::setMiterLimit((StrokeData *)param_1,fVar4);
uVar1 = SVGLayoutState::stroke_linecap(local_20);
StrokeData::setLineCap((StrokeData *)param_1,uVar1);
uVar1 = SVGLayoutState::stroke_linejoin(local_20);
StrokeData::setLineJoin((StrokeData *)param_1,uVar1);
uVar3 = SVGLayoutState::stroke_dashoffset(local_20);
fVar4 = (float)LengthContext::valueForLength(local_30,uVar3,2);
StrokeData::setDashOffset((StrokeData *)param_1,fVar4);
std::vector<float,std::allocator<float>>::vector(local_60);
/* try { // try from 0011a748 to 0011a7d0 has its CatchHandler @ 0011a7f1 */
local_68 = (vector<lunasvg::Length,std::allocator<lunasvg::Length>> *)
SVGLayoutState::stroke_dasharray(local_20);
local_70 = std::vector<lunasvg::Length,std::allocator<lunasvg::Length>>::begin(local_68);
local_78 = std::vector<lunasvg::Length,std::allocator<lunasvg::Length>>::end(local_68);
while( true ) {
bVar2 = __gnu_cxx::operator!=((__normal_iterator *)&local_70,(__normal_iterator *)&local_78);
if (!bVar2) break;
local_80 = __gnu_cxx::
__normal_iterator<lunasvg::Length_const*,std::vector<lunasvg::Length,std::allocator<lunasvg::Length>>>
::operator*((__normal_iterator<lunasvg::Length_const*,std::vector<lunasvg::Length,std::allocator<lunasvg::Length>>>
*)&local_70);
local_84 = (float)LengthContext::valueForLength(local_30,local_80,2);
std::vector<float,std::allocator<float>>::push_back(local_60,&local_84);
__gnu_cxx::
__normal_iterator<lunasvg::Length_const*,std::vector<lunasvg::Length,std::allocator<lunasvg::Length>>>
::operator++((__normal_iterator<lunasvg::Length_const*,std::vector<lunasvg::Length,std::allocator<lunasvg::Length>>>
*)&local_70);
}
std::vector<float,std::allocator<float>>::vector(local_a0,(vector *)local_60);
/* try { // try from 0011a824 to 0011a828 has its CatchHandler @ 0011a84c */
StrokeData::setDashArray((StrokeData *)param_1,local_a0);
std::vector<float,std::allocator<float>>::~vector(local_a0);
local_31 = 1;
std::vector<float,std::allocator<float>>::~vector(local_60);
if ((local_31 & 1) == 0) {
StrokeData::~StrokeData((StrokeData *)param_1);
}
return param_1;
}
|
|
14,666
|
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::insert_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&)
|
monkey531[P]llama/common/json.hpp
|
iterator insert_iterator(const_iterator pos, Args&& ... args)
{
iterator result(this);
JSON_ASSERT(m_data.m_value.array != nullptr);
auto insert_pos = std::distance(m_data.m_value.array->begin(), pos.m_it.array_iterator);
m_data.m_value.array->insert(pos.m_it.array_iterator, std::forward<Args>(args)...);
result.m_it.array_iterator = m_data.m_value.array->begin() + insert_pos;
// This could have been written as:
// result.m_it.array_iterator = m_data.m_value.array->insert(pos.m_it.array_iterator, cnt, val);
// but the return value of insert is missing in GCC 4.8, so it is written this way instead.
set_parents();
return result;
}
|
O1
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::insert_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&):
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rsi, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movq %rax, 0x18(%rdi)
movzbl (%rsi), %esi
cmpl $0x2, %esi
je 0x7454b
cmpl $0x1, %esi
jne 0x74555
leaq 0x8(%rbx), %rax
movq $0x0, (%rax)
jmp 0x74559
movq $0x0, 0x10(%rbx)
jmp 0x74559
movq %rax, 0x18(%rbx)
movq 0x8(%r14), %rdi
testq %rdi, %rdi
je 0x74588
movq 0x10(%rdx), %rsi
movq %rsi, %r15
subq (%rdi), %r15
movq %rcx, %rdx
callq 0x74632
movq 0x8(%r14), %rax
addq (%rax), %r15
movq %r15, 0x10(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x3ceff(%rip), %rdi # 0xb148e
leaq 0x3b6d3(%rip), %rdx # 0xafc69
leaq 0x3cfa3(%rip), %rcx # 0xb1540
movl $0x582c, %esi # imm = 0x582C
xorl %eax, %eax
callq 0x19b50
|
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE15insert_iteratorIJRKSD_EEENS0_6detail9iter_implISD_EENSI_ISF_EEDpOT_:
push r15
push r14
push rbx
mov r14, rsi
mov rbx, rdi
mov rax, 8000000000000000h
mov [rdi], rsi
xorps xmm0, xmm0
movups xmmword ptr [rdi+8], xmm0
mov [rdi+18h], rax
movzx esi, byte ptr [rsi]
cmp esi, 2
jz short loc_7454B
cmp esi, 1
jnz short loc_74555
lea rax, [rbx+8]
mov qword ptr [rax], 0
jmp short loc_74559
loc_7454B:
mov qword ptr [rbx+10h], 0
jmp short loc_74559
loc_74555:
mov [rbx+18h], rax
loc_74559:
mov rdi, [r14+8]
test rdi, rdi
jz short loc_74588
mov rsi, [rdx+10h]
mov r15, rsi
sub r15, [rdi]
mov rdx, rcx
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE6insertEN9__gnu_cxx17__normal_iteratorIPKSD_SF_EERSI_; 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>>::insert(__gnu_cxx::__normal_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const*,std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,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+8]
add r15, [rax]
mov [rbx+10h], r15
mov rax, rbx
pop rbx
pop r14
pop r15
retn
loc_74588:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aMDataMTypeValu_0+23h; "m_data.m_value.array != nullptr"
mov esi, 582Ch
xor eax, eax
call _ggml_abort
|
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::insert_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const&>(
long long a1,
unsigned __int8 *a2,
long long a3,
long long a4)
{
int v6; // esi
_QWORD *v7; // rdi
long long v8; // r15
*(_QWORD *)a1 = a2;
*(_OWORD *)(a1 + 8) = 0LL;
*(_QWORD *)(a1 + 24) = 0x8000000000000000LL;
v6 = *a2;
if ( v6 == 2 )
{
*(_QWORD *)(a1 + 16) = 0LL;
}
else if ( v6 == 1 )
{
*(_QWORD *)(a1 + 8) = 0LL;
}
else
{
*(_QWORD *)(a1 + 24) = 0x8000000000000000LL;
}
v7 = (_QWORD *)*((_QWORD *)a2 + 1);
if ( v7 )
{
v8 = *(_QWORD *)(a3 + 16) - *v7;
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>>::insert(
v7,
*(_QWORD *)(a3 + 16),
a4);
*(_QWORD *)(a1 + 16) = **((_QWORD **)a2 + 1) + v8;
return a1;
}
else
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
22572LL,
"GGML_ASSERT(%s) failed",
"m_data.m_value.array != nullptr");
return nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[26],char const*>(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
22572LL);
}
}
|
insert_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const&>:
PUSH R15
PUSH R14
PUSH RBX
MOV R14,RSI
MOV RBX,RDI
MOV RAX,-0x8000000000000000
MOV qword ptr [RDI],RSI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x8],XMM0
MOV qword ptr [RDI + 0x18],RAX
MOVZX ESI,byte ptr [RSI]
CMP ESI,0x2
JZ 0x0017454b
CMP ESI,0x1
JNZ 0x00174555
LEA RAX,[RBX + 0x8]
MOV qword ptr [RAX],0x0
JMP 0x00174559
LAB_0017454b:
MOV qword ptr [RBX + 0x10],0x0
JMP 0x00174559
LAB_00174555:
MOV qword ptr [RBX + 0x18],RAX
LAB_00174559:
MOV RDI,qword ptr [R14 + 0x8]
TEST RDI,RDI
JZ 0x00174588
MOV RSI,qword ptr [RDX + 0x10]
MOV R15,RSI
SUB R15,qword ptr [RDI]
MOV RDX,RCX
CALL 0x00174632
MOV RAX,qword ptr [R14 + 0x8]
ADD R15,qword ptr [RAX]
MOV qword ptr [RBX + 0x10],R15
MOV RAX,RBX
POP RBX
POP R14
POP R15
RET
LAB_00174588:
LEA RDI,[0x1b148e]
LEA RDX,[0x1afc69]
LEA RCX,[0x1b1540]
MOV ESI,0x582c
XOR EAX,EAX
CALL 0x00119b50
|
/* nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> > nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >,
void>::insert_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>
const&>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const>,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const&) */
int8 *
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::
insert_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const&>
(int8 *param_1,char *param_2,long param_3,int8 param_4)
{
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>>>
*pvVar1;
long lVar2;
long lVar3;
*param_1 = param_2;
param_1[1] = 0;
param_1[2] = 0;
param_1[3] = 0x8000000000000000;
if (*param_2 == '\x02') {
param_1[2] = 0;
}
else if (*param_2 == '\x01') {
param_1[1] = 0;
}
else {
param_1[3] = 0x8000000000000000;
}
pvVar1 = *(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
**)(param_2 + 8);
if (pvVar1 != (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>>>
*)0x0) {
lVar2 = *(long *)(param_3 + 0x10);
lVar3 = *(long *)pvVar1;
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>>>
::insert(pvVar1,lVar2,param_4);
param_1[2] = (lVar2 - lVar3) + **(long **)(param_2 + 8);
return param_1;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x582c,
"GGML_ASSERT(%s) failed","m_data.m_value.array != nullptr");
}
|
|
14,667
|
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::insert_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&)
|
monkey531[P]llama/common/json.hpp
|
iterator insert_iterator(const_iterator pos, Args&& ... args)
{
iterator result(this);
JSON_ASSERT(m_data.m_value.array != nullptr);
auto insert_pos = std::distance(m_data.m_value.array->begin(), pos.m_it.array_iterator);
m_data.m_value.array->insert(pos.m_it.array_iterator, std::forward<Args>(args)...);
result.m_it.array_iterator = m_data.m_value.array->begin() + insert_pos;
// This could have been written as:
// result.m_it.array_iterator = m_data.m_value.array->insert(pos.m_it.array_iterator, cnt, val);
// but the return value of insert is missing in GCC 4.8, so it is written this way instead.
set_parents();
return result;
}
|
O3
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::insert_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&):
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq %rsi, (%rdi)
movq $0x0, 0x8(%rdi)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, 0x18(%rdi)
movq 0x8(%rsi), %rdi
testq %rdi, %rdi
je 0x71c6d
movq %rsi, %r14
movq 0x10(%rdx), %rsi
movq %rsi, %r15
subq (%rdi), %r15
movq %rcx, %rdx
callq 0x71d16
movq 0x8(%r14), %rax
addq (%rax), %r15
movq %r15, 0x10(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x3b80a(%rip), %rdi # 0xad47e
leaq 0x39fde(%rip), %rdx # 0xabc59
leaq 0x3b8ae(%rip), %rcx # 0xad530
movl $0x582c, %esi # imm = 0x582C
xorl %eax, %eax
callq 0x18b50
|
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE15insert_iteratorIJRKSD_EEENS0_6detail9iter_implISD_EENSI_ISF_EEDpOT_:
push r15
push r14
push rbx
mov rbx, rdi
mov [rdi], rsi
mov qword ptr [rdi+8], 0
mov rax, 8000000000000000h
mov [rdi+18h], rax
mov rdi, [rsi+8]
test rdi, rdi
jz short loc_71C6D
mov r14, rsi
mov rsi, [rdx+10h]
mov r15, rsi
sub r15, [rdi]
mov rdx, rcx
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE6insertEN9__gnu_cxx17__normal_iteratorIPKSD_SF_EERSI_; 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>>::insert(__gnu_cxx::__normal_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const*,std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,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+8]
add r15, [rax]
mov [rbx+10h], r15
mov rax, rbx
pop rbx
pop r14
pop r15
retn
loc_71C6D:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aMDataMTypeValu_0+23h; "m_data.m_value.array != nullptr"
mov esi, 582Ch
xor eax, eax
call _ggml_abort
|
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::insert_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const&>(
_QWORD *a1,
long long a2,
long long a3,
long long a4)
{
_QWORD *v5; // rdi
long long v6; // r15
*a1 = a2;
a1[1] = 0LL;
a1[3] = 0x8000000000000000LL;
v5 = *(_QWORD **)(a2 + 8);
if ( v5 )
{
v6 = *(_QWORD *)(a3 + 16) - *v5;
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>>::insert(
v5,
*(_QWORD *)(a3 + 16),
a4);
a1[2] = **(_QWORD **)(a2 + 8) + v6;
return (long long)a1;
}
else
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
22572LL,
"GGML_ASSERT(%s) failed",
"m_data.m_value.array != nullptr");
return nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[26],char const*>(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
22572LL);
}
}
|
insert_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const&>:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDI
MOV qword ptr [RDI],RSI
MOV qword ptr [RDI + 0x8],0x0
MOV RAX,-0x8000000000000000
MOV qword ptr [RDI + 0x18],RAX
MOV RDI,qword ptr [RSI + 0x8]
TEST RDI,RDI
JZ 0x00171c6d
MOV R14,RSI
MOV RSI,qword ptr [RDX + 0x10]
MOV R15,RSI
SUB R15,qword ptr [RDI]
MOV RDX,RCX
CALL 0x00171d16
MOV RAX,qword ptr [R14 + 0x8]
ADD R15,qword ptr [RAX]
MOV qword ptr [RBX + 0x10],R15
MOV RAX,RBX
POP RBX
POP R14
POP R15
RET
LAB_00171c6d:
LEA RDI,[0x1ad47e]
LEA RDX,[0x1abc59]
LEA RCX,[0x1ad530]
MOV ESI,0x582c
XOR EAX,EAX
CALL 0x00118b50
|
/* nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> > nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >,
void>::insert_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>
const&>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const>,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const&) */
long * nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::
insert_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const&>
(long *param_1,long param_2,long param_3,int8 param_4)
{
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>>>
*pvVar1;
long lVar2;
long lVar3;
*param_1 = param_2;
param_1[1] = 0;
param_1[3] = -0x8000000000000000;
pvVar1 = *(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
**)(param_2 + 8);
if (pvVar1 != (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>>>
*)0x0) {
lVar2 = *(long *)(param_3 + 0x10);
lVar3 = *(long *)pvVar1;
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>>>
::insert(pvVar1,lVar2,param_4);
param_1[2] = (lVar2 - lVar3) + **(long **)(param_2 + 8);
return param_1;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x582c,
"GGML_ASSERT(%s) failed","m_data.m_value.array != nullptr");
}
|
|
14,668
|
js_parse_error
|
bluesky950520[P]quickjs/quickjs.c
|
int __attribute__((format(printf, 2, 3))) js_parse_error(JSParseState *s, const char *fmt, ...)
{
JSContext *ctx = s->ctx;
va_list ap;
int backtrace_flags;
va_start(ap, fmt);
JS_ThrowError2(ctx, JS_SYNTAX_ERROR, fmt, ap, FALSE);
va_end(ap);
backtrace_flags = 0;
if (s->cur_func && s->cur_func->backtrace_barrier)
backtrace_flags = JS_BACKTRACE_FLAG_SINGLE_LEVEL;
build_backtrace(ctx, ctx->rt->current_exception, JS_UNDEFINED, s->filename,
s->line_num, s->col_num, backtrace_flags);
return -1;
}
|
O0
|
c
|
js_parse_error:
pushq %rbx
subq $0x130, %rsp # imm = 0x130
testb %al, %al
je 0x47413
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %r9, 0x48(%rsp)
movq %r8, 0x40(%rsp)
movq %rcx, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
movq %rdi, 0x128(%rsp)
movq %rsi, 0x120(%rsp)
movq 0x128(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x118(%rsp)
leaq 0x100(%rsp), %rax
leaq 0x20(%rsp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x140(%rsp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x10, (%rax)
movq 0x118(%rsp), %rdi
movq 0x120(%rsp), %rdx
leaq 0x100(%rsp), %rcx
movl $0x3, %esi
xorl %r8d, %r8d
callq 0x47570
movq %rax, 0xe8(%rsp)
movq %rdx, 0xf0(%rsp)
leaq 0x100(%rsp), %rax
movl $0x0, 0xfc(%rsp)
movq 0x128(%rsp), %rax
cmpq $0x0, 0x90(%rax)
je 0x474f1
movq 0x128(%rsp), %rax
movq 0x90(%rax), %rax
cmpl $0x0, 0x80(%rax)
je 0x474f1
movl $0x2, 0xfc(%rsp)
movq 0x118(%rsp), %rdi
movq 0x18(%rdi), %rax
movl $0x0, 0xd8(%rsp)
movq $0x3, 0xe0(%rsp)
movq 0x128(%rsp), %rcx
movq 0x18(%rcx), %r9
movl 0x10(%rcx), %r10d
movl 0x14(%rcx), %r11d
movl 0xfc(%rsp), %ebx
movq 0xf0(%rax), %rsi
movq 0xf8(%rax), %rdx
movq 0xd8(%rsp), %rcx
movq 0xe0(%rsp), %r8
movq %rsp, %rax
movl %ebx, 0x10(%rax)
movl %r11d, 0x8(%rax)
movl %r10d, (%rax)
callq 0x47690
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
addq $0x130, %rsp # imm = 0x130
popq %rbx
retq
nopl (%rax)
|
js_parse_error:
push rbx
sub rsp, 130h
test al, al
jz short loc_47413
movaps [rsp+138h+var_E8], xmm0
movaps [rsp+138h+var_D8], xmm1
movaps [rsp+138h+var_C8], xmm2
movaps [rsp+138h+var_B8], xmm3
movaps [rsp+138h+var_A8], xmm4
movaps [rsp+138h+var_98], xmm5
movaps [rsp+138h+var_88], xmm6
movaps [rsp+138h+var_78], xmm7
loc_47413:
mov [rsp+138h+var_F0], r9
mov [rsp+138h+var_F8], r8
mov [rsp+138h+var_100], rcx
mov [rsp+138h+var_108], rdx
mov [rsp+138h+var_10], rdi
mov [rsp+138h+var_18], rsi
mov rax, [rsp+138h+var_10]
mov rax, [rax]
mov [rsp+138h+var_20], rax
lea rax, [rsp+138h+var_38]
lea rcx, [rsp+138h+var_118]
mov [rax+10h], rcx
lea rcx, [rsp+138h+arg_0]
mov [rax+8], rcx
mov dword ptr [rax+4], 30h ; '0'
mov dword ptr [rax], 10h
mov rdi, [rsp+138h+var_20]
mov rdx, [rsp+138h+var_18]
lea rcx, [rsp+138h+var_38]
mov esi, 3
xor r8d, r8d
call JS_ThrowError2
mov [rsp+138h+var_50], rax
mov [rsp+138h+var_48], rdx
lea rax, [rsp+138h+var_38]
mov [rsp+138h+var_3C], 0
mov rax, [rsp+138h+var_10]
cmp qword ptr [rax+90h], 0
jz short loc_474F1
mov rax, [rsp+138h+var_10]
mov rax, [rax+90h]
cmp dword ptr [rax+80h], 0
jz short loc_474F1
mov [rsp+138h+var_3C], 2
loc_474F1:
mov rdi, [rsp+138h+var_20]
mov rax, [rdi+18h]
mov dword ptr [rsp+138h+var_60], 0
mov [rsp+138h+var_58], 3
mov rcx, [rsp+138h+var_10]
mov r9, [rcx+18h]
mov r10d, [rcx+10h]
mov r11d, [rcx+14h]
mov ebx, [rsp+138h+var_3C]
mov rsi, [rax+0F0h]
mov rdx, [rax+0F8h]
mov rcx, [rsp+138h+var_60]
mov r8, [rsp+138h+var_58]
mov rax, rsp
mov [rax+10h], ebx
mov [rax+8], r11d
mov [rax], r10d
call build_backtrace
mov eax, 0FFFFFFFFh
add rsp, 130h
pop rbx
retn
|
long long js_parse_error(
_QWORD *a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
char a15)
{
long long v15; // rdx
long long v16; // rax
char v18; // [rsp+20h] [rbp-118h] BYREF
long long v19; // [rsp+30h] [rbp-108h]
long long v20; // [rsp+38h] [rbp-100h]
long long v21; // [rsp+40h] [rbp-F8h]
long long v22; // [rsp+48h] [rbp-F0h]
__m128 v23; // [rsp+50h] [rbp-E8h]
__m128 v24; // [rsp+60h] [rbp-D8h]
__m128 v25; // [rsp+70h] [rbp-C8h]
__m128 v26; // [rsp+80h] [rbp-B8h]
__m128 v27; // [rsp+90h] [rbp-A8h]
__m128 v28; // [rsp+A0h] [rbp-98h]
__m128 v29; // [rsp+B0h] [rbp-88h]
__m128 v30; // [rsp+C0h] [rbp-78h]
long long v31; // [rsp+D8h] [rbp-60h]
long long v32; // [rsp+E0h] [rbp-58h]
long long v33; // [rsp+E8h] [rbp-50h]
long long v34; // [rsp+F0h] [rbp-48h]
int v35; // [rsp+FCh] [rbp-3Ch]
_DWORD v36[2]; // [rsp+100h] [rbp-38h] BYREF
char *v37; // [rsp+108h] [rbp-30h]
char *v38; // [rsp+110h] [rbp-28h]
long long v39; // [rsp+118h] [rbp-20h]
long long v40; // [rsp+120h] [rbp-18h]
_QWORD *v41; // [rsp+128h] [rbp-10h]
v23 = a7;
v24 = a8;
v25 = a9;
v26 = a10;
v27 = a11;
v28 = a12;
v29 = a13;
v30 = a14;
v22 = a6;
v21 = a5;
v20 = a4;
v19 = a3;
v41 = a1;
v40 = a2;
v39 = *a1;
v38 = &v18;
v37 = &a15;
v36[1] = 48;
v36[0] = 16;
v33 = JS_ThrowError2(v39, 3LL, a2, v36, 0LL);
v34 = v15;
v35 = 0;
if ( v41[18] && *(_DWORD *)(v41[18] + 128LL) )
v35 = 2;
v16 = *(_QWORD *)(v39 + 24);
LODWORD(v31) = 0;
v32 = 3LL;
build_backtrace(
v39,
*(_QWORD *)(v16 + 240),
*(_QWORD *)(v16 + 248),
0,
3,
v41[3],
*((_DWORD *)v41 + 4),
*((_DWORD *)v41 + 5),
v35);
return 0xFFFFFFFFLL;
}
|
js_parse_error:
PUSH RBX
SUB RSP,0x130
TEST AL,AL
JZ 0x00147413
MOVAPS xmmword ptr [RSP + 0x50],XMM0
MOVAPS xmmword ptr [RSP + 0x60],XMM1
MOVAPS xmmword ptr [RSP + 0x70],XMM2
MOVAPS xmmword ptr [RSP + 0x80],XMM3
MOVAPS xmmword ptr [RSP + 0x90],XMM4
MOVAPS xmmword ptr [RSP + 0xa0],XMM5
MOVAPS xmmword ptr [RSP + 0xb0],XMM6
MOVAPS xmmword ptr [RSP + 0xc0],XMM7
LAB_00147413:
MOV qword ptr [RSP + 0x48],R9
MOV qword ptr [RSP + 0x40],R8
MOV qword ptr [RSP + 0x38],RCX
MOV qword ptr [RSP + 0x30],RDX
MOV qword ptr [RSP + 0x128],RDI
MOV qword ptr [RSP + 0x120],RSI
MOV RAX,qword ptr [RSP + 0x128]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x118],RAX
LEA RAX,[RSP + 0x100]
LEA RCX,[RSP + 0x20]
MOV qword ptr [RAX + 0x10],RCX
LEA RCX,[RSP + 0x140]
MOV qword ptr [RAX + 0x8],RCX
MOV dword ptr [RAX + 0x4],0x30
MOV dword ptr [RAX],0x10
MOV RDI,qword ptr [RSP + 0x118]
MOV RDX,qword ptr [RSP + 0x120]
LEA RCX,[RSP + 0x100]
MOV ESI,0x3
XOR R8D,R8D
CALL 0x00147570
MOV qword ptr [RSP + 0xe8],RAX
MOV qword ptr [RSP + 0xf0],RDX
LEA RAX,[RSP + 0x100]
MOV dword ptr [RSP + 0xfc],0x0
MOV RAX,qword ptr [RSP + 0x128]
CMP qword ptr [RAX + 0x90],0x0
JZ 0x001474f1
MOV RAX,qword ptr [RSP + 0x128]
MOV RAX,qword ptr [RAX + 0x90]
CMP dword ptr [RAX + 0x80],0x0
JZ 0x001474f1
MOV dword ptr [RSP + 0xfc],0x2
LAB_001474f1:
MOV RDI,qword ptr [RSP + 0x118]
MOV RAX,qword ptr [RDI + 0x18]
MOV dword ptr [RSP + 0xd8],0x0
MOV qword ptr [RSP + 0xe0],0x3
MOV RCX,qword ptr [RSP + 0x128]
MOV R9,qword ptr [RCX + 0x18]
MOV R10D,dword ptr [RCX + 0x10]
MOV R11D,dword ptr [RCX + 0x14]
MOV EBX,dword ptr [RSP + 0xfc]
MOV RSI,qword ptr [RAX + 0xf0]
MOV RDX,qword ptr [RAX + 0xf8]
MOV RCX,qword ptr [RSP + 0xd8]
MOV R8,qword ptr [RSP + 0xe0]
MOV RAX,RSP
MOV dword ptr [RAX + 0x10],EBX
MOV dword ptr [RAX + 0x8],R11D
MOV dword ptr [RAX],R10D
CALL 0x00147690
MOV EAX,0xffffffff
ADD RSP,0x130
POP RBX
RET
|
int8
js_parse_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,
long *param_9,int8 param_10,int8 param_11,int8 param_12,
int8 param_13,int8 param_14)
{
char in_AL;
int1 local_118 [16];
int8 local_108;
int8 local_100;
int8 local_f8;
int8 local_f0;
int8 local_e8;
int8 local_d8;
int8 local_c8;
int8 local_b8;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
int4 local_60;
uint uStack_5c;
int8 local_58;
int1 local_50 [16];
int4 local_3c;
int4 local_38;
int4 local_34;
int1 *local_30;
int1 *local_28;
long local_20;
int8 local_18;
long *local_10;
if (in_AL != '\0') {
local_e8 = param_1;
local_d8 = param_2;
local_c8 = param_3;
local_b8 = param_4;
local_a8 = param_5;
local_98 = param_6;
local_88 = param_7;
local_78 = param_8;
}
local_20 = *param_9;
local_28 = local_118;
local_30 = &stack0x00000008;
local_34 = 0x30;
local_38 = 0x10;
local_108 = param_11;
local_100 = param_12;
local_f8 = param_13;
local_f0 = param_14;
local_18 = param_10;
local_10 = param_9;
local_50 = JS_ThrowError2(local_20,3,param_10,&local_38,0);
local_3c = 0;
if ((local_10[0x12] != 0) && (*(int *)(local_10[0x12] + 0x80) != 0)) {
local_3c = 2;
}
local_60 = 0;
local_58 = 3;
build_backtrace(local_20,*(int8 *)(*(long *)(local_20 + 0x18) + 0xf0),
*(int8 *)(*(long *)(local_20 + 0x18) + 0xf8),(ulong)uStack_5c << 0x20,3,
local_10[3],(int)local_10[2],*(int4 *)((long)local_10 + 0x14),local_3c);
return 0xffffffff;
}
|
|
14,669
|
js_parse_error
|
bluesky950520[P]quickjs/quickjs.c
|
int __attribute__((format(printf, 2, 3))) js_parse_error(JSParseState *s, const char *fmt, ...)
{
JSContext *ctx = s->ctx;
va_list ap;
int backtrace_flags;
va_start(ap, fmt);
JS_ThrowError2(ctx, JS_SYNTAX_ERROR, fmt, ap, FALSE);
va_end(ap);
backtrace_flags = 0;
if (s->cur_func && s->cur_func->backtrace_barrier)
backtrace_flags = JS_BACKTRACE_FLAG_SINGLE_LEVEL;
build_backtrace(ctx, ctx->rt->current_exception, JS_UNDEFINED, s->filename,
s->line_num, s->col_num, backtrace_flags);
return -1;
}
|
O1
|
c
|
js_parse_error:
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rsi, %r10
movq %rdi, %r14
leaq 0x20(%rsp), %rsi
movq %rdx, 0x10(%rsi)
movq %rcx, 0x18(%rsi)
movq %r8, 0x20(%rsi)
movq %r9, 0x28(%rsi)
testb %al, %al
je 0x2f137
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq (%rdi), %rbx
movq %rsp, %rcx
movq %rsi, 0x10(%rcx)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000010, %rax # imm = 0x3000000010
movq %rax, (%rcx)
xorl %r15d, %r15d
movq %rbx, %rdi
movl $0x3, %esi
movq %r10, %rdx
xorl %r8d, %r8d
callq 0x2f1db
movq 0x90(%r14), %rax
testq %rax, %rax
je 0x2f18d
xorl %r15d, %r15d
cmpl $0x0, 0x80(%rax)
setne %r15b
addl %r15d, %r15d
movq 0x18(%rbx), %rax
movq 0x18(%r14), %r9
movl 0x10(%r14), %r10d
movl 0x14(%r14), %r11d
movq 0xf0(%rax), %rsi
movq 0xf8(%rax), %rdx
subq $0x8, %rsp
movl $0x3, %r8d
movq %rbx, %rdi
xorl %ecx, %ecx
pushq %r15
pushq %r11
pushq %r10
callq 0x2f25e
addq $0x20, %rsp
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %r15
retq
|
js_parse_error:
push r15
push r14
push rbx
sub rsp, 0D0h
mov r10, rsi
mov r14, rdi
lea rsi, [rsp+0E8h+var_C8]
mov [rsi+10h], rdx
mov [rsi+18h], rcx
mov [rsi+20h], r8
mov [rsi+28h], r9
test al, al
jz short loc_2F137
movaps [rsp+0E8h+var_98], xmm0
movaps [rsp+0E8h+var_88], xmm1
movaps [rsp+0E8h+var_78], xmm2
movaps [rsp+0E8h+var_68], xmm3
movaps [rsp+0E8h+var_58], xmm4
movaps [rsp+0E8h+var_48], xmm5
movaps [rsp+0E8h+var_38], xmm6
movaps [rsp+0E8h+var_28], xmm7
loc_2F137:
mov rbx, [rdi]
mov rcx, rsp
mov [rcx+10h], rsi
lea rax, [rsp+0E8h+arg_0]
mov [rcx+8], rax
mov rax, 3000000010h
mov [rcx], rax
xor r15d, r15d
mov rdi, rbx
mov esi, 3
mov rdx, r10
xor r8d, r8d
call JS_ThrowError2
mov rax, [r14+90h]
test rax, rax
jz short loc_2F18D
xor r15d, r15d
cmp dword ptr [rax+80h], 0
setnz r15b
add r15d, r15d
loc_2F18D:
mov rax, [rbx+18h]
mov r9, [r14+18h]
mov r10d, [r14+10h]
mov r11d, [r14+14h]
mov rsi, [rax+0F0h]
mov rdx, [rax+0F8h]
sub rsp, 8
mov r8d, 3
mov rdi, rbx
xor ecx, ecx
push r15
push r11
push r10
call build_backtrace
add rsp, 20h
mov eax, 0FFFFFFFFh
add rsp, 0D0h
pop rbx
pop r14
pop r15
retn
|
long long js_parse_error(
long long *a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
char a15)
{
long long v15; // rbx
int v16; // r15d
long long v17; // rax
_QWORD v19[4]; // [rsp+0h] [rbp-E8h] BYREF
char v20; // [rsp+20h] [rbp-C8h] BYREF
long long v21; // [rsp+30h] [rbp-B8h]
long long v22; // [rsp+38h] [rbp-B0h]
long long v23; // [rsp+40h] [rbp-A8h]
long long v24; // [rsp+48h] [rbp-A0h]
__m128 v25; // [rsp+50h] [rbp-98h]
__m128 v26; // [rsp+60h] [rbp-88h]
__m128 v27; // [rsp+70h] [rbp-78h]
__m128 v28; // [rsp+80h] [rbp-68h]
__m128 v29; // [rsp+90h] [rbp-58h]
__m128 v30; // [rsp+A0h] [rbp-48h]
__m128 v31; // [rsp+B0h] [rbp-38h]
__m128 v32; // [rsp+C0h] [rbp-28h]
v25 = a7;
v26 = a8;
v27 = a9;
v28 = a10;
v29 = a11;
v30 = a12;
v31 = a13;
v32 = a14;
v21 = a3;
v22 = a4;
v23 = a5;
v24 = a6;
v15 = *a1;
v19[2] = &v20;
v19[1] = &a15;
v19[0] = 0x3000000010LL;
v16 = 0;
JS_ThrowError2(v15, 3LL, a2, v19, 0LL);
v17 = a1[18];
if ( v17 )
v16 = 2 * (*(_DWORD *)(v17 + 128) != 0);
build_backtrace(
v15,
*(_QWORD *)(*(_QWORD *)(v15 + 24) + 240LL),
*(_QWORD *)(*(_QWORD *)(v15 + 24) + 248LL),
0,
3,
a1[3],
*((_DWORD *)a1 + 4),
*((_DWORD *)a1 + 5),
v16);
return 0xFFFFFFFFLL;
}
|
js_parse_error:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0xd0
MOV R10,RSI
MOV R14,RDI
LEA RSI,[RSP + 0x20]
MOV qword ptr [RSI + 0x10],RDX
MOV qword ptr [RSI + 0x18],RCX
MOV qword ptr [RSI + 0x20],R8
MOV qword ptr [RSI + 0x28],R9
TEST AL,AL
JZ 0x0012f137
MOVAPS xmmword ptr [RSP + 0x50],XMM0
MOVAPS xmmword ptr [RSP + 0x60],XMM1
MOVAPS xmmword ptr [RSP + 0x70],XMM2
MOVAPS xmmword ptr [RSP + 0x80],XMM3
MOVAPS xmmword ptr [RSP + 0x90],XMM4
MOVAPS xmmword ptr [RSP + 0xa0],XMM5
MOVAPS xmmword ptr [RSP + 0xb0],XMM6
MOVAPS xmmword ptr [RSP + 0xc0],XMM7
LAB_0012f137:
MOV RBX,qword ptr [RDI]
MOV RCX,RSP
MOV qword ptr [RCX + 0x10],RSI
LEA RAX,[RSP + 0xf0]
MOV qword ptr [RCX + 0x8],RAX
MOV RAX,0x3000000010
MOV qword ptr [RCX],RAX
XOR R15D,R15D
MOV RDI,RBX
MOV ESI,0x3
MOV RDX,R10
XOR R8D,R8D
CALL 0x0012f1db
MOV RAX,qword ptr [R14 + 0x90]
TEST RAX,RAX
JZ 0x0012f18d
XOR R15D,R15D
CMP dword ptr [RAX + 0x80],0x0
SETNZ R15B
ADD R15D,R15D
LAB_0012f18d:
MOV RAX,qword ptr [RBX + 0x18]
MOV R9,qword ptr [R14 + 0x18]
MOV R10D,dword ptr [R14 + 0x10]
MOV R11D,dword ptr [R14 + 0x14]
MOV RSI,qword ptr [RAX + 0xf0]
MOV RDX,qword ptr [RAX + 0xf8]
SUB RSP,0x8
MOV R8D,0x3
MOV RDI,RBX
XOR ECX,ECX
PUSH R15
PUSH R11
PUSH R10
CALL 0x0012f25e
ADD RSP,0x20
MOV EAX,0xffffffff
ADD RSP,0xd0
POP RBX
POP R14
POP R15
RET
|
int8
js_parse_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,
long *param_9,int8 param_10,int8 param_11,int8 param_12,
int8 param_13,int8 param_14)
{
long lVar1;
char in_AL;
char cVar2;
int8 local_e8;
int1 *local_e0;
int1 *local_d8;
int1 local_c8 [16];
int8 local_b8;
int8 local_b0;
int8 local_a8;
int8 local_a0;
int8 local_98;
int8 local_88;
int8 local_78;
int8 local_68;
int8 local_58;
int8 local_48;
int8 local_38;
int8 local_28;
local_d8 = local_c8;
if (in_AL != '\0') {
local_98 = param_1;
local_88 = param_2;
local_78 = param_3;
local_68 = param_4;
local_58 = param_5;
local_48 = param_6;
local_38 = param_7;
local_28 = param_8;
}
lVar1 = *param_9;
local_e0 = &stack0x00000008;
local_e8 = 0x3000000010;
cVar2 = '\0';
local_b8 = param_11;
local_b0 = param_12;
local_a8 = param_13;
local_a0 = param_14;
JS_ThrowError2(lVar1,3,param_10,&local_e8,0);
if (param_9[0x12] != 0) {
cVar2 = (*(int *)(param_9[0x12] + 0x80) != 0) * '\x02';
}
build_backtrace(lVar1,*(int8 *)(*(long *)(lVar1 + 0x18) + 0xf0),
*(int8 *)(*(long *)(lVar1 + 0x18) + 0xf8),0,3,param_9[3],(int)param_9[2],
*(int4 *)((long)param_9 + 0x14),cVar2);
return 0xffffffff;
}
|
|
14,670
|
js_parse_error
|
bluesky950520[P]quickjs/quickjs.c
|
int __attribute__((format(printf, 2, 3))) js_parse_error(JSParseState *s, const char *fmt, ...)
{
JSContext *ctx = s->ctx;
va_list ap;
int backtrace_flags;
va_start(ap, fmt);
JS_ThrowError2(ctx, JS_SYNTAX_ERROR, fmt, ap, FALSE);
va_end(ap);
backtrace_flags = 0;
if (s->cur_func && s->cur_func->backtrace_barrier)
backtrace_flags = JS_BACKTRACE_FLAG_SINGLE_LEVEL;
build_backtrace(ctx, ctx->rt->current_exception, JS_UNDEFINED, s->filename,
s->line_num, s->col_num, backtrace_flags);
return -1;
}
|
O3
|
c
|
js_parse_error:
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rsi, %r10
movq %rdi, %r14
leaq 0x20(%rsp), %rsi
movq %rdx, 0x10(%rsi)
movq %rcx, 0x18(%rsi)
movq %r8, 0x20(%rsi)
movq %r9, 0x28(%rsi)
testb %al, %al
je 0x2ff33
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq (%rdi), %rbx
movq %rsp, %rcx
movq %rsi, 0x10(%rcx)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000010, %rax # imm = 0x3000000010
movq %rax, (%rcx)
xorl %r15d, %r15d
movq %rbx, %rdi
movl $0x3, %esi
movq %r10, %rdx
xorl %r8d, %r8d
callq 0x2ffd7
movq 0x90(%r14), %rax
testq %rax, %rax
je 0x2ff89
xorl %r15d, %r15d
cmpl $0x0, 0x80(%rax)
setne %r15b
addl %r15d, %r15d
movq 0x18(%rbx), %rax
movq 0x18(%r14), %r9
movl 0x10(%r14), %r10d
movl 0x14(%r14), %r11d
movq 0xf0(%rax), %rsi
movq 0xf8(%rax), %rdx
subq $0x8, %rsp
movl $0x3, %r8d
movq %rbx, %rdi
xorl %ecx, %ecx
pushq %r15
pushq %r11
pushq %r10
callq 0x30067
addq $0x20, %rsp
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %r15
retq
|
js_parse_error:
push r15
push r14
push rbx
sub rsp, 0D0h
mov r10, rsi
mov r14, rdi
lea rsi, [rsp+0E8h+var_C8]
mov [rsi+10h], rdx
mov [rsi+18h], rcx
mov [rsi+20h], r8
mov [rsi+28h], r9
test al, al
jz short loc_2FF33
movaps [rsp+0E8h+var_98], xmm0
movaps [rsp+0E8h+var_88], xmm1
movaps [rsp+0E8h+var_78], xmm2
movaps [rsp+0E8h+var_68], xmm3
movaps [rsp+0E8h+var_58], xmm4
movaps [rsp+0E8h+var_48], xmm5
movaps [rsp+0E8h+var_38], xmm6
movaps [rsp+0E8h+var_28], xmm7
loc_2FF33:
mov rbx, [rdi]
mov rcx, rsp
mov [rcx+10h], rsi
lea rax, [rsp+0E8h+arg_0]
mov [rcx+8], rax
mov rax, 3000000010h
mov [rcx], rax
xor r15d, r15d
mov rdi, rbx
mov esi, 3
mov rdx, r10
xor r8d, r8d
call JS_ThrowError2
mov rax, [r14+90h]
test rax, rax
jz short loc_2FF89
xor r15d, r15d
cmp dword ptr [rax+80h], 0
setnz r15b
add r15d, r15d
loc_2FF89:
mov rax, [rbx+18h]
mov r9, [r14+18h]
mov r10d, [r14+10h]
mov r11d, [r14+14h]
mov rsi, [rax+0F0h]
mov rdx, [rax+0F8h]
sub rsp, 8
mov r8d, 3
mov rdi, rbx
xor ecx, ecx
push r15
push r11
push r10
call build_backtrace
add rsp, 20h
mov eax, 0FFFFFFFFh
add rsp, 0D0h
pop rbx
pop r14
pop r15
retn
|
long long js_parse_error(
long long *a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
char a15)
{
long long v15; // rbx
int v16; // r15d
long long v17; // rax
_QWORD v19[4]; // [rsp+0h] [rbp-E8h] BYREF
char v20; // [rsp+20h] [rbp-C8h] BYREF
long long v21; // [rsp+30h] [rbp-B8h]
long long v22; // [rsp+38h] [rbp-B0h]
long long v23; // [rsp+40h] [rbp-A8h]
long long v24; // [rsp+48h] [rbp-A0h]
__m128 v25; // [rsp+50h] [rbp-98h]
__m128 v26; // [rsp+60h] [rbp-88h]
__m128 v27; // [rsp+70h] [rbp-78h]
__m128 v28; // [rsp+80h] [rbp-68h]
__m128 v29; // [rsp+90h] [rbp-58h]
__m128 v30; // [rsp+A0h] [rbp-48h]
__m128 v31; // [rsp+B0h] [rbp-38h]
__m128 v32; // [rsp+C0h] [rbp-28h]
v25 = a7;
v26 = a8;
v27 = a9;
v28 = a10;
v29 = a11;
v30 = a12;
v31 = a13;
v32 = a14;
v21 = a3;
v22 = a4;
v23 = a5;
v24 = a6;
v15 = *a1;
v19[2] = &v20;
v19[1] = &a15;
v19[0] = 0x3000000010LL;
v16 = 0;
JS_ThrowError2(v15, 3LL, a2, v19, 0LL);
v17 = a1[18];
if ( v17 )
v16 = 2 * (*(_DWORD *)(v17 + 128) != 0);
build_backtrace(
v15,
*(_QWORD *)(*(_QWORD *)(v15 + 24) + 240LL),
*(_QWORD *)(*(_QWORD *)(v15 + 24) + 248LL),
0,
3,
a1[3],
*((_DWORD *)a1 + 4),
*((_DWORD *)a1 + 5),
v16);
return 0xFFFFFFFFLL;
}
|
js_parse_error:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0xd0
MOV R10,RSI
MOV R14,RDI
LEA RSI,[RSP + 0x20]
MOV qword ptr [RSI + 0x10],RDX
MOV qword ptr [RSI + 0x18],RCX
MOV qword ptr [RSI + 0x20],R8
MOV qword ptr [RSI + 0x28],R9
TEST AL,AL
JZ 0x0012ff33
MOVAPS xmmword ptr [RSP + 0x50],XMM0
MOVAPS xmmword ptr [RSP + 0x60],XMM1
MOVAPS xmmword ptr [RSP + 0x70],XMM2
MOVAPS xmmword ptr [RSP + 0x80],XMM3
MOVAPS xmmword ptr [RSP + 0x90],XMM4
MOVAPS xmmword ptr [RSP + 0xa0],XMM5
MOVAPS xmmword ptr [RSP + 0xb0],XMM6
MOVAPS xmmword ptr [RSP + 0xc0],XMM7
LAB_0012ff33:
MOV RBX,qword ptr [RDI]
MOV RCX,RSP
MOV qword ptr [RCX + 0x10],RSI
LEA RAX,[RSP + 0xf0]
MOV qword ptr [RCX + 0x8],RAX
MOV RAX,0x3000000010
MOV qword ptr [RCX],RAX
XOR R15D,R15D
MOV RDI,RBX
MOV ESI,0x3
MOV RDX,R10
XOR R8D,R8D
CALL 0x0012ffd7
MOV RAX,qword ptr [R14 + 0x90]
TEST RAX,RAX
JZ 0x0012ff89
XOR R15D,R15D
CMP dword ptr [RAX + 0x80],0x0
SETNZ R15B
ADD R15D,R15D
LAB_0012ff89:
MOV RAX,qword ptr [RBX + 0x18]
MOV R9,qword ptr [R14 + 0x18]
MOV R10D,dword ptr [R14 + 0x10]
MOV R11D,dword ptr [R14 + 0x14]
MOV RSI,qword ptr [RAX + 0xf0]
MOV RDX,qword ptr [RAX + 0xf8]
SUB RSP,0x8
MOV R8D,0x3
MOV RDI,RBX
XOR ECX,ECX
PUSH R15
PUSH R11
PUSH R10
CALL 0x00130067
ADD RSP,0x20
MOV EAX,0xffffffff
ADD RSP,0xd0
POP RBX
POP R14
POP R15
RET
|
int8
js_parse_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,
long *param_9,int8 param_10,int8 param_11,int8 param_12,
int8 param_13,int8 param_14)
{
long lVar1;
char in_AL;
char cVar2;
int8 local_e8;
int1 *local_e0;
int1 *local_d8;
int1 local_c8 [16];
int8 local_b8;
int8 local_b0;
int8 local_a8;
int8 local_a0;
int8 local_98;
int8 local_88;
int8 local_78;
int8 local_68;
int8 local_58;
int8 local_48;
int8 local_38;
int8 local_28;
local_d8 = local_c8;
if (in_AL != '\0') {
local_98 = param_1;
local_88 = param_2;
local_78 = param_3;
local_68 = param_4;
local_58 = param_5;
local_48 = param_6;
local_38 = param_7;
local_28 = param_8;
}
lVar1 = *param_9;
local_e0 = &stack0x00000008;
local_e8 = 0x3000000010;
cVar2 = '\0';
local_b8 = param_11;
local_b0 = param_12;
local_a8 = param_13;
local_a0 = param_14;
JS_ThrowError2(lVar1,3,param_10,&local_e8,0);
if (param_9[0x12] != 0) {
cVar2 = (*(int *)(param_9[0x12] + 0x80) != 0) * '\x02';
}
build_backtrace(lVar1,*(int8 *)(*(long *)(lVar1 + 0x18) + 0xf0),
*(int8 *)(*(long *)(lVar1 + 0x18) + 0xf8),0,3,param_9[3],(int)param_9[2],
*(int4 *)((long)param_9 + 0x14),cVar2);
return 0xffffffff;
}
|
|
14,671
|
program_hash_get_key(unsigned char const*, unsigned long*, char)
|
eloqsql/storage/perfschema/pfs_program.cc
|
C_MODE_START
static uchar *program_hash_get_key(const uchar *entry, size_t *length,
my_bool)
{
const PFS_program * const *typed_entry;
const PFS_program *program;
const void *result;
typed_entry= reinterpret_cast<const PFS_program* const *> (entry);
assert(typed_entry != NULL);
program= *typed_entry;
assert(program != NULL);
*length= program->m_key.m_key_length;
result= program->m_key.m_hash_key;
return const_cast<uchar*> (reinterpret_cast<const uchar*> (result));
}
|
O3
|
cpp
|
program_hash_get_key(unsigned char const*, unsigned long*, char):
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rax
movl 0xbc(%rax), %ecx
addq $0x34, %rax
movq %rcx, (%rsi)
popq %rbp
retq
|
_ZL20program_hash_get_keyPKhPmc:
push rbp
mov rbp, rsp
mov rax, [rdi]
mov ecx, [rax+0BCh]
add rax, 34h ; '4'
mov [rsi], rcx
pop rbp
retn
|
long long program_hash_get_key(const unsigned __int8 *a1, unsigned long long *a2)
{
long long result; // rax
result = *(_QWORD *)a1 + 52LL;
*a2 = *(unsigned int *)(*(_QWORD *)a1 + 188LL);
return result;
}
|
program_hash_get_key:
PUSH RBP
MOV RBP,RSP
MOV RAX,qword ptr [RDI]
MOV ECX,dword ptr [RAX + 0xbc]
ADD RAX,0x34
MOV qword ptr [RSI],RCX
POP RBP
RET
|
/* program_hash_get_key(unsigned char const*, unsigned long*, char) */
long program_hash_get_key(uchar *param_1,ulong *param_2,char param_3)
{
long lVar1;
lVar1 = *(long *)param_1;
*param_2 = (ulong)*(uint *)(lVar1 + 0xbc);
return lVar1 + 0x34;
}
|
|
14,672
|
spdlog::async_logger::backend_flush_()
|
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/async_logger-inl.h
|
SPDLOG_INLINE void spdlog::async_logger::backend_flush_() {
for (auto &sink : sinks_) {
SPDLOG_TRY { sink->flush(); }
SPDLOG_LOGGER_CATCH(source_loc())
}
}
|
O0
|
c
|
spdlog::async_logger::backend_flush_():
subq $0xb8, %rsp
movq %rdi, 0xb0(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0x20(%rsp)
addq $0x28, %rax
movq %rax, 0xa8(%rsp)
movq 0xa8(%rsp), %rdi
callq 0x7d480
movq %rax, 0xa0(%rsp)
movq 0xa8(%rsp), %rdi
callq 0x7d4f0
movq %rax, 0x98(%rsp)
leaq 0xa0(%rsp), %rdi
leaq 0x98(%rsp), %rsi
callq 0x7d4b0
xorb $-0x1, %al
testb $0x1, %al
jne 0xc0992
jmp 0xc0b7e
leaq 0xa0(%rsp), %rdi
callq 0x7d550
movq %rax, 0x90(%rsp)
movq 0x90(%rsp), %rdi
callq 0x7d560
movq %rax, %rdi
movq (%rdi), %rax
movq 0x18(%rax), %rax
callq *%rax
jmp 0xc09c2
jmp 0xc0a63
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
movl 0x84(%rsp), %eax
movl $0x2, %ecx
cmpl %ecx, %eax
jne 0xc0a77
movq 0x88(%rsp), %rdi
callq 0x152d0
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
movq %rax, 0x10(%rsp)
leaq 0x2f(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x15de0
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
leaq 0x30(%rsp), %rdi
callq 0x1bd40
jmp 0xc0a39
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x791e0
jmp 0xc0a4a
leaq 0x30(%rsp), %rdi
callq 0x1c160
leaq 0x2f(%rsp), %rdi
callq 0x157f0
callq 0x15ce0
jmp 0xc0a65
leaq 0xa0(%rsp), %rdi
callq 0x7d5a0
jmp 0xc0972
movq 0x88(%rsp), %rdi
callq 0x152d0
leaq 0x5f(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x15de0
movq 0x8(%rsp), %rdx
leaq 0x8cc88(%rip), %rsi # 0x14d727
leaq 0x60(%rsp), %rdi
callq 0x1bd40
jmp 0xc0aab
movq 0x20(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x791e0
jmp 0xc0abc
leaq 0x60(%rsp), %rdi
callq 0x1c160
leaq 0x5f(%rsp), %rdi
callq 0x157f0
callq 0x15b70
jmp 0xc0b9b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
jmp 0xc0b0e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x1c160
leaq 0x5f(%rsp), %rdi
callq 0x157f0
jmp 0xc0b2e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
callq 0x15ce0
jmp 0xc0b35
jmp 0xc0b86
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
jmp 0xc0b6b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x1c160
leaq 0x2f(%rsp), %rdi
callq 0x157f0
callq 0x15ce0
jmp 0xc0b7c
jmp 0xc0b86
addq $0xb8, %rsp
retq
movq 0x88(%rsp), %rdi
callq 0x15dd0
movq %rax, %rdi
callq 0x1f240
nopl (%rax,%rax)
|
_ZN6spdlog12async_logger14backend_flush_Ev:
sub rsp, 0B8h
mov [rsp+0B8h+var_8], rdi
mov rax, [rsp+0B8h+var_8]
mov [rsp+0B8h+var_98], rax
add rax, 28h ; '('
mov [rsp+0B8h+var_10], rax
mov rdi, [rsp+0B8h+var_10]
call _ZNSt6vectorISt10shared_ptrIN6spdlog5sinks4sinkEESaIS4_EE5beginEv; std::vector<std::shared_ptr<spdlog::sinks::sink>>::begin(void)
mov [rsp+0B8h+var_18], rax
mov rdi, [rsp+0B8h+var_10]
call _ZNSt6vectorISt10shared_ptrIN6spdlog5sinks4sinkEESaIS4_EE3endEv; std::vector<std::shared_ptr<spdlog::sinks::sink>>::end(void)
mov [rsp+0B8h+var_20], rax
loc_C0972:
lea rdi, [rsp+0B8h+var_18]
lea rsi, [rsp+0B8h+var_20]
call _ZN9__gnu_cxxeqIPSt10shared_ptrIN6spdlog5sinks4sinkEESt6vectorIS5_SaIS5_EEEEbRKNS_17__normal_iteratorIT_T0_EESF_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE
xor al, 0FFh
test al, 1
jnz short loc_C0992
jmp loc_C0B7E
loc_C0992:
lea rdi, [rsp+0B8h+var_18]
call _ZNK9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN6spdlog5sinks4sinkEESt6vectorIS5_SaIS5_EEEdeEv; __gnu_cxx::__normal_iterator<std::shared_ptr<spdlog::sinks::sink> *,std::vector<std::shared_ptr<spdlog::sinks::sink>>>::operator*(void)
mov [rsp+0B8h+var_28], rax
mov rdi, [rsp+0B8h+var_28]
call _ZNKSt19__shared_ptr_accessIN6spdlog5sinks4sinkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<spdlog::sinks::sink,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
mov rdi, rax
mov rax, [rdi]
mov rax, [rax+18h]
call rax
jmp short $+2
loc_C09C2:
jmp loc_C0A63
mov rcx, rax
mov eax, edx
mov [rsp+0B8h+var_30], rcx
mov [rsp+0B8h+var_34], eax
mov eax, [rsp+0B8h+var_34]
mov ecx, 2
cmp eax, ecx
jnz loc_C0A77
mov rdi, [rsp+0B8h+var_30]; void *
call ___cxa_begin_catch
mov [rsp+0B8h+var_68], rax
mov rdi, [rsp+0B8h+var_68]
mov rax, [rdi]
mov rax, [rax+10h]
call rax
mov [rsp+0B8h+var_A8], rax
lea rdi, [rsp+0B8h+var_89]
mov [rsp+0B8h+var_A0], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rsi, [rsp+0B8h+var_A8]
mov rdx, [rsp+0B8h+var_A0]
lea rdi, [rsp+0B8h+var_88]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_C0A39:
mov rdi, [rsp+0B8h+var_98]
lea rsi, [rsp+0B8h+var_88]
call _ZN6spdlog6logger12err_handler_ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; spdlog::logger::err_handler_(std::string const&)
jmp short $+2
loc_C0A4A:
lea rdi, [rsp+0B8h+var_88]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0B8h+var_89]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
call ___cxa_end_catch
loc_C0A63:
jmp short $+2
loc_C0A65:
lea rdi, [rsp+0B8h+var_18]
call _ZN9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN6spdlog5sinks4sinkEESt6vectorIS5_SaIS5_EEEppEv; __gnu_cxx::__normal_iterator<std::shared_ptr<spdlog::sinks::sink> *,std::vector<std::shared_ptr<spdlog::sinks::sink>>>::operator++(void)
jmp loc_C0972
loc_C0A77:
mov rdi, [rsp+0B8h+var_30]; void *
call ___cxa_begin_catch
lea rdi, [rsp+0B8h+var_59]
mov [rsp+0B8h+var_B0], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, [rsp+0B8h+var_B0]
lea rsi, aRethrowingUnkn; "Rethrowing unknown exception in logger"
lea rdi, [rsp+0B8h+var_58]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_C0AAB:
mov rdi, [rsp+0B8h+var_98]
lea rsi, [rsp+0B8h+var_58]
call _ZN6spdlog6logger12err_handler_ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; spdlog::logger::err_handler_(std::string const&)
jmp short $+2
loc_C0ABC:
lea rdi, [rsp+0B8h+var_58]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0B8h+var_59]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
call ___cxa_rethrow
jmp loc_C0B9B
mov rcx, rax
mov eax, edx
mov [rsp+arg_80], rcx
mov [rsp+arg_7C], eax
jmp short loc_C0B0E
mov rcx, rax
mov eax, edx
mov [rsp+arg_80], rcx
mov [rsp+arg_7C], eax
lea rdi, [rsp+arg_58]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_C0B0E:
lea rdi, [rsp+arg_57]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_C0B2E
mov rcx, rax
mov eax, edx
mov [rsp+arg_80], rcx
mov [rsp+arg_7C], eax
loc_C0B2E:
call ___cxa_end_catch
jmp short $+2
loc_C0B35:
jmp short loc_C0B86
mov rcx, rax
mov eax, edx
mov [rsp+arg_80], rcx
mov [rsp+arg_7C], eax
jmp short loc_C0B6B
mov rcx, rax
mov eax, edx
mov [rsp+arg_80], rcx
mov [rsp+arg_7C], eax
lea rdi, [rsp+arg_28]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_C0B6B:
lea rdi, [rsp+arg_27]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
call ___cxa_end_catch
jmp short $+2
loc_C0B7C:
jmp short loc_C0B86
loc_C0B7E:
add rsp, 0B8h
retn
loc_C0B86:
mov rdi, [rsp+arg_80]
call __Unwind_Resume
mov rdi, rax
call __clang_call_terminate
loc_C0B9B:
nop dword ptr [rax+rax+00h]
|
char spdlog::async_logger::backend_flush_(spdlog::async_logger *this)
{
char result; // al
long long v2; // rdi
long long v3; // [rsp+90h] [rbp-28h]
long long v4; // [rsp+98h] [rbp-20h] BYREF
_QWORD v5[3]; // [rsp+A0h] [rbp-18h] BYREF
v5[2] = this;
v5[1] = (char *)this + 40;
v5[0] = std::vector<std::shared_ptr<spdlog::sinks::sink>>::begin((long long)this + 40);
v4 = std::vector<std::shared_ptr<spdlog::sinks::sink>>::end((long long)this + 40);
while ( 1 )
{
result = ~__gnu_cxx::operator==<std::shared_ptr<spdlog::sinks::sink> *,std::vector<std::shared_ptr<spdlog::sinks::sink>>>(
(long long)v5,
(long long)&v4);
if ( (result & 1) == 0 )
break;
v3 = __gnu_cxx::__normal_iterator<std::shared_ptr<spdlog::sinks::sink> *,std::vector<std::shared_ptr<spdlog::sinks::sink>>>::operator*((long long)v5);
v2 = std::__shared_ptr_access<spdlog::sinks::sink,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(v3);
(*(void ( **)(long long))(*(_QWORD *)v2 + 24LL))(v2);
__gnu_cxx::__normal_iterator<std::shared_ptr<spdlog::sinks::sink> *,std::vector<std::shared_ptr<spdlog::sinks::sink>>>::operator++(v5);
}
return result;
}
|
backend_flush_:
SUB RSP,0xb8
MOV qword ptr [RSP + 0xb0],RDI
MOV RAX,qword ptr [RSP + 0xb0]
MOV qword ptr [RSP + 0x20],RAX
ADD RAX,0x28
MOV qword ptr [RSP + 0xa8],RAX
MOV RDI,qword ptr [RSP + 0xa8]
CALL 0x0017d480
MOV qword ptr [RSP + 0xa0],RAX
MOV RDI,qword ptr [RSP + 0xa8]
CALL 0x0017d4f0
MOV qword ptr [RSP + 0x98],RAX
LAB_001c0972:
LEA RDI,[RSP + 0xa0]
LEA RSI,[RSP + 0x98]
CALL 0x0017d4b0
XOR AL,0xff
TEST AL,0x1
JNZ 0x001c0992
JMP 0x001c0b7e
LAB_001c0992:
LEA RDI,[RSP + 0xa0]
CALL 0x0017d550
MOV qword ptr [RSP + 0x90],RAX
MOV RDI,qword ptr [RSP + 0x90]
CALL 0x0017d560
MOV RDI,RAX
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0x18]
LAB_001c09be:
CALL RAX
LAB_001c09c0:
JMP 0x001c09c2
LAB_001c09c2:
JMP 0x001c0a63
LAB_001c0a63:
JMP 0x001c0a65
LAB_001c0a65:
LEA RDI,[RSP + 0xa0]
CALL 0x0017d5a0
JMP 0x001c0972
LAB_001c0b7e:
ADD RSP,0xb8
RET
|
/* spdlog::async_logger::backend_flush_() */
void __thiscall spdlog::async_logger::backend_flush_(async_logger *this)
{
byte bVar1;
__shared_ptr_access<spdlog::sinks::sink,(__gnu_cxx::_Lock_policy)2,false,false> *this_00;
long *plVar2;
int8 local_20;
int8 local_18;
vector<std::shared_ptr<spdlog::sinks::sink>,std::allocator<std::shared_ptr<spdlog::sinks::sink>>>
*local_10;
async_logger *local_8;
local_10 = (vector<std::shared_ptr<spdlog::sinks::sink>,std::allocator<std::shared_ptr<spdlog::sinks::sink>>>
*)(this + 0x28);
local_8 = this;
local_18 = std::
vector<std::shared_ptr<spdlog::sinks::sink>,std::allocator<std::shared_ptr<spdlog::sinks::sink>>>
::begin(local_10);
local_20 = std::
vector<std::shared_ptr<spdlog::sinks::sink>,std::allocator<std::shared_ptr<spdlog::sinks::sink>>>
::end(local_10);
while( true ) {
bVar1 = _ZN9__gnu_cxxeqIPSt10shared_ptrIN6spdlog5sinks4sinkEESt6vectorIS5_SaIS5_EEEEbRKNS_17__normal_iteratorIT_T0_EESF_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE
(&local_18,&local_20);
if (((bVar1 ^ 0xff) & 1) == 0) break;
this_00 = (__shared_ptr_access<spdlog::sinks::sink,(__gnu_cxx::_Lock_policy)2,false,false> *)
__gnu_cxx::
__normal_iterator<std::shared_ptr<spdlog::sinks::sink>*,std::vector<std::shared_ptr<spdlog::sinks::sink>,std::allocator<std::shared_ptr<spdlog::sinks::sink>>>>
::operator*((__normal_iterator<std::shared_ptr<spdlog::sinks::sink>*,std::vector<std::shared_ptr<spdlog::sinks::sink>,std::allocator<std::shared_ptr<spdlog::sinks::sink>>>>
*)&local_18);
plVar2 = (long *)std::
__shared_ptr_access<spdlog::sinks::sink,(__gnu_cxx::_Lock_policy)2,false,false>
::operator->(this_00);
/* try { // try from 001c09be to 001c09bf has its CatchHandler @ 001c09c7 */
(**(code **)(*plVar2 + 0x18))();
__gnu_cxx::
__normal_iterator<std::shared_ptr<spdlog::sinks::sink>*,std::vector<std::shared_ptr<spdlog::sinks::sink>,std::allocator<std::shared_ptr<spdlog::sinks::sink>>>>
::operator++((__normal_iterator<std::shared_ptr<spdlog::sinks::sink>*,std::vector<std::shared_ptr<spdlog::sinks::sink>,std::allocator<std::shared_ptr<spdlog::sinks::sink>>>>
*)&local_18);
}
return;
}
|
|
14,673
|
my_casedn_utf8mb4
|
eloqsql/strings/ctype-utf8.c
|
static size_t
my_casedn_utf8mb4(CHARSET_INFO *cs,
const char *src, size_t srclen,
char *dst, size_t dstlen)
{
my_wc_t wc;
int srcres, dstres;
const char *srcend= src + srclen;
char *dstend= dst + dstlen, *dst0= dst;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
DBUG_ASSERT(src != dst || cs->casedn_multiply == 1);
while ((src < srcend) &&
(srcres= my_mb_wc_utf8mb4(cs, &wc,
(uchar*) src, (uchar*) srcend)) > 0)
{
my_tolower_utf8mb4(uni_plane, &wc);
if ((dstres= my_wc_mb_utf8mb4(cs, wc, (uchar*) dst, (uchar*) dstend)) <= 0)
break;
src+= srcres;
dst+= dstres;
}
return (size_t) (dst - dst0);
}
|
O0
|
c
|
my_casedn_utf8mb4:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x58(%rbp)
jmp 0x6e3ea
jmp 0x6e3ec
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpq -0x40(%rbp), %rcx
movb %al, -0x59(%rbp)
jae 0x6e41c
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
movq -0x40(%rbp), %rcx
leaq -0x30(%rbp), %rsi
callq 0x6df60
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
setg %al
movb %al, -0x59(%rbp)
movb -0x59(%rbp), %al
testb $0x1, %al
jne 0x6e425
jmp 0x6e478
movq -0x58(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x723c0
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x48(%rbp), %rcx
callq 0x6df90
movl %eax, -0x38(%rbp)
cmpl $0x0, %eax
jg 0x6e451
jmp 0x6e478
movl -0x34(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movl -0x38(%rbp), %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
jmp 0x6e3ec
movq -0x20(%rbp), %rax
movq -0x50(%rbp), %rcx
subq %rcx, %rax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
|
my_casedn_utf8mb4:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov rax, [rbp+var_10]
add rax, [rbp+var_18]
mov [rbp+var_40], rax
mov rax, [rbp+var_20]
add rax, [rbp+var_28]
mov [rbp+var_48], rax
mov rax, [rbp+var_20]
mov [rbp+var_50], rax
mov rax, [rbp+var_8]
mov rax, [rax+78h]
mov [rbp+var_58], rax
jmp short $+2
loc_6E3EA:
jmp short $+2
loc_6E3EC:
mov rcx, [rbp+var_10]
xor eax, eax
cmp rcx, [rbp+var_40]
mov [rbp+var_59], al
jnb short loc_6E41C
mov rdi, [rbp+var_8]
mov rdx, [rbp+var_10]
mov rcx, [rbp+var_40]
lea rsi, [rbp+var_30]
call my_mb_wc_utf8mb4
mov [rbp+var_34], eax
cmp eax, 0
setnle al
mov [rbp+var_59], al
loc_6E41C:
mov al, [rbp+var_59]
test al, 1
jnz short loc_6E425
jmp short loc_6E478
loc_6E425:
mov rdi, [rbp+var_58]
lea rsi, [rbp+var_30]
call my_tolower_utf8mb4
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_30]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_48]
call my_wc_mb_utf8mb4
mov [rbp+var_38], eax
cmp eax, 0
jg short loc_6E451
jmp short loc_6E478
loc_6E451:
mov ecx, [rbp+var_34]
mov rax, [rbp+var_10]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_10], rax
mov ecx, [rbp+var_38]
mov rax, [rbp+var_20]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_20], rax
jmp loc_6E3EC
loc_6E478:
mov rax, [rbp+var_20]
mov rcx, [rbp+var_50]
sub rax, rcx
add rsp, 60h
pop rbp
retn
|
_BYTE * my_casedn_utf8mb4(long long a1, unsigned long long a2, long long a3, _BYTE *a4, long long a5, long long a6)
{
bool v7; // [rsp+7h] [rbp-59h]
long long v8; // [rsp+8h] [rbp-58h]
unsigned long long v10; // [rsp+18h] [rbp-48h]
unsigned long long v11; // [rsp+20h] [rbp-40h]
int v12; // [rsp+28h] [rbp-38h]
int v13; // [rsp+2Ch] [rbp-34h]
unsigned long long v14[2]; // [rsp+30h] [rbp-30h] BYREF
_BYTE *v15; // [rsp+40h] [rbp-20h]
long long v16; // [rsp+48h] [rbp-18h]
unsigned long long v17; // [rsp+50h] [rbp-10h]
long long v18; // [rsp+58h] [rbp-8h]
v18 = a1;
v17 = a2;
v16 = a3;
v15 = a4;
v14[1] = a5;
v11 = a3 + a2;
v10 = (unsigned long long)&a4[a5];
v8 = *(_QWORD *)(a1 + 120);
while ( 1 )
{
v7 = 0;
if ( v17 < v11 )
{
v13 = my_mb_wc_utf8mb4(v18, (long long)v14, v17, v11, a5, a6);
v7 = v13 > 0;
}
if ( !v7 )
break;
my_tolower_utf8mb4(v8, v14);
v12 = my_wc_mb_utf8mb4(v18, v14[0], v15, v10);
if ( v12 <= 0 )
break;
v17 += v13;
v15 += v12;
}
return (_BYTE *)(v15 - a4);
}
|
my_casedn_utf8mb4:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x78]
MOV qword ptr [RBP + -0x58],RAX
JMP 0x0016e3ea
LAB_0016e3ea:
JMP 0x0016e3ec
LAB_0016e3ec:
MOV RCX,qword ptr [RBP + -0x10]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x40]
MOV byte ptr [RBP + -0x59],AL
JNC 0x0016e41c
MOV RDI,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x40]
LEA RSI,[RBP + -0x30]
CALL 0x0016df60
MOV dword ptr [RBP + -0x34],EAX
CMP EAX,0x0
SETG AL
MOV byte ptr [RBP + -0x59],AL
LAB_0016e41c:
MOV AL,byte ptr [RBP + -0x59]
TEST AL,0x1
JNZ 0x0016e425
JMP 0x0016e478
LAB_0016e425:
MOV RDI,qword ptr [RBP + -0x58]
LEA RSI,[RBP + -0x30]
CALL 0x001723c0
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x48]
CALL 0x0016df90
MOV dword ptr [RBP + -0x38],EAX
CMP EAX,0x0
JG 0x0016e451
JMP 0x0016e478
LAB_0016e451:
MOV ECX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
MOV ECX,dword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x20]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0016e3ec
LAB_0016e478:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x50]
SUB RAX,RCX
ADD RSP,0x60
POP RBP
RET
|
long my_casedn_utf8mb4(long param_1,ulong param_2,long param_3,long param_4,long param_5)
{
int8 uVar1;
bool bVar2;
int iVar3;
int local_3c;
int8 local_38;
long local_30;
long local_28;
long local_20;
ulong local_18;
long local_10;
uVar1 = *(int8 *)(param_1 + 0x78);
local_30 = param_5;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
while( true ) {
bVar2 = false;
if (local_18 < param_2 + param_3) {
local_3c = my_mb_wc_utf8mb4(local_10,&local_38,local_18,param_2 + param_3);
bVar2 = 0 < local_3c;
}
if (!bVar2) break;
my_tolower_utf8mb4(uVar1,&local_38);
iVar3 = my_wc_mb_utf8mb4(local_10,local_38,local_28,param_4 + param_5);
if (iVar3 < 1) break;
local_18 = local_18 + (long)local_3c;
local_28 = local_28 + iVar3;
}
return local_28 - param_4;
}
|
|
14,674
|
Elevetor::wait_to_action()
|
LeafBlue[P]myElevetor/elevetor.cpp
|
int Elevetor::wait_to_action()
{
action_list.swap(wait_list);
//在这里进行初次排序,然后立即开始反向运行:
if(action_list.size() > 0){
std::sort(action_list.begin(),action_list.end());
}
//重新设置航向,这里反向应该是没错的
if(action_list.size() > 0){
if(direct == 1){
direct = 2;
}else{
direct = 1;
}
return 1;
}else{
direct = 0;
return 0;
}
}
|
O0
|
cpp
|
Elevetor::wait_to_action():
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rsi
movq %rsi, -0x28(%rbp)
movq %rsi, %rdi
addq $0x68, %rdi
addq $0x80, %rsi
callq 0x13160
movq -0x28(%rbp), %rdi
addq $0x68, %rdi
callq 0x12da0
cmpq $0x0, %rax
jle 0x12b29
movq -0x28(%rbp), %rdi
addq $0x68, %rdi
callq 0x12f00
movq -0x28(%rbp), %rdi
movq %rax, -0x18(%rbp)
addq $0x68, %rdi
callq 0x12f40
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x12ff0
movq -0x28(%rbp), %rdi
addq $0x68, %rdi
callq 0x12da0
cmpq $0x0, %rax
jle 0x12b67
movq -0x28(%rbp), %rax
cmpl $0x1, 0x48(%rax)
jne 0x12b53
movq -0x28(%rbp), %rax
movl $0x2, 0x48(%rax)
jmp 0x12b5e
movq -0x28(%rbp), %rax
movl $0x1, 0x48(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x12b79
movq -0x28(%rbp), %rax
movl $0x0, 0x48(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_ZN8Elevetor14wait_to_actionEv:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov rsi, [rbp+var_10]
mov [rbp+var_28], rsi
mov rdi, rsi
add rdi, 68h ; 'h'
add rsi, 80h
call _ZN5QListIiE4swapERS0_; QList<int>::swap(QList<int>&)
mov rdi, [rbp+var_28]
add rdi, 68h ; 'h'
call _ZNK5QListIiE4sizeEv; QList<int>::size(void)
cmp rax, 0
jle short loc_12B29
mov rdi, [rbp+var_28]
add rdi, 68h ; 'h'
call _ZN5QListIiE5beginEv; QList<int>::begin(void)
mov rdi, [rbp+var_28]
mov [rbp+var_18], rax
add rdi, 68h ; 'h'
call _ZN5QListIiE3endEv; QList<int>::end(void)
mov [rbp+var_20], rax
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
call _ZSt4sortIN5QListIiE8iteratorEEvT_S3_; std::sort<QList<int>::iterator>(QList<int>::iterator,QList<int>::iterator)
loc_12B29:
mov rdi, [rbp+var_28]
add rdi, 68h ; 'h'
call _ZNK5QListIiE4sizeEv; QList<int>::size(void)
cmp rax, 0
jle short loc_12B67
mov rax, [rbp+var_28]
cmp dword ptr [rax+48h], 1
jnz short loc_12B53
mov rax, [rbp+var_28]
mov dword ptr [rax+48h], 2
jmp short loc_12B5E
loc_12B53:
mov rax, [rbp+var_28]
mov dword ptr [rax+48h], 1
loc_12B5E:
mov [rbp+var_4], 1
jmp short loc_12B79
loc_12B67:
mov rax, [rbp+var_28]
mov dword ptr [rax+48h], 0
mov [rbp+var_4], 0
loc_12B79:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
|
long long Elevetor::wait_to_action(Elevetor *this)
{
long long v2; // [rsp+10h] [rbp-20h]
long long v3; // [rsp+18h] [rbp-18h]
QList<int>::swap((char *)this + 104, (char *)this + 128);
if ( QList<int>::size((char *)this + 104) > 0 )
{
v3 = QList<int>::begin((char *)this + 104);
v2 = QList<int>::end((char *)this + 104);
std::sort<QList<int>::iterator>(v3, v2);
}
if ( QList<int>::size((char *)this + 104) <= 0 )
{
*((_DWORD *)this + 18) = 0;
return 0;
}
else
{
if ( *((_DWORD *)this + 18) == 1 )
*((_DWORD *)this + 18) = 2;
else
*((_DWORD *)this + 18) = 1;
return 1;
}
}
|
wait_to_action:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV RSI,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x28],RSI
MOV RDI,RSI
ADD RDI,0x68
ADD RSI,0x80
CALL 0x00113160
MOV RDI,qword ptr [RBP + -0x28]
ADD RDI,0x68
CALL 0x00112da0
CMP RAX,0x0
JLE 0x00112b29
MOV RDI,qword ptr [RBP + -0x28]
ADD RDI,0x68
CALL 0x00112f00
MOV RDI,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x18],RAX
ADD RDI,0x68
CALL 0x00112f40
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x00112ff0
LAB_00112b29:
MOV RDI,qword ptr [RBP + -0x28]
ADD RDI,0x68
CALL 0x00112da0
CMP RAX,0x0
JLE 0x00112b67
MOV RAX,qword ptr [RBP + -0x28]
CMP dword ptr [RAX + 0x48],0x1
JNZ 0x00112b53
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX + 0x48],0x2
JMP 0x00112b5e
LAB_00112b53:
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX + 0x48],0x1
LAB_00112b5e:
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00112b79
LAB_00112b67:
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX + 0x48],0x0
MOV dword ptr [RBP + -0x4],0x0
LAB_00112b79:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
/* Elevetor::wait_to_action() */
int4 __thiscall Elevetor::wait_to_action(Elevetor *this)
{
long lVar1;
int8 uVar2;
int8 uVar3;
int4 local_c;
QList<int>::swap((QList<int> *)(this + 0x68),this + 0x80);
lVar1 = QList<int>::size((QList<int> *)(this + 0x68));
if (0 < lVar1) {
uVar2 = QList<int>::begin((QList<int> *)(this + 0x68));
uVar3 = QList<int>::end((QList<int> *)(this + 0x68));
std::sort<QList<int>::iterator>(uVar2,uVar3);
}
lVar1 = QList<int>::size((QList<int> *)(this + 0x68));
if (lVar1 < 1) {
*(int4 *)(this + 0x48) = 0;
local_c = 0;
}
else {
if (*(int *)(this + 0x48) == 1) {
*(int4 *)(this + 0x48) = 2;
}
else {
*(int4 *)(this + 0x48) = 1;
}
local_c = 1;
}
return local_c;
}
|
|
14,675
|
Elevetor::wait_to_action()
|
LeafBlue[P]myElevetor/elevetor.cpp
|
int Elevetor::wait_to_action()
{
action_list.swap(wait_list);
//在这里进行初次排序,然后立即开始反向运行:
if(action_list.size() > 0){
std::sort(action_list.begin(),action_list.end());
}
//重新设置航向,这里反向应该是没错的
if(action_list.size() > 0){
if(direct == 1){
direct = 2;
}else{
direct = 1;
}
return 1;
}else{
direct = 0;
return 0;
}
}
|
O1
|
cpp
|
Elevetor::wait_to_action():
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x68(%rdi), %rax
movups 0x80(%rdi), %xmm0
movups 0x70(%rdi), %xmm1
movups %xmm0, 0x68(%rdi)
movq %rax, 0x80(%rdi)
movq 0x90(%rdi), %rax
movups %xmm1, 0x88(%rdi)
movq %rax, 0x78(%rdi)
testq %rax, %rax
jle 0x94a2
leaq 0x68(%rbx), %r15
movq %r15, %rdi
callq 0x9576
movq %rax, %r14
movq %r15, %rdi
callq 0x959e
cmpq %rax, %r14
je 0x94a2
movq %rax, %r15
subq %r14, %rax
sarq $0x2, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x9d83
movq %r14, %rdi
movq %r15, %rsi
callq 0x9e66
xorl %ecx, %ecx
cmpl $0x1, 0x48(%rbx)
sete %cl
incl %ecx
xorl %edx, %edx
xorl %eax, %eax
cmpq $0x0, 0x78(%rbx)
setg %al
cmovgl %ecx, %edx
movl %edx, 0x48(%rbx)
popq %rbx
popq %r14
popq %r15
retq
nop
|
_ZN8Elevetor14wait_to_actionEv:
push r15
push r14
push rbx
mov rbx, rdi
mov rax, [rdi+68h]
movups xmm0, xmmword ptr [rdi+80h]
movups xmm1, xmmword ptr [rdi+70h]
movups xmmword ptr [rdi+68h], xmm0
mov [rdi+80h], rax
mov rax, [rdi+90h]
movups xmmword ptr [rdi+88h], xmm1
mov [rdi+78h], rax
test rax, rax
jle short loc_94A2
lea r15, [rbx+68h]
mov rdi, r15
call _ZN5QListIiE5beginEv; QList<int>::begin(void)
mov r14, rax
mov rdi, r15
call _ZN5QListIiE3endEv; QList<int>::end(void)
cmp r14, rax
jz short loc_94A2
mov r15, rax
sub rax, r14
sar rax, 2
bsr rdx, rax
xor edx, 3Fh
add edx, edx
xor rdx, 7Eh
mov rdi, r14
mov rsi, r15
call _ZSt16__introsort_loopIN5QListIiE8iteratorExN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S6_T0_T1_; std::__introsort_loop<QList<int>::iterator,long long,__gnu_cxx::__ops::_Iter_less_iter>(QList<int>::iterator,QList<int>::iterator,long long,__gnu_cxx::__ops::_Iter_less_iter)
mov rdi, r14
mov rsi, r15
call _ZSt22__final_insertion_sortIN5QListIiE8iteratorEN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S6_T0_; std::__final_insertion_sort<QList<int>::iterator,__gnu_cxx::__ops::_Iter_less_iter>(QList<int>::iterator,QList<int>::iterator,__gnu_cxx::__ops::_Iter_less_iter)
loc_94A2:
xor ecx, ecx
cmp dword ptr [rbx+48h], 1
setz cl
inc ecx
xor edx, edx
xor eax, eax
cmp qword ptr [rbx+78h], 0
setnle al
cmovg edx, ecx
mov [rbx+48h], edx
pop rbx
pop r14
pop r15
retn
|
_BOOL8 Elevetor::wait_to_action(Elevetor *this)
{
long long v1; // rax
__int128 v2; // xmm1
long long v3; // rax
long long v4; // r14
long long v5; // rax
long long v6; // r15
unsigned long long v7; // rdx
int v8; // edx
_BOOL8 result; // rax
v1 = *((_QWORD *)this + 13);
v2 = *((_OWORD *)this + 7);
*(_OWORD *)((char *)this + 104) = *((_OWORD *)this + 8);
*((_QWORD *)this + 16) = v1;
v3 = *((_QWORD *)this + 18);
*(_OWORD *)((char *)this + 136) = v2;
*((_QWORD *)this + 15) = v3;
if ( v3 > 0 )
{
v4 = QList<int>::begin((char *)this + 104);
v5 = QList<int>::end((char *)this + 104);
if ( v4 != v5 )
{
v6 = v5;
_BitScanReverse64(&v7, (v5 - v4) >> 2);
std::__introsort_loop<QList<int>::iterator,long long,__gnu_cxx::__ops::_Iter_less_iter>(
v4,
v5,
(2 * ((unsigned int)v7 ^ 0x3F)) ^ 0x7ELL);
std::__final_insertion_sort<QList<int>::iterator,__gnu_cxx::__ops::_Iter_less_iter>(v4, v6);
}
}
v8 = 0;
result = *((_QWORD *)this + 15) > 0LL;
if ( *((long long *)this + 15) > 0 )
v8 = (*((_DWORD *)this + 18) == 1) + 1;
*((_DWORD *)this + 18) = v8;
return result;
}
|
wait_to_action:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x68]
MOVUPS XMM0,xmmword ptr [RDI + 0x80]
MOVUPS XMM1,xmmword ptr [RDI + 0x70]
MOVUPS xmmword ptr [RDI + 0x68],XMM0
MOV qword ptr [RDI + 0x80],RAX
MOV RAX,qword ptr [RDI + 0x90]
MOVUPS xmmword ptr [RDI + 0x88],XMM1
MOV qword ptr [RDI + 0x78],RAX
TEST RAX,RAX
JLE 0x001094a2
LEA R15,[RBX + 0x68]
MOV RDI,R15
CALL 0x00109576
MOV R14,RAX
MOV RDI,R15
CALL 0x0010959e
CMP R14,RAX
JZ 0x001094a2
MOV R15,RAX
SUB RAX,R14
SAR RAX,0x2
BSR RDX,RAX
XOR EDX,0x3f
ADD EDX,EDX
XOR RDX,0x7e
MOV RDI,R14
MOV RSI,R15
CALL 0x00109d83
MOV RDI,R14
MOV RSI,R15
CALL 0x00109e66
LAB_001094a2:
XOR ECX,ECX
CMP dword ptr [RBX + 0x48],0x1
SETZ CL
INC ECX
XOR EDX,EDX
XOR EAX,EAX
CMP qword ptr [RBX + 0x78],0x0
SETG AL
CMOVG EDX,ECX
MOV dword ptr [RBX + 0x48],EDX
POP RBX
POP R14
POP R15
RET
|
/* Elevetor::wait_to_action() */
bool __thiscall Elevetor::wait_to_action(Elevetor *this)
{
int8 uVar1;
long lVar2;
int8 uVar3;
long lVar4;
long lVar5;
ulong uVar6;
int iVar7;
uVar1 = *(int8 *)(this + 0x68);
uVar3 = *(int8 *)(this + 0x70);
*(int8 *)(this + 0x68) = *(int8 *)(this + 0x80);
*(int8 *)(this + 0x70) = *(int8 *)(this + 0x88);
*(int8 *)(this + 0x80) = uVar1;
lVar4 = *(long *)(this + 0x90);
*(int8 *)(this + 0x88) = uVar3;
*(int8 *)(this + 0x90) = *(int8 *)(this + 0x78);
*(long *)(this + 0x78) = lVar4;
if (0 < lVar4) {
lVar4 = QList<int>::begin((QList<int> *)(this + 0x68));
lVar5 = QList<int>::end((QList<int> *)(this + 0x68));
if (lVar4 != lVar5) {
uVar6 = lVar5 - lVar4 >> 2;
lVar2 = 0x3f;
if (uVar6 != 0) {
for (; uVar6 >> lVar2 == 0; lVar2 = lVar2 + -1) {
}
}
std::__introsort_loop<QList<int>::iterator,long_long,__gnu_cxx::__ops::_Iter_less_iter>
(lVar4,lVar5,((uint)lVar2 ^ 0x3f) * 2 ^ 0x7e);
std::__final_insertion_sort<QList<int>::iterator,__gnu_cxx::__ops::_Iter_less_iter>
(lVar4,lVar5);
}
}
iVar7 = 0;
if (0 < *(long *)(this + 0x78)) {
iVar7 = (*(int *)(this + 0x48) == 1) + 1;
}
*(int *)(this + 0x48) = iVar7;
return 0 < *(long *)(this + 0x78);
}
|
|
14,676
|
Elevetor::wait_to_action()
|
LeafBlue[P]myElevetor/elevetor.cpp
|
int Elevetor::wait_to_action()
{
action_list.swap(wait_list);
//在这里进行初次排序,然后立即开始反向运行:
if(action_list.size() > 0){
std::sort(action_list.begin(),action_list.end());
}
//重新设置航向,这里反向应该是没错的
if(action_list.size() > 0){
if(direct == 1){
direct = 2;
}else{
direct = 1;
}
return 1;
}else{
direct = 0;
return 0;
}
}
|
O2
|
cpp
|
Elevetor::wait_to_action():
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x68(%rdi), %r14
leaq 0x80(%rdi), %rsi
movq %r14, %rdi
callq 0x8ab2
cmpq $0x0, 0x78(%rbx)
jle 0x8606
movq %r14, %rdi
callq 0x8712
movq %rax, %r15
movq %r14, %rdi
callq 0x8722
movq %r15, %rdi
movq %rax, %rsi
callq 0x8f24
cmpq $0x0, 0x78(%rbx)
jle 0x8606
xorl %eax, %eax
cmpl $0x1, 0x48(%rbx)
sete %al
incl %eax
movl %eax, 0x48(%rbx)
pushq $0x1
popq %rax
jmp 0x860c
andl $0x0, 0x48(%rbx)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
|
_ZN8Elevetor14wait_to_actionEv:
push r15
push r14
push rbx
mov rbx, rdi
lea r14, [rdi+68h]
lea rsi, [rdi+80h]
mov rdi, r14
call _ZN17QArrayDataPointerIiE4swapERS0_; QArrayDataPointer<int>::swap(QArrayDataPointer<int>&)
cmp qword ptr [rbx+78h], 0
jle short loc_8606
mov rdi, r14
call _ZN5QListIiE5beginEv; QList<int>::begin(void)
mov r15, rax
mov rdi, r14
call _ZN5QListIiE3endEv; QList<int>::end(void)
mov rdi, r15
mov rsi, rax
call _ZSt6__sortIN5QListIiE8iteratorEN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S6_T0_; std::__sort<QList<int>::iterator,__gnu_cxx::__ops::_Iter_less_iter>(QList<int>::iterator,QList<int>::iterator,__gnu_cxx::__ops::_Iter_less_iter)
cmp qword ptr [rbx+78h], 0
jle short loc_8606
xor eax, eax
cmp dword ptr [rbx+48h], 1
setz al
inc eax
mov [rbx+48h], eax
push 1
pop rax
jmp short loc_860C
loc_8606:
and dword ptr [rbx+48h], 0
xor eax, eax
loc_860C:
pop rbx
pop r14
pop r15
retn
|
long long Elevetor::wait_to_action(Elevetor *this)
{
char *v1; // r14
long long v2; // r15
long long v3; // rax
v1 = (char *)this + 104;
QArrayDataPointer<int>::swap((char *)this + 104, (char *)this + 128);
if ( *((long long *)this + 15) <= 0
|| (v2 = QList<int>::begin(v1),
v3 = QList<int>::end(v1),
std::__sort<QList<int>::iterator,__gnu_cxx::__ops::_Iter_less_iter>(v2, v3),
*((long long *)this + 15) <= 0) )
{
*((_DWORD *)this + 18) = 0;
return 0LL;
}
else
{
*((_DWORD *)this + 18) = (*((_DWORD *)this + 18) == 1) + 1;
return 1LL;
}
}
|
wait_to_action:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDI
LEA R14,[RDI + 0x68]
LEA RSI,[RDI + 0x80]
MOV RDI,R14
CALL 0x00108ab2
CMP qword ptr [RBX + 0x78],0x0
JLE 0x00108606
MOV RDI,R14
CALL 0x00108712
MOV R15,RAX
MOV RDI,R14
CALL 0x00108722
MOV RDI,R15
MOV RSI,RAX
CALL 0x00108f24
CMP qword ptr [RBX + 0x78],0x0
JLE 0x00108606
XOR EAX,EAX
CMP dword ptr [RBX + 0x48],0x1
SETZ AL
INC EAX
MOV dword ptr [RBX + 0x48],EAX
PUSH 0x1
POP RAX
JMP 0x0010860c
LAB_00108606:
AND dword ptr [RBX + 0x48],0x0
XOR EAX,EAX
LAB_0010860c:
POP RBX
POP R14
POP R15
RET
|
/* Elevetor::wait_to_action() */
int8 __thiscall Elevetor::wait_to_action(Elevetor *this)
{
QArrayDataPointer<int> *this_00;
int8 uVar1;
int8 uVar2;
this_00 = (QArrayDataPointer<int> *)(this + 0x68);
QArrayDataPointer<int>::swap(this_00,(QArrayDataPointer *)(this + 0x80));
if (0 < *(long *)(this + 0x78)) {
uVar1 = QList<int>::begin((QList<int> *)this_00);
uVar2 = QList<int>::end((QList<int> *)this_00);
std::__sort<QList<int>::iterator,__gnu_cxx::__ops::_Iter_less_iter>(uVar1,uVar2);
if (0 < *(long *)(this + 0x78)) {
*(uint *)(this + 0x48) = (*(int *)(this + 0x48) == 1) + 1;
return 1;
}
}
*(int4 *)(this + 0x48) = 0;
return 0;
}
|
|
14,677
|
YogaTest_align_baseline_parent_using_child_with_padding_in_row_as_reference_Test::~YogaTest_align_baseline_parent_using_child_with_padding_in_row_as_reference_Test()
|
yoga-mod/tests/YGAlignBaselineTest.cpp
|
TEST(
YogaTest,
align_baseline_parent_using_child_with_padding_in_row_as_reference) {
YGConfigRef config = YGConfigNew();
YGNodeRef root = createYGNode(config, YGFlexDirectionRow, 1000, 1000, true);
YGNodeRef root_child0 =
createYGNode(config, YGFlexDirectionColumn, 500, 600, false);
YGNodeInsertChild(root, root_child0, 0);
YGNodeRef root_child1 =
createYGNode(config, YGFlexDirectionRow, 500, 800, true);
YGNodeInsertChild(root, root_child1, 1);
YGNodeRef root_child1_child0 =
createYGNode(config, YGFlexDirectionColumn, 500, 500, false);
YGNodeInsertChild(root_child1, root_child1_child0, 0);
YGNodeRef root_child1_child1 =
createYGNode(config, YGFlexDirectionColumn, 500, 400, false);
YGNodeSetBaselineFunc(root_child1_child1, _baselineFunc);
YGNodeSetIsReferenceBaseline(root_child1_child1, true);
YGNodeStyleSetPadding(root_child1_child1, YGEdgeLeft, 100);
YGNodeStyleSetPadding(root_child1_child1, YGEdgeRight, 100);
YGNodeStyleSetPadding(root_child1_child1, YGEdgeTop, 100);
YGNodeStyleSetPadding(root_child1_child1, YGEdgeBottom, 100);
YGNodeInsertChild(root_child1, root_child1_child1, 1);
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0));
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0));
ASSERT_FLOAT_EQ(500, YGNodeLayoutGetLeft(root_child1));
ASSERT_FLOAT_EQ(100, YGNodeLayoutGetTop(root_child1));
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child1_child0));
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child1_child0));
ASSERT_FLOAT_EQ(500, YGNodeLayoutGetLeft(root_child1_child1));
ASSERT_FLOAT_EQ(300, YGNodeLayoutGetTop(root_child1_child1));
YGNodeFreeRecursive(root);
YGConfigFree(config);
}
|
O0
|
cpp
|
YogaTest_align_baseline_parent_using_child_with_padding_in_row_as_reference_Test::~YogaTest_align_baseline_parent_using_child_with_padding_in_row_as_reference_Test():
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
callq 0x7047d0
movq -0x10(%rbp), %rax
leaq 0x78f4c4(%rip), %rcx # 0x85cb48
addq $0x10, %rcx
movq %rcx, (%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
|
_ZN80YogaTest_align_baseline_parent_using_child_with_padding_in_row_as_reference_TestC2Ev:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]; this
mov [rbp+var_10], rdi
call _ZN7testing4TestC2Ev; testing::Test::Test(void)
mov rax, [rbp+var_10]
lea rcx, _ZTV80YogaTest_align_baseline_parent_using_child_with_padding_in_row_as_reference_Test; `vtable for'YogaTest_align_baseline_parent_using_child_with_padding_in_row_as_reference_Test
add rcx, 10h
mov [rax], rcx
add rsp, 10h
pop rbp
retn
|
void YogaTest_align_baseline_parent_using_child_with_padding_in_row_as_reference_Test::YogaTest_align_baseline_parent_using_child_with_padding_in_row_as_reference_Test(
YogaTest_align_baseline_parent_using_child_with_padding_in_row_as_reference_Test *this)
{
testing::Test::Test(this);
*(_QWORD *)this = (char *)&`vtable for'YogaTest_align_baseline_parent_using_child_with_padding_in_row_as_reference_Test
+ 16;
}
|
YogaTest_align_baseline_parent_using_child_with_padding_in_row_as_reference_Test:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RDI
CALL 0x008047d0
MOV RAX,qword ptr [RBP + -0x10]
LEA RCX,[0x95cb48]
ADD RCX,0x10
MOV qword ptr [RAX],RCX
ADD RSP,0x10
POP RBP
RET
|
/* YogaTest_align_baseline_parent_using_child_with_padding_in_row_as_reference_Test::YogaTest_align_baseline_parent_using_child_with_padding_in_row_as_reference_Test()
*/
void __thiscall
YogaTest_align_baseline_parent_using_child_with_padding_in_row_as_reference_Test::
YogaTest_align_baseline_parent_using_child_with_padding_in_row_as_reference_Test
(YogaTest_align_baseline_parent_using_child_with_padding_in_row_as_reference_Test *this)
{
testing::Test::Test((Test *)this);
*(int ***)this =
&
PTR__YogaTest_align_baseline_parent_using_child_with_padding_in_row_as_reference_Test_0095cb58
;
return;
}
|
|
14,678
|
YogaTest_align_baseline_parent_using_child_with_padding_in_row_as_reference_Test::~YogaTest_align_baseline_parent_using_child_with_padding_in_row_as_reference_Test()
|
yoga-mod/tests/YGAlignBaselineTest.cpp
|
TEST(
YogaTest,
align_baseline_parent_using_child_with_padding_in_row_as_reference) {
YGConfigRef config = YGConfigNew();
YGNodeRef root = createYGNode(config, YGFlexDirectionRow, 1000, 1000, true);
YGNodeRef root_child0 =
createYGNode(config, YGFlexDirectionColumn, 500, 600, false);
YGNodeInsertChild(root, root_child0, 0);
YGNodeRef root_child1 =
createYGNode(config, YGFlexDirectionRow, 500, 800, true);
YGNodeInsertChild(root, root_child1, 1);
YGNodeRef root_child1_child0 =
createYGNode(config, YGFlexDirectionColumn, 500, 500, false);
YGNodeInsertChild(root_child1, root_child1_child0, 0);
YGNodeRef root_child1_child1 =
createYGNode(config, YGFlexDirectionColumn, 500, 400, false);
YGNodeSetBaselineFunc(root_child1_child1, _baselineFunc);
YGNodeSetIsReferenceBaseline(root_child1_child1, true);
YGNodeStyleSetPadding(root_child1_child1, YGEdgeLeft, 100);
YGNodeStyleSetPadding(root_child1_child1, YGEdgeRight, 100);
YGNodeStyleSetPadding(root_child1_child1, YGEdgeTop, 100);
YGNodeStyleSetPadding(root_child1_child1, YGEdgeBottom, 100);
YGNodeInsertChild(root_child1, root_child1_child1, 1);
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0));
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0));
ASSERT_FLOAT_EQ(500, YGNodeLayoutGetLeft(root_child1));
ASSERT_FLOAT_EQ(100, YGNodeLayoutGetTop(root_child1));
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child1_child0));
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child1_child0));
ASSERT_FLOAT_EQ(500, YGNodeLayoutGetLeft(root_child1_child1));
ASSERT_FLOAT_EQ(300, YGNodeLayoutGetTop(root_child1_child1));
YGNodeFreeRecursive(root);
YGConfigFree(config);
}
|
O3
|
cpp
|
YogaTest_align_baseline_parent_using_child_with_padding_in_row_as_reference_Test::~YogaTest_align_baseline_parent_using_child_with_padding_in_row_as_reference_Test():
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x381548
movl $0x10, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x32440
nop
|
_ZN80YogaTest_align_baseline_parent_using_child_with_padding_in_row_as_reference_TestD0Ev:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
call _ZN7testing4TestD2Ev; testing::Test::~Test()
mov esi, 10h; unsigned __int64
mov rdi, rbx; void *
add rsp, 8
pop rbx
pop rbp
jmp __ZdlPvm; operator delete(void *,ulong)
|
void YogaTest_align_baseline_parent_using_child_with_padding_in_row_as_reference_Test::~YogaTest_align_baseline_parent_using_child_with_padding_in_row_as_reference_Test(
YogaTest_align_baseline_parent_using_child_with_padding_in_row_as_reference_Test *this)
{
testing::Test::~Test(this);
operator delete(this, 0x10uLL);
}
|
~YogaTest_align_baseline_parent_using_child_with_padding_in_row_as_reference_Test:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
CALL 0x00481548
MOV ESI,0x10
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x00132440
|
/* YogaTest_align_baseline_parent_using_child_with_padding_in_row_as_reference_Test::~YogaTest_align_baseline_parent_using_child_with_padding_in_row_as_reference_Test()
*/
void __thiscall
YogaTest_align_baseline_parent_using_child_with_padding_in_row_as_reference_Test::
~YogaTest_align_baseline_parent_using_child_with_padding_in_row_as_reference_Test
(YogaTest_align_baseline_parent_using_child_with_padding_in_row_as_reference_Test *this)
{
testing::Test::~Test((Test *)this);
operator_delete(this,0x10);
return;
}
|
|
14,679
|
aggregate_thread_waits(PFS_thread*, PFS_account*, PFS_user*, PFS_host*)
|
eloqsql/storage/perfschema/pfs_instr.cc
|
void aggregate_thread_waits(PFS_thread *thread,
PFS_account *safe_account,
PFS_user *safe_user,
PFS_host *safe_host)
{
if (thread->read_instr_class_waits_stats() == NULL)
return;
if (likely(safe_account != NULL))
{
/*
Aggregate EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME
to EVENTS_WAITS_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME.
*/
aggregate_all_event_names(thread->write_instr_class_waits_stats(),
safe_account->write_instr_class_waits_stats());
return;
}
if ((safe_user != NULL) && (safe_host != NULL))
{
/*
Aggregate EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME to:
- EVENTS_WAITS_SUMMARY_BY_USER_BY_EVENT_NAME
- EVENTS_WAITS_SUMMARY_BY_HOST_BY_EVENT_NAME
in parallel.
*/
aggregate_all_event_names(thread->write_instr_class_waits_stats(),
safe_user->write_instr_class_waits_stats(),
safe_host->write_instr_class_waits_stats());
return;
}
if (safe_user != NULL)
{
/*
Aggregate EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME
to EVENTS_WAITS_SUMMARY_BY_USER_BY_EVENT_NAME, directly.
*/
aggregate_all_event_names(thread->write_instr_class_waits_stats(),
safe_user->write_instr_class_waits_stats());
return;
}
if (safe_host != NULL)
{
/*
Aggregate EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME
to EVENTS_WAITS_SUMMARY_BY_HOST_BY_EVENT_NAME, directly.
*/
aggregate_all_event_names(thread->write_instr_class_waits_stats(),
safe_host->write_instr_class_waits_stats());
return;
}
/* Orphan thread, clean the waits stats. */
thread->reset_waits_stats();
}
|
O3
|
cpp
|
aggregate_thread_waits(PFS_thread*, PFS_account*, PFS_user*, PFS_host*):
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq 0x8(%rdi), %rbx
testq %rbx, %rbx
setne %sil
andb (%rdi), %sil
cmpb $0x1, %sil
jne 0x38fd2
testq %r14, %r14
je 0x38fbe
testb $0x1, (%r14)
jne 0x38fae
movq %r14, %rdi
callq 0x429dc
movb $0x1, (%r14)
movq 0x8(%r14), %rsi
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x386b8
movq %rdi, %rax
movq %rdx, %rdi
movq %rcx, %rsi
movq %rbx, %rdx
movq %rax, %rcx
callq 0x2790a
popq %rbx
popq %r14
popq %rbp
retq
|
_Z22aggregate_thread_waitsP10PFS_threadP11PFS_accountP8PFS_userP8PFS_host:
push rbp
mov rbp, rsp
push r14
push rbx
mov r14, rsi
mov rbx, [rdi+8]
test rbx, rbx
setnz sil
and sil, [rdi]
cmp sil, 1
jnz short loc_38FD2
test r14, r14
jz short loc_38FBE
test byte ptr [r14], 1
jnz short loc_38FAE
mov rdi, r14; this
call _ZN20PFS_connection_slice17reset_waits_statsEv; PFS_connection_slice::reset_waits_stats(void)
mov byte ptr [r14], 1
loc_38FAE:
mov rsi, [r14+8]
mov rdi, rbx
pop rbx
pop r14
pop rbp
jmp _Z25aggregate_all_event_namesP15PFS_single_statS0_; aggregate_all_event_names(PFS_single_stat *,PFS_single_stat *)
loc_38FBE:
mov rax, rdi
mov rdi, rdx; this
mov rsi, rcx; PFS_connection_slice *
mov rdx, rbx
mov rcx, rax
call _Z22aggregate_thread_waitsP10PFS_threadP11PFS_accountP8PFS_userP8PFS_host_cold_1; aggregate_thread_waits(PFS_thread *,PFS_account *,PFS_user *,PFS_host *) [clone]
loc_38FD2:
pop rbx
pop r14
pop rbp
retn
|
unsigned long long aggregate_thread_waits(PFS_thread *a1, PFS_account *a2, PFS_user *a3, PFS_host *a4)
{
_QWORD *v4; // rbx
unsigned long long result; // rax
v4 = (_QWORD *)*((_QWORD *)a1 + 1);
if ( (*(_BYTE *)a1 & (v4 != 0LL)) == 1 )
{
if ( a2 )
{
if ( (*(_BYTE *)a2 & 1) == 0 )
{
PFS_connection_slice::reset_waits_stats(a2);
*(_BYTE *)a2 = 1;
}
return aggregate_all_event_names(v4, *((_QWORD *)a2 + 1));
}
else
{
return aggregate_thread_waits(a3, a4, (long long)v4, a1);
}
}
return result;
}
|
aggregate_thread_waits:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV R14,RSI
MOV RBX,qword ptr [RDI + 0x8]
TEST RBX,RBX
SETNZ SIL
AND SIL,byte ptr [RDI]
CMP SIL,0x1
JNZ 0x00138fd2
TEST R14,R14
JZ 0x00138fbe
TEST byte ptr [R14],0x1
JNZ 0x00138fae
MOV RDI,R14
CALL 0x001429dc
MOV byte ptr [R14],0x1
LAB_00138fae:
MOV RSI,qword ptr [R14 + 0x8]
MOV RDI,RBX
POP RBX
POP R14
POP RBP
JMP 0x001386b8
LAB_00138fbe:
MOV RAX,RDI
MOV RDI,RDX
MOV RSI,RCX
MOV RDX,RBX
MOV RCX,RAX
CALL 0x0012790a
LAB_00138fd2:
POP RBX
POP R14
POP RBP
RET
|
/* aggregate_thread_waits(PFS_thread*, PFS_account*, PFS_user*, PFS_host*) */
void aggregate_thread_waits
(PFS_thread *param_1,PFS_account *param_2,PFS_user *param_3,PFS_host *param_4)
{
PFS_single_stat *pPVar1;
pPVar1 = *(PFS_single_stat **)(param_1 + 8);
if ((pPVar1 != (PFS_single_stat *)0x0 & (byte)*param_1) == 1) {
if (param_2 != (PFS_account *)0x0) {
if (((byte)*param_2 & 1) == 0) {
PFS_connection_slice::reset_waits_stats((PFS_connection_slice *)param_2);
*param_2 = (PFS_account)0x1;
}
aggregate_all_event_names(pPVar1,*(PFS_single_stat **)(param_2 + 8));
return;
}
aggregate_thread_waits
((PFS_thread *)param_3,(PFS_account *)param_4,(PFS_user *)pPVar1,(PFS_host *)param_1);
}
return;
}
|
|
14,680
|
minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const
|
monkey531[P]llama/common/minja.hpp
|
Value do_evaluate(const std::shared_ptr<Context> & context) const override {
if (!left) throw std::runtime_error("BinaryOpExpr.left is null");
if (!right) throw std::runtime_error("BinaryOpExpr.right is null");
auto l = left->evaluate(context);
auto do_eval = [&](const Value & l) -> Value {
if (op == Op::Is || op == Op::IsNot) {
auto t = dynamic_cast<VariableExpr*>(right.get());
if (!t) throw std::runtime_error("Right side of 'is' operator must be a variable");
auto eval = [&]() {
const auto & name = t->get_name();
if (name == "none") return l.is_null();
if (name == "boolean") return l.is_boolean();
if (name == "integer") return l.is_number_integer();
if (name == "float") return l.is_number_float();
if (name == "number") return l.is_number();
if (name == "string") return l.is_string();
if (name == "mapping") return l.is_object();
if (name == "iterable") return l.is_iterable();
if (name == "sequence") return l.is_array();
if (name == "defined") return !l.is_null();
throw std::runtime_error("Unknown type for 'is' operator: " + name);
};
auto value = eval();
return Value(op == Op::Is ? value : !value);
}
if (op == Op::And) {
if (!l.to_bool()) return Value(false);
return right->evaluate(context).to_bool();
} else if (op == Op::Or) {
if (l.to_bool()) return l;
return right->evaluate(context);
}
auto r = right->evaluate(context);
switch (op) {
case Op::StrConcat: return l.to_str() + r.to_str();
case Op::Add: return l + r;
case Op::Sub: return l - r;
case Op::Mul: return l * r;
case Op::Div: return l / r;
case Op::MulMul: return std::pow(l.get<double>(), r.get<double>());
case Op::DivDiv: return l.get<int64_t>() / r.get<int64_t>();
case Op::Mod: return l.get<int64_t>() % r.get<int64_t>();
case Op::Eq: return l == r;
case Op::Ne: return l != r;
case Op::Lt: return l < r;
case Op::Gt: return l > r;
case Op::Le: return l <= r;
case Op::Ge: return l >= r;
case Op::In: return (r.is_array() || r.is_object()) && r.contains(l);
case Op::NotIn: return !(r.is_array() && r.contains(l));
default: break;
}
throw std::runtime_error("Unknown binary operator");
};
if (l.is_callable()) {
return Value::callable([l, do_eval](const std::shared_ptr<Context> & context, ArgumentsValue & args) {
auto ll = l.call(context, args);
return do_eval(ll); //args[0].second);
});
} else {
return do_eval(l);
}
}
|
O0
|
cpp
|
minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const:
subq $0x138, %rsp # imm = 0x138
movq %rdi, 0x10(%rsp)
movq %rdi, %rax
movq %rax, 0x18(%rsp)
movq %rdi, 0x130(%rsp)
movq %rsi, 0x128(%rsp)
movq %rdx, 0x120(%rsp)
movq 0x128(%rsp), %rdi
movq %rdi, 0x20(%rsp)
addq $0x20, %rdi
callq 0x10e0b0
testb $0x1, %al
jne 0x13c8d4
movl $0x10, %edi
callq 0x5d680
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x8(%rsp)
leaq 0xdd785(%rip), %rsi # 0x21a017
callq 0x5d460
jmp 0x13c899
movq 0x8(%rsp), %rdi
movq 0x17170b(%rip), %rsi # 0x2adfb0
movq 0x1716c4(%rip), %rdx # 0x2adf70
callq 0x5db00
movq 0x8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x118(%rsp)
movl %eax, 0x114(%rsp)
callq 0x5df80
jmp 0x13cab1
movq 0x20(%rsp), %rdi
addq $0x30, %rdi
callq 0x10e0b0
testb $0x1, %al
jne 0x13c941
movl $0x10, %edi
callq 0x5d680
movq %rax, %rdi
movq %rdi, %rax
movq %rax, (%rsp)
leaq 0xdd730(%rip), %rsi # 0x21a031
callq 0x5d460
jmp 0x13c908
movq (%rsp), %rdi
movq 0x17169d(%rip), %rsi # 0x2adfb0
movq 0x171656(%rip), %rdx # 0x2adf70
callq 0x5db00
movq (%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x118(%rsp)
movl %eax, 0x114(%rsp)
callq 0x5df80
jmp 0x13cab1
movq 0x20(%rsp), %rdi
addq $0x20, %rdi
callq 0x1141e0
movq %rax, %rsi
movq 0x120(%rsp), %rdx
leaq 0xc0(%rsp), %rdi
callq 0x1141f0
movq 0x20(%rsp), %rax
movq %rax, 0xb0(%rsp)
movq 0x120(%rsp), %rax
movq %rax, 0xb8(%rsp)
leaq 0xc0(%rsp), %rdi
callq 0x133e30
testb $0x1, %al
jne 0x13c99a
jmp 0x13ca66
leaq 0x30(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
callq 0x123f60
jmp 0x13c9ae
movups 0xb0(%rsp), %xmm0
movups %xmm0, 0x80(%rsp)
leaq 0x90(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x13cbc0
jmp 0x13c9d2
movq 0x10(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x13cb40
jmp 0x13c9e6
leaq 0x90(%rsp), %rdi
callq 0x13cc70
leaq 0x30(%rsp), %rdi
callq 0x13cc80
movl $0x1, 0x2c(%rsp)
jmp 0x13ca8a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x118(%rsp)
movl %eax, 0x114(%rsp)
jmp 0x13caa4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x118(%rsp)
movl %eax, 0x114(%rsp)
jmp 0x13ca5a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x118(%rsp)
movl %eax, 0x114(%rsp)
leaq 0x90(%rsp), %rdi
callq 0x13cc70
leaq 0x30(%rsp), %rdi
callq 0x13cc80
jmp 0x13caa4
movq 0x10(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
leaq 0xc0(%rsp), %rdx
callq 0x13cc90
jmp 0x13ca82
movl $0x1, 0x2c(%rsp)
leaq 0xc0(%rsp), %rdi
callq 0x114690
movq 0x18(%rsp), %rax
addq $0x138, %rsp # imm = 0x138
retq
leaq 0xc0(%rsp), %rdi
callq 0x114690
movq 0x118(%rsp), %rdi
callq 0x5dbc0
nop
|
_ZNK5minja12BinaryOpExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE:
sub rsp, 138h
mov [rsp+138h+var_128], rdi
mov rax, rdi
mov [rsp+138h+var_120], rax
mov [rsp+138h+var_8], rdi
mov [rsp+138h+var_10], rsi
mov [rsp+138h+var_18], rdx
mov rdi, [rsp+138h+var_10]
mov [rsp+138h+var_118], rdi
add rdi, 20h ; ' '
call _ZNKSt12__shared_ptrIN5minja10ExpressionELN9__gnu_cxx12_Lock_policyE2EEcvbEv; std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator bool(void)
test al, 1
jnz short loc_13C8D4
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rdi, rax; this
mov rax, rdi
mov [rsp+138h+var_130], rax
lea rsi, aBinaryopexprLe; "BinaryOpExpr.left is null"
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short $+2
loc_13C899:
mov rdi, [rsp+138h+var_130]; void *
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
call ___cxa_throw
mov rdi, [rsp+138h+var_130]; void *
mov rcx, rax
mov eax, edx
mov [rsp+138h+var_20], rcx
mov [rsp+138h+var_24], eax
call ___cxa_free_exception
jmp loc_13CAB1
loc_13C8D4:
mov rdi, [rsp+138h+var_118]
add rdi, 30h ; '0'
call _ZNKSt12__shared_ptrIN5minja10ExpressionELN9__gnu_cxx12_Lock_policyE2EEcvbEv; std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator bool(void)
test al, 1
jnz short loc_13C941
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rdi, rax; this
mov rax, rdi
mov [rsp+138h+var_138], rax
lea rsi, aBinaryopexprRi; "BinaryOpExpr.right is null"
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short $+2
loc_13C908:
mov rdi, [rsp+138h+var_138]; void *
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
call ___cxa_throw
mov rdi, [rsp+138h+var_138]; void *
mov rcx, rax
mov eax, edx
mov [rsp+138h+var_20], rcx
mov [rsp+138h+var_24], eax
call ___cxa_free_exception
jmp loc_13CAB1
loc_13C941:
mov rdi, [rsp+138h+var_118]
add rdi, 20h ; ' '
call _ZNKSt19__shared_ptr_accessIN5minja10ExpressionELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<minja::Expression,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
mov rsi, rax
mov rdx, [rsp+138h+var_18]
lea rdi, [rsp+138h+var_78]
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
mov rax, [rsp+138h+var_118]
mov qword ptr [rsp+138h+var_88], rax
mov rax, [rsp+138h+var_18]
mov qword ptr [rsp+138h+var_88+8], rax
lea rdi, [rsp+138h+var_78]; this
call _ZNK5minja5Value11is_callableEv; minja::Value::is_callable(void)
test al, 1
jnz short loc_13C99A
jmp loc_13CA66
loc_13C99A:
lea rdi, [rsp+138h+var_108]; this
lea rsi, [rsp+138h+var_78]; minja::Value *
call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&)
jmp short $+2
loc_13C9AE:
movups xmm0, [rsp+138h+var_88]
movups [rsp+138h+var_B8], xmm0
lea rdi, [rsp+138h+var_A8]
lea rsi, [rsp+138h+var_108]
call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEEC2IZNKS0_12BinaryOpExpr11do_evaluateES6_EUlS6_S8_E_vEEOT_; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::function<minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1},void>(minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1} &&)
jmp short $+2
loc_13C9D2:
mov rdi, [rsp+138h+var_128]
lea rsi, [rsp+138h+var_A8]
call _ZN5minja5Value8callableERKSt8functionIFS0_RKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueEEE; minja::Value::callable(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)> const&)
jmp short $+2
loc_13C9E6:
lea rdi, [rsp+138h+var_A8]
call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEED2Ev; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::~function()
lea rdi, [rsp+138h+var_108]
call _ZZNK5minja12BinaryOpExpr11do_evaluateERKSt10shared_ptrINS_7ContextEEENUlS5_RNS_14ArgumentsValueEE_D2Ev; minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1}::~ArgumentsValue()
mov [rsp+138h+var_10C], 1
jmp loc_13CA8A
mov rcx, rax
mov eax, edx
mov [rsp+138h+var_20], rcx
mov [rsp+138h+var_24], eax
jmp loc_13CAA4
mov rcx, rax
mov eax, edx
mov [rsp+138h+var_20], rcx
mov [rsp+138h+var_24], eax
jmp short loc_13CA5A
mov rcx, rax
mov eax, edx
mov [rsp+138h+var_20], rcx
mov [rsp+138h+var_24], eax
lea rdi, [rsp+138h+var_A8]
call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEED2Ev; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::~function()
loc_13CA5A:
lea rdi, [rsp+138h+var_108]
call _ZZNK5minja12BinaryOpExpr11do_evaluateERKSt10shared_ptrINS_7ContextEEENUlS5_RNS_14ArgumentsValueEE_D2Ev; minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1}::~ArgumentsValue()
jmp short loc_13CAA4
loc_13CA66:
mov rdi, [rsp+138h+var_128]
lea rsi, [rsp+138h+var_88]
lea rdx, [rsp+138h+var_78]
call _ZZNK5minja12BinaryOpExpr11do_evaluateERKSt10shared_ptrINS_7ContextEEENKUlRKNS_5ValueEE_clES8_; minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(minja::Value const&)#1}::operator()(minja::Value const&)
jmp short $+2
loc_13CA82:
mov [rsp+138h+var_10C], 1
loc_13CA8A:
lea rdi, [rsp+138h+var_78]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
mov rax, [rsp+138h+var_120]
add rsp, 138h
retn
loc_13CAA4:
lea rdi, [rsp+138h+var_78]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_13CAB1:
mov rdi, [rsp+138h+var_20]
call __Unwind_Resume
|
long long minja::BinaryOpExpr::do_evaluate(long long a1, long long a2, long long a3)
{
void (***v3)(void); // rax
int v4; // edx
int v5; // ecx
int v6; // r8d
int v7; // r9d
int v8; // edx
int v9; // ecx
int v10; // r8d
int v11; // r9d
std::runtime_error *v13; // [rsp+0h] [rbp-138h]
std::runtime_error *exception; // [rsp+8h] [rbp-130h]
_BYTE v15[80]; // [rsp+30h] [rbp-108h] BYREF
__int128 v16; // [rsp+80h] [rbp-B8h]
_BYTE v17[32]; // [rsp+90h] [rbp-A8h] BYREF
__int128 v18; // [rsp+B0h] [rbp-88h]
_BYTE v19[84]; // [rsp+C0h] [rbp-78h] BYREF
long long v20; // [rsp+120h] [rbp-18h]
long long v21; // [rsp+128h] [rbp-10h]
long long v22; // [rsp+130h] [rbp-8h]
v22 = a1;
v21 = a2;
v20 = a3;
if ( !std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator bool((_QWORD *)(a2 + 32)) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "BinaryOpExpr.left is null");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( !std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator bool((_QWORD *)(a2 + 48)) )
{
v13 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(v13, "BinaryOpExpr.right is null");
__cxa_throw(
v13,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v3 = (void (***)(void))std::__shared_ptr_access<minja::Expression,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(a2 + 32);
minja::Expression::evaluate((long long)v19, v3);
*(_QWORD *)&v18 = a2;
*((_QWORD *)&v18 + 1) = v20;
if ( minja::Value::is_callable((minja::Value *)v19) )
{
minja::Value::Value((minja::Value *)v15, (const minja::Value *)v19);
v16 = v18;
std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::function<minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1},void>(
(unsigned int)v17,
(unsigned int)v15,
v4,
v5,
v6,
v7);
minja::Value::callable(a1, (unsigned int)v17, v8, v9, v10, v11);
std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::~function(v17);
minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)const::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1}::~ArgumentsValue(v15);
}
else
{
minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)const::{lambda(minja::Value const&)#1}::operator()(a1);
}
minja::Value::~Value((minja::Value *)v19);
return a1;
}
| |||
14,681
|
minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const
|
monkey531[P]llama/common/minja.hpp
|
Value do_evaluate(const std::shared_ptr<Context> & context) const override {
if (!left) throw std::runtime_error("BinaryOpExpr.left is null");
if (!right) throw std::runtime_error("BinaryOpExpr.right is null");
auto l = left->evaluate(context);
auto do_eval = [&](const Value & l) -> Value {
if (op == Op::Is || op == Op::IsNot) {
auto t = dynamic_cast<VariableExpr*>(right.get());
if (!t) throw std::runtime_error("Right side of 'is' operator must be a variable");
auto eval = [&]() {
const auto & name = t->get_name();
if (name == "none") return l.is_null();
if (name == "boolean") return l.is_boolean();
if (name == "integer") return l.is_number_integer();
if (name == "float") return l.is_number_float();
if (name == "number") return l.is_number();
if (name == "string") return l.is_string();
if (name == "mapping") return l.is_object();
if (name == "iterable") return l.is_iterable();
if (name == "sequence") return l.is_array();
if (name == "defined") return !l.is_null();
throw std::runtime_error("Unknown type for 'is' operator: " + name);
};
auto value = eval();
return Value(op == Op::Is ? value : !value);
}
if (op == Op::And) {
if (!l.to_bool()) return Value(false);
return right->evaluate(context).to_bool();
} else if (op == Op::Or) {
if (l.to_bool()) return l;
return right->evaluate(context);
}
auto r = right->evaluate(context);
switch (op) {
case Op::StrConcat: return l.to_str() + r.to_str();
case Op::Add: return l + r;
case Op::Sub: return l - r;
case Op::Mul: return l * r;
case Op::Div: return l / r;
case Op::MulMul: return std::pow(l.get<double>(), r.get<double>());
case Op::DivDiv: return l.get<int64_t>() / r.get<int64_t>();
case Op::Mod: return l.get<int64_t>() % r.get<int64_t>();
case Op::Eq: return l == r;
case Op::Ne: return l != r;
case Op::Lt: return l < r;
case Op::Gt: return l > r;
case Op::Le: return l <= r;
case Op::Ge: return l >= r;
case Op::In: return (r.is_array() || r.is_object()) && r.contains(l);
case Op::NotIn: return !(r.is_array() && r.contains(l));
default: break;
}
throw std::runtime_error("Unknown binary operator");
};
if (l.is_callable()) {
return Value::callable([l, do_eval](const std::shared_ptr<Context> & context, ArgumentsValue & args) {
auto ll = l.call(context, args);
return do_eval(ll); //args[0].second);
});
} else {
return do_eval(l);
}
}
|
O2
|
cpp
|
minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rsi, %r15
movq 0x20(%rsi), %rsi
testq %rsi, %rsi
je 0x6fab5
cmpq $0x0, 0x30(%r15)
je 0x6fad1
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x38(%rsp), %r12
movq %r12, %rdi
callq 0x62ea2
movq %r15, 0x8(%rsp)
movq %r14, 0x10(%rsp)
cmpq $0x0, 0x30(%r12)
je 0x6fa87
leaq 0x88(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x68b08
movups 0x8(%rsp), %xmm0
leaq 0x88(%rsp), %rsi
movups %xmm0, 0x50(%rsi)
leaq 0x18(%rsp), %rdi
callq 0x6fbd8
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
callq 0x6fb8c
leaq 0x18(%rsp), %rdi
callq 0x47f7a
leaq 0x88(%rsp), %rdi
callq 0x63132
jmp 0x6fa99
leaq 0x8(%rsp), %rsi
leaq 0x38(%rsp), %rdx
movq %rbx, %rdi
callq 0x6fc20
leaq 0x38(%rsp), %rdi
callq 0x63132
movq %rbx, %rax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
pushq $0x10
popq %rdi
callq 0x24460
movq %rax, %r14
leaq 0x46b69(%rip), %rsi # 0xb6630
movq %rax, %rdi
callq 0x24320
jmp 0x6faeb
pushq $0x10
popq %rdi
callq 0x24460
movq %rax, %r14
leaq 0x46b67(%rip), %rsi # 0xb664a
movq %rax, %rdi
callq 0x24320
movq 0x904fe(%rip), %rsi # 0xffff0
movq 0x90457(%rip), %rdx # 0xfff50
movq %r14, %rdi
callq 0x24ee0
jmp 0x6fb33
jmp 0x6fb05
movq %rax, %rbx
movq %r14, %rdi
callq 0x24670
jmp 0x6fb40
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x47f7a
jmp 0x6fb24
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x63132
jmp 0x6fb36
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x63132
movq %rbx, %rdi
callq 0x24f60
|
_ZNK5minja12BinaryOpExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE:
push r15
push r14
push r12
push rbx
sub rsp, 0E8h
mov r15, rsi
mov rsi, [rsi+20h]
test rsi, rsi
jz loc_6FAB5
cmp qword ptr [r15+30h], 0
jz loc_6FAD1
mov r14, rdx
mov rbx, rdi
lea r12, [rsp+108h+var_D0]
mov rdi, r12
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
mov qword ptr [rsp+108h+var_100], r15
mov qword ptr [rsp+108h+var_100+8], r14
cmp qword ptr [r12+30h], 0
jz short loc_6FA87
lea rdi, [rsp+108h+var_80]; this
lea rsi, [rsp+108h+var_D0]; minja::Value *
call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&)
movups xmm0, [rsp+108h+var_100]
lea rsi, [rsp+108h+var_80]
movups xmmword ptr [rsi+50h], xmm0
lea rdi, [rsp+108h+var_F0]
call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEEC2IZNKS0_12BinaryOpExpr11do_evaluateES6_EUlS6_S8_E_vEEOT_; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::function<minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1},void>(minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1} &&)
lea rsi, [rsp+108h+var_F0]
mov rdi, rbx
call _ZN5minja5Value8callableERKSt8functionIFS0_RKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueEEE; minja::Value::callable(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)> const&)
lea rdi, [rsp+108h+var_F0]; this
call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base()
lea rdi, [rsp+108h+var_80]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp short loc_6FA99
loc_6FA87:
lea rsi, [rsp+108h+var_100]
lea rdx, [rsp+108h+var_D0]
mov rdi, rbx; this
call _ZZNK5minja12BinaryOpExpr11do_evaluateERKSt10shared_ptrINS_7ContextEEENKUlRKNS_5ValueEE_clES8_; minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(minja::Value const&)#1}::operator()(minja::Value const&)
loc_6FA99:
lea rdi, [rsp+108h+var_D0]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
mov rax, rbx
add rsp, 0E8h
pop rbx
pop r12
pop r14
pop r15
retn
loc_6FAB5:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aBinaryopexprLe; "BinaryOpExpr.left is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short loc_6FAEB
loc_6FAD1:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aBinaryopexprRi; "BinaryOpExpr.right is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
loc_6FAEB:
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp short loc_6FB33
jmp short $+2
loc_6FB05:
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_6FB40
mov rbx, rax
lea rdi, [rsp+108h+var_F0]; this
call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base()
jmp short loc_6FB24
mov rbx, rax
loc_6FB24:
lea rdi, [rsp+108h+var_80]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp short loc_6FB36
loc_6FB33:
mov rbx, rax
loc_6FB36:
lea rdi, [rsp+108h+var_D0]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_6FB40:
mov rdi, rbx
call __Unwind_Resume
|
minja::Value * minja::BinaryOpExpr::do_evaluate(minja::Value *this, long long a2, long long a3)
{
void (***v4)(void); // rsi
int v6; // edx
int v7; // ecx
int v8; // r8d
int v9; // r9d
std::runtime_error *exception; // r14
__int128 v12; // [rsp+8h] [rbp-100h]
_BYTE v13[32]; // [rsp+18h] [rbp-F0h] BYREF
_BYTE v14[48]; // [rsp+38h] [rbp-D0h] BYREF
long long v15; // [rsp+68h] [rbp-A0h]
_BYTE v16[80]; // [rsp+88h] [rbp-80h] BYREF
__int128 v17; // [rsp+D8h] [rbp-30h]
v4 = *(void (****)(void))(a2 + 32);
if ( !v4 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "BinaryOpExpr.left is null");
goto LABEL_9;
}
if ( !*(_QWORD *)(a2 + 48) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "BinaryOpExpr.right is null");
LABEL_9:
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::Expression::evaluate((long long)v14, v4);
*(_QWORD *)&v12 = a2;
*((_QWORD *)&v12 + 1) = a3;
if ( v15 )
{
minja::Value::Value((minja::Value *)v16, (const minja::Value *)v14);
v17 = v12;
std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::function<minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1},void>(v13);
minja::Value::callable((_DWORD)this, (unsigned int)v13, v6, v7, v8, v9);
std::_Function_base::~_Function_base((std::_Function_base *)v13);
minja::Value::~Value((minja::Value *)v16);
}
else
{
minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)const::{lambda(minja::Value const&)#1}::operator()(this);
}
minja::Value::~Value((minja::Value *)v14);
return this;
}
|
do_evaluate:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0xe8
MOV R15,RSI
MOV RSI,qword ptr [RSI + 0x20]
TEST RSI,RSI
JZ 0x0016fab5
CMP qword ptr [R15 + 0x30],0x0
JZ 0x0016fad1
MOV R14,RDX
MOV RBX,RDI
LEA R12,[RSP + 0x38]
MOV RDI,R12
CALL 0x00162ea2
MOV qword ptr [RSP + 0x8],R15
MOV qword ptr [RSP + 0x10],R14
CMP qword ptr [R12 + 0x30],0x0
JZ 0x0016fa87
LAB_0016fa34:
LEA RDI,[RSP + 0x88]
LEA RSI,[RSP + 0x38]
CALL 0x00168b08
MOVUPS XMM0,xmmword ptr [RSP + 0x8]
LEA RSI,[RSP + 0x88]
MOVUPS xmmword ptr [RSI + 0x50],XMM0
LAB_0016fa57:
LEA RDI,[RSP + 0x18]
CALL 0x0016fbd8
LAB_0016fa61:
LEA RSI,[RSP + 0x18]
MOV RDI,RBX
CALL 0x0016fb8c
LEA RDI,[RSP + 0x18]
CALL 0x00147f7a
LEA RDI,[RSP + 0x88]
CALL 0x00163132
JMP 0x0016fa99
LAB_0016fa87:
LEA RSI,[RSP + 0x8]
LEA RDX,[RSP + 0x38]
MOV RDI,RBX
CALL 0x0016fc20
LAB_0016fa99:
LEA RDI,[RSP + 0x38]
CALL 0x00163132
MOV RAX,RBX
ADD RSP,0xe8
POP RBX
POP R12
POP R14
POP R15
RET
LAB_0016fab5:
PUSH 0x10
POP RDI
CALL 0x00124460
MOV R14,RAX
LAB_0016fac0:
LEA RSI,[0x1b6630]
MOV RDI,RAX
CALL 0x00124320
LAB_0016facf:
JMP 0x0016faeb
LAB_0016fad1:
PUSH 0x10
POP RDI
CALL 0x00124460
MOV R14,RAX
LAB_0016fadc:
LEA RSI,[0x1b664a]
MOV RDI,RAX
CALL 0x00124320
LAB_0016faeb:
MOV RSI,qword ptr [0x001ffff0]
MOV RDX,qword ptr [0x001fff50]
MOV RDI,R14
CALL 0x00124ee0
|
/* minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const */
shared_ptr * minja::BinaryOpExpr::do_evaluate(shared_ptr *param_1)
{
runtime_error *this;
int8 in_RDX;
long in_RSI;
long local_100;
int8 uStack_f8;
_lambda_std__shared_ptr<minja::Context>_const__minja__ArgumentsValue___1_ local_f0 [32];
Expression local_d0 [48];
long local_a0;
Value local_80 [80];
long local_30;
int8 uStack_28;
if (*(shared_ptr **)(in_RSI + 0x20) == (shared_ptr *)0x0) {
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0016fac0 to 0016face has its CatchHandler @ 0016fb05 */
std::runtime_error::runtime_error(this,"BinaryOpExpr.left is null");
}
else {
if (*(long *)(in_RSI + 0x30) != 0) {
Expression::evaluate(local_d0,*(shared_ptr **)(in_RSI + 0x20));
if (local_a0 == 0) {
/* try { // try from 0016fa87 to 0016fa98 has its CatchHandler @ 0016fb01 */
const::{lambda(minja::Value_const&)#1}::operator()
((_lambda_minja__Value_const___1_ *)param_1,(Value *)&local_100);
}
else {
/* try { // try from 0016fa34 to 0016fa45 has its CatchHandler @ 0016fb33 */
local_100 = in_RSI;
uStack_f8 = in_RDX;
Value::Value(local_80,(Value *)local_d0);
local_30 = local_100;
uStack_28 = uStack_f8;
/* try { // try from 0016fa57 to 0016fa60 has its CatchHandler @ 0016fb21 */
std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)>::
function<minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context>const&)const::_lambda(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)_1_,void>
(local_f0);
/* try { // try from 0016fa61 to 0016fa6d has its CatchHandler @ 0016fb12 */
Value::callable(param_1);
std::_Function_base::~_Function_base((_Function_base *)local_f0);
Value::~Value(local_80);
}
Value::~Value((Value *)local_d0);
return param_1;
}
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0016fadc to 0016faea has its CatchHandler @ 0016fb03 */
std::runtime_error::runtime_error(this,"BinaryOpExpr.right is null");
}
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_001ffff0,PTR__runtime_error_001fff50);
}
|
|
14,682
|
google::protobuf::MethodDescriptorProto::SharedDtor()
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc
|
inline void MethodDescriptorProto::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
_impl_.name_.Destroy();
_impl_.input_type_.Destroy();
_impl_.output_type_.Destroy();
if (this != internal_default_instance()) delete _impl_.options_;
}
|
O0
|
cpp
|
google::protobuf::MethodDescriptorProto::SharedDtor():
subq $0x78, %rsp
movq %rdi, 0x70(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x18(%rsp)
xorl %eax, %eax
testb $0x1, %al
jne 0x2dda3e
jmp 0x2ddae0
movq 0x18(%rsp), %rdi
callq 0x292e0
movb $0x0, 0x37(%rsp)
cmpq $0x0, %rax
jne 0x2dda55
jmp 0x2ddaa5
leaq 0x125d6b(%rip), %rdx # 0x4037c7
leaq 0x38(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movl $0x3, %esi
movl $0x16c1, %ecx # imm = 0x16C1
callq 0x219560
movq 0x8(%rsp), %rdi
movb $0x1, 0x37(%rsp)
leaq 0xd8290(%rip), %rsi # 0x3b5d16
callq 0x218e20
movq %rax, 0x10(%rsp)
jmp 0x2dda92
movq 0x10(%rsp), %rsi
leaq 0x23(%rsp), %rdi
callq 0x218fd0
jmp 0x2ddaa3
jmp 0x2ddaa5
testb $0x1, 0x37(%rsp)
jne 0x2ddaae
jmp 0x2ddab8
leaq 0x38(%rsp), %rdi
callq 0x2195a0
jmp 0x2dda33
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
testb $0x1, 0x37(%rsp)
jne 0x2ddad4
jmp 0x2ddade
leaq 0x38(%rsp), %rdi
callq 0x2195a0
jmp 0x2ddb54
movq 0x18(%rsp), %rdi
addq $0x10, %rdi
addq $0x8, %rdi
callq 0x1e7ae0
movq 0x18(%rsp), %rdi
addq $0x10, %rdi
addq $0x10, %rdi
callq 0x1e7ae0
movq 0x18(%rsp), %rdi
addq $0x10, %rdi
addq $0x18, %rdi
callq 0x1e7ae0
callq 0x2e1ad0
movq %rax, %rcx
movq 0x18(%rsp), %rax
cmpq %rcx, %rax
je 0x2ddb4f
movq 0x18(%rsp), %rax
movq 0x30(%rax), %rax
movq %rax, (%rsp)
cmpq $0x0, %rax
je 0x2ddb4d
movq (%rsp), %rdi
callq 0x2cd0c0
movq (%rsp), %rdi
callq 0x21620
jmp 0x2ddb4f
addq $0x78, %rsp
retq
movq 0x28(%rsp), %rdi
callq 0x21700
nop
|
_ZN6google8protobuf21MethodDescriptorProto10SharedDtorEv:
sub rsp, 78h
mov [rsp+78h+var_8], rdi
mov rax, [rsp+78h+var_8]
mov [rsp+78h+var_60], rax
loc_2DDA33:
xor eax, eax
test al, 1
jnz short loc_2DDA3E
jmp loc_2DDAE0
loc_2DDA3E:
mov rdi, [rsp+78h+var_60]; this
call _ZNK6google8protobuf11MessageLite21GetArenaForAllocationEv; google::protobuf::MessageLite::GetArenaForAllocation(void)
mov [rsp+78h+var_41], 0
cmp rax, 0
jnz short loc_2DDA55
jmp short loc_2DDAA5
loc_2DDA55:
lea rdx, aWorkspaceLlm4b_82; "/workspace/llm4binary/github2025/aimrt_"...
lea rdi, [rsp+78h+var_40]
mov [rsp+78h+var_70], rdi
mov esi, 3
mov ecx, 16C1h
call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int)
mov rdi, [rsp+78h+var_70]
mov [rsp+78h+var_41], 1
lea rsi, aCheckFailedGet; "CHECK failed: GetArenaForAllocation() ="...
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
mov [rsp+78h+var_68], rax
jmp short $+2
loc_2DDA92:
mov rsi, [rsp+78h+var_68]
lea rdi, [rsp+78h+var_55]
call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &)
jmp short $+2
loc_2DDAA3:
jmp short $+2
loc_2DDAA5:
test [rsp+78h+var_41], 1
jnz short loc_2DDAAE
jmp short loc_2DDAB8
loc_2DDAAE:
lea rdi, [rsp+78h+var_40]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
loc_2DDAB8:
jmp loc_2DDA33
mov rcx, rax
mov eax, edx
mov [rsp+arg_20], rcx
mov [rsp+arg_1C], eax
test [rsp+arg_2F], 1
jnz short loc_2DDAD4
jmp short loc_2DDADE
loc_2DDAD4:
lea rdi, [rsp+arg_30]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
loc_2DDADE:
jmp short loc_2DDB54
loc_2DDAE0:
mov rdi, [rsp+78h+var_60]
add rdi, 10h
add rdi, 8; this
call _ZN6google8protobuf8internal14ArenaStringPtr7DestroyEv; google::protobuf::internal::ArenaStringPtr::Destroy(void)
mov rdi, [rsp+78h+var_60]
add rdi, 10h
add rdi, 10h; this
call _ZN6google8protobuf8internal14ArenaStringPtr7DestroyEv; google::protobuf::internal::ArenaStringPtr::Destroy(void)
mov rdi, [rsp+78h+var_60]
add rdi, 10h
add rdi, 18h; this
call _ZN6google8protobuf8internal14ArenaStringPtr7DestroyEv; google::protobuf::internal::ArenaStringPtr::Destroy(void)
call _ZN6google8protobuf21MethodDescriptorProto25internal_default_instanceEv; google::protobuf::MethodDescriptorProto::internal_default_instance(void)
mov rcx, rax
mov rax, [rsp+78h+var_60]
cmp rax, rcx
jz short loc_2DDB4F
mov rax, [rsp+78h+var_60]
mov rax, [rax+30h]
mov [rsp+78h+var_78], rax
cmp rax, 0
jz short loc_2DDB4D
mov rdi, [rsp+78h+var_78]; this
call _ZN6google8protobuf13MethodOptionsD2Ev; google::protobuf::MethodOptions::~MethodOptions()
mov rdi, [rsp+78h+var_78]; void *
call __ZdlPv; operator delete(void *)
loc_2DDB4D:
jmp short $+2
loc_2DDB4F:
add rsp, 78h
retn
loc_2DDB54:
mov rdi, [rsp+arg_20]
call __Unwind_Resume
|
void google::protobuf::MethodDescriptorProto::SharedDtor(google::protobuf::MethodDescriptorProto *this)
{
google::protobuf::internal::ArenaStringPtr *v1; // rdi
google::protobuf::MethodOptions *v2; // [rsp+0h] [rbp-78h]
google::protobuf::internal::ArenaStringPtr::Destroy((google::protobuf::MethodDescriptorProto *)((char *)this + 24));
google::protobuf::internal::ArenaStringPtr::Destroy((google::protobuf::MethodDescriptorProto *)((char *)this + 32));
v1 = (google::protobuf::MethodDescriptorProto *)((char *)this + 40);
google::protobuf::internal::ArenaStringPtr::Destroy(v1);
if ( this != (google::protobuf::MethodDescriptorProto *)google::protobuf::MethodDescriptorProto::internal_default_instance(v1) )
{
v2 = (google::protobuf::MethodOptions *)*((_QWORD *)this + 6);
if ( v2 )
{
google::protobuf::MethodOptions::~MethodOptions(v2);
operator delete(v2);
}
}
}
|
GenerateFieldBuilderInitializationCode:
MOV qword ptr [RSP + -0x8],RDI
MOV qword ptr [RSP + -0x10],RSI
RET
|
/* google::protobuf::compiler::java::RepeatedImmutableEnumFieldGenerator::GenerateFieldBuilderInitializationCode(google::protobuf::io::Printer*)
const */
void google::protobuf::compiler::java::RepeatedImmutableEnumFieldGenerator::
GenerateFieldBuilderInitializationCode(Printer *param_1)
{
return;
}
|
|
14,683
|
bitmap_copy
|
eloqsql/mysys/my_bitmap.c
|
void bitmap_copy(MY_BITMAP *map, const MY_BITMAP *map2)
{
my_bitmap_map *to= map->bitmap, *from= map2->bitmap, *end;
DBUG_ASSERT(map->bitmap);
DBUG_ASSERT(map2->bitmap);
DBUG_ASSERT(map->n_bits == map2->n_bits);
end= map->last_word_ptr;
while (to <= end)
*to++ = *from++;
}
|
O3
|
c
|
bitmap_copy:
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
cmpq %rcx, %rax
ja 0x9d94c
pushq %rbp
movq %rsp, %rbp
movq (%rsi), %rdx
movl (%rdx), %esi
addq $0x4, %rdx
movl %esi, (%rax)
addq $0x4, %rax
cmpq %rcx, %rax
jbe 0x9d93a
popq %rbp
retq
|
bitmap_copy:
mov rax, [rdi]
mov rcx, [rdi+8]
cmp rax, rcx
ja short locret_9D94C
push rbp
mov rbp, rsp
mov rdx, [rsi]
loc_9D93A:
mov esi, [rdx]
add rdx, 4
mov [rax], esi
add rax, 4
cmp rax, rcx
jbe short loc_9D93A
pop rbp
locret_9D94C:
retn
|
_DWORD * bitmap_copy(long long a1, int **a2)
{
_DWORD *result; // rax
unsigned long long v3; // rcx
int *v4; // rdx
int v5; // esi
result = *(_DWORD **)a1;
v3 = *(_QWORD *)(a1 + 8);
if ( *(_QWORD *)a1 <= v3 )
{
v4 = *a2;
do
{
v5 = *v4++;
*result++ = v5;
}
while ( (unsigned long long)result <= v3 );
}
return result;
}
|
bitmap_copy:
MOV RAX,qword ptr [RDI]
MOV RCX,qword ptr [RDI + 0x8]
CMP RAX,RCX
JA 0x0019d94c
PUSH RBP
MOV RBP,RSP
MOV RDX,qword ptr [RSI]
LAB_0019d93a:
MOV ESI,dword ptr [RDX]
ADD RDX,0x4
MOV dword ptr [RAX],ESI
ADD RAX,0x4
CMP RAX,RCX
JBE 0x0019d93a
POP RBP
LAB_0019d94c:
RET
|
void bitmap_copy(int8 *param_1,int8 *param_2)
{
int4 uVar1;
int4 *puVar2;
int4 *puVar3;
int4 *puVar4;
puVar3 = (int4 *)*param_1;
puVar2 = (int4 *)param_1[1];
if (puVar3 <= puVar2) {
puVar4 = (int4 *)*param_2;
do {
uVar1 = *puVar4;
puVar4 = puVar4 + 1;
*puVar3 = uVar1;
puVar3 = puVar3 + 1;
} while (puVar3 <= puVar2);
}
return;
}
|
|
14,684
|
parse_sql(THD*, Parser_state*, Object_creation_ctx*, bool)
|
eloqsql/sql/sql_parse.cc
|
bool parse_sql(THD *thd, Parser_state *parser_state,
Object_creation_ctx *creation_ctx, bool do_pfs_digest)
{
bool ret_value;
DBUG_ENTER("parse_sql");
DBUG_ASSERT(thd->m_parser_state == NULL);
DBUG_ASSERT(thd->lex->m_sql_cmd == NULL);
MYSQL_QUERY_PARSE_START(thd->query());
/* Backup creation context. */
Object_creation_ctx *backup_ctx= NULL;
if (creation_ctx)
backup_ctx= creation_ctx->set_n_backup(thd);
/* Set parser state. */
thd->m_parser_state= parser_state;
parser_state->m_digest_psi= NULL;
parser_state->m_lip.m_digest= NULL;
if (do_pfs_digest)
{
/* Start Digest */
parser_state->m_digest_psi= MYSQL_DIGEST_START(thd->m_statement_psi);
if (parser_state->m_digest_psi != NULL)
{
/*
If either:
- the caller wants to compute a digest
- the performance schema wants to compute a digest
set the digest listener in the lexer.
*/
parser_state->m_lip.m_digest= thd->m_digest;
parser_state->m_lip.m_digest->m_digest_storage.m_charset_number= thd->charset()->number;
}
}
/* Parse the query. */
bool mysql_parse_status= thd->variables.sql_mode & MODE_ORACLE
? ORAparse(thd) : MYSQLparse(thd);
DBUG_ASSERT(opt_bootstrap || mysql_parse_status ||
thd->lex->select_stack_top == 0);
thd->lex->current_select= thd->lex->first_select_lex();
/*
Check that if MYSQLparse() failed either thd->is_error() is set, or an
internal error handler is set.
The assert will not catch a situation where parsing fails without an
error reported if an error handler exists. The problem is that the
error handler might have intercepted the error, so thd->is_error() is
not set. However, there is no way to be 100% sure here (the error
handler might be for other errors than parsing one).
*/
DBUG_ASSERT(!mysql_parse_status ||
thd->is_error() ||
thd->get_internal_handler());
/* Reset parser state. */
thd->m_parser_state= NULL;
/* Restore creation context. */
if (creation_ctx)
creation_ctx->restore_env(thd, backup_ctx);
/* That's it. */
ret_value= mysql_parse_status || thd->is_fatal_error;
if ((ret_value == 0) && (parser_state->m_digest_psi != NULL))
{
/*
On parsing success, record the digest in the performance schema.
*/
DBUG_ASSERT(do_pfs_digest);
DBUG_ASSERT(thd->m_digest != NULL);
MYSQL_DIGEST_END(parser_state->m_digest_psi,
& thd->m_digest->m_digest_storage);
}
MYSQL_QUERY_PARSE_DONE(ret_value);
DBUG_RETURN(ret_value);
}
|
O0
|
cpp
|
parse_sql(THD*, Parser_state*, Object_creation_ctx*, bool):
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %cl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
andb $0x1, %al
movb %al, -0x19(%rbp)
jmp 0x9f41bd
jmp 0x9f41bf
jmp 0x9f41c1
movq $0x0, -0x28(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x9f41e1
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0xafbcd0
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x4038(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x150(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0xb0(%rax)
testb $0x1, -0x19(%rbp)
je 0x9f4271
movq -0x8(%rbp), %rax
movq 0x3b90(%rax), %rdi
callq 0x9f7730
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x150(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x150(%rax)
je 0x9f426f
movq -0x8(%rbp), %rax
movq 0x3b48(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xb0(%rax)
movq -0x8(%rbp), %rdi
callq 0x861e10
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movq 0xb0(%rax), %rax
movl %ecx, 0x20(%rax)
jmp 0x9f4271
movq -0x8(%rbp), %rax
movq 0x898(%rax), %rax
andq $0x200, %rax # imm = 0x200
cmpq $0x0, %rax
je 0x9f4296
movq -0x8(%rbp), %rdi
callq 0xc98870
movl %eax, -0x30(%rbp)
jmp 0x9f42a2
movq -0x8(%rbp), %rdi
callq 0xc528e0
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movb %al, -0x29(%rbp)
jmp 0x9f42b2
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rdi
callq 0x87e3a0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq %rcx, 0xd28(%rax)
jmp 0x9f42d3
movq -0x8(%rbp), %rax
movq $0x0, 0x4038(%rax)
cmpq $0x0, -0x18(%rbp)
je 0x9f42fa
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0xafbd10
movb $0x1, %al
testb $0x1, -0x29(%rbp)
movb %al, -0x31(%rbp)
jne 0x9f4312
movq -0x8(%rbp), %rax
movb 0x3fb5(%rax), %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
andb $0x1, %al
movb %al, -0x1a(%rbp)
movb -0x1a(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x9f435c
movq -0x10(%rbp), %rax
cmpq $0x0, 0x150(%rax)
je 0x9f435c
jmp 0x9f4337
jmp 0x9f4339
jmp 0x9f433b
jmp 0x9f433d
movq -0x10(%rbp), %rax
movq 0x150(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x3b48(%rax), %rsi
addq $0x8, %rsi
callq 0x9f7780
jmp 0x9f435e
movb -0x1a(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
|
_Z9parse_sqlP3THDP12Parser_stateP19Object_creation_ctxb:
push rbp
mov rbp, rsp
sub rsp, 40h
mov al, cl
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
and al, 1
mov [rbp+var_19], al
jmp short $+2
loc_9F41BD:
jmp short $+2
loc_9F41BF:
jmp short $+2
loc_9F41C1:
mov [rbp+var_28], 0
cmp [rbp+var_18], 0
jz short loc_9F41E1
mov rdi, [rbp+var_18]; this
mov rsi, [rbp+var_8]; THD *
call _ZN19Object_creation_ctx12set_n_backupEP3THD; Object_creation_ctx::set_n_backup(THD *)
mov [rbp+var_28], rax
loc_9F41E1:
mov rcx, [rbp+var_10]
mov rax, [rbp+var_8]
mov [rax+4038h], rcx
mov rax, [rbp+var_10]
mov qword ptr [rax+150h], 0
mov rax, [rbp+var_10]
mov qword ptr [rax+0B0h], 0
test [rbp+var_19], 1
jz short loc_9F4271
mov rax, [rbp+var_8]
mov rdi, [rax+3B90h]
call _ZL25inline_mysql_digest_startP20PSI_statement_locker; inline_mysql_digest_start(PSI_statement_locker *)
mov rcx, rax
mov rax, [rbp+var_10]
mov [rax+150h], rcx
mov rax, [rbp+var_10]
cmp qword ptr [rax+150h], 0
jz short loc_9F426F
mov rax, [rbp+var_8]
mov rcx, [rax+3B48h]
mov rax, [rbp+var_10]
mov [rax+0B0h], rcx
mov rdi, [rbp+var_8]; this
call _ZNK3THD7charsetEv; THD::charset(void)
mov ecx, [rax]
mov rax, [rbp+var_10]
mov rax, [rax+0B0h]
mov [rax+20h], ecx
loc_9F426F:
jmp short $+2
loc_9F4271:
mov rax, [rbp+var_8]
mov rax, [rax+898h]
and rax, 200h
cmp rax, 0
jz short loc_9F4296
mov rdi, [rbp+var_8]; THD *
call _Z8ORAparseP3THD; ORAparse(THD *)
mov [rbp+var_30], eax
jmp short loc_9F42A2
loc_9F4296:
mov rdi, [rbp+var_8]; THD *
call _Z10MYSQLparseP3THD; MYSQLparse(THD *)
mov [rbp+var_30], eax
loc_9F42A2:
mov eax, [rbp+var_30]
cmp eax, 0
setnz al
and al, 1
mov [rbp+var_29], al
jmp short $+2
loc_9F42B2:
mov rax, [rbp+var_8]
mov rdi, [rax+58h]; this
call _ZN3LEX16first_select_lexEv; LEX::first_select_lex(void)
mov rcx, rax
mov rax, [rbp+var_8]
mov rax, [rax+58h]
mov [rax+0D28h], rcx
jmp short $+2
loc_9F42D3:
mov rax, [rbp+var_8]
mov qword ptr [rax+4038h], 0
cmp [rbp+var_18], 0
jz short loc_9F42FA
mov rdi, [rbp+var_18]; this
mov rsi, [rbp+var_8]; THD *
mov rdx, [rbp+var_28]; Object_creation_ctx *
call _ZN19Object_creation_ctx11restore_envEP3THDPS_; Object_creation_ctx::restore_env(THD *,Object_creation_ctx*)
loc_9F42FA:
mov al, 1
test [rbp+var_29], 1
mov [rbp+var_31], al
jnz short loc_9F4312
mov rax, [rbp+var_8]
mov al, [rax+3FB5h]
mov [rbp+var_31], al
loc_9F4312:
mov al, [rbp+var_31]
and al, 1
mov [rbp+var_1A], al
mov al, [rbp+var_1A]
and al, 1
movzx eax, al
cmp eax, 0
jnz short loc_9F435C
mov rax, [rbp+var_10]
cmp qword ptr [rax+150h], 0
jz short loc_9F435C
jmp short $+2
loc_9F4337:
jmp short $+2
loc_9F4339:
jmp short $+2
loc_9F433B:
jmp short $+2
loc_9F433D:
mov rax, [rbp+var_10]
mov rdi, [rax+150h]
mov rax, [rbp+var_8]
mov rsi, [rax+3B48h]
add rsi, 8
call _ZL23inline_mysql_digest_endP17PSI_digest_lockerPK18sql_digest_storage; inline_mysql_digest_end(PSI_digest_locker *,sql_digest_storage const*)
loc_9F435C:
jmp short $+2
loc_9F435E:
mov al, [rbp+var_1A]
and al, 1
add rsp, 40h
pop rbp
retn
|
char parse_sql(LEX **a1, Parser_state *a2, Object_creation_ctx *a3, char a4)
{
_BYTE v5[5]; // [rsp+Fh] [rbp-31h]
Object_creation_ctx *v6; // [rsp+18h] [rbp-28h]
char v7; // [rsp+27h] [rbp-19h]
v7 = a4 & 1;
v6 = 0LL;
if ( a3 )
v6 = (Object_creation_ctx *)Object_creation_ctx::set_n_backup(a3, (THD *)a1);
a1[2055] = a2;
*((_QWORD *)a2 + 42) = 0LL;
*((_QWORD *)a2 + 22) = 0LL;
if ( (v7 & 1) != 0 )
{
*((_QWORD *)a2 + 42) = inline_mysql_digest_start(a1[1906]);
if ( *((_QWORD *)a2 + 42) )
{
*((_QWORD *)a2 + 22) = a1[1897];
*(_DWORD *)(*((_QWORD *)a2 + 22) + 32LL) = *(_DWORD *)THD::charset((THD *)a1);
}
}
if ( ((unsigned long long)a1[275] & 0x200) != 0 )
*(_DWORD *)&v5[1] = ORAparse((THD *)a1);
else
*(_DWORD *)&v5[1] = MYSQLparse((THD *)a1);
*((_QWORD *)a1[11] + 421) = LEX::first_select_lex(a1[11]);
a1[2055] = 0LL;
if ( a3 )
Object_creation_ctx::restore_env(a3, (THD *)a1, v6);
v5[0] = 1;
if ( !*(_DWORD *)&v5[1] )
*(_DWORD *)v5 = *((unsigned __int8 *)a1 + 16309);
if ( (v5[0] & 1) == 0 && *((_QWORD *)a2 + 42) )
inline_mysql_digest_end(*((_QWORD *)a2 + 42), (char *)a1[1897] + 8);
return v5[0] & 1;
}
|
apply_event_and_update_pos:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x28],RAX
JMP 0x009f41c2
LAB_009f41c2:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x009f4250
MOV dword ptr [RBP + -0x2c],EAX
CMP dword ptr [RBP + -0x2c],0x2
JNZ 0x009f41f6
JMP 0x009f41de
LAB_009f41de:
JMP 0x009f41e0
LAB_009f41e0:
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RAX + 0x24c0]
ADD RCX,-0x1
MOV qword ptr [RAX + 0x24c0],RCX
LAB_009f41f6:
CMP dword ptr [RBP + -0x2c],0x0
JNZ 0x009f421d
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x009f3c30
CMP EAX,0x0
JZ 0x009f421b
MOV dword ptr [RBP + -0x4],0x0
JMP 0x009f4244
LAB_009f421b:
JMP 0x009f422d
LAB_009f421d:
MOV RDI,qword ptr [RBP + -0x28]
ADD RDI,0x1b20
CALL 0x00d3e520
LAB_009f422d:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x2c]
CALL 0x009f4300
MOV dword ptr [RBP + -0x4],EAX
LAB_009f4244:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
/* apply_event_and_update_pos(Log_event*, THD*, rpl_group_info*) */
int4 apply_event_and_update_pos(Log_event *param_1,THD *param_2,rpl_group_info *param_3)
{
long lVar1;
int iVar2;
int iVar3;
int4 uVar4;
lVar1 = *(long *)(param_3 + 8);
iVar2 = apply_event_and_update_pos_setup(param_1,param_2,param_3);
if (iVar2 == 2) {
*(long *)(lVar1 + 0x24c0) = *(long *)(lVar1 + 0x24c0) + -1;
}
if (iVar2 == 0) {
iVar3 = sql_delay_event(param_1,param_2,param_3);
if (iVar3 != 0) {
return 0;
}
}
else {
coro_mutex_unlock((st_mysql_mutex *)(lVar1 + 0x1b20));
}
uVar4 = apply_event_and_update_pos_apply(param_1,param_2,param_3,iVar2);
return uVar4;
}
|
|
14,685
|
parse_sql(THD*, Parser_state*, Object_creation_ctx*, bool)
|
eloqsql/sql/sql_parse.cc
|
bool parse_sql(THD *thd, Parser_state *parser_state,
Object_creation_ctx *creation_ctx, bool do_pfs_digest)
{
bool ret_value;
DBUG_ENTER("parse_sql");
DBUG_ASSERT(thd->m_parser_state == NULL);
DBUG_ASSERT(thd->lex->m_sql_cmd == NULL);
MYSQL_QUERY_PARSE_START(thd->query());
/* Backup creation context. */
Object_creation_ctx *backup_ctx= NULL;
if (creation_ctx)
backup_ctx= creation_ctx->set_n_backup(thd);
/* Set parser state. */
thd->m_parser_state= parser_state;
parser_state->m_digest_psi= NULL;
parser_state->m_lip.m_digest= NULL;
if (do_pfs_digest)
{
/* Start Digest */
parser_state->m_digest_psi= MYSQL_DIGEST_START(thd->m_statement_psi);
if (parser_state->m_digest_psi != NULL)
{
/*
If either:
- the caller wants to compute a digest
- the performance schema wants to compute a digest
set the digest listener in the lexer.
*/
parser_state->m_lip.m_digest= thd->m_digest;
parser_state->m_lip.m_digest->m_digest_storage.m_charset_number= thd->charset()->number;
}
}
/* Parse the query. */
bool mysql_parse_status= thd->variables.sql_mode & MODE_ORACLE
? ORAparse(thd) : MYSQLparse(thd);
DBUG_ASSERT(opt_bootstrap || mysql_parse_status ||
thd->lex->select_stack_top == 0);
thd->lex->current_select= thd->lex->first_select_lex();
/*
Check that if MYSQLparse() failed either thd->is_error() is set, or an
internal error handler is set.
The assert will not catch a situation where parsing fails without an
error reported if an error handler exists. The problem is that the
error handler might have intercepted the error, so thd->is_error() is
not set. However, there is no way to be 100% sure here (the error
handler might be for other errors than parsing one).
*/
DBUG_ASSERT(!mysql_parse_status ||
thd->is_error() ||
thd->get_internal_handler());
/* Reset parser state. */
thd->m_parser_state= NULL;
/* Restore creation context. */
if (creation_ctx)
creation_ctx->restore_env(thd, backup_ctx);
/* That's it. */
ret_value= mysql_parse_status || thd->is_fatal_error;
if ((ret_value == 0) && (parser_state->m_digest_psi != NULL))
{
/*
On parsing success, record the digest in the performance schema.
*/
DBUG_ASSERT(do_pfs_digest);
DBUG_ASSERT(thd->m_digest != NULL);
MYSQL_DIGEST_END(parser_state->m_digest_psi,
& thd->m_digest->m_digest_storage);
}
MYSQL_QUERY_PARSE_DONE(ret_value);
DBUG_RETURN(ret_value);
}
|
O3
|
cpp
|
parse_sql(THD*, Parser_state*, Object_creation_ctx*, bool):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r15d
movq %rdx, %r14
movq %rsi, %r13
movq %rdi, %rbx
testq %rdx, %rdx
je 0x7e920b
movq %r14, %rdi
movq %rbx, %rsi
callq 0x885e2e
movq %rax, %r12
jmp 0x7e920e
xorl %r12d, %r12d
movq %r13, 0x4038(%rbx)
leaq 0x150(%r13), %rax
movq %rax, -0x30(%rbp)
xorl %eax, %eax
movq %rax, 0x150(%r13)
movq %rax, 0xb0(%r13)
testb %r15b, %r15b
je 0x7e9245
movq 0x3b90(%rbx), %rdi
testq %rdi, %rdi
jne 0x7e92db
testb $0x2, 0x899(%rbx)
jne 0x7e9258
movq %rbx, %rdi
callq 0x939e38
jmp 0x7e9260
movq %rbx, %rdi
callq 0x9597a8
movl %eax, %r15d
movq 0x58(%rbx), %rax
movq 0xe0(%rax), %rcx
movq %rcx, 0xd28(%rax)
movq $0x0, 0x4038(%rbx)
testq %r14, %r14
je 0x7e9293
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x885e60
movb $0x1, %al
testl %r15d, %r15d
jne 0x7e92cc
cmpb $0x0, 0x3fb5(%rbx)
jne 0x7e92cc
movq -0x30(%rbp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x7e92ca
movq 0x3b48(%rbx), %rsi
addq $0x8, %rsi
leaq 0xd3dc47(%rip), %rax # 0x1526f08
movq (%rax), %rax
callq *0x3a0(%rax)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addq $0xb0, %r13
movq -0x30(%rbp), %rsi
movq %rbx, %rdx
movq %r13, %rcx
callq 0x63c6eb
jmp 0x7e9245
|
_Z9parse_sqlP3THDP12Parser_stateP19Object_creation_ctxb:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r15d, ecx
mov r14, rdx
mov r13, rsi
mov rbx, rdi
test rdx, rdx
jz short loc_7E920B
mov rdi, r14; this
mov rsi, rbx; THD *
call _ZN19Object_creation_ctx12set_n_backupEP3THD; Object_creation_ctx::set_n_backup(THD *)
mov r12, rax
jmp short loc_7E920E
loc_7E920B:
xor r12d, r12d
loc_7E920E:
mov [rbx+4038h], r13
lea rax, [r13+150h]
mov [rbp+var_30], rax
xor eax, eax
mov [r13+150h], rax
mov [r13+0B0h], rax
test r15b, r15b
jz short loc_7E9245
mov rdi, [rbx+3B90h]
test rdi, rdi
jnz loc_7E92DB
loc_7E9245:
test byte ptr [rbx+899h], 2
jnz short loc_7E9258
mov rdi, rbx; THD *
call _Z10MYSQLparseP3THD; MYSQLparse(THD *)
jmp short loc_7E9260
loc_7E9258:
mov rdi, rbx; THD *
call _Z8ORAparseP3THD; ORAparse(THD *)
loc_7E9260:
mov r15d, eax
mov rax, [rbx+58h]
mov rcx, [rax+0E0h]
mov [rax+0D28h], rcx
mov qword ptr [rbx+4038h], 0
test r14, r14
jz short loc_7E9293
mov rdi, r14; this
mov rsi, rbx; THD *
mov rdx, r12; Object_creation_ctx *
call _ZN19Object_creation_ctx11restore_envEP3THDPS_; Object_creation_ctx::restore_env(THD *,Object_creation_ctx*)
loc_7E9293:
mov al, 1
test r15d, r15d
jnz short loc_7E92CC
cmp byte ptr [rbx+3FB5h], 0
jnz short loc_7E92CC
mov rax, [rbp+var_30]
mov rdi, [rax]
test rdi, rdi
jz short loc_7E92CA
mov rsi, [rbx+3B48h]
add rsi, 8
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+3A0h]
loc_7E92CA:
xor eax, eax
loc_7E92CC:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_7E92DB:
add r13, 0B0h
mov rsi, [rbp+var_30]
mov rdx, rbx
mov rcx, r13
call _Z9parse_sqlP3THDP12Parser_stateP19Object_creation_ctxb_cold_1; parse_sql(THD *,Parser_state *,Object_creation_ctx *,bool) [clone]
jmp loc_7E9245
|
char parse_sql(THD *a1, long long a2, Object_creation_ctx *a3, char a4)
{
Object_creation_ctx *v7; // r12
long long v8; // rdi
int v9; // eax
int v10; // r15d
char result; // al
long long *v12; // [rsp+0h] [rbp-30h]
if ( a3 )
v7 = (Object_creation_ctx *)Object_creation_ctx::set_n_backup(a3, a1);
else
v7 = 0LL;
*((_QWORD *)a1 + 2055) = a2;
v12 = (long long *)(a2 + 336);
*(_QWORD *)(a2 + 336) = 0LL;
*(_QWORD *)(a2 + 176) = 0LL;
if ( a4 )
{
v8 = *((_QWORD *)a1 + 1906);
if ( v8 )
parse_sql(v8, v12, (long long)a1, (long long *)(a2 + 176));
}
if ( (*((_BYTE *)a1 + 2201) & 2) != 0 )
v9 = ORAparse(a1);
else
v9 = MYSQLparse(a1);
v10 = v9;
*(_QWORD *)(*((_QWORD *)a1 + 11) + 3368LL) = *(_QWORD *)(*((_QWORD *)a1 + 11) + 224LL);
*((_QWORD *)a1 + 2055) = 0LL;
if ( a3 )
Object_creation_ctx::restore_env(a3, a1, v7);
result = 1;
if ( !v10 && !*((_BYTE *)a1 + 16309) )
{
if ( *v12 )
((void ( *)(long long, long long))PSI_server[116])(*v12, *((_QWORD *)a1 + 1897) + 8LL);
return 0;
}
return result;
}
| |||
14,686
|
inline_mysql_mutex_init
|
eloqsql/include/mysql/psi/mysql_thread.h
|
static inline int inline_mysql_mutex_init(
#ifdef HAVE_PSI_MUTEX_INTERFACE
PSI_mutex_key key,
#endif
mysql_mutex_t *that,
const pthread_mutexattr_t *attr
#ifdef SAFE_MUTEX
, const char *src_name, const char *src_file, uint src_line
#endif
)
{
#ifdef HAVE_PSI_MUTEX_INTERFACE
that->m_psi= PSI_MUTEX_CALL(init_mutex)(key, &that->m_mutex);
#else
that->m_psi= NULL;
#endif
#ifdef COROUTINE_ENABLED
that->l.data= that;
that->l.prev= that->l.next= NULL;
#endif
#ifdef SAFE_MUTEX
return safe_mutex_init(&that->m_mutex, attr, src_name, src_file, src_line);
#else
return pthread_mutex_init(&that->m_mutex, attr);
#endif
}
|
O0
|
c
|
inline_mysql_mutex_init:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq 0x1a551e(%rip), %rax # 0x1d5dc8
movq (%rax), %rax
movq 0x40(%rax), %rax
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
callq *%rax
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x10(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x30(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x28(%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x24490
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
|
inline_mysql_mutex_init:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+40h]
mov edi, [rbp+var_4]
mov rsi, [rbp+var_10]
call rax
mov rcx, rax
mov rax, [rbp+var_10]
mov [rax+40h], rcx
mov rcx, [rbp+var_10]
mov rax, [rbp+var_10]
mov [rax+38h], rcx
mov rax, [rbp+var_10]
mov qword ptr [rax+30h], 0
mov rax, [rbp+var_10]
mov qword ptr [rax+28h], 0
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call _pthread_mutex_init
add rsp, 20h
pop rbp
retn
|
long long inline_mysql_mutex_init(unsigned int a1, _QWORD *a2, long long a3)
{
a2[8] = (*((long long ( **)(_QWORD, _QWORD *))PSI_server[0] + 8))(a1, a2);
a2[7] = a2;
a2[6] = 0LL;
a2[5] = 0LL;
return pthread_mutex_init(a2, a3);
}
|
inline_mysql_mutex_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
LEA RAX,[0x2d5dc8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x40]
MOV EDI,dword ptr [RBP + -0x4]
MOV RSI,qword ptr [RBP + -0x10]
CALL RAX
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x40],RCX
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x38],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x30],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x28],0x0
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x00124490
ADD RSP,0x20
POP RBP
RET
|
void inline_mysql_mutex_init
(int4 param_1,pthread_mutex_t *param_2,pthread_mutexattr_t *param_3)
{
int8 uVar1;
uVar1 = (**(code **)(PSI_server + 0x40))(param_1,param_2);
*(int8 *)((long)param_2 + 0x40) = uVar1;
*(pthread_mutex_t **)((long)param_2 + 0x38) = param_2;
*(int8 *)((long)param_2 + 0x30) = 0;
param_2[1].__align = 0;
pthread_mutex_init(param_2,param_3);
return;
}
|
|
14,687
|
ftb_climb_the_tree
|
eloqsql/storage/myisam/ft_boolean_search.c
|
static int _ftb_climb_the_tree(FTB *ftb, FTB_WORD *ftbw, FT_SEG_ITERATOR *ftsi_orig)
{
FT_SEG_ITERATOR ftsi;
FTB_EXPR *ftbe;
float weight=ftbw->weight;
int yn_flag= ftbw->flags, ythresh, mode=(ftsi_orig != 0);
my_off_t curdoc=ftbw->docid[mode];
struct st_mysql_ftparser *parser= ftb->keynr == NO_SUCH_KEY ?
&ft_default_parser :
ftb->info->s->keyinfo[ftb->keynr].parser;
for (ftbe=ftbw->up; ftbe; ftbe=ftbe->up)
{
ythresh = ftbe->ythresh - (mode ? 0 : ftbe->yweaks);
if (ftbe->docid[mode] != curdoc)
{
ftbe->cur_weight=0;
ftbe->yesses=ftbe->nos=0;
ftbe->docid[mode]=curdoc;
}
if (ftbe->nos)
break;
if (yn_flag & FTB_FLAG_YES)
{
weight /= ftbe->ythresh;
ftbe->cur_weight += weight;
if ((int) ++ftbe->yesses == ythresh)
{
yn_flag=ftbe->flags;
weight=ftbe->cur_weight*ftbe->weight;
if (mode && ftbe->phrase)
{
int found= 0;
memcpy(&ftsi, ftsi_orig, sizeof(ftsi));
while (_mi_ft_segiterator(&ftsi) && !found)
{
if (!ftsi.pos)
continue;
found= _ftb_check_phrase(ftb, ftsi.pos, ftsi.len, ftbe, parser);
if (unlikely(found < 0))
return 1;
}
if (!found)
break;
} /* ftbe->quot */
}
else
break;
}
else
if (yn_flag & FTB_FLAG_NO)
{
/*
NOTE: special sort function of queue assures that all
(yn_flag & FTB_FLAG_NO) != 0
events for every particular subexpression will
"auto-magically" happen BEFORE all the
(yn_flag & FTB_FLAG_YES) != 0 events. So no
already matched expression can become not-matched again.
*/
++ftbe->nos;
break;
}
else
{
if (ftbe->ythresh)
weight/=3;
ftbe->cur_weight += weight;
if ((int) ftbe->yesses < ythresh)
break;
if (!(yn_flag & FTB_FLAG_WONLY))
yn_flag= ((int) ftbe->yesses++ == ythresh) ? ftbe->flags : FTB_FLAG_WONLY ;
weight*= ftbe->weight;
}
}
return 0;
}
|
O0
|
c
|
ftb_climb_the_tree:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rax
movss 0x40(%rax), %xmm0
movss %xmm0, -0x4c(%rbp)
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x50(%rbp)
cmpq $0x0, -0x20(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x58(%rbp)
movq -0x18(%rbp), %rax
movslq -0x58(%rbp), %rcx
movq 0x10(%rax,%rcx,8), %rax
movq %rax, -0x60(%rbp)
movq -0x10(%rbp), %rax
cmpl $-0x1, 0x340(%rax)
jne 0xa052a
leaq 0x21fc5c(%rip), %rax # 0x2c0180
movq %rax, -0x78(%rbp)
jmp 0xa0555
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movq 0x218(%rax), %rax
movq -0x10(%rbp), %rcx
movl 0x340(%rcx), %ecx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movq 0x38(%rax), %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0xa0813
movq -0x48(%rbp), %rax
movl 0x48(%rax), %eax
movl %eax, -0x7c(%rbp)
cmpl $0x0, -0x58(%rbp)
je 0xa058a
xorl %eax, %eax
movl %eax, -0x80(%rbp)
jmp 0xa0594
movq -0x48(%rbp), %rax
movl 0x4c(%rax), %eax
movl %eax, -0x80(%rbp)
movl -0x7c(%rbp), %eax
movl -0x80(%rbp), %ecx
subl %ecx, %eax
movl %eax, -0x54(%rbp)
movq -0x48(%rbp), %rax
movslq -0x58(%rbp), %rcx
movq 0x10(%rax,%rcx,8), %rax
cmpq -0x60(%rbp), %rax
je 0xa05e5
movq -0x48(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x2c(%rax)
movq -0x48(%rbp), %rax
movl $0x0, 0x44(%rax)
movq -0x48(%rbp), %rax
movl $0x0, 0x40(%rax)
movq -0x60(%rbp), %rdx
movq -0x48(%rbp), %rax
movslq -0x58(%rbp), %rcx
movq %rdx, 0x10(%rax,%rcx,8)
movq -0x48(%rbp), %rax
cmpl $0x0, 0x44(%rax)
je 0xa05f4
jmp 0xa0813
movl -0x50(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0xa074a
movq -0x48(%rbp), %rax
movl 0x48(%rax), %eax
cvtsi2ss %rax, %xmm1
movss -0x4c(%rbp), %xmm0
divss %xmm1, %xmm0
movss %xmm0, -0x4c(%rbp)
movss -0x4c(%rbp), %xmm0
movq -0x48(%rbp), %rax
addss 0x2c(%rax), %xmm0
movss %xmm0, 0x2c(%rax)
movq -0x48(%rbp), %rcx
movl 0x40(%rcx), %eax
addl $0x1, %eax
movl %eax, 0x40(%rcx)
cmpl -0x54(%rbp), %eax
jne 0xa0740
movq -0x48(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x50(%rbp)
movq -0x48(%rbp), %rax
movss 0x2c(%rax), %xmm0
movq -0x48(%rbp), %rax
mulss 0x28(%rax), %xmm0
movss %xmm0, -0x4c(%rbp)
cmpl $0x0, -0x58(%rbp)
je 0xa073e
movq -0x48(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0xa073e
movl $0x0, -0x6c(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x40(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0x38(%rbp)
movq 0x10(%rax), %rcx
movq %rcx, -0x30(%rbp)
movq 0x18(%rax), %rax
movq %rax, -0x28(%rbp)
leaq -0x40(%rbp), %rdi
callq 0xa4440
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x81(%rbp)
je 0xa06d1
cmpl $0x0, -0x6c(%rbp)
setne %al
xorb $-0x1, %al
movb %al, -0x81(%rbp)
movb -0x81(%rbp), %al
testb $0x1, %al
jne 0xa06dd
jmp 0xa0731
cmpq $0x0, -0x28(%rbp)
jne 0xa06e6
jmp 0xa06aa
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movl -0x3c(%rbp), %edx
movq -0x48(%rbp), %rcx
movq -0x68(%rbp), %r8
callq 0xa1760
movl %eax, -0x6c(%rbp)
cmpl $0x0, -0x6c(%rbp)
setl %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0xa072c
movl $0x1, -0x4(%rbp)
jmp 0xa081a
jmp 0xa06aa
cmpl $0x0, -0x6c(%rbp)
jne 0xa073c
jmp 0xa0813
jmp 0xa073e
jmp 0xa0745
jmp 0xa0813
jmp 0xa0801
movl -0x50(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0xa0767
movq -0x48(%rbp), %rax
movl 0x44(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x44(%rax)
jmp 0xa0813
movq -0x48(%rbp), %rax
cmpl $0x0, 0x48(%rax)
je 0xa0787
movss -0x4c(%rbp), %xmm0
movss 0xb188e(%rip), %xmm1 # 0x15200c
divss %xmm1, %xmm0
movss %xmm0, -0x4c(%rbp)
movss -0x4c(%rbp), %xmm0
movq -0x48(%rbp), %rax
addss 0x2c(%rax), %xmm0
movss %xmm0, 0x2c(%rax)
movq -0x48(%rbp), %rax
movl 0x40(%rax), %eax
cmpl -0x54(%rbp), %eax
jge 0xa07a8
jmp 0xa0813
movl -0x50(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
jne 0xa07ec
movq -0x48(%rbp), %rcx
movl 0x40(%rcx), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, 0x40(%rcx)
cmpl -0x54(%rbp), %eax
jne 0xa07d6
movq -0x48(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x88(%rbp)
jmp 0xa07e3
movl $0x8, %eax
movl %eax, -0x88(%rbp)
jmp 0xa07e3
movl -0x88(%rbp), %eax
movl %eax, -0x50(%rbp)
movq -0x48(%rbp), %rax
movss 0x28(%rax), %xmm0
mulss -0x4c(%rbp), %xmm0
movss %xmm0, -0x4c(%rbp)
jmp 0xa0801
jmp 0xa0803
movq -0x48(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x48(%rbp)
jmp 0xa0568
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_ftb_climb_the_tree:
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_18]
movss xmm0, dword ptr [rax+40h]
movss [rbp+var_4C], xmm0
mov rax, [rbp+var_18]
mov eax, [rax+8]
mov [rbp+var_50], eax
cmp [rbp+var_20], 0
setnz al
and al, 1
movzx eax, al
mov [rbp+var_58], eax
mov rax, [rbp+var_18]
movsxd rcx, [rbp+var_58]
mov rax, [rax+rcx*8+10h]
mov [rbp+var_60], rax
mov rax, [rbp+var_10]
cmp dword ptr [rax+340h], 0FFFFFFFFh
jnz short loc_A052A
lea rax, ft_default_parser
mov [rbp+var_78], rax
jmp short loc_A0555
loc_A052A:
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov rax, [rax]
mov rax, [rax+218h]
mov rcx, [rbp+var_10]
mov ecx, [rcx+340h]
imul rcx, 70h ; 'p'
add rax, rcx
mov rax, [rax+38h]
mov [rbp+var_78], rax
loc_A0555:
mov rax, [rbp+var_78]
mov [rbp+var_68], rax
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rbp+var_48], rax
loc_A0568:
cmp [rbp+var_48], 0
jz loc_A0813
mov rax, [rbp+var_48]
mov eax, [rax+48h]
mov [rbp+var_7C], eax
cmp [rbp+var_58], 0
jz short loc_A058A
xor eax, eax
mov [rbp+var_80], eax
jmp short loc_A0594
loc_A058A:
mov rax, [rbp+var_48]
mov eax, [rax+4Ch]
mov [rbp+var_80], eax
loc_A0594:
mov eax, [rbp+var_7C]
mov ecx, [rbp+var_80]
sub eax, ecx
mov [rbp+var_54], eax
mov rax, [rbp+var_48]
movsxd rcx, [rbp+var_58]
mov rax, [rax+rcx*8+10h]
cmp rax, [rbp+var_60]
jz short loc_A05E5
mov rax, [rbp+var_48]
xorps xmm0, xmm0
movss dword ptr [rax+2Ch], xmm0
mov rax, [rbp+var_48]
mov dword ptr [rax+44h], 0
mov rax, [rbp+var_48]
mov dword ptr [rax+40h], 0
mov rdx, [rbp+var_60]
mov rax, [rbp+var_48]
movsxd rcx, [rbp+var_58]
mov [rax+rcx*8+10h], rdx
loc_A05E5:
mov rax, [rbp+var_48]
cmp dword ptr [rax+44h], 0
jz short loc_A05F4
jmp loc_A0813
loc_A05F4:
mov eax, [rbp+var_50]
and eax, 2
cmp eax, 0
jz loc_A074A
mov rax, [rbp+var_48]
mov eax, [rax+48h]
cvtsi2ss xmm1, rax
movss xmm0, [rbp+var_4C]
divss xmm0, xmm1
movss [rbp+var_4C], xmm0
movss xmm0, [rbp+var_4C]
mov rax, [rbp+var_48]
addss xmm0, dword ptr [rax+2Ch]
movss dword ptr [rax+2Ch], xmm0
mov rcx, [rbp+var_48]
mov eax, [rcx+40h]
add eax, 1
mov [rcx+40h], eax
cmp eax, [rbp+var_54]
jnz loc_A0740
mov rax, [rbp+var_48]
mov eax, [rax+8]
mov [rbp+var_50], eax
mov rax, [rbp+var_48]
movss xmm0, dword ptr [rax+2Ch]
mov rax, [rbp+var_48]
mulss xmm0, dword ptr [rax+28h]
movss [rbp+var_4C], xmm0
cmp [rbp+var_58], 0
jz loc_A073E
mov rax, [rbp+var_48]
cmp qword ptr [rax+30h], 0
jz loc_A073E
mov [rbp+var_6C], 0
mov rax, [rbp+var_20]
mov rcx, [rax]
mov [rbp+var_40], rcx
mov rcx, [rax+8]
mov [rbp+var_38], rcx
mov rcx, [rax+10h]
mov [rbp+var_30], rcx
mov rax, [rax+18h]
mov [rbp+var_28], rax
loc_A06AA:
lea rdi, [rbp+var_40]
call _mi_ft_segiterator
mov ecx, eax
xor eax, eax
cmp ecx, 0
mov [rbp+var_81], al
jz short loc_A06D1
cmp [rbp+var_6C], 0
setnz al
xor al, 0FFh
mov [rbp+var_81], al
loc_A06D1:
mov al, [rbp+var_81]
test al, 1
jnz short loc_A06DD
jmp short loc_A0731
loc_A06DD:
cmp [rbp+var_28], 0
jnz short loc_A06E6
jmp short loc_A06AA
loc_A06E6:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_28]
mov edx, dword ptr [rbp+var_40+4]
mov rcx, [rbp+var_48]
mov r8, [rbp+var_68]
call _ftb_check_phrase
mov [rbp+var_6C], eax
cmp [rbp+var_6C], 0
setl al
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_A072C
mov [rbp+var_4], 1
jmp loc_A081A
loc_A072C:
jmp loc_A06AA
loc_A0731:
cmp [rbp+var_6C], 0
jnz short loc_A073C
jmp loc_A0813
loc_A073C:
jmp short $+2
loc_A073E:
jmp short loc_A0745
loc_A0740:
jmp loc_A0813
loc_A0745:
jmp loc_A0801
loc_A074A:
mov eax, [rbp+var_50]
and eax, 4
cmp eax, 0
jz short loc_A0767
mov rax, [rbp+var_48]
mov ecx, [rax+44h]
add ecx, 1
mov [rax+44h], ecx
jmp loc_A0813
loc_A0767:
mov rax, [rbp+var_48]
cmp dword ptr [rax+48h], 0
jz short loc_A0787
movss xmm0, [rbp+var_4C]
movss xmm1, cs:dword_15200C
divss xmm0, xmm1
movss [rbp+var_4C], xmm0
loc_A0787:
movss xmm0, [rbp+var_4C]
mov rax, [rbp+var_48]
addss xmm0, dword ptr [rax+2Ch]
movss dword ptr [rax+2Ch], xmm0
mov rax, [rbp+var_48]
mov eax, [rax+40h]
cmp eax, [rbp+var_54]
jge short loc_A07A8
jmp short loc_A0813
loc_A07A8:
mov eax, [rbp+var_50]
and eax, 8
cmp eax, 0
jnz short loc_A07EC
mov rcx, [rbp+var_48]
mov eax, [rcx+40h]
mov edx, eax
add edx, 1
mov [rcx+40h], edx
cmp eax, [rbp+var_54]
jnz short loc_A07D6
mov rax, [rbp+var_48]
mov eax, [rax+8]
mov [rbp+var_88], eax
jmp short loc_A07E3
loc_A07D6:
mov eax, 8
mov [rbp+var_88], eax
jmp short $+2
loc_A07E3:
mov eax, [rbp+var_88]
mov [rbp+var_50], eax
loc_A07EC:
mov rax, [rbp+var_48]
movss xmm0, dword ptr [rax+28h]
mulss xmm0, [rbp+var_4C]
movss [rbp+var_4C], xmm0
jmp short $+2
loc_A0801:
jmp short $+2
loc_A0803:
mov rax, [rbp+var_48]
mov rax, [rax]
mov [rbp+var_48], rax
jmp loc_A0568
loc_A0813:
mov [rbp+var_4], 0
loc_A081A:
mov eax, [rbp+var_4]
add rsp, 90h
pop rbp
retn
|
long long ftb_climb_the_tree(long long a1, long long a2, _QWORD *a3)
{
int v3; // eax
int v4; // eax
int v6; // [rsp+8h] [rbp-88h]
char v7; // [rsp+Fh] [rbp-81h]
int v8; // [rsp+10h] [rbp-80h]
void *v9; // [rsp+18h] [rbp-78h]
int v10; // [rsp+24h] [rbp-6Ch]
long long v11; // [rsp+30h] [rbp-60h]
BOOL v12; // [rsp+38h] [rbp-58h]
int v13; // [rsp+3Ch] [rbp-54h]
int v14; // [rsp+40h] [rbp-50h]
float v15; // [rsp+44h] [rbp-4Ch]
long long *i; // [rsp+48h] [rbp-48h]
_QWORD v17[3]; // [rsp+50h] [rbp-40h] BYREF
long long v18; // [rsp+68h] [rbp-28h]
_QWORD *v19; // [rsp+70h] [rbp-20h]
long long **v20; // [rsp+78h] [rbp-18h]
long long v21; // [rsp+80h] [rbp-10h]
v21 = a1;
v20 = (long long **)a2;
v19 = a3;
v15 = *(float *)(a2 + 64);
v14 = *(_DWORD *)(a2 + 8);
v12 = a3 != 0LL;
v11 = *(_QWORD *)(a2 + 8LL * (a3 != 0LL) + 16);
if ( *(_DWORD *)(a1 + 832) == -1 )
v9 = &ft_default_parser;
else
v9 = *(void **)(112LL * *(unsigned int *)(v21 + 832) + *(_QWORD *)(**(_QWORD **)(v21 + 8) + 536LL) + 56);
for ( i = *v20; i; i = (long long *)*i )
{
if ( v12 )
v8 = 0;
else
v8 = *((_DWORD *)i + 19);
v13 = *((_DWORD *)i + 18) - v8;
if ( i[v12 + 2] != v11 )
{
*((_DWORD *)i + 11) = 0;
*((_DWORD *)i + 17) = 0;
*((_DWORD *)i + 16) = 0;
i[v12 + 2] = v11;
}
if ( *((_DWORD *)i + 17) )
break;
if ( (v14 & 2) != 0 )
{
*((float *)i + 11) = (float)(v15 / (float)*((int *)i + 18)) + *((float *)i + 11);
v3 = *((_DWORD *)i + 16) + 1;
*((_DWORD *)i + 16) = v3;
if ( v3 != v13 )
break;
v14 = *((_DWORD *)i + 2);
v15 = *((float *)i + 11) * *((float *)i + 10);
if ( v12 )
{
if ( i[6] )
{
v10 = 0;
v17[0] = *v19;
v17[1] = v19[1];
v17[2] = v19[2];
v18 = v19[3];
while ( 1 )
{
v7 = 0;
if ( (unsigned int)mi_ft_segiterator(v17) )
v7 = ~(v10 != 0);
if ( (v7 & 1) == 0 )
break;
if ( v18 )
{
v10 = ftb_check_phrase(v21, v18, HIDWORD(v17[0]), i, v9);
if ( v10 < 0 )
return 1;
}
}
if ( !v10 )
break;
}
}
}
else
{
if ( (v14 & 4) != 0 )
{
++*((_DWORD *)i + 17);
break;
}
if ( *((_DWORD *)i + 18) )
v15 = v15 / 3.0;
*((float *)i + 11) = v15 + *((float *)i + 11);
if ( *((_DWORD *)i + 16) < v13 )
break;
if ( (v14 & 8) == 0 )
{
v4 = *((_DWORD *)i + 16);
*((_DWORD *)i + 16) = v4 + 1;
if ( v4 == v13 )
v6 = *((_DWORD *)i + 2);
else
LOBYTE(v6) = 8;
LOBYTE(v14) = v6;
}
v15 = *((float *)i + 10) * v15;
}
}
return 0;
}
|
_ftb_climb_the_tree:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x18]
MOVSS XMM0,dword ptr [RAX + 0x40]
MOVSS dword ptr [RBP + -0x4c],XMM0
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x8]
MOV dword ptr [RBP + -0x50],EAX
CMP qword ptr [RBP + -0x20],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
MOV dword ptr [RBP + -0x58],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOVSXD RCX,dword ptr [RBP + -0x58]
MOV RAX,qword ptr [RAX + RCX*0x8 + 0x10]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x340],-0x1
JNZ 0x001a052a
LEA RAX,[0x3c0180]
MOV qword ptr [RBP + -0x78],RAX
JMP 0x001a0555
LAB_001a052a:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x218]
MOV RCX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RCX + 0x340]
IMUL RCX,RCX,0x70
ADD RAX,RCX
MOV RAX,qword ptr [RAX + 0x38]
MOV qword ptr [RBP + -0x78],RAX
LAB_001a0555:
MOV RAX,qword ptr [RBP + -0x78]
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x48],RAX
LAB_001a0568:
CMP qword ptr [RBP + -0x48],0x0
JZ 0x001a0813
MOV RAX,qword ptr [RBP + -0x48]
MOV EAX,dword ptr [RAX + 0x48]
MOV dword ptr [RBP + -0x7c],EAX
CMP dword ptr [RBP + -0x58],0x0
JZ 0x001a058a
XOR EAX,EAX
MOV dword ptr [RBP + -0x80],EAX
JMP 0x001a0594
LAB_001a058a:
MOV RAX,qword ptr [RBP + -0x48]
MOV EAX,dword ptr [RAX + 0x4c]
MOV dword ptr [RBP + -0x80],EAX
LAB_001a0594:
MOV EAX,dword ptr [RBP + -0x7c]
MOV ECX,dword ptr [RBP + -0x80]
SUB EAX,ECX
MOV dword ptr [RBP + -0x54],EAX
MOV RAX,qword ptr [RBP + -0x48]
MOVSXD RCX,dword ptr [RBP + -0x58]
MOV RAX,qword ptr [RAX + RCX*0x8 + 0x10]
CMP RAX,qword ptr [RBP + -0x60]
JZ 0x001a05e5
MOV RAX,qword ptr [RBP + -0x48]
XORPS XMM0,XMM0
MOVSS dword ptr [RAX + 0x2c],XMM0
MOV RAX,qword ptr [RBP + -0x48]
MOV dword ptr [RAX + 0x44],0x0
MOV RAX,qword ptr [RBP + -0x48]
MOV dword ptr [RAX + 0x40],0x0
MOV RDX,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RBP + -0x48]
MOVSXD RCX,dword ptr [RBP + -0x58]
MOV qword ptr [RAX + RCX*0x8 + 0x10],RDX
LAB_001a05e5:
MOV RAX,qword ptr [RBP + -0x48]
CMP dword ptr [RAX + 0x44],0x0
JZ 0x001a05f4
JMP 0x001a0813
LAB_001a05f4:
MOV EAX,dword ptr [RBP + -0x50]
AND EAX,0x2
CMP EAX,0x0
JZ 0x001a074a
MOV RAX,qword ptr [RBP + -0x48]
MOV EAX,dword ptr [RAX + 0x48]
CVTSI2SS XMM1,RAX
MOVSS XMM0,dword ptr [RBP + -0x4c]
DIVSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x4c],XMM0
MOVSS XMM0,dword ptr [RBP + -0x4c]
MOV RAX,qword ptr [RBP + -0x48]
ADDSS XMM0,dword ptr [RAX + 0x2c]
MOVSS dword ptr [RAX + 0x2c],XMM0
MOV RCX,qword ptr [RBP + -0x48]
MOV EAX,dword ptr [RCX + 0x40]
ADD EAX,0x1
MOV dword ptr [RCX + 0x40],EAX
CMP EAX,dword ptr [RBP + -0x54]
JNZ 0x001a0740
MOV RAX,qword ptr [RBP + -0x48]
MOV EAX,dword ptr [RAX + 0x8]
MOV dword ptr [RBP + -0x50],EAX
MOV RAX,qword ptr [RBP + -0x48]
MOVSS XMM0,dword ptr [RAX + 0x2c]
MOV RAX,qword ptr [RBP + -0x48]
MULSS XMM0,dword ptr [RAX + 0x28]
MOVSS dword ptr [RBP + -0x4c],XMM0
CMP dword ptr [RBP + -0x58],0x0
JZ 0x001a073e
MOV RAX,qword ptr [RBP + -0x48]
CMP qword ptr [RAX + 0x30],0x0
JZ 0x001a073e
MOV dword ptr [RBP + -0x6c],0x0
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RBP + -0x40],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x38],RCX
MOV RCX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x30],RCX
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x28],RAX
LAB_001a06aa:
LEA RDI,[RBP + -0x40]
CALL 0x001a4440
MOV ECX,EAX
XOR EAX,EAX
CMP ECX,0x0
MOV byte ptr [RBP + -0x81],AL
JZ 0x001a06d1
CMP dword ptr [RBP + -0x6c],0x0
SETNZ AL
XOR AL,0xff
MOV byte ptr [RBP + -0x81],AL
LAB_001a06d1:
MOV AL,byte ptr [RBP + -0x81]
TEST AL,0x1
JNZ 0x001a06dd
JMP 0x001a0731
LAB_001a06dd:
CMP qword ptr [RBP + -0x28],0x0
JNZ 0x001a06e6
JMP 0x001a06aa
LAB_001a06e6:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x28]
MOV EDX,dword ptr [RBP + -0x3c]
MOV RCX,qword ptr [RBP + -0x48]
MOV R8,qword ptr [RBP + -0x68]
CALL 0x001a1760
MOV dword ptr [RBP + -0x6c],EAX
CMP dword ptr [RBP + -0x6c],0x0
SETL AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x001a072c
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001a081a
LAB_001a072c:
JMP 0x001a06aa
LAB_001a0731:
CMP dword ptr [RBP + -0x6c],0x0
JNZ 0x001a073c
JMP 0x001a0813
LAB_001a073c:
JMP 0x001a073e
LAB_001a073e:
JMP 0x001a0745
LAB_001a0740:
JMP 0x001a0813
LAB_001a0745:
JMP 0x001a0801
LAB_001a074a:
MOV EAX,dword ptr [RBP + -0x50]
AND EAX,0x4
CMP EAX,0x0
JZ 0x001a0767
MOV RAX,qword ptr [RBP + -0x48]
MOV ECX,dword ptr [RAX + 0x44]
ADD ECX,0x1
MOV dword ptr [RAX + 0x44],ECX
JMP 0x001a0813
LAB_001a0767:
MOV RAX,qword ptr [RBP + -0x48]
CMP dword ptr [RAX + 0x48],0x0
JZ 0x001a0787
MOVSS XMM0,dword ptr [RBP + -0x4c]
MOVSS XMM1,dword ptr [0x0025200c]
DIVSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x4c],XMM0
LAB_001a0787:
MOVSS XMM0,dword ptr [RBP + -0x4c]
MOV RAX,qword ptr [RBP + -0x48]
ADDSS XMM0,dword ptr [RAX + 0x2c]
MOVSS dword ptr [RAX + 0x2c],XMM0
MOV RAX,qword ptr [RBP + -0x48]
MOV EAX,dword ptr [RAX + 0x40]
CMP EAX,dword ptr [RBP + -0x54]
JGE 0x001a07a8
JMP 0x001a0813
LAB_001a07a8:
MOV EAX,dword ptr [RBP + -0x50]
AND EAX,0x8
CMP EAX,0x0
JNZ 0x001a07ec
MOV RCX,qword ptr [RBP + -0x48]
MOV EAX,dword ptr [RCX + 0x40]
MOV EDX,EAX
ADD EDX,0x1
MOV dword ptr [RCX + 0x40],EDX
CMP EAX,dword ptr [RBP + -0x54]
JNZ 0x001a07d6
MOV RAX,qword ptr [RBP + -0x48]
MOV EAX,dword ptr [RAX + 0x8]
MOV dword ptr [RBP + -0x88],EAX
JMP 0x001a07e3
LAB_001a07d6:
MOV EAX,0x8
MOV dword ptr [RBP + -0x88],EAX
JMP 0x001a07e3
LAB_001a07e3:
MOV EAX,dword ptr [RBP + -0x88]
MOV dword ptr [RBP + -0x50],EAX
LAB_001a07ec:
MOV RAX,qword ptr [RBP + -0x48]
MOVSS XMM0,dword ptr [RAX + 0x28]
MULSS XMM0,dword ptr [RBP + -0x4c]
MOVSS dword ptr [RBP + -0x4c],XMM0
JMP 0x001a0801
LAB_001a0801:
JMP 0x001a0803
LAB_001a0803:
MOV RAX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x48],RAX
JMP 0x001a0568
LAB_001a0813:
MOV dword ptr [RBP + -0x4],0x0
LAB_001a081a:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x90
POP RBP
RET
|
int4 _ftb_climb_the_tree(long param_1,int8 *param_2,int8 *param_3)
{
long lVar1;
uint uVar2;
int iVar3;
uint local_90;
int local_88;
int1 *local_80;
int local_74;
uint local_58;
float local_54;
int8 *local_50;
int8 local_48;
int8 local_40;
int8 local_38;
long local_30;
int8 *local_28;
int8 *local_20;
long local_18;
local_54 = *(float *)(param_2 + 8);
local_58 = *(uint *)(param_2 + 1);
uVar2 = (uint)(param_3 != (int8 *)0x0);
lVar1 = param_2[(long)(int)uVar2 + 2];
if (*(int *)(param_1 + 0x340) == -1) {
local_80 = ft_default_parser;
}
else {
local_80 = *(int1 **)
(*(long *)(**(long **)(param_1 + 8) + 0x218) +
(ulong)*(uint *)(param_1 + 0x340) * 0x70 + 0x38);
}
local_50 = (int8 *)*param_2;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
do {
if (local_50 == (int8 *)0x0) {
return 0;
}
if (uVar2 == 0) {
local_88 = *(int *)((long)local_50 + 0x4c);
}
else {
local_88 = 0;
}
local_88 = *(int *)(local_50 + 9) - local_88;
if (local_50[(long)(int)uVar2 + 2] != lVar1) {
*(int4 *)((long)local_50 + 0x2c) = 0;
*(int4 *)((long)local_50 + 0x44) = 0;
*(int4 *)(local_50 + 8) = 0;
local_50[(long)(int)uVar2 + 2] = lVar1;
}
if (*(int *)((long)local_50 + 0x44) != 0) {
return 0;
}
if ((local_58 & 2) == 0) {
if ((local_58 & 4) != 0) {
*(int *)((long)local_50 + 0x44) = *(int *)((long)local_50 + 0x44) + 1;
return 0;
}
if (*(int *)(local_50 + 9) != 0) {
local_54 = local_54 / DAT_0025200c;
}
*(float *)((long)local_50 + 0x2c) = local_54 + *(float *)((long)local_50 + 0x2c);
if (*(int *)(local_50 + 8) < local_88) {
return 0;
}
if ((local_58 & 8) == 0) {
iVar3 = *(int *)(local_50 + 8);
*(int *)(local_50 + 8) = iVar3 + 1;
if (iVar3 == local_88) {
local_90 = *(uint *)(local_50 + 1);
}
else {
local_90 = 8;
}
local_58 = local_90;
}
local_54 = *(float *)(local_50 + 5) * local_54;
}
else {
*(float *)((long)local_50 + 0x2c) =
local_54 / (float)*(uint *)(local_50 + 9) + *(float *)((long)local_50 + 0x2c);
iVar3 = *(int *)(local_50 + 8);
*(int *)(local_50 + 8) = iVar3 + 1;
if (iVar3 + 1 != local_88) {
return 0;
}
local_58 = *(uint *)(local_50 + 1);
local_54 = *(float *)((long)local_50 + 0x2c) * *(float *)(local_50 + 5);
if ((uVar2 != 0) && (local_50[6] != 0)) {
local_74 = 0;
local_48 = *local_28;
local_40 = local_28[1];
local_38 = local_28[2];
local_30 = local_28[3];
while (iVar3 = _mi_ft_segiterator(&local_48), iVar3 != 0 && local_74 == 0) {
if (local_30 != 0) {
local_74 = _ftb_check_phrase(local_18,local_30,local_48._4_4_,local_50,local_80);
if (local_74 < 0) {
return 1;
}
}
}
if (local_74 == 0) {
return 0;
}
}
}
local_50 = (int8 *)*local_50;
} while( true );
}
|
|
14,688
|
js_iterator_from
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_iterator_from(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue obj, method, iter;
JSIteratorWrapData *it;
int ret;
obj = argv[0];
if (JS_IsString(obj)) {
method = JS_GetProperty(ctx, obj, JS_ATOM_Symbol_iterator);
if (JS_IsException(method))
return JS_EXCEPTION;
return JS_CallFree(ctx, method, obj, 0, NULL);
}
if (!JS_IsObject(obj))
return JS_ThrowTypeError(ctx, "Iterator.from called on non-object");
ret = JS_OrdinaryIsInstanceOf(ctx, obj, ctx->iterator_ctor);
if (ret < 0)
return JS_EXCEPTION;
if (ret)
return js_dup(obj);
method = JS_GetProperty(ctx, obj, JS_ATOM_Symbol_iterator);
if (JS_IsException(method))
return JS_EXCEPTION;
if (JS_IsNull(method) || JS_IsUndefined(method)) {
method = JS_GetProperty(ctx, obj, JS_ATOM_next);
if (JS_IsException(method))
return JS_EXCEPTION;
iter = JS_NewObjectClass(ctx, JS_CLASS_ITERATOR_WRAP);
if (JS_IsException(iter))
goto fail;
it = js_malloc(ctx, sizeof(*it));
if (!it)
goto fail;
it->wrapped_iter = js_dup(obj);
it->wrapped_next = method;
JS_SetOpaqueInternal(iter, it);
} else {
iter = JS_GetIterator2(ctx, obj, method);
JS_FreeValue(ctx, method);
if (JS_IsException(iter))
return JS_EXCEPTION;
}
return iter;
fail:
JS_FreeValue(ctx, method);
JS_FreeValue(ctx, iter);
return JS_EXCEPTION;
}
|
O1
|
c
|
js_iterator_from:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r15
movq (%r8), %rbx
movq 0x8(%r8), %r12
cmpl $-0x1, %r12d
je 0x732da
cmpl $-0x7, %r12d
jne 0x7331d
movq %r15, %rdi
movq %rbx, %rsi
movq %r12, %rdx
movl $0xd4, %ecx
movq %rbx, %r8
movq %r12, %r9
pushq $0x0
pushq $0x0
callq 0x22fa3
addq $0x10, %rsp
cmpl $0x6, %edx
jne 0x7333b
movl $0x6, %r14d
jmp 0x73460
movq 0x140(%r15), %rcx
movq 0x148(%r15), %r8
movq %r15, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x22e07
movl $0x6, %r14d
testl %eax, %eax
js 0x73460
je 0x73371
incl (%rbx)
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
andq %rbx, %rcx
movq %r12, %r14
jmp 0x73464
leaq 0x2e958(%rip), %rsi # 0xa1c7c
xorl %ebx, %ebx
movq %r15, %rdi
xorl %eax, %eax
callq 0x22567
movl $0x6, %r14d
jmp 0x73462
subq $0x8, %rsp
movq %r15, %rdi
movq %rax, %rsi
movq %rbx, %rcx
movq %r12, %r8
xorl %r9d, %r9d
pushq $0x0
callq 0x22c9d
addq $0x10, %rsp
movq %rax, %rbx
movq %rdx, %r14
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
andq %rax, %rcx
jmp 0x73464
movq %r15, %rdi
movq %rbx, %rsi
movq %r12, %rdx
movl $0xd4, %ecx
movq %rbx, %r8
movq %r12, %r9
pushq $0x0
pushq $0x0
callq 0x22fa3
addq $0x10, %rsp
movq %rax, %r13
leal -0x2(%rdx), %eax
cmpl $0x2, %eax
jae 0x73424
movq %r15, %rdi
movq %rbx, %rsi
movq %r12, %rdx
movl $0x6b, %ecx
movq %rbx, %r8
movq %r12, %r9
pushq $0x0
pushq $0x0
callq 0x22fa3
addq $0x10, %rsp
movq %rdx, %rbp
cmpl $0x6, %ebp
je 0x73460
movq %rax, 0x10(%rsp)
movq 0x40(%r15), %rax
movq 0x290(%rax), %rsi
movq 0x298(%rax), %rdx
movq %r15, %rdi
movl $0x29, %ecx
callq 0x20f05
movq %rax, 0x8(%rsp)
movq %rdx, %r13
cmpl $0x6, %r13d
jne 0x7347b
movq 0x18(%r15), %rdi
movq 0x10(%rsp), %rsi
movq %rbp, %rdx
callq 0x1d8c6
movq 0x18(%r15), %rdi
movq 0x8(%rsp), %rsi
movq %r13, %rdx
callq 0x1d8c6
jmp 0x73460
movq %rdx, %rbp
cmpl $0x6, %ebp
jne 0x73431
movl %ebp, %r14d
jmp 0x73460
movq %r15, %rdi
movq %rbx, %rsi
movq %r12, %rdx
movq %r13, %rcx
movq %rbp, %r8
callq 0x41a70
movq %rax, %rbx
movq 0x18(%r15), %rdi
movq %r13, %rsi
movq %rdx, %r13
movq %rbp, %rdx
callq 0x1d8c6
cmpl $0x6, %r13d
jne 0x734b0
xorl %ebx, %ebx
xorl %ecx, %ecx
movl %ebx, %eax
orq %rcx, %rax
movq %r14, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %esi
movq %r15, %rdi
callq 0xede6
testq %rax, %rax
je 0x73400
incl (%rbx)
movq %rbx, (%rax)
movq %r12, 0x8(%rax)
movq 0x10(%rsp), %rcx
movq %rcx, 0x10(%rax)
movq %rbp, 0x18(%rax)
movq 0x8(%rsp), %rbx
movq %rax, 0x30(%rbx)
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
andq %rbx, %rcx
movq %r13, %r14
jmp 0x73464
|
js_iterator_from:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r15, rdi
mov rbx, [r8]
mov r12, [r8+8]
cmp r12d, 0FFFFFFFFh
jz short loc_732DA
cmp r12d, 0FFFFFFF9h
jnz short loc_7331D
mov rdi, r15
mov rsi, rbx
mov rdx, r12
mov ecx, 0D4h
mov r8, rbx
mov r9, r12
push 0
push 0
call JS_GetPropertyInternal2
add rsp, 10h
cmp edx, 6
jnz short loc_7333B
mov r14d, 6
jmp loc_73460
loc_732DA:
mov rcx, [r15+140h]
mov r8, [r15+148h]
mov rdi, r15
mov rsi, rbx
mov rdx, r12
call JS_OrdinaryIsInstanceOf
mov r14d, 6
test eax, eax
js loc_73460
jz short loc_73371
inc dword ptr [rbx]
mov rcx, 0FFFFFFFF00000000h
and rcx, rbx
mov r14, r12
jmp loc_73464
loc_7331D:
lea rsi, aIteratorFromCa; "Iterator.from called on non-object"
xor ebx, ebx
mov rdi, r15
xor eax, eax
call JS_ThrowTypeError
mov r14d, 6
jmp loc_73462
loc_7333B:
sub rsp, 8
mov rdi, r15
mov rsi, rax
mov rcx, rbx
mov r8, r12
xor r9d, r9d
push 0
call JS_CallFree
add rsp, 10h
mov rbx, rax
mov r14, rdx
mov rcx, 0FFFFFFFF00000000h
and rcx, rax
jmp loc_73464
loc_73371:
mov rdi, r15
mov rsi, rbx
mov rdx, r12
mov ecx, 0D4h
mov r8, rbx
mov r9, r12
push 0
push 0
call JS_GetPropertyInternal2
add rsp, 10h
mov r13, rax
lea eax, [rdx-2]
cmp eax, 2
jnb loc_73424
mov rdi, r15
mov rsi, rbx
mov rdx, r12
mov ecx, 6Bh ; 'k'
mov r8, rbx
mov r9, r12
push 0
push 0
call JS_GetPropertyInternal2
add rsp, 10h
mov rbp, rdx
cmp ebp, 6
jz loc_73460
mov [rsp+48h+var_38], rax
mov rax, [r15+40h]
mov rsi, [rax+290h]
mov rdx, [rax+298h]
mov rdi, r15
mov ecx, 29h ; ')'
call JS_NewObjectProtoClass
mov [rsp+48h+var_40], rax
mov r13, rdx
cmp r13d, 6
jnz short loc_7347B
loc_73400:
mov rdi, [r15+18h]
mov rsi, [rsp+48h+var_38]
mov rdx, rbp
call JS_FreeValueRT
mov rdi, [r15+18h]
mov rsi, [rsp+48h+var_40]
mov rdx, r13
call JS_FreeValueRT
jmp short loc_73460
loc_73424:
mov rbp, rdx
cmp ebp, 6
jnz short loc_73431
mov r14d, ebp
jmp short loc_73460
loc_73431:
mov rdi, r15
mov rsi, rbx
mov rdx, r12
mov rcx, r13
mov r8, rbp
call JS_GetIterator2
mov rbx, rax
mov rdi, [r15+18h]
mov rsi, r13
mov r13, rdx
mov rdx, rbp
call JS_FreeValueRT
cmp r13d, 6
jnz short loc_734B0
loc_73460:
xor ebx, ebx
loc_73462:
xor ecx, ecx
loc_73464:
mov eax, ebx
or rax, rcx
mov rdx, r14
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_7347B:
mov esi, 20h ; ' '
mov rdi, r15
call js_malloc
test rax, rax
jz loc_73400
inc dword ptr [rbx]
mov [rax], rbx
mov [rax+8], r12
mov rcx, [rsp+48h+var_38]
mov [rax+10h], rcx
mov [rax+18h], rbp
mov rbx, [rsp+48h+var_40]
mov [rbx+30h], rax
loc_734B0:
mov rcx, 0FFFFFFFF00000000h
and rcx, rbx
mov r14, r13
jmp short loc_73464
|
unsigned long long js_iterator_from(
long long *a1,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
long long a10,
long long a11,
long long a12,
long long *a13,
long long a14)
{
long long Iterator2; // rbx
long long v15; // r12
_DWORD *v16; // rax
long long v17; // rdx
int IsInstanceOf; // eax
unsigned long long v19; // rcx
long long v20; // rax
long long v21; // rdx
unsigned long long PropertyInternal2; // r13
__m128 v23; // xmm4
__m128 v24; // xmm5
unsigned long long v25; // rax
long long v26; // rdx
long long v27; // rbp
long long v28; // rdx
long long v29; // r13
long long v30; // rbp
_DWORD *v31; // rsi
int v32; // edx
int v33; // r13d
_QWORD *v35; // rax
char v36; // [rsp+0h] [rbp-48h]
long long v37; // [rsp+8h] [rbp-40h]
_DWORD *v38; // [rsp+10h] [rbp-38h]
Iterator2 = *a13;
v15 = a13[1];
if ( (_DWORD)v15 == -1 )
{
IsInstanceOf = JS_OrdinaryIsInstanceOf(
(long long)a1,
Iterator2,
v15,
a1[40],
a1[41],
a2,
a3,
a4,
a5,
*(double *)a6.m128_u64,
*(double *)a7.m128_u64,
a8,
a9);
if ( IsInstanceOf < 0 )
goto LABEL_16;
if ( !IsInstanceOf )
{
PropertyInternal2 = JS_GetPropertyInternal2((long long)a1, Iterator2, v15, 0xD4u, Iterator2, v15, 0LL, 0);
if ( (unsigned int)(v21 - 2) >= 2 )
{
v30 = v21;
if ( (_DWORD)v21 == 6 )
goto LABEL_16;
Iterator2 = (long long)JS_GetIterator2(
(long long)a1,
Iterator2,
v15,
PropertyInternal2,
v21,
*(double *)a2.m128_u64,
a3,
a4,
a5,
v23,
v24,
a8,
a9);
v31 = (_DWORD *)PropertyInternal2;
v33 = v32;
JS_FreeValueRT(a1[3], v31, v30);
if ( v33 == 6 )
goto LABEL_16;
}
else
{
v25 = JS_GetPropertyInternal2((long long)a1, Iterator2, v15, 0x6Bu, Iterator2, v15, 0LL, 0);
v27 = v26;
if ( (_DWORD)v26 == 6 )
goto LABEL_16;
v38 = (_DWORD *)v25;
v37 = JS_NewObjectProtoClass((long long)a1, *(_QWORD *)(a1[8] + 656), *(_QWORD *)(a1[8] + 664), 0x29u);
v29 = v28;
if ( (_DWORD)v28 == 6 || (v35 = (_QWORD *)js_malloc((long long)a1, 32LL)) == 0LL )
{
JS_FreeValueRT(a1[3], v38, v27);
JS_FreeValueRT(a1[3], (_DWORD *)v37, v29);
goto LABEL_16;
}
++*(_DWORD *)Iterator2;
*v35 = Iterator2;
v35[1] = v15;
v35[2] = v38;
v35[3] = v27;
Iterator2 = v37;
*(_QWORD *)(v37 + 48) = v35;
}
v19 = Iterator2 & 0xFFFFFFFF00000000LL;
return v19 | (unsigned int)Iterator2;
}
++*(_DWORD *)Iterator2;
v19 = Iterator2 & 0xFFFFFFFF00000000LL;
}
else
{
if ( (_DWORD)v15 != -7 )
{
LODWORD(Iterator2) = 0;
JS_ThrowTypeError(
(long long)a1,
(long long)"Iterator.from called on non-object",
a11,
a12,
(long long)a13,
a14,
a2,
a3,
a4,
a5,
a6,
a7,
a8,
a9,
v36);
LABEL_17:
v19 = 0LL;
return v19 | (unsigned int)Iterator2;
}
v16 = (_DWORD *)JS_GetPropertyInternal2((long long)a1, *a13, v15, 0xD4u, *a13, v15, 0LL, 0);
if ( (_DWORD)v17 == 6 )
{
LABEL_16:
LODWORD(Iterator2) = 0;
goto LABEL_17;
}
v20 = JS_CallFree((long long)a1, v16, v17, Iterator2, -7, 0, 0LL);
LODWORD(Iterator2) = v20;
v19 = v20 & 0xFFFFFFFF00000000LL;
}
return v19 | (unsigned int)Iterator2;
}
|
js_iterator_from:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R15,RDI
MOV RBX,qword ptr [R8]
MOV R12,qword ptr [R8 + 0x8]
CMP R12D,-0x1
JZ 0x001732da
CMP R12D,-0x7
JNZ 0x0017331d
MOV RDI,R15
MOV RSI,RBX
MOV RDX,R12
MOV ECX,0xd4
MOV R8,RBX
MOV R9,R12
PUSH 0x0
PUSH 0x0
CALL 0x00122fa3
ADD RSP,0x10
CMP EDX,0x6
JNZ 0x0017333b
MOV R14D,0x6
JMP 0x00173460
LAB_001732da:
MOV RCX,qword ptr [R15 + 0x140]
MOV R8,qword ptr [R15 + 0x148]
MOV RDI,R15
MOV RSI,RBX
MOV RDX,R12
CALL 0x00122e07
MOV R14D,0x6
TEST EAX,EAX
JS 0x00173460
JZ 0x00173371
INC dword ptr [RBX]
MOV RCX,-0x100000000
AND RCX,RBX
MOV R14,R12
JMP 0x00173464
LAB_0017331d:
LEA RSI,[0x1a1c7c]
XOR EBX,EBX
MOV RDI,R15
XOR EAX,EAX
CALL 0x00122567
MOV R14D,0x6
JMP 0x00173462
LAB_0017333b:
SUB RSP,0x8
MOV RDI,R15
MOV RSI,RAX
MOV RCX,RBX
MOV R8,R12
XOR R9D,R9D
PUSH 0x0
CALL 0x00122c9d
ADD RSP,0x10
MOV RBX,RAX
MOV R14,RDX
MOV RCX,-0x100000000
AND RCX,RAX
JMP 0x00173464
LAB_00173371:
MOV RDI,R15
MOV RSI,RBX
MOV RDX,R12
MOV ECX,0xd4
MOV R8,RBX
MOV R9,R12
PUSH 0x0
PUSH 0x0
CALL 0x00122fa3
ADD RSP,0x10
MOV R13,RAX
LEA EAX,[RDX + -0x2]
CMP EAX,0x2
JNC 0x00173424
MOV RDI,R15
MOV RSI,RBX
MOV RDX,R12
MOV ECX,0x6b
MOV R8,RBX
MOV R9,R12
PUSH 0x0
PUSH 0x0
CALL 0x00122fa3
ADD RSP,0x10
MOV RBP,RDX
CMP EBP,0x6
JZ 0x00173460
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [R15 + 0x40]
MOV RSI,qword ptr [RAX + 0x290]
MOV RDX,qword ptr [RAX + 0x298]
MOV RDI,R15
MOV ECX,0x29
CALL 0x00120f05
MOV qword ptr [RSP + 0x8],RAX
MOV R13,RDX
CMP R13D,0x6
JNZ 0x0017347b
LAB_00173400:
MOV RDI,qword ptr [R15 + 0x18]
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,RBP
CALL 0x0011d8c6
MOV RDI,qword ptr [R15 + 0x18]
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,R13
CALL 0x0011d8c6
JMP 0x00173460
LAB_00173424:
MOV RBP,RDX
CMP EBP,0x6
JNZ 0x00173431
MOV R14D,EBP
JMP 0x00173460
LAB_00173431:
MOV RDI,R15
MOV RSI,RBX
MOV RDX,R12
MOV RCX,R13
MOV R8,RBP
CALL 0x00141a70
MOV RBX,RAX
MOV RDI,qword ptr [R15 + 0x18]
MOV RSI,R13
MOV R13,RDX
MOV RDX,RBP
CALL 0x0011d8c6
CMP R13D,0x6
JNZ 0x001734b0
LAB_00173460:
XOR EBX,EBX
LAB_00173462:
XOR ECX,ECX
LAB_00173464:
MOV EAX,EBX
OR RAX,RCX
MOV RDX,R14
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0017347b:
MOV ESI,0x20
MOV RDI,R15
CALL 0x0010ede6
TEST RAX,RAX
JZ 0x00173400
INC dword ptr [RBX]
MOV qword ptr [RAX],RBX
MOV qword ptr [RAX + 0x8],R12
MOV RCX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX + 0x10],RCX
MOV qword ptr [RAX + 0x18],RBP
MOV RBX,qword ptr [RSP + 0x8]
MOV qword ptr [RBX + 0x30],RAX
LAB_001734b0:
MOV RCX,-0x100000000
AND RCX,RBX
MOV R14,R13
JMP 0x00173464
|
int1 [16] js_iterator_from(long param_1)
{
int *piVar1;
int8 uVar2;
int iVar3;
int8 *puVar4;
int1 (*in_R8) [16];
ulong uVar6;
int1 auVar7 [16];
int1 auVar8 [16];
ulong uVar5;
piVar1 = *(int **)*in_R8;
uVar2 = *(int8 *)(*in_R8 + 8);
auVar7 = *in_R8;
if ((int)uVar2 == -1) {
iVar3 = JS_OrdinaryIsInstanceOf
(param_1,piVar1,uVar2,*(int8 *)(param_1 + 0x140),
*(int8 *)(param_1 + 0x148));
uVar6 = 6;
if (-1 < iVar3) {
if (iVar3 != 0) {
*piVar1 = *piVar1 + 1;
uVar6 = (ulong)piVar1 & 0xffffffff00000000;
goto LAB_00173464;
}
auVar8 = JS_GetPropertyInternal2(param_1,piVar1,uVar2,0xd4,piVar1,uVar2,0,0);
uVar5 = auVar8._8_8_;
if (auVar8._8_4_ - 2U < 2) {
auVar8 = JS_GetPropertyInternal2(param_1,piVar1,uVar2,0x6b,piVar1,uVar2,0,0);
if (auVar8._8_4_ != 6) {
auVar7 = JS_NewObjectProtoClass
(param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0x290),
*(int8 *)(*(long *)(param_1 + 0x40) + 0x298),0x29);
if ((auVar7._8_4_ != 6) &&
(puVar4 = (int8 *)js_malloc(param_1,0x20), puVar4 != (int8 *)0x0)) {
*piVar1 = *piVar1 + 1;
*puVar4 = piVar1;
puVar4[1] = uVar2;
*(int1 (*) [16])(puVar4 + 2) = auVar8;
*(int8 **)(auVar7._0_8_ + 0x30) = puVar4;
LAB_001734b0:
uVar6 = auVar7._0_8_ & 0xffffffff00000000;
goto LAB_00173464;
}
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar8._0_8_,auVar8._8_8_);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar7._0_8_,auVar7._8_8_);
}
}
else if (auVar8._8_4_ == 6) {
uVar6 = uVar5 & 0xffffffff;
}
else {
auVar7 = JS_GetIterator2(param_1,piVar1,uVar2,auVar8._0_8_,uVar5);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar8._0_8_,uVar5);
if (auVar7._8_4_ != 6) goto LAB_001734b0;
}
}
}
else if ((int)uVar2 == -7) {
auVar7 = JS_GetPropertyInternal2(param_1,piVar1,uVar2,0xd4,piVar1,uVar2,0,0);
if (auVar7._8_4_ != 6) {
auVar7 = JS_CallFree(param_1,auVar7._0_8_,auVar7._8_8_,piVar1,uVar2,0,0);
uVar6 = auVar7._0_8_ & 0xffffffff00000000;
goto LAB_00173464;
}
uVar6 = 6;
}
else {
JS_ThrowTypeError(param_1,"Iterator.from called on non-object");
uVar6 = 6;
}
auVar7._8_8_ = 0;
auVar7._0_8_ = uVar6;
auVar7 = auVar7 << 0x40;
uVar6 = 0;
LAB_00173464:
auVar8._0_8_ = auVar7._0_8_ & 0xffffffff | uVar6;
auVar8._8_8_ = auVar7._8_8_;
return auVar8;
}
|
|
14,689
|
js_iterator_from
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_iterator_from(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue obj, method, iter;
JSIteratorWrapData *it;
int ret;
obj = argv[0];
if (JS_IsString(obj)) {
method = JS_GetProperty(ctx, obj, JS_ATOM_Symbol_iterator);
if (JS_IsException(method))
return JS_EXCEPTION;
return JS_CallFree(ctx, method, obj, 0, NULL);
}
if (!JS_IsObject(obj))
return JS_ThrowTypeError(ctx, "Iterator.from called on non-object");
ret = JS_OrdinaryIsInstanceOf(ctx, obj, ctx->iterator_ctor);
if (ret < 0)
return JS_EXCEPTION;
if (ret)
return js_dup(obj);
method = JS_GetProperty(ctx, obj, JS_ATOM_Symbol_iterator);
if (JS_IsException(method))
return JS_EXCEPTION;
if (JS_IsNull(method) || JS_IsUndefined(method)) {
method = JS_GetProperty(ctx, obj, JS_ATOM_next);
if (JS_IsException(method))
return JS_EXCEPTION;
iter = JS_NewObjectClass(ctx, JS_CLASS_ITERATOR_WRAP);
if (JS_IsException(iter))
goto fail;
it = js_malloc(ctx, sizeof(*it));
if (!it)
goto fail;
it->wrapped_iter = js_dup(obj);
it->wrapped_next = method;
JS_SetOpaqueInternal(iter, it);
} else {
iter = JS_GetIterator2(ctx, obj, method);
JS_FreeValue(ctx, method);
if (JS_IsException(iter))
return JS_EXCEPTION;
}
return iter;
fail:
JS_FreeValue(ctx, method);
JS_FreeValue(ctx, iter);
return JS_EXCEPTION;
}
|
O2
|
c
|
js_iterator_from:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r15
movq (%r8), %rbx
movq 0x8(%r8), %r12
cmpl $-0x1, %r12d
je 0x60ead
cmpl $-0x7, %r12d
jne 0x60eee
movq %r15, %rdi
movq %rbx, %rsi
movq %r12, %rdx
movl $0xd4, %ecx
callq 0x1b043
cmpl $0x6, %edx
jne 0x60f0a
pushq $0x6
popq %r14
jmp 0x61032
movq 0x140(%r15), %rcx
movq 0x148(%r15), %r8
movq %r15, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x1ceba
pushq $0x6
popq %r14
testl %eax, %eax
js 0x61032
je 0x60f3b
incl (%rbx)
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
andq %rbx, %rcx
movq %r12, %r14
jmp 0x61036
leaq 0x27cc1(%rip), %rsi # 0x88bb6
xorl %ebx, %ebx
movq %r15, %rdi
xorl %eax, %eax
callq 0x1c64d
pushq $0x6
popq %r14
jmp 0x61034
andq $0x0, (%rsp)
movq %r15, %rdi
movq %rax, %rsi
movq %rbx, %rcx
movq %r12, %r8
xorl %r9d, %r9d
callq 0x1cd8e
movq %rax, %rbx
movq %rdx, %r14
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
andq %rax, %rcx
jmp 0x61036
movq %r15, %rdi
movq %rbx, %rsi
movq %r12, %rdx
movl $0xd4, %ecx
callq 0x1b043
movq %rax, %r13
leal -0x2(%rdx), %eax
cmpl $0x2, %eax
jae 0x60fc5
pushq $0x6b
popq %rcx
movq %r15, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x1b043
movq %rdx, %rbp
cmpl $0x6, %ebp
je 0x61032
movq %rax, 0x8(%rsp)
pushq $0x29
popq %rsi
movq %r15, %rdi
callq 0x1b297
movq %rax, 0x10(%rsp)
movq %rdx, %r13
cmpl $0x6, %r13d
je 0x61012
pushq $0x20
popq %rsi
movq %r15, %rdi
callq 0x17214
testq %rax, %rax
je 0x61012
incl (%rbx)
movq %rbx, (%rax)
movq %r12, 0x8(%rax)
movq 0x8(%rsp), %rcx
movq %rcx, 0x10(%rax)
movq %rbp, 0x18(%rax)
movq 0x10(%rsp), %rbx
movq %rax, 0x30(%rbx)
jmp 0x61000
movq %rdx, %rbp
cmpl $0x6, %ebp
jne 0x60fd2
movl %ebp, %r14d
jmp 0x61032
movq %r15, %rdi
movq %rbx, %rsi
movq %r12, %rdx
movq %r13, %rcx
movq %rbp, %r8
callq 0x3987d
movq %rax, %rbx
movq %r15, %rdi
movq %r13, %rsi
movq %rdx, %r13
movq %rbp, %rdx
callq 0x1801e
cmpl $0x6, %r13d
je 0x61032
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
andq %rbx, %rcx
movq %r13, %r14
jmp 0x61036
movq %r15, %rdi
movq 0x8(%rsp), %rsi
movq %rbp, %rdx
callq 0x1801e
movq %r15, %rdi
movq 0x10(%rsp), %rsi
movq %r13, %rdx
callq 0x1801e
xorl %ebx, %ebx
xorl %ecx, %ecx
movl %ebx, %eax
orq %rcx, %rax
movq %r14, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
js_iterator_from:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r15, rdi
mov rbx, [r8]
mov r12, [r8+8]
cmp r12d, 0FFFFFFFFh
jz short loc_60EAD
cmp r12d, 0FFFFFFF9h
jnz short loc_60EEE
mov rdi, r15
mov rsi, rbx
mov rdx, r12
mov ecx, 0D4h
call JS_GetProperty
cmp edx, 6
jnz short loc_60F0A
push 6
pop r14
jmp loc_61032
loc_60EAD:
mov rcx, [r15+140h]
mov r8, [r15+148h]
mov rdi, r15
mov rsi, rbx
mov rdx, r12
call JS_OrdinaryIsInstanceOf
push 6
pop r14
test eax, eax
js loc_61032
jz short loc_60F3B
inc dword ptr [rbx]
mov rcx, 0FFFFFFFF00000000h
and rcx, rbx
mov r14, r12
jmp loc_61036
loc_60EEE:
lea rsi, aIteratorFromCa; "Iterator.from called on non-object"
xor ebx, ebx
mov rdi, r15
xor eax, eax
call JS_ThrowTypeError
push 6
pop r14
jmp loc_61034
loc_60F0A:
and [rsp+48h+var_48], 0
mov rdi, r15
mov rsi, rax
mov rcx, rbx
mov r8, r12
xor r9d, r9d
call JS_CallFree
mov rbx, rax
mov r14, rdx
mov rcx, 0FFFFFFFF00000000h
and rcx, rax
jmp loc_61036
loc_60F3B:
mov rdi, r15
mov rsi, rbx
mov rdx, r12
mov ecx, 0D4h
call JS_GetProperty
mov r13, rax
lea eax, [rdx-2]
cmp eax, 2
jnb short loc_60FC5
push 6Bh ; 'k'
pop rcx
mov rdi, r15
mov rsi, rbx
mov rdx, r12
call JS_GetProperty
mov rbp, rdx
cmp ebp, 6
jz loc_61032
mov [rsp+48h+var_40], rax
push 29h ; ')'
pop rsi
mov rdi, r15
call JS_NewObjectClass
mov [rsp+48h+var_38], rax
mov r13, rdx
cmp r13d, 6
jz short loc_61012
push 20h ; ' '
pop rsi
mov rdi, r15
call js_malloc
test rax, rax
jz short loc_61012
inc dword ptr [rbx]
mov [rax], rbx
mov [rax+8], r12
mov rcx, [rsp+48h+var_40]
mov [rax+10h], rcx
mov [rax+18h], rbp
mov rbx, [rsp+48h+var_38]
mov [rbx+30h], rax
jmp short loc_61000
loc_60FC5:
mov rbp, rdx
cmp ebp, 6
jnz short loc_60FD2
mov r14d, ebp
jmp short loc_61032
loc_60FD2:
mov rdi, r15
mov rsi, rbx
mov rdx, r12
mov rcx, r13
mov r8, rbp
call JS_GetIterator2
mov rbx, rax
mov rdi, r15
mov rsi, r13
mov r13, rdx
mov rdx, rbp
call JS_FreeValue
cmp r13d, 6
jz short loc_61032
loc_61000:
mov rcx, 0FFFFFFFF00000000h
and rcx, rbx
mov r14, r13
jmp short loc_61036
loc_61012:
mov rdi, r15
mov rsi, [rsp+48h+var_40]
mov rdx, rbp
call JS_FreeValue
mov rdi, r15
mov rsi, [rsp+48h+var_38]
mov rdx, r13
call JS_FreeValue
loc_61032:
xor ebx, ebx
loc_61034:
xor ecx, ecx
loc_61036:
mov eax, ebx
or rax, rcx
mov rdx, r14
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
unsigned long long js_iterator_from(
long long a1,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
long long a10,
long long a11,
long long a12,
long long *a13,
long long a14)
{
long long Iterator2; // rbx
long long v15; // r12
long long v16; // rax
long long v17; // rdx
int IsInstanceOf; // eax
unsigned long long v19; // rcx
long long v20; // rax
long long v21; // rdx
long long Property; // r13
double v23; // xmm4_8
double v24; // xmm5_8
long long v25; // rax
long long v26; // rdx
long long v27; // rbp
long long v28; // rdx
long long v29; // r13
_QWORD *v30; // rax
long long v31; // rbp
long long v32; // rsi
int v33; // edx
int v34; // r13d
char v36; // [rsp+0h] [rbp-48h]
long long v37; // [rsp+8h] [rbp-40h]
long long v38; // [rsp+10h] [rbp-38h]
Iterator2 = *a13;
v15 = a13[1];
if ( (_DWORD)v15 == -1 )
{
IsInstanceOf = JS_OrdinaryIsInstanceOf(
a1,
Iterator2,
v15,
*(_QWORD *)(a1 + 320),
*(_QWORD *)(a1 + 328),
a2,
a3,
a4,
a5,
*(double *)a6.m128_u64,
*(double *)a7.m128_u64,
a8,
a9);
if ( IsInstanceOf < 0 )
goto LABEL_19;
if ( IsInstanceOf )
{
++*(_DWORD *)Iterator2;
v19 = Iterator2 & 0xFFFFFFFF00000000LL;
}
else
{
Property = JS_GetProperty(a1, Iterator2, -1, 212);
if ( (unsigned int)(v21 - 2) >= 2 )
{
v31 = v21;
if ( (_DWORD)v21 == 6 )
goto LABEL_19;
Iterator2 = JS_GetIterator2(a1, Iterator2, -1, Property, v21, a2, a3, a4, a5, v23, v24, a8, a9);
v32 = Property;
v34 = v33;
JS_FreeValue(a1, v32, v31);
if ( v34 == 6 )
goto LABEL_19;
}
else
{
v25 = JS_GetProperty(a1, Iterator2, -1, 107);
v27 = v26;
if ( (_DWORD)v26 == 6 )
goto LABEL_19;
v37 = v25;
v38 = JS_NewObjectClass(a1, 41);
v29 = v28;
if ( (_DWORD)v28 == 6 || (v30 = (_QWORD *)js_malloc(a1, 32LL)) == 0LL )
{
JS_FreeValue(a1, v37, v27);
JS_FreeValue(a1, v38, v29);
goto LABEL_19;
}
++*(_DWORD *)Iterator2;
*v30 = Iterator2;
v30[1] = v15;
v30[2] = v37;
v30[3] = v27;
Iterator2 = v38;
*(_QWORD *)(v38 + 48) = v30;
}
v19 = Iterator2 & 0xFFFFFFFF00000000LL;
}
}
else
{
if ( (_DWORD)v15 != -7 )
{
LODWORD(Iterator2) = 0;
JS_ThrowTypeError(
a1,
(long long)"Iterator.from called on non-object",
a11,
a12,
(long long)a13,
a14,
a2,
a3,
a4,
a5,
a6,
a7,
a8,
a9,
v36);
LABEL_20:
v19 = 0LL;
return v19 | (unsigned int)Iterator2;
}
v16 = JS_GetProperty(a1, *a13, -7, 212);
if ( (_DWORD)v17 == 6 )
{
LABEL_19:
LODWORD(Iterator2) = 0;
goto LABEL_20;
}
v20 = JS_CallFree(a1, v16, v17, Iterator2, -7, 0, 0LL);
LODWORD(Iterator2) = v20;
v19 = v20 & 0xFFFFFFFF00000000LL;
}
return v19 | (unsigned int)Iterator2;
}
|
js_iterator_from:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R15,RDI
MOV RBX,qword ptr [R8]
MOV R12,qword ptr [R8 + 0x8]
CMP R12D,-0x1
JZ 0x00160ead
CMP R12D,-0x7
JNZ 0x00160eee
MOV RDI,R15
MOV RSI,RBX
MOV RDX,R12
MOV ECX,0xd4
CALL 0x0011b043
CMP EDX,0x6
JNZ 0x00160f0a
PUSH 0x6
POP R14
JMP 0x00161032
LAB_00160ead:
MOV RCX,qword ptr [R15 + 0x140]
MOV R8,qword ptr [R15 + 0x148]
MOV RDI,R15
MOV RSI,RBX
MOV RDX,R12
CALL 0x0011ceba
PUSH 0x6
POP R14
TEST EAX,EAX
JS 0x00161032
JZ 0x00160f3b
INC dword ptr [RBX]
MOV RCX,-0x100000000
AND RCX,RBX
MOV R14,R12
JMP 0x00161036
LAB_00160eee:
LEA RSI,[0x188bb6]
XOR EBX,EBX
MOV RDI,R15
XOR EAX,EAX
CALL 0x0011c64d
PUSH 0x6
POP R14
JMP 0x00161034
LAB_00160f0a:
AND qword ptr [RSP],0x0
MOV RDI,R15
MOV RSI,RAX
MOV RCX,RBX
MOV R8,R12
XOR R9D,R9D
CALL 0x0011cd8e
MOV RBX,RAX
MOV R14,RDX
MOV RCX,-0x100000000
AND RCX,RAX
JMP 0x00161036
LAB_00160f3b:
MOV RDI,R15
MOV RSI,RBX
MOV RDX,R12
MOV ECX,0xd4
CALL 0x0011b043
MOV R13,RAX
LEA EAX,[RDX + -0x2]
CMP EAX,0x2
JNC 0x00160fc5
PUSH 0x6b
POP RCX
MOV RDI,R15
MOV RSI,RBX
MOV RDX,R12
CALL 0x0011b043
MOV RBP,RDX
CMP EBP,0x6
JZ 0x00161032
MOV qword ptr [RSP + 0x8],RAX
PUSH 0x29
POP RSI
MOV RDI,R15
CALL 0x0011b297
MOV qword ptr [RSP + 0x10],RAX
MOV R13,RDX
CMP R13D,0x6
JZ 0x00161012
PUSH 0x20
POP RSI
MOV RDI,R15
CALL 0x00117214
TEST RAX,RAX
JZ 0x00161012
INC dword ptr [RBX]
MOV qword ptr [RAX],RBX
MOV qword ptr [RAX + 0x8],R12
MOV RCX,qword ptr [RSP + 0x8]
MOV qword ptr [RAX + 0x10],RCX
MOV qword ptr [RAX + 0x18],RBP
MOV RBX,qword ptr [RSP + 0x10]
MOV qword ptr [RBX + 0x30],RAX
JMP 0x00161000
LAB_00160fc5:
MOV RBP,RDX
CMP EBP,0x6
JNZ 0x00160fd2
MOV R14D,EBP
JMP 0x00161032
LAB_00160fd2:
MOV RDI,R15
MOV RSI,RBX
MOV RDX,R12
MOV RCX,R13
MOV R8,RBP
CALL 0x0013987d
MOV RBX,RAX
MOV RDI,R15
MOV RSI,R13
MOV R13,RDX
MOV RDX,RBP
CALL 0x0011801e
CMP R13D,0x6
JZ 0x00161032
LAB_00161000:
MOV RCX,-0x100000000
AND RCX,RBX
MOV R14,R13
JMP 0x00161036
LAB_00161012:
MOV RDI,R15
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,RBP
CALL 0x0011801e
MOV RDI,R15
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,R13
CALL 0x0011801e
LAB_00161032:
XOR EBX,EBX
LAB_00161034:
XOR ECX,ECX
LAB_00161036:
MOV EAX,EBX
OR RAX,RCX
MOV RDX,R14
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16] js_iterator_from(long param_1)
{
int *piVar1;
int8 uVar2;
int iVar3;
int8 *puVar4;
ulong uVar5;
int1 (*in_R8) [16];
int1 auVar7 [16];
int1 auVar8 [16];
ulong uVar6;
piVar1 = *(int **)*in_R8;
uVar2 = *(int8 *)(*in_R8 + 8);
auVar7 = *in_R8;
if ((int)uVar2 == -1) {
iVar3 = JS_OrdinaryIsInstanceOf
(param_1,piVar1,uVar2,*(int8 *)(param_1 + 0x140),
*(int8 *)(param_1 + 0x148));
uVar5 = 6;
if (-1 < iVar3) {
if (iVar3 != 0) {
*piVar1 = *piVar1 + 1;
uVar5 = (ulong)piVar1 & 0xffffffff00000000;
goto LAB_00161036;
}
auVar8 = JS_GetProperty(param_1,piVar1,uVar2,0xd4);
uVar6 = auVar8._8_8_;
if (auVar8._8_4_ - 2U < 2) {
auVar8 = JS_GetProperty(param_1,piVar1,uVar2,0x6b);
if (auVar8._8_4_ != 6) {
auVar7 = JS_NewObjectClass(param_1,0x29);
if ((auVar7._8_4_ != 6) &&
(puVar4 = (int8 *)js_malloc(param_1,0x20), puVar4 != (int8 *)0x0)) {
*piVar1 = *piVar1 + 1;
*puVar4 = piVar1;
puVar4[1] = uVar2;
*(int1 (*) [16])(puVar4 + 2) = auVar8;
*(int8 **)(auVar7._0_8_ + 0x30) = puVar4;
LAB_00161000:
uVar5 = auVar7._0_8_ & 0xffffffff00000000;
goto LAB_00161036;
}
JS_FreeValue(param_1,auVar8._0_8_,auVar8._8_8_);
JS_FreeValue(param_1,auVar7._0_8_,auVar7._8_8_);
}
}
else if (auVar8._8_4_ == 6) {
uVar5 = uVar6 & 0xffffffff;
}
else {
auVar7 = JS_GetIterator2(param_1,piVar1,uVar2,auVar8._0_8_,uVar6);
JS_FreeValue(param_1,auVar8._0_8_,uVar6);
if (auVar7._8_4_ != 6) goto LAB_00161000;
}
}
}
else if ((int)uVar2 == -7) {
auVar7 = JS_GetProperty(param_1,piVar1,uVar2,0xd4);
if (auVar7._8_4_ != 6) {
auVar7 = JS_CallFree(param_1,auVar7._0_8_,auVar7._8_8_,piVar1,uVar2,0,0);
uVar5 = auVar7._0_8_ & 0xffffffff00000000;
goto LAB_00161036;
}
uVar5 = 6;
}
else {
JS_ThrowTypeError(param_1,"Iterator.from called on non-object");
uVar5 = 6;
}
auVar7._8_8_ = 0;
auVar7._0_8_ = uVar5;
auVar7 = auVar7 << 0x40;
uVar5 = 0;
LAB_00161036:
auVar8._0_8_ = auVar7._0_8_ & 0xffffffff | uVar5;
auVar8._8_8_ = auVar7._8_8_;
return auVar8;
}
|
|
14,690
|
tbb::detail::r1::arena_slot::lock_task_pool()
|
aimrt_mujoco_sim/_deps/tbb-src/src/tbb/arena_slot.h
|
d1::task** lock_task_pool() {
d1::task** victim_task_pool;
for ( atomic_backoff backoff;; /*backoff pause embedded in the loop*/) {
victim_task_pool = task_pool.load(std::memory_order_relaxed);
// Microbenchmarks demonstrated that aborting stealing attempt when the
// victim's task pool is locked degrade performance.
// NOTE: Do not use comparison of head and tail indices to check for
// the presence of work in the victim's task pool, as they may give
// incorrect indication because of task pool relocations and resizes.
if (victim_task_pool == EmptyTaskPool) {
break;
}
d1::task** expected = victim_task_pool;
if (victim_task_pool != LockedTaskPool && task_pool.compare_exchange_strong(expected, LockedTaskPool) ) {
// We've locked victim's task pool
break;
}
// Someone else acquired a lock, so pause and do exponential backoff.
backoff.pause();
}
__TBB_ASSERT(victim_task_pool == EmptyTaskPool ||
(task_pool.load(std::memory_order_relaxed) == LockedTaskPool &&
victim_task_pool != LockedTaskPool), "not really locked victim's task pool?");
return victim_task_pool;
}
|
O3
|
c
|
tbb::detail::r1::arena_slot::lock_task_pool():
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x1, %r14d
movq $-0x1, %r15
movq 0x8(%rbx), %rcx
cmpq $-0x1, %rcx
je 0x21e3ed
testq %rcx, %rcx
je 0x21e411
movq %rcx, %rax
lock
cmpxchgq %r15, 0x8(%rbx)
je 0x21e411
cmpl $0x10, %r14d
jle 0x21e3fa
callq 0x93870
jmp 0x21e3d3
testl %r14d, %r14d
jle 0x21e40c
leal 0x1(%r14), %eax
pause
decl %eax
cmpl $0x1, %eax
ja 0x21e403
addl %r14d, %r14d
jmp 0x21e3d3
movq %rcx, %rax
popq %rbx
popq %r14
popq %r15
retq
nop
|
_ZN3tbb6detail2r110arena_slot14lock_task_poolEv:
push r15
push r14
push rbx
mov rbx, rdi
mov r14d, 1
mov r15, 0FFFFFFFFFFFFFFFFh
loc_21E3D3:
mov rcx, [rbx+8]
cmp rcx, 0FFFFFFFFFFFFFFFFh
jz short loc_21E3ED
test rcx, rcx
jz short loc_21E411
mov rax, rcx
lock cmpxchg [rbx+8], r15
jz short loc_21E411
loc_21E3ED:
cmp r14d, 10h
jle short loc_21E3FA
call _sched_yield
jmp short loc_21E3D3
loc_21E3FA:
test r14d, r14d
jle short loc_21E40C
lea eax, [r14+1]
loc_21E403:
pause
dec eax
cmp eax, 1
ja short loc_21E403
loc_21E40C:
add r14d, r14d
jmp short loc_21E3D3
loc_21E411:
mov rax, rcx
pop rbx
pop r14
pop r15
retn
|
long long tbb::detail::r1::arena_slot::lock_task_pool(tbb::detail::r1::arena_slot *this, long long a2)
{
int v2; // r14d
signed long long v3; // rcx
unsigned int v4; // eax
v2 = 1;
while ( 1 )
{
v3 = *((_QWORD *)this + 1);
if ( v3 != -1 && (!v3 || v3 == _InterlockedCompareExchange64((volatile signed long long *)this + 1, -1LL, v3)) )
break;
if ( v2 <= 16 )
{
if ( v2 > 0 )
{
v4 = v2 + 1;
do
{
_mm_pause();
--v4;
}
while ( v4 > 1 );
}
v2 *= 2;
}
else
{
sched_yield(this, a2);
}
}
return v3;
}
|
next<7ul>:
MOV RCX,qword ptr [RDI]
MOV RAX,qword ptr [RCX]
MOV RSI,qword ptr [RCX + 0x8]
LEA RDX,[RAX + 0x58]
CMP RSI,RDX
JZ 0x0021e3f8
ADD RSI,0x10
LAB_0021e3d5:
CMP qword ptr [RSI + -0x8],0x0
JNZ 0x0021e416
MOV qword ptr [RCX + 0x8],RSI
MOV RDX,qword ptr [RDI]
MOV RAX,qword ptr [RDX]
LEA R8,[RAX + 0x58]
LEA R9,[RSI + 0x10]
CMP RSI,R8
MOV RSI,R9
JNZ 0x0021e3d5
JMP 0x0021e3fb
LAB_0021e3f8:
MOV RDX,RCX
LAB_0021e3fb:
ADD RAX,0x58
CMP byte ptr [RDX + 0x20],0x1
JNZ 0x0021e409
MOV byte ptr [RDX + 0x18],0x0
LAB_0021e409:
MOV qword ptr [RDX + 0x8],RAX
MOV byte ptr [RDX + 0x20],0x8
JMP 0x0021e418
LAB_0021e416:
RET
|
/* void
boost::beast::buffers_cat_view<boost::beast::detail::buffers_ref<boost::beast::buffers_cat_view<boost::asio::const_buffer,
boost::asio::const_buffer, boost::asio::const_buffer,
boost::beast::http::basic_fields<std::allocator<char> >::writer::field_range,
boost::beast::http::chunk_crlf> >, boost::beast::http::detail::chunk_size,
boost::asio::const_buffer, boost::beast::http::chunk_crlf, boost::asio::const_buffer,
boost::beast::http::chunk_crlf, boost::asio::const_buffer, boost::asio::const_buffer,
boost::beast::http::chunk_crlf>::const_iterator::increment::next<7ul>(std::integral_constant<unsigned
long, 7ul>) */
void boost::beast::
buffers_cat_view<boost::beast::detail::buffers_ref<boost::beast::buffers_cat_view<boost::asio::const_buffer,boost::asio::const_buffer,boost::asio::const_buffer,boost::beast::http::basic_fields<std::allocator<char>>::writer::field_range,boost::beast::http::chunk_crlf>>,boost::beast::http::detail::chunk_size,boost::asio::const_buffer,boost::beast::http::chunk_crlf,boost::asio::const_buffer,boost::beast::http::chunk_crlf,boost::asio::const_buffer,boost::asio::const_buffer,boost::beast::http::chunk_crlf>
::const_iterator::increment::next<7ul>(long *param_1)
{
long *plVar1;
long lVar2;
long lVar3;
long *plVar4;
long lVar5;
plVar1 = (long *)*param_1;
lVar3 = *plVar1;
lVar2 = plVar1[1];
plVar4 = plVar1;
if (lVar2 != lVar3 + 0x58) {
do {
lVar5 = lVar2 + 0x10;
if (*(long *)(lVar2 + 8) != 0) {
return;
}
plVar1[1] = lVar5;
plVar4 = (long *)*param_1;
lVar3 = *plVar4;
lVar2 = lVar5;
} while (lVar5 != lVar3 + 0x58);
}
if ((char)plVar4[4] == '\x01') {
*(int1 *)(plVar4 + 3) = 0;
}
plVar4[1] = lVar3 + 0x58;
*(int1 *)(plVar4 + 4) = 8;
next<8ul>();
return;
}
|
|
14,691
|
ring_buffer<int>::rat(unsigned long) const
|
monkey531[P]llama/common/sampling.cpp
|
const T & rat(size_t i) const {
if (i >= sz) {
throw std::runtime_error("ring buffer: index out of bounds");
}
return data[(first + sz - i - 1) % capacity];
}
|
O0
|
cpp
|
ring_buffer<int>::rat(unsigned long) const:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq 0x30(%rsp), %rcx
movq %rcx, 0x10(%rsp)
movq 0x28(%rsp), %rax
cmpq 0x8(%rcx), %rax
jb 0x1cbf48
movl $0x10, %edi
callq 0x5a710
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x8(%rsp)
leaq 0x51d86(%rip), %rsi # 0x21dc95
callq 0x5a4c0
jmp 0x1cbf16
movq 0x8(%rsp), %rdi
movq 0xde086(%rip), %rsi # 0x2a9fa8
movq 0xde03f(%rip), %rdx # 0x2a9f68
callq 0x5abb0
movq 0x8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
callq 0x5b0e0
jmp 0x1cbf77
movq 0x10(%rsp), %rcx
movq %rcx, %rdi
addq $0x20, %rdi
movq 0x10(%rcx), %rax
addq 0x8(%rcx), %rax
subq 0x28(%rsp), %rax
subq $0x1, %rax
xorl %edx, %edx
divq (%rcx)
movq %rdx, %rsi
callq 0xef040
addq $0x38, %rsp
retq
movq 0x20(%rsp), %rdi
callq 0x5ac70
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
|
_ZNK11ring_bufferIiE3ratEm:
sub rsp, 38h
mov [rsp+38h+var_8], rdi
mov [rsp+38h+var_10], rsi
mov rcx, [rsp+38h+var_8]
mov [rsp+38h+var_28], rcx
mov rax, [rsp+38h+var_10]
cmp rax, [rcx+8]
jb short loc_1CBF48
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rdi, rax; this
mov rax, rdi
mov [rsp+38h+var_30], rax
lea rsi, aRingBufferInde; "ring buffer: index out of bounds"
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short $+2
loc_1CBF16:
mov rdi, [rsp+38h+var_30]; void *
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
call ___cxa_throw
mov rdi, [rsp+38h+var_30]; void *
mov rcx, rax
mov eax, edx
mov [rsp+38h+var_18], rcx
mov [rsp+38h+var_1C], eax
call ___cxa_free_exception
jmp short loc_1CBF77
loc_1CBF48:
mov rcx, [rsp+38h+var_28]
mov rdi, rcx
add rdi, 20h ; ' '
mov rax, [rcx+10h]
add rax, [rcx+8]
sub rax, [rsp+38h+var_10]
sub rax, 1
xor edx, edx
div qword ptr [rcx]
mov rsi, rdx
call _ZNKSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong)
add rsp, 38h
retn
loc_1CBF77:
mov rdi, [rsp+38h+var_18]
call __Unwind_Resume
|
long long ring_buffer<int>::rat(_QWORD *a1, unsigned long long a2)
{
std::runtime_error *exception; // [rsp+8h] [rbp-30h]
if ( a2 >= a1[1] )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "ring buffer: index out of bounds");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
return std::vector<int>::operator[](a1 + 4, (a1[1] + a1[2] - a2 - 1) % *a1);
}
| |||
14,692
|
ring_buffer<int>::rat(unsigned long) const
|
monkey531[P]llama/common/sampling.cpp
|
const T & rat(size_t i) const {
if (i >= sz) {
throw std::runtime_error("ring buffer: index out of bounds");
}
return data[(first + sz - i - 1) % capacity];
}
|
O2
|
cpp
|
ring_buffer<int>::rat(unsigned long) const:
pushq %r14
pushq %rbx
pushq %rax
movq 0x8(%rdi), %rax
cmpq %rsi, %rax
jbe 0x9c214
notq %rsi
addq %rsi, %rax
addq 0x10(%rdi), %rax
xorl %edx, %edx
divq (%rdi)
leaq (,%rdx,4), %rax
addq 0x20(%rdi), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
pushq $0x10
popq %rdi
callq 0x234b0
movq %rax, %rbx
leaq 0x2104f(%rip), %rsi # 0xbd275
movq %rax, %rdi
callq 0x23360
movq 0x65db3(%rip), %rsi # 0x101fe8
movq 0x65d0c(%rip), %rdx # 0x101f48
movq %rbx, %rdi
callq 0x24050
movq %rax, %r14
movq %rbx, %rdi
callq 0x236f0
movq %r14, %rdi
callq 0x240e0
nop
|
_ZNK11ring_bufferIiE3ratEm:
push r14
push rbx
push rax
mov rax, [rdi+8]
cmp rax, rsi
jbe short loc_9C214
not rsi
add rax, rsi
add rax, [rdi+10h]
xor edx, edx
div qword ptr [rdi]
lea rax, ds:0[rdx*4]
add rax, [rdi+20h]
add rsp, 8
pop rbx
pop r14
retn
loc_9C214:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aRingBufferInde; "ring buffer: index out of bounds"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
mov rdi, rbx; void *
call ___cxa_free_exception
mov rdi, r14
call __Unwind_Resume
|
long long ring_buffer<int>::rat(_QWORD *a1, unsigned long long a2)
{
unsigned long long v2; // rax
std::runtime_error *exception; // rbx
v2 = a1[1];
if ( v2 <= a2 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "ring buffer: index out of bounds");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
return a1[4] + 4 * ((a1[2] + ~a2 + v2) % *a1);
}
|
rat:
PUSH R14
PUSH RBX
PUSH RAX
MOV RAX,qword ptr [RDI + 0x8]
CMP RAX,RSI
JBE 0x0019c214
NOT RSI
ADD RAX,RSI
ADD RAX,qword ptr [RDI + 0x10]
XOR EDX,EDX
DIV qword ptr [RDI]
LEA RAX,[RDX*0x4]
ADD RAX,qword ptr [RDI + 0x20]
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_0019c214:
PUSH 0x10
POP RDI
CALL 0x001234b0
MOV RBX,RAX
LAB_0019c21f:
LEA RSI,[0x1bd275]
MOV RDI,RAX
CALL 0x00123360
LAB_0019c22e:
MOV RSI,qword ptr [0x00201fe8]
MOV RDX,qword ptr [0x00201f48]
MOV RDI,RBX
CALL 0x00124050
|
/* ring_buffer<int>::rat(unsigned long) const */
long __thiscall ring_buffer<int>::rat(ring_buffer<int> *this,ulong param_1)
{
runtime_error *this_00;
if (param_1 < *(ulong *)(this + 8)) {
return ((*(ulong *)(this + 8) + ~param_1 + *(long *)(this + 0x10)) % *(ulong *)this) * 4 +
*(long *)(this + 0x20);
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0019c21f to 0019c22d has its CatchHandler @ 0019c244 */
std::runtime_error::runtime_error(this_00,"ring buffer: index out of bounds");
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_00201fe8,PTR__runtime_error_00201f48);
}
|
|
14,693
|
my_rw_tryrdlock
|
eloqsql/mysys/thr_rwlock.c
|
int my_rw_tryrdlock(my_rw_lock_t *rwp)
{
int res;
pthread_mutex_lock(&rwp->lock);
if ((rwp->state < 0 ) || rwp->waiters)
res= EBUSY; /* Can't get lock */
else
{
res=0;
rwp->state++;
}
pthread_mutex_unlock(&rwp->lock);
return(res);
}
|
O0
|
c
|
my_rw_tryrdlock:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x24450
movq -0x8(%rbp), %rax
cmpl $0x0, 0x88(%rax)
jl 0x325cf
movq -0x8(%rbp), %rax
cmpl $0x0, 0x8c(%rax)
je 0x325d8
movl $0x10, -0xc(%rbp)
jmp 0x325f2
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rax
movl 0x88(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x88(%rax)
movq -0x8(%rbp), %rdi
callq 0x241e0
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_rw_tryrdlock:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]
call _pthread_mutex_lock
mov rax, [rbp+var_8]
cmp dword ptr [rax+88h], 0
jl short loc_325CF
mov rax, [rbp+var_8]
cmp dword ptr [rax+8Ch], 0
jz short loc_325D8
loc_325CF:
mov [rbp+var_C], 10h
jmp short loc_325F2
loc_325D8:
mov [rbp+var_C], 0
mov rax, [rbp+var_8]
mov ecx, [rax+88h]
add ecx, 1
mov [rax+88h], ecx
loc_325F2:
mov rdi, [rbp+var_8]
call _pthread_mutex_unlock
mov eax, [rbp+var_C]
add rsp, 10h
pop rbp
retn
|
long long my_rw_tryrdlock(long long a1)
{
unsigned int v2; // [rsp+4h] [rbp-Ch]
pthread_mutex_lock(a1);
if ( *(int *)(a1 + 136) < 0 || *(_DWORD *)(a1 + 140) )
{
v2 = 16;
}
else
{
v2 = 0;
++*(_DWORD *)(a1 + 136);
}
pthread_mutex_unlock(a1);
return v2;
}
|
my_rw_tryrdlock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00124450
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x88],0x0
JL 0x001325cf
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x8c],0x0
JZ 0x001325d8
LAB_001325cf:
MOV dword ptr [RBP + -0xc],0x10
JMP 0x001325f2
LAB_001325d8:
MOV dword ptr [RBP + -0xc],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x88]
ADD ECX,0x1
MOV dword ptr [RAX + 0x88],ECX
LAB_001325f2:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001241e0
MOV EAX,dword ptr [RBP + -0xc]
ADD RSP,0x10
POP RBP
RET
|
int4 my_rw_tryrdlock(pthread_mutex_t *param_1)
{
int4 local_14;
pthread_mutex_lock(param_1);
if ((*(int *)((long)param_1 + 0x88) < 0) || (*(int *)((long)param_1 + 0x8c) != 0)) {
local_14 = 0x10;
}
else {
local_14 = 0;
*(int *)((long)param_1 + 0x88) = *(int *)((long)param_1 + 0x88) + 1;
}
pthread_mutex_unlock(param_1);
return local_14;
}
|
|
14,694
|
MNN::LRN::UnPackTo(MNN::LRNT*, std::__1::function<void (void**, unsigned long)> const*) const
|
mnn-tts/MNN/schema/current/CaffeOp_generated.h
|
inline void LRN::UnPackTo(LRNT *_o, const flatbuffers::resolver_function_t *_resolver) const {
(void)_o;
(void)_resolver;
{ auto _e = regionType(); _o->regionType = _e; };
{ auto _e = localSize(); _o->localSize = _e; };
{ auto _e = alpha(); _o->alpha = _e; };
{ auto _e = beta(); _o->beta = _e; };
{ auto _e = bias(); _o->bias = _e; };
}
|
O0
|
c
|
MNN::LRN::UnPackTo(MNN::LRNT*, std::__1::function<void (void**, unsigned long)> const*) const:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x30(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x20e90
movq (%rsp), %rdi
movl %eax, 0x1c(%rsp)
movl 0x1c(%rsp), %ecx
movq 0x28(%rsp), %rax
movl %ecx, (%rax)
callq 0x20eb0
movq (%rsp), %rdi
movl %eax, 0x18(%rsp)
movl 0x18(%rsp), %ecx
movq 0x28(%rsp), %rax
movl %ecx, 0x4(%rax)
callq 0x20ed0
movq (%rsp), %rdi
movss %xmm0, 0x14(%rsp)
movss 0x14(%rsp), %xmm0
movq 0x28(%rsp), %rax
movss %xmm0, 0x8(%rax)
callq 0x20ef0
movq (%rsp), %rdi
movss %xmm0, 0x10(%rsp)
movss 0x10(%rsp), %xmm0
movq 0x28(%rsp), %rax
movss %xmm0, 0xc(%rax)
callq 0x20f10
movss %xmm0, 0xc(%rsp)
movss 0xc(%rsp), %xmm0
movq 0x28(%rsp), %rax
movss %xmm0, 0x10(%rax)
addq $0x38, %rsp
retq
nopl (%rax,%rax)
|
_ZNK3MNN3LRN8UnPackToEPNS_4LRNTEPKNSt3__18functionIFvPPvmEEE:
sub rsp, 38h
mov [rsp+38h+var_8], rdi
mov [rsp+38h+var_10], rsi
mov [rsp+38h+var_18], rdx
mov rdi, [rsp+38h+var_8]; this
mov [rsp+38h+var_38], rdi
call _ZNK3MNN3LRN10regionTypeEv; MNN::LRN::regionType(void)
mov rdi, [rsp+38h+var_38]; this
mov [rsp+38h+var_1C], eax
mov ecx, [rsp+38h+var_1C]
mov rax, [rsp+38h+var_10]
mov [rax], ecx
call _ZNK3MNN3LRN9localSizeEv; MNN::LRN::localSize(void)
mov rdi, [rsp+38h+var_38]; this
mov [rsp+38h+var_20], eax
mov ecx, [rsp+38h+var_20]
mov rax, [rsp+38h+var_10]
mov [rax+4], ecx
call _ZNK3MNN3LRN5alphaEv; MNN::LRN::alpha(void)
mov rdi, [rsp+38h+var_38]; this
movss [rsp+38h+var_24], xmm0
movss xmm0, [rsp+38h+var_24]
mov rax, [rsp+38h+var_10]
movss dword ptr [rax+8], xmm0
call _ZNK3MNN3LRN4betaEv; MNN::LRN::beta(void)
mov rdi, [rsp+38h+var_38]; this
movss [rsp+38h+var_28], xmm0
movss xmm0, [rsp+38h+var_28]
mov rax, [rsp+38h+var_10]
movss dword ptr [rax+0Ch], xmm0
call _ZNK3MNN3LRN4biasEv; MNN::LRN::bias(void)
movss [rsp+38h+var_2C], xmm0
movss xmm0, [rsp+38h+var_2C]
mov rax, [rsp+38h+var_10]
movss dword ptr [rax+10h], xmm0
add rsp, 38h
retn
|
long long MNN::LRN::UnPackTo(MNN::LRN *a1, long long a2, float a3)
{
long long result; // rax
*(_DWORD *)a2 = MNN::LRN::regionType(a1);
*(_DWORD *)(a2 + 4) = MNN::LRN::localSize(a1);
MNN::LRN::alpha(a1);
*(float *)(a2 + 8) = a3;
MNN::LRN::beta(a1);
*(float *)(a2 + 12) = a3;
MNN::LRN::bias(a1);
result = a2;
*(float *)(a2 + 16) = a3;
return result;
}
|
UnPackTo:
SUB RSP,0x38
MOV qword ptr [RSP + 0x30],RDI
MOV qword ptr [RSP + 0x28],RSI
MOV qword ptr [RSP + 0x20],RDX
MOV RDI,qword ptr [RSP + 0x30]
MOV qword ptr [RSP],RDI
CALL 0x00120e90
MOV RDI,qword ptr [RSP]
MOV dword ptr [RSP + 0x1c],EAX
MOV ECX,dword ptr [RSP + 0x1c]
MOV RAX,qword ptr [RSP + 0x28]
MOV dword ptr [RAX],ECX
CALL 0x00120eb0
MOV RDI,qword ptr [RSP]
MOV dword ptr [RSP + 0x18],EAX
MOV ECX,dword ptr [RSP + 0x18]
MOV RAX,qword ptr [RSP + 0x28]
MOV dword ptr [RAX + 0x4],ECX
CALL 0x00120ed0
MOV RDI,qword ptr [RSP]
MOVSS dword ptr [RSP + 0x14],XMM0
MOVSS XMM0,dword ptr [RSP + 0x14]
MOV RAX,qword ptr [RSP + 0x28]
MOVSS dword ptr [RAX + 0x8],XMM0
CALL 0x00120ef0
MOV RDI,qword ptr [RSP]
MOVSS dword ptr [RSP + 0x10],XMM0
MOVSS XMM0,dword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x28]
MOVSS dword ptr [RAX + 0xc],XMM0
CALL 0x00120f10
MOVSS dword ptr [RSP + 0xc],XMM0
MOVSS XMM0,dword ptr [RSP + 0xc]
MOV RAX,qword ptr [RSP + 0x28]
MOVSS dword ptr [RAX + 0x10],XMM0
ADD RSP,0x38
RET
|
/* MNN::LRN::UnPackTo(MNN::LRNT*, std::function<void (void**, unsigned long)> const*) const */
void MNN::LRN::UnPackTo(LRNT *param_1,function *param_2)
{
int4 uVar1;
uVar1 = regionType((LRN *)param_1);
*(int4 *)param_2 = uVar1;
uVar1 = localSize((LRN *)param_1);
*(int4 *)(param_2 + 4) = uVar1;
uVar1 = alpha((LRN *)param_1);
*(int4 *)(param_2 + 8) = uVar1;
uVar1 = beta((LRN *)param_1);
*(int4 *)(param_2 + 0xc) = uVar1;
uVar1 = bias((LRN *)param_1);
*(int4 *)(param_2 + 0x10) = uVar1;
return;
}
|
|
14,695
|
ftb_find_relevance_parse
|
eloqsql/storage/myisam/ft_boolean_search.c
|
static int ftb_find_relevance_parse(MYSQL_FTPARSER_PARAM *param,
const char *doc, int len)
{
MY_FTB_FIND_PARAM *ftb_param= param->mysql_ftparam;
FT_INFO *ftb= ftb_param->ftb;
uchar *end= (uchar*) doc + len;
FT_WORD w;
while (ft_simple_get_word(ftb->charset, (uchar**) &doc, end, &w, TRUE))
param->mysql_add_word(param, (char*) w.pos, (int)w.len, 0);
return(0);
}
|
O3
|
c
|
ftb_find_relevance_parse:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq -0x30(%rbp), %rax
movq %rsi, (%rax)
movq 0x18(%rdi), %rcx
movq (%rcx), %r13
movslq %edx, %r14
addq %rsi, %r14
movq 0x10(%r13), %rdi
leaq -0x48(%rbp), %rcx
movq %rax, %rsi
movq %r14, %rdx
movl $0x1, %r8d
callq 0x751d9
testb %al, %al
je 0x73bbd
leaq -0x30(%rbp), %r15
leaq -0x48(%rbp), %r12
movq -0x48(%rbp), %rsi
movl -0x38(%rbp), %edx
movq %rbx, %rdi
xorl %ecx, %ecx
callq *0x8(%rbx)
movq 0x10(%r13), %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %r12, %rcx
movl $0x1, %r8d
callq 0x751d9
testb %al, %al
jne 0x73b92
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
ftb_find_relevance_parse:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov rbx, rdi
lea rax, [rbp+var_30]
mov [rax], rsi
mov rcx, [rdi+18h]
mov r13, [rcx]
movsxd r14, edx
add r14, rsi
mov rdi, [r13+10h]
lea rcx, [rbp+var_48]
mov rsi, rax
mov rdx, r14
mov r8d, 1
call ft_simple_get_word
test al, al
jz short loc_73BBD
lea r15, [rbp+var_30]
lea r12, [rbp+var_48]
loc_73B92:
mov rsi, [rbp+var_48]
mov edx, [rbp+var_38]
mov rdi, rbx
xor ecx, ecx
call qword ptr [rbx+8]
mov rdi, [r13+10h]
mov rsi, r15
mov rdx, r14
mov rcx, r12
mov r8d, 1
call ft_simple_get_word
test al, al
jnz short loc_73B92
loc_73BBD:
xor eax, eax
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long ftb_find_relevance_parse(long long a1, long long a2, int a3)
{
long long v3; // r13
long long v4; // r14
_QWORD v6[2]; // [rsp+8h] [rbp-48h] BYREF
unsigned int v7; // [rsp+18h] [rbp-38h]
_QWORD v8[6]; // [rsp+20h] [rbp-30h] BYREF
v8[0] = a2;
v3 = **(_QWORD **)(a1 + 24);
v4 = a2 + a3;
while ( (unsigned __int8)ft_simple_get_word(*(_QWORD *)(v3 + 16), v8, v4, v6, 1LL) )
(*(void ( **)(long long, _QWORD, _QWORD, _QWORD))(a1 + 8))(a1, v6[0], v7, 0LL);
return 0LL;
}
|
ftb_find_relevance_parse:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RBX,RDI
LEA RAX,[RBP + -0x30]
MOV qword ptr [RAX],RSI
MOV RCX,qword ptr [RDI + 0x18]
MOV R13,qword ptr [RCX]
MOVSXD R14,EDX
ADD R14,RSI
MOV RDI,qword ptr [R13 + 0x10]
LEA RCX,[RBP + -0x48]
MOV RSI,RAX
MOV RDX,R14
MOV R8D,0x1
CALL 0x001751d9
TEST AL,AL
JZ 0x00173bbd
LEA R15,[RBP + -0x30]
LEA R12,[RBP + -0x48]
LAB_00173b92:
MOV RSI,qword ptr [RBP + -0x48]
MOV EDX,dword ptr [RBP + -0x38]
MOV RDI,RBX
XOR ECX,ECX
CALL qword ptr [RBX + 0x8]
MOV RDI,qword ptr [R13 + 0x10]
MOV RSI,R15
MOV RDX,R14
MOV RCX,R12
MOV R8D,0x1
CALL 0x001751d9
TEST AL,AL
JNZ 0x00173b92
LAB_00173bbd:
XOR EAX,EAX
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 ftb_find_relevance_parse(long param_1,long param_2,int param_3)
{
long lVar1;
char cVar2;
int8 local_50 [2];
int4 local_40;
long local_38;
lVar1 = **(long **)(param_1 + 0x18);
local_38 = param_2;
cVar2 = ft_simple_get_word(*(int8 *)(lVar1 + 0x10),&local_38,param_3 + param_2,local_50,1);
if (cVar2 != '\0') {
do {
(**(code **)(param_1 + 8))(param_1,local_50[0],local_40,0);
cVar2 = ft_simple_get_word(*(int8 *)(lVar1 + 0x10),&local_38,param_3 + param_2,local_50,
1);
} while (cVar2 != '\0');
}
return 0;
}
|
|
14,696
|
std::hash<minja::Value>::operator()(minja::Value const&) const
|
monkey531[P]llama/common/minja.hpp
|
size_t operator()(const minja::Value & v) const {
if (!v.is_hashable())
throw std::runtime_error("Unsupported type for hashing: " + v.dump());
return std::hash<json>()(v.get<json>());
}
|
O2
|
cpp
|
std::hash<minja::Value>::operator()(minja::Value const&) const:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rsi, %rdi
callq 0x624dc
testb %al, %al
je 0x81b60
movq %rsp, %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x81bfc
movq %rbx, %rdi
callq 0x81fb0
movq %rax, %rbx
movq %rsp, %rdi
callq 0x3c602
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x23450
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
pushq $-0x1
popq %rdx
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x624ec
leaq 0x32401(%rip), %rsi # 0xb3f85
movq %rsp, %rdi
leaq 0x20(%rsp), %rdx
callq 0x57b16
movb $0x1, %bpl
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x23dc0
xorl %ebp, %ebp
movq 0x7a448(%rip), %rsi # 0xfbff0
movq 0x7a3a9(%rip), %rdx # 0xfbf58
movq %rbx, %rdi
callq 0x23e90
movq %rax, %r14
movq %rsp, %rdi
callq 0x24158
jmp 0x81bca
movq %rax, %r14
movb $0x1, %bpl
leaq 0x20(%rsp), %rdi
callq 0x24158
testb %bpl, %bpl
jne 0x81bde
jmp 0x81bf3
movq %rax, %r14
movq %rbx, %rdi
callq 0x23660
jmp 0x81bf3
movq %rax, %r14
movq %rsp, %rdi
callq 0x3c602
movq %r14, %rdi
callq 0x23f10
nop
|
_ZNKSt4hashIN5minja5ValueEEclERKS1_:
push rbp
push r14
push rbx
sub rsp, 40h
mov r14, rsi
mov rdi, rsi; this
call _ZNK5minja5Value12is_primitiveEv; minja::Value::is_primitive(void)
test al, al
jz short loc_81B60
mov rbx, rsp
mov rdi, rbx
mov rsi, r14
call _ZNK5minja5Value3getIN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEEET_v; minja::Value::get<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>>(void)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail4hashINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEmRKT_; nlohmann::json_abi_v3_11_3::detail::hash<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
mov rbx, rax
mov rdi, rsp
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
mov rax, rbx
add rsp, 40h
pop rbx
pop r14
pop rbp
retn
loc_81B60:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+58h+var_38]
push 0FFFFFFFFFFFFFFFFh
pop rdx
mov rsi, r14
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aUnsupportedTyp; "Unsupported type for hashing: "
mov rdi, rsp
lea rdx, [rsp+58h+var_38]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
mov rsi, rsp
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
mov rdi, rsp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_81BCA
mov r14, rax
mov bpl, 1
loc_81BCA:
lea rdi, [rsp+58h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_81BDE
jmp short loc_81BF3
mov r14, rax
loc_81BDE:
mov rdi, rbx; void *
call ___cxa_free_exception
jmp short loc_81BF3
mov r14, rax
mov rdi, rsp
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
loc_81BF3:
mov rdi, r14
call __Unwind_Resume
|
long long std::hash<minja::Value>::operator()(long long a1, minja::Value *a2)
{
long long v2; // rbx
void *exception; // rbx
_BYTE v5[32]; // [rsp+0h] [rbp-58h] BYREF
_BYTE v6[56]; // [rsp+20h] [rbp-38h] BYREF
if ( !minja::Value::is_primitive(a2) )
{
exception = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v6, (long long)a2, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v5, (long long)"Unsupported type for hashing: ", (long long)v6);
std::runtime_error::runtime_error(exception, v5);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::Value::get<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
v5,
a2);
v2 = nlohmann::json_abi_v3_11_3::detail::hash<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(v5);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)v5);
return v2;
}
|
operator():
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x40
MOV R14,RSI
MOV RDI,RSI
CALL 0x001624dc
TEST AL,AL
JZ 0x00181b60
MOV RBX,RSP
MOV RDI,RBX
MOV RSI,R14
CALL 0x00181bfc
LAB_00181b41:
MOV RDI,RBX
CALL 0x00181fb0
LAB_00181b49:
MOV RBX,RAX
MOV RDI,RSP
CALL 0x0013c602
MOV RAX,RBX
ADD RSP,0x40
POP RBX
POP R14
POP RBP
RET
LAB_00181b60:
PUSH 0x10
POP RDI
CALL 0x00123450
MOV RBX,RAX
LAB_00181b6b:
LEA RDI,[RSP + 0x20]
PUSH -0x1
POP RDX
MOV RSI,R14
XOR ECX,ECX
CALL 0x001624ec
LAB_00181b7d:
LEA RSI,[0x1b3f85]
MOV RDI,RSP
LEA RDX,[RSP + 0x20]
CALL 0x00157b16
MOV BPL,0x1
LAB_00181b94:
MOV RSI,RSP
MOV RDI,RBX
CALL 0x00123dc0
XOR EBP,EBP
MOV RSI,qword ptr [0x001fbff0]
MOV RDX,qword ptr [0x001fbf58]
MOV RDI,RBX
CALL 0x00123e90
|
/* std::hash<minja::Value>::TEMPNAMEPLACEHOLDERVALUE(minja::Value const&) const */
ulong __thiscall std::hash<minja::Value>::operator()(hash<minja::Value> *this,Value *param_1)
{
char cVar1;
ulong uVar2;
runtime_error *this_00;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
abStack_58 [32];
int1 local_38 [32];
cVar1 = minja::Value::is_primitive(param_1);
if (cVar1 != '\0') {
minja::Value::
get<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>>
();
/* try { // try from 00181b41 to 00181b48 has its CatchHandler @ 00181be8 */
uVar2 = nlohmann::json_abi_v3_11_3::detail::
hash<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(abStack_58);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::~basic_json(abStack_58);
return uVar2;
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00181b6b to 00181b7c has its CatchHandler @ 00181bdb */
minja::Value::dump_abi_cxx11_((int)local_38,SUB81(param_1,0));
/* try { // try from 00181b7d to 00181b90 has its CatchHandler @ 00181bc4 */
operator+((char *)abStack_58,(string *)"Unsupported type for hashing: ");
/* try { // try from 00181b94 to 00181bb6 has its CatchHandler @ 00181bb7 */
std::runtime_error::runtime_error(this_00,(string *)abStack_58);
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_001fbff0,PTR__runtime_error_001fbf58);
}
|
|
14,697
|
std::hash<minja::Value>::operator()(minja::Value const&) const
|
monkey531[P]llama/common/minja.hpp
|
size_t operator()(const minja::Value & v) const {
if (!v.is_hashable())
throw std::runtime_error("Unsupported type for hashing: " + v.dump());
return std::hash<json>()(v.get<json>());
}
|
O3
|
cpp
|
std::hash<minja::Value>::operator()(minja::Value const&) const:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
cmpq $0x0, 0x10(%rsi)
jne 0xb06ac
cmpq $0x0, 0x20(%r14)
jne 0xb06ac
cmpq $0x0, 0x30(%r14)
jne 0xb06ac
movq %rsp, %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb0794
movq %rbx, %rdi
callq 0xb0cb1
movq %rax, %rbx
movq %rsp, %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x579d6
movq %r14, %rdi
callq 0x5cec4
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x10, %edi
callq 0x1a430
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x85792
leaq 0x3f8c1(%rip), %rsi # 0xeff95
movq %rsp, %rdi
leaq 0x20(%rsp), %rdx
callq 0x77e59
movb $0x1, %bpl
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x1adb0
xorl %ebp, %ebp
movq 0x798f0(%rip), %rsi # 0x129fe8
movq 0x79859(%rip), %rdx # 0x129f58
movq %rbx, %rdi
callq 0x1aea0
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xb0725
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1a890
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xb0740
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1a890
testb %bpl, %bpl
jne 0xb076a
jmp 0xb078c
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xb076a
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1a890
jmp 0xb076a
movq %rax, %r14
movq %rbx, %rdi
callq 0x1a640
jmp 0xb078c
movq %rax, %r14
movq %rsp, %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x579d6
movq %rbx, %rdi
callq 0x5cec4
movq %r14, %rdi
callq 0x1af20
|
_ZNKSt4hashIN5minja5ValueEEclERKS1_:
push rbp
push r14
push rbx
sub rsp, 40h
mov r14, rsi
cmp qword ptr [rsi+10h], 0
jnz short loc_B06AC
cmp qword ptr [r14+20h], 0
jnz short loc_B06AC
cmp qword ptr [r14+30h], 0
jnz short loc_B06AC
mov rbx, rsp
mov rdi, rbx
mov rsi, r14
call _ZNK5minja5Value3getIN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEEET_v; minja::Value::get<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>>(void)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail4hashINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEmRKT_; nlohmann::json_abi_v3_11_3::detail::hash<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
mov rbx, rax
mov r14, rsp
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rax, rbx
add rsp, 40h
pop rbx
pop r14
pop rbp
retn
loc_B06AC:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+58h+var_38]
mov rsi, r14
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aUnsupportedTyp; "Unsupported type for hashing: "
mov rdi, rsp
lea rdx, [rsp+58h+var_38]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
mov rsi, rsp
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:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+58h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_B0725
mov rsi, [rsp+58h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_B0725:
lea rax, [rsp+58h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_B0740
mov rsi, [rsp+58h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_B0740:
test bpl, bpl
jnz short loc_B076A
jmp short loc_B078C
mov r14, rax
lea rax, [rsp+58h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_B076A
mov rsi, [rsp+58h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_B076A
mov r14, rax
loc_B076A:
mov rdi, rbx; void *
call ___cxa_free_exception
jmp short loc_B078C
mov r14, rax
mov rbx, rsp
mov rdi, rbx
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, rbx
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_B078C:
mov rdi, r14
call __Unwind_Resume
|
long long std::hash<minja::Value>::operator()(long long a1, _QWORD *a2)
{
long long v2; // rbx
void *exception; // rbx
char v5[16]; // [rsp+0h] [rbp-58h] BYREF
_BYTE v6[16]; // [rsp+20h] [rbp-38h] BYREF
if ( a2[2] || a2[4] || a2[6] )
{
exception = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v6, (long long)a2, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v5, (long long)"Unsupported type for hashing: ", (long long)v6);
std::runtime_error::runtime_error(exception, v5);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::Value::get<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
v5,
a2);
v2 = nlohmann::json_abi_v3_11_3::detail::hash<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(v5);
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(v5);
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(v5);
return v2;
}
|
operator():
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x40
MOV R14,RSI
CMP qword ptr [RSI + 0x10],0x0
JNZ 0x001b06ac
CMP qword ptr [R14 + 0x20],0x0
JNZ 0x001b06ac
CMP qword ptr [R14 + 0x30],0x0
JNZ 0x001b06ac
MOV RBX,RSP
MOV RDI,RBX
MOV RSI,R14
CALL 0x001b0794
LAB_001b0680:
MOV RDI,RBX
CALL 0x001b0cb1
LAB_001b0688:
MOV RBX,RAX
MOV R14,RSP
MOV RDI,R14
XOR ESI,ESI
CALL 0x001579d6
MOV RDI,R14
CALL 0x0015cec4
MOV RAX,RBX
ADD RSP,0x40
POP RBX
POP R14
POP RBP
RET
LAB_001b06ac:
MOV EDI,0x10
CALL 0x0011a430
MOV RBX,RAX
LAB_001b06b9:
LEA RDI,[RSP + 0x20]
MOV RSI,R14
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x00185792
LAB_001b06cd:
LEA RSI,[0x1eff95]
MOV RDI,RSP
LEA RDX,[RSP + 0x20]
CALL 0x00177e59
MOV BPL,0x1
LAB_001b06e4:
MOV RSI,RSP
MOV RDI,RBX
CALL 0x0011adb0
XOR EBP,EBP
MOV RSI,qword ptr [0x00229fe8]
MOV RDX,qword ptr [0x00229f58]
MOV RDI,RBX
CALL 0x0011aea0
|
/* std::hash<minja::Value>::TEMPNAMEPLACEHOLDERVALUE(minja::Value const&) const */
ulong __thiscall std::hash<minja::Value>::operator()(hash<minja::Value> *this,Value *param_1)
{
ulong uVar1;
runtime_error *this_00;
basic_json abStack_58 [32];
int1 local_38 [32];
if (((*(long *)(param_1 + 0x10) == 0) && (*(long *)(param_1 + 0x20) == 0)) &&
(*(long *)(param_1 + 0x30) == 0)) {
minja::Value::
get<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>>
();
/* try { // try from 001b0680 to 001b0687 has its CatchHandler @ 001b0774 */
uVar1 = nlohmann::json_abi_v3_11_3::detail::
hash<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(abStack_58);
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(abStack_58,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 *)abStack_58);
return uVar1;
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001b06b9 to 001b06cc has its CatchHandler @ 001b0767 */
minja::Value::dump_abi_cxx11_((int)local_38,SUB81(param_1,0));
/* try { // try from 001b06cd to 001b06e0 has its CatchHandler @ 001b0747 */
operator+((char *)abStack_58,(string *)"Unsupported type for hashing: ");
/* try { // try from 001b06e4 to 001b0706 has its CatchHandler @ 001b0707 */
std::runtime_error::runtime_error(this_00,(string *)abStack_58);
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_00229fe8,PTR__runtime_error_00229f58);
}
|
|
14,698
|
mult
|
eloqsql/strings/dtoa.c
|
static Bigint *mult(Bigint *a, Bigint *b, Stack_alloc *alloc)
{
Bigint *c;
int k, wa, wb, wc;
ULong *x, *xa, *xae, *xb, *xbe, *xc, *xc0;
ULong y;
ULLong carry, z;
if (a->wds < b->wds)
{
c= a;
a= b;
b= c;
}
k= a->k;
wa= a->wds;
wb= b->wds;
wc= wa + wb;
if (wc > a->maxwds)
k++;
c= Balloc(k, alloc);
for (x= c->p.x, xa= x + wc; x < xa; x++)
*x= 0;
xa= a->p.x;
xae= xa + wa;
xb= b->p.x;
xbe= xb + wb;
xc0= c->p.x;
for (; xb < xbe; xc0++)
{
if ((y= *xb++))
{
x= xa;
xc= xc0;
carry= 0;
do
{
z= *x++ * (ULLong)y + *xc + carry;
carry= z >> 32;
*xc++= (ULong) (z & FFFFFFFF);
}
while (x < xae);
*xc= (ULong) carry;
}
}
for (xc0= c->p.x, xc= xc0 + wc; wc > 0 && !*--xc; --wc) ;
c->wds= wc;
return c;
}
|
O0
|
c
|
mult:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0x14(%rcx), %eax
jge 0x82dbf
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0x2c(%rbp)
movl -0x28(%rbp), %eax
addl -0x2c(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jle 0x82dfb
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %edi
movq -0x18(%rbp), %rsi
callq 0x82920
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movslq -0x30(%rbp), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x82e4b
movq -0x38(%rbp), %rax
movl $0x0, (%rax)
movq -0x38(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x38(%rbp)
jmp 0x82e29
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movslq -0x28(%rbp), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x68(%rbp)
movq -0x50(%rbp), %rax
cmpq -0x58(%rbp), %rax
jae 0x82f54
movq -0x50(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x50(%rbp)
movl (%rax), %eax
movl %eax, -0x6c(%rbp)
cmpl $0x0, %eax
je 0x82f41
movq -0x40(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x60(%rbp)
movq $0x0, -0x78(%rbp)
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x38(%rbp)
movl (%rax), %eax
movl -0x6c(%rbp), %ecx
imulq %rcx, %rax
movq -0x60(%rbp), %rcx
movl (%rcx), %ecx
addq %rcx, %rax
addq -0x78(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rax
shrq $0x20, %rax
movq %rax, -0x78(%rbp)
movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF
andq -0x80(%rbp), %rax
movl %eax, %ecx
movq -0x60(%rbp), %rax
movq %rax, %rdx
addq $0x4, %rdx
movq %rdx, -0x60(%rbp)
movl %ecx, (%rax)
movq -0x38(%rbp), %rax
cmpq -0x48(%rbp), %rax
jb 0x82ed5
movq -0x78(%rbp), %rax
movl %eax, %ecx
movq -0x60(%rbp), %rax
movl %ecx, (%rax)
jmp 0x82f43
movq -0x68(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x68(%rbp)
jmp 0x82e92
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movslq -0x30(%rbp), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x60(%rbp)
xorl %eax, %eax
cmpl $0x0, -0x30(%rbp)
movb %al, -0x81(%rbp)
jle 0x82f9e
movq -0x60(%rbp), %rax
movq %rax, %rcx
addq $-0x4, %rcx
movq %rcx, -0x60(%rbp)
cmpl $0x0, -0x4(%rax)
setne %al
xorb $-0x1, %al
movb %al, -0x81(%rbp)
movb -0x81(%rbp), %al
testb $0x1, %al
jne 0x82faa
jmp 0x82fb7
jmp 0x82fac
movl -0x30(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x82f72
movl -0x30(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x20(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
nop
|
mult:
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_8]
mov eax, [rax+14h]
mov rcx, [rbp+var_10]
cmp eax, [rcx+14h]
jge short loc_82DBF
mov rax, [rbp+var_8]
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov [rbp+var_8], rax
mov rax, [rbp+var_20]
mov [rbp+var_10], rax
loc_82DBF:
mov rax, [rbp+var_8]
mov eax, [rax+8]
mov [rbp+var_24], eax
mov rax, [rbp+var_8]
mov eax, [rax+14h]
mov [rbp+var_28], eax
mov rax, [rbp+var_10]
mov eax, [rax+14h]
mov [rbp+var_2C], eax
mov eax, [rbp+var_28]
add eax, [rbp+var_2C]
mov [rbp+var_30], eax
mov eax, [rbp+var_30]
mov rcx, [rbp+var_8]
cmp eax, [rcx+0Ch]
jle short loc_82DFB
mov eax, [rbp+var_24]
add eax, 1
mov [rbp+var_24], eax
loc_82DFB:
mov edi, [rbp+var_24]
mov rsi, [rbp+var_18]
call Balloc
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
mov rax, [rax]
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
movsxd rcx, [rbp+var_30]
shl rcx, 2
add rax, rcx
mov [rbp+var_40], rax
loc_82E29:
mov rax, [rbp+var_38]
cmp rax, [rbp+var_40]
jnb short loc_82E4B
mov rax, [rbp+var_38]
mov dword ptr [rax], 0
mov rax, [rbp+var_38]
add rax, 4
mov [rbp+var_38], rax
jmp short loc_82E29
loc_82E4B:
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_40], rax
mov rax, [rbp+var_40]
movsxd rcx, [rbp+var_28]
shl rcx, 2
add rax, rcx
mov [rbp+var_48], rax
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_50], rax
mov rax, [rbp+var_50]
movsxd rcx, [rbp+var_2C]
shl rcx, 2
add rax, rcx
mov [rbp+var_58], rax
mov rax, [rbp+var_20]
mov rax, [rax]
mov [rbp+var_68], rax
loc_82E92:
mov rax, [rbp+var_50]
cmp rax, [rbp+var_58]
jnb loc_82F54
mov rax, [rbp+var_50]
mov rcx, rax
add rcx, 4
mov [rbp+var_50], rcx
mov eax, [rax]
mov [rbp+var_6C], eax
cmp eax, 0
jz loc_82F41
mov rax, [rbp+var_40]
mov [rbp+var_38], rax
mov rax, [rbp+var_68]
mov [rbp+var_60], rax
mov [rbp+var_78], 0
loc_82ED5:
mov rax, [rbp+var_38]
mov rcx, rax
add rcx, 4
mov [rbp+var_38], rcx
mov eax, [rax]
mov ecx, [rbp+var_6C]
imul rax, rcx
mov rcx, [rbp+var_60]
mov ecx, [rcx]
add rax, rcx
add rax, [rbp+var_78]
mov [rbp+var_80], rax
mov rax, [rbp+var_80]
shr rax, 20h
mov [rbp+var_78], rax
mov rax, 0FFFFFFFFh
and rax, [rbp+var_80]
mov ecx, eax
mov rax, [rbp+var_60]
mov rdx, rax
add rdx, 4
mov [rbp+var_60], rdx
mov [rax], ecx
mov rax, [rbp+var_38]
cmp rax, [rbp+var_48]
jb short loc_82ED5
mov rax, [rbp+var_78]
mov ecx, eax
mov rax, [rbp+var_60]
mov [rax], ecx
loc_82F41:
jmp short $+2
loc_82F43:
mov rax, [rbp+var_68]
add rax, 4
mov [rbp+var_68], rax
jmp loc_82E92
loc_82F54:
mov rax, [rbp+var_20]
mov rax, [rax]
mov [rbp+var_68], rax
mov rax, [rbp+var_68]
movsxd rcx, [rbp+var_30]
shl rcx, 2
add rax, rcx
mov [rbp+var_60], rax
loc_82F72:
xor eax, eax
cmp [rbp+var_30], 0
mov [rbp+var_81], al
jle short loc_82F9E
mov rax, [rbp+var_60]
mov rcx, rax
add rcx, 0FFFFFFFFFFFFFFFCh
mov [rbp+var_60], rcx
cmp dword ptr [rax-4], 0
setnz al
xor al, 0FFh
mov [rbp+var_81], al
loc_82F9E:
mov al, [rbp+var_81]
test al, 1
jnz short loc_82FAA
jmp short loc_82FB7
loc_82FAA:
jmp short $+2
loc_82FAC:
mov eax, [rbp+var_30]
add eax, 0FFFFFFFFh
mov [rbp+var_30], eax
jmp short loc_82F72
loc_82FB7:
mov ecx, [rbp+var_30]
mov rax, [rbp+var_20]
mov [rax+14h], ecx
mov rax, [rbp+var_20]
add rsp, 90h
pop rbp
retn
|
long long mult(unsigned int **a1, unsigned int **a2, long long a3)
{
unsigned int *v3; // rax
unsigned int *v4; // rax
_DWORD *v5; // rax
long long v6; // rax
char v8; // [rsp+Fh] [rbp-81h]
unsigned long long v9; // [rsp+10h] [rbp-80h]
unsigned long long v10; // [rsp+18h] [rbp-78h]
unsigned int v11; // [rsp+24h] [rbp-6Ch]
_DWORD *v12; // [rsp+28h] [rbp-68h]
_DWORD *v13; // [rsp+30h] [rbp-60h]
long long v14; // [rsp+30h] [rbp-60h]
unsigned long long v15; // [rsp+38h] [rbp-58h]
unsigned int *v16; // [rsp+40h] [rbp-50h]
unsigned long long v17; // [rsp+48h] [rbp-48h]
unsigned long long v18; // [rsp+50h] [rbp-40h]
unsigned int *v19; // [rsp+50h] [rbp-40h]
_DWORD *v20; // [rsp+58h] [rbp-38h]
unsigned int *v21; // [rsp+58h] [rbp-38h]
int v22; // [rsp+60h] [rbp-30h]
int v23; // [rsp+64h] [rbp-2Ch]
int v24; // [rsp+68h] [rbp-28h]
int v25; // [rsp+6Ch] [rbp-24h]
long long v26; // [rsp+70h] [rbp-20h]
unsigned int **v27; // [rsp+80h] [rbp-10h]
unsigned int **v28; // [rsp+88h] [rbp-8h]
v28 = a1;
v27 = a2;
if ( *((_DWORD *)a1 + 5) < *((_DWORD *)a2 + 5) )
{
v28 = a2;
v27 = a1;
}
v25 = *((_DWORD *)v28 + 2);
v24 = *((_DWORD *)v28 + 5);
v23 = *((_DWORD *)v27 + 5);
v22 = v23 + v24;
if ( v23 + v24 > *((_DWORD *)v28 + 3) )
++v25;
v26 = Balloc(v25, a3);
v20 = *(_DWORD **)v26;
v18 = 4LL * v22 + *(_QWORD *)v26;
while ( (unsigned long long)v20 < v18 )
*v20++ = 0;
v19 = *v28;
v17 = (unsigned long long)&(*v28)[v24];
v16 = *v27;
v15 = (unsigned long long)&(*v27)[v23];
v12 = *(_DWORD **)v26;
while ( (unsigned long long)v16 < v15 )
{
v3 = v16++;
v11 = *v3;
if ( *v3 )
{
v21 = v19;
v13 = v12;
v10 = 0LL;
do
{
v4 = v21++;
v9 = v10 + (unsigned int)*v13 + v11 * (unsigned long long)*v4;
v10 = HIDWORD(v9);
v5 = v13++;
*v5 = v9;
}
while ( (unsigned long long)v21 < v17 );
*v13 = HIDWORD(v9);
}
++v12;
}
v14 = 4LL * v22 + *(_QWORD *)v26;
while ( 1 )
{
v8 = 0;
if ( v22 > 0 )
{
v6 = v14;
v14 -= 4LL;
v8 = ~(*(_DWORD *)(v6 - 4) != 0);
}
if ( (v8 & 1) == 0 )
break;
--v22;
}
*(_DWORD *)(v26 + 20) = v22;
return v26;
}
|
mult:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x14]
MOV RCX,qword ptr [RBP + -0x10]
CMP EAX,dword ptr [RCX + 0x14]
JGE 0x00182dbf
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x8],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x10],RAX
LAB_00182dbf:
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x8]
MOV dword ptr [RBP + -0x24],EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x14]
MOV dword ptr [RBP + -0x28],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x14]
MOV dword ptr [RBP + -0x2c],EAX
MOV EAX,dword ptr [RBP + -0x28]
ADD EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0x30],EAX
MOV EAX,dword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x8]
CMP EAX,dword ptr [RCX + 0xc]
JLE 0x00182dfb
MOV EAX,dword ptr [RBP + -0x24]
ADD EAX,0x1
MOV dword ptr [RBP + -0x24],EAX
LAB_00182dfb:
MOV EDI,dword ptr [RBP + -0x24]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x00182920
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOVSXD RCX,dword ptr [RBP + -0x30]
SHL RCX,0x2
ADD RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
LAB_00182e29:
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x40]
JNC 0x00182e4b
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x4
MOV qword ptr [RBP + -0x38],RAX
JMP 0x00182e29
LAB_00182e4b:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOVSXD RCX,dword ptr [RBP + -0x28]
SHL RCX,0x2
ADD RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOVSXD RCX,dword ptr [RBP + -0x2c]
SHL RCX,0x2
ADD RAX,RCX
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x68],RAX
LAB_00182e92:
MOV RAX,qword ptr [RBP + -0x50]
CMP RAX,qword ptr [RBP + -0x58]
JNC 0x00182f54
MOV RAX,qword ptr [RBP + -0x50]
MOV RCX,RAX
ADD RCX,0x4
MOV qword ptr [RBP + -0x50],RCX
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x6c],EAX
CMP EAX,0x0
JZ 0x00182f41
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RBP + -0x60],RAX
MOV qword ptr [RBP + -0x78],0x0
LAB_00182ed5:
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,RAX
ADD RCX,0x4
MOV qword ptr [RBP + -0x38],RCX
MOV EAX,dword ptr [RAX]
MOV ECX,dword ptr [RBP + -0x6c]
IMUL RAX,RCX
MOV RCX,qword ptr [RBP + -0x60]
MOV ECX,dword ptr [RCX]
ADD RAX,RCX
ADD RAX,qword ptr [RBP + -0x78]
MOV qword ptr [RBP + -0x80],RAX
MOV RAX,qword ptr [RBP + -0x80]
SHR RAX,0x20
MOV qword ptr [RBP + -0x78],RAX
MOV RAX,0xffffffff
AND RAX,qword ptr [RBP + -0x80]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x60]
MOV RDX,RAX
ADD RDX,0x4
MOV qword ptr [RBP + -0x60],RDX
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x48]
JC 0x00182ed5
MOV RAX,qword ptr [RBP + -0x78]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x60]
MOV dword ptr [RAX],ECX
LAB_00182f41:
JMP 0x00182f43
LAB_00182f43:
MOV RAX,qword ptr [RBP + -0x68]
ADD RAX,0x4
MOV qword ptr [RBP + -0x68],RAX
JMP 0x00182e92
LAB_00182f54:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x68]
MOVSXD RCX,dword ptr [RBP + -0x30]
SHL RCX,0x2
ADD RAX,RCX
MOV qword ptr [RBP + -0x60],RAX
LAB_00182f72:
XOR EAX,EAX
CMP dword ptr [RBP + -0x30],0x0
MOV byte ptr [RBP + -0x81],AL
JLE 0x00182f9e
MOV RAX,qword ptr [RBP + -0x60]
MOV RCX,RAX
ADD RCX,-0x4
MOV qword ptr [RBP + -0x60],RCX
CMP dword ptr [RAX + -0x4],0x0
SETNZ AL
XOR AL,0xff
MOV byte ptr [RBP + -0x81],AL
LAB_00182f9e:
MOV AL,byte ptr [RBP + -0x81]
TEST AL,0x1
JNZ 0x00182faa
JMP 0x00182fb7
LAB_00182faa:
JMP 0x00182fac
LAB_00182fac:
MOV EAX,dword ptr [RBP + -0x30]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x30],EAX
JMP 0x00182f72
LAB_00182fb7:
MOV ECX,dword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0x14],ECX
MOV RAX,qword ptr [RBP + -0x20]
ADD RSP,0x90
POP RBP
RET
|
long * mult(int8 *param_1,int8 *param_2,int8 param_3)
{
int iVar1;
int iVar2;
uint uVar3;
uint *puVar4;
uint *puVar5;
long *plVar6;
int4 *puVar7;
ulong uVar8;
uint *puVar9;
uint *puVar10;
bool bVar11;
ulong local_80;
uint *local_70;
uint *local_68;
uint *local_58;
uint *local_40;
int local_38;
int local_2c;
int8 *local_18;
int8 *local_10;
local_18 = param_2;
local_10 = param_1;
if (*(int *)((long)param_1 + 0x14) < *(int *)((long)param_2 + 0x14)) {
local_18 = param_1;
local_10 = param_2;
}
local_2c = *(int *)(local_10 + 1);
iVar1 = *(int *)((long)local_10 + 0x14);
iVar2 = *(int *)((long)local_18 + 0x14);
local_38 = iVar1 + iVar2;
if (*(int *)((long)local_10 + 0xc) < local_38) {
local_2c = local_2c + 1;
}
plVar6 = (long *)Balloc(local_2c,param_3);
local_40 = (uint *)*plVar6;
puVar7 = local_40 + local_38;
for (; local_40 < puVar7; local_40 = local_40 + 1) {
*local_40 = 0;
}
puVar4 = (uint *)*local_10;
puVar5 = (uint *)*local_18;
local_70 = (uint *)*plVar6;
local_58 = puVar5;
while (local_58 < puVar5 + iVar2) {
uVar3 = *local_58;
if (uVar3 != 0) {
local_68 = local_70;
local_80 = 0;
local_40 = puVar4;
do {
puVar9 = local_40 + 1;
uVar8 = (ulong)*local_40 * (ulong)uVar3 + (ulong)*local_68 + local_80;
local_80 = uVar8 >> 0x20;
puVar10 = local_68 + 1;
*local_68 = (uint)uVar8;
local_68 = puVar10;
local_40 = puVar9;
} while (puVar9 < puVar4 + iVar1);
*puVar10 = (uint)(uVar8 >> 0x20);
}
local_70 = local_70 + 1;
local_58 = local_58 + 1;
}
local_68 = (uint *)(*plVar6 + (long)local_38 * 4);
while( true ) {
bVar11 = false;
if (0 < local_38) {
bVar11 = *(int *)((long)local_68 + -4) == 0;
local_68 = (uint *)((long)local_68 + -4);
}
if (!bVar11) break;
local_38 = local_38 + -1;
}
*(int *)((long)plVar6 + 0x14) = local_38;
return plVar6;
}
|
|
14,699
|
inherit_charset_data
|
eloqsql/mysys/charset.c
|
static void
inherit_charset_data(struct charset_info_st *cs, CHARSET_INFO *refcs)
{
if (!cs->to_upper)
cs->to_upper= refcs->to_upper;
if (!cs->to_lower)
cs->to_lower= refcs->to_lower;
if (!cs->m_ctype)
cs->m_ctype= refcs->m_ctype;
if (!cs->tab_to_uni)
cs->tab_to_uni= refcs->tab_to_uni;
}
|
O0
|
c
|
inherit_charset_data:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x50(%rax)
jne 0x2af67
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x50(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x48(%rax)
jne 0x2af82
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x48(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x40(%rax)
jne 0x2af9d
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x68(%rax)
jne 0x2afb8
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x68(%rax)
popq %rbp
retq
nopw (%rax,%rax)
|
inherit_charset_data:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
cmp qword ptr [rax+50h], 0
jnz short loc_2AF67
mov rax, [rbp+var_10]
mov rcx, [rax+50h]
mov rax, [rbp+var_8]
mov [rax+50h], rcx
loc_2AF67:
mov rax, [rbp+var_8]
cmp qword ptr [rax+48h], 0
jnz short loc_2AF82
mov rax, [rbp+var_10]
mov rcx, [rax+48h]
mov rax, [rbp+var_8]
mov [rax+48h], rcx
loc_2AF82:
mov rax, [rbp+var_8]
cmp qword ptr [rax+40h], 0
jnz short loc_2AF9D
mov rax, [rbp+var_10]
mov rcx, [rax+40h]
mov rax, [rbp+var_8]
mov [rax+40h], rcx
loc_2AF9D:
mov rax, [rbp+var_8]
cmp qword ptr [rax+68h], 0
jnz short loc_2AFB8
mov rax, [rbp+var_10]
mov rcx, [rax+68h]
mov rax, [rbp+var_8]
mov [rax+68h], rcx
loc_2AFB8:
pop rbp
retn
|
_QWORD * inherit_charset_data(_QWORD *a1, _QWORD *a2)
{
_QWORD *result; // rax
if ( !a1[10] )
a1[10] = a2[10];
if ( !a1[9] )
a1[9] = a2[9];
if ( !a1[8] )
a1[8] = a2[8];
result = a1;
if ( !a1[13] )
{
result = a1;
a1[13] = a2[13];
}
return result;
}
|
inherit_charset_data:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x50],0x0
JNZ 0x0012af67
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x50]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x50],RCX
LAB_0012af67:
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x48],0x0
JNZ 0x0012af82
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x48]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x48],RCX
LAB_0012af82:
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x40],0x0
JNZ 0x0012af9d
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x40]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x40],RCX
LAB_0012af9d:
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x68],0x0
JNZ 0x0012afb8
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x68]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x68],RCX
LAB_0012afb8:
POP RBP
RET
|
void inherit_charset_data(long param_1,long param_2)
{
if (*(long *)(param_1 + 0x50) == 0) {
*(int8 *)(param_1 + 0x50) = *(int8 *)(param_2 + 0x50);
}
if (*(long *)(param_1 + 0x48) == 0) {
*(int8 *)(param_1 + 0x48) = *(int8 *)(param_2 + 0x48);
}
if (*(long *)(param_1 + 0x40) == 0) {
*(int8 *)(param_1 + 0x40) = *(int8 *)(param_2 + 0x40);
}
if (*(long *)(param_1 + 0x68) == 0) {
*(int8 *)(param_1 + 0x68) = *(int8 *)(param_2 + 0x68);
}
return;
}
|
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.