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
|
---|---|---|---|---|---|---|---|---|---|---|---|
12,100 |
JS_ToIndex
|
bluesky950520[P]quickjs/quickjs.c
|
int JS_ToIndex(JSContext *ctx, uint64_t *plen, JSValue val)
{
int64_t v;
if (JS_ToInt64Sat(ctx, &v, val))
return -1;
if (v < 0 || v > MAX_SAFE_INTEGER) {
JS_ThrowRangeError(ctx, "invalid array index");
*plen = 0;
return -1;
}
*plen = v;
return 0;
}
|
O1
|
c
|
JS_ToIndex:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rdx, 0x8(%rsp)
cmpl $-0x9, %ecx
jb 0x26e7b
movq 0x8(%rsp), %rax
incl (%rax)
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x26ba8
movl %eax, %ecx
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x26ebf
movq 0x8(%rsp), %r15
xorl %eax, %eax
movq %r15, %rcx
shrq $0x35, %rcx
je 0x26ebc
leaq 0x767b0(%rip), %rsi # 0x9d65a
xorl %r15d, %r15d
movq %r14, %rdi
xorl %eax, %eax
callq 0x1fec9
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
movq %r15, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
|
JS_ToIndex:
push r15
push r14
push rbx
sub rsp, 10h
mov rbx, rsi
mov r14, rdi
mov [rsp+28h+var_20], rdx
cmp ecx, 0FFFFFFF7h
jb short loc_26E7B
mov rax, [rsp+28h+var_20]
inc dword ptr [rax]
loc_26E7B:
lea rsi, [rsp+28h+var_20]
mov rdi, r14
call JS_ToInt64SatFree
mov ecx, eax
mov eax, 0FFFFFFFFh
test ecx, ecx
jnz short loc_26EBF
mov r15, [rsp+28h+var_20]
xor eax, eax
mov rcx, r15
shr rcx, 35h
jz short loc_26EBC
lea rsi, aInvalidArrayIn; "invalid array index"
xor r15d, r15d
mov rdi, r14
xor eax, eax
call JS_ThrowRangeError
mov eax, 0FFFFFFFFh
loc_26EBC:
mov [rbx], r15
loc_26EBF:
add rsp, 10h
pop rbx
pop r14
pop r15
retn
|
long long JS_ToIndex(
long long a1,
unsigned long long *a2,
long long a3,
long long a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
double a9,
double a10,
__m128 a11,
__m128 a12)
{
long long v12; // rdx
int v13; // ecx
long long v14; // r8
long long v15; // r9
__m128 v16; // xmm4
__m128 v17; // xmm5
long long result; // rax
unsigned long long v19; // r15
char v20; // [rsp+0h] [rbp-28h]
unsigned long long v21[4]; // [rsp+8h] [rbp-20h] BYREF
v21[0] = a3;
if ( (unsigned int)a4 >= 0xFFFFFFF7 )
++*(_DWORD *)v21[0];
v13 = JS_ToInt64SatFree(a1, v21, a3, a4);
result = 0xFFFFFFFFLL;
if ( !v13 )
{
v19 = v21[0];
result = 0LL;
if ( v21[0] >> 53 )
{
v19 = 0LL;
JS_ThrowRangeError(
a1,
(long long)"invalid array index",
v12,
v21[0] >> 53,
v14,
v15,
a5,
a6,
a7,
a8,
v16,
v17,
a11,
a12,
v20);
result = 0xFFFFFFFFLL;
}
*a2 = v19;
}
return result;
}
|
JS_ToIndex:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV RBX,RSI
MOV R14,RDI
MOV qword ptr [RSP + 0x8],RDX
CMP ECX,-0x9
JC 0x00126e7b
MOV RAX,qword ptr [RSP + 0x8]
INC dword ptr [RAX]
LAB_00126e7b:
LEA RSI,[RSP + 0x8]
MOV RDI,R14
CALL 0x00126ba8
MOV ECX,EAX
MOV EAX,0xffffffff
TEST ECX,ECX
JNZ 0x00126ebf
MOV R15,qword ptr [RSP + 0x8]
XOR EAX,EAX
MOV RCX,R15
SHR RCX,0x35
JZ 0x00126ebc
LEA RSI,[0x19d65a]
XOR R15D,R15D
MOV RDI,R14
XOR EAX,EAX
CALL 0x0011fec9
MOV EAX,0xffffffff
LAB_00126ebc:
MOV qword ptr [RBX],R15
LAB_00126ebf:
ADD RSP,0x10
POP RBX
POP R14
POP R15
RET
|
int8 JS_ToIndex(int8 param_1,int8 *param_2,int *param_3,uint param_4)
{
int iVar1;
int8 uVar2;
int *piVar3;
int *local_20;
if (0xfffffff6 < param_4) {
*param_3 = *param_3 + 1;
}
local_20 = param_3;
iVar1 = JS_ToInt64SatFree(param_1,&local_20);
uVar2 = 0xffffffff;
if (iVar1 == 0) {
uVar2 = 0;
piVar3 = local_20;
if ((ulong)local_20 >> 0x35 != 0) {
piVar3 = (int *)0x0;
JS_ThrowRangeError(param_1,"invalid array index");
uVar2 = 0xffffffff;
}
*param_2 = piVar3;
}
return uVar2;
}
|
|
12,101 |
JS_ToIndex
|
bluesky950520[P]quickjs/quickjs.c
|
int JS_ToIndex(JSContext *ctx, uint64_t *plen, JSValue val)
{
int64_t v;
if (JS_ToInt64Sat(ctx, &v, val))
return -1;
if (v < 0 || v > MAX_SAFE_INTEGER) {
JS_ThrowRangeError(ctx, "invalid array index");
*plen = 0;
return -1;
}
*plen = v;
return 0;
}
|
O3
|
c
|
JS_ToIndex:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
cmpl $-0x9, %ecx
jb 0x274ca
incl (%rdx)
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x2723e
movl %eax, %ecx
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x2750e
movq 0x8(%rsp), %r15
xorl %eax, %eax
movq %r15, %rcx
shrq $0x35, %rcx
je 0x2750b
leaq 0x79131(%rip), %rsi # 0xa062a
xorl %r15d, %r15d
movq %r14, %rdi
xorl %eax, %eax
callq 0x205f0
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
movq %r15, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
|
JS_ToIndex:
push r15
push r14
push rbx
sub rsp, 10h
mov rbx, rsi
mov r14, rdi
cmp ecx, 0FFFFFFF7h
jb short loc_274CA
inc dword ptr [rdx]
loc_274CA:
lea rsi, [rsp+28h+var_20]
mov rdi, r14
call JS_ToInt64SatFree
mov ecx, eax
mov eax, 0FFFFFFFFh
test ecx, ecx
jnz short loc_2750E
mov r15, [rsp+28h+var_20]
xor eax, eax
mov rcx, r15
shr rcx, 35h
jz short loc_2750B
lea rsi, aInvalidArrayIn; "invalid array index"
xor r15d, r15d
mov rdi, r14
xor eax, eax
call JS_ThrowRangeError
mov eax, 0FFFFFFFFh
loc_2750B:
mov [rbx], r15
loc_2750E:
add rsp, 10h
pop rbx
pop r14
pop r15
retn
|
long long JS_ToIndex(
long long a1,
unsigned long long *a2,
_DWORD *a3,
long long a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
double a9,
double a10,
__m128 a11,
__m128 a12)
{
long long v12; // rdx
int v13; // ecx
long long v14; // r8
long long v15; // r9
__m128 v16; // xmm4
__m128 v17; // xmm5
long long result; // rax
unsigned long long v19; // r15
char v20; // [rsp+0h] [rbp-28h]
unsigned long long v21[4]; // [rsp+8h] [rbp-20h] BYREF
if ( (unsigned int)a4 >= 0xFFFFFFF7 )
++*a3;
v13 = JS_ToInt64SatFree(a1, v21, (long long)a3, a4);
result = 0xFFFFFFFFLL;
if ( !v13 )
{
v19 = v21[0];
result = 0LL;
if ( v21[0] >> 53 )
{
v19 = 0LL;
JS_ThrowRangeError(
a1,
(long long)"invalid array index",
v12,
v21[0] >> 53,
v14,
v15,
a5,
a6,
a7,
a8,
v16,
v17,
a11,
a12,
v20);
result = 0xFFFFFFFFLL;
}
*a2 = v19;
}
return result;
}
|
JS_ToIndex:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV RBX,RSI
MOV R14,RDI
CMP ECX,-0x9
JC 0x001274ca
INC dword ptr [RDX]
LAB_001274ca:
LEA RSI,[RSP + 0x8]
MOV RDI,R14
CALL 0x0012723e
MOV ECX,EAX
MOV EAX,0xffffffff
TEST ECX,ECX
JNZ 0x0012750e
MOV R15,qword ptr [RSP + 0x8]
XOR EAX,EAX
MOV RCX,R15
SHR RCX,0x35
JZ 0x0012750b
LEA RSI,[0x1a062a]
XOR R15D,R15D
MOV RDI,R14
XOR EAX,EAX
CALL 0x001205f0
MOV EAX,0xffffffff
LAB_0012750b:
MOV qword ptr [RBX],R15
LAB_0012750e:
ADD RSP,0x10
POP RBX
POP R14
POP R15
RET
|
int8 JS_ToIndex(int8 param_1,ulong *param_2,int *param_3,uint param_4)
{
int iVar1;
int8 uVar2;
ulong uVar3;
ulong local_20;
if (0xfffffff6 < param_4) {
*param_3 = *param_3 + 1;
}
iVar1 = JS_ToInt64SatFree(param_1,&local_20);
uVar2 = 0xffffffff;
if (iVar1 == 0) {
uVar2 = 0;
uVar3 = local_20;
if (local_20 >> 0x35 != 0) {
uVar3 = 0;
JS_ThrowRangeError(param_1,"invalid array index");
uVar2 = 0xffffffff;
}
*param_2 = uVar3;
}
return uVar2;
}
|
|
12,102 |
my_casefold_ujis
|
eloqsql/strings/ctype-ujis.c
|
static size_t
my_casefold_ujis(CHARSET_INFO *cs,
const char *src, size_t srclen,
char *dst, size_t dstlen __attribute__((unused)),
const uchar * const map,
size_t is_upper)
{
const char *srcend= src + srclen, *dst0= dst;
while (src < srcend)
{
size_t mblen= my_ismbchar(cs, src, srcend);
if (mblen)
{
MY_UNICASE_CHARACTER *ch;
ch= (mblen == 2) ?
get_case_info_for_ch(cs, 0, (uchar) src[0], (uchar) src[1]) :
get_case_info_for_ch(cs, 1, (uchar) src[1], (uchar) src[2]);
if (ch)
{
int code= is_upper ? ch->toupper : ch->tolower;
src+= mblen;
if (code > 0xFFFF)
*dst++= (char) (uchar) ((code >> 16) & 0xFF);
if (code > 0xFF)
*dst++= (char) (uchar) ((code >> 8) & 0xFF);
*dst++= (char) (uchar) (code & 0xFF);
}
else
{
if (mblen == 3)
*dst++= *src++;
*dst++= *src++;
*dst++= *src++;
}
}
else
{
*dst++= (char) map[(uchar) *src++];
}
}
return (size_t) (dst - dst0);
}
|
O3
|
c
|
my_casefold_ujis:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, -0x40(%rbp)
movq %rcx, %rbx
movq %rcx, -0x30(%rbp)
testq %rdx, %rdx
jle 0xe0ea7
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
addq %rsi, %r15
xorl %eax, %eax
testq %r9, %r9
sete %al
shll $0x2, %eax
movq %rax, -0x38(%rbp)
xorl %r14d, %r14d
movq -0x30(%rbp), %rbx
movq 0xb8(%r13), %rax
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq *0xc0(%rax)
cmpl $0x2, %eax
cmovll %r14d, %eax
testl %eax, %eax
je 0xe0e01
cmpl $0x2, %eax
jne 0xe0e17
movzbl (%r12), %ecx
movq 0x78(%r13), %rdx
movq 0x8(%rdx), %rdx
movq (%rdx,%rcx,8), %rcx
testq %rcx, %rcx
je 0xe0e71
movzbl 0x1(%r12), %edx
jmp 0xe0e38
movzbl (%r12), %eax
incq %r12
movq -0x40(%rbp), %rcx
movb (%rcx,%rax), %al
movb %al, (%rbx)
jmp 0xe0e9b
movzbl 0x1(%r12), %ecx
movq 0x78(%r13), %rdx
movq 0x8(%rdx), %rdx
movq 0x800(%rdx,%rcx,8), %rcx
testq %rcx, %rcx
je 0xe0e60
movzbl 0x2(%r12), %edx
leaq (%rdx,%rdx,2), %rdx
leaq (%rcx,%rdx,4), %rcx
testq %rcx, %rcx
je 0xe0e60
movq -0x38(%rbp), %rdx
movl (%rcx,%rdx), %ecx
cmpl $0x10000, %ecx # imm = 0x10000
jl 0xe0e89
movl %ecx, %edx
shrl $0x10, %edx
movb %dl, (%rbx)
incq %rbx
jmp 0xe0e91
cmpl $0x3, %eax
jne 0xe0e71
movb (%r12), %al
incq %r12
movb %al, (%rbx)
incq %rbx
movb (%r12), %al
movb %al, (%rbx)
movb 0x1(%r12), %al
addq $0x2, %r12
movb %al, 0x1(%rbx)
addq $0x2, %rbx
jmp 0xe0e9e
cmpl $0x100, %ecx # imm = 0x100
jl 0xe0e96
movb %ch, (%rbx)
incq %rbx
addq %rax, %r12
movb %cl, (%rbx)
incq %rbx
cmpq %r15, %r12
jb 0xe0dbd
subq -0x30(%rbp), %rbx
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
my_casefold_ujis:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rbp+var_40], r8
mov rbx, rcx
mov [rbp+var_30], rcx
test rdx, rdx
jle loc_E0EA7
mov r15, rdx
mov r12, rsi
mov r13, rdi
add r15, rsi
xor eax, eax
test r9, r9
setz al
shl eax, 2
mov [rbp+var_38], rax
xor r14d, r14d
mov rbx, [rbp+var_30]
loc_E0DBD:
mov rax, [r13+0B8h]
mov rdi, r13
mov rsi, r12
mov rdx, r15
call qword ptr [rax+0C0h]
cmp eax, 2
cmovl eax, r14d
test eax, eax
jz short loc_E0E01
cmp eax, 2
jnz short loc_E0E17
movzx ecx, byte ptr [r12]
mov rdx, [r13+78h]
mov rdx, [rdx+8]
mov rcx, [rdx+rcx*8]
test rcx, rcx
jz short loc_E0E71
movzx edx, byte ptr [r12+1]
jmp short loc_E0E38
loc_E0E01:
movzx eax, byte ptr [r12]
inc r12
mov rcx, [rbp+var_40]
mov al, [rcx+rax]
mov [rbx], al
jmp loc_E0E9B
loc_E0E17:
movzx ecx, byte ptr [r12+1]
mov rdx, [r13+78h]
mov rdx, [rdx+8]
mov rcx, [rdx+rcx*8+800h]
test rcx, rcx
jz short loc_E0E60
movzx edx, byte ptr [r12+2]
loc_E0E38:
lea rdx, [rdx+rdx*2]
lea rcx, [rcx+rdx*4]
test rcx, rcx
jz short loc_E0E60
mov rdx, [rbp+var_38]
mov ecx, [rcx+rdx]
cmp ecx, 10000h
jl short loc_E0E89
mov edx, ecx
shr edx, 10h
mov [rbx], dl
inc rbx
jmp short loc_E0E91
loc_E0E60:
cmp eax, 3
jnz short loc_E0E71
mov al, [r12]
inc r12
mov [rbx], al
inc rbx
loc_E0E71:
mov al, [r12]
mov [rbx], al
mov al, [r12+1]
add r12, 2
mov [rbx+1], al
add rbx, 2
jmp short loc_E0E9E
loc_E0E89:
cmp ecx, 100h
jl short loc_E0E96
loc_E0E91:
mov [rbx], ch
inc rbx
loc_E0E96:
add r12, rax
mov [rbx], cl
loc_E0E9B:
inc rbx
loc_E0E9E:
cmp r12, r15
jb loc_E0DBD
loc_E0EA7:
sub rbx, [rbp+var_30]
mov rax, rbx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
_BYTE * my_casefold_ujis(
long long a1,
unsigned __int8 *a2,
long long a3,
unsigned __int8 *a4,
long long a5,
long long a6)
{
unsigned __int8 *v6; // rbx
unsigned __int8 *v7; // r12
unsigned long long v8; // r15
long long v9; // rax
long long v10; // rcx
long long v11; // rdx
long long v12; // rax
long long v13; // rcx
int v14; // ecx
unsigned __int8 v15; // al
unsigned __int8 v16; // al
long long v19; // [rsp+8h] [rbp-38h]
v6 = a4;
if ( a3 > 0 )
{
v7 = a2;
v8 = (unsigned long long)&a2[a3];
v19 = 4 * (unsigned int)(a6 == 0);
v6 = a4;
while ( 1 )
{
v9 = (*(long long ( **)(long long, unsigned __int8 *, unsigned long long))(*(_QWORD *)(a1 + 184) + 192LL))(
a1,
v7,
v8);
if ( (int)v9 < 2 )
v9 = 0LL;
if ( !(_DWORD)v9 )
{
v12 = *v7++;
*v6 = *(_BYTE *)(a5 + v12);
goto LABEL_21;
}
if ( (_DWORD)v9 != 2 )
break;
v10 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 120) + 8LL) + 8LL * *v7);
if ( v10 )
{
v11 = v7[1];
LABEL_12:
v13 = v10 + 12 * v11;
if ( v13 )
{
v14 = *(_DWORD *)(v13 + v19);
if ( v14 >= 0x10000 )
{
*v6++ = BYTE2(v14);
goto LABEL_19;
}
if ( v14 >= 256 )
LABEL_19:
*v6++ = BYTE1(v14);
v7 += v9;
*v6 = v14;
LABEL_21:
++v6;
goto LABEL_22;
}
goto LABEL_15;
}
LABEL_17:
*v6 = *v7;
v16 = v7[1];
v7 += 2;
v6[1] = v16;
v6 += 2;
LABEL_22:
if ( (unsigned long long)v7 >= v8 )
return (_BYTE *)(v6 - a4);
}
v10 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 120) + 8LL) + 8LL * v7[1] + 2048);
if ( v10 )
{
v11 = v7[2];
goto LABEL_12;
}
LABEL_15:
if ( (_DWORD)v9 == 3 )
{
v15 = *v7++;
*v6++ = v15;
}
goto LABEL_17;
}
return (_BYTE *)(v6 - a4);
}
|
my_casefold_ujis:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RBP + -0x40],R8
MOV RBX,RCX
MOV qword ptr [RBP + -0x30],RCX
TEST RDX,RDX
JLE 0x001e0ea7
MOV R15,RDX
MOV R12,RSI
MOV R13,RDI
ADD R15,RSI
XOR EAX,EAX
TEST R9,R9
SETZ AL
SHL EAX,0x2
MOV qword ptr [RBP + -0x38],RAX
XOR R14D,R14D
MOV RBX,qword ptr [RBP + -0x30]
LAB_001e0dbd:
MOV RAX,qword ptr [R13 + 0xb8]
MOV RDI,R13
MOV RSI,R12
MOV RDX,R15
CALL qword ptr [RAX + 0xc0]
CMP EAX,0x2
CMOVL EAX,R14D
TEST EAX,EAX
JZ 0x001e0e01
CMP EAX,0x2
JNZ 0x001e0e17
MOVZX ECX,byte ptr [R12]
MOV RDX,qword ptr [R13 + 0x78]
MOV RDX,qword ptr [RDX + 0x8]
MOV RCX,qword ptr [RDX + RCX*0x8]
TEST RCX,RCX
JZ 0x001e0e71
MOVZX EDX,byte ptr [R12 + 0x1]
JMP 0x001e0e38
LAB_001e0e01:
MOVZX EAX,byte ptr [R12]
INC R12
MOV RCX,qword ptr [RBP + -0x40]
MOV AL,byte ptr [RCX + RAX*0x1]
MOV byte ptr [RBX],AL
JMP 0x001e0e9b
LAB_001e0e17:
MOVZX ECX,byte ptr [R12 + 0x1]
MOV RDX,qword ptr [R13 + 0x78]
MOV RDX,qword ptr [RDX + 0x8]
MOV RCX,qword ptr [RDX + RCX*0x8 + 0x800]
TEST RCX,RCX
JZ 0x001e0e60
MOVZX EDX,byte ptr [R12 + 0x2]
LAB_001e0e38:
LEA RDX,[RDX + RDX*0x2]
LEA RCX,[RCX + RDX*0x4]
TEST RCX,RCX
JZ 0x001e0e60
MOV RDX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RCX + RDX*0x1]
CMP ECX,0x10000
JL 0x001e0e89
MOV EDX,ECX
SHR EDX,0x10
MOV byte ptr [RBX],DL
INC RBX
JMP 0x001e0e91
LAB_001e0e60:
CMP EAX,0x3
JNZ 0x001e0e71
MOV AL,byte ptr [R12]
INC R12
MOV byte ptr [RBX],AL
INC RBX
LAB_001e0e71:
MOV AL,byte ptr [R12]
MOV byte ptr [RBX],AL
MOV AL,byte ptr [R12 + 0x1]
ADD R12,0x2
MOV byte ptr [RBX + 0x1],AL
ADD RBX,0x2
JMP 0x001e0e9e
LAB_001e0e89:
CMP ECX,0x100
JL 0x001e0e96
LAB_001e0e91:
MOV byte ptr [RBX],CH
INC RBX
LAB_001e0e96:
ADD R12,RAX
MOV byte ptr [RBX],CL
LAB_001e0e9b:
INC RBX
LAB_001e0e9e:
CMP R12,R15
JC 0x001e0dbd
LAB_001e0ea7:
SUB RBX,qword ptr [RBP + -0x30]
MOV RAX,RBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long my_casefold_ujis(long param_1,byte *param_2,long param_3,byte *param_4,long param_5,
long param_6)
{
byte *pbVar1;
byte bVar2;
uint uVar3;
int iVar4;
long lVar6;
byte *pbVar7;
byte *pbVar8;
ulong uVar5;
pbVar7 = param_4;
if (0 < param_3) {
pbVar8 = param_2 + param_3;
do {
uVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,pbVar8);
uVar5 = (ulong)uVar3;
if ((int)uVar3 < 2) {
uVar5 = 0;
}
iVar4 = (int)uVar5;
if (iVar4 == 0) {
bVar2 = *param_2;
param_2 = param_2 + 1;
*pbVar7 = *(byte *)(param_5 + (ulong)bVar2);
LAB_001e0e9b:
pbVar7 = pbVar7 + 1;
}
else {
if (iVar4 == 2) {
lVar6 = *(long *)(*(long *)(*(long *)(param_1 + 0x78) + 8) + (ulong)*param_2 * 8);
if (lVar6 != 0) {
bVar2 = param_2[1];
LAB_001e0e38:
lVar6 = lVar6 + (ulong)bVar2 * 0xc;
if (lVar6 == 0) goto LAB_001e0e60;
iVar4 = *(int *)(lVar6 + (ulong)(param_6 == 0) * 4);
if (iVar4 < 0x10000) {
if (0xff < iVar4) goto LAB_001e0e91;
}
else {
*pbVar7 = (byte)((uint)iVar4 >> 0x10);
pbVar7 = pbVar7 + 1;
LAB_001e0e91:
*pbVar7 = (byte)((uint)iVar4 >> 8);
pbVar7 = pbVar7 + 1;
}
param_2 = param_2 + uVar5;
*pbVar7 = (byte)iVar4;
goto LAB_001e0e9b;
}
}
else {
lVar6 = *(long *)(*(long *)(*(long *)(param_1 + 0x78) + 8) + 0x800 + (ulong)param_2[1] * 8
);
if (lVar6 != 0) {
bVar2 = param_2[2];
goto LAB_001e0e38;
}
LAB_001e0e60:
if (iVar4 == 3) {
bVar2 = *param_2;
param_2 = param_2 + 1;
*pbVar7 = bVar2;
pbVar7 = pbVar7 + 1;
}
}
*pbVar7 = *param_2;
pbVar1 = param_2 + 1;
param_2 = param_2 + 2;
pbVar7[1] = *pbVar1;
pbVar7 = pbVar7 + 2;
}
} while (param_2 < pbVar8);
}
return (long)pbVar7 - (long)param_4;
}
|
|
12,103 |
Game::updateMouse()
|
GhostEscape/src/core/game.cpp
|
void Game::updateMouse()
{
mouse_buttons_ = SDL_GetMouseState(&mouse_position_.x, &mouse_position_.y);
// 限制比例,不要出现黑便的做法
int w, h;
SDL_GetWindowSize(window_, &w, &h);
SDL_SetWindowAspectRatio(window_, screen_size_.x/screen_size_.y, screen_size_.x/screen_size_.y);
mouse_position_ *= screen_size_ / glm::vec2(w,h);
// 保持黑边,不限制比例的做法
// SDL_FRect rect;
// SDL_GetRenderLogicalPresentationRect(renderer_, &rect);
// mouse_position_ = (mouse_position_ - glm::vec2(rect.x, rect.y)) * screen_size_ / glm::vec2(rect.w, rect.h);
}
|
O0
|
cpp
|
Game::updateMouse():
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rsi
movq %rsi, -0x28(%rbp)
movq %rsi, %rdi
addq $0x10, %rdi
addq $0x14, %rsi
callq 0x6330
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x18(%rax)
movq 0x50(%rax), %rdi
leaq -0xc(%rbp), %rsi
leaq -0x10(%rbp), %rdx
callq 0x6590
movq -0x28(%rbp), %rax
movq 0x50(%rax), %rdi
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, -0x38(%rbp)
movss 0x8(%rax), %xmm1
movss 0xc(%rax), %xmm0
divss %xmm0, %xmm1
movaps %xmm1, %xmm0
callq 0x6110
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
leaq -0x20(%rbp), %rdi
movq %rdi, -0x30(%rbp)
callq 0x79c0
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x7dd0
movq -0x28(%rbp), %rdi
movlpd %xmm0, -0x18(%rbp)
addq $0x10, %rdi
leaq -0x18(%rbp), %rsi
callq 0x7e20
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_ZN4Game11updateMouseEv:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov rsi, [rbp+var_8]
mov [rbp+var_28], rsi
mov rdi, rsi
add rdi, 10h
add rsi, 14h
call _SDL_GetMouseState
mov ecx, eax
mov rax, [rbp+var_28]
mov [rax+18h], ecx
mov rdi, [rax+50h]
lea rsi, [rbp+var_C]
lea rdx, [rbp+var_10]
call _SDL_GetWindowSize
mov rax, [rbp+var_28]
mov rdi, [rax+50h]
mov rcx, rax
add rcx, 8
mov [rbp+var_38], rcx
movss xmm1, dword ptr [rax+8]
movss xmm0, dword ptr [rax+0Ch]
divss xmm1, xmm0
movaps xmm0, xmm1
call _SDL_SetWindowAspectRatio
mov esi, [rbp+var_C]
mov edx, [rbp+var_10]
lea rdi, [rbp+var_20]
mov [rbp+var_30], rdi
call _ZN3glm3vecILi2EfLNS_9qualifierE0EEC2IiiEET_T0_; glm::vec<2,float,(glm::qualifier)0>::vec<int,int>(int,int)
mov rdi, [rbp+var_38]
mov rsi, [rbp+var_30]
call _ZN3glmdvIfLNS_9qualifierE0EEENS_3vecILi2ET_XT0_EEERKS4_S6_; glm::operator/<float,(glm::qualifier)0>(glm::vec<2,float,(glm::qualifier)0> const&,glm::vec<2,float,(glm::qualifier)0> const&)
mov rdi, [rbp+var_28]
movlpd [rbp+var_18], xmm0
add rdi, 10h
lea rsi, [rbp+var_18]
call _ZN3glm3vecILi2EfLNS_9qualifierE0EEmLIfEERS2_RKNS0_ILi2ET_LS1_0EEE; glm::vec<2,float,(glm::qualifier)0>::operator*=<float>(glm::vec<2,float,(glm::qualifier)0> const&)
add rsp, 40h
pop rbp
retn
|
long long Game::updateMouse(Game *this)
{
double v1; // xmm1_8
_BYTE v3[8]; // [rsp+20h] [rbp-20h] BYREF
double v4; // [rsp+28h] [rbp-18h] BYREF
unsigned int v5; // [rsp+30h] [rbp-10h] BYREF
unsigned int v6; // [rsp+34h] [rbp-Ch] BYREF
Game *v7; // [rsp+38h] [rbp-8h]
v7 = this;
*((_DWORD *)this + 6) = SDL_GetMouseState((char *)this + 16, (char *)this + 20);
SDL_GetWindowSize(*((_QWORD *)this + 10), &v6, &v5);
*(_QWORD *)&v1 = *((unsigned int *)this + 2);
*(float *)&v1 = *(float *)&v1 / *((float *)this + 3);
SDL_SetWindowAspectRatio(*((_QWORD *)this + 10), v1);
glm::vec<2,float,(glm::qualifier)0>::vec<int,int>(v3, v6, v5);
v4 = glm::operator/<float,(glm::qualifier)0>((char *)this + 8, v3);
return glm::vec<2,float,(glm::qualifier)0>::operator*=<float>((char *)this + 16, &v4);
}
|
updateMouse:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV RSI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x28],RSI
MOV RDI,RSI
ADD RDI,0x10
ADD RSI,0x14
CALL 0x00106330
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX + 0x18],ECX
MOV RDI,qword ptr [RAX + 0x50]
LEA RSI,[RBP + -0xc]
LEA RDX,[RBP + -0x10]
CALL 0x00106590
MOV RAX,qword ptr [RBP + -0x28]
MOV RDI,qword ptr [RAX + 0x50]
MOV RCX,RAX
ADD RCX,0x8
MOV qword ptr [RBP + -0x38],RCX
MOVSS XMM1,dword ptr [RAX + 0x8]
MOVSS XMM0,dword ptr [RAX + 0xc]
DIVSS XMM1,XMM0
MOVAPS XMM0,XMM1
CALL 0x00106110
MOV ESI,dword ptr [RBP + -0xc]
MOV EDX,dword ptr [RBP + -0x10]
LEA RDI,[RBP + -0x20]
MOV qword ptr [RBP + -0x30],RDI
CALL 0x001079c0
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RBP + -0x30]
CALL 0x00107dd0
MOV RDI,qword ptr [RBP + -0x28]
MOVLPD qword ptr [RBP + -0x18],XMM0
ADD RDI,0x10
LEA RSI,[RBP + -0x18]
CALL 0x00107e20
ADD RSP,0x40
POP RBP
RET
|
/* Game::updateMouse() */
void __thiscall Game::updateMouse(Game *this)
{
int4 uVar1;
vec<2,float,(glm::qualifier)0> local_28 [8];
int8 local_20;
int local_18;
int local_14;
Game *local_10;
local_10 = this;
uVar1 = SDL_GetMouseState(this + 0x10,this + 0x14);
*(int4 *)(this + 0x18) = uVar1;
SDL_GetWindowSize(*(int8 *)(this + 0x50),&local_14,&local_18);
SDL_SetWindowAspectRatio
(*(float *)(this + 8) / *(float *)(this + 0xc),*(int8 *)(this + 0x50));
glm::vec<2,float,(glm::qualifier)0>::vec<int,int>(local_28,local_14,local_18);
local_20 = glm::operator/((vec *)(this + 8),(vec *)local_28);
glm::vec<2,float,(glm::qualifier)0>::operator*=
((vec<2,float,(glm::qualifier)0> *)(this + 0x10),(vec *)&local_20);
return;
}
|
|
12,104 |
ma_check_unique
|
eloqsql/storage/maria/ma_unique.c
|
my_bool _ma_check_unique(MARIA_HA *info, MARIA_UNIQUEDEF *def,
const uchar *record,
ha_checksum unique_hash, my_off_t disk_pos)
{
my_off_t lastpos=info->cur_row.lastpos;
MARIA_KEYDEF *keyinfo= &info->s->keyinfo[def->key];
uchar *key_buff= info->lastkey_buff2;
MARIA_KEY key;
int error= 0;
DBUG_ENTER("_ma_check_unique");
DBUG_PRINT("enter",("unique_hash: %lu", (ulong) unique_hash));
/* We need to store the hash value as a key in the record, breaking const */
maria_unique_store(record+keyinfo->seg->start, unique_hash);
/* Can't be spatial so it's ok to call _ma_make_key directly here */
_ma_make_key(info, &key, def->key, key_buff, record, 0, 0);
/* The above changed info->lastkey_buff2. Inform maria_rnext_same(). */
info->update&= ~HA_STATE_RNEXT_SAME;
/* Setup that unique key is active key */
info->last_key.keyinfo= keyinfo;
/* any key pointer in data is destroyed */
info->lastinx= ~0;
DBUG_ASSERT(key.data_length == MARIA_UNIQUE_HASH_LENGTH);
if (_ma_search(info, &key, SEARCH_FIND | SEARCH_SAVE_BUFF,
info->s->state.key_root[def->key]))
{
info->page_changed=1; /* Can't optimize read next */
info->cur_row.lastpos= lastpos;
goto end;
}
for (;;)
{
if (info->cur_row.lastpos != disk_pos &&
!(*info->s->compare_unique)(info,def,record,info->cur_row.lastpos))
{
my_errno=HA_ERR_FOUND_DUPP_UNIQUE;
info->errkey= (int) def->key;
info->dup_key_pos= info->cur_row.lastpos;
info->page_changed= 1; /* Can't optimize read next */
info->cur_row.lastpos= lastpos;
DBUG_PRINT("info",("Found duplicate"));
error= 1; /* Found identical */
goto end;
}
DBUG_ASSERT(info->last_key.data_length == MARIA_UNIQUE_HASH_LENGTH);
if (_ma_search_next(info, &info->last_key, SEARCH_BIGGER,
info->s->state.key_root[def->key]) ||
bcmp(info->last_key.data, key_buff, MARIA_UNIQUE_HASH_LENGTH))
{
info->page_changed= 1; /* Can't optimize read next */
info->cur_row.lastpos= lastpos;
break; /* end of tree */
}
}
end:
DBUG_RETURN(error);
}
|
O3
|
c
|
ma_check_unique:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, -0x38(%rbp)
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x98(%rdi), %r15
movq 0x570(%rax), %rax
movzbl 0x2(%rsi), %esi
imulq $0x118, %rsi, %r9 # imm = 0x118
leaq (%rax,%r9), %rsi
movq %rsi, -0x30(%rbp)
movq 0x390(%rdi), %r12
movq 0xc0(%rax,%r9), %rsi
movl 0x8(%rsi), %esi
movb %cl, 0x3(%rdx,%rsi)
movq 0xc0(%rax,%r9), %rsi
movl 0x8(%rsi), %esi
movb %ch, 0x2(%rdx,%rsi)
movq %rdx, %r8
movl %ecx, %esi
shrl $0x10, %esi
movq 0xc0(%rax,%r9), %rdi
movl 0x8(%rdi), %edi
movb %sil, 0x1(%rdx,%rdi)
shrl $0x18, %ecx
movq 0xc0(%rax,%r9), %rax
movl 0x8(%rax), %eax
movb %cl, (%rdx,%rax)
movzbl 0x2(%r14), %edx
movq $0x0, (%rsp)
leaq -0x60(%rbp), %r13
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rcx
movq %r8, -0x40(%rbp)
xorl %r9d, %r9d
callq 0x36bab
andb $-0x11, 0x625(%rbx)
movq -0x30(%rbp), %rax
movq %rax, 0x208(%rbx)
movl $0xffffffff, 0x62c(%rbx) # imm = 0xFFFFFFFF
movq (%rbx), %rax
movq 0x118(%rax), %rax
movzbl 0x2(%r14), %ecx
movq (%rax,%rcx,8), %rcx
movq %rbx, %rdi
movq %r13, %rsi
movl $0x21, %edx
callq 0x55f1f
xorl %ecx, %ecx
testl %eax, %eax
movq %r15, %rax
jne 0x4280e
movq -0x38(%rbp), %r15
movq %rax, -0x30(%rbp)
leaq 0x200(%rbx), %r13
movq 0x98(%rbx), %rcx
cmpq %r15, %rcx
je 0x427ad
movq (%rbx), %rax
movq %rbx, %rdi
movq %r14, %rsi
movq -0x40(%rbp), %rdx
callq *0x6c0(%rax)
testb %al, %al
je 0x427e4
movq (%rbx), %rax
movq 0x118(%rax), %rax
movzbl 0x2(%r14), %ecx
movq (%rax,%rcx,8), %rcx
movq %rbx, %rdi
movq %r13, %rsi
movl $0x8, %edx
callq 0x57e4b
testl %eax, %eax
jne 0x427e0
movq (%r13), %rax
movl (%rax), %eax
cmpl (%r12), %eax
je 0x4278a
xorl %ecx, %ecx
jmp 0x4280a
callq 0xa1b22
movl $0x8d, (%rax)
movzbl 0x2(%r14), %eax
movl %eax, 0x660(%rbx)
movq 0x98(%rbx), %rax
movq %rax, 0x428(%rbx)
movb $0x1, %cl
movq -0x30(%rbp), %rax
movb $0x1, 0x684(%rbx)
movq %rax, 0x98(%rbx)
movl %ecx, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
_ma_check_unique:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov [rbp+var_38], r8
mov r14, rsi
mov rbx, rdi
mov rax, [rdi]
mov r15, [rdi+98h]
mov rax, [rax+570h]
movzx esi, byte ptr [rsi+2]
imul r9, rsi, 118h
lea rsi, [rax+r9]
mov [rbp+var_30], rsi
mov r12, [rdi+390h]
mov rsi, [rax+r9+0C0h]
mov esi, [rsi+8]
mov [rdx+rsi+3], cl
mov rsi, [rax+r9+0C0h]
mov esi, [rsi+8]
mov [rdx+rsi+2], ch
mov r8, rdx
mov esi, ecx
shr esi, 10h
mov rdi, [rax+r9+0C0h]
mov edi, [rdi+8]
mov [rdx+rdi+1], sil
shr ecx, 18h
mov rax, [rax+r9+0C0h]
mov eax, [rax+8]
mov [rdx+rax], cl
movzx edx, byte ptr [r14+2]
mov [rsp+70h+var_70], 0
lea r13, [rbp+var_60]
mov rdi, rbx
mov rsi, r13
mov rcx, r12
mov [rbp+var_40], r8
xor r9d, r9d
call _ma_make_key
and byte ptr [rbx+625h], 0EFh
mov rax, [rbp+var_30]
mov [rbx+208h], rax
mov dword ptr [rbx+62Ch], 0FFFFFFFFh
mov rax, [rbx]
mov rax, [rax+118h]
movzx ecx, byte ptr [r14+2]
mov rcx, [rax+rcx*8]
mov rdi, rbx
mov rsi, r13
mov edx, 21h ; '!'
call _ma_search
xor ecx, ecx
test eax, eax
mov rax, r15
jnz loc_4280E
mov r15, [rbp+var_38]
mov [rbp+var_30], rax
lea r13, [rbx+200h]
loc_4278A:
mov rcx, [rbx+98h]
cmp rcx, r15
jz short loc_427AD
mov rax, [rbx]
mov rdi, rbx
mov rsi, r14
mov rdx, [rbp+var_40]
call qword ptr [rax+6C0h]
test al, al
jz short loc_427E4
loc_427AD:
mov rax, [rbx]
mov rax, [rax+118h]
movzx ecx, byte ptr [r14+2]
mov rcx, [rax+rcx*8]
mov rdi, rbx
mov rsi, r13
mov edx, 8
call _ma_search_next
test eax, eax
jnz short loc_427E0
mov rax, [r13+0]
mov eax, [rax]
cmp eax, [r12]
jz short loc_4278A
loc_427E0:
xor ecx, ecx
jmp short loc_4280A
loc_427E4:
call _my_thread_var
mov dword ptr [rax], 8Dh
movzx eax, byte ptr [r14+2]
mov [rbx+660h], eax
mov rax, [rbx+98h]
mov [rbx+428h], rax
mov cl, 1
loc_4280A:
mov rax, [rbp+var_30]
loc_4280E:
mov byte ptr [rbx+684h], 1
mov [rbx+98h], rax
mov eax, ecx
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long ma_check_unique(_QWORD *a1, long long a2, long long a3, int a4, long long a5)
{
long long v5; // r15
long long v6; // rax
long long v7; // r9
char *v8; // r12
unsigned int v10; // edx
int v11; // eax
unsigned int v12; // ecx
bool v13; // zf
long long v14; // rax
long long v15; // r15
long long v16; // rdx
long long v17; // rcx
long long v18; // r8
_BYTE v20[32]; // [rsp+10h] [rbp-60h] BYREF
long long v21; // [rsp+30h] [rbp-40h]
long long v22; // [rsp+38h] [rbp-38h]
long long v23; // [rsp+40h] [rbp-30h]
v22 = a5;
v5 = a1[19];
v6 = *(_QWORD *)(*a1 + 1392LL);
v7 = 280LL * *(unsigned __int8 *)(a2 + 2);
v23 = v6 + v7;
v8 = (char *)a1[114];
*(_BYTE *)(a3 + *(unsigned int *)(*(_QWORD *)(v6 + v7 + 192) + 8LL) + 3) = a4;
*(_BYTE *)(a3 + *(unsigned int *)(*(_QWORD *)(v6 + v7 + 192) + 8LL) + 2) = BYTE1(a4);
*(_BYTE *)(a3 + *(unsigned int *)(*(_QWORD *)(v6 + v7 + 192) + 8LL) + 1) = BYTE2(a4);
*(_BYTE *)(a3 + *(unsigned int *)(*(_QWORD *)(v6 + v7 + 192) + 8LL)) = HIBYTE(a4);
v10 = *(unsigned __int8 *)(a2 + 2);
v21 = a3;
ma_make_key(a1, (long long)v20, v10, v8, a3, 0LL, 0LL);
*((_BYTE *)a1 + 1573) &= ~0x10u;
a1[65] = v23;
*((_DWORD *)a1 + 395) = -1;
v11 = ma_search(a1, v20, 33LL, *(_QWORD *)(*(_QWORD *)(*a1 + 280LL) + 8LL * *(unsigned __int8 *)(a2 + 2)));
v12 = 0;
v13 = v11 == 0;
v14 = v5;
if ( v13 )
{
v15 = v22;
v23 = v14;
while ( a1[19] == v15 || (*(unsigned __int8 ( **)(_QWORD *, long long, long long))(*a1 + 1728LL))(a1, a2, v21) )
{
if ( (unsigned int)ma_search_next(
a1,
a1 + 64,
8LL,
*(_QWORD *)(*(_QWORD *)(*a1 + 280LL) + 8LL * *(unsigned __int8 *)(a2 + 2)))
|| *(_DWORD *)a1[64] != *(_DWORD *)v8 )
{
v12 = 0;
goto LABEL_9;
}
}
*(_DWORD *)my_thread_var(a1, a2, v16, v17, v18) = 141;
*((_DWORD *)a1 + 408) = *(unsigned __int8 *)(a2 + 2);
a1[133] = a1[19];
LOBYTE(v12) = 1;
LABEL_9:
v14 = v23;
}
*((_BYTE *)a1 + 1668) = 1;
a1[19] = v14;
return v12;
}
|
_ma_check_unique:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RBP + -0x38],R8
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr [RDI]
MOV R15,qword ptr [RDI + 0x98]
MOV RAX,qword ptr [RAX + 0x570]
MOVZX ESI,byte ptr [RSI + 0x2]
IMUL R9,RSI,0x118
LEA RSI,[RAX + R9*0x1]
MOV qword ptr [RBP + -0x30],RSI
MOV R12,qword ptr [RDI + 0x390]
MOV RSI,qword ptr [RAX + R9*0x1 + 0xc0]
MOV ESI,dword ptr [RSI + 0x8]
MOV byte ptr [RDX + RSI*0x1 + 0x3],CL
MOV RSI,qword ptr [RAX + R9*0x1 + 0xc0]
MOV ESI,dword ptr [RSI + 0x8]
MOV byte ptr [RDX + RSI*0x1 + 0x2],CH
MOV R8,RDX
MOV ESI,ECX
SHR ESI,0x10
MOV RDI,qword ptr [RAX + R9*0x1 + 0xc0]
MOV EDI,dword ptr [RDI + 0x8]
MOV byte ptr [RDX + RDI*0x1 + 0x1],SIL
SHR ECX,0x18
MOV RAX,qword ptr [RAX + R9*0x1 + 0xc0]
MOV EAX,dword ptr [RAX + 0x8]
MOV byte ptr [RDX + RAX*0x1],CL
MOVZX EDX,byte ptr [R14 + 0x2]
MOV qword ptr [RSP],0x0
LEA R13,[RBP + -0x60]
MOV RDI,RBX
MOV RSI,R13
MOV RCX,R12
MOV qword ptr [RBP + -0x40],R8
XOR R9D,R9D
CALL 0x00136bab
AND byte ptr [RBX + 0x625],0xef
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBX + 0x208],RAX
MOV dword ptr [RBX + 0x62c],0xffffffff
MOV RAX,qword ptr [RBX]
MOV RAX,qword ptr [RAX + 0x118]
MOVZX ECX,byte ptr [R14 + 0x2]
MOV RCX,qword ptr [RAX + RCX*0x8]
MOV RDI,RBX
MOV RSI,R13
MOV EDX,0x21
CALL 0x00155f1f
XOR ECX,ECX
TEST EAX,EAX
MOV RAX,R15
JNZ 0x0014280e
MOV R15,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x30],RAX
LEA R13,[RBX + 0x200]
LAB_0014278a:
MOV RCX,qword ptr [RBX + 0x98]
CMP RCX,R15
JZ 0x001427ad
MOV RAX,qword ptr [RBX]
MOV RDI,RBX
MOV RSI,R14
MOV RDX,qword ptr [RBP + -0x40]
CALL qword ptr [RAX + 0x6c0]
TEST AL,AL
JZ 0x001427e4
LAB_001427ad:
MOV RAX,qword ptr [RBX]
MOV RAX,qword ptr [RAX + 0x118]
MOVZX ECX,byte ptr [R14 + 0x2]
MOV RCX,qword ptr [RAX + RCX*0x8]
MOV RDI,RBX
MOV RSI,R13
MOV EDX,0x8
CALL 0x00157e4b
TEST EAX,EAX
JNZ 0x001427e0
MOV RAX,qword ptr [R13]
MOV EAX,dword ptr [RAX]
CMP EAX,dword ptr [R12]
JZ 0x0014278a
LAB_001427e0:
XOR ECX,ECX
JMP 0x0014280a
LAB_001427e4:
CALL 0x001a1b22
MOV dword ptr [RAX],0x8d
MOVZX EAX,byte ptr [R14 + 0x2]
MOV dword ptr [RBX + 0x660],EAX
MOV RAX,qword ptr [RBX + 0x98]
MOV qword ptr [RBX + 0x428],RAX
MOV CL,0x1
LAB_0014280a:
MOV RAX,qword ptr [RBP + -0x30]
LAB_0014280e:
MOV byte ptr [RBX + 0x684],0x1
MOV qword ptr [RBX + 0x98],RAX
MOV EAX,ECX
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
ulong _ma_check_unique(long *param_1,long param_2,long param_3,int4 param_4,long param_5)
{
long lVar1;
int *piVar2;
char cVar3;
int iVar4;
int4 *puVar5;
long lVar6;
ulong uVar7;
long lVar8;
int1 local_68 [32];
long local_48;
long local_40;
long local_38;
lVar6 = param_1[0x13];
lVar1 = *(long *)(*param_1 + 0x570);
lVar8 = (ulong)*(byte *)(param_2 + 2) * 0x118;
local_38 = lVar1 + lVar8;
piVar2 = (int *)param_1[0x72];
*(char *)(param_3 + 3 + (ulong)*(uint *)(*(long *)(lVar1 + 0xc0 + lVar8) + 8)) = (char)param_4;
*(char *)(param_3 + 2 + (ulong)*(uint *)(*(long *)(lVar1 + 0xc0 + lVar8) + 8)) =
(char)((uint)param_4 >> 8);
*(char *)(param_3 + 1 + (ulong)*(uint *)(*(long *)(lVar1 + 0xc0 + lVar8) + 8)) =
(char)((uint)param_4 >> 0x10);
*(char *)(param_3 + (ulong)*(uint *)(*(long *)(lVar1 + 0xc0 + lVar8) + 8)) =
(char)((uint)param_4 >> 0x18);
local_48 = param_3;
local_40 = param_5;
_ma_make_key(param_1,local_68,*(int1 *)(param_2 + 2),piVar2,param_3,0,0);
*(byte *)((long)param_1 + 0x625) = *(byte *)((long)param_1 + 0x625) & 0xef;
param_1[0x41] = local_38;
*(int4 *)((long)param_1 + 0x62c) = 0xffffffff;
iVar4 = _ma_search(param_1,local_68,0x21,
*(int8 *)
(*(long *)(*param_1 + 0x118) + (ulong)*(byte *)(param_2 + 2) * 8));
lVar1 = local_40;
uVar7 = 0;
local_38 = lVar6;
if (iVar4 == 0) {
do {
lVar6 = param_1[0x13];
if ((lVar6 != lVar1) &&
(cVar3 = (**(code **)(*param_1 + 0x6c0))(param_1,param_2,local_48), cVar3 == '\0')) {
puVar5 = (int4 *)_my_thread_var();
*puVar5 = 0x8d;
*(uint *)(param_1 + 0xcc) = (uint)*(byte *)(param_2 + 2);
param_1[0x85] = param_1[0x13];
uVar7 = CONCAT71((int7)((ulong)lVar6 >> 8),1);
goto LAB_0014280e;
}
iVar4 = _ma_search_next(param_1,param_1 + 0x40,8,
*(int8 *)
(*(long *)(*param_1 + 0x118) + (ulong)*(byte *)(param_2 + 2) * 8));
} while ((iVar4 == 0) && (*(int *)param_1[0x40] == *piVar2));
uVar7 = 0;
}
LAB_0014280e:
*(int1 *)((long)param_1 + 0x684) = 1;
param_1[0x13] = local_38;
return uVar7 & 0xffffffff;
}
|
|
12,105 |
wt_thd_release_self
|
eloqsql/storage/maria/trnman.c
|
static void wt_thd_release_self(TRN *trn)
{
if (trn->wt)
{
WT_RESOURCE_ID rc;
rc.type= &ma_rc_dup_unique;
rc.value= (intptr)trn;
wt_thd_release(trn->wt, & rc);
trn->wt= 0;
}
}
|
O0
|
c
|
wt_thd_release_self:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x52167
leaq 0x2358da(%rip), %rax # 0x287a18
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
leaq -0x18(%rbp), %rsi
callq 0xcb460
movq -0x8(%rbp), %rax
movq $0x0, 0x8(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
|
wt_thd_release_self:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
cmp qword ptr [rax+8], 0
jz short loc_52167
lea rax, ma_rc_dup_unique
mov [rbp+var_10], rax
mov rax, [rbp+var_8]
mov [rbp+var_18], rax
mov rax, [rbp+var_8]
mov rdi, [rax+8]
lea rsi, [rbp+var_18]
call wt_thd_release
mov rax, [rbp+var_8]
mov qword ptr [rax+8], 0
loc_52167:
add rsp, 20h
pop rbp
retn
|
long long wt_thd_release_self(long long a1)
{
long long result; // rax
_QWORD v2[2]; // [rsp+8h] [rbp-18h] BYREF
long long v3; // [rsp+18h] [rbp-8h]
v3 = a1;
result = a1;
if ( *(_QWORD *)(a1 + 8) )
{
v2[1] = &ma_rc_dup_unique;
v2[0] = v3;
wt_thd_release(*(_QWORD *)(v3 + 8), v2);
result = v3;
*(_QWORD *)(v3 + 8) = 0LL;
}
return result;
}
|
wt_thd_release_self:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x8],0x0
JZ 0x00152167
LEA RAX,[0x387a18]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x8]
LEA RSI,[RBP + -0x18]
CALL 0x001cb460
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x8],0x0
LAB_00152167:
ADD RSP,0x20
POP RBP
RET
|
void wt_thd_release_self(long param_1)
{
long local_20;
int1 *local_18;
long local_10;
if (*(long *)(param_1 + 8) != 0) {
local_18 = ma_rc_dup_unique;
local_20 = param_1;
local_10 = param_1;
wt_thd_release(*(int8 *)(param_1 + 8),&local_20);
*(int8 *)(local_10 + 8) = 0;
}
return;
}
|
|
12,106 |
bchange
|
eloqsql/strings/bchange.c
|
void bchange(register uchar *dst, size_t old_length, register const uchar *src,
size_t new_length, size_t tot_length)
{
size_t rest=tot_length-old_length;
if (old_length < new_length)
bmove_upp(dst+rest+new_length,dst+tot_length,rest);
else
bmove(dst+new_length,dst+old_length,rest);
memcpy(dst,src,new_length);
}
|
O3
|
c
|
bchange:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rdi, %r15
movq %r8, %rdx
subq %rsi, %rdx
cmpq %rcx, %rsi
jae 0x2dc3a
leaq (%r15,%rdx), %rdi
addq %rbx, %rdi
addq %r15, %r8
movq %r8, %rsi
callq 0x2dc60
jmp 0x2dc46
leaq (%r15,%rbx), %rdi
addq %r15, %rsi
callq 0x24520
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x24250
nop
|
bchange:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rcx
mov r14, rdx
mov r15, rdi
mov rdx, r8
sub rdx, rsi
cmp rsi, rcx
jnb short loc_2DC3A
lea rdi, [r15+rdx]
add rdi, rbx
add r8, r15
mov rsi, r8
call bmove_upp
jmp short loc_2DC46
loc_2DC3A:
lea rdi, [r15+rbx]
add rsi, r15
call _memmove
loc_2DC46:
mov rdi, r15
mov rsi, r14
mov rdx, rbx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
jmp _memcpy
|
long long bchange(long long a1, unsigned long long a2, long long a3, unsigned long long a4, long long a5)
{
long long v7; // rdx
v7 = a5 - a2;
if ( a2 >= a4 )
memmove(a1 + a4, a1 + a2, v7);
else
bmove_upp(a4 + a1 + v7, a1 + a5, v7);
return memcpy(a1, a3, a4);
}
|
bchange:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RCX
MOV R14,RDX
MOV R15,RDI
MOV RDX,R8
SUB RDX,RSI
CMP RSI,RCX
JNC 0x0012dc3a
LEA RDI,[R15 + RDX*0x1]
ADD RDI,RBX
ADD R8,R15
MOV RSI,R8
CALL 0x0012dc60
JMP 0x0012dc46
LAB_0012dc3a:
LEA RDI,[R15 + RBX*0x1]
ADD RSI,R15
CALL 0x00124520
LAB_0012dc46:
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
JMP 0x00124250
|
void bchange(void *param_1,ulong param_2,void *param_3,ulong param_4,long param_5)
{
if (param_2 < param_4) {
bmove_upp((long)param_1 + param_4 + (param_5 - param_2),param_5 + (long)param_1);
}
else {
memmove((void *)((long)param_1 + param_4),(void *)(param_2 + (long)param_1),param_5 - param_2);
}
memcpy(param_1,param_3,param_4);
return;
}
|
|
12,107 |
func_uni_gbk_onechar
|
eloqsql/strings/ctype-gbk.c
|
static int func_uni_gbk_onechar(int code){
if ((code>=0x00A4)&&(code<=0x0451))
return(tab_uni_gbk0[code-0x00A4]);
if ((code>=0x2010)&&(code<=0x2312))
return(tab_uni_gbk1[code-0x2010]);
if ((code>=0x2460)&&(code<=0x2642))
return(tab_uni_gbk2[code-0x2460]);
if ((code>=0x3000)&&(code<=0x3129))
return(tab_uni_gbk3[code-0x3000]);
if ((code>=0x3220)&&(code<=0x32A3))
return(tab_uni_gbk4[code-0x3220]);
if ((code>=0x338E)&&(code<=0x33D5))
return(tab_uni_gbk5[code-0x338E]);
if ((code>=0x4E00)&&(code<=0x9FA5))
return(tab_uni_gbk6[code-0x4E00]);
if ((code>=0xF92C)&&(code<=0xFA29))
return(tab_uni_gbk7[code-0xF92C]);
if ((code>=0xFE30)&&(code<=0xFFE5))
return(tab_uni_gbk8[code-0xFE30]);
return(0);
}
|
O0
|
c
|
func_uni_gbk_onechar:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
cmpl $0xa4, -0x8(%rbp)
jl 0x73ad7
cmpl $0x451, -0x8(%rbp) # imm = 0x451
jg 0x73ad7
movl -0x8(%rbp), %eax
subl $0xa4, %eax
movslq %eax, %rcx
leaq 0xea5e5(%rip), %rax # 0x15e0b0
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x73c55
cmpl $0x2010, -0x8(%rbp) # imm = 0x2010
jl 0x73b07
cmpl $0x2312, -0x8(%rbp) # imm = 0x2312
jg 0x73b07
movl -0x8(%rbp), %eax
subl $0x2010, %eax # imm = 0x2010
movslq %eax, %rcx
leaq 0xead15(%rip), %rax # 0x15e810
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x73c55
cmpl $0x2460, -0x8(%rbp) # imm = 0x2460
jl 0x73b37
cmpl $0x2642, -0x8(%rbp) # imm = 0x2642
jg 0x73b37
movl -0x8(%rbp), %eax
subl $0x2460, %eax # imm = 0x2460
movslq %eax, %rcx
leaq 0xeb2f5(%rip), %rax # 0x15ee20
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x73c55
cmpl $0x3000, -0x8(%rbp) # imm = 0x3000
jl 0x73b67
cmpl $0x3129, -0x8(%rbp) # imm = 0x3129
jg 0x73b67
movl -0x8(%rbp), %eax
subl $0x3000, %eax # imm = 0x3000
movslq %eax, %rcx
leaq 0xeb695(%rip), %rax # 0x15f1f0
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x73c55
cmpl $0x3220, -0x8(%rbp) # imm = 0x3220
jl 0x73b97
cmpl $0x32a3, -0x8(%rbp) # imm = 0x32A3
jg 0x73b97
movl -0x8(%rbp), %eax
subl $0x3220, %eax # imm = 0x3220
movslq %eax, %rcx
leaq 0xeb8c5(%rip), %rax # 0x15f450
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x73c55
cmpl $0x338e, -0x8(%rbp) # imm = 0x338E
jl 0x73bc7
cmpl $0x33d5, -0x8(%rbp) # imm = 0x33D5
jg 0x73bc7
movl -0x8(%rbp), %eax
subl $0x338e, %eax # imm = 0x338E
movslq %eax, %rcx
leaq 0xeb9a5(%rip), %rax # 0x15f560
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x73c55
cmpl $0x4e00, -0x8(%rbp) # imm = 0x4E00
jl 0x73bf4
cmpl $0x9fa5, -0x8(%rbp) # imm = 0x9FA5
jg 0x73bf4
movl -0x8(%rbp), %eax
subl $0x4e00, %eax # imm = 0x4E00
movslq %eax, %rcx
leaq 0xeba05(%rip), %rax # 0x15f5f0
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x73c55
cmpl $0xf92c, -0x8(%rbp) # imm = 0xF92C
jl 0x73c21
cmpl $0xfa29, -0x8(%rbp) # imm = 0xFA29
jg 0x73c21
movl -0x8(%rbp), %eax
subl $0xf92c, %eax # imm = 0xF92C
movslq %eax, %rcx
leaq 0xf5d28(%rip), %rax # 0x169940
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x73c55
cmpl $0xfe30, -0x8(%rbp) # imm = 0xFE30
jl 0x73c4e
cmpl $0xffe5, -0x8(%rbp) # imm = 0xFFE5
jg 0x73c4e
movl -0x8(%rbp), %eax
subl $0xfe30, %eax # imm = 0xFE30
movslq %eax, %rcx
leaq 0xf5efb(%rip), %rax # 0x169b40
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x73c55
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
|
func_uni_gbk_onechar:
push rbp
mov rbp, rsp
mov [rbp+var_8], edi
cmp [rbp+var_8], 0A4h
jl short loc_73AD7
cmp [rbp+var_8], 451h
jg short loc_73AD7
mov eax, [rbp+var_8]
sub eax, 0A4h
movsxd rcx, eax
lea rax, tab_uni_gbk0
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_4], eax
jmp loc_73C55
loc_73AD7:
cmp [rbp+var_8], 2010h
jl short loc_73B07
cmp [rbp+var_8], 2312h
jg short loc_73B07
mov eax, [rbp+var_8]
sub eax, 2010h
movsxd rcx, eax
lea rax, tab_uni_gbk1
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_4], eax
jmp loc_73C55
loc_73B07:
cmp [rbp+var_8], 2460h
jl short loc_73B37
cmp [rbp+var_8], 2642h
jg short loc_73B37
mov eax, [rbp+var_8]
sub eax, 2460h
movsxd rcx, eax
lea rax, tab_uni_gbk2
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_4], eax
jmp loc_73C55
loc_73B37:
cmp [rbp+var_8], 3000h
jl short loc_73B67
cmp [rbp+var_8], 3129h
jg short loc_73B67
mov eax, [rbp+var_8]
sub eax, 3000h
movsxd rcx, eax
lea rax, tab_uni_gbk3
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_4], eax
jmp loc_73C55
loc_73B67:
cmp [rbp+var_8], 3220h
jl short loc_73B97
cmp [rbp+var_8], 32A3h
jg short loc_73B97
mov eax, [rbp+var_8]
sub eax, 3220h
movsxd rcx, eax
lea rax, tab_uni_gbk4
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_4], eax
jmp loc_73C55
loc_73B97:
cmp [rbp+var_8], 338Eh
jl short loc_73BC7
cmp [rbp+var_8], 33D5h
jg short loc_73BC7
mov eax, [rbp+var_8]
sub eax, 338Eh
movsxd rcx, eax
lea rax, tab_uni_gbk5
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_4], eax
jmp loc_73C55
loc_73BC7:
cmp [rbp+var_8], 4E00h
jl short loc_73BF4
cmp [rbp+var_8], 9FA5h
jg short loc_73BF4
mov eax, [rbp+var_8]
sub eax, 4E00h
movsxd rcx, eax
lea rax, tab_uni_gbk6
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_4], eax
jmp short loc_73C55
loc_73BF4:
cmp [rbp+var_8], 0F92Ch
jl short loc_73C21
cmp [rbp+var_8], 0FA29h
jg short loc_73C21
mov eax, [rbp+var_8]
sub eax, 0F92Ch
movsxd rcx, eax
lea rax, tab_uni_gbk7
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_4], eax
jmp short loc_73C55
loc_73C21:
cmp [rbp+var_8], 0FE30h
jl short loc_73C4E
cmp [rbp+var_8], 0FFE5h
jg short loc_73C4E
mov eax, [rbp+var_8]
sub eax, 0FE30h
movsxd rcx, eax
lea rax, tab_uni_gbk8
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_4], eax
jmp short loc_73C55
loc_73C4E:
mov [rbp+var_4], 0
loc_73C55:
mov eax, [rbp+var_4]
pop rbp
retn
|
long long func_uni_gbk_onechar(int a1)
{
if ( a1 < 164 || a1 > 1105 )
{
if ( a1 < 8208 || a1 > 8978 )
{
if ( a1 < 9312 || a1 > 9794 )
{
if ( a1 < 12288 || a1 > 12585 )
{
if ( a1 < 12832 || a1 > 12963 )
{
if ( a1 < 13198 || a1 > 13269 )
{
if ( a1 < 19968 || a1 > 40869 )
{
if ( a1 < 63788 || a1 > 64041 )
{
if ( a1 < 65072 || a1 > 65509 )
return 0;
else
return tab_uni_gbk8[a1 - 65072];
}
else
{
return tab_uni_gbk7[a1 - 63788];
}
}
else
{
return tab_uni_gbk6[a1 - 19968];
}
}
else
{
return tab_uni_gbk5[a1 - 13198];
}
}
else
{
return tab_uni_gbk4[a1 - 12832];
}
}
else
{
return tab_uni_gbk3[a1 - 12288];
}
}
else
{
return tab_uni_gbk2[a1 - 9312];
}
}
else
{
return tab_uni_gbk1[a1 - 8208];
}
}
else
{
return tab_uni_gbk0[a1 - 164];
}
}
|
func_uni_gbk_onechar:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x8],EDI
CMP dword ptr [RBP + -0x8],0xa4
JL 0x00173ad7
CMP dword ptr [RBP + -0x8],0x451
JG 0x00173ad7
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0xa4
MOVSXD RCX,EAX
LEA RAX,[0x25e0b0]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00173c55
LAB_00173ad7:
CMP dword ptr [RBP + -0x8],0x2010
JL 0x00173b07
CMP dword ptr [RBP + -0x8],0x2312
JG 0x00173b07
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0x2010
MOVSXD RCX,EAX
LEA RAX,[0x25e810]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00173c55
LAB_00173b07:
CMP dword ptr [RBP + -0x8],0x2460
JL 0x00173b37
CMP dword ptr [RBP + -0x8],0x2642
JG 0x00173b37
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0x2460
MOVSXD RCX,EAX
LEA RAX,[0x25ee20]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00173c55
LAB_00173b37:
CMP dword ptr [RBP + -0x8],0x3000
JL 0x00173b67
CMP dword ptr [RBP + -0x8],0x3129
JG 0x00173b67
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0x3000
MOVSXD RCX,EAX
LEA RAX,[0x25f1f0]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00173c55
LAB_00173b67:
CMP dword ptr [RBP + -0x8],0x3220
JL 0x00173b97
CMP dword ptr [RBP + -0x8],0x32a3
JG 0x00173b97
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0x3220
MOVSXD RCX,EAX
LEA RAX,[0x25f450]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00173c55
LAB_00173b97:
CMP dword ptr [RBP + -0x8],0x338e
JL 0x00173bc7
CMP dword ptr [RBP + -0x8],0x33d5
JG 0x00173bc7
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0x338e
MOVSXD RCX,EAX
LEA RAX,[0x25f560]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00173c55
LAB_00173bc7:
CMP dword ptr [RBP + -0x8],0x4e00
JL 0x00173bf4
CMP dword ptr [RBP + -0x8],0x9fa5
JG 0x00173bf4
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0x4e00
MOVSXD RCX,EAX
LEA RAX,[0x25f5f0]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00173c55
LAB_00173bf4:
CMP dword ptr [RBP + -0x8],0xf92c
JL 0x00173c21
CMP dword ptr [RBP + -0x8],0xfa29
JG 0x00173c21
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0xf92c
MOVSXD RCX,EAX
LEA RAX,[0x269940]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00173c55
LAB_00173c21:
CMP dword ptr [RBP + -0x8],0xfe30
JL 0x00173c4e
CMP dword ptr [RBP + -0x8],0xffe5
JG 0x00173c4e
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0xfe30
MOVSXD RCX,EAX
LEA RAX,[0x269b40]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00173c55
LAB_00173c4e:
MOV dword ptr [RBP + -0x4],0x0
LAB_00173c55:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int2 func_uni_gbk_onechar(int param_1)
{
int2 uVar1;
if ((param_1 < 0xa4) || (0x451 < param_1)) {
if ((param_1 < 0x2010) || (0x2312 < param_1)) {
if ((param_1 < 0x2460) || (0x2642 < param_1)) {
if ((param_1 < 0x3000) || (0x3129 < param_1)) {
if ((param_1 < 0x3220) || (0x32a3 < param_1)) {
if ((param_1 < 0x338e) || (0x33d5 < param_1)) {
if ((param_1 < 0x4e00) || (0x9fa5 < param_1)) {
if ((param_1 < 0xf92c) || (0xfa29 < param_1)) {
if ((param_1 < 0xfe30) || (0xffe5 < param_1)) {
uVar1 = 0;
}
else {
uVar1 = *(int2 *)(tab_uni_gbk8 + (long)(param_1 + -0xfe30) * 2);
}
}
else {
uVar1 = *(int2 *)(tab_uni_gbk7 + (long)(param_1 + -0xf92c) * 2);
}
}
else {
uVar1 = *(int2 *)(tab_uni_gbk6 + (long)(param_1 + -0x4e00) * 2);
}
}
else {
uVar1 = *(int2 *)(tab_uni_gbk5 + (long)(param_1 + -0x338e) * 2);
}
}
else {
uVar1 = *(int2 *)(tab_uni_gbk4 + (long)(param_1 + -0x3220) * 2);
}
}
else {
uVar1 = *(int2 *)(tab_uni_gbk3 + (long)(param_1 + -0x3000) * 2);
}
}
else {
uVar1 = *(int2 *)(tab_uni_gbk2 + (long)(param_1 + -0x2460) * 2);
}
}
else {
uVar1 = *(int2 *)(tab_uni_gbk1 + (long)(param_1 + -0x2010) * 2);
}
}
else {
uVar1 = *(int2 *)(tab_uni_gbk0 + (long)(param_1 + -0xa4) * 2);
}
return uVar1;
}
|
|
12,108 |
plutovg_path_clone_flatten
|
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-path.c
|
plutovg_path_t* plutovg_path_clone_flatten(const plutovg_path_t* path)
{
plutovg_path_t* clone = plutovg_path_create();
plutovg_path_reserve(clone, path->elements.size + path->num_curves * 32);
plutovg_path_traverse_flatten(path, clone_traverse_func, clone);
return clone;
}
|
O1
|
c
|
plutovg_path_clone_flatten:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x28, %edi
callq 0x31b0
movq %rax, %r14
movl $0x1, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x4(%rax)
movups %xmm0, 0x14(%rax)
movl $0x0, 0x24(%rax)
movl 0xc(%rbx), %esi
shll $0x5, %esi
addl 0x20(%rbx), %esi
movq %rax, %rdi
callq 0xac17
leaq 0x16(%rip), %rsi # 0xbed7
movq %rbx, %rdi
movq %r14, %rdx
callq 0xb76b
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
|
plutovg_path_clone_flatten:
push r14
push rbx
push rax
mov rbx, rdi
mov edi, 28h ; '('
call _malloc
mov r14, rax
mov dword ptr [rax], 1
xorps xmm0, xmm0
movups xmmword ptr [rax+4], xmm0
movups xmmword ptr [rax+14h], xmm0
mov dword ptr [rax+24h], 0
mov esi, [rbx+0Ch]
shl esi, 5
add esi, [rbx+20h]
mov rdi, rax
call plutovg_path_reserve
lea rsi, clone_traverse_func
mov rdi, rbx
mov rdx, r14
call plutovg_path_traverse_flatten
mov rax, r14
add rsp, 8
pop rbx
pop r14
retn
|
long long plutovg_path_clone_flatten(long long a1)
{
long long v1; // r14
long long v2; // rdx
long long v3; // rcx
long long v4; // r8
long long v5; // r9
v1 = malloc(40LL);
*(_DWORD *)v1 = 1;
*(_OWORD *)(v1 + 4) = 0LL;
*(_OWORD *)(v1 + 20) = 0LL;
*(_DWORD *)(v1 + 36) = 0;
plutovg_path_reserve(v1, *(_DWORD *)(a1 + 32) + 32 * *(_DWORD *)(a1 + 12), v2);
plutovg_path_traverse_flatten(
a1,
(void ( *)(long long, long long, long long *, long long, double, double))clone_traverse_func,
v1,
v3,
v4,
v5);
return v1;
}
|
plutovg_path_clone_flatten:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV EDI,0x28
CALL 0x001031b0
MOV R14,RAX
MOV dword ptr [RAX],0x1
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + 0x4],XMM0
MOVUPS xmmword ptr [RAX + 0x14],XMM0
MOV dword ptr [RAX + 0x24],0x0
MOV ESI,dword ptr [RBX + 0xc]
SHL ESI,0x5
ADD ESI,dword ptr [RBX + 0x20]
MOV RDI,RAX
CALL 0x0010ac17
LEA RSI,[0x10bed7]
MOV RDI,RBX
MOV RDX,R14
CALL 0x0010b76b
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R14
RET
|
int4 * plutovg_path_clone_flatten(long param_1)
{
int4 *puVar1;
puVar1 = (int4 *)malloc(0x28);
*puVar1 = 1;
*(int8 *)(puVar1 + 1) = 0;
*(int8 *)(puVar1 + 3) = 0;
*(int8 *)(puVar1 + 5) = 0;
*(int8 *)(puVar1 + 7) = 0;
puVar1[9] = 0;
plutovg_path_reserve(puVar1,*(int *)(param_1 + 0xc) * 0x20 + *(int *)(param_1 + 0x20));
plutovg_path_traverse_flatten(param_1,clone_traverse_func,puVar1);
return puVar1;
}
|
|
12,109 |
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>::at<char const (&) [11], 0>(char const (&) [11]) const
|
monkey531[P]llama/common/./json.hpp
|
const_reference at(KeyType && key) const
{
// at only works for objects
if (JSON_HEDLEY_UNLIKELY(!is_object()))
{
JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this));
}
auto it = m_data.m_value.object->find(std::forward<KeyType>(key));
if (it == m_data.m_value.object->end())
{
JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this));
}
return it->second;
}
|
O2
|
cpp
|
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> 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>::at<char const (&) [11], 0>(char const (&) [11]) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %r14
cmpb $0x1, (%rdi)
jne 0xa988b
movq %rsi, %r15
movq 0x8(%r14), %rdi
callq 0x7f538
movq 0x8(%r14), %rcx
cmpq 0x8(%rcx), %rax
je 0xa98e9
addq $0x20, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x23470
movq %rax, %rbx
movq %r14, %rdi
callq 0x445e8
leaq 0x28(%rsp), %rdx
movq %rax, (%rdx)
leaq 0xc775(%rip), %rsi # 0xb6022
leaq 0x8(%rsp), %rdi
callq 0x7ee3d
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0x130, %esi # imm = 0x130
movq %r14, %rcx
callq 0x644da
xorl %ebp, %ebp
leaq 0x53660(%rip), %rsi # 0xfcf38
leaq -0x68767(%rip), %rdx # 0x41178
movq %rbx, %rdi
callq 0x23f00
jmp 0xa9953
pushq $0x20
popq %rdi
callq 0x23470
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movq %r15, %rsi
callq 0x27d88
leaq 0xc745(%rip), %rsi # 0xb6052
leaq 0xc744(%rip), %rcx # 0xb6058
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x7f447
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0x193, %esi # imm = 0x193
movq %r14, %rcx
callq 0x7f8b2
xorl %ebp, %ebp
leaq 0x53574(%rip), %rsi # 0xfceb8
leaq -0x687d3(%rip), %rdx # 0x41178
movq %rbx, %rdi
callq 0x23f00
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x241c8
jmp 0xa9968
movq %rax, %r14
movb $0x1, %bpl
leaq 0x28(%rsp), %rdi
jmp 0xa9979
jmp 0xa9985
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x241c8
testb %bpl, %bpl
jne 0xa9988
jmp 0xa9990
movq %rax, %r14
movq %rbx, %rdi
callq 0x236a0
movq %r14, %rdi
callq 0x23f80
|
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_:
push rbp; char
push r15; int
push r14; int
push rbx; int
sub rsp, 48h
mov r14, rdi
cmp byte ptr [rdi], 1
jnz short loc_A988B
mov r15, rsi
mov rdi, [r14+8]
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA11_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_
mov rcx, [r14+8]
cmp rax, [rcx+8]
jz short loc_A98E9
add rax, 20h ; ' '
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_A988B:
push 20h ; ' '
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+68h+var_40]
mov [rdx], rax
lea rsi, aCannotUseAtWit; "cannot use at() with "
lea rdi, [rsp+68h+var_60]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&)
mov bpl, 1
lea rdx, [rsp+68h+var_60]
mov rdi, rbx; this
mov esi, 130h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
jmp short loc_A9953
loc_A98E9:
push 20h ; ' '
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+68h+var_40]
lea rdx, [rsp+68h+var_61]
mov rsi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rsi, aKey; "key '"
lea rcx, aNotFound; "' not found"
lea rdi, [rsp+68h+var_60]
lea rdx, [rsp+68h+var_40]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&)
mov bpl, 1
lea rdx, [rsp+68h+var_60]
mov rdi, rbx; this
mov esi, 193h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_A9953:
mov r14, rax
lea rdi, [rsp+68h+var_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_A9968
mov r14, rax
mov bpl, 1
loc_A9968:
lea rdi, [rsp+68h+var_40]
jmp short loc_A9979
jmp short loc_A9985
mov r14, rax
lea rdi, [rsp+68h+var_60]; void *
loc_A9979:
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_A9988
jmp short loc_A9990
loc_A9985:
mov r14, rax
loc_A9988:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_A9990:
mov rdi, r14
call __Unwind_Resume
|
long long ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_(
long long a1,
long long a2)
{
long long v2; // rax
nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx
nlohmann::json_abi_v3_11_3::detail::out_of_range *v5; // rbx
_BYTE v6[32]; // [rsp+8h] [rbp-60h] BYREF
_QWORD v7[8]; // [rsp+28h] [rbp-40h] BYREF
if ( *(_BYTE *)a1 != 1 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL);
v7[0] = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(
(long long)v6,
(long long)"cannot use at() with ",
v7);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
304,
(long long)v6);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
v2 = ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA11_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_(*(long long **)(a1 + 8));
if ( v2 == *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL) )
{
v5 = (nlohmann::json_abi_v3_11_3::detail::out_of_range *)__cxa_allocate_exception(0x20uLL);
std::string::basic_string<std::allocator<char>>(v7, a2);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(
(long long)v6,
(long long)"key '",
(long long)v7,
(long long)"' not found");
ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
v5,
403,
(long long)v6);
__cxa_throw(
v5,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return v2 + 32;
}
|
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV R14,RDI
CMP byte ptr [RDI],0x1
JNZ 0x001a988b
MOV R15,RSI
MOV RDI,qword ptr [R14 + 0x8]
CALL 0x0017f538
MOV RCX,qword ptr [R14 + 0x8]
CMP RAX,qword ptr [RCX + 0x8]
JZ 0x001a98e9
ADD RAX,0x20
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_001a988b:
PUSH 0x20
POP RDI
CALL 0x00123470
MOV RBX,RAX
MOV RDI,R14
CALL 0x001445e8
LEA RDX,[RSP + 0x28]
MOV qword ptr [RDX],RAX
LAB_001a98a6:
LEA RSI,[0x1b6022]
LEA RDI,[RSP + 0x8]
CALL 0x0017ee3d
MOV BPL,0x1
LAB_001a98ba:
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV ESI,0x130
MOV RCX,R14
CALL 0x001644da
XOR EBP,EBP
LEA RSI,[0x1fcf38]
LEA RDX,[0x141178]
MOV RDI,RBX
CALL 0x00123f00
LAB_001a98e9:
PUSH 0x20
POP RDI
CALL 0x00123470
MOV RBX,RAX
LAB_001a98f4:
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x7]
MOV RSI,R15
CALL 0x00127d88
LAB_001a9906:
LEA RSI,[0x1b6052]
LEA RCX,[0x1b6058]
LEA RDI,[RSP + 0x8]
LEA RDX,[RSP + 0x28]
CALL 0x0017f447
MOV BPL,0x1
LAB_001a9926:
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV ESI,0x193
MOV RCX,R14
CALL 0x0017f8b2
XOR EBP,EBP
LEA RSI,[0x1fceb8]
LEA RDX,[0x141178]
MOV RDI,RBX
CALL 0x00123f00
|
long _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*param_1,char *param_2)
{
long lVar1;
int8 uVar2;
allocator local_61;
detail local_60 [32];
char *local_40 [4];
if (*param_1 !=
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
uVar2 = __cxa_allocate_exception(0x20);
local_40[0] = (char *)nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name(param_1);
/* try { // try from 001a98a6 to 001a98b6 has its CatchHandler @ 001a9985 */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*>
(local_60,"cannot use at() with ",local_40);
/* try { // try from 001a98ba to 001a98e6 has its CatchHandler @ 001a9971 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar2,0x130,local_60,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
lVar1 = _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA11_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_
(*(int8 *)(param_1 + 8));
if (lVar1 != *(long *)(*(long *)(param_1 + 8) + 8)) {
return lVar1 + 0x20;
}
uVar2 = __cxa_allocate_exception(0x20);
/* try { // try from 001a98f4 to 001a9905 has its CatchHandler @ 001a996f */
std::__cxx11::string::string<std::allocator<char>>((string *)local_40,param_2,&local_61);
/* try { // try from 001a9906 to 001a9922 has its CatchHandler @ 001a9962 */
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]>
(local_60,"key \'",(string *)local_40,"\' not found");
/* try { // try from 001a9926 to 001a9952 has its CatchHandler @ 001a9953 */
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar2,0x193,local_60,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
|
|
12,110 |
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>::at<char const (&) [11], 0>(char const (&) [11]) const
|
monkey531[P]llama/common/./json.hpp
|
const_reference at(KeyType && key) const
{
// at only works for objects
if (JSON_HEDLEY_UNLIKELY(!is_object()))
{
JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this));
}
auto it = m_data.m_value.object->find(std::forward<KeyType>(key));
if (it == m_data.m_value.object->end())
{
JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this));
}
return it->second;
}
|
O3
|
cpp
|
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> 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>::at<char const (&) [11], 0>(char const (&) [11]) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
cmpb $0x1, (%rdi)
jne 0xe5c7f
movq %rsi, %r15
movq 0x8(%r14), %r12
movq (%r12), %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
je 0xe5c69
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1a230
testl %eax, %eax
je 0xe5c5e
addq $0x30, %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
jne 0xe5c3f
jmp 0xe5c61
movq %rbx, %rax
movq 0x8(%r14), %rcx
movq 0x8(%rcx), %rbx
cmpq %rbx, %rax
je 0xe5cdd
addq $0x20, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x1a460
movq %rax, %rbx
movq %r14, %rdi
callq 0x60400
movq %rsp, %rdx
movq %rax, (%rdx)
leaq 0xc391(%rip), %rsi # 0xf2032
leaq 0x20(%rsp), %rdi
callq 0xac365
movb $0x1, %bpl
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movl $0x130, %esi # imm = 0x130
movq %r14, %rcx
callq 0x87cca
xorl %ebp, %ebp
leaq 0x4527c(%rip), %rsi # 0x12af48
leaq -0x8969d(%rip), %rdx # 0x5c636
movq %rbx, %rdi
callq 0x1af10
jmp 0xe5d56
movl $0x20, %edi
callq 0x1a460
movq %rax, %rbx
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq %r15, %rdi
callq 0x1a400
leaq (%rax,%r15), %rdx
movq %rsp, %rdi
movq %r15, %rsi
callq 0x22806
leaq 0xc350(%rip), %rsi # 0xf2062
leaq 0xc34f(%rip), %rcx # 0xf2068
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0xac942
movb $0x1, %bpl
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movl $0x193, %esi # imm = 0x193
movq %r14, %rcx
callq 0xaccba
xorl %ebp, %ebp
leaq 0x45181(%rip), %rsi # 0x12aec8
leaq -0x89718(%rip), %rdx # 0x5c636
movq %rbx, %rdi
callq 0x1af10
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe5d74
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1a8e0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0xe5dbf
movq 0x10(%rsp), %rsi
jmp 0xe5db7
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0xe5dc9
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1a8e0
jmp 0xe5dc9
jmp 0xe5dc6
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe5dbf
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1a8e0
testb %bpl, %bpl
jne 0xe5dc9
jmp 0xe5dd1
movq %rax, %r14
movq %rbx, %rdi
callq 0x1a690
movq %r14, %rdi
callq 0x1af90
nop
|
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_:
push rbp; char
push r15; int
push r14; int
push r12; int
push rbx; char
sub rsp, 40h
mov r14, rdi
cmp byte ptr [rdi], 1
jnz short loc_E5C7F
mov r15, rsi
mov r12, [r14+8]
mov rbx, [r12]
mov rax, [r12+8]
cmp rbx, rax
jz short loc_E5C69
loc_E5C3F:
mov rdi, rbx
mov rsi, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_E5C5E
add rbx, 30h ; '0'
mov rax, [r12+8]
cmp rbx, rax
jnz short loc_E5C3F
jmp short loc_E5C61
loc_E5C5E:
mov rax, rbx
loc_E5C61:
mov rcx, [r14+8]
mov rbx, [rcx+8]
loc_E5C69:
cmp rax, rbx
jz short loc_E5CDD
add rax, 20h ; ' '
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_E5C7F:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
mov rdx, rsp
mov [rdx], rax
lea rsi, aCannotUseAtWit; "cannot use at() with "
lea rdi, [rsp+68h+var_48]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&)
mov bpl, 1
lea rdx, [rsp+68h+var_48]
mov rdi, rbx; this
mov esi, 130h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
jmp short loc_E5D56
loc_E5CDD:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r12, [rsp+68h+var_58]
mov [r12-10h], r12
mov rdi, r15
call _strlen
lea rdx, [rax+r15]
mov rdi, rsp
mov rsi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rsi, aKey; "key '"
lea rcx, aNotFound; "' not found"
lea rdi, [rsp+68h+var_48]
mov rdx, rsp
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&)
mov bpl, 1
lea rdx, [rsp+68h+var_48]
mov rdi, rbx; this
mov esi, 193h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_E5D56:
mov r14, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_E5D74
mov rsi, [rsp+68h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_E5D74:
mov rdi, [rsp+68h+var_68]
cmp rdi, r12
jz short loc_E5DBF
mov rsi, [rsp+68h+var_58]
jmp short loc_E5DB7
mov r14, rax
mov rdi, [rsp+68h+var_68]; void *
cmp rdi, r12
jz short loc_E5DC9
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_E5DC9
jmp short loc_E5DC6
mov r14, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_E5DBF
mov rsi, [rsp+68h+var_38]
loc_E5DB7:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_E5DBF:
test bpl, bpl
jnz short loc_E5DC9
jmp short loc_E5DD1
loc_E5DC6:
mov r14, rax
loc_E5DC9:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_E5DD1:
mov rdi, r14
call __Unwind_Resume
|
long long ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_(
long long a1,
_BYTE *a2)
{
long long *v2; // r12
long long v3; // rbx
long long v4; // rax
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
nlohmann::json_abi_v3_11_3::detail::exception *v7; // rbx
long long v8; // rax
void *v9[2]; // [rsp+0h] [rbp-68h] BYREF
long long v10; // [rsp+10h] [rbp-58h] BYREF
_QWORD v11[2]; // [rsp+20h] [rbp-48h] BYREF
if ( *(_BYTE *)a1 != 1 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v9[0] = (void *)nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(
(long long)v11,
(long long)"cannot use at() with ",
v9);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
304,
v11);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
v2 = *(long long **)(a1 + 8);
v3 = *v2;
v4 = v2[1];
if ( *v2 != v4 )
{
while ( (unsigned int)std::string::compare(v3, a2) )
{
v3 += 48LL;
v4 = v2[1];
if ( v3 == v4 )
goto LABEL_7;
}
v4 = v3;
LABEL_7:
v3 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL);
}
if ( v4 == v3 )
{
v7 = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v9[0] = &v10;
v8 = strlen(a2);
std::string::_M_construct<char const*>((long long)v9, a2, (long long)&a2[v8]);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(
(long long)v11,
(long long)"key '",
v9,
(long long)"' not found");
ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
v7,
403,
v11);
__cxa_throw(
v7,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return v4 + 32;
}
|
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV R14,RDI
CMP byte ptr [RDI],0x1
JNZ 0x001e5c7f
MOV R15,RSI
MOV R12,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [R12]
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JZ 0x001e5c69
LAB_001e5c3f:
MOV RDI,RBX
MOV RSI,R15
CALL 0x0011a230
TEST EAX,EAX
JZ 0x001e5c5e
ADD RBX,0x30
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JNZ 0x001e5c3f
JMP 0x001e5c61
LAB_001e5c5e:
MOV RAX,RBX
LAB_001e5c61:
MOV RCX,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [RCX + 0x8]
LAB_001e5c69:
CMP RAX,RBX
JZ 0x001e5cdd
ADD RAX,0x20
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001e5c7f:
MOV EDI,0x20
CALL 0x0011a460
MOV RBX,RAX
MOV RDI,R14
CALL 0x00160400
MOV RDX,RSP
MOV qword ptr [RDX],RAX
LAB_001e5c9a:
LEA RSI,[0x1f2032]
LEA RDI,[RSP + 0x20]
CALL 0x001ac365
MOV BPL,0x1
LAB_001e5cae:
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
MOV ESI,0x130
MOV RCX,R14
CALL 0x00187cca
XOR EBP,EBP
LEA RSI,[0x22af48]
LEA RDX,[0x15c636]
MOV RDI,RBX
CALL 0x0011af10
LAB_001e5cdd:
MOV EDI,0x20
CALL 0x0011a460
MOV RBX,RAX
LEA R12,[RSP + 0x10]
MOV qword ptr [R12 + -0x10],R12
MOV RDI,R15
CALL 0x0011a400
LEA RDX,[RAX + R15*0x1]
LAB_001e5d00:
MOV RDI,RSP
MOV RSI,R15
CALL 0x00122806
LAB_001e5d0b:
LEA RSI,[0x1f2062]
LEA RCX,[0x1f2068]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x001ac942
MOV BPL,0x1
LAB_001e5d29:
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
MOV ESI,0x193
MOV RCX,R14
CALL 0x001accba
XOR EBP,EBP
LEA RSI,[0x22aec8]
LEA RDX,[0x15c636]
MOV RDI,RBX
CALL 0x0011af10
|
char * _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*param_1,char *param_2)
{
long *plVar1;
int iVar2;
char *pcVar3;
int8 uVar4;
size_t sVar5;
char *pcVar6;
char *local_68 [2];
char local_58 [16];
detail local_48 [32];
if (*param_1 !=
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
uVar4 = __cxa_allocate_exception(0x20);
local_68[0] = (char *)nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name(param_1);
/* try { // try from 001e5c9a to 001e5caa has its CatchHandler @ 001e5dc6 */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*>
(local_48,"cannot use at() with ",local_68);
/* try { // try from 001e5cae to 001e5cda has its CatchHandler @ 001e5da1 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar4,0x130,local_48,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
plVar1 = *(long **)(param_1 + 8);
pcVar6 = (char *)*plVar1;
pcVar3 = (char *)plVar1[1];
if (pcVar6 != pcVar3) {
do {
pcVar3 = pcVar6;
iVar2 = std::__cxx11::string::compare(pcVar3);
if (iVar2 == 0) break;
pcVar6 = pcVar3 + 0x30;
pcVar3 = (char *)plVar1[1];
} while (pcVar6 != pcVar3);
pcVar6 = *(char **)(*(long *)(param_1 + 8) + 8);
}
if (pcVar3 == pcVar6) {
uVar4 = __cxa_allocate_exception(0x20);
local_68[0] = local_58;
sVar5 = strlen(param_2);
/* try { // try from 001e5d00 to 001e5d0a has its CatchHandler @ 001e5d9f */
std::__cxx11::string::_M_construct<char_const*>(local_68,param_2,param_2 + sVar5);
/* try { // try from 001e5d0b to 001e5d25 has its CatchHandler @ 001e5d84 */
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]>
(local_48,"key \'",(string *)local_68,"\' not found");
/* try { // try from 001e5d29 to 001e5d55 has its CatchHandler @ 001e5d56 */
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar4,0x193,local_48,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return pcVar3 + 0x20;
}
|
|
12,111 |
my_casedn_8bit
|
eloqsql/strings/ctype-simple.c
|
size_t my_casedn_8bit(CHARSET_INFO * cs, const char *src, size_t srclen,
char *dst, size_t dstlen __attribute__((unused)))
{
const char *end= src + srclen;
register const uchar *map=cs->to_lower;
DBUG_ASSERT(srclen <= dstlen);
for ( ; src != end ; src++)
*dst++= (char) map[(uchar) *src];
return srclen;
}
|
O3
|
c
|
my_casedn_8bit:
movq %rdx, %rax
testq %rdx, %rdx
je 0xb9ec4
pushq %rbp
movq %rsp, %rbp
movq 0x48(%rdi), %rdx
xorl %edi, %edi
movzbl (%rsi,%rdi), %r8d
movb (%rdx,%r8), %r8b
movb %r8b, (%rcx,%rdi)
incq %rdi
cmpq %rdi, %rax
jne 0xb9eae
popq %rbp
retq
|
my_casedn_8bit:
mov rax, rdx
test rdx, rdx
jz short locret_B9EC4
push rbp
mov rbp, rsp
mov rdx, [rdi+48h]
xor edi, edi
loc_B9EAE:
movzx r8d, byte ptr [rsi+rdi]
mov r8b, [rdx+r8]
mov [rcx+rdi], r8b
inc rdi
cmp rax, rdi
jnz short loc_B9EAE
pop rbp
locret_B9EC4:
retn
|
long long my_casedn_8bit(long long a1, long long a2, long long a3, long long a4)
{
long long result; // rax
long long v5; // rdx
long long v6; // rdi
result = a3;
if ( a3 )
{
v5 = *(_QWORD *)(a1 + 72);
v6 = 0LL;
do
{
*(_BYTE *)(a4 + v6) = *(_BYTE *)(v5 + *(unsigned __int8 *)(a2 + v6));
++v6;
}
while ( result != v6 );
}
return result;
}
|
my_casedn_8bit:
MOV RAX,RDX
TEST RDX,RDX
JZ 0x001b9ec4
PUSH RBP
MOV RBP,RSP
MOV RDX,qword ptr [RDI + 0x48]
XOR EDI,EDI
LAB_001b9eae:
MOVZX R8D,byte ptr [RSI + RDI*0x1]
MOV R8B,byte ptr [RDX + R8*0x1]
MOV byte ptr [RCX + RDI*0x1],R8B
INC RDI
CMP RAX,RDI
JNZ 0x001b9eae
POP RBP
LAB_001b9ec4:
RET
|
void my_casedn_8bit(long param_1,long param_2,long param_3,long param_4)
{
long lVar1;
long lVar2;
if (param_3 != 0) {
lVar1 = *(long *)(param_1 + 0x48);
lVar2 = 0;
do {
*(int1 *)(param_4 + lVar2) = *(int1 *)(lVar1 + (ulong)*(byte *)(param_2 + lVar2));
lVar2 = lVar2 + 1;
} while (param_3 != lVar2);
}
return;
}
|
|
12,112 |
ModbusClientPort::writeSingleCoil(ModbusObject*, unsigned char, unsigned short, bool)
|
serhmarch[P]ModbusBridge/modbus/src/ModbusClientPort.cpp
|
Modbus::StatusCode ModbusClientPort::writeSingleCoil(ModbusObject *client, uint8_t unit, uint16_t offset, bool value)
{
ModbusClientPortPrivate *d = d_ModbusClientPort(d_ptr);
const uint16_t szBuff = 4;
uint8_t buff[szBuff];
Modbus::StatusCode r;
uint16_t szOutBuff, outOffset;
ModbusClientPort::RequestStatus status = this->getRequestStatus(client);
switch (status)
{
case ModbusClientPort::Enable:
buff[0] = reinterpret_cast<uint8_t*>(&offset)[1]; // Coil offset - MS BYTE
buff[1] = reinterpret_cast<uint8_t*>(&offset)[0]; // Coil offset - LS BYTE
buff[2] = (value ? 0xFF : 0x00); // Value - 0xFF if true, 0x00 if false
buff[3] = 0x00; // Value - must always be NULL
d->offset = offset;
// no need break
case ModbusClientPort::Process:
r = this->request(unit, // unit ID
MBF_WRITE_SINGLE_COIL, // modbus function number
buff, // in-out buffer
4, // count of input data bytes
szBuff, // maximum size of buffer
&szOutBuff); // count of output data bytes
if ((r != Status_Good) || d->isBroadcast())
return r;
if (szOutBuff != 4)
return d->setError(Status_BadNotCorrectResponse, StringLiteral("Incorrect received data size"));
outOffset = buff[1] | (buff[0] << 8);
if (outOffset != d->offset)
return d->setError(Status_BadNotCorrectResponse, StringLiteral("'Offset' is not match received one"));
return d->setGoodStatus();
default:
return Status_Processing;
}
}
|
O2
|
cpp
|
ModbusClientPort::writeSingleCoil(ModbusObject*, unsigned char, unsigned short, bool):
pushq %rbp
pushq %rbx
subq $0x38, %rsp
movq 0x8(%rdi), %rbx
movq 0x78(%rbx), %rax
testq %rax, %rax
je 0xa4cb
movl $0x80000000, %ebp # imm = 0x80000000
cmpq %rsi, %rax
jne 0xa5aa
jmp 0xa4e8
movq %rsi, 0x78(%rbx)
movb %ch, 0x12(%rsp)
movb %cl, 0x13(%rsp)
negb %r8b
movb %r8b, 0x14(%rsp)
movb $0x0, 0x15(%rsp)
movw %cx, 0x6e(%rbx)
leaq 0x16(%rsp), %rax
movq %rax, (%rsp)
movzbl %dl, %esi
pushq $0x5
popq %rdx
leaq 0x12(%rsp), %rcx
pushq $0x4
popq %r8
movl %r8d, %r9d
callq 0x9bb2
movl %eax, %ebp
testl %eax, %eax
jne 0xa5aa
xorl %ebp, %ebp
cmpb $0x0, 0x6c(%rbx)
jne 0xa527
testb $0x1, 0x1c4(%rbx)
jne 0xa5aa
cmpw $0x4, 0x16(%rsp)
jne 0xa54c
movzwl 0x12(%rsp), %eax
rolw $0x8, %ax
movzwl %ax, %eax
movzwl 0x6e(%rbx), %ecx
cmpl %ecx, %eax
jne 0xa576
andl $0x0, 0x184(%rbx)
jmp 0xa5aa
leaq 0x88cb(%rip), %rsi # 0x12e1e
leaq 0x18(%rsp), %rdi
leaq 0x11(%rsp), %rdx
callq 0x8b48
leaq 0x18(%rsp), %rdx
movq %rbx, %rdi
movl $0x1000103, %esi # imm = 0x1000103
callq 0xc0c0
jmp 0xa59e
leaq 0x8a3a(%rip), %rsi # 0x12fb7
leaq 0x18(%rsp), %rdi
leaq 0x11(%rsp), %rdx
callq 0x8b48
leaq 0x18(%rsp), %rdx
movq %rbx, %rdi
movl $0x1000103, %esi # imm = 0x1000103
callq 0xc0c0
movl %eax, %ebp
leaq 0x18(%rsp), %rdi
callq 0x5190
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %rbp
retq
jmp 0xa5b7
jmp 0xa5c6
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x5190
jmp 0xa5c9
movq %rax, %rbx
movq %rbx, %rdi
callq 0x5570
nop
|
_ZN16ModbusClientPort15writeSingleCoilEP12ModbusObjecthtb:
push rbp
push rbx
sub rsp, 38h
mov rbx, [rdi+8]
mov rax, [rbx+78h]
test rax, rax
jz short loc_A4CB
mov ebp, 80000000h
cmp rax, rsi
jnz loc_A5AA
jmp short loc_A4E8
loc_A4CB:
mov [rbx+78h], rsi
mov [rsp+48h+var_36], ch
mov [rsp+48h+var_36+1], cl
neg r8b
mov [rsp+48h+var_34], r8b
mov [rsp+48h+var_33], 0
mov [rbx+6Eh], cx
loc_A4E8:
lea rax, [rsp+48h+var_32]
mov [rsp+48h+var_48], rax; unsigned __int16 *
movzx esi, dl; unsigned __int8
push 5
pop rdx; unsigned __int8
lea rcx, [rsp+48h+var_36]; unsigned __int8 *
push 4
pop r8; unsigned __int16
mov r9d, r8d; unsigned __int16
call _ZN16ModbusClientPort7requestEhhPhttPt; ModbusClientPort::request(uchar,uchar,uchar *,ushort,ushort,ushort *)
mov ebp, eax
test eax, eax
jnz loc_A5AA
xor ebp, ebp
cmp byte ptr [rbx+6Ch], 0
jnz short loc_A527
test byte ptr [rbx+1C4h], 1
jnz loc_A5AA
loc_A527:
cmp [rsp+48h+var_32], 4
jnz short loc_A54C
movzx eax, word ptr [rsp+48h+var_36]
rol ax, 8
movzx eax, ax
movzx ecx, word ptr [rbx+6Eh]
cmp eax, ecx
jnz short loc_A576
and dword ptr [rbx+184h], 0
jmp short loc_A5AA
loc_A54C:
lea rsi, aIncorrectRecei; "Incorrect received data size"
lea rdi, [rsp+48h+var_30]
lea rdx, [rsp+48h+var_37]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rdx, [rsp+48h+var_30]
mov rdi, rbx
mov esi, 1000103h
call _ZN23ModbusClientPortPrivate8setErrorEN6Modbus10StatusCodeEONSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; ModbusClientPortPrivate::setError(Modbus::StatusCode,std::string &&)
jmp short loc_A59E
loc_A576:
lea rsi, aOffsetIsNotMat; "'Offset' is not match received one"
lea rdi, [rsp+48h+var_30]
lea rdx, [rsp+48h+var_37]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rdx, [rsp+48h+var_30]
mov rdi, rbx
mov esi, 1000103h
call _ZN23ModbusClientPortPrivate8setErrorEN6Modbus10StatusCodeEONSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; ModbusClientPortPrivate::setError(Modbus::StatusCode,std::string &&)
loc_A59E:
mov ebp, eax
lea rdi, [rsp+48h+var_30]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_A5AA:
mov eax, ebp
add rsp, 38h
pop rbx
pop rbp
retn
jmp short loc_A5B7
jmp short loc_A5C6
loc_A5B7:
mov rbx, rax
lea rdi, [rsp+arg_10]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_A5C9
loc_A5C6:
mov rbx, rax
loc_A5C9:
mov rdi, rbx
call __Unwind_Resume
|
long long ModbusClientPort::writeSingleCoil(
ModbusClientPort *this,
ModbusObject *a2,
unsigned __int8 a3,
__int16 a4,
char a5)
{
long long v5; // rbx
ModbusObject *v6; // rax
unsigned int v7; // ebp
unsigned int v8; // eax
unsigned __int8 v10[2]; // [rsp+12h] [rbp-36h] BYREF
char v11; // [rsp+14h] [rbp-34h]
char v12; // [rsp+15h] [rbp-33h]
unsigned __int16 v13; // [rsp+16h] [rbp-32h] BYREF
_QWORD v14[6]; // [rsp+18h] [rbp-30h] BYREF
v5 = *((_QWORD *)this + 1);
v6 = *(ModbusObject **)(v5 + 120);
if ( v6 )
{
v7 = 0x80000000;
if ( v6 != a2 )
return v7;
}
else
{
*(_QWORD *)(v5 + 120) = a2;
v10[0] = HIBYTE(a4);
v10[1] = a4;
v11 = -a5;
v12 = 0;
*(_WORD *)(v5 + 110) = a4;
}
v7 = ModbusClientPort::request(this, a3, 5u, v10, 4u, 4u, &v13);
if ( !v7 )
{
v7 = 0;
if ( *(_BYTE *)(v5 + 108) || (*(_BYTE *)(v5 + 452) & 1) == 0 )
{
if ( v13 == 4 )
{
if ( __ROL2__(*(_WORD *)v10, 8) == *(_WORD *)(v5 + 110) )
{
*(_DWORD *)(v5 + 388) = 0;
return v7;
}
std::string::basic_string<std::allocator<char>>(v14, (long long)"'Offset' is not match received one");
v8 = ModbusClientPortPrivate::setError(v5, 16777475LL, v14);
}
else
{
std::string::basic_string<std::allocator<char>>(v14, (long long)"Incorrect received data size");
v8 = ModbusClientPortPrivate::setError(v5, 16777475LL, v14);
}
v7 = v8;
std::string::~string(v14);
}
}
return v7;
}
|
writeSingleCoil:
PUSH RBP
PUSH RBX
SUB RSP,0x38
MOV RBX,qword ptr [RDI + 0x8]
MOV RAX,qword ptr [RBX + 0x78]
TEST RAX,RAX
JZ 0x0010a4cb
MOV EBP,0x80000000
CMP RAX,RSI
JNZ 0x0010a5aa
JMP 0x0010a4e8
LAB_0010a4cb:
MOV qword ptr [RBX + 0x78],RSI
MOV byte ptr [RSP + 0x12],CH
MOV byte ptr [RSP + 0x13],CL
NEG R8B
MOV byte ptr [RSP + 0x14],R8B
MOV byte ptr [RSP + 0x15],0x0
MOV word ptr [RBX + 0x6e],CX
LAB_0010a4e8:
LEA RAX,[RSP + 0x16]
MOV qword ptr [RSP],RAX
MOVZX ESI,DL
PUSH 0x5
POP RDX
LEA RCX,[RSP + 0x12]
PUSH 0x4
POP R8
MOV R9D,R8D
CALL 0x00109bb2
MOV EBP,EAX
TEST EAX,EAX
JNZ 0x0010a5aa
XOR EBP,EBP
CMP byte ptr [RBX + 0x6c],0x0
JNZ 0x0010a527
TEST byte ptr [RBX + 0x1c4],0x1
JNZ 0x0010a5aa
LAB_0010a527:
CMP word ptr [RSP + 0x16],0x4
JNZ 0x0010a54c
MOVZX EAX,word ptr [RSP + 0x12]
ROL AX,0x8
MOVZX EAX,AX
MOVZX ECX,word ptr [RBX + 0x6e]
CMP EAX,ECX
JNZ 0x0010a576
AND dword ptr [RBX + 0x184],0x0
JMP 0x0010a5aa
LAB_0010a54c:
LEA RSI,[0x112e1e]
LEA RDI,[RSP + 0x18]
LEA RDX,[RSP + 0x11]
CALL 0x00108b48
LAB_0010a562:
LEA RDX,[RSP + 0x18]
MOV RDI,RBX
MOV ESI,0x1000103
CALL 0x0010c0c0
JMP 0x0010a59e
LAB_0010a576:
LEA RSI,[0x112fb7]
LEA RDI,[RSP + 0x18]
LEA RDX,[RSP + 0x11]
CALL 0x00108b48
LAB_0010a58c:
LEA RDX,[RSP + 0x18]
MOV RDI,RBX
MOV ESI,0x1000103
CALL 0x0010c0c0
LAB_0010a59e:
MOV EBP,EAX
LEA RDI,[RSP + 0x18]
CALL 0x00105190
LAB_0010a5aa:
MOV EAX,EBP
ADD RSP,0x38
POP RBX
POP RBP
RET
|
/* ModbusClientPort::writeSingleCoil(ModbusObject*, unsigned char, unsigned short, bool) */
int __thiscall
ModbusClientPort::writeSingleCoil
(ModbusClientPort *this,ModbusObject *param_1,uchar param_2,ushort param_3,bool param_4)
{
long lVar1;
int iVar2;
allocator local_37;
int2 local_36;
char local_34;
int1 local_33;
ushort local_32;
string local_30 [32];
lVar1 = *(long *)(this + 8);
if (*(ModbusObject **)(lVar1 + 0x78) == (ModbusObject *)0x0) {
*(ModbusObject **)(lVar1 + 0x78) = param_1;
local_36 = CONCAT11((char)param_3,(char)(param_3 >> 8));
local_34 = -param_4;
local_33 = 0;
*(ushort *)(lVar1 + 0x6e) = param_3;
}
else if (*(ModbusObject **)(lVar1 + 0x78) != param_1) {
return -0x80000000;
}
iVar2 = request(this,param_2,'\x05',(uchar *)&local_36,4,4,&local_32);
if ((iVar2 == 0) &&
((iVar2 = 0, *(char *)(lVar1 + 0x6c) != '\0' || ((*(byte *)(lVar1 + 0x1c4) & 1) == 0)))) {
if (local_32 == 4) {
if ((ushort)(local_36 << 8 | local_36 >> 8) == *(ushort *)(lVar1 + 0x6e)) {
*(int4 *)(lVar1 + 0x184) = 0;
return 0;
}
/* try { // try from 0010a576 to 0010a58b has its CatchHandler @ 0010a5b5 */
std::__cxx11::string::string<std::allocator<char>>
(local_30,"\'Offset\' is not match received one",&local_37);
/* try { // try from 0010a58c to 0010a59d has its CatchHandler @ 0010a5b3 */
iVar2 = ModbusClientPortPrivate::setError(lVar1,0x1000103,local_30);
}
else {
/* try { // try from 0010a54c to 0010a561 has its CatchHandler @ 0010a5c6 */
std::__cxx11::string::string<std::allocator<char>>
(local_30,"Incorrect received data size",&local_37);
/* try { // try from 0010a562 to 0010a573 has its CatchHandler @ 0010a5b7 */
iVar2 = ModbusClientPortPrivate::setError(lVar1,0x1000103,local_30);
}
std::__cxx11::string::~string(local_30);
}
return iVar2;
}
|
|
12,113 |
ModbusClientPort::writeSingleCoil(ModbusObject*, unsigned char, unsigned short, bool)
|
serhmarch[P]ModbusBridge/modbus/src/ModbusClientPort.cpp
|
Modbus::StatusCode ModbusClientPort::writeSingleCoil(ModbusObject *client, uint8_t unit, uint16_t offset, bool value)
{
ModbusClientPortPrivate *d = d_ModbusClientPort(d_ptr);
const uint16_t szBuff = 4;
uint8_t buff[szBuff];
Modbus::StatusCode r;
uint16_t szOutBuff, outOffset;
ModbusClientPort::RequestStatus status = this->getRequestStatus(client);
switch (status)
{
case ModbusClientPort::Enable:
buff[0] = reinterpret_cast<uint8_t*>(&offset)[1]; // Coil offset - MS BYTE
buff[1] = reinterpret_cast<uint8_t*>(&offset)[0]; // Coil offset - LS BYTE
buff[2] = (value ? 0xFF : 0x00); // Value - 0xFF if true, 0x00 if false
buff[3] = 0x00; // Value - must always be NULL
d->offset = offset;
// no need break
case ModbusClientPort::Process:
r = this->request(unit, // unit ID
MBF_WRITE_SINGLE_COIL, // modbus function number
buff, // in-out buffer
4, // count of input data bytes
szBuff, // maximum size of buffer
&szOutBuff); // count of output data bytes
if ((r != Status_Good) || d->isBroadcast())
return r;
if (szOutBuff != 4)
return d->setError(Status_BadNotCorrectResponse, StringLiteral("Incorrect received data size"));
outOffset = buff[1] | (buff[0] << 8);
if (outOffset != d->offset)
return d->setError(Status_BadNotCorrectResponse, StringLiteral("'Offset' is not match received one"));
return d->setGoodStatus();
default:
return Status_Processing;
}
}
|
O3
|
cpp
|
ModbusClientPort::writeSingleCoil(ModbusObject*, unsigned char, unsigned short, bool):
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq 0x8(%rdi), %rbx
movq 0x78(%rbx), %r9
testq %r9, %r9
je 0xb334
movl $0x80000000, %eax # imm = 0x80000000
cmpq %rsi, %r9
jne 0xb483
jmp 0xb351
movq %rsi, 0x78(%rbx)
movb %ch, 0x12(%rsp)
movb %cl, 0x13(%rsp)
negb %r8b
movb %r8b, 0x14(%rsp)
movb $0x0, 0x15(%rsp)
movw %cx, 0x6e(%rbx)
leaq 0x16(%rsp), %rax
movq %rax, (%rsp)
movzbl %dl, %esi
leaq 0x12(%rsp), %rcx
movl $0x5, %edx
movl $0x4, %r8d
movl $0x4, %r9d
callq 0xa5b2
testl %eax, %eax
jne 0xb483
xorl %eax, %eax
cmpb $0x0, 0x6c(%rbx)
jne 0xb395
testb $0x1, 0x1c4(%rbx)
jne 0xb483
cmpw $0x4, 0x16(%rsp)
jne 0xb3c0
movzwl 0x12(%rsp), %ecx
rolw $0x8, %cx
movzwl %cx, %ecx
movzwl 0x6e(%rbx), %edx
cmpl %edx, %ecx
jne 0xb411
movl $0x0, 0x184(%rbx)
jmp 0xb483
leaq 0x28(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0xda4a(%rip), %rsi # 0x18e1a
leaq 0xda5f(%rip), %rdx # 0x18e36
leaq 0x18(%rsp), %rdi
callq 0x92a8
movabsq $0x100010301000103, %rax # imm = 0x100010301000103
movq %rax, 0x184(%rbx)
leaq 0x190(%rbx), %rdi
leaq 0x18(%rsp), %rsi
callq 0x51c0
movb $0x0, 0x1b0(%rbx)
callq 0xfb5a
jmp 0xb460
leaq 0x28(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0xdb92(%rip), %rsi # 0x18fb3
leaq 0xdbad(%rip), %rdx # 0x18fd5
leaq 0x18(%rsp), %rdi
callq 0x92a8
movabsq $0x100010301000103, %rax # imm = 0x100010301000103
movq %rax, 0x184(%rbx)
leaq 0x190(%rbx), %rdi
leaq 0x18(%rsp), %rsi
callq 0x51c0
movb $0x0, 0x1b0(%rbx)
callq 0xfb5a
movq %rax, 0x1b8(%rbx)
movq 0x18(%rsp), %rdi
cmpq %r14, %rdi
je 0xb47e
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x5310
movl $0x1000103, %eax # imm = 0x1000103
addq $0x38, %rsp
popq %rbx
popq %r14
retq
jmp 0xb48f
jmp 0xb494
movq %rax, %rbx
jmp 0xb4ae
movq %rax, %rbx
movq 0x18(%rsp), %rdi
cmpq %r14, %rdi
je 0xb4ae
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x5310
movq %rbx, %rdi
callq 0x5550
|
_ZN16ModbusClientPort15writeSingleCoilEP12ModbusObjecthtb:
push r14
push rbx
sub rsp, 38h
mov rbx, [rdi+8]
mov r9, [rbx+78h]
test r9, r9
jz short loc_B334
mov eax, 80000000h
cmp r9, rsi
jnz loc_B483
jmp short loc_B351
loc_B334:
mov [rbx+78h], rsi
mov [rsp+48h+var_36], ch
mov [rsp+48h+var_36+1], cl
neg r8b
mov [rsp+48h+var_34], r8b
mov [rsp+48h+var_33], 0
mov [rbx+6Eh], cx
loc_B351:
lea rax, [rsp+48h+var_32]
mov [rsp+48h+var_48], rax; unsigned __int16 *
movzx esi, dl; unsigned __int8
lea rcx, [rsp+48h+var_36]; unsigned __int8 *
mov edx, 5; unsigned __int8
mov r8d, 4; unsigned __int16
mov r9d, 4; unsigned __int16
call _ZN16ModbusClientPort7requestEhhPhttPt; ModbusClientPort::request(uchar,uchar,uchar *,ushort,ushort,ushort *)
test eax, eax
jnz loc_B483
xor eax, eax
cmp byte ptr [rbx+6Ch], 0
jnz short loc_B395
test byte ptr [rbx+1C4h], 1
jnz loc_B483
loc_B395:
cmp [rsp+48h+var_32], 4
jnz short loc_B3C0
movzx ecx, word ptr [rsp+48h+var_36]
rol cx, 8
movzx ecx, cx
movzx edx, word ptr [rbx+6Eh]
cmp ecx, edx
jnz short loc_B411
mov dword ptr [rbx+184h], 0
jmp loc_B483
loc_B3C0:
lea r14, [rsp+48h+var_20]
mov [r14-10h], r14
lea rsi, aIncorrectRecei; "Incorrect received data size"
lea rdx, aIncorrectRecei+1Ch; ""
lea rdi, [rsp+48h+var_30]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rax, 100010301000103h
mov [rbx+184h], rax
lea rdi, [rbx+190h]
lea rsi, [rsp+48h+var_30]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
mov byte ptr [rbx+1B0h], 0
call currentTimestamp
jmp short loc_B460
loc_B411:
lea r14, [rsp+48h+var_20]
mov [r14-10h], r14
lea rsi, aOffsetIsNotMat; "'Offset' is not match received one"
lea rdx, aOffsetIsNotMat+22h; ""
lea rdi, [rsp+48h+var_30]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rax, 100010301000103h
mov [rbx+184h], rax
lea rdi, [rbx+190h]
lea rsi, [rsp+48h+var_30]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
mov byte ptr [rbx+1B0h], 0
call currentTimestamp
loc_B460:
mov [rbx+1B8h], rax
mov rdi, [rsp+48h+var_30]; void *
cmp rdi, r14
jz short loc_B47E
mov rsi, [rsp+48h+var_20]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_B47E:
mov eax, 1000103h
loc_B483:
add rsp, 38h
pop rbx
pop r14
retn
jmp short loc_B48F
jmp short loc_B494
loc_B48F:
mov rbx, rax
jmp short loc_B4AE
loc_B494:
mov rbx, rax
mov rdi, [rsp+arg_10]; void *
cmp rdi, r14
jz short loc_B4AE
mov rsi, [rsp+arg_20]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_B4AE:
mov rdi, rbx
call __Unwind_Resume
|
long long ModbusClientPort::writeSingleCoil(
ModbusClientPort *this,
ModbusObject *a2,
unsigned __int8 a3,
__int16 a4,
char a5)
{
long long v5; // rbx
ModbusObject *v6; // r9
long long result; // rax
long long v8; // rax
unsigned __int8 v9[2]; // [rsp+12h] [rbp-36h] BYREF
char v10; // [rsp+14h] [rbp-34h]
char v11; // [rsp+15h] [rbp-33h]
unsigned __int16 v12; // [rsp+16h] [rbp-32h] BYREF
void *v13[2]; // [rsp+18h] [rbp-30h] BYREF
_QWORD v14[4]; // [rsp+28h] [rbp-20h] BYREF
v5 = *((_QWORD *)this + 1);
v6 = *(ModbusObject **)(v5 + 120);
if ( v6 )
{
result = 0x80000000LL;
if ( v6 != a2 )
return result;
}
else
{
*(_QWORD *)(v5 + 120) = a2;
v9[0] = HIBYTE(a4);
v9[1] = a4;
v10 = -a5;
v11 = 0;
*(_WORD *)(v5 + 110) = a4;
}
result = ModbusClientPort::request(this, a3, 5u, v9, 4u, 4u, &v12);
if ( !(_DWORD)result )
{
result = 0LL;
if ( *(_BYTE *)(v5 + 108) || (*(_BYTE *)(v5 + 452) & 1) == 0 )
{
if ( v12 == 4 )
{
if ( __ROL2__(*(_WORD *)v9, 8) == *(_WORD *)(v5 + 110) )
{
*(_DWORD *)(v5 + 388) = 0;
return result;
}
v13[0] = v14;
std::string::_M_construct<char const*>((long long)v13, "'Offset' is not match received one", (long long)"");
*(_QWORD *)(v5 + 388) = 0x100010301000103LL;
std::string::_M_assign(v5 + 400, v13);
*(_BYTE *)(v5 + 432) = 0;
v8 = currentTimestamp(v5 + 400, v13);
}
else
{
v13[0] = v14;
std::string::_M_construct<char const*>((long long)v13, "Incorrect received data size", (long long)"");
*(_QWORD *)(v5 + 388) = 0x100010301000103LL;
std::string::_M_assign(v5 + 400, v13);
*(_BYTE *)(v5 + 432) = 0;
v8 = currentTimestamp(v5 + 400, v13);
}
*(_QWORD *)(v5 + 440) = v8;
if ( v13[0] != v14 )
operator delete(v13[0], v14[0] + 1LL);
return 16777475LL;
}
}
return result;
}
|
writeSingleCoil:
PUSH R14
PUSH RBX
SUB RSP,0x38
MOV RBX,qword ptr [RDI + 0x8]
MOV R9,qword ptr [RBX + 0x78]
TEST R9,R9
JZ 0x0010b334
MOV EAX,0x80000000
CMP R9,RSI
JNZ 0x0010b483
JMP 0x0010b351
LAB_0010b334:
MOV qword ptr [RBX + 0x78],RSI
MOV byte ptr [RSP + 0x12],CH
MOV byte ptr [RSP + 0x13],CL
NEG R8B
MOV byte ptr [RSP + 0x14],R8B
MOV byte ptr [RSP + 0x15],0x0
MOV word ptr [RBX + 0x6e],CX
LAB_0010b351:
LEA RAX,[RSP + 0x16]
MOV qword ptr [RSP],RAX
MOVZX ESI,DL
LEA RCX,[RSP + 0x12]
MOV EDX,0x5
MOV R8D,0x4
MOV R9D,0x4
CALL 0x0010a5b2
TEST EAX,EAX
JNZ 0x0010b483
XOR EAX,EAX
CMP byte ptr [RBX + 0x6c],0x0
JNZ 0x0010b395
TEST byte ptr [RBX + 0x1c4],0x1
JNZ 0x0010b483
LAB_0010b395:
CMP word ptr [RSP + 0x16],0x4
JNZ 0x0010b3c0
MOVZX ECX,word ptr [RSP + 0x12]
ROL CX,0x8
MOVZX ECX,CX
MOVZX EDX,word ptr [RBX + 0x6e]
CMP ECX,EDX
JNZ 0x0010b411
MOV dword ptr [RBX + 0x184],0x0
JMP 0x0010b483
LAB_0010b3c0:
LEA R14,[RSP + 0x28]
MOV qword ptr [R14 + -0x10],R14
LAB_0010b3c9:
LEA RSI,[0x118e1a]
LEA RDX,[0x118e36]
LEA RDI,[RSP + 0x18]
CALL 0x001092a8
MOV RAX,0x100010301000103
MOV qword ptr [RBX + 0x184],RAX
LEA RDI,[RBX + 0x190]
LAB_0010b3f9:
LEA RSI,[RSP + 0x18]
CALL 0x001051c0
MOV byte ptr [RBX + 0x1b0],0x0
CALL 0x0010fb5a
JMP 0x0010b460
LAB_0010b411:
LEA R14,[RSP + 0x28]
MOV qword ptr [R14 + -0x10],R14
LAB_0010b41a:
LEA RSI,[0x118fb3]
LEA RDX,[0x118fd5]
LEA RDI,[RSP + 0x18]
CALL 0x001092a8
MOV RAX,0x100010301000103
MOV qword ptr [RBX + 0x184],RAX
LEA RDI,[RBX + 0x190]
LAB_0010b44a:
LEA RSI,[RSP + 0x18]
CALL 0x001051c0
MOV byte ptr [RBX + 0x1b0],0x0
CALL 0x0010fb5a
LAB_0010b460:
MOV qword ptr [RBX + 0x1b8],RAX
MOV RDI,qword ptr [RSP + 0x18]
CMP RDI,R14
JZ 0x0010b47e
MOV RSI,qword ptr [RSP + 0x28]
INC RSI
CALL 0x00105310
LAB_0010b47e:
MOV EAX,0x1000103
LAB_0010b483:
ADD RSP,0x38
POP RBX
POP R14
RET
|
/* ModbusClientPort::writeSingleCoil(ModbusObject*, unsigned char, unsigned short, bool) */
int8 __thiscall
ModbusClientPort::writeSingleCoil
(ModbusClientPort *this,ModbusObject *param_1,uchar param_2,ushort param_3,bool param_4)
{
long lVar1;
int8 uVar2;
int2 local_36;
char local_34;
int1 local_33;
ushort local_32;
long *local_30 [2];
long local_20 [2];
lVar1 = *(long *)(this + 8);
if (*(ModbusObject **)(lVar1 + 0x78) == (ModbusObject *)0x0) {
*(ModbusObject **)(lVar1 + 0x78) = param_1;
local_36 = CONCAT11((char)param_3,(char)(param_3 >> 8));
local_34 = -param_4;
local_33 = 0;
*(ushort *)(lVar1 + 0x6e) = param_3;
}
else if (*(ModbusObject **)(lVar1 + 0x78) != param_1) {
return 0x80000000;
}
uVar2 = request(this,param_2,'\x05',(uchar *)&local_36,4,4,&local_32);
if (((int)uVar2 == 0) &&
((uVar2 = 0, *(char *)(lVar1 + 0x6c) != '\0' || ((*(byte *)(lVar1 + 0x1c4) & 1) == 0)))) {
if (local_32 == 4) {
if ((ushort)(local_36 << 8 | local_36 >> 8) == *(ushort *)(lVar1 + 0x6e)) {
*(int4 *)(lVar1 + 0x184) = 0;
return 0;
}
local_30[0] = local_20;
/* try { // try from 0010b41a to 0010b431 has its CatchHandler @ 0010b48b */
std::__cxx11::string::_M_construct<char_const*>
(local_30,"\'Offset\' is not match received one","");
*(int8 *)(lVar1 + 0x184) = 0x100010301000103;
/* try { // try from 0010b44a to 0010b45f has its CatchHandler @ 0010b48d */
std::__cxx11::string::_M_assign((string *)(lVar1 + 400));
*(int1 *)(lVar1 + 0x1b0) = 0;
uVar2 = currentTimestamp();
}
else {
local_30[0] = local_20;
/* try { // try from 0010b3c9 to 0010b3e0 has its CatchHandler @ 0010b48f */
std::__cxx11::string::_M_construct<char_const*>(local_30,"Incorrect received data size","");
*(int8 *)(lVar1 + 0x184) = 0x100010301000103;
/* try { // try from 0010b3f9 to 0010b40e has its CatchHandler @ 0010b494 */
std::__cxx11::string::_M_assign((string *)(lVar1 + 400));
*(int1 *)(lVar1 + 0x1b0) = 0;
uVar2 = currentTimestamp();
}
*(int8 *)(lVar1 + 0x1b8) = uVar2;
if (local_30[0] != local_20) {
operator_delete(local_30[0],local_20[0] + 1);
}
uVar2 = 0x1000103;
}
return uVar2;
}
|
|
12,114 |
testing::internal::FormatFileLocation[abi:cxx11](char const*, int)
|
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest-port.cc
|
GTEST_API_ ::std::string FormatFileLocation(const char* file, int line) {
const std::string file_name(file == nullptr ? kUnknownFile : file);
if (line < 0) {
return file_name + ":";
}
#ifdef _MSC_VER
return file_name + "(" + StreamableToString(line) + "):";
#else
return file_name + ":" + StreamableToString(line) + ":";
#endif // _MSC_VER
}
|
O0
|
cpp
|
testing::internal::FormatFileLocation[abi:cxx11](char const*, int):
subq $0xd8, %rsp
movq %rdi, 0x18(%rsp)
movq %rdi, %rax
movq %rax, 0x20(%rsp)
movq %rdi, 0xd0(%rsp)
movq %rsi, 0xc8(%rsp)
movl %edx, 0xc4(%rsp)
cmpq $0x0, 0xc8(%rsp)
jne 0xf9c04
leaq 0x59f83(%rip), %rax # 0x153b80
movq %rax, 0x10(%rsp)
jmp 0xf9c11
movq 0xc8(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
leaq 0x9f(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x15de0
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0xa0(%rsp), %rdi
callq 0x1bd40
jmp 0xf9c44
leaq 0x9f(%rsp), %rdi
callq 0x157f0
cmpl $0x0, 0xc4(%rsp)
jge 0xf9cc5
movq 0x18(%rsp), %rdi
leaq 0x5c86a(%rip), %rdx # 0x1564d1
leaq 0xa0(%rsp), %rsi
callq 0xcbcb0
jmp 0xf9c76
movl $0x1, 0x88(%rsp)
jmp 0xf9dad
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
leaq 0x9f(%rsp), %rdi
callq 0x157f0
jmp 0xf9dd4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
jmp 0xf9dc7
leaq 0x5c805(%rip), %rdx # 0x1564d1
leaq 0x48(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0xcbcb0
jmp 0xf9ce0
leaq 0x28(%rsp), %rdi
leaq 0xc4(%rsp), %rsi
callq 0x123790
jmp 0xf9cf4
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rsi
leaq 0x28(%rsp), %rdx
callq 0xcbbc0
jmp 0xf9d0a
movq 0x18(%rsp), %rdi
leaq 0x5c7bb(%rip), %rdx # 0x1564d1
leaq 0x68(%rsp), %rsi
callq 0x7cbe0
jmp 0xf9d22
leaq 0x68(%rsp), %rdi
callq 0x1c160
leaq 0x28(%rsp), %rdi
callq 0x1c160
leaq 0x48(%rsp), %rdi
callq 0x1c160
movl $0x1, 0x88(%rsp)
jmp 0xf9dad
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
jmp 0xf9da1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
jmp 0xf9d97
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x1c160
leaq 0x28(%rsp), %rdi
callq 0x1c160
leaq 0x48(%rsp), %rdi
callq 0x1c160
jmp 0xf9dc7
leaq 0xa0(%rsp), %rdi
callq 0x1c160
movq 0x20(%rsp), %rax
addq $0xd8, %rsp
retq
leaq 0xa0(%rsp), %rdi
callq 0x1c160
movq 0x90(%rsp), %rdi
callq 0x15dd0
nopw %cs:(%rax,%rax)
|
_ZN7testing8internal18FormatFileLocationB5cxx11EPKci:
sub rsp, 0D8h
mov [rsp+0D8h+var_C0], rdi; __int64
mov rax, rdi
mov [rsp+0D8h+var_B8], rax
mov [rsp+0D8h+var_8], rdi
mov qword ptr [rsp+0D8h+var_10], rsi
mov [rsp+0D8h+var_14], edx
cmp qword ptr [rsp+0D8h+var_10], 0
jnz short loc_F9C04
lea rax, _ZN7testing8internalL12kUnknownFileE; "unknown file"
mov qword ptr [rsp+0D8h+var_C8], rax
jmp short loc_F9C11
loc_F9C04:
mov rax, qword ptr [rsp+0D8h+var_10]
mov qword ptr [rsp+0D8h+var_C8], rax; int
loc_F9C11:
mov rax, qword ptr [rsp+0D8h+var_C8]
mov qword ptr [rsp+0D8h+var_D8], rax; int
lea rdi, [rsp+0D8h+var_39]
mov [rsp+0D8h+var_D0], rdi; void *
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rsi, qword ptr [rsp+0D8h+var_D8]
mov rdx, [rsp+0D8h+var_D0]
lea rdi, [rsp+0D8h+var_38]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_F9C44:
lea rdi, [rsp+0D8h+var_39]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
cmp [rsp+0D8h+var_14], 0
jge short loc_F9CC5
mov rdi, [rsp+0D8h+var_C0]; int
lea rdx, aTrace+6; int
lea rsi, [rsp+0D8h+var_38]; int
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*)
jmp short $+2
loc_F9C76:
mov [rsp+0D8h+var_50], 1
jmp loc_F9DAD
mov rcx, rax
mov eax, edx
mov [rsp+arg_88], rcx
mov [rsp+arg_84], eax
lea rdi, [rsp+arg_97]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_F9DD4
mov rcx, rax
mov eax, edx
mov [rsp+arg_88], rcx
mov [rsp+arg_84], eax
jmp loc_F9DC7
loc_F9CC5:
lea rdx, aTrace+6; int
lea rdi, [rsp+0D8h+var_90]; int
lea rsi, [rsp+0D8h+var_38]; int
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*)
jmp short $+2
loc_F9CE0:
lea rdi, [rsp+0D8h+var_B0]
lea rsi, [rsp+0D8h+var_14]
call _ZN7testing8internal18StreamableToStringIiEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; testing::internal::StreamableToString<int>(int const&)
jmp short $+2
loc_F9CF4:
lea rdi, [rsp+0D8h+var_70]
lea rsi, [rsp+0D8h+var_90]
lea rdx, [rsp+0D8h+var_B0]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&)
jmp short $+2
loc_F9D0A:
mov rdi, [rsp+0D8h+var_C0]
lea rdx, aTrace+6; ":"
lea rsi, [rsp+0D8h+var_70]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_F9D22:
lea rdi, [rsp+0D8h+var_70]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0D8h+var_B0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0D8h+var_90]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov [rsp+0D8h+var_50], 1
jmp short loc_F9DAD
mov rcx, rax
mov eax, edx
mov [rsp+arg_88], rcx
mov [rsp+arg_84], eax
jmp short loc_F9DA1
mov rcx, rax
mov eax, edx
mov [rsp+arg_88], rcx
mov [rsp+arg_84], eax
jmp short loc_F9D97
mov rcx, rax
mov eax, edx
mov [rsp+arg_88], rcx
mov [rsp+arg_84], eax
lea rdi, [rsp+arg_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_F9D97:
lea rdi, [rsp+arg_20]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_F9DA1:
lea rdi, [rsp+arg_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_F9DC7
loc_F9DAD:
lea rdi, [rsp+0D8h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rax, [rsp+0D8h+var_B8]
add rsp, 0D8h
retn
loc_F9DC7:
lea rdi, [rsp+arg_98]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_F9DD4:
mov rdi, [rsp+arg_88]
call __Unwind_Resume
|
_QWORD * testing::internal::FormatFileLocation[abi:cxx11](_QWORD *a1, long long a2, long long a3)
{
int v3; // edx
int v4; // ecx
int v5; // r8d
int v6; // r9d
const char *v8; // [rsp+10h] [rbp-C8h]
_BYTE v9[32]; // [rsp+28h] [rbp-B0h] BYREF
_QWORD v10[4]; // [rsp+48h] [rbp-90h] BYREF
_BYTE v11[32]; // [rsp+68h] [rbp-70h] BYREF
int v12; // [rsp+88h] [rbp-50h]
char v13; // [rsp+9Fh] [rbp-39h] BYREF
int v14[9]; // [rsp+A0h] [rbp-38h] BYREF
int v15; // [rsp+C4h] [rbp-14h] BYREF
int v16[2]; // [rsp+C8h] [rbp-10h]
_QWORD *v17; // [rsp+D0h] [rbp-8h]
v17 = a1;
*(_QWORD *)v16 = a2;
v15 = a3;
if ( a2 )
v8 = *(const char **)v16;
else
v8 = "unknown file";
std::allocator<char>::allocator(&v13, a2, a3);
std::string::basic_string<std::allocator<char>>((long long)v14, (long long)v8, (long long)&v13);
std::allocator<char>::~allocator(&v13, v8);
if ( v15 >= 0 )
{
std::operator+<char>(v10, (long long)v14, (long long)":");
testing::internal::StreamableToString<int>((unsigned int)v9, (unsigned int)&v15, v3, v4, v5, v6);
std::operator+<char>((long long)v11, v10, (long long)v9);
std::operator+<char>((long long)a1, (long long)v11, (long long)":");
std::string::~string(v11);
std::string::~string(v9);
std::string::~string(v10);
}
else
{
std::operator+<char>(a1, (long long)v14, (long long)":");
}
v12 = 1;
std::string::~string(v14);
return a1;
}
|
FormatFileLocation[abi:cxx11]:
SUB RSP,0xd8
MOV qword ptr [RSP + 0x18],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RSP + 0xd0],RDI
MOV qword ptr [RSP + 0xc8],RSI
MOV dword ptr [RSP + 0xc4],EDX
CMP qword ptr [RSP + 0xc8],0x0
JNZ 0x001f9c04
LEA RAX,[0x253b80]
MOV qword ptr [RSP + 0x10],RAX
JMP 0x001f9c11
LAB_001f9c04:
MOV RAX,qword ptr [RSP + 0xc8]
MOV qword ptr [RSP + 0x10],RAX
LAB_001f9c11:
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP],RAX
LEA RDI,[RSP + 0x9f]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x00115de0
MOV RSI,qword ptr [RSP]
MOV RDX,qword ptr [RSP + 0x8]
LAB_001f9c35:
LEA RDI,[RSP + 0xa0]
CALL 0x0011bd40
JMP 0x001f9c44
LAB_001f9c44:
LEA RDI,[RSP + 0x9f]
CALL 0x001157f0
CMP dword ptr [RSP + 0xc4],0x0
JGE 0x001f9cc5
LAB_001f9c5b:
MOV RDI,qword ptr [RSP + 0x18]
LEA RDX,[0x2564d1]
LEA RSI,[RSP + 0xa0]
CALL 0x001cbcb0
JMP 0x001f9c76
LAB_001f9c76:
MOV dword ptr [RSP + 0x88],0x1
JMP 0x001f9dad
LAB_001f9cc5:
LEA RDX,[0x2564d1]
LEA RDI,[RSP + 0x48]
LEA RSI,[RSP + 0xa0]
CALL 0x001cbcb0
JMP 0x001f9ce0
LAB_001f9ce0:
LEA RDI,[RSP + 0x28]
LEA RSI,[RSP + 0xc4]
CALL 0x00223790
JMP 0x001f9cf4
LAB_001f9cf4:
LEA RDI,[RSP + 0x68]
LEA RSI,[RSP + 0x48]
LEA RDX,[RSP + 0x28]
CALL 0x001cbbc0
JMP 0x001f9d0a
LAB_001f9d0a:
MOV RDI,qword ptr [RSP + 0x18]
LEA RDX,[0x2564d1]
LEA RSI,[RSP + 0x68]
CALL 0x0017cbe0
LAB_001f9d20:
JMP 0x001f9d22
LAB_001f9d22:
LEA RDI,[RSP + 0x68]
CALL 0x0011c160
LEA RDI,[RSP + 0x28]
CALL 0x0011c160
LEA RDI,[RSP + 0x48]
CALL 0x0011c160
MOV dword ptr [RSP + 0x88],0x1
JMP 0x001f9dad
LAB_001f9dad:
LEA RDI,[RSP + 0xa0]
CALL 0x0011c160
MOV RAX,qword ptr [RSP + 0x20]
ADD RSP,0xd8
RET
|
/* testing::internal::FormatFileLocation[abi:cxx11](char const*, int) */
internal * __thiscall
testing::internal::FormatFileLocation_abi_cxx11_(internal *this,char *param_1,int param_2)
{
char *local_c8;
internal local_b0 [32];
string local_90 [32];
string local_70 [32];
int4 local_50;
allocator local_39;
string local_38 [36];
int local_14;
char *local_10;
internal *local_8;
local_c8 = param_1;
if (param_1 == (char *)0x0) {
local_c8 = "unknown file";
}
local_14 = param_2;
local_10 = param_1;
local_8 = this;
std::allocator<char>::allocator();
/* try { // try from 001f9c35 to 001f9c41 has its CatchHandler @ 001f9c86 */
std::__cxx11::string::string<std::allocator<char>>(local_38,local_c8,&local_39);
std::allocator<char>::~allocator((allocator<char> *)&local_39);
if (local_14 < 0) {
/* try { // try from 001f9c5b to 001f9cdd has its CatchHandler @ 001f9cac */
std::operator+((string *)this,(char *)local_38);
}
else {
std::operator+(local_90,(char *)local_38);
/* try { // try from 001f9ce0 to 001f9cf1 has its CatchHandler @ 001f9d4d */
StreamableToString<int>(local_b0,&local_14);
/* try { // try from 001f9cf4 to 001f9d07 has its CatchHandler @ 001f9d63 */
std::operator+(local_70,local_90);
/* try { // try from 001f9d0a to 001f9d1f has its CatchHandler @ 001f9d79 */
std::operator+((string *)this,(char *)local_70);
std::__cxx11::string::~string(local_70);
std::__cxx11::string::~string((string *)local_b0);
std::__cxx11::string::~string(local_90);
}
local_50 = 1;
std::__cxx11::string::~string(local_38);
return this;
}
|
|
12,115 |
mi_get_pointer_length
|
eloqsql/storage/myisam/mi_create.c
|
uint mi_get_pointer_length(ulonglong file_length, uint def)
{
DBUG_ASSERT(def >= 2 && def <= 7);
if (file_length) /* If not default */
{
#ifdef NOT_YET_READY_FOR_8_BYTE_POINTERS
if (file_length >= 1ULL << 56)
def=8;
else
#endif
if (file_length >= 1ULL << 48)
def=7;
else if (file_length >= 1ULL << 40)
def=6;
else if (file_length >= 1ULL << 32)
def=5;
else if (file_length >= 1ULL << 24)
def=4;
else if (file_length >= 1ULL << 16)
def=3;
else
def=2;
}
return def;
}
|
O0
|
c
|
mi_get_pointer_length:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
jmp 0xd958d
cmpq $0x0, -0x8(%rbp)
je 0xd961a
movabsq $0x1000000000000, %rax # imm = 0x1000000000000
cmpq %rax, -0x8(%rbp)
jb 0xd95b1
movl $0x7, -0xc(%rbp)
jmp 0xd9618
movabsq $0x10000000000, %rax # imm = 0x10000000000
cmpq %rax, -0x8(%rbp)
jb 0xd95ca
movl $0x6, -0xc(%rbp)
jmp 0xd9616
movabsq $0x100000000, %rax # imm = 0x100000000
cmpq %rax, -0x8(%rbp)
jb 0xd95e3
movl $0x5, -0xc(%rbp)
jmp 0xd9614
cmpq $0x1000000, -0x8(%rbp) # imm = 0x1000000
jb 0xd95f6
movl $0x4, -0xc(%rbp)
jmp 0xd9612
cmpq $0x10000, -0x8(%rbp) # imm = 0x10000
jb 0xd9609
movl $0x3, -0xc(%rbp)
jmp 0xd9610
movl $0x2, -0xc(%rbp)
jmp 0xd9612
jmp 0xd9614
jmp 0xd9616
jmp 0xd9618
jmp 0xd961a
movl -0xc(%rbp), %eax
popq %rbp
retq
nop
|
mi_get_pointer_length:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
jmp short $+2
loc_D958D:
cmp [rbp+var_8], 0
jz loc_D961A
mov rax, 1000000000000h
cmp [rbp+var_8], rax
jb short loc_D95B1
mov [rbp+var_C], 7
jmp short loc_D9618
loc_D95B1:
mov rax, 10000000000h
cmp [rbp+var_8], rax
jb short loc_D95CA
mov [rbp+var_C], 6
jmp short loc_D9616
loc_D95CA:
mov rax, 100000000h
cmp [rbp+var_8], rax
jb short loc_D95E3
mov [rbp+var_C], 5
jmp short loc_D9614
loc_D95E3:
cmp [rbp+var_8], 1000000h
jb short loc_D95F6
mov [rbp+var_C], 4
jmp short loc_D9612
loc_D95F6:
cmp [rbp+var_8], 10000h
jb short loc_D9609
mov [rbp+var_C], 3
jmp short loc_D9610
loc_D9609:
mov [rbp+var_C], 2
loc_D9610:
jmp short $+2
loc_D9612:
jmp short $+2
loc_D9614:
jmp short $+2
loc_D9616:
jmp short $+2
loc_D9618:
jmp short $+2
loc_D961A:
mov eax, [rbp+var_C]
pop rbp
retn
|
long long mi_get_pointer_length(unsigned long long a1, unsigned int a2)
{
if ( a1 )
{
if ( a1 < 0x1000000000000LL )
{
if ( a1 < 0x10000000000LL )
{
if ( a1 < 0x100000000LL )
{
if ( a1 < 0x1000000 )
{
if ( a1 < 0x10000 )
return 2;
else
return 3;
}
else
{
return 4;
}
}
else
{
return 5;
}
}
else
{
return 6;
}
}
else
{
return 7;
}
}
return a2;
}
|
mi_get_pointer_length:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
JMP 0x001d958d
LAB_001d958d:
CMP qword ptr [RBP + -0x8],0x0
JZ 0x001d961a
MOV RAX,0x1000000000000
CMP qword ptr [RBP + -0x8],RAX
JC 0x001d95b1
MOV dword ptr [RBP + -0xc],0x7
JMP 0x001d9618
LAB_001d95b1:
MOV RAX,0x10000000000
CMP qword ptr [RBP + -0x8],RAX
JC 0x001d95ca
MOV dword ptr [RBP + -0xc],0x6
JMP 0x001d9616
LAB_001d95ca:
MOV RAX,0x100000000
CMP qword ptr [RBP + -0x8],RAX
JC 0x001d95e3
MOV dword ptr [RBP + -0xc],0x5
JMP 0x001d9614
LAB_001d95e3:
CMP qword ptr [RBP + -0x8],0x1000000
JC 0x001d95f6
MOV dword ptr [RBP + -0xc],0x4
JMP 0x001d9612
LAB_001d95f6:
CMP qword ptr [RBP + -0x8],0x10000
JC 0x001d9609
MOV dword ptr [RBP + -0xc],0x3
JMP 0x001d9610
LAB_001d9609:
MOV dword ptr [RBP + -0xc],0x2
LAB_001d9610:
JMP 0x001d9612
LAB_001d9612:
JMP 0x001d9614
LAB_001d9614:
JMP 0x001d9616
LAB_001d9616:
JMP 0x001d9618
LAB_001d9618:
JMP 0x001d961a
LAB_001d961a:
MOV EAX,dword ptr [RBP + -0xc]
POP RBP
RET
|
int4 mi_get_pointer_length(ulong param_1,int4 param_2)
{
int4 local_14;
local_14 = param_2;
if (param_1 != 0) {
if (param_1 < 0x1000000000000) {
if (param_1 < 0x10000000000) {
if (param_1 < 0x100000000) {
if (param_1 < 0x1000000) {
if (param_1 < 0x10000) {
local_14 = 2;
}
else {
local_14 = 3;
}
}
else {
local_14 = 4;
}
}
else {
local_14 = 5;
}
}
else {
local_14 = 6;
}
}
else {
local_14 = 7;
}
}
return local_14;
}
|
|
12,116 |
my_wildcmp_mb_impl
|
eloqsql/strings/ctype-mb.c
|
static
int my_wildcmp_mb_impl(CHARSET_INFO *cs,
const char *str,const char *str_end,
const char *wildstr,const char *wildend,
int escape, int w_one, int w_many, int recurse_level)
{
int result= -1; /* Not found, using wildcards */
if (my_string_stack_guard && my_string_stack_guard(recurse_level))
return 1;
while (wildstr != wildend)
{
while (*wildstr != w_many && *wildstr != w_one)
{
int l;
if (*wildstr == escape && wildstr+1 != wildend)
wildstr++;
if ((l = my_ismbchar(cs, wildstr, wildend)))
{
if (str+l > str_end || memcmp(str, wildstr, l) != 0)
return 1;
str += l;
wildstr += l;
}
else
if (str == str_end || likeconv(cs,*wildstr++) != likeconv(cs,*str++))
return(1); /* No match */
if (wildstr == wildend)
return (str != str_end); /* Match if both are at end */
result=1; /* Found an anchor char */
}
if (*wildstr == w_one)
{
do
{
if (str == str_end) /* Skip one char if possible */
return (result);
INC_PTR(cs,str,str_end);
} while (++wildstr < wildend && *wildstr == w_one);
if (wildstr == wildend)
break;
}
if (*wildstr == w_many)
{ /* Found w_many */
uchar cmp;
const char* mb = wildstr;
int mb_len=0;
wildstr++;
/* Remove any '%' and '_' from the wild search string */
for (; wildstr != wildend ; wildstr++)
{
if (*wildstr == w_many)
continue;
if (*wildstr == w_one)
{
if (str == str_end)
return (-1);
INC_PTR(cs,str,str_end);
continue;
}
break; /* Not a wild character */
}
if (wildstr == wildend)
return(0); /* Ok if w_many is last */
if (str == str_end)
return -1;
if ((cmp= *wildstr) == escape && wildstr+1 != wildend)
cmp= *++wildstr;
mb=wildstr;
mb_len= my_ismbchar(cs, wildstr, wildend);
INC_PTR(cs,wildstr,wildend); /* This is compared trough cmp */
cmp=likeconv(cs,cmp);
do
{
for (;;)
{
if (str >= str_end)
return -1;
if (mb_len)
{
if (str+mb_len <= str_end && memcmp(str, mb, mb_len) == 0)
{
str += mb_len;
break;
}
}
else if (!my_ismbchar(cs, str, str_end) &&
likeconv(cs,*str) == cmp)
{
str++;
break;
}
INC_PTR(cs,str, str_end);
}
{
int tmp=my_wildcmp_mb_impl(cs,str,str_end,wildstr,wildend,escape,w_one,
w_many, recurse_level + 1);
if (tmp <= 0)
return (tmp);
}
} while (str != str_end);
return(-1);
}
}
return (str != str_end ? 1 : 0);
}
|
O3
|
c
|
my_wildcmp_mb_impl:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r9d, -0x44(%rbp)
movq %r8, -0x40(%rbp)
movq %rcx, %r15
movq %rdx, -0x58(%rbp)
movq %rsi, %r12
movq %rdi, -0x38(%rbp)
movl 0x20(%rbp), %eax
movq %rax, -0x68(%rbp)
leaq 0x33f210(%rip), %rax # 0x37c2d8
movq (%rax), %rax
testq %rax, %rax
je 0x3d0e3
movl 0x20(%rbp), %edi
callq *%rax
movl $0x1, %r14d
testl %eax, %eax
jne 0x3d27e
movl 0x10(%rbp), %edi
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
cmpq -0x40(%rbp), %r15
je 0x3d270
movb (%r15), %al
movsbl %al, %ecx
movl 0x18(%rbp), %edx
cmpl %edx, %ecx
sete %sil
cmpl %edi, %ecx
sete %dl
orb %dl, %sil
movq -0x58(%rbp), %r13
je 0x3d1ac
testb %dl, %dl
je 0x3d199
incq %r15
movq %r15, %rax
movq -0x38(%rbp), %rbx
cmpq %r13, %r12
je 0x3d27e
movq %rax, %r15
movq 0xb8(%rbx), %rax
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq *0xc0(%rax)
movl %eax, %ecx
movl $0x1, %eax
cmpl $0x2, %ecx
jl 0x3d174
movq 0xb8(%rbx), %rax
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq *0xc0(%rax)
cmpl $0x2, %eax
movl $0x0, %ecx
cmovll %ecx, %eax
addq %rax, %r12
cmpq -0x40(%rbp), %r15
movl 0x10(%rbp), %edi
jae 0x3d18c
movsbl (%r15), %ecx
leaq 0x1(%r15), %rax
cmpl %edi, %ecx
je 0x3d125
cmpq -0x40(%rbp), %r15
je 0x3d274
movb (%r15), %al
movsbl %al, %eax
movl 0x18(%rbp), %ecx
cmpl %ecx, %eax
jne 0x3d0ec
jmp 0x3d290
leaq 0x1(%r15), %rbx
movq -0x40(%rbp), %rdx
cmpq %rdx, %rbx
cmoveq %r15, %rbx
cmpl -0x44(%rbp), %ecx
cmovneq %r15, %rbx
movq -0x38(%rbp), %rdi
movq 0xb8(%rdi), %rax
movq %rbx, %rsi
callq *0xc0(%rax)
cmpl $0x2, %eax
jge 0x3d210
movl $0x1, %r14d
cmpq %r13, %r12
je 0x3d27e
movq -0x38(%rbp), %rax
movq 0x58(%rax), %rax
movzbl (%rbx), %ecx
movb (%rax,%rcx), %cl
movzbl (%r12), %edx
cmpb (%rax,%rdx), %cl
movl 0x10(%rbp), %edi
jne 0x3d27e
incq %rbx
incq %r12
movq %rbx, %r15
jmp 0x3d243
movl %eax, %r15d
movq %r13, %rax
leaq (%r12,%r15), %r13
movl $0x1, %r14d
cmpq %rax, %r13
ja 0x3d27e
movq %r12, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x24300
testl %eax, %eax
movl 0x10(%rbp), %edi
jne 0x3d27e
addq %r15, %rbx
movq %rbx, %r15
movq %r13, %r12
cmpq -0x40(%rbp), %r15
movq -0x58(%rbp), %r13
je 0x3d274
movb (%r15), %al
movsbl %al, %ecx
cmpl %edi, %ecx
sete %dl
movl 0x18(%rbp), %esi
cmpl %esi, %ecx
je 0x3d117
cmpl %edi, %ecx
jne 0x3d1ac
jmp 0x3d117
movq -0x58(%rbp), %r13
xorl %r14d, %r14d
cmpq %r13, %r12
setne %r14b
movl %r14d, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1(%r15), %rax
cmpq -0x40(%rbp), %rax
je 0x3d320
addq $0x2, %r15
xorl %r13d, %r13d
xorl %r14d, %r14d
movb -0x1(%r15), %bl
movsbl %bl, %eax
movl 0x18(%rbp), %ecx
cmpl %ecx, %eax
je 0x3d30e
cmpl %edi, %eax
jne 0x3d328
movq -0x58(%rbp), %rbx
cmpq %rbx, %r12
je 0x3d4f2
movq -0x38(%rbp), %rdi
movq 0xb8(%rdi), %rax
movq %r12, %rsi
movq %rbx, %rdx
callq *0xc0(%rax)
movl %eax, %ecx
movl $0x1, %eax
cmpl $0x2, %ecx
jl 0x3d308
movq -0x38(%rbp), %rdi
movq 0xb8(%rdi), %rax
movq %r12, %rsi
movq %rbx, %rdx
callq *0xc0(%rax)
cmpl $0x2, %eax
cmovll %r13d, %eax
addq %rax, %r12
movl 0x10(%rbp), %edi
leaq 0x1(%r15), %rax
cmpq -0x40(%rbp), %r15
movq %rax, %r15
jne 0x3d2a8
jmp 0x3d27e
xorl %r14d, %r14d
jmp 0x3d27e
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
movq -0x58(%rbp), %r13
cmpq %r13, %r12
je 0x3d27e
movzbl %bl, %eax
leaq -0x1(%r15), %rcx
movq %rcx, -0x50(%rbp)
cmpl -0x44(%rbp), %eax
jne 0x3d358
cmpq -0x40(%rbp), %r15
je 0x3d358
movb (%r15), %bl
movq %r15, -0x50(%rbp)
movq -0x38(%rbp), %rdi
movq 0xb8(%rdi), %rax
movq -0x50(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq *0xc0(%rax)
xorl %ecx, %ecx
cmpl $0x2, %eax
movl %eax, %r15d
cmovll %ecx, %eax
movl %eax, -0x60(%rbp)
movq -0x38(%rbp), %rdi
movq 0xb8(%rdi), %rax
movq -0x50(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq *0xc0(%rax)
movl $0x1, %ecx
cmpl $0x2, %eax
jl 0x3d3c8
movq -0x38(%rbp), %rdi
movq 0xb8(%rdi), %rax
movq -0x50(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq *0xc0(%rax)
movl %eax, %ecx
cmpl $0x2, %eax
movl $0x0, %eax
cmovll %eax, %ecx
addq -0x50(%rbp), %rcx
movq %rcx, -0x70(%rbp)
movq -0x38(%rbp), %rax
movq 0x58(%rax), %rax
movzbl %bl, %ecx
movb (%rax,%rcx), %al
movb %al, -0x29(%rbp)
movl -0x60(%rbp), %eax
movq %rax, -0x60(%rbp)
movq -0x68(%rbp), %rax
incl %eax
movq %rax, -0x68(%rbp)
cmpq %r13, %r12
jae 0x3d27e
movq %r12, %rbx
cmpl $0x2, %r15d
jge 0x3d435
movq -0x38(%rbp), %rdi
movq 0xb8(%rdi), %rax
movq %rbx, %rsi
movq %r13, %rdx
callq *0xc0(%rax)
cmpl $0x1, %eax
jg 0x3d456
movq -0x38(%rbp), %rax
movq 0x58(%rax), %rax
movzbl (%rbx), %ecx
movb -0x29(%rbp), %dl
cmpb %dl, (%rax,%rcx)
jne 0x3d456
jmp 0x3d4ac
movq -0x60(%rbp), %rax
leaq (%rbx,%rax), %r12
cmpq %r13, %r12
ja 0x3d456
movq %rbx, %rdi
movq -0x50(%rbp), %rsi
movq -0x60(%rbp), %rdx
callq 0x24300
testl %eax, %eax
je 0x3d4b2
movq -0x38(%rbp), %rdi
movq 0xb8(%rdi), %rax
movq %rbx, %rsi
movq %r13, %rdx
callq *0xc0(%rax)
movl %eax, %ecx
movl $0x1, %eax
cmpl $0x2, %ecx
jl 0x3d49b
movq -0x38(%rbp), %rdi
movq 0xb8(%rdi), %rax
movq %rbx, %rsi
movq %r13, %rdx
callq *0xc0(%rax)
cmpl $0x2, %eax
movl $0x0, %ecx
cmovll %ecx, %eax
addq %rax, %rbx
cmpq %r13, %rbx
jb 0x3d3fe
jmp 0x3d27e
incq %rbx
movq %rbx, %r12
subq $0x8, %rsp
movq -0x38(%rbp), %rdi
movq %r12, %rsi
movq %r13, %rdx
movq -0x70(%rbp), %rcx
movq -0x40(%rbp), %r8
movl -0x44(%rbp), %r9d
pushq -0x68(%rbp)
movl 0x18(%rbp), %eax
pushq %rax
movl 0x10(%rbp), %eax
pushq %rax
callq 0x3d093
addq $0x20, %rsp
testl %eax, %eax
jle 0x3d4fd
cmpq %r13, %r12
jne 0x3d3f2
jmp 0x3d27e
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
jmp 0x3d27e
movl %eax, %r14d
jmp 0x3d27e
|
my_wildcmp_mb_impl:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov [rbp+var_44], r9d
mov [rbp+var_40], r8
mov r15, rcx
mov [rbp+var_58], rdx
mov r12, rsi
mov [rbp+var_38], rdi
mov eax, [rbp+arg_10]
mov [rbp+var_68], rax
lea rax, my_string_stack_guard
mov rax, [rax]
test rax, rax
jz short loc_3D0E3
mov edi, [rbp+arg_10]
call rax
mov r14d, 1
test eax, eax
jnz loc_3D27E
loc_3D0E3:
mov edi, [rbp+arg_0]
mov r14d, 0FFFFFFFFh
loc_3D0EC:
cmp r15, [rbp+var_40]
jz loc_3D270
mov al, [r15]
movsx ecx, al
mov edx, [rbp+arg_8]
cmp ecx, edx
setz sil
cmp ecx, edi
setz dl
or sil, dl
mov r13, [rbp+var_58]
jz loc_3D1AC
loc_3D117:
test dl, dl
jz short loc_3D199
inc r15
mov rax, r15
mov rbx, [rbp+var_38]
loc_3D125:
cmp r12, r13
jz loc_3D27E
mov r15, rax
mov rax, [rbx+0B8h]
mov rdi, rbx
mov rsi, r12
mov rdx, r13
call qword ptr [rax+0C0h]
mov ecx, eax
mov eax, 1
cmp ecx, 2
jl short loc_3D174
mov rax, [rbx+0B8h]
mov rdi, rbx
mov rsi, r12
mov rdx, r13
call qword ptr [rax+0C0h]
cmp eax, 2
mov ecx, 0
cmovl eax, ecx
loc_3D174:
add r12, rax
cmp r15, [rbp+var_40]
mov edi, [rbp+arg_0]
jnb short loc_3D18C
movsx ecx, byte ptr [r15]
lea rax, [r15+1]
cmp ecx, edi
jz short loc_3D125
loc_3D18C:
cmp r15, [rbp+var_40]
jz loc_3D274
mov al, [r15]
loc_3D199:
movsx eax, al
mov ecx, [rbp+arg_8]
cmp eax, ecx
jnz loc_3D0EC
jmp loc_3D290
loc_3D1AC:
lea rbx, [r15+1]
mov rdx, [rbp+var_40]
cmp rbx, rdx
cmovz rbx, r15
cmp ecx, [rbp+var_44]
cmovnz rbx, r15
mov rdi, [rbp+var_38]
mov rax, [rdi+0B8h]
mov rsi, rbx
call qword ptr [rax+0C0h]
cmp eax, 2
jge short loc_3D210
mov r14d, 1
cmp r12, r13
jz loc_3D27E
mov rax, [rbp+var_38]
mov rax, [rax+58h]
movzx ecx, byte ptr [rbx]
mov cl, [rax+rcx]
movzx edx, byte ptr [r12]
cmp cl, [rax+rdx]
mov edi, [rbp+arg_0]
jnz short loc_3D27E
inc rbx
inc r12
mov r15, rbx
jmp short loc_3D243
loc_3D210:
mov r15d, eax
mov rax, r13
lea r13, [r12+r15]
mov r14d, 1
cmp r13, rax
ja short loc_3D27E
mov rdi, r12
mov rsi, rbx
mov rdx, r15
call _bcmp
test eax, eax
mov edi, [rbp+arg_0]
jnz short loc_3D27E
add rbx, r15
mov r15, rbx
mov r12, r13
loc_3D243:
cmp r15, [rbp+var_40]
mov r13, [rbp+var_58]
jz short loc_3D274
mov al, [r15]
movsx ecx, al
cmp ecx, edi
setz dl
mov esi, [rbp+arg_8]
cmp ecx, esi
jz loc_3D117
cmp ecx, edi
jnz loc_3D1AC
jmp loc_3D117
loc_3D270:
mov r13, [rbp+var_58]
loc_3D274:
xor r14d, r14d
cmp r12, r13
setnz r14b
loc_3D27E:
mov eax, r14d
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3D290:
lea rax, [r15+1]
cmp rax, [rbp+var_40]
jz loc_3D320
add r15, 2
xor r13d, r13d
xor r14d, r14d
loc_3D2A8:
mov bl, [r15-1]
movsx eax, bl
mov ecx, [rbp+arg_8]
cmp eax, ecx
jz short loc_3D30E
cmp eax, edi
jnz short loc_3D328
mov rbx, [rbp+var_58]
cmp r12, rbx
jz loc_3D4F2
mov rdi, [rbp+var_38]
mov rax, [rdi+0B8h]
mov rsi, r12
mov rdx, rbx
call qword ptr [rax+0C0h]
mov ecx, eax
mov eax, 1
cmp ecx, 2
jl short loc_3D308
mov rdi, [rbp+var_38]
mov rax, [rdi+0B8h]
mov rsi, r12
mov rdx, rbx
call qword ptr [rax+0C0h]
cmp eax, 2
cmovl eax, r13d
loc_3D308:
add r12, rax
mov edi, [rbp+arg_0]
loc_3D30E:
lea rax, [r15+1]
cmp r15, [rbp+var_40]
mov r15, rax
jnz short loc_3D2A8
jmp loc_3D27E
loc_3D320:
xor r14d, r14d
jmp loc_3D27E
loc_3D328:
mov r14d, 0FFFFFFFFh
mov r13, [rbp+var_58]
cmp r12, r13
jz loc_3D27E
movzx eax, bl
lea rcx, [r15-1]
mov [rbp+var_50], rcx
cmp eax, [rbp+var_44]
jnz short loc_3D358
cmp r15, [rbp+var_40]
jz short loc_3D358
mov bl, [r15]
mov [rbp+var_50], r15
loc_3D358:
mov rdi, [rbp+var_38]
mov rax, [rdi+0B8h]
mov rsi, [rbp+var_50]
mov rdx, [rbp+var_40]
call qword ptr [rax+0C0h]
xor ecx, ecx
cmp eax, 2
mov r15d, eax
cmovl eax, ecx
mov dword ptr [rbp+var_60], eax
mov rdi, [rbp+var_38]
mov rax, [rdi+0B8h]
mov rsi, [rbp+var_50]
mov rdx, [rbp+var_40]
call qword ptr [rax+0C0h]
mov ecx, 1
cmp eax, 2
jl short loc_3D3C8
mov rdi, [rbp+var_38]
mov rax, [rdi+0B8h]
mov rsi, [rbp+var_50]
mov rdx, [rbp+var_40]
call qword ptr [rax+0C0h]
mov ecx, eax
cmp eax, 2
mov eax, 0
cmovl ecx, eax
loc_3D3C8:
add rcx, [rbp+var_50]
mov [rbp+var_70], rcx
mov rax, [rbp+var_38]
mov rax, [rax+58h]
movzx ecx, bl
mov al, [rax+rcx]
mov [rbp+var_29], al
mov eax, dword ptr [rbp+var_60]
mov [rbp+var_60], rax
mov rax, [rbp+var_68]
inc eax
mov [rbp+var_68], rax
loc_3D3F2:
cmp r12, r13
jnb loc_3D27E
mov rbx, r12
loc_3D3FE:
cmp r15d, 2
jge short loc_3D435
mov rdi, [rbp+var_38]
mov rax, [rdi+0B8h]
mov rsi, rbx
mov rdx, r13
call qword ptr [rax+0C0h]
cmp eax, 1
jg short loc_3D456
mov rax, [rbp+var_38]
mov rax, [rax+58h]
movzx ecx, byte ptr [rbx]
mov dl, [rbp+var_29]
cmp [rax+rcx], dl
jnz short loc_3D456
jmp short loc_3D4AC
loc_3D435:
mov rax, [rbp+var_60]
lea r12, [rbx+rax]
cmp r12, r13
ja short loc_3D456
mov rdi, rbx
mov rsi, [rbp+var_50]
mov rdx, [rbp+var_60]
call _bcmp
test eax, eax
jz short loc_3D4B2
loc_3D456:
mov rdi, [rbp+var_38]
mov rax, [rdi+0B8h]
mov rsi, rbx
mov rdx, r13
call qword ptr [rax+0C0h]
mov ecx, eax
mov eax, 1
cmp ecx, 2
jl short loc_3D49B
mov rdi, [rbp+var_38]
mov rax, [rdi+0B8h]
mov rsi, rbx
mov rdx, r13
call qword ptr [rax+0C0h]
cmp eax, 2
mov ecx, 0
cmovl eax, ecx
loc_3D49B:
add rbx, rax
cmp rbx, r13
jb loc_3D3FE
jmp loc_3D27E
loc_3D4AC:
inc rbx
mov r12, rbx
loc_3D4B2:
sub rsp, 8
mov rdi, [rbp+var_38]
mov rsi, r12
mov rdx, r13
mov rcx, [rbp+var_70]
mov r8, [rbp+var_40]
mov r9d, [rbp+var_44]
push [rbp+var_68]
mov eax, [rbp+arg_8]
push rax
mov eax, [rbp+arg_0]
push rax
call my_wildcmp_mb_impl
add rsp, 20h
test eax, eax
jle short loc_3D4FD
cmp r12, r13
jnz loc_3D3F2
jmp loc_3D27E
loc_3D4F2:
mov r14d, 0FFFFFFFFh
jmp loc_3D27E
loc_3D4FD:
mov r14d, eax
jmp loc_3D27E
|
long long my_wildcmp_mb_impl(
long long a1,
unsigned __int8 *a2,
unsigned __int8 *a3,
char *a4,
char *a5,
int a6,
int a7,
int a8,
unsigned int a9)
{
unsigned int v11; // r14d
int v12; // edi
char v13; // al
int v14; // ecx
bool v15; // dl
unsigned __int8 *v16; // r13
char *v17; // rax
int v18; // ecx
long long v19; // rax
unsigned __int8 *v20; // rbx
int v21; // eax
long long v22; // r15
unsigned __int8 *v23; // rax
unsigned __int8 *v24; // r13
char *v26; // r15
unsigned __int8 v27; // bl
int v28; // ecx
long long v29; // rax
int v31; // eax
int v32; // r15d
int v33; // eax
int v34; // ecx
unsigned __int8 *v35; // rbx
int v36; // ecx
long long v37; // rax
int v38; // eax
int v39; // [rsp+0h] [rbp-70h]
unsigned int v40; // [rsp+10h] [rbp-60h]
char *v42; // [rsp+20h] [rbp-50h]
char v46; // [rsp+47h] [rbp-29h]
if ( !my_string_stack_guard || (v11 = 1, !(unsigned int)my_string_stack_guard(a9)) )
{
v12 = a7;
v11 = -1;
do
{
if ( a4 == a5 )
{
v16 = a3;
return a2 != v16;
}
v13 = *a4;
v14 = *a4;
v15 = v14 == v12;
v16 = a3;
if ( v14 != v12 && v14 != a8 )
{
do
{
v20 = (unsigned __int8 *)(a4 + 1);
if ( a4 + 1 == a5 )
v20 = (unsigned __int8 *)a4;
if ( v14 != a6 )
v20 = (unsigned __int8 *)a4;
v21 = (*(long long ( **)(long long, unsigned __int8 *))(*(_QWORD *)(a1 + 184) + 192LL))(a1, v20);
if ( v21 >= 2 )
{
v22 = (unsigned int)v21;
v23 = v16;
v24 = &a2[v22];
v11 = 1;
if ( &a2[v22] > v23 )
return v11;
v12 = a7;
if ( (unsigned int)bcmp(a2, v20, v22) )
return v11;
a4 = (char *)&v20[v22];
a2 = v24;
}
else
{
v11 = 1;
if ( a2 == v16 )
return v11;
v12 = a7;
if ( *(_BYTE *)(*(_QWORD *)(a1 + 88) + *v20) != *(_BYTE *)(*(_QWORD *)(a1 + 88) + *a2) )
return v11;
++a2;
a4 = (char *)(v20 + 1);
}
v16 = a3;
if ( a4 == a5 )
return a2 != v16;
v13 = *a4;
v14 = *a4;
v15 = v14 == v12;
}
while ( v14 != a8 && v14 != v12 );
}
if ( v15 )
{
v17 = a4 + 1;
do
{
if ( a2 == v16 )
return v11;
a4 = v17;
v18 = (*(long long ( **)(long long, unsigned __int8 *, unsigned __int8 *))(*(_QWORD *)(a1 + 184) + 192LL))(
a1,
a2,
v16);
v19 = 1LL;
if ( v18 >= 2 )
{
v19 = (*(long long ( **)(long long, unsigned __int8 *, unsigned __int8 *))(*(_QWORD *)(a1 + 184)
+ 192LL))(
a1,
a2,
v16);
if ( (int)v19 < 2 )
v19 = 0LL;
}
a2 += v19;
v12 = a7;
if ( a4 >= a5 )
break;
v17 = a4 + 1;
}
while ( *a4 == a7 );
if ( a4 == a5 )
return a2 != v16;
v13 = *a4;
}
}
while ( v13 != a8 );
if ( a4 + 1 == a5 )
{
return 0;
}
else
{
v26 = a4 + 2;
v11 = 0;
while ( 1 )
{
v27 = *(v26 - 1);
if ( (char)v27 == a8 )
goto LABEL_45;
if ( (char)v27 != v12 )
break;
if ( a2 == a3 )
return (unsigned int)-1;
v28 = (*(long long ( **)(long long, unsigned __int8 *, unsigned __int8 *))(*(_QWORD *)(a1 + 184) + 192LL))(
a1,
a2,
a3);
v29 = 1LL;
if ( v28 >= 2 )
{
v29 = (*(long long ( **)(long long, unsigned __int8 *, unsigned __int8 *))(*(_QWORD *)(a1 + 184) + 192LL))(
a1,
a2,
a3);
if ( (int)v29 < 2 )
v29 = 0LL;
}
a2 += v29;
v12 = a7;
LABEL_45:
if ( v26++ == a5 )
return v11;
}
v11 = -1;
if ( a2 != a3 )
{
v42 = v26 - 1;
if ( v27 == a6 && v26 != a5 )
{
v27 = *v26;
v42 = v26;
}
v31 = (*(long long ( **)(long long, char *, char *))(*(_QWORD *)(a1 + 184) + 192LL))(a1, v42, a5);
v32 = v31;
if ( v31 < 2 )
v31 = 0;
v40 = v31;
v33 = (*(long long ( **)(long long, char *, char *))(*(_QWORD *)(a1 + 184) + 192LL))(a1, v42, a5);
v34 = 1;
if ( v33 >= 2 )
{
v34 = (*(long long ( **)(long long, char *, char *, long long))(*(_QWORD *)(a1 + 184) + 192LL))(
a1,
v42,
a5,
1LL);
if ( v34 < 2 )
v34 = 0;
}
v39 = (_DWORD)v42 + v34;
v46 = *(_BYTE *)(*(_QWORD *)(a1 + 88) + v27);
do
{
if ( a2 >= a3 )
return v11;
v35 = a2;
while ( v32 >= 2 )
{
a2 = &v35[v40];
if ( a2 <= a3 && !(unsigned int)bcmp(v35, v42, v40) )
goto LABEL_71;
LABEL_66:
v36 = (*(long long ( **)(long long, unsigned __int8 *, unsigned __int8 *))(*(_QWORD *)(a1 + 184)
+ 192LL))(
a1,
v35,
a3);
v37 = 1LL;
if ( v36 >= 2 )
{
v37 = (*(long long ( **)(long long, unsigned __int8 *, unsigned __int8 *))(*(_QWORD *)(a1 + 184)
+ 192LL))(
a1,
v35,
a3);
if ( (int)v37 < 2 )
v37 = 0LL;
}
v35 += v37;
if ( v35 >= a3 )
return v11;
}
if ( (*(int ( **)(long long, unsigned __int8 *, unsigned __int8 *))(*(_QWORD *)(a1 + 184) + 192LL))(
a1,
v35,
a3) > 1
|| *(_BYTE *)(*(_QWORD *)(a1 + 88) + *v35) != v46 )
{
goto LABEL_66;
}
a2 = v35 + 1;
LABEL_71:
v38 = my_wildcmp_mb_impl(a1, (_DWORD)a2, (_DWORD)a3, v39, (_DWORD)a5, a6, a7, a8, a9 + 1);
if ( v38 <= 0 )
return (unsigned int)v38;
}
while ( a2 != a3 );
}
}
}
return v11;
}
|
my_wildcmp_mb_impl:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV dword ptr [RBP + -0x44],R9D
MOV qword ptr [RBP + -0x40],R8
MOV R15,RCX
MOV qword ptr [RBP + -0x58],RDX
MOV R12,RSI
MOV qword ptr [RBP + -0x38],RDI
MOV EAX,dword ptr [RBP + 0x20]
MOV qword ptr [RBP + -0x68],RAX
LEA RAX,[0x47c2d8]
MOV RAX,qword ptr [RAX]
TEST RAX,RAX
JZ 0x0013d0e3
MOV EDI,dword ptr [RBP + 0x20]
CALL RAX
MOV R14D,0x1
TEST EAX,EAX
JNZ 0x0013d27e
LAB_0013d0e3:
MOV EDI,dword ptr [RBP + 0x10]
MOV R14D,0xffffffff
LAB_0013d0ec:
CMP R15,qword ptr [RBP + -0x40]
JZ 0x0013d270
MOV AL,byte ptr [R15]
MOVSX ECX,AL
MOV EDX,dword ptr [RBP + 0x18]
CMP ECX,EDX
SETZ SIL
CMP ECX,EDI
SETZ DL
OR SIL,DL
MOV R13,qword ptr [RBP + -0x58]
JZ 0x0013d1ac
LAB_0013d117:
TEST DL,DL
JZ 0x0013d199
INC R15
MOV RAX,R15
MOV RBX,qword ptr [RBP + -0x38]
LAB_0013d125:
CMP R12,R13
JZ 0x0013d27e
MOV R15,RAX
MOV RAX,qword ptr [RBX + 0xb8]
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R13
CALL qword ptr [RAX + 0xc0]
MOV ECX,EAX
MOV EAX,0x1
CMP ECX,0x2
JL 0x0013d174
MOV RAX,qword ptr [RBX + 0xb8]
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R13
CALL qword ptr [RAX + 0xc0]
CMP EAX,0x2
MOV ECX,0x0
CMOVL EAX,ECX
LAB_0013d174:
ADD R12,RAX
CMP R15,qword ptr [RBP + -0x40]
MOV EDI,dword ptr [RBP + 0x10]
JNC 0x0013d18c
MOVSX ECX,byte ptr [R15]
LEA RAX,[R15 + 0x1]
CMP ECX,EDI
JZ 0x0013d125
LAB_0013d18c:
CMP R15,qword ptr [RBP + -0x40]
JZ 0x0013d274
MOV AL,byte ptr [R15]
LAB_0013d199:
MOVSX EAX,AL
MOV ECX,dword ptr [RBP + 0x18]
CMP EAX,ECX
JNZ 0x0013d0ec
JMP 0x0013d290
LAB_0013d1ac:
LEA RBX,[R15 + 0x1]
MOV RDX,qword ptr [RBP + -0x40]
CMP RBX,RDX
CMOVZ RBX,R15
CMP ECX,dword ptr [RBP + -0x44]
CMOVNZ RBX,R15
MOV RDI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RDI + 0xb8]
MOV RSI,RBX
CALL qword ptr [RAX + 0xc0]
CMP EAX,0x2
JGE 0x0013d210
MOV R14D,0x1
CMP R12,R13
JZ 0x0013d27e
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x58]
MOVZX ECX,byte ptr [RBX]
MOV CL,byte ptr [RAX + RCX*0x1]
MOVZX EDX,byte ptr [R12]
CMP CL,byte ptr [RAX + RDX*0x1]
MOV EDI,dword ptr [RBP + 0x10]
JNZ 0x0013d27e
INC RBX
INC R12
MOV R15,RBX
JMP 0x0013d243
LAB_0013d210:
MOV R15D,EAX
MOV RAX,R13
LEA R13,[R12 + R15*0x1]
MOV R14D,0x1
CMP R13,RAX
JA 0x0013d27e
MOV RDI,R12
MOV RSI,RBX
MOV RDX,R15
CALL 0x00124300
TEST EAX,EAX
MOV EDI,dword ptr [RBP + 0x10]
JNZ 0x0013d27e
ADD RBX,R15
MOV R15,RBX
MOV R12,R13
LAB_0013d243:
CMP R15,qword ptr [RBP + -0x40]
MOV R13,qword ptr [RBP + -0x58]
JZ 0x0013d274
MOV AL,byte ptr [R15]
MOVSX ECX,AL
CMP ECX,EDI
SETZ DL
MOV ESI,dword ptr [RBP + 0x18]
CMP ECX,ESI
JZ 0x0013d117
CMP ECX,EDI
JNZ 0x0013d1ac
JMP 0x0013d117
LAB_0013d270:
MOV R13,qword ptr [RBP + -0x58]
LAB_0013d274:
XOR R14D,R14D
CMP R12,R13
SETNZ R14B
LAB_0013d27e:
MOV EAX,R14D
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0013d290:
LEA RAX,[R15 + 0x1]
CMP RAX,qword ptr [RBP + -0x40]
JZ 0x0013d320
ADD R15,0x2
XOR R13D,R13D
XOR R14D,R14D
LAB_0013d2a8:
MOV BL,byte ptr [R15 + -0x1]
MOVSX EAX,BL
MOV ECX,dword ptr [RBP + 0x18]
CMP EAX,ECX
JZ 0x0013d30e
CMP EAX,EDI
JNZ 0x0013d328
MOV RBX,qword ptr [RBP + -0x58]
CMP R12,RBX
JZ 0x0013d4f2
MOV RDI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RDI + 0xb8]
MOV RSI,R12
MOV RDX,RBX
CALL qword ptr [RAX + 0xc0]
MOV ECX,EAX
MOV EAX,0x1
CMP ECX,0x2
JL 0x0013d308
MOV RDI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RDI + 0xb8]
MOV RSI,R12
MOV RDX,RBX
CALL qword ptr [RAX + 0xc0]
CMP EAX,0x2
CMOVL EAX,R13D
LAB_0013d308:
ADD R12,RAX
MOV EDI,dword ptr [RBP + 0x10]
LAB_0013d30e:
LEA RAX,[R15 + 0x1]
CMP R15,qword ptr [RBP + -0x40]
MOV R15,RAX
JNZ 0x0013d2a8
JMP 0x0013d27e
LAB_0013d320:
XOR R14D,R14D
JMP 0x0013d27e
LAB_0013d328:
MOV R14D,0xffffffff
MOV R13,qword ptr [RBP + -0x58]
CMP R12,R13
JZ 0x0013d27e
MOVZX EAX,BL
LEA RCX,[R15 + -0x1]
MOV qword ptr [RBP + -0x50],RCX
CMP EAX,dword ptr [RBP + -0x44]
JNZ 0x0013d358
CMP R15,qword ptr [RBP + -0x40]
JZ 0x0013d358
MOV BL,byte ptr [R15]
MOV qword ptr [RBP + -0x50],R15
LAB_0013d358:
MOV RDI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RDI + 0xb8]
MOV RSI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x40]
CALL qword ptr [RAX + 0xc0]
XOR ECX,ECX
CMP EAX,0x2
MOV R15D,EAX
CMOVL EAX,ECX
MOV dword ptr [RBP + -0x60],EAX
MOV RDI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RDI + 0xb8]
MOV RSI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x40]
CALL qword ptr [RAX + 0xc0]
MOV ECX,0x1
CMP EAX,0x2
JL 0x0013d3c8
MOV RDI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RDI + 0xb8]
MOV RSI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x40]
CALL qword ptr [RAX + 0xc0]
MOV ECX,EAX
CMP EAX,0x2
MOV EAX,0x0
CMOVL ECX,EAX
LAB_0013d3c8:
ADD RCX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x70],RCX
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x58]
MOVZX ECX,BL
MOV AL,byte ptr [RAX + RCX*0x1]
MOV byte ptr [RBP + -0x29],AL
MOV EAX,dword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x68]
INC EAX
MOV qword ptr [RBP + -0x68],RAX
LAB_0013d3f2:
CMP R12,R13
JNC 0x0013d27e
MOV RBX,R12
LAB_0013d3fe:
CMP R15D,0x2
JGE 0x0013d435
MOV RDI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RDI + 0xb8]
MOV RSI,RBX
MOV RDX,R13
CALL qword ptr [RAX + 0xc0]
CMP EAX,0x1
JG 0x0013d456
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x58]
MOVZX ECX,byte ptr [RBX]
MOV DL,byte ptr [RBP + -0x29]
CMP byte ptr [RAX + RCX*0x1],DL
JNZ 0x0013d456
JMP 0x0013d4ac
LAB_0013d435:
MOV RAX,qword ptr [RBP + -0x60]
LEA R12,[RBX + RAX*0x1]
CMP R12,R13
JA 0x0013d456
MOV RDI,RBX
MOV RSI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x60]
CALL 0x00124300
TEST EAX,EAX
JZ 0x0013d4b2
LAB_0013d456:
MOV RDI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RDI + 0xb8]
MOV RSI,RBX
MOV RDX,R13
CALL qword ptr [RAX + 0xc0]
MOV ECX,EAX
MOV EAX,0x1
CMP ECX,0x2
JL 0x0013d49b
MOV RDI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RDI + 0xb8]
MOV RSI,RBX
MOV RDX,R13
CALL qword ptr [RAX + 0xc0]
CMP EAX,0x2
MOV ECX,0x0
CMOVL EAX,ECX
LAB_0013d49b:
ADD RBX,RAX
CMP RBX,R13
JC 0x0013d3fe
JMP 0x0013d27e
LAB_0013d4ac:
INC RBX
MOV R12,RBX
LAB_0013d4b2:
SUB RSP,0x8
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,R12
MOV RDX,R13
MOV RCX,qword ptr [RBP + -0x70]
MOV R8,qword ptr [RBP + -0x40]
MOV R9D,dword ptr [RBP + -0x44]
PUSH qword ptr [RBP + -0x68]
MOV EAX,dword ptr [RBP + 0x18]
PUSH RAX
MOV EAX,dword ptr [RBP + 0x10]
PUSH RAX
CALL 0x0013d093
ADD RSP,0x20
TEST EAX,EAX
JLE 0x0013d4fd
CMP R12,R13
JNZ 0x0013d3f2
JMP 0x0013d27e
LAB_0013d4f2:
MOV R14D,0xffffffff
JMP 0x0013d27e
LAB_0013d4fd:
MOV R14D,EAX
JMP 0x0013d27e
|
uint my_wildcmp_mb_impl(long param_1,byte *param_2,byte *param_3,byte *param_4,byte *param_5,
uint param_6,uint param_7,uint param_8,int param_9)
{
char cVar1;
byte bVar2;
int iVar3;
uint uVar4;
uint uVar5;
ulong uVar6;
ulong uVar7;
uint uVar8;
byte *__s2;
byte *pbVar9;
bool bVar10;
byte *local_58;
if ((my_string_stack_guard != (code *)0x0) &&
(iVar3 = (*my_string_stack_guard)(param_9), iVar3 != 0)) {
return 1;
}
uVar4 = 0xffffffff;
do {
if (param_4 == param_5) {
LAB_0013d274:
return (uint)(param_2 != param_3);
}
bVar2 = *param_4;
uVar8 = (uint)(char)bVar2;
bVar10 = uVar8 == param_7;
pbVar9 = param_2;
if (uVar8 != param_8 && !bVar10) {
do {
__s2 = param_4 + 1;
if (param_4 + 1 == param_5) {
__s2 = param_4;
}
if (uVar8 != param_6) {
__s2 = param_4;
}
uVar4 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,__s2);
if ((int)uVar4 < 2) {
if (pbVar9 == param_3) {
return 1;
}
if (*(char *)(*(long *)(param_1 + 0x58) + (ulong)*__s2) !=
*(char *)(*(long *)(param_1 + 0x58) + (ulong)*pbVar9)) {
return 1;
}
param_4 = __s2 + 1;
param_2 = pbVar9 + 1;
}
else {
uVar6 = (ulong)uVar4;
param_2 = pbVar9 + uVar6;
if (param_3 < param_2) {
return 1;
}
iVar3 = bcmp(pbVar9,__s2,uVar6);
if (iVar3 != 0) {
return 1;
}
param_4 = __s2 + uVar6;
}
uVar4 = 1;
if (param_4 == param_5) goto LAB_0013d274;
bVar2 = *param_4;
uVar8 = (uint)(char)bVar2;
bVar10 = uVar8 == param_7;
} while ((uVar8 != param_8) && (pbVar9 = param_2, uVar8 != param_7));
}
if (bVar10) {
do {
param_4 = param_4 + 1;
if (param_2 == param_3) {
return uVar4;
}
iVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,param_3);
uVar6 = 1;
if (1 < iVar3) {
uVar8 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,param_3);
uVar6 = (ulong)uVar8;
if ((int)uVar8 < 2) {
uVar6 = 0;
}
}
param_2 = param_2 + uVar6;
} while ((param_4 < param_5) && ((int)(char)*param_4 == param_7));
if (param_4 == param_5) goto LAB_0013d274;
bVar2 = *param_4;
}
} while ((int)(char)bVar2 != param_8);
if (param_4 + 1 != param_5) {
pbVar9 = param_4 + 2;
do {
bVar2 = pbVar9[-1];
if ((int)(char)bVar2 != param_8) {
if ((int)(char)bVar2 != param_7) {
if (param_2 == param_3) {
return 0xffffffff;
}
local_58 = pbVar9 + -1;
if ((bVar2 == param_6) && (pbVar9 != param_5)) {
bVar2 = *pbVar9;
local_58 = pbVar9;
}
uVar8 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,local_58,param_5);
uVar4 = uVar8;
if ((int)uVar8 < 2) {
uVar4 = 0;
}
iVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,local_58,param_5);
uVar6 = 1;
if (1 < iVar3) {
uVar5 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,local_58,param_5);
uVar6 = (ulong)uVar5;
if ((int)uVar5 < 2) {
uVar6 = 0;
}
}
cVar1 = *(char *)(*(long *)(param_1 + 0x58) + (ulong)bVar2);
goto LAB_0013d3f2;
}
if (param_2 == param_3) {
return 0xffffffff;
}
iVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,param_3);
uVar6 = 1;
if (1 < iVar3) {
uVar4 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,param_3);
uVar6 = (ulong)uVar4;
if ((int)uVar4 < 2) {
uVar6 = 0;
}
}
param_2 = param_2 + uVar6;
}
bVar10 = pbVar9 != param_5;
pbVar9 = pbVar9 + 1;
} while (bVar10);
}
return 0;
LAB_0013d3f2:
if (param_3 <= param_2) {
return 0xffffffff;
}
do {
if ((int)uVar8 < 2) {
iVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,param_3);
if ((iVar3 < 2) && (*(char *)(*(long *)(param_1 + 0x58) + (ulong)*param_2) == cVar1)) break;
}
else {
pbVar9 = param_2 + uVar4;
if ((pbVar9 <= param_3) && (iVar3 = bcmp(param_2,local_58,(ulong)uVar4), iVar3 == 0))
goto LAB_0013d4b2;
}
iVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,param_3);
uVar7 = 1;
if (1 < iVar3) {
uVar5 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,param_3);
uVar7 = (ulong)uVar5;
if ((int)uVar5 < 2) {
uVar7 = 0;
}
}
param_2 = param_2 + uVar7;
if (param_3 <= param_2) {
return 0xffffffff;
}
} while( true );
pbVar9 = param_2 + 1;
LAB_0013d4b2:
uVar5 = my_wildcmp_mb_impl(param_1,pbVar9,param_3,local_58 + uVar6,param_5,param_6,param_7,param_8
,param_9 + 1);
if ((int)uVar5 < 1) {
return uVar5;
}
param_2 = pbVar9;
if (pbVar9 == param_3) {
return 0xffffffff;
}
goto LAB_0013d3f2;
}
|
|
12,117 |
exchange_one_int128
|
bluesky950520[P]quickjs/cutils.c
|
static void exchange_one_int128(void *a, void *b, size_t size) {
uint64_t *ap = (uint64_t *)a;
uint64_t *bp = (uint64_t *)b;
uint64_t t = ap[0];
uint64_t u = ap[1];
ap[0] = bp[0];
ap[1] = bp[1];
bp[0] = t;
bp[1] = u;
}
|
O0
|
c
|
exchange_one_int128:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movq %rdx, -0x18(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x20(%rsp)
movq -0x10(%rsp), %rax
movq %rax, -0x28(%rsp)
movq -0x20(%rsp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rsp)
movq -0x20(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x38(%rsp)
movq -0x28(%rsp), %rax
movq (%rax), %rcx
movq -0x20(%rsp), %rax
movq %rcx, (%rax)
movq -0x28(%rsp), %rax
movq 0x8(%rax), %rcx
movq -0x20(%rsp), %rax
movq %rcx, 0x8(%rax)
movq -0x30(%rsp), %rcx
movq -0x28(%rsp), %rax
movq %rcx, (%rax)
movq -0x38(%rsp), %rcx
movq -0x28(%rsp), %rax
movq %rcx, 0x8(%rax)
retq
nopl (%rax)
|
exchange_one_int128:
mov [rsp+var_8], rdi
mov [rsp+var_10], rsi
mov [rsp+var_18], rdx
mov rax, [rsp+var_8]
mov [rsp+var_20], rax
mov rax, [rsp+var_10]
mov [rsp+var_28], rax
mov rax, [rsp+var_20]
mov rax, [rax]
mov [rsp+var_30], rax
mov rax, [rsp+var_20]
mov rax, [rax+8]
mov [rsp+var_38], rax
mov rax, [rsp+var_28]
mov rcx, [rax]
mov rax, [rsp+var_20]
mov [rax], rcx
mov rax, [rsp+var_28]
mov rcx, [rax+8]
mov rax, [rsp+var_20]
mov [rax+8], rcx
mov rcx, [rsp+var_30]
mov rax, [rsp+var_28]
mov [rax], rcx
mov rcx, [rsp+var_38]
mov rax, [rsp+var_28]
mov [rax+8], rcx
retn
|
long long * exchange_one_int128(long long *a1, long long *a2)
{
long long *result; // rax
long long v3; // [rsp+0h] [rbp-38h]
long long v4; // [rsp+8h] [rbp-30h]
v4 = *a1;
v3 = a1[1];
*a1 = *a2;
a1[1] = a2[1];
*a2 = v4;
result = a2;
a2[1] = v3;
return result;
}
|
exchange_one_int128:
MOV qword ptr [RSP + -0x8],RDI
MOV qword ptr [RSP + -0x10],RSI
MOV qword ptr [RSP + -0x18],RDX
MOV RAX,qword ptr [RSP + -0x8]
MOV qword ptr [RSP + -0x20],RAX
MOV RAX,qword ptr [RSP + -0x10]
MOV qword ptr [RSP + -0x28],RAX
MOV RAX,qword ptr [RSP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + -0x30],RAX
MOV RAX,qword ptr [RSP + -0x20]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + -0x38],RAX
MOV RAX,qword ptr [RSP + -0x28]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RSP + -0x20]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RSP + -0x28]
MOV RCX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RSP + -0x20]
MOV qword ptr [RAX + 0x8],RCX
MOV RCX,qword ptr [RSP + -0x30]
MOV RAX,qword ptr [RSP + -0x28]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RSP + -0x38]
MOV RAX,qword ptr [RSP + -0x28]
MOV qword ptr [RAX + 0x8],RCX
RET
|
void exchange_one_int128(int8 *param_1,int8 *param_2)
{
int8 uVar1;
int8 uVar2;
uVar1 = *param_1;
uVar2 = param_1[1];
*param_1 = *param_2;
param_1[1] = param_2[1];
*param_2 = uVar1;
param_2[1] = uVar2;
return;
}
|
|
12,118 |
exchange_one_int128
|
bluesky950520[P]quickjs/cutils.c
|
static void exchange_one_int128(void *a, void *b, size_t size) {
uint64_t *ap = (uint64_t *)a;
uint64_t *bp = (uint64_t *)b;
uint64_t t = ap[0];
uint64_t u = ap[1];
ap[0] = bp[0];
ap[1] = bp[1];
bp[0] = t;
bp[1] = u;
}
|
O2
|
c
|
exchange_one_int128:
movq (%rsi), %rax
movups (%rdi), %xmm0
movq %rax, (%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x8(%rdi)
movups %xmm0, (%rsi)
retq
|
exchange_one_int128:
mov rax, [rsi]
movups xmm0, xmmword ptr [rdi]
mov [rdi], rax
mov rax, [rsi+8]
mov [rdi+8], rax
movups xmmword ptr [rsi], xmm0
retn
|
long long exchange_one_int128(__int128 *a1, _QWORD *a2)
{
__int128 v2; // xmm0
long long result; // rax
v2 = *a1;
*(_QWORD *)a1 = *a2;
result = a2[1];
*((_QWORD *)a1 + 1) = result;
*(_OWORD *)a2 = v2;
return result;
}
|
exchange_one_int128:
MOV RAX,qword ptr [RSI]
MOVUPS XMM0,xmmword ptr [RDI]
MOV qword ptr [RDI],RAX
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RDI + 0x8],RAX
MOVUPS xmmword ptr [RSI],XMM0
RET
|
void exchange_one_int128(int8 *param_1,int8 *param_2)
{
int8 uVar1;
int8 uVar2;
uVar1 = *param_1;
uVar2 = param_1[1];
*param_1 = *param_2;
param_1[1] = param_2[1];
*param_2 = uVar1;
param_2[1] = uVar2;
return;
}
|
|
12,119 |
inline_mysql_cond_signal
|
eloqsql/include/mysql/psi/mysql_thread.h
|
static inline int inline_mysql_cond_signal(
mysql_cond_t *that)
{
int result;
#ifdef HAVE_PSI_COND_INTERFACE
if (psi_likely(that->m_psi != NULL))
PSI_COND_CALL(signal_cond)(that->m_psi);
#endif
result= pthread_cond_signal(&that->m_cond);
return result;
}
|
O0
|
c
|
inline_mysql_cond_signal:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x30(%rax)
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0xf8fab
leaq 0x1c72b1(%rip), %rax # 0x2c0248
movq (%rax), %rax
movq 0x170(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x30(%rcx), %rdi
callq *%rax
movq -0x8(%rbp), %rdi
callq 0x2a580
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
|
inline_mysql_cond_signal_4:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
cmp qword ptr [rax+30h], 0
setnz al
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_F8FAB
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+170h]
mov rcx, [rbp+var_8]
mov rdi, [rcx+30h]
call rax
loc_F8FAB:
mov rdi, [rbp+var_8]
call _pthread_cond_signal
mov [rbp+var_C], eax
mov eax, [rbp+var_C]
add rsp, 10h
pop rbp
retn
|
long long inline_mysql_cond_signal_4(long long a1)
{
if ( *(_QWORD *)(a1 + 48) )
((void ( *)(_QWORD))PSI_server[46])(*(_QWORD *)(a1 + 48));
return (unsigned int)pthread_cond_signal(a1);
}
|
inline_mysql_cond_signal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x30],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x001f8fab
LEA RAX,[0x3c0248]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x170]
MOV RCX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RCX + 0x30]
CALL RAX
LAB_001f8fab:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0012a580
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0xc]
ADD RSP,0x10
POP RBP
RET
|
int inline_mysql_cond_signal(pthread_cond_t *param_1)
{
int iVar1;
if (param_1[1].__align != 0) {
(**(code **)(PSI_server + 0x170))(param_1[1].__align);
}
iVar1 = pthread_cond_signal(param_1);
return iVar1;
}
|
|
12,120 |
ft_boolean_check_syntax_string
|
eloqsql/storage/myisam/ft_parser.c
|
my_bool ft_boolean_check_syntax_string(const uchar *str, size_t length,
CHARSET_INFO *cs)
{
uint i, j;
if (cs->mbminlen != 1)
{
DBUG_ASSERT(0);
return 1;
}
if (!str ||
(length + 1 != sizeof(DEFAULT_FTB_SYNTAX)) ||
(str[0] != ' ' && str[1] != ' '))
return 1;
for (i=0; i<sizeof(DEFAULT_FTB_SYNTAX); i++)
{
/* limiting to 7-bit ascii only */
if ((unsigned char)(str[i]) > 127 || my_isalnum(cs, str[i]))
return 1;
for (j=0; j<i; j++)
if (str[i] == str[j] && (i != 11 || j != 10))
return 1;
}
return 0;
}
|
O0
|
c
|
ft_boolean_check_syntax_string:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x1, 0x98(%rax)
je 0xa1cda
jmp 0xa1ccf
jmp 0xa1cd1
movb $0x1, -0x1(%rbp)
jmp 0xa1db7
cmpq $0x0, -0x10(%rbp)
je 0xa1d08
movq -0x18(%rbp), %rax
addq $0x1, %rax
cmpq $0xf, %rax
jne 0xa1d08
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x20, %eax
je 0xa1d11
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x20, %eax
je 0xa1d11
movb $0x1, -0x1(%rbp)
jmp 0xa1db7
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpq $0xf, %rax
jae 0xa1db3
movq -0x10(%rbp), %rax
movl -0x24(%rbp), %ecx
movzbl (%rax,%rcx), %eax
cmpl $0x7f, %eax
jg 0xa1d55
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x10(%rbp), %rcx
movl -0x24(%rbp), %edx
movzbl (%rcx,%rdx), %ecx
movzbl 0x1(%rax,%rcx), %eax
andl $0x7, %eax
cmpl $0x0, %eax
je 0xa1d5b
movb $0x1, -0x1(%rbp)
jmp 0xa1db7
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x24(%rbp), %eax
jae 0xa1da3
movq -0x10(%rbp), %rax
movl -0x24(%rbp), %ecx
movzbl (%rax,%rcx), %eax
movq -0x10(%rbp), %rcx
movl -0x28(%rbp), %edx
movzbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
jne 0xa1d96
cmpl $0xb, -0x24(%rbp)
jne 0xa1d90
cmpl $0xa, -0x28(%rbp)
je 0xa1d96
movb $0x1, -0x1(%rbp)
jmp 0xa1db7
jmp 0xa1d98
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0xa1d62
jmp 0xa1da5
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xa1d18
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
popq %rbp
retq
nopl (%rax)
|
ft_boolean_check_syntax_string:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_20]
cmp dword ptr [rax+98h], 1
jz short loc_A1CDA
jmp short $+2
loc_A1CCF:
jmp short $+2
loc_A1CD1:
mov [rbp+var_1], 1
jmp loc_A1DB7
loc_A1CDA:
cmp [rbp+var_10], 0
jz short loc_A1D08
mov rax, [rbp+var_18]
add rax, 1
cmp rax, 0Fh
jnz short loc_A1D08
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax]
cmp eax, 20h ; ' '
jz short loc_A1D11
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax+1]
cmp eax, 20h ; ' '
jz short loc_A1D11
loc_A1D08:
mov [rbp+var_1], 1
jmp loc_A1DB7
loc_A1D11:
mov [rbp+var_24], 0
loc_A1D18:
mov eax, [rbp+var_24]
cmp rax, 0Fh
jnb loc_A1DB3
mov rax, [rbp+var_10]
mov ecx, [rbp+var_24]
movzx eax, byte ptr [rax+rcx]
cmp eax, 7Fh
jg short loc_A1D55
mov rax, [rbp+var_20]
mov rax, [rax+40h]
mov rcx, [rbp+var_10]
mov edx, [rbp+var_24]
movzx ecx, byte ptr [rcx+rdx]
movzx eax, byte ptr [rax+rcx+1]
and eax, 7
cmp eax, 0
jz short loc_A1D5B
loc_A1D55:
mov [rbp+var_1], 1
jmp short loc_A1DB7
loc_A1D5B:
mov [rbp+var_28], 0
loc_A1D62:
mov eax, [rbp+var_28]
cmp eax, [rbp+var_24]
jnb short loc_A1DA3
mov rax, [rbp+var_10]
mov ecx, [rbp+var_24]
movzx eax, byte ptr [rax+rcx]
mov rcx, [rbp+var_10]
mov edx, [rbp+var_28]
movzx ecx, byte ptr [rcx+rdx]
cmp eax, ecx
jnz short loc_A1D96
cmp [rbp+var_24], 0Bh
jnz short loc_A1D90
cmp [rbp+var_28], 0Ah
jz short loc_A1D96
loc_A1D90:
mov [rbp+var_1], 1
jmp short loc_A1DB7
loc_A1D96:
jmp short $+2
loc_A1D98:
mov eax, [rbp+var_28]
add eax, 1
mov [rbp+var_28], eax
jmp short loc_A1D62
loc_A1DA3:
jmp short $+2
loc_A1DA5:
mov eax, [rbp+var_24]
add eax, 1
mov [rbp+var_24], eax
jmp loc_A1D18
loc_A1DB3:
mov [rbp+var_1], 0
loc_A1DB7:
mov al, [rbp+var_1]
pop rbp
retn
|
char ft_boolean_check_syntax_string(_BYTE *a1, long long a2, long long a3)
{
unsigned int j; // [rsp+0h] [rbp-28h]
unsigned int i; // [rsp+4h] [rbp-24h]
if ( *(_DWORD *)(a3 + 152) != 1 )
return 1;
if ( !a1 || a2 != 14 || *a1 != 32 && a1[1] != 32 )
return 1;
for ( i = 0; i < 0xFuLL; ++i )
{
if ( (unsigned __int8)a1[i] > 0x7Fu || (*(_BYTE *)(*(_QWORD *)(a3 + 64) + (unsigned __int8)a1[i] + 1LL) & 7) != 0 )
return 1;
for ( j = 0; j < i; ++j )
{
if ( a1[i] == a1[j] && (i != 11 || j != 10) )
return 1;
}
}
return 0;
}
|
ft_boolean_check_syntax_string:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x20]
CMP dword ptr [RAX + 0x98],0x1
JZ 0x001a1cda
JMP 0x001a1ccf
LAB_001a1ccf:
JMP 0x001a1cd1
LAB_001a1cd1:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001a1db7
LAB_001a1cda:
CMP qword ptr [RBP + -0x10],0x0
JZ 0x001a1d08
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
CMP RAX,0xf
JNZ 0x001a1d08
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x20
JZ 0x001a1d11
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x20
JZ 0x001a1d11
LAB_001a1d08:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001a1db7
LAB_001a1d11:
MOV dword ptr [RBP + -0x24],0x0
LAB_001a1d18:
MOV EAX,dword ptr [RBP + -0x24]
CMP RAX,0xf
JNC 0x001a1db3
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x24]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
CMP EAX,0x7f
JG 0x001a1d55
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x24]
MOVZX ECX,byte ptr [RCX + RDX*0x1]
MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1]
AND EAX,0x7
CMP EAX,0x0
JZ 0x001a1d5b
LAB_001a1d55:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001a1db7
LAB_001a1d5b:
MOV dword ptr [RBP + -0x28],0x0
LAB_001a1d62:
MOV EAX,dword ptr [RBP + -0x28]
CMP EAX,dword ptr [RBP + -0x24]
JNC 0x001a1da3
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x24]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV RCX,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x28]
MOVZX ECX,byte ptr [RCX + RDX*0x1]
CMP EAX,ECX
JNZ 0x001a1d96
CMP dword ptr [RBP + -0x24],0xb
JNZ 0x001a1d90
CMP dword ptr [RBP + -0x28],0xa
JZ 0x001a1d96
LAB_001a1d90:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001a1db7
LAB_001a1d96:
JMP 0x001a1d98
LAB_001a1d98:
MOV EAX,dword ptr [RBP + -0x28]
ADD EAX,0x1
MOV dword ptr [RBP + -0x28],EAX
JMP 0x001a1d62
LAB_001a1da3:
JMP 0x001a1da5
LAB_001a1da5:
MOV EAX,dword ptr [RBP + -0x24]
ADD EAX,0x1
MOV dword ptr [RBP + -0x24],EAX
JMP 0x001a1d18
LAB_001a1db3:
MOV byte ptr [RBP + -0x1],0x0
LAB_001a1db7:
MOV AL,byte ptr [RBP + -0x1]
POP RBP
RET
|
int1 ft_boolean_check_syntax_string(char *param_1,long param_2,long param_3)
{
uint local_30;
uint local_2c;
int1 local_9;
if (*(int *)(param_3 + 0x98) == 1) {
if (((param_1 == (char *)0x0) || (param_2 != 0xe)) || ((*param_1 != ' ' && (param_1[1] != ' ')))
) {
local_9 = 1;
}
else {
for (local_2c = 0; local_2c < 0xf; local_2c = local_2c + 1) {
if ((0x7f < (byte)param_1[local_2c]) ||
((*(byte *)(*(long *)(param_3 + 0x40) + 1 + (ulong)(byte)param_1[local_2c]) & 7) != 0)) {
return 1;
}
for (local_30 = 0; local_30 < local_2c; local_30 = local_30 + 1) {
if ((param_1[local_2c] == param_1[local_30]) && ((local_2c != 0xb || (local_30 != 10)))) {
return 1;
}
}
}
local_9 = 0;
}
}
else {
local_9 = 1;
}
return local_9;
}
|
|
12,121 |
my_strnncoll_binary
|
eloqsql/strings/ctype-bin.c
|
static int my_strnncoll_binary(CHARSET_INFO * cs __attribute__((unused)),
const uchar *s, size_t slen,
const uchar *t, size_t tlen,
my_bool t_is_prefix)
{
size_t len=MY_MIN(slen,tlen);
int cmp= memcmp(s,t,len);
return cmp ? cmp : (int)((t_is_prefix ? len : slen) - tlen);
}
|
O0
|
c
|
my_strnncoll_binary:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movb %r9b, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movb %al, -0x29(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x47806
movq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x4780e
movq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0x25140
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
je 0x47838
movl -0x3c(%rbp), %eax
movl %eax, -0x4c(%rbp)
jmp 0x4785e
movsbl -0x29(%rbp), %eax
cmpl $0x0, %eax
je 0x4784b
movq -0x38(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0x47853
movq -0x18(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
subq -0x28(%rbp), %rax
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
my_strnncoll_binary:
push rbp
mov rbp, rsp
sub rsp, 60h
mov al, r9b
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_29], al
mov rax, [rbp+var_18]
cmp rax, [rbp+var_28]
jnb short loc_47806
mov rax, [rbp+var_18]
mov [rbp+var_48], rax
jmp short loc_4780E
loc_47806:
mov rax, [rbp+var_28]
mov [rbp+var_48], rax
loc_4780E:
mov rax, [rbp+var_48]
mov [rbp+var_38], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_38]
call _memcmp
mov [rbp+var_3C], eax
cmp [rbp+var_3C], 0
jz short loc_47838
mov eax, [rbp+var_3C]
mov [rbp+var_4C], eax
jmp short loc_4785E
loc_47838:
movsx eax, [rbp+var_29]
cmp eax, 0
jz short loc_4784B
mov rax, [rbp+var_38]
mov [rbp+var_58], rax
jmp short loc_47853
loc_4784B:
mov rax, [rbp+var_18]
mov [rbp+var_58], rax
loc_47853:
mov rax, [rbp+var_58]
sub rax, [rbp+var_28]
mov [rbp+var_4C], eax
loc_4785E:
mov eax, [rbp+var_4C]
add rsp, 60h
pop rbp
retn
|
long long my_strnncoll_binary(
long long a1,
long long a2,
unsigned long long a3,
long long a4,
unsigned long long a5,
char a6)
{
int v7; // [rsp+8h] [rbp-58h]
unsigned long long v9; // [rsp+18h] [rbp-48h]
unsigned int v10; // [rsp+24h] [rbp-3Ch]
int v12; // [rsp+38h] [rbp-28h]
int v13; // [rsp+48h] [rbp-18h]
v13 = a3;
v12 = a5;
if ( a3 >= a5 )
v9 = a5;
else
v9 = a3;
v10 = memcmp(a2, a4, v9);
if ( v10 )
{
return v10;
}
else
{
if ( a6 )
v7 = v9;
else
v7 = v13;
return (unsigned int)(v7 - v12);
}
}
|
my_strnncoll_binary:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV AL,R9B
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 byte ptr [RBP + -0x29],AL
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x28]
JNC 0x00147806
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x48],RAX
JMP 0x0014780e
LAB_00147806:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x48],RAX
LAB_0014780e:
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x38]
CALL 0x00125140
MOV dword ptr [RBP + -0x3c],EAX
CMP dword ptr [RBP + -0x3c],0x0
JZ 0x00147838
MOV EAX,dword ptr [RBP + -0x3c]
MOV dword ptr [RBP + -0x4c],EAX
JMP 0x0014785e
LAB_00147838:
MOVSX EAX,byte ptr [RBP + -0x29]
CMP EAX,0x0
JZ 0x0014784b
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x58],RAX
JMP 0x00147853
LAB_0014784b:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x58],RAX
LAB_00147853:
MOV RAX,qword ptr [RBP + -0x58]
SUB RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RBP + -0x4c],EAX
LAB_0014785e:
MOV EAX,dword ptr [RBP + -0x4c]
ADD RSP,0x60
POP RBP
RET
|
int my_strnncoll_binary(int8 param_1,void *param_2,ulong param_3,void *param_4,ulong param_5,
char param_6)
{
ulong local_60;
int local_54;
size_t local_50;
local_50 = param_5;
if (param_3 < param_5) {
local_50 = param_3;
}
local_54 = memcmp(param_2,param_4,local_50);
if (local_54 == 0) {
local_60 = param_3;
if (param_6 != '\0') {
local_60 = local_50;
}
local_54 = (int)local_60 - (int)param_5;
}
return local_54;
}
|
|
12,122 |
nglog::tools::SymbolizeAndDemangle(void*, char*, unsigned long, nglog::tools::SymbolizeOptions)
|
ng-log[P]ng-log/src/symbolize.cc
|
static ATTRIBUTE_NOINLINE bool SymbolizeAndDemangle(
void* pc, char* out, size_t out_size, SymbolizeOptions /*options*/) {
auto pc0 = reinterpret_cast<uintptr_t>(pc);
uint64_t start_address = 0;
uint64_t base_address = 0;
FileDescriptor object_fd;
if (out_size < 1) {
return false;
}
out[0] = '\0';
SafeAppendString("(", out, out_size);
if (g_symbolize_open_object_file_callback) {
object_fd.reset(g_symbolize_open_object_file_callback(
pc0, start_address, base_address, out + 1, out_size - 1));
} else {
object_fd = OpenObjectFileContainingPcAndGetStartAddress(
pc0, start_address, base_address, out + 1, out_size - 1);
}
# if defined(PRINT_UNSYMBOLIZED_STACK_TRACES)
{
# else
// Check whether a file name was returned.
if (!object_fd) {
# endif
if (out[1]) {
// The object file containing PC was determined successfully however the
// object file was not opened successfully. This is still considered
// success because the object file name and offset are known and tools
// like asan_symbolize.py can be used for the symbolization.
out[out_size - 1] = '\0'; // Making sure |out| is always null-terminated.
SafeAppendString("+0x", out, out_size);
SafeAppendHexNumber(pc0 - base_address, out, out_size);
SafeAppendString(")", out, out_size);
return true;
}
// Failed to determine the object file containing PC. Bail out.
return false;
}
int elf_type = FileGetElfType(object_fd.get());
if (elf_type == -1) {
return false;
}
if (g_symbolize_callback) {
// Run the call back if it's installed.
// Note: relocation (and much of the rest of this code) will be
// wrong for prelinked shared libraries and PIE executables.
uint64_t relocation = (elf_type == ET_DYN) ? start_address : 0;
int num_bytes_written =
g_symbolize_callback(object_fd.get(), pc, out, out_size, relocation);
if (num_bytes_written > 0) {
out += static_cast<size_t>(num_bytes_written);
out_size -= static_cast<size_t>(num_bytes_written);
}
}
if (!GetSymbolFromObjectFile(object_fd.get(), pc0, out, out_size,
base_address)) {
if (out[1] && !g_symbolize_callback) {
// The object file containing PC was opened successfully however the
// symbol was not found. The object may have been stripped. This is still
// considered success because the object file name and offset are known
// and tools like asan_symbolize.py can be used for the symbolization.
out[out_size - 1] = '\0'; // Making sure |out| is always null-terminated.
SafeAppendString("+0x", out, out_size);
SafeAppendHexNumber(pc0 - base_address, out, out_size);
SafeAppendString(")", out, out_size);
return true;
}
return false;
}
// Symbolization succeeded. Now we try to demangle the symbol.
DemangleInplace(out, out_size);
return true;
}
}
|
O2
|
cpp
|
nglog::tools::SymbolizeAndDemangle(void*, char*, unsigned long, nglog::tools::SymbolizeOptions):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
andq $0x0, 0x18(%rsp)
andq $0x0, 0x10(%rsp)
orl $-0x1, 0xc(%rsp)
testq %rdx, %rdx
je 0x1bdcd
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movb $0x0, (%rsi)
leaq 0x2b21(%rip), %rdi # 0x1e815
callq 0x1bf94
movq 0x22d78(%rip), %rax # 0x3ea78
testq %rax, %rax
je 0x1bd31
leaq 0x1(%r14), %rcx
leaq -0x1(%rbx), %r8
leaq 0x18(%rsp), %rsi
leaq 0x10(%rsp), %rdx
movq %r15, %rdi
callq *%rax
movl %eax, %ebp
leaq 0xc(%rsp), %r12
movq %r12, %rdi
callq 0x1aa9c
movl %ebp, (%r12)
jmp 0x1bd7b
leaq 0x1(%r14), %r8
leaq -0x1(%rbx), %r9
leaq 0x28(%rsp), %rdi
leaq 0x18(%rsp), %rdx
leaq 0x10(%rsp), %rcx
movq %r15, %rsi
callq 0x1bfd1
leaq 0x28(%rsp), %r12
movl (%r12), %ebp
orl $-0x1, (%r12)
leaq 0xc(%rsp), %r13
movq %r13, %rdi
callq 0x1aa9c
movl %ebp, (%r13)
movq %r12, %rdi
callq 0x1aa9c
movl (%r13), %ebp
cmpl $-0x1, %ebp
je 0x1bdbb
leaq 0x28(%rsp), %rsi
pushq $0x40
popq %rdx
movl %ebp, %edi
xorl %ecx, %ecx
callq 0x1bbf2
cmpl $0x464c457f, 0x28(%rsp) # imm = 0x464C457F
sete %cl
testb %cl, %al
je 0x1bdcd
movq 0x22cc9(%rip), %rax # 0x3ea70
testq %rax, %rax
je 0x1bdf3
cmpw $0x3, 0x38(%rsp)
jne 0x1bdd4
movq 0x18(%rsp), %r8
jmp 0x1bdd7
cmpb $0x0, 0x1(%r14)
je 0x1bdcd
movb $0x0, -0x1(%r14,%rbx)
jmp 0x1bf21
xorl %ebp, %ebp
jmp 0x1bf5b
xorl %r8d, %r8d
movl 0xc(%rsp), %edi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq *%rax
xorl %ecx, %ecx
testl %eax, %eax
cmovgl %eax, %ecx
subq %rcx, %rbx
addq %rcx, %r14
movl 0xc(%rsp), %ebp
movq 0x10(%rsp), %rax
movq %rax, 0x20(%rsp)
leaq 0x28(%rsp), %rsi
pushq $0x40
popq %rdx
movl %ebp, %edi
xorl %ecx, %ecx
callq 0x1bbf2
testb %al, %al
je 0x1bf08
movq 0x50(%rsp), %r13
movzwl 0x64(%rsp), %r12d
pushq $0x2
popq %rcx
leaq 0x68(%rsp), %r8
movl %ebp, %edi
movl %r12d, %esi
movq %r13, %rdx
callq 0x1c584
testb %al, %al
je 0x1be90
movl 0x90(%rsp), %ecx
shlq $0x6, %rcx
addq %r13, %rcx
leaq 0xa8(%rsp), %rsi
pushq $0x40
popq %rdx
movl %ebp, %edi
callq 0x1bbf2
testb %al, %al
je 0x1bf08
leaq 0x68(%rsp), %rax
movq %rax, (%rsp)
leaq 0xa8(%rsp), %r9
movq %r15, %rdi
movl %ebp, %esi
movq %r14, %rdx
movq %rbx, %rcx
movq 0x20(%rsp), %r8
callq 0x1c662
testb %al, %al
jne 0x1bef8
pushq $0xb
popq %rcx
leaq 0x68(%rsp), %rax
movl %ebp, %edi
movl %r12d, %esi
movq %rax, %r12
movq %r13, %rdx
movq %rax, %r8
callq 0x1c584
testb %al, %al
je 0x1bf08
movl 0x90(%rsp), %ecx
shlq $0x6, %rcx
addq %r13, %rcx
leaq 0xa8(%rsp), %rsi
pushq $0x40
popq %rdx
movl %ebp, %edi
callq 0x1bbf2
testb %al, %al
je 0x1bf08
movq %r12, (%rsp)
leaq 0xa8(%rsp), %r9
movq %r15, %rdi
movl %ebp, %esi
movq %r14, %rdx
movq %rbx, %rcx
movq 0x20(%rsp), %r8
callq 0x1c662
testb %al, %al
je 0x1bf08
movb $0x1, %bpl
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1c4a8
jmp 0x1bf5b
xorl %ebp, %ebp
cmpb $0x0, 0x1(%r14)
je 0x1bf5b
cmpq $0x0, 0x22b57(%rip) # 0x3ea70
jne 0x1bf5b
movb $0x0, -0x1(%rbx,%r14)
leaq 0x3f1b(%rip), %rdi # 0x1fe43
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1bf94
subq 0x10(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1c42e
leaq 0x2b77(%rip), %rdi # 0x1eac4
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1bf94
movb $0x1, %bpl
leaq 0xc(%rsp), %rdi
callq 0x1aa9c
movl %ebp, %eax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1bf7f
jmp 0x1bf7f
jmp 0x1bf7f
movq %rax, %rbx
leaq 0xc(%rsp), %rdi
callq 0x1aa9c
movq %rbx, %rdi
callq 0x7a00
|
_ZN5nglog5toolsL20SymbolizeAndDemangleEPvPcmNS0_16SymbolizeOptionsE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0E8h
and [rsp+118h+var_100], 0
and [rsp+118h+var_10C+4], 0
or dword ptr [rsp+118h+var_10C], 0FFFFFFFFh
test rdx, rdx
jz loc_1BDCD
mov rbx, rdx
mov r14, rsi
mov r15, rdi
mov byte ptr [rsi], 0
lea rdi, asc_1E814+1; this
call _ZN5nglog5toolsL16SafeAppendStringEPKcPcm; nglog::tools::SafeAppendString(char const*,char *,ulong)
mov rax, cs:_ZN5nglog5tools12_GLOBAL__N_137g_symbolize_open_object_file_callbackE; nglog::tools::`anonymous namespace'::g_symbolize_open_object_file_callback
test rax, rax
jz short loc_1BD31
lea rcx, [r14+1]
lea r8, [rbx-1]
lea rsi, [rsp+118h+var_100]
lea rdx, [rsp+118h+var_10C+4]
mov rdi, r15
call rax ; nglog::tools::`anonymous namespace'::g_symbolize_open_object_file_callback
mov ebp, eax
lea r12, [rsp+118h+var_10C]
mov rdi, r12; this
call _ZN5nglog5tools14FileDescriptor10safe_closeEv; nglog::tools::FileDescriptor::safe_close(void)
mov [r12], ebp
jmp short loc_1BD7B
loc_1BD31:
lea r8, [r14+1]; char *
lea r9, [rbx-1]; unsigned __int64
lea rdi, [rsp+118h+var_F0]; this
lea rdx, [rsp+118h+var_100]; unsigned __int64 *
lea rcx, [rsp+118h+var_10C+4]; unsigned __int64 *
mov rsi, r15; unsigned __int64
call _ZN5nglog5toolsL44OpenObjectFileContainingPcAndGetStartAddressEmRmS1_Pcm; nglog::tools::OpenObjectFileContainingPcAndGetStartAddress(ulong,ulong &,ulong &,char *,ulong)
lea r12, [rsp+118h+var_F0]
mov ebp, [r12]
or dword ptr [r12], 0FFFFFFFFh
lea r13, [rsp+118h+var_10C]
mov rdi, r13; this
call _ZN5nglog5tools14FileDescriptor10safe_closeEv; nglog::tools::FileDescriptor::safe_close(void)
mov [r13+0], ebp
mov rdi, r12; this
call _ZN5nglog5tools14FileDescriptor10safe_closeEv; nglog::tools::FileDescriptor::safe_close(void)
mov ebp, [r13+0]
loc_1BD7B:
cmp ebp, 0FFFFFFFFh
jz short loc_1BDBB
lea rsi, [rsp+118h+var_F0]; int
push 40h ; '@'
pop rdx; void *
mov edi, ebp; this
xor ecx, ecx; unsigned __int64
call _ZN5nglog5toolsL19ReadFromOffsetExactEiPvmm; nglog::tools::ReadFromOffsetExact(int,void *,ulong,ulong)
cmp [rsp+118h+var_F0], 464C457Fh
setz cl
test al, cl
jz short loc_1BDCD
mov rax, cs:_ZN5nglog5tools12_GLOBAL__N_120g_symbolize_callbackE; nglog::tools::`anonymous namespace'::g_symbolize_callback
test rax, rax
jz short loc_1BDF3
cmp [rsp+118h+var_E0], 3
jnz short loc_1BDD4
mov r8, [rsp+118h+var_100]
jmp short loc_1BDD7
loc_1BDBB:
cmp byte ptr [r14+1], 0
jz short loc_1BDCD
mov byte ptr [r14+rbx-1], 0
jmp loc_1BF21
loc_1BDCD:
xor ebp, ebp
jmp loc_1BF5B
loc_1BDD4:
xor r8d, r8d
loc_1BDD7:
mov edi, dword ptr [rsp+118h+var_10C]
mov rsi, r15
mov rdx, r14
mov rcx, rbx
call rax ; nglog::tools::`anonymous namespace'::g_symbolize_callback
xor ecx, ecx
test eax, eax
cmovg ecx, eax
sub rbx, rcx
add r14, rcx
loc_1BDF3:
mov ebp, dword ptr [rsp+118h+var_10C]
mov rax, [rsp+118h+var_10C+4]
mov [rsp+118h+var_F8], rax
lea rsi, [rsp+118h+var_F0]; int
push 40h ; '@'
pop rdx; void *
mov edi, ebp; this
xor ecx, ecx; unsigned __int64
call _ZN5nglog5toolsL19ReadFromOffsetExactEiPvmm; nglog::tools::ReadFromOffsetExact(int,void *,ulong,ulong)
test al, al
jz loc_1BF08
mov r13, [rsp+118h+var_C8]
movzx r12d, [rsp+118h+var_B4]
push 2
pop rcx
lea r8, [rsp+118h+var_B0]
mov edi, ebp
mov esi, r12d
mov rdx, r13
call _ZN5nglog5toolsL22GetSectionHeaderByTypeEitmjP10Elf64_Shdr; nglog::tools::GetSectionHeaderByType(int,ushort,ulong,uint,Elf64_Shdr *)
test al, al
jz short loc_1BE90
mov ecx, [rsp+118h+var_88]
shl rcx, 6
add rcx, r13; unsigned __int64
lea rsi, [rsp+118h+var_70]; int
push 40h ; '@'
pop rdx; void *
mov edi, ebp; this
call _ZN5nglog5toolsL19ReadFromOffsetExactEiPvmm; nglog::tools::ReadFromOffsetExact(int,void *,ulong,ulong)
test al, al
jz loc_1BF08
lea rax, [rsp+118h+var_B0]
mov [rsp+118h+var_118], rax
lea r9, [rsp+118h+var_70]
mov rdi, r15
mov esi, ebp
mov rdx, r14
mov rcx, rbx
mov r8, [rsp+118h+var_F8]
call _ZN5nglog5toolsL10FindSymbolEmiPcmmPK10Elf64_ShdrS4_; nglog::tools::FindSymbol(ulong,int,char *,ulong,ulong,Elf64_Shdr const*,Elf64_Shdr const*)
test al, al
jnz short loc_1BEF8
loc_1BE90:
push 0Bh
pop rcx
lea rax, [rsp+118h+var_B0]
mov edi, ebp
mov esi, r12d
mov r12, rax
mov rdx, r13
mov r8, rax
call _ZN5nglog5toolsL22GetSectionHeaderByTypeEitmjP10Elf64_Shdr; nglog::tools::GetSectionHeaderByType(int,ushort,ulong,uint,Elf64_Shdr *)
test al, al
jz short loc_1BF08
mov ecx, [rsp+118h+var_88]
shl rcx, 6
add rcx, r13; unsigned __int64
lea rsi, [rsp+118h+var_70]; int
push 40h ; '@'
pop rdx; void *
mov edi, ebp; this
call _ZN5nglog5toolsL19ReadFromOffsetExactEiPvmm; nglog::tools::ReadFromOffsetExact(int,void *,ulong,ulong)
test al, al
jz short loc_1BF08
mov [rsp+118h+var_118], r12
lea r9, [rsp+118h+var_70]
mov rdi, r15
mov esi, ebp
mov rdx, r14
mov rcx, rbx
mov r8, [rsp+118h+var_F8]
call _ZN5nglog5toolsL10FindSymbolEmiPcmmPK10Elf64_ShdrS4_; nglog::tools::FindSymbol(ulong,int,char *,ulong,ulong,Elf64_Shdr const*,Elf64_Shdr const*)
test al, al
jz short loc_1BF08
loc_1BEF8:
mov bpl, 1
mov rdi, r14; this
mov rsi, rbx; char *
call _ZN5nglog5tools12_GLOBAL__N_115DemangleInplaceEPcm; nglog::tools::`anonymous namespace'::DemangleInplace(char *,ulong)
jmp short loc_1BF5B
loc_1BF08:
xor ebp, ebp
cmp byte ptr [r14+1], 0
jz short loc_1BF5B
cmp cs:_ZN5nglog5tools12_GLOBAL__N_120g_symbolize_callbackE, 0; nglog::tools::`anonymous namespace'::g_symbolize_callback
jnz short loc_1BF5B
mov byte ptr [rbx+r14-1], 0
loc_1BF21:
lea rdi, a0x_0; "+0x"
mov rsi, r14; char *
mov rdx, rbx; char *
call _ZN5nglog5toolsL16SafeAppendStringEPKcPcm; nglog::tools::SafeAppendString(char const*,char *,ulong)
sub r15, [rsp+118h+var_10C+4]
mov rdi, r15; this
mov rsi, r14; unsigned __int64
mov rdx, rbx; char *
call _ZN5nglog5toolsL19SafeAppendHexNumberEmPcm; nglog::tools::SafeAppendHexNumber(ulong,char *,ulong)
lea rdi, aVoidNglogAnony+86h; this
mov rsi, r14; char *
mov rdx, rbx; char *
call _ZN5nglog5toolsL16SafeAppendStringEPKcPcm; nglog::tools::SafeAppendString(char const*,char *,ulong)
mov bpl, 1
loc_1BF5B:
lea rdi, [rsp+118h+var_10C]; this
call _ZN5nglog5tools14FileDescriptor10safe_closeEv; nglog::tools::FileDescriptor::safe_close(void)
mov eax, ebp
add rsp, 0E8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_1BF7F
jmp short loc_1BF7F
jmp short $+2
loc_1BF7F:
mov rbx, rax
lea rdi, [rsp+arg_4]; this
call _ZN5nglog5tools14FileDescriptor10safe_closeEv; nglog::tools::FileDescriptor::safe_close(void)
mov rdi, rbx
call __Unwind_Resume
|
long long nglog::tools::SymbolizeAndDemangle(
unsigned long long a1,
nglog::tools::_anonymous_namespace_ *this,
char *a3,
unsigned long long a4)
{
char *v4; // rbx
nglog::tools::_anonymous_namespace_ *v5; // r14
unsigned int v6; // ebp
unsigned long long v7; // rcx
unsigned long long v8; // r8
int v9; // ebp
bool v10; // al
unsigned long long v11; // r8
unsigned long long v12; // r8
int v13; // eax
long long v14; // rcx
long long v15; // r13
unsigned int v16; // r12d
unsigned long long v17; // r8
unsigned long long v18; // rdx
unsigned long long v19; // r8
unsigned long long v20; // rcx
unsigned long long v21; // rcx
_DWORD v23[3]; // [rsp+Ch] [rbp-10Ch] BYREF
unsigned long long v24; // [rsp+18h] [rbp-100h] BYREF
long long v25; // [rsp+20h] [rbp-F8h]
int v26[4]; // [rsp+28h] [rbp-F0h] BYREF
__int16 v27; // [rsp+38h] [rbp-E0h]
long long v28; // [rsp+50h] [rbp-C8h]
unsigned __int16 v29; // [rsp+64h] [rbp-B4h]
_BYTE v30[40]; // [rsp+68h] [rbp-B0h] BYREF
unsigned int v31; // [rsp+90h] [rbp-88h]
int v32[28]; // [rsp+A8h] [rbp-70h] BYREF
v24 = 0LL;
*(_QWORD *)&v23[1] = 0LL;
v23[0] = -1;
if ( !a3 )
goto LABEL_12;
v4 = a3;
v5 = this;
*(_BYTE *)this = 0;
nglog::tools::SafeAppendString((nglog::tools *)"(", (const char *)this, a3, a4);
if ( nglog::tools::`anonymous namespace'::g_symbolize_open_object_file_callback )
{
v6 = nglog::tools::`anonymous namespace'::g_symbolize_open_object_file_callback(
a1,
&v24,
&v23[1],
(char *)this + 1,
v4 - 1);
nglog::tools::FileDescriptor::safe_close((nglog::tools::FileDescriptor *)v23);
v23[0] = v6;
}
else
{
nglog::tools::OpenObjectFileContainingPcAndGetStartAddress(
(nglog::tools *)v26,
a1,
&v24,
(unsigned long long *)&v23[1],
(char *)this + 1,
(unsigned long long)(v4 - 1));
v9 = v26[0];
v26[0] = -1;
nglog::tools::FileDescriptor::safe_close((nglog::tools::FileDescriptor *)v23);
v23[0] = v9;
nglog::tools::FileDescriptor::safe_close((nglog::tools::FileDescriptor *)v26);
v6 = v23[0];
}
if ( v6 == -1 )
{
if ( *((_BYTE *)this + 1) )
{
v4[(_QWORD)this - 1] = 0;
LABEL_28:
nglog::tools::SafeAppendString((nglog::tools *)"+0x", (const char *)v5, v4, v7);
nglog::tools::SafeAppendHexNumber((nglog::tools *)(a1 - *(_QWORD *)&v23[1]), (unsigned long long)v5, v4, v20);
nglog::tools::SafeAppendString((nglog::tools *)")", (const char *)v5, v4, v21);
LOBYTE(v6) = 1;
goto LABEL_29;
}
goto LABEL_12;
}
v10 = nglog::tools::ReadFromOffsetExact((nglog::tools *)v6, (int)v26, &dword_40, 0LL, v8);
if ( v26[0] != 1179403647 || !v10 )
{
LABEL_12:
v6 = 0;
goto LABEL_29;
}
if ( nglog::tools::`anonymous namespace'::g_symbolize_callback )
{
if ( v27 == 3 )
v12 = v24;
else
v12 = 0LL;
v13 = nglog::tools::`anonymous namespace'::g_symbolize_callback(v23[0], a1, this, v4, v12);
v14 = 0LL;
if ( v13 > 0 )
v14 = (unsigned int)v13;
v4 -= v14;
v5 = (nglog::tools::_anonymous_namespace_ *)((char *)this + v14);
}
v6 = v23[0];
v25 = *(_QWORD *)&v23[1];
if ( nglog::tools::ReadFromOffsetExact((nglog::tools *)v23[0], (int)v26, &dword_40, 0LL, v11) )
{
v15 = v28;
v16 = v29;
if ( (unsigned __int8)nglog::tools::GetSectionHeaderByType(v6, v29, v28, 2LL, v30) )
{
if ( !nglog::tools::ReadFromOffsetExact(
(nglog::tools *)v6,
(int)v32,
&dword_40,
v15 + ((unsigned long long)v31 << 6),
v17) )
goto LABEL_25;
if ( (unsigned __int8)nglog::tools::FindSymbol(a1, v6, v5, v4, v25, v32, v30) )
{
LABEL_24:
LOBYTE(v6) = 1;
nglog::tools::`anonymous namespace'::DemangleInplace(v5, v4, v18);
goto LABEL_29;
}
}
if ( (unsigned __int8)nglog::tools::GetSectionHeaderByType(v6, v16, v15, 11LL, v30)
&& nglog::tools::ReadFromOffsetExact(
(nglog::tools *)v6,
(int)v32,
&dword_40,
v15 + ((unsigned long long)v31 << 6),
v19)
&& (unsigned __int8)nglog::tools::FindSymbol(a1, v6, v5, v4, v25, v32, v30) )
{
goto LABEL_24;
}
}
LABEL_25:
v6 = 0;
if ( *((_BYTE *)v5 + 1) && !nglog::tools::`anonymous namespace'::g_symbolize_callback )
{
*((_BYTE *)v5 + (_QWORD)v4 - 1) = 0;
goto LABEL_28;
}
LABEL_29:
nglog::tools::FileDescriptor::safe_close((nglog::tools::FileDescriptor *)v23);
return v6;
}
|
SymbolizeAndDemangle:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xe8
AND qword ptr [RSP + 0x18],0x0
AND qword ptr [RSP + 0x10],0x0
OR dword ptr [RSP + 0xc],0xffffffff
TEST RDX,RDX
JZ 0x0011bdcd
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
MOV byte ptr [RSI],0x0
LEA RDI,[0x11e815]
CALL 0x0011bf94
MOV RAX,qword ptr [0x0013ea78]
TEST RAX,RAX
JZ 0x0011bd31
LEA RCX,[R14 + 0x1]
LEA R8,[RBX + -0x1]
LAB_0011bd0d:
LEA RSI,[RSP + 0x18]
LEA RDX,[RSP + 0x10]
MOV RDI,R15
CALL RAX
MOV EBP,EAX
LEA R12,[RSP + 0xc]
MOV RDI,R12
CALL 0x0011aa9c
MOV dword ptr [R12],EBP
JMP 0x0011bd7b
LAB_0011bd31:
LEA R8,[R14 + 0x1]
LEA R9,[RBX + -0x1]
LAB_0011bd39:
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x18]
LEA RCX,[RSP + 0x10]
MOV RSI,R15
CALL 0x0011bfd1
LEA R12,[RSP + 0x28]
MOV EBP,dword ptr [R12]
OR dword ptr [R12],0xffffffff
LEA R13,[RSP + 0xc]
MOV RDI,R13
CALL 0x0011aa9c
MOV dword ptr [R13],EBP
MOV RDI,R12
CALL 0x0011aa9c
MOV EBP,dword ptr [R13]
LAB_0011bd7b:
CMP EBP,-0x1
JZ 0x0011bdbb
LAB_0011bd80:
LEA RSI,[RSP + 0x28]
PUSH 0x40
POP RDX
MOV EDI,EBP
XOR ECX,ECX
CALL 0x0011bbf2
CMP dword ptr [RSP + 0x28],0x464c457f
SETZ CL
TEST AL,CL
JZ 0x0011bdcd
MOV RAX,qword ptr [0x0013ea70]
TEST RAX,RAX
JZ 0x0011bdf3
CMP word ptr [RSP + 0x38],0x3
JNZ 0x0011bdd4
MOV R8,qword ptr [RSP + 0x18]
JMP 0x0011bdd7
LAB_0011bdbb:
CMP byte ptr [R14 + 0x1],0x0
JZ 0x0011bdcd
MOV byte ptr [R14 + RBX*0x1 + -0x1],0x0
JMP 0x0011bf21
LAB_0011bdcd:
XOR EBP,EBP
JMP 0x0011bf5b
LAB_0011bdd4:
XOR R8D,R8D
LAB_0011bdd7:
MOV EDI,dword ptr [RSP + 0xc]
LAB_0011bddb:
MOV RSI,R15
MOV RDX,R14
MOV RCX,RBX
CALL RAX
XOR ECX,ECX
TEST EAX,EAX
CMOVG ECX,EAX
SUB RBX,RCX
ADD R14,RCX
LAB_0011bdf3:
MOV EBP,dword ptr [RSP + 0xc]
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x20],RAX
LAB_0011be01:
LEA RSI,[RSP + 0x28]
PUSH 0x40
POP RDX
MOV EDI,EBP
XOR ECX,ECX
CALL 0x0011bbf2
TEST AL,AL
JZ 0x0011bf08
MOV R13,qword ptr [RSP + 0x50]
MOVZX R12D,word ptr [RSP + 0x64]
PUSH 0x2
POP RCX
LEA R8,[RSP + 0x68]
MOV EDI,EBP
MOV ESI,R12D
MOV RDX,R13
CALL 0x0011c584
TEST AL,AL
JZ 0x0011be90
MOV ECX,dword ptr [RSP + 0x90]
SHL RCX,0x6
ADD RCX,R13
LEA RSI,[RSP + 0xa8]
PUSH 0x40
POP RDX
MOV EDI,EBP
CALL 0x0011bbf2
TEST AL,AL
JZ 0x0011bf08
LEA RAX,[RSP + 0x68]
MOV qword ptr [RSP],RAX
LEA R9,[RSP + 0xa8]
MOV RDI,R15
MOV ESI,EBP
MOV RDX,R14
MOV RCX,RBX
MOV R8,qword ptr [RSP + 0x20]
CALL 0x0011c662
TEST AL,AL
JNZ 0x0011bef8
LAB_0011be90:
PUSH 0xb
POP RCX
LEA RAX,[RSP + 0x68]
MOV EDI,EBP
MOV ESI,R12D
MOV R12,RAX
MOV RDX,R13
MOV R8,RAX
CALL 0x0011c584
TEST AL,AL
JZ 0x0011bf08
MOV ECX,dword ptr [RSP + 0x90]
SHL RCX,0x6
ADD RCX,R13
LEA RSI,[RSP + 0xa8]
PUSH 0x40
POP RDX
MOV EDI,EBP
CALL 0x0011bbf2
TEST AL,AL
JZ 0x0011bf08
MOV qword ptr [RSP],R12
LEA R9,[RSP + 0xa8]
MOV RDI,R15
MOV ESI,EBP
MOV RDX,R14
MOV RCX,RBX
MOV R8,qword ptr [RSP + 0x20]
CALL 0x0011c662
TEST AL,AL
JZ 0x0011bf08
LAB_0011bef8:
MOV BPL,0x1
MOV RDI,R14
MOV RSI,RBX
CALL 0x0011c4a8
LAB_0011bf06:
JMP 0x0011bf5b
LAB_0011bf08:
XOR EBP,EBP
CMP byte ptr [R14 + 0x1],0x0
JZ 0x0011bf5b
CMP qword ptr [0x0013ea70],0x0
JNZ 0x0011bf5b
MOV byte ptr [RBX + R14*0x1 + -0x1],0x0
LAB_0011bf21:
LEA RDI,[0x11fe43]
MOV RSI,R14
MOV RDX,RBX
CALL 0x0011bf94
SUB R15,qword ptr [RSP + 0x10]
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
CALL 0x0011c42e
LEA RDI,[0x11eac4]
MOV RSI,R14
MOV RDX,RBX
CALL 0x0011bf94
MOV BPL,0x1
LAB_0011bf5b:
LEA RDI,[RSP + 0xc]
CALL 0x0011aa9c
MOV EAX,EBP
ADD RSP,0xe8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* nglog::tools::SymbolizeAndDemangle(void*, char*, unsigned long, nglog::tools::SymbolizeOptions)
*/
ulong nglog::tools::SymbolizeAndDemangle(ulong param_1,char *param_2,ulong param_3)
{
byte bVar1;
char cVar2;
uint uVar3;
ulong uVar4;
uint local_10c;
ulong local_108;
ulong local_100;
ulong local_f8;
uint local_f0 [4];
short local_e0;
ulong local_c8;
ushort local_b4;
Elf64_Shdr local_b0;
Elf64_Shdr local_70;
local_100 = 0;
local_108 = 0;
local_10c = 0xffffffff;
if (param_3 == 0) {
LAB_0011bdcd:
uVar4 = 0;
}
else {
*param_2 = '\0';
SafeAppendString("(",param_2,param_3);
if ((anonymous_namespace)::g_symbolize_open_object_file_callback == (code *)0x0) {
/* try { // try from 0011bd39 to 0011bd4f has its CatchHandler @ 0011bf7b */
OpenObjectFileContainingPcAndGetStartAddress
((tools *)local_f0,param_1,&local_100,&local_108,param_2 + 1,param_3 - 1);
uVar3 = local_f0[0];
local_f0[0] = 0xffffffff;
FileDescriptor::safe_close((FileDescriptor *)&local_10c);
local_10c = uVar3;
FileDescriptor::safe_close((FileDescriptor *)local_f0);
}
else {
/* try { // try from 0011bd0d to 0011bd1b has its CatchHandler @ 0011bf7d */
uVar3 = (*(anonymous_namespace)::g_symbolize_open_object_file_callback)
(param_1,&local_100,&local_108,param_2 + 1,param_3 - 1);
FileDescriptor::safe_close((FileDescriptor *)&local_10c);
local_10c = uVar3;
}
uVar4 = (ulong)local_10c;
if (local_10c == 0xffffffff) {
if (param_2[1] == '\0') goto LAB_0011bdcd;
param_2[param_3 - 1] = '\0';
}
else {
/* try { // try from 0011bd80 to 0011bd90 has its CatchHandler @ 0011bf7f */
bVar1 = ReadFromOffsetExact(local_10c,local_f0,0x40,0);
if ((bVar1 & local_f0[0] == 0x464c457f) == 0) goto LAB_0011bdcd;
if ((anonymous_namespace)::g_symbolize_callback != (code *)0x0) {
uVar4 = local_100;
if (local_e0 != 3) {
uVar4 = 0;
}
/* try { // try from 0011bddb to 0011bde5 has its CatchHandler @ 0011bf79 */
uVar3 = (*(anonymous_namespace)::g_symbolize_callback)
(local_10c,param_1,param_2,param_3,uVar4);
uVar4 = 0;
if (0 < (int)uVar3) {
uVar4 = (ulong)uVar3;
}
param_3 = param_3 - uVar4;
param_2 = param_2 + uVar4;
}
uVar3 = local_10c;
local_f8 = local_108;
/* try { // try from 0011be01 to 0011bf05 has its CatchHandler @ 0011bf7f */
cVar2 = ReadFromOffsetExact(local_10c,local_f0,0x40,0);
if (cVar2 != '\0') {
cVar2 = GetSectionHeaderByType(uVar3,local_b4,local_c8,2,&local_b0);
if (cVar2 == '\0') {
LAB_0011be90:
cVar2 = GetSectionHeaderByType(uVar3,local_b4,local_c8,0xb,&local_b0);
if (((cVar2 != '\0') &&
(cVar2 = ReadFromOffsetExact(uVar3,&local_70,0x40,
(ulong)local_b0.sh_link * 0x40 + local_c8), cVar2 != '\0'
)) && (cVar2 = FindSymbol(param_1,uVar3,param_2,param_3,local_f8,&local_70,&local_b0),
cVar2 != '\0')) {
LAB_0011bef8:
uVar4 = CONCAT71((uint7)(uint3)(uVar3 >> 8),1);
(anonymous_namespace)::DemangleInplace(param_2,param_3);
goto LAB_0011bf5b;
}
}
else {
cVar2 = ReadFromOffsetExact(uVar3,&local_70,0x40,(ulong)local_b0.sh_link * 0x40 + local_c8
);
if (cVar2 != '\0') {
cVar2 = FindSymbol(param_1,uVar3,param_2,param_3,local_f8,&local_70,&local_b0);
if (cVar2 == '\0') goto LAB_0011be90;
goto LAB_0011bef8;
}
}
}
uVar4 = 0;
if ((param_2[1] == '\0') || ((anonymous_namespace)::g_symbolize_callback != (code *)0x0))
goto LAB_0011bf5b;
param_2[param_3 - 1] = '\0';
}
SafeAppendString("+0x",param_2,param_3);
SafeAppendHexNumber(param_1 - local_108,param_2,param_3);
SafeAppendString(")",param_2,param_3);
uVar4 = CONCAT71((int7)(uVar4 >> 8),1);
}
LAB_0011bf5b:
FileDescriptor::safe_close((FileDescriptor *)&local_10c);
return uVar4;
}
|
|
12,123 |
coro::detail::when_all_task_promise<void>::unhandled_exception()
|
AlayaLite/build_O3/_deps/libcoro-src/include/coro/when_all.hpp
|
auto unhandled_exception() noexcept -> void { m_exception_ptr = std::current_exception(); }
|
O3
|
cpp
|
coro::detail::when_all_task_promise<void>::unhandled_exception():
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x11450
movq (%r14), %rax
movq $0x0, (%r14)
movq 0x8(%rbx), %rcx
movq %rcx, 0x10(%rsp)
movq %rax, 0x8(%rbx)
testq %rcx, %rcx
je 0x29795
leaq 0x10(%rsp), %rdi
callq 0x11240
cmpq $0x0, 0x8(%rsp)
je 0x29795
leaq 0x8(%rsp), %rdi
callq 0x11240
addq $0x18, %rsp
popq %rbx
popq %r14
retq
nop
|
_ZN4coro6detail21when_all_task_promiseIvE19unhandled_exceptionEv:
push r14
push rbx
sub rsp, 18h
mov rbx, rdi
lea r14, [rsp+28h+var_20]
mov rdi, r14
call __ZSt17current_exceptionv; std::current_exception(void)
mov rax, [r14]
mov qword ptr [r14], 0
mov rcx, [rbx+8]
mov [rsp+28h+var_18], rcx
mov [rbx+8], rax
test rcx, rcx
jz short loc_29795
lea rdi, [rsp+28h+var_18]; this
call __ZNSt15__exception_ptr13exception_ptr10_M_releaseEv; std::__exception_ptr::exception_ptr::_M_release(void)
cmp [rsp+28h+var_20], 0
jz short loc_29795
lea rdi, [rsp+28h+var_20]; this
call __ZNSt15__exception_ptr13exception_ptr10_M_releaseEv; std::__exception_ptr::exception_ptr::_M_release(void)
loc_29795:
add rsp, 18h
pop rbx
pop r14
retn
|
long long coro::detail::when_all_task_promise<void>::unhandled_exception(long long a1)
{
long long result; // rax
long long v2; // rcx
long long v3; // [rsp+8h] [rbp-20h] BYREF
_QWORD v4[3]; // [rsp+10h] [rbp-18h] BYREF
std::current_exception();
result = v3;
v3 = 0LL;
v4[0] = *(_QWORD *)(a1 + 8);
v2 = v4[0];
*(_QWORD *)(a1 + 8) = result;
if ( v2 )
{
result = std::__exception_ptr::exception_ptr::_M_release((std::__exception_ptr::exception_ptr *)v4);
if ( v3 )
return std::__exception_ptr::exception_ptr::_M_release((std::__exception_ptr::exception_ptr *)&v3);
}
return result;
}
|
unhandled_exception:
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
LEA R14,[RSP + 0x8]
MOV RDI,R14
CALL 0x00111450
MOV RAX,qword ptr [R14]
MOV qword ptr [R14],0x0
MOV RCX,qword ptr [RBX + 0x8]
MOV qword ptr [RSP + 0x10],RCX
MOV qword ptr [RBX + 0x8],RAX
TEST RCX,RCX
JZ 0x00129795
LEA RDI,[RSP + 0x10]
CALL 0x00111240
CMP qword ptr [RSP + 0x8],0x0
JZ 0x00129795
LEA RDI,[RSP + 0x8]
CALL 0x00111240
LAB_00129795:
ADD RSP,0x18
POP RBX
POP R14
RET
|
/* WARNING: Removing unreachable block (ram,0x0012978b) */
/* coro::detail::when_all_task_promise<void>::unhandled_exception() */
void __thiscall
coro::detail::when_all_task_promise<void>::unhandled_exception(when_all_task_promise<void> *this)
{
long lVar1;
int8 local_20;
std::current_exception();
lVar1 = *(long *)(this + 8);
*(int8 *)(this + 8) = local_20;
if (lVar1 != 0) {
std::__exception_ptr::exception_ptr::_M_release();
}
return;
}
|
|
12,124 |
ftxui::animation::Animator::OnAnimation(ftxui::animation::Params&)
|
Andrewchistyakov[P]flashcards_lyc/build_O1/_deps/ftxui-src/src/ftxui/component/animation.cpp
|
void Animator::OnAnimation(Params& params) {
current_ += params.duration();
if (current_ >= duration_) {
*value_ = to_;
return;
}
if (current_ <= Duration()) {
*value_ = from_;
} else {
*value_ = from_ + (to_ - from_) * easing_function_(current_ / duration_);
}
RequestAnimationFrame();
}
|
O1
|
cpp
|
ftxui::animation::Animator::OnAnimation(ftxui::animation::Params&):
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movss (%rsi), %xmm0
addss 0x38(%rdi), %xmm0
movss %xmm0, 0x38(%rdi)
movss 0x10(%rdi), %xmm1
ucomiss %xmm0, %xmm1
ja 0x37d8c
movss 0xc(%rbx), %xmm0
movq (%rbx), %rax
movss %xmm0, (%rax)
jmp 0x37de7
xorps %xmm2, %xmm2
ucomiss %xmm2, %xmm0
movss 0x8(%rbx), %xmm2
jbe 0x37ddb
movss 0xc(%rbx), %xmm3
divss %xmm1, %xmm0
movss %xmm0, 0xc(%rsp)
cmpq $0x0, 0x28(%rbx)
je 0x37ded
leaq 0x18(%rbx), %rdi
subss %xmm2, %xmm3
movss %xmm3, 0x4(%rsp)
leaq 0xc(%rsp), %rsi
movss %xmm2, 0x8(%rsp)
callq *0x30(%rbx)
movss 0x8(%rsp), %xmm2
mulss 0x4(%rsp), %xmm0
addss %xmm0, %xmm2
movq (%rbx), %rax
movss %xmm2, (%rax)
callq 0x2db30
addq $0x10, %rsp
popq %rbx
retq
callq 0xb140
nop
|
_ZN5ftxui9animation8Animator11OnAnimationERNS0_6ParamsE:
push rbx
sub rsp, 10h
mov rbx, rdi
movss xmm0, dword ptr [rsi]
addss xmm0, dword ptr [rdi+38h]
movss dword ptr [rdi+38h], xmm0
movss xmm1, dword ptr [rdi+10h]
ucomiss xmm1, xmm0
ja short loc_37D8C
movss xmm0, dword ptr [rbx+0Ch]
mov rax, [rbx]
movss dword ptr [rax], xmm0
jmp short loc_37DE7
loc_37D8C:
xorps xmm2, xmm2
ucomiss xmm0, xmm2
movss xmm2, dword ptr [rbx+8]
jbe short loc_37DDB
movss xmm3, dword ptr [rbx+0Ch]
divss xmm0, xmm1
movss [rsp+18h+var_C], xmm0
cmp qword ptr [rbx+28h], 0
jz short loc_37DED
lea rdi, [rbx+18h]; this
subss xmm3, xmm2
movss [rsp+18h+var_14], xmm3
lea rsi, [rsp+18h+var_C]
movss [rsp+18h+var_10], xmm2
call qword ptr [rbx+30h]
movss xmm2, [rsp+18h+var_10]
mulss xmm0, [rsp+18h+var_14]
addss xmm2, xmm0
loc_37DDB:
mov rax, [rbx]
movss dword ptr [rax], xmm2
call _ZN5ftxui9animation21RequestAnimationFrameEv; ftxui::animation::RequestAnimationFrame(void)
loc_37DE7:
add rsp, 10h
pop rbx
retn
loc_37DED:
call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
|
void ftxui::animation::Animator::OnAnimation(long long a1, float *a2)
{
long long v2; // rbx
float v3; // xmm0_4
float v4; // xmm1_4
float v5; // xmm2_4
float v6; // xmm3_4
float v7[3]; // [rsp+Ch] [rbp-Ch] BYREF
v2 = a1;
v3 = *a2 + *(float *)(a1 + 56);
*(float *)(a1 + 56) = v3;
v4 = *(float *)(a1 + 16);
if ( v4 > v3 )
{
v5 = *(float *)(a1 + 8);
if ( v3 > 0.0 )
{
v6 = *(float *)(a1 + 12);
v7[0] = v3 / v4;
if ( !*(_QWORD *)(a1 + 40) )
std::__throw_bad_function_call();
a1 += 24LL;
v5 = v5 + (float)((*(float ( **)(long long, float *))(v2 + 48))(a1, v7) * (float)(v6 - v5));
}
**(float **)v2 = v5;
ftxui::animation::RequestAnimationFrame((ftxui::animation *)a1);
}
else
{
**(_DWORD **)a1 = *(_DWORD *)(a1 + 12);
}
}
|
OnAnimation:
PUSH RBX
SUB RSP,0x10
MOV RBX,RDI
MOVSS XMM0,dword ptr [RSI]
ADDSS XMM0,dword ptr [RDI + 0x38]
MOVSS dword ptr [RDI + 0x38],XMM0
MOVSS XMM1,dword ptr [RDI + 0x10]
UCOMISS XMM1,XMM0
JA 0x00137d8c
MOVSS XMM0,dword ptr [RBX + 0xc]
MOV RAX,qword ptr [RBX]
MOVSS dword ptr [RAX],XMM0
JMP 0x00137de7
LAB_00137d8c:
XORPS XMM2,XMM2
UCOMISS XMM0,XMM2
MOVSS XMM2,dword ptr [RBX + 0x8]
JBE 0x00137ddb
MOVSS XMM3,dword ptr [RBX + 0xc]
DIVSS XMM0,XMM1
MOVSS dword ptr [RSP + 0xc],XMM0
CMP qword ptr [RBX + 0x28],0x0
JZ 0x00137ded
LEA RDI,[RBX + 0x18]
SUBSS XMM3,XMM2
MOVSS dword ptr [RSP + 0x4],XMM3
LEA RSI,[RSP + 0xc]
MOVSS dword ptr [RSP + 0x8],XMM2
CALL qword ptr [RBX + 0x30]
MOVSS XMM2,dword ptr [RSP + 0x8]
MULSS XMM0,dword ptr [RSP + 0x4]
ADDSS XMM2,XMM0
LAB_00137ddb:
MOV RAX,qword ptr [RBX]
MOVSS dword ptr [RAX],XMM2
CALL 0x0012db30
LAB_00137de7:
ADD RSP,0x10
POP RBX
RET
LAB_00137ded:
CALL 0x0010b140
|
/* ftxui::animation::Animator::OnAnimation(ftxui::animation::Params&) */
void __thiscall ftxui::animation::Animator::OnAnimation(Animator *this,Params *param_1)
{
float fVar1;
float fVar2;
float fVar3;
float local_c;
fVar2 = *(float *)param_1 + *(float *)(this + 0x38);
*(float *)(this + 0x38) = fVar2;
if (fVar2 < *(float *)(this + 0x10)) {
fVar3 = *(float *)(this + 8);
if (0.0 < fVar2) {
fVar1 = *(float *)(this + 0xc);
local_c = fVar2 / *(float *)(this + 0x10);
if (*(long *)(this + 0x28) == 0) {
/* WARNING: Subroutine does not return */
std::__throw_bad_function_call();
}
fVar2 = (float)(**(code **)(this + 0x30))(this + 0x18,&local_c);
fVar3 = fVar3 + fVar2 * (fVar1 - fVar3);
}
**(float **)this = fVar3;
RequestAnimationFrame();
}
else {
**(int4 **)this = *(int4 *)(this + 0xc);
}
return;
}
|
|
12,125 |
Generator::gen_bin_expr(NodeBinExpr const*)::BinExprVisitor::operator()(NodeBinExprAdd const*) const
|
BhuvanGudi[P]LexiParse/src/generation.hpp
|
void operator()(const NodeBinExprAdd* add) const
{
gen.gen_expr(add->rhs);
gen.gen_expr(add->lhs);
gen.pop("rax");
gen.pop("rbx");
gen.m_output << " add rax, rbx\n";
gen.push("rax");
}
|
O2
|
cpp
|
Generator::gen_bin_expr(NodeBinExpr const*)::BinExprVisitor::operator()(NodeBinExprAdd const*) const:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x8(%rsi), %rsi
leaq 0x8(%rsp), %r15
movq %rax, (%r15)
movzbl 0x8(%rsi), %eax
leaq 0x6afd(%rip), %r12 # 0xcd40
movq %r15, %rdi
callq *(%r12,%rax,8)
movq (%rbx), %rax
movq (%r14), %rsi
movq %rax, (%r15)
movzbl 0x8(%rsi), %eax
leaq 0x8(%rsp), %rdi
callq *(%r12,%rax,8)
movq (%rbx), %r14
leaq 0x21af(%rip), %rsi # 0x8419
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x43bc
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x5e6e
leaq 0x8(%rsp), %rdi
callq 0x27ea
movq (%rbx), %r14
leaq 0x21b5(%rip), %rsi # 0x844f
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x43bc
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x5e6e
leaq 0x8(%rsp), %rdi
callq 0x27ea
movq (%rbx), %rdi
addq $0x28, %rdi
leaq 0x2185(%rip), %rsi # 0x8453
callq 0x21a0
movq (%rbx), %rbx
leaq 0x213c(%rip), %rsi # 0x8419
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x43bc
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x5fa6
leaq 0x8(%rsp), %rdi
callq 0x27ea
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x6317
jmp 0x6326
jmp 0x6317
jmp 0x6326
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x27ea
jmp 0x6329
movq %rax, %rbx
movq %rbx, %rdi
callq 0x2270
|
_ZZN9Generator12gen_bin_exprEPK11NodeBinExprENK14BinExprVisitorclEPK14NodeBinExprAdd:
push r15
push r14
push r12
push rbx
sub rsp, 28h
mov r14, rsi
mov rbx, rdi
mov rax, [rdi]
mov rsi, [rsi+8]
lea r15, [rsp+48h+var_40]
mov [r15], rax
movzx eax, byte ptr [rsi+8]
lea r12, _ZNSt8__detail9__variant12__gen_vtableINS0_21__deduce_visit_resultIvEERZN9Generator8gen_exprEPK8NodeExprE11ExprVisitorJRKSt7variantIJP8NodeTermP11NodeBinExprEEEE9_S_vtableE; std::__detail::__variant::__gen_vtable<std::__detail::__variant::__deduce_visit_result<void>,Generator::gen_expr(NodeExpr const*)::ExprVisitor &,std::variant<NodeTerm *,NodeBinExpr *> const&>::_S_vtable
mov rdi, r15
call ds:(_ZNSt8__detail9__variant12__gen_vtableINS0_21__deduce_visit_resultIvEERZN9Generator8gen_exprEPK8NodeExprE11ExprVisitorJRKSt7variantIJP8NodeTermP11NodeBinExprEEEE9_S_vtableE - 0CD40h)[r12+rax*8]; std::__detail::__variant::__gen_vtable_impl<std::__detail::__variant::_Multi_array<std::__detail::__variant::__deduce_visit_result<void> (*)(Generator::gen_expr(NodeExpr const*)::ExprVisitor &,std::variant<NodeTerm *,NodeBinExpr *> const&)>,std::integer_sequence<ulong,0ul>>::__visit_invoke(Generator::gen_expr(NodeExpr const*)::ExprVisitor &,std::variant<NodeTerm *,NodeBinExpr *> const&)
mov rax, [rbx]
mov rsi, [r14]
mov [r15], rax
movzx eax, byte ptr [rsi+8]
lea rdi, [rsp+48h+var_40]
call ds:(_ZNSt8__detail9__variant12__gen_vtableINS0_21__deduce_visit_resultIvEERZN9Generator8gen_exprEPK8NodeExprE11ExprVisitorJRKSt7variantIJP8NodeTermP11NodeBinExprEEEE9_S_vtableE - 0CD40h)[r12+rax*8]; std::__detail::__variant::__gen_vtable_impl<std::__detail::__variant::_Multi_array<std::__detail::__variant::__deduce_visit_result<void> (*)(Generator::gen_expr(NodeExpr const*)::ExprVisitor &,std::variant<NodeTerm *,NodeBinExpr *> const&)>,std::integer_sequence<ulong,0ul>>::__visit_invoke(Generator::gen_expr(NodeExpr const*)::ExprVisitor &,std::variant<NodeTerm *,NodeBinExpr *> const&)
mov r14, [rbx]
lea rsi, aRax; "rax"
lea rdi, [rsp+48h+var_40]
lea rdx, [rsp+48h+var_41]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rsi, [rsp+48h+var_40]
mov rdi, r14
call _ZN9Generator3popERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; Generator::pop(std::string const&)
lea rdi, [rsp+48h+var_40]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov r14, [rbx]
lea rsi, aRbx; "rbx"
lea rdi, [rsp+48h+var_40]
lea rdx, [rsp+48h+var_41]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rsi, [rsp+48h+var_40]
mov rdi, r14
call _ZN9Generator3popERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; Generator::pop(std::string const&)
lea rdi, [rsp+48h+var_40]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, [rbx]
add rdi, 28h ; '('
lea rsi, aAddRaxRbx; " add rax, rbx\n"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rbx, [rbx]
lea rsi, aRax; "rax"
lea rdi, [rsp+48h+var_40]
lea rdx, [rsp+48h+var_41]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rsi, [rsp+48h+var_40]
mov rdi, rbx
call _ZN9Generator4pushERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; Generator::push(std::string const&)
lea rdi, [rsp+48h+var_40]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
add rsp, 28h
pop rbx
pop r12
pop r14
pop r15
retn
jmp short loc_6317
jmp short loc_6326
jmp short loc_6317
jmp short loc_6326
loc_6317:
mov rbx, rax
lea rdi, [rsp+arg_0]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_6329
loc_6326:
mov rbx, rax
loc_6329:
mov rdi, rbx
call __Unwind_Resume
|
long long Generator::gen_bin_expr(NodeBinExpr const*)::BinExprVisitor::operator()(long long *a1, long long *a2)
{
long long v3; // rsi
long long v4; // rsi
long long v5; // r14
long long v6; // rdx
long long v7; // r14
long long v8; // rdx
long long v9; // rdx
long long v10; // rbx
long long v11; // rdx
long long result; // rax
_QWORD v13[8]; // [rsp+8h] [rbp-40h] BYREF
v3 = a2[1];
v13[0] = *a1;
((void ( *)(_QWORD *))*(&std::__detail::__variant::__gen_vtable<std::__detail::__variant::__deduce_visit_result<void>,Generator::gen_expr(NodeExpr const*)::ExprVisitor &,std::variant<NodeTerm *,NodeBinExpr *> const&>::_S_vtable
+ *(unsigned __int8 *)(v3 + 8)))(v13);
v4 = *a2;
v13[0] = *a1;
((void ( *)(_QWORD *))*(&std::__detail::__variant::__gen_vtable<std::__detail::__variant::__deduce_visit_result<void>,Generator::gen_expr(NodeExpr const*)::ExprVisitor &,std::variant<NodeTerm *,NodeBinExpr *> const&>::_S_vtable
+ *(unsigned __int8 *)(v4 + 8)))(v13);
v5 = *a1;
std::string::basic_string<std::allocator<char>>(v13, (long long)"rax");
Generator::pop(v5, (long long)v13, v6);
std::string::~string();
v7 = *a1;
std::string::basic_string<std::allocator<char>>(v13, (long long)"rbx");
Generator::pop(v7, (long long)v13, v8);
std::string::~string();
std::operator<<<std::char_traits<char>>(*a1 + 40, " add rax, rbx\n", v9);
v10 = *a1;
std::string::basic_string<std::allocator<char>>(v13, (long long)"rax");
result = Generator::push(v10, (long long)v13, v11);
std::string::~string();
return result;
}
|
operator():
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr [RDI]
MOV RSI,qword ptr [RSI + 0x8]
LEA R15,[RSP + 0x8]
MOV qword ptr [R15],RAX
MOVZX EAX,byte ptr [RSI + 0x8]
LEA R12,[0x10cd40]
MOV RDI,R15
CALL qword ptr [R12 + RAX*0x8]
MOV RAX,qword ptr [RBX]
MOV RSI,qword ptr [R14]
MOV qword ptr [R15],RAX
MOVZX EAX,byte ptr [RSI + 0x8]
LEA RDI,[RSP + 0x8]
CALL qword ptr [R12 + RAX*0x8]
MOV R14,qword ptr [RBX]
LAB_00106263:
LEA RSI,[0x108419]
LEA RDI,[RSP + 0x8]
LEA RDX,[RSP + 0x7]
CALL 0x001043bc
LAB_00106279:
LEA RSI,[RSP + 0x8]
MOV RDI,R14
CALL 0x00105e6e
LEA RDI,[RSP + 0x8]
CALL 0x001027ea
MOV R14,qword ptr [RBX]
LAB_00106293:
LEA RSI,[0x10844f]
LEA RDI,[RSP + 0x8]
LEA RDX,[RSP + 0x7]
CALL 0x001043bc
LAB_001062a9:
LEA RSI,[RSP + 0x8]
MOV RDI,R14
CALL 0x00105e6e
LAB_001062b6:
LEA RDI,[RSP + 0x8]
CALL 0x001027ea
MOV RDI,qword ptr [RBX]
ADD RDI,0x28
LEA RSI,[0x108453]
CALL 0x001021a0
MOV RBX,qword ptr [RBX]
LAB_001062d6:
LEA RSI,[0x108419]
LEA RDI,[RSP + 0x8]
LEA RDX,[RSP + 0x7]
CALL 0x001043bc
LAB_001062ec:
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
CALL 0x00105fa6
LAB_001062f9:
LEA RDI,[RSP + 0x8]
CALL 0x001027ea
ADD RSP,0x28
POP RBX
POP R12
POP R14
POP R15
RET
|
/* Generator::gen_bin_expr(NodeBinExpr
const*)::BinExprVisitor::TEMPNAMEPLACEHOLDERVALUE(NodeBinExprAdd const*) const */
void __thiscall
Generator::gen_bin_expr(NodeBinExpr_const*)::BinExprVisitor::operator()
(BinExprVisitor *this,NodeBinExprAdd *param_1)
{
Generator *pGVar1;
allocator local_41;
int8 local_40 [4];
local_40[0] = *(int8 *)this;
(**(code **)(std::__detail::__variant::
__gen_vtable<std::__detail::__variant::__deduce_visit_result<void>,Generator::gen_expr(NodeExpr_const*)::ExprVisitor&,std::variant<NodeTerm*,NodeBinExpr*>const&>
::_S_vtable + (ulong)*(byte *)(*(long *)(param_1 + 8) + 8) * 8))(local_40);
local_40[0] = *(int8 *)this;
(**(code **)(std::__detail::__variant::
__gen_vtable<std::__detail::__variant::__deduce_visit_result<void>,Generator::gen_expr(NodeExpr_const*)::ExprVisitor&,std::variant<NodeTerm*,NodeBinExpr*>const&>
::_S_vtable + (ulong)*(byte *)(*(long *)param_1 + 8) * 8))(local_40);
pGVar1 = *(Generator **)this;
/* try { // try from 00106263 to 00106278 has its CatchHandler @ 00106326 */
std::__cxx11::string::string<std::allocator<char>>((string *)local_40,"rax",&local_41);
/* try { // try from 00106279 to 00106285 has its CatchHandler @ 00106317 */
pop(pGVar1,(string *)local_40);
std::__cxx11::string::~string((string *)local_40);
pGVar1 = *(Generator **)this;
/* try { // try from 00106293 to 001062a8 has its CatchHandler @ 00106315 */
std::__cxx11::string::string<std::allocator<char>>((string *)local_40,"rbx",&local_41);
/* try { // try from 001062a9 to 001062b5 has its CatchHandler @ 00106313 */
pop(pGVar1,(string *)local_40);
std::__cxx11::string::~string((string *)local_40);
std::operator<<((ostream *)(*(long *)this + 0x28)," add rax, rbx\n");
pGVar1 = *(Generator **)this;
/* try { // try from 001062d6 to 001062eb has its CatchHandler @ 00106311 */
std::__cxx11::string::string<std::allocator<char>>((string *)local_40,"rax",&local_41);
/* try { // try from 001062ec to 001062f8 has its CatchHandler @ 0010630f */
push(pGVar1,(string *)local_40);
std::__cxx11::string::~string((string *)local_40);
return;
}
|
|
12,126 |
ggml_backend_cpu_graph_compute(ggml_backend*, ggml_cgraph*)
|
ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu.cpp
|
static enum ggml_status ggml_backend_cpu_graph_compute(ggml_backend_t backend, struct ggml_cgraph * cgraph) {
struct ggml_backend_cpu_context * cpu_ctx = (struct ggml_backend_cpu_context *)backend->context;
struct ggml_cplan cplan = ggml_graph_plan(cgraph, cpu_ctx->n_threads, cpu_ctx->threadpool);
if (cpu_ctx->work_size < cplan.work_size) {
delete[] cpu_ctx->work_data;
cpu_ctx->work_data = new uint8_t[cplan.work_size];
if (cpu_ctx->work_data == NULL) {
cpu_ctx->work_size = 0;
return GGML_STATUS_ALLOC_FAILED;
}
cpu_ctx->work_size = cplan.work_size;
}
cplan.work_data = (uint8_t *)cpu_ctx->work_data;
cplan.abort_callback = cpu_ctx->abort_callback;
cplan.abort_callback_data = cpu_ctx->abort_callback_data;
return ggml_graph_compute(cgraph, &cplan);
}
|
O0
|
cpp
|
ggml_backend_cpu_graph_compute(ggml_backend*, ggml_cgraph*):
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq 0x48(%rsp), %rax
movq 0x78(%rax), %rax
movq %rax, 0x38(%rsp)
movq 0x40(%rsp), %rsi
movq 0x38(%rsp), %rax
movl (%rax), %edx
movq 0x38(%rsp), %rax
movq 0x8(%rax), %rcx
leaq 0x8(%rsp), %rdi
callq 0x10970
movq 0x38(%rsp), %rax
movq 0x18(%rax), %rax
cmpq 0x8(%rsp), %rax
jae 0x18ffe
movq 0x38(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, (%rsp)
cmpq $0x0, %rax
je 0x18fb7
movq (%rsp), %rdi
callq 0x10060
movq 0x8(%rsp), %rdi
callq 0xf040
movq %rax, %rcx
movq 0x38(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x38(%rsp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x18ff0
movq 0x38(%rsp), %rax
movq $0x0, 0x18(%rax)
movl $0xfffffffe, 0x54(%rsp) # imm = 0xFFFFFFFE
jmp 0x1903b
movq 0x8(%rsp), %rcx
movq 0x38(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x38(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x38(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0x28(%rsp)
movq 0x38(%rsp), %rax
movq 0x28(%rax), %rax
movq %rax, 0x30(%rsp)
movq 0x40(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x10ad0
movl %eax, 0x54(%rsp)
movl 0x54(%rsp), %eax
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
|
_ZL30ggml_backend_cpu_graph_computeP12ggml_backendP11ggml_cgraph:
sub rsp, 58h
mov [rsp+58h+var_10], rdi
mov [rsp+58h+var_18], rsi
mov rax, [rsp+58h+var_10]
mov rax, [rax+78h]
mov [rsp+58h+var_20], rax
mov rsi, [rsp+58h+var_18]
mov rax, [rsp+58h+var_20]
mov edx, [rax]
mov rax, [rsp+58h+var_20]
mov rcx, [rax+8]
lea rdi, [rsp+58h+var_50]
call _ggml_graph_plan
mov rax, [rsp+58h+var_20]
mov rax, [rax+18h]
cmp rax, [rsp+58h+var_50]
jnb short loc_18FFE
mov rax, [rsp+58h+var_20]
mov rax, [rax+10h]
mov [rsp+58h+var_58], rax
cmp rax, 0
jz short loc_18FB7
mov rdi, [rsp+58h+var_58]; void *
call __ZdaPv; operator delete[](void *)
loc_18FB7:
mov rdi, [rsp+58h+var_50]; unsigned __int64
call __Znam; operator new[](ulong)
mov rcx, rax
mov rax, [rsp+58h+var_20]
mov [rax+10h], rcx
mov rax, [rsp+58h+var_20]
cmp qword ptr [rax+10h], 0
jnz short loc_18FF0
mov rax, [rsp+58h+var_20]
mov qword ptr [rax+18h], 0
mov [rsp+58h+var_4], 0FFFFFFFEh
jmp short loc_1903B
loc_18FF0:
mov rcx, [rsp+58h+var_50]
mov rax, [rsp+58h+var_20]
mov [rax+18h], rcx
loc_18FFE:
mov rax, [rsp+58h+var_20]
mov rax, [rax+10h]
mov [rsp+58h+var_48], rax
mov rax, [rsp+58h+var_20]
mov rax, [rax+20h]
mov [rsp+58h+var_30], rax
mov rax, [rsp+58h+var_20]
mov rax, [rax+28h]
mov [rsp+58h+var_28], rax
mov rdi, [rsp+58h+var_18]
lea rsi, [rsp+58h+var_50]
call _ggml_graph_compute
mov [rsp+58h+var_4], eax
loc_1903B:
mov eax, [rsp+58h+var_4]
add rsp, 58h
retn
|
long long ggml_backend_cpu_graph_compute(long long a1, long long a2)
{
long long v2; // rax
void *v4; // [rsp+0h] [rbp-58h]
unsigned long long v5[6]; // [rsp+8h] [rbp-50h] BYREF
long long v6; // [rsp+38h] [rbp-20h]
long long v7; // [rsp+40h] [rbp-18h]
long long v8; // [rsp+48h] [rbp-10h]
v8 = a1;
v7 = a2;
v6 = *(_QWORD *)(a1 + 120);
ggml_graph_plan((long long)v5, a2, *(_DWORD *)v6, *(_QWORD *)(v6 + 8));
if ( *(_QWORD *)(v6 + 24) >= v5[0] )
goto LABEL_7;
v4 = *(void **)(v6 + 16);
if ( v4 )
operator delete[](v4);
v2 = operator new[](v5[0]);
*(_QWORD *)(v6 + 16) = v2;
if ( *(_QWORD *)(v6 + 16) )
{
*(_QWORD *)(v6 + 24) = v5[0];
LABEL_7:
v5[1] = *(_QWORD *)(v6 + 16);
v5[4] = *(_QWORD *)(v6 + 32);
v5[5] = *(_QWORD *)(v6 + 40);
return (unsigned int)ggml_graph_compute(v7, (long long)v5);
}
*(_QWORD *)(v6 + 24) = 0LL;
return (unsigned int)-2;
}
|
ggml_backend_cpu_graph_compute:
SUB RSP,0x58
MOV qword ptr [RSP + 0x48],RDI
MOV qword ptr [RSP + 0x40],RSI
MOV RAX,qword ptr [RSP + 0x48]
MOV RAX,qword ptr [RAX + 0x78]
MOV qword ptr [RSP + 0x38],RAX
MOV RSI,qword ptr [RSP + 0x40]
MOV RAX,qword ptr [RSP + 0x38]
MOV EDX,dword ptr [RAX]
MOV RAX,qword ptr [RSP + 0x38]
MOV RCX,qword ptr [RAX + 0x8]
LEA RDI,[RSP + 0x8]
CALL 0x00110970
MOV RAX,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RAX + 0x18]
CMP RAX,qword ptr [RSP + 0x8]
JNC 0x00118ffe
MOV RAX,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP],RAX
CMP RAX,0x0
JZ 0x00118fb7
MOV RDI,qword ptr [RSP]
CALL 0x00110060
LAB_00118fb7:
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x0010f040
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RSP + 0x38]
CMP qword ptr [RAX + 0x10],0x0
JNZ 0x00118ff0
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RAX + 0x18],0x0
MOV dword ptr [RSP + 0x54],0xfffffffe
JMP 0x0011903b
LAB_00118ff0:
MOV RCX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RAX + 0x18],RCX
LAB_00118ffe:
MOV RAX,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RAX + 0x20]
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RSP + 0x30],RAX
MOV RDI,qword ptr [RSP + 0x40]
LEA RSI,[RSP + 0x8]
CALL 0x00110ad0
MOV dword ptr [RSP + 0x54],EAX
LAB_0011903b:
MOV EAX,dword ptr [RSP + 0x54]
ADD RSP,0x58
RET
|
/* ggml_backend_cpu_graph_compute(ggml_backend*, ggml_cgraph*) */
int4 ggml_backend_cpu_graph_compute(ggml_backend *param_1,ggml_cgraph *param_2)
{
int4 uVar1;
void *pvVar2;
ulong local_50;
int8 local_48;
int8 local_30;
int8 local_28;
int4 *local_20;
ggml_cgraph *local_18;
ggml_backend *local_10;
local_20 = *(int4 **)(param_1 + 0x78);
local_18 = param_2;
local_10 = param_1;
ggml_graph_plan(&local_50,param_2,*local_20,*(int8 *)(local_20 + 2));
if (*(ulong *)(local_20 + 6) < local_50) {
if (*(void **)(local_20 + 4) != (void *)0x0) {
operator_delete__(*(void **)(local_20 + 4));
}
pvVar2 = operator_new__(local_50);
*(void **)(local_20 + 4) = pvVar2;
if (*(long *)(local_20 + 4) == 0) {
*(int8 *)(local_20 + 6) = 0;
return 0xfffffffe;
}
*(ulong *)(local_20 + 6) = local_50;
}
local_48 = *(int8 *)(local_20 + 4);
local_30 = *(int8 *)(local_20 + 8);
local_28 = *(int8 *)(local_20 + 10);
uVar1 = ggml_graph_compute(local_18,&local_50);
return uVar1;
}
|
|
12,127 |
AttnBlock::init_params(ggml_context*, ggml_allocr*, ggml_type)
|
7CodeWizard[P]stablediffusion/vae.hpp
|
void init_params(struct ggml_context* ctx, ggml_allocr* alloc, ggml_type wtype) {
norm_w = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels);
norm_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels);
q_w = ggml_new_tensor_4d(ctx, GGML_TYPE_F16, 1, 1, in_channels, in_channels);
q_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels);
k_w = ggml_new_tensor_4d(ctx, GGML_TYPE_F16, 1, 1, in_channels, in_channels);
k_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels);
v_w = ggml_new_tensor_4d(ctx, GGML_TYPE_F16, 1, 1, in_channels, in_channels);
v_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels);
proj_out_w = ggml_new_tensor_4d(ctx, GGML_TYPE_F16, 1, 1, in_channels, in_channels);
proj_out_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels);
}
|
O1
|
cpp
|
AttnBlock::init_params(ggml_context*, ggml_allocr*, ggml_type):
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movslq (%rdi), %rdx
movq %rsi, %rdi
xorl %esi, %esi
callq 0x8ec3c
movq %rax, 0x8(%rbx)
movslq (%rbx), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x8ec3c
movq %rax, 0x10(%rbx)
movslq (%rbx), %r8
movl $0x1, %edx
movl $0x1, %ecx
movq %r14, %rdi
movl $0x1, %esi
movq %r8, %r9
callq 0x8eca5
movq %rax, 0x18(%rbx)
movslq (%rbx), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x8ec3c
movq %rax, 0x20(%rbx)
movslq (%rbx), %r8
movl $0x1, %edx
movl $0x1, %ecx
movq %r14, %rdi
movl $0x1, %esi
movq %r8, %r9
callq 0x8eca5
movq %rax, 0x28(%rbx)
movslq (%rbx), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x8ec3c
movq %rax, 0x30(%rbx)
movslq (%rbx), %r8
movl $0x1, %edx
movl $0x1, %ecx
movq %r14, %rdi
movl $0x1, %esi
movq %r8, %r9
callq 0x8eca5
movq %rax, 0x38(%rbx)
movslq (%rbx), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x8ec3c
movq %rax, 0x40(%rbx)
movslq (%rbx), %r8
movl $0x1, %edx
movl $0x1, %ecx
movq %r14, %rdi
movl $0x1, %esi
movq %r8, %r9
callq 0x8eca5
movq %rax, 0x48(%rbx)
movslq (%rbx), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x8ec3c
movq %rax, 0x50(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
|
_ZN9AttnBlock11init_paramsEP12ggml_contextP11ggml_allocr9ggml_type:
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
movsxd rdx, dword ptr [rdi]
mov rdi, rsi
xor esi, esi
call ggml_new_tensor_1d
mov [rbx+8], rax
movsxd rdx, dword ptr [rbx]
mov rdi, r14
xor esi, esi
call ggml_new_tensor_1d
mov [rbx+10h], rax
movsxd r8, dword ptr [rbx]
mov edx, 1
mov ecx, 1
mov rdi, r14
mov esi, 1
mov r9, r8
call ggml_new_tensor_4d
mov [rbx+18h], rax
movsxd rdx, dword ptr [rbx]
mov rdi, r14
xor esi, esi
call ggml_new_tensor_1d
mov [rbx+20h], rax
movsxd r8, dword ptr [rbx]
mov edx, 1
mov ecx, 1
mov rdi, r14
mov esi, 1
mov r9, r8
call ggml_new_tensor_4d
mov [rbx+28h], rax
movsxd rdx, dword ptr [rbx]
mov rdi, r14
xor esi, esi
call ggml_new_tensor_1d
mov [rbx+30h], rax
movsxd r8, dword ptr [rbx]
mov edx, 1
mov ecx, 1
mov rdi, r14
mov esi, 1
mov r9, r8
call ggml_new_tensor_4d
mov [rbx+38h], rax
movsxd rdx, dword ptr [rbx]
mov rdi, r14
xor esi, esi
call ggml_new_tensor_1d
mov [rbx+40h], rax
movsxd r8, dword ptr [rbx]
mov edx, 1
mov ecx, 1
mov rdi, r14
mov esi, 1
mov r9, r8
call ggml_new_tensor_4d
mov [rbx+48h], rax
movsxd rdx, dword ptr [rbx]
mov rdi, r14
xor esi, esi
call ggml_new_tensor_1d
mov [rbx+50h], rax
add rsp, 8
pop rbx
pop r14
retn
|
long long AttnBlock::init_params(_QWORD *a1, long long a2)
{
long long result; // rax
a1[1] = ggml_new_tensor_1d(a2, 0LL, *(int *)a1);
a1[2] = ggml_new_tensor_1d(a2, 0LL, *(int *)a1);
a1[3] = ggml_new_tensor_4d(a2, 1LL, 1LL, 1LL, *(int *)a1, *(int *)a1);
a1[4] = ggml_new_tensor_1d(a2, 0LL, *(int *)a1);
a1[5] = ggml_new_tensor_4d(a2, 1LL, 1LL, 1LL, *(int *)a1, *(int *)a1);
a1[6] = ggml_new_tensor_1d(a2, 0LL, *(int *)a1);
a1[7] = ggml_new_tensor_4d(a2, 1LL, 1LL, 1LL, *(int *)a1, *(int *)a1);
a1[8] = ggml_new_tensor_1d(a2, 0LL, *(int *)a1);
a1[9] = ggml_new_tensor_4d(a2, 1LL, 1LL, 1LL, *(int *)a1, *(int *)a1);
result = ggml_new_tensor_1d(a2, 0LL, *(int *)a1);
a1[10] = result;
return result;
}
| |||
12,128 |
AttnBlock::init_params(ggml_context*, ggml_allocr*, ggml_type)
|
7CodeWizard[P]stablediffusion/vae.hpp
|
void init_params(struct ggml_context* ctx, ggml_allocr* alloc, ggml_type wtype) {
norm_w = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels);
norm_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels);
q_w = ggml_new_tensor_4d(ctx, GGML_TYPE_F16, 1, 1, in_channels, in_channels);
q_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels);
k_w = ggml_new_tensor_4d(ctx, GGML_TYPE_F16, 1, 1, in_channels, in_channels);
k_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels);
v_w = ggml_new_tensor_4d(ctx, GGML_TYPE_F16, 1, 1, in_channels, in_channels);
v_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels);
proj_out_w = ggml_new_tensor_4d(ctx, GGML_TYPE_F16, 1, 1, in_channels, in_channels);
proj_out_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels);
}
|
O2
|
cpp
|
AttnBlock::init_params(ggml_context*, ggml_allocr*, ggml_type):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movslq (%rdi), %rdx
movq %rsi, %rdi
xorl %esi, %esi
callq 0x68616
movq %rax, 0x8(%rbx)
movslq (%rbx), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x68616
movq %rax, 0x10(%rbx)
movslq (%rbx), %r8
pushq $0x1
popq %rbp
pushq $0x1
popq %r15
movq %r14, %rdi
movl %ebp, %esi
movq %r15, %rdx
movq %r15, %rcx
movq %r8, %r9
callq 0x68667
movq %rax, 0x18(%rbx)
movslq (%rbx), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x68616
movq %rax, 0x20(%rbx)
movslq (%rbx), %r8
movq %r14, %rdi
movl %ebp, %esi
movq %r15, %rdx
movq %r15, %rcx
movq %r8, %r9
callq 0x68667
movq %rax, 0x28(%rbx)
movslq (%rbx), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x68616
movq %rax, 0x30(%rbx)
movslq (%rbx), %r8
movq %r14, %rdi
movl %ebp, %esi
movq %r15, %rdx
movq %r15, %rcx
movq %r8, %r9
callq 0x68667
movq %rax, 0x38(%rbx)
movslq (%rbx), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x68616
movq %rax, 0x40(%rbx)
movslq (%rbx), %r8
movq %r14, %rdi
movl %ebp, %esi
movq %r15, %rdx
movq %r15, %rcx
movq %r8, %r9
callq 0x68667
movq %rax, 0x48(%rbx)
movslq (%rbx), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x68616
movq %rax, 0x50(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
|
_ZN9AttnBlock11init_paramsEP12ggml_contextP11ggml_allocr9ggml_type:
push rbp
push r15
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
movsxd rdx, dword ptr [rdi]
mov rdi, rsi
xor esi, esi
call ggml_new_tensor_1d
mov [rbx+8], rax
movsxd rdx, dword ptr [rbx]
mov rdi, r14
xor esi, esi
call ggml_new_tensor_1d
mov [rbx+10h], rax
movsxd r8, dword ptr [rbx]
push 1
pop rbp
push 1
pop r15
mov rdi, r14
mov esi, ebp
mov rdx, r15
mov rcx, r15
mov r9, r8
call ggml_new_tensor_4d
mov [rbx+18h], rax
movsxd rdx, dword ptr [rbx]
mov rdi, r14
xor esi, esi
call ggml_new_tensor_1d
mov [rbx+20h], rax
movsxd r8, dword ptr [rbx]
mov rdi, r14
mov esi, ebp
mov rdx, r15
mov rcx, r15
mov r9, r8
call ggml_new_tensor_4d
mov [rbx+28h], rax
movsxd rdx, dword ptr [rbx]
mov rdi, r14
xor esi, esi
call ggml_new_tensor_1d
mov [rbx+30h], rax
movsxd r8, dword ptr [rbx]
mov rdi, r14
mov esi, ebp
mov rdx, r15
mov rcx, r15
mov r9, r8
call ggml_new_tensor_4d
mov [rbx+38h], rax
movsxd rdx, dword ptr [rbx]
mov rdi, r14
xor esi, esi
call ggml_new_tensor_1d
mov [rbx+40h], rax
movsxd r8, dword ptr [rbx]
mov rdi, r14
mov esi, ebp
mov rdx, r15
mov rcx, r15
mov r9, r8
call ggml_new_tensor_4d
mov [rbx+48h], rax
movsxd rdx, dword ptr [rbx]
mov rdi, r14
xor esi, esi
call ggml_new_tensor_1d
mov [rbx+50h], rax
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long AttnBlock::init_params(_QWORD *a1, long long a2)
{
long long result; // rax
a1[1] = ggml_new_tensor_1d(a2, 0LL, *(int *)a1);
a1[2] = ggml_new_tensor_1d(a2, 0LL, *(int *)a1);
a1[3] = ggml_new_tensor_4d(a2, 1LL, 1LL, 1LL, *(int *)a1, *(int *)a1);
a1[4] = ggml_new_tensor_1d(a2, 0LL, *(int *)a1);
a1[5] = ggml_new_tensor_4d(a2, 1LL, 1LL, 1LL, *(int *)a1, *(int *)a1);
a1[6] = ggml_new_tensor_1d(a2, 0LL, *(int *)a1);
a1[7] = ggml_new_tensor_4d(a2, 1LL, 1LL, 1LL, *(int *)a1, *(int *)a1);
a1[8] = ggml_new_tensor_1d(a2, 0LL, *(int *)a1);
a1[9] = ggml_new_tensor_4d(a2, 1LL, 1LL, 1LL, *(int *)a1, *(int *)a1);
result = ggml_new_tensor_1d(a2, 0LL, *(int *)a1);
a1[10] = result;
return result;
}
|
init_params:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
MOVSXD RDX,dword ptr [RDI]
MOV RDI,RSI
XOR ESI,ESI
CALL 0x00168616
MOV qword ptr [RBX + 0x8],RAX
MOVSXD RDX,dword ptr [RBX]
MOV RDI,R14
XOR ESI,ESI
CALL 0x00168616
MOV qword ptr [RBX + 0x10],RAX
MOVSXD R8,dword ptr [RBX]
PUSH 0x1
POP RBP
PUSH 0x1
POP R15
MOV RDI,R14
MOV ESI,EBP
MOV RDX,R15
MOV RCX,R15
MOV R9,R8
CALL 0x00168667
MOV qword ptr [RBX + 0x18],RAX
MOVSXD RDX,dword ptr [RBX]
MOV RDI,R14
XOR ESI,ESI
CALL 0x00168616
MOV qword ptr [RBX + 0x20],RAX
MOVSXD R8,dword ptr [RBX]
MOV RDI,R14
MOV ESI,EBP
MOV RDX,R15
MOV RCX,R15
MOV R9,R8
CALL 0x00168667
MOV qword ptr [RBX + 0x28],RAX
MOVSXD RDX,dword ptr [RBX]
MOV RDI,R14
XOR ESI,ESI
CALL 0x00168616
MOV qword ptr [RBX + 0x30],RAX
MOVSXD R8,dword ptr [RBX]
MOV RDI,R14
MOV ESI,EBP
MOV RDX,R15
MOV RCX,R15
MOV R9,R8
CALL 0x00168667
MOV qword ptr [RBX + 0x38],RAX
MOVSXD RDX,dword ptr [RBX]
MOV RDI,R14
XOR ESI,ESI
CALL 0x00168616
MOV qword ptr [RBX + 0x40],RAX
MOVSXD R8,dword ptr [RBX]
MOV RDI,R14
MOV ESI,EBP
MOV RDX,R15
MOV RCX,R15
MOV R9,R8
CALL 0x00168667
MOV qword ptr [RBX + 0x48],RAX
MOVSXD RDX,dword ptr [RBX]
MOV RDI,R14
XOR ESI,ESI
CALL 0x00168616
MOV qword ptr [RBX + 0x50],RAX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* AttnBlock::init_params(ggml_context*, ggml_allocr*, ggml_type) */
void AttnBlock::init_params(int *param_1,int8 param_2)
{
int8 uVar1;
uVar1 = ggml_new_tensor_1d(param_2,0,(long)*param_1);
*(int8 *)(param_1 + 2) = uVar1;
uVar1 = ggml_new_tensor_1d(param_2,0,(long)*param_1);
*(int8 *)(param_1 + 4) = uVar1;
uVar1 = ggml_new_tensor_4d(param_2,1,1,1,(long)*param_1,(long)*param_1);
*(int8 *)(param_1 + 6) = uVar1;
uVar1 = ggml_new_tensor_1d(param_2,0,(long)*param_1);
*(int8 *)(param_1 + 8) = uVar1;
uVar1 = ggml_new_tensor_4d(param_2,1,1,1,(long)*param_1,(long)*param_1);
*(int8 *)(param_1 + 10) = uVar1;
uVar1 = ggml_new_tensor_1d(param_2,0,(long)*param_1);
*(int8 *)(param_1 + 0xc) = uVar1;
uVar1 = ggml_new_tensor_4d(param_2,1,1,1,(long)*param_1,(long)*param_1);
*(int8 *)(param_1 + 0xe) = uVar1;
uVar1 = ggml_new_tensor_1d(param_2,0,(long)*param_1);
*(int8 *)(param_1 + 0x10) = uVar1;
uVar1 = ggml_new_tensor_4d(param_2,1,1,1,(long)*param_1,(long)*param_1);
*(int8 *)(param_1 + 0x12) = uVar1;
uVar1 = ggml_new_tensor_1d(param_2,0,(long)*param_1);
*(int8 *)(param_1 + 0x14) = uVar1;
return;
}
|
|
12,129 |
AttnBlock::init_params(ggml_context*, ggml_allocr*, ggml_type)
|
7CodeWizard[P]stablediffusion/vae.hpp
|
void init_params(struct ggml_context* ctx, ggml_allocr* alloc, ggml_type wtype) {
norm_w = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels);
norm_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels);
q_w = ggml_new_tensor_4d(ctx, GGML_TYPE_F16, 1, 1, in_channels, in_channels);
q_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels);
k_w = ggml_new_tensor_4d(ctx, GGML_TYPE_F16, 1, 1, in_channels, in_channels);
k_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels);
v_w = ggml_new_tensor_4d(ctx, GGML_TYPE_F16, 1, 1, in_channels, in_channels);
v_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels);
proj_out_w = ggml_new_tensor_4d(ctx, GGML_TYPE_F16, 1, 1, in_channels, in_channels);
proj_out_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, in_channels);
}
|
O3
|
cpp
|
AttnBlock::init_params(ggml_context*, ggml_allocr*, ggml_type):
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movslq (%rdi), %rdx
movq %rsi, %rdi
xorl %esi, %esi
callq 0x8d9b7
movq %rax, 0x8(%rbx)
movslq (%rbx), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x8d9b7
movq %rax, 0x10(%rbx)
movslq (%rbx), %r8
movl $0x1, %edx
movl $0x1, %ecx
movq %r14, %rdi
movl $0x1, %esi
movq %r8, %r9
callq 0x8da20
movq %rax, 0x18(%rbx)
movslq (%rbx), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x8d9b7
movq %rax, 0x20(%rbx)
movslq (%rbx), %r8
movl $0x1, %edx
movl $0x1, %ecx
movq %r14, %rdi
movl $0x1, %esi
movq %r8, %r9
callq 0x8da20
movq %rax, 0x28(%rbx)
movslq (%rbx), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x8d9b7
movq %rax, 0x30(%rbx)
movslq (%rbx), %r8
movl $0x1, %edx
movl $0x1, %ecx
movq %r14, %rdi
movl $0x1, %esi
movq %r8, %r9
callq 0x8da20
movq %rax, 0x38(%rbx)
movslq (%rbx), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x8d9b7
movq %rax, 0x40(%rbx)
movslq (%rbx), %r8
movl $0x1, %edx
movl $0x1, %ecx
movq %r14, %rdi
movl $0x1, %esi
movq %r8, %r9
callq 0x8da20
movq %rax, 0x48(%rbx)
movslq (%rbx), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x8d9b7
movq %rax, 0x50(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
|
_ZN9AttnBlock11init_paramsEP12ggml_contextP11ggml_allocr9ggml_type:
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
movsxd rdx, dword ptr [rdi]
mov rdi, rsi
xor esi, esi
call ggml_new_tensor_1d
mov [rbx+8], rax
movsxd rdx, dword ptr [rbx]
mov rdi, r14
xor esi, esi
call ggml_new_tensor_1d
mov [rbx+10h], rax
movsxd r8, dword ptr [rbx]
mov edx, 1
mov ecx, 1
mov rdi, r14
mov esi, 1
mov r9, r8
call ggml_new_tensor_4d
mov [rbx+18h], rax
movsxd rdx, dword ptr [rbx]
mov rdi, r14
xor esi, esi
call ggml_new_tensor_1d
mov [rbx+20h], rax
movsxd r8, dword ptr [rbx]
mov edx, 1
mov ecx, 1
mov rdi, r14
mov esi, 1
mov r9, r8
call ggml_new_tensor_4d
mov [rbx+28h], rax
movsxd rdx, dword ptr [rbx]
mov rdi, r14
xor esi, esi
call ggml_new_tensor_1d
mov [rbx+30h], rax
movsxd r8, dword ptr [rbx]
mov edx, 1
mov ecx, 1
mov rdi, r14
mov esi, 1
mov r9, r8
call ggml_new_tensor_4d
mov [rbx+38h], rax
movsxd rdx, dword ptr [rbx]
mov rdi, r14
xor esi, esi
call ggml_new_tensor_1d
mov [rbx+40h], rax
movsxd r8, dword ptr [rbx]
mov edx, 1
mov ecx, 1
mov rdi, r14
mov esi, 1
mov r9, r8
call ggml_new_tensor_4d
mov [rbx+48h], rax
movsxd rdx, dword ptr [rbx]
mov rdi, r14
xor esi, esi
call ggml_new_tensor_1d
mov [rbx+50h], rax
add rsp, 8
pop rbx
pop r14
retn
|
long long AttnBlock::init_params(_QWORD *a1, long long a2)
{
long long result; // rax
a1[1] = ggml_new_tensor_1d(a2, 0LL, *(int *)a1);
a1[2] = ggml_new_tensor_1d(a2, 0LL, *(int *)a1);
a1[3] = ggml_new_tensor_4d(a2, 1LL, 1LL, 1LL, *(int *)a1, *(int *)a1);
a1[4] = ggml_new_tensor_1d(a2, 0LL, *(int *)a1);
a1[5] = ggml_new_tensor_4d(a2, 1LL, 1LL, 1LL, *(int *)a1, *(int *)a1);
a1[6] = ggml_new_tensor_1d(a2, 0LL, *(int *)a1);
a1[7] = ggml_new_tensor_4d(a2, 1LL, 1LL, 1LL, *(int *)a1, *(int *)a1);
a1[8] = ggml_new_tensor_1d(a2, 0LL, *(int *)a1);
a1[9] = ggml_new_tensor_4d(a2, 1LL, 1LL, 1LL, *(int *)a1, *(int *)a1);
result = ggml_new_tensor_1d(a2, 0LL, *(int *)a1);
a1[10] = result;
return result;
}
| |||
12,130 |
pfs_create_metadata_lock_v1
|
eloqsql/storage/perfschema/pfs.cc
|
PSI_metadata_lock *
pfs_create_metadata_lock_v1(
void *identity,
const MDL_key *mdl_key,
opaque_mdl_type mdl_type,
opaque_mdl_duration mdl_duration,
opaque_mdl_status mdl_status,
const char *src_file,
uint src_line)
{
if (! flag_global_instrumentation)
return NULL;
if (! global_metadata_class.m_enabled)
return NULL;
PFS_thread *pfs_thread= my_thread_get_THR_PFS();
if (pfs_thread == NULL)
return NULL;
PFS_metadata_lock *pfs;
pfs= create_metadata_lock(identity, mdl_key,
mdl_type, mdl_duration, mdl_status,
src_file, src_line);
if (pfs != NULL)
{
pfs->m_owner_thread_id= pfs_thread->m_thread_internal_id;
pfs->m_owner_event_id= pfs_thread->m_event_id;
}
return reinterpret_cast<PSI_metadata_lock *> (pfs);
}
|
O3
|
cpp
|
pfs_create_metadata_lock_v1:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq 0x38e047(%rip), %rax # 0x3cf0c0
cmpb $0x1, (%rax)
jne 0x410f7
leaq 0x38eabb(%rip), %rax # 0x3cfb40
cmpb $0x1, 0x4(%rax)
jne 0x410f7
movl %r8d, %r14d
movl %ecx, %r15d
movl %edx, %r12d
movq %rsi, %r13
movq %rdi, %rbx
movq %r9, -0x38(%rbp)
movl 0x391648(%rip), %edi # 0x3d26ec
callq 0x26550
testq %rax, %rax
je 0x410f7
movq %rax, -0x30(%rbp)
movl 0x10(%rbp), %eax
movl %eax, (%rsp)
movq %rbx, %rdi
movq %r13, %rsi
movl %r12d, %edx
movl %r15d, %ecx
movl %r14d, %r8d
movq -0x38(%rbp), %r9
callq 0x33ad6
testq %rax, %rax
je 0x410f7
movq -0x30(%rbp), %rdx
movq 0x850(%rdx), %rcx
movq %rcx, 0x1c0(%rax)
movq 0x7f8(%rdx), %rcx
movq %rcx, 0x1c8(%rax)
jmp 0x410f9
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
pfs_create_metadata_lock_v1:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
lea rax, flag_global_instrumentation
cmp byte ptr [rax], 1
jnz short loc_410F7
lea rax, global_metadata_class
cmp byte ptr [rax+4], 1
jnz short loc_410F7
mov r14d, r8d
mov r15d, ecx
mov r12d, edx
mov r13, rsi
mov rbx, rdi
mov [rbp+var_38], r9
mov edi, cs:THR_PFS
call _pthread_getspecific
test rax, rax
jz short loc_410F7
mov [rbp+var_30], rax
mov eax, [rbp+arg_0]
mov [rsp+40h+var_40], eax
mov rdi, rbx
mov rsi, r13
mov edx, r12d
mov ecx, r15d
mov r8d, r14d
mov r9, [rbp+var_38]
call _Z20create_metadata_lockPvPK7MDL_keyiiiPKcj; create_metadata_lock(void *,MDL_key const*,int,int,int,char const*,uint)
test rax, rax
jz short loc_410F7
mov rdx, [rbp+var_30]
mov rcx, [rdx+850h]
mov [rax+1C0h], rcx
mov rcx, [rdx+7F8h]
mov [rax+1C8h], rcx
jmp short loc_410F9
loc_410F7:
xor eax, eax
loc_410F9:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long pfs_create_metadata_lock_v1(
long long a1,
unsigned __int16 *a2,
int a3,
int a4,
int a5,
long long a6,
int a7)
{
long long v10; // rax
long long result; // rax
long long v13; // [rsp+10h] [rbp-30h]
if ( flag_global_instrumentation[0] != 1 )
return 0LL;
if ( *((_BYTE *)&global_metadata_class + 4) != 1 )
return 0LL;
v10 = pthread_getspecific((unsigned int)THR_PFS);
if ( !v10 )
return 0LL;
v13 = v10;
result = create_metadata_lock(a1, a2, a3, a4, a5, a6, a7);
if ( !result )
return 0LL;
*(_QWORD *)(result + 448) = *(_QWORD *)(v13 + 2128);
*(_QWORD *)(result + 456) = *(_QWORD *)(v13 + 2040);
return result;
}
|
pfs_create_metadata_lock_v1:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
LEA RAX,[0x4cf0c0]
CMP byte ptr [RAX],0x1
JNZ 0x001410f7
LEA RAX,[0x4cfb40]
CMP byte ptr [RAX + 0x4],0x1
JNZ 0x001410f7
MOV R14D,R8D
MOV R15D,ECX
MOV R12D,EDX
MOV R13,RSI
MOV RBX,RDI
MOV qword ptr [RBP + -0x38],R9
MOV EDI,dword ptr [0x004d26ec]
CALL 0x00126550
TEST RAX,RAX
JZ 0x001410f7
MOV qword ptr [RBP + -0x30],RAX
MOV EAX,dword ptr [RBP + 0x10]
MOV dword ptr [RSP],EAX
MOV RDI,RBX
MOV RSI,R13
MOV EDX,R12D
MOV ECX,R15D
MOV R8D,R14D
MOV R9,qword ptr [RBP + -0x38]
CALL 0x00133ad6
TEST RAX,RAX
JZ 0x001410f7
MOV RDX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RDX + 0x850]
MOV qword ptr [RAX + 0x1c0],RCX
MOV RCX,qword ptr [RDX + 0x7f8]
MOV qword ptr [RAX + 0x1c8],RCX
JMP 0x001410f9
LAB_001410f7:
XOR EAX,EAX
LAB_001410f9:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long pfs_create_metadata_lock_v1
(void *param_1,MDL_key *param_2,int param_3,int param_4,int param_5,char *param_6,
uint param_7)
{
void *pvVar1;
long lVar2;
if ((((flag_global_instrumentation == '\x01') && (global_metadata_class[4] == '\x01')) &&
(pvVar1 = pthread_getspecific(THR_PFS), pvVar1 != (void *)0x0)) &&
(lVar2 = create_metadata_lock(param_1,param_2,param_3,param_4,param_5,param_6,param_7),
lVar2 != 0)) {
*(int8 *)(lVar2 + 0x1c0) = *(int8 *)((long)pvVar1 + 0x850);
*(int8 *)(lVar2 + 0x1c8) = *(int8 *)((long)pvVar1 + 0x7f8);
return lVar2;
}
return 0;
}
|
|
12,131 |
minja::Value& nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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>, minja::Value, std::less<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<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, minja::Value>>>::at<unsigned long&, 0>(unsigned long&)
|
monkey531[P]llama/common/json.hpp
|
T & at(KeyType && key) // NOLINT(cppcoreguidelines-missing-std-forward)
{
for (auto it = this->begin(); it != this->end(); ++it)
{
if (m_compare(it->first, key))
{
return it->second;
}
}
JSON_THROW(std::out_of_range("key not found"));
}
|
O0
|
cpp
|
minja::Value& nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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>, minja::Value, std::less<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<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, minja::Value>>>::at<unsigned long&, 0>(unsigned long&):
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq 0x40(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0xde640
movq %rax, 0x30(%rsp)
movq 0x10(%rsp), %rdi
callq 0xde6b0
movq %rax, 0x28(%rsp)
leaq 0x30(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0xde670
testb $0x1, %al
jne 0x10e126
jmp 0x10e177
movq 0x10(%rsp), %rax
addq $0x18, %rax
movq %rax, 0x8(%rsp)
leaq 0x30(%rsp), %rdi
callq 0xde6e0
movq 0x8(%rsp), %rdi
movq %rax, %rsi
movq 0x38(%rsp), %rdx
callq 0x10e250
testb $0x1, %al
jne 0x10e156
jmp 0x10e169
leaq 0x30(%rsp), %rdi
callq 0xde6e0
addq $0x10, %rax
addq $0x48, %rsp
retq
jmp 0x10e16b
leaq 0x30(%rsp), %rdi
callq 0xdea50
jmp 0x10e102
movl $0x10, %edi
callq 0x565c0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, (%rsp)
leaq 0xdb164(%rip), %rsi # 0x1e92f6
callq 0x563e0
jmp 0x10e199
movq (%rsp), %rdi
movq 0x160d84(%rip), %rsi # 0x26ef28
movq 0x160dcd(%rip), %rdx # 0x26ef78
callq 0x569b0
movq (%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
callq 0x56dd0
movq 0x20(%rsp), %rdi
callq 0x56a10
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
|
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atIRmTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OSS_:
sub rsp, 48h
mov [rsp+48h+var_8], rdi
mov [rsp+48h+var_10], rsi
mov rdi, [rsp+48h+var_8]
mov [rsp+48h+var_38], rdi
call _ZNSt6vectorISt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES_IhSaIhEEvEEN5minja5ValueEESaISI_EE5beginEv; std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>::begin(void)
mov [rsp+48h+var_18], rax
loc_10E102:
mov rdi, [rsp+48h+var_38]
call _ZNSt6vectorISt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES_IhSaIhEEvEEN5minja5ValueEESaISI_EE3endEv; std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>::end(void)
mov [rsp+48h+var_20], rax
lea rdi, [rsp+48h+var_18]
lea rsi, [rsp+48h+var_20]
call _ZN9__gnu_cxxneIPSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEN5minja5ValueEES6_ISK_SaISK_EEEEbRKNS_17__normal_iteratorIT_T0_EEST_; __gnu_cxx::operator!=<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>> const&,__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>> const&)
test al, 1
jnz short loc_10E126
jmp short loc_10E177
loc_10E126:
mov rax, [rsp+48h+var_38]
add rax, 18h
mov [rsp+48h+var_40], rax
lea rdi, [rsp+48h+var_18]
call _ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEN5minja5ValueEES6_ISK_SaISK_EEEptEv; __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>::operator->(void)
mov rdi, [rsp+48h+var_40]
mov rsi, rax
mov rdx, [rsp+48h+var_10]
call _ZNKSt8equal_toIvEclIRKN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEERmEEDTeqclsr3stdE7forwardIT_Efp_Eclsr3stdE7forwardIT0_Efp0_EEOSK_OSL_
test al, 1
jnz short loc_10E156
jmp short loc_10E169
loc_10E156:
lea rdi, [rsp+48h+var_18]
call _ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEN5minja5ValueEES6_ISK_SaISK_EEEptEv; __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>::operator->(void)
add rax, 10h
add rsp, 48h
retn
loc_10E169:
jmp short $+2
loc_10E16B:
lea rdi, [rsp+48h+var_18]
call _ZN9__gnu_cxx17__normal_iteratorIPSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEN5minja5ValueEES6_ISK_SaISK_EEEppEv; __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>::operator++(void)
jmp short loc_10E102
loc_10E177:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rdi, rax; this
mov rax, rdi
mov [rsp+48h+var_48], rax
lea rsi, aKeyNotFound; "key not found"
call __ZNSt12out_of_rangeC1EPKc; std::out_of_range::out_of_range(char const*)
jmp short $+2
loc_10E199:
mov rdi, [rsp+48h+var_48]; void *
mov rsi, cs:_ZTISt12out_of_range_ptr; lptinfo
mov rdx, cs:_ZNSt12out_of_rangeD1Ev_ptr; void (*)(void *)
call ___cxa_throw
mov rdi, [rsp+48h+var_48]; void *
mov rcx, rax
mov eax, edx
mov [rsp+48h+var_28], rcx
mov [rsp+48h+var_2C], eax
call ___cxa_free_exception
mov rdi, [rsp+48h+var_28]
call __Unwind_Resume
|
long long ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atIRmTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OSS_(
long long a1,
long long a2)
{
long long v2; // rax
std::out_of_range *exception; // [rsp+0h] [rbp-48h]
long long v5; // [rsp+28h] [rbp-20h] BYREF
long long i; // [rsp+30h] [rbp-18h] BYREF
long long v7; // [rsp+38h] [rbp-10h]
long long v8; // [rsp+40h] [rbp-8h]
v8 = a1;
v7 = a2;
for ( i = std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>::begin(a1);
;
__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::operator++(&i) )
{
v5 = std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>::end(a1);
if ( !__gnu_cxx::operator!=<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>(
(long long)&i,
(long long)&v5) )
{
exception = (std::out_of_range *)__cxa_allocate_exception(0x10uLL);
std::out_of_range::out_of_range(exception, "key not found");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::out_of_range,
(void (*)(void *))&std::out_of_range::~out_of_range);
}
v2 = __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::operator->((long long)&i);
if ( (std::equal_to<void>::operator()<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&,unsigned long &>(
a1 + 24,
v2,
v7) & 1) != 0 )
break;
}
return __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::operator->((long long)&i)
+ 16;
}
| |||
12,132 |
minja::Value& nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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>, minja::Value, std::less<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<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, minja::Value>>>::at<unsigned long&, 0>(unsigned long&)
|
monkey531[P]llama/common/json.hpp
|
T & at(KeyType && key) // NOLINT(cppcoreguidelines-missing-std-forward)
{
for (auto it = this->begin(); it != this->end(); ++it)
{
if (m_compare(it->first, key))
{
return it->second;
}
}
JSON_THROW(std::out_of_range("key not found"));
}
|
O2
|
cpp
|
minja::Value& nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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>, minja::Value, std::less<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<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, minja::Value>>>::at<unsigned long&, 0>(unsigned long&):
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
movq (%rdi), %rbx
cmpq 0x8(%r15), %rbx
je 0x5ddd0
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x5de3b
testb %al, %al
jne 0x5ddc3
addq $0x60, %rbx
jmp 0x5dda8
addq $0x10, %rbx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
pushq $0x10
popq %rdi
callq 0x223e0
movq %rax, %rbx
leaq 0x419db(%rip), %rsi # 0x9f7bd
movq %rax, %rdi
callq 0x220e0
movq 0x851cf(%rip), %rsi # 0xe2fc0
movq 0x851b0(%rip), %rdx # 0xe2fa8
movq %rbx, %rdi
callq 0x22d40
movq %rax, %r14
movq %rbx, %rdi
callq 0x225c0
movq %r14, %rdi
callq 0x22da0
nop
|
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atIRmTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OSS_:
push r15
push r14
push rbx
mov r14, rsi
mov r15, rdi
mov rbx, [rdi]
loc_5DDA8:
cmp rbx, [r15+8]
jz short loc_5DDD0
mov rsi, [r14]
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_3eqImTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEES3_
test al, al
jnz short loc_5DDC3
add rbx, 60h ; '`'
jmp short loc_5DDA8
loc_5DDC3:
add rbx, 10h
mov rax, rbx
pop rbx
pop r14
pop r15
retn
loc_5DDD0:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aKeyNotFound; "key not found"
mov rdi, rax; this
call __ZNSt12out_of_rangeC1EPKc; std::out_of_range::out_of_range(char const*)
mov rsi, cs:_ZTISt12out_of_range_ptr; lptinfo
mov rdx, cs:_ZNSt12out_of_rangeD1Ev_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 ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atIRmTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OSS_(
long long *a1,
_QWORD *a2)
{
long long i; // rbx
std::out_of_range *exception; // rbx
for ( i = *a1; ; i += 96LL )
{
if ( i == a1[1] )
{
exception = (std::out_of_range *)__cxa_allocate_exception(0x10uLL);
std::out_of_range::out_of_range(exception, "key not found");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::out_of_range,
(void (*)(void *))&std::out_of_range::~out_of_range);
}
if ( (unsigned __int8)ZN8nlohmann16json_abi_v3_11_3eqImTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEES3_(
i,
*a2) )
break;
}
return i + 16;
}
|
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atIRmTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OSS_:
PUSH R15
PUSH R14
PUSH RBX
MOV R14,RSI
MOV R15,RDI
MOV RBX,qword ptr [RDI]
LAB_0015dda8:
CMP RBX,qword ptr [R15 + 0x8]
JZ 0x0015ddd0
MOV RSI,qword ptr [R14]
MOV RDI,RBX
CALL 0x0015de3b
TEST AL,AL
JNZ 0x0015ddc3
ADD RBX,0x60
JMP 0x0015dda8
LAB_0015ddc3:
ADD RBX,0x10
MOV RAX,RBX
POP RBX
POP R14
POP R15
RET
LAB_0015ddd0:
PUSH 0x10
POP RDI
CALL 0x001223e0
MOV RBX,RAX
LAB_0015dddb:
LEA RSI,[0x19f7bd]
MOV RDI,RAX
CALL 0x001220e0
LAB_0015ddea:
MOV RSI,qword ptr [0x001e2fc0]
MOV RDX,qword ptr [0x001e2fa8]
MOV RDI,RBX
CALL 0x00122d40
|
long _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atIRmTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OSS_
(long *param_1,int8 *param_2)
{
char cVar1;
out_of_range *this;
long lVar2;
lVar2 = *param_1;
while( true ) {
if (lVar2 == param_1[1]) {
this = (out_of_range *)__cxa_allocate_exception(0x10);
/* try { // try from 0015dddb to 0015dde9 has its CatchHandler @ 0015de00 */
std::out_of_range::out_of_range(this,"key not found");
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_001e2fc0,PTR__out_of_range_001e2fa8);
}
cVar1 = _ZN8nlohmann16json_abi_v3_11_3eqImTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEES3_
(lVar2,*param_2);
if (cVar1 != '\0') break;
lVar2 = lVar2 + 0x60;
}
return lVar2 + 0x10;
}
|
|
12,133 |
free_token
|
bluesky950520[P]quickjs/quickjs.c
|
static void free_token(JSParseState *s, JSToken *token)
{
switch(token->val) {
case TOK_NUMBER:
JS_FreeValue(s->ctx, token->u.num.val);
break;
case TOK_STRING:
case TOK_TEMPLATE:
JS_FreeValue(s->ctx, token->u.str.str);
break;
case TOK_REGEXP:
JS_FreeValue(s->ctx, token->u.regexp.body);
JS_FreeValue(s->ctx, token->u.regexp.flags);
break;
case TOK_IDENT:
case TOK_PRIVATE_NAME:
JS_FreeAtom(s->ctx, token->u.ident.atom);
break;
default:
if (token->val >= TOK_FIRST_KEYWORD &&
token->val <= TOK_LAST_KEYWORD) {
JS_FreeAtom(s->ctx, token->u.ident.atom);
}
break;
}
}
|
O0
|
c
|
free_token:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x8(%rsp), %rax
movl (%rax), %eax
subl $-0x80, %eax
movl %eax, %ecx
movq %rcx, (%rsp)
subl $0x29, %eax
ja 0x4f7e3
movq (%rsp), %rax
leaq 0xbb54e(%rip), %rcx # 0x10aca0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x10(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rsi
movq 0x20(%rax), %rdx
callq 0x23c90
jmp 0x4f80e
movq 0x10(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rsi
movq 0x20(%rax), %rdx
callq 0x23c90
jmp 0x4f80e
movq 0x10(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rsi
movq 0x20(%rax), %rdx
callq 0x23c90
movq 0x10(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rsp), %rax
movq 0x28(%rax), %rsi
movq 0x30(%rax), %rdx
callq 0x23c90
jmp 0x4f80e
movq 0x10(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rsp), %rax
movl 0x18(%rax), %esi
callq 0x29040
jmp 0x4f80e
movq 0x8(%rsp), %rax
cmpl $-0x55, (%rax)
jl 0x4f80c
movq 0x8(%rsp), %rax
cmpl $-0x28, (%rax)
jg 0x4f80c
movq 0x10(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rsp), %rax
movl 0x18(%rax), %esi
callq 0x29040
jmp 0x4f80e
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
|
free_token:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov [rsp+18h+var_10], rsi
mov rax, [rsp+18h+var_10]
mov eax, [rax]
sub eax, 0FFFFFF80h; switch 42 cases
mov ecx, eax
mov [rsp+18h+var_18], rcx
sub eax, 29h
ja def_4F759; jumptable 000000000004F759 default case, cases -123--88
mov rax, [rsp+18h+var_18]
lea rcx, jpt_4F759
movsxd rax, ds:(jpt_4F759 - 10ACA0h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_4F75B:
mov rax, [rsp+18h+var_8]; jumptable 000000000004F759 case -128
mov rdi, [rax]
mov rax, [rsp+18h+var_10]
mov rsi, [rax+18h]
mov rdx, [rax+20h]
call JS_FreeValue
jmp loc_4F80E
loc_4F77A:
mov rax, [rsp+18h+var_8]; jumptable 000000000004F759 cases -127,-126
mov rdi, [rax]
mov rax, [rsp+18h+var_10]
mov rsi, [rax+18h]
mov rdx, [rax+20h]
call JS_FreeValue
jmp short loc_4F80E
loc_4F796:
mov rax, [rsp+18h+var_8]; jumptable 000000000004F759 case -124
mov rdi, [rax]
mov rax, [rsp+18h+var_10]
mov rsi, [rax+18h]
mov rdx, [rax+20h]
call JS_FreeValue
mov rax, [rsp+18h+var_8]
mov rdi, [rax]
mov rax, [rsp+18h+var_10]
mov rsi, [rax+28h]
mov rdx, [rax+30h]
call JS_FreeValue
jmp short loc_4F80E
loc_4F7CC:
mov rax, [rsp+18h+var_8]; jumptable 000000000004F759 cases -125,-87
mov rdi, [rax]
mov rax, [rsp+18h+var_10]
mov esi, [rax+18h]
call JS_FreeAtom
jmp short loc_4F80E
def_4F759:
mov rax, [rsp+18h+var_10]; jumptable 000000000004F759 default case, cases -123--88
cmp dword ptr [rax], 0FFFFFFABh
jl short loc_4F80C
mov rax, [rsp+18h+var_10]
cmp dword ptr [rax], 0FFFFFFD8h
jg short loc_4F80C
mov rax, [rsp+18h+var_8]
mov rdi, [rax]
mov rax, [rsp+18h+var_10]
mov esi, [rax+18h]
call JS_FreeAtom
loc_4F80C:
jmp short $+2
loc_4F80E:
add rsp, 18h
retn
|
long long free_token(long long *a1, long long a2)
{
long long result; // rax
switch ( *(_DWORD *)a2 )
{
case 0xFFFFFF80:
case 0xFFFFFF81:
case 0xFFFFFF82:
result = JS_FreeValue(*a1, *(_QWORD *)(a2 + 24), *(_QWORD *)(a2 + 32));
break;
case 0xFFFFFF83:
case 0xFFFFFFA9:
goto LABEL_6;
case 0xFFFFFF84:
JS_FreeValue(*a1, *(_QWORD *)(a2 + 24), *(_QWORD *)(a2 + 32));
result = JS_FreeValue(*a1, *(_QWORD *)(a2 + 40), *(_QWORD *)(a2 + 48));
break;
default:
result = a2;
if ( *(int *)a2 >= -85 )
{
result = a2;
if ( *(int *)a2 <= -40 )
LABEL_6:
result = JS_FreeAtom(*a1, *(_DWORD *)(a2 + 24));
}
break;
}
return result;
}
|
free_token:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV qword ptr [RSP + 0x8],RSI
MOV RAX,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RAX]
SUB EAX,-0x80
MOV ECX,EAX
MOV qword ptr [RSP],RCX
SUB EAX,0x29
JA 0x0014f7e3
MOV RAX,qword ptr [RSP]
LEA RCX,[0x20aca0]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_ffffff80:
MOV RAX,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RAX + 0x18]
MOV RDX,qword ptr [RAX + 0x20]
CALL 0x00123c90
JMP 0x0014f80e
caseD_ffffff81:
MOV RAX,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RAX + 0x18]
MOV RDX,qword ptr [RAX + 0x20]
CALL 0x00123c90
JMP 0x0014f80e
caseD_ffffff84:
MOV RAX,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RAX + 0x18]
MOV RDX,qword ptr [RAX + 0x20]
CALL 0x00123c90
MOV RAX,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RAX + 0x28]
MOV RDX,qword ptr [RAX + 0x30]
CALL 0x00123c90
JMP 0x0014f80e
caseD_ffffff83:
MOV RAX,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RSP + 0x8]
MOV ESI,dword ptr [RAX + 0x18]
CALL 0x00129040
JMP 0x0014f80e
caseD_ffffff85:
MOV RAX,qword ptr [RSP + 0x8]
CMP dword ptr [RAX],-0x55
JL 0x0014f80c
MOV RAX,qword ptr [RSP + 0x8]
CMP dword ptr [RAX],-0x28
JG 0x0014f80c
MOV RAX,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RSP + 0x8]
MOV ESI,dword ptr [RAX + 0x18]
CALL 0x00129040
LAB_0014f80c:
JMP 0x0014f80e
LAB_0014f80e:
ADD RSP,0x18
RET
|
void free_token(int8 *param_1,int *param_2)
{
switch(*param_2) {
case -0x80:
JS_FreeValue(*param_1,*(int8 *)(param_2 + 6),*(int8 *)(param_2 + 8));
break;
case -0x7f:
case -0x7e:
JS_FreeValue(*param_1,*(int8 *)(param_2 + 6),*(int8 *)(param_2 + 8));
break;
case -0x7d:
case -0x57:
JS_FreeAtom(*param_1,param_2[6]);
break;
case -0x7c:
JS_FreeValue(*param_1,*(int8 *)(param_2 + 6),*(int8 *)(param_2 + 8));
JS_FreeValue(*param_1,*(int8 *)(param_2 + 10),*(int8 *)(param_2 + 0xc));
break;
default:
if ((-0x56 < *param_2) && (*param_2 < -0x27)) {
JS_FreeAtom(*param_1,param_2[6]);
}
}
return;
}
|
|
12,134 |
free_token
|
bluesky950520[P]quickjs/quickjs.c
|
static void free_token(JSParseState *s, JSToken *token)
{
switch(token->val) {
case TOK_NUMBER:
JS_FreeValue(s->ctx, token->u.num.val);
break;
case TOK_STRING:
case TOK_TEMPLATE:
JS_FreeValue(s->ctx, token->u.str.str);
break;
case TOK_REGEXP:
JS_FreeValue(s->ctx, token->u.regexp.body);
JS_FreeValue(s->ctx, token->u.regexp.flags);
break;
case TOK_IDENT:
case TOK_PRIVATE_NAME:
JS_FreeAtom(s->ctx, token->u.ident.atom);
break;
default:
if (token->val >= TOK_FIRST_KEYWORD &&
token->val <= TOK_LAST_KEYWORD) {
JS_FreeAtom(s->ctx, token->u.ident.atom);
}
break;
}
}
|
O1
|
c
|
free_token:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl (%rsi), %eax
leal 0x80(%rax), %ecx
cmpl $0x4, %ecx
ja 0x3452e
leaq 0x685d0(%rip), %rax # 0x9cae8
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq (%r14), %rax
movq 0x18(%rbx), %rsi
movq 0x20(%rbx), %rdx
jmp 0x3456c
cmpl $-0x57, %eax
je 0x3453b
addl $0x55, %eax
cmpl $0x2d, %eax
ja 0x3457c
movq (%r14), %rdi
movl 0x18(%rbx), %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x207d8
movq (%r14), %rax
movq 0x18(%rbx), %rsi
movq 0x20(%rbx), %rdx
movq 0x18(%rax), %rdi
callq 0x1d8c6
movq (%r14), %rax
movq 0x28(%rbx), %rsi
movq 0x30(%rbx), %rdx
movq 0x18(%rax), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1d8c6
addq $0x8, %rsp
popq %rbx
popq %r14
retq
|
free_token:
push r14
push rbx
push rax
mov rbx, rsi
mov r14, rdi
mov eax, [rsi]
lea ecx, [rax+80h]; switch 5 cases
cmp ecx, 4
ja short def_3451F; jumptable 000000000003451F default case
lea rax, jpt_3451F
movsxd rcx, ds:(jpt_3451F - 9CAE8h)[rax+rcx*4]
add rcx, rax
jmp rcx; switch jump
loc_34521:
mov rax, [r14]; jumptable 000000000003451F cases -128--126
mov rsi, [rbx+18h]
mov rdx, [rbx+20h]
jmp short loc_3456C
def_3451F:
cmp eax, 0FFFFFFA9h; jumptable 000000000003451F default case
jz short loc_3453B; jumptable 000000000003451F case -125
add eax, 55h ; 'U'
cmp eax, 2Dh ; '-'
ja short loc_3457C
loc_3453B:
mov rdi, [r14]; jumptable 000000000003451F case -125
mov esi, [rbx+18h]
add rsp, 8
pop rbx
pop r14
jmp JS_FreeAtom
loc_3454D:
mov rax, [r14]; jumptable 000000000003451F case -124
mov rsi, [rbx+18h]
mov rdx, [rbx+20h]
mov rdi, [rax+18h]
call JS_FreeValueRT
mov rax, [r14]
mov rsi, [rbx+28h]
mov rdx, [rbx+30h]
loc_3456C:
mov rdi, [rax+18h]
add rsp, 8
pop rbx
pop r14
jmp JS_FreeValueRT
loc_3457C:
add rsp, 8
pop rbx
pop r14
retn
|
long long free_token(long long *a1, int *a2)
{
int v3; // eax
long long v4; // rax
_DWORD *v5; // rsi
long long v6; // rdx
long long result; // rax
v3 = *a2;
switch ( *a2 )
{
case -128:
case -127:
case -126:
v4 = *a1;
v5 = (_DWORD *)*((_QWORD *)a2 + 3);
v6 = *((_QWORD *)a2 + 4);
return JS_FreeValueRT(*(_QWORD *)(v4 + 24), v5, v6);
case -125:
return JS_FreeAtom(*a1, a2[6]);
case -124:
JS_FreeValueRT(*(_QWORD *)(*a1 + 24), *((_DWORD **)a2 + 3), *((_QWORD *)a2 + 4));
v4 = *a1;
v5 = (_DWORD *)*((_QWORD *)a2 + 5);
v6 = *((_QWORD *)a2 + 6);
return JS_FreeValueRT(*(_QWORD *)(v4 + 24), v5, v6);
default:
if ( v3 == -87 )
return JS_FreeAtom(*a1, a2[6]);
result = (unsigned int)(v3 + 85);
if ( (unsigned int)result <= 0x2D )
return JS_FreeAtom(*a1, a2[6]);
return result;
}
}
| |||
12,135 |
free_token
|
bluesky950520[P]quickjs/quickjs.c
|
static void free_token(JSParseState *s, JSToken *token)
{
switch(token->val) {
case TOK_NUMBER:
JS_FreeValue(s->ctx, token->u.num.val);
break;
case TOK_STRING:
case TOK_TEMPLATE:
JS_FreeValue(s->ctx, token->u.str.str);
break;
case TOK_REGEXP:
JS_FreeValue(s->ctx, token->u.regexp.body);
JS_FreeValue(s->ctx, token->u.regexp.flags);
break;
case TOK_IDENT:
case TOK_PRIVATE_NAME:
JS_FreeAtom(s->ctx, token->u.ident.atom);
break;
default:
if (token->val >= TOK_FIRST_KEYWORD &&
token->val <= TOK_LAST_KEYWORD) {
JS_FreeAtom(s->ctx, token->u.ident.atom);
}
break;
}
}
|
O2
|
c
|
free_token:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl (%rsi), %eax
leal 0x80(%rax), %ecx
cmpl $0x4, %ecx
ja 0x2da8f
leaq 0x5602f(%rip), %rax # 0x83aa8
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq (%r14), %rdi
movq 0x18(%rbx), %rsi
movq 0x20(%rbx), %rdx
jmp 0x2dac9
cmpl $-0x57, %eax
je 0x2da9c
addl $0x55, %eax
cmpl $0x2d, %eax
ja 0x2dad5
movq (%r14), %rdi
movl 0x18(%rbx), %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1a995
movq (%r14), %rdi
movq 0x18(%rbx), %rsi
movq 0x20(%rbx), %rdx
callq 0x1801e
movq (%r14), %rdi
movq 0x28(%rbx), %rsi
movq 0x30(%rbx), %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1801e
addq $0x8, %rsp
popq %rbx
popq %r14
retq
|
free_token:
push r14
push rbx
push rax
mov rbx, rsi
mov r14, rdi
mov eax, [rsi]
lea ecx, [rax+80h]; switch 5 cases
cmp ecx, 4
ja short def_2DA80; jumptable 000000000002DA80 default case
lea rax, jpt_2DA80
movsxd rcx, ds:(jpt_2DA80 - 83AA8h)[rax+rcx*4]
add rcx, rax
jmp rcx; switch jump
loc_2DA82:
mov rdi, [r14]; jumptable 000000000002DA80 cases -128--126
mov rsi, [rbx+18h]
mov rdx, [rbx+20h]
jmp short loc_2DAC9
def_2DA80:
cmp eax, 0FFFFFFA9h; jumptable 000000000002DA80 default case
jz short loc_2DA9C; jumptable 000000000002DA80 case -125
add eax, 55h ; 'U'
cmp eax, 2Dh ; '-'
ja short loc_2DAD5
loc_2DA9C:
mov rdi, [r14]; jumptable 000000000002DA80 case -125
mov esi, [rbx+18h]
add rsp, 8
pop rbx
pop r14
jmp JS_FreeAtom
loc_2DAAE:
mov rdi, [r14]; jumptable 000000000002DA80 case -124
mov rsi, [rbx+18h]
mov rdx, [rbx+20h]
call JS_FreeValue
mov rdi, [r14]
mov rsi, [rbx+28h]
mov rdx, [rbx+30h]
loc_2DAC9:
add rsp, 8
pop rbx
pop r14
jmp JS_FreeValue
loc_2DAD5:
add rsp, 8
pop rbx
pop r14
retn
|
long long free_token(long long *a1, int *a2)
{
int v2; // eax
long long result; // rax
v2 = *a2;
switch ( *a2 )
{
case -128:
case -127:
case -126:
result = JS_FreeValue(*a1, *((_QWORD *)a2 + 3), *((_QWORD *)a2 + 4));
break;
case -125:
goto LABEL_5;
case -124:
JS_FreeValue(*a1, *((_QWORD *)a2 + 3), *((_QWORD *)a2 + 4));
result = JS_FreeValue(*a1, *((_QWORD *)a2 + 5), *((_QWORD *)a2 + 6));
break;
default:
if ( v2 == -87 || (result = (unsigned int)(v2 + 85), (unsigned int)result <= 0x2D) )
LABEL_5:
result = JS_FreeAtom(*a1, a2[6]);
break;
}
return result;
}
|
free_token:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
MOV EAX,dword ptr [RSI]
LEA ECX,[RAX + 0x80]
CMP ECX,0x4
JA 0x0012da8f
LEA RAX,[0x183aa8]
MOVSXD RCX,dword ptr [RAX + RCX*0x4]
ADD RCX,RAX
switchD:
JMP RCX
caseD_ffffff80:
MOV RDI,qword ptr [R14]
MOV RSI,qword ptr [RBX + 0x18]
MOV RDX,qword ptr [RBX + 0x20]
JMP 0x0012dac9
default:
CMP EAX,-0x57
JZ 0x0012da9c
ADD EAX,0x55
CMP EAX,0x2d
JA 0x0012dad5
caseD_ffffff83:
MOV RDI,qword ptr [R14]
MOV ESI,dword ptr [RBX + 0x18]
ADD RSP,0x8
POP RBX
POP R14
JMP 0x0011a995
caseD_ffffff84:
MOV RDI,qword ptr [R14]
MOV RSI,qword ptr [RBX + 0x18]
MOV RDX,qword ptr [RBX + 0x20]
CALL 0x0011801e
MOV RDI,qword ptr [R14]
MOV RSI,qword ptr [RBX + 0x28]
MOV RDX,qword ptr [RBX + 0x30]
LAB_0012dac9:
ADD RSP,0x8
POP RBX
POP R14
JMP 0x0011801e
LAB_0012dad5:
ADD RSP,0x8
POP RBX
POP R14
RET
|
void free_token(int8 *param_1,int *param_2)
{
int iVar1;
int8 uVar2;
int8 uVar3;
int8 uVar4;
iVar1 = *param_2;
switch(iVar1) {
case -0x80:
case -0x7f:
case -0x7e:
uVar4 = *param_1;
uVar3 = *(int8 *)(param_2 + 6);
uVar2 = *(int8 *)(param_2 + 8);
break;
case -0x7c:
JS_FreeValue(*param_1,*(int8 *)(param_2 + 6),*(int8 *)(param_2 + 8));
uVar4 = *param_1;
uVar3 = *(int8 *)(param_2 + 10);
uVar2 = *(int8 *)(param_2 + 0xc);
break;
default:
if ((iVar1 != -0x57) && (0x2d < iVar1 + 0x55U)) {
return;
}
case -0x7d:
JS_FreeAtom(*param_1,param_2[6]);
return;
}
JS_FreeValue(uVar4,uVar3,uVar2);
return;
}
|
|
12,136 |
google::protobuf::internal::LazyDescriptor::Once(google::protobuf::ServiceDescriptor const*)
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
|
void LazyDescriptor::Once(const ServiceDescriptor* service) {
if (once_) {
internal::call_once(*once_, [&] {
auto* file = service->file();
GOOGLE_CHECK(file->finished_building_);
const char* lazy_name = reinterpret_cast<const char*>(once_ + 1);
descriptor_ =
file->pool_->CrossLinkOnDemandHelper(lazy_name, false).descriptor();
});
}
}
|
O3
|
cpp
|
google::protobuf::internal::LazyDescriptor::Once(google::protobuf::ServiceDescriptor const*):
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, (%rsp)
movq 0x8(%rdi), %r15
testq %r15, %r15
je 0x3aebf
movq %rsp, %rax
leaq 0x10(%rsp), %rcx
movq %rax, (%rcx)
movq %rdi, 0x8(%rcx)
leaq 0x8(%rsp), %r14
movq %rcx, (%r14)
movq %fs:0x0, %rax
addq 0xc70b7(%rip), %rax # 0x101f38
movq %rax, %rbx
movq %r14, (%rax)
movq %fs:0x0, %rax
addq 0xc70d1(%rip), %rax # 0x101f68
movq %rax, %r14
leaq 0x2bb5(%rip), %rax # 0x3da56
movq %rax, (%r14)
movq 0xc70f5(%rip), %rsi # 0x101fa0
movq %r15, %rdi
callq 0xf320
testl %eax, %eax
jne 0x3aec9
xorl %eax, %eax
movq %rax, (%rbx)
movq %rax, (%r14)
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movl %eax, %edi
callq 0xf240
xorl %ecx, %ecx
movq %rcx, (%rbx)
movq %rcx, (%r14)
movq %rax, %rdi
callq 0xf570
|
_ZN6google8protobuf8internal14LazyDescriptor4OnceEPKNS0_17ServiceDescriptorE:
push r15
push r14
push rbx
sub rsp, 20h
mov [rsp+38h+var_38], rsi
mov r15, [rdi+8]
test r15, r15
jz short loc_3AEBF
mov rax, rsp
lea rcx, [rsp+38h+var_28]
mov [rcx], rax
mov [rcx+8], rdi
lea r14, [rsp+38h+var_30]
mov [r14], rcx
mov rax, fs:0
add rax, cs:off_101F38
mov rbx, rax
mov [rax], r14
mov rax, fs:0
add rax, cs:off_101F68
mov r14, rax
lea rax, _ZZNSt9once_flag18_Prepare_executionC1IZSt9call_onceIZN6google8protobuf8internal14LazyDescriptor4OnceEPKNS4_17ServiceDescriptorEE3$_0JEEvRS_OT_DpOT0_EUlvE_EERSC_ENUlvE_8__invokeEv; std::once_flag::_Prepare_execution::_Prepare_execution<std::call_once<google::protobuf::internal::LazyDescriptor::Once(google::protobuf::ServiceDescriptor const*)::$_0>(std::once_flag&,google::protobuf::internal::LazyDescriptor::Once(google::protobuf::ServiceDescriptor const*)::$_0 &&)::{lambda(void)#1}>(google::protobuf::internal::LazyDescriptor::Once(google::protobuf::ServiceDescriptor const*)::$_0&)::{lambda(void)#1}::__invoke(void)
mov [r14], rax
mov rsi, cs:__once_proxy_ptr
mov rdi, r15
call _pthread_once
test eax, eax
jnz short loc_3AEC9
xor eax, eax
mov [rbx], rax
mov [r14], rax
loc_3AEBF:
add rsp, 20h
pop rbx
pop r14
pop r15
retn
loc_3AEC9:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
xor ecx, ecx
mov [rbx], rcx
mov [r14], rcx
mov rdi, rax
call __Unwind_Resume
|
void google::protobuf::internal::LazyDescriptor::Once(
google::protobuf::internal::LazyDescriptor *this,
const google::protobuf::ServiceDescriptor *a2,
long long a3,
long long a4,
long long a5,
long long a6)
{
long long v6; // r15
_QWORD *v7; // rbx
_QWORD *v8; // r14
int v9; // eax
const google::protobuf::ServiceDescriptor *v10; // [rsp+0h] [rbp-38h] BYREF
_QWORD *v11; // [rsp+8h] [rbp-30h] BYREF
_QWORD v12[5]; // [rsp+10h] [rbp-28h] BYREF
v10 = a2;
v6 = *((_QWORD *)this + 1);
if ( v6 )
{
v12[0] = &v10;
v12[1] = this;
v11 = v12;
v7 = (_QWORD *)((char *)&std::__once_callable + __readfsqword(0));
*v7 = &v11;
v8 = (_QWORD *)((char *)&std::__once_call + __readfsqword(0));
*v8 = std::once_flag::_Prepare_execution::_Prepare_execution<void std::call_once<google::protobuf::internal::LazyDescriptor::Once(google::protobuf::ServiceDescriptor const*)::$_0>(std::once_flag&,google::protobuf::internal::LazyDescriptor::Once(google::protobuf::ServiceDescriptor const*)::$_0 &&)::{lambda(void)#1}>(google::protobuf::internal::LazyDescriptor::Once(google::protobuf::ServiceDescriptor const*)::$_0&)::{lambda(void)#1}::__invoke;
v9 = ((long long ( *)(long long, void *, long long, _QWORD *, long long, long long, const google::protobuf::ServiceDescriptor *, _QWORD *))pthread_once)(
v6,
&_once_proxy,
a3,
v12,
a5,
a6,
v10,
v11);
if ( v9 )
std::__throw_system_error(v9);
*v7 = 0LL;
*v8 = 0LL;
}
}
|
Once:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x20
MOV qword ptr [RSP],RSI
MOV R15,qword ptr [RDI + 0x8]
TEST R15,R15
JZ 0x0013aebf
MOV RAX,RSP
LEA RCX,[RSP + 0x10]
MOV qword ptr [RCX],RAX
MOV qword ptr [RCX + 0x8],RDI
LEA R14,[RSP + 0x8]
MOV qword ptr [R14],RCX
MOV RAX,qword ptr FS:[0x0]
ADD RAX,qword ptr [0x00201f38]
MOV RBX,RAX
MOV qword ptr [RAX],R14
MOV RAX,qword ptr FS:[0x0]
ADD RAX,qword ptr [0x00201f68]
MOV R14,RAX
LEA RAX,[0x13da56]
MOV qword ptr [R14],RAX
LAB_0013aea4:
MOV RSI,qword ptr [0x00201fa0]
MOV RDI,R15
CALL 0x0010f320
TEST EAX,EAX
JNZ 0x0013aec9
XOR EAX,EAX
MOV qword ptr [RBX],RAX
MOV qword ptr [R14],RAX
LAB_0013aebf:
ADD RSP,0x20
POP RBX
POP R14
POP R15
RET
LAB_0013aec9:
MOV EDI,EAX
CALL 0x0010f240
|
/* google::protobuf::internal::LazyDescriptor::Once(google::protobuf::ServiceDescriptor const*) */
void __thiscall
google::protobuf::internal::LazyDescriptor::Once(LazyDescriptor *this,ServiceDescriptor *param_1)
{
pthread_once_t *__once_control;
int iVar1;
long *plVar2;
int8 *puVar3;
long *in_FS_OFFSET;
ServiceDescriptor *local_38;
int1 **local_30;
int1 *local_28;
LazyDescriptor *local_20;
local_28 = (int1 *)&local_38;
__once_control = *(pthread_once_t **)(this + 8);
if (__once_control != (pthread_once_t *)0x0) {
local_30 = &local_28;
plVar2 = (long *)(PTR_00201f38 + *in_FS_OFFSET);
*plVar2 = (long)&local_30;
puVar3 = (int8 *)(PTR_00201f68 + *in_FS_OFFSET);
*puVar3 = std::once_flag::_Prepare_execution::
_Prepare_execution<std::call_once<google::protobuf::internal::LazyDescriptor::Once(google::protobuf::ServiceDescriptor_const*)::$_0>(std::once_flag&,google::protobuf::internal::LazyDescriptor::Once(google::protobuf::ServiceDescriptor_const*)::$_0&&)::{lambda()#1}()#1}>(google::protobuf::internal::LazyDescriptor::Once(google::protobuf::ServiceDescriptor_const*)::$_0&)
::{lambda()#1}::__invoke;
local_38 = param_1;
local_20 = this;
/* try { // try from 0013aea4 to 0013aecf has its CatchHandler @ 0013aed0 */
iVar1 = pthread_once(__once_control,(__init_routine *)PTR___once_proxy_00201fa0);
if (iVar1 != 0) {
/* WARNING: Subroutine does not return */
std::__throw_system_error(iVar1);
}
*plVar2 = 0;
*puVar3 = 0;
}
return;
}
|
|
12,137 |
exit_status
|
eloqsql/libmariadb/unittest/mytap/tap.c
|
int exit_status() {
/*
If there were no plan, we write one last instead.
*/
if (g_test.plan == NO_PLAN)
plan(g_test.last);
if (g_test.plan != g_test.last)
{
diag("%d tests planned but%s %d executed",
g_test.plan, (g_test.plan > g_test.last ? " only" : ""), g_test.last);
return EXIT_FAILURE;
}
if (g_test.failed > 0)
{
diag("Failed %d tests!", g_test.failed);
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}
|
O3
|
c
|
exit_status:
pushq %rbp
movq %rsp, %rbp
movl 0x36e16(%rip), %esi # 0x51354
testl %esi, %esi
jne 0x1a553
movl 0x36e10(%rip), %edi # 0x51358
callq 0x1a013
movl 0x36e01(%rip), %esi # 0x51354
movl 0x36dff(%rip), %ecx # 0x51358
cmpl %ecx, %esi
jne 0x1a577
movl 0x36df9(%rip), %esi # 0x5135c
testl %esi, %esi
jle 0x1a59e
leaq 0x21556(%rip), %rdi # 0x3bac4
xorl %eax, %eax
callq 0x19f47
jmp 0x1a597
leaq 0x21540(%rip), %rax # 0x3babe
leaq 0x1f29d(%rip), %rdx # 0x39822
cmovgq %rax, %rdx
leaq 0x2150b(%rip), %rdi # 0x3ba9b
xorl %eax, %eax
callq 0x19f47
movl $0x1, %eax
popq %rbp
retq
xorl %eax, %eax
jmp 0x1a59c
|
exit_status:
push rbp
mov rbp, rsp
mov esi, cs:g_test
test esi, esi
jnz short loc_1A553
mov edi, cs:dword_51358
call plan
mov esi, cs:g_test
loc_1A553:
mov ecx, cs:dword_51358
cmp esi, ecx
jnz short loc_1A577
mov esi, cs:dword_5135C
test esi, esi
jle short loc_1A59E
lea rdi, aFailedDTests; "Failed %d tests!"
xor eax, eax
call diag
jmp short loc_1A597
loc_1A577:
lea rax, aOnly; " only"
lea rdx, aExecuteTestWit+29h; ""
cmovg rdx, rax
lea rdi, aDTestsPlannedB; "%d tests planned but%s %d executed"
xor eax, eax
call diag
loc_1A597:
mov eax, 1
loc_1A59C:
pop rbp
retn
loc_1A59E:
xor eax, eax
jmp short loc_1A59C
|
long long exit_status(
__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 v14; // rsi
char *v15; // rdx
char savedregs; // [rsp+0h] [rbp+0h]
v14 = (unsigned int)g_test;
if ( !g_test )
{
plan(dword_51358);
v14 = (unsigned int)g_test;
}
if ( (_DWORD)v14 != dword_51358 )
{
v15 = "";
if ( (int)v14 > dword_51358 )
v15 = " only";
diag(
(long long)"%d tests planned but%s %d executed",
v14,
(long long)v15,
(unsigned int)dword_51358,
a13,
a14,
a1,
a2,
a3,
a4,
a5,
a6,
a7,
a8,
savedregs);
return 1LL;
}
if ( dword_5135C > 0 )
{
diag(
(long long)"Failed %d tests!",
(unsigned int)dword_5135C,
a11,
(unsigned int)dword_51358,
a13,
a14,
a1,
a2,
a3,
a4,
a5,
a6,
a7,
a8,
savedregs);
return 1LL;
}
return 0LL;
}
|
exit_status:
PUSH RBP
MOV RBP,RSP
MOV ESI,dword ptr [0x00151354]
TEST ESI,ESI
JNZ 0x0011a553
MOV EDI,dword ptr [0x00151358]
CALL 0x0011a013
MOV ESI,dword ptr [0x00151354]
LAB_0011a553:
MOV ECX,dword ptr [0x00151358]
CMP ESI,ECX
JNZ 0x0011a577
MOV ESI,dword ptr [0x0015135c]
TEST ESI,ESI
JLE 0x0011a59e
LEA RDI,[0x13bac4]
XOR EAX,EAX
CALL 0x00119f47
JMP 0x0011a597
LAB_0011a577:
LEA RAX,[0x13babe]
LEA RDX,[0x139822]
CMOVG RDX,RAX
LEA RDI,[0x13ba9b]
XOR EAX,EAX
CALL 0x00119f47
LAB_0011a597:
MOV EAX,0x1
LAB_0011a59c:
POP RBP
RET
LAB_0011a59e:
XOR EAX,EAX
JMP 0x0011a59c
|
int8 exit_status(void)
{
char *pcVar1;
if (g_test == 0) {
plan(DAT_00151358);
}
if (g_test == DAT_00151358) {
if (DAT_0015135c < 1) {
return 0;
}
diag("Failed %d tests!");
}
else {
pcVar1 = "";
if (DAT_00151358 < g_test) {
pcVar1 = " only";
}
diag("%d tests planned but%s %d executed",g_test,pcVar1);
}
return 1;
}
|
|
12,138 |
UTF16ToUTF8[abi:cxx11](std::basic_string_view<char16_t, std::char_traits<char16_t>>)
|
Dolphin-anty/Source/Core/Common/StringUtil.cpp
|
std::string UTF16ToUTF8(std::u16string_view input)
{
std::wstring_convert<std::codecvt_utf8_utf16<char16_t>, char16_t> converter;
return converter.to_bytes(input.data(), input.data() + input.size());
}
|
O3
|
cpp
|
UTF16ToUTF8[abi:cxx11](std::basic_string_view<char16_t, std::char_traits<char16_t>>):
pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl $0x20, %edi
callq 0x7810
xorl %ecx, %ecx
movl %ecx, 0x8(%rax)
movq $0x10ffff, 0x10(%rax) # imm = 0x10FFFF
movl %ecx, 0x18(%rax)
leaq 0x3e9db(%rip), %rdx # 0x52900
movq %rdx, (%rax)
leaq 0x18(%rsp), %rdx
movq %rax, -0x18(%rdx)
movq %rdx, -0x10(%rdx)
movq %rcx, -0x8(%rdx)
movb $0x0, (%rdx)
leaq 0x38(%rsp), %rax
movq %rax, -0x10(%rax)
movq %rcx, -0x8(%rax)
movw %cx, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movw %cx, 0x20(%rax)
leaq (%r14,%r15,2), %rcx
movq %rsp, %r15
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x14914
movq %r15, %rdi
callq 0x14a06
movq %rbx, %rax
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
|
_Z11UTF16ToUTF8B5cxx11St17basic_string_viewIDsSt11char_traitsIDsEE:
push r15
push r14
push rbx
sub rsp, 60h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
mov edi, 20h ; ' '; unsigned __int64
call __Znwm; operator new(ulong)
xor ecx, ecx
mov [rax+8], ecx
mov qword ptr [rax+10h], 10FFFFh
mov [rax+18h], ecx
lea rdx, off_52900
mov [rax], rdx
lea rdx, [rsp+78h+var_60]
mov [rdx-18h], rax
mov [rdx-10h], rdx
mov [rdx-8], rcx
mov byte ptr [rdx], 0
lea rax, [rsp+78h+var_40]
mov [rax-10h], rax
mov [rax-8], rcx
mov [rax], cx
xorps xmm0, xmm0
movups xmmword ptr [rax+10h], xmm0
mov [rax+20h], cx
lea rcx, [r14+r15*2]
mov r15, rsp
mov rdi, rbx
mov rsi, r15
mov rdx, r14
call _ZNSt7__cxx1115wstring_convertISt18codecvt_utf8_utf16IDsLm1114111ELSt12codecvt_mode0EEDsSaIDsESaIcEE8to_bytesEPKDsS8_; std::wstring_convert<std::codecvt_utf8_utf16<char16_t,1114111ul,(std::codecvt_mode)0>,char16_t,std::allocator<char16_t>,std::allocator<char>>::to_bytes(char16_t const*,char16_t const*)
mov rdi, r15
call _ZNSt7__cxx1115wstring_convertISt18codecvt_utf8_utf16IDsLm1114111ELSt12codecvt_mode0EEDsSaIDsESaIcEED2Ev; std::wstring_convert<std::codecvt_utf8_utf16<char16_t,1114111ul,(std::codecvt_mode)0>,char16_t,std::allocator<char16_t>,std::allocator<char>>::~wstring_convert()
mov rax, rbx
add rsp, 60h
pop rbx
pop r14
pop r15
retn
|
long long UTF16ToUTF8[abi:cxx11](long long a1, long long a2, long long a3)
{
long long v4; // rax
_QWORD v6[3]; // [rsp+0h] [rbp-78h] BYREF
char v7; // [rsp+18h] [rbp-60h] BYREF
__int16 *v8; // [rsp+28h] [rbp-50h]
long long v9; // [rsp+30h] [rbp-48h]
__int16 v10; // [rsp+38h] [rbp-40h] BYREF
__int128 v11; // [rsp+48h] [rbp-30h]
__int16 v12; // [rsp+58h] [rbp-20h]
v4 = operator new(0x20uLL);
*(_DWORD *)(v4 + 8) = 0;
*(_QWORD *)(v4 + 16) = 1114111LL;
*(_DWORD *)(v4 + 24) = 0;
*(_QWORD *)v4 = &off_52900;
v6[0] = v4;
v6[1] = &v7;
v6[2] = 0LL;
v7 = 0;
v8 = &v10;
v9 = 0LL;
v10 = 0;
v11 = 0LL;
v12 = 0;
((void ( *)(long long, _QWORD *, long long, long long))std::wstring_convert<std::codecvt_utf8_utf16<char16_t,1114111ul,(std::codecvt_mode)0>,char16_t,std::allocator<char16_t>,std::allocator<char>>::to_bytes)(
a1,
v6,
a3,
a3 + 2 * a2);
std::wstring_convert<std::codecvt_utf8_utf16<char16_t,1114111ul,(std::codecvt_mode)0>,char16_t,std::allocator<char16_t>,std::allocator<char>>::~wstring_convert(v6);
return a1;
}
|
UTF16ToUTF8[abi:cxx11]:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x60
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
MOV EDI,0x20
CALL 0x00107810
XOR ECX,ECX
MOV dword ptr [RAX + 0x8],ECX
MOV qword ptr [RAX + 0x10],0x10ffff
MOV dword ptr [RAX + 0x18],ECX
LEA RDX,[0x152900]
MOV qword ptr [RAX],RDX
LEA RDX,[RSP + 0x18]
MOV qword ptr [RDX + -0x18],RAX
MOV qword ptr [RDX + -0x10],RDX
MOV qword ptr [RDX + -0x8],RCX
MOV byte ptr [RDX],0x0
LEA RAX,[RSP + 0x38]
MOV qword ptr [RAX + -0x10],RAX
MOV qword ptr [RAX + -0x8],RCX
MOV word ptr [RAX],CX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + 0x10],XMM0
MOV word ptr [RAX + 0x20],CX
LEA RCX,[R14 + R15*0x2]
MOV R15,RSP
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
CALL 0x00114914
MOV RDI,R15
CALL 0x00114a06
MOV RAX,RBX
ADD RSP,0x60
POP RBX
POP R14
POP R15
RET
|
/* UTF16ToUTF8[abi:cxx11](std::basic_string_view<char16_t, std::char_traits<char16_t> >) */
wchar16 * UTF16ToUTF8_abi_cxx11_(wchar16 *param_1)
{
int8 *local_78;
int1 *local_70;
int8 local_68;
int1 local_60 [16];
int2 *local_50;
int8 local_48;
int2 local_40 [8];
int8 local_30;
int8 uStack_28;
int2 local_20;
local_78 = (int8 *)operator_new(0x20);
*(int4 *)(local_78 + 1) = 0;
local_78[2] = 0x10ffff;
*(int4 *)(local_78 + 3) = 0;
*local_78 = &PTR____codecvt_utf8_utf16_base_00152900;
local_70 = local_60;
local_68 = 0;
local_60[0] = 0;
local_50 = local_40;
local_48 = 0;
local_40[0] = 0;
local_30 = 0;
uStack_28 = 0;
local_20 = 0;
std::__cxx11::
wstring_convert<std::codecvt_utf8_utf16<char16_t,1114111ul,(std::codecvt_mode)0>,char16_t,std::allocator<char16_t>,std::allocator<char>>
::to_bytes(param_1,(wchar16 *)&local_78);
std::__cxx11::
wstring_convert<std::codecvt_utf8_utf16<char16_t,1114111ul,(std::codecvt_mode)0>,char16_t,std::allocator<char16_t>,std::allocator<char>>
::~wstring_convert((wstring_convert<std::codecvt_utf8_utf16<char16_t,1114111ul,(std::codecvt_mode)0>,char16_t,std::allocator<char16_t>,std::allocator<char>>
*)&local_78);
return param_1;
}
|
|
12,139 |
get_model_or_exit(int, char**)
|
monkey531[P]llama/tests/get-model.cpp
|
char * get_model_or_exit(int argc, char *argv[]) {
char * model_path;
if (argc > 1) {
model_path = argv[1];
} else {
model_path = getenv("LLAMACPP_TEST_MODELFILE");
if (!model_path || strlen(model_path) == 0) {
fprintf(stderr, "\033[33mWARNING: No model file provided. Skipping this test. Set LLAMACPP_TEST_MODELFILE=<gguf_model_path> to silence this warning and run this test.\n\033[0m");
exit(EXIT_SUCCESS);
}
}
return model_path;
}
|
O1
|
cpp
|
get_model_or_exit(int, char**):
pushq %rax
cmpl $0x2, %edi
jl 0x3b844
movq 0x8(%rsi), %rax
jmp 0x3b85a
leaq 0x7e668(%rip), %rdi # 0xb9eb3
callq 0x19830
testq %rax, %rax
je 0x3b85c
cmpb $0x0, (%rax)
je 0x3b85c
popq %rcx
retq
callq 0x1b4ce
nopl (%rax)
|
_Z17get_model_or_exitiPPc:
push rax
cmp edi, 2
jl short loc_3B844
mov rax, [rsi+8]
jmp short loc_3B85A
loc_3B844:
lea rdi, aLlamacppTestMo; "LLAMACPP_TEST_MODELFILE"
call _getenv
test rax, rax
jz short loc_3B85C
cmp byte ptr [rax], 0
jz short loc_3B85C
loc_3B85A:
pop rcx
retn
loc_3B85C:
call _Z17get_model_or_exitiPPc_cold_1; get_model_or_exit(int,char **) [clone]
|
char * get_model_or_exit(int a1, char **a2)
{
char *result; // rax
if ( a1 >= 2 )
return a2[1];
result = (char *)getenv("LLAMACPP_TEST_MODELFILE", (const char *)a2);
if ( !result || !*result )
get_model_or_exit("LLAMACPP_TEST_MODELFILE");
return result;
}
|
get_model_or_exit:
PUSH RAX
CMP EDI,0x2
JL 0x0013b844
MOV RAX,qword ptr [RSI + 0x8]
JMP 0x0013b85a
LAB_0013b844:
LEA RDI,[0x1b9eb3]
CALL 0x00119830
TEST RAX,RAX
JZ 0x0013b85c
CMP byte ptr [RAX],0x0
JZ 0x0013b85c
LAB_0013b85a:
POP RCX
RET
LAB_0013b85c:
CALL 0x0011b4ce
NOP dword ptr [RAX]
|
/* get_model_or_exit(int, char**) */
char * get_model_or_exit(int param_1,char **param_2)
{
char *pcVar1;
char *pcVar2;
char **ppcStack_30;
int8 uStack_28;
code *pcStack_20;
code *pcStack_18;
if (param_1 < 2) {
pcVar2 = "LLAMACPP_TEST_MODELFILE";
pcVar1 = getenv("LLAMACPP_TEST_MODELFILE");
if ((pcVar1 == (char *)0x0) || (*pcVar1 == '\0')) {
get_model_or_exit((int)pcVar2,param_2);
uStack_28 = 0;
pcStack_18 = std::
_Function_handler<void(common_grammar_builder_const&),json_schema_to_grammar(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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&,bool)::$_0>
::_M_invoke;
pcStack_20 = std::
_Function_handler<void(common_grammar_builder_const&),json_schema_to_grammar(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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&,bool)::$_0>
::_M_manager;
ppcStack_30 = param_2;
build_grammar_abi_cxx11_(pcVar2,(common_grammar_options *)&ppcStack_30);
if (pcStack_20 != (code *)0x0) {
(*pcStack_20)(&ppcStack_30,&ppcStack_30,3);
}
return pcVar2;
}
}
else {
pcVar1 = param_2[1];
}
return pcVar1;
}
|
|
12,140 |
js_proxy_revoke
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_proxy_revoke(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv, int magic,
JSValue *func_data)
{
JSProxyData *s = JS_GetOpaque(func_data[0], JS_CLASS_PROXY);
if (s) {
/* We do not free the handler and target in case they are
referenced as constants in the C call stack */
s->is_revoked = TRUE;
JS_FreeValue(ctx, func_data[0]);
func_data[0] = JS_NULL;
}
return JS_UNDEFINED;
}
|
O2
|
c
|
js_proxy_revoke:
pushq %rbx
movq 0x10(%rsp), %rbx
cmpl $-0x1, 0x8(%rbx)
jne 0x446ba
movq (%rbx), %rax
cmpw $0x30, 0x6(%rax)
jne 0x446ba
movq 0x30(%rax), %rax
testq %rax, %rax
je 0x446ba
movb $0x1, 0x21(%rax)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
callq 0x1801e
andl $0x0, (%rbx)
movq $0x2, 0x8(%rbx)
pushq $0x3
popq %rdx
xorl %eax, %eax
popq %rbx
retq
|
js_proxy_revoke:
push rbx
mov rbx, [rsp+8+arg_0]
cmp dword ptr [rbx+8], 0FFFFFFFFh
jnz short loc_446BA
mov rax, [rbx]
cmp word ptr [rax+6], 30h ; '0'
jnz short loc_446BA
mov rax, [rax+30h]
test rax, rax
jz short loc_446BA
mov byte ptr [rax+21h], 1
mov rsi, [rbx]
mov rdx, [rbx+8]
call JS_FreeValue
and dword ptr [rbx], 0
mov qword ptr [rbx+8], 2
loc_446BA:
push 3
pop rdx
xor eax, eax
pop rbx
retn
|
long long js_proxy_revoke(long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, long long *a7)
{
long long v7; // rax
if ( *((_DWORD *)a7 + 2) == -1 && *(_WORD *)(*a7 + 6) == 48 )
{
v7 = *(_QWORD *)(*a7 + 48);
if ( v7 )
{
*(_BYTE *)(v7 + 33) = 1;
JS_FreeValue(a1, *a7, a7[1]);
*(_DWORD *)a7 = 0;
a7[1] = 2LL;
}
}
return 0LL;
}
|
js_proxy_revoke:
PUSH RBX
MOV RBX,qword ptr [RSP + 0x10]
CMP dword ptr [RBX + 0x8],-0x1
JNZ 0x001446ba
MOV RAX,qword ptr [RBX]
CMP word ptr [RAX + 0x6],0x30
JNZ 0x001446ba
MOV RAX,qword ptr [RAX + 0x30]
TEST RAX,RAX
JZ 0x001446ba
MOV byte ptr [RAX + 0x21],0x1
MOV RSI,qword ptr [RBX]
MOV RDX,qword ptr [RBX + 0x8]
CALL 0x0011801e
AND dword ptr [RBX],0x0
MOV qword ptr [RBX + 0x8],0x2
LAB_001446ba:
PUSH 0x3
POP RDX
XOR EAX,EAX
POP RBX
RET
|
int1 [16] js_proxy_revoke(int8 param_1)
{
long lVar1;
long *in_stack_00000008;
if ((((int)in_stack_00000008[1] == -1) && (*(short *)(*in_stack_00000008 + 6) == 0x30)) &&
(lVar1 = *(long *)(*in_stack_00000008 + 0x30), lVar1 != 0)) {
*(int1 *)(lVar1 + 0x21) = 1;
JS_FreeValue(param_1,*in_stack_00000008,in_stack_00000008[1]);
*(int4 *)in_stack_00000008 = 0;
in_stack_00000008[1] = 2;
}
return ZEXT816(3) << 0x40;
}
|
|
12,141 |
my_strntoull10rnd_mb2_or_mb4
|
eloqsql/strings/ctype-ucs2.c
|
static ulonglong
my_strntoull10rnd_mb2_or_mb4(CHARSET_INFO *cs,
const char *nptr, size_t length,
int unsign_fl,
char **endptr, int *err)
{
char buf[256], *b= buf;
ulonglong res;
const uchar *end, *s= (const uchar*) nptr;
my_wc_t wc;
my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc;
int cnv;
/* Cut too long strings */
if (length >= sizeof(buf))
length= sizeof(buf)-1;
end= s + length;
while ((cnv= mb_wc(cs, &wc, s, end)) > 0)
{
s+= cnv;
if (wc > (int) (uchar) 'e' || !wc)
break; /* Can't be a number part */
*b++= (char) wc;
}
res= my_strntoull10rnd_8bit(cs, buf, b - buf, unsign_fl, endptr, err);
*endptr= (char*) nptr + cs->mbminlen * (size_t) (*endptr - buf);
return res;
}
|
O0
|
c
|
my_strntoull10rnd_mb2_or_mb4:
pushq %rbp
movq %rsp, %rbp
subq $0x190, %rsp # imm = 0x190
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x118(%rbp)
movq %rsi, -0x120(%rbp)
movq %rdx, -0x128(%rbp)
movl %ecx, -0x12c(%rbp)
movq %r8, -0x138(%rbp)
movq %r9, -0x140(%rbp)
leaq -0x110(%rbp), %rax
movq %rax, -0x148(%rbp)
movq -0x120(%rbp), %rax
movq %rax, -0x160(%rbp)
movq -0x118(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x170(%rbp)
cmpq $0x100, -0x128(%rbp) # imm = 0x100
jb 0x636ee
movq $0xff, -0x128(%rbp)
movq -0x160(%rbp), %rax
addq -0x128(%rbp), %rax
movq %rax, -0x158(%rbp)
movq -0x170(%rbp), %rax
movq -0x118(%rbp), %rdi
movq -0x160(%rbp), %rdx
movq -0x158(%rbp), %rcx
leaq -0x168(%rbp), %rsi
callq *%rax
movl %eax, -0x174(%rbp)
cmpl $0x0, %eax
jle 0x63788
movl -0x174(%rbp), %ecx
movq -0x160(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x160(%rbp)
cmpq $0x65, -0x168(%rbp)
ja 0x63761
cmpq $0x0, -0x168(%rbp)
jne 0x63763
jmp 0x63788
movq -0x168(%rbp), %rax
movb %al, %cl
movq -0x148(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x148(%rbp)
movb %cl, (%rax)
jmp 0x63703
movq -0x118(%rbp), %rdi
movq -0x148(%rbp), %rdx
leaq -0x110(%rbp), %rsi
movq %rsi, -0x188(%rbp)
subq %rsi, %rdx
movl -0x12c(%rbp), %ecx
movq -0x138(%rbp), %r8
movq -0x140(%rbp), %r9
callq 0x4e000
movq -0x188(%rbp), %rdi
movq %rax, -0x150(%rbp)
movq -0x120(%rbp), %rcx
movq -0x118(%rbp), %rax
movl 0x98(%rax), %eax
movl %eax, %edx
movq -0x138(%rbp), %rax
movq (%rax), %rsi
subq %rdi, %rsi
imulq %rsi, %rdx
addq %rdx, %rcx
movq %rcx, (%rax)
movq -0x150(%rbp), %rax
movq %rax, -0x180(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x6382b
movq -0x180(%rbp), %rax
addq $0x190, %rsp # imm = 0x190
popq %rbp
retq
callq 0x25330
|
my_strntoull10rnd_mb2_or_mb4:
push rbp
mov rbp, rsp
sub rsp, 190h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_118], rdi
mov [rbp+var_120], rsi
mov [rbp+var_128], rdx
mov [rbp+var_12C], ecx
mov [rbp+var_138], r8
mov [rbp+var_140], r9
lea rax, [rbp+var_110]
mov [rbp+var_148], rax
mov rax, [rbp+var_120]
mov [rbp+var_160], rax
mov rax, [rbp+var_118]
mov rax, [rax+0B8h]
mov rax, [rax+28h]
mov [rbp+var_170], rax
cmp [rbp+var_128], 100h
jb short loc_636EE
mov [rbp+var_128], 0FFh
loc_636EE:
mov rax, [rbp+var_160]
add rax, [rbp+var_128]
mov [rbp+var_158], rax
loc_63703:
mov rax, [rbp+var_170]
mov rdi, [rbp+var_118]
mov rdx, [rbp+var_160]
mov rcx, [rbp+var_158]
lea rsi, [rbp+var_168]
call rax
mov [rbp+var_174], eax
cmp eax, 0
jle short loc_63788
mov ecx, [rbp+var_174]
mov rax, [rbp+var_160]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_160], rax
cmp [rbp+var_168], 65h ; 'e'
ja short loc_63761
cmp [rbp+var_168], 0
jnz short loc_63763
loc_63761:
jmp short loc_63788
loc_63763:
mov rax, [rbp+var_168]
mov cl, al
mov rax, [rbp+var_148]
mov rdx, rax
add rdx, 1
mov [rbp+var_148], rdx
mov [rax], cl
jmp loc_63703
loc_63788:
mov rdi, [rbp+var_118]
mov rdx, [rbp+var_148]
lea rsi, [rbp+var_110]
mov [rbp+var_188], rsi
sub rdx, rsi
mov ecx, [rbp+var_12C]
mov r8, [rbp+var_138]
mov r9, [rbp+var_140]
call my_strntoull10rnd_8bit
mov rdi, [rbp+var_188]
mov [rbp+var_150], rax
mov rcx, [rbp+var_120]
mov rax, [rbp+var_118]
mov eax, [rax+98h]
mov edx, eax
mov rax, [rbp+var_138]
mov rsi, [rax]
sub rsi, rdi
imul rdx, rsi
add rcx, rdx
mov [rax], rcx
mov rax, [rbp+var_150]
mov [rbp+var_180], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_6382B
mov rax, [rbp+var_180]
add rsp, 190h
pop rbp
retn
loc_6382B:
call ___stack_chk_fail
|
long long my_strntoull10rnd_mb2_or_mb4(
long long a1,
long long a2,
unsigned long long a3,
int a4,
_QWORD *a5,
int *a6)
{
_BYTE *v6; // rax
int v8; // [rsp+1Ch] [rbp-174h]
long long ( *v9)(long long, unsigned long long *, long long, long long); // [rsp+20h] [rbp-170h]
unsigned long long v10; // [rsp+28h] [rbp-168h] BYREF
long long v11; // [rsp+30h] [rbp-160h]
long long v12; // [rsp+38h] [rbp-158h]
long long v13; // [rsp+40h] [rbp-150h]
_BYTE *v14; // [rsp+48h] [rbp-148h]
int *v15; // [rsp+50h] [rbp-140h]
_QWORD *v16; // [rsp+58h] [rbp-138h]
int v17; // [rsp+64h] [rbp-12Ch]
long long v18; // [rsp+68h] [rbp-128h]
long long v19; // [rsp+70h] [rbp-120h]
long long v20; // [rsp+78h] [rbp-118h]
_BYTE v21[264]; // [rsp+80h] [rbp-110h] BYREF
unsigned long long v22; // [rsp+188h] [rbp-8h]
v22 = __readfsqword(0x28u);
v20 = a1;
v19 = a2;
v18 = a3;
v17 = a4;
v16 = a5;
v15 = a6;
v14 = v21;
v11 = a2;
v9 = *(long long ( **)(long long, unsigned long long *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL);
if ( a3 >= 0x100 )
v18 = 255LL;
v12 = v18 + v11;
while ( 1 )
{
v8 = v9(v20, &v10, v11, v12);
if ( v8 <= 0 )
break;
v11 += v8;
if ( v10 > 0x65 || !v10 )
break;
v6 = v14++;
*v6 = v10;
}
v13 = my_strntoull10rnd_8bit(v20, v21, v14 - v21, v17, v16, v15);
*v16 = (*v16 - (_QWORD)v21) * *(unsigned int *)(v20 + 152) + v19;
return v13;
}
|
my_strntoull10rnd_mb2_or_mb4:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x190
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x118],RDI
MOV qword ptr [RBP + -0x120],RSI
MOV qword ptr [RBP + -0x128],RDX
MOV dword ptr [RBP + -0x12c],ECX
MOV qword ptr [RBP + -0x138],R8
MOV qword ptr [RBP + -0x140],R9
LEA RAX,[RBP + -0x110]
MOV qword ptr [RBP + -0x148],RAX
MOV RAX,qword ptr [RBP + -0x120]
MOV qword ptr [RBP + -0x160],RAX
MOV RAX,qword ptr [RBP + -0x118]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x170],RAX
CMP qword ptr [RBP + -0x128],0x100
JC 0x001636ee
MOV qword ptr [RBP + -0x128],0xff
LAB_001636ee:
MOV RAX,qword ptr [RBP + -0x160]
ADD RAX,qword ptr [RBP + -0x128]
MOV qword ptr [RBP + -0x158],RAX
LAB_00163703:
MOV RAX,qword ptr [RBP + -0x170]
MOV RDI,qword ptr [RBP + -0x118]
MOV RDX,qword ptr [RBP + -0x160]
MOV RCX,qword ptr [RBP + -0x158]
LEA RSI,[RBP + -0x168]
CALL RAX
MOV dword ptr [RBP + -0x174],EAX
CMP EAX,0x0
JLE 0x00163788
MOV ECX,dword ptr [RBP + -0x174]
MOV RAX,qword ptr [RBP + -0x160]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x160],RAX
CMP qword ptr [RBP + -0x168],0x65
JA 0x00163761
CMP qword ptr [RBP + -0x168],0x0
JNZ 0x00163763
LAB_00163761:
JMP 0x00163788
LAB_00163763:
MOV RAX,qword ptr [RBP + -0x168]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x148]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x148],RDX
MOV byte ptr [RAX],CL
JMP 0x00163703
LAB_00163788:
MOV RDI,qword ptr [RBP + -0x118]
MOV RDX,qword ptr [RBP + -0x148]
LEA RSI,[RBP + -0x110]
MOV qword ptr [RBP + -0x188],RSI
SUB RDX,RSI
MOV ECX,dword ptr [RBP + -0x12c]
MOV R8,qword ptr [RBP + -0x138]
MOV R9,qword ptr [RBP + -0x140]
CALL 0x0014e000
MOV RDI,qword ptr [RBP + -0x188]
MOV qword ptr [RBP + -0x150],RAX
MOV RCX,qword ptr [RBP + -0x120]
MOV RAX,qword ptr [RBP + -0x118]
MOV EAX,dword ptr [RAX + 0x98]
MOV EDX,EAX
MOV RAX,qword ptr [RBP + -0x138]
MOV RSI,qword ptr [RAX]
SUB RSI,RDI
IMUL RDX,RSI
ADD RCX,RDX
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x150]
MOV qword ptr [RBP + -0x180],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0016382b
MOV RAX,qword ptr [RBP + -0x180]
ADD RSP,0x190
POP RBP
RET
LAB_0016382b:
CALL 0x00125330
|
int8
my_strntoull10rnd_mb2_or_mb4
(long param_1,long param_2,ulong param_3,int4 param_4,long *param_5,
int8 param_6)
{
code *pcVar1;
int iVar2;
long in_FS_OFFSET;
ulong local_170;
long local_168;
long local_160;
int8 local_158;
int1 *local_150;
int8 local_148;
long *local_140;
int4 local_134;
ulong local_130;
long local_128;
long local_120;
int1 local_118 [264];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28);
local_130 = param_3;
if (0xff < param_3) {
local_130 = 0xff;
}
local_160 = param_2 + local_130;
local_168 = param_2;
local_150 = local_118;
local_148 = param_6;
local_140 = param_5;
local_134 = param_4;
local_128 = param_2;
local_120 = param_1;
while (((iVar2 = (*pcVar1)(local_120,&local_170,local_168,local_160), 0 < iVar2 &&
(local_168 = local_168 + iVar2, local_170 < 0x66)) && (local_170 != 0))) {
*local_150 = (char)local_170;
local_150 = local_150 + 1;
}
local_158 = my_strntoull10rnd_8bit
(local_120,local_118,(long)local_150 - (long)local_118,local_134,local_140,
local_148);
*local_140 = local_128 + (ulong)*(uint *)(local_120 + 0x98) * (*local_140 - (long)local_118);
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_158;
}
|
|
12,142 |
ftxui::separatorEmpty()
|
Andrewchistyakov[P]flashcards_lyc/build_O2/_deps/ftxui-src/src/ftxui/dom/separator.cpp
|
Element separatorEmpty() {
return std::make_shared<SeparatorAuto>(EMPTY);
}
|
O2
|
cpp
|
ftxui::separatorEmpty():
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0xc(%rsp), %rsi
movl $0x5, (%rsi)
leaq 0x10(%rsp), %rdi
callq 0x1f1a9
leaq 0x18(%rsp), %rdi
movaps -0x8(%rdi), %xmm0
andq $0x0, (%rdi)
movups %xmm0, (%rbx)
andq $0x0, -0x8(%rdi)
callq 0x13452
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
retq
|
_ZN5ftxui14separatorEmptyEv:
push rbx
sub rsp, 20h
mov rbx, rdi
lea rsi, [rsp+28h+var_1C]
mov dword ptr [rsi], 5
lea rdi, [rsp+28h+var_18]
call _ZSt11make_sharedIN5ftxui12_GLOBAL__N_113SeparatorAutoEJNS0_11BorderStyleEEESt10shared_ptrIT_EDpOT0_; std::make_shared<ftxui::`anonymous namespace'::SeparatorAuto,ftxui::BorderStyle>(ftxui::BorderStyle &&)
lea rdi, [rsp+28h+var_10]
movaps xmm0, xmmword ptr [rdi-8]
and qword ptr [rdi], 0
movups xmmword ptr [rbx], xmm0
and qword ptr [rdi-8], 0
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rax, rbx
add rsp, 20h
pop rbx
retn
|
ftxui * ftxui::separatorEmpty(ftxui *this)
{
__int128 v1; // xmm0
unsigned int v3; // [rsp+Ch] [rbp-1Ch] BYREF
__int128 v4; // [rsp+10h] [rbp-18h] BYREF
v3 = 5;
std::make_shared<ftxui::`anonymous namespace'::SeparatorAuto,ftxui::BorderStyle>(&v4, &v3);
v1 = v4;
*((_QWORD *)&v4 + 1) = 0LL;
*(_OWORD *)this = v1;
*(_QWORD *)&v4 = 0LL;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)&v4 + 1);
return this;
}
|
separatorEmpty:
PUSH RBX
SUB RSP,0x20
MOV RBX,RDI
LEA RSI,[RSP + 0xc]
MOV dword ptr [RSI],0x5
LEA RDI,[RSP + 0x10]
CALL 0x0011f1a9
LEA RDI,[RSP + 0x18]
MOVAPS XMM0,xmmword ptr [RDI + -0x8]
AND qword ptr [RDI],0x0
MOVUPS xmmword ptr [RBX],XMM0
AND qword ptr [RDI + -0x8],0x0
CALL 0x00113452
MOV RAX,RBX
ADD RSP,0x20
POP RBX
RET
|
/* ftxui::separatorEmpty() */
ftxui * __thiscall ftxui::separatorEmpty(ftxui *this)
{
int8 uVar1;
int8 local_18;
int8 uStack_10;
std::make_shared<ftxui::(anonymous_namespace)::SeparatorAuto,ftxui::BorderStyle>
((BorderStyle *)&local_18);
uVar1 = uStack_10;
uStack_10 = 0;
*(int8 *)this = local_18;
*(int8 *)(this + 8) = uVar1;
local_18 = 0;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_10);
return this;
}
|
|
12,143 |
common_log_entry::print(_IO_FILE*) const
|
monkey531[P]llama/common/log.cpp
|
void print(FILE * file = nullptr) const {
FILE * fcur = file;
if (!fcur) {
// stderr displays DBG messages only when their verbosity level is not higher than the threshold
// these messages will still be logged to a file
if (level == GGML_LOG_LEVEL_DEBUG && common_log_verbosity_thold < LOG_DEFAULT_DEBUG) {
return;
}
fcur = stdout;
if (level != GGML_LOG_LEVEL_NONE) {
fcur = stderr;
}
}
if (level != GGML_LOG_LEVEL_NONE && level != GGML_LOG_LEVEL_CONT && prefix) {
if (timestamp) {
// [M.s.ms.us]
fprintf(fcur, "%s%d.%02d.%03d.%03d%s ",
g_col[COMMON_LOG_COL_BLUE],
(int) (timestamp / 1000000 / 60),
(int) (timestamp / 1000000 % 60),
(int) (timestamp / 1000 % 1000),
(int) (timestamp % 1000),
g_col[COMMON_LOG_COL_DEFAULT]);
}
switch (level) {
case GGML_LOG_LEVEL_INFO: fprintf(fcur, "%sI %s", g_col[COMMON_LOG_COL_GREEN], g_col[COMMON_LOG_COL_DEFAULT]); break;
case GGML_LOG_LEVEL_WARN: fprintf(fcur, "%sW %s", g_col[COMMON_LOG_COL_MAGENTA], "" ); break;
case GGML_LOG_LEVEL_ERROR: fprintf(fcur, "%sE %s", g_col[COMMON_LOG_COL_RED], "" ); break;
case GGML_LOG_LEVEL_DEBUG: fprintf(fcur, "%sD %s", g_col[COMMON_LOG_COL_YELLOW], "" ); break;
default:
break;
}
}
fprintf(fcur, "%s", msg.data());
if (level == GGML_LOG_LEVEL_WARN || level == GGML_LOG_LEVEL_ERROR || level == GGML_LOG_LEVEL_DEBUG) {
fprintf(fcur, "%s", g_col[COMMON_LOG_COL_DEFAULT]);
}
fflush(fcur);
}
|
O2
|
cpp
|
common_log_entry::print(_IO_FILE*) const:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl (%rdi), %eax
testq %rsi, %rsi
jne 0x98361
cmpl $0x1, %eax
jne 0x9834a
leaq 0x680fb(%rip), %rcx # 0x100438
cmpl $0x0, (%rcx)
jg 0x9834a
addq $0x8, %rsp
popq %rbx
popq %r14
retq
testl %eax, %eax
jne 0x98357
movq 0x66bb3(%rip), %rcx # 0xfef08
jmp 0x9835e
movq 0x66c1a(%rip), %rcx # 0xfef78
movq (%rcx), %r14
testl %eax, %eax
je 0x98479
cmpl $0x5, %eax
je 0x98479
cmpb $0x1, 0x4(%rbx)
jne 0x98479
movq 0x8(%rbx), %rsi
testq %rsi, %rsi
je 0x98400
movq 0x680b4(%rip), %rax # 0x100440
movq (%rax), %r11
movq 0x28(%rax), %rcx
movl $0xf4240, %edi # imm = 0xF4240
movq %rsi, %rax
cqto
idivq %rdi
movq %rax, %rdi
movl $0x3938700, %r8d # imm = 0x3938700
movq %rsi, %rax
cqto
idivq %r8
movq %rax, %r8
pushq $0x3c
popq %r9
movq %rdi, %rax
cqto
idivq %r9
movq %rdx, %r9
movl $0x3e8, %edi # imm = 0x3E8
movq %rsi, %rax
cqto
idivq %rdi
movq %rdx, %r10
cqto
idivq %rdi
movq %rdx, %rax
leaq 0x21cfe(%rip), %rsi # 0xba0e0
movq %r14, %rdi
movq %rcx, %rdx
movl %r8d, %ecx
movl %r9d, %r8d
movl %eax, %r9d
xorl %eax, %eax
pushq %r11
pushq %r10
callq 0x23ca0
popq %rcx
popq %rdx
movl (%rbx), %eax
decl %eax
cmpl $0x3, %eax
ja 0x98479
leaq 0x21cc2(%rip), %rcx # 0xba0d0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x68022(%rip), %rax # 0x100440
movq 0x20(%rax), %rdx
leaq 0x21ce3(%rip), %rsi # 0xba10c
jmp 0x98451
movq 0x6800e(%rip), %rax # 0x100440
movq 0x30(%rax), %rdx
leaq 0x21cc1(%rip), %rsi # 0xba0fe
jmp 0x98451
movq 0x67ffa(%rip), %rax # 0x100440
movq 0x10(%rax), %rdx
leaq 0x21cb4(%rip), %rsi # 0xba105
leaq 0x18797(%rip), %rcx # 0xb0bef
jmp 0x9846f
movq 0x67fdf(%rip), %rax # 0x100440
movq (%rax), %rcx
movq 0x18(%rax), %rdx
leaq 0x21c88(%rip), %rsi # 0xba0f7
movq %r14, %rdi
xorl %eax, %eax
callq 0x23ca0
movq 0x10(%rbx), %rdi
movq %r14, %rsi
callq 0x239e0
movl (%rbx), %eax
cmpl $0x4, %eax
ja 0x984a6
pushq $0x1a
popq %rcx
btl %eax, %ecx
jae 0x984a6
movq 0x67fa5(%rip), %rax # 0x100440
movq (%rax), %rdi
movq %r14, %rsi
callq 0x239e0
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x23a40
nop
|
_ZNK16common_log_entry5printEP8_IO_FILE:
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
mov eax, [rdi]
test rsi, rsi
jnz short loc_98361
cmp eax, 1
jnz short loc_9834A
lea rcx, common_log_verbosity_thold
cmp dword ptr [rcx], 0
jg short loc_9834A
add rsp, 8
pop rbx
pop r14
retn
loc_9834A:
test eax, eax
jnz short loc_98357
mov rcx, cs:stdout_ptr
jmp short loc_9835E
loc_98357:
mov rcx, cs:stderr_ptr
loc_9835E:
mov r14, [rcx]
loc_98361:
test eax, eax
jz def_98415; jumptable 0000000000098415 default case
cmp eax, 5
jz def_98415; jumptable 0000000000098415 default case
cmp byte ptr [rbx+4], 1
jnz def_98415; jumptable 0000000000098415 default case
mov rsi, [rbx+8]
test rsi, rsi
jz short loc_98400
mov rax, cs:_ZL5g_col; g_col
mov r11, [rax]
mov rcx, [rax+28h]
mov edi, offset unk_F4240
mov rax, rsi
cqo
idiv rdi
mov rdi, rax
mov r8d, 3938700h
mov rax, rsi
cqo
idiv r8
mov r8, rax
push 3Ch ; '<'
pop r9
mov rax, rdi
cqo
idiv r9
mov r9, rdx
mov edi, 3E8h
mov rax, rsi
cqo
idiv rdi
mov r10, rdx
cqo
idiv rdi
mov rax, rdx
lea rsi, aSD02d03d03dS; "%s%d.%02d.%03d.%03d%s "
mov rdi, r14
mov rdx, rcx
mov ecx, r8d
mov r8d, r9d
mov r9d, eax
xor eax, eax
push r11
push r10
call _fprintf
pop rcx
pop rdx
mov eax, [rbx]
loc_98400:
dec eax; switch 4 cases
cmp eax, 3
ja short def_98415; jumptable 0000000000098415 default case
lea rcx, jpt_98415
movsxd rax, ds:(jpt_98415 - 0BA0D0h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_98417:
mov rax, cs:_ZL5g_col; jumptable 0000000000098415 case 1
mov rdx, [rax+20h]
lea rsi, aSdS; "%sD %s"
jmp short loc_98451
loc_9842B:
mov rax, cs:_ZL5g_col; jumptable 0000000000098415 case 3
mov rdx, [rax+30h]
lea rsi, aSwS; "%sW %s"
jmp short loc_98451
loc_9843F:
mov rax, cs:_ZL5g_col; jumptable 0000000000098415 case 4
mov rdx, [rax+10h]
lea rsi, aSeS; "%sE %s"
loc_98451:
lea rcx, aErrorWhileHand_0+34h; ""
jmp short loc_9846F
loc_9845A:
mov rax, cs:_ZL5g_col; jumptable 0000000000098415 case 2
mov rcx, [rax]
mov rdx, [rax+18h]
lea rsi, aSiS; "%sI %s"
loc_9846F:
mov rdi, r14
xor eax, eax
call _fprintf
def_98415:
mov rdi, [rbx+10h]; jumptable 0000000000098415 default case
mov rsi, r14
call _fputs
mov eax, [rbx]
cmp eax, 4
ja short loc_984A6
push 1Ah
pop rcx
bt ecx, eax
jnb short loc_984A6
mov rax, cs:_ZL5g_col; g_col
mov rdi, [rax]
mov rsi, r14
call _fputs
loc_984A6:
mov rdi, r14
add rsp, 8
pop rbx
pop r14
jmp _fflush
|
long long common_log_entry::print(unsigned int *a1, long long a2)
{
long long v2; // r14
long long result; // rax
long long *v4; // rcx
long long v5; // rsi
long long v6; // rdx
const char *v7; // rsi
char *v8; // rcx
int v9; // ecx
v2 = a2;
result = *a1;
if ( !a2 )
{
if ( (_DWORD)result == 1 && common_log_verbosity_thold[0] <= 0 )
return result;
if ( (_DWORD)result )
v4 = (long long *)&stderr;
else
v4 = (long long *)&stdout;
v2 = *v4;
}
if ( (_DWORD)result && (_DWORD)result != 5 && *((_BYTE *)a1 + 4) == 1 )
{
v5 = *((_QWORD *)a1 + 1);
if ( v5 )
{
fprintf(
v2,
"%s%d.%02d.%03d.%03d%s ",
*(const char **)(g_col + 40),
v5 / 60000000,
v5 / (long long)&unk_F4240 % 60,
v5 / 1000 % 1000,
v5 % 1000,
*(const char **)g_col);
LODWORD(result) = *a1;
}
switch ( (int)result )
{
case 1:
v6 = *(_QWORD *)(g_col + 32);
v7 = "%sD %s";
goto LABEL_17;
case 2:
v8 = *(char **)g_col;
v6 = *(_QWORD *)(g_col + 24);
v7 = "%sI %s";
goto LABEL_19;
case 3:
v6 = *(_QWORD *)(g_col + 48);
v7 = "%sW %s";
goto LABEL_17;
case 4:
v6 = *(_QWORD *)(g_col + 16);
v7 = "%sE %s";
LABEL_17:
v8 = "";
LABEL_19:
fprintf(v2, v7, v6, v8);
break;
default:
break;
}
}
fputs(*((_QWORD *)a1 + 2), v2);
if ( *a1 <= 4 )
{
v9 = 26;
if ( _bittest(&v9, *a1) )
fputs(*(_QWORD *)g_col, v2);
}
return fflush(v2);
}
|
print:
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
MOV EAX,dword ptr [RDI]
TEST RSI,RSI
JNZ 0x00198361
CMP EAX,0x1
JNZ 0x0019834a
LEA RCX,[0x200438]
CMP dword ptr [RCX],0x0
JG 0x0019834a
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_0019834a:
TEST EAX,EAX
JNZ 0x00198357
MOV RCX,qword ptr [0x001fef08]
JMP 0x0019835e
LAB_00198357:
MOV RCX,qword ptr [0x001fef78]
LAB_0019835e:
MOV R14,qword ptr [RCX]
LAB_00198361:
TEST EAX,EAX
JZ 0x00198479
CMP EAX,0x5
JZ 0x00198479
CMP byte ptr [RBX + 0x4],0x1
JNZ 0x00198479
MOV RSI,qword ptr [RBX + 0x8]
TEST RSI,RSI
JZ 0x00198400
MOV RAX,qword ptr [0x00200440]
MOV R11,qword ptr [RAX]
MOV RCX,qword ptr [RAX + 0x28]
MOV EDI,0xf4240
MOV RAX,RSI
CQO
IDIV RDI
MOV RDI,RAX
MOV R8D,0x3938700
MOV RAX,RSI
CQO
IDIV R8
MOV R8,RAX
PUSH 0x3c
POP R9
MOV RAX,RDI
CQO
IDIV R9
MOV R9,RDX
MOV EDI,0x3e8
MOV RAX,RSI
CQO
IDIV RDI
MOV R10,RDX
CQO
IDIV RDI
MOV RAX,RDX
LEA RSI,[0x1ba0e0]
MOV RDI,R14
MOV RDX,RCX
MOV ECX,R8D
MOV R8D,R9D
MOV R9D,EAX
XOR EAX,EAX
PUSH R11
PUSH R10
CALL 0x00123ca0
POP RCX
POP RDX
MOV EAX,dword ptr [RBX]
LAB_00198400:
DEC EAX
CMP EAX,0x3
JA 0x00198479
LEA RCX,[0x1ba0d0]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
MOV RAX,qword ptr [0x00200440]
MOV RDX,qword ptr [RAX + 0x20]
LEA RSI,[0x1ba10c]
JMP 0x00198451
caseD_3:
MOV RAX,qword ptr [0x00200440]
MOV RDX,qword ptr [RAX + 0x30]
LEA RSI,[0x1ba0fe]
JMP 0x00198451
caseD_4:
MOV RAX,qword ptr [0x00200440]
MOV RDX,qword ptr [RAX + 0x10]
LEA RSI,[0x1ba105]
LAB_00198451:
LEA RCX,[0x1b0bef]
JMP 0x0019846f
caseD_2:
MOV RAX,qword ptr [0x00200440]
MOV RCX,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x18]
LEA RSI,[0x1ba0f7]
LAB_0019846f:
MOV RDI,R14
XOR EAX,EAX
CALL 0x00123ca0
default:
MOV RDI,qword ptr [RBX + 0x10]
MOV RSI,R14
CALL 0x001239e0
MOV EAX,dword ptr [RBX]
CMP EAX,0x4
JA 0x001984a6
PUSH 0x1a
POP RCX
BT ECX,EAX
JNC 0x001984a6
MOV RAX,qword ptr [0x00200440]
MOV RDI,qword ptr [RAX]
MOV RSI,R14
CALL 0x001239e0
LAB_001984a6:
MOV RDI,R14
ADD RSP,0x8
POP RBX
POP R14
JMP 0x00123a40
|
/* common_log_entry::print(_IO_FILE*) const */
void __thiscall common_log_entry::print(common_log_entry *this,_IO_FILE *param_1)
{
long lVar1;
int iVar2;
int8 *puVar3;
char *pcVar4;
int8 uVar5;
char *__format;
iVar2 = *(int *)this;
if (param_1 == (_IO_FILE *)0x0) {
if ((iVar2 == 1) && (common_log_verbosity_thold < 1)) {
return;
}
puVar3 = (int8 *)PTR_stderr_001fef78;
if (iVar2 == 0) {
puVar3 = (int8 *)PTR_stdout_001fef08;
}
param_1 = (_IO_FILE *)*puVar3;
}
if (((iVar2 == 0) || (iVar2 == 5)) || (this[4] != (common_log_entry)0x1))
goto switchD_00198415_default;
lVar1 = *(long *)(this + 8);
if (lVar1 != 0) {
fprintf(param_1,"%s%d.%02d.%03d.%03d%s ",g_col[5],lVar1 / 60000000 & 0xffffffff,
(lVar1 / 1000000) % 0x3c & 0xffffffff,(lVar1 / 1000) % 1000 & 0xffffffff,lVar1 % 1000,
*g_col);
iVar2 = *(int *)this;
}
switch(iVar2) {
case 1:
uVar5 = g_col[4];
__format = "%sD %s";
break;
case 2:
pcVar4 = (char *)*g_col;
uVar5 = g_col[3];
__format = "%sI %s";
goto LAB_0019846f;
case 3:
uVar5 = g_col[6];
__format = "%sW %s";
break;
case 4:
uVar5 = g_col[2];
__format = "%sE %s";
break;
default:
goto switchD_00198415_default;
}
pcVar4 = "";
LAB_0019846f:
fprintf(param_1,__format,uVar5,pcVar4);
switchD_00198415_default:
fputs(*(char **)(this + 0x10),param_1);
if ((*(uint *)this < 5) && ((0x1aU >> (*(uint *)this & 0x1f) & 1) != 0)) {
fputs((char *)*g_col,param_1);
}
fflush(param_1);
return;
}
|
|
12,144 |
common_log_entry::print(_IO_FILE*) const
|
monkey531[P]llama/common/log.cpp
|
void print(FILE * file = nullptr) const {
FILE * fcur = file;
if (!fcur) {
// stderr displays DBG messages only when their verbosity level is not higher than the threshold
// these messages will still be logged to a file
if (level == GGML_LOG_LEVEL_DEBUG && common_log_verbosity_thold < LOG_DEFAULT_DEBUG) {
return;
}
fcur = stdout;
if (level != GGML_LOG_LEVEL_NONE) {
fcur = stderr;
}
}
if (level != GGML_LOG_LEVEL_NONE && level != GGML_LOG_LEVEL_CONT && prefix) {
if (timestamp) {
// [M.s.ms.us]
fprintf(fcur, "%s%d.%02d.%03d.%03d%s ",
g_col[COMMON_LOG_COL_BLUE],
(int) (timestamp / 1000000 / 60),
(int) (timestamp / 1000000 % 60),
(int) (timestamp / 1000 % 1000),
(int) (timestamp % 1000),
g_col[COMMON_LOG_COL_DEFAULT]);
}
switch (level) {
case GGML_LOG_LEVEL_INFO: fprintf(fcur, "%sI %s", g_col[COMMON_LOG_COL_GREEN], g_col[COMMON_LOG_COL_DEFAULT]); break;
case GGML_LOG_LEVEL_WARN: fprintf(fcur, "%sW %s", g_col[COMMON_LOG_COL_MAGENTA], "" ); break;
case GGML_LOG_LEVEL_ERROR: fprintf(fcur, "%sE %s", g_col[COMMON_LOG_COL_RED], "" ); break;
case GGML_LOG_LEVEL_DEBUG: fprintf(fcur, "%sD %s", g_col[COMMON_LOG_COL_YELLOW], "" ); break;
default:
break;
}
}
fprintf(fcur, "%s", msg.data());
if (level == GGML_LOG_LEVEL_WARN || level == GGML_LOG_LEVEL_ERROR || level == GGML_LOG_LEVEL_DEBUG) {
fprintf(fcur, "%s", g_col[COMMON_LOG_COL_DEFAULT]);
}
fflush(fcur);
}
|
O3
|
cpp
|
common_log_entry::print(_IO_FILE*) const:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl (%rdi), %eax
testq %rsi, %rsi
jne 0xcdf72
cmpl $0x1, %eax
jne 0xcdf5b
leaq 0x604c8(%rip), %rcx # 0x12e418
cmpl $0x0, (%rcx)
jg 0xcdf5b
popq %rbx
popq %r14
popq %r15
retq
testl %eax, %eax
jne 0xcdf68
movq 0x5efa2(%rip), %rcx # 0x12cf08
jmp 0xcdf6f
movq 0x5f011(%rip), %rcx # 0x12cf80
movq (%rcx), %r14
testl %eax, %eax
je 0xce0ef
cmpl $0x5, %eax
je 0xce0ef
cmpb $0x1, 0x4(%rbx)
jne 0xce0ef
movq 0x8(%rbx), %r10
testq %r10, %r10
je 0xce076
movq 0x6047f(%rip), %r15 # 0x12e420
movq 0x28(%r15), %r9
movabsq $0x431bde82d7b634db, %rcx # imm = 0x431BDE82D7B634DB
movq %r10, %rax
imulq %rcx
movq %rdx, %rcx
movq %rdx, %r8
shrq $0x3f, %r8
sarq $0x12, %rcx
movabsq $-0x70d59cc6bc5928d7, %rdx # imm = 0x8F2A633943A6D729
movq %r10, %rax
imulq %rdx
addq %rcx, %r8
leaq (%rdx,%r10), %rcx
movq %rcx, %rax
shrq $0x3f, %rax
shrq $0x19, %rcx
addl %eax, %ecx
movabsq $-0x7777777777777777, %rdx # imm = 0x8888888888888889
movq %r8, %rax
imulq %rdx
addq %r8, %rdx
movq %rdx, %rax
shrq $0x3f, %rax
shrq $0x5, %rdx
addl %eax, %edx
imull $0x3c, %edx, %eax
subl %eax, %r8d
movabsq $0x20c49ba5e353f7cf, %rsi # imm = 0x20C49BA5E353F7CF
movq %r10, %rax
imulq %rsi
movq %rdx, %r11
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x7, %r11
addq %rax, %r11
movq %r11, %rax
imulq %rsi
movq %rdx, %rax
shrq $0x3f, %rax
shrq $0x7, %rdx
addl %eax, %edx
imull $0x3e8, %edx, %eax # imm = 0x3E8
imull $0x3e8, %r11d, %edx # imm = 0x3E8
subl %eax, %r11d
subl %edx, %r10d
leaq 0x28091(%rip), %rsi # 0xf60ec
movq %r14, %rdi
movq %r9, %rdx
movl %r11d, %r9d
xorl %eax, %eax
pushq (%r15)
pushq %r10
callq 0x1aca0
addq $0x10, %rsp
movl (%rbx), %eax
decl %eax
cmpl $0x3, %eax
ja 0xce0ef
leaq 0x28058(%rip), %rcx # 0xf60dc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x6038c(%rip), %rax # 0x12e420
movq 0x20(%rax), %rdx
leaq 0x28079(%rip), %rsi # 0xf6118
jmp 0xce0c7
movq 0x60378(%rip), %rax # 0x12e420
movq 0x30(%rax), %rdx
leaq 0x28057(%rip), %rsi # 0xf610a
jmp 0xce0c7
movq 0x60364(%rip), %rax # 0x12e420
movq 0x10(%rax), %rdx
leaq 0x2804a(%rip), %rsi # 0xf6111
leaq 0x1eb3e(%rip), %rcx # 0xecc0c
jmp 0xce0e5
movq 0x60349(%rip), %rax # 0x12e420
movq (%rax), %rcx
movq 0x18(%rax), %rdx
leaq 0x2801e(%rip), %rsi # 0xf6103
movq %r14, %rdi
xorl %eax, %eax
callq 0x1aca0
movq 0x10(%rbx), %rdi
movq %r14, %rsi
callq 0x1a9c0
movl (%rbx), %eax
cmpl $0x4, %eax
ja 0xce11e
movl $0x1a, %ecx
btl %eax, %ecx
jae 0xce11e
movq 0x6030d(%rip), %rax # 0x12e420
movq (%rax), %rdi
movq %r14, %rsi
callq 0x1a9c0
movq %r14, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1aa30
nop
|
_ZNK16common_log_entry5printEP8_IO_FILE:
push r15
push r14
push rbx
mov r14, rsi
mov rbx, rdi
mov eax, [rdi]
test rsi, rsi
jnz short loc_CDF72
cmp eax, 1
jnz short loc_CDF5B
lea rcx, common_log_verbosity_thold
cmp dword ptr [rcx], 0
jg short loc_CDF5B
pop rbx
pop r14
pop r15
retn
loc_CDF5B:
test eax, eax
jnz short loc_CDF68
mov rcx, cs:stdout_ptr
jmp short loc_CDF6F
loc_CDF68:
mov rcx, cs:stderr_ptr
loc_CDF6F:
mov r14, [rcx]
loc_CDF72:
test eax, eax
jz def_CE08B; jumptable 00000000000CE08B default case
cmp eax, 5
jz def_CE08B; jumptable 00000000000CE08B default case
cmp byte ptr [rbx+4], 1
jnz def_CE08B; jumptable 00000000000CE08B default case
mov r10, [rbx+8]
test r10, r10
jz loc_CE076
mov r15, cs:_ZL5g_col; g_col
mov r9, [r15+28h]
mov rcx, 431BDE82D7B634DBh
mov rax, r10
imul rcx
mov rcx, rdx
mov r8, rdx
shr r8, 3Fh
sar rcx, 12h
mov rdx, 8F2A633943A6D729h
mov rax, r10
imul rdx
add r8, rcx
lea rcx, [rdx+r10]
mov rax, rcx
shr rax, 3Fh
shr rcx, 19h
add ecx, eax
mov rdx, 8888888888888889h
mov rax, r8
imul rdx
add rdx, r8
mov rax, rdx
shr rax, 3Fh
shr rdx, 5
add edx, eax
imul eax, edx, 3Ch ; '<'
sub r8d, eax
mov rsi, 20C49BA5E353F7CFh
mov rax, r10
imul rsi
mov r11, rdx
mov rax, rdx
shr rax, 3Fh
sar r11, 7
add r11, rax
mov rax, r11
imul rsi
mov rax, rdx
shr rax, 3Fh
shr rdx, 7
add edx, eax
imul eax, edx, 3E8h
imul edx, r11d, 3E8h
sub r11d, eax
sub r10d, edx
lea rsi, aSD02d03d03dS; "%s%d.%02d.%03d.%03d%s "
mov rdi, r14
mov rdx, r9
mov r9d, r11d
xor eax, eax
push qword ptr [r15]
push r10
call _fprintf
add rsp, 10h
mov eax, [rbx]
loc_CE076:
dec eax; switch 4 cases
cmp eax, 3
ja short def_CE08B; jumptable 00000000000CE08B default case
lea rcx, jpt_CE08B
movsxd rax, ds:(jpt_CE08B - 0F60DCh)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_CE08D:
mov rax, cs:_ZL5g_col; jumptable 00000000000CE08B case 1
mov rdx, [rax+20h]
lea rsi, aSdS; "%sD %s"
jmp short loc_CE0C7
loc_CE0A1:
mov rax, cs:_ZL5g_col; jumptable 00000000000CE08B case 3
mov rdx, [rax+30h]
lea rsi, aSwS; "%sW %s"
jmp short loc_CE0C7
loc_CE0B5:
mov rax, cs:_ZL5g_col; jumptable 00000000000CE08B case 4
mov rdx, [rax+10h]
lea rsi, aSeS; "%sE %s"
loc_CE0C7:
lea rcx, aErrorWhileHand_0+34h; ""
jmp short loc_CE0E5
loc_CE0D0:
mov rax, cs:_ZL5g_col; jumptable 00000000000CE08B case 2
mov rcx, [rax]
mov rdx, [rax+18h]
lea rsi, aSiS; "%sI %s"
loc_CE0E5:
mov rdi, r14
xor eax, eax
call _fprintf
def_CE08B:
mov rdi, [rbx+10h]; jumptable 00000000000CE08B default case
mov rsi, r14
call _fputs
mov eax, [rbx]
cmp eax, 4
ja short loc_CE11E
mov ecx, 1Ah
bt ecx, eax
jnb short loc_CE11E
mov rax, cs:_ZL5g_col; g_col
mov rdi, [rax]
mov rsi, r14
call _fputs
loc_CE11E:
mov rdi, r14
pop rbx
pop r14
pop r15
jmp _fflush
|
long long common_log_entry::print(unsigned int *a1, long long a2)
{
long long v2; // r14
long long result; // rax
long long *v4; // rcx
long long v5; // r10
long long v6; // rdx
const char *v7; // rsi
char *v8; // rcx
int v9; // ecx
v2 = a2;
result = *a1;
if ( !a2 )
{
if ( (_DWORD)result == 1 && common_log_verbosity_thold[0] <= 0 )
return result;
if ( (_DWORD)result )
v4 = (long long *)&stderr;
else
v4 = (long long *)&stdout;
v2 = *v4;
}
if ( (_DWORD)result && (_DWORD)result != 5 && *((_BYTE *)a1 + 4) == 1 )
{
v5 = *((_QWORD *)a1 + 1);
if ( v5 )
{
fprintf(
v2,
"%s%d.%02d.%03d.%03d%s ",
*(const char **)(g_col + 40),
(int)v5 / 60000000,
(int)(v5 / 1000000) % 60,
(int)(v5 / 1000) % 1000,
v5 % 1000,
*(const char **)g_col);
LODWORD(result) = *a1;
}
switch ( (int)result )
{
case 1:
v6 = *(_QWORD *)(g_col + 32);
v7 = "%sD %s";
goto LABEL_17;
case 2:
v8 = *(char **)g_col;
v6 = *(_QWORD *)(g_col + 24);
v7 = "%sI %s";
goto LABEL_19;
case 3:
v6 = *(_QWORD *)(g_col + 48);
v7 = "%sW %s";
goto LABEL_17;
case 4:
v6 = *(_QWORD *)(g_col + 16);
v7 = "%sE %s";
LABEL_17:
v8 = "";
LABEL_19:
fprintf(v2, v7, v6, v8);
break;
default:
break;
}
}
fputs(*((_QWORD *)a1 + 2), v2);
if ( *a1 <= 4 )
{
v9 = 26;
if ( _bittest(&v9, *a1) )
fputs(*(_QWORD *)g_col, v2);
}
return fflush(v2);
}
|
print:
PUSH R15
PUSH R14
PUSH RBX
MOV R14,RSI
MOV RBX,RDI
MOV EAX,dword ptr [RDI]
TEST RSI,RSI
JNZ 0x001cdf72
CMP EAX,0x1
JNZ 0x001cdf5b
LEA RCX,[0x22e418]
CMP dword ptr [RCX],0x0
JG 0x001cdf5b
POP RBX
POP R14
POP R15
RET
LAB_001cdf5b:
TEST EAX,EAX
JNZ 0x001cdf68
MOV RCX,qword ptr [0x0022cf08]
JMP 0x001cdf6f
LAB_001cdf68:
MOV RCX,qword ptr [0x0022cf80]
LAB_001cdf6f:
MOV R14,qword ptr [RCX]
LAB_001cdf72:
TEST EAX,EAX
JZ 0x001ce0ef
CMP EAX,0x5
JZ 0x001ce0ef
CMP byte ptr [RBX + 0x4],0x1
JNZ 0x001ce0ef
MOV R10,qword ptr [RBX + 0x8]
TEST R10,R10
JZ 0x001ce076
MOV R15,qword ptr [0x0022e420]
MOV R9,qword ptr [R15 + 0x28]
MOV RCX,0x431bde82d7b634db
MOV RAX,R10
IMUL RCX
MOV RCX,RDX
MOV R8,RDX
SHR R8,0x3f
SAR RCX,0x12
MOV RDX,-0x70d59cc6bc5928d7
MOV RAX,R10
IMUL RDX
ADD R8,RCX
LEA RCX,[RDX + R10*0x1]
MOV RAX,RCX
SHR RAX,0x3f
SHR RCX,0x19
ADD ECX,EAX
MOV RDX,-0x7777777777777777
MOV RAX,R8
IMUL RDX
ADD RDX,R8
MOV RAX,RDX
SHR RAX,0x3f
SHR RDX,0x5
ADD EDX,EAX
IMUL EAX,EDX,0x3c
SUB R8D,EAX
MOV RSI,0x20c49ba5e353f7cf
MOV RAX,R10
IMUL RSI
MOV R11,RDX
MOV RAX,RDX
SHR RAX,0x3f
SAR R11,0x7
ADD R11,RAX
MOV RAX,R11
IMUL RSI
MOV RAX,RDX
SHR RAX,0x3f
SHR RDX,0x7
ADD EDX,EAX
IMUL EAX,EDX,0x3e8
IMUL EDX,R11D,0x3e8
SUB R11D,EAX
SUB R10D,EDX
LEA RSI,[0x1f60ec]
MOV RDI,R14
MOV RDX,R9
MOV R9D,R11D
XOR EAX,EAX
PUSH qword ptr [R15]
PUSH R10
CALL 0x0011aca0
ADD RSP,0x10
MOV EAX,dword ptr [RBX]
LAB_001ce076:
DEC EAX
CMP EAX,0x3
JA 0x001ce0ef
LEA RCX,[0x1f60dc]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
MOV RAX,qword ptr [0x0022e420]
MOV RDX,qword ptr [RAX + 0x20]
LEA RSI,[0x1f6118]
JMP 0x001ce0c7
caseD_3:
MOV RAX,qword ptr [0x0022e420]
MOV RDX,qword ptr [RAX + 0x30]
LEA RSI,[0x1f610a]
JMP 0x001ce0c7
caseD_4:
MOV RAX,qword ptr [0x0022e420]
MOV RDX,qword ptr [RAX + 0x10]
LEA RSI,[0x1f6111]
LAB_001ce0c7:
LEA RCX,[0x1ecc0c]
JMP 0x001ce0e5
caseD_2:
MOV RAX,qword ptr [0x0022e420]
MOV RCX,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x18]
LEA RSI,[0x1f6103]
LAB_001ce0e5:
MOV RDI,R14
XOR EAX,EAX
CALL 0x0011aca0
default:
MOV RDI,qword ptr [RBX + 0x10]
MOV RSI,R14
CALL 0x0011a9c0
MOV EAX,dword ptr [RBX]
CMP EAX,0x4
JA 0x001ce11e
MOV ECX,0x1a
BT ECX,EAX
JNC 0x001ce11e
MOV RAX,qword ptr [0x0022e420]
MOV RDI,qword ptr [RAX]
MOV RSI,R14
CALL 0x0011a9c0
LAB_001ce11e:
MOV RDI,R14
POP RBX
POP R14
POP R15
JMP 0x0011aa30
|
/* common_log_entry::print(_IO_FILE*) const */
void __thiscall common_log_entry::print(common_log_entry *this,_IO_FILE *param_1)
{
long lVar1;
int1 auVar2 [16];
int1 auVar3 [16];
int8 *puVar4;
char *pcVar5;
int8 uVar6;
char *__format;
int iVar7;
iVar7 = *(int *)this;
if (param_1 == (_IO_FILE *)0x0) {
if ((iVar7 == 1) && (common_log_verbosity_thold < 1)) {
return;
}
puVar4 = (int8 *)PTR_stderr_0022cf80;
if (iVar7 == 0) {
puVar4 = (int8 *)PTR_stdout_0022cf08;
}
param_1 = (_IO_FILE *)*puVar4;
}
if (((iVar7 == 0) || (iVar7 == 5)) || (this[4] != (common_log_entry)0x1))
goto switchD_001ce08b_default;
lVar1 = *(long *)(this + 8);
if (lVar1 != 0) {
auVar3 = SEXT816(lVar1 / 1000000) * ZEXT816(0x8888888888888889);
auVar2 = SEXT816(lVar1 / 1000) * SEXT816(0x20c49ba5e353f7cf);
iVar7 = (int)(lVar1 / 1000);
fprintf(param_1,"%s%d.%02d.%03d.%03d%s ",g_col[5],
(ulong)(uint)((int)(SUB168(SEXT816(lVar1) * ZEXT816(0x8f2a633943a6d729),8) >> 0x19) -
(SUB164(SEXT816(lVar1) * ZEXT816(0x8f2a633943a6d729),0xc) >> 0x1f)),
(ulong)(uint)((int)(lVar1 / 1000000) +
((int)(auVar3._8_8_ >> 5) - (auVar3._12_4_ >> 0x1f)) * -0x3c),
(ulong)(uint)(iVar7 + ((int)(auVar2._8_8_ >> 7) - (auVar2._12_4_ >> 0x1f)) * -1000),
(ulong)(uint)((int)lVar1 + iVar7 * -1000),*g_col);
iVar7 = *(int *)this;
}
switch(iVar7) {
case 1:
uVar6 = g_col[4];
__format = "%sD %s";
break;
case 2:
pcVar5 = (char *)*g_col;
uVar6 = g_col[3];
__format = "%sI %s";
goto LAB_001ce0e5;
case 3:
uVar6 = g_col[6];
__format = "%sW %s";
break;
case 4:
uVar6 = g_col[2];
__format = "%sE %s";
break;
default:
goto switchD_001ce08b_default;
}
pcVar5 = "";
LAB_001ce0e5:
fprintf(param_1,__format,uVar6,pcVar5);
switchD_001ce08b_default:
fputs(*(char **)(this + 0x10),param_1);
if ((*(uint *)this < 5) && ((0x1aU >> (*(uint *)this & 0x1f) & 1) != 0)) {
fputs((char *)*g_col,param_1);
}
fflush(param_1);
return;
}
|
|
12,145 |
PFS_account::aggregate_memory(bool, PFS_user*, PFS_host*)
|
eloqsql/storage/perfschema/pfs_account.cc
|
void PFS_account::aggregate_memory(bool alive, PFS_user *safe_user, PFS_host *safe_host)
{
if (read_instr_class_memory_stats() == NULL)
return;
if (likely(safe_user != NULL && safe_host != NULL))
{
/*
Aggregate MEMORY_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME to:
- MEMORY_SUMMARY_BY_USER_BY_EVENT_NAME
- MEMORY_SUMMARY_BY_HOST_BY_EVENT_NAME
in parallel.
*/
aggregate_all_memory(alive,
write_instr_class_memory_stats(),
safe_user->write_instr_class_memory_stats(),
safe_host->write_instr_class_memory_stats());
return;
}
if (safe_user != NULL)
{
/*
Aggregate MEMORY_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME to:
- MEMORY_SUMMARY_BY_USER_BY_EVENT_NAME
- MEMORY_SUMMARY_GLOBAL_BY_EVENT_NAME
in parallel.
*/
aggregate_all_memory(alive,
write_instr_class_memory_stats(),
safe_user->write_instr_class_memory_stats(),
global_instr_class_memory_array);
return;
}
if (safe_host != NULL)
{
/*
Aggregate MEMORY_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME to:
- MEMORY_SUMMARY_BY_HOST_BY_EVENT_NAME
*/
aggregate_all_memory(alive,
write_instr_class_memory_stats(),
safe_host->write_instr_class_memory_stats());
return;
}
/*
Aggregate MEMORY_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME to:
- MEMORY_SUMMARY_GLOBAL_BY_EVENT_NAME
*/
aggregate_all_memory(alive,
write_instr_class_memory_stats(),
global_instr_class_memory_array);
return;
}
|
O3
|
cpp
|
PFS_account::aggregate_memory(bool, PFS_user*, PFS_host*):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x28(%rdi), %rbx
testq %rbx, %rbx
setne %al
andb 0x4(%rdi), %al
cmpb $0x1, %al
jne 0x41c39
movq %rcx, %r15
movq %rdx, %r12
movl %esi, %r14d
testq %rdx, %rdx
je 0x41c42
testq %r15, %r15
je 0x41c42
testb $0x1, 0x4(%r12)
jne 0x41c05
movq %r12, %rdi
callq 0x42c7e
movb $0x1, 0x4(%r12)
movq 0x28(%r12), %r12
cmpb $0x0, 0x4(%r15)
jne 0x41c1e
movq %r15, %rdi
callq 0x42c7e
movb $0x1, 0x4(%r15)
movq 0x28(%r15), %rcx
movzbl %r14b, %edi
movq %rbx, %rsi
movq %r12, %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x34657
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
testq %r12, %r12
je 0x41c75
testb $0x1, 0x4(%r12)
jne 0x41c5d
movq %r12, %rdi
callq 0x42c7e
movb $0x1, 0x4(%r12)
movq 0x28(%r12), %rdx
leaq 0x38d6e7(%rip), %rax # 0x3cf350
movq (%rax), %rcx
movzbl %r14b, %edi
movq %rbx, %rsi
jmp 0x41c2c
testq %r15, %r15
je 0x41c94
testb $0x1, 0x4(%r15)
jne 0x41c8e
movq %r15, %rdi
callq 0x42c7e
movb $0x1, 0x4(%r15)
movq 0x28(%r15), %rdx
jmp 0x41c9e
leaq 0x38d6b5(%rip), %rax # 0x3cf350
movq (%rax), %rdx
movzbl %r14b, %edi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x344d2
|
_ZN11PFS_account16aggregate_memoryEbP8PFS_userP8PFS_host:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov rbx, [rdi+28h]
test rbx, rbx
setnz al
and al, [rdi+4]
cmp al, 1
jnz short loc_41C39
mov r15, rcx
mov r12, rdx
mov r14d, esi
test rdx, rdx
jz short loc_41C42
test r15, r15
jz short loc_41C42
test byte ptr [r12+4], 1
jnz short loc_41C05
mov rdi, r12; this
call _ZN20PFS_connection_slice19rebase_memory_statsEv; PFS_connection_slice::rebase_memory_stats(void)
mov byte ptr [r12+4], 1
loc_41C05:
mov r12, [r12+28h]
cmp byte ptr [r15+4], 0
jnz short loc_41C1E
mov rdi, r15; this
call _ZN20PFS_connection_slice19rebase_memory_statsEv; PFS_connection_slice::rebase_memory_stats(void)
mov byte ptr [r15+4], 1
loc_41C1E:
mov rcx, [r15+28h]; PFS_memory_stat *
movzx edi, r14b; bool
mov rsi, rbx; PFS_memory_stat *
mov rdx, r12; PFS_memory_stat *
loc_41C2C:
pop rbx
pop r12
pop r14
pop r15
pop rbp
jmp _Z20aggregate_all_memorybP15PFS_memory_statS0_S0_; aggregate_all_memory(bool,PFS_memory_stat *,PFS_memory_stat *,PFS_memory_stat *)
loc_41C39:
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_41C42:
test r12, r12
jz short loc_41C75
test byte ptr [r12+4], 1
jnz short loc_41C5D
mov rdi, r12; this
call _ZN20PFS_connection_slice19rebase_memory_statsEv; PFS_connection_slice::rebase_memory_stats(void)
mov byte ptr [r12+4], 1
loc_41C5D:
mov rdx, [r12+28h]
lea rax, global_instr_class_memory_array
mov rcx, [rax]
movzx edi, r14b
mov rsi, rbx
jmp short loc_41C2C
loc_41C75:
test r15, r15
jz short loc_41C94
test byte ptr [r15+4], 1
jnz short loc_41C8E
mov rdi, r15; this
call _ZN20PFS_connection_slice19rebase_memory_statsEv; PFS_connection_slice::rebase_memory_stats(void)
mov byte ptr [r15+4], 1
loc_41C8E:
mov rdx, [r15+28h]
jmp short loc_41C9E
loc_41C94:
lea rax, global_instr_class_memory_array
mov rdx, [rax]; PFS_memory_stat *
loc_41C9E:
movzx edi, r14b; bool
mov rsi, rbx; PFS_memory_stat *
pop rbx
pop r12
pop r14
pop r15
pop rbp
jmp _Z20aggregate_all_memorybP15PFS_memory_statS0_; aggregate_all_memory(bool,PFS_memory_stat *,PFS_memory_stat *)
|
char PFS_account::aggregate_memory(
PFS_account *this,
unsigned __int8 a2,
PFS_memory_stat **a3,
PFS_memory_stat **a4)
{
PFS_memory_stat *v4; // rbx
char result; // al
PFS_memory_stat *v8; // r12
PFS_memory_stat *v9; // rdx
v4 = (PFS_memory_stat *)*((_QWORD *)this + 5);
result = *((_BYTE *)this + 4) & (v4 != 0LL);
if ( result == 1 )
{
if ( a3 && a4 )
{
if ( (*((_BYTE *)a3 + 4) & 1) == 0 )
{
PFS_connection_slice::rebase_memory_stats((PFS_connection_slice *)a3);
*((_BYTE *)a3 + 4) = 1;
}
v8 = a3[5];
if ( !*((_BYTE *)a4 + 4) )
{
PFS_connection_slice::rebase_memory_stats((PFS_connection_slice *)a4);
*((_BYTE *)a4 + 4) = 1;
}
return aggregate_all_memory(a2, v4, v8, a4[5]);
}
else if ( a3 )
{
if ( (*((_BYTE *)a3 + 4) & 1) == 0 )
{
PFS_connection_slice::rebase_memory_stats((PFS_connection_slice *)a3);
*((_BYTE *)a3 + 4) = 1;
}
return aggregate_all_memory(a2, v4, a3[5], global_instr_class_memory_array);
}
else
{
if ( a4 )
{
if ( (*((_BYTE *)a4 + 4) & 1) == 0 )
{
PFS_connection_slice::rebase_memory_stats((PFS_connection_slice *)a4);
*((_BYTE *)a4 + 4) = 1;
}
v9 = a4[5];
}
else
{
v9 = global_instr_class_memory_array;
}
return aggregate_all_memory(a2, v4, v9);
}
}
return result;
}
|
aggregate_memory:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,qword ptr [RDI + 0x28]
TEST RBX,RBX
SETNZ AL
AND AL,byte ptr [RDI + 0x4]
CMP AL,0x1
JNZ 0x00141c39
MOV R15,RCX
MOV R12,RDX
MOV R14D,ESI
TEST RDX,RDX
JZ 0x00141c42
TEST R15,R15
JZ 0x00141c42
TEST byte ptr [R12 + 0x4],0x1
JNZ 0x00141c05
MOV RDI,R12
CALL 0x00142c7e
MOV byte ptr [R12 + 0x4],0x1
LAB_00141c05:
MOV R12,qword ptr [R12 + 0x28]
CMP byte ptr [R15 + 0x4],0x0
JNZ 0x00141c1e
MOV RDI,R15
CALL 0x00142c7e
MOV byte ptr [R15 + 0x4],0x1
LAB_00141c1e:
MOV RCX,qword ptr [R15 + 0x28]
MOVZX EDI,R14B
MOV RSI,RBX
MOV RDX,R12
LAB_00141c2c:
POP RBX
POP R12
POP R14
POP R15
POP RBP
JMP 0x00134657
LAB_00141c39:
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00141c42:
TEST R12,R12
JZ 0x00141c75
TEST byte ptr [R12 + 0x4],0x1
JNZ 0x00141c5d
MOV RDI,R12
CALL 0x00142c7e
MOV byte ptr [R12 + 0x4],0x1
LAB_00141c5d:
MOV RDX,qword ptr [R12 + 0x28]
LEA RAX,[0x4cf350]
MOV RCX,qword ptr [RAX]
MOVZX EDI,R14B
MOV RSI,RBX
JMP 0x00141c2c
LAB_00141c75:
TEST R15,R15
JZ 0x00141c94
TEST byte ptr [R15 + 0x4],0x1
JNZ 0x00141c8e
MOV RDI,R15
CALL 0x00142c7e
MOV byte ptr [R15 + 0x4],0x1
LAB_00141c8e:
MOV RDX,qword ptr [R15 + 0x28]
JMP 0x00141c9e
LAB_00141c94:
LEA RAX,[0x4cf350]
MOV RDX,qword ptr [RAX]
LAB_00141c9e:
MOVZX EDI,R14B
MOV RSI,RBX
POP RBX
POP R12
POP R14
POP R15
POP RBP
JMP 0x001344d2
|
/* PFS_account::aggregate_memory(bool, PFS_user*, PFS_host*) */
void __thiscall
PFS_account::aggregate_memory(PFS_account *this,bool param_1,PFS_user *param_2,PFS_host *param_3)
{
PFS_memory_stat *pPVar1;
PFS_memory_stat *pPVar2;
PFS_memory_stat *pPVar3;
pPVar1 = *(PFS_memory_stat **)(this + 0x28);
if ((pPVar1 != (PFS_memory_stat *)0x0 & (byte)this[4]) != 1) {
return;
}
if ((param_2 == (PFS_user *)0x0) || (param_3 == (PFS_host *)0x0)) {
if (param_2 == (PFS_user *)0x0) {
pPVar3 = global_instr_class_memory_array;
if (param_3 != (PFS_host *)0x0) {
if (((byte)param_3[4] & 1) == 0) {
PFS_connection_slice::rebase_memory_stats((PFS_connection_slice *)param_3);
param_3[4] = (PFS_host)0x1;
}
pPVar3 = *(PFS_memory_stat **)(param_3 + 0x28);
}
aggregate_all_memory(param_1,pPVar1,pPVar3);
return;
}
if (((byte)param_2[4] & 1) == 0) {
PFS_connection_slice::rebase_memory_stats((PFS_connection_slice *)param_2);
param_2[4] = (PFS_user)0x1;
}
pPVar3 = *(PFS_memory_stat **)(param_2 + 0x28);
pPVar2 = global_instr_class_memory_array;
}
else {
if (((byte)param_2[4] & 1) == 0) {
PFS_connection_slice::rebase_memory_stats((PFS_connection_slice *)param_2);
param_2[4] = (PFS_user)0x1;
}
pPVar3 = *(PFS_memory_stat **)(param_2 + 0x28);
if (param_3[4] == (PFS_host)0x0) {
PFS_connection_slice::rebase_memory_stats((PFS_connection_slice *)param_3);
param_3[4] = (PFS_host)0x1;
}
pPVar2 = *(PFS_memory_stat **)(param_3 + 0x28);
}
aggregate_all_memory(param_1,pPVar1,pPVar3,pPVar2);
return;
}
|
|
12,146 |
JS_NewUint8Array
|
bluesky950520[P]quickjs/quickjs.c
|
JSValue JS_NewUint8Array(JSContext *ctx, uint8_t *buf, size_t len,
JSFreeArrayBufferDataFunc *free_func, void *opaque,
JS_BOOL is_shared)
{
JSClassID class_id =
is_shared ? JS_CLASS_SHARED_ARRAY_BUFFER : JS_CLASS_ARRAY_BUFFER;
JSValue buffer = js_array_buffer_constructor3(ctx, JS_UNDEFINED, len, NULL,
class_id, buf, free_func,
opaque, FALSE);
return js_new_uint8array(ctx, buffer);
}
|
O1
|
c
|
JS_NewUint8Array:
pushq %rbx
movq %r8, %rax
movq %rcx, %r10
movq %rdx, %rcx
movq %rsi, %r11
movq %rdi, %rbx
cmpl $0x1, %r9d
movl $0x14, %r9d
sbbl $0x0, %r9d
movl $0x3, %edx
xorl %esi, %esi
xorl %r8d, %r8d
pushq $0x0
pushq %rax
pushq %r10
pushq %r11
callq 0x38c19
addq $0x20, %rsp
movq %rbx, %rdi
movq %rax, %rsi
popq %rbx
jmp 0x39811
|
JS_NewUint8Array:
push rbx
mov rax, r8
mov r10, rcx
mov rcx, rdx
mov r11, rsi
mov rbx, rdi
cmp r9d, 1
mov r9d, 14h
sbb r9d, 0
mov edx, 3
xor esi, esi
xor r8d, r8d
push 0
push rax
push r10
push r11
call js_array_buffer_constructor3
add rsp, 20h
mov rdi, rbx
mov rsi, rax
pop rbx
jmp short $+2
|
long long JS_NewUint8Array(
long long a1,
long long a2,
unsigned long long a3,
long long ( *a4)(),
long long a5,
int a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
unsigned long long v14; // rax
v14 = js_array_buffer_constructor3(
a1,
0LL,
3LL,
a3,
0LL,
20 - (unsigned int)(a6 == 0),
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
a2,
a4,
a5,
0);
return js_new_uint8array(a1, v14);
}
|
JS_NewUint8Array:
PUSH RBX
MOV RAX,R8
MOV R10,RCX
MOV RCX,RDX
MOV R11,RSI
MOV RBX,RDI
CMP R9D,0x1
MOV R9D,0x14
SBB R9D,0x0
MOV EDX,0x3
XOR ESI,ESI
XOR R8D,R8D
PUSH 0x0
PUSH RAX
PUSH R10
PUSH R11
CALL 0x00138c19
ADD RSP,0x20
MOV RDI,RBX
MOV RSI,RAX
POP RBX
JMP 0x00139811
|
void JS_NewUint8Array(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int param_6)
{
int8 uVar1;
uVar1 = js_array_buffer_constructor3
(param_1,0,3,param_3,0,0x14 - (uint)(param_6 == 0),param_2,param_4,param_5,0);
js_new_uint8array(param_1,uVar1);
return;
}
|
|
12,147 |
JS_NewUint8Array
|
bluesky950520[P]quickjs/quickjs.c
|
JSValue JS_NewUint8Array(JSContext *ctx, uint8_t *buf, size_t len,
JSFreeArrayBufferDataFunc *free_func, void *opaque,
JS_BOOL is_shared)
{
JSClassID class_id =
is_shared ? JS_CLASS_SHARED_ARRAY_BUFFER : JS_CLASS_ARRAY_BUFFER;
JSValue buffer = js_array_buffer_constructor3(ctx, JS_UNDEFINED, len, NULL,
class_id, buf, free_func,
opaque, FALSE);
return js_new_uint8array(ctx, buffer);
}
|
O2
|
c
|
JS_NewUint8Array:
pushq %rbx
subq $0x20, %rsp
movq %rdx, %rax
movq %rdi, %rbx
cmpl $0x1, %r9d
pushq $0x14
popq %r9
sbbl $0x0, %r9d
movq %r8, 0x10(%rsp)
movq %rcx, 0x8(%rsp)
andl $0x0, 0x18(%rsp)
movq %rsi, (%rsp)
pushq $0x3
popq %rdx
xorl %esi, %esi
movq %rax, %rcx
xorl %r8d, %r8d
callq 0x31db1
movq %rbx, %rdi
movq %rax, %rsi
addq $0x20, %rsp
popq %rbx
jmp 0x32969
|
JS_NewUint8Array:
push rbx
sub rsp, 20h
mov rax, rdx
mov rbx, rdi
cmp r9d, 1
push 14h
pop r9
sbb r9d, 0
mov [rsp+28h+var_18], r8
mov [rsp+28h+var_20], rcx
and [rsp+28h+var_10], 0
mov [rsp+28h+var_28], rsi
push 3
pop rdx
xor esi, esi
mov rcx, rax
xor r8d, r8d
call js_array_buffer_constructor3
mov rdi, rbx
mov rsi, rax
add rsp, 20h
pop rbx
jmp short $+2
|
long long JS_NewUint8Array(
long long a1,
long long a2,
unsigned long long a3,
long long ( *a4)(),
long long a5,
int a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
unsigned long long v14; // rax
v14 = js_array_buffer_constructor3(
a1,
0LL,
3LL,
a3,
0LL,
20 - (unsigned int)(a6 == 0),
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
a2,
a4,
a5,
0);
return js_new_uint8array(a1, v14);
}
|
JS_NewUint8Array:
PUSH RBX
SUB RSP,0x20
MOV RAX,RDX
MOV RBX,RDI
CMP R9D,0x1
PUSH 0x14
POP R9
SBB R9D,0x0
MOV qword ptr [RSP + 0x10],R8
MOV qword ptr [RSP + 0x8],RCX
AND dword ptr [RSP + 0x18],0x0
MOV qword ptr [RSP],RSI
PUSH 0x3
POP RDX
XOR ESI,ESI
MOV RCX,RAX
XOR R8D,R8D
CALL 0x00131db1
MOV RDI,RBX
MOV RSI,RAX
ADD RSP,0x20
POP RBX
JMP 0x00132969
|
void JS_NewUint8Array(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int param_6)
{
int8 uVar1;
uVar1 = js_array_buffer_constructor3
(param_1,0,3,param_3,0,0x14 - (uint)(param_6 == 0),param_2,param_4,param_5,0);
js_new_uint8array(param_1,uVar1);
return;
}
|
|
12,148 |
nglog::(anonymous namespace)::LogFileObject::LogSize()
|
ng-log[P]ng-log/src/logging.cc
|
uint32 LogSize() override {
std::lock_guard<std::mutex> l{mutex_};
return file_length_;
}
|
O3
|
cpp
|
nglog::(anonymous namespace)::LogFileObject::LogSize():
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
leaq 0x8(%rdi), %rbx
movq %rbx, %rdi
callq 0x7820
testl %eax, %eax
jne 0x10119
movl 0xac(%r14), %ebp
movq %rbx, %rdi
callq 0x73e0
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
movl %eax, %edi
callq 0x7350
|
_ZN5nglog12_GLOBAL__N_113LogFileObject7LogSizeEv:
push rbp
push r14
push rbx
mov r14, rdi
lea rbx, [rdi+8]
mov rdi, rbx
call _pthread_mutex_lock
test eax, eax
jnz short loc_10119
mov ebp, [r14+0ACh]
mov rdi, rbx
call _pthread_mutex_unlock
mov eax, ebp
pop rbx
pop r14
pop rbp
retn
loc_10119:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
|
long long nglog::`anonymous namespace'::LogFileObject::LogSize(
nglog::_anonymous_namespace_::LogFileObject *this)
{
int v1; // eax
unsigned int v2; // ebp
v1 = pthread_mutex_lock((char *)this + 8);
if ( v1 )
std::__throw_system_error(v1);
v2 = *((_DWORD *)this + 43);
pthread_mutex_unlock((char *)this + 8);
return v2;
}
|
LogSize:
PUSH RBP
PUSH R14
PUSH RBX
MOV R14,RDI
LEA RBX,[RDI + 0x8]
MOV RDI,RBX
CALL 0x00107820
TEST EAX,EAX
JNZ 0x00110119
MOV EBP,dword ptr [R14 + 0xac]
MOV RDI,RBX
CALL 0x001073e0
MOV EAX,EBP
POP RBX
POP R14
POP RBP
RET
LAB_00110119:
MOV EDI,EAX
CALL 0x00107350
|
/* nglog::(anonymous namespace)::LogFileObject::LogSize() */
int4 __thiscall nglog::(anonymous_namespace)::LogFileObject::LogSize(LogFileObject *this)
{
int4 uVar1;
int iVar2;
iVar2 = pthread_mutex_lock((pthread_mutex_t *)(this + 8));
if (iVar2 == 0) {
uVar1 = *(int4 *)(this + 0xac);
pthread_mutex_unlock((pthread_mutex_t *)(this + 8));
return uVar1;
}
/* WARNING: Subroutine does not return */
std::__throw_system_error(iVar2);
}
|
|
12,149 |
nglog::LogDestination::MaybeLogToEmail(nglog::LogSeverity, char const*, unsigned long)
|
ng-log[P]ng-log/src/logging.cc
|
inline void LogDestination::MaybeLogToEmail(LogSeverity severity,
const char* message, size_t len) {
if (severity >= email_logging_severity_ || severity >= FLAGS_logemaillevel) {
string to(FLAGS_alsologtoemail);
if (!addresses_.empty()) {
if (!to.empty()) {
to += ",";
}
to += addresses_;
}
const string subject(string("[LOG] ") + LogSeverityNames[severity] + ": " +
tools::ProgramInvocationShortName());
string body(hostname());
body += "\n\n";
body.append(message, len);
// should NOT use SendEmail(). The caller of this function holds the
// log_mutex and SendEmail() calls LOG/VLOG which will block trying to
// acquire the log_mutex object. Use SendEmailInternal() and set
// use_logging to false.
SendEmailInternal(to.c_str(), subject.c_str(), body.c_str(), false);
}
}
|
O1
|
cpp
|
nglog::LogDestination::MaybeLogToEmail(nglog::LogSeverity, char const*, unsigned long):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %ebp
cmpl %edi, 0x1edb5(%rip) # 0x2f558
jbe 0x107b4
leaq 0x1f23c(%rip), %rax # 0x2f9e8
cmpl %ebp, (%rax)
jg 0x10a3c
leaq 0x1dde5(%rip), %rax # 0x2e5a0
movq (%rax), %rax
leaq 0x38(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0x11274
cmpq $0x0, 0x1f335(%rip) # 0x2fb18
je 0x10816
cmpq $0x0, 0x30(%rsp)
je 0x107fe
leaq 0x12375(%rip), %rsi # 0x22b69
leaq 0x28(%rsp), %rdi
callq 0x7a10
movq 0x1f30b(%rip), %rsi # 0x2fb10
movq 0x1f30c(%rip), %rdx # 0x2fb18
leaq 0x28(%rsp), %rdi
callq 0x7140
leaq 0x98(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x12341(%rip), %rsi # 0x22b6b
leaq 0x12340(%rip), %rdx # 0x22b71
leaq 0x88(%rsp), %rdi
callq 0x9436
movl %ebp, %eax
leaq 0x1dd99(%rip), %rcx # 0x2e5e0
movq (%rcx,%rax,8), %rsi
leaq 0x88(%rsp), %rdi
callq 0x7a10
leaq 0x78(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1087f
movq %rdx, 0x68(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x78(%rsp)
jmp 0x10886
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq 0x68(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x12157(%rip), %rsi # 0x22a00
callq 0x7a10
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x108d5
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x108dd
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
callq 0x2111f
leaq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x7a10
leaq 0x58(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1092e
movq %rdx, 0x48(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x58(%rsp)
jmp 0x10935
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
movq %rdx, 0x50(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x10964
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7540
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
je 0x1097b
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x7540
movq 0x88(%rsp), %rdi
cmpq %r12, %rdi
je 0x10998
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x7540
callq 0x94fa
leaq 0x8(%rsp), %rdi
movq %r13, (%rdi)
movq 0x1f184(%rip), %rsi # 0x2fb30
movq 0x1f185(%rip), %rdx # 0x2fb38
addq %rsi, %rdx
callq 0x11274
leaq 0x121b0(%rip), %rsi # 0x22b72
leaq 0x8(%rsp), %rdi
callq 0x7a10
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x70c0
movq 0x28(%rsp), %rdi
movq 0x48(%rsp), %rsi
movq 0x8(%rsp), %rdx
xorl %ecx, %ecx
callq 0xb8db
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x10a09
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7540
movq 0x48(%rsp), %rdi
cmpq %rbp, %rdi
leaq 0x38(%rsp), %rbx
je 0x10a25
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x7540
movq 0x28(%rsp), %rdi
cmpq %rbx, %rdi
je 0x10a3c
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x7540
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x10a7e
movq %rax, %rbx
jmp 0x10a95
jmp 0x10a5a
movq %rax, %rbx
jmp 0x10add
movq %rax, %rbx
jmp 0x10ac6
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x10a7e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7540
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
je 0x10a95
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x7540
movq 0x88(%rsp), %rdi
cmpq %r12, %rdi
je 0x10add
movq 0x98(%rsp), %rsi
jmp 0x10ad5
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x10ac6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7540
movq 0x48(%rsp), %rdi
cmpq %rbp, %rdi
je 0x10add
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x7540
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x10af9
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x7540
movq %rbx, %rdi
callq 0x7980
nop
|
_ZN5nglog14LogDestination15MaybeLogToEmailENS_11LogSeverityEPKcm:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0A8h
mov rbx, rdx
mov r14, rsi
mov ebp, edi
cmp cs:_ZN5nglog14LogDestination23email_logging_severity_E, edi; nglog::LogDestination::email_logging_severity_
jbe short loc_107B4
lea rax, _ZN3fLI19FLAGS_logemaillevelE; fLI::FLAGS_logemaillevel
cmp [rax], ebp
jg loc_10A3C
loc_107B4:
lea rax, _ZN3fLS20FLAGS_alsologtoemailB5cxx11E; fLS::FLAGS_alsologtoemail
mov rax, [rax]
lea rcx, [rsp+0D8h+var_A0]
mov [rcx-10h], rcx
mov rsi, [rax]
mov rdx, [rax+8]
add rdx, rsi
lea rdi, [rsp+0D8h+var_B0]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
cmp cs:qword_2FB18, 0
jz short loc_10816
cmp [rsp+0D8h+var_A8], 0
jz short loc_107FE
lea rsi, asc_22B69; ","
lea rdi, [rsp+0D8h+var_B0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
loc_107FE:
mov rsi, cs:_ZN5nglog14LogDestination10addresses_B5cxx11E; nglog::LogDestination::addresses_
mov rdx, cs:qword_2FB18
lea rdi, [rsp+0D8h+var_B0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
loc_10816:
lea r12, [rsp+0D8h+var_40]
mov [r12-10h], r12
lea rsi, aLog_0; "[LOG] "
lea rdx, aLog_0+6; ""
lea rdi, [rsp+0D8h+var_50]
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 eax, ebp
lea rcx, _ZN5nglogL16LogSeverityNamesE; nglog::LogSeverityNames
mov rsi, [rcx+rax*8]
lea rdi, [rsp+0D8h+var_50]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea r15, [rsp+0D8h+var_60]
mov [r15-10h], r15
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jz short loc_1087F
mov [rsp+0D8h+var_70], rdx
mov rdx, [rcx]
mov [rsp+0D8h+var_60], rdx
jmp short loc_10886
loc_1087F:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r15], xmm0
loc_10886:
mov rdx, [rax+8]
lea rdi, [rsp+0D8h+var_70]; this
mov [rdi+8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
lea rsi, aRunningDuratio+1Ah; ": "
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea r13, [rsp+0D8h+var_C0]
mov [r13-10h], r13
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jz short loc_108D5
mov [rsp+0D8h+var_D0], rdx
mov rdx, [rcx]
mov [rsp+0D8h+var_C0], rdx
jmp short loc_108DD
loc_108D5:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r13+0], xmm0
loc_108DD:
mov rdx, [rax+8]
mov [rsp+0D8h+var_C8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
call _ZN5nglog5tools26ProgramInvocationShortNameEv; nglog::tools::ProgramInvocationShortName(void)
lea rdi, [rsp+0D8h+var_D0]
mov rsi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea rbp, [rsp+0D8h+var_80]
mov [rbp-10h], rbp
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jz short loc_1092E
mov [rsp+0D8h+var_90], rdx
mov rdx, [rcx]
mov [rsp+0D8h+var_80], rdx
jmp short loc_10935
loc_1092E:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [rbp+0], xmm0
loc_10935:
mov rdx, [rax+8]
mov [rsp+0D8h+var_88], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
mov rdi, [rsp+0D8h+var_D0]; void *
cmp rdi, r13
jz short loc_10964
mov rsi, [rsp+0D8h+var_C0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_10964:
mov rdi, [rsp+0D8h+var_70]; void *
cmp rdi, r15
jz short loc_1097B
mov rsi, [rsp+0D8h+var_60]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1097B:
mov rdi, [rsp+0D8h+var_50]; void *
cmp rdi, r12
jz short loc_10998
mov rsi, [rsp+0D8h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_10998:
call _ZN5nglog14LogDestination8hostnameB5cxx11Ev; nglog::LogDestination::hostname(void)
lea rdi, [rsp+0D8h+var_D0]
mov [rdi], r13
mov rsi, cs:_ZN5nglog14LogDestination9hostname_B5cxx11E; nglog::LogDestination::hostname_
mov rdx, cs:qword_2FB38
add rdx, rsi
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
lea rsi, asc_22B72; "\n\n"
lea rdi, [rsp+0D8h+var_D0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea rdi, [rsp+0D8h+var_D0]
mov rsi, r14
mov rdx, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm; std::string::append(char const*,ulong)
mov rdi, [rsp+0D8h+var_B0]; this
mov rsi, [rsp+0D8h+var_90]; char *
mov rdx, [rsp+0D8h+var_D0]; char *
xor ecx, ecx; char *
call _ZN5nglogL17SendEmailInternalEPKcS1_S1_b; nglog::SendEmailInternal(char const*,char const*,char const*,bool)
mov rdi, [rsp+0D8h+var_D0]; void *
cmp rdi, r13
jz short loc_10A09
mov rsi, [rsp+0D8h+var_C0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_10A09:
mov rdi, [rsp+0D8h+var_90]; void *
cmp rdi, rbp
lea rbx, [rsp+0D8h+var_A0]
jz short loc_10A25
mov rsi, [rsp+0D8h+var_80]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_10A25:
mov rdi, [rsp+0D8h+var_B0]; void *
cmp rdi, rbx
jz short loc_10A3C
mov rsi, [rsp+0D8h+var_A0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_10A3C:
add rsp, 0A8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
jmp short loc_10A7E
mov rbx, rax
jmp short loc_10A95
jmp short $+2
loc_10A5A:
mov rbx, rax
jmp short loc_10ADD
mov rbx, rax
jmp short loc_10AC6
mov rbx, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, r13
jz short loc_10A7E
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_10A7E:
mov rdi, [rsp+arg_60]; void *
cmp rdi, r15
jz short loc_10A95
mov rsi, [rsp+arg_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_10A95:
mov rdi, [rsp+arg_80]
cmp rdi, r12
jz short loc_10ADD
mov rsi, [rsp+arg_90]
jmp short loc_10AD5
mov rbx, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, r13
jz short loc_10AC6
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_10AC6:
mov rdi, [rsp+arg_40]; void *
cmp rdi, rbp
jz short loc_10ADD
mov rsi, [rsp+arg_50]
loc_10AD5:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_10ADD:
mov rdi, [rsp+arg_20]; void *
lea rax, [rsp+arg_30]
cmp rdi, rax
jz short loc_10AF9
mov rsi, [rsp+arg_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_10AF9:
mov rdi, rbx
call __Unwind_Resume
|
void nglog::LogDestination::MaybeLogToEmail(unsigned int a1, long long a2, long long a3)
{
long long v4; // rax
__int128 *v5; // rcx
long long v6; // rax
__int128 *v7; // rcx
long long v8; // rax
long long v9; // rax
__int128 *v10; // rcx
char *v11[2]; // [rsp+8h] [rbp-D0h] BYREF
__int128 v12; // [rsp+18h] [rbp-C0h] BYREF
nglog *v13[2]; // [rsp+28h] [rbp-B0h] BYREF
_QWORD v14[2]; // [rsp+38h] [rbp-A0h] BYREF
char *v15; // [rsp+48h] [rbp-90h]
long long v16; // [rsp+50h] [rbp-88h]
__int128 v17; // [rsp+58h] [rbp-80h] BYREF
void *v18[2]; // [rsp+68h] [rbp-70h] BYREF
__int128 v19; // [rsp+78h] [rbp-60h] BYREF
void *v20[2]; // [rsp+88h] [rbp-50h] BYREF
_QWORD v21[8]; // [rsp+98h] [rbp-40h] BYREF
if ( nglog::LogDestination::email_logging_severity_ <= a1 || fLI::FLAGS_logemaillevel <= (int)a1 )
{
v13[0] = (nglog *)v14;
std::string::_M_construct<char *>(
v13,
fLS::FLAGS_alsologtoemail_buf[abi:cxx11],
fLS::FLAGS_alsologtoemail_buf[abi:cxx11] + *(&fLS::FLAGS_alsologtoemail_buf[abi:cxx11] + 1));
if ( qword_2FB18 )
{
if ( v13[1] )
std::string::append(v13, ",");
std::string::_M_append(v13, nglog::LogDestination::addresses_[abi:cxx11]);
}
v20[0] = v21;
std::string::_M_construct<char const*>(v20, "[LOG] ", (long long)"");
v4 = std::string::append(v20, nglog::LogSeverityNames[a1]);
v18[0] = &v19;
v5 = (__int128 *)(v4 + 16);
if ( *(_QWORD *)v4 == v4 + 16 )
{
v19 = *v5;
}
else
{
v18[0] = *(void **)v4;
*(_QWORD *)&v19 = *(_QWORD *)v5;
}
v18[1] = *(void **)(v4 + 8);
*(_QWORD *)v4 = v5;
*(_QWORD *)(v4 + 8) = 0LL;
*(_BYTE *)(v4 + 16) = 0;
v6 = std::string::append(v18, ": ");
v11[0] = (char *)&v12;
v7 = (__int128 *)(v6 + 16);
if ( *(_QWORD *)v6 == v6 + 16 )
{
v12 = *v7;
}
else
{
v11[0] = *(char **)v6;
*(_QWORD *)&v12 = *(_QWORD *)v7;
}
v11[1] = *(char **)(v6 + 8);
*(_QWORD *)v6 = v7;
*(_QWORD *)(v6 + 8) = 0LL;
*(_BYTE *)(v6 + 16) = 0;
v8 = nglog::tools::ProgramInvocationShortName((nglog::tools *)v18);
v9 = std::string::append(v11, v8);
v15 = (char *)&v17;
v10 = (__int128 *)(v9 + 16);
if ( *(_QWORD *)v9 == v9 + 16 )
{
v17 = *v10;
}
else
{
v15 = *(char **)v9;
*(_QWORD *)&v17 = *(_QWORD *)v10;
}
v16 = *(_QWORD *)(v9 + 8);
*(_QWORD *)v9 = v10;
*(_QWORD *)(v9 + 8) = 0LL;
*(_BYTE *)(v9 + 16) = 0;
if ( (__int128 *)v11[0] != &v12 )
operator delete(v11[0], v12 + 1);
if ( v18[0] != &v19 )
operator delete(v18[0], v19 + 1);
if ( v20[0] != v21 )
operator delete(v20[0], v21[0] + 1LL);
nglog::LogDestination::hostname[abi:cxx11]();
v11[0] = (char *)&v12;
std::string::_M_construct<char *>(
v11,
nglog::LogDestination::hostname_[abi:cxx11],
nglog::LogDestination::hostname_[abi:cxx11] + qword_2FB38);
std::string::append(v11, "\n\n");
std::string::append(v11, a2, a3);
nglog::SendEmailInternal(v13[0], v15, v11[0], 0LL);
if ( (__int128 *)v11[0] != &v12 )
operator delete(v11[0], v12 + 1);
if ( v15 != (char *)&v17 )
operator delete(v15, v17 + 1);
if ( (_QWORD *)v13[0] != v14 )
operator delete(v13[0], v14[0] + 1LL);
}
}
|
MaybeLogToEmail:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xa8
MOV RBX,RDX
MOV R14,RSI
MOV EBP,EDI
CMP dword ptr [0x0012f558],EDI
JBE 0x001107b4
LEA RAX,[0x12f9e8]
CMP dword ptr [RAX],EBP
JG 0x00110a3c
LAB_001107b4:
LEA RAX,[0x12e5a0]
MOV RAX,qword ptr [RAX]
LEA RCX,[RSP + 0x38]
MOV qword ptr [RCX + -0x10],RCX
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
ADD RDX,RSI
LEA RDI,[RSP + 0x28]
CALL 0x00111274
CMP qword ptr [0x0012fb18],0x0
JZ 0x00110816
CMP qword ptr [RSP + 0x30],0x0
JZ 0x001107fe
LAB_001107ed:
LEA RSI,[0x122b69]
LEA RDI,[RSP + 0x28]
CALL 0x00107a10
LAB_001107fe:
MOV RSI,qword ptr [0x0012fb10]
MOV RDX,qword ptr [0x0012fb18]
LEA RDI,[RSP + 0x28]
CALL 0x00107140
LAB_00110816:
LEA R12,[RSP + 0x98]
MOV qword ptr [R12 + -0x10],R12
LAB_00110823:
LEA RSI,[0x122b6b]
LEA RDX,[0x122b71]
LEA RDI,[RSP + 0x88]
CALL 0x00109436
MOV EAX,EBP
LEA RCX,[0x12e5e0]
MOV RSI,qword ptr [RCX + RAX*0x8]
LAB_0011084b:
LEA RDI,[RSP + 0x88]
CALL 0x00107a10
LEA R15,[RSP + 0x78]
MOV qword ptr [R15 + -0x10],R15
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JZ 0x0011087f
MOV qword ptr [RSP + 0x68],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x78],RDX
JMP 0x00110886
LAB_0011087f:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R15],XMM0
LAB_00110886:
MOV RDX,qword ptr [RAX + 0x8]
LEA RDI,[RSP + 0x68]
MOV qword ptr [RDI + 0x8],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
LAB_001108a2:
LEA RSI,[0x122a00]
CALL 0x00107a10
LEA R13,[RSP + 0x18]
MOV qword ptr [R13 + -0x10],R13
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JZ 0x001108d5
MOV qword ptr [RSP + 0x8],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x18],RDX
JMP 0x001108dd
LAB_001108d5:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R13],XMM0
LAB_001108dd:
MOV RDX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x10],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
LAB_001108f5:
CALL 0x0012111f
LEA RDI,[RSP + 0x8]
MOV RSI,RAX
CALL 0x00107a10
LEA RBP,[RSP + 0x58]
MOV qword ptr [RBP + -0x10],RBP
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JZ 0x0011092e
MOV qword ptr [RSP + 0x48],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x58],RDX
JMP 0x00110935
LAB_0011092e:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [RBP],XMM0
LAB_00110935:
MOV RDX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x50],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R13
JZ 0x00110964
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00107540
LAB_00110964:
MOV RDI,qword ptr [RSP + 0x68]
CMP RDI,R15
JZ 0x0011097b
MOV RSI,qword ptr [RSP + 0x78]
INC RSI
CALL 0x00107540
LAB_0011097b:
MOV RDI,qword ptr [RSP + 0x88]
CMP RDI,R12
JZ 0x00110998
MOV RSI,qword ptr [RSP + 0x98]
INC RSI
CALL 0x00107540
LAB_00110998:
CALL 0x001094fa
LEA RDI,[RSP + 0x8]
MOV qword ptr [RDI],R13
MOV RSI,qword ptr [0x0012fb30]
MOV RDX,qword ptr [0x0012fb38]
ADD RDX,RSI
CALL 0x00111274
LAB_001109bb:
LEA RSI,[0x122b72]
LEA RDI,[RSP + 0x8]
CALL 0x00107a10
LEA RDI,[RSP + 0x8]
MOV RSI,R14
MOV RDX,RBX
CALL 0x001070c0
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP + 0x48]
MOV RDX,qword ptr [RSP + 0x8]
XOR ECX,ECX
CALL 0x0010b8db
LAB_001109f2:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R13
JZ 0x00110a09
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00107540
LAB_00110a09:
MOV RDI,qword ptr [RSP + 0x48]
CMP RDI,RBP
LEA RBX,[RSP + 0x38]
JZ 0x00110a25
MOV RSI,qword ptr [RSP + 0x58]
INC RSI
CALL 0x00107540
LAB_00110a25:
MOV RDI,qword ptr [RSP + 0x28]
CMP RDI,RBX
JZ 0x00110a3c
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x00107540
LAB_00110a3c:
ADD RSP,0xa8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* nglog::LogDestination::MaybeLogToEmail(nglog::LogSeverity, char const*, unsigned long) */
void nglog::LogDestination::MaybeLogToEmail(uint param_1,ulong param_2)
{
long *plVar1;
long *plVar2;
long *local_d0;
long local_c8;
long local_c0;
long lStack_b8;
long *local_b0;
long local_a8;
long local_a0 [2];
long *local_90;
long local_88;
long local_80;
long lStack_78;
long *local_70;
long local_68;
long local_60;
long lStack_58;
long *local_50 [2];
long local_40 [2];
if ((email_logging_severity_ <= param_1) || (fLI::FLAGS_logemaillevel <= (int)param_1)) {
local_b0 = local_a0;
std::__cxx11::string::_M_construct<char*>
(&local_b0,*(long *)fLS::FLAGS_alsologtoemail_abi_cxx11_,
*(long *)(fLS::FLAGS_alsologtoemail_abi_cxx11_ + 8) +
*(long *)fLS::FLAGS_alsologtoemail_abi_cxx11_);
if (DAT_0012fb18 != 0) {
if (local_a8 != 0) {
/* try { // try from 001107ed to 00110815 has its CatchHandler @ 00110a5a */
std::__cxx11::string::append((char *)&local_b0);
}
std::__cxx11::string::_M_append((char *)&local_b0,addresses__abi_cxx11_);
}
/* try { // try from 00110823 to 0011083d has its CatchHandler @ 00110a58 */
local_50[0] = local_40;
std::__cxx11::string::_M_construct<char_const*>(local_50,&DAT_00122b6b,&DAT_00122b71);
/* try { // try from 0011084b to 00110857 has its CatchHandler @ 00110a53 */
plVar1 = (long *)std::__cxx11::string::append((char *)local_50);
plVar2 = plVar1 + 2;
if ((long *)*plVar1 == plVar2) {
local_60 = *plVar2;
lStack_58 = plVar1[3];
local_70 = &local_60;
}
else {
local_60 = *plVar2;
local_70 = (long *)*plVar1;
}
local_68 = plVar1[1];
*plVar1 = (long)plVar2;
plVar1[1] = 0;
*(int1 *)(plVar1 + 2) = 0;
/* try { // try from 001108a2 to 001108ad has its CatchHandler @ 00110a4e */
plVar1 = (long *)std::__cxx11::string::append((char *)&local_70);
plVar2 = plVar1 + 2;
if ((long *)*plVar1 == plVar2) {
local_c0 = *plVar2;
lStack_b8 = plVar1[3];
local_d0 = &local_c0;
}
else {
local_c0 = *plVar2;
local_d0 = (long *)*plVar1;
}
local_c8 = plVar1[1];
*plVar1 = (long)plVar2;
plVar1[1] = 0;
*(int1 *)(plVar1 + 2) = 0;
/* try { // try from 001108f5 to 00110906 has its CatchHandler @ 00110a64 */
tools::ProgramInvocationShortName();
plVar1 = (long *)std::__cxx11::string::append((char *)&local_d0);
plVar2 = plVar1 + 2;
if ((long *)*plVar1 == plVar2) {
local_80 = *plVar2;
lStack_78 = plVar1[3];
local_90 = &local_80;
}
else {
local_80 = *plVar2;
local_90 = (long *)*plVar1;
}
local_88 = plVar1[1];
*plVar1 = (long)plVar2;
plVar1[1] = 0;
*(int1 *)(plVar1 + 2) = 0;
if (local_d0 != &local_c0) {
operator_delete(local_d0,local_c0 + 1);
}
if (local_70 != &local_60) {
operator_delete(local_70,local_60 + 1);
}
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
/* try { // try from 00110998 to 001109ba has its CatchHandler @ 00110a5f */
hostname_abi_cxx11_();
local_d0 = &local_c0;
std::__cxx11::string::_M_construct<char*>
(&local_d0,hostname__abi_cxx11_,DAT_0012fb38 + hostname__abi_cxx11_);
/* try { // try from 001109bb to 001109f1 has its CatchHandler @ 00110aac */
std::__cxx11::string::append((char *)&local_d0);
std::__cxx11::string::append((char *)&local_d0,param_2);
SendEmailInternal((char *)local_b0,(char *)local_90,(char *)local_d0,false);
if (local_d0 != &local_c0) {
operator_delete(local_d0,local_c0 + 1);
}
if (local_90 != &local_80) {
operator_delete(local_90,local_80 + 1);
}
if (local_b0 != local_a0) {
operator_delete(local_b0,local_a0[0] + 1);
}
}
return;
}
|
|
12,150 |
google::protobuf::StripWhitespace(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*)
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/stubs/strutil.cc
|
void StripWhitespace(std::string *str) {
int str_length = str->length();
// Strip off leading whitespace.
int first = 0;
while (first < str_length && ascii_isspace(str->at(first))) {
++first;
}
// If entire string is white space.
if (first == str_length) {
str->clear();
return;
}
if (first > 0) {
str->erase(0, first);
str_length -= first;
}
// Strip off trailing whitespace.
int last = str_length - 1;
while (last >= 0 && ascii_isspace(str->at(last))) {
--last;
}
if (last != (str_length - 1) && last >= 0) {
str->erase(last + 1, std::string::npos);
}
}
|
O3
|
cpp
|
google::protobuf::StripWhitespace(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*):
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %r14
testl %r14d, %r14d
jle 0x179ed
movl %r14d, %eax
andl $0x7fffffff, %eax # imm = 0x7FFFFFFF
xorl %r15d, %r15d
cmpq %r15, %r14
je 0x17a03
movq (%rbx), %rcx
movzbl (%rcx,%r15), %ecx
leal -0x9(%rcx), %edx
cmpl $0x5, %edx
jae 0x17982
incq %r15
cmpq %r15, %rax
jne 0x1795f
jmp 0x179ef
cmpl $0x20, %ecx
je 0x17978
cmpl %r15d, %r14d
je 0x179ef
testq %r15, %r15
je 0x179a1
movl %r15d, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0xf0c0
subl %r15d, %r14d
testl %r14d, %r14d
jle 0x179fd
movq 0x8(%rbx), %rdx
movl %r14d, %eax
negq %rax
xorl %ecx, %ecx
leal -0x1(%r14), %esi
cmpq %rsi, %rdx
jbe 0x17a17
movq (%rbx), %rdi
movzbl (%rdi,%rsi), %esi
leal -0x9(%rsi), %r8d
cmpl $0x5, %r8d
jae 0x179d8
incq %rax
incl %ecx
decl %r14d
jg 0x179b2
jmp 0x179fd
cmpl $0x20, %esi
je 0x179cc
testl %ecx, %ecx
je 0x179fd
subq %rax, %rdi
negq %rax
movq %rax, 0x8(%rbx)
jmp 0x179fa
jne 0x179fd
movq $0x0, 0x8(%rbx)
movq (%rbx), %rdi
movb $0x0, (%rdi)
popq %rbx
popq %r14
popq %r15
retq
leaq 0x9e04d(%rip), %rdi # 0xb5a57
movq %r14, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0xf4c0
leaq 0x9e039(%rip), %rdi # 0xb5a57
jmp 0x17a10
|
_ZN6google8protobuf15StripWhitespaceEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r15
push r14
push rbx
mov rbx, rdi
mov r14, [rdi+8]
test r14d, r14d
jle loc_179ED
mov eax, r14d
and eax, 7FFFFFFFh
xor r15d, r15d
loc_1795F:
cmp r14, r15
jz loc_17A03
mov rcx, [rbx]
movzx ecx, byte ptr [rcx+r15]
lea edx, [rcx-9]
cmp edx, 5
jnb short loc_17982
loc_17978:
inc r15
cmp rax, r15
jnz short loc_1795F
jmp short loc_179EF
loc_17982:
cmp ecx, 20h ; ' '
jz short loc_17978
cmp r14d, r15d
jz short loc_179EF
test r15, r15
jz short loc_179A1
mov edx, r15d
mov rdi, rbx
xor esi, esi
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5eraseEmm; std::string::erase(ulong,ulong)
sub r14d, r15d
loc_179A1:
test r14d, r14d
jle short loc_179FD
mov rdx, [rbx+8]
mov eax, r14d
neg rax
xor ecx, ecx
loc_179B2:
lea esi, [r14-1]
cmp rdx, rsi
jbe short loc_17A17
mov rdi, [rbx]
movzx esi, byte ptr [rdi+rsi]
lea r8d, [rsi-9]
cmp r8d, 5
jnb short loc_179D8
loc_179CC:
inc rax
inc ecx
dec r14d
jg short loc_179B2
jmp short loc_179FD
loc_179D8:
cmp esi, 20h ; ' '
jz short loc_179CC
test ecx, ecx
jz short loc_179FD
sub rdi, rax
neg rax
mov [rbx+8], rax
jmp short loc_179FA
loc_179ED:
jnz short loc_179FD
loc_179EF:
mov qword ptr [rbx+8], 0
mov rdi, [rbx]
loc_179FA:
mov byte ptr [rdi], 0
loc_179FD:
pop rbx
pop r14
pop r15
retn
loc_17A03:
lea rdi, aBasicStringAtN; "basic_string::at: __n (which is %zu) >="...
mov rsi, r14
mov rdx, r14
loc_17A10:
xor eax, eax
call __ZSt24__throw_out_of_range_fmtPKcz; std::__throw_out_of_range_fmt(char const*,...)
loc_17A17:
lea rdi, aBasicStringAtN; "basic_string::at: __n (which is %zu) >="...
jmp short loc_17A10
|
void google::protobuf::StripWhitespace(_QWORD *a1)
{
long long v2; // r14
long long v3; // r15
int v4; // ecx
unsigned long long v5; // rdx
long long v6; // rax
int v7; // ecx
unsigned long long v8; // rsi
int v9; // esi
bool v10; // cc
_BYTE *v11; // rdi
v2 = a1[1];
if ( (int)v2 <= 0 )
{
if ( (_DWORD)v2 )
return;
goto LABEL_21;
}
v3 = 0LL;
while ( 1 )
{
if ( v2 == v3 )
std::__throw_out_of_range_fmt("basic_string::at: __n (which is %zu) >= this->size() (which is %zu)", v2, v2);
v4 = *(unsigned __int8 *)(*a1 + v3);
if ( (unsigned int)(v4 - 9) >= 5 && v4 != 32 )
break;
if ( (a1[1] & 0x7FFFFFFFLL) == ++v3 )
goto LABEL_21;
}
if ( (_DWORD)v2 == (_DWORD)v3 )
{
LABEL_21:
a1[1] = 0LL;
v11 = (_BYTE *)*a1;
goto LABEL_22;
}
if ( v3 )
{
std::string::erase(a1, 0LL, (unsigned int)v3);
LODWORD(v2) = v2 - v3;
}
if ( (int)v2 > 0 )
{
v5 = a1[1];
v6 = -(long long)(unsigned int)v2;
v7 = 0;
while ( 1 )
{
v8 = (unsigned int)(v2 - 1);
if ( v5 <= v8 )
std::__throw_out_of_range_fmt("basic_string::at: __n (which is %zu) >= this->size() (which is %zu)", v8, v5);
v9 = *(unsigned __int8 *)(*a1 + v8);
if ( (unsigned int)(v9 - 9) >= 5 && v9 != 32 )
break;
++v6;
++v7;
v10 = (int)v2 <= 1;
LODWORD(v2) = v2 - 1;
if ( v10 )
return;
}
if ( v7 )
{
v11 = (_BYTE *)(*a1 - v6);
a1[1] = -v6;
LABEL_22:
*v11 = 0;
}
}
}
|
StripWhitespace:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDI
MOV R14,qword ptr [RDI + 0x8]
TEST R14D,R14D
JLE 0x001179ed
MOV EAX,R14D
AND EAX,0x7fffffff
XOR R15D,R15D
LAB_0011795f:
CMP R14,R15
JZ 0x00117a03
MOV RCX,qword ptr [RBX]
MOVZX ECX,byte ptr [RCX + R15*0x1]
LEA EDX,[RCX + -0x9]
CMP EDX,0x5
JNC 0x00117982
LAB_00117978:
INC R15
CMP RAX,R15
JNZ 0x0011795f
JMP 0x001179ef
LAB_00117982:
CMP ECX,0x20
JZ 0x00117978
CMP R14D,R15D
JZ 0x001179ef
TEST R15,R15
JZ 0x001179a1
MOV EDX,R15D
MOV RDI,RBX
XOR ESI,ESI
CALL 0x0010f0c0
SUB R14D,R15D
LAB_001179a1:
TEST R14D,R14D
JLE 0x001179fd
MOV RDX,qword ptr [RBX + 0x8]
MOV EAX,R14D
NEG RAX
XOR ECX,ECX
LAB_001179b2:
LEA ESI,[R14 + -0x1]
CMP RDX,RSI
JBE 0x00117a17
MOV RDI,qword ptr [RBX]
MOVZX ESI,byte ptr [RDI + RSI*0x1]
LEA R8D,[RSI + -0x9]
CMP R8D,0x5
JNC 0x001179d8
LAB_001179cc:
INC RAX
INC ECX
DEC R14D
JG 0x001179b2
JMP 0x001179fd
LAB_001179d8:
CMP ESI,0x20
JZ 0x001179cc
TEST ECX,ECX
JZ 0x001179fd
SUB RDI,RAX
NEG RAX
MOV qword ptr [RBX + 0x8],RAX
JMP 0x001179fa
LAB_001179ed:
JNZ 0x001179fd
LAB_001179ef:
MOV qword ptr [RBX + 0x8],0x0
MOV RDI,qword ptr [RBX]
LAB_001179fa:
MOV byte ptr [RDI],0x0
LAB_001179fd:
POP RBX
POP R14
POP R15
RET
LAB_00117a03:
LEA RDI,[0x1b5a57]
MOV RSI,R14
MOV RDX,R14
LAB_00117a10:
XOR EAX,EAX
CALL 0x0010f4c0
LAB_00117a17:
LEA RDI,[0x1b5a57]
JMP 0x00117a10
|
/* google::protobuf::StripWhitespace(std::__cxx11::string*) */
void google::protobuf::StripWhitespace(string *param_1)
{
byte bVar1;
int iVar2;
long lVar3;
int iVar4;
ulong uVar5;
ulong uVar6;
int1 *puVar7;
uint uVar8;
ulong uVar9;
uVar5 = *(ulong *)(param_1 + 8);
uVar8 = (uint)uVar5;
if ((int)uVar8 < 1) {
if (uVar8 != 0) {
return;
}
}
else {
uVar9 = 0;
do {
uVar6 = uVar5;
if (uVar5 == uVar9) goto LAB_00117a10;
if ((4 < *(byte *)(*(long *)param_1 + uVar9) - 9) &&
(*(byte *)(*(long *)param_1 + uVar9) != 0x20)) {
if (uVar8 != (uint)uVar9) {
if (uVar9 != 0) {
std::__cxx11::string::erase((ulong)param_1,0);
uVar6 = (ulong)(uVar8 - (uint)uVar9);
}
if ((int)uVar6 < 1) {
return;
}
uVar5 = *(ulong *)(param_1 + 8);
lVar3 = -(uVar6 & 0xffffffff);
iVar4 = 0;
goto LAB_001179b2;
}
break;
}
uVar9 = uVar9 + 1;
} while ((uVar8 & 0x7fffffff) != uVar9);
}
*(int8 *)(param_1 + 8) = 0;
puVar7 = *(int1 **)param_1;
LAB_001179fa:
*puVar7 = 0;
return;
LAB_001179b2:
iVar2 = (int)uVar6;
uVar6 = (ulong)(iVar2 - 1);
if (uVar5 <= uVar6) {
LAB_00117a10:
/* WARNING: Subroutine does not return */
std::__throw_out_of_range_fmt
("basic_string::at: __n (which is %zu) >= this->size() (which is %zu)",uVar6,uVar5);
}
bVar1 = *(byte *)(*(long *)param_1 + uVar6);
if ((4 < bVar1 - 9) && (bVar1 != 0x20)) {
if (iVar4 == 0) {
return;
}
puVar7 = (int1 *)(*(long *)param_1 - lVar3);
*(long *)(param_1 + 8) = -lVar3;
goto LAB_001179fa;
}
lVar3 = lVar3 + 1;
iVar4 = iVar4 + 1;
uVar6 = (ulong)(iVar2 - 1U);
if (iVar2 - 1U == 0 || iVar2 < 1) {
return;
}
goto LAB_001179b2;
}
|
|
12,151 |
google::protobuf::DescriptorBuilder::BuildOneof(google::protobuf::OneofDescriptorProto const&, google::protobuf::Descriptor*, google::protobuf::OneofDescriptor*, google::protobuf::internal::FlatAllocator&)
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
|
void DescriptorBuilder::BuildOneof(const OneofDescriptorProto& proto,
Descriptor* parent, OneofDescriptor* result,
internal::FlatAllocator& alloc) {
result->all_names_ =
AllocateNameStrings(parent->full_name(), proto.name(), alloc);
ValidateSymbolName(proto.name(), result->full_name(), proto);
result->containing_type_ = parent;
// We need to fill these in later.
result->field_count_ = 0;
result->fields_ = nullptr;
result->options_ = nullptr;
// Copy options.
if (proto.has_options()) {
AllocateOptions(proto.options(), result,
OneofDescriptorProto::kOptionsFieldNumber,
"google.protobuf.OneofOptions", alloc);
}
AddSymbol(result->full_name(), parent, result->name(), proto, Symbol(result));
}
|
O0
|
cpp
|
google::protobuf::DescriptorBuilder::BuildOneof(google::protobuf::OneofDescriptorProto const&, google::protobuf::Descriptor*, google::protobuf::OneofDescriptor*, google::protobuf::internal::FlatAllocator&):
subq $0xb8, %rsp
movq %rdi, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movq %rdx, 0xa0(%rsp)
movq %rcx, 0x98(%rsp)
movq %r8, 0x90(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0xa0(%rsp), %rdi
callq 0x163d0
movq %rax, 0x38(%rsp)
movq 0xa8(%rsp), %rdi
callq 0x78f40
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdi
movq %rax, %rdx
movq 0x90(%rsp), %rcx
callq 0x51810
movq %rax, %rcx
movq 0x98(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0xa8(%rsp), %rdi
callq 0x78f40
movq %rax, 0x48(%rsp)
movq 0x98(%rsp), %rdi
callq 0x78f50
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rsi
movq %rax, %rdx
movq 0xa8(%rsp), %rcx
callq 0x47170
movq 0xa0(%rsp), %rcx
movq 0x98(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x98(%rsp), %rax
movl $0x0, 0x4(%rax)
movq 0x98(%rsp), %rax
movq $0x0, 0x20(%rax)
movq 0x98(%rsp), %rax
movq $0x0, 0x18(%rax)
movq 0xa8(%rsp), %rdi
callq 0x78f70
testb $0x1, %al
jne 0x51f76
jmp 0x5202e
movq 0xa8(%rsp), %rdi
callq 0x79080
movq %rax, 0x20(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x28(%rsp)
leaq 0x6f(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x13760
movq 0x30(%rsp), %rdx
leaq 0x19c5da(%rip), %rsi # 0x1ee58a
leaq 0x70(%rsp), %rdi
callq 0x135f0
jmp 0x51fbc
movq 0x28(%rsp), %rdx
movq 0x20(%rsp), %rsi
movq 0x40(%rsp), %rdi
movq 0x90(%rsp), %r9
movl $0x2, %ecx
leaq 0x70(%rsp), %r8
callq 0x78f90
jmp 0x51fe4
leaq 0x70(%rsp), %rdi
callq 0x13290
leaq 0x6f(%rsp), %rdi
callq 0x134d0
jmp 0x5202e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x60(%rsp)
movl %eax, 0x5c(%rsp)
jmp 0x52022
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x60(%rsp)
movl %eax, 0x5c(%rsp)
leaq 0x70(%rsp), %rdi
callq 0x13290
leaq 0x6f(%rsp), %rdi
callq 0x134d0
jmp 0x520a7
movq 0x98(%rsp), %rdi
callq 0x78f50
movq %rax, (%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x98(%rsp), %rdi
callq 0x764b0
movq %rax, 0x10(%rsp)
movq 0xa8(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x98(%rsp), %rsi
leaq 0x50(%rsp), %rdi
callq 0x79090
movq 0x40(%rsp), %rdi
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq 0x10(%rsp), %rcx
movq 0x18(%rsp), %r8
movq 0x50(%rsp), %r9
callq 0x461e0
addq $0xb8, %rsp
retq
movq 0x60(%rsp), %rdi
callq 0x13750
nopw %cs:(%rax,%rax)
|
_ZN6google8protobuf17DescriptorBuilder10BuildOneofERKNS0_20OneofDescriptorProtoEPNS0_10DescriptorEPNS0_15OneofDescriptorERNS0_8internal13FlatAllocatorE:
sub rsp, 0B8h
mov [rsp+0B8h+var_8], rdi
mov [rsp+0B8h+var_10], rsi
mov [rsp+0B8h+var_18], rdx
mov [rsp+0B8h+var_20], rcx
mov [rsp+0B8h+var_28], r8
mov rax, [rsp+0B8h+var_8]
mov [rsp+0B8h+var_78], rax
mov rdi, [rsp+0B8h+var_18]
call _ZNK6google8protobuf10Descriptor9full_nameB5cxx11Ev; google::protobuf::Descriptor::full_name(void)
mov [rsp+0B8h+var_80], rax
mov rdi, [rsp+0B8h+var_10]
call _ZNK6google8protobuf20OneofDescriptorProto4nameB5cxx11Ev; google::protobuf::OneofDescriptorProto::name(void)
mov rsi, [rsp+0B8h+var_80]
mov rdi, [rsp+0B8h+var_78]
mov rdx, rax
mov rcx, [rsp+0B8h+var_28]
call _ZN6google8protobuf17DescriptorBuilder19AllocateNameStringsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_RNS0_8internal13FlatAllocatorE; google::protobuf::DescriptorBuilder::AllocateNameStrings(std::string const&,std::string const&,google::protobuf::internal::FlatAllocator &)
mov rcx, rax
mov rax, [rsp+0B8h+var_20]
mov [rax+8], rcx
mov rdi, [rsp+0B8h+var_10]
call _ZNK6google8protobuf20OneofDescriptorProto4nameB5cxx11Ev; google::protobuf::OneofDescriptorProto::name(void)
mov [rsp+0B8h+var_70], rax
mov rdi, [rsp+0B8h+var_20]
call _ZNK6google8protobuf15OneofDescriptor9full_nameB5cxx11Ev; google::protobuf::OneofDescriptor::full_name(void)
mov rdi, [rsp+0B8h+var_78]
mov rsi, [rsp+0B8h+var_70]
mov rdx, rax
mov rcx, [rsp+0B8h+var_10]
call _ZN6google8protobuf17DescriptorBuilder18ValidateSymbolNameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_RKNS0_7MessageE; google::protobuf::DescriptorBuilder::ValidateSymbolName(std::string const&,std::string const&,google::protobuf::Message const&)
mov rcx, [rsp+0B8h+var_18]
mov rax, [rsp+0B8h+var_20]
mov [rax+10h], rcx
mov rax, [rsp+0B8h+var_20]
mov dword ptr [rax+4], 0
mov rax, [rsp+0B8h+var_20]
mov qword ptr [rax+20h], 0
mov rax, [rsp+0B8h+var_20]
mov qword ptr [rax+18h], 0
mov rdi, [rsp+0B8h+var_10]; this
call _ZNK6google8protobuf20OneofDescriptorProto11has_optionsEv; google::protobuf::OneofDescriptorProto::has_options(void)
test al, 1
jnz short loc_51F76
jmp loc_5202E
loc_51F76:
mov rdi, [rsp+0B8h+var_10]; this
call _ZNK6google8protobuf20OneofDescriptorProto7optionsEv; google::protobuf::OneofDescriptorProto::options(void)
mov [rsp+0B8h+var_98], rax
mov rax, [rsp+0B8h+var_20]
mov [rsp+0B8h+var_90], rax
lea rdi, [rsp+0B8h+var_49]
mov [rsp+0B8h+var_88], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, [rsp+0B8h+var_88]
lea rsi, aGoogleProtobuf_19; "google.protobuf.OneofOptions"
lea rdi, [rsp+0B8h+var_48]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EPKcRKS3_; std::string::basic_string(char const*,std::allocator<char> const&)
jmp short $+2
loc_51FBC:
mov rdx, [rsp+0B8h+var_90]
mov rsi, [rsp+0B8h+var_98]
mov rdi, [rsp+0B8h+var_78]
mov r9, [rsp+0B8h+var_28]
mov ecx, 2
lea r8, [rsp+0B8h+var_48]
call _ZN6google8protobuf17DescriptorBuilder15AllocateOptionsINS0_15OneofDescriptorEEEvRKNT_11OptionsTypeEPS4_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERNS0_8internal13FlatAllocatorE; google::protobuf::DescriptorBuilder::AllocateOptions<google::protobuf::OneofDescriptor>(google::protobuf::OneofDescriptor::OptionsType const&,google::protobuf::OneofDescriptor::OptionsType*,int,std::string const&,google::protobuf::internal::FlatAllocator &)
jmp short $+2
loc_51FE4:
lea rdi, [rsp+0B8h+var_48]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+0B8h+var_49]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_5202E
mov rcx, rax
mov eax, edx
mov [rsp+arg_58], rcx
mov [rsp+arg_54], eax
jmp short loc_52022
mov rcx, rax
mov eax, edx
mov [rsp+arg_58], rcx
mov [rsp+arg_54], eax
lea rdi, [rsp+arg_68]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_52022:
lea rdi, [rsp+arg_67]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_520A7
loc_5202E:
mov rdi, [rsp+0B8h+var_20]
call _ZNK6google8protobuf15OneofDescriptor9full_nameB5cxx11Ev; google::protobuf::OneofDescriptor::full_name(void)
mov [rsp+0B8h+var_B8], rax
mov rax, [rsp+0B8h+var_18]
mov [rsp+0B8h+var_B0], rax
mov rdi, [rsp+0B8h+var_20]
call _ZNK6google8protobuf15OneofDescriptor4nameB5cxx11Ev; google::protobuf::OneofDescriptor::name(void)
mov [rsp+0B8h+var_A8], rax
mov rax, [rsp+0B8h+var_10]
mov [rsp+0B8h+var_A0], rax
mov rsi, [rsp+0B8h+var_20]; google::protobuf::OneofDescriptor *
lea rdi, [rsp+0B8h+var_68]; this
call _ZN6google8protobuf6SymbolC2EPNS0_15OneofDescriptorE; google::protobuf::Symbol::Symbol(google::protobuf::OneofDescriptor *)
mov rdi, [rsp+0B8h+var_78]
mov rsi, [rsp+0B8h+var_B8]
mov rdx, [rsp+0B8h+var_B0]
mov rcx, [rsp+0B8h+var_A8]
mov r8, [rsp+0B8h+var_A0]
mov r9, [rsp+0B8h+var_68]
call _ZN6google8protobuf17DescriptorBuilder9AddSymbolERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKvS9_RKNS0_7MessageENS0_6SymbolE; google::protobuf::DescriptorBuilder::AddSymbol(std::string const&,void const*,std::string const&,google::protobuf::Message const&,google::protobuf::Symbol)
add rsp, 0B8h
retn
loc_520A7:
mov rdi, [rsp+arg_58]
call __Unwind_Resume
|
char google::protobuf::DescriptorBuilder::BuildOneof(
google::protobuf::DescriptorBuilder *this,
const google::protobuf::OneofDescriptorProto *a2,
google::protobuf::Descriptor *a3,
google::protobuf::OneofDescriptor *a4,
google::protobuf::internal::FlatAllocator *a5)
{
long long v5; // rax
long long v6; // rax
void *v8; // [rsp+0h] [rbp-B8h]
long long v9; // [rsp+8h] [rbp-B0h]
long long v10; // [rsp+10h] [rbp-A8h]
google::protobuf::OneofDescriptorProto *v11; // [rsp+18h] [rbp-A0h]
int v12; // [rsp+20h] [rbp-98h]
int v13; // [rsp+28h] [rbp-90h]
long long v14; // [rsp+38h] [rbp-80h]
long long v15; // [rsp+48h] [rbp-70h]
long long v16[3]; // [rsp+50h] [rbp-68h] BYREF
char v17; // [rsp+6Fh] [rbp-49h] BYREF
_BYTE v18[32]; // [rsp+70h] [rbp-48h] BYREF
google::protobuf::internal::FlatAllocator *v19; // [rsp+90h] [rbp-28h]
google::protobuf::OneofDescriptor *v20; // [rsp+98h] [rbp-20h]
google::protobuf::Descriptor *v21; // [rsp+A0h] [rbp-18h]
google::protobuf::OneofDescriptorProto *v22; // [rsp+A8h] [rbp-10h]
google::protobuf::DescriptorBuilder *v23; // [rsp+B0h] [rbp-8h]
v23 = this;
v22 = a2;
v21 = a3;
v20 = a4;
v19 = a5;
v14 = google::protobuf::Descriptor::full_name[abi:cxx11]((long long)a3);
v5 = google::protobuf::OneofDescriptorProto::name[abi:cxx11](a2);
*((_QWORD *)v20 + 1) = google::protobuf::DescriptorBuilder::AllocateNameStrings((long long)this, v14, v5, (long long)v19);
v15 = google::protobuf::OneofDescriptorProto::name[abi:cxx11](v22);
v6 = google::protobuf::OneofDescriptor::full_name[abi:cxx11](v20);
google::protobuf::DescriptorBuilder::ValidateSymbolName((long long)this, v15, v6, v22);
*((_QWORD *)v20 + 2) = v21;
*((_DWORD *)v20 + 1) = 0;
*((_QWORD *)v20 + 4) = 0LL;
*((_QWORD *)v20 + 3) = 0LL;
if ( (google::protobuf::OneofDescriptorProto::has_options(v22) & 1) != 0 )
{
v12 = google::protobuf::OneofDescriptorProto::options(v22);
v13 = (int)v20;
std::allocator<char>::allocator(&v17, v15);
std::string::basic_string(v18, "google.protobuf.OneofOptions", &v17);
google::protobuf::DescriptorBuilder::AllocateOptions<google::protobuf::OneofDescriptor>(
(_DWORD)this,
v12,
v13,
2,
(unsigned int)v18,
(_DWORD)v19);
std::string::~string(v18);
std::allocator<char>::~allocator(&v17);
}
v8 = (void *)google::protobuf::OneofDescriptor::full_name[abi:cxx11](v20);
v9 = (long long)v21;
v10 = google::protobuf::OneofDescriptor::name[abi:cxx11](v20);
v11 = v22;
google::protobuf::Symbol::Symbol((google::protobuf::Symbol *)v16, v20);
return google::protobuf::DescriptorBuilder::AddSymbol((long long)this, v8, v9, v10, (long long)v11, v16[0]);
}
|
BuildOneof:
SUB RSP,0xb8
MOV qword ptr [RSP + 0xb0],RDI
MOV qword ptr [RSP + 0xa8],RSI
MOV qword ptr [RSP + 0xa0],RDX
MOV qword ptr [RSP + 0x98],RCX
MOV qword ptr [RSP + 0x90],R8
MOV RAX,qword ptr [RSP + 0xb0]
MOV qword ptr [RSP + 0x40],RAX
MOV RDI,qword ptr [RSP + 0xa0]
CALL 0x001163d0
MOV qword ptr [RSP + 0x38],RAX
MOV RDI,qword ptr [RSP + 0xa8]
CALL 0x00178f40
MOV RSI,qword ptr [RSP + 0x38]
MOV RDI,qword ptr [RSP + 0x40]
MOV RDX,RAX
MOV RCX,qword ptr [RSP + 0x90]
CALL 0x00151810
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x98]
MOV qword ptr [RAX + 0x8],RCX
MOV RDI,qword ptr [RSP + 0xa8]
CALL 0x00178f40
MOV qword ptr [RSP + 0x48],RAX
MOV RDI,qword ptr [RSP + 0x98]
CALL 0x00178f50
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x48]
MOV RDX,RAX
MOV RCX,qword ptr [RSP + 0xa8]
CALL 0x00147170
MOV RCX,qword ptr [RSP + 0xa0]
MOV RAX,qword ptr [RSP + 0x98]
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RSP + 0x98]
MOV dword ptr [RAX + 0x4],0x0
MOV RAX,qword ptr [RSP + 0x98]
MOV qword ptr [RAX + 0x20],0x0
MOV RAX,qword ptr [RSP + 0x98]
MOV qword ptr [RAX + 0x18],0x0
MOV RDI,qword ptr [RSP + 0xa8]
CALL 0x00178f70
TEST AL,0x1
JNZ 0x00151f76
JMP 0x0015202e
LAB_00151f76:
MOV RDI,qword ptr [RSP + 0xa8]
CALL 0x00179080
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RSP + 0x98]
MOV qword ptr [RSP + 0x28],RAX
LEA RDI,[RSP + 0x6f]
MOV qword ptr [RSP + 0x30],RDI
CALL 0x00113760
MOV RDX,qword ptr [RSP + 0x30]
LAB_00151fa9:
LEA RSI,[0x2ee58a]
LEA RDI,[RSP + 0x70]
CALL 0x001135f0
JMP 0x00151fbc
LAB_00151fbc:
MOV RDX,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP + 0x20]
MOV RDI,qword ptr [RSP + 0x40]
MOV R9,qword ptr [RSP + 0x90]
LAB_00151fd3:
MOV ECX,0x2
LEA R8,[RSP + 0x70]
CALL 0x00178f90
LAB_00151fe2:
JMP 0x00151fe4
LAB_00151fe4:
LEA RDI,[RSP + 0x70]
CALL 0x00113290
LEA RDI,[RSP + 0x6f]
CALL 0x001134d0
JMP 0x0015202e
LAB_0015202e:
MOV RDI,qword ptr [RSP + 0x98]
CALL 0x00178f50
MOV qword ptr [RSP],RAX
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x98]
CALL 0x001764b0
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0xa8]
MOV qword ptr [RSP + 0x18],RAX
MOV RSI,qword ptr [RSP + 0x98]
LEA RDI,[RSP + 0x50]
CALL 0x00179090
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP]
MOV RDX,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RSP + 0x10]
MOV R8,qword ptr [RSP + 0x18]
MOV R9,qword ptr [RSP + 0x50]
CALL 0x001461e0
ADD RSP,0xb8
RET
|
/* google::protobuf::DescriptorBuilder::BuildOneof(google::protobuf::OneofDescriptorProto const&,
google::protobuf::Descriptor*, google::protobuf::OneofDescriptor*,
google::protobuf::internal::FlatAllocator&) */
void __thiscall
google::protobuf::DescriptorBuilder::BuildOneof
(DescriptorBuilder *this,OneofDescriptorProto *param_1,Descriptor *param_2,
OneofDescriptor *param_3,FlatAllocator *param_4)
{
OneofDescriptor *pOVar1;
Descriptor *pDVar2;
OneofDescriptorProto *pOVar3;
string *psVar4;
string *psVar5;
int8 uVar6;
ulong uVar7;
OptionsType *pOVar8;
int8 uVar9;
int8 local_68 [3];
allocator local_49;
string local_48 [32];
FlatAllocator *local_28;
OneofDescriptor *local_20;
Descriptor *local_18;
OneofDescriptorProto *local_10;
DescriptorBuilder *local_8;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
local_8 = this;
psVar4 = (string *)Descriptor::full_name_abi_cxx11_(param_2);
psVar5 = (string *)OneofDescriptorProto::name_abi_cxx11_(local_10);
uVar6 = AllocateNameStrings(this,psVar4,psVar5,local_28);
*(int8 *)(local_20 + 8) = uVar6;
psVar4 = (string *)OneofDescriptorProto::name_abi_cxx11_(local_10);
psVar5 = (string *)OneofDescriptor::full_name_abi_cxx11_(local_20);
ValidateSymbolName(this,psVar4,psVar5,(Message *)local_10);
*(Descriptor **)(local_20 + 0x10) = local_18;
*(int4 *)(local_20 + 4) = 0;
*(int8 *)(local_20 + 0x20) = 0;
*(int8 *)(local_20 + 0x18) = 0;
uVar7 = OneofDescriptorProto::has_options(local_10);
if ((uVar7 & 1) != 0) {
pOVar8 = (OptionsType *)OneofDescriptorProto::options(local_10);
pOVar1 = local_20;
std::allocator<char>::allocator();
/* try { // try from 00151fa9 to 00151fb9 has its CatchHandler @ 00151ffa */
std::__cxx11::string::string(local_48,"google.protobuf.OneofOptions",&local_49);
/* try { // try from 00151fd3 to 00151fe1 has its CatchHandler @ 0015200a */
AllocateOptions<google::protobuf::OneofDescriptor>(this,pOVar8,pOVar1,2,local_48,local_28);
std::__cxx11::string::~string(local_48);
std::allocator<char>::~allocator((allocator<char> *)&local_49);
}
uVar6 = OneofDescriptor::full_name_abi_cxx11_(local_20);
pDVar2 = local_18;
uVar9 = OneofDescriptor::name_abi_cxx11_(local_20);
pOVar3 = local_10;
Symbol::Symbol((Symbol *)local_68,local_20);
AddSymbol(this,uVar6,pDVar2,uVar9,pOVar3,local_68[0]);
return;
}
|
|
12,152 |
minja::UnaryOpExpr::UnaryOpExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, minja::UnaryOpExpr::Op)
|
monkey531[P]llama/common/minja.hpp
|
Expression(const Location & location) : location(location) {}
|
O1
|
cpp
|
minja::UnaryOpExpr::UnaryOpExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, minja::UnaryOpExpr::Op):
leaq 0x9c019(%rip), %rax # 0x12d3b8
addq $0x10, %rax
movq %rax, (%rdi)
movq (%rsi), %rax
movq %rax, 0x8(%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x10(%rdi)
testq %rax, %rax
je 0x913d0
movq 0x9dbc7(%rip), %r8 # 0x12ef88
cmpb $0x0, (%r8)
je 0x913cc
incl 0x8(%rax)
jmp 0x913d0
lock
incl 0x8(%rax)
movq 0x10(%rsi), %rax
movq %rax, 0x18(%rdi)
leaq 0x9c309(%rip), %rax # 0x12d6e8
addq $0x10, %rax
movq %rax, (%rdi)
xorl %eax, %eax
movq %rax, 0x28(%rdi)
movups (%rdx), %xmm0
movq %rax, 0x8(%rdx)
movups %xmm0, 0x20(%rdi)
movq %rax, (%rdx)
movq %rax, 0x38(%rdi)
movups (%rcx), %xmm0
movq %rax, 0x8(%rcx)
movups %xmm0, 0x30(%rdi)
movq %rax, (%rcx)
retq
nop
|
_ZN5minja9SliceExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEES7_:
lea rax, _ZTVN5minja10ExpressionE; `vtable for'minja::Expression
add rax, 10h
mov [rdi], rax
mov rax, [rsi]
mov [rdi+8], rax
mov rax, [rsi+8]
mov [rdi+10h], rax
test rax, rax
jz short loc_913D0
mov r8, cs:__libc_single_threaded_ptr
cmp byte ptr [r8], 0
jz short loc_913CC
inc dword ptr [rax+8]
jmp short loc_913D0
loc_913CC:
lock inc dword ptr [rax+8]
loc_913D0:
mov rax, [rsi+10h]
mov [rdi+18h], rax
lea rax, _ZTVN5minja9SliceExprE; `vtable for'minja::SliceExpr
add rax, 10h
mov [rdi], rax
xor eax, eax
mov [rdi+28h], rax
movups xmm0, xmmword ptr [rdx]
mov [rdx+8], rax
movups xmmword ptr [rdi+20h], xmm0
mov [rdx], rax
mov [rdi+38h], rax
movups xmm0, xmmword ptr [rcx]
mov [rcx+8], rax
movups xmmword ptr [rdi+30h], xmm0
mov [rcx], rax
retn
|
long long minja::SliceExpr::SliceExpr(long long a1, _QWORD *a2, __int128 *a3, __int128 *a4)
{
long long v4; // rax
long long result; // rax
__int128 v6; // xmm0
__int128 v7; // xmm0
*(_QWORD *)a1 = &`vtable for'minja::Expression + 2;
*(_QWORD *)(a1 + 8) = *a2;
v4 = a2[1];
*(_QWORD *)(a1 + 16) = v4;
if ( v4 )
{
if ( _libc_single_threaded )
++*(_DWORD *)(v4 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v4 + 8));
}
*(_QWORD *)(a1 + 24) = a2[2];
*(_QWORD *)a1 = &`vtable for'minja::SliceExpr + 2;
result = 0LL;
*(_QWORD *)(a1 + 40) = 0LL;
v6 = *a3;
*((_QWORD *)a3 + 1) = 0LL;
*(_OWORD *)(a1 + 32) = v6;
*(_QWORD *)a3 = 0LL;
*(_QWORD *)(a1 + 56) = 0LL;
v7 = *a4;
*((_QWORD *)a4 + 1) = 0LL;
*(_OWORD *)(a1 + 48) = v7;
*(_QWORD *)a4 = 0LL;
return result;
}
|
SliceExpr:
LEA RAX,[0x22d3b8]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
MOV RAX,qword ptr [RSI]
MOV qword ptr [RDI + 0x8],RAX
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RDI + 0x10],RAX
TEST RAX,RAX
JZ 0x001913d0
MOV R8,qword ptr [0x0022ef88]
CMP byte ptr [R8],0x0
JZ 0x001913cc
INC dword ptr [RAX + 0x8]
JMP 0x001913d0
LAB_001913cc:
INC.LOCK dword ptr [RAX + 0x8]
LAB_001913d0:
MOV RAX,qword ptr [RSI + 0x10]
MOV qword ptr [RDI + 0x18],RAX
LEA RAX,[0x22d6e8]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x28],RAX
MOVUPS XMM0,xmmword ptr [RDX]
MOV qword ptr [RDX + 0x8],RAX
MOVUPS xmmword ptr [RDI + 0x20],XMM0
MOV qword ptr [RDX],RAX
MOV qword ptr [RDI + 0x38],RAX
MOVUPS XMM0,xmmword ptr [RCX]
MOV qword ptr [RCX + 0x8],RAX
MOVUPS xmmword ptr [RDI + 0x30],XMM0
MOV qword ptr [RCX],RAX
RET
|
/* minja::SliceExpr::SliceExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&,
std::shared_ptr<minja::Expression>&&) */
void __thiscall
minja::SliceExpr::SliceExpr
(SliceExpr *this,Location *param_1,shared_ptr *param_2,shared_ptr *param_3)
{
long lVar1;
int8 uVar2;
*(int ***)this = &PTR___cxa_pure_virtual_0022d3c8;
*(int8 *)(this + 8) = *(int8 *)param_1;
lVar1 = *(long *)(param_1 + 8);
*(long *)(this + 0x10) = lVar1;
if (lVar1 != 0) {
if (*PTR___libc_single_threaded_0022ef88 == '\0') {
LOCK();
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
UNLOCK();
}
else {
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
}
}
*(int8 *)(this + 0x18) = *(int8 *)(param_1 + 0x10);
*(int ***)this = &PTR_do_evaluate_0022d6f8;
*(int8 *)(this + 0x28) = 0;
uVar2 = *(int8 *)(param_2 + 8);
*(int8 *)(param_2 + 8) = 0;
*(int8 *)(this + 0x20) = *(int8 *)param_2;
*(int8 *)(this + 0x28) = uVar2;
*(int8 *)param_2 = 0;
*(int8 *)(this + 0x38) = 0;
uVar2 = *(int8 *)(param_3 + 8);
*(int8 *)(param_3 + 8) = 0;
*(int8 *)(this + 0x30) = *(int8 *)param_3;
*(int8 *)(this + 0x38) = uVar2;
*(int8 *)param_3 = 0;
return;
}
|
|
12,153 |
minja::UnaryOpExpr::UnaryOpExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, minja::UnaryOpExpr::Op)
|
monkey531[P]llama/common/minja.hpp
|
Expression(const Location & location) : location(location) {}
|
O3
|
cpp
|
minja::UnaryOpExpr::UnaryOpExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, minja::UnaryOpExpr::Op):
leaq 0x9a6af(%rip), %rax # 0x12a3b8
addq $0x10, %rax
movq %rax, (%rdi)
movq (%rsi), %rax
movq %rax, 0x8(%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x10(%rdi)
testq %rax, %rax
je 0x8fd3a
movq 0x9c25d(%rip), %r8 # 0x12bf88
cmpb $0x0, (%r8)
je 0x8fd36
incl 0x8(%rax)
jmp 0x8fd3a
lock
incl 0x8(%rax)
movq 0x10(%rsi), %rax
movq %rax, 0x18(%rdi)
leaq 0x9a99f(%rip), %rax # 0x12a6e8
addq $0x10, %rax
movq %rax, (%rdi)
xorl %eax, %eax
movq %rax, 0x28(%rdi)
movups (%rdx), %xmm0
movq %rax, 0x8(%rdx)
movups %xmm0, 0x20(%rdi)
movq %rax, (%rdx)
movq %rax, 0x38(%rdi)
movups (%rcx), %xmm0
movq %rax, 0x8(%rcx)
movups %xmm0, 0x30(%rdi)
movq %rax, (%rcx)
retq
nop
|
_ZN5minja9SliceExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEES7_:
lea rax, _ZTVN5minja10ExpressionE; `vtable for'minja::Expression
add rax, 10h
mov [rdi], rax
mov rax, [rsi]
mov [rdi+8], rax
mov rax, [rsi+8]
mov [rdi+10h], rax
test rax, rax
jz short loc_8FD3A
mov r8, cs:__libc_single_threaded_ptr
cmp byte ptr [r8], 0
jz short loc_8FD36
inc dword ptr [rax+8]
jmp short loc_8FD3A
loc_8FD36:
lock inc dword ptr [rax+8]
loc_8FD3A:
mov rax, [rsi+10h]
mov [rdi+18h], rax
lea rax, _ZTVN5minja9SliceExprE; `vtable for'minja::SliceExpr
add rax, 10h
mov [rdi], rax
xor eax, eax
mov [rdi+28h], rax
movups xmm0, xmmword ptr [rdx]
mov [rdx+8], rax
movups xmmword ptr [rdi+20h], xmm0
mov [rdx], rax
mov [rdi+38h], rax
movups xmm0, xmmword ptr [rcx]
mov [rcx+8], rax
movups xmmword ptr [rdi+30h], xmm0
mov [rcx], rax
retn
|
long long minja::SliceExpr::SliceExpr(long long a1, _QWORD *a2, __int128 *a3, __int128 *a4)
{
long long v4; // rax
long long result; // rax
__int128 v6; // xmm0
__int128 v7; // xmm0
*(_QWORD *)a1 = &`vtable for'minja::Expression + 2;
*(_QWORD *)(a1 + 8) = *a2;
v4 = a2[1];
*(_QWORD *)(a1 + 16) = v4;
if ( v4 )
{
if ( _libc_single_threaded )
++*(_DWORD *)(v4 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v4 + 8));
}
*(_QWORD *)(a1 + 24) = a2[2];
*(_QWORD *)a1 = &`vtable for'minja::SliceExpr + 2;
result = 0LL;
*(_QWORD *)(a1 + 40) = 0LL;
v6 = *a3;
*((_QWORD *)a3 + 1) = 0LL;
*(_OWORD *)(a1 + 32) = v6;
*(_QWORD *)a3 = 0LL;
*(_QWORD *)(a1 + 56) = 0LL;
v7 = *a4;
*((_QWORD *)a4 + 1) = 0LL;
*(_OWORD *)(a1 + 48) = v7;
*(_QWORD *)a4 = 0LL;
return result;
}
|
SliceExpr:
LEA RAX,[0x22a3b8]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
MOV RAX,qword ptr [RSI]
MOV qword ptr [RDI + 0x8],RAX
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RDI + 0x10],RAX
TEST RAX,RAX
JZ 0x0018fd3a
MOV R8,qword ptr [0x0022bf88]
CMP byte ptr [R8],0x0
JZ 0x0018fd36
INC dword ptr [RAX + 0x8]
JMP 0x0018fd3a
LAB_0018fd36:
INC.LOCK dword ptr [RAX + 0x8]
LAB_0018fd3a:
MOV RAX,qword ptr [RSI + 0x10]
MOV qword ptr [RDI + 0x18],RAX
LEA RAX,[0x22a6e8]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x28],RAX
MOVUPS XMM0,xmmword ptr [RDX]
MOV qword ptr [RDX + 0x8],RAX
MOVUPS xmmword ptr [RDI + 0x20],XMM0
MOV qword ptr [RDX],RAX
MOV qword ptr [RDI + 0x38],RAX
MOVUPS XMM0,xmmword ptr [RCX]
MOV qword ptr [RCX + 0x8],RAX
MOVUPS xmmword ptr [RDI + 0x30],XMM0
MOV qword ptr [RCX],RAX
RET
|
/* minja::SliceExpr::SliceExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&,
std::shared_ptr<minja::Expression>&&) */
void __thiscall
minja::SliceExpr::SliceExpr
(SliceExpr *this,Location *param_1,shared_ptr *param_2,shared_ptr *param_3)
{
long lVar1;
int8 uVar2;
*(int ***)this = &PTR___cxa_pure_virtual_0022a3c8;
*(int8 *)(this + 8) = *(int8 *)param_1;
lVar1 = *(long *)(param_1 + 8);
*(long *)(this + 0x10) = lVar1;
if (lVar1 != 0) {
if (*PTR___libc_single_threaded_0022bf88 == '\0') {
LOCK();
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
UNLOCK();
}
else {
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
}
}
*(int8 *)(this + 0x18) = *(int8 *)(param_1 + 0x10);
*(int ***)this = &PTR_do_evaluate_0022a6f8;
*(int8 *)(this + 0x28) = 0;
uVar2 = *(int8 *)(param_2 + 8);
*(int8 *)(param_2 + 8) = 0;
*(int8 *)(this + 0x20) = *(int8 *)param_2;
*(int8 *)(this + 0x28) = uVar2;
*(int8 *)param_2 = 0;
*(int8 *)(this + 0x38) = 0;
uVar2 = *(int8 *)(param_3 + 8);
*(int8 *)(param_3 + 8) = 0;
*(int8 *)(this + 0x30) = *(int8 *)param_3;
*(int8 *)(this + 0x38) = uVar2;
*(int8 *)param_3 = 0;
return;
}
|
|
12,154 |
map_to_isogenous_E1
|
corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/map_to_g1.c
|
static void map_to_isogenous_E1(POINTonE1 *p, const vec384 u)
{
static const vec384 minus_A = { /* P - A */
TO_LIMB_T(0x8a9955f1650a005a), TO_LIMB_T(0x9865b3d192cfe93c),
TO_LIMB_T(0xaed3ed0f3ef3c441), TO_LIMB_T(0x3c962ef33d92c442),
TO_LIMB_T(0x22e438dbd74f94a2), TO_LIMB_T(0x04acbc265478c915)
};
static const vec384 Z = { /* (11<<384) % P */
TO_LIMB_T(0x886c00000023ffdc), TO_LIMB_T(0x0f70008d3090001d),
TO_LIMB_T(0x77672417ed5828c3), TO_LIMB_T(0x9dac23e943dc1740),
TO_LIMB_T(0x50553f1b9c131521), TO_LIMB_T(0x078c712fbe0ab6e8)
};
static const vec384 sqrt_minus_ZZZ = {
TO_LIMB_T(0x43b571cad3215f1f), TO_LIMB_T(0xccb460ef1c702dc2),
TO_LIMB_T(0x742d884f4f97100b), TO_LIMB_T(0xdb2c3e3238a3382b),
TO_LIMB_T(0xe40f3fa13fce8f88), TO_LIMB_T(0x0073a2af9892a2ff)
};
static const vec384 ZxA = {
TO_LIMB_T(0x7f674ea0a8915178), TO_LIMB_T(0xb0f945fc13b8fa65),
TO_LIMB_T(0x4b46759a38e87d76), TO_LIMB_T(0x2e7a929641bbb6a1),
TO_LIMB_T(0x1668ddfa462bf6b6), TO_LIMB_T(0x00960e2ed1cf294c)
};
vec384 uu, tv2, x2n, gx1, gxd, y2;
#if 0
vec384 xn, x1n, xd, y, y1, Zuu, tv4;
#else
# define xn p->X
# define y p->Y
# define xd p->Z
# define x1n xn
# define y1 y
# define Zuu x2n
# define tv4 y1
#endif
#define sgn0_fp(a) (sgn0_pty_mont_384((a), BLS12_381_P, p0) & 1)
bool_t e1, e2;
/*
* as per map_to_curve() from poc/sswu_opt.sage at
* https://github.com/cfrg/draft-irtf-cfrg-hash-to-curve
*/
/* x numerator variants */
sqr_fp(uu, u); /* uu = u^2 */
mul_fp(Zuu, Z, uu); /* Zuu = Z * uu */
sqr_fp(tv2, Zuu); /* tv2 = Zuu^2 */
add_fp(tv2, tv2, Zuu); /* tv2 = tv2 + Zuu */
add_fp(x1n, tv2, BLS12_381_Rx.p); /* x1n = tv2 + 1 */
mul_fp(x1n, x1n, Bprime_E1); /* x1n = x1n * B */
mul_fp(x2n, Zuu, x1n); /* x2n = Zuu * x1n */
/* x denumenator */
mul_fp(xd, minus_A, tv2); /* xd = -A * tv2 */
e1 = vec_is_zero(xd, sizeof(xd)); /* e1 = xd == 0 */
vec_select(xd, ZxA, xd, sizeof(xd), e1); /* # If xd == 0, set xd = Z*A */
/* y numerators variants */
sqr_fp(tv2, xd); /* tv2 = xd^2 */
mul_fp(gxd, xd, tv2); /* gxd = xd^3 */
mul_fp(tv2, Aprime_E1, tv2); /* tv2 = A * tv2 */
sqr_fp(gx1, x1n); /* gx1 = x1n^2 */
add_fp(gx1, gx1, tv2); /* gx1 = gx1 + tv2 # x1n^2 + A*xd^2 */
mul_fp(gx1, gx1, x1n); /* gx1 = gx1 * x1n # x1n^3 + A*x1n*xd^2 */
mul_fp(tv2, Bprime_E1, gxd); /* tv2 = B * gxd */
add_fp(gx1, gx1, tv2); /* gx1 = gx1 + tv2 # x1^3 + A*x1*xd^2 + B*xd^3 */
sqr_fp(tv4, gxd); /* tv4 = gxd^2 */
mul_fp(tv2, gx1, gxd); /* tv2 = gx1 * gxd */
mul_fp(tv4, tv4, tv2); /* tv4 = tv4 * tv2 # gx1*gxd^3 */
e2 = recip_sqrt_fp(y1, tv4); /* y1 = tv4^c1 # (gx1*gxd^3)^((p-3)/4) */
mul_fp(y1, y1, tv2); /* y1 = y1 * tv2 # gx1*gxd*y1 */
mul_fp(y2, y1, sqrt_minus_ZZZ); /* y2 = y1 * c2 # y2 = y1*sqrt(-Z^3) */
mul_fp(y2, y2, uu); /* y2 = y2 * uu */
mul_fp(y2, y2, u); /* y2 = y2 * u */
/* choose numerators */
vec_select(xn, x1n, x2n, sizeof(xn), e2); /* xn = e2 ? x1n : x2n */
vec_select(y, y1, y2, sizeof(y), e2); /* y = e2 ? y1 : y2 */
e1 = sgn0_fp(u);
e2 = sgn0_fp(y);
cneg_fp(y, y, e1^e2); /* fix sign of y */
/* return (xn, xd, y, 1) */
/* convert (xn, xd, y, 1) to Jacobian projective coordinates */
mul_fp(p->X, xn, xd); /* X = xn * xd */
mul_fp(p->Y, y, gxd); /* Y = y * xd^3 */
#ifndef xd
vec_copy(p->Z, xd, sizeof(xd)); /* Z = xd */
#else
# undef xn
# undef y
# undef xd
# undef x1n
# undef y1
# undef Zuu
# undef tv4
#endif
#undef sgn0_fp
}
|
O0
|
c
|
map_to_isogenous_E1:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp # imm = 0x140
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x40(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xb0f10
leaq -0xa0(%rbp), %rdi
leaq -0x40(%rbp), %rdx
leaq 0x2dc7e(%rip), %rsi # 0xe6450
callq 0xb4a30
leaq -0x70(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0xb0f10
leaq -0x70(%rbp), %rdi
leaq -0x70(%rbp), %rsi
leaq -0xa0(%rbp), %rdx
callq 0xae790
movq -0x8(%rbp), %rdi
leaq -0x70(%rbp), %rsi
leaq 0x2d88e(%rip), %rdx # 0xe6098
callq 0xae790
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
leaq 0x2dcc2(%rip), %rdx # 0xe64e0
callq 0xb4a30
leaq -0xa0(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
movq -0x8(%rbp), %rdx
callq 0xb4a30
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
leaq -0x70(%rbp), %rdx
leaq 0x2dbd3(%rip), %rsi # 0xe6420
callq 0xb4a30
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
movl $0x30, %esi
callq 0xa7680
movq %rax, -0x138(%rbp)
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
movq -0x8(%rbp), %rdx
addq $0x60, %rdx
movq -0x138(%rbp), %r8
leaq 0x2dc27(%rip), %rsi # 0xe64b0
movl $0x30, %ecx
callq 0xa74f0
leaq -0x70(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x60, %rsi
callq 0xb0f10
leaq -0x100(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x60, %rsi
leaq -0x70(%rbp), %rdx
callq 0xb4a30
leaq -0x70(%rbp), %rdi
leaq -0x70(%rbp), %rdx
leaq 0x2db25(%rip), %rsi # 0xe63f0
callq 0xb4a30
leaq -0xd0(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0xb0f10
leaq -0xd0(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
leaq -0x70(%rbp), %rdx
callq 0xae790
leaq -0xd0(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
movq -0x8(%rbp), %rdx
callq 0xb4a30
leaq -0x70(%rbp), %rdi
leaq -0x100(%rbp), %rdx
leaq 0x2dbc0(%rip), %rsi # 0xe64e0
callq 0xb4a30
leaq -0xd0(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
leaq -0x70(%rbp), %rdx
callq 0xae790
movq -0x8(%rbp), %rdi
addq $0x30, %rdi
leaq -0x100(%rbp), %rsi
callq 0xb0f10
leaq -0x70(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
leaq -0x100(%rbp), %rdx
callq 0xb4a30
movq -0x8(%rbp), %rdi
addq $0x30, %rdi
movq -0x8(%rbp), %rsi
addq $0x30, %rsi
leaq -0x70(%rbp), %rdx
callq 0xb4a30
movq -0x8(%rbp), %rdi
addq $0x30, %rdi
movq -0x8(%rbp), %rsi
addq $0x30, %rsi
callq 0xb90b0
movq %rax, -0x140(%rbp)
movq -0x8(%rbp), %rdi
addq $0x30, %rdi
movq -0x8(%rbp), %rsi
addq $0x30, %rsi
leaq -0x70(%rbp), %rdx
callq 0xb4a30
leaq -0x130(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x30, %rsi
leaq 0x2dab5(%rip), %rdx # 0xe6480
callq 0xb4a30
leaq -0x130(%rbp), %rdi
leaq -0x130(%rbp), %rsi
leaq -0x40(%rbp), %rdx
callq 0xb4a30
leaq -0x130(%rbp), %rdi
leaq -0x130(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq 0xb4a30
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
leaq -0xa0(%rbp), %rdx
movq -0x140(%rbp), %r8
movl $0x30, %ecx
callq 0xa74f0
movq -0x8(%rbp), %rdi
addq $0x30, %rdi
movq -0x8(%rbp), %rsi
addq $0x30, %rsi
leaq -0x130(%rbp), %rdx
movq -0x140(%rbp), %r8
movl $0x30, %ecx
callq 0xa74f0
movq -0x10(%rbp), %rdi
leaq 0x2d60f(%rip), %rsi # 0xe6060
movabsq $-0x760c000300030003, %rdx # imm = 0x89F3FFFCFFFCFFFD
callq 0xc9d00
andq $0x1, %rax
movq %rax, -0x138(%rbp)
movq -0x8(%rbp), %rdi
addq $0x30, %rdi
leaq 0x2d5e6(%rip), %rsi # 0xe6060
movabsq $-0x760c000300030003, %rdx # imm = 0x89F3FFFCFFFCFFFD
callq 0xc9d00
andq $0x1, %rax
movq %rax, -0x140(%rbp)
movq -0x8(%rbp), %rdi
addq $0x30, %rdi
movq -0x8(%rbp), %rsi
addq $0x30, %rsi
movq -0x138(%rbp), %rdx
xorq -0x140(%rbp), %rdx
callq 0xae7d0
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x8(%rbp), %rdx
addq $0x60, %rdx
callq 0xb4a30
movq -0x8(%rbp), %rdi
addq $0x30, %rdi
movq -0x8(%rbp), %rsi
addq $0x30, %rsi
leaq -0x100(%rbp), %rdx
callq 0xb4a30
addq $0x140, %rsp # imm = 0x140
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
|
map_to_isogenous_E1:
push rbp
mov rbp, rsp
sub rsp, 140h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
lea rdi, [rbp+var_40]
mov rsi, [rbp+var_10]
call sqr_fp
lea rdi, [rbp+var_A0]
lea rdx, [rbp+var_40]
lea rsi, map_to_isogenous_E1_Z
call mul_fp
lea rdi, [rbp+var_70]
lea rsi, [rbp+var_A0]
call sqr_fp
lea rdi, [rbp+var_70]
lea rsi, [rbp+var_70]
lea rdx, [rbp+var_A0]
call add_fp
mov rdi, [rbp+var_8]
lea rsi, [rbp+var_70]
lea rdx, BLS12_381_Rx
call add_fp
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_8]
lea rdx, Bprime_E1
call mul_fp
lea rdi, [rbp+var_A0]
lea rsi, [rbp+var_A0]
mov rdx, [rbp+var_8]
call mul_fp
mov rdi, [rbp+var_8]
add rdi, 60h ; '`'
lea rdx, [rbp+var_70]
lea rsi, map_to_isogenous_E1_minus_A
call mul_fp
mov rdi, [rbp+var_8]
add rdi, 60h ; '`'
mov esi, 30h ; '0'
call vec_is_zero
mov [rbp+var_138], rax
mov rdi, [rbp+var_8]
add rdi, 60h ; '`'
mov rdx, [rbp+var_8]
add rdx, 60h ; '`'
mov r8, [rbp+var_138]
lea rsi, map_to_isogenous_E1_ZxA
mov ecx, 30h ; '0'
call vec_select
lea rdi, [rbp+var_70]
mov rsi, [rbp+var_8]
add rsi, 60h ; '`'
call sqr_fp
lea rdi, [rbp+var_100]
mov rsi, [rbp+var_8]
add rsi, 60h ; '`'
lea rdx, [rbp+var_70]
call mul_fp
lea rdi, [rbp+var_70]
lea rdx, [rbp+var_70]
lea rsi, Aprime_E1
call mul_fp
lea rdi, [rbp+var_D0]
mov rsi, [rbp+var_8]
call sqr_fp
lea rdi, [rbp+var_D0]
lea rsi, [rbp+var_D0]
lea rdx, [rbp+var_70]
call add_fp
lea rdi, [rbp+var_D0]
lea rsi, [rbp+var_D0]
mov rdx, [rbp+var_8]
call mul_fp
lea rdi, [rbp+var_70]
lea rdx, [rbp+var_100]
lea rsi, Bprime_E1
call mul_fp
lea rdi, [rbp+var_D0]
lea rsi, [rbp+var_D0]
lea rdx, [rbp+var_70]
call add_fp
mov rdi, [rbp+var_8]
add rdi, 30h ; '0'
lea rsi, [rbp+var_100]
call sqr_fp
lea rdi, [rbp+var_70]
lea rsi, [rbp+var_D0]
lea rdx, [rbp+var_100]
call mul_fp
mov rdi, [rbp+var_8]
add rdi, 30h ; '0'
mov rsi, [rbp+var_8]
add rsi, 30h ; '0'
lea rdx, [rbp+var_70]
call mul_fp
mov rdi, [rbp+var_8]
add rdi, 30h ; '0'
mov rsi, [rbp+var_8]
add rsi, 30h ; '0'
call recip_sqrt_fp
mov [rbp+var_140], rax
mov rdi, [rbp+var_8]
add rdi, 30h ; '0'
mov rsi, [rbp+var_8]
add rsi, 30h ; '0'
lea rdx, [rbp+var_70]
call mul_fp
lea rdi, [rbp+var_130]
mov rsi, [rbp+var_8]
add rsi, 30h ; '0'
lea rdx, map_to_isogenous_E1_sqrt_minus_ZZZ
call mul_fp
lea rdi, [rbp+var_130]
lea rsi, [rbp+var_130]
lea rdx, [rbp+var_40]
call mul_fp
lea rdi, [rbp+var_130]
lea rsi, [rbp+var_130]
mov rdx, [rbp+var_10]
call mul_fp
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_8]
lea rdx, [rbp+var_A0]
mov r8, [rbp+var_140]
mov ecx, 30h ; '0'
call vec_select
mov rdi, [rbp+var_8]
add rdi, 30h ; '0'
mov rsi, [rbp+var_8]
add rsi, 30h ; '0'
lea rdx, [rbp+var_130]
mov r8, [rbp+var_140]
mov ecx, 30h ; '0'
call vec_select
mov rdi, [rbp+var_10]
lea rsi, BLS12_381_P
mov rdx, 89F3FFFCFFFCFFFDh
call sgn0_pty_mont_384
and rax, 1
mov [rbp+var_138], rax
mov rdi, [rbp+var_8]
add rdi, 30h ; '0'
lea rsi, BLS12_381_P
mov rdx, 89F3FFFCFFFCFFFDh
call sgn0_pty_mont_384
and rax, 1
mov [rbp+var_140], rax
mov rdi, [rbp+var_8]
add rdi, 30h ; '0'
mov rsi, [rbp+var_8]
add rsi, 30h ; '0'
mov rdx, [rbp+var_138]
xor rdx, [rbp+var_140]
call cneg_fp
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_8]
mov rdx, [rbp+var_8]
add rdx, 60h ; '`'
call mul_fp
mov rdi, [rbp+var_8]
add rdi, 30h ; '0'
mov rsi, [rbp+var_8]
add rsi, 30h ; '0'
lea rdx, [rbp+var_100]
call mul_fp
add rsp, 140h
pop rbp
retn
|
long long map_to_isogenous_E1(long long a1, long long a2)
{
unsigned long long is_zero; // rax
long long v4; // [rsp+0h] [rbp-140h]
long long v5; // [rsp+0h] [rbp-140h]
long long v6; // [rsp+8h] [rbp-138h]
_BYTE v7[48]; // [rsp+10h] [rbp-130h] BYREF
_BYTE v8[48]; // [rsp+40h] [rbp-100h] BYREF
_BYTE v9[48]; // [rsp+70h] [rbp-D0h] BYREF
_BYTE v10[48]; // [rsp+A0h] [rbp-A0h] BYREF
_BYTE v11[48]; // [rsp+D0h] [rbp-70h] BYREF
_BYTE v12[48]; // [rsp+100h] [rbp-40h] BYREF
long long v13; // [rsp+130h] [rbp-10h]
long long v14; // [rsp+138h] [rbp-8h]
v14 = a1;
v13 = a2;
sqr_fp((long long)v12, a2);
mul_fp((long long)v10, (long long)&map_to_isogenous_E1_Z, (long long)v12);
sqr_fp((long long)v11, (long long)v10);
add_fp((long long)v11, (long long)v11, (long long)v10);
add_fp(v14, (long long)v11, (long long)&BLS12_381_Rx);
mul_fp(v14, v14, (long long)&Bprime_E1);
mul_fp((long long)v10, (long long)v10, v14);
mul_fp(v14 + 96, (long long)&map_to_isogenous_E1_minus_A, (long long)v11);
is_zero = vec_is_zero(v14 + 96, 0x30uLL);
vec_select(v14 + 96, (long long)&map_to_isogenous_E1_ZxA, v14 + 96, 0x30uLL, is_zero);
sqr_fp((long long)v11, v14 + 96);
mul_fp((long long)v8, v14 + 96, (long long)v11);
mul_fp((long long)v11, (long long)&Aprime_E1, (long long)v11);
sqr_fp((long long)v9, v14);
add_fp((long long)v9, (long long)v9, (long long)v11);
mul_fp((long long)v9, (long long)v9, v14);
mul_fp((long long)v11, (long long)&Bprime_E1, (long long)v8);
add_fp((long long)v9, (long long)v9, (long long)v11);
sqr_fp(v14 + 48, (long long)v8);
mul_fp((long long)v11, (long long)v9, (long long)v8);
mul_fp(v14 + 48, v14 + 48, (long long)v11);
v4 = recip_sqrt_fp(v14 + 48, v14 + 48);
mul_fp(v14 + 48, v14 + 48, (long long)v11);
mul_fp((long long)v7, v14 + 48, (long long)&map_to_isogenous_E1_sqrt_minus_ZZZ);
mul_fp((long long)v7, (long long)v7, (long long)v12);
mul_fp((long long)v7, (long long)v7, v13);
vec_select(v14, v14, (long long)v10, 0x30uLL, v4);
vec_select(v14 + 48, v14 + 48, (long long)v7, 0x30uLL, v4);
v6 = sgn0_pty_mont_384(v13, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL) & 1;
v5 = sgn0_pty_mont_384(v14 + 48, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL) & 1;
cneg_fp(v14 + 48, v14 + 48, v5 ^ v6);
mul_fp(v14, v14, v14 + 96);
return mul_fp(v14 + 48, v14 + 48, (long long)v8);
}
|
map_to_isogenous_E1:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x140
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
LEA RDI,[RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x001b0f10
LEA RDI,[RBP + -0xa0]
LEA RDX,[RBP + -0x40]
LEA RSI,[0x1e6450]
CALL 0x001b4a30
LEA RDI,[RBP + -0x70]
LEA RSI,[RBP + -0xa0]
CALL 0x001b0f10
LEA RDI,[RBP + -0x70]
LEA RSI,[RBP + -0x70]
LEA RDX,[RBP + -0xa0]
CALL 0x001ae790
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[RBP + -0x70]
LEA RDX,[0x1e6098]
CALL 0x001ae790
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x8]
LEA RDX,[0x1e64e0]
CALL 0x001b4a30
LEA RDI,[RBP + -0xa0]
LEA RSI,[RBP + -0xa0]
MOV RDX,qword ptr [RBP + -0x8]
CALL 0x001b4a30
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x60
LEA RDX,[RBP + -0x70]
LEA RSI,[0x1e6420]
CALL 0x001b4a30
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x60
MOV ESI,0x30
CALL 0x001a7680
MOV qword ptr [RBP + -0x138],RAX
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x60
MOV RDX,qword ptr [RBP + -0x8]
ADD RDX,0x60
MOV R8,qword ptr [RBP + -0x138]
LEA RSI,[0x1e64b0]
MOV ECX,0x30
CALL 0x001a74f0
LEA RDI,[RBP + -0x70]
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0x60
CALL 0x001b0f10
LEA RDI,[RBP + -0x100]
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0x60
LEA RDX,[RBP + -0x70]
CALL 0x001b4a30
LEA RDI,[RBP + -0x70]
LEA RDX,[RBP + -0x70]
LEA RSI,[0x1e63f0]
CALL 0x001b4a30
LEA RDI,[RBP + -0xd0]
MOV RSI,qword ptr [RBP + -0x8]
CALL 0x001b0f10
LEA RDI,[RBP + -0xd0]
LEA RSI,[RBP + -0xd0]
LEA RDX,[RBP + -0x70]
CALL 0x001ae790
LEA RDI,[RBP + -0xd0]
LEA RSI,[RBP + -0xd0]
MOV RDX,qword ptr [RBP + -0x8]
CALL 0x001b4a30
LEA RDI,[RBP + -0x70]
LEA RDX,[RBP + -0x100]
LEA RSI,[0x1e64e0]
CALL 0x001b4a30
LEA RDI,[RBP + -0xd0]
LEA RSI,[RBP + -0xd0]
LEA RDX,[RBP + -0x70]
CALL 0x001ae790
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x30
LEA RSI,[RBP + -0x100]
CALL 0x001b0f10
LEA RDI,[RBP + -0x70]
LEA RSI,[RBP + -0xd0]
LEA RDX,[RBP + -0x100]
CALL 0x001b4a30
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x30
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0x30
LEA RDX,[RBP + -0x70]
CALL 0x001b4a30
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x30
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0x30
CALL 0x001b90b0
MOV qword ptr [RBP + -0x140],RAX
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x30
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0x30
LEA RDX,[RBP + -0x70]
CALL 0x001b4a30
LEA RDI,[RBP + -0x130]
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0x30
LEA RDX,[0x1e6480]
CALL 0x001b4a30
LEA RDI,[RBP + -0x130]
LEA RSI,[RBP + -0x130]
LEA RDX,[RBP + -0x40]
CALL 0x001b4a30
LEA RDI,[RBP + -0x130]
LEA RSI,[RBP + -0x130]
MOV RDX,qword ptr [RBP + -0x10]
CALL 0x001b4a30
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x8]
LEA RDX,[RBP + -0xa0]
MOV R8,qword ptr [RBP + -0x140]
MOV ECX,0x30
CALL 0x001a74f0
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x30
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0x30
LEA RDX,[RBP + -0x130]
MOV R8,qword ptr [RBP + -0x140]
MOV ECX,0x30
CALL 0x001a74f0
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x1e6060]
MOV RDX,-0x760c000300030003
CALL 0x001c9d00
AND RAX,0x1
MOV qword ptr [RBP + -0x138],RAX
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x30
LEA RSI,[0x1e6060]
MOV RDX,-0x760c000300030003
CALL 0x001c9d00
AND RAX,0x1
MOV qword ptr [RBP + -0x140],RAX
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x30
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0x30
MOV RDX,qword ptr [RBP + -0x138]
XOR RDX,qword ptr [RBP + -0x140]
CALL 0x001ae7d0
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RBP + -0x8]
ADD RDX,0x60
CALL 0x001b4a30
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x30
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0x30
LEA RDX,[RBP + -0x100]
CALL 0x001b4a30
ADD RSP,0x140
POP RBP
RET
|
void map_to_isogenous_E1(long param_1,int8 param_2)
{
int8 uVar1;
ulong uVar2;
ulong uVar3;
int1 local_138 [48];
int1 local_108 [48];
int1 local_d8 [48];
int1 local_a8 [48];
int1 local_78 [48];
int1 local_48 [48];
int8 local_18;
long local_10;
local_18 = param_2;
local_10 = param_1;
sqr_fp(local_48,param_2);
mul_fp(local_a8,map_to_isogenous_E1_Z,local_48);
sqr_fp(local_78,local_a8);
add_fp(local_78,local_78,local_a8);
add_fp(local_10,local_78,BLS12_381_Rx);
mul_fp(local_10,local_10,Bprime_E1);
mul_fp(local_a8,local_a8,local_10);
mul_fp(local_10 + 0x60,map_to_isogenous_E1_minus_A,local_78);
uVar1 = vec_is_zero(local_10 + 0x60,0x30);
vec_select(local_10 + 0x60,map_to_isogenous_E1_ZxA,local_10 + 0x60,0x30,uVar1);
sqr_fp(local_78,local_10 + 0x60);
mul_fp(local_108,local_10 + 0x60,local_78);
mul_fp(local_78,Aprime_E1,local_78);
sqr_fp(local_d8,local_10);
add_fp(local_d8,local_d8,local_78);
mul_fp(local_d8,local_d8,local_10);
mul_fp(local_78,Bprime_E1,local_108);
add_fp(local_d8,local_d8,local_78);
sqr_fp(local_10 + 0x30,local_108);
mul_fp(local_78,local_d8,local_108);
mul_fp(local_10 + 0x30,local_10 + 0x30,local_78);
uVar1 = recip_sqrt_fp(local_10 + 0x30,local_10 + 0x30);
mul_fp(local_10 + 0x30,local_10 + 0x30,local_78);
mul_fp(local_138,local_10 + 0x30,map_to_isogenous_E1_sqrt_minus_ZZZ);
mul_fp(local_138,local_138,local_48);
mul_fp(local_138,local_138,local_18);
vec_select(local_10,local_10,local_a8,0x30,uVar1);
vec_select(local_10 + 0x30,local_10 + 0x30,local_138,0x30,uVar1);
uVar2 = sgn0_pty_mont_384(local_18,BLS12_381_P,0x89f3fffcfffcfffd);
uVar3 = sgn0_pty_mont_384(local_10 + 0x30,BLS12_381_P,0x89f3fffcfffcfffd);
cneg_fp(local_10 + 0x30,local_10 + 0x30,uVar2 & 1 ^ uVar3 & 1);
mul_fp(local_10,local_10,local_10 + 0x60);
mul_fp(local_10 + 0x30,local_10 + 0x30,local_108);
return;
}
|
|
12,155 |
google::protobuf::DescriptorProto_ExtensionRange::DescriptorProto_ExtensionRange(google::protobuf::DescriptorProto_ExtensionRange const&)
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc
|
DescriptorProto_ExtensionRange::DescriptorProto_ExtensionRange(const DescriptorProto_ExtensionRange& from)
: ::PROTOBUF_NAMESPACE_ID::Message() {
DescriptorProto_ExtensionRange* const _this = this; (void)_this;
new (&_impl_) Impl_{
decltype(_impl_._has_bits_){from._impl_._has_bits_}
, /*decltype(_impl_._cached_size_)*/{}
, decltype(_impl_.options_){nullptr}
, decltype(_impl_.start_){}
, decltype(_impl_.end_){}};
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
if (from._internal_has_options()) {
_this->_impl_.options_ = new ::PROTOBUF_NAMESPACE_ID::ExtensionRangeOptions(*from._impl_.options_);
}
::memcpy(&_impl_.start_, &from._impl_.start_,
static_cast<size_t>(reinterpret_cast<char*>(&_impl_.end_) -
reinterpret_cast<char*>(&_impl_.start_)) + sizeof(_impl_.end_));
// @@protoc_insertion_point(copy_constructor:google.protobuf.DescriptorProto.ExtensionRange)
}
|
O0
|
cpp
|
google::protobuf::DescriptorProto_ExtensionRange::DescriptorProto_ExtensionRange(google::protobuf::DescriptorProto_ExtensionRange const&):
subq $0xb8, %rsp
movq %rdi, 0x68(%rsp)
movq %rsi, 0x60(%rsp)
movq 0x68(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0xd3f60
movq 0x38(%rsp), %rax
leaq 0x1cb7f4(%rip), %rcx # 0x277e50
addq $0x10, %rcx
movq %rcx, (%rax)
movq %rax, 0x58(%rsp)
movq %rax, %rdi
addq $0x10, %rdi
movq 0x60(%rsp), %rcx
movl 0x10(%rcx), %ecx
movl %ecx, 0x10(%rax)
addq $0x4, %rdi
movq %rdi, 0x30(%rsp)
xorl %esi, %esi
movl $0x4, %edx
callq 0x13200
movq 0x30(%rsp), %rdi
callq 0xd3ff0
movq 0x38(%rsp), %rcx
movq $0x0, 0x18(%rcx)
movl $0x0, 0x20(%rcx)
movl $0x0, 0x24(%rcx)
addq $0x8, %rcx
movq 0x60(%rsp), %rax
addq $0x8, %rax
movq %rcx, 0x78(%rsp)
movq %rax, 0x70(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0xb0(%rsp)
movq 0xb0(%rsp), %rax
movq (%rax), %rax
andq $0x1, %rax
cmpq $0x0, %rax
setne %al
movb %al, 0x4b(%rsp)
movb 0x4b(%rsp), %al
testb $0x1, %al
jne 0xac719
jmp 0xac7c2
movq 0x70(%rsp), %rax
movq %rax, 0x90(%rsp)
movq $0x0, 0x88(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x28(%rsp)
movq %rax, 0xa0(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0xa8(%rsp)
movq 0xa8(%rsp), %rax
movq (%rax), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0xac784
movq 0x28(%rsp), %rdi
callq 0x9cd40
addq $0x8, %rax
movq %rax, 0x98(%rsp)
jmp 0xac7a2
movq 0x88(%rsp), %rax
callq *%rax
movq %rax, 0x20(%rsp)
jmp 0xac795
movq 0x20(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rsi
movq 0x40(%rsp), %rdi
callq 0xe0920
jmp 0xac7c0
jmp 0xac7c2
jmp 0xac7c4
movq 0x60(%rsp), %rdi
callq 0x87bc0
movb %al, 0x17(%rsp)
jmp 0xac7d4
movb 0x17(%rsp), %al
testb $0x1, %al
jne 0xac7de
jmp 0xac83e
movl $0x48, %edi
callq 0x13450
movq %rax, 0x8(%rsp)
jmp 0xac7ef
movq 0x8(%rsp), %rdi
movq 0x60(%rsp), %rax
movq 0x18(%rax), %rsi
callq 0xb12f0
jmp 0xac804
movq 0x8(%rsp), %rcx
movq 0x58(%rsp), %rax
movq %rcx, 0x18(%rax)
jmp 0xac83e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
jmp 0xac882
movq 0x8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
callq 0x13400
jmp 0xac882
movq 0x38(%rsp), %rax
movq %rax, %rdi
addq $0x10, %rdi
addq $0x10, %rdi
movq 0x60(%rsp), %rsi
addq $0x10, %rsi
addq $0x10, %rsi
movq %rax, %rdx
addq $0x10, %rdx
addq $0x14, %rdx
addq $0x10, %rax
addq $0x10, %rax
subq %rax, %rdx
addq $0x4, %rdx
callq 0x13390
addq $0xb8, %rsp
retq
movq 0x38(%rsp), %rdi
callq 0xd3f50
movq 0x50(%rsp), %rdi
callq 0x13750
nopw %cs:(%rax,%rax)
|
_ZN6google8protobuf30DescriptorProto_ExtensionRangeC2ERKS1_:
sub rsp, 0B8h
mov [rsp+0B8h+var_50], rdi
mov [rsp+0B8h+var_58], rsi
mov rdi, [rsp+0B8h+var_50]; this
mov [rsp+0B8h+var_80], rdi
call _ZN6google8protobuf7MessageC2Ev; google::protobuf::Message::Message(void)
mov rax, [rsp+0B8h+var_80]
lea rcx, _ZTVN6google8protobuf30DescriptorProto_ExtensionRangeE; `vtable for'google::protobuf::DescriptorProto_ExtensionRange
add rcx, 10h
mov [rax], rcx
mov [rsp+0B8h+var_60], rax
mov rdi, rax
add rdi, 10h
mov rcx, [rsp+0B8h+var_58]
mov ecx, [rcx+10h]
mov [rax+10h], ecx
add rdi, 4
mov [rsp+0B8h+var_88], rdi
xor esi, esi
mov edx, 4
call _memset
mov rdi, [rsp+0B8h+var_88]; this
call _ZN6google8protobuf8internal10CachedSizeC2Ev; google::protobuf::internal::CachedSize::CachedSize(void)
mov rcx, [rsp+0B8h+var_80]
mov qword ptr [rcx+18h], 0
mov dword ptr [rcx+20h], 0
mov dword ptr [rcx+24h], 0
add rcx, 8
mov rax, [rsp+0B8h+var_58]
add rax, 8
mov [rsp+0B8h+var_40], rcx
mov [rsp+0B8h+var_48], rax
mov rax, [rsp+0B8h+var_40]
mov [rsp+0B8h+var_78], rax
mov rax, [rsp+0B8h+var_48]
mov [rsp+0B8h+var_38], rax
mov rax, [rsp+0B8h+var_38]
mov [rsp+0B8h+var_8], rax
mov rax, [rsp+0B8h+var_8]
mov rax, [rax]
and rax, 1
cmp rax, 0
setnz al
mov [rsp+0B8h+var_6D], al
mov al, [rsp+0B8h+var_6D]
test al, 1
jnz short loc_AC719
jmp loc_AC7C2
loc_AC719:
mov rax, [rsp+0B8h+var_48]
mov [rsp+0B8h+var_28], rax
mov [rsp+0B8h+var_30], 0
mov rax, [rsp+0B8h+var_28]
mov [rsp+0B8h+var_90], rax
mov [rsp+0B8h+var_18], rax
mov rax, [rsp+0B8h+var_18]
mov [rsp+0B8h+var_10], rax
mov rax, [rsp+0B8h+var_10]
mov rax, [rax]
and rax, 1
cmp rax, 0
jz short loc_AC784
mov rdi, [rsp+0B8h+var_90]
call _ZNK6google8protobuf8internal16InternalMetadata8PtrValueINS2_9ContainerINS0_15UnknownFieldSetEEEEEPT_v; google::protobuf::internal::InternalMetadata::PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>>(void)
add rax, 8
mov [rsp+0B8h+var_20], rax
jmp short loc_AC7A2
loc_AC784:
mov rax, [rsp+0B8h+var_30]
call rax
mov [rsp+0B8h+var_98], rax
jmp short $+2
loc_AC795:
mov rax, [rsp+0B8h+var_98]
mov [rsp+0B8h+var_20], rax
loc_AC7A2:
mov rax, [rsp+0B8h+var_20]
mov qword ptr [rsp+0B8h+var_A0], rax
mov rsi, qword ptr [rsp+0B8h+var_A0]; int
mov rdi, [rsp+0B8h+var_78]; void *
call _ZN6google8protobuf8internal16InternalMetadata11DoMergeFromINS0_15UnknownFieldSetEEEvRKT_; google::protobuf::internal::InternalMetadata::DoMergeFrom<google::protobuf::UnknownFieldSet>(google::protobuf::UnknownFieldSet const&)
jmp short $+2
loc_AC7C0:
jmp short $+2
loc_AC7C2:
jmp short $+2
loc_AC7C4:
mov rdi, [rsp+0B8h+var_58]; this
call _ZNK6google8protobuf30DescriptorProto_ExtensionRange21_internal_has_optionsEv; google::protobuf::DescriptorProto_ExtensionRange::_internal_has_options(void)
mov [rsp+0B8h+var_A1], al
jmp short $+2
loc_AC7D4:
mov al, [rsp+0B8h+var_A1]
test al, 1
jnz short loc_AC7DE
jmp short loc_AC83E
loc_AC7DE:
mov edi, 48h ; 'H'; unsigned __int64
call __Znwm; operator new(ulong)
mov [rsp+0B8h+var_B0], rax
jmp short $+2
loc_AC7EF:
mov rdi, [rsp+0B8h+var_B0]; this
mov rax, [rsp+0B8h+var_58]
mov rsi, [rax+18h]; google::protobuf::ExtensionRangeOptions *
call _ZN6google8protobuf21ExtensionRangeOptionsC2ERKS1_; google::protobuf::ExtensionRangeOptions::ExtensionRangeOptions(google::protobuf::ExtensionRangeOptions const&)
jmp short $+2
loc_AC804:
mov rcx, [rsp+0B8h+var_B0]
mov rax, [rsp+0B8h+var_60]
mov [rax+18h], rcx
jmp short loc_AC83E
mov rcx, rax
mov eax, edx
mov [rsp+arg_48], rcx
mov [rsp+arg_44], eax
jmp short loc_AC882
mov rdi, [rsp+arg_0]; void *
mov rcx, rax
mov eax, edx
mov [rsp+arg_48], rcx
mov [rsp+arg_44], eax
call __ZdlPv; operator delete(void *)
jmp short loc_AC882
loc_AC83E:
mov rax, [rsp+0B8h+var_80]
mov rdi, rax
add rdi, 10h
add rdi, 10h
mov rsi, [rsp+0B8h+var_58]
add rsi, 10h
add rsi, 10h
mov rdx, rax
add rdx, 10h
add rdx, 14h
add rax, 10h
add rax, 10h
sub rdx, rax
add rdx, 4
call _memcpy
add rsp, 0B8h
retn
loc_AC882:
mov rdi, [rsp+arg_30]; this
call _ZN6google8protobuf7MessageD2Ev; google::protobuf::Message::~Message()
mov rdi, [rsp+arg_48]
call __Unwind_Resume
|
long long google::protobuf::DescriptorProto_ExtensionRange::DescriptorProto_ExtensionRange(
google::protobuf::DescriptorProto_ExtensionRange *this,
const google::protobuf::DescriptorProto_ExtensionRange *a2)
{
google::protobuf::ExtensionRangeOptions *v3; // [rsp+8h] [rbp-B0h]
unsigned long long v4; // [rsp+98h] [rbp-20h]
google::protobuf::Message::Message(this);
*(_QWORD *)this = &`vtable for'google::protobuf::DescriptorProto_ExtensionRange + 2;
*((_DWORD *)this + 4) = *((_DWORD *)a2 + 4);
memset((char *)this + 20, 0LL, 4LL);
google::protobuf::internal::CachedSize::CachedSize((google::protobuf::DescriptorProto_ExtensionRange *)((char *)this + 20));
*((_QWORD *)this + 3) = 0LL;
*((_DWORD *)this + 8) = 0;
*((_DWORD *)this + 9) = 0;
if ( (*((_QWORD *)a2 + 1) & 1LL) != 0 )
{
v4 = google::protobuf::internal::InternalMetadata::PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>>((_QWORD *)a2 + 1)
+ 8;
google::protobuf::internal::InternalMetadata::DoMergeFrom<google::protobuf::UnknownFieldSet>((char *)this + 8, v4);
}
if ( google::protobuf::DescriptorProto_ExtensionRange::_internal_has_options(a2) )
{
v3 = (google::protobuf::ExtensionRangeOptions *)operator new(0x48uLL);
google::protobuf::ExtensionRangeOptions::ExtensionRangeOptions(
v3,
*((const google::protobuf::ExtensionRangeOptions **)a2 + 3));
*((_QWORD *)this + 3) = v3;
}
return memcpy((char *)this + 32, (char *)a2 + 32, 8LL);
}
|
DescriptorProto_ExtensionRange:
SUB RSP,0xb8
MOV qword ptr [RSP + 0x68],RDI
MOV qword ptr [RSP + 0x60],RSI
MOV RDI,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0x38],RDI
CALL 0x001d3f60
MOV RAX,qword ptr [RSP + 0x38]
LEA RCX,[0x377e50]
ADD RCX,0x10
MOV qword ptr [RAX],RCX
MOV qword ptr [RSP + 0x58],RAX
MOV RDI,RAX
ADD RDI,0x10
MOV RCX,qword ptr [RSP + 0x60]
MOV ECX,dword ptr [RCX + 0x10]
MOV dword ptr [RAX + 0x10],ECX
ADD RDI,0x4
MOV qword ptr [RSP + 0x30],RDI
XOR ESI,ESI
MOV EDX,0x4
CALL 0x00113200
MOV RDI,qword ptr [RSP + 0x30]
CALL 0x001d3ff0
MOV RCX,qword ptr [RSP + 0x38]
MOV qword ptr [RCX + 0x18],0x0
MOV dword ptr [RCX + 0x20],0x0
MOV dword ptr [RCX + 0x24],0x0
ADD RCX,0x8
MOV RAX,qword ptr [RSP + 0x60]
ADD RAX,0x8
MOV qword ptr [RSP + 0x78],RCX
MOV qword ptr [RSP + 0x70],RAX
MOV RAX,qword ptr [RSP + 0x78]
MOV qword ptr [RSP + 0x40],RAX
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0x80],RAX
MOV RAX,qword ptr [RSP + 0x80]
MOV qword ptr [RSP + 0xb0],RAX
MOV RAX,qword ptr [RSP + 0xb0]
MOV RAX,qword ptr [RAX]
AND RAX,0x1
CMP RAX,0x0
SETNZ AL
MOV byte ptr [RSP + 0x4b],AL
MOV AL,byte ptr [RSP + 0x4b]
TEST AL,0x1
JNZ 0x001ac719
JMP 0x001ac7c2
LAB_001ac719:
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0x90],RAX
MOV qword ptr [RSP + 0x88],0x0
MOV RAX,qword ptr [RSP + 0x90]
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP + 0xa0],RAX
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RSP + 0xa8],RAX
MOV RAX,qword ptr [RSP + 0xa8]
MOV RAX,qword ptr [RAX]
AND RAX,0x1
CMP RAX,0x0
JZ 0x001ac784
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x0019cd40
ADD RAX,0x8
MOV qword ptr [RSP + 0x98],RAX
JMP 0x001ac7a2
LAB_001ac784:
MOV RAX,qword ptr [RSP + 0x88]
LAB_001ac78c:
CALL RAX
MOV qword ptr [RSP + 0x20],RAX
JMP 0x001ac795
LAB_001ac795:
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x98],RAX
LAB_001ac7a2:
MOV RAX,qword ptr [RSP + 0x98]
MOV qword ptr [RSP + 0x18],RAX
MOV RSI,qword ptr [RSP + 0x18]
MOV RDI,qword ptr [RSP + 0x40]
CALL 0x001e0920
JMP 0x001ac7c0
LAB_001ac7c0:
JMP 0x001ac7c2
LAB_001ac7c2:
JMP 0x001ac7c4
LAB_001ac7c4:
MOV RDI,qword ptr [RSP + 0x60]
CALL 0x00187bc0
MOV byte ptr [RSP + 0x17],AL
JMP 0x001ac7d4
LAB_001ac7d4:
MOV AL,byte ptr [RSP + 0x17]
TEST AL,0x1
JNZ 0x001ac7de
JMP 0x001ac83e
LAB_001ac7de:
MOV EDI,0x48
CALL 0x00113450
MOV qword ptr [RSP + 0x8],RAX
JMP 0x001ac7ef
LAB_001ac7ef:
MOV RDI,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RSP + 0x60]
MOV RSI,qword ptr [RAX + 0x18]
LAB_001ac7fd:
CALL 0x001b12f0
LAB_001ac802:
JMP 0x001ac804
LAB_001ac804:
MOV RCX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RAX + 0x18],RCX
JMP 0x001ac83e
LAB_001ac83e:
MOV RAX,qword ptr [RSP + 0x38]
MOV RDI,RAX
ADD RDI,0x10
ADD RDI,0x10
MOV RSI,qword ptr [RSP + 0x60]
ADD RSI,0x10
ADD RSI,0x10
MOV RDX,RAX
ADD RDX,0x10
ADD RDX,0x14
ADD RAX,0x10
ADD RAX,0x10
SUB RDX,RAX
ADD RDX,0x4
CALL 0x00113390
ADD RSP,0xb8
RET
|
/* google::protobuf::DescriptorProto_ExtensionRange::DescriptorProto_ExtensionRange(google::protobuf::DescriptorProto_ExtensionRange
const&) */
void __thiscall
google::protobuf::DescriptorProto_ExtensionRange::DescriptorProto_ExtensionRange
(DescriptorProto_ExtensionRange *this,DescriptorProto_ExtensionRange *param_1)
{
byte bVar1;
InternalMetadata *this_00;
ExtensionRangeOptions *this_01;
UnknownFieldSet *local_20;
Message::Message((Message *)this);
*(int ***)this = &PTR__DescriptorProto_ExtensionRange_00377e60;
*(int4 *)(this + 0x10) = *(int4 *)(param_1 + 0x10);
memset((CachedSize *)(this + 0x14),0,4);
internal::CachedSize::CachedSize((CachedSize *)(this + 0x14));
*(int8 *)(this + 0x18) = 0;
*(int4 *)(this + 0x20) = 0;
*(int4 *)(this + 0x24) = 0;
this_00 = (InternalMetadata *)(param_1 + 8);
if ((*(ulong *)this_00 & 1) != 0) {
if ((*(ulong *)this_00 & 1) == 0) {
/* try { // try from 001ac78c to 001ac7e7 has its CatchHandler @ 001ac814 */
local_20 = (UnknownFieldSet *)(*(code *)0x0)();
}
else {
local_20 = (UnknownFieldSet *)
internal::InternalMetadata::
PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>>
(this_00);
local_20 = (UnknownFieldSet *)((Container *)local_20 + 8);
}
internal::InternalMetadata::DoMergeFrom<google::protobuf::UnknownFieldSet>
((InternalMetadata *)(this + 8),local_20);
}
bVar1 = _internal_has_options(param_1);
if ((bVar1 & 1) != 0) {
this_01 = (ExtensionRangeOptions *)operator_new(0x48);
/* try { // try from 001ac7fd to 001ac801 has its CatchHandler @ 001ac824 */
ExtensionRangeOptions::ExtensionRangeOptions
(this_01,*(ExtensionRangeOptions **)(param_1 + 0x18));
*(ExtensionRangeOptions **)(this + 0x18) = this_01;
}
memcpy(this + 0x20,param_1 + 0x20,8);
return;
}
|
|
12,156 |
psi_mutex_lock
|
eloqsql/mysys/my_thr_init.c
|
ATTRIBUTE_COLD int psi_mutex_lock(mysql_mutex_t *that,
const char *file, uint line)
{
PSI_mutex_locker_state state;
PSI_mutex_locker *locker= PSI_MUTEX_CALL(start_mutex_wait)
(&state, that->m_psi, PSI_MUTEX_LOCK, file, line);
# ifdef SAFE_MUTEX
int result= safe_mutex_lock(&that->m_mutex, FALSE, file, line);
# else
int result= pthread_mutex_lock(&that->m_mutex);
# endif
if (locker)
PSI_MUTEX_CALL(end_mutex_wait)(locker, result);
return result;
}
|
O0
|
c
|
psi_mutex_lock:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
leaq 0x1bd4fe(%rip), %rax # 0x24a5f8
movq (%rax), %rax
movq 0x190(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x40(%rcx), %rsi
movq -0x10(%rbp), %rcx
movl -0x14(%rbp), %r8d
leaq -0x48(%rbp), %rdi
xorl %edx, %edx
callq *%rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rdi
callq 0x38290
movl %eax, -0x54(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0x8d14d
leaq 0x1bd4be(%rip), %rax # 0x24a5f8
movq (%rax), %rax
movq 0x198(%rax), %rax
movq -0x50(%rbp), %rdi
movl -0x54(%rbp), %esi
callq *%rax
movl -0x54(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
psi_mutex_lock:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+190h]
mov rcx, [rbp+var_8]
mov rsi, [rcx+40h]
mov rcx, [rbp+var_10]
mov r8d, [rbp+var_14]
lea rdi, [rbp+var_48]
xor edx, edx
call rax
mov [rbp+var_50], rax
mov rdi, [rbp+var_8]
call _pthread_mutex_lock
mov [rbp+var_54], eax
cmp [rbp+var_50], 0
jz short loc_8D14D
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+198h]
mov rdi, [rbp+var_50]
mov esi, [rbp+var_54]
call rax
loc_8D14D:
mov eax, [rbp+var_54]
add rsp, 60h
pop rbp
retn
|
long long psi_mutex_lock(long long a1, long long a2, unsigned int a3)
{
unsigned int v4; // [rsp+Ch] [rbp-54h]
long long v5; // [rsp+10h] [rbp-50h]
_BYTE v6[52]; // [rsp+18h] [rbp-48h] BYREF
unsigned int v7; // [rsp+4Ch] [rbp-14h]
long long v8; // [rsp+50h] [rbp-10h]
long long v9; // [rsp+58h] [rbp-8h]
v9 = a1;
v8 = a2;
v7 = a3;
v5 = (*((long long ( **)(_BYTE *, _QWORD, _QWORD, long long, _QWORD))PSI_server + 50))(
v6,
*(_QWORD *)(a1 + 64),
0LL,
a2,
a3);
v4 = pthread_mutex_lock(v9);
if ( v5 )
(*((void ( **)(long long, _QWORD))PSI_server + 51))(v5, v4);
return v4;
}
|
psi_mutex_lock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
LEA RAX,[0x34a5f8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x190]
MOV RCX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RCX + 0x40]
MOV RCX,qword ptr [RBP + -0x10]
MOV R8D,dword ptr [RBP + -0x14]
LEA RDI,[RBP + -0x48]
XOR EDX,EDX
CALL RAX
MOV qword ptr [RBP + -0x50],RAX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00138290
MOV dword ptr [RBP + -0x54],EAX
CMP qword ptr [RBP + -0x50],0x0
JZ 0x0018d14d
LEA RAX,[0x34a5f8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x198]
MOV RDI,qword ptr [RBP + -0x50]
MOV ESI,dword ptr [RBP + -0x54]
CALL RAX
LAB_0018d14d:
MOV EAX,dword ptr [RBP + -0x54]
ADD RSP,0x60
POP RBP
RET
|
int psi_mutex_lock(pthread_mutex_t *param_1,int8 param_2,int4 param_3)
{
int iVar1;
long lVar2;
int1 local_50 [52];
int4 local_1c;
int8 local_18;
pthread_mutex_t *local_10;
local_1c = param_3;
local_18 = param_2;
local_10 = param_1;
lVar2 = (**(code **)(PSI_server + 400))
(local_50,*(int8 *)((long)param_1 + 0x40),0,param_2,param_3);
iVar1 = pthread_mutex_lock(local_10);
if (lVar2 != 0) {
(**(code **)(PSI_server + 0x198))(lVar2,iVar1);
}
return iVar1;
}
|
|
12,157 |
psi_mutex_lock
|
eloqsql/mysys/my_thr_init.c
|
ATTRIBUTE_COLD int psi_mutex_lock(mysql_mutex_t *that,
const char *file, uint line)
{
PSI_mutex_locker_state state;
PSI_mutex_locker *locker= PSI_MUTEX_CALL(start_mutex_wait)
(&state, that->m_psi, PSI_MUTEX_LOCK, file, line);
# ifdef SAFE_MUTEX
int result= safe_mutex_lock(&that->m_mutex, FALSE, file, line);
# else
int result= pthread_mutex_lock(&that->m_mutex);
# endif
if (locker)
PSI_MUTEX_CALL(end_mutex_wait)(locker, result);
return result;
}
|
O3
|
c
|
psi_mutex_lock:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movl %edx, %r8d
movq %rsi, %rcx
movq %rdi, %r14
leaq 0x31596a(%rip), %r15 # 0x34e118
movq (%r15), %rax
movq 0x40(%rdi), %rsi
leaq -0x48(%rbp), %rdi
xorl %edx, %edx
callq *0x190(%rax)
movq %rax, %rbx
movq %r14, %rdi
callq 0x37280
movl %eax, %r14d
testq %rbx, %rbx
je 0x387e3
movq (%r15), %rax
movq %rbx, %rdi
movl %r14d, %esi
callq *0x198(%rax)
movl %r14d, %eax
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
psi_mutex_lock:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 38h
mov r8d, edx
mov rcx, rsi
mov r14, rdi
lea r15, PSI_server
mov rax, [r15]
mov rsi, [rdi+40h]
lea rdi, [rbp+var_48]
xor edx, edx
call qword ptr [rax+190h]
mov rbx, rax
mov rdi, r14
call _pthread_mutex_lock
mov r14d, eax
test rbx, rbx
jz short loc_387E3
mov rax, [r15]
mov rdi, rbx
mov esi, r14d
call qword ptr [rax+198h]
loc_387E3:
mov eax, r14d
add rsp, 38h
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long psi_mutex_lock(long long a1, long long a2, unsigned int a3)
{
long long v3; // rbx
unsigned int v4; // r14d
_BYTE v6[72]; // [rsp+8h] [rbp-48h] BYREF
v3 = (*((long long ( **)(_BYTE *, _QWORD, _QWORD, long long, _QWORD))PSI_server + 50))(
v6,
*(_QWORD *)(a1 + 64),
0LL,
a2,
a3);
v4 = pthread_mutex_lock(a1);
if ( v3 )
(*((void ( **)(long long, _QWORD))PSI_server + 51))(v3, v4);
return v4;
}
|
psi_mutex_lock:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x38
MOV R8D,EDX
MOV RCX,RSI
MOV R14,RDI
LEA R15,[0x44e118]
MOV RAX,qword ptr [R15]
MOV RSI,qword ptr [RDI + 0x40]
LEA RDI,[RBP + -0x48]
XOR EDX,EDX
CALL qword ptr [RAX + 0x190]
MOV RBX,RAX
MOV RDI,R14
CALL 0x00137280
MOV R14D,EAX
TEST RBX,RBX
JZ 0x001387e3
MOV RAX,qword ptr [R15]
MOV RDI,RBX
MOV ESI,R14D
CALL qword ptr [RAX + 0x198]
LAB_001387e3:
MOV EAX,R14D
ADD RSP,0x38
POP RBX
POP R14
POP R15
POP RBP
RET
|
int psi_mutex_lock(pthread_mutex_t *param_1,int8 param_2,int4 param_3)
{
int iVar1;
long lVar2;
int1 local_50 [48];
lVar2 = (**(code **)(PSI_server + 400))
(local_50,*(int8 *)((long)param_1 + 0x40),0,param_2,param_3);
iVar1 = pthread_mutex_lock(param_1);
if (lVar2 != 0) {
(**(code **)(PSI_server + 0x198))(lVar2,iVar1);
}
return iVar1;
}
|
|
12,158 |
mysql_close_start
|
eloqsql/libmariadb/libmariadb/mariadb_async.c
|
MK_ASYNC_CONT_BODY_VOID_RETURN(sock)
}
int STDCALL
mysql_close_start(MYSQL *sock)
{
int res;
/* It is legitimate to have NULL sock argument, which will do nothing. */
if (sock && sock->net.pvio)
{
res= mysql_close_slow_part_start(sock);
/* If we need to block, return now and do the rest in mysql_close_cont(). */
if (res)
return res;
}
mysql_close(sock);
return 0;
}
|
O3
|
c
|
mysql_close_start:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rdi, %rdi
je 0x30b42
cmpq $0x0, (%rbx)
je 0x30b42
movq %rbx, %rdi
callq 0x30966
testl %eax, %eax
jne 0x30b4c
movq %rbx, %rdi
callq 0x20d0c
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
|
mysql_close_start:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
test rdi, rdi
jz short loc_30B42
cmp qword ptr [rbx], 0
jz short loc_30B42
mov rdi, rbx
call mysql_close_slow_part_start
test eax, eax
jnz short loc_30B4C
loc_30B42:
mov rdi, rbx
call mysql_close
xor eax, eax
loc_30B4C:
add rsp, 8
pop rbx
pop rbp
retn
|
long long mysql_close_start(_QWORD *a1)
{
long long result; // rax
if ( !a1 || !*a1 || (result = mysql_close_slow_part_start((long long)a1), !(_DWORD)result) )
{
mysql_close((long long)a1);
return 0LL;
}
return result;
}
|
mysql_close_start:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
TEST RDI,RDI
JZ 0x00130b42
CMP qword ptr [RBX],0x0
JZ 0x00130b42
MOV RDI,RBX
CALL 0x00130966
TEST EAX,EAX
JNZ 0x00130b4c
LAB_00130b42:
MOV RDI,RBX
CALL 0x00120d0c
XOR EAX,EAX
LAB_00130b4c:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
int8 mysql_close_start(long *param_1)
{
int8 uVar1;
if (((param_1 != (long *)0x0) && (*param_1 != 0)) &&
(uVar1 = mysql_close_slow_part_start(param_1), (int)uVar1 != 0)) {
return uVar1;
}
mysql_close(param_1);
return 0;
}
|
|
12,159 |
js_calloc_rt
|
bluesky950520[P]quickjs/quickjs.c
|
void *js_calloc_rt(JSRuntime *rt, size_t count, size_t size)
{
void *ptr;
JSMallocState *s;
/* Do not allocate zero bytes: behavior is platform dependent */
assert(count != 0 && size != 0);
if (size > 0)
if (unlikely(count != (count * size) / size))
return NULL;
s = &rt->malloc_state;
/* When malloc_limit is 0 (unlimited), malloc_limit - 1 will be SIZE_MAX. */
if (unlikely(s->malloc_size + (count * size) > s->malloc_limit - 1))
return NULL;
ptr = rt->mf.js_calloc(s->opaque, count, size);
if (!ptr)
return NULL;
s->malloc_count++;
s->malloc_size += rt->mf.js_malloc_usable_size(ptr) + MALLOC_OVERHEAD;
return ptr;
}
|
O0
|
c
|
js_calloc_rt:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
jbe 0x204f6
movq 0x20(%rsp), %rax
movq %rax, (%rsp)
movq 0x20(%rsp), %rax
imulq 0x18(%rsp), %rax
xorl %ecx, %ecx
movl %ecx, %edx
divq 0x18(%rsp)
movq %rax, %rcx
movq (%rsp), %rax
cmpq %rcx, %rax
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x204f4
movq $0x0, 0x30(%rsp)
jmp 0x205bc
jmp 0x204f6
movq 0x28(%rsp), %rax
addq $0x28, %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x20(%rsp), %rcx
imulq 0x18(%rsp), %rcx
addq %rcx, %rax
movq 0x8(%rsp), %rcx
movq 0x10(%rcx), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
seta %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x2054a
movq $0x0, 0x30(%rsp)
jmp 0x205bc
movq 0x28(%rsp), %rax
movq (%rax), %rax
movq 0x8(%rsp), %rcx
movq 0x18(%rcx), %rdi
movq 0x20(%rsp), %rsi
movq 0x18(%rsp), %rdx
callq *%rax
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
jne 0x2057f
movq $0x0, 0x30(%rsp)
jmp 0x205bc
movq 0x8(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq 0x28(%rsp), %rax
movq 0x20(%rax), %rax
movq 0x10(%rsp), %rdi
callq *%rax
movq %rax, %rcx
addq $0x8, %rcx
movq 0x8(%rsp), %rax
addq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq 0x10(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
|
js_calloc_rt:
sub rsp, 38h
mov [rsp+38h+var_10], rdi
mov [rsp+38h+var_18], rsi
mov [rsp+38h+var_20], rdx
cmp [rsp+38h+var_20], 0
jbe short loc_204F6
mov rax, [rsp+38h+var_18]
mov [rsp+38h+var_38], rax
mov rax, [rsp+38h+var_18]
imul rax, [rsp+38h+var_20]
xor ecx, ecx
mov edx, ecx
div [rsp+38h+var_20]
mov rcx, rax
mov rax, [rsp+38h+var_38]
cmp rax, rcx
setnz al
xor al, 0FFh
xor al, 0FFh
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_204F4
mov [rsp+38h+var_8], 0
jmp loc_205BC
loc_204F4:
jmp short $+2
loc_204F6:
mov rax, [rsp+38h+var_10]
add rax, 28h ; '('
mov [rsp+38h+var_30], rax
mov rax, [rsp+38h+var_30]
mov rax, [rax+8]
mov rcx, [rsp+38h+var_18]
imul rcx, [rsp+38h+var_20]
add rax, rcx
mov rcx, [rsp+38h+var_30]
mov rcx, [rcx+10h]
sub rcx, 1
cmp rax, rcx
setnbe al
xor al, 0FFh
xor al, 0FFh
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_2054A
mov [rsp+38h+var_8], 0
jmp short loc_205BC
loc_2054A:
mov rax, [rsp+38h+var_10]
mov rax, [rax]
mov rcx, [rsp+38h+var_30]
mov rdi, [rcx+18h]
mov rsi, [rsp+38h+var_18]
mov rdx, [rsp+38h+var_20]
call rax
mov [rsp+38h+var_28], rax
cmp [rsp+38h+var_28], 0
jnz short loc_2057F
mov [rsp+38h+var_8], 0
jmp short loc_205BC
loc_2057F:
mov rax, [rsp+38h+var_30]
mov rcx, [rax]
add rcx, 1
mov [rax], rcx
mov rax, [rsp+38h+var_10]
mov rax, [rax+20h]
mov rdi, [rsp+38h+var_28]
call rax
mov rcx, rax
add rcx, 8
mov rax, [rsp+38h+var_30]
add rcx, [rax+8]
mov [rax+8], rcx
mov rax, [rsp+38h+var_28]
mov [rsp+38h+var_8], rax
loc_205BC:
mov rax, [rsp+38h+var_8]
add rsp, 38h
retn
|
long long js_calloc_rt(long long a1, long long a2, unsigned long long a3)
{
long long v4; // [rsp+10h] [rbp-28h]
if ( a3 && a2 != a3 * a2 / a3 )
return 0LL;
if ( a3 * a2 + *(_QWORD *)(a1 + 48) > *(_QWORD *)(a1 + 56) - 1LL )
return 0LL;
v4 = (*(long long ( **)(_QWORD, long long, unsigned long long))a1)(*(_QWORD *)(a1 + 64), a2, a3);
if ( !v4 )
return 0LL;
++*(_QWORD *)(a1 + 40);
*(_QWORD *)(a1 + 48) += (*(long long ( **)(long long))(a1 + 32))(v4) + 8;
return v4;
}
|
js_calloc_rt:
SUB RSP,0x38
MOV qword ptr [RSP + 0x28],RDI
MOV qword ptr [RSP + 0x20],RSI
MOV qword ptr [RSP + 0x18],RDX
CMP qword ptr [RSP + 0x18],0x0
JBE 0x001204f6
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP],RAX
MOV RAX,qword ptr [RSP + 0x20]
IMUL RAX,qword ptr [RSP + 0x18]
XOR ECX,ECX
MOV EDX,ECX
DIV qword ptr [RSP + 0x18]
MOV RCX,RAX
MOV RAX,qword ptr [RSP]
CMP RAX,RCX
SETNZ AL
XOR AL,0xff
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x001204f4
MOV qword ptr [RSP + 0x30],0x0
JMP 0x001205bc
LAB_001204f4:
JMP 0x001204f6
LAB_001204f6:
MOV RAX,qword ptr [RSP + 0x28]
ADD RAX,0x28
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RSP + 0x20]
IMUL RCX,qword ptr [RSP + 0x18]
ADD RAX,RCX
MOV RCX,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RCX + 0x10]
SUB RCX,0x1
CMP RAX,RCX
SETA AL
XOR AL,0xff
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x0012054a
MOV qword ptr [RSP + 0x30],0x0
JMP 0x001205bc
LAB_0012054a:
MOV RAX,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RCX + 0x18]
MOV RSI,qword ptr [RSP + 0x20]
MOV RDX,qword ptr [RSP + 0x18]
CALL RAX
MOV qword ptr [RSP + 0x10],RAX
CMP qword ptr [RSP + 0x10],0x0
JNZ 0x0012057f
MOV qword ptr [RSP + 0x30],0x0
JMP 0x001205bc
LAB_0012057f:
MOV RAX,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RAX]
ADD RCX,0x1
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RAX + 0x20]
MOV RDI,qword ptr [RSP + 0x10]
CALL RAX
MOV RCX,RAX
ADD RCX,0x8
MOV RAX,qword ptr [RSP + 0x8]
ADD RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x30],RAX
LAB_001205bc:
MOV RAX,qword ptr [RSP + 0x30]
ADD RSP,0x38
RET
|
long js_calloc_rt(int8 *param_1,ulong param_2,ulong param_3)
{
long lVar1;
long local_8;
if ((param_3 == 0) || (param_2 == (param_2 * param_3) / param_3)) {
if (param_1[7] - 1 < param_1[6] + param_2 * param_3) {
local_8 = 0;
}
else {
local_8 = (*(code *)*param_1)(param_1[8],param_2,param_3);
if (local_8 == 0) {
local_8 = 0;
}
else {
param_1[5] = param_1[5] + 1;
lVar1 = (*(code *)param_1[4])(local_8);
param_1[6] = lVar1 + 8 + param_1[6];
}
}
}
else {
local_8 = 0;
}
return local_8;
}
|
|
12,160 |
js_calloc_rt
|
bluesky950520[P]quickjs/quickjs.c
|
void *js_calloc_rt(JSRuntime *rt, size_t count, size_t size)
{
void *ptr;
JSMallocState *s;
/* Do not allocate zero bytes: behavior is platform dependent */
assert(count != 0 && size != 0);
if (size > 0)
if (unlikely(count != (count * size) / size))
return NULL;
s = &rt->malloc_state;
/* When malloc_limit is 0 (unlimited), malloc_limit - 1 will be SIZE_MAX. */
if (unlikely(s->malloc_size + (count * size) > s->malloc_limit - 1))
return NULL;
ptr = rt->mf.js_calloc(s->opaque, count, size);
if (!ptr)
return NULL;
s->malloc_count++;
s->malloc_size += rt->mf.js_malloc_usable_size(ptr) + MALLOC_OVERHEAD;
return ptr;
}
|
O1
|
c
|
js_calloc_rt:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rcx
movq %rdi, %rbx
testq %rdx, %rdx
je 0xec8f
movq %rcx, %rax
mulq %rsi
jo 0xecd2
movq %rcx, %rax
imulq %rsi, %rax
addq 0x30(%rbx), %rax
movq 0x38(%rbx), %rdx
decq %rdx
cmpq %rdx, %rax
ja 0xecd2
movq 0x40(%rbx), %rdi
movq %rcx, %rdx
callq *(%rbx)
testq %rax, %rax
je 0xecd2
movq %rax, %r14
incq 0x28(%rbx)
movq %rax, %rdi
callq *0x20(%rbx)
movq 0x30(%rbx), %rcx
addq %rcx, %rax
addq $0x8, %rax
movq %rax, 0x30(%rbx)
jmp 0xecd5
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
|
js_calloc_rt:
push r14
push rbx
push rax
mov rcx, rdx
mov rbx, rdi
test rdx, rdx
jz short loc_EC8F
mov rax, rcx
mul rsi
jo short loc_ECD2
loc_EC8F:
mov rax, rcx
imul rax, rsi
add rax, [rbx+30h]
mov rdx, [rbx+38h]
dec rdx
cmp rax, rdx
ja short loc_ECD2
mov rdi, [rbx+40h]
mov rdx, rcx
call qword ptr [rbx]
test rax, rax
jz short loc_ECD2
mov r14, rax
inc qword ptr [rbx+28h]
mov rdi, rax
call qword ptr [rbx+20h]
mov rcx, [rbx+30h]
add rax, rcx
add rax, 8
mov [rbx+30h], rax
jmp short loc_ECD5
loc_ECD2:
xor r14d, r14d
loc_ECD5:
mov rax, r14
add rsp, 8
pop rbx
pop r14
retn
|
long long js_calloc_rt(long long a1, unsigned long long a2, unsigned long long a3)
{
long long v3; // rax
long long v4; // r14
if ( a3 && !is_mul_ok(a2, a3) )
return 0LL;
if ( *(_QWORD *)(a1 + 48) + a2 * a3 > *(_QWORD *)(a1 + 56) - 1LL )
return 0LL;
v3 = (*(long long ( **)(_QWORD, unsigned long long, unsigned long long))a1)(*(_QWORD *)(a1 + 64), a2, a3);
if ( !v3 )
return 0LL;
v4 = v3;
++*(_QWORD *)(a1 + 40);
*(_QWORD *)(a1 + 48) += (*(long long ( **)(long long))(a1 + 32))(v3) + 8;
return v4;
}
|
js_calloc_rt:
PUSH R14
PUSH RBX
PUSH RAX
MOV RCX,RDX
MOV RBX,RDI
TEST RDX,RDX
JZ 0x0010ec8f
MOV RAX,RCX
MUL RSI
JO 0x0010ecd2
LAB_0010ec8f:
MOV RAX,RCX
IMUL RAX,RSI
ADD RAX,qword ptr [RBX + 0x30]
MOV RDX,qword ptr [RBX + 0x38]
DEC RDX
CMP RAX,RDX
JA 0x0010ecd2
MOV RDI,qword ptr [RBX + 0x40]
MOV RDX,RCX
CALL qword ptr [RBX]
TEST RAX,RAX
JZ 0x0010ecd2
MOV R14,RAX
INC qword ptr [RBX + 0x28]
MOV RDI,RAX
CALL qword ptr [RBX + 0x20]
MOV RCX,qword ptr [RBX + 0x30]
ADD RAX,RCX
ADD RAX,0x8
MOV qword ptr [RBX + 0x30],RAX
JMP 0x0010ecd5
LAB_0010ecd2:
XOR R14D,R14D
LAB_0010ecd5:
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R14
RET
|
long js_calloc_rt(int8 *param_1,ulong param_2,ulong param_3)
{
int1 auVar1 [16];
int1 auVar2 [16];
long lVar3;
long lVar4;
if ((((param_3 == 0) ||
(auVar1._8_8_ = 0, auVar1._0_8_ = param_3, auVar2._8_8_ = 0, auVar2._0_8_ = param_2,
SUB168(auVar1 * auVar2,8) == 0)) && (param_3 * param_2 + param_1[6] <= param_1[7] - 1)) &&
(lVar3 = (*(code *)*param_1)(param_1[8],param_2,param_3), lVar3 != 0)) {
param_1[5] = param_1[5] + 1;
lVar4 = (*(code *)param_1[4])(lVar3);
param_1[6] = lVar4 + param_1[6] + 8;
return lVar3;
}
return 0;
}
|
|
12,161 |
js_calloc_rt
|
bluesky950520[P]quickjs/quickjs.c
|
void *js_calloc_rt(JSRuntime *rt, size_t count, size_t size)
{
void *ptr;
JSMallocState *s;
/* Do not allocate zero bytes: behavior is platform dependent */
assert(count != 0 && size != 0);
if (size > 0)
if (unlikely(count != (count * size) / size))
return NULL;
s = &rt->malloc_state;
/* When malloc_limit is 0 (unlimited), malloc_limit - 1 will be SIZE_MAX. */
if (unlikely(s->malloc_size + (count * size) > s->malloc_limit - 1))
return NULL;
ptr = rt->mf.js_calloc(s->opaque, count, size);
if (!ptr)
return NULL;
s->malloc_count++;
s->malloc_size += rt->mf.js_malloc_usable_size(ptr) + MALLOC_OVERHEAD;
return ptr;
}
|
O3
|
c
|
js_calloc_rt:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rcx
movq %rdi, %rbx
testq %rdx, %rdx
je 0xecae
movq %rcx, %rax
mulq %rsi
jo 0xecf1
movq %rcx, %rax
imulq %rsi, %rax
addq 0x30(%rbx), %rax
movq 0x38(%rbx), %rdx
decq %rdx
cmpq %rdx, %rax
ja 0xecf1
movq 0x40(%rbx), %rdi
movq %rcx, %rdx
callq *(%rbx)
testq %rax, %rax
je 0xecf1
movq %rax, %r14
incq 0x28(%rbx)
movq %rax, %rdi
callq *0x20(%rbx)
movq 0x30(%rbx), %rcx
addq %rcx, %rax
addq $0x8, %rax
movq %rax, 0x30(%rbx)
jmp 0xecf4
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
|
js_calloc_rt:
push r14
push rbx
push rax
mov rcx, rdx
mov rbx, rdi
test rdx, rdx
jz short loc_ECAE
mov rax, rcx
mul rsi
jo short loc_ECF1
loc_ECAE:
mov rax, rcx
imul rax, rsi
add rax, [rbx+30h]
mov rdx, [rbx+38h]
dec rdx
cmp rax, rdx
ja short loc_ECF1
mov rdi, [rbx+40h]
mov rdx, rcx
call qword ptr [rbx]
test rax, rax
jz short loc_ECF1
mov r14, rax
inc qword ptr [rbx+28h]
mov rdi, rax
call qword ptr [rbx+20h]
mov rcx, [rbx+30h]
add rax, rcx
add rax, 8
mov [rbx+30h], rax
jmp short loc_ECF4
loc_ECF1:
xor r14d, r14d
loc_ECF4:
mov rax, r14
add rsp, 8
pop rbx
pop r14
retn
|
long long js_calloc_rt(long long a1, unsigned long long a2, unsigned long long a3)
{
long long v3; // rax
long long v4; // r14
if ( a3 && !is_mul_ok(a2, a3) )
return 0LL;
if ( *(_QWORD *)(a1 + 48) + a2 * a3 > *(_QWORD *)(a1 + 56) - 1LL )
return 0LL;
v3 = (*(long long ( **)(_QWORD, unsigned long long, unsigned long long))a1)(*(_QWORD *)(a1 + 64), a2, a3);
if ( !v3 )
return 0LL;
v4 = v3;
++*(_QWORD *)(a1 + 40);
*(_QWORD *)(a1 + 48) += (*(long long ( **)(long long))(a1 + 32))(v3) + 8;
return v4;
}
|
js_calloc_rt:
PUSH R14
PUSH RBX
PUSH RAX
MOV RCX,RDX
MOV RBX,RDI
TEST RDX,RDX
JZ 0x0010ecae
MOV RAX,RCX
MUL RSI
JO 0x0010ecf1
LAB_0010ecae:
MOV RAX,RCX
IMUL RAX,RSI
ADD RAX,qword ptr [RBX + 0x30]
MOV RDX,qword ptr [RBX + 0x38]
DEC RDX
CMP RAX,RDX
JA 0x0010ecf1
MOV RDI,qword ptr [RBX + 0x40]
MOV RDX,RCX
CALL qword ptr [RBX]
TEST RAX,RAX
JZ 0x0010ecf1
MOV R14,RAX
INC qword ptr [RBX + 0x28]
MOV RDI,RAX
CALL qword ptr [RBX + 0x20]
MOV RCX,qword ptr [RBX + 0x30]
ADD RAX,RCX
ADD RAX,0x8
MOV qword ptr [RBX + 0x30],RAX
JMP 0x0010ecf4
LAB_0010ecf1:
XOR R14D,R14D
LAB_0010ecf4:
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R14
RET
|
long js_calloc_rt(int8 *param_1,ulong param_2,ulong param_3)
{
int1 auVar1 [16];
int1 auVar2 [16];
long lVar3;
long lVar4;
if ((((param_3 == 0) ||
(auVar1._8_8_ = 0, auVar1._0_8_ = param_3, auVar2._8_8_ = 0, auVar2._0_8_ = param_2,
SUB168(auVar1 * auVar2,8) == 0)) && (param_3 * param_2 + param_1[6] <= param_1[7] - 1)) &&
(lVar3 = (*(code *)*param_1)(param_1[8],param_2,param_3), lVar3 != 0)) {
param_1[5] = param_1[5] + 1;
lVar4 = (*(code *)param_1[4])(lVar3);
param_1[6] = lVar4 + param_1[6] + 8;
return lVar3;
}
return 0;
}
|
|
12,162 |
ImPlot3D::SetupLegend(int, int)
|
zkingston[P]unknot/build_O0/_deps/implot3d-src/implot3d.cpp
|
void SetupLegend(ImPlot3DLocation location, ImPlot3DLegendFlags flags) {
ImPlot3DContext& gp = *GImPlot3D;
IM_ASSERT_USER_ERROR(gp.CurrentPlot != nullptr && !gp.CurrentPlot->SetupLocked,
"SetupLegend() needs to be called after BeginPlot() and before any setup locking functions (e.g. PlotX)!");
IM_ASSERT_USER_ERROR(gp.CurrentItems != nullptr,
"SetupLegend() needs to be called within an itemized context!");
ImPlot3DLegend& legend = gp.CurrentItems->Legend;
if (legend.PreviousLocation != location)
legend.Location = location;
legend.PreviousLocation = location;
if (legend.PreviousFlags != flags)
legend.Flags = flags;
legend.PreviousFlags = flags;
}
|
O0
|
cpp
|
ImPlot3D::SetupLegend(int, int):
subq $0x18, %rsp
movl %edi, 0x14(%rsp)
movl %esi, 0x10(%rsp)
movq 0x5bdb65(%rip), %rax # 0x68f638
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
cmpq $0x0, 0x28(%rax)
je 0xd1af6
movq 0x8(%rsp), %rax
movq 0x28(%rax), %rax
testb $0x1, 0x1e8(%rax)
je 0xd1b0a
leaq 0x500980(%rip), %rdi # 0x5d247d
callq 0x4f7220
testb $0x1, %al
jne 0xd1b08
jmp 0xd1b0a
jmp 0xd1b0a
jmp 0xd1b0c
jmp 0xd1b0e
movq 0x8(%rsp), %rax
cmpq $0x0, 0x30(%rax)
jne 0xd1b2e
leaq 0x5009c4(%rip), %rdi # 0x5d24e5
callq 0x4f7220
testb $0x1, %al
jne 0xd1b2c
jmp 0xd1b2e
jmp 0xd1b2e
jmp 0xd1b30
movq 0x8(%rsp), %rax
movq 0x30(%rax), %rax
addq $0x28, %rax
movq %rax, (%rsp)
movq (%rsp), %rax
movl 0xc(%rax), %eax
cmpl 0x14(%rsp), %eax
je 0xd1b59
movl 0x14(%rsp), %ecx
movq (%rsp), %rax
movl %ecx, 0x8(%rax)
movl 0x14(%rsp), %ecx
movq (%rsp), %rax
movl %ecx, 0xc(%rax)
movq (%rsp), %rax
movl 0x4(%rax), %eax
cmpl 0x10(%rsp), %eax
je 0xd1b7b
movl 0x10(%rsp), %ecx
movq (%rsp), %rax
movl %ecx, (%rax)
movl 0x10(%rsp), %ecx
movq (%rsp), %rax
movl %ecx, 0x4(%rax)
addq $0x18, %rsp
retq
nopl (%rax,%rax)
|
_ZN8ImPlot3D11SetupLegendEii:
sub rsp, 18h
mov [rsp+18h+var_4], edi
mov [rsp+18h+var_8], esi
mov rax, cs:_ZN8ImPlot3D9GImPlot3DE; ImPlot3D::GImPlot3D
mov [rsp+18h+var_10], rax
mov rax, [rsp+18h+var_10]
cmp qword ptr [rax+28h], 0
jz short loc_D1AF6
mov rax, [rsp+18h+var_10]
mov rax, [rax+28h]
test byte ptr [rax+1E8h], 1
jz short loc_D1B0A
loc_D1AF6:
lea rdi, aSetuplegendNee; "SetupLegend() needs to be called after "...
call _ZN5ImGui8ErrorLogEPKc; ImGui::ErrorLog(char const*)
test al, 1
jnz short loc_D1B08
jmp short loc_D1B0A
loc_D1B08:
jmp short $+2
loc_D1B0A:
jmp short $+2
loc_D1B0C:
jmp short $+2
loc_D1B0E:
mov rax, [rsp+18h+var_10]
cmp qword ptr [rax+30h], 0
jnz short loc_D1B2E
lea rdi, aSetuplegendNee_0; "SetupLegend() needs to be called within"...
call _ZN5ImGui8ErrorLogEPKc; ImGui::ErrorLog(char const*)
test al, 1
jnz short loc_D1B2C
jmp short loc_D1B2E
loc_D1B2C:
jmp short $+2
loc_D1B2E:
jmp short $+2
loc_D1B30:
mov rax, [rsp+18h+var_10]
mov rax, [rax+30h]
add rax, 28h ; '('
mov [rsp+18h+var_18], rax
mov rax, [rsp+18h+var_18]
mov eax, [rax+0Ch]
cmp eax, [rsp+18h+var_4]
jz short loc_D1B59
mov ecx, [rsp+18h+var_4]
mov rax, [rsp+18h+var_18]
mov [rax+8], ecx
loc_D1B59:
mov ecx, [rsp+18h+var_4]
mov rax, [rsp+18h+var_18]
mov [rax+0Ch], ecx
mov rax, [rsp+18h+var_18]
mov eax, [rax+4]
cmp eax, [rsp+18h+var_8]
jz short loc_D1B7B
mov ecx, [rsp+18h+var_8]
mov rax, [rsp+18h+var_18]
mov [rax], ecx
loc_D1B7B:
mov ecx, [rsp+18h+var_8]
mov rax, [rsp+18h+var_18]
mov [rax+4], ecx
add rsp, 18h
retn
|
_DWORD * ImPlot3D::SetupLegend(ImPlot3D *this, const char *a2)
{
_DWORD *result; // rax
_DWORD *v3; // [rsp+0h] [rbp-18h]
long long v4; // [rsp+8h] [rbp-10h]
v4 = ImPlot3D::GImPlot3D;
if ( !*(_QWORD *)(ImPlot3D::GImPlot3D + 40) || (*(_BYTE *)(*(_QWORD *)(ImPlot3D::GImPlot3D + 40) + 488LL) & 1) != 0 )
ImGui::ErrorLog(
(ImGui *)"SetupLegend() needs to be called after BeginPlot() and before any setup locking functions (e.g. PlotX)!",
a2);
if ( !*(_QWORD *)(v4 + 48) )
ImGui::ErrorLog((ImGui *)"SetupLegend() needs to be called within an itemized context!", a2);
v3 = (_DWORD *)(*(_QWORD *)(v4 + 48) + 40LL);
if ( *(_DWORD *)(*(_QWORD *)(v4 + 48) + 52LL) != (_DWORD)this )
*(_DWORD *)(*(_QWORD *)(v4 + 48) + 48LL) = (_DWORD)this;
v3[3] = (_DWORD)this;
if ( v3[1] != (_DWORD)a2 )
*v3 = (_DWORD)a2;
result = v3;
v3[1] = (_DWORD)a2;
return result;
}
|
SetupLegend:
SUB RSP,0x18
MOV dword ptr [RSP + 0x14],EDI
MOV dword ptr [RSP + 0x10],ESI
MOV RAX,qword ptr [0x0078f638]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x8]
CMP qword ptr [RAX + 0x28],0x0
JZ 0x001d1af6
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX + 0x28]
TEST byte ptr [RAX + 0x1e8],0x1
JZ 0x001d1b0a
LAB_001d1af6:
LEA RDI,[0x6d247d]
CALL 0x005f7220
TEST AL,0x1
JNZ 0x001d1b08
JMP 0x001d1b0a
LAB_001d1b08:
JMP 0x001d1b0a
LAB_001d1b0a:
JMP 0x001d1b0c
LAB_001d1b0c:
JMP 0x001d1b0e
LAB_001d1b0e:
MOV RAX,qword ptr [RSP + 0x8]
CMP qword ptr [RAX + 0x30],0x0
JNZ 0x001d1b2e
LEA RDI,[0x6d24e5]
CALL 0x005f7220
TEST AL,0x1
JNZ 0x001d1b2c
JMP 0x001d1b2e
LAB_001d1b2c:
JMP 0x001d1b2e
LAB_001d1b2e:
JMP 0x001d1b30
LAB_001d1b30:
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX + 0x30]
ADD RAX,0x28
MOV qword ptr [RSP],RAX
MOV RAX,qword ptr [RSP]
MOV EAX,dword ptr [RAX + 0xc]
CMP EAX,dword ptr [RSP + 0x14]
JZ 0x001d1b59
MOV ECX,dword ptr [RSP + 0x14]
MOV RAX,qword ptr [RSP]
MOV dword ptr [RAX + 0x8],ECX
LAB_001d1b59:
MOV ECX,dword ptr [RSP + 0x14]
MOV RAX,qword ptr [RSP]
MOV dword ptr [RAX + 0xc],ECX
MOV RAX,qword ptr [RSP]
MOV EAX,dword ptr [RAX + 0x4]
CMP EAX,dword ptr [RSP + 0x10]
JZ 0x001d1b7b
MOV ECX,dword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP]
MOV dword ptr [RAX],ECX
LAB_001d1b7b:
MOV ECX,dword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP]
MOV dword ptr [RAX + 0x4],ECX
ADD RSP,0x18
RET
|
/* ImPlot3D::SetupLegend(int, int) */
void ImPlot3D::SetupLegend(int param_1,int param_2)
{
long lVar1;
lVar1 = GImPlot3D;
if ((*(long *)(GImPlot3D + 0x28) == 0) ||
((*(byte *)(*(long *)(GImPlot3D + 0x28) + 0x1e8) & 1) != 0)) {
ImGui::ErrorLog(
"SetupLegend() needs to be called after BeginPlot() and before any setup locking functions (e.g. PlotX)!"
);
}
if (*(long *)(lVar1 + 0x30) == 0) {
ImGui::ErrorLog("SetupLegend() needs to be called within an itemized context!");
}
lVar1 = *(long *)(lVar1 + 0x30);
if (*(int *)(lVar1 + 0x34) != param_1) {
*(int *)(lVar1 + 0x30) = param_1;
}
*(int *)(lVar1 + 0x34) = param_1;
if (*(int *)(lVar1 + 0x2c) != param_2) {
*(int *)(lVar1 + 0x28) = param_2;
}
*(int *)(lVar1 + 0x2c) = param_2;
return;
}
|
|
12,163 |
google::protobuf::MessageLite::GetArenaForAllocation() const
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/message_lite.h
|
Arena* GetArenaForAllocation() const { return _internal_metadata_.arena(); }
|
O0
|
c
|
google::protobuf::MessageLite::GetArenaForAllocation() const:
subq $0x38, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq (%rax), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x29336
movq 0x8(%rsp), %rdi
callq 0x29350
movq (%rax), %rax
movq %rax, 0x20(%rsp)
jmp 0x29345
movq 0x8(%rsp), %rdi
callq 0x29370
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x38, %rsp
retq
nop
|
_ZNK6google8protobuf11MessageLite21GetArenaForAllocationEv:
sub rsp, 38h
mov [rsp+38h+var_28], rdi
mov rax, [rsp+38h+var_28]
add rax, 8
mov [rsp+38h+var_20], rax
mov rax, [rsp+38h+var_20]
mov [rsp+38h+var_30], rax
mov [rsp+38h+var_10], rax
mov rax, [rsp+38h+var_10]
mov [rsp+38h+var_8], rax
mov rax, [rsp+38h+var_8]
mov rax, [rax]
and rax, 1
cmp rax, 0
jz short loc_29336
mov rdi, [rsp+38h+var_30]
call _ZNK6google8protobuf8internal16InternalMetadata8PtrValueINS2_13ContainerBaseEEEPT_v; google::protobuf::internal::InternalMetadata::PtrValue<google::protobuf::internal::InternalMetadata::ContainerBase>(void)
mov rax, [rax]
mov [rsp+38h+var_18], rax
jmp short loc_29345
loc_29336:
mov rdi, [rsp+38h+var_30]
call _ZNK6google8protobuf8internal16InternalMetadata8PtrValueINS0_5ArenaEEEPT_v; google::protobuf::internal::InternalMetadata::PtrValue<google::protobuf::Arena>(void)
mov [rsp+38h+var_18], rax
loc_29345:
mov rax, [rsp+38h+var_18]
add rsp, 38h
retn
|
long long google::protobuf::MessageLite::GetArenaForAllocation(google::protobuf::MessageLite *this)
{
char *v2; // [rsp+8h] [rbp-30h]
v2 = (char *)this + 8;
if ( (*((_QWORD *)this + 1) & 1LL) != 0 )
return *(_QWORD *)google::protobuf::internal::InternalMetadata::PtrValue<google::protobuf::internal::InternalMetadata::ContainerBase>(v2);
else
return google::protobuf::internal::InternalMetadata::PtrValue<google::protobuf::Arena>(v2);
}
|
GetArenaForAllocation:
SUB RSP,0x38
MOV qword ptr [RSP + 0x10],RDI
MOV RAX,qword ptr [RSP + 0x10]
ADD RAX,0x8
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x30],RAX
MOV RAX,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RAX]
AND RAX,0x1
CMP RAX,0x0
JZ 0x00129336
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x00129350
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x20],RAX
JMP 0x00129345
LAB_00129336:
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x00129370
MOV qword ptr [RSP + 0x20],RAX
LAB_00129345:
MOV RAX,qword ptr [RSP + 0x20]
ADD RSP,0x38
RET
|
/* google::protobuf::MessageLite::GetArenaForAllocation() const */
Arena * __thiscall google::protobuf::MessageLite::GetArenaForAllocation(MessageLite *this)
{
InternalMetadata *this_00;
ContainerBase *pCVar1;
Arena *local_18;
this_00 = (InternalMetadata *)(this + 8);
if ((*(ulong *)this_00 & 1) == 0) {
local_18 = internal::InternalMetadata::PtrValue<google::protobuf::Arena>(this_00);
}
else {
pCVar1 = internal::InternalMetadata::
PtrValue<google::protobuf::internal::InternalMetadata::ContainerBase>(this_00);
local_18 = *(Arena **)pCVar1;
}
return local_18;
}
|
|
12,164 |
psi_mutex_trylock
|
eloqsql/mysys/my_thr_init.c
|
ATTRIBUTE_COLD int psi_mutex_trylock(mysql_mutex_t *that,
const char *file, uint line)
{
PSI_mutex_locker_state state;
PSI_mutex_locker *locker= PSI_MUTEX_CALL(start_mutex_wait)
(&state, that->m_psi, PSI_MUTEX_TRYLOCK, file, line);
# ifdef SAFE_MUTEX
int result= safe_mutex_lock(&that->m_mutex, TRUE, file, line);
# else
int result= pthread_mutex_trylock(&that->m_mutex);
# endif
if (locker)
PSI_MUTEX_CALL(end_mutex_wait)(locker, result);
return result;
}
|
O0
|
c
|
psi_mutex_trylock:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
leaq 0x1abdfe(%rip), %rax # 0x1dd8b8
movq (%rax), %rax
movq 0x190(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x40(%rcx), %rsi
movq -0x10(%rbp), %rcx
movl -0x14(%rbp), %r8d
leaq -0x48(%rbp), %rdi
movl $0x1, %edx
callq *%rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rdi
callq 0x24090
movl %eax, -0x54(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0x31b10
leaq 0x1abdbb(%rip), %rax # 0x1dd8b8
movq (%rax), %rax
movq 0x198(%rax), %rax
movq -0x50(%rbp), %rdi
movl -0x54(%rbp), %esi
callq *%rax
movl -0x54(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
|
psi_mutex_trylock:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+190h]
mov rcx, [rbp+var_8]
mov rsi, [rcx+40h]
mov rcx, [rbp+var_10]
mov r8d, [rbp+var_14]
lea rdi, [rbp+var_48]
mov edx, 1
call rax
mov [rbp+var_50], rax
mov rdi, [rbp+var_8]
call _pthread_mutex_trylock
mov [rbp+var_54], eax
cmp [rbp+var_50], 0
jz short loc_31B10
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+198h]
mov rdi, [rbp+var_50]
mov esi, [rbp+var_54]
call rax
loc_31B10:
mov eax, [rbp+var_54]
add rsp, 60h
pop rbp
retn
|
long long psi_mutex_trylock(long long a1, long long a2, unsigned int a3)
{
unsigned int v4; // [rsp+Ch] [rbp-54h]
long long v5; // [rsp+10h] [rbp-50h]
_BYTE v6[52]; // [rsp+18h] [rbp-48h] BYREF
unsigned int v7; // [rsp+4Ch] [rbp-14h]
long long v8; // [rsp+50h] [rbp-10h]
long long v9; // [rsp+58h] [rbp-8h]
v9 = a1;
v8 = a2;
v7 = a3;
v5 = (*((long long ( **)(_BYTE *, _QWORD, long long, long long, _QWORD))PSI_server[0] + 50))(
v6,
*(_QWORD *)(a1 + 64),
1LL,
a2,
a3);
v4 = pthread_mutex_trylock(v9);
if ( v5 )
(*((void ( **)(long long, _QWORD))PSI_server[0] + 51))(v5, v4);
return v4;
}
|
psi_mutex_trylock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
LEA RAX,[0x2dd8b8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x190]
MOV RCX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RCX + 0x40]
MOV RCX,qword ptr [RBP + -0x10]
MOV R8D,dword ptr [RBP + -0x14]
LEA RDI,[RBP + -0x48]
MOV EDX,0x1
CALL RAX
MOV qword ptr [RBP + -0x50],RAX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00124090
MOV dword ptr [RBP + -0x54],EAX
CMP qword ptr [RBP + -0x50],0x0
JZ 0x00131b10
LEA RAX,[0x2dd8b8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x198]
MOV RDI,qword ptr [RBP + -0x50]
MOV ESI,dword ptr [RBP + -0x54]
CALL RAX
LAB_00131b10:
MOV EAX,dword ptr [RBP + -0x54]
ADD RSP,0x60
POP RBP
RET
|
int psi_mutex_trylock(pthread_mutex_t *param_1,int8 param_2,int4 param_3)
{
int iVar1;
long lVar2;
int1 local_50 [52];
int4 local_1c;
int8 local_18;
pthread_mutex_t *local_10;
local_1c = param_3;
local_18 = param_2;
local_10 = param_1;
lVar2 = (**(code **)(PSI_server + 400))
(local_50,*(int8 *)((long)param_1 + 0x40),1,param_2,param_3);
iVar1 = pthread_mutex_trylock(local_10);
if (lVar2 != 0) {
(**(code **)(PSI_server + 0x198))(lVar2,iVar1);
}
return iVar1;
}
|
|
12,165 |
mi_new
|
eloqsql/storage/myisam/mi_page.c
|
my_off_t _mi_new(register MI_INFO *info, MI_KEYDEF *keyinfo, int level)
{
my_off_t pos;
uchar buff[8];
DBUG_ENTER("_mi_new");
if ((pos= info->s->state.key_del[keyinfo->block_size_index]) ==
HA_OFFSET_ERROR)
{
if (info->state->key_file_length >=
info->s->base.max_key_file_length - keyinfo->block_length)
{
my_errno=HA_ERR_INDEX_FILE_FULL;
DBUG_RETURN(HA_OFFSET_ERROR);
}
pos=info->state->key_file_length;
info->state->key_file_length+= keyinfo->block_length;
}
else
{
if (!key_cache_read(info->s->key_cache,
info->s->kfile, pos, level,
buff,
(uint) sizeof(buff),
(uint) keyinfo->block_length,0))
pos= HA_OFFSET_ERROR;
else
info->s->state.key_del[keyinfo->block_size_index]= mi_sizekorr(buff);
}
info->s->state.changed|= STATE_NOT_SORTED_PAGES;
DBUG_PRINT("exit",("Pos: %ld",(long) pos));
DBUG_RETURN(pos);
}
|
O3
|
c
|
mi_new:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %edx, %ecx
movq %rsi, %r15
movq %rdi, %r14
movq %fs:0x28, %rax
movq %rax, -0x20(%rbp)
movq (%rdi), %rax
movq 0xa0(%rax), %rdx
movzwl 0x18(%rsi), %esi
movq (%rdx,%rsi,8), %rbx
cmpq $-0x1, %rbx
je 0x83da8
movq 0x278(%rax), %rdi
movl 0x350(%rax), %esi
movzwl 0xe(%r15), %eax
leaq -0x28(%rbp), %r8
movq %rbx, %rdx
movl $0x8, %r9d
pushq $0x0
pushq %rax
callq 0x98440
addq $0x10, %rsp
testq %rax, %rax
je 0x83dcd
movq -0x28(%rbp), %rax
bswapq %rax
movq (%r14), %rcx
movq 0xa0(%rcx), %rcx
movzwl 0x18(%r15), %edx
movq %rax, (%rcx,%rdx,8)
jmp 0x83dd4
movq 0x8(%r14), %rcx
movq 0x20(%rcx), %rbx
movq 0x118(%rax), %rdx
movzwl 0xe(%r15), %eax
subq %rax, %rdx
cmpq %rdx, %rbx
jae 0x83dfb
addq %rbx, %rax
movq %rax, 0x20(%rcx)
jmp 0x83dd4
movq $-0x1, %rbx
movq (%r14), %rax
orb $0x20, 0xf0(%rax)
movq %fs:0x28, %rax
cmpq -0x20(%rbp), %rax
jne 0x83e0f
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0xa1ab2
movl $0x88, (%rax)
movq $-0x1, %rbx
jmp 0x83dde
callq 0x29250
|
_mi_new:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 18h
mov ecx, edx
mov r15, rsi
mov r14, rdi
mov rax, fs:28h
mov [rbp+var_20], rax
mov rax, [rdi]
mov rdx, [rax+0A0h]
movzx esi, word ptr [rsi+18h]
mov rbx, [rdx+rsi*8]
cmp rbx, 0FFFFFFFFFFFFFFFFh
jz short loc_83DA8
mov rdi, [rax+278h]
mov esi, [rax+350h]
movzx eax, word ptr [r15+0Eh]
lea r8, [rbp+var_28]
mov rdx, rbx
mov r9d, 8
push 0
push rax
call key_cache_read
add rsp, 10h
test rax, rax
jz short loc_83DCD
mov rax, [rbp+var_28]
bswap rax
mov rcx, [r14]
mov rcx, [rcx+0A0h]
movzx edx, word ptr [r15+18h]
mov [rcx+rdx*8], rax
jmp short loc_83DD4
loc_83DA8:
mov rcx, [r14+8]
mov rbx, [rcx+20h]
mov rdx, [rax+118h]
movzx eax, word ptr [r15+0Eh]
sub rdx, rax
cmp rbx, rdx
jnb short loc_83DFB
add rax, rbx
mov [rcx+20h], rax
jmp short loc_83DD4
loc_83DCD:
mov rbx, 0FFFFFFFFFFFFFFFFh
loc_83DD4:
mov rax, [r14]
or byte ptr [rax+0F0h], 20h
loc_83DDE:
mov rax, fs:28h
cmp rax, [rbp+var_20]
jnz short loc_83E0F
mov rax, rbx
add rsp, 18h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_83DFB:
call _my_thread_var
mov dword ptr [rax], 88h
mov rbx, 0FFFFFFFFFFFFFFFFh
jmp short loc_83DDE
loc_83E0F:
call ___stack_chk_fail
|
long long mi_new(_QWORD *a1, long long a2)
{
long long v2; // rax
unsigned long long v3; // rbx
long long v4; // rcx
long long v5; // rdx
long long v6; // rax
unsigned long long v8; // [rsp+8h] [rbp-28h]
v2 = *a1;
v3 = *(_QWORD *)(*(_QWORD *)(*a1 + 160LL) + 8LL * *(unsigned __int16 *)(a2 + 24));
if ( v3 == -1LL )
{
v4 = a1[1];
v3 = *(_QWORD *)(v4 + 32);
v5 = *(_QWORD *)(v2 + 280);
v6 = *(unsigned __int16 *)(a2 + 14);
if ( v3 >= v5 - v6 )
{
*(_DWORD *)my_thread_var(a1) = 136;
return -1LL;
}
*(_QWORD *)(v4 + 32) = v3 + v6;
}
else if ( key_cache_read(*(_QWORD *)(v2 + 632), *(unsigned int *)(v2 + 848), v3) )
{
*(_QWORD *)(*(_QWORD *)(*a1 + 160LL) + 8LL * *(unsigned __int16 *)(a2 + 24)) = _byteswap_uint64(v8);
}
else
{
v3 = -1LL;
}
*(_BYTE *)(*a1 + 240LL) |= 0x20u;
return v3;
}
|
_mi_new:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV ECX,EDX
MOV R15,RSI
MOV R14,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RDI]
MOV RDX,qword ptr [RAX + 0xa0]
MOVZX ESI,word ptr [RSI + 0x18]
MOV RBX,qword ptr [RDX + RSI*0x8]
CMP RBX,-0x1
JZ 0x00183da8
MOV RDI,qword ptr [RAX + 0x278]
MOV ESI,dword ptr [RAX + 0x350]
MOVZX EAX,word ptr [R15 + 0xe]
LEA R8,[RBP + -0x28]
MOV RDX,RBX
MOV R9D,0x8
PUSH 0x0
PUSH RAX
CALL 0x00198440
ADD RSP,0x10
TEST RAX,RAX
JZ 0x00183dcd
MOV RAX,qword ptr [RBP + -0x28]
BSWAP RAX
MOV RCX,qword ptr [R14]
MOV RCX,qword ptr [RCX + 0xa0]
MOVZX EDX,word ptr [R15 + 0x18]
MOV qword ptr [RCX + RDX*0x8],RAX
JMP 0x00183dd4
LAB_00183da8:
MOV RCX,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [RCX + 0x20]
MOV RDX,qword ptr [RAX + 0x118]
MOVZX EAX,word ptr [R15 + 0xe]
SUB RDX,RAX
CMP RBX,RDX
JNC 0x00183dfb
ADD RAX,RBX
MOV qword ptr [RCX + 0x20],RAX
JMP 0x00183dd4
LAB_00183dcd:
MOV RBX,-0x1
LAB_00183dd4:
MOV RAX,qword ptr [R14]
OR byte ptr [RAX + 0xf0],0x20
LAB_00183dde:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x00183e0f
MOV RAX,RBX
ADD RSP,0x18
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00183dfb:
CALL 0x001a1ab2
MOV dword ptr [RAX],0x88
MOV RBX,-0x1
JMP 0x00183dde
LAB_00183e0f:
CALL 0x00129250
|
ulong _mi_new(long *param_1,long param_2,int4 param_3)
{
long lVar1;
int4 *puVar2;
ulong uVar3;
long in_FS_OFFSET;
ulong local_30;
long local_28;
local_28 = *(long *)(in_FS_OFFSET + 0x28);
lVar1 = *param_1;
uVar3 = *(ulong *)(*(long *)(lVar1 + 0xa0) + (ulong)*(ushort *)(param_2 + 0x18) * 8);
if (uVar3 == 0xffffffffffffffff) {
uVar3 = *(ulong *)(param_1[1] + 0x20);
if (*(long *)(lVar1 + 0x118) - (ulong)*(ushort *)(param_2 + 0xe) <= uVar3) {
puVar2 = (int4 *)_my_thread_var();
*puVar2 = 0x88;
uVar3 = 0xffffffffffffffff;
goto LAB_00183dde;
}
*(ulong *)(param_1[1] + 0x20) = *(ushort *)(param_2 + 0xe) + uVar3;
}
else {
lVar1 = key_cache_read(*(int8 *)(lVar1 + 0x278),*(int4 *)(lVar1 + 0x350),uVar3,
param_3,&local_30,8,*(int2 *)(param_2 + 0xe),0);
if (lVar1 == 0) {
uVar3 = 0xffffffffffffffff;
}
else {
*(ulong *)(*(long *)(*param_1 + 0xa0) + (ulong)*(ushort *)(param_2 + 0x18) * 8) =
local_30 >> 0x38 | (local_30 & 0xff000000000000) >> 0x28 |
(local_30 & 0xff0000000000) >> 0x18 | (local_30 & 0xff00000000) >> 8 |
(local_30 & 0xff000000) << 8 | (local_30 & 0xff0000) << 0x18 |
(local_30 & 0xff00) << 0x28 | local_30 << 0x38;
}
}
*(byte *)(*param_1 + 0xf0) = *(byte *)(*param_1 + 0xf0) | 0x20;
LAB_00183dde:
if (*(long *)(in_FS_OFFSET + 0x28) == local_28) {
return uVar3;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
12,166 |
nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, 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>>>>>::exception_message(nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::token_type, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/json.hpp
|
std::string exception_message(const token_type expected, const std::string& context)
{
std::string error_msg = "syntax error ";
if (!context.empty())
{
error_msg += concat("while parsing ", context, ' ');
}
error_msg += "- ";
if (last_token == token_type::parse_error)
{
error_msg += concat(m_lexer.get_error_message(), "; last read: '",
m_lexer.get_token_string(), '\'');
}
else
{
error_msg += concat("unexpected ", lexer_t::token_type_name(last_token));
}
if (expected != token_type::uninitialized)
{
error_msg += concat("; expected ", lexer_t::token_type_name(expected));
}
return error_msg;
}
|
O0
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, 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>>>>>::exception_message(nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::token_type, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp # imm = 0x130
movq %rdi, -0x110(%rbp)
movq %rdi, %rax
movq %rax, -0x120(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x118(%rbp)
movb $0x0, -0x21(%rbp)
leaq -0x22(%rbp), %rdi
movq %rdi, -0x108(%rbp)
callq 0x611c0
movq -0x110(%rbp), %rdi
movq -0x108(%rbp), %rdx
leaq 0x1812b(%rip), %rsi # 0x9139a
callq 0x60e40
jmp 0x79276
leaq -0x22(%rbp), %rdi
callq 0x5eab0
movq -0x20(%rbp), %rdi
callq 0x60c90
testb $0x1, %al
jne 0x79310
movq -0x20(%rbp), %rdx
movb $0x20, -0x59(%rbp)
leaq 0x18109(%rip), %rsi # 0x913a8
leaq -0x58(%rbp), %rdi
leaq -0x59(%rbp), %rcx
callq 0x5d530
jmp 0x792ae
movq -0x110(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x5f5b0
jmp 0x792c0
leaq -0x58(%rbp), %rdi
callq 0x5cfd0
jmp 0x79310
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x22(%rbp), %rdi
callq 0x5eab0
jmp 0x79509
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x794fd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x5cfd0
jmp 0x794fd
movq -0x110(%rbp), %rdi
leaq 0x18099(%rip), %rsi # 0x913b7
callq 0x5e2e0
jmp 0x79325
movq -0x118(%rbp), %rax
cmpl $0xe, 0x20(%rax)
jne 0x793f7
movq -0x118(%rbp), %rdi
addq $0x28, %rdi
movq %rdi, -0x128(%rbp)
callq 0x5f740
movq -0x128(%rbp), %rsi
movq %rax, -0x88(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x5b830
jmp 0x79369
movb $0x27, -0xa9(%rbp)
leaq 0x18043(%rip), %rdx # 0x913ba
leaq -0x80(%rbp), %rdi
leaq -0x88(%rbp), %rsi
leaq -0xa8(%rbp), %rcx
leaq -0xa9(%rbp), %r8
callq 0x5c0a0
jmp 0x79397
movq -0x110(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x5f5b0
jmp 0x793a9
leaq -0x80(%rbp), %rdi
callq 0x5cfd0
leaq -0xa8(%rbp), %rdi
callq 0x5cfd0
jmp 0x79469
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x793e6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x5cfd0
leaq -0xa8(%rbp), %rdi
callq 0x5cfd0
jmp 0x794fd
movq -0x118(%rbp), %rax
movl 0x20(%rax), %edi
callq 0x5c730
movq %rax, -0xd8(%rbp)
leaq 0x17fb5(%rip), %rsi # 0x913c9
leaq -0xd0(%rbp), %rdi
leaq -0xd8(%rbp), %rdx
callq 0x609d0
jmp 0x79429
movq -0x110(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x5f5b0
jmp 0x7943e
leaq -0xd0(%rbp), %rdi
callq 0x5cfd0
jmp 0x79469
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0x5cfd0
jmp 0x794fd
cmpl $0x0, -0x14(%rbp)
je 0x794d7
movl -0x14(%rbp), %edi
callq 0x5c730
movq %rax, -0x100(%rbp)
leaq 0x17f50(%rip), %rsi # 0x913d5
leaq -0xf8(%rbp), %rdi
leaq -0x100(%rbp), %rdx
callq 0x609d0
jmp 0x7949a
movq -0x110(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
callq 0x5f5b0
jmp 0x794af
leaq -0xf8(%rbp), %rdi
callq 0x5cfd0
jmp 0x794d7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0xf8(%rbp), %rdi
callq 0x5cfd0
jmp 0x794fd
movb $0x1, -0x21(%rbp)
testb $0x1, -0x21(%rbp)
jne 0x794ed
movq -0x110(%rbp), %rdi
callq 0x5cfd0
movq -0x120(%rbp), %rax
addq $0x130, %rsp # imm = 0x130
popq %rbp
retq
movq -0x110(%rbp), %rdi
callq 0x5cfd0
movq -0x30(%rbp), %rdi
callq 0x611b0
nopw %cs:(%rax,%rax)
nopl (%rax)
|
_ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE17exception_messageENS1_10lexer_baseISF_E10token_typeERKSB_:
push rbp
mov rbp, rsp
sub rsp, 130h
mov [rbp+var_110], rdi
mov rax, rdi
mov [rbp+var_120], rax
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov [rbp+var_20], rcx
mov rax, [rbp+var_10]
mov [rbp+var_118], rax
mov [rbp+var_21], 0
lea rdi, [rbp+var_22]
mov [rbp+var_108], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdi, [rbp+var_110]
mov rdx, [rbp+var_108]
lea rsi, aSyntaxError; "syntax error "
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_79276:
lea rdi, [rbp+var_22]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov rdi, [rbp+var_20]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz loc_79310
mov rdx, [rbp+var_20]
mov [rbp+var_59], 20h ; ' '
lea rsi, aWhileParsing; "while parsing "
lea rdi, [rbp+var_58]
lea rcx, [rbp+var_59]
call __ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA15_KcRKS8_cEEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[15],std::string const&,char>(char const(&)[15],std::string const&,char &&)
jmp short $+2
loc_792AE:
mov rdi, [rbp+var_110]
lea rsi, [rbp+var_58]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_; std::string::operator+=(std::string const&)
jmp short $+2
loc_792C0:
lea rdi, [rbp+var_58]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_79310
mov rcx, rax
mov eax, edx
mov [rbp+var_30], rcx
mov [rbp+var_34], eax
lea rdi, [rbp+var_22]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_79509
mov rcx, rax
mov eax, edx
mov [rbp+var_30], rcx
mov [rbp+var_34], eax
jmp loc_794FD
mov rcx, rax
mov eax, edx
mov [rbp+var_30], rcx
mov [rbp+var_34], eax
lea rdi, [rbp+var_58]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_794FD
loc_79310:
mov rdi, [rbp+var_110]
lea rsi, asc_913B7; "- "
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc; std::string::operator+=(char const*)
jmp short $+2
loc_79325:
mov rax, [rbp+var_118]
cmp dword ptr [rax+20h], 0Eh
jnz loc_793F7
mov rdi, [rbp+var_118]
add rdi, 28h ; '('
mov [rbp+var_128], rdi
call __ZNK8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE17get_error_messageEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_error_message(void)
mov rsi, [rbp+var_128]
mov [rbp+var_88], rax
lea rdi, [rbp+var_A8]
call __ZNK8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE16get_token_stringEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_token_string(void)
jmp short $+2
loc_79369:
mov [rbp+var_A9], 27h ; '''
lea rdx, aLastRead; "; last read: '"
lea rdi, [rbp+var_80]
lea rsi, [rbp+var_88]
lea rcx, [rbp+var_A8]
lea r8, [rbp+var_A9]
call __ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJPKcRA15_S9_S8_cEEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const*,char const(&)[15],std::string,char>(char const*,char const(&)[15],std::string,char &&)
jmp short $+2
loc_79397:
mov rdi, [rbp+var_110]
lea rsi, [rbp+var_80]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_; std::string::operator+=(std::string const&)
jmp short $+2
loc_793A9:
lea rdi, [rbp+var_80]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_A8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_79469
mov rcx, rax
mov eax, edx
mov [rbp+var_30], rcx
mov [rbp+var_34], eax
jmp short loc_793E6
mov rcx, rax
mov eax, edx
mov [rbp+var_30], rcx
mov [rbp+var_34], eax
lea rdi, [rbp+var_80]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_793E6:
lea rdi, [rbp+var_A8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_794FD
loc_793F7:
mov rax, [rbp+var_118]
mov edi, [rax+20h]
call __ZN8nlohmann16json_abi_v3_11_36detail10lexer_baseINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15token_type_nameENSG_10token_typeE; nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::token_type_name(nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::token_type)
mov [rbp+var_D8], rax
lea rsi, aUnexpected; "unexpected "
lea rdi, [rbp+var_D0]
lea rdx, [rbp+var_D8]
call __ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA12_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[12],char const*>(char const(&)[12],char const* &&)
jmp short $+2
loc_79429:
mov rdi, [rbp+var_110]
lea rsi, [rbp+var_D0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_; std::string::operator+=(std::string const&)
jmp short $+2
loc_7943E:
lea rdi, [rbp+var_D0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_79469
mov rcx, rax
mov eax, edx
mov [rbp+var_30], rcx
mov [rbp+var_34], eax
lea rdi, [rbp+var_D0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_794FD
loc_79469:
cmp [rbp+var_14], 0
jz short loc_794D7
mov edi, [rbp+var_14]
call __ZN8nlohmann16json_abi_v3_11_36detail10lexer_baseINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15token_type_nameENSG_10token_typeE; nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::token_type_name(nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::token_type)
mov [rbp+var_100], rax
lea rsi, aExpected; "; expected "
lea rdi, [rbp+var_F8]
lea rdx, [rbp+var_100]
call __ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA12_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[12],char const*>(char const(&)[12],char const* &&)
jmp short $+2
loc_7949A:
mov rdi, [rbp+var_110]
lea rsi, [rbp+var_F8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_; std::string::operator+=(std::string const&)
jmp short $+2
loc_794AF:
lea rdi, [rbp+var_F8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_794D7
mov rcx, rax
mov eax, edx
mov [rbp+var_30], rcx
mov [rbp+var_34], eax
lea rdi, [rbp+var_F8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_794FD
loc_794D7:
mov [rbp+var_21], 1
test [rbp+var_21], 1
jnz short loc_794ED
mov rdi, [rbp+var_110]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_794ED:
mov rax, [rbp+var_120]
add rsp, 130h
pop rbp
retn
loc_794FD:
mov rdi, [rbp+var_110]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_79509:
mov rdi, [rbp+var_30]
call __Unwind_Resume
|
long long nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<std::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>>>::exception_message(
long long a1,
long long a2,
unsigned int a3,
long long a4)
{
long long v5; // [rsp+30h] [rbp-100h] BYREF
_BYTE v6[32]; // [rsp+38h] [rbp-F8h] BYREF
long long v7; // [rsp+58h] [rbp-D8h] BYREF
_BYTE v8[39]; // [rsp+60h] [rbp-D0h] BYREF
char v9; // [rsp+87h] [rbp-A9h] BYREF
_BYTE v10[32]; // [rsp+88h] [rbp-A8h] BYREF
long long error_message; // [rsp+A8h] [rbp-88h] BYREF
_BYTE v12[39]; // [rsp+B0h] [rbp-80h] BYREF
char v13; // [rsp+D7h] [rbp-59h] BYREF
_BYTE v14[36]; // [rsp+D8h] [rbp-58h] BYREF
_BYTE v15[2]; // [rsp+10Eh] [rbp-22h] BYREF
long long v16; // [rsp+110h] [rbp-20h]
unsigned int v17; // [rsp+11Ch] [rbp-14h]
long long v18; // [rsp+120h] [rbp-10h]
long long v19; // [rsp+128h] [rbp-8h]
v19 = a1;
v18 = a2;
v17 = a3;
v16 = a4;
v15[1] = 0;
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>(a1, "syntax error ", v15);
std::allocator<char>::~allocator(v15);
if ( (std::string::empty(v16) & 1) == 0 )
{
v13 = 32;
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[15],std::string const&,char>(
v14,
"while parsing ",
v16,
&v13);
std::string::operator+=(a1, v14);
std::string::~string(v14);
}
std::string::operator+=(a1, "- ");
if ( *(_DWORD *)(a2 + 32) == 14 )
{
error_message = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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>>>::get_error_message();
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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>>>::get_token_string(
v10,
a2 + 40);
v9 = 39;
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const*,char const(&)[15],std::string,char>(
v12,
&error_message,
"; last read: '",
v10,
&v9);
std::string::operator+=(a1, v12);
std::string::~string(v12);
std::string::~string(v10);
}
else
{
v7 = nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::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>>::token_type_name(*(unsigned int *)(a2 + 32));
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[12],char const*>(v8, "unexpected ", &v7);
std::string::operator+=(a1, v8);
std::string::~string(v8);
}
if ( v17 )
{
v5 = nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::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>>::token_type_name(v17);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[12],char const*>(v6, "; expected ", &v5);
std::string::operator+=(a1, v6);
std::string::~string(v6);
}
return a1;
}
|
exception_message:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x130
MOV qword ptr [RBP + -0x110],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0x120],RAX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV qword ptr [RBP + -0x20],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x118],RAX
MOV byte ptr [RBP + -0x21],0x0
LEA RDI,[RBP + -0x22]
MOV qword ptr [RBP + -0x108],RDI
CALL 0x001611c0
MOV RDI,qword ptr [RBP + -0x110]
MOV RDX,qword ptr [RBP + -0x108]
LAB_00179268:
LEA RSI,[0x19139a]
CALL 0x00160e40
JMP 0x00179276
LAB_00179276:
LEA RDI,[RBP + -0x22]
CALL 0x0015eab0
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x00160c90
TEST AL,0x1
JNZ 0x00179310
MOV RDX,qword ptr [RBP + -0x20]
MOV byte ptr [RBP + -0x59],0x20
LAB_00179298:
LEA RSI,[0x1913a8]
LEA RDI,[RBP + -0x58]
LEA RCX,[RBP + -0x59]
CALL 0x0015d530
JMP 0x001792ae
LAB_001792ae:
MOV RDI,qword ptr [RBP + -0x110]
LEA RSI,[RBP + -0x58]
CALL 0x0015f5b0
JMP 0x001792c0
LAB_001792c0:
LEA RDI,[RBP + -0x58]
CALL 0x0015cfd0
JMP 0x00179310
LAB_00179310:
MOV RDI,qword ptr [RBP + -0x110]
LEA RSI,[0x1913b7]
CALL 0x0015e2e0
JMP 0x00179325
LAB_00179325:
MOV RAX,qword ptr [RBP + -0x118]
CMP dword ptr [RAX + 0x20],0xe
JNZ 0x001793f7
MOV RDI,qword ptr [RBP + -0x118]
ADD RDI,0x28
MOV qword ptr [RBP + -0x128],RDI
CALL 0x0015f740
MOV RSI,qword ptr [RBP + -0x128]
MOV qword ptr [RBP + -0x88],RAX
LEA RDI,[RBP + -0xa8]
CALL 0x0015b830
JMP 0x00179369
LAB_00179369:
MOV byte ptr [RBP + -0xa9],0x27
LAB_00179370:
LEA RDX,[0x1913ba]
LEA RDI,[RBP + -0x80]
LEA RSI,[RBP + -0x88]
LEA RCX,[RBP + -0xa8]
LEA R8,[RBP + -0xa9]
CALL 0x0015c0a0
JMP 0x00179397
LAB_00179397:
MOV RDI,qword ptr [RBP + -0x110]
LEA RSI,[RBP + -0x80]
CALL 0x0015f5b0
JMP 0x001793a9
LAB_001793a9:
LEA RDI,[RBP + -0x80]
CALL 0x0015cfd0
LEA RDI,[RBP + -0xa8]
CALL 0x0015cfd0
JMP 0x00179469
LAB_001793f7:
MOV RAX,qword ptr [RBP + -0x118]
MOV EDI,dword ptr [RAX + 0x20]
CALL 0x0015c730
MOV qword ptr [RBP + -0xd8],RAX
LAB_0017940d:
LEA RSI,[0x1913c9]
LEA RDI,[RBP + -0xd0]
LEA RDX,[RBP + -0xd8]
CALL 0x001609d0
JMP 0x00179429
LAB_00179429:
MOV RDI,qword ptr [RBP + -0x110]
LEA RSI,[RBP + -0xd0]
CALL 0x0015f5b0
JMP 0x0017943e
LAB_0017943e:
LEA RDI,[RBP + -0xd0]
CALL 0x0015cfd0
JMP 0x00179469
LAB_00179469:
CMP dword ptr [RBP + -0x14],0x0
JZ 0x001794d7
MOV EDI,dword ptr [RBP + -0x14]
CALL 0x0015c730
MOV qword ptr [RBP + -0x100],RAX
LAB_0017947e:
LEA RSI,[0x1913d5]
LEA RDI,[RBP + -0xf8]
LEA RDX,[RBP + -0x100]
CALL 0x001609d0
JMP 0x0017949a
LAB_0017949a:
MOV RDI,qword ptr [RBP + -0x110]
LEA RSI,[RBP + -0xf8]
CALL 0x0015f5b0
LAB_001794ad:
JMP 0x001794af
LAB_001794af:
LEA RDI,[RBP + -0xf8]
CALL 0x0015cfd0
JMP 0x001794d7
LAB_001794d7:
MOV byte ptr [RBP + -0x21],0x1
TEST byte ptr [RBP + -0x21],0x1
JNZ 0x001794ed
MOV RDI,qword ptr [RBP + -0x110]
CALL 0x0015cfd0
LAB_001794ed:
MOV RAX,qword ptr [RBP + -0x120]
ADD RSP,0x130
POP RBP
RET
|
/* WARNING: Removing unreachable block (ram,0x001794e1) */
/* nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,
std::vector, std::__cxx11::string, 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 > >
>::exception_message(nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >::token_type, std::__cxx11::string const&) */
string * nlohmann::json_abi_v3_11_3::detail::
parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,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>>>
::exception_message(string *param_1,long param_2,int param_3,string *param_4)
{
ulong uVar1;
char *local_108;
detail local_100 [32];
char *local_e0;
detail local_d8 [39];
char local_b1;
string local_b0 [32];
char *local_90;
detail local_88 [39];
char local_61;
detail local_60 [54];
allocator local_2a;
int1 local_29;
string *local_28;
int local_1c;
long local_18;
string *local_10;
local_29 = 0;
local_28 = param_4;
local_1c = param_3;
local_18 = param_2;
local_10 = param_1;
std::allocator<char>::allocator();
/* try { // try from 00179268 to 00179273 has its CatchHandler @ 001792cb */
std::__cxx11::string::string<std::allocator<char>>(param_1,"syntax error ",&local_2a);
std::allocator<char>::~allocator((allocator<char> *)&local_2a);
uVar1 = std::__cxx11::string::empty();
if ((uVar1 & 1) == 0) {
local_61 = ' ';
/* try { // try from 00179298 to 001792ab has its CatchHandler @ 001792e5 */
concat<std::__cxx11::string,char_const(&)[15],std::__cxx11::string_const&,char>
(local_60,"while parsing ",local_28,&local_61);
/* try { // try from 001792ae to 001792bd has its CatchHandler @ 001792f6 */
std::__cxx11::string::operator+=(param_1,(string *)local_60);
std::__cxx11::string::~string((string *)local_60);
}
/* try { // try from 00179310 to 00179366 has its CatchHandler @ 001792e5 */
std::__cxx11::string::operator+=(param_1,"- ");
if (*(int *)(param_2 + 0x20) == 0xe) {
local_90 = (char *)lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,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>>>
::get_error_message((lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,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>>>
*)(param_2 + 0x28));
lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,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>>>
::get_token_string();
local_b1 = '\'';
/* try { // try from 00179370 to 00179394 has its CatchHandler @ 001793c3 */
concat<std::__cxx11::string,char_const*,char_const(&)[15],std::__cxx11::string,char>
(local_88,&local_90,"; last read: \'",local_b0,&local_b1);
/* try { // try from 00179397 to 001793a6 has its CatchHandler @ 001793d1 */
std::__cxx11::string::operator+=(param_1,(string *)local_88);
std::__cxx11::string::~string((string *)local_88);
std::__cxx11::string::~string(local_b0);
}
else {
local_e0 = (char *)lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::token_type_name(*(int4 *)(param_2 + 0x20));
/* try { // try from 0017940d to 00179426 has its CatchHandler @ 001792e5 */
concat<std::__cxx11::string,char_const(&)[12],char_const*>(local_d8,"unexpected ",&local_e0);
/* try { // try from 00179429 to 0017943b has its CatchHandler @ 0017944c */
std::__cxx11::string::operator+=(param_1,(string *)local_d8);
std::__cxx11::string::~string((string *)local_d8);
}
if (local_1c != 0) {
local_108 = (char *)lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::token_type_name(local_1c);
/* try { // try from 0017947e to 00179497 has its CatchHandler @ 001792e5 */
concat<std::__cxx11::string,char_const(&)[12],char_const*>(local_100,"; expected ",&local_108);
/* try { // try from 0017949a to 001794ac has its CatchHandler @ 001794bd */
std::__cxx11::string::operator+=(param_1,(string *)local_100);
std::__cxx11::string::~string((string *)local_100);
}
return param_1;
}
|
|
12,167 |
nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, 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>>>>>::exception_message(nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::token_type, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/json.hpp
|
std::string exception_message(const token_type expected, const std::string& context)
{
std::string error_msg = "syntax error ";
if (!context.empty())
{
error_msg += concat("while parsing ", context, ' ');
}
error_msg += "- ";
if (last_token == token_type::parse_error)
{
error_msg += concat(m_lexer.get_error_message(), "; last read: '",
m_lexer.get_token_string(), '\'');
}
else
{
error_msg += concat("unexpected ", lexer_t::token_type_name(last_token));
}
if (expected != token_type::uninitialized)
{
error_msg += concat("; expected ", lexer_t::token_type_name(expected));
}
return error_msg;
}
|
O1
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, 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>>>>>::exception_message(nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::token_type, 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 $0x58, %rsp
movq %rcx, %r15
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %r12
movq %r12, (%rdi)
leaq 0xb76e(%rip), %rsi # 0x25b5f
leaq 0xb774(%rip), %rdx # 0x25b6c
callq 0x11370
movq 0x8(%r15), %rsi
testq %rsi, %rsi
je 0x1a484
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
movq $0x0, -0x8(%r13)
movb $0x0, (%r13)
addq $0xf, %rsi
leaq 0x8(%rsp), %rdi
callq 0x11e40
leaq 0xb73c(%rip), %rsi # 0x25b6d
leaq 0x8(%rsp), %rdi
callq 0x12140
movq (%r15), %rsi
movq 0x8(%r15), %rdx
leaq 0x8(%rsp), %rdi
callq 0x112a0
leaq 0x8(%rsp), %rdi
movl $0x20, %esi
callq 0x11840
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x112a0
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x1a484
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x119b0
leaq 0xb6f1(%rip), %rsi # 0x25b7c
movq %rbx, %rdi
callq 0x12140
movl 0x20(%r14), %edi
cmpl $0xe, %edi
jne 0x1a527
movq 0x98(%r14), %rax
addq $0x28, %r14
movq %rax, 0x30(%rsp)
leaq 0x38(%rsp), %rdi
movq %r14, %rsi
callq 0x111b0
leaq 0x2f(%rsp), %r8
movb $0x27, (%r8)
leaq 0xb6b2(%rip), %rdx # 0x25b7f
leaq 0x8(%rsp), %rdi
leaq 0x30(%rsp), %rsi
leaq 0x38(%rsp), %rcx
callq 0x11320
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x112a0
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1a50e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x119b0
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1a5a1
movq 0x48(%rsp), %rsi
jmp 0x1a599
callq 0x11470
movq %rax, %r14
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq $0x0, -0x8(%r15)
movb $0x0, (%r15)
movq %rax, %rdi
callq 0x113f0
leaq 0xb(%rax), %rsi
leaq 0x8(%rsp), %rdi
callq 0x11e40
leaq 0xb62d(%rip), %rsi # 0x25b8e
leaq 0x8(%rsp), %rdi
callq 0x12140
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x12140
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x112a0
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x1a5a1
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x119b0
testl %ebp, %ebp
je 0x1a621
movl %ebp, %edi
callq 0x11470
movq %rax, %r14
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq $0x0, -0x8(%r15)
movb $0x0, (%r15)
movq %rax, %rdi
callq 0x113f0
leaq 0xb(%rax), %rsi
leaq 0x8(%rsp), %rdi
callq 0x11e40
leaq 0xb5b9(%rip), %rsi # 0x25b9a
leaq 0x8(%rsp), %rdi
callq 0x12140
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x12140
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x112a0
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x1a621
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x119b0
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1a67a
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1a658
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x119b0
jmp 0x1a658
movq %rax, %r14
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1a6a3
movq 0x48(%rsp), %rsi
jmp 0x1a69b
jmp 0x1a673
jmp 0x1a67a
jmp 0x1a689
movq %rax, %r14
jmp 0x1a6a3
jmp 0x1a67a
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
jne 0x1a696
jmp 0x1a6a3
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x1a6a3
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x119b0
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0x1a6b7
movq (%r12), %rsi
incq %rsi
callq 0x119b0
movq %r14, %rdi
callq 0x12010
nop
|
_ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE17exception_messageENS1_10lexer_baseISF_E10token_typeERKSB_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov r15, rcx
mov ebp, edx
mov r14, rsi
mov rbx, rdi
lea r12, [rdi+10h]
mov [rdi], r12
lea rsi, aSyntaxError; "syntax error "
lea rdx, aSyntaxError+0Dh; ""
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, [r15+8]
test rsi, rsi
jz short loc_1A484
lea r13, [rsp+88h+var_70]
mov [r13-10h], r13
mov qword ptr [r13-8], 0
mov byte ptr [r13+0], 0
add rsi, 0Fh
lea rdi, [rsp+88h+var_80]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
lea rsi, aWhileParsing; "while parsing "
lea rdi, [rsp+88h+var_80]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rsi, [r15]
mov rdx, [r15+8]
lea rdi, [rsp+88h+var_80]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
lea rdi, [rsp+88h+var_80]
mov esi, 20h ; ' '
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov rsi, [rsp+88h+var_80]
mov rdx, [rsp+88h+var_78]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rdi, [rsp+88h+var_80]; void *
cmp rdi, r13
jz short loc_1A484
mov rsi, [rsp+88h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1A484:
lea rsi, asc_25B7C; "- "
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov edi, [r14+20h]
cmp edi, 0Eh
jnz loc_1A527
mov rax, [r14+98h]
add r14, 28h ; '('
mov [rsp+88h+var_58], rax
lea rdi, [rsp+88h+var_50]
mov rsi, r14
call __ZNK8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE16get_token_stringEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_token_string(void)
lea r8, [rsp+88h+var_59]
mov byte ptr [r8], 27h ; '''
lea rdx, aLastRead; "; last read: '"
lea rdi, [rsp+88h+var_80]
lea rsi, [rsp+88h+var_58]
lea rcx, [rsp+88h+var_50]
call __ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJPKcRA15_S9_S8_cEEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const*,char const(&)[15],std::string,char>(char const*,char const(&)[15],std::string,char &&)
mov rsi, [rsp+88h+var_80]
mov rdx, [rsp+88h+var_78]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
lea rax, [rsp+88h+var_70]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_1A50E
mov rsi, [rsp+88h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1A50E:
lea rax, [rsp+88h+var_40]
mov rdi, [rax-10h]
cmp rdi, rax
jz loc_1A5A1
mov rsi, [rsp+88h+var_40]
jmp short loc_1A599
loc_1A527:
call __ZN8nlohmann16json_abi_v3_11_36detail10lexer_baseINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15token_type_nameENSG_10token_typeE; nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::token_type_name(nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::token_type)
mov r14, rax
lea r15, [rsp+88h+var_70]
mov [r15-10h], r15
mov qword ptr [r15-8], 0
mov byte ptr [r15], 0
mov rdi, rax
call _strlen
lea rsi, [rax+0Bh]
lea rdi, [rsp+88h+var_80]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
lea rsi, aUnexpected; "unexpected "
lea rdi, [rsp+88h+var_80]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea rdi, [rsp+88h+var_80]
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rsi, [rsp+88h+var_80]
mov rdx, [rsp+88h+var_78]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rdi, [rsp+88h+var_80]; void *
cmp rdi, r15
jz short loc_1A5A1
mov rsi, [rsp+88h+var_70]
loc_1A599:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1A5A1:
test ebp, ebp
jz short loc_1A621
mov edi, ebp
call __ZN8nlohmann16json_abi_v3_11_36detail10lexer_baseINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15token_type_nameENSG_10token_typeE; nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::token_type_name(nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::token_type)
mov r14, rax
lea r15, [rsp+88h+var_70]
mov [r15-10h], r15
mov qword ptr [r15-8], 0
mov byte ptr [r15], 0
mov rdi, rax
call _strlen
lea rsi, [rax+0Bh]
lea rdi, [rsp+88h+var_80]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
lea rsi, aExpected; "; expected "
lea rdi, [rsp+88h+var_80]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea rdi, [rsp+88h+var_80]
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rsi, [rsp+88h+var_80]
mov rdx, [rsp+88h+var_78]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rdi, [rsp+88h+var_80]; void *
cmp rdi, r15
jz short loc_1A621
mov rsi, [rsp+88h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1A621:
mov rax, rbx
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_1A67A
mov r14, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_1A658
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_1A658
mov r14, rax
loc_1A658:
lea rax, [rsp+arg_40]
mov rdi, [rax-10h]
cmp rdi, rax
jz short loc_1A6A3
mov rsi, [rsp+arg_40]
jmp short loc_1A69B
jmp short loc_1A673
jmp short loc_1A67A
jmp short loc_1A689
loc_1A673:
mov r14, rax
jmp short loc_1A6A3
jmp short $+2
loc_1A67A:
mov r14, rax
mov rdi, [rsp+arg_0]
cmp rdi, r15
jnz short loc_1A696
jmp short loc_1A6A3
loc_1A689:
mov r14, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, r13
jz short loc_1A6A3
loc_1A696:
mov rsi, [rsp+arg_10]
loc_1A69B:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1A6A3:
mov rdi, [rbx]; void *
cmp rdi, r12
jz short loc_1A6B7
mov rsi, [r12]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1A6B7:
mov rdi, r14
call __Unwind_Resume
|
_QWORD * nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<std::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>>>::exception_message(
_QWORD *a1,
long long a2,
unsigned int a3,
_QWORD *a4)
{
long long v8; // rsi
void *v9; // rdi
long long v10; // rsi
long long v11; // r14
long long v12; // rax
long long v13; // r14
long long v14; // rax
void *v16; // [rsp+8h] [rbp-80h] BYREF
long long v17; // [rsp+10h] [rbp-78h]
_QWORD v18[2]; // [rsp+18h] [rbp-70h] BYREF
char v19; // [rsp+2Fh] [rbp-59h] BYREF
long long v20; // [rsp+30h] [rbp-58h] BYREF
_QWORD v21[2]; // [rsp+38h] [rbp-50h] BYREF
long long v22; // [rsp+48h] [rbp-40h] BYREF
*a1 = a1 + 2;
std::string::_M_construct<char const*>(a1, "syntax error ", "");
v8 = a4[1];
if ( v8 )
{
v16 = v18;
v17 = 0LL;
LOBYTE(v18[0]) = 0;
std::string::reserve(&v16, v8 + 15);
std::string::append(&v16, "while parsing ");
std::string::_M_append(&v16, *a4, a4[1]);
std::string::push_back(&v16, 32LL);
std::string::_M_append(a1, v16, v17);
if ( v16 != v18 )
operator delete(v16, v18[0] + 1LL);
}
std::string::append(a1, "- ");
if ( *(_DWORD *)(a2 + 32) == 14 )
{
v20 = *(_QWORD *)(a2 + 152);
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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>>>::get_token_string(
v21,
a2 + 40);
v19 = 39;
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const*,char const(&)[15],std::string,char>(
&v16,
&v20,
"; last read: '",
v21,
&v19);
std::string::_M_append(a1, v16, v17);
if ( v16 != v18 )
operator delete(v16, v18[0] + 1LL);
v9 = (void *)v21[0];
if ( (long long *)v21[0] != &v22 )
{
v10 = v22;
LABEL_11:
operator delete(v9, v10 + 1);
}
}
else
{
v11 = ((long long (*)(void))nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::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>>::token_type_name)();
v16 = v18;
v17 = 0LL;
LOBYTE(v18[0]) = 0;
v12 = strlen(v11);
std::string::reserve(&v16, v12 + 11);
std::string::append(&v16, "unexpected ");
std::string::append(&v16, v11);
std::string::_M_append(a1, v16, v17);
v9 = v16;
if ( v16 != v18 )
{
v10 = v18[0];
goto LABEL_11;
}
}
if ( a3 )
{
v13 = nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::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>>::token_type_name(a3);
v16 = v18;
v17 = 0LL;
LOBYTE(v18[0]) = 0;
v14 = strlen(v13);
std::string::reserve(&v16, v14 + 11);
std::string::append(&v16, "; expected ");
std::string::append(&v16, v13);
std::string::_M_append(a1, v16, v17);
if ( v16 != v18 )
operator delete(v16, v18[0] + 1LL);
}
return a1;
}
|
exception_message:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV R15,RCX
MOV EBP,EDX
MOV R14,RSI
MOV RBX,RDI
LEA R12,[RDI + 0x10]
MOV qword ptr [RDI],R12
LEA RSI,[0x125b5f]
LEA RDX,[0x125b6c]
CALL 0x00111370
MOV RSI,qword ptr [R15 + 0x8]
TEST RSI,RSI
JZ 0x0011a484
LEA R13,[RSP + 0x18]
MOV qword ptr [R13 + -0x10],R13
MOV qword ptr [R13 + -0x8],0x0
MOV byte ptr [R13],0x0
ADD RSI,0xf
LAB_0011a420:
LEA RDI,[RSP + 0x8]
CALL 0x00111e40
LEA RSI,[0x125b6d]
LEA RDI,[RSP + 0x8]
CALL 0x00112140
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
LEA RDI,[RSP + 0x8]
CALL 0x001112a0
LEA RDI,[RSP + 0x8]
MOV ESI,0x20
CALL 0x00111840
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_0011a465:
MOV RDI,RBX
CALL 0x001112a0
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R13
JZ 0x0011a484
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001119b0
LAB_0011a484:
LEA RSI,[0x125b7c]
MOV RDI,RBX
CALL 0x00112140
MOV EDI,dword ptr [R14 + 0x20]
CMP EDI,0xe
JNZ 0x0011a527
MOV RAX,qword ptr [R14 + 0x98]
ADD R14,0x28
MOV qword ptr [RSP + 0x30],RAX
LAB_0011a4b0:
LEA RDI,[RSP + 0x38]
MOV RSI,R14
CALL 0x001111b0
LEA R8,[RSP + 0x2f]
MOV byte ptr [R8],0x27
LAB_0011a4c6:
LEA RDX,[0x125b7f]
LEA RDI,[RSP + 0x8]
LEA RSI,[RSP + 0x30]
LEA RCX,[RSP + 0x38]
CALL 0x00111320
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_0011a4eb:
MOV RDI,RBX
CALL 0x001112a0
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0011a50e
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001119b0
LAB_0011a50e:
LEA RAX,[RSP + 0x48]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0011a5a1
MOV RSI,qword ptr [RSP + 0x48]
JMP 0x0011a599
LAB_0011a527:
CALL 0x00111470
MOV R14,RAX
LEA R15,[RSP + 0x18]
MOV qword ptr [R15 + -0x10],R15
MOV qword ptr [R15 + -0x8],0x0
MOV byte ptr [R15],0x0
MOV RDI,RAX
CALL 0x001113f0
LEA RSI,[RAX + 0xb]
LAB_0011a550:
LEA RDI,[RSP + 0x8]
CALL 0x00111e40
LEA RSI,[0x125b8e]
LEA RDI,[RSP + 0x8]
CALL 0x00112140
LEA RDI,[RSP + 0x8]
MOV RSI,R14
CALL 0x00112140
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_0011a582:
MOV RDI,RBX
CALL 0x001112a0
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R15
JZ 0x0011a5a1
MOV RSI,qword ptr [RSP + 0x18]
LAB_0011a599:
INC RSI
CALL 0x001119b0
LAB_0011a5a1:
TEST EBP,EBP
JZ 0x0011a621
MOV EDI,EBP
CALL 0x00111470
MOV R14,RAX
LEA R15,[RSP + 0x18]
MOV qword ptr [R15 + -0x10],R15
MOV qword ptr [R15 + -0x8],0x0
MOV byte ptr [R15],0x0
MOV RDI,RAX
CALL 0x001113f0
LEA RSI,[RAX + 0xb]
LAB_0011a5d0:
LEA RDI,[RSP + 0x8]
CALL 0x00111e40
LEA RSI,[0x125b9a]
LEA RDI,[RSP + 0x8]
CALL 0x00112140
LEA RDI,[RSP + 0x8]
MOV RSI,R14
CALL 0x00112140
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_0011a602:
MOV RDI,RBX
CALL 0x001112a0
LAB_0011a60a:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R15
JZ 0x0011a621
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001119b0
LAB_0011a621:
MOV RAX,RBX
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,
std::vector, std::__cxx11::string, 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 > >
>::exception_message(nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >::token_type, std::__cxx11::string const&) */
long * nlohmann::json_abi_v3_11_3::detail::
parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,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>>>
::exception_message(long *param_1,long param_2,int param_3,ulong *param_4)
{
char *pcVar1;
long *local_80;
int8 local_78;
int1 local_70;
int7 uStack_6f;
int1 local_59;
int8 local_58;
long *local_50 [2];
long local_40 [2];
*param_1 = (long)(param_1 + 2);
std::__cxx11::string::_M_construct<char_const*>(param_1,"syntax error ","");
if (param_4[1] != 0) {
local_78 = 0;
local_70 = 0;
/* try { // try from 0011a420 to 0011a45a has its CatchHandler @ 0011a689 */
local_80 = (long *)&local_70;
std::__cxx11::string::reserve((ulong)&local_80);
std::__cxx11::string::append((char *)&local_80);
std::__cxx11::string::_M_append((char *)&local_80,*param_4);
std::__cxx11::string::push_back((char)&local_80);
/* try { // try from 0011a465 to 0011a46c has its CatchHandler @ 0011a671 */
std::__cxx11::string::_M_append((char *)param_1,(ulong)local_80);
if (local_80 != (long *)&local_70) {
operator_delete(local_80,CONCAT71(uStack_6f,local_70) + 1);
}
}
/* try { // try from 0011a484 to 0011a492 has its CatchHandler @ 0011a673 */
std::__cxx11::string::append((char *)param_1);
if (*(int *)(param_2 + 0x20) == 0xe) {
local_58 = *(int8 *)(param_2 + 0x98);
/* try { // try from 0011a4b0 to 0011a4bc has its CatchHandler @ 0011a66d */
lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,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>>>
::get_token_string();
local_59 = 0x27;
/* try { // try from 0011a4c6 to 0011a4e0 has its CatchHandler @ 0011a655 */
concat<std::__cxx11::string,char_const*,char_const(&)[15],std::__cxx11::string,char>
((char **)&local_80,(char *)&local_58,(string *)"; last read: \'",(char *)local_50);
/* try { // try from 0011a4eb to 0011a4f2 has its CatchHandler @ 0011a635 */
std::__cxx11::string::_M_append((char *)param_1,(ulong)local_80);
if (local_80 != (long *)&local_70) {
operator_delete(local_80,CONCAT71(uStack_6f,local_70) + 1);
}
if (local_50[0] == local_40) goto LAB_0011a5a1;
}
else {
pcVar1 = (char *)lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::token_type_name();
local_78 = 0;
local_70 = 0;
local_80 = (long *)&local_70;
strlen(pcVar1);
/* try { // try from 0011a550 to 0011a577 has its CatchHandler @ 0011a678 */
std::__cxx11::string::reserve((ulong)&local_80);
std::__cxx11::string::append((char *)&local_80);
std::__cxx11::string::append((char *)&local_80);
/* try { // try from 0011a582 to 0011a589 has its CatchHandler @ 0011a633 */
std::__cxx11::string::_M_append((char *)param_1,(ulong)local_80);
if (local_80 == (long *)&local_70) goto LAB_0011a5a1;
local_40[0] = CONCAT71(uStack_6f,local_70);
local_50[0] = local_80;
}
operator_delete(local_50[0],local_40[0] + 1);
LAB_0011a5a1:
if (param_3 != 0) {
pcVar1 = (char *)lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::token_type_name(param_3);
local_78 = 0;
local_70 = 0;
local_80 = (long *)&local_70;
strlen(pcVar1);
/* try { // try from 0011a5d0 to 0011a5f7 has its CatchHandler @ 0011a67a */
std::__cxx11::string::reserve((ulong)&local_80);
std::__cxx11::string::append((char *)&local_80);
std::__cxx11::string::append((char *)&local_80);
/* try { // try from 0011a602 to 0011a609 has its CatchHandler @ 0011a66f */
std::__cxx11::string::_M_append((char *)param_1,(ulong)local_80);
if (local_80 != (long *)&local_70) {
operator_delete(local_80,CONCAT71(uStack_6f,local_70) + 1);
}
}
return param_1;
}
|
|
12,168 |
nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, 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>>>>>::exception_message(nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::token_type, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/json.hpp
|
std::string exception_message(const token_type expected, const std::string& context)
{
std::string error_msg = "syntax error ";
if (!context.empty())
{
error_msg += concat("while parsing ", context, ' ');
}
error_msg += "- ";
if (last_token == token_type::parse_error)
{
error_msg += concat(m_lexer.get_error_message(), "; last read: '",
m_lexer.get_token_string(), '\'');
}
else
{
error_msg += concat("unexpected ", lexer_t::token_type_name(last_token));
}
if (expected != token_type::uninitialized)
{
error_msg += concat("; expected ", lexer_t::token_type_name(expected));
}
return error_msg;
}
|
O2
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, 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>>>>>::exception_message(nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::token_type, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x58, %rsp
movq %rcx, %r15
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xa0c6(%rip), %rsi # 0x2eeda
leaq 0x10(%rsp), %rdx
callq 0x1dc00
cmpq $0x0, 0x8(%r15)
je 0x24e58
leaq 0x38(%rsp), %rcx
movb $0x20, (%rcx)
leaq 0xa0b4(%rip), %rsi # 0x2eee8
leaq 0x10(%rsp), %rdi
movq %r15, %rdx
callq 0x1cc40
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x1dee0
leaq 0x10(%rsp), %rdi
callq 0x1c6f0
leaq 0xa098(%rip), %rsi # 0x2eef7
movq %rbx, %rdi
callq 0x1deb0
movl 0x20(%r14), %edi
cmpl $0xe, %edi
jne 0x24ecf
movq 0x98(%r14), %rax
addq $0x28, %r14
movq %rax, 0x30(%rsp)
leaq 0x38(%rsp), %rdi
movq %r14, %rsi
callq 0x1c300
leaq 0xf(%rsp), %r8
movb $0x27, (%r8)
leaq 0xa05d(%rip), %rdx # 0x2eefa
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
leaq 0x38(%rsp), %rcx
callq 0x1c580
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x1dee0
leaq 0x10(%rsp), %rdi
callq 0x1c6f0
leaq 0x38(%rsp), %rdi
jmp 0x24eff
callq 0x1c7b0
leaq 0x38(%rsp), %rdx
movq %rax, (%rdx)
leaq 0xa026(%rip), %rsi # 0x2ef09
leaq 0x10(%rsp), %rdi
callq 0x1daf0
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x1dee0
leaq 0x10(%rsp), %rdi
callq 0x1c6f0
testl %ebp, %ebp
je 0x24f3f
movl %ebp, %edi
callq 0x1c7b0
leaq 0x38(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x9ff7(%rip), %rsi # 0x2ef15
leaq 0x10(%rsp), %rdi
callq 0x1daf0
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x1dee0
leaq 0x10(%rsp), %rdi
callq 0x1c6f0
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x1c6f0
jmp 0x24f61
jmp 0x24f70
movq %rax, %r14
leaq 0x38(%rsp), %rdi
jmp 0x24f78
jmp 0x24f81
jmp 0x24f81
jmp 0x24f70
jmp 0x24f81
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x1c6f0
jmp 0x24f84
jmp 0x24f81
movq %rax, %r14
movq %rbx, %rdi
callq 0x1c6f0
movq %r14, %rdi
callq 0x1dcb0
|
_ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE17exception_messageENS1_10lexer_baseISF_E10token_typeERKSB_:
push rbp
push r15
push r14
push rbx
sub rsp, 58h
mov r15, rcx
mov ebp, edx
mov r14, rsi
mov rbx, rdi
lea rsi, aSyntaxError; "syntax error "
lea rdx, [rsp+78h+var_68]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
cmp qword ptr [r15+8], 0
jz short loc_24E58
lea rcx, [rsp+78h+var_40]
mov byte ptr [rcx], 20h ; ' '
lea rsi, aWhileParsing; "while parsing "
lea rdi, [rsp+78h+var_68]
mov rdx, r15
call __ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA15_KcRKS8_cEEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[15],std::string const&,char>(char const(&)[15],std::string const&,char &&)
lea rsi, [rsp+78h+var_68]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_; std::string::append(std::string const&)
lea rdi, [rsp+78h+var_68]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_24E58:
lea rsi, asc_2EEF7; "- "
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov edi, [r14+20h]
cmp edi, 0Eh
jnz short loc_24ECF
mov rax, [r14+98h]
add r14, 28h ; '('
mov [rsp+78h+var_48], rax
lea rdi, [rsp+78h+var_40]
mov rsi, r14
call __ZNK8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE16get_token_stringEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_token_string(void)
lea r8, [rsp+78h+var_69]
mov byte ptr [r8], 27h ; '''
lea rdx, aLastRead; "; last read: '"
lea rdi, [rsp+78h+var_68]
lea rsi, [rsp+78h+var_48]
lea rcx, [rsp+78h+var_40]
call __ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJPKcRA15_S9_S8_cEEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const*,char const(&)[15],std::string,char>(char const*,char const(&)[15],std::string,char &&)
lea rsi, [rsp+78h+var_68]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_; std::string::append(std::string const&)
lea rdi, [rsp+78h+var_68]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+78h+var_40]
jmp short loc_24EFF
loc_24ECF:
call __ZN8nlohmann16json_abi_v3_11_36detail10lexer_baseINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15token_type_nameENSG_10token_typeE; nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::token_type_name(nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::token_type)
lea rdx, [rsp+78h+var_40]
mov [rdx], rax
lea rsi, aUnexpected; "unexpected "
lea rdi, [rsp+78h+var_68]
call __ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA12_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[12],char const*>(char const(&)[12],char const* &&)
lea rsi, [rsp+78h+var_68]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_; std::string::append(std::string const&)
lea rdi, [rsp+78h+var_68]
loc_24EFF:
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test ebp, ebp
jz short loc_24F3F
mov edi, ebp
call __ZN8nlohmann16json_abi_v3_11_36detail10lexer_baseINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15token_type_nameENSG_10token_typeE; nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::token_type_name(nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::token_type)
lea rdx, [rsp+78h+var_40]
mov [rdx], rax
lea rsi, aExpected; "; expected "
lea rdi, [rsp+78h+var_68]
call __ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA12_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[12],char const*>(char const(&)[12],char const* &&)
lea rsi, [rsp+78h+var_68]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_; std::string::append(std::string const&)
lea rdi, [rsp+78h+var_68]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_24F3F:
mov rax, rbx
add rsp, 58h
pop rbx
pop r14
pop r15
pop rbp
retn
mov r14, rax
lea rdi, [rsp+arg_8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_24F61
jmp short loc_24F70
mov r14, rax
loc_24F61:
lea rdi, [rsp+arg_30]
jmp short loc_24F78
jmp short loc_24F81
jmp short loc_24F81
jmp short loc_24F70
jmp short loc_24F81
loc_24F70:
mov r14, rax
lea rdi, [rsp+arg_8]
loc_24F78:
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_24F84
jmp short $+2
loc_24F81:
mov r14, rax
loc_24F84:
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r14
call __Unwind_Resume
|
long long nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<std::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>>>::exception_message(
long long a1,
long long a2,
unsigned int a3,
long long a4)
{
_BYTE *v7; // rdi
char v9; // [rsp+Fh] [rbp-69h] BYREF
_BYTE v10[32]; // [rsp+10h] [rbp-68h] BYREF
long long v11; // [rsp+30h] [rbp-48h] BYREF
_QWORD v12[8]; // [rsp+38h] [rbp-40h] BYREF
std::string::basic_string<std::allocator<char>>(a1, "syntax error ", v10);
if ( *(_QWORD *)(a4 + 8) )
{
LOBYTE(v12[0]) = 32;
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[15],std::string const&,char>(
v10,
"while parsing ",
a4,
v12);
std::string::append(a1, v10);
std::string::~string(v10);
}
std::string::append(a1, "- ");
if ( *(_DWORD *)(a2 + 32) == 14 )
{
v11 = *(_QWORD *)(a2 + 152);
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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>>>::get_token_string(
v12,
a2 + 40);
v9 = 39;
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const*,char const(&)[15],std::string,char>(
v10,
&v11,
"; last read: '",
v12,
&v9);
std::string::append(a1, v10);
std::string::~string(v10);
v7 = v12;
}
else
{
v12[0] = ((long long (*)(void))nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::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>>::token_type_name)();
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[12],char const*>(v10, "unexpected ");
std::string::append(a1, v10);
v7 = v10;
}
std::string::~string(v7);
if ( a3 )
{
v12[0] = nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::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>>::token_type_name(a3);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[12],char const*>(v10, "; expected ");
std::string::append(a1, v10);
std::string::~string(v10);
}
return a1;
}
|
exception_message:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x58
MOV R15,RCX
MOV EBP,EDX
MOV R14,RSI
MOV RBX,RDI
LEA RSI,[0x12eeda]
LEA RDX,[RSP + 0x10]
CALL 0x0011dc00
CMP qword ptr [R15 + 0x8],0x0
JZ 0x00124e58
LEA RCX,[RSP + 0x38]
MOV byte ptr [RCX],0x20
LAB_00124e2d:
LEA RSI,[0x12eee8]
LEA RDI,[RSP + 0x10]
MOV RDX,R15
CALL 0x0011cc40
LAB_00124e41:
LEA RSI,[RSP + 0x10]
MOV RDI,RBX
CALL 0x0011dee0
LEA RDI,[RSP + 0x10]
CALL 0x0011c6f0
LAB_00124e58:
LEA RSI,[0x12eef7]
MOV RDI,RBX
CALL 0x0011deb0
MOV EDI,dword ptr [R14 + 0x20]
CMP EDI,0xe
JNZ 0x00124ecf
MOV RAX,qword ptr [R14 + 0x98]
ADD R14,0x28
MOV qword ptr [RSP + 0x30],RAX
LAB_00124e80:
LEA RDI,[RSP + 0x38]
MOV RSI,R14
CALL 0x0011c300
LEA R8,[RSP + 0xf]
MOV byte ptr [R8],0x27
LAB_00124e96:
LEA RDX,[0x12eefa]
LEA RDI,[RSP + 0x10]
LEA RSI,[RSP + 0x30]
LEA RCX,[RSP + 0x38]
CALL 0x0011c580
LAB_00124eb1:
LEA RSI,[RSP + 0x10]
MOV RDI,RBX
CALL 0x0011dee0
LEA RDI,[RSP + 0x10]
CALL 0x0011c6f0
LEA RDI,[RSP + 0x38]
JMP 0x00124eff
LAB_00124ecf:
CALL 0x0011c7b0
LEA RDX,[RSP + 0x38]
MOV qword ptr [RDX],RAX
LAB_00124edc:
LEA RSI,[0x12ef09]
LEA RDI,[RSP + 0x10]
CALL 0x0011daf0
LAB_00124eed:
LEA RSI,[RSP + 0x10]
MOV RDI,RBX
CALL 0x0011dee0
LEA RDI,[RSP + 0x10]
LAB_00124eff:
CALL 0x0011c6f0
TEST EBP,EBP
JZ 0x00124f3f
MOV EDI,EBP
CALL 0x0011c7b0
LEA RDX,[RSP + 0x38]
MOV qword ptr [RDX],RAX
LAB_00124f17:
LEA RSI,[0x12ef15]
LEA RDI,[RSP + 0x10]
CALL 0x0011daf0
LAB_00124f28:
LEA RSI,[RSP + 0x10]
MOV RDI,RBX
CALL 0x0011dee0
LAB_00124f35:
LEA RDI,[RSP + 0x10]
CALL 0x0011c6f0
LAB_00124f3f:
MOV RAX,RBX
ADD RSP,0x58
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,
std::vector, std::__cxx11::string, 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 > >
>::exception_message(nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >::token_type, std::__cxx11::string const&) */
string * nlohmann::json_abi_v3_11_3::detail::
parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,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>>>
::exception_message(string *param_1,long param_2,int param_3,string *param_4)
{
string *this;
char local_69;
allocator local_68 [32];
char *local_48;
char *local_40 [4];
std::__cxx11::string::string<std::allocator<char>>(param_1,"syntax error ",local_68);
if (*(long *)(param_4 + 8) != 0) {
local_40[0] = (char *)CONCAT71(local_40[0]._1_7_,0x20);
/* try { // try from 00124e2d to 00124e40 has its CatchHandler @ 00124f7f */
concat<std::__cxx11::string,char_const(&)[15],std::__cxx11::string_const&,char>
((detail *)local_68,"while parsing ",param_4,(char *)local_40);
/* try { // try from 00124e41 to 00124e4d has its CatchHandler @ 00124f70 */
std::__cxx11::string::append(param_1);
std::__cxx11::string::~string((string *)local_68);
}
/* try { // try from 00124e58 to 00124e66 has its CatchHandler @ 00124f81 */
std::__cxx11::string::append((char *)param_1);
if (*(int *)(param_2 + 0x20) == 0xe) {
local_48 = *(char **)(param_2 + 0x98);
/* try { // try from 00124e80 to 00124e8c has its CatchHandler @ 00124f6a */
lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,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>>>
::get_token_string();
local_69 = '\'';
/* try { // try from 00124e96 to 00124eb0 has its CatchHandler @ 00124f5e */
concat<std::__cxx11::string,char_const*,char_const(&)[15],std::__cxx11::string,char>
((detail *)local_68,&local_48,"; last read: \'",(string *)local_40,&local_69);
/* try { // try from 00124eb1 to 00124ebd has its CatchHandler @ 00124f4d */
std::__cxx11::string::append(param_1);
std::__cxx11::string::~string((string *)local_68);
this = (string *)local_40;
}
else {
local_40[0] = (char *)lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::token_type_name();
/* try { // try from 00124edc to 00124eec has its CatchHandler @ 00124f68 */
concat<std::__cxx11::string,char_const(&)[12],char_const*>
((detail *)local_68,"unexpected ",local_40);
/* try { // try from 00124eed to 00124ef9 has its CatchHandler @ 00124f5c */
std::__cxx11::string::append(param_1);
this = (string *)local_68;
}
std::__cxx11::string::~string(this);
if (param_3 != 0) {
local_40[0] = (char *)lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::token_type_name(param_3);
/* try { // try from 00124f17 to 00124f27 has its CatchHandler @ 00124f6e */
concat<std::__cxx11::string,char_const(&)[12],char_const*>
((detail *)local_68,"; expected ",local_40);
/* try { // try from 00124f28 to 00124f34 has its CatchHandler @ 00124f6c */
std::__cxx11::string::append(param_1);
std::__cxx11::string::~string((string *)local_68);
}
return param_1;
}
|
|
12,169 |
nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, 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>>>>>::exception_message(nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::token_type, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/json.hpp
|
std::string exception_message(const token_type expected, const std::string& context)
{
std::string error_msg = "syntax error ";
if (!context.empty())
{
error_msg += concat("while parsing ", context, ' ');
}
error_msg += "- ";
if (last_token == token_type::parse_error)
{
error_msg += concat(m_lexer.get_error_message(), "; last read: '",
m_lexer.get_token_string(), '\'');
}
else
{
error_msg += concat("unexpected ", lexer_t::token_type_name(last_token));
}
if (expected != token_type::uninitialized)
{
error_msg += concat("; expected ", lexer_t::token_type_name(expected));
}
return error_msg;
}
|
O3
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, 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>>>>>::exception_message(nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::token_type, 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 $0x58, %rsp
movq %rcx, %r15
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %r12
movq %r12, (%rdi)
leaq 0xaaa2(%rip), %rsi # 0x24b5f
leaq 0xaaa8(%rip), %rdx # 0x24b6c
callq 0x11370
movq 0x8(%r15), %rsi
testq %rsi, %rsi
je 0x1a150
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
movq $0x0, -0x8(%r13)
movb $0x0, (%r13)
addq $0xf, %rsi
leaq 0x8(%rsp), %rdi
callq 0x11e10
leaq 0xaa70(%rip), %rsi # 0x24b6d
leaq 0x8(%rsp), %rdi
callq 0x12100
movq (%r15), %rsi
movq 0x8(%r15), %rdx
leaq 0x8(%rsp), %rdi
callq 0x112a0
leaq 0x8(%rsp), %rdi
movl $0x20, %esi
callq 0x11830
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x112a0
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x1a150
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x119a0
leaq 0xaa25(%rip), %rsi # 0x24b7c
movq %rbx, %rdi
callq 0x12100
movl 0x20(%r14), %edi
cmpl $0xe, %edi
jne 0x1a1f3
movq 0x98(%r14), %rax
addq $0x28, %r14
movq %rax, 0x30(%rsp)
leaq 0x38(%rsp), %rdi
movq %r14, %rsi
callq 0x111b0
leaq 0x2f(%rsp), %r8
movb $0x27, (%r8)
leaq 0xa9e6(%rip), %rdx # 0x24b7f
leaq 0x8(%rsp), %rdi
leaq 0x30(%rsp), %rsi
leaq 0x38(%rsp), %rcx
callq 0x11320
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x112a0
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1a1da
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x119a0
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1a26d
movq 0x48(%rsp), %rsi
jmp 0x1a265
callq 0x11470
movq %rax, %r14
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq $0x0, -0x8(%r15)
movb $0x0, (%r15)
movq %rax, %rdi
callq 0x113f0
leaq 0xb(%rax), %rsi
leaq 0x8(%rsp), %rdi
callq 0x11e10
leaq 0xa961(%rip), %rsi # 0x24b8e
leaq 0x8(%rsp), %rdi
callq 0x12100
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x12100
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x112a0
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x1a26d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x119a0
testl %ebp, %ebp
je 0x1a2ed
movl %ebp, %edi
callq 0x11470
movq %rax, %r14
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq $0x0, -0x8(%r15)
movb $0x0, (%r15)
movq %rax, %rdi
callq 0x113f0
leaq 0xb(%rax), %rsi
leaq 0x8(%rsp), %rdi
callq 0x11e10
leaq 0xa8ed(%rip), %rsi # 0x24b9a
leaq 0x8(%rsp), %rdi
callq 0x12100
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x12100
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x112a0
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x1a2ed
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x119a0
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1a346
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1a324
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x119a0
jmp 0x1a324
movq %rax, %r14
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1a36f
movq 0x48(%rsp), %rsi
jmp 0x1a367
jmp 0x1a33f
jmp 0x1a346
jmp 0x1a355
movq %rax, %r14
jmp 0x1a36f
jmp 0x1a346
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
jne 0x1a362
jmp 0x1a36f
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x1a36f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x119a0
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0x1a383
movq (%r12), %rsi
incq %rsi
callq 0x119a0
movq %r14, %rdi
callq 0x11fe0
nop
|
_ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE17exception_messageENS1_10lexer_baseISF_E10token_typeERKSB_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov r15, rcx
mov ebp, edx
mov r14, rsi
mov rbx, rdi
lea r12, [rdi+10h]
mov [rdi], r12
lea rsi, aSyntaxError; "syntax error "
lea rdx, aSyntaxError+0Dh; ""
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, [r15+8]
test rsi, rsi
jz short loc_1A150
lea r13, [rsp+88h+var_70]
mov [r13-10h], r13
mov qword ptr [r13-8], 0
mov byte ptr [r13+0], 0
add rsi, 0Fh
lea rdi, [rsp+88h+var_80]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
lea rsi, aWhileParsing; "while parsing "
lea rdi, [rsp+88h+var_80]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rsi, [r15]
mov rdx, [r15+8]
lea rdi, [rsp+88h+var_80]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
lea rdi, [rsp+88h+var_80]
mov esi, 20h ; ' '
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov rsi, [rsp+88h+var_80]
mov rdx, [rsp+88h+var_78]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rdi, [rsp+88h+var_80]; void *
cmp rdi, r13
jz short loc_1A150
mov rsi, [rsp+88h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1A150:
lea rsi, asc_24B7C; "- "
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov edi, [r14+20h]
cmp edi, 0Eh
jnz loc_1A1F3
mov rax, [r14+98h]
add r14, 28h ; '('
mov [rsp+88h+var_58], rax
lea rdi, [rsp+88h+var_50]
mov rsi, r14
call __ZNK8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE16get_token_stringEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_token_string(void)
lea r8, [rsp+88h+var_59]
mov byte ptr [r8], 27h ; '''
lea rdx, aLastRead; "; last read: '"
lea rdi, [rsp+88h+var_80]
lea rsi, [rsp+88h+var_58]
lea rcx, [rsp+88h+var_50]
call __ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJPKcRA15_S9_S8_cEEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const*,char const(&)[15],std::string,char>(char const*,char const(&)[15],std::string,char &&)
mov rsi, [rsp+88h+var_80]
mov rdx, [rsp+88h+var_78]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
lea rax, [rsp+88h+var_70]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_1A1DA
mov rsi, [rsp+88h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1A1DA:
lea rax, [rsp+88h+var_40]
mov rdi, [rax-10h]
cmp rdi, rax
jz loc_1A26D
mov rsi, [rsp+88h+var_40]
jmp short loc_1A265
loc_1A1F3:
call __ZN8nlohmann16json_abi_v3_11_36detail10lexer_baseINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15token_type_nameENSG_10token_typeE; nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::token_type_name(nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::token_type)
mov r14, rax
lea r15, [rsp+88h+var_70]
mov [r15-10h], r15
mov qword ptr [r15-8], 0
mov byte ptr [r15], 0
mov rdi, rax
call _strlen
lea rsi, [rax+0Bh]
lea rdi, [rsp+88h+var_80]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
lea rsi, aUnexpected; "unexpected "
lea rdi, [rsp+88h+var_80]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea rdi, [rsp+88h+var_80]
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rsi, [rsp+88h+var_80]
mov rdx, [rsp+88h+var_78]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rdi, [rsp+88h+var_80]; void *
cmp rdi, r15
jz short loc_1A26D
mov rsi, [rsp+88h+var_70]
loc_1A265:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1A26D:
test ebp, ebp
jz short loc_1A2ED
mov edi, ebp
call __ZN8nlohmann16json_abi_v3_11_36detail10lexer_baseINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15token_type_nameENSG_10token_typeE; nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::token_type_name(nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::token_type)
mov r14, rax
lea r15, [rsp+88h+var_70]
mov [r15-10h], r15
mov qword ptr [r15-8], 0
mov byte ptr [r15], 0
mov rdi, rax
call _strlen
lea rsi, [rax+0Bh]
lea rdi, [rsp+88h+var_80]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
lea rsi, aExpected; "; expected "
lea rdi, [rsp+88h+var_80]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea rdi, [rsp+88h+var_80]
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rsi, [rsp+88h+var_80]
mov rdx, [rsp+88h+var_78]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rdi, [rsp+88h+var_80]; void *
cmp rdi, r15
jz short loc_1A2ED
mov rsi, [rsp+88h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1A2ED:
mov rax, rbx
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_1A346
mov r14, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_1A324
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_1A324
mov r14, rax
loc_1A324:
lea rax, [rsp+arg_40]
mov rdi, [rax-10h]
cmp rdi, rax
jz short loc_1A36F
mov rsi, [rsp+arg_40]
jmp short loc_1A367
jmp short loc_1A33F
jmp short loc_1A346
jmp short loc_1A355
loc_1A33F:
mov r14, rax
jmp short loc_1A36F
jmp short $+2
loc_1A346:
mov r14, rax
mov rdi, [rsp+arg_0]
cmp rdi, r15
jnz short loc_1A362
jmp short loc_1A36F
loc_1A355:
mov r14, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, r13
jz short loc_1A36F
loc_1A362:
mov rsi, [rsp+arg_10]
loc_1A367:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1A36F:
mov rdi, [rbx]; void *
cmp rdi, r12
jz short loc_1A383
mov rsi, [r12]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1A383:
mov rdi, r14
call __Unwind_Resume
|
_QWORD * nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<std::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>>>::exception_message(
_QWORD *a1,
long long a2,
unsigned int a3,
_QWORD *a4)
{
long long v8; // rsi
void *v9; // rdi
long long v10; // rsi
long long v11; // r14
long long v12; // rax
long long v13; // r14
long long v14; // rax
void *v16; // [rsp+8h] [rbp-80h] BYREF
long long v17; // [rsp+10h] [rbp-78h]
_QWORD v18[2]; // [rsp+18h] [rbp-70h] BYREF
char v19; // [rsp+2Fh] [rbp-59h] BYREF
long long v20; // [rsp+30h] [rbp-58h] BYREF
_QWORD v21[2]; // [rsp+38h] [rbp-50h] BYREF
long long v22; // [rsp+48h] [rbp-40h] BYREF
*a1 = a1 + 2;
std::string::_M_construct<char const*>(a1, "syntax error ", "");
v8 = a4[1];
if ( v8 )
{
v16 = v18;
v17 = 0LL;
LOBYTE(v18[0]) = 0;
std::string::reserve(&v16, v8 + 15);
std::string::append(&v16, "while parsing ");
std::string::_M_append(&v16, *a4, a4[1]);
std::string::push_back(&v16, 32LL);
std::string::_M_append(a1, v16, v17);
if ( v16 != v18 )
operator delete(v16, v18[0] + 1LL);
}
std::string::append(a1, "- ");
if ( *(_DWORD *)(a2 + 32) == 14 )
{
v20 = *(_QWORD *)(a2 + 152);
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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>>>::get_token_string(
v21,
a2 + 40);
v19 = 39;
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const*,char const(&)[15],std::string,char>(
&v16,
&v20,
"; last read: '",
v21,
&v19);
std::string::_M_append(a1, v16, v17);
if ( v16 != v18 )
operator delete(v16, v18[0] + 1LL);
v9 = (void *)v21[0];
if ( (long long *)v21[0] != &v22 )
{
v10 = v22;
LABEL_11:
operator delete(v9, v10 + 1);
}
}
else
{
v11 = ((long long (*)(void))nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::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>>::token_type_name)();
v16 = v18;
v17 = 0LL;
LOBYTE(v18[0]) = 0;
v12 = strlen(v11);
std::string::reserve(&v16, v12 + 11);
std::string::append(&v16, "unexpected ");
std::string::append(&v16, v11);
std::string::_M_append(a1, v16, v17);
v9 = v16;
if ( v16 != v18 )
{
v10 = v18[0];
goto LABEL_11;
}
}
if ( a3 )
{
v13 = nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::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>>::token_type_name(a3);
v16 = v18;
v17 = 0LL;
LOBYTE(v18[0]) = 0;
v14 = strlen(v13);
std::string::reserve(&v16, v14 + 11);
std::string::append(&v16, "; expected ");
std::string::append(&v16, v13);
std::string::_M_append(a1, v16, v17);
if ( v16 != v18 )
operator delete(v16, v18[0] + 1LL);
}
return a1;
}
|
exception_message:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV R15,RCX
MOV EBP,EDX
MOV R14,RSI
MOV RBX,RDI
LEA R12,[RDI + 0x10]
MOV qword ptr [RDI],R12
LEA RSI,[0x124b5f]
LEA RDX,[0x124b6c]
CALL 0x00111370
MOV RSI,qword ptr [R15 + 0x8]
TEST RSI,RSI
JZ 0x0011a150
LEA R13,[RSP + 0x18]
MOV qword ptr [R13 + -0x10],R13
MOV qword ptr [R13 + -0x8],0x0
MOV byte ptr [R13],0x0
ADD RSI,0xf
LAB_0011a0ec:
LEA RDI,[RSP + 0x8]
CALL 0x00111e10
LEA RSI,[0x124b6d]
LEA RDI,[RSP + 0x8]
CALL 0x00112100
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
LEA RDI,[RSP + 0x8]
CALL 0x001112a0
LEA RDI,[RSP + 0x8]
MOV ESI,0x20
CALL 0x00111830
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_0011a131:
MOV RDI,RBX
CALL 0x001112a0
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R13
JZ 0x0011a150
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001119a0
LAB_0011a150:
LEA RSI,[0x124b7c]
MOV RDI,RBX
CALL 0x00112100
MOV EDI,dword ptr [R14 + 0x20]
CMP EDI,0xe
JNZ 0x0011a1f3
MOV RAX,qword ptr [R14 + 0x98]
ADD R14,0x28
MOV qword ptr [RSP + 0x30],RAX
LAB_0011a17c:
LEA RDI,[RSP + 0x38]
MOV RSI,R14
CALL 0x001111b0
LEA R8,[RSP + 0x2f]
MOV byte ptr [R8],0x27
LAB_0011a192:
LEA RDX,[0x124b7f]
LEA RDI,[RSP + 0x8]
LEA RSI,[RSP + 0x30]
LEA RCX,[RSP + 0x38]
CALL 0x00111320
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_0011a1b7:
MOV RDI,RBX
CALL 0x001112a0
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0011a1da
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001119a0
LAB_0011a1da:
LEA RAX,[RSP + 0x48]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0011a26d
MOV RSI,qword ptr [RSP + 0x48]
JMP 0x0011a265
LAB_0011a1f3:
CALL 0x00111470
MOV R14,RAX
LEA R15,[RSP + 0x18]
MOV qword ptr [R15 + -0x10],R15
MOV qword ptr [R15 + -0x8],0x0
MOV byte ptr [R15],0x0
MOV RDI,RAX
CALL 0x001113f0
LEA RSI,[RAX + 0xb]
LAB_0011a21c:
LEA RDI,[RSP + 0x8]
CALL 0x00111e10
LEA RSI,[0x124b8e]
LEA RDI,[RSP + 0x8]
CALL 0x00112100
LEA RDI,[RSP + 0x8]
MOV RSI,R14
CALL 0x00112100
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_0011a24e:
MOV RDI,RBX
CALL 0x001112a0
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R15
JZ 0x0011a26d
MOV RSI,qword ptr [RSP + 0x18]
LAB_0011a265:
INC RSI
CALL 0x001119a0
LAB_0011a26d:
TEST EBP,EBP
JZ 0x0011a2ed
MOV EDI,EBP
CALL 0x00111470
MOV R14,RAX
LEA R15,[RSP + 0x18]
MOV qword ptr [R15 + -0x10],R15
MOV qword ptr [R15 + -0x8],0x0
MOV byte ptr [R15],0x0
MOV RDI,RAX
CALL 0x001113f0
LEA RSI,[RAX + 0xb]
LAB_0011a29c:
LEA RDI,[RSP + 0x8]
CALL 0x00111e10
LEA RSI,[0x124b9a]
LEA RDI,[RSP + 0x8]
CALL 0x00112100
LEA RDI,[RSP + 0x8]
MOV RSI,R14
CALL 0x00112100
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_0011a2ce:
MOV RDI,RBX
CALL 0x001112a0
LAB_0011a2d6:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R15
JZ 0x0011a2ed
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001119a0
LAB_0011a2ed:
MOV RAX,RBX
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,
std::vector, std::__cxx11::string, 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 > >
>::exception_message(nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >::token_type, std::__cxx11::string const&) */
long * nlohmann::json_abi_v3_11_3::detail::
parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,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>>>
::exception_message(long *param_1,long param_2,int param_3,ulong *param_4)
{
char *pcVar1;
long *local_80;
int8 local_78;
int1 local_70;
int7 uStack_6f;
int1 local_59;
int8 local_58;
long *local_50 [2];
long local_40 [2];
*param_1 = (long)(param_1 + 2);
std::__cxx11::string::_M_construct<char_const*>(param_1,"syntax error ","");
if (param_4[1] != 0) {
local_78 = 0;
local_70 = 0;
/* try { // try from 0011a0ec to 0011a126 has its CatchHandler @ 0011a355 */
local_80 = (long *)&local_70;
std::__cxx11::string::reserve((ulong)&local_80);
std::__cxx11::string::append((char *)&local_80);
std::__cxx11::string::_M_append((char *)&local_80,*param_4);
std::__cxx11::string::push_back((char)&local_80);
/* try { // try from 0011a131 to 0011a138 has its CatchHandler @ 0011a33d */
std::__cxx11::string::_M_append((char *)param_1,(ulong)local_80);
if (local_80 != (long *)&local_70) {
operator_delete(local_80,CONCAT71(uStack_6f,local_70) + 1);
}
}
/* try { // try from 0011a150 to 0011a15e has its CatchHandler @ 0011a33f */
std::__cxx11::string::append((char *)param_1);
if (*(int *)(param_2 + 0x20) == 0xe) {
local_58 = *(int8 *)(param_2 + 0x98);
/* try { // try from 0011a17c to 0011a188 has its CatchHandler @ 0011a339 */
lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,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>>>
::get_token_string();
local_59 = 0x27;
/* try { // try from 0011a192 to 0011a1ac has its CatchHandler @ 0011a321 */
concat<std::__cxx11::string,char_const*,char_const(&)[15],std::__cxx11::string,char>
((char **)&local_80,(char *)&local_58,(string *)"; last read: \'",(char *)local_50);
/* try { // try from 0011a1b7 to 0011a1be has its CatchHandler @ 0011a301 */
std::__cxx11::string::_M_append((char *)param_1,(ulong)local_80);
if (local_80 != (long *)&local_70) {
operator_delete(local_80,CONCAT71(uStack_6f,local_70) + 1);
}
if (local_50[0] == local_40) goto LAB_0011a26d;
}
else {
pcVar1 = (char *)lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::token_type_name();
local_78 = 0;
local_70 = 0;
local_80 = (long *)&local_70;
strlen(pcVar1);
/* try { // try from 0011a21c to 0011a243 has its CatchHandler @ 0011a344 */
std::__cxx11::string::reserve((ulong)&local_80);
std::__cxx11::string::append((char *)&local_80);
std::__cxx11::string::append((char *)&local_80);
/* try { // try from 0011a24e to 0011a255 has its CatchHandler @ 0011a2ff */
std::__cxx11::string::_M_append((char *)param_1,(ulong)local_80);
if (local_80 == (long *)&local_70) goto LAB_0011a26d;
local_40[0] = CONCAT71(uStack_6f,local_70);
local_50[0] = local_80;
}
operator_delete(local_50[0],local_40[0] + 1);
LAB_0011a26d:
if (param_3 != 0) {
pcVar1 = (char *)lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::token_type_name(param_3);
local_78 = 0;
local_70 = 0;
local_80 = (long *)&local_70;
strlen(pcVar1);
/* try { // try from 0011a29c to 0011a2c3 has its CatchHandler @ 0011a346 */
std::__cxx11::string::reserve((ulong)&local_80);
std::__cxx11::string::append((char *)&local_80);
std::__cxx11::string::append((char *)&local_80);
/* try { // try from 0011a2ce to 0011a2d5 has its CatchHandler @ 0011a33b */
std::__cxx11::string::_M_append((char *)param_1,(ulong)local_80);
if (local_80 != (long *)&local_70) {
operator_delete(local_80,CONCAT71(uStack_6f,local_70) + 1);
}
}
return param_1;
}
|
|
12,170 |
minja::Value::at(unsigned long)
|
monkey531[P]llama/common/minja.hpp
|
Value& at(size_t index) {
if (is_null())
throw std::runtime_error("Undefined value or reference");
if (is_array()) return array_->at(index);
if (is_object()) return object_->at(index);
throw std::runtime_error("Value is not an array or object: " + dump());
}
|
O2
|
cpp
|
minja::Value::at(unsigned long):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, 0x8(%rsp)
callq 0x634ea
testb %al, %al
jne 0x6adf7
movq 0x10(%r14), %rdi
testq %rdi, %rdi
je 0x6addb
movq %rbx, %rsi
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x6affc
movq 0x20(%r14), %rdi
testq %rdi, %rdi
je 0x6ae27
leaq 0x8(%rsp), %rsi
callq 0x6b01a
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x23480
movq %rax, %rbx
leaq 0x48ed1(%rip), %rsi # 0xb3cda
movq %rax, %rdi
callq 0x23340
movq 0x931d8(%rip), %rsi # 0xfdff0
movq 0x93139(%rip), %rdx # 0xfdf58
movq %rbx, %rdi
callq 0x23f30
pushq $0x10
popq %rdi
callq 0x23480
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
pushq $-0x1
popq %rdx
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x62f00
leaq 0x495df(%rip), %rsi # 0xb442a
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x58626
movb $0x1, %bpl
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
callq 0x23e60
xorl %ebp, %ebp
movq 0x9317d(%rip), %rsi # 0xfdff0
movq 0x930de(%rip), %rdx # 0xfdf58
movq %rbx, %rdi
callq 0x23f30
movq %rax, %r14
leaq 0x30(%rsp), %rdi
callq 0x24208
jmp 0x6ae97
movq %rax, %r14
movb $0x1, %bpl
leaq 0x10(%rsp), %rdi
callq 0x24208
testb %bpl, %bpl
jne 0x6aead
jmp 0x6aeb5
jmp 0x6aeaa
movq %rax, %r14
movq %rbx, %rdi
callq 0x236b0
movq %r14, %rdi
callq 0x23fd0
nop
|
_ZN5minja5Value2atEm:
push rbp
push r14
push rbx
sub rsp, 50h
mov rbx, rsi
mov r14, rdi
mov [rsp+68h+var_60], rsi
call _ZNK5minja5Value7is_nullEv; minja::Value::is_null(void)
test al, al
jnz short loc_6ADF7
mov rdi, [r14+10h]
test rdi, rdi
jz short loc_6ADDB
mov rsi, rbx
add rsp, 50h
pop rbx
pop r14
pop rbp
jmp _ZNSt6vectorIN5minja5ValueESaIS1_EE2atEm; std::vector<minja::Value>::at(ulong)
loc_6ADDB:
mov rdi, [r14+20h]
test rdi, rdi
jz short loc_6AE27
lea rsi, [rsp+68h+var_60]
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atIRmTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OSS_
add rsp, 50h
pop rbx
pop r14
pop rbp
retn
loc_6ADF7:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aUndefinedValue; "Undefined value or reference"
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
loc_6AE27:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+68h+var_58]
push 0FFFFFFFFFFFFFFFFh
pop rdx
mov rsi, r14
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aValueIsNotAnAr_0; "Value is not an array or object: "
lea rdi, [rsp+68h+var_38]
lea rdx, [rsp+68h+var_58]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+68h+var_38]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rdi, [rsp+68h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_6AE97
mov r14, rax
mov bpl, 1
loc_6AE97:
lea rdi, [rsp+68h+var_58]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_6AEAD
jmp short loc_6AEB5
jmp short $+2
loc_6AEAA:
mov r14, rax
loc_6AEAD:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_6AEB5:
mov rdi, r14
call __Unwind_Resume
|
long long minja::Value::at(minja::Value *this, long long a2)
{
long long v3; // rdi
long long v5; // rdi
std::runtime_error *exception; // rbx
void *v7; // rbx
long long v8; // [rsp+8h] [rbp-60h] BYREF
_BYTE v9[32]; // [rsp+10h] [rbp-58h] BYREF
_BYTE v10[56]; // [rsp+30h] [rbp-38h] BYREF
v8 = a2;
if ( minja::Value::is_null(this) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Undefined value or reference");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v3 = *((_QWORD *)this + 2);
if ( v3 )
return std::vector<minja::Value>::at(v3, a2);
v5 = *((_QWORD *)this + 4);
if ( !v5 )
{
v7 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v9, (long long)this, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v10, (long long)"Value is not an array or object: ", (long long)v9);
std::runtime_error::runtime_error(v7, v10);
__cxa_throw(
v7,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
return ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atIRmTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OSS_(
v5,
&v8);
}
|
at:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x50
MOV RBX,RSI
MOV R14,RDI
MOV qword ptr [RSP + 0x8],RSI
CALL 0x001634ea
TEST AL,AL
JNZ 0x0016adf7
MOV RDI,qword ptr [R14 + 0x10]
TEST RDI,RDI
JZ 0x0016addb
MOV RSI,RBX
ADD RSP,0x50
POP RBX
POP R14
POP RBP
JMP 0x0016affc
LAB_0016addb:
MOV RDI,qword ptr [R14 + 0x20]
TEST RDI,RDI
JZ 0x0016ae27
LEA RSI,[RSP + 0x8]
CALL 0x0016b01a
ADD RSP,0x50
POP RBX
POP R14
POP RBP
RET
LAB_0016adf7:
PUSH 0x10
POP RDI
CALL 0x00123480
MOV RBX,RAX
LAB_0016ae02:
LEA RSI,[0x1b3cda]
MOV RDI,RAX
CALL 0x00123340
LAB_0016ae11:
MOV RSI,qword ptr [0x001fdff0]
MOV RDX,qword ptr [0x001fdf58]
MOV RDI,RBX
CALL 0x00123f30
LAB_0016ae27:
PUSH 0x10
POP RDI
CALL 0x00123480
MOV RBX,RAX
LAB_0016ae32:
LEA RDI,[RSP + 0x10]
PUSH -0x1
POP RDX
MOV RSI,R14
XOR ECX,ECX
CALL 0x00162f00
LAB_0016ae44:
LEA RSI,[0x1b442a]
LEA RDI,[RSP + 0x30]
LEA RDX,[RSP + 0x10]
CALL 0x00158626
MOV BPL,0x1
LAB_0016ae5d:
LEA RSI,[RSP + 0x30]
MOV RDI,RBX
CALL 0x00123e60
XOR EBP,EBP
MOV RSI,qword ptr [0x001fdff0]
MOV RDX,qword ptr [0x001fdf58]
MOV RDI,RBX
CALL 0x00123f30
|
/* minja::Value::at(unsigned long) */
void __thiscall minja::Value::at(Value *this,ulong param_1)
{
char cVar1;
runtime_error *prVar2;
ulong local_60;
int1 local_58 [32];
string local_38 [32];
local_60 = param_1;
cVar1 = is_null(this);
if (cVar1 != '\0') {
prVar2 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0016ae02 to 0016ae10 has its CatchHandler @ 0016aeaa */
std::runtime_error::runtime_error(prVar2,"Undefined value or reference");
/* WARNING: Subroutine does not return */
__cxa_throw(prVar2,PTR_typeinfo_001fdff0,PTR__runtime_error_001fdf58);
}
if (*(vector<minja::Value,std::allocator<minja::Value>> **)(this + 0x10) !=
(vector<minja::Value,std::allocator<minja::Value>> *)0x0) {
std::vector<minja::Value,std::allocator<minja::Value>>::at
(*(vector<minja::Value,std::allocator<minja::Value>> **)(this + 0x10),param_1);
return;
}
if (*(long *)(this + 0x20) != 0) {
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atIRmTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OSS_
(*(long *)(this + 0x20),&local_60);
return;
}
prVar2 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0016ae32 to 0016ae43 has its CatchHandler @ 0016aea8 */
dump_abi_cxx11_((int)local_58,SUB81(this,0));
/* try { // try from 0016ae44 to 0016ae59 has its CatchHandler @ 0016ae91 */
std::operator+((char *)local_38,(string *)"Value is not an array or object: ");
/* try { // try from 0016ae5d to 0016ae81 has its CatchHandler @ 0016ae82 */
std::runtime_error::runtime_error(prVar2,local_38);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar2,PTR_typeinfo_001fdff0,PTR__runtime_error_001fdf58);
}
|
|
12,171 |
mi_kpos
|
eloqsql/storage/myisam/mi_search.c
|
my_off_t _mi_kpos(uint nod_flag, uchar *after_key)
{
after_key-=nod_flag;
switch (nod_flag) {
#if SIZEOF_OFF_T > 4
case 7:
return mi_uint7korr(after_key)*MI_MIN_KEY_BLOCK_LENGTH;
case 6:
return mi_uint6korr(after_key)*MI_MIN_KEY_BLOCK_LENGTH;
case 5:
return mi_uint5korr(after_key)*MI_MIN_KEY_BLOCK_LENGTH;
#else
case 7:
after_key++;
case 6:
after_key++;
case 5:
after_key++;
#endif
case 4:
return ((my_off_t) mi_uint4korr(after_key))*MI_MIN_KEY_BLOCK_LENGTH;
case 3:
return ((my_off_t) mi_uint3korr(after_key))*MI_MIN_KEY_BLOCK_LENGTH;
case 2:
return (my_off_t) (mi_uint2korr(after_key)*MI_MIN_KEY_BLOCK_LENGTH);
case 1:
return (uint) (*after_key)*MI_MIN_KEY_BLOCK_LENGTH;
case 0: /* At leaf page */
default: /* Impossible */
return(HA_OFFSET_ERROR);
}
}
|
O0
|
c
|
mi_kpos:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
movl -0xc(%rbp), %eax
movl %eax, %ecx
movq -0x18(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x18(%rbp)
movl -0xc(%rbp), %eax
movq %rax, -0x20(%rbp)
subq $0x7, %rax
ja 0xc0e59
movq -0x20(%rbp), %rax
leaq 0xa2b11(%rip), %rcx # 0x16387c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x18(%rbp), %rdi
callq 0xc22a0
shlq $0xa, %rax
movq %rax, -0x8(%rbp)
jmp 0xc0e61
movq -0x18(%rbp), %rdi
callq 0xc2300
shlq $0xa, %rax
movq %rax, -0x8(%rbp)
jmp 0xc0e61
movq -0x18(%rbp), %rdi
callq 0xc2350
shlq $0xa, %rax
movq %rax, -0x8(%rbp)
jmp 0xc0e61
movq -0x18(%rbp), %rax
movzbl 0x3(%rax), %eax
movq -0x18(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x18(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movq -0x18(%rbp), %rcx
movzbl (%rcx), %ecx
shll $0x18, %ecx
orl %ecx, %eax
movl %eax, %eax
shlq $0xa, %rax
movq %rax, -0x8(%rbp)
jmp 0xc0e61
movq -0x18(%rbp), %rax
movzbl 0x2(%rax), %eax
movq -0x18(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x18(%rbp), %rcx
movzbl (%rcx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movl %eax, %eax
shlq $0xa, %rax
movq %rax, -0x8(%rbp)
jmp 0xc0e61
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
movzwl %ax, %eax
movq -0x18(%rbp), %rcx
movzbl (%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
orl %ecx, %eax
movzwl %ax, %eax
shll $0xa, %eax
cltq
movq %rax, -0x8(%rbp)
jmp 0xc0e61
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
shll $0xa, %eax
movl %eax, %eax
movq %rax, -0x8(%rbp)
jmp 0xc0e61
jmp 0xc0e59
movq $-0x1, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
_mi_kpos:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_C], edi
mov [rbp+var_18], rsi
mov eax, [rbp+var_C]
mov ecx, eax
mov rax, [rbp+var_18]
sub rax, rcx
mov [rbp+var_18], rax
mov eax, [rbp+var_C]
mov [rbp+var_20], rax
sub rax, 7; switch 8 cases
ja def_C0D72; jumptable 00000000000C0D72 default case
mov rax, [rbp+var_20]
lea rcx, jpt_C0D72
movsxd rax, ds:(jpt_C0D72 - 16387Ch)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_C0D74:
mov rdi, [rbp+var_18]; jumptable 00000000000C0D72 case 7
call mi_uint7korr_0
shl rax, 0Ah
mov [rbp+var_8], rax
jmp loc_C0E61
loc_C0D8A:
mov rdi, [rbp+var_18]; jumptable 00000000000C0D72 case 6
call mi_uint6korr_0
shl rax, 0Ah
mov [rbp+var_8], rax
jmp loc_C0E61
loc_C0DA0:
mov rdi, [rbp+var_18]; jumptable 00000000000C0D72 case 5
call mi_uint5korr_0
shl rax, 0Ah
mov [rbp+var_8], rax
jmp loc_C0E61
loc_C0DB6:
mov rax, [rbp+var_18]; jumptable 00000000000C0D72 case 4
movzx eax, byte ptr [rax+3]
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+2]
shl ecx, 8
or eax, ecx
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+1]
shl ecx, 10h
or eax, ecx
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx]
shl ecx, 18h
or eax, ecx
mov eax, eax
shl rax, 0Ah
mov [rbp+var_8], rax
jmp short loc_C0E61
loc_C0DF0:
mov rax, [rbp+var_18]; jumptable 00000000000C0D72 case 3
movzx eax, byte ptr [rax+2]
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+1]
shl ecx, 8
or eax, ecx
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx]
shl ecx, 10h
or eax, ecx
mov eax, eax
shl rax, 0Ah
mov [rbp+var_8], rax
jmp short loc_C0E61
loc_C0E1D:
mov rax, [rbp+var_18]; jumptable 00000000000C0D72 case 2
movzx eax, byte ptr [rax+1]
movzx eax, ax
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx]
movzx ecx, cx
shl ecx, 8
or eax, ecx
movzx eax, ax
shl eax, 0Ah
cdqe
mov [rbp+var_8], rax
jmp short loc_C0E61
loc_C0E45:
mov rax, [rbp+var_18]; jumptable 00000000000C0D72 case 1
movzx eax, byte ptr [rax]
shl eax, 0Ah
mov eax, eax
mov [rbp+var_8], rax
jmp short loc_C0E61
loc_C0E57:
jmp short $+2; jumptable 00000000000C0D72 case 0
def_C0D72:
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh; jumptable 00000000000C0D72 default case
loc_C0E61:
mov rax, [rbp+var_8]
add rsp, 20h
pop rbp
retn
|
long long mi_kpos(unsigned int a1, long long a2)
{
unsigned __int8 *v3; // [rsp+8h] [rbp-18h]
long long v4; // [rsp+18h] [rbp-8h]
v3 = (unsigned __int8 *)(a2 - a1);
switch ( a1 )
{
case 1u:
v4 = *v3 << 10;
break;
case 2u:
v4 = _byteswap_ushort(*(_WORD *)v3) << 10;
break;
case 3u:
v4 = (unsigned long long)((*v3 << 16) | (v3[1] << 8) | (unsigned int)v3[2]) << 10;
break;
case 4u:
v4 = (unsigned long long)_byteswap_ulong(*(_DWORD *)v3) << 10;
break;
case 5u:
v4 = mi_uint5korr_0(v3) << 10;
break;
case 6u:
v4 = mi_uint6korr_0(v3) << 10;
break;
case 7u:
v4 = mi_uint7korr_0(v3) << 10;
break;
default:
v4 = -1LL;
break;
}
return v4;
}
|
_mi_kpos:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0xc],EDI
MOV qword ptr [RBP + -0x18],RSI
MOV EAX,dword ptr [RBP + -0xc]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x18]
SUB RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
MOV EAX,dword ptr [RBP + -0xc]
MOV qword ptr [RBP + -0x20],RAX
SUB RAX,0x7
JA 0x001c0e59
MOV RAX,qword ptr [RBP + -0x20]
LEA RCX,[0x26387c]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_7:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001c22a0
SHL RAX,0xa
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001c0e61
caseD_6:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001c2300
SHL RAX,0xa
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001c0e61
caseD_5:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001c2350
SHL RAX,0xa
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001c0e61
caseD_4:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x3]
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x2]
SHL ECX,0x8
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x1]
SHL ECX,0x10
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX]
SHL ECX,0x18
OR EAX,ECX
MOV EAX,EAX
SHL RAX,0xa
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001c0e61
caseD_3:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x2]
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x1]
SHL ECX,0x8
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX]
SHL ECX,0x10
OR EAX,ECX
MOV EAX,EAX
SHL RAX,0xa
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001c0e61
caseD_2:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX]
MOVZX ECX,CX
SHL ECX,0x8
OR EAX,ECX
MOVZX EAX,AX
SHL EAX,0xa
CDQE
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001c0e61
caseD_1:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
SHL EAX,0xa
MOV EAX,EAX
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001c0e61
caseD_0:
JMP 0x001c0e59
default:
MOV qword ptr [RBP + -0x8],-0x1
LAB_001c0e61:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x20
POP RBP
RET
|
long _mi_kpos(uint param_1,long param_2)
{
byte *pbVar1;
long local_10;
pbVar1 = (byte *)(param_2 - (ulong)param_1);
switch(param_1) {
case 0:
default:
local_10 = -1;
break;
case 1:
local_10 = (ulong)*pbVar1 << 10;
break;
case 2:
local_10 = (long)(int)((uint)CONCAT11(*pbVar1,pbVar1[1]) << 10);
break;
case 3:
local_10 = (ulong)CONCAT12(*pbVar1,CONCAT11(pbVar1[1],pbVar1[2])) << 10;
break;
case 4:
local_10 = (ulong)CONCAT13(*pbVar1,CONCAT12(pbVar1[1],CONCAT11(pbVar1[2],pbVar1[3]))) << 10;
break;
case 5:
local_10 = mi_uint5korr(pbVar1);
local_10 = local_10 << 10;
break;
case 6:
local_10 = mi_uint6korr(pbVar1);
local_10 = local_10 << 10;
break;
case 7:
local_10 = mi_uint7korr(pbVar1);
local_10 = local_10 << 10;
}
return local_10;
}
|
|
12,172 |
init_partitioned_key_cache
|
eloqsql/mysys/mf_keycache.c
|
static
int init_partitioned_key_cache(PARTITIONED_KEY_CACHE_CB *keycache,
uint key_cache_block_size,
size_t use_mem, uint division_limit,
uint age_threshold, uint changed_blocks_hash_size)
{
int i;
size_t mem_per_cache;
size_t mem_decr;
int cnt;
SIMPLE_KEY_CACHE_CB *partition;
SIMPLE_KEY_CACHE_CB **partition_ptr;
uint partitions= keycache->partitions;
int blocks= 0;
DBUG_ENTER("partitioned_init_key_cache");
keycache->key_cache_block_size = key_cache_block_size;
if (keycache->key_cache_inited)
partition_ptr= keycache->partition_array;
else
{
if(!(partition_ptr=
(SIMPLE_KEY_CACHE_CB **) my_malloc(key_memory_KEY_CACHE,
sizeof(SIMPLE_KEY_CACHE_CB *) *
partitions, MYF(MY_WME))))
DBUG_RETURN(-1);
bzero(partition_ptr, sizeof(SIMPLE_KEY_CACHE_CB *) * partitions);
keycache->partition_array= partition_ptr;
}
mem_per_cache = use_mem / partitions;
mem_decr= mem_per_cache / 5;
for (i= 0; i < (int) partitions; i++)
{
my_bool key_cache_inited= keycache->key_cache_inited;
if (key_cache_inited)
partition= *partition_ptr;
else
{
if (!(partition=
(SIMPLE_KEY_CACHE_CB *) my_malloc(key_memory_KEY_CACHE,
sizeof(SIMPLE_KEY_CACHE_CB),
MYF(MY_WME))))
continue;
partition->key_cache_inited= 0;
}
cnt= init_simple_key_cache(partition, key_cache_block_size, mem_per_cache,
division_limit, age_threshold,
changed_blocks_hash_size);
if (cnt <= 0)
{
end_simple_key_cache(partition, 1);
if (!key_cache_inited)
{
my_free(partition);
partition= 0;
}
if ((i == 0 && cnt < 0) || i > 0)
{
/*
Here we have two cases:
1. i == 0 and cnt < 0
cnt < 0 => mem_per_cache is not big enough to allocate minimal
number of key blocks in the key cache of the partition.
Decrease the the number of the partitions by 1 and start again.
2. i > 0
There is not enough memory for one of the succeeding partitions.
Just skip this partition decreasing the number of partitions in
the key cache by one.
Do not change the value of mem_per_cache in both cases.
*/
if (key_cache_inited)
{
my_free(partition);
partition= 0;
if(key_cache_inited)
memmove(partition_ptr, partition_ptr+1,
sizeof(partition_ptr)*(partitions-i-1));
}
if (!--partitions)
break;
}
else
{
/*
We come here when i == 0 && cnt == 0.
cnt == 0 => the memory allocator fails to allocate a block of
memory of the size mem_per_cache. Decrease the value of
mem_per_cache without changing the current number of partitions
and start again. Make sure that such a decrease may happen not
more than 5 times in total.
*/
if (use_mem <= mem_decr)
break;
use_mem-= mem_decr;
}
i--;
mem_per_cache= use_mem/partitions;
continue;
}
else
{
blocks+= cnt;
*partition_ptr++= partition;
}
}
keycache->partitions= partitions= (uint) (partition_ptr-keycache->partition_array);
keycache->key_cache_mem_size= mem_per_cache * partitions;
for (i= 0; i < (int) partitions; i++)
keycache->partition_array[i]->hash_factor= partitions;
keycache->key_cache_inited= 1;
if (!partitions)
blocks= -1;
DBUG_RETURN(blocks);
}
|
O0
|
c
|
init_partitioned_key_cache:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movl %r8d, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %eax
movl %eax, -0x5c(%rbp)
movl $0x0, -0x60(%rbp)
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
je 0x76160
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x58(%rbp)
jmp 0x761b4
leaq 0x382ed1(%rip), %rax # 0x3f9038
movl (%rax), %edi
movl -0x5c(%rbp), %eax
movl %eax, %esi
shlq $0x3, %rsi
movl $0x10, %edx
callq 0x80550
movq %rax, -0x58(%rbp)
cmpq $0x0, %rax
jne 0x76194
jmp 0x76188
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x763cb
movq -0x58(%rbp), %rdi
movl -0x5c(%rbp), %eax
movl %eax, %edx
shlq $0x3, %rdx
xorl %esi, %esi
callq 0x281c0
movq -0x58(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rax
movl -0x5c(%rbp), %ecx
xorl %edx, %edx
divq %rcx
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movl $0x5, %ecx
xorl %edx, %edx
divq %rcx
movq %rax, -0x40(%rbp)
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x5c(%rbp), %eax
jge 0x7634a
movq -0x10(%rbp), %rax
movb (%rax), %al
movb %al, -0x61(%rbp)
cmpb $0x0, -0x61(%rbp)
je 0x76205
movq -0x58(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
jmp 0x76233
leaq 0x382e2c(%rip), %rax # 0x3f9038
movl (%rax), %edi
movl $0x170, %esi # imm = 0x170
movl $0x10, %edx
callq 0x80550
movq %rax, -0x50(%rbp)
cmpq $0x0, %rax
jne 0x7622c
jmp 0x7633c
movq -0x50(%rbp), %rax
movb $0x0, (%rax)
movq -0x50(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x38(%rbp), %rdx
movl -0x24(%rbp), %ecx
movl -0x28(%rbp), %r8d
movl -0x2c(%rbp), %r9d
callq 0x73e90
movl %eax, -0x44(%rbp)
cmpl $0x0, -0x44(%rbp)
jg 0x7631b
movq -0x50(%rbp), %rdi
movl $0x1, %esi
callq 0x74fb0
cmpb $0x0, -0x61(%rbp)
jne 0x76280
movq -0x50(%rbp), %rdi
callq 0x808d0
movq $0x0, -0x50(%rbp)
cmpl $0x0, -0x30(%rbp)
jne 0x7628c
cmpl $0x0, -0x44(%rbp)
jl 0x76292
cmpl $0x0, -0x30(%rbp)
jle 0x762e5
cmpb $0x0, -0x61(%rbp)
je 0x762d3
movq -0x50(%rbp), %rdi
callq 0x808d0
movq $0x0, -0x50(%rbp)
cmpb $0x0, -0x61(%rbp)
je 0x762d1
movq -0x58(%rbp), %rdi
movq -0x58(%rbp), %rsi
addq $0x8, %rsi
movl -0x5c(%rbp), %eax
subl -0x30(%rbp), %eax
subl $0x1, %eax
movl %eax, %eax
movl %eax, %edx
shlq $0x3, %rdx
callq 0x285c0
jmp 0x762d3
movl -0x5c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x5c(%rbp)
cmpl $0x0, %eax
jne 0x762e3
jmp 0x7634a
jmp 0x76300
movq -0x20(%rbp), %rax
cmpq -0x40(%rbp), %rax
ja 0x762f1
jmp 0x7634a
movq -0x40(%rbp), %rcx
movq -0x20(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x20(%rbp)
movl -0x30(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movl -0x5c(%rbp), %ecx
xorl %edx, %edx
divq %rcx
movq %rax, -0x38(%rbp)
jmp 0x7633c
movl -0x44(%rbp), %eax
addl -0x60(%rbp), %eax
movl %eax, -0x60(%rbp)
movq -0x50(%rbp), %rcx
movq -0x58(%rbp), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, -0x58(%rbp)
movq %rcx, (%rax)
jmp 0x7633c
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x761dd
movq -0x58(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
subq %rcx, %rax
sarq $0x3, %rax
movl %eax, %ecx
movl %ecx, -0x5c(%rbp)
movq -0x10(%rbp), %rax
movl %ecx, 0x1c(%rax)
movq -0x38(%rbp), %rcx
movl -0x5c(%rbp), %eax
imulq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x5c(%rbp), %eax
jge 0x763af
movl -0x5c(%rbp), %ecx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x30(%rbp), %rdx
movq (%rax,%rdx,8), %rax
movl %ecx, 0x164(%rax)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x76383
movq -0x10(%rbp), %rax
movb $0x1, (%rax)
cmpl $0x0, -0x5c(%rbp)
jne 0x763c3
movl $0xffffffff, -0x60(%rbp) # imm = 0xFFFFFFFF
jmp 0x763c5
movl -0x60(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
init_partitioned_key_cache:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_20], rdx
mov [rbp+var_24], ecx
mov [rbp+var_28], r8d
mov [rbp+var_2C], r9d
mov rax, [rbp+var_10]
mov eax, [rax+1Ch]
mov [rbp+var_5C], eax
mov [rbp+var_60], 0
mov ecx, [rbp+var_14]
mov rax, [rbp+var_10]
mov [rax+18h], ecx
mov rax, [rbp+var_10]
cmp byte ptr [rax], 0
jz short loc_76160
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov [rbp+var_58], rax
jmp short loc_761B4
loc_76160:
lea rax, key_memory_KEY_CACHE
mov edi, [rax]
mov eax, [rbp+var_5C]
mov esi, eax
shl rsi, 3
mov edx, 10h
call my_malloc
mov [rbp+var_58], rax
cmp rax, 0
jnz short loc_76194
jmp short $+2
loc_76188:
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_763CB
loc_76194:
mov rdi, [rbp+var_58]
mov eax, [rbp+var_5C]
mov edx, eax
shl rdx, 3
xor esi, esi
call _memset
mov rcx, [rbp+var_58]
mov rax, [rbp+var_10]
mov [rax+8], rcx
loc_761B4:
mov rax, [rbp+var_20]
mov ecx, [rbp+var_5C]
xor edx, edx
div rcx
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov ecx, 5
xor edx, edx
div rcx
mov [rbp+var_40], rax
mov [rbp+var_30], 0
loc_761DD:
mov eax, [rbp+var_30]
cmp eax, [rbp+var_5C]
jge loc_7634A
mov rax, [rbp+var_10]
mov al, [rax]
mov [rbp+var_61], al
cmp [rbp+var_61], 0
jz short loc_76205
mov rax, [rbp+var_58]
mov rax, [rax]
mov [rbp+var_50], rax
jmp short loc_76233
loc_76205:
lea rax, key_memory_KEY_CACHE
mov edi, [rax]
mov esi, 170h
mov edx, 10h
call my_malloc
mov [rbp+var_50], rax
cmp rax, 0
jnz short loc_7622C
jmp loc_7633C
loc_7622C:
mov rax, [rbp+var_50]
mov byte ptr [rax], 0
loc_76233:
mov rdi, [rbp+var_50]
mov esi, [rbp+var_14]
mov rdx, [rbp+var_38]
mov ecx, [rbp+var_24]
mov r8d, [rbp+var_28]
mov r9d, [rbp+var_2C]
call init_simple_key_cache
mov [rbp+var_44], eax
cmp [rbp+var_44], 0
jg loc_7631B
mov rdi, [rbp+var_50]
mov esi, 1
call end_simple_key_cache
cmp [rbp+var_61], 0
jnz short loc_76280
mov rdi, [rbp+var_50]
call my_free
mov [rbp+var_50], 0
loc_76280:
cmp [rbp+var_30], 0
jnz short loc_7628C
cmp [rbp+var_44], 0
jl short loc_76292
loc_7628C:
cmp [rbp+var_30], 0
jle short loc_762E5
loc_76292:
cmp [rbp+var_61], 0
jz short loc_762D3
mov rdi, [rbp+var_50]
call my_free
mov [rbp+var_50], 0
cmp [rbp+var_61], 0
jz short loc_762D1
mov rdi, [rbp+var_58]
mov rsi, [rbp+var_58]
add rsi, 8
mov eax, [rbp+var_5C]
sub eax, [rbp+var_30]
sub eax, 1
mov eax, eax
mov edx, eax
shl rdx, 3
call _memmove
loc_762D1:
jmp short $+2
loc_762D3:
mov eax, [rbp+var_5C]
add eax, 0FFFFFFFFh
mov [rbp+var_5C], eax
cmp eax, 0
jnz short loc_762E3
jmp short loc_7634A
loc_762E3:
jmp short loc_76300
loc_762E5:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_40]
ja short loc_762F1
jmp short loc_7634A
loc_762F1:
mov rcx, [rbp+var_40]
mov rax, [rbp+var_20]
sub rax, rcx
mov [rbp+var_20], rax
loc_76300:
mov eax, [rbp+var_30]
add eax, 0FFFFFFFFh
mov [rbp+var_30], eax
mov rax, [rbp+var_20]
mov ecx, [rbp+var_5C]
xor edx, edx
div rcx
mov [rbp+var_38], rax
jmp short loc_7633C
loc_7631B:
mov eax, [rbp+var_44]
add eax, [rbp+var_60]
mov [rbp+var_60], eax
mov rcx, [rbp+var_50]
mov rax, [rbp+var_58]
mov rdx, rax
add rdx, 8
mov [rbp+var_58], rdx
mov [rax], rcx
jmp short $+2
loc_7633C:
mov eax, [rbp+var_30]
add eax, 1
mov [rbp+var_30], eax
jmp loc_761DD
loc_7634A:
mov rax, [rbp+var_58]
mov rcx, [rbp+var_10]
mov rcx, [rcx+8]
sub rax, rcx
sar rax, 3
mov ecx, eax
mov [rbp+var_5C], ecx
mov rax, [rbp+var_10]
mov [rax+1Ch], ecx
mov rcx, [rbp+var_38]
mov eax, [rbp+var_5C]
imul rcx, rax
mov rax, [rbp+var_10]
mov [rax+10h], rcx
mov [rbp+var_30], 0
loc_76383:
mov eax, [rbp+var_30]
cmp eax, [rbp+var_5C]
jge short loc_763AF
mov ecx, [rbp+var_5C]
mov rax, [rbp+var_10]
mov rax, [rax+8]
movsxd rdx, [rbp+var_30]
mov rax, [rax+rdx*8]
mov [rax+164h], ecx
mov eax, [rbp+var_30]
add eax, 1
mov [rbp+var_30], eax
jmp short loc_76383
loc_763AF:
mov rax, [rbp+var_10]
mov byte ptr [rax], 1
cmp [rbp+var_5C], 0
jnz short loc_763C3
mov [rbp+var_60], 0FFFFFFFFh
loc_763C3:
jmp short $+2
loc_763C5:
mov eax, [rbp+var_60]
mov [rbp+var_4], eax
loc_763CB:
mov eax, [rbp+var_4]
add rsp, 70h
pop rbp
retn
|
long long init_partitioned_key_cache(
char *a1,
unsigned int a2,
unsigned long long a3,
unsigned int a4,
unsigned int a5,
unsigned int a6)
{
int inited; // eax
long long *v7; // rax
char v9; // [rsp+Fh] [rbp-61h]
unsigned int v10; // [rsp+10h] [rbp-60h]
unsigned int v11; // [rsp+14h] [rbp-5Ch]
unsigned int v12; // [rsp+14h] [rbp-5Ch]
long long *v13; // [rsp+18h] [rbp-58h]
_BYTE *v14; // [rsp+20h] [rbp-50h]
int v15; // [rsp+2Ch] [rbp-44h]
unsigned long long v16; // [rsp+30h] [rbp-40h]
unsigned long long v17; // [rsp+38h] [rbp-38h]
int i; // [rsp+40h] [rbp-30h]
int j; // [rsp+40h] [rbp-30h]
v11 = *((_DWORD *)a1 + 7);
v10 = 0;
*((_DWORD *)a1 + 6) = a2;
if ( *a1 )
{
v13 = (long long *)*((_QWORD *)a1 + 1);
}
else
{
v13 = (long long *)my_malloc(key_memory_KEY_CACHE, 8LL * v11, 16LL);
if ( !v13 )
return (unsigned int)-1;
memset(v13, 0LL, 8LL * v11);
*((_QWORD *)a1 + 1) = v13;
}
v17 = a3 / v11;
v16 = v17 / 5;
for ( i = 0; i < (int)v11; ++i )
{
v9 = *a1;
if ( *a1 )
{
v14 = (_BYTE *)*v13;
inited = init_simple_key_cache(*v13, a2, v17, a4, a5, a6);
}
else
{
v14 = (_BYTE *)my_malloc(key_memory_KEY_CACHE, 368LL, 16LL);
if ( !v14 )
continue;
*v14 = 0;
inited = init_simple_key_cache((long long)v14, a2, v17, a4, a5, a6);
}
v15 = inited;
if ( inited > 0 )
{
v10 += inited;
v7 = v13++;
*v7 = (long long)v14;
}
else
{
end_simple_key_cache((long long)v14, 1);
if ( !v9 )
{
my_free(v14);
v14 = 0LL;
}
if ( (i || v15 >= 0) && i <= 0 )
{
if ( a3 <= v16 )
break;
a3 -= v16;
}
else
{
if ( v9 )
{
my_free(v14);
memmove(v13, v13 + 1, 8LL * (v11 - i - 1));
}
if ( !--v11 )
break;
}
--i;
v17 = a3 / v11;
}
}
v12 = ((long long)v13 - *((_QWORD *)a1 + 1)) >> 3;
*((_DWORD *)a1 + 7) = v12;
*((_QWORD *)a1 + 2) = v12 * v17;
for ( j = 0; j < (int)v12; ++j )
*(_DWORD *)(*(_QWORD *)(*((_QWORD *)a1 + 1) + 8LL * j) + 356LL) = v12;
*a1 = 1;
if ( !v12 )
return (unsigned int)-1;
return v10;
}
|
init_partitioned_key_cache:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV qword ptr [RBP + -0x20],RDX
MOV dword ptr [RBP + -0x24],ECX
MOV dword ptr [RBP + -0x28],R8D
MOV dword ptr [RBP + -0x2c],R9D
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x1c]
MOV dword ptr [RBP + -0x5c],EAX
MOV dword ptr [RBP + -0x60],0x0
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x18],ECX
MOV RAX,qword ptr [RBP + -0x10]
CMP byte ptr [RAX],0x0
JZ 0x00176160
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x58],RAX
JMP 0x001761b4
LAB_00176160:
LEA RAX,[0x4f9038]
MOV EDI,dword ptr [RAX]
MOV EAX,dword ptr [RBP + -0x5c]
MOV ESI,EAX
SHL RSI,0x3
MOV EDX,0x10
CALL 0x00180550
MOV qword ptr [RBP + -0x58],RAX
CMP RAX,0x0
JNZ 0x00176194
JMP 0x00176188
LAB_00176188:
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001763cb
LAB_00176194:
MOV RDI,qword ptr [RBP + -0x58]
MOV EAX,dword ptr [RBP + -0x5c]
MOV EDX,EAX
SHL RDX,0x3
XOR ESI,ESI
CALL 0x001281c0
MOV RCX,qword ptr [RBP + -0x58]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],RCX
LAB_001761b4:
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x5c]
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,0x5
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0x40],RAX
MOV dword ptr [RBP + -0x30],0x0
LAB_001761dd:
MOV EAX,dword ptr [RBP + -0x30]
CMP EAX,dword ptr [RBP + -0x5c]
JGE 0x0017634a
MOV RAX,qword ptr [RBP + -0x10]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x61],AL
CMP byte ptr [RBP + -0x61],0x0
JZ 0x00176205
MOV RAX,qword ptr [RBP + -0x58]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x50],RAX
JMP 0x00176233
LAB_00176205:
LEA RAX,[0x4f9038]
MOV EDI,dword ptr [RAX]
MOV ESI,0x170
MOV EDX,0x10
CALL 0x00180550
MOV qword ptr [RBP + -0x50],RAX
CMP RAX,0x0
JNZ 0x0017622c
JMP 0x0017633c
LAB_0017622c:
MOV RAX,qword ptr [RBP + -0x50]
MOV byte ptr [RAX],0x0
LAB_00176233:
MOV RDI,qword ptr [RBP + -0x50]
MOV ESI,dword ptr [RBP + -0x14]
MOV RDX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RBP + -0x24]
MOV R8D,dword ptr [RBP + -0x28]
MOV R9D,dword ptr [RBP + -0x2c]
CALL 0x00173e90
MOV dword ptr [RBP + -0x44],EAX
CMP dword ptr [RBP + -0x44],0x0
JG 0x0017631b
MOV RDI,qword ptr [RBP + -0x50]
MOV ESI,0x1
CALL 0x00174fb0
CMP byte ptr [RBP + -0x61],0x0
JNZ 0x00176280
MOV RDI,qword ptr [RBP + -0x50]
CALL 0x001808d0
MOV qword ptr [RBP + -0x50],0x0
LAB_00176280:
CMP dword ptr [RBP + -0x30],0x0
JNZ 0x0017628c
CMP dword ptr [RBP + -0x44],0x0
JL 0x00176292
LAB_0017628c:
CMP dword ptr [RBP + -0x30],0x0
JLE 0x001762e5
LAB_00176292:
CMP byte ptr [RBP + -0x61],0x0
JZ 0x001762d3
MOV RDI,qword ptr [RBP + -0x50]
CALL 0x001808d0
MOV qword ptr [RBP + -0x50],0x0
CMP byte ptr [RBP + -0x61],0x0
JZ 0x001762d1
MOV RDI,qword ptr [RBP + -0x58]
MOV RSI,qword ptr [RBP + -0x58]
ADD RSI,0x8
MOV EAX,dword ptr [RBP + -0x5c]
SUB EAX,dword ptr [RBP + -0x30]
SUB EAX,0x1
MOV EAX,EAX
MOV EDX,EAX
SHL RDX,0x3
CALL 0x001285c0
LAB_001762d1:
JMP 0x001762d3
LAB_001762d3:
MOV EAX,dword ptr [RBP + -0x5c]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x5c],EAX
CMP EAX,0x0
JNZ 0x001762e3
JMP 0x0017634a
LAB_001762e3:
JMP 0x00176300
LAB_001762e5:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x40]
JA 0x001762f1
JMP 0x0017634a
LAB_001762f1:
MOV RCX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x20]
SUB RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
LAB_00176300:
MOV EAX,dword ptr [RBP + -0x30]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x30],EAX
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x5c]
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0x38],RAX
JMP 0x0017633c
LAB_0017631b:
MOV EAX,dword ptr [RBP + -0x44]
ADD EAX,dword ptr [RBP + -0x60]
MOV dword ptr [RBP + -0x60],EAX
MOV RCX,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RBP + -0x58]
MOV RDX,RAX
ADD RDX,0x8
MOV qword ptr [RBP + -0x58],RDX
MOV qword ptr [RAX],RCX
JMP 0x0017633c
LAB_0017633c:
MOV EAX,dword ptr [RBP + -0x30]
ADD EAX,0x1
MOV dword ptr [RBP + -0x30],EAX
JMP 0x001761dd
LAB_0017634a:
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x8]
SUB RAX,RCX
SAR RAX,0x3
MOV ECX,EAX
MOV dword ptr [RBP + -0x5c],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x1c],ECX
MOV RCX,qword ptr [RBP + -0x38]
MOV EAX,dword ptr [RBP + -0x5c]
IMUL RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x10],RCX
MOV dword ptr [RBP + -0x30],0x0
LAB_00176383:
MOV EAX,dword ptr [RBP + -0x30]
CMP EAX,dword ptr [RBP + -0x5c]
JGE 0x001763af
MOV ECX,dword ptr [RBP + -0x5c]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOVSXD RDX,dword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + RDX*0x8]
MOV dword ptr [RAX + 0x164],ECX
MOV EAX,dword ptr [RBP + -0x30]
ADD EAX,0x1
MOV dword ptr [RBP + -0x30],EAX
JMP 0x00176383
LAB_001763af:
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],0x1
CMP dword ptr [RBP + -0x5c],0x0
JNZ 0x001763c3
MOV dword ptr [RBP + -0x60],0xffffffff
LAB_001763c3:
JMP 0x001763c5
LAB_001763c5:
MOV EAX,dword ptr [RBP + -0x60]
MOV dword ptr [RBP + -0x4],EAX
LAB_001763cb:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x70
POP RBP
RET
|
int init_partitioned_key_cache
(char *param_1,int4 param_2,ulong param_3,int4 param_4,int4 param_5,
int4 param_6)
{
char cVar1;
int iVar2;
ulong uVar3;
int local_68;
uint local_64;
int8 *local_60;
int1 *local_58;
ulong local_40;
int local_38;
ulong local_28;
local_64 = *(uint *)(param_1 + 0x1c);
local_68 = 0;
*(int4 *)(param_1 + 0x18) = param_2;
if (*param_1 == '\0') {
local_60 = (int8 *)my_malloc(key_memory_KEY_CACHE,(ulong)local_64 << 3,0x10);
if (local_60 == (int8 *)0x0) {
return -1;
}
memset(local_60,0,(ulong)local_64 << 3);
*(int8 **)(param_1 + 8) = local_60;
}
else {
local_60 = *(int8 **)(param_1 + 8);
}
local_40 = param_3 / local_64;
uVar3 = local_40 / 5;
local_28 = param_3;
for (local_38 = 0; local_38 < (int)local_64; local_38 = local_38 + 1) {
cVar1 = *param_1;
if (cVar1 == '\0') {
local_58 = (int1 *)my_malloc(key_memory_KEY_CACHE,0x170,0x10);
if (local_58 != (int1 *)0x0) {
*local_58 = 0;
goto LAB_00176233;
}
}
else {
local_58 = (int1 *)*local_60;
LAB_00176233:
iVar2 = init_simple_key_cache(local_58,param_2,local_40,param_4,param_5,param_6);
if (iVar2 < 1) {
end_simple_key_cache(local_58,1);
if (cVar1 == '\0') {
my_free(local_58);
local_58 = (int1 *)0x0;
}
if (((local_38 == 0) && (iVar2 < 0)) || (0 < local_38)) {
if ((cVar1 != '\0') && (my_free(local_58), cVar1 != '\0')) {
memmove(local_60,local_60 + 1,(ulong)((local_64 - local_38) - 1) << 3);
}
local_64 = local_64 - 1;
if (local_64 == 0) break;
}
else {
if (local_28 <= uVar3) break;
local_28 = local_28 - uVar3;
}
local_38 = local_38 + -1;
local_40 = local_28 / local_64;
}
else {
local_68 = iVar2 + local_68;
*local_60 = local_58;
local_60 = local_60 + 1;
}
}
}
uVar3 = (long)local_60 - *(long *)(param_1 + 8) >> 3;
iVar2 = (int)uVar3;
*(int *)(param_1 + 0x1c) = iVar2;
*(ulong *)(param_1 + 0x10) = local_40 * (uVar3 & 0xffffffff);
for (local_38 = 0; local_38 < iVar2; local_38 = local_38 + 1) {
*(int *)(*(long *)(*(long *)(param_1 + 8) + (long)local_38 * 8) + 0x164) = iVar2;
}
*param_1 = '\x01';
if (iVar2 == 0) {
local_68 = -1;
}
return local_68;
}
|
|
12,173 |
init_partitioned_key_cache
|
eloqsql/mysys/mf_keycache.c
|
static
int init_partitioned_key_cache(PARTITIONED_KEY_CACHE_CB *keycache,
uint key_cache_block_size,
size_t use_mem, uint division_limit,
uint age_threshold, uint changed_blocks_hash_size)
{
int i;
size_t mem_per_cache;
size_t mem_decr;
int cnt;
SIMPLE_KEY_CACHE_CB *partition;
SIMPLE_KEY_CACHE_CB **partition_ptr;
uint partitions= keycache->partitions;
int blocks= 0;
DBUG_ENTER("partitioned_init_key_cache");
keycache->key_cache_block_size = key_cache_block_size;
if (keycache->key_cache_inited)
partition_ptr= keycache->partition_array;
else
{
if(!(partition_ptr=
(SIMPLE_KEY_CACHE_CB **) my_malloc(key_memory_KEY_CACHE,
sizeof(SIMPLE_KEY_CACHE_CB *) *
partitions, MYF(MY_WME))))
DBUG_RETURN(-1);
bzero(partition_ptr, sizeof(SIMPLE_KEY_CACHE_CB *) * partitions);
keycache->partition_array= partition_ptr;
}
mem_per_cache = use_mem / partitions;
mem_decr= mem_per_cache / 5;
for (i= 0; i < (int) partitions; i++)
{
my_bool key_cache_inited= keycache->key_cache_inited;
if (key_cache_inited)
partition= *partition_ptr;
else
{
if (!(partition=
(SIMPLE_KEY_CACHE_CB *) my_malloc(key_memory_KEY_CACHE,
sizeof(SIMPLE_KEY_CACHE_CB),
MYF(MY_WME))))
continue;
partition->key_cache_inited= 0;
}
cnt= init_simple_key_cache(partition, key_cache_block_size, mem_per_cache,
division_limit, age_threshold,
changed_blocks_hash_size);
if (cnt <= 0)
{
end_simple_key_cache(partition, 1);
if (!key_cache_inited)
{
my_free(partition);
partition= 0;
}
if ((i == 0 && cnt < 0) || i > 0)
{
/*
Here we have two cases:
1. i == 0 and cnt < 0
cnt < 0 => mem_per_cache is not big enough to allocate minimal
number of key blocks in the key cache of the partition.
Decrease the the number of the partitions by 1 and start again.
2. i > 0
There is not enough memory for one of the succeeding partitions.
Just skip this partition decreasing the number of partitions in
the key cache by one.
Do not change the value of mem_per_cache in both cases.
*/
if (key_cache_inited)
{
my_free(partition);
partition= 0;
if(key_cache_inited)
memmove(partition_ptr, partition_ptr+1,
sizeof(partition_ptr)*(partitions-i-1));
}
if (!--partitions)
break;
}
else
{
/*
We come here when i == 0 && cnt == 0.
cnt == 0 => the memory allocator fails to allocate a block of
memory of the size mem_per_cache. Decrease the value of
mem_per_cache without changing the current number of partitions
and start again. Make sure that such a decrease may happen not
more than 5 times in total.
*/
if (use_mem <= mem_decr)
break;
use_mem-= mem_decr;
}
i--;
mem_per_cache= use_mem/partitions;
continue;
}
else
{
blocks+= cnt;
*partition_ptr++= partition;
}
}
keycache->partitions= partitions= (uint) (partition_ptr-keycache->partition_array);
keycache->key_cache_mem_size= mem_per_cache * partitions;
for (i= 0; i < (int) partitions; i++)
keycache->partition_array[i]->hash_factor= partitions;
keycache->key_cache_inited= 1;
if (!partitions)
blocks= -1;
DBUG_RETURN(blocks);
}
|
O3
|
c
|
init_partitioned_key_cache:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r9d, -0x60(%rbp)
movl %r8d, -0x5c(%rbp)
movl %ecx, -0x58(%rbp)
movl 0x1c(%rdi), %r14d
movl %esi, -0x54(%rbp)
movl %esi, 0x18(%rdi)
cmpb $0x0, (%rdi)
movq %rdi, -0x38(%rbp)
je 0x559f0
movq %rdi, %r15
movq 0x8(%rdi), %r12
jmp 0x55a35
movq %rdx, %rbx
leaq 0x35999e(%rip), %rax # 0x3af398
movl (%rax), %edi
leaq (,%r14,8), %r15
movl $0x10, %edx
movq %r15, %rsi
callq 0x5a3c5
testq %rax, %rax
je 0x55bfe
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x281b0
movq -0x38(%rbp), %r15
movq %r12, 0x8(%r15)
movq %rbx, %rdx
xorl %edi, %edi
movq %rdx, -0x40(%rbp)
movq %rdx, %rax
xorl %edx, %edx
divq %r14
movabsq $-0x3333333333333333, %rcx # imm = 0xCCCCCCCCCCCCCCCD
movq %rax, -0x50(%rbp)
mulq %rcx
testl %r14d, %r14d
jle 0x55ba6
shrq $0x2, %rdx
movq %rdx, -0x68(%rbp)
movq $0x0, -0x48(%rbp)
xorl %ebx, %ebx
movb (%r15), %r13b
testb %r13b, %r13b
movq %r12, -0x30(%rbp)
je 0x55a81
movq (%r12), %r12
jmp 0x55aa8
leaq 0x359910(%rip), %rax # 0x3af398
movl (%rax), %edi
movl $0x170, %esi # imm = 0x170
movl $0x10, %edx
callq 0x5a3c5
testq %rax, %rax
je 0x55b32
movq %rax, %r12
movb $0x0, (%rax)
movq %r12, %rdi
movl -0x54(%rbp), %esi
movq -0x50(%rbp), %rdx
movl -0x58(%rbp), %ecx
movl -0x5c(%rbp), %r8d
movl -0x60(%rbp), %r9d
callq 0x53fdd
movl %eax, %r15d
testl %eax, %eax
jle 0x55aeb
movq -0x48(%rbp), %rax
addl %r15d, %eax
movq %rax, -0x48(%rbp)
movq -0x30(%rbp), %rax
movq %r12, (%rax)
movq %rax, %r12
addq $0x8, %r12
movq -0x38(%rbp), %r15
jmp 0x55b8e
movq %r12, %rdi
movl $0x1, %esi
callq 0x54ede
testb %r13b, %r13b
je 0x55b38
testl %ebx, %ebx
sete %al
testl %r15d, %r15d
setne %cl
testl %ebx, %ebx
jg 0x55b10
andb %cl, %al
je 0x55b53
movq %r12, %rdi
callq 0x5a5f2
movq -0x30(%rbp), %rdi
leaq 0x8(%rdi), %rsi
movl %ebx, %edx
notl %edx
addl %r14d, %edx
shlq $0x3, %rdx
callq 0x28610
jmp 0x55b6b
movq -0x30(%rbp), %r12
jmp 0x55b8e
movq %r12, %rdi
callq 0x5a5f2
testl %ebx, %ebx
sete %al
testl %r15d, %r15d
setne %cl
testl %ebx, %ebx
jg 0x55b6b
andb %cl, %al
jne 0x55b6b
movq -0x40(%rbp), %rax
subq -0x68(%rbp), %rax
movq -0x38(%rbp), %r15
jbe 0x55c05
movq -0x30(%rbp), %r12
jmp 0x55b7c
decl %r14d
movq -0x38(%rbp), %r15
movq -0x40(%rbp), %rax
movq -0x30(%rbp), %r12
je 0x55b99
decl %ebx
movl %r14d, %ecx
movq %rax, -0x40(%rbp)
xorl %edx, %edx
divq %rcx
movq %rax, -0x50(%rbp)
incl %ebx
cmpl %r14d, %ebx
jl 0x55a6f
movq %r12, %rcx
movq 0x8(%r15), %r12
movq -0x48(%rbp), %rdi
jmp 0x55ba9
movq %r12, %rcx
subq %r12, %rcx
shrq $0x3, %rcx
movl %ecx, 0x1c(%r15)
movl %ecx, %eax
imulq -0x50(%rbp), %rax
movq %rax, 0x10(%r15)
testl %ecx, %ecx
jle 0x55be2
movl %ecx, %eax
andl $0x7fffffff, %eax # imm = 0x7FFFFFFF
xorl %edx, %edx
movq 0x8(%r15), %rsi
movq (%rsi,%rdx,8), %rsi
movl %ecx, 0x164(%rsi)
incq %rdx
cmpq %rdx, %rax
jne 0x55bcc
movb $0x1, (%r15)
xorl %eax, %eax
cmpl $0x1, %ecx
sbbl %eax, %eax
orl %edi, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
jmp 0x55bef
movq -0x30(%rbp), %r12
jmp 0x55b99
|
init_partitioned_key_cache:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov [rbp+var_60], r9d
mov [rbp+var_5C], r8d
mov [rbp+var_58], ecx
mov r14d, [rdi+1Ch]
mov [rbp+var_54], esi
mov [rdi+18h], esi
cmp byte ptr [rdi], 0
mov [rbp+var_38], rdi
jz short loc_559F0
mov r15, rdi
mov r12, [rdi+8]
jmp short loc_55A35
loc_559F0:
mov rbx, rdx
lea rax, key_memory_KEY_CACHE
mov edi, [rax]
lea r15, ds:0[r14*8]
mov edx, 10h
mov rsi, r15
call my_malloc
test rax, rax
jz loc_55BFE
mov r12, rax
mov rdi, rax
xor esi, esi
mov rdx, r15
call _memset
mov r15, [rbp+var_38]
mov [r15+8], r12
mov rdx, rbx
loc_55A35:
xor edi, edi
mov [rbp+var_40], rdx
mov rax, rdx
xor edx, edx
div r14
mov rcx, 0CCCCCCCCCCCCCCCDh
mov [rbp+var_50], rax
mul rcx
test r14d, r14d
jle loc_55BA6
shr rdx, 2
mov [rbp+var_68], rdx
mov [rbp+var_48], 0
xor ebx, ebx
loc_55A6F:
mov r13b, [r15]
test r13b, r13b
mov [rbp+var_30], r12
jz short loc_55A81
mov r12, [r12]
jmp short loc_55AA8
loc_55A81:
lea rax, key_memory_KEY_CACHE
mov edi, [rax]
mov esi, 170h
mov edx, 10h
call my_malloc
test rax, rax
jz loc_55B32
mov r12, rax
mov byte ptr [rax], 0
loc_55AA8:
mov rdi, r12
mov esi, [rbp+var_54]
mov rdx, [rbp+var_50]
mov ecx, [rbp+var_58]
mov r8d, [rbp+var_5C]
mov r9d, [rbp+var_60]
call init_simple_key_cache
mov r15d, eax
test eax, eax
jle short loc_55AEB
mov rax, [rbp+var_48]
add eax, r15d
mov [rbp+var_48], rax
mov rax, [rbp+var_30]
mov [rax], r12
mov r12, rax
add r12, 8
mov r15, [rbp+var_38]
jmp loc_55B8E
loc_55AEB:
mov rdi, r12
mov esi, 1
call end_simple_key_cache
test r13b, r13b
jz short loc_55B38
test ebx, ebx
setz al
test r15d, r15d
setnz cl
test ebx, ebx
jg short loc_55B10
and al, cl
jz short loc_55B53
loc_55B10:
mov rdi, r12
call my_free
mov rdi, [rbp+var_30]
lea rsi, [rdi+8]
mov edx, ebx
not edx
add edx, r14d
shl rdx, 3
call _memmove
jmp short loc_55B6B
loc_55B32:
mov r12, [rbp+var_30]
jmp short loc_55B8E
loc_55B38:
mov rdi, r12
call my_free
test ebx, ebx
setz al
test r15d, r15d
setnz cl
test ebx, ebx
jg short loc_55B6B
and al, cl
jnz short loc_55B6B
loc_55B53:
mov rax, [rbp+var_40]
sub rax, [rbp+var_68]
mov r15, [rbp+var_38]
jbe loc_55C05
mov r12, [rbp+var_30]
jmp short loc_55B7C
loc_55B6B:
dec r14d
mov r15, [rbp+var_38]
mov rax, [rbp+var_40]
mov r12, [rbp+var_30]
jz short loc_55B99
loc_55B7C:
dec ebx
mov ecx, r14d
mov [rbp+var_40], rax
xor edx, edx
div rcx
mov [rbp+var_50], rax
loc_55B8E:
inc ebx
cmp ebx, r14d
jl loc_55A6F
loc_55B99:
mov rcx, r12
mov r12, [r15+8]
mov rdi, [rbp+var_48]
jmp short loc_55BA9
loc_55BA6:
mov rcx, r12
loc_55BA9:
sub rcx, r12
shr rcx, 3
mov [r15+1Ch], ecx
mov eax, ecx
imul rax, [rbp+var_50]
mov [r15+10h], rax
test ecx, ecx
jle short loc_55BE2
mov eax, ecx
and eax, 7FFFFFFFh
xor edx, edx
loc_55BCC:
mov rsi, [r15+8]
mov rsi, [rsi+rdx*8]
mov [rsi+164h], ecx
inc rdx
cmp rax, rdx
jnz short loc_55BCC
loc_55BE2:
mov byte ptr [r15], 1
xor eax, eax
cmp ecx, 1
sbb eax, eax
or eax, edi
loc_55BEF:
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_55BFE:
mov eax, 0FFFFFFFFh
jmp short loc_55BEF
loc_55C05:
mov r12, [rbp+var_30]
jmp short loc_55B99
|
long long init_partitioned_key_cache(
char *a1,
unsigned int a2,
unsigned long long a3,
long long a4,
unsigned int a5,
unsigned int a6)
{
unsigned long long v6; // r14
char *v7; // r15
char **v8; // r12
unsigned long long v9; // rbx
long long v10; // rax
int v11; // edi
unsigned long long v12; // rcx
unsigned __int128 v13; // rax
int v14; // ebx
char v15; // r13
char *v16; // r12
char *v17; // rax
int inited; // r15d
unsigned long long v19; // rax
char **v20; // rcx
unsigned long long v21; // rcx
long long v22; // rdx
unsigned long long v24; // [rsp+8h] [rbp-68h]
unsigned int v27; // [rsp+18h] [rbp-58h]
unsigned long long v28; // [rsp+20h] [rbp-50h]
int v29; // [rsp+28h] [rbp-48h]
unsigned long long v30; // [rsp+30h] [rbp-40h]
char **v32; // [rsp+40h] [rbp-30h]
v27 = a4;
v6 = *((unsigned int *)a1 + 7);
*((_DWORD *)a1 + 6) = a2;
if ( *a1 )
{
v7 = a1;
v8 = (char **)*((_QWORD *)a1 + 1);
}
else
{
v9 = a3;
v10 = my_malloc(key_memory_KEY_CACHE, 8 * v6, 16LL, a4);
if ( !v10 )
return 0xFFFFFFFFLL;
v8 = (char **)v10;
memset(v10, 0LL, 8 * v6);
v7 = a1;
*((_QWORD *)a1 + 1) = v8;
a3 = v9;
}
v11 = 0;
v30 = a3;
v12 = 0xCCCCCCCCCCCCCCCDLL;
v28 = a3 / v6;
v13 = 0xCCCCCCCCCCCCCCCDLL * (unsigned __int128)(a3 / v6);
if ( (int)v6 <= 0 )
{
v20 = v8;
goto LABEL_27;
}
v24 = *((_QWORD *)&v13 + 1) >> 2;
v29 = 0;
v14 = 0;
while ( 1 )
{
v15 = *v7;
v32 = v8;
if ( *v7 )
{
v16 = *v8;
}
else
{
v17 = (char *)my_malloc(key_memory_KEY_CACHE, 368LL, 16LL, v12);
if ( !v17 )
goto LABEL_24;
v16 = v17;
*v17 = 0;
}
inited = init_simple_key_cache(v16, a2, v28, v27, a5, a6);
if ( inited <= 0 )
break;
v29 += inited;
*v32 = v16;
v8 = v32 + 1;
v7 = a1;
LABEL_24:
if ( ++v14 >= (int)v6 )
goto LABEL_25;
}
end_simple_key_cache((long long)v16, 1);
if ( v15 )
{
if ( v14 > 0 || inited != 0 && v14 == 0 )
{
my_free(v16);
memmove(v32, v32 + 1, 8LL * (unsigned int)(v6 + ~v14));
goto LABEL_22;
}
}
else
{
my_free(v16);
if ( v14 > 0 || inited != 0 && v14 == 0 )
{
LABEL_22:
LODWORD(v6) = v6 - 1;
v7 = a1;
v19 = v30;
v8 = v32;
if ( !(_DWORD)v6 )
goto LABEL_25;
goto LABEL_23;
}
}
v19 = v30 - v24;
v7 = a1;
if ( v30 > v24 )
{
v8 = v32;
LABEL_23:
--v14;
v12 = (unsigned int)v6;
v30 = v19;
v28 = v19 / (unsigned int)v6;
goto LABEL_24;
}
v8 = v32;
LABEL_25:
v20 = v8;
v8 = (char **)*((_QWORD *)v7 + 1);
v11 = v29;
LABEL_27:
v21 = (unsigned long long)((char *)v20 - (char *)v8) >> 3;
*((_DWORD *)v7 + 7) = v21;
*((_QWORD *)v7 + 2) = v28 * (unsigned int)v21;
if ( (int)v21 > 0 )
{
v22 = 0LL;
do
*(_DWORD *)(*(_QWORD *)(*((_QWORD *)v7 + 1) + 8 * v22++) + 356LL) = v21;
while ( (v21 & 0x7FFFFFFF) != v22 );
}
*v7 = 1;
return v11 | (unsigned int)-((_DWORD)v21 == 0);
}
|
init_partitioned_key_cache:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV dword ptr [RBP + -0x60],R9D
MOV dword ptr [RBP + -0x5c],R8D
MOV dword ptr [RBP + -0x58],ECX
MOV R14D,dword ptr [RDI + 0x1c]
MOV dword ptr [RBP + -0x54],ESI
MOV dword ptr [RDI + 0x18],ESI
CMP byte ptr [RDI],0x0
MOV qword ptr [RBP + -0x38],RDI
JZ 0x001559f0
MOV R15,RDI
MOV R12,qword ptr [RDI + 0x8]
JMP 0x00155a35
LAB_001559f0:
MOV RBX,RDX
LEA RAX,[0x4af398]
MOV EDI,dword ptr [RAX]
LEA R15,[R14*0x8]
MOV EDX,0x10
MOV RSI,R15
CALL 0x0015a3c5
TEST RAX,RAX
JZ 0x00155bfe
MOV R12,RAX
MOV RDI,RAX
XOR ESI,ESI
MOV RDX,R15
CALL 0x001281b0
MOV R15,qword ptr [RBP + -0x38]
MOV qword ptr [R15 + 0x8],R12
MOV RDX,RBX
LAB_00155a35:
XOR EDI,EDI
MOV qword ptr [RBP + -0x40],RDX
MOV RAX,RDX
XOR EDX,EDX
DIV R14
MOV RCX,-0x3333333333333333
MOV qword ptr [RBP + -0x50],RAX
MUL RCX
TEST R14D,R14D
JLE 0x00155ba6
SHR RDX,0x2
MOV qword ptr [RBP + -0x68],RDX
MOV qword ptr [RBP + -0x48],0x0
XOR EBX,EBX
LAB_00155a6f:
MOV R13B,byte ptr [R15]
TEST R13B,R13B
MOV qword ptr [RBP + -0x30],R12
JZ 0x00155a81
MOV R12,qword ptr [R12]
JMP 0x00155aa8
LAB_00155a81:
LEA RAX,[0x4af398]
MOV EDI,dword ptr [RAX]
MOV ESI,0x170
MOV EDX,0x10
CALL 0x0015a3c5
TEST RAX,RAX
JZ 0x00155b32
MOV R12,RAX
MOV byte ptr [RAX],0x0
LAB_00155aa8:
MOV RDI,R12
MOV ESI,dword ptr [RBP + -0x54]
MOV RDX,qword ptr [RBP + -0x50]
MOV ECX,dword ptr [RBP + -0x58]
MOV R8D,dword ptr [RBP + -0x5c]
MOV R9D,dword ptr [RBP + -0x60]
CALL 0x00153fdd
MOV R15D,EAX
TEST EAX,EAX
JLE 0x00155aeb
MOV RAX,qword ptr [RBP + -0x48]
ADD EAX,R15D
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],R12
MOV R12,RAX
ADD R12,0x8
MOV R15,qword ptr [RBP + -0x38]
JMP 0x00155b8e
LAB_00155aeb:
MOV RDI,R12
MOV ESI,0x1
CALL 0x00154ede
TEST R13B,R13B
JZ 0x00155b38
TEST EBX,EBX
SETZ AL
TEST R15D,R15D
SETNZ CL
TEST EBX,EBX
JG 0x00155b10
AND AL,CL
JZ 0x00155b53
LAB_00155b10:
MOV RDI,R12
CALL 0x0015a5f2
MOV RDI,qword ptr [RBP + -0x30]
LEA RSI,[RDI + 0x8]
MOV EDX,EBX
NOT EDX
ADD EDX,R14D
SHL RDX,0x3
CALL 0x00128610
JMP 0x00155b6b
LAB_00155b32:
MOV R12,qword ptr [RBP + -0x30]
JMP 0x00155b8e
LAB_00155b38:
MOV RDI,R12
CALL 0x0015a5f2
TEST EBX,EBX
SETZ AL
TEST R15D,R15D
SETNZ CL
TEST EBX,EBX
JG 0x00155b6b
AND AL,CL
JNZ 0x00155b6b
LAB_00155b53:
MOV RAX,qword ptr [RBP + -0x40]
SUB RAX,qword ptr [RBP + -0x68]
MOV R15,qword ptr [RBP + -0x38]
JBE 0x00155c05
MOV R12,qword ptr [RBP + -0x30]
JMP 0x00155b7c
LAB_00155b6b:
DEC R14D
MOV R15,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x40]
MOV R12,qword ptr [RBP + -0x30]
JZ 0x00155b99
LAB_00155b7c:
DEC EBX
MOV ECX,R14D
MOV qword ptr [RBP + -0x40],RAX
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0x50],RAX
LAB_00155b8e:
INC EBX
CMP EBX,R14D
JL 0x00155a6f
LAB_00155b99:
MOV RCX,R12
MOV R12,qword ptr [R15 + 0x8]
MOV RDI,qword ptr [RBP + -0x48]
JMP 0x00155ba9
LAB_00155ba6:
MOV RCX,R12
LAB_00155ba9:
SUB RCX,R12
SHR RCX,0x3
MOV dword ptr [R15 + 0x1c],ECX
MOV EAX,ECX
IMUL RAX,qword ptr [RBP + -0x50]
MOV qword ptr [R15 + 0x10],RAX
TEST ECX,ECX
JLE 0x00155be2
MOV EAX,ECX
AND EAX,0x7fffffff
XOR EDX,EDX
LAB_00155bcc:
MOV RSI,qword ptr [R15 + 0x8]
MOV RSI,qword ptr [RSI + RDX*0x8]
MOV dword ptr [RSI + 0x164],ECX
INC RDX
CMP RAX,RDX
JNZ 0x00155bcc
LAB_00155be2:
MOV byte ptr [R15],0x1
XOR EAX,EAX
CMP ECX,0x1
SBB EAX,EAX
OR EAX,EDI
LAB_00155bef:
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00155bfe:
MOV EAX,0xffffffff
JMP 0x00155bef
LAB_00155c05:
MOV R12,qword ptr [RBP + -0x30]
JMP 0x00155b99
|
uint init_partitioned_key_cache
(char *param_1,int4 param_2,ulong param_3,int4 param_4,int4 param_5
,int4 param_6)
{
char cVar1;
int iVar2;
uint uVar3;
int8 *__s;
int1 *puVar4;
ulong uVar5;
ulong uVar6;
uint uVar7;
int8 *puVar8;
uint uVar9;
bool bVar10;
ulong local_58;
ulong local_48;
uVar7 = *(uint *)(param_1 + 0x1c);
uVar5 = (ulong)uVar7;
*(int4 *)(param_1 + 0x18) = param_2;
if (*param_1 == '\0') {
__s = (int8 *)my_malloc(key_memory_KEY_CACHE,uVar5 * 8,0x10);
if (__s == (int8 *)0x0) {
return 0xffffffff;
}
memset(__s,0,uVar5 * 8);
*(int8 **)(param_1 + 8) = __s;
}
else {
__s = *(int8 **)(param_1 + 8);
}
uVar3 = 0;
local_58 = param_3 / uVar5;
puVar8 = __s;
if (0 < (int)uVar7) {
uVar6 = local_58 / 5;
uVar3 = 0;
uVar7 = 0;
local_48 = param_3;
do {
cVar1 = *param_1;
if (cVar1 == '\0') {
puVar4 = (int1 *)my_malloc(key_memory_KEY_CACHE,0x170,0x10);
if (puVar4 != (int1 *)0x0) {
*puVar4 = 0;
goto LAB_00155aa8;
}
}
else {
puVar4 = (int1 *)*__s;
LAB_00155aa8:
iVar2 = init_simple_key_cache(puVar4,param_2,local_58,param_4,param_5,param_6);
if (iVar2 < 1) {
end_simple_key_cache(puVar4,1);
if (cVar1 == '\0') {
my_free(puVar4);
if (((int)uVar7 < 1) && (uVar7 != 0 || iVar2 == 0)) goto LAB_00155b53;
LAB_00155b6b:
uVar9 = (int)uVar5 - 1;
uVar5 = (ulong)uVar9;
if (uVar9 == 0) break;
}
else {
if ((0 < (int)uVar7) || (uVar7 == 0 && iVar2 != 0)) {
my_free(puVar4);
memmove(__s,__s + 1,(ulong)(~uVar7 + (int)uVar5) << 3);
goto LAB_00155b6b;
}
LAB_00155b53:
bVar10 = local_48 < uVar6;
local_48 = local_48 - uVar6;
if (bVar10 || local_48 == 0) break;
}
uVar7 = uVar7 - 1;
local_58 = local_48 / uVar5;
}
else {
uVar3 = uVar3 + iVar2;
*__s = puVar4;
__s = __s + 1;
}
}
uVar7 = uVar7 + 1;
} while ((int)uVar7 < (int)uVar5);
puVar8 = *(int8 **)(param_1 + 8);
}
uVar5 = (ulong)((long)__s - (long)puVar8) >> 3;
uVar7 = (uint)uVar5;
*(uint *)(param_1 + 0x1c) = uVar7;
*(ulong *)(param_1 + 0x10) = (uVar5 & 0xffffffff) * local_58;
if (0 < (int)uVar7) {
uVar5 = 0;
do {
*(uint *)(*(long *)(*(long *)(param_1 + 8) + uVar5 * 8) + 0x164) = uVar7;
uVar5 = uVar5 + 1;
} while ((uVar7 & 0x7fffffff) != uVar5);
}
*param_1 = '\x01';
return -(uint)(uVar7 == 0) | uVar3;
}
|
|
12,174 |
google::protobuf::io::FileOutputStream::CopyingFileOutputStream::Write(void const*, int)
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/zero_copy_stream_impl.cc
|
bool FileOutputStream::CopyingFileOutputStream::Write(const void* buffer,
int size) {
GOOGLE_CHECK(!is_closed_);
int total_written = 0;
const uint8_t* buffer_base = reinterpret_cast<const uint8_t*>(buffer);
while (total_written < size) {
int bytes;
do {
bytes = write(file_, buffer_base + total_written, size - total_written);
} while (bytes < 0 && errno == EINTR);
if (bytes <= 0) {
// Write error.
// FIXME(kenton): According to the man page, if write() returns zero,
// there was no error; write() simply did not write anything. It's
// unclear under what circumstances this might happen, but presumably
// errno won't be set in this case. I am confused as to how such an
// event should be handled. For now I'm treating it as an error, since
// retrying seems like it could lead to an infinite loop. I suspect
// this never actually happens anyway.
if (bytes < 0) {
errno_ = errno;
}
return false;
}
total_written += bytes;
}
return true;
}
|
O3
|
cpp
|
google::protobuf::io::FileOutputStream::CopyingFileOutputStream::Write(void const*, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
cmpb $0x1, 0xd(%rdi)
jne 0xfbdda
leaq 0xf03b6(%rip), %rdx # 0x1ec153
leaq 0x10(%rsp), %r12
movq %r12, %rdi
movl $0x3, %esi
movl $0xd8, %ecx
callq 0x1072ba
leaq 0xf041e(%rip), %rsi # 0x1ec1d9
movq %r12, %rdi
callq 0x106db8
leaq 0xf(%rsp), %rdi
movq %rax, %rsi
callq 0x106e92
leaq 0x10(%rsp), %rdi
callq 0x1072d8
testl %ebx, %ebx
jle 0xfbe26
xorl %ebp, %ebp
movl %ebp, %r12d
addq %r15, %r12
movl %ebx, %eax
subl %ebp, %eax
movslq %eax, %r13
movl 0x8(%r14), %edi
movq %r12, %rsi
movq %r13, %rdx
callq 0x1f190
movq %rax, %rcx
testl %ecx, %ecx
jns 0xfbe11
callq 0x1f060
movl (%rax), %eax
cmpl $0x4, %eax
je 0xfbded
jmp 0xfbe1e
setne %al
je 0xfbe28
addl %ecx, %ebp
cmpl %ebx, %ebp
jl 0xfbde0
jmp 0xfbe28
movl %eax, 0x10(%r14)
xorl %eax, %eax
jmp 0xfbe28
movb $0x1, %al
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xfbe39
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x1072d8
movq %rbx, %rdi
callq 0x1f860
|
_ZN6google8protobuf2io16FileOutputStream23CopyingFileOutputStream5WriteEPKvi:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov ebx, edx
mov r15, rsi
mov r14, rdi
cmp byte ptr [rdi+0Dh], 1
jnz short loc_FBDDA
lea rdx, aWorkspaceLlm4b_50; "/workspace/llm4binary/github2025/aimrt_"...
lea r12, [rsp+78h+var_68]
mov rdi, r12
mov esi, 3
mov ecx, 0D8h
call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int)
lea rsi, aCheckFailedIsC; "CHECK failed: !is_closed_: "
mov rdi, r12
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
lea rdi, [rsp+78h+var_69]
mov rsi, rax
call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &)
lea rdi, [rsp+78h+var_68]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
loc_FBDDA:
test ebx, ebx
jle short loc_FBE26
xor ebp, ebp
loc_FBDE0:
mov r12d, ebp
add r12, r15
mov eax, ebx
sub eax, ebp
movsxd r13, eax
loc_FBDED:
mov edi, [r14+8]
mov rsi, r12
mov rdx, r13
call _write
mov rcx, rax
test ecx, ecx
jns short loc_FBE11
call ___errno_location
mov eax, [rax]
cmp eax, 4
jz short loc_FBDED
jmp short loc_FBE1E
loc_FBE11:
setnz al
jz short loc_FBE28
add ebp, ecx
cmp ebp, ebx
jl short loc_FBDE0
jmp short loc_FBE28
loc_FBE1E:
mov [r14+10h], eax
xor eax, eax
jmp short loc_FBE28
loc_FBE26:
mov al, 1
loc_FBE28:
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_FBE39:
mov rbx, rax
lea rdi, [rsp+arg_8]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
mov rdi, rbx
call __Unwind_Resume
|
bool google::protobuf::io::FileOutputStream::CopyingFileOutputStream::Write(
google::protobuf::io::FileOutputStream::CopyingFileOutputStream *this,
char *a2,
int a3)
{
long long v5; // rax
int v6; // ebp
long long v7; // rdi
int v8; // eax
int v9; // ecx
bool v10; // zf
int v11; // eax
bool result; // al
char v13; // [rsp+Fh] [rbp-69h] BYREF
_BYTE v14[104]; // [rsp+10h] [rbp-68h] BYREF
if ( *((_BYTE *)this + 13) == 1 )
{
google::protobuf::internal::LogMessage::LogMessage(
v14,
3LL,
"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/zero_copy_stream_impl.cc",
216LL);
v5 = google::protobuf::internal::LogMessage::operator<<(v14, "CHECK failed: !is_closed_: ");
google::protobuf::internal::LogFinisher::operator=(&v13, v5);
google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v14);
}
if ( a3 <= 0 )
return 1;
v6 = 0;
do
{
while ( 1 )
{
v7 = *((unsigned int *)this + 2);
v8 = write(v7, &a2[v6], a3 - v6);
v9 = v8;
v10 = v8 == 0;
if ( v8 < 0 )
break;
result = v8 != 0;
if ( !v10 )
{
v6 += v9;
if ( v6 < a3 )
continue;
}
return result;
}
v11 = *(_DWORD *)__errno_location(v7);
}
while ( v11 == 4 );
*((_DWORD *)this + 4) = v11;
return 0;
}
|
Write:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV EBX,EDX
MOV R15,RSI
MOV R14,RDI
CMP byte ptr [RDI + 0xd],0x1
JNZ 0x001fbdda
LEA RDX,[0x2ec153]
LEA R12,[RSP + 0x10]
MOV RDI,R12
MOV ESI,0x3
MOV ECX,0xd8
CALL 0x002072ba
LAB_001fbdb4:
LEA RSI,[0x2ec1d9]
MOV RDI,R12
CALL 0x00206db8
LAB_001fbdc3:
LEA RDI,[RSP + 0xf]
MOV RSI,RAX
CALL 0x00206e92
LAB_001fbdd0:
LEA RDI,[RSP + 0x10]
CALL 0x002072d8
LAB_001fbdda:
TEST EBX,EBX
JLE 0x001fbe26
XOR EBP,EBP
LAB_001fbde0:
MOV R12D,EBP
ADD R12,R15
MOV EAX,EBX
SUB EAX,EBP
MOVSXD R13,EAX
LAB_001fbded:
MOV EDI,dword ptr [R14 + 0x8]
MOV RSI,R12
MOV RDX,R13
CALL 0x0011f190
MOV RCX,RAX
TEST ECX,ECX
JNS 0x001fbe11
CALL 0x0011f060
MOV EAX,dword ptr [RAX]
CMP EAX,0x4
JZ 0x001fbded
JMP 0x001fbe1e
LAB_001fbe11:
SETNZ AL
JZ 0x001fbe28
ADD EBP,ECX
CMP EBP,EBX
JL 0x001fbde0
JMP 0x001fbe28
LAB_001fbe1e:
MOV dword ptr [R14 + 0x10],EAX
XOR EAX,EAX
JMP 0x001fbe28
LAB_001fbe26:
MOV AL,0x1
LAB_001fbe28:
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* google::protobuf::io::FileOutputStream::CopyingFileOutputStream::Write(void const*, int) */
bool __thiscall
google::protobuf::io::FileOutputStream::CopyingFileOutputStream::Write
(CopyingFileOutputStream *this,void *param_1,int param_2)
{
LogMessage *pLVar1;
ssize_t sVar2;
int *piVar3;
int iVar4;
uint uVar5;
bool bVar6;
LogFinisher local_69;
LogMessage local_68 [56];
if (this[0xd] == (CopyingFileOutputStream)0x1) {
internal::LogMessage::LogMessage
(local_68,3,
"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/zero_copy_stream_impl.cc"
,0xd8);
/* try { // try from 001fbdb4 to 001fbdc2 has its CatchHandler @ 001fbe39 */
pLVar1 = (LogMessage *)internal::LogMessage::operator<<(local_68,"CHECK failed: !is_closed_: ");
/* try { // try from 001fbdc3 to 001fbdcf has its CatchHandler @ 001fbe37 */
internal::LogFinisher::operator=(&local_69,pLVar1);
internal::LogMessage::~LogMessage(local_68);
}
if (param_2 < 1) {
bVar6 = true;
}
else {
uVar5 = 0;
do {
while( true ) {
sVar2 = write(*(int *)(this + 8),(void *)((ulong)uVar5 + (long)param_1),
(long)(int)(param_2 - uVar5));
iVar4 = (int)sVar2;
bVar6 = iVar4 != 0;
if (-1 < iVar4) break;
piVar3 = __errno_location();
if (*piVar3 != 4) {
*(int *)(this + 0x10) = *piVar3;
return false;
}
}
} while ((bVar6) && (uVar5 = uVar5 + iVar4, (int)uVar5 < param_2));
}
return bVar6;
}
|
|
12,175 |
my_uca_generate_page
|
eloqsql/strings/ctype-uca.c
|
static my_bool
my_uca_generate_page(MY_CHARSET_LOADER *loader,
MY_UCA_WEIGHT_LEVEL *dst, const MY_UCA_WEIGHT_LEVEL *src,
uint pageno)
{
DBUG_ASSERT(dst->levelno == src->levelno);
return src->lengths[pageno] ?
/*
A page with explicit weights and some special rules.
Copy all weights from the page in "src".
*/
my_uca_copy_page(loader, src, dst, pageno) :
/*
A page with implicit weights and some special rules.
Generate default weights for all characters on this page
algorithmically now, at initialization time.
*/
my_uca_generate_implicit_page(loader, dst, pageno);
}
|
O0
|
c
|
my_uca_generate_page:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
jmp 0x52e89
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x1c(%rbp), %ecx
movzbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x52ebb
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rdx
movl -0x1c(%rbp), %eax
movl %eax, %ecx
callq 0x52ee0
movsbl %al, %eax
movl %eax, -0x20(%rbp)
jmp 0x52ed1
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq 0x53010
movsbl %al, %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
my_uca_generate_page:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_1C], ecx
jmp short $+2
loc_52E89:
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov ecx, [rbp+var_1C]
movzx eax, byte ptr [rax+rcx]
cmp eax, 0
jz short loc_52EBB
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_10]
mov eax, [rbp+var_1C]
mov ecx, eax
call my_uca_copy_page
movsx eax, al
mov [rbp+var_20], eax
jmp short loc_52ED1
loc_52EBB:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov edx, [rbp+var_1C]
call my_uca_generate_implicit_page
movsx eax, al
mov [rbp+var_20], eax
loc_52ED1:
mov eax, [rbp+var_20]
add rsp, 20h
pop rbp
retn
|
long long my_uca_generate_page(long long a1, long long a2, long long a3, unsigned int a4)
{
if ( *(_BYTE *)(*(_QWORD *)(a3 + 8) + a4) )
return (unsigned int)(char)my_uca_copy_page(a1, a3, a2, a4);
else
return (unsigned int)(char)my_uca_generate_implicit_page(a1, a2, a4);
}
|
my_uca_generate_page:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],ECX
JMP 0x00152e89
LAB_00152e89:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV ECX,dword ptr [RBP + -0x1c]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
CMP EAX,0x0
JZ 0x00152ebb
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RBP + -0x1c]
MOV ECX,EAX
CALL 0x00152ee0
MOVSX EAX,AL
MOV dword ptr [RBP + -0x20],EAX
JMP 0x00152ed1
LAB_00152ebb:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x1c]
CALL 0x00153010
MOVSX EAX,AL
MOV dword ptr [RBP + -0x20],EAX
LAB_00152ed1:
MOV EAX,dword ptr [RBP + -0x20]
ADD RSP,0x20
POP RBP
RET
|
int my_uca_generate_page(int8 param_1,int8 param_2,long param_3,uint param_4)
{
char cVar1;
int4 local_28;
if (*(char *)(*(long *)(param_3 + 8) + (ulong)param_4) == '\0') {
cVar1 = my_uca_generate_implicit_page(param_1,param_2,param_4);
}
else {
cVar1 = my_uca_copy_page(param_1,param_3,param_2,param_4);
}
local_28 = (int)cVar1;
return local_28;
}
|
|
12,176 |
skip_dead_code
|
bluesky950520[P]quickjs/quickjs.c
|
static int skip_dead_code(JSFunctionDef *s, const uint8_t *bc_buf, int bc_len,
int pos, int *linep, int *colp)
{
int op, len, label;
for (; pos < bc_len; pos += len) {
op = bc_buf[pos];
len = opcode_info[op].size;
if (op == OP_source_loc) {
*linep = get_u32(bc_buf + pos + 1);
*colp = get_u32(bc_buf + pos + 5);
} else if (op == OP_label) {
label = get_u32(bc_buf + pos + 1);
if (update_label(s, label, 0) > 0)
break;
assert(s->label_slots[label].first_reloc == NULL);
} else {
/* XXX: output a warning for unreachable code? */
JSAtom atom;
switch(opcode_info[op].fmt) {
case OP_FMT_label:
case OP_FMT_label_u16:
label = get_u32(bc_buf + pos + 1);
update_label(s, label, -1);
break;
case OP_FMT_atom_label_u8:
case OP_FMT_atom_label_u16:
label = get_u32(bc_buf + pos + 5);
update_label(s, label, -1);
/* fall thru */
case OP_FMT_atom:
case OP_FMT_atom_u8:
case OP_FMT_atom_u16:
atom = get_u32(bc_buf + pos + 1);
JS_FreeAtom(s->ctx, atom);
break;
default:
break;
}
}
}
return pos;
}
|
O1
|
c
|
skip_dead_code:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, 0x10(%rsp)
movq %r8, 0x8(%rsp)
movl %ecx, %ebx
cmpl %edx, %ecx
jge 0x6e2ed
movl %edx, %ebp
movq %rsi, %r12
movq %rdi, %r13
leaq 0x2e7fc(%rip), %r14 # 0x9ca30
movslq %ebx, %rax
movzbl (%r12,%rax), %ecx
movzbl (%r14,%rcx,4), %r15d
cmpl $0xb5, %ecx
je 0x6e26b
cmpl $0xc4, %ecx
jne 0x6e283
movl 0x1(%r12,%rax), %ecx
movq 0x8(%rsp), %rdx
movl %ecx, (%rdx)
movl 0x5(%r12,%rax), %eax
movq 0x10(%rsp), %rcx
movl %eax, (%rcx)
jmp 0x6e2e2
movslq 0x1(%r12,%rax), %rax
movq 0x170(%r13), %rcx
leaq (%rax,%rax,2), %rax
cmpl $0x0, (%rcx,%rax,8)
jle 0x6e2e2
jmp 0x6e2ed
movzbl 0x3(%r14,%rcx,4), %ecx
cmpl $0x1d, %ecx
ja 0x6e2e2
movl $0x7000000, %edx # imm = 0x7000000
btl %ecx, %edx
jb 0x6e2d4
movl $0x18000000, %edx # imm = 0x18000000
btl %ecx, %edx
jb 0x6e2c1
movl $0x20800000, %edx # imm = 0x20800000
btl %ecx, %edx
jae 0x6e2e2
movslq 0x1(%r12,%rax), %rax
movq 0x170(%r13), %rcx
leaq (%rax,%rax,2), %rax
decl (%rcx,%rax,8)
jmp 0x6e2e2
movslq 0x5(%r12,%rax), %rcx
movq 0x170(%r13), %rdx
leaq (%rcx,%rcx,2), %rcx
decl (%rdx,%rcx,8)
movl 0x1(%r12,%rax), %esi
movq (%r13), %rdi
callq 0x1fbc4
addl %r15d, %ebx
cmpl %ebp, %ebx
jl 0x6e234
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
skip_dead_code:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rsp+48h+var_38], r9
mov [rsp+48h+var_40], r8
mov ebx, ecx
cmp ecx, edx
jge loc_6E2ED
mov ebp, edx
mov r12, rsi
mov r13, rdi
lea r14, opcode_info
loc_6E234:
movsxd rax, ebx
movzx ecx, byte ptr [r12+rax]
movzx r15d, byte ptr [r14+rcx*4]
cmp ecx, 0B5h
jz short loc_6E26B
cmp ecx, 0C4h
jnz short loc_6E283
mov ecx, [r12+rax+1]
mov rdx, [rsp+48h+var_40]
mov [rdx], ecx
mov eax, [r12+rax+5]
mov rcx, [rsp+48h+var_38]
mov [rcx], eax
jmp short loc_6E2E2
loc_6E26B:
movsxd rax, dword ptr [r12+rax+1]
mov rcx, [r13+170h]
lea rax, [rax+rax*2]
cmp dword ptr [rcx+rax*8], 0
jle short loc_6E2E2
jmp short loc_6E2ED
loc_6E283:
movzx ecx, byte ptr [r14+rcx*4+3]
cmp ecx, 1Dh
ja short loc_6E2E2
mov edx, 7000000h
bt edx, ecx
jb short loc_6E2D4
mov edx, 18000000h
bt edx, ecx
jb short loc_6E2C1
mov edx, 20800000h
bt edx, ecx
jnb short loc_6E2E2
movsxd rax, dword ptr [r12+rax+1]
mov rcx, [r13+170h]
lea rax, [rax+rax*2]
dec dword ptr [rcx+rax*8]
jmp short loc_6E2E2
loc_6E2C1:
movsxd rcx, dword ptr [r12+rax+5]
mov rdx, [r13+170h]
lea rcx, [rcx+rcx*2]
dec dword ptr [rdx+rcx*8]
loc_6E2D4:
mov esi, [r12+rax+1]
mov rdi, [r13+0]
call JS_FreeAtom
loc_6E2E2:
add ebx, r15d
cmp ebx, ebp
jl loc_6E234
loc_6E2ED:
mov eax, ebx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long skip_dead_code(long long *a1, long long a2, int a3, unsigned int a4, _DWORD *a5, _DWORD *a6)
{
unsigned int i; // ebx
long long v8; // rcx
int v9; // r15d
unsigned int v10; // ecx
int v11; // edx
int v12; // edx
int v13; // edx
long long v14; // rax
long long v15; // rcx
for ( i = a4; (int)i < a3; i += v9 )
{
v8 = *(unsigned __int8 *)(a2 + (int)i);
v9 = opcode_info[4 * v8];
if ( (_DWORD)v8 == 181 )
{
if ( *(int *)(a1[46] + 24LL * *(int *)(a2 + (int)i + 1)) > 0 )
return i;
continue;
}
if ( (_DWORD)v8 == 196 )
{
*a5 = *(_DWORD *)(a2 + (int)i + 1);
*a6 = *(_DWORD *)(a2 + (int)i + 5);
}
else
{
v10 = opcode_info[4 * v8 + 3];
if ( v10 <= 0x1D )
{
v11 = 117440512;
if ( !_bittest(&v11, v10) )
{
v12 = 402653184;
if ( !_bittest(&v12, v10) )
{
v13 = 545259520;
if ( _bittest(&v13, v10) )
{
v14 = 3LL * *(int *)(a2 + (int)i + 1);
--*(_DWORD *)(a1[46] + 8 * v14);
}
continue;
}
v15 = 3LL * *(int *)(a2 + (int)i + 5);
--*(_DWORD *)(a1[46] + 8 * v15);
}
JS_FreeAtom(*a1, *(_DWORD *)(a2 + (int)i + 1));
}
}
}
return i;
}
|
skip_dead_code:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],R9
MOV qword ptr [RSP + 0x8],R8
MOV EBX,ECX
CMP ECX,EDX
JGE 0x0016e2ed
MOV EBP,EDX
MOV R12,RSI
MOV R13,RDI
LEA R14,[0x19ca30]
LAB_0016e234:
MOVSXD RAX,EBX
MOVZX ECX,byte ptr [R12 + RAX*0x1]
MOVZX R15D,byte ptr [R14 + RCX*0x4]
CMP ECX,0xb5
JZ 0x0016e26b
CMP ECX,0xc4
JNZ 0x0016e283
MOV ECX,dword ptr [R12 + RAX*0x1 + 0x1]
MOV RDX,qword ptr [RSP + 0x8]
MOV dword ptr [RDX],ECX
MOV EAX,dword ptr [R12 + RAX*0x1 + 0x5]
MOV RCX,qword ptr [RSP + 0x10]
MOV dword ptr [RCX],EAX
JMP 0x0016e2e2
LAB_0016e26b:
MOVSXD RAX,dword ptr [R12 + RAX*0x1 + 0x1]
MOV RCX,qword ptr [R13 + 0x170]
LEA RAX,[RAX + RAX*0x2]
CMP dword ptr [RCX + RAX*0x8],0x0
JLE 0x0016e2e2
JMP 0x0016e2ed
LAB_0016e283:
MOVZX ECX,byte ptr [R14 + RCX*0x4 + 0x3]
CMP ECX,0x1d
JA 0x0016e2e2
MOV EDX,0x7000000
BT EDX,ECX
JC 0x0016e2d4
MOV EDX,0x18000000
BT EDX,ECX
JC 0x0016e2c1
MOV EDX,0x20800000
BT EDX,ECX
JNC 0x0016e2e2
MOVSXD RAX,dword ptr [R12 + RAX*0x1 + 0x1]
MOV RCX,qword ptr [R13 + 0x170]
LEA RAX,[RAX + RAX*0x2]
DEC dword ptr [RCX + RAX*0x8]
JMP 0x0016e2e2
LAB_0016e2c1:
MOVSXD RCX,dword ptr [R12 + RAX*0x1 + 0x5]
MOV RDX,qword ptr [R13 + 0x170]
LEA RCX,[RCX + RCX*0x2]
DEC dword ptr [RDX + RCX*0x8]
LAB_0016e2d4:
MOV ESI,dword ptr [R12 + RAX*0x1 + 0x1]
MOV RDI,qword ptr [R13]
CALL 0x0011fbc4
LAB_0016e2e2:
ADD EBX,R15D
CMP EBX,EBP
JL 0x0016e234
LAB_0016e2ed:
MOV EAX,EBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int skip_dead_code(int8 *param_1,long param_2,int param_3,int param_4,int4 *param_5,
int4 *param_6)
{
int *piVar1;
byte bVar2;
byte bVar3;
long lVar4;
if (param_4 < param_3) {
do {
lVar4 = (long)param_4;
bVar2 = *(byte *)(param_2 + lVar4);
bVar3 = opcode_info[(ulong)bVar2 * 4];
if (bVar2 == 0xb5) {
if (0 < *(int *)(param_1[0x2e] + (long)*(int *)(param_2 + 1 + lVar4) * 0x18)) {
return param_4;
}
}
else if (bVar2 == 0xc4) {
*param_5 = *(int4 *)(param_2 + 1 + lVar4);
*param_6 = *(int4 *)(param_2 + 5 + lVar4);
}
else {
bVar2 = opcode_info[(ulong)bVar2 * 4 + 3];
if (bVar2 < 0x1e) {
if ((0x7000000U >> (bVar2 & 0x1f) & 1) == 0) {
if ((0x18000000U >> (bVar2 & 0x1f) & 1) == 0) {
if ((0x20800000U >> (bVar2 & 0x1f) & 1) != 0) {
piVar1 = (int *)(param_1[0x2e] + (long)*(int *)(param_2 + 1 + lVar4) * 0x18);
*piVar1 = *piVar1 + -1;
}
goto LAB_0016e2e2;
}
piVar1 = (int *)(param_1[0x2e] + (long)*(int *)(param_2 + 5 + lVar4) * 0x18);
*piVar1 = *piVar1 + -1;
}
JS_FreeAtom(*param_1,*(int4 *)(param_2 + 1 + lVar4));
}
}
LAB_0016e2e2:
param_4 = param_4 + (uint)bVar3;
} while (param_4 < param_3);
}
return param_4;
}
|
|
12,177 |
blst_p2_serialize
|
corpus-core[P]colibri-stateless/build_O2/_deps/blst-src/src/e2.c
|
void blst_p2_serialize(unsigned char out[192], const POINTonE2 *in)
{ POINTonE2_Serialize(out, in); }
|
O2
|
c
|
blst_p2_serialize:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xc0(%rsi), %rdi
pushq $0x60
popq %rsi
callq 0x510f5
testq %rax, %rax
je 0x5389d
movl $0xc0, %esi
movq %rbx, %rdi
callq 0x512c5
movb $0x40, (%rbx)
popq %rbx
popq %r14
popq %rbp
retq
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x54d13
|
blst_p2_serialize:
push rbp
mov rbp, rsp
push r14
push rbx
mov r14, rsi
mov rbx, rdi
lea rdi, [rsi+0C0h]
push 60h ; '`'
pop rsi
call vec_is_zero
test rax, rax
jz short loc_5389D
mov esi, 0C0h
mov rdi, rbx
call bytes_zero
mov byte ptr [rbx], 40h ; '@'
pop rbx
pop r14
pop rbp
retn
loc_5389D:
mov rdi, rbx
mov rsi, r14
pop rbx
pop r14
pop rbp
jmp POINTonE2_Serialize_BE
|
long long blst_p2_serialize(_BYTE *a1, long long a2)
{
long long result; // rax
if ( !vec_is_zero(a2 + 192, 0x60uLL) )
return POINTonE2_Serialize_BE(a1, a2);
result = bytes_zero((long long)a1, 192LL);
*a1 = 64;
return result;
}
|
blst_p2_serialize:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV R14,RSI
MOV RBX,RDI
LEA RDI,[RSI + 0xc0]
PUSH 0x60
POP RSI
CALL 0x001510f5
TEST RAX,RAX
JZ 0x0015389d
MOV ESI,0xc0
MOV RDI,RBX
CALL 0x001512c5
MOV byte ptr [RBX],0x40
POP RBX
POP R14
POP RBP
RET
LAB_0015389d:
MOV RDI,RBX
MOV RSI,R14
POP RBX
POP R14
POP RBP
JMP 0x00154d13
|
void blst_p2_serialize(int1 *param_1,long param_2)
{
long lVar1;
lVar1 = vec_is_zero(param_2 + 0xc0,0x60);
if (lVar1 != 0) {
bytes_zero(param_1,0xc0);
*param_1 = 0x40;
return;
}
POINTonE2_Serialize_BE(param_1,param_2);
return;
}
|
|
12,178 |
common_tokenize(llama_vocab const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool, bool)
|
monkey531[P]llama/common/common.cpp
|
std::vector<llama_token> common_tokenize(
const struct llama_vocab * vocab,
const std::string & text,
bool add_special,
bool parse_special) {
// upper limit for the number of tokens
int n_tokens = text.length() + 2 * add_special;
std::vector<llama_token> result(n_tokens);
n_tokens = llama_tokenize(vocab, text.data(), text.length(), result.data(), result.size(), add_special, parse_special);
if (n_tokens < 0) {
result.resize(-n_tokens);
int check = llama_tokenize(vocab, text.data(), text.length(), result.data(), result.size(), add_special, parse_special);
GGML_ASSERT(check == -n_tokens);
} else {
result.resize(n_tokens);
}
return result;
}
|
O0
|
cpp
|
common_tokenize(llama_vocab const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool, bool):
subq $0xb8, %rsp
movq %rdi, 0x68(%rsp)
movb %r8b, %al
movq %rdi, %r8
movq %r8, 0x60(%rsp)
movq %rdi, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movq %rdx, 0xa0(%rsp)
andb $0x1, %cl
movb %cl, 0x9f(%rsp)
andb $0x1, %al
movb %al, 0x9e(%rsp)
movq 0xa0(%rsp), %rdi
callq 0x568e0
movzbl 0x9f(%rsp), %edx
andl $0x1, %edx
movl %eax, %ecx
movl %ecx, %eax
movl %edx, %ecx
leal (%rax,%rcx,2), %eax
movl %eax, 0x98(%rsp)
movb $0x0, 0x97(%rsp)
movslq 0x98(%rsp), %rax
movq %rax, 0x70(%rsp)
leaq 0x96(%rsp), %rdi
movq %rdi, 0x78(%rsp)
callq 0x66760
movq 0x68(%rsp), %rdi
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
callq 0xb23d0
jmp 0xba5a7
leaq 0x96(%rsp), %rdi
callq 0x66c80
movq 0xa8(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0xa0(%rsp), %rdi
callq 0x56380
movq %rax, 0x40(%rsp)
movq 0xa0(%rsp), %rdi
callq 0x568e0
movq 0x68(%rsp), %rdi
movl %eax, 0x4c(%rsp)
callq 0xb24b0
movq 0x68(%rsp), %rdi
movq %rax, 0x50(%rsp)
callq 0x6afc0
movq 0x38(%rsp), %rdi
movq 0x40(%rsp), %rsi
movl 0x4c(%rsp), %edx
movq 0x50(%rsp), %rcx
movl %eax, %r8d
movzbl 0x9f(%rsp), %r9d
movzbl 0x9e(%rsp), %r10d
andl $0x1, %r10d
movq %rsp, %rax
movl %r10d, (%rax)
andl $0x1, %r9d
callq 0x57250
movl %eax, 0x5c(%rsp)
jmp 0xba63e
movl 0x5c(%rsp), %eax
movl %eax, 0x98(%rsp)
cmpl $0x0, 0x98(%rsp)
jge 0xba780
movq 0x68(%rsp), %rdi
movl 0x98(%rsp), %eax
negl %eax
movslq %eax, %rsi
callq 0xc2440
jmp 0xba66f
movq 0xa8(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0xa0(%rsp), %rdi
callq 0x56380
movq %rax, 0x18(%rsp)
movq 0xa0(%rsp), %rdi
callq 0x568e0
movq 0x68(%rsp), %rdi
movl %eax, 0x24(%rsp)
callq 0xb24b0
movq 0x68(%rsp), %rdi
movq %rax, 0x28(%rsp)
callq 0x6afc0
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
movl 0x24(%rsp), %edx
movq 0x28(%rsp), %rcx
movl %eax, %r8d
movzbl 0x9f(%rsp), %r9d
movzbl 0x9e(%rsp), %r10d
andl $0x1, %r10d
movq %rsp, %rax
movl %r10d, (%rax)
andl $0x1, %r9d
callq 0x57250
movl %eax, 0x34(%rsp)
jmp 0xba6f9
movl 0x34(%rsp), %eax
movl %eax, 0x80(%rsp)
movl 0x80(%rsp), %eax
xorl %ecx, %ecx
subl 0x98(%rsp), %ecx
cmpl %ecx, %eax
je 0xba77e
leaq 0x12c0aa(%rip), %rdi # 0x1e67c9
leaq 0x128f0d(%rip), %rdx # 0x1e3633
leaq 0x12c71c(%rip), %rcx # 0x1e6e49
xorl %eax, %eax
movl $0x6b8, %esi # imm = 0x6B8
callq 0x56d30
jmp 0xba73b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
leaq 0x96(%rsp), %rdi
callq 0x66c80
jmp 0xba7bf
movq 0x68(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
callq 0x66c20
jmp 0xba7bf
jmp 0xba796
movq 0x68(%rsp), %rdi
movslq 0x98(%rsp), %rsi
callq 0xc2440
jmp 0xba794
jmp 0xba796
movb $0x1, 0x97(%rsp)
testb $0x1, 0x97(%rsp)
jne 0xba7b2
movq 0x68(%rsp), %rdi
callq 0x66c20
movq 0x60(%rsp), %rax
addq $0xb8, %rsp
retq
movq 0x88(%rsp), %rdi
callq 0x56a10
nopl (%rax)
|
_Z15common_tokenizePK11llama_vocabRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbb:
sub rsp, 0B8h
mov [rsp+0B8h+var_50], rdi
mov al, r8b
mov r8, rdi
mov [rsp+0B8h+var_58], r8
mov [rsp+0B8h+var_8], rdi
mov [rsp+0B8h+var_10], rsi
mov [rsp+0B8h+var_18], rdx
and cl, 1
mov [rsp+0B8h+var_19], cl
and al, 1
mov [rsp+0B8h+var_1A], al
mov rdi, [rsp+0B8h+var_18]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv; std::string::length(void)
movzx edx, [rsp+0B8h+var_19]
and edx, 1
mov ecx, eax
mov eax, ecx
mov ecx, edx
lea eax, [rax+rcx*2]
mov [rsp+0B8h+var_20], eax
mov [rsp+0B8h+var_21], 0
movsxd rax, [rsp+0B8h+var_20]
mov [rsp+0B8h+var_48], rax
lea rdi, [rsp+0B8h+var_22]
mov [rsp+0B8h+var_40], rdi
call _ZNSaIiEC2Ev; std::allocator<int>::allocator(void)
mov rdi, [rsp+0B8h+var_50]
mov rsi, [rsp+0B8h+var_48]
mov rdx, [rsp+0B8h+var_40]
call _ZNSt6vectorIiSaIiEEC2EmRKS0_; std::vector<int>::vector(ulong,std::allocator<int> const&)
jmp short $+2
loc_BA5A7:
lea rdi, [rsp+0B8h+var_22]
call _ZNSaIiED2Ev; std::allocator<int>::~allocator()
mov rax, [rsp+0B8h+var_10]
mov [rsp+0B8h+var_80], rax
mov rdi, [rsp+0B8h+var_18]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4dataEv; std::string::data(void)
mov [rsp+0B8h+var_78], rax
mov rdi, [rsp+0B8h+var_18]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv; std::string::length(void)
mov rdi, [rsp+0B8h+var_50]
mov [rsp+0B8h+var_6C], eax
call _ZNSt6vectorIiSaIiEE4dataEv; std::vector<int>::data(void)
mov rdi, [rsp+0B8h+var_50]
mov [rsp+0B8h+var_68], rax
call _ZNKSt6vectorIiSaIiEE4sizeEv; std::vector<int>::size(void)
mov rdi, [rsp+0B8h+var_80]
mov rsi, [rsp+0B8h+var_78]
mov edx, [rsp+0B8h+var_6C]
mov rcx, [rsp+0B8h+var_68]
mov r8d, eax
movzx r9d, [rsp+0B8h+var_19]
movzx r10d, [rsp+0B8h+var_1A]
and r10d, 1
mov rax, rsp
mov [rax], r10d
and r9d, 1
call _llama_tokenize
mov [rsp+0B8h+var_5C], eax
jmp short $+2
loc_BA63E:
mov eax, [rsp+0B8h+var_5C]
mov [rsp+0B8h+var_20], eax
cmp [rsp+0B8h+var_20], 0
jge loc_BA780
mov rdi, [rsp+0B8h+var_50]
mov eax, [rsp+0B8h+var_20]
neg eax
movsxd rsi, eax
call _ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
jmp short $+2
loc_BA66F:
mov rax, [rsp+0B8h+var_10]
mov [rsp+0B8h+var_A8], rax
mov rdi, [rsp+0B8h+var_18]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4dataEv; std::string::data(void)
mov [rsp+0B8h+var_A0], rax
mov rdi, [rsp+0B8h+var_18]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv; std::string::length(void)
mov rdi, [rsp+0B8h+var_50]
mov [rsp+0B8h+var_94], eax
call _ZNSt6vectorIiSaIiEE4dataEv; std::vector<int>::data(void)
mov rdi, [rsp+0B8h+var_50]
mov [rsp+0B8h+var_90], rax
call _ZNKSt6vectorIiSaIiEE4sizeEv; std::vector<int>::size(void)
mov rdi, [rsp+0B8h+var_A8]
mov rsi, [rsp+0B8h+var_A0]
mov edx, [rsp+0B8h+var_94]
mov rcx, [rsp+0B8h+var_90]
mov r8d, eax
movzx r9d, [rsp+0B8h+var_19]
movzx r10d, [rsp+0B8h+var_1A]
and r10d, 1
mov rax, rsp
mov [rax], r10d
and r9d, 1
call _llama_tokenize
mov [rsp+0B8h+var_84], eax
jmp short $+2
loc_BA6F9:
mov eax, [rsp+0B8h+var_84]
mov [rsp+0B8h+var_38], eax
mov eax, [rsp+0B8h+var_38]
xor ecx, ecx
sub ecx, [rsp+0B8h+var_20]
cmp eax, ecx
jz short loc_BA77E
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aCheckNTokens; "check == -n_tokens"
xor eax, eax
mov esi, 6B8h
call _ggml_abort
jmp short $+2
loc_BA73B:
mov rcx, rax
mov eax, edx
mov [rsp+0B8h+var_30], rcx
mov [rsp+0B8h+var_34], eax
lea rdi, [rsp+0B8h+var_22]
call _ZNSaIiED2Ev; std::allocator<int>::~allocator()
jmp short loc_BA7BF
mov rdi, [rsp+0B8h+var_50]
mov rcx, rax
mov eax, edx
mov [rsp+0B8h+var_30], rcx
mov [rsp+0B8h+var_34], eax
call _ZNSt6vectorIiSaIiEED2Ev; std::vector<int>::~vector()
jmp short loc_BA7BF
loc_BA77E:
jmp short loc_BA796
loc_BA780:
mov rdi, [rsp+0B8h+var_50]
movsxd rsi, [rsp+0B8h+var_20]
call _ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
jmp short $+2
loc_BA794:
jmp short $+2
loc_BA796:
mov [rsp+0B8h+var_21], 1
test [rsp+0B8h+var_21], 1
jnz short loc_BA7B2
mov rdi, [rsp+0B8h+var_50]
call _ZNSt6vectorIiSaIiEED2Ev; std::vector<int>::~vector()
loc_BA7B2:
mov rax, [rsp+0B8h+var_58]
add rsp, 0B8h
retn
loc_BA7BF:
mov rdi, [rsp+0B8h+var_30]
call __Unwind_Resume
|
_QWORD * common_tokenize(_QWORD *a1, long long a2, long long a3, char a4, char a5)
{
unsigned int v5; // eax
unsigned int v6; // eax
long long v8; // [rsp+10h] [rbp-A8h]
long long v9; // [rsp+18h] [rbp-A0h]
unsigned int v10; // [rsp+24h] [rbp-94h]
long long v11; // [rsp+28h] [rbp-90h]
long long v12; // [rsp+38h] [rbp-80h]
long long v13; // [rsp+40h] [rbp-78h]
unsigned int v14; // [rsp+4Ch] [rbp-6Ch]
long long v15; // [rsp+50h] [rbp-68h]
unsigned long long v16; // [rsp+70h] [rbp-48h]
int v17; // [rsp+80h] [rbp-38h]
long long v18; // [rsp+88h] [rbp-30h]
_BYTE v19[2]; // [rsp+96h] [rbp-22h] BYREF
int v20; // [rsp+98h] [rbp-20h]
char v21; // [rsp+9Eh] [rbp-1Ah]
char v22; // [rsp+9Fh] [rbp-19h]
long long v23; // [rsp+A0h] [rbp-18h]
long long v24; // [rsp+A8h] [rbp-10h]
_QWORD *v25; // [rsp+B0h] [rbp-8h]
v25 = a1;
v24 = a2;
v23 = a3;
v22 = a4 & 1;
v21 = a5 & 1;
v20 = std::string::length(a3) + 2 * (a4 & 1);
v19[1] = 0;
v16 = v20;
std::allocator<int>::allocator((long long)v19);
std::vector<int>::vector((long long)a1, v16, (long long)v19);
std::allocator<int>::~allocator((long long)v19);
v12 = v24;
v13 = std::string::data(v23);
v14 = std::string::length(v23);
v15 = std::vector<int>::data(a1);
v5 = std::vector<int>::size(a1);
v20 = llama_tokenize(v12, v13, v14, v15, v5, v22 & 1, v21 & 1);
if ( v20 >= 0 )
{
std::vector<int>::resize(a1, v20);
}
else
{
std::vector<int>::resize(a1, -v20);
v8 = v24;
v9 = std::string::data(v23);
v10 = std::string::length(v23);
v11 = std::vector<int>::data(a1);
v6 = std::vector<int>::size(a1);
v17 = llama_tokenize(v8, v9, v10, v11, v6, v22 & 1, v21 & 1);
if ( v17 != -v20 )
{
v18 = ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",
1720LL,
"GGML_ASSERT(%s) failed",
"check == -n_tokens");
std::allocator<int>::~allocator((long long)v19);
_Unwind_Resume(v18);
}
}
return a1;
}
|
common_tokenize:
SUB RSP,0xb8
MOV qword ptr [RSP + 0x68],RDI
MOV AL,R8B
MOV R8,RDI
MOV qword ptr [RSP + 0x60],R8
MOV qword ptr [RSP + 0xb0],RDI
MOV qword ptr [RSP + 0xa8],RSI
MOV qword ptr [RSP + 0xa0],RDX
AND CL,0x1
MOV byte ptr [RSP + 0x9f],CL
AND AL,0x1
MOV byte ptr [RSP + 0x9e],AL
MOV RDI,qword ptr [RSP + 0xa0]
CALL 0x001568e0
MOVZX EDX,byte ptr [RSP + 0x9f]
AND EDX,0x1
MOV ECX,EAX
MOV EAX,ECX
MOV ECX,EDX
LEA EAX,[RAX + RCX*0x2]
MOV dword ptr [RSP + 0x98],EAX
MOV byte ptr [RSP + 0x97],0x0
MOVSXD RAX,dword ptr [RSP + 0x98]
MOV qword ptr [RSP + 0x70],RAX
LEA RDI,[RSP + 0x96]
MOV qword ptr [RSP + 0x78],RDI
CALL 0x00166760
MOV RDI,qword ptr [RSP + 0x68]
MOV RSI,qword ptr [RSP + 0x70]
MOV RDX,qword ptr [RSP + 0x78]
LAB_001ba5a0:
CALL 0x001b23d0
JMP 0x001ba5a7
LAB_001ba5a7:
LEA RDI,[RSP + 0x96]
CALL 0x00166c80
MOV RAX,qword ptr [RSP + 0xa8]
MOV qword ptr [RSP + 0x38],RAX
MOV RDI,qword ptr [RSP + 0xa0]
CALL 0x00156380
MOV qword ptr [RSP + 0x40],RAX
MOV RDI,qword ptr [RSP + 0xa0]
CALL 0x001568e0
MOV RDI,qword ptr [RSP + 0x68]
MOV dword ptr [RSP + 0x4c],EAX
CALL 0x001b24b0
MOV RDI,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0x50],RAX
CALL 0x0016afc0
MOV RDI,qword ptr [RSP + 0x38]
MOV RSI,qword ptr [RSP + 0x40]
MOV EDX,dword ptr [RSP + 0x4c]
MOV RCX,qword ptr [RSP + 0x50]
MOV R8D,EAX
MOVZX R9D,byte ptr [RSP + 0x9f]
MOVZX R10D,byte ptr [RSP + 0x9e]
LAB_001ba625:
AND R10D,0x1
MOV RAX,RSP
MOV dword ptr [RAX],R10D
AND R9D,0x1
CALL 0x00157250
MOV dword ptr [RSP + 0x5c],EAX
JMP 0x001ba63e
LAB_001ba63e:
MOV EAX,dword ptr [RSP + 0x5c]
MOV dword ptr [RSP + 0x98],EAX
CMP dword ptr [RSP + 0x98],0x0
JGE 0x001ba780
MOV RDI,qword ptr [RSP + 0x68]
MOV EAX,dword ptr [RSP + 0x98]
NEG EAX
MOVSXD RSI,EAX
CALL 0x001c2440
JMP 0x001ba66f
LAB_001ba66f:
MOV RAX,qword ptr [RSP + 0xa8]
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,qword ptr [RSP + 0xa0]
CALL 0x00156380
MOV qword ptr [RSP + 0x18],RAX
MOV RDI,qword ptr [RSP + 0xa0]
CALL 0x001568e0
MOV RDI,qword ptr [RSP + 0x68]
MOV dword ptr [RSP + 0x24],EAX
CALL 0x001b24b0
MOV RDI,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0x28],RAX
CALL 0x0016afc0
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x18]
MOV EDX,dword ptr [RSP + 0x24]
MOV RCX,qword ptr [RSP + 0x28]
MOV R8D,EAX
MOVZX R9D,byte ptr [RSP + 0x9f]
MOVZX R10D,byte ptr [RSP + 0x9e]
AND R10D,0x1
MOV RAX,RSP
MOV dword ptr [RAX],R10D
AND R9D,0x1
CALL 0x00157250
MOV dword ptr [RSP + 0x34],EAX
JMP 0x001ba6f9
LAB_001ba6f9:
MOV EAX,dword ptr [RSP + 0x34]
MOV dword ptr [RSP + 0x80],EAX
MOV EAX,dword ptr [RSP + 0x80]
XOR ECX,ECX
SUB ECX,dword ptr [RSP + 0x98]
CMP EAX,ECX
JZ 0x001ba77e
LEA RDI,[0x2e67c9]
LEA RDX,[0x2e3633]
LEA RCX,[0x2e6e49]
XOR EAX,EAX
MOV ESI,0x6b8
CALL 0x00156d30
JMP 0x001ba73b
LAB_001ba73b:
MOV RCX,RAX
MOV EAX,EDX
MOV qword ptr [RSP + 0x88],RCX
MOV dword ptr [RSP + 0x84],EAX
LEA RDI,[RSP + 0x96]
CALL 0x00166c80
JMP 0x001ba7bf
LAB_001ba77e:
JMP 0x001ba796
LAB_001ba780:
MOV RDI,qword ptr [RSP + 0x68]
MOVSXD RSI,dword ptr [RSP + 0x98]
CALL 0x001c2440
LAB_001ba792:
JMP 0x001ba794
LAB_001ba794:
JMP 0x001ba796
LAB_001ba796:
MOV byte ptr [RSP + 0x97],0x1
TEST byte ptr [RSP + 0x97],0x1
JNZ 0x001ba7b2
MOV RDI,qword ptr [RSP + 0x68]
CALL 0x00166c20
LAB_001ba7b2:
MOV RAX,qword ptr [RSP + 0x60]
ADD RSP,0xb8
RET
LAB_001ba7bf:
MOV RDI,qword ptr [RSP + 0x88]
CALL 0x00156a10
|
/* WARNING: Removing unreachable block (ram,0x001ba7a8) */
/* common_tokenize(llama_vocab const*, std::__cxx11::string const&, bool, bool) */
llama_vocab * common_tokenize(llama_vocab *param_1,string *param_2,bool param_3,bool param_4)
{
string *psVar1;
int4 uVar2;
int4 uVar3;
int iVar4;
ulong uVar5;
int8 uVar6;
int8 uVar7;
int7 in_register_00000011;
byte in_R8B;
allocator<int> local_22;
int1 local_21;
int local_20;
byte local_1a;
byte local_19;
int8 local_18;
string *local_10;
llama_vocab *local_8;
local_18 = CONCAT71(in_register_00000011,param_3);
local_1a = in_R8B & 1;
local_19 = param_4;
local_10 = param_2;
local_8 = param_1;
local_20 = std::__cxx11::string::length();
local_20 = local_20 + (local_19 & 1) * 2;
local_21 = 0;
uVar5 = (ulong)local_20;
std::allocator<int>::allocator(&local_22);
/* try { // try from 001ba5a0 to 001ba5a4 has its CatchHandler @ 001ba73b */
std::vector<int,std::allocator<int>>::vector
((vector<int,std::allocator<int>> *)param_1,uVar5,(allocator *)&local_22);
std::allocator<int>::~allocator(&local_22);
psVar1 = local_10;
uVar6 = std::__cxx11::string::data();
uVar2 = std::__cxx11::string::length();
uVar7 = std::vector<int,std::allocator<int>>::data((vector<int,std::allocator<int>> *)param_1);
uVar3 = std::vector<int,std::allocator<int>>::size((vector<int,std::allocator<int>> *)param_1);
/* try { // try from 001ba625 to 001ba791 has its CatchHandler @ 001ba75e */
local_20 = llama_tokenize(psVar1,uVar6,uVar2,uVar7,uVar3,local_19 & 1,local_1a & 1);
if (local_20 < 0) {
std::vector<int,std::allocator<int>>::resize
((vector<int,std::allocator<int>> *)param_1,(long)-local_20);
psVar1 = local_10;
uVar6 = std::__cxx11::string::data();
uVar2 = std::__cxx11::string::length();
uVar7 = std::vector<int,std::allocator<int>>::data((vector<int,std::allocator<int>> *)param_1);
uVar3 = std::vector<int,std::allocator<int>>::size((vector<int,std::allocator<int>> *)param_1);
iVar4 = llama_tokenize(psVar1,uVar6,uVar2,uVar7,uVar3,local_19 & 1,local_1a & 1);
if (iVar4 != -local_20) {
uVar6 = ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp"
,0x6b8,"GGML_ASSERT(%s) failed","check == -n_tokens");
/* catch() { ... } // from try @ 001ba5a0 with catch @ 001ba73b */
std::allocator<int>::~allocator(&local_22);
/* WARNING: Subroutine does not return */
_Unwind_Resume(uVar6);
}
}
else {
std::vector<int,std::allocator<int>>::resize
((vector<int,std::allocator<int>> *)param_1,(long)local_20);
}
return param_1;
}
|
|
12,179 |
common_tokenize(llama_vocab const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool, bool)
|
monkey531[P]llama/common/common.cpp
|
std::vector<llama_token> common_tokenize(
const struct llama_vocab * vocab,
const std::string & text,
bool add_special,
bool parse_special) {
// upper limit for the number of tokens
int n_tokens = text.length() + 2 * add_special;
std::vector<llama_token> result(n_tokens);
n_tokens = llama_tokenize(vocab, text.data(), text.length(), result.data(), result.size(), add_special, parse_special);
if (n_tokens < 0) {
result.resize(-n_tokens);
int check = llama_tokenize(vocab, text.data(), text.length(), result.data(), result.size(), add_special, parse_special);
GGML_ASSERT(check == -n_tokens);
} else {
result.resize(n_tokens);
}
return result;
}
|
O2
|
cpp
|
common_tokenize(llama_vocab const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, %ebp
movl %ecx, %r14d
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
leal (%r14,%r14), %eax
addl 0x8(%rdx), %eax
movslq %eax, %rsi
leaq 0x17(%rsp), %rdx
callq 0x3d468
movq (%r12), %rsi
movl 0x8(%r12), %edx
movq (%rbx), %rcx
movq 0x8(%rbx), %r8
subq %rcx, %r8
shrq $0x2, %r8
movl %ebp, (%rsp)
movq %r15, %rdi
movl %r14d, %r9d
callq 0x22e30
movl %eax, %r13d
testl %eax, %eax
js 0x40e86
movl %r13d, %esi
movq %rbx, %rdi
callq 0x43644
jmp 0x40ec3
negl %r13d
movq %rbx, %rdi
movq %r13, %rsi
callq 0x43644
movq (%r12), %rsi
movl 0x8(%r12), %edx
movq (%rbx), %rcx
movq 0x8(%rbx), %r8
subq %rcx, %r8
shrq $0x2, %r8
movzbl %bpl, %eax
movl %eax, (%rsp)
movzbl %r14b, %r9d
movq %r15, %rdi
callq 0x22e30
cmpl %r13d, %eax
jne 0x40ed5
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5bde5(%rip), %rdi # 0x9ccc1
leaq 0x596a6(%rip), %rdx # 0x9a589
leaq 0x5c457(%rip), %rcx # 0x9d341
movl $0x6b8, %esi # imm = 0x6B8
xorl %eax, %eax
callq 0x22ce0
jmp 0x40ef8
movq %rax, %r14
movq %rbx, %rdi
callq 0x3772c
movq %r14, %rdi
callq 0x22da0
|
_Z15common_tokenizePK11llama_vocabRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbb:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov ebp, r8d
mov r14d, ecx
mov r12, rdx
mov r15, rsi
mov rbx, rdi
lea eax, [r14+r14]
add eax, [rdx+8]
movsxd rsi, eax
lea rdx, [rsp+48h+var_31]
call _ZNSt6vectorIiSaIiEEC2EmRKS0_; std::vector<int>::vector(ulong,std::allocator<int> const&)
mov rsi, [r12]
mov edx, [r12+8]
mov rcx, [rbx]
mov r8, [rbx+8]
sub r8, rcx
shr r8, 2
mov [rsp+48h+var_48], ebp
mov rdi, r15
mov r9d, r14d
call _llama_tokenize
mov r13d, eax
test eax, eax
js short loc_40E86
mov esi, r13d
mov rdi, rbx
call _ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
jmp short loc_40EC3
loc_40E86:
neg r13d
mov rdi, rbx
mov rsi, r13
call _ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
mov rsi, [r12]
mov edx, [r12+8]
mov rcx, [rbx]
mov r8, [rbx+8]
sub r8, rcx
shr r8, 2
movzx eax, bpl
mov [rsp+48h+var_48], eax
movzx r9d, r14b
mov rdi, r15
call _llama_tokenize
cmp eax, r13d
jnz short loc_40ED5
loc_40EC3:
mov rax, rbx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_40ED5:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aCheckNTokens; "check == -n_tokens"
mov esi, 6B8h
xor eax, eax
call _ggml_abort
jmp short $+2
loc_40EF8:
mov r14, rax
mov rdi, rbx
call _ZNSt12_Vector_baseIiSaIiEED2Ev; std::_Vector_base<int>::~_Vector_base()
mov rdi, r14
call __Unwind_Resume
|
long long * common_tokenize(long long *a1, long long a2, _QWORD *a3, unsigned int a4, int a5)
{
int v8; // eax
int v9; // r13d
long long v11; // rax
std::vector<int>::vector(a1, (int)(*((_DWORD *)a3 + 2) + 2 * a4));
v8 = llama_tokenize(a2, *a3, *((unsigned int *)a3 + 2), *a1, (unsigned long long)(a1[1] - *a1) >> 2, a4, a5);
if ( v8 < 0 )
{
v9 = -v8;
std::vector<int>::resize(a1, (unsigned int)-v8);
if ( (unsigned int)llama_tokenize(
a2,
*a3,
*((unsigned int *)a3 + 2),
*a1,
(unsigned long long)(a1[1] - *a1) >> 2,
(unsigned __int8)a4,
(unsigned __int8)a5) != v9 )
{
v11 = ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",
1720LL,
"GGML_ASSERT(%s) failed",
"check == -n_tokens");
std::_Vector_base<int>::~_Vector_base((long long)a1);
_Unwind_Resume(v11);
}
}
else
{
std::vector<int>::resize(a1, (unsigned int)v8);
}
return a1;
}
|
common_tokenize:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV EBP,R8D
MOV R14D,ECX
MOV R12,RDX
MOV R15,RSI
MOV RBX,RDI
LEA EAX,[R14 + R14*0x1]
ADD EAX,dword ptr [RDX + 0x8]
MOVSXD RSI,EAX
LEA RDX,[RSP + 0x17]
CALL 0x0013d468
MOV RSI,qword ptr [R12]
MOV EDX,dword ptr [R12 + 0x8]
MOV RCX,qword ptr [RBX]
MOV R8,qword ptr [RBX + 0x8]
SUB R8,RCX
SHR R8,0x2
LAB_00140e64:
MOV dword ptr [RSP],EBP
MOV RDI,R15
MOV R9D,R14D
CALL 0x00122e30
MOV R13D,EAX
TEST EAX,EAX
JS 0x00140e86
MOV ESI,R13D
MOV RDI,RBX
CALL 0x00143644
JMP 0x00140ec3
LAB_00140e86:
NEG R13D
MOV RDI,RBX
MOV RSI,R13
CALL 0x00143644
MOV RSI,qword ptr [R12]
MOV EDX,dword ptr [R12 + 0x8]
MOV RCX,qword ptr [RBX]
MOV R8,qword ptr [RBX + 0x8]
SUB R8,RCX
SHR R8,0x2
LAB_00140eab:
MOVZX EAX,BPL
MOV dword ptr [RSP],EAX
MOVZX R9D,R14B
MOV RDI,R15
CALL 0x00122e30
CMP EAX,R13D
JNZ 0x00140ed5
LAB_00140ec3:
MOV RAX,RBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00140ed5:
LEA RDI,[0x19ccc1]
LEA RDX,[0x19a589]
LEA RCX,[0x19d341]
MOV ESI,0x6b8
XOR EAX,EAX
CALL 0x00122ce0
|
/* common_tokenize(llama_vocab const*, std::__cxx11::string const&, bool, bool) */
llama_vocab * common_tokenize(llama_vocab *param_1,string *param_2,bool param_3,bool param_4)
{
uint uVar1;
uint uVar2;
int7 in_register_00000009;
int7 in_register_00000011;
int8 *puVar3;
uint in_R8D;
allocator local_31;
puVar3 = (int8 *)CONCAT71(in_register_00000011,param_3);
std::vector<int,std::allocator<int>>::vector
((vector<int,std::allocator<int>> *)param_1,
(long)((int)CONCAT71(in_register_00000009,param_4) * 2 + *(int *)(puVar3 + 1)),
&local_31);
/* try { // try from 00140e64 to 00140e93 has its CatchHandler @ 00140ef8 */
uVar1 = llama_tokenize(param_2,*puVar3,*(int4 *)(puVar3 + 1),*(long *)param_1,
(ulong)(*(long *)(param_1 + 8) - *(long *)param_1) >> 2,
CONCAT71(in_register_00000009,param_4) & 0xffffffff,in_R8D);
if ((int)uVar1 < 0) {
std::vector<int,std::allocator<int>>::resize
((vector<int,std::allocator<int>> *)param_1,(ulong)-uVar1);
/* try { // try from 00140eab to 00140ef5 has its CatchHandler @ 00140ef6 */
uVar2 = llama_tokenize(param_2,*puVar3,*(int4 *)(puVar3 + 1),*(long *)param_1,
(ulong)(*(long *)(param_1 + 8) - *(long *)param_1) >> 2,param_4,
in_R8D & 0xff);
if (uVar2 != -uVar1) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",0x6b8
,"GGML_ASSERT(%s) failed","check == -n_tokens");
}
}
else {
std::vector<int,std::allocator<int>>::resize
((vector<int,std::allocator<int>> *)param_1,(ulong)uVar1);
}
return param_1;
}
|
|
12,180 |
mysql_mbcharlen_gb18030
|
eloqsql/libmariadb/libmariadb/ma_charset.c
|
static unsigned int mysql_mbcharlen_gb18030(unsigned int c)
{
if (c <= 0xFF) {
return !is_gb18030_odd(c);
}
if (c > 0xFFFF || !is_gb18030_odd((c >> 8) & 0xFF)) {
return 0;
}
if (is_gb18030_even_2((c & 0xFF))) {
return 2;
}
if (is_gb18030_even_4((c & 0xFF))) {
return 4;
}
return 0;
}
|
O3
|
c
|
mysql_mbcharlen_gb18030:
pushq %rbp
movq %rsp, %rbp
cmpl $0xff, %edi
ja 0x33a77
cmpl $0x81, %edi
setb %al
cmpl $0xff, %edi
sete %cl
orb %al, %cl
movzbl %cl, %eax
jmp 0x33abb
leal -0x8100(%rdi), %ecx
xorl %eax, %eax
cmpl $0x7dff, %ecx # imm = 0x7DFF
ja 0x33abb
movzbl %dil, %ecx
leal -0x40(%rcx), %edx
movl $0x2, %eax
cmpl $0x3f, %edx
jb 0x33abb
cmpl $0x7f, %ecx
seta %dl
cmpl $0xff, %ecx
setne %sil
testb %sil, %dl
jne 0x33abb
addl $-0x30, %ecx
xorl %eax, %eax
cmpl $0xa, %ecx
setb %al
shll $0x2, %eax
popq %rbp
retq
|
mysql_mbcharlen_gb18030:
push rbp
mov rbp, rsp
cmp edi, 0FFh
ja short loc_33A77
cmp edi, 81h
setb al
cmp edi, 0FFh
setz cl
or cl, al
movzx eax, cl
jmp short loc_33ABB
loc_33A77:
lea ecx, [rdi-8100h]
xor eax, eax
cmp ecx, 7DFFh
ja short loc_33ABB
movzx ecx, dil
lea edx, [rcx-40h]
mov eax, 2
cmp edx, 3Fh ; '?'
jb short loc_33ABB
cmp ecx, 7Fh
setnbe dl
cmp ecx, 0FFh
setnz sil
test dl, sil
jnz short loc_33ABB
add ecx, 0FFFFFFD0h
xor eax, eax
cmp ecx, 0Ah
setb al
shl eax, 2
loc_33ABB:
pop rbp
retn
|
long long mysql_mbcharlen_gb18030(unsigned int a1)
{
long long result; // rax
if ( a1 <= 0xFF )
return (a1 < 0x81) | (unsigned __int8)(a1 == 255);
result = 0LL;
if ( a1 - 33024 <= 0x7DFF )
{
result = 2LL;
if ( (unsigned int)(unsigned __int8)a1 - 64 >= 0x3F && ((unsigned __int8)a1 == 255 || (unsigned __int8)a1 <= 0x7Fu) )
return 4 * (unsigned int)((unsigned int)(unsigned __int8)a1 - 48 < 0xA);
}
return result;
}
|
mysql_mbcharlen_gb18030:
PUSH RBP
MOV RBP,RSP
CMP EDI,0xff
JA 0x00133a77
CMP EDI,0x81
SETC AL
CMP EDI,0xff
SETZ CL
OR CL,AL
MOVZX EAX,CL
JMP 0x00133abb
LAB_00133a77:
LEA ECX,[RDI + -0x8100]
XOR EAX,EAX
CMP ECX,0x7dff
JA 0x00133abb
MOVZX ECX,DIL
LEA EDX,[RCX + -0x40]
MOV EAX,0x2
CMP EDX,0x3f
JC 0x00133abb
CMP ECX,0x7f
SETA DL
CMP ECX,0xff
SETNZ SIL
TEST DL,SIL
JNZ 0x00133abb
ADD ECX,-0x30
XOR EAX,EAX
CMP ECX,0xa
SETC AL
SHL EAX,0x2
LAB_00133abb:
POP RBP
RET
|
ulong mysql_mbcharlen_gb18030(uint param_1)
{
ulong uVar1;
if (param_1 < 0x100) {
uVar1 = (ulong)(param_1 == 0xff || param_1 < 0x81);
}
else {
uVar1 = 0;
if (param_1 - 0x8100 < 0x7e00) {
param_1 = param_1 & 0xff;
uVar1 = 2;
if ((0x3e < param_1 - 0x40) && (param_1 < 0x80 || param_1 == 0xff)) {
uVar1 = (ulong)(param_1 - 0x30 < 10) << 2;
}
}
}
return uVar1;
}
|
|
12,181 |
my_strntod_mb2_or_mb4
|
eloqsql/strings/ctype-ucs2.c
|
static double
my_strntod_mb2_or_mb4(CHARSET_INFO *cs,
char *nptr, size_t length,
char **endptr, int *err)
{
char buf[256];
double res;
register char *b= buf;
register const uchar *s= (const uchar*) nptr;
const uchar *end;
my_wc_t wc;
my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc;
int cnv;
*err= 0;
/* Cut too long strings */
if (length >= sizeof(buf))
length= sizeof(buf) - 1;
end= s + length;
while ((cnv= mb_wc(cs, &wc, s, end)) > 0)
{
s+= cnv;
if (wc > (int) (uchar) 'e' || !wc)
break; /* Can't be part of double */
*b++= (char) wc;
}
*endptr= b;
res= my_strtod(buf, endptr, err);
*endptr= nptr + cs->mbminlen * (size_t) (*endptr - buf);
return res;
}
|
O0
|
c
|
my_strntod_mb2_or_mb4:
pushq %rbp
movq %rsp, %rbp
subq $0x180, %rsp # imm = 0x180
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x118(%rbp)
movq %rsi, -0x120(%rbp)
movq %rdx, -0x128(%rbp)
movq %rcx, -0x130(%rbp)
movq %r8, -0x138(%rbp)
leaq -0x110(%rbp), %rax
movq %rax, -0x148(%rbp)
movq -0x120(%rbp), %rax
movq %rax, -0x150(%rbp)
movq -0x118(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x168(%rbp)
movq -0x138(%rbp), %rax
movl $0x0, (%rax)
cmpq $0x100, -0x128(%rbp) # imm = 0x100
jb 0x5a685
movq $0xff, -0x128(%rbp)
movq -0x150(%rbp), %rax
addq -0x128(%rbp), %rax
movq %rax, -0x158(%rbp)
movq -0x168(%rbp), %rax
movq -0x118(%rbp), %rdi
movq -0x150(%rbp), %rdx
movq -0x158(%rbp), %rcx
leaq -0x160(%rbp), %rsi
callq *%rax
movl %eax, -0x16c(%rbp)
cmpl $0x0, %eax
jle 0x5a71f
movl -0x16c(%rbp), %ecx
movq -0x150(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x150(%rbp)
cmpq $0x65, -0x160(%rbp)
ja 0x5a6f8
cmpq $0x0, -0x160(%rbp)
jne 0x5a6fa
jmp 0x5a71f
movq -0x160(%rbp), %rax
movb %al, %cl
movq -0x148(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x148(%rbp)
movb %cl, (%rax)
jmp 0x5a69a
movq -0x148(%rbp), %rcx
movq -0x130(%rbp), %rax
movq %rcx, (%rax)
movq -0x130(%rbp), %rsi
movq -0x138(%rbp), %rdx
leaq -0x110(%rbp), %rdi
movq %rdi, -0x180(%rbp)
callq 0x70be0
movq -0x180(%rbp), %rdi
movsd %xmm0, -0x140(%rbp)
movq -0x120(%rbp), %rcx
movq -0x118(%rbp), %rax
movl 0x98(%rax), %eax
movl %eax, %edx
movq -0x130(%rbp), %rax
movq (%rax), %rsi
subq %rdi, %rsi
imulq %rsi, %rdx
addq %rdx, %rcx
movq %rcx, (%rax)
movsd -0x140(%rbp), %xmm0
movsd %xmm0, -0x178(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x5a7c0
movsd -0x178(%rbp), %xmm0
addq $0x180, %rsp # imm = 0x180
popq %rbp
retq
callq 0x24320
nopw %cs:(%rax,%rax)
|
my_strntod_mb2_or_mb4:
push rbp
mov rbp, rsp
sub rsp, 180h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_118], rdi
mov [rbp+var_120], rsi
mov [rbp+var_128], rdx
mov [rbp+var_130], rcx
mov [rbp+var_138], r8
lea rax, [rbp+var_110]
mov [rbp+var_148], rax
mov rax, [rbp+var_120]
mov [rbp+var_150], rax
mov rax, [rbp+var_118]
mov rax, [rax+0B8h]
mov rax, [rax+28h]
mov [rbp+var_168], rax
mov rax, [rbp+var_138]
mov dword ptr [rax], 0
cmp [rbp+var_128], 100h
jb short loc_5A685
mov [rbp+var_128], 0FFh
loc_5A685:
mov rax, [rbp+var_150]
add rax, [rbp+var_128]
mov [rbp+var_158], rax
loc_5A69A:
mov rax, [rbp+var_168]
mov rdi, [rbp+var_118]
mov rdx, [rbp+var_150]
mov rcx, [rbp+var_158]
lea rsi, [rbp+var_160]
call rax
mov [rbp+var_16C], eax
cmp eax, 0
jle short loc_5A71F
mov ecx, [rbp+var_16C]
mov rax, [rbp+var_150]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_150], rax
cmp [rbp+var_160], 65h ; 'e'
ja short loc_5A6F8
cmp [rbp+var_160], 0
jnz short loc_5A6FA
loc_5A6F8:
jmp short loc_5A71F
loc_5A6FA:
mov rax, [rbp+var_160]
mov cl, al
mov rax, [rbp+var_148]
mov rdx, rax
add rdx, 1
mov [rbp+var_148], rdx
mov [rax], cl
jmp loc_5A69A
loc_5A71F:
mov rcx, [rbp+var_148]
mov rax, [rbp+var_130]
mov [rax], rcx
mov rsi, [rbp+var_130]
mov rdx, [rbp+var_138]
lea rdi, [rbp+var_110]
mov [rbp+var_180], rdi
call my_strtod
mov rdi, [rbp+var_180]
movsd [rbp+var_140], xmm0
mov rcx, [rbp+var_120]
mov rax, [rbp+var_118]
mov eax, [rax+98h]
mov edx, eax
mov rax, [rbp+var_130]
mov rsi, [rax]
sub rsi, rdi
imul rdx, rsi
add rcx, rdx
mov [rax], rcx
movsd xmm0, [rbp+var_140]
movsd [rbp+var_178], xmm0
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_5A7C0
movsd xmm0, [rbp+var_178]
add rsp, 180h
pop rbp
retn
loc_5A7C0:
call ___stack_chk_fail
|
double my_strntod_mb2_or_mb4(long long a1, long long a2, unsigned long long a3, _QWORD *a4, _DWORD *a5)
{
_BYTE *v5; // rax
int v7; // [rsp+14h] [rbp-16Ch]
long long ( *v8)(long long, unsigned long long *, long long, long long); // [rsp+18h] [rbp-168h]
unsigned long long v9; // [rsp+20h] [rbp-160h] BYREF
long long v10; // [rsp+28h] [rbp-158h]
long long v11; // [rsp+30h] [rbp-150h]
_BYTE *v12; // [rsp+38h] [rbp-148h]
double v13; // [rsp+40h] [rbp-140h]
_DWORD *v14; // [rsp+48h] [rbp-138h]
_QWORD *v15; // [rsp+50h] [rbp-130h]
unsigned long long v16; // [rsp+58h] [rbp-128h]
long long v17; // [rsp+60h] [rbp-120h]
long long v18; // [rsp+68h] [rbp-118h]
_BYTE v19[264]; // [rsp+70h] [rbp-110h] BYREF
unsigned long long v20; // [rsp+178h] [rbp-8h]
v20 = __readfsqword(0x28u);
v18 = a1;
v17 = a2;
v16 = a3;
v15 = a4;
v14 = a5;
v12 = v19;
v11 = a2;
v8 = *(long long ( **)(long long, unsigned long long *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL);
*a5 = 0;
if ( v16 >= 0x100 )
v16 = 255LL;
v10 = v16 + v11;
while ( 1 )
{
v7 = v8(v18, &v9, v11, v10);
if ( v7 <= 0 )
break;
v11 += v7;
if ( v9 > 0x65 || !v9 )
break;
v5 = v12++;
*v5 = v9;
}
*v15 = v12;
v13 = my_strtod(v19, v15, v14);
*v15 = (*v15 - (_QWORD)v19) * *(unsigned int *)(v18 + 152) + v17;
return v13;
}
|
my_strntod_mb2_or_mb4:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x180
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x118],RDI
MOV qword ptr [RBP + -0x120],RSI
MOV qword ptr [RBP + -0x128],RDX
MOV qword ptr [RBP + -0x130],RCX
MOV qword ptr [RBP + -0x138],R8
LEA RAX,[RBP + -0x110]
MOV qword ptr [RBP + -0x148],RAX
MOV RAX,qword ptr [RBP + -0x120]
MOV qword ptr [RBP + -0x150],RAX
MOV RAX,qword ptr [RBP + -0x118]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x168],RAX
MOV RAX,qword ptr [RBP + -0x138]
MOV dword ptr [RAX],0x0
CMP qword ptr [RBP + -0x128],0x100
JC 0x0015a685
MOV qword ptr [RBP + -0x128],0xff
LAB_0015a685:
MOV RAX,qword ptr [RBP + -0x150]
ADD RAX,qword ptr [RBP + -0x128]
MOV qword ptr [RBP + -0x158],RAX
LAB_0015a69a:
MOV RAX,qword ptr [RBP + -0x168]
MOV RDI,qword ptr [RBP + -0x118]
MOV RDX,qword ptr [RBP + -0x150]
MOV RCX,qword ptr [RBP + -0x158]
LEA RSI,[RBP + -0x160]
CALL RAX
MOV dword ptr [RBP + -0x16c],EAX
CMP EAX,0x0
JLE 0x0015a71f
MOV ECX,dword ptr [RBP + -0x16c]
MOV RAX,qword ptr [RBP + -0x150]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x150],RAX
CMP qword ptr [RBP + -0x160],0x65
JA 0x0015a6f8
CMP qword ptr [RBP + -0x160],0x0
JNZ 0x0015a6fa
LAB_0015a6f8:
JMP 0x0015a71f
LAB_0015a6fa:
MOV RAX,qword ptr [RBP + -0x160]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x148]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x148],RDX
MOV byte ptr [RAX],CL
JMP 0x0015a69a
LAB_0015a71f:
MOV RCX,qword ptr [RBP + -0x148]
MOV RAX,qword ptr [RBP + -0x130]
MOV qword ptr [RAX],RCX
MOV RSI,qword ptr [RBP + -0x130]
MOV RDX,qword ptr [RBP + -0x138]
LEA RDI,[RBP + -0x110]
MOV qword ptr [RBP + -0x180],RDI
CALL 0x00170be0
MOV RDI,qword ptr [RBP + -0x180]
MOVSD qword ptr [RBP + -0x140],XMM0
MOV RCX,qword ptr [RBP + -0x120]
MOV RAX,qword ptr [RBP + -0x118]
MOV EAX,dword ptr [RAX + 0x98]
MOV EDX,EAX
MOV RAX,qword ptr [RBP + -0x130]
MOV RSI,qword ptr [RAX]
SUB RSI,RDI
IMUL RDX,RSI
ADD RCX,RDX
MOV qword ptr [RAX],RCX
MOVSD XMM0,qword ptr [RBP + -0x140]
MOVSD qword ptr [RBP + -0x178],XMM0
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0015a7c0
MOVSD XMM0,qword ptr [RBP + -0x178]
ADD RSP,0x180
POP RBP
RET
LAB_0015a7c0:
CALL 0x00124320
|
int8
my_strntod_mb2_or_mb4(long param_1,long param_2,ulong param_3,long *param_4,int4 *param_5)
{
code *pcVar1;
int iVar2;
long in_FS_OFFSET;
ulong local_168;
long local_160;
long local_158;
int1 *local_150;
int8 local_148;
int4 *local_140;
long *local_138;
ulong local_130;
long local_128;
long local_120;
int1 local_118 [264];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28);
*param_5 = 0;
local_130 = param_3;
if (0xff < param_3) {
local_130 = 0xff;
}
local_160 = param_2 + local_130;
local_158 = param_2;
local_150 = local_118;
local_140 = param_5;
local_138 = param_4;
local_128 = param_2;
local_120 = param_1;
while (((iVar2 = (*pcVar1)(local_120,&local_168,local_158,local_160), 0 < iVar2 &&
(local_158 = local_158 + iVar2, local_168 < 0x66)) && (local_168 != 0))) {
*local_150 = (char)local_168;
local_150 = local_150 + 1;
}
*local_138 = (long)local_150;
local_148 = my_strtod(local_118,local_138,local_140);
*local_138 = local_128 + (ulong)*(uint *)(local_120 + 0x98) * (*local_138 - (long)local_118);
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_148;
}
|
|
12,182 |
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>>>>>::get()
|
hkr04[P]cpp-mcp/common/json.hpp
|
char_int_type get()
{
++position.chars_read_total;
++position.chars_read_current_line;
if (next_unget)
{
// just reset the next_unget variable and work with current
next_unget = false;
}
else
{
current = ia.get_character();
}
if (JSON_HEDLEY_LIKELY(current != char_traits<char_type>::eof()))
{
token_string.push_back(char_traits<char_type>::to_char_type(current));
}
if (current == '\n')
{
++position.lines_read;
position.chars_read_current_line = 0;
}
return current;
}
|
O2
|
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>>>>>::get():
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movdqu 0x20(%rdi), %xmm0
pcmpeqd %xmm1, %xmm1
psubq %xmm1, %xmm0
movdqu %xmm0, 0x20(%rdi)
cmpb $0x1, 0x18(%rdi)
jne 0x3c8d9
movb $0x0, 0x18(%rbx)
movl 0x14(%rbx), %eax
jmp 0x3c8ee
movq (%rbx), %rcx
cmpq 0x8(%rbx), %rcx
je 0x3c921
movzbl (%rcx), %eax
incq %rcx
movq %rcx, (%rbx)
movl %eax, 0x14(%rbx)
cmpl $-0x1, %eax
je 0x3c91d
leaq 0x38(%rbx), %rdi
leaq 0xf(%rsp), %rsi
movb %al, (%rsi)
callq 0x222aa
movl 0x14(%rbx), %eax
cmpl $0xa, %eax
jne 0x3c917
incq 0x30(%rbx)
andq $0x0, 0x28(%rbx)
pushq $0xa
popq %rax
addq $0x10, %rsp
popq %rbx
retq
pushq $-0x1
jmp 0x3c916
pushq $-0x1
popq %rax
jmp 0x3c8eb
|
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv:
push rbx
sub rsp, 10h
mov rbx, rdi
movdqu xmm0, xmmword ptr [rdi+20h]
pcmpeqd xmm1, xmm1
psubq xmm0, xmm1
movdqu xmmword ptr [rdi+20h], xmm0
cmp byte ptr [rdi+18h], 1
jnz short loc_3C8D9
mov byte ptr [rbx+18h], 0
mov eax, [rbx+14h]
jmp short loc_3C8EE
loc_3C8D9:
mov rcx, [rbx]
cmp rcx, [rbx+8]
jz short loc_3C921
movzx eax, byte ptr [rcx]
inc rcx
mov [rbx], rcx
loc_3C8EB:
mov [rbx+14h], eax
loc_3C8EE:
cmp eax, 0FFFFFFFFh
jz short loc_3C91D
lea rdi, [rbx+38h]
lea rsi, [rsp+18h+var_9]
mov [rsi], al
call _ZNSt6vectorIcSaIcEE12emplace_backIJcEEERcDpOT_; std::vector<char>::emplace_back<char>(char &&)
mov eax, [rbx+14h]
cmp eax, 0Ah
jnz short loc_3C917
inc qword ptr [rbx+30h]
and qword ptr [rbx+28h], 0
push 0Ah
loc_3C916:
pop rax
loc_3C917:
add rsp, 10h
pop rbx
retn
loc_3C91D:
push 0FFFFFFFFFFFFFFFFh
jmp short loc_3C916
loc_3C921:
push 0FFFFFFFFFFFFFFFFh
pop rax
jmp short loc_3C8EB
|
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>>>::get(
__m128i *a1)
{
int v1; // eax
unsigned __int8 *v2; // rcx
long long result; // rax
_BYTE v5[9]; // [rsp+Fh] [rbp-9h] BYREF
a1[2] = _mm_sub_epi64(_mm_loadu_si128(a1 + 2), (__m128i)-1LL);
if ( a1[1].m128i_i8[8] == 1 )
{
a1[1].m128i_i8[8] = 0;
v1 = a1[1].m128i_i32[1];
}
else
{
v2 = (unsigned __int8 *)a1->m128i_i64[0];
if ( a1->m128i_i64[0] == a1->m128i_i64[1] )
{
v1 = -1;
}
else
{
v1 = *v2;
a1->m128i_i64[0] = (long long)(v2 + 1);
}
a1[1].m128i_i32[1] = v1;
}
if ( v1 == -1 )
return -1LL;
v5[0] = v1;
std::vector<char>::emplace_back<char>((long long)&a1[3].m128i_i64[1], v5);
result = a1[1].m128i_u32[1];
if ( (_DWORD)result != 10 )
return result;
++a1[3].m128i_i64[0];
a1[2].m128i_i64[1] = 0LL;
return 10LL;
}
|
get:
PUSH RBX
SUB RSP,0x10
MOV RBX,RDI
MOVDQU XMM0,xmmword ptr [RDI + 0x20]
PCMPEQD XMM1,XMM1
PSUBQ XMM0,XMM1
MOVDQU xmmword ptr [RDI + 0x20],XMM0
CMP byte ptr [RDI + 0x18],0x1
JNZ 0x0013c8d9
MOV byte ptr [RBX + 0x18],0x0
MOV EAX,dword ptr [RBX + 0x14]
JMP 0x0013c8ee
LAB_0013c8d9:
MOV RCX,qword ptr [RBX]
CMP RCX,qword ptr [RBX + 0x8]
JZ 0x0013c921
MOVZX EAX,byte ptr [RCX]
INC RCX
MOV qword ptr [RBX],RCX
LAB_0013c8eb:
MOV dword ptr [RBX + 0x14],EAX
LAB_0013c8ee:
CMP EAX,-0x1
JZ 0x0013c91d
LEA RDI,[RBX + 0x38]
LEA RSI,[RSP + 0xf]
MOV byte ptr [RSI],AL
CALL 0x001222aa
MOV EAX,dword ptr [RBX + 0x14]
CMP EAX,0xa
JNZ 0x0013c917
INC qword ptr [RBX + 0x30]
AND qword ptr [RBX + 0x28],0x0
PUSH 0xa
LAB_0013c916:
POP RAX
LAB_0013c917:
ADD RSP,0x10
POP RBX
RET
LAB_0013c91d:
PUSH -0x1
JMP 0x0013c916
LAB_0013c921:
PUSH -0x1
POP RAX
JMP 0x0013c8eb
|
/* 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 > > >::get() */
ulong __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>>>
::get(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)
{
byte *pbVar1;
uint uVar2;
ulong uStack_20;
char local_9;
*(long *)(this + 0x20) = *(long *)(this + 0x20) + 1;
*(long *)(this + 0x28) = *(long *)(this + 0x28) + 1;
if (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) {
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>>>
)0x0;
uVar2 = *(uint *)(this + 0x14);
}
else {
pbVar1 = *(byte **)this;
if (pbVar1 == *(byte **)(this + 8)) {
uVar2 = 0xffffffff;
}
else {
uVar2 = (uint)*pbVar1;
*(byte **)this = pbVar1 + 1;
}
*(uint *)(this + 0x14) = uVar2;
}
if (uVar2 == 0xffffffff) {
uStack_20 = 0xffffffffffffffff;
}
else {
local_9 = (char)uVar2;
std::vector<char,std::allocator<char>>::emplace_back<char>
((vector<char,std::allocator<char>> *)(this + 0x38),&local_9);
uStack_20 = (ulong)*(uint *)(this + 0x14);
if (*(uint *)(this + 0x14) == 10) {
*(long *)(this + 0x30) = *(long *)(this + 0x30) + 1;
*(int8 *)(this + 0x28) = 0;
uStack_20 = 10;
}
}
return uStack_20;
}
|
|
12,183 |
lunasvg::SVGTextElement::boundingBox(bool) const
|
dmazzella[P]pylunasvg/lunasvg/source/svgtextelement.cpp
|
Rect SVGTextElement::boundingBox(bool includeStroke) const
{
auto boundingBox = Rect::Invalid;
for(const auto& fragment : m_fragments) {
const auto& font = fragment.element->font();
const auto& stroke = fragment.element->stroke();
auto fragmentTranform = Transform::rotated(fragment.angle, fragment.x, fragment.y) * fragment.lengthAdjustTransform;
auto fragmentRect = Rect(fragment.x, fragment.y - font.ascent(), fragment.width, fragment.element->font_size());
if(includeStroke && stroke.isRenderable())
fragmentRect.inflate(fragment.element->stroke_width() / 2.f);
boundingBox.unite(fragmentTranform.mapRect(fragmentRect));
}
if(!boundingBox.isValid())
boundingBox = Rect::Empty;
return boundingBox;
}
|
O1
|
cpp
|
lunasvg::SVGTextElement::boundingBox(bool) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %esi, 0x14(%rsp)
leaq 0x20b49(%rip), %rax # 0x4318c
movups (%rax), %xmm0
movaps %xmm0, (%rsp)
movq 0x1c8(%rdi), %r15
movq 0x1d0(%rdi), %rax
movq %rax, 0x38(%rsp)
cmpq %rax, %r15
je 0x227aa
leaq 0x20(%rsp), %r13
leaq 0x50(%rsp), %rbx
movq %r15, %rbp
movq (%r15), %r14
leaq 0x188(%r14), %r12
movss 0x38(%r15), %xmm0
movss 0x30(%r15), %xmm1
movss 0x34(%r15), %xmm2
movq %r13, %rdi
callq 0xca84
addq $0x8, %r15
movq %r13, %rsi
movq %rbx, %r13
movq %rbx, %rdi
movq %r15, %rdx
callq 0xc91a
movss 0x30(%rbp), %xmm0
movss %xmm0, 0x1c(%rsp)
movss 0x34(%rbp), %xmm0
movss %xmm0, 0x18(%rsp)
movq %r12, %rdi
callq 0xd76c
movss 0x1c(%rsp), %xmm4
movss 0x18(%rsp), %xmm3
subss %xmm0, %xmm3
movss 0x3c(%rbp), %xmm1
movq (%rbp), %rax
movss 0x3c(%rax), %xmm0
movss %xmm4, 0x20(%rsp)
movss %xmm3, 0x24(%rsp)
movss %xmm1, 0x28(%rsp)
movss %xmm0, 0x2c(%rsp)
cmpb $0x0, 0x14(%rsp)
je 0x2276c
movss 0x1b4(%r14), %xmm2
ucomiss 0x20e15(%rip), %xmm2 # 0x4352c
jbe 0x2276c
cmpq $0x0, 0x1a8(%r14)
jne 0x22730
cmpl $0x1000000, 0x1b0(%r14) # imm = 0x1000000
jb 0x2276c
movss 0x1b8(%rax), %xmm2
mulss 0x2110c(%rip), %xmm2 # 0x4384c
subss %xmm2, %xmm4
movss %xmm4, 0x20(%rsp)
subss %xmm2, %xmm3
movss %xmm3, 0x24(%rsp)
addss %xmm2, %xmm2
addss %xmm2, %xmm1
movss %xmm1, 0x28(%rsp)
addss %xmm0, %xmm2
movss %xmm2, 0x2c(%rsp)
movq %r13, %rbx
movq %r13, %rdi
leaq 0x20(%rsp), %r13
movq %r13, %rsi
callq 0xcd9e
movlhps %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0]
movups %xmm0, 0x40(%rsp)
movq %rsp, %rdi
leaq 0x40(%rsp), %rsi
callq 0x13194
movlhps %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0]
movaps %xmm0, (%rsp)
addq $0x40, %r15
cmpq 0x38(%rsp), %r15
jne 0x22670
movss 0x8(%rsp), %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm0, %xmm1
jb 0x227c3
movss 0xc(%rsp), %xmm1
ucomiss %xmm0, %xmm1
jae 0x227d1
leaq 0x209b2(%rip), %rax # 0x4317c
movups (%rax), %xmm0
movaps %xmm0, (%rsp)
movsd (%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
|
_ZNK7lunasvg14SVGTextElement11boundingBoxEb:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov [rsp+98h+var_84], esi
lea rax, _ZN7lunasvg4Rect7InvalidE; lunasvg::Rect::Invalid
movups xmm0, xmmword ptr [rax]
movaps [rsp+98h+var_98], xmm0
mov r15, [rdi+1C8h]
mov rax, [rdi+1D0h]
mov [rsp+98h+var_60], rax
cmp r15, rax
jz loc_227AA
lea r13, [rsp+98h+var_78]
lea rbx, [rsp+98h+var_48]
loc_22670:
mov rbp, r15
mov r14, [r15]
lea r12, [r14+188h]
movss xmm0, dword ptr [r15+38h]; float
movss xmm1, dword ptr [r15+30h]; float
movss xmm2, dword ptr [r15+34h]; float
mov rdi, r13; this
call _ZN7lunasvg9Transform7rotatedEfff; lunasvg::Transform::rotated(float,float,float)
add r15, 8
mov rsi, r13
mov r13, rbx
mov rdi, rbx
mov rdx, r15
call _ZNK7lunasvg9TransformmlERKS0_; lunasvg::Transform::operator*(lunasvg::Transform const&)
movss xmm0, dword ptr [rbp+30h]
movss [rsp+98h+var_7C], xmm0
movss xmm0, dword ptr [rbp+34h]
movss [rsp+98h+var_80], xmm0
mov rdi, r12; this
call _ZNK7lunasvg4Font6ascentEv; lunasvg::Font::ascent(void)
movss xmm4, [rsp+98h+var_7C]
movss xmm3, [rsp+98h+var_80]
subss xmm3, xmm0
movss xmm1, dword ptr [rbp+3Ch]
mov rax, [rbp+0]
movss xmm0, dword ptr [rax+3Ch]
movss [rsp+98h+var_78], xmm4
movss [rsp+98h+var_74], xmm3
movss [rsp+98h+var_70], xmm1
movss [rsp+98h+var_6C], xmm0
cmp byte ptr [rsp+98h+var_84], 0
jz short loc_2276C
movss xmm2, dword ptr [r14+1B4h]
ucomiss xmm2, cs:dword_4352C
jbe short loc_2276C
cmp qword ptr [r14+1A8h], 0
jnz short loc_22730
cmp dword ptr [r14+1B0h], 1000000h
jb short loc_2276C
loc_22730:
movss xmm2, dword ptr [rax+1B8h]
mulss xmm2, cs:dword_4384C
subss xmm4, xmm2
movss [rsp+98h+var_78], xmm4
subss xmm3, xmm2
movss [rsp+98h+var_74], xmm3
addss xmm2, xmm2
addss xmm1, xmm2
movss [rsp+98h+var_70], xmm1
addss xmm2, xmm0
movss [rsp+98h+var_6C], xmm2
loc_2276C:
mov rbx, r13
mov rdi, r13; this
lea r13, [rsp+98h+var_78]
mov rsi, r13; lunasvg::Rect *
call _ZNK7lunasvg9Transform7mapRectERKNS_4RectE; lunasvg::Transform::mapRect(lunasvg::Rect const&)
movlhps xmm0, xmm1
movups [rsp+98h+var_58], xmm0
mov rdi, rsp; this
lea rsi, [rsp+98h+var_58]; lunasvg::Rect *
call _ZNK7lunasvg4Rect6unitedERKS0_; lunasvg::Rect::united(lunasvg::Rect const&)
movlhps xmm0, xmm1
movaps [rsp+98h+var_98], xmm0
add r15, 40h ; '@'
cmp r15, [rsp+98h+var_60]
jnz loc_22670
loc_227AA:
movss xmm1, dword ptr [rsp+98h+var_98+8]
xorps xmm0, xmm0
ucomiss xmm1, xmm0
jb short loc_227C3
movss xmm1, dword ptr [rsp+98h+var_98+0Ch]
ucomiss xmm1, xmm0
jnb short loc_227D1
loc_227C3:
lea rax, _ZN7lunasvg4Rect5EmptyE; lunasvg::Rect::Empty
movups xmm0, xmmword ptr [rax]
movaps [rsp+98h+var_98], xmm0
loc_227D1:
movsd xmm0, qword ptr [rsp+98h+var_98]
movsd xmm1, qword ptr [rsp+98h+var_98+8]
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
double lunasvg::SVGTextElement::boundingBox(lunasvg::SVGTextElement *this, int a2)
{
unsigned int *v2; // r15
unsigned int *v3; // rbp
long long v4; // r14
lunasvg::Font *v5; // r12
long long v6; // r15
float v7; // xmm0_4
float v8; // xmm3_4
__m128 v9; // xmm1
long long v10; // rax
float v11; // xmm0_4
float v12; // xmm2_4
float v13; // xmm2_4
__m128 v14; // xmm0
__m128 v16; // [rsp+0h] [rbp-98h] BYREF
int v17; // [rsp+14h] [rbp-84h]
float v18; // [rsp+18h] [rbp-80h]
float v19; // [rsp+1Ch] [rbp-7Ch]
float v20; // [rsp+20h] [rbp-78h] BYREF
float v21; // [rsp+24h] [rbp-74h]
__int32 v22; // [rsp+28h] [rbp-70h]
float v23; // [rsp+2Ch] [rbp-6Ch]
unsigned int *i; // [rsp+38h] [rbp-60h]
__m128 v25; // [rsp+40h] [rbp-58h] BYREF
_BYTE v26[72]; // [rsp+50h] [rbp-48h] BYREF
v17 = a2;
v16 = (__m128)lunasvg::Rect::Invalid;
v2 = (unsigned int *)*((_QWORD *)this + 57);
for ( i = (unsigned int *)*((_QWORD *)this + 58); v2 != i; v2 = (unsigned int *)(v6 + 64) )
{
v3 = v2;
v4 = *(_QWORD *)v2;
v5 = (lunasvg::Font *)(*(_QWORD *)v2 + 392LL);
lunasvg::Transform::rotated(
(lunasvg::Transform *)&v20,
COERCE_DOUBLE((unsigned long long)v2[14]),
(__m128)v2[12],
(__m128)v2[13]);
v6 = (long long)(v2 + 2);
lunasvg::Transform::operator*((long long)v26, (long long)&v20, v6);
v19 = *((float *)v3 + 12);
v18 = *((float *)v3 + 13);
v7 = v18;
lunasvg::Font::ascent(v5);
v8 = v18 - v7;
v9 = (__m128)v3[15];
v10 = *(_QWORD *)v3;
v11 = *(float *)(*(_QWORD *)v3 + 60LL);
v20 = v19;
v21 = v8;
v22 = v9.m128_i32[0];
v23 = v11;
if ( (_BYTE)v17 && *(float *)(v4 + 436) > 0.0 && (*(_QWORD *)(v4 + 424) || *(_DWORD *)(v4 + 432) >= 0x1000000u) )
{
v12 = *(float *)(v10 + 440) * 0.5;
v20 = v19 - v12;
v21 = v8 - v12;
v13 = v12 + v12;
v9.m128_f32[0] = v9.m128_f32[0] + v13;
v22 = v9.m128_i32[0];
v23 = v13 + v11;
}
v14 = _mm_movelh_ps((__m128)lunasvg::Transform::mapRect((lunasvg::Transform *)v26, (const lunasvg::Rect *)&v20), v9);
v25 = v14;
*(double *)v14.m128_u64 = lunasvg::Rect::united((lunasvg::Rect *)&v16, (const lunasvg::Rect *)&v25);
v16 = _mm_movelh_ps(v14, v9);
}
if ( v16.m128_f32[2] < 0.0 || v16.m128_f32[3] < 0.0 )
v16 = *(__m128 *)lunasvg::Rect::Empty;
return *(double *)v16.m128_u64;
}
|
boundingBox:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV dword ptr [RSP + 0x14],ESI
LEA RAX,[0x14318c]
MOVUPS XMM0,xmmword ptr [RAX]
MOVAPS xmmword ptr [RSP],XMM0
MOV R15,qword ptr [RDI + 0x1c8]
MOV RAX,qword ptr [RDI + 0x1d0]
MOV qword ptr [RSP + 0x38],RAX
CMP R15,RAX
JZ 0x001227aa
LEA R13,[RSP + 0x20]
LEA RBX,[RSP + 0x50]
LAB_00122670:
MOV RBP,R15
MOV R14,qword ptr [R15]
LEA R12,[R14 + 0x188]
MOVSS XMM0,dword ptr [R15 + 0x38]
MOVSS XMM1,dword ptr [R15 + 0x30]
MOVSS XMM2,dword ptr [R15 + 0x34]
MOV RDI,R13
CALL 0x0010ca84
ADD R15,0x8
MOV RSI,R13
MOV R13,RBX
MOV RDI,RBX
MOV RDX,R15
CALL 0x0010c91a
MOVSS XMM0,dword ptr [RBP + 0x30]
MOVSS dword ptr [RSP + 0x1c],XMM0
MOVSS XMM0,dword ptr [RBP + 0x34]
MOVSS dword ptr [RSP + 0x18],XMM0
MOV RDI,R12
CALL 0x0010d76c
MOVSS XMM4,dword ptr [RSP + 0x1c]
MOVSS XMM3,dword ptr [RSP + 0x18]
SUBSS XMM3,XMM0
MOVSS XMM1,dword ptr [RBP + 0x3c]
MOV RAX,qword ptr [RBP]
MOVSS XMM0,dword ptr [RAX + 0x3c]
MOVSS dword ptr [RSP + 0x20],XMM4
MOVSS dword ptr [RSP + 0x24],XMM3
MOVSS dword ptr [RSP + 0x28],XMM1
MOVSS dword ptr [RSP + 0x2c],XMM0
CMP byte ptr [RSP + 0x14],0x0
JZ 0x0012276c
MOVSS XMM2,dword ptr [R14 + 0x1b4]
UCOMISS XMM2,dword ptr [0x0014352c]
JBE 0x0012276c
CMP qword ptr [R14 + 0x1a8],0x0
JNZ 0x00122730
CMP dword ptr [R14 + 0x1b0],0x1000000
JC 0x0012276c
LAB_00122730:
MOVSS XMM2,dword ptr [RAX + 0x1b8]
MULSS XMM2,dword ptr [0x0014384c]
SUBSS XMM4,XMM2
MOVSS dword ptr [RSP + 0x20],XMM4
SUBSS XMM3,XMM2
MOVSS dword ptr [RSP + 0x24],XMM3
ADDSS XMM2,XMM2
ADDSS XMM1,XMM2
MOVSS dword ptr [RSP + 0x28],XMM1
ADDSS XMM2,XMM0
MOVSS dword ptr [RSP + 0x2c],XMM2
LAB_0012276c:
MOV RBX,R13
MOV RDI,R13
LEA R13,[RSP + 0x20]
MOV RSI,R13
CALL 0x0010cd9e
MOVLHPS XMM0,XMM1
MOVUPS xmmword ptr [RSP + 0x40],XMM0
MOV RDI,RSP
LEA RSI,[RSP + 0x40]
CALL 0x00113194
MOVLHPS XMM0,XMM1
MOVAPS xmmword ptr [RSP],XMM0
ADD R15,0x40
CMP R15,qword ptr [RSP + 0x38]
JNZ 0x00122670
LAB_001227aa:
MOVSS XMM1,dword ptr [RSP + 0x8]
XORPS XMM0,XMM0
UCOMISS XMM1,XMM0
JC 0x001227c3
MOVSS XMM1,dword ptr [RSP + 0xc]
UCOMISS XMM1,XMM0
JNC 0x001227d1
LAB_001227c3:
LEA RAX,[0x14317c]
MOVUPS XMM0,xmmword ptr [RAX]
MOVAPS xmmword ptr [RSP],XMM0
LAB_001227d1:
MOVSD XMM0,qword ptr [RSP]
MOVSD XMM1,qword ptr [RSP + 0x8]
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* lunasvg::SVGTextElement::boundingBox(bool) const */
int8 __thiscall lunasvg::SVGTextElement::boundingBox(SVGTextElement *this,bool param_1)
{
long lVar1;
int7 in_register_00000031;
long *plVar2;
int8 uVar3;
ulong uVar4;
float fVar5;
Rect local_98 [8];
int8 uStack_90;
int4 local_84;
float local_80;
float local_7c;
float local_78;
float local_74;
float local_70;
float local_6c;
long *local_60;
int8 local_58;
int4 uStack_50;
int4 uStack_4c;
Transform local_48 [24];
local_84 = (int4)CONCAT71(in_register_00000031,param_1);
local_98 = (Rect [8])Rect::Invalid._0_8_;
uStack_90 = Rect::Invalid._8_8_;
plVar2 = *(long **)(this + 0x1c8);
local_60 = *(long **)(this + 0x1d0);
if (plVar2 != local_60) {
do {
lVar1 = *plVar2;
Transform::rotated((Transform *)&local_78,*(float *)(plVar2 + 7),*(float *)(plVar2 + 6),
*(float *)((long)plVar2 + 0x34));
Transform::operator*(local_48,(Transform *)&local_78);
local_7c = *(float *)(plVar2 + 6);
local_80 = *(float *)((long)plVar2 + 0x34);
local_74 = (float)Font::ascent((Font *)(lVar1 + 0x188));
local_74 = local_80 - local_74;
local_70 = *(float *)((long)plVar2 + 0x3c);
uVar4 = (ulong)(uint)local_70;
local_6c = *(float *)(*plVar2 + 0x3c);
local_78 = local_7c;
if ((((char)local_84 != '\0') && (DAT_0014352c < *(float *)(lVar1 + 0x1b4))) &&
((*(long *)(lVar1 + 0x1a8) != 0 || (0xffffff < *(uint *)(lVar1 + 0x1b0))))) {
fVar5 = *(float *)(*plVar2 + 0x1b8) * DAT_0014384c;
local_78 = local_7c - fVar5;
local_74 = local_74 - fVar5;
local_70 = local_70 + fVar5 + fVar5;
uVar4 = (ulong)(uint)local_70;
local_6c = fVar5 + fVar5 + local_6c;
}
uVar3 = Transform::mapRect(local_48,(Rect *)&local_78);
uStack_50 = (int4)uVar4;
uStack_4c = (int4)(uVar4 >> 0x20);
local_58 = uVar3;
local_98 = (Rect [8])Rect::united(local_98,(Rect *)&local_58);
plVar2 = plVar2 + 9;
uStack_90 = uVar4;
} while (plVar2 != local_60);
}
if (((float)uStack_90 < 0.0) || (uStack_90._4_4_ < 0.0)) {
local_98[0] = (Rect)(int1)Rect::Empty;
local_98[1] = (Rect)Rect::Empty._1_1_;
local_98[2] = (Rect)Rect::Empty._2_1_;
local_98[3] = (Rect)Rect::Empty._3_1_;
local_98[4] = (Rect)Rect::Empty._4_1_;
local_98[5] = (Rect)Rect::Empty._5_1_;
local_98[6] = (Rect)Rect::Empty._6_1_;
local_98[7] = (Rect)Rect::Empty._7_1_;
}
uVar3._0_1_ = local_98[0];
uVar3._1_1_ = local_98[1];
uVar3._2_1_ = local_98[2];
uVar3._3_1_ = local_98[3];
uVar3._4_1_ = local_98[4];
uVar3._5_1_ = local_98[5];
uVar3._6_1_ = local_98[6];
uVar3._7_1_ = local_98[7];
return uVar3;
}
|
|
12,184 |
my_strntol_mb2_or_mb4
|
eloqsql/strings/ctype-ucs2.c
|
static long
my_strntol_mb2_or_mb4(CHARSET_INFO *cs,
const char *nptr, size_t l, int base,
char **endptr, int *err)
{
int negative= 0;
int overflow;
int cnv;
my_wc_t wc;
my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc;
register unsigned int cutlim;
register uint32 cutoff;
register uint32 res;
register const uchar *s= (const uchar*) nptr;
register const uchar *e= (const uchar*) nptr+l;
const uchar *save;
*err= 0;
do
{
if ((cnv= mb_wc(cs, &wc, s, e)) > 0)
{
switch (wc)
{
case ' ' : break;
case '\t': break;
case '-' : negative= !negative; break;
case '+' : break;
default : goto bs;
}
}
else /* No more characters or bad multibyte sequence */
{
if (endptr != NULL )
*endptr= (char*) s;
err[0]= (cnv==MY_CS_ILSEQ) ? EILSEQ : EDOM;
return 0;
}
s+= cnv;
} while (1);
bs:
overflow= 0;
res= 0;
save= s;
cutoff= ((uint32)~0L) / (uint32) base;
cutlim= (uint) (((uint32)~0L) % (uint32) base);
do {
if ((cnv= mb_wc(cs, &wc, s, e)) > 0)
{
s+= cnv;
if (wc >= '0' && wc <= '9')
wc-= '0';
else if (wc >= 'A' && wc <= 'Z')
wc= wc - 'A' + 10;
else if (wc >= 'a' && wc <= 'z')
wc= wc - 'a' + 10;
else
break;
if ((int)wc >= base)
break;
if (res > cutoff || (res == cutoff && wc > cutlim))
overflow= 1;
else
{
res*= (uint32) base;
res+= wc;
}
}
else if (cnv == MY_CS_ILSEQ)
{
if (endptr !=NULL )
*endptr = (char*) s;
err[0]= EILSEQ;
return 0;
}
else
{
/* No more characters */
break;
}
} while(1);
if (endptr != NULL)
*endptr = (char *) s;
if (s == save)
{
err[0]= EDOM;
return 0L;
}
if (negative)
{
if (res > (uint32) INT_MIN32)
overflow= 1;
}
else if (res > INT_MAX32)
overflow= 1;
if (overflow)
{
err[0]= ERANGE;
return negative ? INT_MIN32 : INT_MAX32;
}
return (negative ? -((long) res) : (long) res);
}
|
O3
|
c
|
my_strntol_mb2_or_mb4:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, -0x40(%rbp)
movl %ecx, -0x34(%rbp)
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %r14
movq 0xb8(%rdi), %rax
movq 0x28(%rax), %r12
addq %rsi, %r13
movq %r9, -0x50(%rbp)
movl $0x0, (%r9)
leaq -0x30(%rbp), %rsi
movq %r15, %rdx
movq %r13, %rcx
callq *%r12
testl %eax, %eax
jle 0xc326a
movl $0x0, -0x38(%rbp)
leaq -0x30(%rbp), %rbx
movq -0x30(%rbp), %rcx
cmpq $0x2a, %rcx
jg 0xc323a
cmpq $0x9, %rcx
je 0xc3252
cmpq $0x20, %rcx
je 0xc3252
jmp 0xc329c
cmpq $0x2b, %rcx
je 0xc3252
cmpq $0x2d, %rcx
jne 0xc329c
xorl %ecx, %ecx
cmpl $0x0, -0x38(%rbp)
sete %cl
movl %ecx, -0x38(%rbp)
movl %eax, %eax
addq %rax, %r15
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %r13, %rcx
callq *%r12
testl %eax, %eax
jg 0xc3222
movq -0x40(%rbp), %rcx
testq %rcx, %rcx
je 0xc3276
movq %r15, (%rcx)
testl %eax, %eax
movl $0x54, %eax
movl $0x21, %ecx
cmovel %eax, %ecx
movq -0x50(%rbp), %rax
movl %ecx, (%rax)
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
xorl %edx, %edx
divl -0x34(%rbp)
movl %edx, %ebx
movl %eax, -0x44(%rbp)
leaq -0x30(%rbp), %rsi
movq %r14, %rdi
movq %r15, %rdx
movq %r13, %rcx
callq *%r12
testl %eax, %eax
jle 0xc3362
movl %ebx, %ecx
movq %rcx, -0x60(%rbp)
xorl %ecx, %ecx
movq %r15, %rbx
xorl %r8d, %r8d
movq %rbx, %rsi
movl %eax, %ebx
addq %rsi, %rbx
movq -0x30(%rbp), %rsi
leaq -0x30(%rsi), %rax
cmpq $0x9, %rax
ja 0xc32ed
movq %rax, -0x30(%rbp)
jmp 0xc3312
leaq -0x41(%rsi), %rax
cmpq $0x19, %rax
ja 0xc32fd
addq $-0x37, %rsi
jmp 0xc330b
leaq -0x61(%rsi), %rax
cmpq $0x19, %rax
ja 0xc3372
addq $-0x57, %rsi
movq %rsi, -0x30(%rbp)
movq %rsi, %rax
cmpl -0x34(%rbp), %eax
jge 0xc3372
movl $0x1, %esi
cmpl -0x44(%rbp), %ecx
ja 0xc3335
jne 0xc332c
movl -0x44(%rbp), %edi
cmpq -0x60(%rbp), %rax
ja 0xc3337
imull -0x34(%rbp), %ecx
addl %eax, %ecx
movl %r8d, %esi
movl %ecx, %edi
movl %edi, -0x54(%rbp)
movl %esi, -0x58(%rbp)
movq %r14, %rdi
leaq -0x30(%rbp), %rsi
movq %rbx, %rdx
movq %r13, %rcx
callq *%r12
movl -0x54(%rbp), %edi
movl -0x58(%rbp), %esi
movl %edi, %ecx
movl %esi, %r8d
testl %eax, %eax
jg 0xc32d1
jmp 0xc3369
xorl %edi, %edi
movq %r15, %rbx
xorl %esi, %esi
testl %eax, %eax
je 0xc33d1
movl %esi, %r8d
movl %edi, %ecx
movq -0x40(%rbp), %rax
testq %rax, %rax
je 0xc337e
movq %rbx, (%rax)
cmpq %r15, %rbx
je 0xc33c2
cmpl $0x80000001, %ecx # imm = 0x80000001
movl $0x1, %eax
movl %r8d, %esi
cmovael %eax, %esi
testl %ecx, %ecx
cmovsl %eax, %r8d
movl -0x38(%rbp), %edi
testl %edi, %edi
cmovnel %esi, %r8d
testl %r8d, %r8d
je 0xc33ec
testl %edi, %edi
movq -0x50(%rbp), %rax
movl $0x22, (%rax)
movl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
movq $-0x80000000, %rax # imm = 0x80000000
jmp 0xc33f6
movq -0x50(%rbp), %rax
movl $0x21, (%rax)
jmp 0xc328b
movq -0x40(%rbp), %rax
testq %rax, %rax
je 0xc33dd
movq %rbx, (%rax)
movq -0x50(%rbp), %rax
movl $0x54, (%rax)
jmp 0xc328b
movl %ecx, %ecx
movq %rcx, %rax
negq %rax
testl %edi, %edi
cmoveq %rcx, %rax
jmp 0xc328d
|
my_strntol_mb2_or_mb4:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov [rbp+var_40], r8
mov [rbp+var_34], ecx
mov r13, rdx
mov r15, rsi
mov r14, rdi
mov rax, [rdi+0B8h]
mov r12, [rax+28h]
add r13, rsi
mov [rbp+var_50], r9
mov dword ptr [r9], 0
lea rsi, [rbp+var_30]
mov rdx, r15
mov rcx, r13
call r12
test eax, eax
jle short loc_C326A
mov [rbp+var_38], 0
lea rbx, [rbp+var_30]
loc_C3222:
mov rcx, [rbp+var_30]
cmp rcx, 2Ah ; '*'
jg short loc_C323A
cmp rcx, 9
jz short loc_C3252
cmp rcx, 20h ; ' '
jz short loc_C3252
jmp short loc_C329C
loc_C323A:
cmp rcx, 2Bh ; '+'
jz short loc_C3252
cmp rcx, 2Dh ; '-'
jnz short loc_C329C
xor ecx, ecx
cmp [rbp+var_38], 0
setz cl
mov [rbp+var_38], ecx
loc_C3252:
mov eax, eax
add r15, rax
mov rdi, r14
mov rsi, rbx
mov rdx, r15
mov rcx, r13
call r12
test eax, eax
jg short loc_C3222
loc_C326A:
mov rcx, [rbp+var_40]
test rcx, rcx
jz short loc_C3276
mov [rcx], r15
loc_C3276:
test eax, eax
mov eax, 54h ; 'T'
mov ecx, 21h ; '!'
cmovz ecx, eax
mov rax, [rbp+var_50]
mov [rax], ecx
loc_C328B:
xor eax, eax
loc_C328D:
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_C329C:
mov eax, 0FFFFFFFFh
xor edx, edx
div [rbp+var_34]
mov ebx, edx
mov [rbp+var_44], eax
lea rsi, [rbp+var_30]
mov rdi, r14
mov rdx, r15
mov rcx, r13
call r12
test eax, eax
jle loc_C3362
mov ecx, ebx
mov [rbp+var_60], rcx
xor ecx, ecx
mov rbx, r15
xor r8d, r8d
loc_C32D1:
mov rsi, rbx
mov ebx, eax
add rbx, rsi
mov rsi, [rbp+var_30]
lea rax, [rsi-30h]
cmp rax, 9
ja short loc_C32ED
mov [rbp+var_30], rax
jmp short loc_C3312
loc_C32ED:
lea rax, [rsi-41h]
cmp rax, 19h
ja short loc_C32FD
add rsi, 0FFFFFFFFFFFFFFC9h
jmp short loc_C330B
loc_C32FD:
lea rax, [rsi-61h]
cmp rax, 19h
ja short loc_C3372
add rsi, 0FFFFFFFFFFFFFFA9h
loc_C330B:
mov [rbp+var_30], rsi
mov rax, rsi
loc_C3312:
cmp eax, [rbp+var_34]
jge short loc_C3372
mov esi, 1
cmp ecx, [rbp+var_44]
ja short loc_C3335
jnz short loc_C332C
mov edi, [rbp+var_44]
cmp rax, [rbp+var_60]
ja short loc_C3337
loc_C332C:
imul ecx, [rbp+var_34]
add ecx, eax
mov esi, r8d
loc_C3335:
mov edi, ecx
loc_C3337:
mov [rbp+var_54], edi
mov [rbp+var_58], esi
mov rdi, r14
lea rsi, [rbp+var_30]
mov rdx, rbx
mov rcx, r13
call r12
mov edi, [rbp+var_54]
mov esi, [rbp+var_58]
mov ecx, edi
mov r8d, esi
test eax, eax
jg loc_C32D1
jmp short loc_C3369
loc_C3362:
xor edi, edi
mov rbx, r15
xor esi, esi
loc_C3369:
test eax, eax
jz short loc_C33D1
mov r8d, esi
mov ecx, edi
loc_C3372:
mov rax, [rbp+var_40]
test rax, rax
jz short loc_C337E
mov [rax], rbx
loc_C337E:
cmp rbx, r15
jz short loc_C33C2
cmp ecx, 80000001h
mov eax, 1
mov esi, r8d
cmovnb esi, eax
test ecx, ecx
cmovs r8d, eax
mov edi, [rbp+var_38]
test edi, edi
cmovnz r8d, esi
test r8d, r8d
jz short loc_C33EC
test edi, edi
mov rax, [rbp+var_50]
mov dword ptr [rax], 22h ; '"'
mov ecx, 7FFFFFFFh
mov rax, 0FFFFFFFF80000000h
jmp short loc_C33F6
loc_C33C2:
mov rax, [rbp+var_50]
mov dword ptr [rax], 21h ; '!'
jmp loc_C328B
loc_C33D1:
mov rax, [rbp+var_40]
test rax, rax
jz short loc_C33DD
mov [rax], rbx
loc_C33DD:
mov rax, [rbp+var_50]
mov dword ptr [rax], 54h ; 'T'
jmp loc_C328B
loc_C33EC:
mov ecx, ecx
mov rax, rcx
neg rax
test edi, edi
loc_C33F6:
cmovz rax, rcx
jmp loc_C328D
|
long long my_strntol_mb2_or_mb4(long long a1, long long a2, long long a3, unsigned int a4, _QWORD *a5, int *a6)
{
long long v6; // r15
long long ( *v8)(long long, _QWORD *, long long, long long); // r12
long long v9; // r13
int v10; // eax
int v11; // ecx
long long result; // rax
int v13; // eax
long long v14; // rcx
long long v15; // rbx
long long v16; // r8
unsigned long long v17; // rax
long long v18; // rsi
unsigned int v19; // esi
unsigned int v20; // edi
int v21; // esi
bool v22; // zf
unsigned int v24; // [rsp+1Ch] [rbp-44h]
BOOL v26; // [rsp+28h] [rbp-38h]
_QWORD v28[6]; // [rsp+30h] [rbp-30h] BYREF
v6 = a2;
v8 = *(long long ( **)(long long, _QWORD *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL);
v9 = a2 + a3;
*a6 = 0;
v10 = v8(a1, v28, a2, a2 + a3);
if ( v10 <= 0 )
{
LABEL_11:
if ( a5 )
*a5 = v6;
v11 = 33;
if ( !v10 )
v11 = 84;
*a6 = v11;
return 0LL;
}
v26 = 0;
while ( 1 )
{
if ( v28[0] > 42LL )
{
if ( v28[0] != 43LL )
{
if ( v28[0] != 45LL )
break;
v26 = !v26;
}
goto LABEL_10;
}
if ( v28[0] != 9LL && v28[0] != 32LL )
break;
LABEL_10:
v6 += (unsigned int)v10;
v10 = v8(a1, v28, v6, v9);
if ( v10 <= 0 )
goto LABEL_11;
}
v24 = 0xFFFFFFFF / a4;
v13 = v8(a1, v28, v6, v9);
if ( v13 > 0 )
{
LODWORD(v14) = 0;
v15 = v6;
v16 = 0LL;
while ( 1 )
{
v15 += (unsigned int)v13;
v17 = v28[0] - 48LL;
if ( (unsigned long long)(v28[0] - 48LL) > 9 )
{
if ( (unsigned long long)(v28[0] - 65LL) > 0x19 )
{
if ( (unsigned long long)(v28[0] - 97LL) > 0x19 )
goto LABEL_37;
v18 = v28[0] - 87LL;
}
else
{
v18 = v28[0] - 55LL;
}
v28[0] = v18;
v17 = v18;
}
else
{
v28[0] -= 48LL;
}
if ( (int)v17 >= (int)a4 )
goto LABEL_37;
v19 = 1;
if ( (unsigned int)v14 <= v24 )
{
if ( (_DWORD)v14 == v24 )
{
v20 = 0xFFFFFFFF / a4;
if ( v17 > 0xFFFFFFFF % a4 )
goto LABEL_32;
}
LODWORD(v14) = v17 + a4 * v14;
v19 = v16;
}
v20 = v14;
LABEL_32:
v13 = ((long long ( *)(long long, _QWORD *, long long, long long, long long))v8)(a1, v28, v15, v9, v16);
LODWORD(v14) = v20;
v16 = v19;
if ( v13 <= 0 )
goto LABEL_35;
}
}
v20 = 0;
v15 = v6;
v19 = 0;
LABEL_35:
if ( !v13 )
{
if ( a5 )
*a5 = v15;
*a6 = 84;
return 0LL;
}
LODWORD(v16) = v19;
LODWORD(v14) = v20;
LABEL_37:
if ( a5 )
*a5 = v15;
if ( v15 == v6 )
{
*a6 = 33;
return 0LL;
}
v21 = v16;
if ( (unsigned int)v14 >= 0x80000001 )
v21 = 1;
if ( (int)v14 < 0 )
LODWORD(v16) = 1;
if ( v26 )
LODWORD(v16) = v21;
if ( (_DWORD)v16 )
{
v22 = !v26;
*a6 = 34;
v14 = 0x7FFFFFFFLL;
result = 0xFFFFFFFF80000000LL;
}
else
{
v14 = (unsigned int)v14;
result = -(long long)(unsigned int)v14;
v22 = !v26;
}
if ( v22 )
return v14;
return result;
}
|
my_strntol_mb2_or_mb4:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RBP + -0x40],R8
MOV dword ptr [RBP + -0x34],ECX
MOV R13,RDX
MOV R15,RSI
MOV R14,RDI
MOV RAX,qword ptr [RDI + 0xb8]
MOV R12,qword ptr [RAX + 0x28]
ADD R13,RSI
MOV qword ptr [RBP + -0x50],R9
MOV dword ptr [R9],0x0
LEA RSI,[RBP + -0x30]
MOV RDX,R15
MOV RCX,R13
CALL R12
TEST EAX,EAX
JLE 0x001c326a
MOV dword ptr [RBP + -0x38],0x0
LEA RBX,[RBP + -0x30]
LAB_001c3222:
MOV RCX,qword ptr [RBP + -0x30]
CMP RCX,0x2a
JG 0x001c323a
CMP RCX,0x9
JZ 0x001c3252
CMP RCX,0x20
JZ 0x001c3252
JMP 0x001c329c
LAB_001c323a:
CMP RCX,0x2b
JZ 0x001c3252
CMP RCX,0x2d
JNZ 0x001c329c
XOR ECX,ECX
CMP dword ptr [RBP + -0x38],0x0
SETZ CL
MOV dword ptr [RBP + -0x38],ECX
LAB_001c3252:
MOV EAX,EAX
ADD R15,RAX
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R15
MOV RCX,R13
CALL R12
TEST EAX,EAX
JG 0x001c3222
LAB_001c326a:
MOV RCX,qword ptr [RBP + -0x40]
TEST RCX,RCX
JZ 0x001c3276
MOV qword ptr [RCX],R15
LAB_001c3276:
TEST EAX,EAX
MOV EAX,0x54
MOV ECX,0x21
CMOVZ ECX,EAX
MOV RAX,qword ptr [RBP + -0x50]
MOV dword ptr [RAX],ECX
LAB_001c328b:
XOR EAX,EAX
LAB_001c328d:
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001c329c:
MOV EAX,0xffffffff
XOR EDX,EDX
DIV dword ptr [RBP + -0x34]
MOV EBX,EDX
MOV dword ptr [RBP + -0x44],EAX
LEA RSI,[RBP + -0x30]
MOV RDI,R14
MOV RDX,R15
MOV RCX,R13
CALL R12
TEST EAX,EAX
JLE 0x001c3362
MOV ECX,EBX
MOV qword ptr [RBP + -0x60],RCX
XOR ECX,ECX
MOV RBX,R15
XOR R8D,R8D
LAB_001c32d1:
MOV RSI,RBX
MOV EBX,EAX
ADD RBX,RSI
MOV RSI,qword ptr [RBP + -0x30]
LEA RAX,[RSI + -0x30]
CMP RAX,0x9
JA 0x001c32ed
MOV qword ptr [RBP + -0x30],RAX
JMP 0x001c3312
LAB_001c32ed:
LEA RAX,[RSI + -0x41]
CMP RAX,0x19
JA 0x001c32fd
ADD RSI,-0x37
JMP 0x001c330b
LAB_001c32fd:
LEA RAX,[RSI + -0x61]
CMP RAX,0x19
JA 0x001c3372
ADD RSI,-0x57
LAB_001c330b:
MOV qword ptr [RBP + -0x30],RSI
MOV RAX,RSI
LAB_001c3312:
CMP EAX,dword ptr [RBP + -0x34]
JGE 0x001c3372
MOV ESI,0x1
CMP ECX,dword ptr [RBP + -0x44]
JA 0x001c3335
JNZ 0x001c332c
MOV EDI,dword ptr [RBP + -0x44]
CMP RAX,qword ptr [RBP + -0x60]
JA 0x001c3337
LAB_001c332c:
IMUL ECX,dword ptr [RBP + -0x34]
ADD ECX,EAX
MOV ESI,R8D
LAB_001c3335:
MOV EDI,ECX
LAB_001c3337:
MOV dword ptr [RBP + -0x54],EDI
MOV dword ptr [RBP + -0x58],ESI
MOV RDI,R14
LEA RSI,[RBP + -0x30]
MOV RDX,RBX
MOV RCX,R13
CALL R12
MOV EDI,dword ptr [RBP + -0x54]
MOV ESI,dword ptr [RBP + -0x58]
MOV ECX,EDI
MOV R8D,ESI
TEST EAX,EAX
JG 0x001c32d1
JMP 0x001c3369
LAB_001c3362:
XOR EDI,EDI
MOV RBX,R15
XOR ESI,ESI
LAB_001c3369:
TEST EAX,EAX
JZ 0x001c33d1
MOV R8D,ESI
MOV ECX,EDI
LAB_001c3372:
MOV RAX,qword ptr [RBP + -0x40]
TEST RAX,RAX
JZ 0x001c337e
MOV qword ptr [RAX],RBX
LAB_001c337e:
CMP RBX,R15
JZ 0x001c33c2
CMP ECX,0x80000001
MOV EAX,0x1
MOV ESI,R8D
CMOVNC ESI,EAX
TEST ECX,ECX
CMOVS R8D,EAX
MOV EDI,dword ptr [RBP + -0x38]
TEST EDI,EDI
CMOVNZ R8D,ESI
TEST R8D,R8D
JZ 0x001c33ec
TEST EDI,EDI
MOV RAX,qword ptr [RBP + -0x50]
MOV dword ptr [RAX],0x22
MOV ECX,0x7fffffff
MOV RAX,-0x80000000
JMP 0x001c33f6
LAB_001c33c2:
MOV RAX,qword ptr [RBP + -0x50]
MOV dword ptr [RAX],0x21
JMP 0x001c328b
LAB_001c33d1:
MOV RAX,qword ptr [RBP + -0x40]
TEST RAX,RAX
JZ 0x001c33dd
MOV qword ptr [RAX],RBX
LAB_001c33dd:
MOV RAX,qword ptr [RBP + -0x50]
MOV dword ptr [RAX],0x54
JMP 0x001c328b
LAB_001c33ec:
MOV ECX,ECX
MOV RAX,RCX
NEG RAX
TEST EDI,EDI
LAB_001c33f6:
CMOVZ RAX,RCX
JMP 0x001c328d
|
ulong my_strntol_mb2_or_mb4
(long param_1,long param_2,long param_3,uint param_4,long *param_5,
int4 *param_6)
{
code *pcVar1;
bool bVar2;
bool bVar3;
bool bVar4;
uint uVar5;
uint uVar6;
ulong uVar7;
int4 uVar8;
uint uVar9;
ulong uVar10;
long lVar11;
ulong local_38;
pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28);
param_3 = param_3 + param_2;
*param_6 = 0;
uVar5 = (*pcVar1)(param_1,&local_38,param_2,param_3);
if (0 < (int)uVar5) {
bVar2 = false;
do {
if ((long)local_38 < 0x2b) {
if ((local_38 != 9) && (local_38 != 0x20)) {
LAB_001c329c:
uVar5 = (uint)(0xffffffff / (ulong)param_4);
uVar6 = (*pcVar1)(param_1,&local_38,param_2,param_3);
lVar11 = param_2;
if ((int)uVar6 < 1) {
uVar9 = 0;
bVar3 = false;
goto LAB_001c3369;
}
uVar9 = 0;
bVar3 = false;
goto LAB_001c32d1;
}
}
else if (local_38 != 0x2b) {
if (local_38 != 0x2d) goto LAB_001c329c;
bVar2 = !bVar2;
}
param_2 = param_2 + (ulong)uVar5;
uVar5 = (*pcVar1)(param_1,&local_38,param_2,param_3);
} while (0 < (int)uVar5);
}
if (param_5 != (long *)0x0) {
*param_5 = param_2;
}
uVar8 = 0x21;
if (uVar5 == 0) {
uVar8 = 0x54;
}
*param_6 = uVar8;
return 0;
while( true ) {
if ((int)param_4 <= (int)uVar7) goto LAB_001c3372;
uVar6 = uVar9;
bVar4 = true;
if ((uVar9 <= uVar5) &&
((uVar9 != uVar5 || (uVar6 = uVar5, bVar4 = true, uVar7 <= 0xffffffffU % (ulong)param_4)))) {
uVar6 = uVar9 * param_4 + (int)uVar7;
bVar4 = bVar3;
}
bVar3 = bVar4;
uVar9 = uVar6;
local_38 = uVar7;
uVar6 = (*pcVar1)(param_1,&local_38,lVar11,param_3);
if ((int)uVar6 < 1) break;
LAB_001c32d1:
lVar11 = (ulong)uVar6 + lVar11;
uVar7 = local_38 - 0x30;
if (9 < uVar7) {
if (local_38 - 0x41 < 0x1a) {
uVar7 = local_38 - 0x37;
}
else {
if (0x19 < local_38 - 0x61) goto LAB_001c3372;
uVar7 = local_38 - 0x57;
}
}
}
LAB_001c3369:
if (uVar6 == 0) {
if (param_5 != (long *)0x0) {
*param_5 = lVar11;
}
*param_6 = 0x54;
}
else {
LAB_001c3372:
if (param_5 != (long *)0x0) {
*param_5 = lVar11;
}
if (lVar11 != param_2) {
bVar4 = bVar3;
if (0x80000000 < uVar9) {
bVar4 = true;
}
if ((int)uVar9 < 0) {
bVar3 = true;
}
if (bVar2) {
bVar3 = bVar4;
}
if (bVar3) {
*param_6 = 0x22;
uVar10 = 0x7fffffff;
uVar7 = 0xffffffff80000000;
}
else {
uVar10 = (ulong)uVar9;
uVar7 = -uVar10;
}
if (!bVar2) {
return uVar10;
}
return uVar7;
}
*param_6 = 0x21;
}
return 0;
}
|
|
12,185 |
mysys_namespace::crc32c::crc32c_slow(unsigned int, char const*, unsigned long)
|
eloqsql/mysys/crc32/crc32c.cc
|
static uint32_t crc32c_slow(uint32_t crc, const char* buf, size_t size)
{
const uint8_t *p = reinterpret_cast<const uint8_t *>(buf);
const uint8_t *e = p + size;
uint64_t l = crc ^ 0xffffffffu;
// Point x at first 16-byte aligned byte in string. This might be
// just past the end of the string.
const uintptr_t pval = reinterpret_cast<uintptr_t>(p);
const uint8_t* x = reinterpret_cast<const uint8_t*>(ALIGN(pval, 4));
if (x <= e)
// Process bytes until finished or p is 16-byte aligned
while (p != x)
STEP1;
// Process bytes 16 at a time
while ((e-p) >= 16)
{
Slow_CRC32(&l, &p);
Slow_CRC32(&l, &p);
}
// Process bytes 8 at a time
while ((e-p) >= 8)
Slow_CRC32(&l, &p);
// Process the last few bytes
while (p != e)
STEP1;
return static_cast<uint32_t>(l ^ 0xffffffffu);
}
|
O3
|
cpp
|
mysys_namespace::crc32c::crc32c_slow(unsigned int, char const*, unsigned long):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
movl %edi, %eax
addq %rsi, %rdx
notl %eax
leaq 0xf(%rsi), %rdi
andq $-0x10, %rdi
cmpq %rdi, %rdx
setb %r8b
movq %rdi, %rcx
subq %rsi, %rcx
sete %r9b
orb %r8b, %r9b
je 0x61a0b
movq %rsi, %rdi
jmp 0x61a36
leaq 0x3628e(%rip), %r8 # 0x97ca0
movq %rsi, %r9
movzbl %al, %r10d
movzbl (%r9), %r11d
incq %r9
xorl %r10d, %r11d
movl (%r8,%r11,4), %r10d
shrq $0x8, %rax
xorq %r10, %rax
cmpq %rdi, %r9
jne 0x61a15
addq %rcx, %rsi
movq %rdx, %rcx
subq %rdi, %rcx
cmpq $0x10, %rcx
jl 0x61b46
movq %rdx, %rcx
subq %rsi, %rcx
movl $0xff, %edi
leaq 0x36648(%rip), %r8 # 0x980a0
leaq 0x36a41(%rip), %r9 # 0x984a0
movl $0x3fc, %r10d # imm = 0x3FC
leaq 0x36e34(%rip), %r11 # 0x988a0
leaq 0x3622d(%rip), %rbx # 0x97ca0
xorl (%rsi), %eax
movl %eax, %r15d
andl %edi, %r15d
movl %eax, %r14d
shrl $0x8, %r14d
andl %edi, %r14d
movl (%r9,%r14,4), %r14d
xorl (%r8,%r15,4), %r14d
movl %eax, %r15d
shrl $0xe, %r15d
andl %r10d, %r15d
xorl (%r15,%r11), %r14d
shrl $0x18, %eax
xorl (%rbx,%rax,4), %r14d
xorl 0x4(%rsi), %r14d
movl %r14d, %r15d
andl %edi, %r15d
movl %r14d, %eax
shrl $0x8, %eax
andl %edi, %eax
movl (%r9,%rax,4), %eax
xorl (%r8,%r15,4), %eax
movl %r14d, %r15d
shrl $0xe, %r15d
andl %r10d, %r15d
xorl (%r15,%r11), %eax
shrl $0x18, %r14d
xorl (%rbx,%r14,4), %eax
xorl 0x8(%rsi), %eax
movl %eax, %r15d
andl %edi, %r15d
movl %eax, %r14d
shrl $0x8, %r14d
andl %edi, %r14d
movl (%r9,%r14,4), %r14d
xorl (%r8,%r15,4), %r14d
movl %eax, %r15d
shrl $0xe, %r15d
andl %r10d, %r15d
xorl (%r15,%r11), %r14d
shrl $0x18, %eax
xorl (%rbx,%rax,4), %r14d
xorl 0xc(%rsi), %r14d
addq $0x10, %rsi
movl %r14d, %r15d
andl %edi, %r15d
movl %r14d, %eax
shrl $0x8, %eax
andl %edi, %eax
movl (%r9,%rax,4), %eax
xorl (%r8,%r15,4), %eax
movl %r14d, %r15d
shrl $0xe, %r15d
andl %r10d, %r15d
xorl (%r15,%r11), %eax
shrl $0x18, %r14d
xorl (%rbx,%r14,4), %eax
addq $-0x10, %rcx
cmpq $0xf, %rcx
jg 0x61a73
movl %eax, %eax
cmpq $0x8, %rcx
jl 0x61bec
movq %rdx, %rcx
subq %rsi, %rcx
movl $0xff, %edi
leaq 0x3653e(%rip), %r8 # 0x980a0
leaq 0x36937(%rip), %r9 # 0x984a0
movl $0x3fc, %r10d # imm = 0x3FC
leaq 0x36d2a(%rip), %r11 # 0x988a0
leaq 0x36123(%rip), %rbx # 0x97ca0
xorl (%rsi), %eax
movl %eax, %r15d
andl %edi, %r15d
movl %eax, %r14d
shrl $0x8, %r14d
andl %edi, %r14d
movl (%r9,%r14,4), %r14d
xorl (%r8,%r15,4), %r14d
movl %eax, %r15d
shrl $0xe, %r15d
andl %r10d, %r15d
xorl (%r15,%r11), %r14d
shrl $0x18, %eax
xorl (%rbx,%rax,4), %r14d
xorl 0x4(%rsi), %r14d
addq $0x8, %rsi
movl %r14d, %r15d
andl %edi, %r15d
movl %r14d, %eax
shrl $0x8, %eax
andl %edi, %eax
movl (%r9,%rax,4), %eax
xorl (%r8,%r15,4), %eax
movl %r14d, %r15d
shrl $0xe, %r15d
andl %r10d, %r15d
xorl (%r15,%r11), %eax
shrl $0x18, %r14d
xorl (%rbx,%r14,4), %eax
addq $-0x8, %rcx
cmpq $0x7, %rcx
jg 0x61b7d
movl %eax, %eax
cmpq %rdx, %rsi
je 0x61c15
leaq 0x360a8(%rip), %rcx # 0x97ca0
movzbl %al, %edi
movzbl (%rsi), %r8d
incq %rsi
xorl %edi, %r8d
movl (%rcx,%r8,4), %edi
shrq $0x8, %rax
xorq %rdi, %rax
cmpq %rdx, %rsi
jne 0x61bf8
notl %eax
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
|
_ZN15mysys_namespace6crc32cL11crc32c_slowEjPKcm:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
mov eax, edi
add rdx, rsi
not eax
lea rdi, [rsi+0Fh]
and rdi, 0FFFFFFFFFFFFFFF0h
cmp rdx, rdi
setb r8b
mov rcx, rdi
sub rcx, rsi
setz r9b
or r9b, r8b
jz short loc_61A0B
mov rdi, rsi
jmp short loc_61A36
loc_61A0B:
lea r8, _ZN15mysys_namespace6crc32cL7table0_E; mysys_namespace::crc32c::table0_
mov r9, rsi
loc_61A15:
movzx r10d, al
movzx r11d, byte ptr [r9]
inc r9
xor r11d, r10d
mov r10d, [r8+r11*4]
shr rax, 8
xor rax, r10
cmp r9, rdi
jnz short loc_61A15
add rsi, rcx
loc_61A36:
mov rcx, rdx
sub rcx, rdi
cmp rcx, 10h
jl loc_61B46
mov rcx, rdx
sub rcx, rsi
mov edi, 0FFh
lea r8, _ZN15mysys_namespace6crc32cL7table3_E; mysys_namespace::crc32c::table3_
lea r9, _ZN15mysys_namespace6crc32cL7table2_E; mysys_namespace::crc32c::table2_
mov r10d, 3FCh
lea r11, _ZN15mysys_namespace6crc32cL7table1_E; mysys_namespace::crc32c::table1_
lea rbx, _ZN15mysys_namespace6crc32cL7table0_E; mysys_namespace::crc32c::table0_
loc_61A73:
xor eax, [rsi]
mov r15d, eax
and r15d, edi
mov r14d, eax
shr r14d, 8
and r14d, edi
mov r14d, [r9+r14*4]
xor r14d, [r8+r15*4]
mov r15d, eax
shr r15d, 0Eh
and r15d, r10d
xor r14d, [r15+r11]
shr eax, 18h
xor r14d, [rbx+rax*4]
xor r14d, [rsi+4]
mov r15d, r14d
and r15d, edi
mov eax, r14d
shr eax, 8
and eax, edi
mov eax, [r9+rax*4]
xor eax, [r8+r15*4]
mov r15d, r14d
shr r15d, 0Eh
and r15d, r10d
xor eax, [r15+r11]
shr r14d, 18h
xor eax, [rbx+r14*4]
xor eax, [rsi+8]
mov r15d, eax
and r15d, edi
mov r14d, eax
shr r14d, 8
and r14d, edi
mov r14d, [r9+r14*4]
xor r14d, [r8+r15*4]
mov r15d, eax
shr r15d, 0Eh
and r15d, r10d
xor r14d, [r15+r11]
shr eax, 18h
xor r14d, [rbx+rax*4]
xor r14d, [rsi+0Ch]
add rsi, 10h
mov r15d, r14d
and r15d, edi
mov eax, r14d
shr eax, 8
and eax, edi
mov eax, [r9+rax*4]
xor eax, [r8+r15*4]
mov r15d, r14d
shr r15d, 0Eh
and r15d, r10d
xor eax, [r15+r11]
shr r14d, 18h
xor eax, [rbx+r14*4]
add rcx, 0FFFFFFFFFFFFFFF0h
cmp rcx, 0Fh
jg loc_61A73
mov eax, eax
loc_61B46:
cmp rcx, 8
jl loc_61BEC
mov rcx, rdx
sub rcx, rsi
mov edi, 0FFh
lea r8, _ZN15mysys_namespace6crc32cL7table3_E; mysys_namespace::crc32c::table3_
lea r9, _ZN15mysys_namespace6crc32cL7table2_E; mysys_namespace::crc32c::table2_
mov r10d, 3FCh
lea r11, _ZN15mysys_namespace6crc32cL7table1_E; mysys_namespace::crc32c::table1_
lea rbx, _ZN15mysys_namespace6crc32cL7table0_E; mysys_namespace::crc32c::table0_
loc_61B7D:
xor eax, [rsi]
mov r15d, eax
and r15d, edi
mov r14d, eax
shr r14d, 8
and r14d, edi
mov r14d, [r9+r14*4]
xor r14d, [r8+r15*4]
mov r15d, eax
shr r15d, 0Eh
and r15d, r10d
xor r14d, [r15+r11]
shr eax, 18h
xor r14d, [rbx+rax*4]
xor r14d, [rsi+4]
add rsi, 8
mov r15d, r14d
and r15d, edi
mov eax, r14d
shr eax, 8
and eax, edi
mov eax, [r9+rax*4]
xor eax, [r8+r15*4]
mov r15d, r14d
shr r15d, 0Eh
and r15d, r10d
xor eax, [r15+r11]
shr r14d, 18h
xor eax, [rbx+r14*4]
add rcx, 0FFFFFFFFFFFFFFF8h
cmp rcx, 7
jg short loc_61B7D
mov eax, eax
loc_61BEC:
cmp rsi, rdx
jz short loc_61C15
lea rcx, _ZN15mysys_namespace6crc32cL7table0_E; mysys_namespace::crc32c::table0_
loc_61BF8:
movzx edi, al
movzx r8d, byte ptr [rsi]
inc rsi
xor r8d, edi
mov edi, [rcx+r8*4]
shr rax, 8
xor rax, rdi
cmp rsi, rdx
jnz short loc_61BF8
loc_61C15:
not eax
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long mysys_namespace::crc32c::crc32c_slow(
mysys_namespace::crc32c *this,
unsigned long long a2,
const char *a3)
{
const char *v3; // rdx
unsigned long long v4; // rax
unsigned long long v5; // rdi
unsigned __int8 *v6; // r9
int v7; // r11d
long long v8; // rcx
unsigned int v9; // r14d
unsigned int v10; // eax
unsigned int v11; // r14d
long long v12; // rcx
unsigned int v13; // r14d
int v14; // r8d
v3 = &a3[a2];
v4 = (unsigned int)~(_DWORD)this;
v5 = (a2 + 15) & 0xFFFFFFFFFFFFFFF0LL;
if ( (unsigned long long)v3 < v5 || v5 == a2 )
{
v5 = a2;
}
else
{
v6 = (unsigned __int8 *)a2;
do
{
v7 = *v6++;
v4 = mysys_namespace::crc32c::table0_[(unsigned __int8)v4 ^ v7] ^ (v4 >> 8);
}
while ( v6 != (unsigned __int8 *)v5 );
a2 = (a2 + 15) & 0xFFFFFFFFFFFFFFF0LL;
}
v8 = (long long)&v3[-v5];
if ( (long long)&v3[-v5] >= 16 )
{
v8 = (long long)&v3[-a2];
do
{
v9 = *(_DWORD *)(a2 + 4) ^ mysys_namespace::crc32c::table0_[(*(_DWORD *)a2 ^ (unsigned int)v4) >> 24] ^ *(_DWORD *)&mysys_namespace::crc32c::table1_[((*(_DWORD *)a2 ^ (unsigned int)v4) >> 14) & 0x3FC] ^ mysys_namespace::crc32c::table3_[(unsigned __int8)(*(_BYTE *)a2 ^ v4)] ^ mysys_namespace::crc32c::table2_[(unsigned __int8)((unsigned __int16)(*(_WORD *)a2 ^ v4) >> 8)];
v10 = *(_DWORD *)(a2 + 8) ^ mysys_namespace::crc32c::table0_[HIBYTE(v9)] ^ *(_DWORD *)&mysys_namespace::crc32c::table1_[(v9 >> 14) & 0x3FC] ^ mysys_namespace::crc32c::table3_[(unsigned __int8)(*(_BYTE *)(a2 + 4) ^ LOBYTE(mysys_namespace::crc32c::table0_[(*(_DWORD *)a2 ^ (unsigned int)v4) >> 24]) ^ mysys_namespace::crc32c::table1_[((*(_DWORD *)a2 ^ (unsigned int)v4) >> 14) & 0x3FC] ^ LOBYTE(mysys_namespace::crc32c::table3_[(unsigned __int8)(*(_BYTE *)a2 ^ v4)]) ^ LOBYTE(mysys_namespace::crc32c::table2_[(unsigned __int8)((unsigned __int16)(*(_WORD *)a2 ^ v4) >> 8)]))] ^ mysys_namespace::crc32c::table2_[(unsigned __int8)((unsigned __int16)(*(_WORD *)(a2 + 4) ^ LOWORD(mysys_namespace::crc32c::table0_[(*(_DWORD *)a2 ^ (unsigned int)v4) >> 24]) ^ *(_WORD *)&mysys_namespace::crc32c::table1_[((*(_DWORD *)a2 ^ (unsigned int)v4) >> 14) & 0x3FC] ^ LOWORD(mysys_namespace::crc32c::table3_[(unsigned __int8)(*(_BYTE *)a2 ^ v4)]) ^ LOWORD(mysys_namespace::crc32c::table2_[(unsigned __int8)((unsigned __int16)(*(_WORD *)a2 ^ v4) >> 8)])) >> 8)];
v11 = *(_DWORD *)(a2 + 12) ^ mysys_namespace::crc32c::table0_[HIBYTE(v10)] ^ *(_DWORD *)&mysys_namespace::crc32c::table1_[(v10 >> 14) & 0x3FC] ^ mysys_namespace::crc32c::table3_[(unsigned __int8)v10] ^ mysys_namespace::crc32c::table2_[BYTE1(v10)];
a2 += 16LL;
LODWORD(v4) = mysys_namespace::crc32c::table0_[HIBYTE(v11)] ^ *(_DWORD *)&mysys_namespace::crc32c::table1_[(v11 >> 14) & 0x3FC] ^ mysys_namespace::crc32c::table3_[(unsigned __int8)v11] ^ mysys_namespace::crc32c::table2_[BYTE1(v11)];
v8 -= 16LL;
}
while ( v8 > 15 );
v4 = (unsigned int)v4;
}
if ( v8 >= 8 )
{
v12 = (long long)&v3[-a2];
do
{
v13 = *(_DWORD *)(a2 + 4) ^ mysys_namespace::crc32c::table0_[(*(_DWORD *)a2 ^ (unsigned int)v4) >> 24] ^ *(_DWORD *)&mysys_namespace::crc32c::table1_[((*(_DWORD *)a2 ^ (unsigned int)v4) >> 14) & 0x3FC] ^ mysys_namespace::crc32c::table3_[(unsigned __int8)(*(_BYTE *)a2 ^ v4)] ^ mysys_namespace::crc32c::table2_[(unsigned __int8)((unsigned __int16)(*(_WORD *)a2 ^ v4) >> 8)];
a2 += 8LL;
LODWORD(v4) = mysys_namespace::crc32c::table0_[HIBYTE(v13)] ^ *(_DWORD *)&mysys_namespace::crc32c::table1_[(v13 >> 14) & 0x3FC] ^ mysys_namespace::crc32c::table3_[(unsigned __int8)v13] ^ mysys_namespace::crc32c::table2_[BYTE1(v13)];
v12 -= 8LL;
}
while ( v12 > 7 );
v4 = (unsigned int)v4;
}
for ( ; (const char *)a2 != v3; v4 = mysys_namespace::crc32c::table0_[(unsigned __int8)v4 ^ v14] ^ (v4 >> 8) )
v14 = *(unsigned __int8 *)a2++;
return (unsigned int)~(_DWORD)v4;
}
|
crc32c_slow:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
MOV EAX,EDI
ADD RDX,RSI
NOT EAX
LEA RDI,[RSI + 0xf]
AND RDI,-0x10
CMP RDX,RDI
SETC R8B
MOV RCX,RDI
SUB RCX,RSI
SETZ R9B
OR R9B,R8B
JZ 0x00161a0b
MOV RDI,RSI
JMP 0x00161a36
LAB_00161a0b:
LEA R8,[0x197ca0]
MOV R9,RSI
LAB_00161a15:
MOVZX R10D,AL
MOVZX R11D,byte ptr [R9]
INC R9
XOR R11D,R10D
MOV R10D,dword ptr [R8 + R11*0x4]
SHR RAX,0x8
XOR RAX,R10
CMP R9,RDI
JNZ 0x00161a15
ADD RSI,RCX
LAB_00161a36:
MOV RCX,RDX
SUB RCX,RDI
CMP RCX,0x10
JL 0x00161b46
MOV RCX,RDX
SUB RCX,RSI
MOV EDI,0xff
LEA R8,[0x1980a0]
LEA R9,[0x1984a0]
MOV R10D,0x3fc
LEA R11,[0x1988a0]
LEA RBX,[0x197ca0]
LAB_00161a73:
XOR EAX,dword ptr [RSI]
MOV R15D,EAX
AND R15D,EDI
MOV R14D,EAX
SHR R14D,0x8
AND R14D,EDI
MOV R14D,dword ptr [R9 + R14*0x4]
XOR R14D,dword ptr [R8 + R15*0x4]
MOV R15D,EAX
SHR R15D,0xe
AND R15D,R10D
XOR R14D,dword ptr [R15 + R11*0x1]
SHR EAX,0x18
XOR R14D,dword ptr [RBX + RAX*0x4]
XOR R14D,dword ptr [RSI + 0x4]
MOV R15D,R14D
AND R15D,EDI
MOV EAX,R14D
SHR EAX,0x8
AND EAX,EDI
MOV EAX,dword ptr [R9 + RAX*0x4]
XOR EAX,dword ptr [R8 + R15*0x4]
MOV R15D,R14D
SHR R15D,0xe
AND R15D,R10D
XOR EAX,dword ptr [R15 + R11*0x1]
SHR R14D,0x18
XOR EAX,dword ptr [RBX + R14*0x4]
XOR EAX,dword ptr [RSI + 0x8]
MOV R15D,EAX
AND R15D,EDI
MOV R14D,EAX
SHR R14D,0x8
AND R14D,EDI
MOV R14D,dword ptr [R9 + R14*0x4]
XOR R14D,dword ptr [R8 + R15*0x4]
MOV R15D,EAX
SHR R15D,0xe
AND R15D,R10D
XOR R14D,dword ptr [R15 + R11*0x1]
SHR EAX,0x18
XOR R14D,dword ptr [RBX + RAX*0x4]
XOR R14D,dword ptr [RSI + 0xc]
ADD RSI,0x10
MOV R15D,R14D
AND R15D,EDI
MOV EAX,R14D
SHR EAX,0x8
AND EAX,EDI
MOV EAX,dword ptr [R9 + RAX*0x4]
XOR EAX,dword ptr [R8 + R15*0x4]
MOV R15D,R14D
SHR R15D,0xe
AND R15D,R10D
XOR EAX,dword ptr [R15 + R11*0x1]
SHR R14D,0x18
XOR EAX,dword ptr [RBX + R14*0x4]
ADD RCX,-0x10
CMP RCX,0xf
JG 0x00161a73
MOV EAX,EAX
LAB_00161b46:
CMP RCX,0x8
JL 0x00161bec
MOV RCX,RDX
SUB RCX,RSI
MOV EDI,0xff
LEA R8,[0x1980a0]
LEA R9,[0x1984a0]
MOV R10D,0x3fc
LEA R11,[0x1988a0]
LEA RBX,[0x197ca0]
LAB_00161b7d:
XOR EAX,dword ptr [RSI]
MOV R15D,EAX
AND R15D,EDI
MOV R14D,EAX
SHR R14D,0x8
AND R14D,EDI
MOV R14D,dword ptr [R9 + R14*0x4]
XOR R14D,dword ptr [R8 + R15*0x4]
MOV R15D,EAX
SHR R15D,0xe
AND R15D,R10D
XOR R14D,dword ptr [R15 + R11*0x1]
SHR EAX,0x18
XOR R14D,dword ptr [RBX + RAX*0x4]
XOR R14D,dword ptr [RSI + 0x4]
ADD RSI,0x8
MOV R15D,R14D
AND R15D,EDI
MOV EAX,R14D
SHR EAX,0x8
AND EAX,EDI
MOV EAX,dword ptr [R9 + RAX*0x4]
XOR EAX,dword ptr [R8 + R15*0x4]
MOV R15D,R14D
SHR R15D,0xe
AND R15D,R10D
XOR EAX,dword ptr [R15 + R11*0x1]
SHR R14D,0x18
XOR EAX,dword ptr [RBX + R14*0x4]
ADD RCX,-0x8
CMP RCX,0x7
JG 0x00161b7d
MOV EAX,EAX
LAB_00161bec:
CMP RSI,RDX
JZ 0x00161c15
LEA RCX,[0x197ca0]
LAB_00161bf8:
MOVZX EDI,AL
MOVZX R8D,byte ptr [RSI]
INC RSI
XOR R8D,EDI
MOV EDI,dword ptr [RCX + R8*0x4]
SHR RAX,0x8
XOR RAX,RDI
CMP RSI,RDX
JNZ 0x00161bf8
LAB_00161c15:
NOT EAX
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* mysys_namespace::crc32c::crc32c_slow(unsigned int, char const*, unsigned long) */
uint __thiscall
mysys_namespace::crc32c::crc32c_slow(crc32c *this,uint param_1,char *param_2,ulong param_3)
{
uint uVar1;
ulong uVar2;
long lVar3;
uint *puVar4;
int4 in_register_00000034;
uint *puVar5;
uint *puVar6;
uint *puVar7;
uint *puVar8;
puVar5 = (uint *)CONCAT44(in_register_00000034,param_1);
puVar4 = (uint *)(param_2 + (long)puVar5);
uVar2 = (ulong)~(uint)this;
puVar6 = (uint *)((ulong)((long)puVar5 + 0xfU) & 0xfffffffffffffff0);
puVar7 = puVar5;
if ((long)puVar6 - (long)puVar5 != 0 && puVar6 <= puVar4) {
do {
puVar8 = (uint *)((long)puVar7 + 1);
uVar2 = uVar2 >> 8 ^
(ulong)*(uint *)(table0_ + (ulong)((uint)(byte)*puVar7 ^ (uint)uVar2 & 0xff) * 4);
puVar7 = puVar8;
} while (puVar8 != puVar6);
puVar5 = (uint *)((long)puVar5 + ((long)puVar6 - (long)puVar5));
puVar7 = puVar6;
}
lVar3 = (long)puVar4 - (long)puVar7;
if (0xf < lVar3) {
lVar3 = (long)puVar4 - (long)puVar5;
do {
uVar1 = (uint)uVar2 ^ *puVar5;
uVar1 = *(uint *)(table2_ + (ulong)(uVar1 >> 8 & 0xff) * 4) ^
*(uint *)(table3_ + (ulong)(uVar1 & 0xff) * 4) ^
*(uint *)(table1_ + (uVar1 >> 0xe & 0x3fc)) ^
*(uint *)(table0_ + (ulong)(uVar1 >> 0x18) * 4) ^ puVar5[1];
uVar1 = *(uint *)(table2_ + (ulong)(uVar1 >> 8 & 0xff) * 4) ^
*(uint *)(table3_ + (ulong)(uVar1 & 0xff) * 4) ^
*(uint *)(table1_ + (uVar1 >> 0xe & 0x3fc)) ^
*(uint *)(table0_ + (ulong)(uVar1 >> 0x18) * 4) ^ puVar5[2];
uVar1 = *(uint *)(table2_ + (ulong)(uVar1 >> 8 & 0xff) * 4) ^
*(uint *)(table3_ + (ulong)(uVar1 & 0xff) * 4) ^
*(uint *)(table1_ + (uVar1 >> 0xe & 0x3fc)) ^
*(uint *)(table0_ + (ulong)(uVar1 >> 0x18) * 4) ^ puVar5[3];
puVar5 = puVar5 + 4;
uVar1 = *(uint *)(table2_ + (ulong)(uVar1 >> 8 & 0xff) * 4) ^
*(uint *)(table3_ + (ulong)(uVar1 & 0xff) * 4) ^
*(uint *)(table1_ + (uVar1 >> 0xe & 0x3fc)) ^
*(uint *)(table0_ + (ulong)(uVar1 >> 0x18) * 4);
uVar2 = (ulong)uVar1;
lVar3 = lVar3 + -0x10;
} while (0xf < lVar3);
uVar2 = (ulong)uVar1;
}
if (7 < lVar3) {
lVar3 = (long)puVar4 - (long)puVar5;
do {
uVar1 = (uint)uVar2 ^ *puVar5;
uVar1 = *(uint *)(table2_ + (ulong)(uVar1 >> 8 & 0xff) * 4) ^
*(uint *)(table3_ + (ulong)(uVar1 & 0xff) * 4) ^
*(uint *)(table1_ + (uVar1 >> 0xe & 0x3fc)) ^
*(uint *)(table0_ + (ulong)(uVar1 >> 0x18) * 4) ^ puVar5[1];
puVar5 = puVar5 + 2;
uVar1 = *(uint *)(table2_ + (ulong)(uVar1 >> 8 & 0xff) * 4) ^
*(uint *)(table3_ + (ulong)(uVar1 & 0xff) * 4) ^
*(uint *)(table1_ + (uVar1 >> 0xe & 0x3fc)) ^
*(uint *)(table0_ + (ulong)(uVar1 >> 0x18) * 4);
uVar2 = (ulong)uVar1;
lVar3 = lVar3 + -8;
} while (7 < lVar3);
uVar2 = (ulong)uVar1;
}
for (; puVar5 != puVar4; puVar5 = (uint *)((long)puVar5 + 1)) {
uVar2 = uVar2 >> 8 ^
(ulong)*(uint *)(table0_ + (ulong)((uint)(byte)*puVar5 ^ (uint)uVar2 & 0xff) * 4);
}
return ~(uint)uVar2;
}
|
|
12,186 |
translog_deassign_id_from_share
|
eloqsql/storage/maria/ma_loghandler.c
|
void translog_deassign_id_from_share(MARIA_SHARE *share)
{
DBUG_PRINT("info", ("id_to_share: %p id %u -> 0",
share, share->id));
/*
We don't need any mutex as we are called only when closing the last
instance of the table or at the end of REPAIR: no writes can be
happening. But a Checkpoint may be reading share->id, so we require this
mutex:
*/
mysql_mutex_assert_owner(&share->intern_lock);
my_atomic_storeptr((void **)&id_to_share[share->id], 0);
share->id= 0;
/* useless but safety: */
share->lsn_of_file_id= LSN_IMPOSSIBLE;
}
|
O0
|
c
|
translog_deassign_id_from_share:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
jmp 0x5c00a
jmp 0x5c00c
jmp 0x5c00e
movq 0xbe6ea3(%rip), %rcx # 0xc42eb8
movq -0x8(%rbp), %rax
movzwl 0x620(%rax), %eax
movl %eax, %edx
movq $0x0, -0x10(%rbp)
movq -0x10(%rbp), %rax
xchgq %rax, (%rcx,%rdx,8)
movq -0x8(%rbp), %rax
movw $0x0, 0x620(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0xc10(%rax)
popq %rbp
retq
|
translog_deassign_id_from_share:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
jmp short $+2
loc_5C00A:
jmp short $+2
loc_5C00C:
jmp short $+2
loc_5C00E:
mov rcx, cs:id_to_share
mov rax, [rbp+var_8]
movzx eax, word ptr [rax+620h]
mov edx, eax
mov [rbp+var_10], 0
mov rax, [rbp+var_10]
xchg rax, [rcx+rdx*8]
mov rax, [rbp+var_8]
mov word ptr [rax+620h], 0
mov rax, [rbp+var_8]
mov qword ptr [rax+0C10h], 0
pop rbp
retn
|
long long translog_deassign_id_from_share(long long a1)
{
long long result; // rax
_InterlockedExchange64((volatile long long *)(id_to_share + 8LL * *(unsigned __int16 *)(a1 + 1568)), 0LL);
*(_WORD *)(a1 + 1568) = 0;
result = a1;
*(_QWORD *)(a1 + 3088) = 0LL;
return result;
}
|
translog_deassign_id_from_share:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
JMP 0x0015c00a
LAB_0015c00a:
JMP 0x0015c00c
LAB_0015c00c:
JMP 0x0015c00e
LAB_0015c00e:
MOV RCX,qword ptr [0x00d42eb8]
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,word ptr [RAX + 0x620]
MOV EDX,EAX
MOV qword ptr [RBP + -0x10],0x0
MOV RAX,qword ptr [RBP + -0x10]
XCHG qword ptr [RCX + RDX*0x8],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV word ptr [RAX + 0x620],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0xc10],0x0
POP RBP
RET
|
void translog_deassign_id_from_share(long param_1)
{
LOCK();
*(int8 *)(id_to_share + (ulong)*(ushort *)(param_1 + 0x620) * 8) = 0;
UNLOCK();
*(int2 *)(param_1 + 0x620) = 0;
*(int8 *)(param_1 + 0xc10) = 0;
return;
}
|
|
12,187 |
ma_pvio_wait_async
|
eloqsql/libmariadb/libmariadb/ma_pvio.c
|
static my_bool
ma_pvio_wait_async(struct mysql_async_context *b, enum enum_pvio_io_event event,
int timeout)
{
switch (event)
{
case VIO_IO_EVENT_READ:
b->events_to_wait_for = MYSQL_WAIT_READ;
break;
case VIO_IO_EVENT_WRITE:
b->events_to_wait_for = MYSQL_WAIT_WRITE;
break;
case VIO_IO_EVENT_CONNECT:
b->events_to_wait_for = MYSQL_WAIT_WRITE | IF_WIN(0, MYSQL_WAIT_EXCEPT);
break;
}
if (timeout >= 0)
{
b->events_to_wait_for |= MYSQL_WAIT_TIMEOUT;
b->timeout_value= timeout;
}
if (b->suspend_resume_hook)
(*b->suspend_resume_hook)(TRUE, b->suspend_resume_hook_user_data);
my_context_yield(&b->async_context);
if (b->suspend_resume_hook)
(*b->suspend_resume_hook)(FALSE, b->suspend_resume_hook_user_data);
return (b->events_occurred & MYSQL_WAIT_TIMEOUT) ? 0 : 1;
}
|
O0
|
c
|
ma_pvio_wait_async:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x14(%rbp)
testl %eax, %eax
je 0x2a462
jmp 0x2a44e
movl -0x14(%rbp), %eax
subl $0x1, %eax
je 0x2a46e
jmp 0x2a458
movl -0x14(%rbp), %eax
subl $0x2, %eax
je 0x2a47a
jmp 0x2a484
movq -0x8(%rbp), %rax
movl $0x1, (%rax)
jmp 0x2a484
movq -0x8(%rbp), %rax
movl $0x2, (%rax)
jmp 0x2a484
movq -0x8(%rbp), %rax
movl $0x6, (%rax)
cmpl $0x0, -0x10(%rbp)
jl 0x2a49f
movq -0x8(%rbp), %rax
movl (%rax), %ecx
orl $0x8, %ecx
movl %ecx, (%rax)
movl -0x10(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x2a4c1
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x28(%rcx), %rsi
movl $0x1, %edi
callq *%rax
movq -0x8(%rbp), %rdi
addq $0x38, %rdi
callq 0x45b20
movq -0x8(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x2a4ed
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x28(%rcx), %rsi
xorl %edi, %edi
callq *%rax
movq -0x8(%rbp), %rax
movl 0x4(%rax), %edx
andl $0x8, %edx
movl $0x1, %eax
xorl %ecx, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
ma_pvio_wait_async:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_10], edx
mov eax, [rbp+var_C]
mov [rbp+var_14], eax
test eax, eax
jz short loc_2A462
jmp short $+2
loc_2A44E:
mov eax, [rbp+var_14]
sub eax, 1
jz short loc_2A46E
jmp short $+2
loc_2A458:
mov eax, [rbp+var_14]
sub eax, 2
jz short loc_2A47A
jmp short loc_2A484
loc_2A462:
mov rax, [rbp+var_8]
mov dword ptr [rax], 1
jmp short loc_2A484
loc_2A46E:
mov rax, [rbp+var_8]
mov dword ptr [rax], 2
jmp short loc_2A484
loc_2A47A:
mov rax, [rbp+var_8]
mov dword ptr [rax], 6
loc_2A484:
cmp [rbp+var_10], 0
jl short loc_2A49F
mov rax, [rbp+var_8]
mov ecx, [rax]
or ecx, 8
mov [rax], ecx
mov ecx, [rbp+var_10]
mov rax, [rbp+var_8]
mov [rax+10h], ecx
loc_2A49F:
mov rax, [rbp+var_8]
cmp qword ptr [rax+20h], 0
jz short loc_2A4C1
mov rax, [rbp+var_8]
mov rax, [rax+20h]
mov rcx, [rbp+var_8]
mov rsi, [rcx+28h]
mov edi, 1
call rax
loc_2A4C1:
mov rdi, [rbp+var_8]
add rdi, 38h ; '8'
call my_context_yield
mov rax, [rbp+var_8]
cmp qword ptr [rax+20h], 0
jz short loc_2A4ED
mov rax, [rbp+var_8]
mov rax, [rax+20h]
mov rcx, [rbp+var_8]
mov rsi, [rcx+28h]
xor edi, edi
call rax
loc_2A4ED:
mov rax, [rbp+var_8]
mov edx, [rax+4]
and edx, 8
mov eax, 1
xor ecx, ecx
cmp edx, 0
cmovnz eax, ecx
add rsp, 20h
pop rbp
retn
|
_BOOL8 ma_pvio_wait_async(long long a1, int a2, int a3)
{
if ( a2 )
{
if ( a2 == 1 )
{
*(_DWORD *)a1 = 2;
}
else if ( a2 == 2 )
{
*(_DWORD *)a1 = 6;
}
}
else
{
*(_DWORD *)a1 = 1;
}
if ( a3 >= 0 )
{
*(_DWORD *)a1 |= 8u;
*(_DWORD *)(a1 + 16) = a3;
}
if ( *(_QWORD *)(a1 + 32) )
(*(void ( **)(long long, _QWORD))(a1 + 32))(1LL, *(_QWORD *)(a1 + 40));
my_context_yield(a1 + 56);
if ( *(_QWORD *)(a1 + 32) )
(*(void ( **)(_QWORD, _QWORD))(a1 + 32))(0LL, *(_QWORD *)(a1 + 40));
return (*(_DWORD *)(a1 + 4) & 8) == 0;
}
|
ma_pvio_wait_async:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV dword ptr [RBP + -0x10],EDX
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x14],EAX
TEST EAX,EAX
JZ 0x0012a462
JMP 0x0012a44e
LAB_0012a44e:
MOV EAX,dword ptr [RBP + -0x14]
SUB EAX,0x1
JZ 0x0012a46e
JMP 0x0012a458
LAB_0012a458:
MOV EAX,dword ptr [RBP + -0x14]
SUB EAX,0x2
JZ 0x0012a47a
JMP 0x0012a484
LAB_0012a462:
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX],0x1
JMP 0x0012a484
LAB_0012a46e:
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX],0x2
JMP 0x0012a484
LAB_0012a47a:
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX],0x6
LAB_0012a484:
CMP dword ptr [RBP + -0x10],0x0
JL 0x0012a49f
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX]
OR ECX,0x8
MOV dword ptr [RAX],ECX
MOV ECX,dword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x10],ECX
LAB_0012a49f:
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x20],0x0
JZ 0x0012a4c1
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x20]
MOV RCX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RCX + 0x28]
MOV EDI,0x1
CALL RAX
LAB_0012a4c1:
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x38
CALL 0x00145b20
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x20],0x0
JZ 0x0012a4ed
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x20]
MOV RCX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RCX + 0x28]
XOR EDI,EDI
CALL RAX
LAB_0012a4ed:
MOV RAX,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RAX + 0x4]
AND EDX,0x8
MOV EAX,0x1
XOR ECX,ECX
CMP EDX,0x0
CMOVNZ EAX,ECX
ADD RSP,0x20
POP RBP
RET
|
bool ma_pvio_wait_async(uint *param_1,int param_2,uint param_3)
{
if (param_2 == 0) {
*param_1 = 1;
}
else if (param_2 == 1) {
*param_1 = 2;
}
else if (param_2 == 2) {
*param_1 = 6;
}
if (-1 < (int)param_3) {
*param_1 = *param_1 | 8;
param_1[4] = param_3;
}
if (*(long *)(param_1 + 8) != 0) {
(**(code **)(param_1 + 8))(1,*(int8 *)(param_1 + 10));
}
my_context_yield(param_1 + 0xe);
if (*(long *)(param_1 + 8) != 0) {
(**(code **)(param_1 + 8))(0,*(int8 *)(param_1 + 10));
}
return (param_1[1] & 8) == 0;
}
|
|
12,188 |
minja::Parser::parseMathPow()
|
monkey531[P]llama/common/minja.hpp
|
std::shared_ptr<Expression> parseMathPow() {
auto left = parseMathPlusMinus();
if (!left) throw std::runtime_error("Expected left side of 'math pow' expression");
while (!consumeToken("**").empty()) {
auto right = parseMathPlusMinus();
if (!right) throw std::runtime_error("Expected right side of 'math pow' expression");
left = std::make_shared<BinaryOpExpr>(get_location(), std::move(left), std::move(right), BinaryOpExpr::Op::MulMul);
}
return left;
}
|
O1
|
cpp
|
minja::Parser::parseMathPow():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x8cab0
cmpq $0x0, (%rbx)
je 0x8ca02
leaq 0x30(%rsp), %rbp
leaq 0x20(%rsp), %r13
leaq 0xa50fe(%rip), %rax # 0x131978
addq $0x10, %rax
movq %rax, 0x40(%rsp)
movq %rbp, 0x20(%rsp)
movq %r13, %rdi
leaq 0x6a377(%rip), %rsi # 0xf6c09
leaq 0x6a372(%rip), %rdx # 0xf6c0b
callq 0x26900
movq %rsp, %rdi
movq %r14, %rsi
movq %r13, %rdx
movl $0x1, %ecx
callq 0x88cc8
movq (%rsp), %rdi
movq 0x8(%rsp), %r15
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x8c8d1
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1b930
movq 0x20(%rsp), %rdi
cmpq %rbp, %rdi
je 0x8c8e8
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1b930
testq %r15, %r15
je 0x8c9bc
movq %r13, %rdi
movq %r14, %rsi
callq 0x8cab0
cmpq $0x0, 0x20(%rsp)
je 0x8c9ce
movq (%r14), %rax
movq %rax, (%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x8c932
movq 0xa6654(%rip), %rcx # 0x132f78
cmpb $0x0, (%rcx)
je 0x8c92e
incl 0x8(%rax)
jmp 0x8c932
lock
incl 0x8(%rax)
movq 0x20(%r14), %rax
subq 0x10(%r14), %rax
movq %rax, 0x10(%rsp)
movl $0x58, %edi
callq 0x1b900
movq %rax, %r15
movabsq $0x100000001, %rax # imm = 0x100000001
movq %rax, 0x8(%r15)
movq 0x40(%rsp), %rax
movq %rax, (%r15)
movq %r15, %r12
addq $0x10, %r12
movq %r12, %rdi
movq %rsp, %rsi
movq %rbx, %rdx
movq %r13, %rcx
movl $0x4, %r8d
callq 0x9aa18
movq %r12, (%rbx)
movq 0x8(%rbx), %rdi
movq %r15, 0x8(%rbx)
testq %rdi, %rdi
je 0x8c995
callq 0x26758
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x8c9a4
callq 0x26758
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x8c883
callq 0x26758
jmp 0x8c883
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x1b480
movq %rax, %r15
leaq 0x6a22a(%rip), %rsi # 0xf6c0c
movq %rax, %rdi
callq 0x1b350
movq 0xa65f7(%rip), %rsi # 0x132fe8
movq 0xa6558(%rip), %rdx # 0x132f50
movq %r15, %rdi
callq 0x1c040
jmp 0x8ca34
movl $0x10, %edi
callq 0x1b480
movq %rax, %r15
leaq 0x6a1c7(%rip), %rsi # 0xf6bdd
movq %rax, %rdi
callq 0x1b350
movq 0xa65c3(%rip), %rsi # 0x132fe8
movq 0xa6524(%rip), %rdx # 0x132f50
movq %r15, %rdi
callq 0x1c040
jmp 0x8ca7a
movq %rax, %r14
movq %r15, %rdi
callq 0x1b6c0
jmp 0x8ca99
movq %rax, %r14
jmp 0x8ca69
movq %rax, %r14
movq %r15, %rdi
callq 0x1b6c0
jmp 0x8ca69
jmp 0x8ca7a
movq %rax, %r14
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x8ca69
callq 0x26758
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x8ca99
callq 0x26758
jmp 0x8ca99
movq %rax, %r14
jmp 0x8ca99
movq %rax, %r14
movq 0x20(%rsp), %rdi
cmpq %rbp, %rdi
je 0x8ca99
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1b930
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x8caa7
callq 0x26758
movq %r14, %rdi
callq 0x1c0d0
nop
|
_ZN5minja6Parser12parseMathPowEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r14, rsi
mov rbx, rdi
call _ZN5minja6Parser18parseMathPlusMinusEv; minja::Parser::parseMathPlusMinus(void)
cmp qword ptr [rbx], 0
jz loc_8CA02
lea rbp, [rsp+78h+var_48]
lea r13, [rsp+78h+var_58]
lea rax, _ZTVSt23_Sp_counted_ptr_inplaceIN5minja12BinaryOpExprESaIS1_ELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<minja::BinaryOpExpr,std::allocator<minja::BinaryOpExpr>,(__gnu_cxx::_Lock_policy)2>
add rax, 10h
mov [rsp+78h+var_38], rax
loc_8C883:
mov [rsp+78h+var_58], rbp
mov rdi, r13
lea rsi, asc_F6C09; "**"
lea rdx, asc_F6C09+2; ""
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rdi, rsp
mov rsi, r14
mov rdx, r13
mov ecx, 1
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling)
mov rdi, [rsp+78h+var_78]; void *
mov r15, [rsp+78h+var_70]
lea rax, [rsp+78h+var_68]
cmp rdi, rax
jz short loc_8C8D1
mov rsi, [rsp+78h+var_68]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8C8D1:
mov rdi, [rsp+78h+var_58]; void *
cmp rdi, rbp
jz short loc_8C8E8
mov rsi, [rsp+78h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8C8E8:
test r15, r15
jz loc_8C9BC
mov rdi, r13; this
mov rsi, r14
call _ZN5minja6Parser18parseMathPlusMinusEv; minja::Parser::parseMathPlusMinus(void)
cmp [rsp+78h+var_58], 0
jz loc_8C9CE
mov rax, [r14]
mov [rsp+78h+var_78], rax
mov rax, [r14+8]
mov [rsp+78h+var_70], rax
test rax, rax
jz short loc_8C932
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_8C92E
inc dword ptr [rax+8]
jmp short loc_8C932
loc_8C92E:
lock inc dword ptr [rax+8]
loc_8C932:
mov rax, [r14+20h]
sub rax, [r14+10h]
mov [rsp+78h+var_68], rax
mov edi, 58h ; 'X'; unsigned __int64
call __Znwm; operator new(ulong)
mov r15, rax
mov rax, 100000001h
mov [r15+8], rax
mov rax, [rsp+78h+var_38]
mov [r15], rax
mov r12, r15
add r12, 10h
mov rdi, r12
mov rsi, rsp
mov rdx, rbx
mov rcx, r13
mov r8d, 4
call _ZN5minja12BinaryOpExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEES7_NS0_2OpE; minja::BinaryOpExpr::BinaryOpExpr(minja::Location const&,std::shared_ptr<minja::Expression> &&,std::shared_ptr<minja::Expression> &,minja::BinaryOpExpr::Op)
mov [rbx], r12
mov rdi, [rbx+8]
mov [rbx+8], r15
test rdi, rdi
jz short loc_8C995
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_8C995:
mov rdi, [rsp+78h+var_70]
test rdi, rdi
jz short loc_8C9A4
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_8C9A4:
mov rdi, [rsp+78h+var_50]
test rdi, rdi
jz loc_8C883
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp loc_8C883
loc_8C9BC:
mov rax, rbx
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_8C9CE:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aExpectedRightS_3; "Expected right side of 'math pow' expre"...
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
jmp short loc_8CA34
loc_8CA02:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aExpectedLeftSi_3; "Expected left side of 'math pow' expres"...
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
loc_8CA34:
jmp short loc_8CA7A
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
jmp short loc_8CA99
mov r14, rax
jmp short loc_8CA69
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
jmp short loc_8CA69
jmp short loc_8CA7A
mov r14, rax
mov rdi, [rsp+78h+var_70]
test rdi, rdi
jz short loc_8CA69
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_8CA69:
mov rdi, [rsp+78h+var_50]
test rdi, rdi
jz short loc_8CA99
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp short loc_8CA99
loc_8CA7A:
mov r14, rax
jmp short loc_8CA99
mov r14, rax
mov rdi, [rsp+78h+var_58]; void *
cmp rdi, rbp
jz short loc_8CA99
mov rsi, [rsp+78h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8CA99:
mov rdi, [rbx+8]
test rdi, rdi
jz short loc_8CAA7
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_8CAA7:
mov rdi, r14
call __Unwind_Resume
|
minja::Parser * minja::Parser::parseMathPow(volatile signed __int32 **this, long long a2)
{
volatile signed __int32 *v3; // r15
volatile signed __int32 *v4; // rax
long long **v5; // r15
volatile signed __int32 *v6; // rdi
std::runtime_error *v8; // r15
std::runtime_error *exception; // r15
void *v10; // [rsp+0h] [rbp-78h] BYREF
volatile signed __int32 *v11; // [rsp+8h] [rbp-70h]
long long v12; // [rsp+10h] [rbp-68h] BYREF
void *v13; // [rsp+20h] [rbp-58h] BYREF
volatile signed __int32 *v14; // [rsp+28h] [rbp-50h]
_QWORD v15[2]; // [rsp+30h] [rbp-48h] BYREF
long long *v16; // [rsp+40h] [rbp-38h]
minja::Parser::parseMathPlusMinus((minja::Parser *)this);
if ( !*this )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected left side of 'math pow' expression");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v16 = &`vtable for'std::_Sp_counted_ptr_inplace<minja::BinaryOpExpr,std::allocator<minja::BinaryOpExpr>,(__gnu_cxx::_Lock_policy)2>
+ 2;
while ( 1 )
{
v13 = v15;
std::string::_M_construct<char const*>(&v13, "**", (long long)"");
minja::Parser::consumeToken(&v10, a2, (_BYTE **)&v13, 1u);
v3 = v11;
if ( v10 != &v12 )
operator delete(v10, v12 + 1);
if ( v13 != v15 )
operator delete(v13, v15[0] + 1LL);
if ( !v3 )
break;
minja::Parser::parseMathPlusMinus((minja::Parser *)&v13);
if ( !v13 )
{
v8 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(v8, "Expected right side of 'math pow' expression");
__cxa_throw(
v8,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v10 = *(void **)a2;
v4 = *(volatile signed __int32 **)(a2 + 8);
v11 = v4;
if ( v4 )
{
if ( _libc_single_threaded )
++*((_DWORD *)v4 + 2);
else
_InterlockedIncrement(v4 + 2);
}
v12 = *(_QWORD *)(a2 + 32) - *(_QWORD *)(a2 + 16);
v5 = (long long **)operator new(0x58uLL);
v5[1] = (long long *)0x100000001LL;
*v5 = v16;
minja::BinaryOpExpr::BinaryOpExpr(v5 + 2, &v10, this, &v13, 4LL);
*this = (volatile signed __int32 *)(v5 + 2);
v6 = this[1];
this[1] = (volatile signed __int32 *)v5;
if ( v6 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v6);
if ( v11 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v11);
if ( v14 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v14);
}
return (minja::Parser *)this;
}
|
parseMathPow:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R14,RSI
MOV RBX,RDI
CALL 0x0018cab0
CMP qword ptr [RBX],0x0
JZ 0x0018ca02
LEA RBP,[RSP + 0x30]
LEA R13,[RSP + 0x20]
LEA RAX,[0x231978]
ADD RAX,0x10
MOV qword ptr [RSP + 0x40],RAX
LAB_0018c883:
MOV qword ptr [RSP + 0x20],RBP
LAB_0018c888:
MOV RDI,R13
LEA RSI,[0x1f6c09]
LEA RDX,[0x1f6c0b]
CALL 0x00126900
LAB_0018c89e:
MOV RDI,RSP
MOV RSI,R14
MOV RDX,R13
MOV ECX,0x1
CALL 0x00188cc8
MOV RDI,qword ptr [RSP]
MOV R15,qword ptr [RSP + 0x8]
LEA RAX,[RSP + 0x10]
CMP RDI,RAX
JZ 0x0018c8d1
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x0011b930
LAB_0018c8d1:
MOV RDI,qword ptr [RSP + 0x20]
CMP RDI,RBP
JZ 0x0018c8e8
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
CALL 0x0011b930
LAB_0018c8e8:
TEST R15,R15
JZ 0x0018c9bc
LAB_0018c8f1:
MOV RDI,R13
MOV RSI,R14
CALL 0x0018cab0
CMP qword ptr [RSP + 0x20],0x0
JZ 0x0018c9ce
MOV RAX,qword ptr [R14]
MOV qword ptr [RSP],RAX
MOV RAX,qword ptr [R14 + 0x8]
MOV qword ptr [RSP + 0x8],RAX
TEST RAX,RAX
JZ 0x0018c932
MOV RCX,qword ptr [0x00232f78]
CMP byte ptr [RCX],0x0
JZ 0x0018c92e
INC dword ptr [RAX + 0x8]
JMP 0x0018c932
LAB_0018c92e:
INC.LOCK dword ptr [RAX + 0x8]
LAB_0018c932:
MOV RAX,qword ptr [R14 + 0x20]
SUB RAX,qword ptr [R14 + 0x10]
MOV qword ptr [RSP + 0x10],RAX
LAB_0018c93f:
MOV EDI,0x58
CALL 0x0011b900
LAB_0018c949:
MOV R15,RAX
MOV RAX,0x100000001
MOV qword ptr [R15 + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [R15],RAX
MOV R12,R15
ADD R12,0x10
MOV RDI,R12
MOV RSI,RSP
MOV RDX,RBX
MOV RCX,R13
MOV R8D,0x4
CALL 0x0019aa18
MOV qword ptr [RBX],R12
MOV RDI,qword ptr [RBX + 0x8]
MOV qword ptr [RBX + 0x8],R15
TEST RDI,RDI
JZ 0x0018c995
CALL 0x00126758
LAB_0018c995:
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x0018c9a4
CALL 0x00126758
LAB_0018c9a4:
MOV RDI,qword ptr [RSP + 0x28]
TEST RDI,RDI
JZ 0x0018c883
CALL 0x00126758
JMP 0x0018c883
LAB_0018c9bc:
MOV RAX,RBX
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0018c9ce:
MOV EDI,0x10
CALL 0x0011b480
MOV R15,RAX
LAB_0018c9db:
LEA RSI,[0x1f6c0c]
MOV RDI,RAX
CALL 0x0011b350
LAB_0018c9ea:
MOV RSI,qword ptr [0x00232fe8]
MOV RDX,qword ptr [0x00232f50]
MOV RDI,R15
CALL 0x0011c040
LAB_0018ca02:
MOV EDI,0x10
CALL 0x0011b480
MOV R15,RAX
LAB_0018ca0f:
LEA RSI,[0x1f6bdd]
MOV RDI,RAX
CALL 0x0011b350
LAB_0018ca1e:
MOV RSI,qword ptr [0x00232fe8]
MOV RDX,qword ptr [0x00232f50]
MOV RDI,R15
CALL 0x0011c040
|
/* minja::Parser::parseMathPow() */
void minja::Parser::parseMathPow(void)
{
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Var1;
int8 *puVar2;
runtime_error *prVar3;
int8 *in_RSI;
long *in_RDI;
long *local_78;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_70;
long local_68 [2];
long *local_58;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_50;
long local_48 [2];
int **local_38;
parseMathPlusMinus();
if (*in_RDI == 0) {
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0018ca0f to 0018ca1d has its CatchHandler @ 0018ca36 */
std::runtime_error::runtime_error(prVar3,"Expected left side of \'math pow\' expression");
/* try { // try from 0018ca1e to 0018ca33 has its CatchHandler @ 0018ca34 */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar3,PTR_typeinfo_00232fe8,PTR__runtime_error_00232f50);
}
local_38 = &PTR___Sp_counted_ptr_inplace_00231988;
while( true ) {
local_58 = local_48;
/* try { // try from 0018c888 to 0018c89d has its CatchHandler @ 0018ca7a */
std::__cxx11::string::_M_construct<char_const*>(&local_58,&DAT_001f6c09,&DAT_001f6c0b);
/* try { // try from 0018c89e to 0018c8b0 has its CatchHandler @ 0018ca7f */
consumeToken(&local_78);
p_Var1 = local_70;
if (local_78 != local_68) {
operator_delete(local_78,local_68[0] + 1);
}
if (local_58 != local_48) {
operator_delete(local_58,local_48[0] + 1);
}
if (p_Var1 == (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) break;
/* try { // try from 0018c8f1 to 0018c8fb has its CatchHandler @ 0018ca55 */
parseMathPlusMinus();
if (local_58 == (long *)0x0) {
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0018c9db to 0018c9e9 has its CatchHandler @ 0018ca48 */
std::runtime_error::runtime_error(prVar3,"Expected right side of \'math pow\' expression");
/* try { // try from 0018c9ea to 0018c9ff has its CatchHandler @ 0018ca43 */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar3,PTR_typeinfo_00232fe8,PTR__runtime_error_00232f50);
}
local_78 = (long *)*in_RSI;
local_70 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RSI[1];
if (local_70 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
if (*PTR___libc_single_threaded_00232f78 == '\0') {
LOCK();
*(int *)(local_70 + 8) = *(int *)(local_70 + 8) + 1;
UNLOCK();
}
else {
*(int *)(local_70 + 8) = *(int *)(local_70 + 8) + 1;
}
}
local_68[0] = in_RSI[4] - in_RSI[2];
/* try { // try from 0018c93f to 0018c948 has its CatchHandler @ 0018ca57 */
puVar2 = (int8 *)operator_new(0x58);
puVar2[1] = 0x100000001;
*puVar2 = local_38;
BinaryOpExpr::BinaryOpExpr((BinaryOpExpr *)(puVar2 + 2),&local_78);
*in_RDI = (long)(puVar2 + 2);
p_Var1 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RDI[1];
in_RDI[1] = (long)puVar2;
if (p_Var1 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Var1);
}
if (local_70 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_70);
}
if (local_50 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_50);
}
}
return;
}
|
|
12,189 |
minja::Parser::parseMathPow()
|
monkey531[P]llama/common/minja.hpp
|
std::shared_ptr<Expression> parseMathPow() {
auto left = parseMathPlusMinus();
if (!left) throw std::runtime_error("Expected left side of 'math pow' expression");
while (!consumeToken("**").empty()) {
auto right = parseMathPlusMinus();
if (!right) throw std::runtime_error("Expected right side of 'math pow' expression");
left = std::make_shared<BinaryOpExpr>(get_location(), std::move(left), std::move(right), BinaryOpExpr::Op::MulMul);
}
return left;
}
|
O2
|
cpp
|
minja::Parser::parseMathPow():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r15
movq %rdi, %rbx
callq 0x675d4
cmpq $0x0, (%rbx)
je 0x67519
leaq 0x8(%rsp), %r14
leaq 0x28(%rsp), %r12
leaq 0x38(%rsp), %r13
movq %r14, %rdi
leaq 0x507b1(%rip), %rsi # 0xb7be9
movq %r12, %rdx
callq 0x29c20
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
pushq $0x1
popq %rcx
callq 0x6403e
movq 0x40(%rsp), %rbp
movq %r13, %rdi
callq 0x24348
movq %r14, %rdi
callq 0x24348
testq %rbp, %rbp
je 0x674d5
movq %r14, %rdi
movq %r15, %rsi
callq 0x675d4
cmpq $0x0, 0x8(%rsp)
je 0x674e7
movq %r13, %rdi
movq %r15, %rsi
callq 0x6360e
movl $0x4, 0x4(%rsp)
movq %r12, %rdi
movq %r13, %rsi
movq %rbx, %rdx
movq %r14, %rcx
leaq 0x4(%rsp), %r8
callq 0x675ad
movq %rbx, %rdi
movq %r12, %rsi
callq 0x74416
leaq 0x30(%rsp), %rdi
callq 0x2adb8
leaq 0x40(%rsp), %rdi
callq 0x2adb8
leaq 0x10(%rsp), %rdi
callq 0x2adb8
jmp 0x6742e
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x234b0
movq %rax, %r15
leaq 0x506f3(%rip), %rsi # 0xb7bec
movq %rax, %rdi
callq 0x23360
movq 0x9aae0(%rip), %rsi # 0x101fe8
movq 0x9aa39(%rip), %rdx # 0x101f48
movq %r15, %rdi
callq 0x24050
jmp 0x67549
pushq $0x10
popq %rdi
callq 0x234b0
movq %rax, %r15
leaq 0x50692(%rip), %rsi # 0xb7bbd
movq %rax, %rdi
callq 0x23360
movq 0x9aaae(%rip), %rsi # 0x101fe8
movq 0x9aa07(%rip), %rdx # 0x101f48
movq %r15, %rdi
callq 0x24050
jmp 0x67587
movq %rax, %r14
movq %r15, %rdi
callq 0x236f0
jmp 0x67599
jmp 0x67567
movq %rax, %r14
movq %r15, %rdi
callq 0x236f0
jmp 0x67579
movq %rax, %r14
jmp 0x67579
movq %rax, %r14
leaq 0x40(%rsp), %rdi
callq 0x2adb8
leaq 0x10(%rsp), %rdi
callq 0x2adb8
jmp 0x67599
jmp 0x67587
movq %rax, %r14
jmp 0x67599
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x24348
addq $0x8, %rbx
movq %rbx, %rdi
callq 0x2adb8
movq %r14, %rdi
callq 0x240e0
|
_ZN5minja6Parser12parseMathPowEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov r15, rsi
mov rbx, rdi
call _ZN5minja6Parser18parseMathPlusMinusEv; minja::Parser::parseMathPlusMinus(void)
cmp qword ptr [rbx], 0
jz loc_67519
lea r14, [rsp+88h+var_80]
lea r12, [rsp+88h+var_60]
lea r13, [rsp+88h+var_50]
loc_6742E:
mov rdi, r14
lea rsi, asc_B7BE9; "**"
mov rdx, r12
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
mov rdi, r13
mov rsi, r15
mov rdx, r14
push 1
pop rcx
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling)
mov rbp, [rsp+88h+var_48]
mov rdi, r13; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r14; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test rbp, rbp
jz short loc_674D5
mov rdi, r14; this
mov rsi, r15
call _ZN5minja6Parser18parseMathPlusMinusEv; minja::Parser::parseMathPlusMinus(void)
cmp [rsp+88h+var_80], 0
jz short loc_674E7
mov rdi, r13; this
mov rsi, r15
call _ZNK5minja6Parser12get_locationEv; minja::Parser::get_location(void)
mov [rsp+88h+var_84], 4
mov rdi, r12
mov rsi, r13
mov rdx, rbx
mov rcx, r14
lea r8, [rsp+88h+var_84]
call _ZSt11make_sharedIN5minja12BinaryOpExprEJNS0_8LocationESt10shared_ptrINS0_10ExpressionEES5_NS1_2OpEEES3_IT_EDpOT0_; std::make_shared<minja::BinaryOpExpr,minja::Location,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op>(minja::Location,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op &&)
mov rdi, rbx
mov rsi, r12
call _ZNSt12__shared_ptrIN5minja10ExpressionELN9__gnu_cxx12_Lock_policyE2EEaSINS0_12BinaryOpExprEEENSt9enable_ifIXsr20__sp_compatible_withIPT_PS1_EE5valueERS4_E4typeEOS_IS8_LS3_2EE
lea rdi, [rsp+88h+var_58]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+88h+var_48]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+88h+var_78]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp loc_6742E
loc_674D5:
mov rax, rbx
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_674E7:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aExpectedRightS_3; "Expected right side of 'math pow' expre"...
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, r15; void *
call ___cxa_throw
jmp short loc_67549
loc_67519:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aExpectedLeftSi_3; "Expected left side of 'math pow' expres"...
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, r15; void *
call ___cxa_throw
loc_67549:
jmp short loc_67587
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
jmp short loc_67599
jmp short loc_67567
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
jmp short loc_67579
loc_67567:
mov r14, rax
jmp short loc_67579
mov r14, rax
lea rdi, [rsp+88h+var_48]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
loc_67579:
lea rdi, [rsp+88h+var_78]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_67599
jmp short $+2
loc_67587:
mov r14, rax
jmp short loc_67599
mov r14, rax
lea rdi, [rsp+88h+var_80]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_67599:
add rbx, 8
mov rdi, rbx
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, r14
call __Unwind_Resume
|
minja::Parser * minja::Parser::parseMathPow(minja::Parser *this, _QWORD *a2)
{
long long v2; // rbp
std::runtime_error *v4; // r15
std::runtime_error *exception; // r15
int v6; // [rsp+4h] [rbp-84h] BYREF
long long v7; // [rsp+8h] [rbp-80h] BYREF
_QWORD v8[3]; // [rsp+10h] [rbp-78h] BYREF
_BYTE v9[8]; // [rsp+28h] [rbp-60h] BYREF
long long v10; // [rsp+30h] [rbp-58h] BYREF
long long v11; // [rsp+38h] [rbp-50h] BYREF
_QWORD v12[9]; // [rsp+40h] [rbp-48h] BYREF
minja::Parser::parseMathPlusMinus(this);
if ( !*(_QWORD *)this )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected left side of 'math pow' expression");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
while ( 1 )
{
std::string::basic_string<std::allocator<char>>(&v7, (long long)"**");
minja::Parser::consumeToken(&v11, (long long)a2, &v7, 1u);
v2 = v12[0];
std::string::~string(&v11);
std::string::~string(&v7);
if ( !v2 )
break;
minja::Parser::parseMathPlusMinus((minja::Parser *)&v7);
if ( !v7 )
{
v4 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(v4, "Expected right side of 'math pow' expression");
__cxa_throw(
v4,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::Parser::get_location((minja::Parser *)&v11, a2);
v6 = 4;
std::make_shared<minja::BinaryOpExpr,minja::Location,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op>(
v9,
&v11,
this,
&v7,
&v6);
std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator=<minja::BinaryOpExpr>(this, v9);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v10);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v12);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v8);
}
return this;
}
|
parseMathPow:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV R15,RSI
MOV RBX,RDI
CALL 0x001675d4
CMP qword ptr [RBX],0x0
JZ 0x00167519
LEA R14,[RSP + 0x8]
LEA R12,[RSP + 0x28]
LEA R13,[RSP + 0x38]
LAB_0016742e:
MOV RDI,R14
LEA RSI,[0x1b7be9]
MOV RDX,R12
CALL 0x00129c20
LAB_00167440:
MOV RDI,R13
MOV RSI,R15
MOV RDX,R14
PUSH 0x1
POP RCX
CALL 0x0016403e
MOV RBP,qword ptr [RSP + 0x40]
MOV RDI,R13
CALL 0x00124348
MOV RDI,R14
CALL 0x00124348
TEST RBP,RBP
JZ 0x001674d5
LAB_0016746b:
MOV RDI,R14
MOV RSI,R15
CALL 0x001675d4
CMP qword ptr [RSP + 0x8],0x0
JZ 0x001674e7
LAB_0016747e:
MOV RDI,R13
MOV RSI,R15
CALL 0x0016360e
MOV dword ptr [RSP + 0x4],0x4
LAB_00167491:
MOV RDI,R12
MOV RSI,R13
MOV RDX,RBX
MOV RCX,R14
LEA R8,[RSP + 0x4]
CALL 0x001675ad
LAB_001674a7:
MOV RDI,RBX
MOV RSI,R12
CALL 0x00174416
LEA RDI,[RSP + 0x30]
CALL 0x0012adb8
LEA RDI,[RSP + 0x40]
CALL 0x0012adb8
LEA RDI,[RSP + 0x10]
CALL 0x0012adb8
JMP 0x0016742e
LAB_001674d5:
MOV RAX,RBX
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001674e7:
PUSH 0x10
POP RDI
CALL 0x001234b0
MOV R15,RAX
LAB_001674f2:
LEA RSI,[0x1b7bec]
MOV RDI,RAX
CALL 0x00123360
LAB_00167501:
MOV RSI,qword ptr [0x00201fe8]
MOV RDX,qword ptr [0x00201f48]
MOV RDI,R15
CALL 0x00124050
LAB_00167519:
PUSH 0x10
POP RDI
CALL 0x001234b0
MOV R15,RAX
LAB_00167524:
LEA RSI,[0x1b7bbd]
MOV RDI,RAX
CALL 0x00123360
LAB_00167533:
MOV RSI,qword ptr [0x00201fe8]
MOV RDX,qword ptr [0x00201f48]
MOV RDI,R15
CALL 0x00124050
|
/* minja::Parser::parseMathPow() */
void minja::Parser::parseMathPow(void)
{
long lVar1;
runtime_error *prVar2;
__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2> *in_RDI;
long local_80;
__shared_count<(__gnu_cxx::_Lock_policy)2> local_78 [24];
Location local_60 [8];
__shared_count<(__gnu_cxx::_Lock_policy)2> local_58 [8];
string local_50 [8];
long local_48 [3];
parseMathPlusMinus();
if (*(long *)in_RDI == 0) {
prVar2 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00167524 to 00167532 has its CatchHandler @ 0016754b */
std::runtime_error::runtime_error(prVar2,"Expected left side of \'math pow\' expression");
/* try { // try from 00167533 to 00167548 has its CatchHandler @ 00167549 */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar2,PTR_typeinfo_00201fe8,PTR__runtime_error_00201f48);
}
while( true ) {
/* try { // try from 0016742e to 0016743f has its CatchHandler @ 00167587 */
std::__cxx11::string::string<std::allocator<char>>
((string *)&local_80,"**",(allocator *)local_60);
/* try { // try from 00167440 to 00167450 has its CatchHandler @ 0016758c */
consumeToken(local_50);
lVar1 = local_48[0];
std::__cxx11::string::~string(local_50);
std::__cxx11::string::~string((string *)&local_80);
if (lVar1 == 0) {
return;
}
/* try { // try from 0016746b to 00167475 has its CatchHandler @ 00167585 */
parseMathPlusMinus();
if (local_80 == 0) break;
/* try { // try from 0016747e to 00167488 has its CatchHandler @ 00167567 */
get_location();
/* try { // try from 00167491 to 001674a6 has its CatchHandler @ 0016756c */
std::
make_shared<minja::BinaryOpExpr,minja::Location,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op>
(local_60,local_50,in_RDI,(Op *)&local_80);
std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator=
(in_RDI,(__shared_ptr *)local_60);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_58);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)local_48);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_78);
}
prVar2 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001674f2 to 00167500 has its CatchHandler @ 0016755a */
std::runtime_error::runtime_error(prVar2,"Expected right side of \'math pow\' expression");
/* try { // try from 00167501 to 00167516 has its CatchHandler @ 00167558 */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar2,PTR_typeinfo_00201fe8,PTR__runtime_error_00201f48);
}
|
|
12,190 |
fmt::v10::detail::compute_width(fmt::v10::basic_string_view<char>)::count_code_points::operator()(unsigned int, fmt::v10::basic_string_view<char>) const
|
aimrt_mujoco_sim/_deps/fmt-src/include/fmt/format.h
|
FMT_CONSTEXPR auto operator()(uint32_t cp, string_view) const -> bool {
*count += detail::to_unsigned(
1 +
(cp >= 0x1100 &&
(cp <= 0x115f || // Hangul Jamo init. consonants
cp == 0x2329 || // LEFT-POINTING ANGLE BRACKET
cp == 0x232a || // RIGHT-POINTING ANGLE BRACKET
// CJK ... Yi except IDEOGRAPHIC HALF FILL SPACE:
(cp >= 0x2e80 && cp <= 0xa4cf && cp != 0x303f) ||
(cp >= 0xac00 && cp <= 0xd7a3) || // Hangul Syllables
(cp >= 0xf900 && cp <= 0xfaff) || // CJK Compatibility Ideographs
(cp >= 0xfe10 && cp <= 0xfe19) || // Vertical Forms
(cp >= 0xfe30 && cp <= 0xfe6f) || // CJK Compatibility Forms
(cp >= 0xff00 && cp <= 0xff60) || // Fullwidth Forms
(cp >= 0xffe0 && cp <= 0xffe6) || // Fullwidth Forms
(cp >= 0x20000 && cp <= 0x2fffd) || // CJK
(cp >= 0x30000 && cp <= 0x3fffd) ||
// Miscellaneous Symbols and Pictographs + Emoticons:
(cp >= 0x1f300 && cp <= 0x1f64f) ||
// Supplemental Symbols and Pictographs:
(cp >= 0x1f900 && cp <= 0x1f9ff))));
return true;
}
|
O3
|
c
|
fmt::v10::detail::compute_width(fmt::v10::basic_string_view<char>)::count_code_points::operator()(unsigned int, fmt::v10::basic_string_view<char>) const:
movl $0x1, %eax
cmpl $0x1100, %esi # imm = 0x1100
jb 0x33a03
cmpl $0x1160, %esi # imm = 0x1160
setb %al
leal -0x2329(%rsi), %ecx
cmpl $0x2, %ecx
setb %cl
orb %al, %cl
movl $0x2, %eax
jne 0x33a03
leal -0x2e80(%rsi), %ecx
cmpl $0x7650, %ecx # imm = 0x7650
setb %cl
cmpl $0x303f, %esi # imm = 0x303F
setne %dl
movl %esi, %r8d
andl $0xfffefffe, %r8d # imm = 0xFFFEFFFE
movd %esi, %xmm0
movd %r8d, %xmm1
punpckldq %xmm0, %xmm1 # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
pshufd $0x50, %xmm0, %xmm2 # xmm2 = xmm0[0,0,1,1]
punpcklqdq %xmm1, %xmm2 # xmm2 = xmm2[0],xmm1[0]
pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0]
paddd 0x4f6b0(%rip), %xmm2 # 0x83060
paddd 0x4f6b8(%rip), %xmm0 # 0x83070
movdqa 0x4f660(%rip), %xmm1 # 0x83020
pxor %xmm1, %xmm0
pcmpgtd 0x4f6b4(%rip), %xmm0 # 0x83080
pxor %xmm1, %xmm2
pcmpgtd 0x4f6b8(%rip), %xmm2 # 0x83090
packssdw %xmm2, %xmm0
packsswb %xmm0, %xmm0
pmovmskb %xmm0, %r8d
xorb $-0x1, %r8b
jne 0x33a03
andb %cl, %dl
jne 0x33a03
andl $0xffffff00, %esi # imm = 0xFFFFFF00
xorl %eax, %eax
cmpl $0x1f900, %esi # imm = 0x1F900
sete %al
incq %rax
movq (%rdi), %rcx
addq %rax, (%rcx)
movb $0x1, %al
retq
|
_ZZN3fmt3v106detail13compute_widthENS0_17basic_string_viewIcEEENK17count_code_pointsclEjS3_:
mov eax, 1
cmp esi, 1100h
jb loc_33A03
cmp esi, 1160h
setb al
lea ecx, [rsi-2329h]
cmp ecx, 2
setb cl
or cl, al
mov eax, 2
jnz loc_33A03
lea ecx, [rsi-2E80h]
cmp ecx, 7650h
setb cl
cmp esi, 303Fh
setnz dl
mov r8d, esi
and r8d, 0FFFEFFFEh
movd xmm0, esi
movd xmm1, r8d
punpckldq xmm1, xmm0
pshufd xmm2, xmm0, 50h ; 'P'
punpcklqdq xmm2, xmm1
pshufd xmm0, xmm0, 0
paddd xmm2, cs:xmmword_83060
paddd xmm0, cs:xmmword_83070
movdqa xmm1, cs:xmmword_83020
pxor xmm0, xmm1
pcmpgtd xmm0, cs:xmmword_83080
pxor xmm2, xmm1
pcmpgtd xmm2, cs:xmmword_83090
packssdw xmm0, xmm2
packsswb xmm0, xmm0
pmovmskb r8d, xmm0
xor r8b, 0FFh
jnz short loc_33A03
and dl, cl
jnz short loc_33A03
and esi, 0FFFFFF00h
xor eax, eax
cmp esi, offset _fprintf
setz al
inc rax
loc_33A03:
mov rcx, [rdi]
add [rcx], rax
mov al, 1
retn
|
char fmt::v10::detail::compute_width(fmt::v10::basic_string_view<char>)::count_code_points::operator()(
_QWORD **a1,
unsigned int a2)
{
long long v2; // rax
__m128i v3; // xmm0
__m128i si128; // xmm1
__m128i v5; // xmm0
v2 = 1LL;
if ( a2 >= 0x1100 )
{
v2 = 2LL;
if ( a2 >= 0x1160 && a2 - 9001 >= 2 )
{
v3 = _mm_cvtsi32_si128(a2);
si128 = _mm_load_si128((const __m128i *)&xmmword_83020);
v5 = _mm_packs_epi32(
_mm_cmpgt_epi32(
_mm_xor_si128(_mm_add_epi32(_mm_shuffle_epi32(v3, 0), (__m128i)xmmword_83070), si128),
(__m128i)xmmword_83080),
_mm_cmpgt_epi32(
_mm_xor_si128(
_mm_add_epi32(
_mm_unpacklo_epi64(
_mm_shuffle_epi32(v3, 80),
_mm_unpacklo_epi32(_mm_cvtsi32_si128(a2 & 0xFFFEFFFE), v3)),
(__m128i)xmmword_83060),
si128),
(__m128i)xmmword_83090));
if ( (unsigned __int8)_mm_movemask_epi8(_mm_packs_epi16(v5, v5)) == 0xFF && (a2 - 11904 >= 0x7650 || a2 == 12351) )
v2 = ((a2 & 0xFFFFFF00) == (_DWORD)fprintf) + 1LL;
}
}
**a1 += v2;
return 1;
}
|
operator():
MOV EAX,0x1
CMP ESI,0x1100
JC 0x00133a03
CMP ESI,0x1160
SETC AL
LEA ECX,[RSI + -0x2329]
CMP ECX,0x2
SETC CL
OR CL,AL
MOV EAX,0x2
JNZ 0x00133a03
LEA ECX,[RSI + -0x2e80]
CMP ECX,0x7650
SETC CL
CMP ESI,0x303f
SETNZ DL
MOV R8D,ESI
AND R8D,0xfffefffe
MOVD XMM0,ESI
MOVD XMM1,R8D
PUNPCKLDQ XMM1,XMM0
PSHUFD XMM2,XMM0,0x50
PUNPCKLQDQ XMM2,XMM1
PSHUFD XMM0,XMM0,0x0
PADDD XMM2,xmmword ptr [0x00183060]
PADDD XMM0,xmmword ptr [0x00183070]
MOVDQA XMM1,xmmword ptr [0x00183020]
PXOR XMM0,XMM1
PCMPGTD XMM0,xmmword ptr [0x00183080]
PXOR XMM2,XMM1
PCMPGTD XMM2,xmmword ptr [0x00183090]
PACKSSDW XMM0,XMM2
PACKSSWB XMM0,XMM0
PMOVMSKB R8D,XMM0
XOR R8B,0xff
JNZ 0x00133a03
AND DL,CL
JNZ 0x00133a03
AND ESI,0xffffff00
XOR EAX,EAX
CMP ESI,0x1f900
SETZ AL
INC RAX
LAB_00133a03:
MOV RCX,qword ptr [RDI]
ADD qword ptr [RCX],RAX
MOV AL,0x1
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* fmt::v10::detail::compute_width(fmt::v10::basic_string_view<char>)::count_code_points::TEMPNAMEPLACEHOLDERVALUE(unsigned
int, fmt::v10::basic_string_view<char>) const */
int8
fmt::v10::detail::compute_width(fmt::v10::basic_string_view<char>)::count_code_points::operator()
(int8 *param_1,uint param_2)
{
long lVar1;
int1 auVar2 [16];
int1 auVar3 [16];
lVar1 = 1;
if ((0x10ff < param_2) && (lVar1 = 2, 1 < param_2 - 0x2329 && 0x115f < param_2)) {
auVar2._0_4_ = -(uint)(_DAT_00183080 < (int)(param_2 + _DAT_00183070 ^ _DAT_00183020));
auVar2._4_4_ = -(uint)(_UNK_00183084 < (int)(param_2 + _UNK_00183074 ^ _UNK_00183024));
auVar2._8_4_ = -(uint)(_UNK_00183088 < (int)(param_2 + _UNK_00183078 ^ _UNK_00183028));
auVar2._12_4_ = -(uint)(_UNK_0018308c < (int)(param_2 + _UNK_0018307c ^ _UNK_0018302c));
auVar3._0_4_ = -(uint)(_DAT_00183090 < (int)(param_2 + ram0x00183060 ^ _DAT_00183020));
auVar3._4_4_ = -(uint)(_UNK_00183094 < (int)(param_2 + _UNK_00183064 ^ _UNK_00183024));
auVar3._8_4_ = -(uint)(_UNK_00183098 <
(int)((param_2 & 0xfffefffe) + _UNK_00183068 ^ _UNK_00183028));
auVar3._12_4_ = -(uint)(_UNK_0018309c < (int)(param_2 + _UNK_0018306c ^ _UNK_0018302c));
auVar2 = packssdw(auVar2,auVar3);
auVar2 = packsswb(auVar2,auVar2);
if (((byte)(SUB161(auVar2 >> 7,0) & 1 | (SUB161(auVar2 >> 0xf,0) & 1) << 1 |
(SUB161(auVar2 >> 0x17,0) & 1) << 2 | (SUB161(auVar2 >> 0x1f,0) & 1) << 3 |
(SUB161(auVar2 >> 0x27,0) & 1) << 4 | (SUB161(auVar2 >> 0x2f,0) & 1) << 5 |
(SUB161(auVar2 >> 0x37,0) & 1) << 6 | SUB161(auVar2 >> 0x3f,0) << 7) == 0xff) &&
(param_2 == 0x303f || 0x764f < param_2 - 0x2e80)) {
lVar1 = (ulong)((param_2 & 0xffffff00) == 0x1f900) + 1;
}
}
*(long *)*param_1 = *(long *)*param_1 + lVar1;
return 1;
}
|
|
12,191 |
check_mb_utf8_valid
|
eloqsql/libmariadb/libmariadb/ma_charset.c
|
static unsigned int check_mb_utf8_valid(const char *start, const char *end)
{
unsigned int len = check_mb_utf8_sequence(start, end);
return (len > 1)? len:0;
}
|
O3
|
c
|
check_mb_utf8_valid:
pushq %rbp
movq %rsp, %rbp
cmpq %rsi, %rdi
jae 0x30927
movb (%rdi), %al
cmpb $-0x3e, %al
jae 0x3092b
xorl %eax, %eax
popq %rbp
retq
cmpb $-0x21, %al
ja 0x30945
leaq 0x2(%rdi), %rax
cmpq %rsi, %rax
ja 0x30927
movl $0x2, %eax
cmpb $-0x40, 0x1(%rdi)
jge 0x30927
jmp 0x30929
cmpb $-0x11, %al
ja 0x30976
leaq 0x3(%rdi), %rcx
cmpq %rsi, %rcx
ja 0x30927
movb 0x1(%rdi), %cl
cmpb $-0x41, %cl
jg 0x30927
cmpb $-0x41, 0x2(%rdi)
jg 0x30927
cmpb $-0x20, %al
setne %al
cmpb $-0x60, %cl
setae %cl
orb %al, %cl
movl $0x3, %eax
je 0x30927
jmp 0x30929
cmpb $-0xb, %al
setae %cl
leaq 0x4(%rdi), %rdx
cmpq %rsi, %rdx
seta %dl
orb %cl, %dl
jne 0x30927
movb 0x1(%rdi), %cl
cmpb $-0x41, %cl
jg 0x30927
cmpb $-0x41, 0x2(%rdi)
jg 0x30927
cmpb $-0x41, 0x3(%rdi)
jg 0x30927
cmpb $-0x10, %al
sete %dl
cmpb $-0x70, %cl
setb %sil
testb %sil, %dl
jne 0x30927
cmpb $-0xc, %al
setne %al
cmpb $-0x70, %cl
setb %cl
orb %al, %cl
movl $0x4, %eax
je 0x30927
jmp 0x30929
|
check_mb_utf8_valid:
push rbp
mov rbp, rsp
cmp rdi, rsi
jnb short loc_30927
mov al, [rdi]
cmp al, 0C2h
jnb short loc_3092B
loc_30927:
xor eax, eax
loc_30929:
pop rbp
retn
loc_3092B:
cmp al, 0DFh
ja short loc_30945
lea rax, [rdi+2]
cmp rax, rsi
ja short loc_30927
mov eax, 2
cmp byte ptr [rdi+1], 0C0h
jge short loc_30927
jmp short loc_30929
loc_30945:
cmp al, 0EFh
ja short loc_30976
lea rcx, [rdi+3]
cmp rcx, rsi
ja short loc_30927
mov cl, [rdi+1]
cmp cl, 0BFh
jg short loc_30927
cmp byte ptr [rdi+2], 0BFh
jg short loc_30927
cmp al, 0E0h
setnz al
cmp cl, 0A0h
setnb cl
or cl, al
mov eax, 3
jz short loc_30927
jmp short loc_30929
loc_30976:
cmp al, 0F5h
setnb cl
lea rdx, [rdi+4]
cmp rdx, rsi
setnbe dl
or dl, cl
jnz short loc_30927
mov cl, [rdi+1]
cmp cl, 0BFh
jg short loc_30927
cmp byte ptr [rdi+2], 0BFh
jg short loc_30927
cmp byte ptr [rdi+3], 0BFh
jg short loc_30927
cmp al, 0F0h
setz dl
cmp cl, 90h
setb sil
test dl, sil
jnz loc_30927
cmp al, 0F4h
setnz al
cmp cl, 90h
setb cl
or cl, al
mov eax, 4
jz loc_30927
jmp loc_30929
|
long long check_mb_utf8_valid(unsigned __int8 *a1, unsigned long long a2)
{
unsigned __int8 v2; // al
long long result; // rax
char v4; // cl
bool v5; // cl
char v6; // cl
bool v7; // cl
if ( (unsigned long long)a1 >= a2 )
return 0LL;
v2 = *a1;
if ( *a1 < 0xC2u )
return 0LL;
if ( v2 <= 0xDFu )
{
if ( (unsigned long long)(a1 + 2) <= a2 )
{
result = 2LL;
if ( (char)a1[1] < -64 )
return result;
}
return 0LL;
}
if ( v2 > 0xEFu )
{
if ( v2 >= 0xF5u || (unsigned long long)(a1 + 4) > a2 )
return 0LL;
v6 = a1[1];
if ( v6 > -65 )
return 0LL;
if ( (char)a1[2] > -65 )
return 0LL;
if ( (char)a1[3] > -65 )
return 0LL;
if ( (unsigned __int8)v6 < 0x90u && v2 == 0xF0 )
return 0LL;
v7 = v2 != 0xF4 || (unsigned __int8)v6 < 0x90u;
result = 4LL;
if ( !v7 )
return 0LL;
}
else
{
if ( (unsigned long long)(a1 + 3) > a2 )
return 0LL;
v4 = a1[1];
if ( v4 > -65 )
return 0LL;
if ( (char)a1[2] > -65 )
return 0LL;
v5 = v2 != 0xE0 || (unsigned __int8)v4 >= 0xA0u;
result = 3LL;
if ( !v5 )
return 0LL;
}
return result;
}
|
check_mb_utf8_valid:
PUSH RBP
MOV RBP,RSP
CMP RDI,RSI
JNC 0x00130927
MOV AL,byte ptr [RDI]
CMP AL,0xc2
JNC 0x0013092b
LAB_00130927:
XOR EAX,EAX
LAB_00130929:
POP RBP
RET
LAB_0013092b:
CMP AL,0xdf
JA 0x00130945
LEA RAX,[RDI + 0x2]
CMP RAX,RSI
JA 0x00130927
MOV EAX,0x2
CMP byte ptr [RDI + 0x1],0xc0
JGE 0x00130927
JMP 0x00130929
LAB_00130945:
CMP AL,0xef
JA 0x00130976
LEA RCX,[RDI + 0x3]
CMP RCX,RSI
JA 0x00130927
MOV CL,byte ptr [RDI + 0x1]
CMP CL,0xbf
JG 0x00130927
CMP byte ptr [RDI + 0x2],0xbf
JG 0x00130927
CMP AL,0xe0
SETNZ AL
CMP CL,0xa0
SETNC CL
OR CL,AL
MOV EAX,0x3
JZ 0x00130927
JMP 0x00130929
LAB_00130976:
CMP AL,0xf5
SETNC CL
LEA RDX,[RDI + 0x4]
CMP RDX,RSI
SETA DL
OR DL,CL
JNZ 0x00130927
MOV CL,byte ptr [RDI + 0x1]
CMP CL,0xbf
JG 0x00130927
CMP byte ptr [RDI + 0x2],0xbf
JG 0x00130927
CMP byte ptr [RDI + 0x3],0xbf
JG 0x00130927
CMP AL,0xf0
SETZ DL
CMP CL,0x90
SETC SIL
TEST DL,SIL
JNZ 0x00130927
CMP AL,0xf4
SETNZ AL
CMP CL,0x90
SETC CL
OR CL,AL
MOV EAX,0x4
JZ 0x00130927
JMP 0x00130929
|
int8 check_mb_utf8_valid(byte *param_1,byte *param_2)
{
byte bVar1;
byte bVar2;
if ((param_1 < param_2) && (bVar1 = *param_1, 0xc1 < bVar1)) {
if (bVar1 < 0xe0) {
if ((param_1 + 2 <= param_2) && ((char)param_1[1] < -0x40)) {
return 2;
}
}
else if (bVar1 < 0xf0) {
if (((param_1 + 3 <= param_2) && ((char)param_1[1] < -0x40)) &&
(((char)param_1[2] < -0x40 && (0x9f < param_1[1] || bVar1 != 0xe0)))) {
return 3;
}
}
else if (((((param_1 + 4 <= param_2 && bVar1 < 0xf5) &&
(bVar2 = param_1[1], (char)bVar2 < -0x40)) && ((char)param_1[2] < -0x40)) &&
(((char)param_1[3] < -0x40 && (bVar1 != 0xf0 || 0x8f < bVar2)))) &&
(bVar2 < 0x90 || bVar1 != 0xf4)) {
return 4;
}
}
return 0;
}
|
|
12,192 |
std::vector<findPeaks::lmr_peak_index_t, std::allocator<findPeaks::lmr_peak_index_t>> findPeaks::apply_mask<findPeaks::lmr_peak_index_t>(std::vector<findPeaks::lmr_peak_index_t, std::allocator<findPeaks::lmr_peak_index_t>> const&, std::vector<bool, std::allocator<bool>> const&)
|
giladroyz[P]FindPeaks/src/cpp/find_peaks.cpp
|
std::vector<T> apply_mask(const std::vector<T> &vec, const std::vector<bool> &mask) {
std::vector<T> result;
for (size_t p = 0; p < vec.size(); p++)
if (mask[p]) result.push_back(vec[p]);
return result;
}
|
O1
|
cpp
|
std::vector<findPeaks::lmr_peak_index_t, std::allocator<findPeaks::lmr_peak_index_t>> findPeaks::apply_mask<findPeaks::lmr_peak_index_t>(std::vector<findPeaks::lmr_peak_index_t, std::allocator<findPeaks::lmr_peak_index_t>> const&, std::vector<bool, std::allocator<bool>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq (%rsi), %rdx
cmpq %rdx, 0x8(%rsi)
je 0x3ea51
movq %rsi, %r15
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
xorl %r13d, %r13d
leaq 0x3f(%rax), %rbp
xorl %r12d, %r12d
leaq 0x3f(%r12), %rax
testq %r12, %r12
cmovnsq %r12, %rax
sarq $0x6, %rax
shlq $0x3, %rax
addq (%r14), %rax
movq %r12, %rcx
andq %rbp, %rcx
xorl %esi, %esi
movabsq $-0x8000000000000000, %rdi # imm = 0x8000000000000000
cmpq %rdi, %rcx
setbe %sil
movq -0x8(%rax,%rsi,8), %rax
btq %r12, %rax
jae 0x3ea37
addq %r13, %rdx
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x3ea2f
movsd (%rdx), %xmm0
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x3ea37
movq %rbx, %rdi
callq 0x3f79a
incq %r12
movq (%r15), %rdx
movq 0x8(%r15), %rax
subq %rdx, %rax
sarq $0x3, %rax
addq $0x8, %r13
cmpq %rax, %r12
jb 0x3e9d5
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x3ea73
callq 0x8470
movq %r14, %rdi
callq 0x8990
|
_ZN9findPeaks10apply_maskIdEESt6vectorIT_SaIS2_EERKS4_RKS1_IbSaIbEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rdx
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi], xmm0
mov qword ptr [rdi+10h], 0
mov rdx, [rsi]
cmp [rsi+8], rdx
jz loc_3EA51
mov r15, rsi
mov rax, 8000000000000000h
xor r13d, r13d
lea rbp, [rax+3Fh]
xor r12d, r12d
loc_3E9D5:
lea rax, [r12+3Fh]
test r12, r12
cmovns rax, r12
sar rax, 6
shl rax, 3
add rax, [r14]
mov rcx, r12
and rcx, rbp
xor esi, esi
mov rdi, 8000000000000000h
cmp rcx, rdi
setbe sil
mov rax, [rax+rsi*8-8]
bt rax, r12
jnb short loc_3EA37
add rdx, r13
mov rsi, [rbx+8]
cmp rsi, [rbx+10h]
jz short loc_3EA2F
movsd xmm0, qword ptr [rdx]
movsd qword ptr [rsi], xmm0
add rsi, 8
mov [rbx+8], rsi
jmp short loc_3EA37
loc_3EA2F:
mov rdi, rbx
call _ZNSt6vectorIdSaIdEE17_M_realloc_insertIJRKdEEEvN9__gnu_cxx17__normal_iteratorIPdS1_EEDpOT_; std::vector<double>::_M_realloc_insert<double const&>(__gnu_cxx::__normal_iterator<double *,std::vector<double>>,double const&)
loc_3EA37:
inc r12
mov rdx, [r15]
mov rax, [r15+8]
sub rax, rdx
sar rax, 3
add r13, 8
cmp r12, rax
jb short loc_3E9D5
loc_3EA51:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r14, rax
mov rdi, [rbx]; void *
test rdi, rdi
jz short loc_3EA73
call __ZdlPv; operator delete(void *)
loc_3EA73:
mov rdi, r14
call __Unwind_Resume
|
long long findPeaks::apply_mask<double>(long long a1, long long *a2, _QWORD *a3)
{
long long v4; // rdx
long long v6; // r13
unsigned long long v7; // r12
long long v8; // rax
_QWORD *v9; // rdx
_QWORD *v10; // rsi
*(_OWORD *)a1 = 0LL;
*(_QWORD *)(a1 + 16) = 0LL;
v4 = *a2;
if ( a2[1] != *a2 )
{
v6 = 0LL;
v7 = 0LL;
do
{
v8 = *(_QWORD *)(*a3 + 8 * ((long long)v7 / 64) + 8LL * ((v7 & 0x800000000000003FLL) <= 0x8000000000000000LL) - 8);
if ( _bittest64(&v8, v7) )
{
v9 = (_QWORD *)(v6 + v4);
v10 = *(_QWORD **)(a1 + 8);
if ( v10 == *(_QWORD **)(a1 + 16) )
{
std::vector<double>::_M_realloc_insert<double const&>(a1, v10, v9);
}
else
{
*v10 = *v9;
*(_QWORD *)(a1 + 8) = v10 + 1;
}
}
++v7;
v4 = *a2;
v6 += 8LL;
}
while ( v7 < (a2[1] - *a2) >> 3 );
}
return a1;
}
|
apply_mask<double>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RDX
MOV RBX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI],XMM0
MOV qword ptr [RDI + 0x10],0x0
MOV RDX,qword ptr [RSI]
CMP qword ptr [RSI + 0x8],RDX
JZ 0x0013ea51
MOV R15,RSI
MOV RAX,-0x8000000000000000
XOR R13D,R13D
LEA RBP,[RAX + 0x3f]
XOR R12D,R12D
LAB_0013e9d5:
LEA RAX,[R12 + 0x3f]
TEST R12,R12
CMOVNS RAX,R12
SAR RAX,0x6
SHL RAX,0x3
ADD RAX,qword ptr [R14]
MOV RCX,R12
AND RCX,RBP
XOR ESI,ESI
MOV RDI,-0x8000000000000000
CMP RCX,RDI
SETBE SIL
MOV RAX,qword ptr [RAX + RSI*0x8 + -0x8]
BT RAX,R12
JNC 0x0013ea37
ADD RDX,R13
MOV RSI,qword ptr [RBX + 0x8]
CMP RSI,qword ptr [RBX + 0x10]
JZ 0x0013ea2f
MOVSD XMM0,qword ptr [RDX]
MOVSD qword ptr [RSI],XMM0
ADD RSI,0x8
MOV qword ptr [RBX + 0x8],RSI
JMP 0x0013ea37
LAB_0013ea2f:
MOV RDI,RBX
CALL 0x0013f79a
LAB_0013ea37:
INC R12
MOV RDX,qword ptr [R15]
MOV RAX,qword ptr [R15 + 0x8]
SUB RAX,RDX
SAR RAX,0x3
ADD R13,0x8
CMP R12,RAX
JC 0x0013e9d5
LAB_0013ea51:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* std::vector<double, std::allocator<double> > findPeaks::apply_mask<double>(std::vector<double,
std::allocator<double> > const&, std::vector<bool, std::allocator<bool> > const&) */
findPeaks * __thiscall
findPeaks::apply_mask<double>(findPeaks *this,vector *param_1,vector *param_2)
{
int8 *puVar1;
ulong uVar2;
long lVar3;
ulong uVar4;
long lVar5;
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
lVar3 = *(long *)param_1;
if (*(long *)(param_1 + 8) != lVar3) {
lVar5 = 0;
uVar4 = 0;
do {
uVar2 = uVar4 + 0x3f;
if (-1 < (long)uVar4) {
uVar2 = uVar4;
}
if ((*(ulong *)(((long)uVar2 >> 6) * 8 + *(long *)param_2 + -8 +
(ulong)((uVar4 & 0x800000000000003f) < 0x8000000000000001) * 8) >>
(uVar4 & 0x3f) & 1) != 0) {
puVar1 = *(int8 **)(this + 8);
if (puVar1 == *(int8 **)(this + 0x10)) {
/* try { // try from 0013ea2f to 0013ea36 has its CatchHandler @ 0013ea63 */
std::vector<double,std::allocator<double>>::_M_realloc_insert<double_const&>
((vector<double,std::allocator<double>> *)this);
}
else {
*puVar1 = *(int8 *)(lVar3 + lVar5);
*(int8 **)(this + 8) = puVar1 + 1;
}
}
uVar4 = uVar4 + 1;
lVar3 = *(long *)param_1;
lVar5 = lVar5 + 8;
} while (uVar4 < (ulong)(*(long *)(param_1 + 8) - lVar3 >> 3));
}
return this;
}
|
|
12,193 |
ggml_compute_forward_timestep_embedding_f32
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c
|
static void ggml_compute_forward_timestep_embedding_f32(
const struct ggml_compute_params * params,
struct ggml_tensor * dst) {
const struct ggml_tensor * src0 = dst->src[0];
GGML_ASSERT(src0->nb[0] == sizeof(float));
const int ith = params->ith;
const int nth = params->nth;
GGML_TENSOR_UNARY_OP_LOCALS
const int dim = ggml_get_op_params_i32(dst, 0);
const int max_period = ggml_get_op_params_i32(dst, 1);
int half = dim / 2;
for (int64_t i = 0; i < ne00; i++) {
float * embed_data = (float *)((char *) dst->data + i*nb1);
for (int64_t j = ith; j < half; j += nth) {
float timestep = ((float *)src0->data)[i];
float freq = (float)expf(-logf(max_period) * j / half);
float arg = timestep * freq;
embed_data[j] = cosf(arg);
embed_data[j + half] = sinf(arg);
}
if (dim % 2 != 0 && ith == 0) {
embed_data[dim] = 0.f;
}
}
}
|
O0
|
c
|
ggml_compute_forward_timestep_embedding_f32:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x4, 0x30(%rax)
je 0x34c1e
leaq 0x3ef5e(%rip), %rdi # 0x73b62
movl $0x298d, %esi # imm = 0x298D
leaq 0x3efb1(%rip), %rdx # 0x73bc1
leaq 0x3fc26(%rip), %rcx # 0x7483d
movb $0x0, %al
callq 0xe270
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x68(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x70(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x78(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x80(%rbp)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x88(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x90(%rbp)
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x98(%rbp)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0xa0(%rbp)
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x18f70
movl %eax, -0xa4(%rbp)
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x18f70
movl %eax, -0xa8(%rbp)
movl -0xa4(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, -0xac(%rbp)
movq $0x0, -0xb8(%rbp)
movq -0xb8(%rbp), %rax
cmpq -0x28(%rbp), %rax
jge 0x34eb9
movq -0x10(%rbp), %rax
movq 0xf8(%rax), %rax
movq -0xb8(%rbp), %rcx
imulq -0x90(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0xc0(%rbp)
movslq -0x1c(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0xc8(%rbp), %rax
movslq -0xac(%rbp), %rcx
cmpq %rcx, %rax
jge 0x34e70
movq -0x18(%rbp), %rax
movq 0xf8(%rax), %rax
movq -0xb8(%rbp), %rcx
vmovss (%rax,%rcx,4), %xmm0
vmovss %xmm0, -0xcc(%rbp)
vcvtsi2ssl -0xa8(%rbp), %xmm0, %xmm0
callq 0xe550
vmovd %xmm0, %eax
xorl $0x80000000, %eax # imm = 0x80000000
vmovd %eax, %xmm0
vcvtsi2ssq -0xc8(%rbp), %xmm1, %xmm1
vmulss %xmm1, %xmm0, %xmm0
vcvtsi2ssl -0xac(%rbp), %xmm1, %xmm1
vdivss %xmm1, %xmm0, %xmm0
callq 0xe210
vmovss %xmm0, -0xd0(%rbp)
vmovss -0xcc(%rbp), %xmm0
vmulss -0xd0(%rbp), %xmm0, %xmm0
vmovss %xmm0, -0xd4(%rbp)
vmovss -0xd4(%rbp), %xmm0
callq 0xd770
movq -0xc0(%rbp), %rax
movq -0xc8(%rbp), %rcx
vmovss %xmm0, (%rax,%rcx,4)
vmovss -0xd4(%rbp), %xmm0
callq 0xd8c0
movq -0xc0(%rbp), %rax
movq -0xc8(%rbp), %rcx
movslq -0xac(%rbp), %rdx
addq %rdx, %rcx
vmovss %xmm0, (%rax,%rcx,4)
movslq -0x20(%rbp), %rax
addq -0xc8(%rbp), %rax
movq %rax, -0xc8(%rbp)
jmp 0x34d81
movl -0xa4(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
je 0x34ea0
cmpl $0x0, -0x1c(%rbp)
jne 0x34ea0
movq -0xc0(%rbp), %rax
movslq -0xa4(%rbp), %rcx
vpxor %xmm0, %xmm0, %xmm0
vmovss %xmm0, (%rax,%rcx,4)
jmp 0x34ea2
movq -0xb8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xb8(%rbp)
jmp 0x34d41
addq $0xe0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
ggml_compute_forward_timestep_embedding_f32:
push rbp
mov rbp, rsp
sub rsp, 0E0h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_10]
mov rax, [rax+98h]
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
cmp qword ptr [rax+30h], 4
jz short loc_34C1E
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov esi, 298Dh
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aSrc0Nb0SizeofF; "src0->nb[0] == sizeof(float)"
mov al, 0
call _ggml_abort
loc_34C1E:
mov rax, [rbp+var_8]
mov eax, [rax]
mov [rbp+var_1C], eax
mov rax, [rbp+var_8]
mov eax, [rax+4]
mov [rbp+var_20], eax
mov rax, [rbp+var_18]
mov rax, [rax+10h]
mov [rbp+var_28], rax
mov rax, [rbp+var_18]
mov rax, [rax+18h]
mov [rbp+var_30], rax
mov rax, [rbp+var_18]
mov rax, [rax+20h]
mov [rbp+var_38], rax
mov rax, [rbp+var_18]
mov rax, [rax+28h]
mov [rbp+var_40], rax
mov rax, [rbp+var_18]
mov rax, [rax+30h]
mov [rbp+var_48], rax
mov rax, [rbp+var_18]
mov rax, [rax+38h]
mov [rbp+var_50], rax
mov rax, [rbp+var_18]
mov rax, [rax+40h]
mov [rbp+var_58], rax
mov rax, [rbp+var_18]
mov rax, [rax+48h]
mov [rbp+var_60], rax
mov rax, [rbp+var_10]
mov rax, [rax+10h]
mov [rbp+var_68], rax
mov rax, [rbp+var_10]
mov rax, [rax+18h]
mov [rbp+var_70], rax
mov rax, [rbp+var_10]
mov rax, [rax+20h]
mov [rbp+var_78], rax
mov rax, [rbp+var_10]
mov rax, [rax+28h]
mov [rbp+var_80], rax
mov rax, [rbp+var_10]
mov rax, [rax+30h]
mov [rbp+var_88], rax
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov [rbp+var_90], rax
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov [rbp+var_98], rax
mov rax, [rbp+var_10]
mov rax, [rax+48h]
mov [rbp+var_A0], rax
mov rdi, [rbp+var_10]
xor esi, esi
call ggml_get_op_params_i32
mov [rbp+var_A4], eax
mov rdi, [rbp+var_10]
mov esi, 1
call ggml_get_op_params_i32
mov [rbp+var_A8], eax
mov eax, [rbp+var_A4]
mov ecx, 2
cdq
idiv ecx
mov [rbp+var_AC], eax
mov [rbp+var_B8], 0
loc_34D41:
mov rax, [rbp+var_B8]
cmp rax, [rbp+var_28]
jge loc_34EB9
mov rax, [rbp+var_10]
mov rax, [rax+0F8h]
mov rcx, [rbp+var_B8]
imul rcx, [rbp+var_90]
add rax, rcx
mov [rbp+var_C0], rax
movsxd rax, [rbp+var_1C]
mov [rbp+var_C8], rax
loc_34D81:
mov rax, [rbp+var_C8]
movsxd rcx, [rbp+var_AC]
cmp rax, rcx
jge loc_34E70
mov rax, [rbp+var_18]
mov rax, [rax+0F8h]
mov rcx, [rbp+var_B8]
vmovss xmm0, dword ptr [rax+rcx*4]
vmovss [rbp+var_CC], xmm0
vcvtsi2ss xmm0, xmm0, [rbp+var_A8]
call _logf
vmovd eax, xmm0
xor eax, 80000000h
vmovd xmm0, eax
vcvtsi2ss xmm1, xmm1, [rbp+var_C8]
vmulss xmm0, xmm0, xmm1
vcvtsi2ss xmm1, xmm1, [rbp+var_AC]
vdivss xmm0, xmm0, xmm1
call _expf
vmovss [rbp+var_D0], xmm0
vmovss xmm0, [rbp+var_CC]
vmulss xmm0, xmm0, [rbp+var_D0]
vmovss [rbp+var_D4], xmm0
vmovss xmm0, [rbp+var_D4]
call _cosf
mov rax, [rbp+var_C0]
mov rcx, [rbp+var_C8]
vmovss dword ptr [rax+rcx*4], xmm0
vmovss xmm0, [rbp+var_D4]
call _sinf
mov rax, [rbp+var_C0]
mov rcx, [rbp+var_C8]
movsxd rdx, [rbp+var_AC]
add rcx, rdx
vmovss dword ptr [rax+rcx*4], xmm0
movsxd rax, [rbp+var_20]
add rax, [rbp+var_C8]
mov [rbp+var_C8], rax
jmp loc_34D81
loc_34E70:
mov eax, [rbp+var_A4]
mov ecx, 2
cdq
idiv ecx
cmp edx, 0
jz short loc_34EA0
cmp [rbp+var_1C], 0
jnz short loc_34EA0
mov rax, [rbp+var_C0]
movsxd rcx, [rbp+var_A4]
vpxor xmm0, xmm0, xmm0
vmovss dword ptr [rax+rcx*4], xmm0
loc_34EA0:
jmp short $+2
loc_34EA2:
mov rax, [rbp+var_B8]
add rax, 1
mov [rbp+var_B8], rax
jmp loc_34D41
loc_34EB9:
add rsp, 0E0h
pop rbp
retn
|
long long ggml_compute_forward_timestep_embedding_f32(int *a1, _QWORD *a2, __m128 _XMM0, __m128 _XMM1)
{
long long result; // rax
long long j; // [rsp+18h] [rbp-C8h]
long long v27; // [rsp+20h] [rbp-C0h]
long long i; // [rsp+28h] [rbp-B8h]
int v29; // [rsp+34h] [rbp-ACh]
int op_params_i32; // [rsp+3Ch] [rbp-A4h]
long long v31; // [rsp+50h] [rbp-90h]
long long v32; // [rsp+B8h] [rbp-28h]
int v33; // [rsp+C0h] [rbp-20h]
int v34; // [rsp+C4h] [rbp-1Ch]
_QWORD *v35; // [rsp+C8h] [rbp-18h]
v35 = (_QWORD *)a2[19];
if ( v35[6] != 4LL )
*(double *)_XMM0.m128_u64 = ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c",
10637LL,
"GGML_ASSERT(%s) failed",
"src0->nb[0] == sizeof(float)");
v34 = *a1;
v33 = a1[1];
v32 = v35[2];
v31 = a2[7];
op_params_i32 = ggml_get_op_params_i32((long long)a2, 0);
ggml_get_op_params_i32((long long)a2, 1u);
v29 = op_params_i32 / 2;
for ( i = 0LL; ; ++i )
{
result = i;
if ( i >= v32 )
break;
v27 = v31 * i + a2[31];
for ( j = v34; j < v29; j += v33 )
{
_RAX = v35[31];
_RCX = i;
__asm
{
vmovss xmm0, dword ptr [rax+rcx*4]
vmovss [rbp+var_CC], xmm0
vcvtsi2ss xmm0, xmm0, [rbp+var_A8]
}
*(double *)&_XMM0 = logf(*(double *)&_XMM0);
__asm { vmovd eax, xmm0 }
_EAX ^= 0x80000000;
__asm
{
vmovd xmm0, eax
vcvtsi2ss xmm1, xmm1, [rbp+var_C8]
vmulss xmm0, xmm0, xmm1
vcvtsi2ss xmm1, xmm1, [rbp+var_AC]
vdivss xmm0, xmm0, xmm1
}
*(double *)&_XMM0 = expf(*(double *)&_XMM0);
__asm
{
vmovss [rbp+var_D0], xmm0
vmovss xmm0, [rbp+var_CC]
vmulss xmm0, xmm0, [rbp+var_D0]
vmovss [rbp+var_D4], xmm0
vmovss xmm0, [rbp+var_D4]
}
*(double *)&_XMM0 = cosf(*(double *)&_XMM0);
_RAX = v27;
_RCX = j;
__asm
{
vmovss dword ptr [rax+rcx*4], xmm0
vmovss xmm0, [rbp+var_D4]
}
*(double *)_XMM0.m128_u64 = sinf(*(double *)_XMM0.m128_u64);
_RAX = v27;
_RCX = v29 + j;
__asm { vmovss dword ptr [rax+rcx*4], xmm0 }
}
if ( op_params_i32 % 2 )
{
if ( !v34 )
{
_RAX = v27;
_RCX = op_params_i32;
__asm
{
vpxor xmm0, xmm0, xmm0
vmovss dword ptr [rax+rcx*4], xmm0
}
}
}
}
return result;
}
|
ggml_compute_forward_timestep_embedding_f32:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xe0
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x98]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x30],0x4
JZ 0x00134c1e
LEA RDI,[0x173b62]
MOV ESI,0x298d
LEA RDX,[0x173bc1]
LEA RCX,[0x17483d]
MOV AL,0x0
CALL 0x0010e270
LAB_00134c1e:
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x1c],EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x4]
MOV dword ptr [RBP + -0x20],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x20]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x38]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x40]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x48]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x70],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x20]
MOV qword ptr [RBP + -0x78],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x80],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RBP + -0x88],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV qword ptr [RBP + -0x90],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV qword ptr [RBP + -0x98],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x48]
MOV qword ptr [RBP + -0xa0],RAX
MOV RDI,qword ptr [RBP + -0x10]
XOR ESI,ESI
CALL 0x00118f70
MOV dword ptr [RBP + -0xa4],EAX
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x1
CALL 0x00118f70
MOV dword ptr [RBP + -0xa8],EAX
MOV EAX,dword ptr [RBP + -0xa4]
MOV ECX,0x2
CDQ
IDIV ECX
MOV dword ptr [RBP + -0xac],EAX
MOV qword ptr [RBP + -0xb8],0x0
LAB_00134d41:
MOV RAX,qword ptr [RBP + -0xb8]
CMP RAX,qword ptr [RBP + -0x28]
JGE 0x00134eb9
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0xf8]
MOV RCX,qword ptr [RBP + -0xb8]
IMUL RCX,qword ptr [RBP + -0x90]
ADD RAX,RCX
MOV qword ptr [RBP + -0xc0],RAX
MOVSXD RAX,dword ptr [RBP + -0x1c]
MOV qword ptr [RBP + -0xc8],RAX
LAB_00134d81:
MOV RAX,qword ptr [RBP + -0xc8]
MOVSXD RCX,dword ptr [RBP + -0xac]
CMP RAX,RCX
JGE 0x00134e70
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0xf8]
MOV RCX,qword ptr [RBP + -0xb8]
VMOVSS XMM0,dword ptr [RAX + RCX*0x4]
VMOVSS dword ptr [RBP + -0xcc],XMM0
VCVTSI2SS XMM0,XMM0,dword ptr [RBP + -0xa8]
CALL 0x0010e550
VMOVD EAX,XMM0
XOR EAX,0x80000000
VMOVD XMM0,EAX
VCVTSI2SS XMM1,XMM1,qword ptr [RBP + -0xc8]
VMULSS XMM0,XMM0,XMM1
VCVTSI2SS XMM1,XMM1,dword ptr [RBP + -0xac]
VDIVSS XMM0,XMM0,XMM1
CALL 0x0010e210
VMOVSS dword ptr [RBP + -0xd0],XMM0
VMOVSS XMM0,dword ptr [RBP + -0xcc]
VMULSS XMM0,XMM0,dword ptr [RBP + -0xd0]
VMOVSS dword ptr [RBP + -0xd4],XMM0
VMOVSS XMM0,dword ptr [RBP + -0xd4]
CALL 0x0010d770
MOV RAX,qword ptr [RBP + -0xc0]
MOV RCX,qword ptr [RBP + -0xc8]
VMOVSS dword ptr [RAX + RCX*0x4],XMM0
VMOVSS XMM0,dword ptr [RBP + -0xd4]
CALL 0x0010d8c0
MOV RAX,qword ptr [RBP + -0xc0]
MOV RCX,qword ptr [RBP + -0xc8]
MOVSXD RDX,dword ptr [RBP + -0xac]
ADD RCX,RDX
VMOVSS dword ptr [RAX + RCX*0x4],XMM0
MOVSXD RAX,dword ptr [RBP + -0x20]
ADD RAX,qword ptr [RBP + -0xc8]
MOV qword ptr [RBP + -0xc8],RAX
JMP 0x00134d81
LAB_00134e70:
MOV EAX,dword ptr [RBP + -0xa4]
MOV ECX,0x2
CDQ
IDIV ECX
CMP EDX,0x0
JZ 0x00134ea0
CMP dword ptr [RBP + -0x1c],0x0
JNZ 0x00134ea0
MOV RAX,qword ptr [RBP + -0xc0]
MOVSXD RCX,dword ptr [RBP + -0xa4]
VPXOR XMM0,XMM0,XMM0
VMOVSS dword ptr [RAX + RCX*0x4],XMM0
LAB_00134ea0:
JMP 0x00134ea2
LAB_00134ea2:
MOV RAX,qword ptr [RBP + -0xb8]
ADD RAX,0x1
MOV qword ptr [RBP + -0xb8],RAX
JMP 0x00134d41
LAB_00134eb9:
ADD RSP,0xe0
POP RBP
RET
|
void ggml_compute_forward_timestep_embedding_f32(int *param_1,long param_2)
{
int iVar1;
int iVar2;
long lVar3;
long lVar4;
long lVar5;
int iVar6;
int iVar7;
int iVar8;
long lVar9;
float fVar10;
float fVar11;
long local_d0;
long local_c0;
lVar3 = *(long *)(param_2 + 0x98);
if (*(long *)(lVar3 + 0x30) != 4) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c"
,0x298d,"GGML_ASSERT(%s) failed","src0->nb[0] == sizeof(float)");
}
iVar1 = *param_1;
iVar2 = param_1[1];
lVar4 = *(long *)(lVar3 + 0x10);
lVar5 = *(long *)(param_2 + 0x38);
iVar6 = ggml_get_op_params_i32(param_2,0);
iVar7 = ggml_get_op_params_i32(param_2,1);
iVar8 = iVar6 / 2;
for (local_c0 = 0; local_c0 < lVar4; local_c0 = local_c0 + 1) {
lVar9 = *(long *)(param_2 + 0xf8) + local_c0 * lVar5;
for (local_d0 = (long)iVar1; local_d0 < iVar8; local_d0 = iVar2 + local_d0) {
fVar11 = *(float *)(*(long *)(lVar3 + 0xf8) + local_c0 * 4);
fVar10 = logf((float)iVar7);
fVar10 = expf((-fVar10 * (float)local_d0) / (float)iVar8);
fVar11 = fVar11 * fVar10;
fVar10 = cosf(fVar11);
*(float *)(lVar9 + local_d0 * 4) = fVar10;
fVar11 = sinf(fVar11);
*(float *)(lVar9 + (local_d0 + iVar8) * 4) = fVar11;
}
if ((iVar6 % 2 != 0) && (iVar1 == 0)) {
*(int4 *)(lVar9 + (long)iVar6 * 4) = 0;
}
}
return;
}
|
|
12,194 |
testing::internal::UniversalTersePrinter<wchar_t const*>::Print(wchar_t const*, std::ostream*)
|
AlayaLite/build_O0/_deps/googletest-src/googletest/include/gtest/gtest-printers.h
|
static void Print(const wchar_t* str, ::std::ostream* os) {
if (str == nullptr) {
*os << "NULL";
} else {
UniversalPrint(::std::wstring(str), os);
}
}
|
O0
|
c
|
testing::internal::UniversalTersePrinter<wchar_t const*>::Print(wchar_t const*, std::ostream*):
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
cmpq $0x0, 0x50(%rsp)
jne 0x5e8dc
movq 0x48(%rsp), %rdi
leaq 0x13aee(%rip), %rsi # 0x723c0
callq 0xb460
jmp 0x5e964
movq 0x50(%rsp), %rax
movq %rax, (%rsp)
leaq 0x27(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0xb200
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0x28(%rsp), %rdi
callq 0x5e9b0
jmp 0x5e909
movq 0x48(%rsp), %rsi
leaq 0x28(%rsp), %rdi
callq 0x5e980
jmp 0x5e91a
leaq 0x28(%rsp), %rdi
callq 0x5ea70
leaq 0x27(%rsp), %rdi
callq 0xb940
jmp 0x5e964
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18(%rsp)
movl %eax, 0x14(%rsp)
jmp 0x5e958
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18(%rsp)
movl %eax, 0x14(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x5ea70
leaq 0x27(%rsp), %rdi
callq 0xb940
jmp 0x5e969
addq $0x58, %rsp
retq
movq 0x18(%rsp), %rdi
callq 0xb910
nopw %cs:(%rax,%rax)
nopl (%rax)
|
_ZN7testing8internal21UniversalTersePrinterIPKwE5PrintES3_PSo:
sub rsp, 58h
mov [rsp+58h+var_8], rdi
mov [rsp+58h+var_10], rsi
cmp [rsp+58h+var_8], 0
jnz short loc_5E8DC
mov rdi, [rsp+58h+var_10]
lea rsi, aNull_0; "NULL"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp loc_5E964
loc_5E8DC:
mov rax, [rsp+58h+var_8]
mov [rsp+58h+var_58], rax
lea rdi, [rsp+58h+var_31]
mov [rsp+58h+var_50], rdi
call __ZNSaIwEC1Ev; std::allocator<wchar_t>::allocator(void)
mov rsi, [rsp+58h+var_58]
mov rdx, [rsp+58h+var_50]
lea rdi, [rsp+58h+var_30]
call _ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEC2IS3_EEPKwRKS3_; std::wstring::basic_string<std::allocator<wchar_t>>(wchar_t const*,std::allocator<wchar_t> const&)
jmp short $+2
loc_5E909:
mov rsi, [rsp+58h+var_10]
lea rdi, [rsp+58h+var_30]
call _ZN7testing8internal14UniversalPrintINSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEEEEvRKT_PSo; testing::internal::UniversalPrint<std::wstring>(std::wstring const&,std::ostream *)
jmp short $+2
loc_5E91A:
lea rdi, [rsp+58h+var_30]
call _ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED2Ev; std::wstring::~wstring()
lea rdi, [rsp+58h+var_31]
call __ZNSaIwED1Ev; std::allocator<wchar_t>::~allocator()
jmp short loc_5E964
mov rcx, rax
mov eax, edx
mov [rsp+arg_10], rcx
mov [rsp+arg_C], eax
jmp short loc_5E958
mov rcx, rax
mov eax, edx
mov [rsp+arg_10], rcx
mov [rsp+arg_C], eax
lea rdi, [rsp+arg_20]
call _ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED2Ev; std::wstring::~wstring()
loc_5E958:
lea rdi, [rsp+arg_1F]
call __ZNSaIwED1Ev; std::allocator<wchar_t>::~allocator()
jmp short loc_5E969
loc_5E964:
add rsp, 58h
retn
loc_5E969:
mov rdi, [rsp+arg_10]
call __Unwind_Resume
|
long long testing::internal::UniversalTersePrinter<wchar_t const*>::Print(long long a1, long long a2)
{
int v3; // ecx
int v4; // r8d
int v5; // r9d
int v6; // [rsp+0h] [rbp-58h]
char v7; // [rsp+27h] [rbp-31h] BYREF
_BYTE v8[32]; // [rsp+28h] [rbp-30h] BYREF
long long v9; // [rsp+48h] [rbp-10h]
long long v10; // [rsp+50h] [rbp-8h]
v10 = a1;
v9 = a2;
if ( !a1 )
return std::operator<<<std::char_traits<char>>(v9, "NULL");
v6 = v10;
std::allocator<wchar_t>::allocator();
std::wstring::basic_string<std::allocator<wchar_t>>(
(unsigned int)v8,
v6,
(unsigned int)&v7,
v3,
v4,
v5,
v6,
(unsigned int)&v7);
testing::internal::UniversalPrint<std::wstring>(v8, v9);
std::wstring::~wstring(v8);
return std::allocator<wchar_t>::~allocator(&v7);
}
|
Print:
SUB RSP,0x58
MOV qword ptr [RSP + 0x50],RDI
MOV qword ptr [RSP + 0x48],RSI
CMP qword ptr [RSP + 0x50],0x0
JNZ 0x0015e8dc
MOV RDI,qword ptr [RSP + 0x48]
LEA RSI,[0x1723c0]
CALL 0x0010b460
JMP 0x0015e964
LAB_0015e8dc:
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP],RAX
LEA RDI,[RSP + 0x27]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x0010b200
MOV RSI,qword ptr [RSP]
MOV RDX,qword ptr [RSP + 0x8]
LAB_0015e8fd:
LEA RDI,[RSP + 0x28]
CALL 0x0015e9b0
JMP 0x0015e909
LAB_0015e909:
MOV RSI,qword ptr [RSP + 0x48]
LAB_0015e90e:
LEA RDI,[RSP + 0x28]
CALL 0x0015e980
LAB_0015e918:
JMP 0x0015e91a
LAB_0015e91a:
LEA RDI,[RSP + 0x28]
CALL 0x0015ea70
LEA RDI,[RSP + 0x27]
CALL 0x0010b940
JMP 0x0015e964
LAB_0015e964:
ADD RSP,0x58
RET
|
/* testing::internal::UniversalTersePrinter<wchar_t const*>::Print(wchar_t const*, std::ostream*) */
void testing::internal::UniversalTersePrinter<wchar_t_const*>::Print
(wchar_t *param_1,ostream *param_2)
{
allocator local_31;
wstring local_30 [32];
ostream *local_10;
wchar_t *local_8;
local_10 = param_2;
local_8 = param_1;
if (param_1 == (wchar_t *)0x0) {
std::operator<<(param_2,"NULL");
}
else {
std::allocator<wchar_t>::allocator();
/* try { // try from 0015e8fd to 0015e906 has its CatchHandler @ 0015e930 */
std::__cxx11::wstring::wstring<std::allocator<wchar_t>>(local_30,param_1,&local_31);
/* try { // try from 0015e90e to 0015e917 has its CatchHandler @ 0015e940 */
UniversalPrint<std::__cxx11::wstring>(local_30,local_10);
std::__cxx11::wstring::~wstring(local_30);
std::allocator<wchar_t>::~allocator((allocator<wchar_t> *)&local_31);
}
return;
}
|
|
12,195 |
blst_p2_mult
|
corpus-core[P]colibri-stateless/build_O1/_deps/blst-src/src/e2.c
|
void blst_p2_mult(POINTonE2 *out, const POINTonE2 *a,
const byte *scalar, size_t nbits)
{
if (nbits < 144) {
if (nbits)
POINTonE2_mult_w4(out, a, scalar, nbits);
else
vec_zero(out, sizeof(*out));
} else if (nbits <= 256) {
union { vec256 l; pow256 s; } val;
size_t i, j, top, mask = (size_t)0 - 1;
/* this is not about constant-time-ness, but branch optimization */
for (top = (nbits + 7)/8, i=0, j=0; i<sizeof(val.s);) {
val.s[i++] = scalar[j] & mask;
mask = 0 - ((i - top) >> (8*sizeof(top)-1));
j += 1 & mask;
}
if (check_mod_256(val.s, BLS12_381_r)) /* z^4 is the formal limit */
POINTonE2_mult_gls(out, a, val.s);
else /* should never be the case, added for formal completeness */
POINTonE2_mult_w5(out, a, scalar, nbits);
vec_zero(val.l, sizeof(val));
} else { /* should never be the case, added for formal completeness */
POINTonE2_mult_w5(out, a, scalar, nbits);
}
}
|
O1
|
c
|
blst_p2_mult:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
cmpq $0x8f, %rcx
ja 0x1e1e3
testq %r14, %r14
je 0x1e262
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r14, %rcx
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1e2ad
cmpq $0x100, %r14 # imm = 0x100
ja 0x1e245
leaq 0x7(%r14), %rax
shrq $0x3, %rax
movb $-0x1, %sil
movl $0x1, %ecx
xorl %edx, %edx
andb (%r12,%rdx), %sil
movb %sil, -0x41(%rbp,%rcx)
xorl %esi, %esi
cmpq %rax, %rcx
setb %sil
addq %rsi, %rdx
negb %sil
incq %rcx
cmpq $0x21, %rcx
jne 0x1e1fe
leaq 0x2169a(%rip), %rsi # 0x3f8c0
leaq -0x40(%rbp), %rdi
callq 0x367c0
testq %rax, %rax
je 0x1e277
leaq -0x40(%rbp), %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1e4f7
jmp 0x1e288
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r14, %rcx
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1e97d
xorl %eax, %eax
movq $0x0, (%rbx,%rax,8)
incq %rax
cmpq $0x24, %rax
jne 0x1e264
jmp 0x1e2a0
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r14, %rcx
callq 0x1e97d
xorl %eax, %eax
movq $0x0, -0x40(%rbp,%rax,8)
incq %rax
cmpq $0x4, %rax
jne 0x1e28a
leaq -0x40(%rbp), %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
blst_p2_mult:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 20h
mov r14, rcx
mov r12, rdx
mov r15, rsi
mov rbx, rdi
cmp rcx, 8Fh
ja short loc_1E1E3
test r14, r14
jz loc_1E262
mov rdi, rbx
mov rsi, r15
mov rdx, r12
mov rcx, r14
add rsp, 20h
pop rbx
pop r12
pop r14
pop r15
pop rbp
jmp POINTonE2_mult_w4
loc_1E1E3:
cmp r14, 100h
ja short loc_1E245
lea rax, [r14+7]
shr rax, 3
mov sil, 0FFh
mov ecx, 1
xor edx, edx
loc_1E1FE:
and sil, [r12+rdx]
mov [rbp+rcx+var_41], sil
xor esi, esi
cmp rcx, rax
setb sil
add rdx, rsi
neg sil
inc rcx
cmp rcx, 21h ; '!'
jnz short loc_1E1FE
lea rsi, BLS12_381_r
lea rdi, [rbp+var_40]
call check_mod_256
test rax, rax
jz short loc_1E277
lea rdx, [rbp+var_40]
mov rdi, rbx
mov rsi, r15
call POINTonE2_mult_gls
jmp short loc_1E288
loc_1E245:
mov rdi, rbx
mov rsi, r15
mov rdx, r12
mov rcx, r14
add rsp, 20h
pop rbx
pop r12
pop r14
pop r15
pop rbp
jmp POINTonE2_mult_w5
loc_1E262:
xor eax, eax
loc_1E264:
mov qword ptr [rbx+rax*8], 0
inc rax
cmp rax, 24h ; '$'
jnz short loc_1E264
jmp short loc_1E2A0
loc_1E277:
mov rdi, rbx
mov rsi, r15
mov rdx, r12
mov rcx, r14
call POINTonE2_mult_w5
loc_1E288:
xor eax, eax
loc_1E28A:
mov [rbp+rax*8+var_40], 0
inc rax
cmp rax, 4
jnz short loc_1E28A
lea rax, [rbp+var_40]
loc_1E2A0:
add rsp, 20h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
long long blst_p2_mult(long long a1, long long a2, long long a3, unsigned long long a4)
{
long long result; // rax
unsigned long long v8; // rax
char v9; // si
unsigned long long v10; // rcx
long long v11; // rdx
long long v12; // rsi
long long i; // rax
char v14; // [rsp+1h] [rbp-41h]
_QWORD v15[8]; // [rsp+2h] [rbp-40h] BYREF
if ( a4 > 0x8F )
{
if ( a4 > 0x100 )
{
return POINTonE2_mult_w5(a1, a2, a3, a4);
}
else
{
v8 = (a4 + 7) >> 3;
v9 = -1;
v10 = 1LL;
v11 = 0LL;
do
{
*(&v14 + v10) = *(_BYTE *)(a3 + v11) & v9;
v12 = v10 < v8;
v11 += v12;
v9 = -(char)v12;
++v10;
}
while ( v10 != 33 );
if ( check_mod_256(v15, &BLS12_381_r, v11) )
POINTonE2_mult_gls(a1, a2, v15);
else
POINTonE2_mult_w5(a1, a2, a3, a4);
for ( i = 0LL; i != 4; ++i )
v15[i] = 0LL;
return (long long)v15;
}
}
else if ( a4 )
{
return POINTonE2_mult_w4(a1, a2, a3, a4);
}
else
{
for ( result = 0LL; result != 36; ++result )
*(_QWORD *)(a1 + 8 * result) = 0LL;
}
return result;
}
|
blst_p2_mult:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x20
MOV R14,RCX
MOV R12,RDX
MOV R15,RSI
MOV RBX,RDI
CMP RCX,0x8f
JA 0x0011e1e3
TEST R14,R14
JZ 0x0011e262
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R12
MOV RCX,R14
ADD RSP,0x20
POP RBX
POP R12
POP R14
POP R15
POP RBP
JMP 0x0011e2ad
LAB_0011e1e3:
CMP R14,0x100
JA 0x0011e245
LEA RAX,[R14 + 0x7]
SHR RAX,0x3
MOV SIL,0xff
MOV ECX,0x1
XOR EDX,EDX
LAB_0011e1fe:
AND SIL,byte ptr [R12 + RDX*0x1]
MOV byte ptr [RBP + RCX*0x1 + -0x41],SIL
XOR ESI,ESI
CMP RCX,RAX
SETC SIL
ADD RDX,RSI
NEG SIL
INC RCX
CMP RCX,0x21
JNZ 0x0011e1fe
LEA RSI,[0x13f8c0]
LEA RDI,[RBP + -0x40]
CALL 0x001367c0
TEST RAX,RAX
JZ 0x0011e277
LEA RDX,[RBP + -0x40]
MOV RDI,RBX
MOV RSI,R15
CALL 0x0011e4f7
JMP 0x0011e288
LAB_0011e245:
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R12
MOV RCX,R14
ADD RSP,0x20
POP RBX
POP R12
POP R14
POP R15
POP RBP
JMP 0x0011e97d
LAB_0011e262:
XOR EAX,EAX
LAB_0011e264:
MOV qword ptr [RBX + RAX*0x8],0x0
INC RAX
CMP RAX,0x24
JNZ 0x0011e264
JMP 0x0011e2a0
LAB_0011e277:
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R12
MOV RCX,R14
CALL 0x0011e97d
LAB_0011e288:
XOR EAX,EAX
LAB_0011e28a:
MOV qword ptr [RBP + RAX*0x8 + -0x40],0x0
INC RAX
CMP RAX,0x4
JNZ 0x0011e28a
LEA RAX,[RBP + -0x40]
LAB_0011e2a0:
ADD RSP,0x20
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
byte * blst_p2_mult(long param_1,int8 param_2,long param_3,ulong param_4)
{
byte *pbVar1;
long lVar2;
ulong uVar3;
byte bVar4;
bool bVar5;
int8 uStack_50;
byte local_48 [32];
if (param_4 < 0x90) {
if (param_4 != 0) {
pbVar1 = (byte *)POINTonE2_mult_w4(param_1,param_2,param_3,param_4);
return pbVar1;
}
lVar2 = 0;
do {
*(int8 *)(param_1 + lVar2 * 8) = 0;
lVar2 = lVar2 + 1;
} while (lVar2 != 0x24);
pbVar1 = (byte *)0x24;
}
else {
if (0x100 < param_4) {
pbVar1 = (byte *)POINTonE2_mult_w5(param_1,param_2,param_3,param_4);
return pbVar1;
}
bVar4 = 0xff;
uVar3 = 1;
lVar2 = 0;
do {
local_48[uVar3 - 1] = bVar4 & *(byte *)(param_3 + lVar2);
bVar5 = uVar3 < param_4 + 7 >> 3;
lVar2 = lVar2 + (ulong)bVar5;
bVar4 = -bVar5;
uVar3 = uVar3 + 1;
} while (uVar3 != 0x21);
uStack_50 = 0x11e22f;
lVar2 = check_mod_256(local_48,BLS12_381_r);
if (lVar2 == 0) {
uStack_50 = 0x11e288;
POINTonE2_mult_w5(param_1,param_2,param_3,param_4);
}
else {
uStack_50 = 0x11e243;
POINTonE2_mult_gls(param_1,param_2,local_48);
}
lVar2 = 0;
do {
pbVar1 = local_48 + lVar2 * 8;
pbVar1[0] = 0;
pbVar1[1] = 0;
pbVar1[2] = 0;
pbVar1[3] = 0;
pbVar1[4] = 0;
pbVar1[5] = 0;
pbVar1[6] = 0;
pbVar1[7] = 0;
lVar2 = lVar2 + 1;
} while (lVar2 != 4);
pbVar1 = local_48;
}
return pbVar1;
}
|
|
12,196 |
my_b_seq_read
|
eloqsql/mysys/mf_iocache.c
|
static int _my_b_seq_read(IO_CACHE *info, uchar *Buffer, size_t Count)
{
size_t length, diff_length, save_count, max_length;
my_off_t pos_in_file;
save_count=Count;
lock_append_buffer(info);
/* pos_in_file always point on where info->buffer was read */
if ((pos_in_file=info->pos_in_file +
(size_t) (info->read_end - info->buffer)) >= info->end_of_file)
goto read_append_buffer;
/*
With read-append cache we must always do a seek before we read,
because the write could have moved the file pointer astray
*/
if (mysql_file_seek(info->file, pos_in_file, MY_SEEK_SET, MYF(0)) == MY_FILEPOS_ERROR)
{
info->error= -1;
unlock_append_buffer(info);
return (1);
}
info->seek_not_done=0;
diff_length= (size_t) (pos_in_file & (IO_SIZE-1));
/* now the second stage begins - read from file descriptor */
if (Count >= (size_t) (IO_SIZE+(IO_SIZE-diff_length)))
{
/* Fill first intern buffer */
size_t read_length;
length= IO_ROUND_DN(Count) - diff_length;
if ((read_length= mysql_file_read(info->file,Buffer, length,
info->myflags)) == (size_t) -1)
{
info->error= -1;
unlock_append_buffer(info);
return 1;
}
Count-=read_length;
Buffer+=read_length;
pos_in_file+=read_length;
if (read_length != length)
{
/*
We only got part of data; Read the rest of the data from the
write buffer
*/
goto read_append_buffer;
}
diff_length=0;
}
max_length= info->read_length-diff_length;
if (max_length > (info->end_of_file - pos_in_file))
max_length= (size_t) (info->end_of_file - pos_in_file);
if (!max_length)
{
if (Count)
goto read_append_buffer;
length=0; /* Didn't read any more chars */
}
else
{
length= mysql_file_read(info->file,info->buffer, max_length, info->myflags);
if (length == (size_t) -1)
{
info->error= -1;
unlock_append_buffer(info);
return 1;
}
if (length < Count)
{
memcpy(Buffer, info->buffer, length);
Count -= length;
Buffer += length;
/*
added the line below to make
DBUG_ASSERT(pos_in_file==info->end_of_file) pass.
otherwise this does not appear to be needed
*/
pos_in_file += length;
goto read_append_buffer;
}
}
unlock_append_buffer(info);
info->read_pos=info->buffer+Count;
info->read_end=info->buffer+length;
info->pos_in_file=pos_in_file;
memcpy(Buffer,info->buffer,(size_t) Count);
return 0;
read_append_buffer:
/*
Read data from the current write buffer.
Count should never be == 0 here (The code will work even if count is 0)
*/
{
/* First copy the data to Count */
size_t len_in_buff = (size_t) (info->write_pos - info->append_read_pos);
size_t copy_len;
size_t transfer_len;
DBUG_ASSERT(info->append_read_pos <= info->write_pos);
copy_len=MY_MIN(Count, len_in_buff);
memcpy(Buffer, info->append_read_pos, copy_len);
info->append_read_pos += copy_len;
Count -= copy_len;
if (Count)
info->error= (int) (save_count - Count);
/* Fill read buffer with data from write buffer */
memcpy(info->buffer, info->append_read_pos,
(size_t) (transfer_len=len_in_buff - copy_len));
info->read_pos= info->buffer;
info->read_end= info->buffer+transfer_len;
info->append_read_pos=info->write_pos;
info->pos_in_file=pos_in_file+copy_len;
info->end_of_file+=len_in_buff;
}
unlock_append_buffer(info);
return Count ? 1 : 0;
}
|
O3
|
c
|
my_b_seq_read:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdx, %r12
movq %rsi, -0x40(%rbp)
movq %rdi, %r14
leaq 0x50(%rdi), %r15
cmpq $0x0, 0x90(%rdi)
jne 0x5255b
movq %r15, %rdi
callq 0x285a0
movq 0x18(%r14), %r13
subq 0x20(%r14), %r13
addq (%r14), %r13
cmpq 0x8(%r14), %r13
jae 0x522d7
movl 0xd4(%r14), %ebx
leaq 0x2e4655(%rip), %rax # 0x3368c8
movq (%rax), %rax
leaq -0xa8(%rbp), %rdi
movl %ebx, %esi
movl $0x8, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x52589
movl %ebx, %edi
movq %r13, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x5de20
cmpq $-0x1, %rax
je 0x524be
movl $0x0, 0xe0(%r14)
movl %r13d, %eax
andl $0xfff, %eax # imm = 0xFFF
movl $0x2000, %ecx # imm = 0x2000
subq %rax, %rcx
cmpq %r12, %rcx
jbe 0x5237e
movq %r12, %rdx
jmp 0x52404
movq %r13, -0x38(%rbp)
movq %r15, -0x30(%rbp)
movq %r12, %r13
movq 0x38(%r14), %rsi
movq 0x40(%r14), %r15
subq %rsi, %r15
cmpq %r15, %r13
movq %r15, %rbx
cmovbq %r13, %rbx
movq -0x40(%rbp), %rdi
movq %rbx, %rdx
callq 0x282c0
movq 0x38(%r14), %rsi
addq %rbx, %rsi
movq %rsi, 0x38(%r14)
cmpq %r15, %r13
jbe 0x52321
subl %r13d, %r12d
leal (%rbx,%r12), %eax
movl %eax, 0xe4(%r14)
movq 0x20(%r14), %rdi
movq %r15, %r12
subq %rbx, %r12
movq %r12, %rdx
callq 0x282c0
movq 0x20(%r14), %rax
movq 0x40(%r14), %rcx
movq %rax, 0x10(%r14)
addq %rax, %r12
movq %r12, 0x18(%r14)
movq %rcx, 0x38(%r14)
movq -0x38(%rbp), %rax
addq %rbx, %rax
movq %rax, (%r14)
addq %r15, 0x8(%r14)
movq 0x90(%r14), %rdi
testq %rdi, %rdi
jne 0x52574
xorl %ebx, %ebx
cmpq %r15, %r13
seta %bl
movq -0x30(%rbp), %rdi
callq 0x28280
jmp 0x524e6
movq %r13, -0x38(%rbp)
movl %r12d, %r13d
andl $0xfffff000, %r13d # imm = 0xFFFFF000
subq %rax, %r13
movl 0xd4(%r14), %ebx
movq 0xf8(%r14), %rax
movq %rax, -0x30(%rbp)
leaq 0x2e4520(%rip), %rax # 0x3368c8
movq (%rax), %rax
leaq -0xa8(%rbp), %rdi
movl %ebx, %esi
movl $0x6, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x525ba
movl %ebx, %edi
movq -0x40(%rbp), %rsi
movq %r13, %rdx
movq -0x30(%rbp), %rcx
callq 0x5dc20
movq %rax, %rbx
cmpq $-0x1, %rbx
je 0x524be
movq %r12, %rdx
subq %rbx, %rdx
addq %rbx, -0x40(%rbp)
addq %rbx, -0x38(%rbp)
cmpq %r13, %rbx
jne 0x52503
xorl %eax, %eax
movq -0x38(%rbp), %r13
movq 0x8(%r14), %rbx
movq 0xf0(%r14), %rcx
subq %rax, %rcx
subq %r13, %rbx
cmpq %rbx, %rcx
cmovbq %rcx, %rbx
testq %rbx, %rbx
je 0x524fa
movq %rdx, -0x48(%rbp)
movq %r13, -0x38(%rbp)
movl 0xd4(%r14), %r13d
movq 0x20(%r14), %rax
movq %rax, -0x50(%rbp)
movq 0xf8(%r14), %rax
movq %rax, -0x30(%rbp)
leaq 0x2e447a(%rip), %rax # 0x3368c8
movq (%rax), %rax
leaq -0xa8(%rbp), %rdi
movl %r13d, %esi
movl $0x6, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x5262f
movl %r13d, %edi
movq -0x50(%rbp), %rsi
movq %rbx, %rdx
movq -0x30(%rbp), %rcx
callq 0x5dc20
cmpq $-0x1, %rax
movq -0x48(%rbp), %rdx
je 0x524be
movq %rdx, %r13
subq %rax, %r13
jbe 0x5250f
movq %r15, -0x30(%rbp)
movq 0x20(%r14), %rsi
movq -0x40(%rbp), %rbx
movq %rbx, %rdi
movq %rax, %rdx
movq %rax, %r15
callq 0x282c0
addq %r15, %rbx
movq %rbx, -0x40(%rbp)
addq %r15, -0x38(%rbp)
jmp 0x522e2
movl $0xffffffff, 0xe4(%r14) # imm = 0xFFFFFFFF
movq 0x90(%r14), %rdi
testq %rdi, %rdi
jne 0x525a5
movq %r15, %rdi
callq 0x28280
movl $0x1, %ebx
movl %ebx, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testq %rdx, %rdx
je 0x52515
movq %r13, -0x38(%rbp)
movq %r15, -0x30(%rbp)
movq %rdx, %r13
jmp 0x522e2
movq -0x38(%rbp), %r13
jmp 0x52517
xorl %eax, %eax
movq %rax, %r12
movq %rdx, %rbx
movq 0x90(%r14), %rdi
testq %rdi, %rdi
jne 0x526a3
movq %r15, %rdi
callq 0x28280
movq 0x20(%r14), %rsi
movq %rbx, %rdx
leaq (%rsi,%rbx), %rax
movq %rax, 0x10(%r14)
addq %rsi, %r12
movq %r12, 0x18(%r14)
movq %r13, (%r14)
movq -0x40(%rbp), %rdi
callq 0x282c0
xorl %ebx, %ebx
jmp 0x524e6
leaq 0x4471b(%rip), %rsi # 0x96c7d
movq %r15, %rdi
movl $0x54c, %edx # imm = 0x54C
callq 0x29f5c
jmp 0x52254
leaq 0x2e434d(%rip), %rax # 0x3368c8
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x52368
leaq -0x60(%rbp), %rcx
movq %rax, %rdi
movl %ebx, %esi
movq %r13, %rdx
movq %rcx, %rbx
callq 0x29e60
movq (%rbx), %rax
jmp 0x522a1
leaq 0x2e431c(%rip), %rax # 0x3368c8
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x524d9
movq %rax, %rcx
leaq 0x2e4304(%rip), %rax # 0x3368c8
movq (%rax), %rax
leaq 0x446af(%rip), %rdx # 0x96c7d
movq %rcx, -0x48(%rbp)
movq %rcx, %rdi
movq %r13, %rsi
movl $0x569, %ecx # imm = 0x569
callq *0x210(%rax)
movl %ebx, %edi
movq -0x40(%rbp), %rsi
movq %r13, %rdx
movq -0x30(%rbp), %rcx
callq 0x5dc20
movq %rax, %rbx
xorl %esi, %esi
testq %rax, %rax
movl $0x0, %eax
cmoveq %r13, %rax
cmpq $-0x1, %rbx
cmovneq %rbx, %rsi
testb $0x6, -0x30(%rbp)
cmovneq %rax, %rsi
leaq 0x2e42ab(%rip), %rax # 0x3368c8
movq (%rax), %rax
movq -0x48(%rbp), %rdi
callq *0x218(%rax)
jmp 0x523dd
movq %rax, %rcx
leaq 0x2e428f(%rip), %rax # 0x3368c8
movq (%rax), %rax
leaq 0x4463a(%rip), %rdx # 0x96c7d
movq %rcx, -0x58(%rbp)
movq %rcx, %rdi
movq %rbx, %rsi
movl $0x589, %ecx # imm = 0x589
callq *0x210(%rax)
movl %r13d, %edi
movq -0x50(%rbp), %rsi
movq %rbx, %rdx
movq -0x30(%rbp), %rcx
callq 0x5dc20
movq %rax, %r13
xorl %esi, %esi
testq %rax, %rax
cmovneq %rsi, %rbx
cmpq $-0x1, %rax
cmovneq %rax, %rsi
testb $0x6, -0x30(%rbp)
cmovneq %rbx, %rsi
leaq 0x2e423a(%rip), %rax # 0x3368c8
movq (%rax), %rax
movq -0x58(%rbp), %rdi
callq *0x218(%rax)
movq %r13, %rax
jmp 0x52482
leaq 0x2e421e(%rip), %rax # 0x3368c8
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x5252d
|
_my_b_seq_read:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 88h
mov r12, rdx
mov [rbp+var_40], rsi
mov r14, rdi
lea r15, [rdi+50h]
cmp qword ptr [rdi+90h], 0
jnz loc_5255B
mov rdi, r15
call _pthread_mutex_lock
loc_52254:
mov r13, [r14+18h]
sub r13, [r14+20h]
add r13, [r14]
cmp r13, [r14+8]
jnb short loc_522D7
mov ebx, [r14+0D4h]
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_A8]
mov esi, ebx
mov edx, 8
call qword ptr [rax+158h]
test rax, rax
jnz loc_52589
mov edi, ebx
mov rsi, r13
xor edx, edx
xor ecx, ecx
call my_seek
loc_522A1:
cmp rax, 0FFFFFFFFFFFFFFFFh
jz loc_524BE
mov dword ptr [r14+0E0h], 0
mov eax, r13d
and eax, 0FFFh
mov ecx, 2000h
sub rcx, rax
cmp rcx, r12
jbe loc_5237E
mov rdx, r12
jmp loc_52404
loc_522D7:
mov [rbp+var_38], r13
mov [rbp+var_30], r15
mov r13, r12
loc_522E2:
mov rsi, [r14+38h]
mov r15, [r14+40h]
sub r15, rsi
cmp r13, r15
mov rbx, r15
cmovb rbx, r13
mov rdi, [rbp+var_40]
mov rdx, rbx
call _memcpy
mov rsi, [r14+38h]
add rsi, rbx
mov [r14+38h], rsi
cmp r13, r15
jbe short loc_52321
sub r12d, r13d
lea eax, [rbx+r12]
mov [r14+0E4h], eax
loc_52321:
mov rdi, [r14+20h]
mov r12, r15
sub r12, rbx
mov rdx, r12
call _memcpy
mov rax, [r14+20h]
mov rcx, [r14+40h]
mov [r14+10h], rax
add r12, rax
mov [r14+18h], r12
mov [r14+38h], rcx
mov rax, [rbp+var_38]
add rax, rbx
mov [r14], rax
add [r14+8], r15
mov rdi, [r14+90h]
test rdi, rdi
jnz loc_52574
loc_52368:
xor ebx, ebx
cmp r13, r15
setnbe bl
mov rdi, [rbp+var_30]
call _pthread_mutex_unlock
jmp loc_524E6
loc_5237E:
mov [rbp+var_38], r13
mov r13d, r12d
and r13d, 0FFFFF000h
sub r13, rax
mov ebx, [r14+0D4h]
mov rax, [r14+0F8h]
mov [rbp+var_30], rax
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_A8]
mov esi, ebx
mov edx, 6
call qword ptr [rax+158h]
test rax, rax
jnz loc_525BA
mov edi, ebx
mov rsi, [rbp+var_40]
mov rdx, r13
mov rcx, [rbp+var_30]
call my_read
mov rbx, rax
loc_523DD:
cmp rbx, 0FFFFFFFFFFFFFFFFh
jz loc_524BE
mov rdx, r12
sub rdx, rbx
add [rbp+var_40], rbx
add [rbp+var_38], rbx
cmp rbx, r13
jnz loc_52503
xor eax, eax
mov r13, [rbp+var_38]
loc_52404:
mov rbx, [r14+8]
mov rcx, [r14+0F0h]
sub rcx, rax
sub rbx, r13
cmp rcx, rbx
cmovb rbx, rcx
test rbx, rbx
jz loc_524FA
mov [rbp+var_48], rdx
mov [rbp+var_38], r13
mov r13d, [r14+0D4h]
mov rax, [r14+20h]
mov [rbp+var_50], rax
mov rax, [r14+0F8h]
mov [rbp+var_30], rax
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_A8]
mov esi, r13d
mov edx, 6
call qword ptr [rax+158h]
test rax, rax
jnz loc_5262F
mov edi, r13d
mov rsi, [rbp+var_50]
mov rdx, rbx
mov rcx, [rbp+var_30]
call my_read
loc_52482:
cmp rax, 0FFFFFFFFFFFFFFFFh
mov rdx, [rbp+var_48]
jz short loc_524BE
mov r13, rdx
sub r13, rax
jbe short loc_5250F
mov [rbp+var_30], r15
mov rsi, [r14+20h]
mov rbx, [rbp+var_40]
mov rdi, rbx
mov rdx, rax
mov r15, rax
call _memcpy
add rbx, r15
mov [rbp+var_40], rbx
add [rbp+var_38], r15
jmp loc_522E2
loc_524BE:
mov dword ptr [r14+0E4h], 0FFFFFFFFh
mov rdi, [r14+90h]
test rdi, rdi
jnz loc_525A5
loc_524D9:
mov rdi, r15
call _pthread_mutex_unlock
mov ebx, 1
loc_524E6:
mov eax, ebx
add rsp, 88h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_524FA:
test rdx, rdx
jz short loc_52515
mov [rbp+var_38], r13
loc_52503:
mov [rbp+var_30], r15
mov r13, rdx
jmp loc_522E2
loc_5250F:
mov r13, [rbp+var_38]
jmp short loc_52517
loc_52515:
xor eax, eax
loc_52517:
mov r12, rax
mov rbx, rdx
mov rdi, [r14+90h]
test rdi, rdi
jnz loc_526A3
loc_5252D:
mov rdi, r15
call _pthread_mutex_unlock
mov rsi, [r14+20h]
mov rdx, rbx
lea rax, [rsi+rbx]
mov [r14+10h], rax
add r12, rsi
mov [r14+18h], r12
mov [r14], r13
mov rdi, [rbp+var_40]
call _memcpy
xor ebx, ebx
jmp short loc_524E6
loc_5255B:
lea rsi, aWorkspaceLlm4b_9; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, r15
mov edx, 54Ch
call psi_mutex_lock
jmp loc_52254
loc_52574:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp loc_52368
loc_52589:
lea rcx, [rbp+var_60]
mov rdi, rax
mov esi, ebx
mov rdx, r13
mov rbx, rcx
call _my_b_seq_read_cold_1
mov rax, [rbx]
jmp loc_522A1
loc_525A5:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp loc_524D9
loc_525BA:
mov rcx, rax
lea rax, PSI_server
mov rax, [rax]
lea rdx, aWorkspaceLlm4b_9; "/workspace/llm4binary/github2025/eloqsq"...
mov [rbp+var_48], rcx
mov rdi, rcx
mov rsi, r13
mov ecx, 569h
call qword ptr [rax+210h]
mov edi, ebx
mov rsi, [rbp+var_40]
mov rdx, r13
mov rcx, [rbp+var_30]
call my_read
mov rbx, rax
xor esi, esi
test rax, rax
mov eax, 0
cmovz rax, r13
cmp rbx, 0FFFFFFFFFFFFFFFFh
cmovnz rsi, rbx
test byte ptr [rbp+var_30], 6
cmovnz rsi, rax
lea rax, PSI_server
mov rax, [rax]
mov rdi, [rbp+var_48]
call qword ptr [rax+218h]
jmp loc_523DD
loc_5262F:
mov rcx, rax
lea rax, PSI_server
mov rax, [rax]
lea rdx, aWorkspaceLlm4b_9; "/workspace/llm4binary/github2025/eloqsq"...
mov [rbp+var_58], rcx
mov rdi, rcx
mov rsi, rbx
mov ecx, 589h
call qword ptr [rax+210h]
mov edi, r13d
mov rsi, [rbp+var_50]
mov rdx, rbx
mov rcx, [rbp+var_30]
call my_read
mov r13, rax
xor esi, esi
test rax, rax
cmovnz rbx, rsi
cmp rax, 0FFFFFFFFFFFFFFFFh
cmovnz rsi, rax
test byte ptr [rbp+var_30], 6
cmovnz rsi, rbx
lea rax, PSI_server
mov rax, [rax]
mov rdi, [rbp+var_58]
call qword ptr [rax+218h]
mov rax, r13
jmp loc_52482
loc_526A3:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp loc_5252D
|
_BOOL8 my_b_seq_read(long long a1, unsigned long long a2, unsigned long long a3)
{
long long v4; // r15
unsigned long long v5; // r13
unsigned int v6; // ebx
long long v7; // rax
unsigned long long v8; // rsi
long long v9; // rax
unsigned long long v10; // rdx
unsigned long long v11; // rax
unsigned long long v12; // r13
long long v13; // rsi
unsigned long long v14; // r15
unsigned long long v15; // rbx
unsigned long long v16; // rsi
long long v17; // rax
long long v18; // rcx
BOOL v19; // ebx
unsigned long long v20; // r13
unsigned int v21; // ebx
long long v22; // rax
long long v23; // rbx
unsigned long long v24; // rbx
unsigned int v25; // r13d
long long v26; // rax
unsigned long long v27; // rax
unsigned long long v28; // rbx
unsigned long long v29; // r15
long long v30; // rdi
unsigned long long v32; // r12
unsigned long long v33; // rbx
long long v34; // rsi
unsigned long long v35; // rax
long long v36; // rax
unsigned long long v37; // r13
_BYTE v38[72]; // [rsp+8h] [rbp-A8h] BYREF
long long v39; // [rsp+50h] [rbp-60h] BYREF
long long v40; // [rsp+58h] [rbp-58h]
unsigned long long v41; // [rsp+60h] [rbp-50h]
unsigned long long v42; // [rsp+68h] [rbp-48h]
unsigned long long v43; // [rsp+70h] [rbp-40h]
unsigned long long v44; // [rsp+78h] [rbp-38h]
long long v45; // [rsp+80h] [rbp-30h]
v43 = a2;
v4 = a1 + 80;
if ( *(_QWORD *)(a1 + 144) )
psi_mutex_lock(a1 + 80, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 0x54Cu);
else
pthread_mutex_lock(a1 + 80);
v5 = *(_QWORD *)a1 + *(_QWORD *)(a1 + 24) - *(_QWORD *)(a1 + 32);
if ( v5 >= *(_QWORD *)(a1 + 8) )
{
v44 = *(_QWORD *)a1 + *(_QWORD *)(a1 + 24) - *(_QWORD *)(a1 + 32);
v45 = a1 + 80;
v12 = a3;
LABEL_10:
v13 = *(_QWORD *)(a1 + 56);
v14 = *(_QWORD *)(a1 + 64) - v13;
v15 = v14;
if ( v12 < v14 )
v15 = v12;
memcpy(v43, v13, v15);
v16 = v15 + *(_QWORD *)(a1 + 56);
*(_QWORD *)(a1 + 56) = v16;
if ( v12 > v14 )
*(_DWORD *)(a1 + 228) = v15 + a3 - v12;
memcpy(*(_QWORD *)(a1 + 32), v16, v14 - v15);
v17 = *(_QWORD *)(a1 + 32);
v18 = *(_QWORD *)(a1 + 64);
*(_QWORD *)(a1 + 16) = v17;
*(_QWORD *)(a1 + 24) = v17 + v14 - v15;
*(_QWORD *)(a1 + 56) = v18;
*(_QWORD *)a1 = v15 + v44;
*(_QWORD *)(a1 + 8) += v14;
if ( *(_QWORD *)(a1 + 144) )
(*((void (**)(void))PSI_server + 44))();
v19 = v12 > v14;
pthread_mutex_unlock(v45);
return v19;
}
v6 = *(_DWORD *)(a1 + 212);
v7 = (*((long long ( **)(_BYTE *, _QWORD, long long))PSI_server + 43))(v38, v6, 8LL);
if ( v7 )
{
v8 = v6;
my_b_seq_read_cold_1(v7, v6, v5, &v39);
v9 = v39;
}
else
{
v8 = v5;
v9 = my_seek(v6, v5, 0LL, 0LL);
}
if ( v9 == -1 )
goto LABEL_30;
*(_DWORD *)(a1 + 224) = 0;
v11 = v5 & 0xFFF;
if ( 0x2000 - v11 <= a3 )
{
v44 = v5;
v20 = ((unsigned int)a3 & 0xFFFFF000) - v11;
v21 = *(_DWORD *)(a1 + 212);
v45 = *(_QWORD *)(a1 + 248);
v22 = (*((long long ( **)(_BYTE *, _QWORD, long long))PSI_server + 43))(v38, v21, 6LL);
if ( v22 )
{
v42 = v22;
(*((void ( **)(long long, unsigned long long, const char *, long long))PSI_server + 66))(
v22,
v20,
"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",
1385LL);
v23 = my_read(v21, v43, v20, v45);
v8 = 0LL;
v35 = 0LL;
if ( !v23 )
v35 = v20;
if ( v23 != -1 )
v8 = v23;
if ( (v45 & 6) != 0 )
v8 = v35;
(*((void ( **)(unsigned long long, unsigned long long))PSI_server + 67))(v42, v8);
}
else
{
v8 = v43;
v23 = my_read(v21, v43, v20, v45);
}
if ( v23 == -1 )
goto LABEL_30;
v10 = a3 - v23;
v43 += v23;
v44 += v23;
if ( v23 != v20 )
{
LABEL_36:
v45 = a1 + 80;
v12 = v10;
goto LABEL_10;
}
v11 = 0LL;
v5 = v44;
}
else
{
v10 = a3;
}
v24 = *(_QWORD *)(a1 + 8) - v5;
if ( *(_QWORD *)(a1 + 240) - v11 < v24 )
v24 = *(_QWORD *)(a1 + 240) - v11;
if ( !v24 )
{
if ( !v10 )
{
v27 = 0LL;
LABEL_39:
v32 = v27;
v33 = v10;
if ( *(_QWORD *)(a1 + 144) )
(*((void (**)(void))PSI_server + 44))();
pthread_mutex_unlock(v4);
v34 = *(_QWORD *)(a1 + 32);
*(_QWORD *)(a1 + 16) = v34 + v33;
*(_QWORD *)(a1 + 24) = v34 + v32;
*(_QWORD *)a1 = v5;
memcpy(v43, v34, v33);
return 0;
}
v44 = v5;
goto LABEL_36;
}
v42 = v10;
v44 = v5;
v25 = *(_DWORD *)(a1 + 212);
v41 = *(_QWORD *)(a1 + 32);
v45 = *(_QWORD *)(a1 + 248);
v26 = (*((long long ( **)(_BYTE *, _QWORD, long long))PSI_server + 43))(v38, v25, 6LL);
if ( v26 )
{
v40 = v26;
(*((void ( **)(long long, unsigned long long, const char *, long long))PSI_server + 66))(
v26,
v24,
"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",
1417LL);
v36 = my_read(v25, v41, v24, v45);
v37 = v36;
v8 = 0LL;
if ( v36 )
v24 = 0LL;
if ( v36 != -1 )
v8 = v36;
if ( (v45 & 6) != 0 )
v8 = v24;
(*((void ( **)(long long))PSI_server + 67))(v40);
v27 = v37;
}
else
{
v8 = v41;
v27 = my_read(v25, v41, v24, v45);
}
v10 = v42;
if ( v27 != -1LL )
{
v12 = v42 - v27;
if ( v42 > v27 )
{
v45 = a1 + 80;
v28 = v43;
v29 = v27;
memcpy(v43, *(_QWORD *)(a1 + 32), v27);
v43 = v29 + v28;
v44 += v29;
goto LABEL_10;
}
v5 = v44;
goto LABEL_39;
}
LABEL_30:
*(_DWORD *)(a1 + 228) = -1;
v30 = *(_QWORD *)(a1 + 144);
if ( v30 )
(*((void ( **)(long long, unsigned long long, unsigned long long))PSI_server + 44))(v30, v8, v10);
pthread_mutex_unlock(v4);
return 1;
}
|
_my_b_seq_read:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x88
MOV R12,RDX
MOV qword ptr [RBP + -0x40],RSI
MOV R14,RDI
LEA R15,[RDI + 0x50]
CMP qword ptr [RDI + 0x90],0x0
JNZ 0x0015255b
MOV RDI,R15
CALL 0x001285a0
LAB_00152254:
MOV R13,qword ptr [R14 + 0x18]
SUB R13,qword ptr [R14 + 0x20]
ADD R13,qword ptr [R14]
CMP R13,qword ptr [R14 + 0x8]
JNC 0x001522d7
MOV EBX,dword ptr [R14 + 0xd4]
LEA RAX,[0x4368c8]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0xa8]
MOV ESI,EBX
MOV EDX,0x8
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x00152589
MOV EDI,EBX
MOV RSI,R13
XOR EDX,EDX
XOR ECX,ECX
CALL 0x0015de20
LAB_001522a1:
CMP RAX,-0x1
JZ 0x001524be
MOV dword ptr [R14 + 0xe0],0x0
MOV EAX,R13D
AND EAX,0xfff
MOV ECX,0x2000
SUB RCX,RAX
CMP RCX,R12
JBE 0x0015237e
MOV RDX,R12
JMP 0x00152404
LAB_001522d7:
MOV qword ptr [RBP + -0x38],R13
MOV qword ptr [RBP + -0x30],R15
MOV R13,R12
LAB_001522e2:
MOV RSI,qword ptr [R14 + 0x38]
MOV R15,qword ptr [R14 + 0x40]
SUB R15,RSI
CMP R13,R15
MOV RBX,R15
CMOVC RBX,R13
MOV RDI,qword ptr [RBP + -0x40]
MOV RDX,RBX
CALL 0x001282c0
MOV RSI,qword ptr [R14 + 0x38]
ADD RSI,RBX
MOV qword ptr [R14 + 0x38],RSI
CMP R13,R15
JBE 0x00152321
SUB R12D,R13D
LEA EAX,[RBX + R12*0x1]
MOV dword ptr [R14 + 0xe4],EAX
LAB_00152321:
MOV RDI,qword ptr [R14 + 0x20]
MOV R12,R15
SUB R12,RBX
MOV RDX,R12
CALL 0x001282c0
MOV RAX,qword ptr [R14 + 0x20]
MOV RCX,qword ptr [R14 + 0x40]
MOV qword ptr [R14 + 0x10],RAX
ADD R12,RAX
MOV qword ptr [R14 + 0x18],R12
MOV qword ptr [R14 + 0x38],RCX
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,RBX
MOV qword ptr [R14],RAX
ADD qword ptr [R14 + 0x8],R15
MOV RDI,qword ptr [R14 + 0x90]
TEST RDI,RDI
JNZ 0x00152574
LAB_00152368:
XOR EBX,EBX
CMP R13,R15
SETA BL
MOV RDI,qword ptr [RBP + -0x30]
CALL 0x00128280
JMP 0x001524e6
LAB_0015237e:
MOV qword ptr [RBP + -0x38],R13
MOV R13D,R12D
AND R13D,0xfffff000
SUB R13,RAX
MOV EBX,dword ptr [R14 + 0xd4]
MOV RAX,qword ptr [R14 + 0xf8]
MOV qword ptr [RBP + -0x30],RAX
LEA RAX,[0x4368c8]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0xa8]
MOV ESI,EBX
MOV EDX,0x6
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x001525ba
MOV EDI,EBX
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,R13
MOV RCX,qword ptr [RBP + -0x30]
CALL 0x0015dc20
MOV RBX,RAX
LAB_001523dd:
CMP RBX,-0x1
JZ 0x001524be
MOV RDX,R12
SUB RDX,RBX
ADD qword ptr [RBP + -0x40],RBX
ADD qword ptr [RBP + -0x38],RBX
CMP RBX,R13
JNZ 0x00152503
XOR EAX,EAX
MOV R13,qword ptr [RBP + -0x38]
LAB_00152404:
MOV RBX,qword ptr [R14 + 0x8]
MOV RCX,qword ptr [R14 + 0xf0]
SUB RCX,RAX
SUB RBX,R13
CMP RCX,RBX
CMOVC RBX,RCX
TEST RBX,RBX
JZ 0x001524fa
MOV qword ptr [RBP + -0x48],RDX
MOV qword ptr [RBP + -0x38],R13
MOV R13D,dword ptr [R14 + 0xd4]
MOV RAX,qword ptr [R14 + 0x20]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [R14 + 0xf8]
MOV qword ptr [RBP + -0x30],RAX
LEA RAX,[0x4368c8]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0xa8]
MOV ESI,R13D
MOV EDX,0x6
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x0015262f
MOV EDI,R13D
MOV RSI,qword ptr [RBP + -0x50]
MOV RDX,RBX
MOV RCX,qword ptr [RBP + -0x30]
CALL 0x0015dc20
LAB_00152482:
CMP RAX,-0x1
MOV RDX,qword ptr [RBP + -0x48]
JZ 0x001524be
MOV R13,RDX
SUB R13,RAX
JBE 0x0015250f
MOV qword ptr [RBP + -0x30],R15
MOV RSI,qword ptr [R14 + 0x20]
MOV RBX,qword ptr [RBP + -0x40]
MOV RDI,RBX
MOV RDX,RAX
MOV R15,RAX
CALL 0x001282c0
ADD RBX,R15
MOV qword ptr [RBP + -0x40],RBX
ADD qword ptr [RBP + -0x38],R15
JMP 0x001522e2
LAB_001524be:
MOV dword ptr [R14 + 0xe4],0xffffffff
MOV RDI,qword ptr [R14 + 0x90]
TEST RDI,RDI
JNZ 0x001525a5
LAB_001524d9:
MOV RDI,R15
CALL 0x00128280
MOV EBX,0x1
LAB_001524e6:
MOV EAX,EBX
ADD RSP,0x88
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001524fa:
TEST RDX,RDX
JZ 0x00152515
MOV qword ptr [RBP + -0x38],R13
LAB_00152503:
MOV qword ptr [RBP + -0x30],R15
MOV R13,RDX
JMP 0x001522e2
LAB_0015250f:
MOV R13,qword ptr [RBP + -0x38]
JMP 0x00152517
LAB_00152515:
XOR EAX,EAX
LAB_00152517:
MOV R12,RAX
MOV RBX,RDX
MOV RDI,qword ptr [R14 + 0x90]
TEST RDI,RDI
JNZ 0x001526a3
LAB_0015252d:
MOV RDI,R15
CALL 0x00128280
MOV RSI,qword ptr [R14 + 0x20]
MOV RDX,RBX
LEA RAX,[RSI + RBX*0x1]
MOV qword ptr [R14 + 0x10],RAX
ADD R12,RSI
MOV qword ptr [R14 + 0x18],R12
MOV qword ptr [R14],R13
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x001282c0
XOR EBX,EBX
JMP 0x001524e6
LAB_0015255b:
LEA RSI,[0x196c7d]
MOV RDI,R15
MOV EDX,0x54c
CALL 0x00129f5c
JMP 0x00152254
LAB_00152574:
LEA RAX,[0x4368c8]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x00152368
LAB_00152589:
LEA RCX,[RBP + -0x60]
MOV RDI,RAX
MOV ESI,EBX
MOV RDX,R13
MOV RBX,RCX
CALL 0x00129e60
MOV RAX,qword ptr [RBX]
JMP 0x001522a1
LAB_001525a5:
LEA RAX,[0x4368c8]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x001524d9
LAB_001525ba:
MOV RCX,RAX
LEA RAX,[0x4368c8]
MOV RAX,qword ptr [RAX]
LEA RDX,[0x196c7d]
MOV qword ptr [RBP + -0x48],RCX
MOV RDI,RCX
MOV RSI,R13
MOV ECX,0x569
CALL qword ptr [RAX + 0x210]
MOV EDI,EBX
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,R13
MOV RCX,qword ptr [RBP + -0x30]
CALL 0x0015dc20
MOV RBX,RAX
XOR ESI,ESI
TEST RAX,RAX
MOV EAX,0x0
CMOVZ RAX,R13
CMP RBX,-0x1
CMOVNZ RSI,RBX
TEST byte ptr [RBP + -0x30],0x6
CMOVNZ RSI,RAX
LEA RAX,[0x4368c8]
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RBP + -0x48]
CALL qword ptr [RAX + 0x218]
JMP 0x001523dd
LAB_0015262f:
MOV RCX,RAX
LEA RAX,[0x4368c8]
MOV RAX,qword ptr [RAX]
LEA RDX,[0x196c7d]
MOV qword ptr [RBP + -0x58],RCX
MOV RDI,RCX
MOV RSI,RBX
MOV ECX,0x589
CALL qword ptr [RAX + 0x210]
MOV EDI,R13D
MOV RSI,qword ptr [RBP + -0x50]
MOV RDX,RBX
MOV RCX,qword ptr [RBP + -0x30]
CALL 0x0015dc20
MOV R13,RAX
XOR ESI,ESI
TEST RAX,RAX
CMOVNZ RBX,RSI
CMP RAX,-0x1
CMOVNZ RSI,RAX
TEST byte ptr [RBP + -0x30],0x6
CMOVNZ RSI,RBX
LEA RAX,[0x4368c8]
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RBP + -0x58]
CALL qword ptr [RAX + 0x218]
MOV RAX,R13
JMP 0x00152482
LAB_001526a3:
LEA RAX,[0x4368c8]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x0015252d
|
bool _my_b_seq_read(ulong *param_1,void *param_2,ulong param_3)
{
int4 uVar1;
void *pvVar2;
pthread_mutex_t *__mutex;
long lVar3;
long lVar4;
ulong __n;
long lVar5;
ulong uVar6;
long lVar7;
uint uVar8;
ulong uVar9;
ulong uVar10;
int1 local_b0 [72];
long local_68;
long local_60;
ulong local_58;
ulong local_50;
void *local_48;
ulong local_40;
pthread_mutex_t *local_38;
__mutex = (pthread_mutex_t *)(param_1 + 10);
local_48 = param_2;
if (param_1[0x12] == 0) {
pthread_mutex_lock(__mutex);
}
else {
psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x54c);
}
uVar9 = (param_1[3] - param_1[4]) + *param_1;
uVar8 = (uint)param_3;
if (uVar9 < param_1[1]) {
uVar1 = *(int4 *)((long)param_1 + 0xd4);
lVar3 = (**(code **)(PSI_server + 0x158))(local_b0,uVar1,8);
if (lVar3 == 0) {
local_68 = my_seek(uVar1,uVar9,0,0);
}
else {
_my_b_seq_read_cold_1(lVar3,uVar1,uVar9);
}
if (local_68 == -1) {
LAB_001524be:
*(int4 *)((long)param_1 + 0xe4) = 0xffffffff;
if (param_1[0x12] != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(__mutex);
return true;
}
*(int4 *)(param_1 + 0x1c) = 0;
uVar10 = (ulong)((uint)uVar9 & 0xfff);
if (0x2000 - uVar10 <= param_3) {
lVar3 = (uVar8 & 0xfffff000) - uVar10;
uVar1 = *(int4 *)((long)param_1 + 0xd4);
local_38 = (pthread_mutex_t *)param_1[0x1f];
local_40 = uVar9;
uVar9 = (**(code **)(PSI_server + 0x158))(local_b0,uVar1,6);
if (uVar9 == 0) {
lVar4 = my_read(uVar1,local_48,lVar3,local_38);
}
else {
local_50 = uVar9;
(**(code **)(PSI_server + 0x210))
(uVar9,lVar3,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x569);
lVar4 = my_read(uVar1,local_48,lVar3,local_38);
lVar5 = 0;
if (lVar4 == 0) {
lVar5 = lVar3;
}
lVar7 = 0;
if (lVar4 != -1) {
lVar7 = lVar4;
}
if (((ulong)local_38 & 6) != 0) {
lVar7 = lVar5;
}
(**(code **)(PSI_server + 0x218))(local_50,lVar7);
}
if (lVar4 == -1) goto LAB_001524be;
param_3 = param_3 - lVar4;
local_48 = (void *)((long)local_48 + lVar4);
uVar9 = local_40 + lVar4;
if (lVar4 != lVar3) goto LAB_001522e2;
uVar10 = 0;
local_40 = uVar9;
}
uVar6 = param_1[1] - uVar9;
if (param_1[0x1e] - uVar10 < param_1[1] - uVar9) {
uVar6 = param_1[0x1e] - uVar10;
}
if (uVar6 == 0) {
if (param_3 == 0) {
__n = 0;
uVar10 = param_3;
LAB_00152517:
if (param_1[0x12] != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(__mutex);
pvVar2 = (void *)param_1[4];
param_1[2] = (long)pvVar2 + uVar10;
param_1[3] = __n + (long)pvVar2;
*param_1 = uVar9;
memcpy(local_48,pvVar2,uVar10);
return false;
}
}
else {
uVar1 = *(int4 *)((long)param_1 + 0xd4);
local_58 = param_1[4];
local_38 = (pthread_mutex_t *)param_1[0x1f];
local_50 = param_3;
local_40 = uVar9;
lVar3 = (**(code **)(PSI_server + 0x158))(local_b0,uVar1,6);
if (lVar3 == 0) {
__n = my_read(uVar1,local_58,uVar6,local_38);
}
else {
local_60 = lVar3;
(**(code **)(PSI_server + 0x210))
(lVar3,uVar6,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x589);
__n = my_read(uVar1,local_58,uVar6,local_38);
if (__n != 0) {
uVar6 = 0;
}
uVar9 = 0;
if (__n != 0xffffffffffffffff) {
uVar9 = __n;
}
if (((ulong)local_38 & 6) != 0) {
uVar9 = uVar6;
}
(**(code **)(PSI_server + 0x218))(local_60,uVar9);
}
pvVar2 = local_48;
if (__n == 0xffffffffffffffff) goto LAB_001524be;
param_3 = local_50 - __n;
uVar10 = local_50;
uVar9 = local_40;
if (local_50 < __n || param_3 == 0) goto LAB_00152517;
local_38 = __mutex;
memcpy(local_48,(void *)param_1[4],__n);
local_48 = (void *)((long)pvVar2 + __n);
uVar9 = local_40 + __n;
__mutex = local_38;
}
}
LAB_001522e2:
local_38 = __mutex;
local_40 = uVar9;
uVar10 = param_1[8] - (long)param_1[7];
uVar9 = uVar10;
if (param_3 < uVar10) {
uVar9 = param_3;
}
memcpy(local_48,(void *)param_1[7],uVar9);
uVar6 = param_1[7];
param_1[7] = uVar6 + uVar9;
if (uVar10 < param_3) {
*(uint *)((long)param_1 + 0xe4) = (int)uVar9 + (uVar8 - (int)param_3);
}
memcpy((void *)param_1[4],(void *)(uVar6 + uVar9),uVar10 - uVar9);
param_1[2] = param_1[4];
param_1[3] = (uVar10 - uVar9) + param_1[4];
param_1[7] = param_1[8];
*param_1 = local_40 + uVar9;
param_1[1] = param_1[1] + uVar10;
if (param_1[0x12] != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(local_38);
return uVar10 < param_3;
}
|
|
12,197 |
my_hash_sort_utf16_nopad
|
eloqsql/strings/ctype-ucs2.c
|
static void
my_hash_sort_utf16_nopad(CHARSET_INFO *cs,
const uchar *s, size_t slen,
ulong *nr1, ulong *nr2)
{
my_wc_t wc;
my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc;
int res;
const uchar *e= s + slen;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
register ulong m1= *nr1, m2= *nr2;
while ((s < e) && (res= mb_wc(cs, &wc, (uchar *) s, (uchar *) e)) > 0)
{
my_tosort_utf16(uni_plane, &wc);
MY_HASH_ADD_16(m1, m2, wc);
s+= res;
}
*nr1= m1;
*nr2= m2;
}
|
O0
|
c
|
my_hash_sort_utf16_nopad:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpq -0x48(%rbp), %rcx
movb %al, -0x61(%rbp)
jae 0x6c3ce
movq -0x38(%rbp), %rax
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
movq -0x48(%rbp), %rcx
leaq -0x30(%rbp), %rsi
callq *%rax
movl %eax, -0x3c(%rbp)
cmpl $0x0, %eax
setg %al
movb %al, -0x61(%rbp)
movb -0x61(%rbp), %al
testb $0x1, %al
jne 0x6c3da
jmp 0x6c474
movq -0x50(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x6c490
jmp 0x6c3e9
movq -0x58(%rbp), %rax
andq $0x3f, %rax
addq -0x60(%rbp), %rax
movq -0x30(%rbp), %rcx
andq $0xff, %rcx
imulq %rcx, %rax
movq -0x58(%rbp), %rcx
shlq $0x8, %rcx
addq %rcx, %rax
xorq -0x58(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x60(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x60(%rbp)
jmp 0x6c425
movq -0x58(%rbp), %rax
andq $0x3f, %rax
addq -0x60(%rbp), %rax
movq -0x30(%rbp), %rcx
shrq $0x8, %rcx
imulq %rcx, %rax
movq -0x58(%rbp), %rcx
shlq $0x8, %rcx
addq %rcx, %rax
xorq -0x58(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x60(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x60(%rbp)
jmp 0x6c45e
movl -0x3c(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
jmp 0x6c39d
movq -0x58(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x60(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
addq $0x70, %rsp
popq %rbp
retq
|
my_hash_sort_utf16_nopad:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov rax, [rbp+var_8]
mov rax, [rax+0B8h]
mov rax, [rax+28h]
mov [rbp+var_38], rax
mov rax, [rbp+var_10]
add rax, [rbp+var_18]
mov [rbp+var_48], rax
mov rax, [rbp+var_8]
mov rax, [rax+78h]
mov [rbp+var_50], rax
mov rax, [rbp+var_20]
mov rax, [rax]
mov [rbp+var_58], rax
mov rax, [rbp+var_28]
mov rax, [rax]
mov [rbp+var_60], rax
loc_6C39D:
mov rcx, [rbp+var_10]
xor eax, eax
cmp rcx, [rbp+var_48]
mov [rbp+var_61], al
jnb short loc_6C3CE
mov rax, [rbp+var_38]
mov rdi, [rbp+var_8]
mov rdx, [rbp+var_10]
mov rcx, [rbp+var_48]
lea rsi, [rbp+var_30]
call rax
mov [rbp+var_3C], eax
cmp eax, 0
setnle al
mov [rbp+var_61], al
loc_6C3CE:
mov al, [rbp+var_61]
test al, 1
jnz short loc_6C3DA
jmp loc_6C474
loc_6C3DA:
mov rdi, [rbp+var_50]
lea rsi, [rbp+var_30]
call my_tosort_utf16
jmp short $+2
loc_6C3E9:
mov rax, [rbp+var_58]
and rax, 3Fh
add rax, [rbp+var_60]
mov rcx, [rbp+var_30]
and rcx, 0FFh
imul rax, rcx
mov rcx, [rbp+var_58]
shl rcx, 8
add rax, rcx
xor rax, [rbp+var_58]
mov [rbp+var_58], rax
mov rax, [rbp+var_60]
add rax, 3
mov [rbp+var_60], rax
jmp short $+2
loc_6C425:
mov rax, [rbp+var_58]
and rax, 3Fh
add rax, [rbp+var_60]
mov rcx, [rbp+var_30]
shr rcx, 8
imul rax, rcx
mov rcx, [rbp+var_58]
shl rcx, 8
add rax, rcx
xor rax, [rbp+var_58]
mov [rbp+var_58], rax
mov rax, [rbp+var_60]
add rax, 3
mov [rbp+var_60], rax
jmp short $+2
loc_6C45E:
mov ecx, [rbp+var_3C]
mov rax, [rbp+var_10]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_10], rax
jmp loc_6C39D
loc_6C474:
mov rcx, [rbp+var_58]
mov rax, [rbp+var_20]
mov [rax], rcx
mov rcx, [rbp+var_60]
mov rax, [rbp+var_28]
mov [rax], rcx
add rsp, 70h
pop rbp
retn
|
_QWORD * my_hash_sort_utf16_nopad(
long long a1,
unsigned long long a2,
long long a3,
unsigned long long *a4,
_QWORD *a5)
{
_QWORD *result; // rax
bool v6; // [rsp+Fh] [rbp-61h]
long long v7; // [rsp+10h] [rbp-60h]
long long v8; // [rsp+10h] [rbp-60h]
unsigned long long v9; // [rsp+18h] [rbp-58h]
long long v10; // [rsp+18h] [rbp-58h]
long long v11; // [rsp+20h] [rbp-50h]
unsigned long long v12; // [rsp+28h] [rbp-48h]
int v13; // [rsp+34h] [rbp-3Ch]
long long ( *v14)(long long, unsigned long long *, unsigned long long, unsigned long long); // [rsp+38h] [rbp-38h]
unsigned long long v15; // [rsp+40h] [rbp-30h] BYREF
_QWORD *v16; // [rsp+48h] [rbp-28h]
unsigned long long *v17; // [rsp+50h] [rbp-20h]
long long v18; // [rsp+58h] [rbp-18h]
unsigned long long v19; // [rsp+60h] [rbp-10h]
long long v20; // [rsp+68h] [rbp-8h]
v20 = a1;
v19 = a2;
v18 = a3;
v17 = a4;
v16 = a5;
v14 = *(long long ( **)(long long, unsigned long long *, unsigned long long, unsigned long long))(*(_QWORD *)(a1 + 184)
+ 40LL);
v12 = a3 + a2;
v11 = *(_QWORD *)(a1 + 120);
v9 = *a4;
v7 = *a5;
while ( 1 )
{
v6 = 0;
if ( v19 < v12 )
{
v13 = v14(v20, &v15, v19, v12);
v6 = v13 > 0;
}
if ( !v6 )
break;
my_tosort_utf16(v11, &v15);
v10 = v9 ^ ((v9 << 8) + (unsigned __int8)v15 * (v7 + (v9 & 0x3F)));
v8 = v7 + 3;
v9 = v10 ^ ((v10 << 8) + (v15 >> 8) * (v8 + (v10 & 0x3F)));
v7 = v8 + 3;
v19 += v13;
}
*v17 = v9;
result = v16;
*v16 = v7;
return result;
}
|
my_hash_sort_utf16_nopad:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x78]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x60],RAX
LAB_0016c39d:
MOV RCX,qword ptr [RBP + -0x10]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x48]
MOV byte ptr [RBP + -0x61],AL
JNC 0x0016c3ce
MOV RAX,qword ptr [RBP + -0x38]
MOV RDI,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x48]
LEA RSI,[RBP + -0x30]
CALL RAX
MOV dword ptr [RBP + -0x3c],EAX
CMP EAX,0x0
SETG AL
MOV byte ptr [RBP + -0x61],AL
LAB_0016c3ce:
MOV AL,byte ptr [RBP + -0x61]
TEST AL,0x1
JNZ 0x0016c3da
JMP 0x0016c474
LAB_0016c3da:
MOV RDI,qword ptr [RBP + -0x50]
LEA RSI,[RBP + -0x30]
CALL 0x0016c490
JMP 0x0016c3e9
LAB_0016c3e9:
MOV RAX,qword ptr [RBP + -0x58]
AND RAX,0x3f
ADD RAX,qword ptr [RBP + -0x60]
MOV RCX,qword ptr [RBP + -0x30]
AND RCX,0xff
IMUL RAX,RCX
MOV RCX,qword ptr [RBP + -0x58]
SHL RCX,0x8
ADD RAX,RCX
XOR RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x3
MOV qword ptr [RBP + -0x60],RAX
JMP 0x0016c425
LAB_0016c425:
MOV RAX,qword ptr [RBP + -0x58]
AND RAX,0x3f
ADD RAX,qword ptr [RBP + -0x60]
MOV RCX,qword ptr [RBP + -0x30]
SHR RCX,0x8
IMUL RAX,RCX
MOV RCX,qword ptr [RBP + -0x58]
SHL RCX,0x8
ADD RAX,RCX
XOR RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x3
MOV qword ptr [RBP + -0x60],RAX
JMP 0x0016c45e
LAB_0016c45e:
MOV ECX,dword ptr [RBP + -0x3c]
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0016c39d
LAB_0016c474:
MOV RCX,qword ptr [RBP + -0x58]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],RCX
ADD RSP,0x70
POP RBP
RET
|
void my_hash_sort_utf16_nopad(long param_1,ulong param_2,long param_3,ulong *param_4,long *param_5)
{
code *pcVar1;
int8 uVar2;
bool bVar3;
long local_68;
ulong local_60;
int local_44;
ulong local_38;
long *local_30;
ulong *local_28;
long local_20;
ulong local_18;
long local_10;
pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28);
uVar2 = *(int8 *)(param_1 + 0x78);
local_60 = *param_4;
local_68 = *param_5;
local_30 = param_5;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
while( true ) {
bVar3 = false;
if (local_18 < param_2 + param_3) {
local_44 = (*pcVar1)(local_10,&local_38,local_18,param_2 + param_3);
bVar3 = 0 < local_44;
}
if (!bVar3) break;
my_tosort_utf16(uVar2,&local_38);
local_60 = ((local_60 & 0x3f) + local_68) * (local_38 & 0xff) + local_60 * 0x100 ^ local_60;
local_60 = ((local_60 & 0x3f) + local_68 + 3) * (local_38 >> 8) + local_60 * 0x100 ^ local_60;
local_68 = local_68 + 6;
local_18 = local_18 + (long)local_44;
}
*local_28 = local_60;
*local_30 = local_68;
return;
}
|
|
12,198 |
get_defaults_options
|
eloqsql/mysys/my_default.c
|
int get_defaults_options(char **argv)
{
static char file_buffer[FN_REFLEN];
static char extra_file_buffer[FN_REFLEN];
char **orig_argv= argv;
argv++; /* Skip program name */
my_defaults_file= my_defaults_group_suffix= my_defaults_extra_file= 0;
my_no_defaults= my_print_defaults= FALSE;
if (*argv && !strcmp(*argv, "--no-defaults"))
{
my_no_defaults= 1;
argv++;
}
else
for(; *argv; argv++)
{
if (!my_defaults_file && is_prefix(*argv, "--defaults-file="))
my_defaults_file= *argv + sizeof("--defaults-file=")-1;
else
if (!my_defaults_extra_file && is_prefix(*argv, "--defaults-extra-file="))
my_defaults_extra_file= *argv + sizeof("--defaults-extra-file=")-1;
else
if (!my_defaults_group_suffix && is_prefix(*argv, "--defaults-group-suffix="))
my_defaults_group_suffix= *argv + sizeof("--defaults-group-suffix=")-1;
else
break;
}
if (*argv && !strcmp(*argv, "--print-defaults"))
{
my_print_defaults= 1;
my_defaults_mark_files= FALSE;
argv++;
}
if (! my_defaults_group_suffix)
my_defaults_group_suffix= getenv("MYSQL_GROUP_SUFFIX");
if (my_defaults_extra_file && my_defaults_extra_file != extra_file_buffer)
{
my_realpath(extra_file_buffer, my_defaults_extra_file, MYF(0));
my_defaults_extra_file= extra_file_buffer;
}
if (my_defaults_file && my_defaults_file != file_buffer)
{
my_realpath(file_buffer, my_defaults_file, MYF(0));
my_defaults_file= file_buffer;
}
return (int)(argv - orig_argv);
}
|
O0
|
c
|
get_defaults_options:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x8(%rbp)
leaq 0x366161(%rip), %rax # 0x396818
movq $0x0, (%rax)
leaq 0x36614b(%rip), %rax # 0x396810
movq $0x0, (%rax)
leaq 0x366135(%rip), %rax # 0x396808
movq $0x0, (%rax)
leaq 0x366121(%rip), %rax # 0x396802
movb $0x0, (%rax)
leaq 0x366116(%rip), %rax # 0x396801
movb $0x0, (%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x3072b
movq -0x8(%rbp), %rax
movq (%rax), %rdi
leaq 0x50bab(%rip), %rsi # 0x812b1
callq 0x24410
cmpl $0x0, %eax
jne 0x3072b
leaq 0x3660ea(%rip), %rax # 0x396801
movb $0x1, (%rax)
movq -0x8(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x8(%rbp)
jmp 0x30819
jmp 0x3072d
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x30817
leaq 0x3660c6(%rip), %rax # 0x396808
cmpq $0x0, (%rax)
jne 0x3077e
movq -0x8(%rbp), %rax
movq (%rax), %rdi
leaq 0x50b69(%rip), %rsi # 0x812bf
callq 0x7a360
cmpl $0x0, %eax
je 0x3077e
movq -0x8(%rbp), %rax
movq (%rax), %rcx
addq $0x11, %rcx
addq $-0x1, %rcx
leaq 0x366092(%rip), %rax # 0x396808
movq %rcx, (%rax)
jmp 0x30804
leaq 0x366093(%rip), %rax # 0x396818
cmpq $0x0, (%rax)
jne 0x307be
movq -0x8(%rbp), %rax
movq (%rax), %rdi
leaq 0x50b37(%rip), %rsi # 0x812d0
callq 0x7a360
cmpl $0x0, %eax
je 0x307be
movq -0x8(%rbp), %rax
movq (%rax), %rcx
addq $0x17, %rcx
addq $-0x1, %rcx
leaq 0x36605f(%rip), %rax # 0x396818
movq %rcx, (%rax)
jmp 0x30802
leaq 0x36604b(%rip), %rax # 0x396810
cmpq $0x0, (%rax)
jne 0x307fe
movq -0x8(%rbp), %rax
movq (%rax), %rdi
leaq 0x50b0e(%rip), %rsi # 0x812e7
callq 0x7a360
cmpl $0x0, %eax
je 0x307fe
movq -0x8(%rbp), %rax
movq (%rax), %rcx
addq $0x19, %rcx
addq $-0x1, %rcx
leaq 0x366017(%rip), %rax # 0x396810
movq %rcx, (%rax)
jmp 0x30800
jmp 0x30817
jmp 0x30802
jmp 0x30804
jmp 0x30806
movq -0x8(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x8(%rbp)
jmp 0x3072d
jmp 0x30819
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x3085b
movq -0x8(%rbp), %rax
movq (%rax), %rdi
leaq 0x50acf(%rip), %rsi # 0x81300
callq 0x24410
cmpl $0x0, %eax
jne 0x3085b
leaq 0x365fc0(%rip), %rax # 0x396802
movb $0x1, (%rax)
leaq 0x365fb4(%rip), %rax # 0x396800
movb $0x0, (%rax)
movq -0x8(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x8(%rbp)
leaq 0x365fae(%rip), %rax # 0x396810
cmpq $0x0, (%rax)
jne 0x30881
leaq 0x50aa2(%rip), %rdi # 0x81311
callq 0x243a0
movq %rax, %rcx
leaq 0x365f92(%rip), %rax # 0x396810
movq %rcx, (%rax)
leaq 0x365f90(%rip), %rax # 0x396818
cmpq $0x0, (%rax)
je 0x308cc
leaq 0x36618b(%rip), %rcx # 0x396a20
leaq 0x365f7c(%rip), %rax # 0x396818
cmpq %rcx, (%rax)
je 0x308cc
leaq 0x365f70(%rip), %rax # 0x396818
movq (%rax), %rsi
leaq 0x36616e(%rip), %rdi # 0x396a20
xorl %eax, %eax
movl %eax, %edx
callq 0x37da0
leaq 0x365f56(%rip), %rax # 0x396818
leaq 0x366157(%rip), %rcx # 0x396a20
movq %rcx, (%rax)
leaq 0x365f35(%rip), %rax # 0x396808
cmpq $0x0, (%rax)
je 0x30917
leaq 0x365f40(%rip), %rcx # 0x396820
leaq 0x365f21(%rip), %rax # 0x396808
cmpq %rcx, (%rax)
je 0x30917
leaq 0x365f15(%rip), %rax # 0x396808
movq (%rax), %rsi
leaq 0x365f23(%rip), %rdi # 0x396820
xorl %eax, %eax
movl %eax, %edx
callq 0x37da0
leaq 0x365efb(%rip), %rax # 0x396808
leaq 0x365f0c(%rip), %rcx # 0x396820
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
sarq $0x3, %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
|
get_defaults_options:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
mov rax, [rbp+var_8]
add rax, 8
mov [rbp+var_8], rax
lea rax, my_defaults_extra_file
mov qword ptr [rax], 0
lea rax, my_defaults_group_suffix
mov qword ptr [rax], 0
lea rax, my_defaults_file
mov qword ptr [rax], 0
lea rax, my_print_defaults
mov byte ptr [rax], 0
lea rax, my_no_defaults
mov byte ptr [rax], 0
mov rax, [rbp+var_8]
cmp qword ptr [rax], 0
jz short loc_3072B
mov rax, [rbp+var_8]
mov rdi, [rax]
lea rsi, aNoDefaults; "--no-defaults"
call _strcmp
cmp eax, 0
jnz short loc_3072B
lea rax, my_no_defaults
mov byte ptr [rax], 1
mov rax, [rbp+var_8]
add rax, 8
mov [rbp+var_8], rax
jmp loc_30819
loc_3072B:
jmp short $+2
loc_3072D:
mov rax, [rbp+var_8]
cmp qword ptr [rax], 0
jz loc_30817
lea rax, my_defaults_file
cmp qword ptr [rax], 0
jnz short loc_3077E
mov rax, [rbp+var_8]
mov rdi, [rax]
lea rsi, aDefaultsFile; "--defaults-file="
call is_prefix
cmp eax, 0
jz short loc_3077E
mov rax, [rbp+var_8]
mov rcx, [rax]
add rcx, 11h
add rcx, 0FFFFFFFFFFFFFFFFh
lea rax, my_defaults_file
mov [rax], rcx
jmp loc_30804
loc_3077E:
lea rax, my_defaults_extra_file
cmp qword ptr [rax], 0
jnz short loc_307BE
mov rax, [rbp+var_8]
mov rdi, [rax]
lea rsi, aDefaultsExtraF; "--defaults-extra-file="
call is_prefix
cmp eax, 0
jz short loc_307BE
mov rax, [rbp+var_8]
mov rcx, [rax]
add rcx, 17h
add rcx, 0FFFFFFFFFFFFFFFFh
lea rax, my_defaults_extra_file
mov [rax], rcx
jmp short loc_30802
loc_307BE:
lea rax, my_defaults_group_suffix
cmp qword ptr [rax], 0
jnz short loc_307FE
mov rax, [rbp+var_8]
mov rdi, [rax]
lea rsi, aDefaultsGroupS; "--defaults-group-suffix="
call is_prefix
cmp eax, 0
jz short loc_307FE
mov rax, [rbp+var_8]
mov rcx, [rax]
add rcx, 19h
add rcx, 0FFFFFFFFFFFFFFFFh
lea rax, my_defaults_group_suffix
mov [rax], rcx
jmp short loc_30800
loc_307FE:
jmp short loc_30817
loc_30800:
jmp short $+2
loc_30802:
jmp short $+2
loc_30804:
jmp short $+2
loc_30806:
mov rax, [rbp+var_8]
add rax, 8
mov [rbp+var_8], rax
jmp loc_3072D
loc_30817:
jmp short $+2
loc_30819:
mov rax, [rbp+var_8]
cmp qword ptr [rax], 0
jz short loc_3085B
mov rax, [rbp+var_8]
mov rdi, [rax]
lea rsi, aPrintDefaults; "--print-defaults"
call _strcmp
cmp eax, 0
jnz short loc_3085B
lea rax, my_print_defaults
mov byte ptr [rax], 1
lea rax, my_defaults_mark_files
mov byte ptr [rax], 0
mov rax, [rbp+var_8]
add rax, 8
mov [rbp+var_8], rax
loc_3085B:
lea rax, my_defaults_group_suffix
cmp qword ptr [rax], 0
jnz short loc_30881
lea rdi, aMysqlGroupSuff; "MYSQL_GROUP_SUFFIX"
call _getenv
mov rcx, rax
lea rax, my_defaults_group_suffix
mov [rax], rcx
loc_30881:
lea rax, my_defaults_extra_file
cmp qword ptr [rax], 0
jz short loc_308CC
lea rcx, get_defaults_options_extra_file_buffer
lea rax, my_defaults_extra_file
cmp [rax], rcx
jz short loc_308CC
lea rax, my_defaults_extra_file
mov rsi, [rax]
lea rdi, get_defaults_options_extra_file_buffer
xor eax, eax
mov edx, eax
call my_realpath
lea rax, my_defaults_extra_file
lea rcx, get_defaults_options_extra_file_buffer
mov [rax], rcx
loc_308CC:
lea rax, my_defaults_file
cmp qword ptr [rax], 0
jz short loc_30917
lea rcx, get_defaults_options_file_buffer
lea rax, my_defaults_file
cmp [rax], rcx
jz short loc_30917
lea rax, my_defaults_file
mov rsi, [rax]
lea rdi, get_defaults_options_file_buffer
xor eax, eax
mov edx, eax
call my_realpath
lea rax, my_defaults_file
lea rcx, get_defaults_options_file_buffer
mov [rax], rcx
loc_30917:
mov rax, [rbp+var_8]
mov rcx, [rbp+var_10]
sub rax, rcx
sar rax, 3
add rsp, 10h
pop rbp
retn
|
long long get_defaults_options(long long a1)
{
_QWORD *v2; // [rsp+8h] [rbp-8h]
v2 = (_QWORD *)(a1 + 8);
my_defaults_extra_file = 0LL;
my_defaults_group_suffix = 0LL;
my_defaults_file = 0LL;
my_print_defaults = 0;
my_no_defaults = 0;
if ( *(_QWORD *)(a1 + 8) && !(unsigned int)strcmp(*v2, "--no-defaults") )
{
my_no_defaults = 1;
v2 = (_QWORD *)(a1 + 16);
}
else
{
while ( *v2 )
{
if ( my_defaults_file || !(unsigned int)is_prefix(*v2, "--defaults-file=") )
{
if ( my_defaults_extra_file || !(unsigned int)is_prefix(*v2, "--defaults-extra-file=") )
{
if ( my_defaults_group_suffix || !(unsigned int)is_prefix(*v2, "--defaults-group-suffix=") )
break;
my_defaults_group_suffix = *v2 + 24LL;
}
else
{
my_defaults_extra_file = *v2 + 22LL;
}
}
else
{
my_defaults_file = *v2 + 16LL;
}
++v2;
}
}
if ( *v2 && !(unsigned int)strcmp(*v2, "--print-defaults") )
{
my_print_defaults = 1;
my_defaults_mark_files = 0;
++v2;
}
if ( !my_defaults_group_suffix )
my_defaults_group_suffix = getenv("MYSQL_GROUP_SUFFIX");
if ( my_defaults_extra_file && (_UNKNOWN *)my_defaults_extra_file != &get_defaults_options_extra_file_buffer )
{
my_realpath(&get_defaults_options_extra_file_buffer, my_defaults_extra_file, 0LL);
my_defaults_extra_file = &get_defaults_options_extra_file_buffer;
}
if ( my_defaults_file && (_UNKNOWN *)my_defaults_file != &get_defaults_options_file_buffer )
{
my_realpath(&get_defaults_options_file_buffer, my_defaults_file, 0LL);
my_defaults_file = &get_defaults_options_file_buffer;
}
return ((long long)v2 - a1) >> 3;
}
|
get_defaults_options:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x8
MOV qword ptr [RBP + -0x8],RAX
LEA RAX,[0x496818]
MOV qword ptr [RAX],0x0
LEA RAX,[0x496810]
MOV qword ptr [RAX],0x0
LEA RAX,[0x496808]
MOV qword ptr [RAX],0x0
LEA RAX,[0x496802]
MOV byte ptr [RAX],0x0
LEA RAX,[0x496801]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX],0x0
JZ 0x0013072b
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x1812b1]
CALL 0x00124410
CMP EAX,0x0
JNZ 0x0013072b
LEA RAX,[0x496801]
MOV byte ptr [RAX],0x1
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x8
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00130819
LAB_0013072b:
JMP 0x0013072d
LAB_0013072d:
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX],0x0
JZ 0x00130817
LEA RAX,[0x496808]
CMP qword ptr [RAX],0x0
JNZ 0x0013077e
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x1812bf]
CALL 0x0017a360
CMP EAX,0x0
JZ 0x0013077e
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX]
ADD RCX,0x11
ADD RCX,-0x1
LEA RAX,[0x496808]
MOV qword ptr [RAX],RCX
JMP 0x00130804
LAB_0013077e:
LEA RAX,[0x496818]
CMP qword ptr [RAX],0x0
JNZ 0x001307be
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x1812d0]
CALL 0x0017a360
CMP EAX,0x0
JZ 0x001307be
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX]
ADD RCX,0x17
ADD RCX,-0x1
LEA RAX,[0x496818]
MOV qword ptr [RAX],RCX
JMP 0x00130802
LAB_001307be:
LEA RAX,[0x496810]
CMP qword ptr [RAX],0x0
JNZ 0x001307fe
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x1812e7]
CALL 0x0017a360
CMP EAX,0x0
JZ 0x001307fe
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX]
ADD RCX,0x19
ADD RCX,-0x1
LEA RAX,[0x496810]
MOV qword ptr [RAX],RCX
JMP 0x00130800
LAB_001307fe:
JMP 0x00130817
LAB_00130800:
JMP 0x00130802
LAB_00130802:
JMP 0x00130804
LAB_00130804:
JMP 0x00130806
LAB_00130806:
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x8
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0013072d
LAB_00130817:
JMP 0x00130819
LAB_00130819:
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX],0x0
JZ 0x0013085b
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x181300]
CALL 0x00124410
CMP EAX,0x0
JNZ 0x0013085b
LEA RAX,[0x496802]
MOV byte ptr [RAX],0x1
LEA RAX,[0x496800]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x8
MOV qword ptr [RBP + -0x8],RAX
LAB_0013085b:
LEA RAX,[0x496810]
CMP qword ptr [RAX],0x0
JNZ 0x00130881
LEA RDI,[0x181311]
CALL 0x001243a0
MOV RCX,RAX
LEA RAX,[0x496810]
MOV qword ptr [RAX],RCX
LAB_00130881:
LEA RAX,[0x496818]
CMP qword ptr [RAX],0x0
JZ 0x001308cc
LEA RCX,[0x496a20]
LEA RAX,[0x496818]
CMP qword ptr [RAX],RCX
JZ 0x001308cc
LEA RAX,[0x496818]
MOV RSI,qword ptr [RAX]
LEA RDI,[0x496a20]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x00137da0
LEA RAX,[0x496818]
LEA RCX,[0x496a20]
MOV qword ptr [RAX],RCX
LAB_001308cc:
LEA RAX,[0x496808]
CMP qword ptr [RAX],0x0
JZ 0x00130917
LEA RCX,[0x496820]
LEA RAX,[0x496808]
CMP qword ptr [RAX],RCX
JZ 0x00130917
LEA RAX,[0x496808]
MOV RSI,qword ptr [RAX]
LEA RDI,[0x496820]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x00137da0
LEA RAX,[0x496808]
LEA RCX,[0x496820]
MOV qword ptr [RAX],RCX
LAB_00130917:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RBP + -0x10]
SUB RAX,RCX
SAR RAX,0x3
ADD RSP,0x10
POP RBP
RET
|
long get_defaults_options(long param_1)
{
int iVar1;
long *local_10;
local_10 = (long *)(param_1 + 8);
my_defaults_extra_file = (int1 *)0x0;
my_defaults_group_suffix = (char *)0x0;
my_defaults_file = (int1 *)0x0;
my_print_defaults = 0;
my_no_defaults = 0;
if ((*local_10 == 0) || (iVar1 = strcmp((char *)*local_10,"--no-defaults"), iVar1 != 0)) {
for (; *local_10 != 0; local_10 = local_10 + 1) {
if ((my_defaults_file == (int1 *)0x0) &&
(iVar1 = is_prefix(*local_10,"--defaults-file="), iVar1 != 0)) {
my_defaults_file = (int1 *)(*local_10 + 0x10);
}
else if ((my_defaults_extra_file == (int1 *)0x0) &&
(iVar1 = is_prefix(*local_10,"--defaults-extra-file="), iVar1 != 0)) {
my_defaults_extra_file = (int1 *)(*local_10 + 0x16);
}
else {
if ((my_defaults_group_suffix != (char *)0x0) ||
(iVar1 = is_prefix(*local_10,"--defaults-group-suffix="), iVar1 == 0)) break;
my_defaults_group_suffix = (char *)(*local_10 + 0x18);
}
}
}
else {
my_no_defaults = 1;
local_10 = (long *)(param_1 + 0x10);
}
if ((*local_10 != 0) && (iVar1 = strcmp((char *)*local_10,"--print-defaults"), iVar1 == 0)) {
my_print_defaults = 1;
my_defaults_mark_files = 0;
local_10 = local_10 + 1;
}
if (my_defaults_group_suffix == (char *)0x0) {
my_defaults_group_suffix = getenv("MYSQL_GROUP_SUFFIX");
}
if ((my_defaults_extra_file != (int1 *)0x0) &&
(my_defaults_extra_file != get_defaults_options_extra_file_buffer)) {
my_realpath(get_defaults_options_extra_file_buffer,my_defaults_extra_file,0);
my_defaults_extra_file = get_defaults_options_extra_file_buffer;
}
if ((my_defaults_file != (int1 *)0x0) &&
(my_defaults_file != get_defaults_options_file_buffer)) {
my_realpath(get_defaults_options_file_buffer,my_defaults_file,0);
my_defaults_file = get_defaults_options_file_buffer;
}
return (long)local_10 - param_1 >> 3;
}
|
|
12,199 |
minja::Parser::consumeTokenGroups(std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char>> const&, minja::SpaceHandling)
|
llama.cpp/common/minja/minja.hpp
|
std::vector<std::string> consumeTokenGroups(const std::regex & regex, SpaceHandling space_handling = SpaceHandling::Strip) {
auto start = it;
consumeSpaces(space_handling);
std::smatch match;
if (std::regex_search(it, end, match, regex) && match.position() == 0) {
it += match[0].length();
std::vector<std::string> ret;
for (size_t i = 0, n = match.size(); i < n; ++i) {
ret.push_back(match[i].str());
}
return ret;
}
it = start;
return {};
}
|
O3
|
cpp
|
minja::Parser::consumeTokenGroups(std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char>> const&, minja::SpaceHandling):
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 0x20(%rsi), %r12
movq %rsi, %rdi
movl %ecx, %esi
callq 0xed4fc
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rdx
movaps %xmm0, 0x10(%rdx)
movaps %xmm0, (%rdx)
movq 0x18(%r14), %rsi
movq 0x20(%r14), %rdi
movl $0x0, (%rsp)
movq %r15, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x7e1da
testb %al, %al
je 0xec291
movq 0x28(%rsp), %rdx
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
movq %rcx, %r15
subq %rax, %r15
je 0xec278
movq (%rax), %rdi
cmpq $0x48, %r15
jne 0xec289
cmpq %rdx, %rdi
jne 0xec291
jmp 0xec27f
cmpq %rdx, -0x48(%rax,%r15)
jne 0xec291
leaq (%rax,%r15), %rsi
addq $-0x48, %rsi
jmp 0xec2cc
movq %rax, %rsi
cmpq %rdx, %rdi
je 0xec2cc
movq %r12, 0x20(%r14)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xec2ba
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x21180
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rsi), %rdi
subq %rdx, %rdi
xorl %edx, %edx
cmpb $0x0, 0x10(%rsi)
cmovneq %rdi, %rdx
addq %rdx, 0x20(%r14)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
cmpq %rcx, %rax
je 0xec2a3
sarq $0x3, %r15
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %r15
addq $-0x3, %r15
je 0xec2a3
leaq 0x48(%rsp), %r13
xorl %ebp, %ebp
leaq 0x38(%rsp), %r14
xorl %r12d, %r12d
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rax
subq %rsi, %rax
je 0xec34d
movq %rax, %rcx
sarq $0x3, %rcx
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdx, %rcx
addq $-0x3, %rcx
cmpq %r12, %rcx
jbe 0xec34d
addq %rbp, %rsi
jmp 0xec354
addq %rax, %rsi
addq $-0x48, %rsi
movq %r14, %rdi
callq 0x73ab2
movq %rbx, %rdi
movq %r14, %rsi
callq 0x80362
movq 0x38(%rsp), %rdi
cmpq %r13, %rdi
je 0xec37e
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x21180
incq %r12
addq $0x18, %rbp
cmpq %r12, %r15
jne 0xec31b
jmp 0xec2a3
movq %rax, %r14
jmp 0xec3bb
movq %rax, %r14
jmp 0xec3b3
movq %rax, %r14
movq 0x38(%rsp), %rdi
cmpq %r13, %rdi
je 0xec3b3
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x21180
movq %rbx, %rdi
callq 0x33624
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xec3d2
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x21180
movq %r14, %rdi
callq 0x21b70
|
_ZN5minja6Parser18consumeTokenGroupsERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE:
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, [rsi+20h]
mov rdi, rsi
mov esi, ecx
call _ZN5minja6Parser13consumeSpacesENS_13SpaceHandlingE; minja::Parser::consumeSpaces(minja::SpaceHandling)
xorps xmm0, xmm0
lea rdx, [rsp+88h+var_78]
movaps xmmword ptr [rdx+10h], xmm0
movaps xmmword ptr [rdx], xmm0
mov rsi, [r14+18h]
mov rdi, [r14+20h]
mov [rsp+88h+var_88], 0
mov rcx, r15
xor r8d, r8d
xor r9d, r9d
call _ZNSt8__detail17__regex_algo_implIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS5_9sub_matchISB_EEEcNS5_12regex_traitsIcEEEEbT_SH_RNS5_13match_resultsISH_T0_EERKNS5_11basic_regexIT1_T2_EENSt15regex_constants15match_flag_typeENS_20_RegexExecutorPolicyEb; 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>>(__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,std::__detail::_RegexExecutorPolicy,bool)
test al, al
jz short loc_EC291
mov rdx, [rsp+88h+var_60]
mov rax, [rsp+88h+var_78]
mov rcx, [rsp+88h+var_70]
mov r15, rcx
sub r15, rax
jz short loc_EC278
mov rdi, [rax]
cmp r15, 48h ; 'H'
jnz short loc_EC289
cmp rdi, rdx
jnz short loc_EC291
jmp short loc_EC27F
loc_EC278:
cmp [rax+r15-48h], rdx
jnz short loc_EC291
loc_EC27F:
lea rsi, [rax+r15]
add rsi, 0FFFFFFFFFFFFFFB8h
jmp short loc_EC2CC
loc_EC289:
mov rsi, rax
cmp rdi, rdx
jz short loc_EC2CC
loc_EC291:
mov [r14+20h], r12
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
mov qword ptr [rbx+10h], 0
loc_EC2A3:
mov rdi, [rsp+88h+var_78]; void *
test rdi, rdi
jz short loc_EC2BA
mov rsi, [rsp+88h+var_68]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_EC2BA:
mov rax, rbx
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_EC2CC:
mov rdi, [rsi+8]
sub rdi, rdx
xor edx, edx
cmp byte ptr [rsi+10h], 0
cmovnz rdx, rdi
add [r14+20h], rdx
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
mov qword ptr [rbx+10h], 0
cmp rax, rcx
jz short loc_EC2A3
sar r15, 3
mov rax, 0AAAAAAAAAAAAAAABh
imul r15, rax
add r15, 0FFFFFFFFFFFFFFFDh
jz short loc_EC2A3
lea r13, [rsp+88h+var_40]
xor ebp, ebp
lea r14, [rsp+88h+var_50]
xor r12d, r12d
loc_EC31B:
mov rsi, [rsp+88h+var_78]
mov rax, [rsp+88h+var_70]
sub rax, rsi
jz short loc_EC34D
mov rcx, rax
sar rcx, 3
mov rdx, 0AAAAAAAAAAAAAAABh
imul rcx, rdx
add rcx, 0FFFFFFFFFFFFFFFDh
cmp rcx, r12
jbe short loc_EC34D
add rsi, rbp
jmp short loc_EC354
loc_EC34D:
add rsi, rax
add rsi, 0FFFFFFFFFFFFFFB8h
loc_EC354:
mov rdi, r14
call _ZNKSt7__cxx119sub_matchIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEEE3strEv; std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>::str(void)
mov rdi, rbx
mov rsi, r14
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&)
mov rdi, [rsp+88h+var_50]; void *
cmp rdi, r13
jz short loc_EC37E
mov rsi, [rsp+88h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_EC37E:
inc r12
add rbp, 18h
cmp r15, r12
jnz short loc_EC31B
jmp loc_EC2A3
mov r14, rax
jmp short loc_EC3BB
mov r14, rax
jmp short loc_EC3B3
mov r14, rax
mov rdi, [rsp+arg_30]; void *
cmp rdi, r13
jz short loc_EC3B3
mov rsi, [rsp+arg_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_EC3B3:
mov rdi, rbx
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
loc_EC3BB:
mov rdi, [rsp+arg_8]; void *
test rdi, rdi
jz short loc_EC3D2
mov rsi, [rsp+arg_18]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_EC3D2:
mov rdi, r14
call __Unwind_Resume
|
long long minja::Parser::consumeTokenGroups(long long a1, long long a2, long long a3, unsigned int a4)
{
long long v7; // r12
__int128 v8; // kr00_16
long long v9; // r15
long long v10; // rdi
long long v11; // rsi
long long v13; // rdx
unsigned long long v14; // r15
long long v15; // rbp
unsigned long long i; // r12
long long *v17; // rsi
__int128 v18; // [rsp+10h] [rbp-78h] BYREF
__int128 v19; // [rsp+20h] [rbp-68h]
void *v20[2]; // [rsp+38h] [rbp-50h] BYREF
long long v21; // [rsp+48h] [rbp-40h] BYREF
v7 = *(_QWORD *)(a2 + 32);
minja::Parser::consumeSpaces(a2, a4);
v19 = 0LL;
v18 = 0LL;
if ( !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>>(
*(long long **)(a2 + 32),
*(_QWORD *)(a2 + 24),
(char **)&v18,
a3,
0,
0,
0) )
goto LABEL_9;
v8 = v18;
v9 = *((_QWORD *)&v18 + 1) - v18;
if ( *((_QWORD *)&v18 + 1) != (_QWORD)v18 )
{
v10 = *(_QWORD *)v18;
if ( v9 == 72 )
{
if ( v10 == *((_QWORD *)&v19 + 1) )
goto LABEL_7;
}
else
{
v11 = v18;
if ( v10 == *((_QWORD *)&v19 + 1) )
goto LABEL_13;
}
LABEL_9:
*(_QWORD *)(a2 + 32) = v7;
*(_OWORD *)a1 = 0LL;
*(_QWORD *)(a1 + 16) = 0LL;
goto LABEL_10;
}
if ( *(_QWORD *)(*((_QWORD *)&v18 + 1) - 72LL) != *((_QWORD *)&v19 + 1) )
goto LABEL_9;
LABEL_7:
v11 = *((_QWORD *)&v18 + 1) - 72LL;
LABEL_13:
v13 = 0LL;
if ( *(_BYTE *)(v11 + 16) )
v13 = *(_QWORD *)(v11 + 8) - *((_QWORD *)&v19 + 1);
*(_QWORD *)(a2 + 32) += v13;
*(_OWORD *)a1 = 0LL;
*(_QWORD *)(a1 + 16) = 0LL;
if ( (_QWORD)v8 != *((_QWORD *)&v8 + 1) )
{
v14 = 0xAAAAAAAAAAAAAAABLL * (v9 >> 3) - 3;
if ( v14 )
{
v15 = 0LL;
for ( i = 0LL; i != v14; ++i )
{
if ( *((_QWORD *)&v18 + 1) == (_QWORD)v18
|| 0xAAAAAAAAAAAAAAABLL * ((long long)(*((_QWORD *)&v18 + 1) - v18) >> 3) - 3 <= i )
{
v17 = (long long *)(*((_QWORD *)&v18 + 1) - 72LL);
}
else
{
v17 = (long long *)(v15 + v18);
}
std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>::str((long long)v20, v17);
std::vector<std::string>::emplace_back<std::string>(a1, v20);
if ( v20[0] != &v21 )
operator delete(v20[0], v21 + 1);
v15 += 24LL;
}
}
}
LABEL_10:
if ( (_QWORD)v18 )
operator delete((void *)v18, v19 - v18);
return a1;
}
|
consumeTokenGroups:
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 [RSI + 0x20]
MOV RDI,RSI
MOV ESI,ECX
CALL 0x001ed4fc
XORPS XMM0,XMM0
LEA RDX,[RSP + 0x10]
MOVAPS xmmword ptr [RDX + 0x10],XMM0
MOVAPS xmmword ptr [RDX],XMM0
MOV RSI,qword ptr [R14 + 0x18]
MOV RDI,qword ptr [R14 + 0x20]
LAB_001ec238:
MOV dword ptr [RSP],0x0
MOV RCX,R15
XOR R8D,R8D
XOR R9D,R9D
CALL 0x0017e1da
TEST AL,AL
JZ 0x001ec291
MOV RDX,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RSP + 0x18]
MOV R15,RCX
SUB R15,RAX
JZ 0x001ec278
MOV RDI,qword ptr [RAX]
CMP R15,0x48
JNZ 0x001ec289
CMP RDI,RDX
JNZ 0x001ec291
JMP 0x001ec27f
LAB_001ec278:
CMP qword ptr [RAX + R15*0x1 + -0x48],RDX
JNZ 0x001ec291
LAB_001ec27f:
LEA RSI,[RAX + R15*0x1]
ADD RSI,-0x48
JMP 0x001ec2cc
LAB_001ec289:
MOV RSI,RAX
CMP RDI,RDX
JZ 0x001ec2cc
LAB_001ec291:
MOV qword ptr [R14 + 0x20],R12
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
MOV qword ptr [RBX + 0x10],0x0
LAB_001ec2a3:
MOV RDI,qword ptr [RSP + 0x10]
TEST RDI,RDI
JZ 0x001ec2ba
MOV RSI,qword ptr [RSP + 0x20]
SUB RSI,RDI
CALL 0x00121180
LAB_001ec2ba:
MOV RAX,RBX
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001ec2cc:
MOV RDI,qword ptr [RSI + 0x8]
SUB RDI,RDX
XOR EDX,EDX
CMP byte ptr [RSI + 0x10],0x0
CMOVNZ RDX,RDI
ADD qword ptr [R14 + 0x20],RDX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
MOV qword ptr [RBX + 0x10],0x0
CMP RAX,RCX
JZ 0x001ec2a3
SAR R15,0x3
MOV RAX,-0x5555555555555555
IMUL R15,RAX
ADD R15,-0x3
JZ 0x001ec2a3
LEA R13,[RSP + 0x48]
XOR EBP,EBP
LEA R14,[RSP + 0x38]
XOR R12D,R12D
LAB_001ec31b:
MOV RSI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x18]
SUB RAX,RSI
JZ 0x001ec34d
MOV RCX,RAX
SAR RCX,0x3
MOV RDX,-0x5555555555555555
IMUL RCX,RDX
ADD RCX,-0x3
CMP RCX,R12
JBE 0x001ec34d
ADD RSI,RBP
JMP 0x001ec354
LAB_001ec34d:
ADD RSI,RAX
ADD RSI,-0x48
LAB_001ec354:
MOV RDI,R14
CALL 0x00173ab2
LAB_001ec35c:
MOV RDI,RBX
MOV RSI,R14
CALL 0x00180362
LAB_001ec367:
MOV RDI,qword ptr [RSP + 0x38]
CMP RDI,R13
JZ 0x001ec37e
MOV RSI,qword ptr [RSP + 0x48]
INC RSI
CALL 0x00121180
LAB_001ec37e:
INC R12
ADD RBP,0x18
CMP R15,R12
JNZ 0x001ec31b
JMP 0x001ec2a3
|
/* minja::Parser::consumeTokenGroups(std::__cxx11::basic_regex<char,
std::__cxx11::regex_traits<char> > const&, minja::SpaceHandling) */
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *
minja::Parser::consumeTokenGroups
(vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *param_1,
Parser *param_2,int8 param_3,int4 param_4)
{
int8 uVar1;
bool bVar2;
long *plVar3;
long lVar4;
long lVar5;
long *local_78;
long *plStack_70;
long local_68;
long lStack_60;
long *local_50 [2];
long local_40 [2];
uVar1 = *(int8 *)(param_2 + 0x20);
consumeSpaces(param_2,param_4);
local_68 = 0;
lStack_60 = 0;
local_78 = (long *)0x0;
plStack_70 = (long *)0x0;
/* try { // try from 001ec238 to 001ec24c has its CatchHandler @ 001ec38f */
bVar2 = 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>>
(*(int8 *)(param_2 + 0x20),*(int8 *)(param_2 + 0x18),&local_78,
param_3,0,0,0);
if (bVar2) {
lVar5 = (long)plStack_70 - (long)local_78;
if (lVar5 == 0) {
lVar4 = local_78[-9];
joined_r0x001ec27d:
if (lVar4 != lStack_60) goto LAB_001ec291;
plVar3 = (long *)((long)local_78 + lVar5 + -0x48);
}
else {
lVar4 = *local_78;
if (lVar5 == 0x48) goto joined_r0x001ec27d;
plVar3 = local_78;
if (lVar4 != lStack_60) goto LAB_001ec291;
}
lVar4 = 0;
if ((char)plVar3[2] != '\0') {
lVar4 = plVar3[1] - lStack_60;
}
*(long *)(param_2 + 0x20) = *(long *)(param_2 + 0x20) + lVar4;
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
*(int8 *)(param_1 + 0x10) = 0;
if ((local_78 != plStack_70) && (lVar5 = (lVar5 >> 3) * -0x5555555555555555, lVar5 != 3)) {
lVar4 = 0;
do {
/* try { // try from 001ec354 to 001ec35b has its CatchHandler @ 001ec394 */
std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>::str
();
/* try { // try from 001ec35c to 001ec366 has its CatchHandler @ 001ec399 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::
emplace_back<std::__cxx11::string>(param_1,(string *)local_50);
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
lVar4 = lVar4 + 1;
} while (lVar5 + -3 != lVar4);
}
}
else {
LAB_001ec291:
*(int8 *)(param_2 + 0x20) = uVar1;
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
*(int8 *)(param_1 + 0x10) = 0;
}
if (local_78 != (long *)0x0) {
operator_delete(local_78,local_68 - (long)local_78);
}
return param_1;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.