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
|
---|---|---|---|---|---|---|---|---|---|---|---|
7,600 |
mz_compress2
|
7CodeWizard[P]stablediffusion/thirdparty/miniz.h
|
int mz_compress2(unsigned char *pDest, mz_ulong *pDest_len,
const unsigned char *pSource, mz_ulong source_len, int level) {
int status;
mz_stream stream;
memset(&stream, 0, sizeof(stream));
/* In case mz_ulong is 64-bits (argh I hate longs). */
if ((source_len | *pDest_len) > 0xFFFFFFFFU)
return MZ_PARAM_ERROR;
stream.next_in = pSource;
stream.avail_in = (mz_uint32)source_len;
stream.next_out = pDest;
stream.avail_out = (mz_uint32)*pDest_len;
status = mz_deflateInit(&stream, level);
if (status != MZ_OK)
return status;
status = mz_deflate(&stream, MZ_FINISH);
if (status != MZ_STREAM_END) {
mz_deflateEnd(&stream);
return (status == MZ_OK) ? MZ_BUF_ERROR : status;
}
*pDest_len = stream.total_out;
return mz_deflateEnd(&stream);
}
|
O3
|
c
|
mz_compress2:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x70, %rsp
movq %rsi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x58(%rsp)
movups %xmm0, 0x48(%rsp)
movups %xmm0, 0x38(%rsp)
movups %xmm0, 0x28(%rsp)
movups %xmm0, 0x18(%rsp)
movups %xmm0, 0x8(%rsp)
movq $0x0, 0x68(%rsp)
movq (%rsi), %rsi
movq %rsi, %rax
orq %rcx, %rax
shrq $0x20, %rax
movl $0xffffd8f0, %ebp # imm = 0xFFFFD8F0
jne 0x7e2c5
movq %rsp, %rax
movq %rdx, (%rax)
movl %ecx, 0x8(%rax)
movq %rdi, 0x18(%rax)
movl %esi, 0x20(%rax)
movq %rax, %rdi
movl %r8d, %esi
movl $0x8, %edx
movl $0xf, %ecx
movl $0x9, %r8d
xorl %r9d, %r9d
callq 0x7db68
movl %eax, %ebp
testl %eax, %eax
jne 0x7e2c5
movq %rsp, %rdi
movl $0x4, %esi
callq 0x7de54
cmpl $0x1, %eax
jne 0x7e2a3
movq 0x28(%rsp), %rax
movq %rax, (%rbx)
movq 0x38(%rsp), %rsi
xorl %ebp, %ebp
testq %rsi, %rsi
je 0x7e2c5
movq 0x50(%rsp), %rdi
callq *0x48(%rsp)
jmp 0x7e2c5
movl %eax, %r14d
movq 0x38(%rsp), %rsi
testq %rsi, %rsi
je 0x7e2b9
movq 0x50(%rsp), %rdi
callq *0x48(%rsp)
testl %r14d, %r14d
movl $0xfffffffb, %ebp # imm = 0xFFFFFFFB
cmovnel %r14d, %ebp
movl %ebp, %eax
addq $0x70, %rsp
popq %rbx
popq %r14
popq %rbp
retq
|
mz_compress2:
push rbp
push r14
push rbx
sub rsp, 70h
mov rbx, rsi
xorps xmm0, xmm0
movups [rsp+88h+var_30], xmm0
movups [rsp+88h+var_40], xmm0
movups [rsp+88h+var_50], xmm0
movups [rsp+88h+var_60], xmm0
movups [rsp+88h+var_70], xmm0
movups [rsp+88h+var_80], xmm0
mov [rsp+88h+var_20], 0
mov rsi, [rsi]
mov rax, rsi
or rax, rcx
shr rax, 20h
mov ebp, 0FFFFD8F0h
jnz loc_7E2C5
mov rax, rsp
mov [rax], rdx
mov [rax+8], ecx
mov [rax+18h], rdi
mov [rax+20h], esi
mov rdi, rax
mov esi, r8d
mov edx, 8
mov ecx, 0Fh
mov r8d, 9
xor r9d, r9d
call mz_deflateInit2
mov ebp, eax
test eax, eax
jnz short loc_7E2C5
mov rdi, rsp
mov esi, 4
call mz_deflate
cmp eax, 1
jnz short loc_7E2A3
mov rax, qword ptr [rsp+88h+var_60]
mov [rbx], rax
mov rsi, qword ptr [rsp+88h+var_50]
xor ebp, ebp
test rsi, rsi
jz short loc_7E2C5
mov rdi, qword ptr [rsp+88h+var_40+8]
call qword ptr [rsp+88h+var_40]
jmp short loc_7E2C5
loc_7E2A3:
mov r14d, eax
mov rsi, qword ptr [rsp+88h+var_50]
test rsi, rsi
jz short loc_7E2B9
mov rdi, qword ptr [rsp+88h+var_40+8]
call qword ptr [rsp+88h+var_40]
loc_7E2B9:
test r14d, r14d
mov ebp, 0FFFFFFFBh
cmovnz ebp, r14d
loc_7E2C5:
mov eax, ebp
add rsp, 70h
pop rbx
pop r14
pop rbp
retn
|
long long mz_compress2(long long a1, unsigned long long *a2, long long a3, long long a4, unsigned int a5)
{
unsigned long long v6; // rsi
unsigned int v7; // ebp
unsigned int v8; // eax
unsigned int v9; // r14d
long long v11; // [rsp+0h] [rbp-88h] BYREF
__int128 v12; // [rsp+8h] [rbp-80h]
__int128 v13; // [rsp+18h] [rbp-70h]
__int128 v14; // [rsp+28h] [rbp-60h]
__int128 v15; // [rsp+38h] [rbp-50h]
__int128 v16; // [rsp+48h] [rbp-40h]
__int128 v17; // [rsp+58h] [rbp-30h]
long long v18; // [rsp+68h] [rbp-20h]
v17 = 0LL;
v16 = 0LL;
v15 = 0LL;
v14 = 0LL;
v13 = 0LL;
v12 = 0LL;
v18 = 0LL;
v6 = *a2;
v7 = -10000;
if ( !((a4 | v6) >> 32) )
{
v11 = a3;
LODWORD(v12) = a4;
*(_QWORD *)&v13 = a1;
DWORD2(v13) = v6;
v7 = mz_deflateInit2((long long)&v11, a5, 8, 0xFu, 9, 0);
if ( !v7 )
{
v8 = mz_deflate(&v11, 4u);
if ( v8 == 1 )
{
*a2 = v14;
v7 = 0;
if ( (_QWORD)v15 )
((void ( *)(_QWORD))v16)(*((_QWORD *)&v16 + 1));
}
else
{
v9 = v8;
if ( (_QWORD)v15 )
((void ( *)(_QWORD))v16)(*((_QWORD *)&v16 + 1));
v7 = -5;
if ( v9 )
return v9;
}
}
}
return v7;
}
| |||
7,601 |
Opt::parse(int, char const**)
|
monkey531[P]llama/examples/run/run.cpp
|
int parse(int argc, const char ** argv) {
bool options_parsing = true;
for (int i = 1, positional_args_i = 0; i < argc; ++i) {
if (options_parsing && (strcmp(argv[i], "-c") == 0 || strcmp(argv[i], "--context-size") == 0)) {
if (handle_option_with_value(argc, argv, i, context_size) == 1) {
return 1;
}
} else if (options_parsing &&
(strcmp(argv[i], "-n") == 0 || strcmp(argv[i], "-ngl") == 0 || strcmp(argv[i], "--ngl") == 0)) {
if (handle_option_with_value(argc, argv, i, ngl) == 1) {
return 1;
}
} else if (options_parsing && strcmp(argv[i], "--temp") == 0) {
if (handle_option_with_value(argc, argv, i, temperature) == 1) {
return 1;
}
} else if (options_parsing &&
(parse_flag(argv, i, "-v", "--verbose") || parse_flag(argv, i, "-v", "--log-verbose"))) {
verbose = true;
} else if (options_parsing && strcmp(argv[i], "--jinja") == 0) {
use_jinja = true;
} else if (options_parsing && parse_flag(argv, i, "-h", "--help")) {
help = true;
return 0;
} else if (options_parsing && strcmp(argv[i], "--") == 0) {
options_parsing = false;
} else if (positional_args_i == 0) {
if (!argv[i][0] || argv[i][0] == '-') {
return 1;
}
++positional_args_i;
model_ = argv[i];
} else if (positional_args_i == 1) {
++positional_args_i;
user = argv[i];
} else {
user += " " + std::string(argv[i]);
}
}
if (model_.empty()){
return 1;
}
return 0;
}
|
O3
|
cpp
|
Opt::parse(int, char const**):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbp
movl %esi, 0x10(%rsp)
cmpl $0x2, %esi
jl 0x2098a
movq %rdx, %r12
leaq 0xd8(%rbp), %rax
movq %rax, 0x18(%rsp)
leaq 0xb8(%rbp), %rax
movq %rax, 0x40(%rsp)
movl $0x1, %r13d
movb $0x1, %bl
xorl %r15d, %r15d
movq %rdx, 0x8(%rsp)
testb $0x1, %bl
je 0x2080c
movq %rbp, %r14
movslq %r13d, %rbp
movq (%r12,%rbp,8), %r12
cmpb $0x2d, (%r12)
jne 0x20669
cmpb $0x63, 0x1(%r12)
jne 0x2063d
cmpb $0x0, 0x2(%r12)
je 0x20723
movq %r12, %rdi
leaq 0x8f702(%rip), %rsi # 0xafd49
callq 0x19b00
testl %eax, %eax
je 0x20723
cmpb $0x6e, 0x1(%r12)
jne 0x20680
cmpb $0x0, 0x2(%r12)
jne 0x20680
jmp 0x2074e
movq %r12, %rdi
leaq 0x8f6d6(%rip), %rsi # 0xafd49
callq 0x19b00
testl %eax, %eax
je 0x20723
movq %r12, %rdi
leaq 0x8f6cf(%rip), %rsi # 0xafd59
callq 0x19b00
testl %eax, %eax
je 0x2074e
movq %r12, %rdi
leaq 0x8f6b7(%rip), %rsi # 0xafd58
callq 0x19b00
testl %eax, %eax
je 0x2074e
movq %r12, %rdi
leaq 0x8f6a6(%rip), %rsi # 0xafd5e
callq 0x19b00
testl %eax, %eax
je 0x2077e
movq %r14, %r12
movq %r14, %rdi
movq 0x8(%rsp), %rsi
movl %r13d, %edx
leaq 0x8f68b(%rip), %rcx # 0xafd65
leaq 0x8f687(%rip), %r8 # 0xafd68
callq 0x20ed6
testb %al, %al
jne 0x20710
movq %r12, %rdi
movq 0x8(%rsp), %rsi
movl %r13d, %edx
leaq 0x8f669(%rip), %rcx # 0xafd65
leaq 0x8f66f(%rip), %r8 # 0xafd72
callq 0x20ed6
testb %al, %al
je 0x207af
movb $0x1, 0x108(%r12)
movb $0x1, %bl
movq %r12, %rbp
jmp 0x20867
incl %r13d
cmpl 0x10(%rsp), %r13d
jge 0x209a6
movslq %r13d, %rax
movq 0x8(%rsp), %r12
movq (%r12,%rax,8), %rdi
callq 0x19c50
movq %r14, %rbp
movl %eax, 0xfc(%r14)
jmp 0x20777
incl %r13d
cmpl 0x10(%rsp), %r13d
jge 0x209a6
movslq %r13d, %rax
movq 0x8(%rsp), %r12
movq (%r12,%rax,8), %rdi
callq 0x19c50
movq %r14, %rbp
movl %eax, 0x100(%r14)
movb $0x1, %bl
jmp 0x20966
incl %r13d
cmpl 0x10(%rsp), %r13d
jge 0x209a6
movslq %r13d, %rax
movq 0x8(%rsp), %r12
movq (%r12,%rax,8), %rdi
callq 0x19960
cvtsd2ss %xmm0, %xmm0
movq %r14, %rbp
movss %xmm0, 0x104(%r14)
jmp 0x20777
movq 0x8(%rsp), %r12
movq (%r12,%rbp,8), %rdi
leaq 0x8f5c1(%rip), %rsi # 0xafd80
callq 0x19b00
testl %eax, %eax
je 0x20976
movq %r14, %rdi
movq %r12, %rsi
movl %r13d, %edx
leaq 0x8f5ac(%rip), %rcx # 0xafd88
leaq 0x8f5a8(%rip), %r8 # 0xafd8b
callq 0x20ed6
testb %al, %al
jne 0x209ad
movq (%r12,%rbp,8), %rax
cmpb $0x2d, (%rax)
movq %r14, %rbp
jne 0x2080c
cmpb $0x2d, 0x1(%rax)
jne 0x2080c
cmpb $0x0, 0x2(%rax)
je 0x20986
movslq %r13d, %rax
cmpl $0x1, %r15d
je 0x20871
testl %r15d, %r15d
jne 0x208a3
movq (%r12,%rax,8), %r12
movzbl (%r12), %ecx
movl $0x1, %eax
testl %ecx, %ecx
je 0x20997
cmpl $0x2d, %ecx
je 0x20997
movq 0xc0(%rbp), %r15
movq %r12, %rdi
callq 0x19360
movq 0x40(%rsp), %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %r12, %rcx
movq %rax, %r8
callq 0x19c40
movl $0x1, %r15d
movq 0x8(%rsp), %r12
jmp 0x20966
movq (%r12,%rax,8), %r15
movq 0xe0(%rbp), %r12
movq %r15, %rdi
callq 0x19360
movq 0x18(%rsp), %rdi
xorl %esi, %esi
movq %r12, %rdx
movq 0x8(%rsp), %r12
movq %r15, %rcx
movq %rax, %r8
callq 0x19c40
jmp 0x20960
movq (%r12,%rax,8), %rsi
leaq 0x48(%rsp), %r14
movq %r14, %rdi
leaq 0x17(%rsp), %rdx
callq 0x20a94
movl $0x1, %r8d
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0x93bac(%rip), %rcx # 0xb4479
callq 0x19890
leaq 0x30(%rsp), %r14
movq %r14, 0x20(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x208fa
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x20901
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rdx, 0x28(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq 0x18(%rsp), %rdi
callq 0x19210
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x20944
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x197b0
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x20960
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x197b0
movl $0x2, %r15d
incl %r13d
cmpl 0x10(%rsp), %r13d
jl 0x2060f
jmp 0x2098a
movq %r14, %rbp
movb $0x1, 0xf8(%r14)
jmp 0x20777
xorl %ebx, %ebx
jmp 0x20966
xorl %eax, %eax
cmpq $0x0, 0xc0(%rbp)
sete %al
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %eax
jmp 0x20997
movb $0x1, 0x118(%r14)
xorl %eax, %eax
jmp 0x20997
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x209d8
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x197b0
jmp 0x209d8
movq %rax, %rbx
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x209f4
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x197b0
movq %rbx, %rdi
callq 0x19e10
|
_ZN3Opt5parseEiPPKc:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov rbp, rdi
mov [rsp+98h+var_88], esi
cmp esi, 2
jl loc_2098A
mov r12, rdx
lea rax, [rbp+0D8h]
mov [rsp+98h+var_80], rax
lea rax, [rbp+0B8h]
mov [rsp+98h+var_58], rax
mov r13d, 1
mov bl, 1
xor r15d, r15d
mov [rsp+98h+var_90], rdx
loc_2060F:
test bl, 1
jz loc_2080C
mov r14, rbp
movsxd rbp, r13d
mov r12, [r12+rbp*8]
cmp byte ptr [r12], 2Dh ; '-'
jnz short loc_20669
cmp byte ptr [r12+1], 63h ; 'c'
jnz short loc_2063D
cmp byte ptr [r12+2], 0
jz loc_20723
loc_2063D:
mov rdi, r12
lea rsi, aContextSize; "--context-size"
call _strcmp
test eax, eax
jz loc_20723
cmp byte ptr [r12+1], 6Eh ; 'n'
jnz short loc_20680
cmp byte ptr [r12+2], 0
jnz short loc_20680
jmp loc_2074E
loc_20669:
mov rdi, r12
lea rsi, aContextSize; "--context-size"
call _strcmp
test eax, eax
jz loc_20723
loc_20680:
mov rdi, r12
lea rsi, aNgl+1; "-ngl"
call _strcmp
test eax, eax
jz loc_2074E
mov rdi, r12
lea rsi, aNgl; "--ngl"
call _strcmp
test eax, eax
jz loc_2074E
mov rdi, r12
lea rsi, aTemp; "--temp"
call _strcmp
test eax, eax
jz loc_2077E
mov r12, r14
mov rdi, r14; this
mov rsi, [rsp+98h+var_90]; char **
mov edx, r13d; int
lea rcx, aV; "-v"
lea r8, aVerbose; "--verbose"
call _ZN3Opt10parse_flagEPPKciS1_S1_; Opt::parse_flag(char const**,int,char const*,char const*)
test al, al
jnz short loc_20710
mov rdi, r12; this
mov rsi, [rsp+98h+var_90]; char **
mov edx, r13d; int
lea rcx, aV; "-v"
lea r8, aLogVerbose; "--log-verbose"
call _ZN3Opt10parse_flagEPPKciS1_S1_; Opt::parse_flag(char const**,int,char const*,char const*)
test al, al
jz loc_207AF
loc_20710:
mov byte ptr [r12+108h], 1
mov bl, 1
mov rbp, r12
jmp loc_20867
loc_20723:
inc r13d
cmp r13d, [rsp+98h+var_88]
jge loc_209A6
movsxd rax, r13d
mov r12, [rsp+98h+var_90]
mov rdi, [r12+rax*8]
call _atoi
mov rbp, r14
mov [r14+0FCh], eax
jmp short loc_20777
loc_2074E:
inc r13d
cmp r13d, [rsp+98h+var_88]
jge loc_209A6
movsxd rax, r13d
mov r12, [rsp+98h+var_90]
mov rdi, [r12+rax*8]
call _atoi
mov rbp, r14
mov [r14+100h], eax
loc_20777:
mov bl, 1
jmp loc_20966
loc_2077E:
inc r13d
cmp r13d, [rsp+98h+var_88]
jge loc_209A6
movsxd rax, r13d
mov r12, [rsp+98h+var_90]
mov rdi, [r12+rax*8]
call _atof
cvtsd2ss xmm0, xmm0
mov rbp, r14
movss dword ptr [r14+104h], xmm0
jmp short loc_20777
loc_207AF:
mov r12, [rsp+98h+var_90]
mov rdi, [r12+rbp*8]
lea rsi, aJinja; "--jinja"
call _strcmp
test eax, eax
jz loc_20976
mov rdi, r14; this
mov rsi, r12; char **
mov edx, r13d; int
lea rcx, asc_AFD88; "-h"
lea r8, aHelp; "--help"
call _ZN3Opt10parse_flagEPPKciS1_S1_; Opt::parse_flag(char const**,int,char const*,char const*)
test al, al
jnz loc_209AD
mov rax, [r12+rbp*8]
cmp byte ptr [rax], 2Dh ; '-'
mov rbp, r14
jnz short loc_2080C
cmp byte ptr [rax+1], 2Dh ; '-'
jnz short loc_2080C
cmp byte ptr [rax+2], 0
jz loc_20986
loc_2080C:
movsxd rax, r13d
cmp r15d, 1
jz short loc_20871
test r15d, r15d
jnz loc_208A3
mov r12, [r12+rax*8]
movzx ecx, byte ptr [r12]
mov eax, 1
test ecx, ecx
jz loc_20997
cmp ecx, 2Dh ; '-'
jz loc_20997
mov r15, [rbp+0C0h]
mov rdi, r12
call _strlen
mov rdi, [rsp+98h+var_58]
xor esi, esi
mov rdx, r15
mov rcx, r12
mov r8, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
mov r15d, 1
loc_20867:
mov r12, [rsp+98h+var_90]
jmp loc_20966
loc_20871:
mov r15, [r12+rax*8]
mov r12, [rbp+0E0h]
mov rdi, r15
call _strlen
mov rdi, [rsp+98h+var_80]
xor esi, esi
mov rdx, r12
mov r12, [rsp+98h+var_90]
mov rcx, r15
mov r8, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
jmp loc_20960
loc_208A3:
mov rsi, [r12+rax*8]
lea r14, [rsp+98h+var_50]
mov rdi, r14
lea rdx, [rsp+98h+var_81]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
mov r8d, 1
mov rdi, r14
xor esi, esi
xor edx, edx
lea rcx, aForMessageInMe+144h; " "
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong)
lea r14, [rsp+98h+var_68]
mov [rsp+98h+var_78], r14
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jz short loc_208FA
mov [rsp+98h+var_78], rdx
mov rdx, [rcx]
mov [rsp+98h+var_68], rdx
jmp short loc_20901
loc_208FA:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r14], xmm0
loc_20901:
mov rdx, [rax+8]
mov [rsp+98h+var_70], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
mov rsi, [rsp+98h+var_78]
mov rdx, [rsp+98h+var_70]
mov rdi, [rsp+98h+var_80]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rdi, [rsp+98h+var_78]; void *
cmp rdi, r14
jz short loc_20944
mov rsi, [rsp+98h+var_68]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_20944:
mov rdi, [rsp+98h+var_50]; void *
lea rax, [rsp+98h+var_40]
cmp rdi, rax
jz short loc_20960
mov rsi, [rsp+98h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_20960:
mov r15d, 2
loc_20966:
inc r13d
cmp r13d, [rsp+98h+var_88]
jl loc_2060F
jmp short loc_2098A
loc_20976:
mov rbp, r14
mov byte ptr [r14+0F8h], 1
jmp loc_20777
loc_20986:
xor ebx, ebx
jmp short loc_20966
loc_2098A:
xor eax, eax
cmp qword ptr [rbp+0C0h], 0
setz al
loc_20997:
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_209A6:
mov eax, 1
jmp short loc_20997
loc_209AD:
mov byte ptr [r14+118h], 1
xor eax, eax
jmp short loc_20997
mov rbx, rax
mov rdi, [rsp+arg_18]; void *
cmp rdi, r14
jz short loc_209D8
mov rsi, [rsp+arg_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_209D8
mov rbx, rax
loc_209D8:
mov rdi, [rsp+arg_40]; void *
lea rax, [rsp+arg_50]
cmp rdi, rax
jz short loc_209F4
mov rsi, [rsp+arg_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_209F4:
mov rdi, rbx
call __Unwind_Resume
|
_BOOL8 Opt::parse(Opt *this, int a2, const char **a3)
{
const char **v3; // r12
int v4; // r13d
char v5; // bl
int v6; // r15d
const char *v7; // r12
float v8; // xmm0_4
const char *v9; // rax
const char *v10; // r12
_BOOL8 result; // rax
long long v12; // r15
long long v13; // rax
const char *v14; // r15
long long v15; // r12
long long v16; // rax
long long v17; // rdx
long long v18; // rax
__int128 *v19; // rcx
char v21; // [rsp+17h] [rbp-81h] BYREF
char *v22; // [rsp+18h] [rbp-80h]
void *v23; // [rsp+20h] [rbp-78h]
long long v24; // [rsp+28h] [rbp-70h]
__int128 v25; // [rsp+30h] [rbp-68h] BYREF
char *v26; // [rsp+40h] [rbp-58h]
void *v27[2]; // [rsp+48h] [rbp-50h] BYREF
long long v28; // [rsp+58h] [rbp-40h] BYREF
if ( a2 >= 2 )
{
v3 = a3;
v22 = (char *)this + 216;
v26 = (char *)this + 184;
v4 = 1;
v5 = 1;
v6 = 0;
do
{
if ( (v5 & 1) == 0 )
goto LABEL_30;
v7 = v3[v4];
if ( *v7 == 45 )
{
if ( v7[1] == 99 && !v7[2] || !(unsigned int)strcmp(v7, "--context-size") )
{
LABEL_18:
if ( ++v4 >= a2 )
return 1LL;
v3 = a3;
*((_DWORD *)this + 63) = atoi(a3[v4]);
goto LABEL_22;
}
if ( v7[1] == 110 && !v7[2] )
{
LABEL_20:
if ( ++v4 >= a2 )
return 1LL;
v3 = a3;
*((_DWORD *)this + 64) = atoi(a3[v4]);
goto LABEL_22;
}
}
else if ( !(unsigned int)strcmp(v7, "--context-size") )
{
goto LABEL_18;
}
if ( !(unsigned int)strcmp(v7, "-ngl") || !(unsigned int)strcmp(v7, "--ngl") )
goto LABEL_20;
if ( !(unsigned int)strcmp(v7, "--temp") )
{
if ( ++v4 >= a2 )
return 1LL;
v3 = a3;
v8 = atof(a3[v4]);
*((float *)this + 65) = v8;
}
else
{
if ( (unsigned __int8)Opt::parse_flag(this, a3, v4, "-v", "--verbose")
|| (unsigned __int8)Opt::parse_flag(this, a3, v4, "-v", "--log-verbose") )
{
*((_BYTE *)this + 264) = 1;
v5 = 1;
goto LABEL_35;
}
v3 = a3;
if ( (unsigned int)strcmp(a3[v4], "--jinja") )
{
if ( (unsigned __int8)Opt::parse_flag(this, a3, v4, "-h", "--help") )
{
*((_BYTE *)this + 280) = 1;
return 0LL;
}
v9 = a3[v4];
if ( *v9 == 45 && v9[1] == 45 && !v9[2] )
{
v5 = 0;
goto LABEL_45;
}
LABEL_30:
if ( v6 == 1 )
{
v14 = v3[v4];
v15 = *((_QWORD *)this + 28);
v16 = strlen(v14);
v17 = v15;
v3 = a3;
std::string::_M_replace(v22, 0LL, v17, v14, v16);
LABEL_44:
v6 = 2;
goto LABEL_45;
}
if ( v6 )
{
std::string::basic_string<std::allocator<char>>(v27, v3[v4], &v21);
v18 = std::string::replace(v27, 0LL, 0LL, " ", 1LL);
v23 = &v25;
v19 = (__int128 *)(v18 + 16);
if ( *(_QWORD *)v18 == v18 + 16 )
{
v25 = *v19;
}
else
{
v23 = *(void **)v18;
*(_QWORD *)&v25 = *(_QWORD *)v19;
}
v24 = *(_QWORD *)(v18 + 8);
*(_QWORD *)v18 = v19;
*(_QWORD *)(v18 + 8) = 0LL;
*(_BYTE *)(v18 + 16) = 0;
std::string::_M_append(v22, v23, v24);
if ( v23 != &v25 )
operator delete(v23, v25 + 1);
if ( v27[0] != &v28 )
operator delete(v27[0], v28 + 1);
goto LABEL_44;
}
v10 = v3[v4];
result = 1LL;
if ( !*v10 || *v10 == 45 )
return result;
v12 = *((_QWORD *)this + 24);
v13 = strlen(v10);
std::string::_M_replace(v26, 0LL, v12, v10, v13);
v6 = 1;
LABEL_35:
v3 = a3;
goto LABEL_45;
}
*((_BYTE *)this + 248) = 1;
}
LABEL_22:
v5 = 1;
LABEL_45:
++v4;
}
while ( v4 < a2 );
}
return *((_QWORD *)this + 24) == 0LL;
}
|
parse:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV RBP,RDI
MOV dword ptr [RSP + 0x10],ESI
CMP ESI,0x2
JL 0x0012098a
MOV R12,RDX
LEA RAX,[RBP + 0xd8]
MOV qword ptr [RSP + 0x18],RAX
LEA RAX,[RBP + 0xb8]
MOV qword ptr [RSP + 0x40],RAX
MOV R13D,0x1
MOV BL,0x1
XOR R15D,R15D
MOV qword ptr [RSP + 0x8],RDX
LAB_0012060f:
TEST BL,0x1
JZ 0x0012080c
MOV R14,RBP
MOVSXD RBP,R13D
MOV R12,qword ptr [R12 + RBP*0x8]
CMP byte ptr [R12],0x2d
JNZ 0x00120669
CMP byte ptr [R12 + 0x1],0x63
JNZ 0x0012063d
CMP byte ptr [R12 + 0x2],0x0
JZ 0x00120723
LAB_0012063d:
MOV RDI,R12
LEA RSI,[0x1afd49]
CALL 0x00119b00
TEST EAX,EAX
JZ 0x00120723
CMP byte ptr [R12 + 0x1],0x6e
JNZ 0x00120680
CMP byte ptr [R12 + 0x2],0x0
JNZ 0x00120680
JMP 0x0012074e
LAB_00120669:
MOV RDI,R12
LEA RSI,[0x1afd49]
CALL 0x00119b00
TEST EAX,EAX
JZ 0x00120723
LAB_00120680:
MOV RDI,R12
LEA RSI,[0x1afd59]
CALL 0x00119b00
TEST EAX,EAX
JZ 0x0012074e
MOV RDI,R12
LEA RSI,[0x1afd58]
CALL 0x00119b00
TEST EAX,EAX
JZ 0x0012074e
MOV RDI,R12
LEA RSI,[0x1afd5e]
CALL 0x00119b00
TEST EAX,EAX
JZ 0x0012077e
MOV R12,R14
MOV RDI,R14
MOV RSI,qword ptr [RSP + 0x8]
MOV EDX,R13D
LEA RCX,[0x1afd65]
LEA R8,[0x1afd68]
CALL 0x00120ed6
TEST AL,AL
JNZ 0x00120710
MOV RDI,R12
MOV RSI,qword ptr [RSP + 0x8]
MOV EDX,R13D
LEA RCX,[0x1afd65]
LEA R8,[0x1afd72]
CALL 0x00120ed6
TEST AL,AL
JZ 0x001207af
LAB_00120710:
MOV byte ptr [R12 + 0x108],0x1
MOV BL,0x1
MOV RBP,R12
JMP 0x00120867
LAB_00120723:
INC R13D
CMP R13D,dword ptr [RSP + 0x10]
JGE 0x001209a6
MOVSXD RAX,R13D
MOV R12,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [R12 + RAX*0x8]
CALL 0x00119c50
MOV RBP,R14
MOV dword ptr [R14 + 0xfc],EAX
JMP 0x00120777
LAB_0012074e:
INC R13D
CMP R13D,dword ptr [RSP + 0x10]
JGE 0x001209a6
MOVSXD RAX,R13D
MOV R12,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [R12 + RAX*0x8]
CALL 0x00119c50
MOV RBP,R14
MOV dword ptr [R14 + 0x100],EAX
LAB_00120777:
MOV BL,0x1
JMP 0x00120966
LAB_0012077e:
INC R13D
CMP R13D,dword ptr [RSP + 0x10]
JGE 0x001209a6
MOVSXD RAX,R13D
MOV R12,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [R12 + RAX*0x8]
CALL 0x00119960
CVTSD2SS XMM0,XMM0
MOV RBP,R14
MOVSS dword ptr [R14 + 0x104],XMM0
JMP 0x00120777
LAB_001207af:
MOV R12,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [R12 + RBP*0x8]
LEA RSI,[0x1afd80]
CALL 0x00119b00
TEST EAX,EAX
JZ 0x00120976
MOV RDI,R14
MOV RSI,R12
MOV EDX,R13D
LEA RCX,[0x1afd88]
LEA R8,[0x1afd8b]
CALL 0x00120ed6
TEST AL,AL
JNZ 0x001209ad
MOV RAX,qword ptr [R12 + RBP*0x8]
CMP byte ptr [RAX],0x2d
MOV RBP,R14
JNZ 0x0012080c
CMP byte ptr [RAX + 0x1],0x2d
JNZ 0x0012080c
CMP byte ptr [RAX + 0x2],0x0
JZ 0x00120986
LAB_0012080c:
MOVSXD RAX,R13D
CMP R15D,0x1
JZ 0x00120871
TEST R15D,R15D
JNZ 0x001208a3
MOV R12,qword ptr [R12 + RAX*0x8]
MOVZX ECX,byte ptr [R12]
MOV EAX,0x1
TEST ECX,ECX
JZ 0x00120997
CMP ECX,0x2d
JZ 0x00120997
MOV R15,qword ptr [RBP + 0xc0]
MOV RDI,R12
CALL 0x00119360
MOV RDI,qword ptr [RSP + 0x40]
XOR ESI,ESI
MOV RDX,R15
MOV RCX,R12
MOV R8,RAX
CALL 0x00119c40
MOV R15D,0x1
LAB_00120867:
MOV R12,qword ptr [RSP + 0x8]
JMP 0x00120966
LAB_00120871:
MOV R15,qword ptr [R12 + RAX*0x8]
MOV R12,qword ptr [RBP + 0xe0]
MOV RDI,R15
CALL 0x00119360
MOV RDI,qword ptr [RSP + 0x18]
XOR ESI,ESI
MOV RDX,R12
MOV R12,qword ptr [RSP + 0x8]
MOV RCX,R15
MOV R8,RAX
CALL 0x00119c40
JMP 0x00120960
LAB_001208a3:
MOV RSI,qword ptr [R12 + RAX*0x8]
LEA R14,[RSP + 0x48]
MOV RDI,R14
LEA RDX,[RSP + 0x17]
CALL 0x00120a94
LAB_001208b9:
MOV R8D,0x1
MOV RDI,R14
XOR ESI,ESI
XOR EDX,EDX
LEA RCX,[0x1b4479]
CALL 0x00119890
LEA R14,[RSP + 0x30]
MOV qword ptr [RSP + 0x20],R14
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JZ 0x001208fa
MOV qword ptr [RSP + 0x20],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x30],RDX
JMP 0x00120901
LAB_001208fa:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R14],XMM0
LAB_00120901:
MOV RDX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x28],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
MOV RSI,qword ptr [RSP + 0x20]
MOV RDX,qword ptr [RSP + 0x28]
LAB_00120923:
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00119210
LAB_0012092d:
MOV RDI,qword ptr [RSP + 0x20]
CMP RDI,R14
JZ 0x00120944
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
CALL 0x001197b0
LAB_00120944:
MOV RDI,qword ptr [RSP + 0x48]
LEA RAX,[RSP + 0x58]
CMP RDI,RAX
JZ 0x00120960
MOV RSI,qword ptr [RSP + 0x58]
INC RSI
CALL 0x001197b0
LAB_00120960:
MOV R15D,0x2
LAB_00120966:
INC R13D
CMP R13D,dword ptr [RSP + 0x10]
JL 0x0012060f
JMP 0x0012098a
LAB_00120976:
MOV RBP,R14
MOV byte ptr [R14 + 0xf8],0x1
JMP 0x00120777
LAB_00120986:
XOR EBX,EBX
JMP 0x00120966
LAB_0012098a:
XOR EAX,EAX
CMP qword ptr [RBP + 0xc0],0x0
SETZ AL
LAB_00120997:
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001209a6:
MOV EAX,0x1
JMP 0x00120997
LAB_001209ad:
MOV byte ptr [R14 + 0x118],0x1
XOR EAX,EAX
JMP 0x00120997
|
/* Opt::parse(int, char const**) */
bool __thiscall Opt::parse(Opt *this,int param_1,char **param_2)
{
char *pcVar1;
char *pcVar2;
double dVar3;
char cVar4;
int iVar5;
long *plVar6;
long *plVar7;
bool bVar8;
int iVar9;
int iVar10;
allocator local_81;
Opt *local_80;
long *local_78;
long local_70;
long local_68;
long lStack_60;
Opt *local_58;
long *local_50 [2];
long local_40 [2];
if (1 < param_1) {
local_80 = this + 0xd8;
local_58 = this + 0xb8;
iVar9 = 1;
bVar8 = true;
iVar10 = 0;
do {
if (!bVar8) {
LAB_0012080c:
if (iVar10 == 1) {
pcVar1 = param_2[iVar9];
pcVar2 = *(char **)(this + 0xe0);
strlen(pcVar1);
std::__cxx11::string::_M_replace((ulong)local_80,0,pcVar2,(ulong)pcVar1);
}
else {
if (iVar10 == 0) {
pcVar1 = param_2[iVar9];
if (*pcVar1 == '\0') {
return true;
}
if (*pcVar1 == '-') {
return true;
}
pcVar2 = *(char **)(this + 0xc0);
strlen(pcVar1);
std::__cxx11::string::_M_replace((ulong)local_58,0,pcVar2,(ulong)pcVar1);
iVar10 = 1;
goto LAB_00120966;
}
std::__cxx11::string::string<std::allocator<char>>
((string *)local_50,param_2[iVar9],&local_81);
/* try { // try from 001208b9 to 001208d1 has its CatchHandler @ 001209d5 */
plVar6 = (long *)std::__cxx11::string::replace((ulong)local_50,0,(char *)0x0,0x1b4479);
plVar7 = plVar6 + 2;
if ((long *)*plVar6 == plVar7) {
local_68 = *plVar7;
lStack_60 = plVar6[3];
local_78 = &local_68;
}
else {
local_68 = *plVar7;
local_78 = (long *)*plVar6;
}
local_70 = plVar6[1];
*plVar6 = (long)plVar7;
plVar6[1] = 0;
*(int1 *)(plVar6 + 2) = 0;
/* try { // try from 00120923 to 0012092c has its CatchHandler @ 001209b9 */
std::__cxx11::string::_M_append((char *)local_80,(ulong)local_78);
if (local_78 != &local_68) {
operator_delete(local_78,local_68 + 1);
}
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
}
iVar10 = 2;
goto LAB_00120966;
}
pcVar1 = param_2[iVar9];
if (*pcVar1 == '-') {
if (((pcVar1[1] != 'c') || (pcVar1[2] != '\0')) &&
(iVar5 = strcmp(pcVar1,"--context-size"), iVar5 != 0)) {
if ((pcVar1[1] != 'n') || (pcVar1[2] != '\0')) goto LAB_00120680;
LAB_0012074e:
iVar9 = iVar9 + 1;
if (param_1 <= iVar9) {
return true;
}
iVar5 = atoi(param_2[iVar9]);
*(int *)(this + 0x100) = iVar5;
goto LAB_00120777;
}
LAB_00120723:
iVar9 = iVar9 + 1;
if (param_1 <= iVar9) {
return true;
}
iVar5 = atoi(param_2[iVar9]);
*(int *)(this + 0xfc) = iVar5;
LAB_00120777:
bVar8 = true;
}
else {
iVar5 = strcmp(pcVar1,"--context-size");
if (iVar5 == 0) goto LAB_00120723;
LAB_00120680:
iVar5 = strcmp(pcVar1,"-ngl");
if ((iVar5 == 0) || (iVar5 = strcmp(pcVar1,"--ngl"), iVar5 == 0)) goto LAB_0012074e;
iVar5 = strcmp(pcVar1,"--temp");
if (iVar5 == 0) {
iVar9 = iVar9 + 1;
if (param_1 <= iVar9) {
return true;
}
dVar3 = atof(param_2[iVar9]);
*(float *)(this + 0x104) = (float)dVar3;
goto LAB_00120777;
}
cVar4 = parse_flag(this,param_2,iVar9,"-v","--verbose");
if ((cVar4 == '\0') &&
(cVar4 = parse_flag(this,param_2,iVar9,"-v","--log-verbose"), cVar4 == '\0')) {
iVar5 = strcmp(param_2[iVar9],"--jinja");
if (iVar5 == 0) {
this[0xf8] = (Opt)0x1;
goto LAB_00120777;
}
cVar4 = parse_flag(this,param_2,iVar9,"-h","--help");
if (cVar4 != '\0') {
this[0x118] = (Opt)0x1;
return false;
}
pcVar1 = param_2[iVar9];
if (((*pcVar1 != '-') || (pcVar1[1] != '-')) || (pcVar1[2] != '\0')) goto LAB_0012080c;
bVar8 = false;
}
else {
this[0x108] = (Opt)0x1;
bVar8 = true;
}
}
LAB_00120966:
iVar9 = iVar9 + 1;
} while (iVar9 < param_1);
}
return *(long *)(this + 0xc0) == 0;
}
|
|
7,602 |
plutovg_path_create
|
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-path.c
|
plutovg_path_t* plutovg_path_create(void)
{
plutovg_path_t* path = malloc(sizeof(plutovg_path_t));
path->ref_count = 1;
path->num_points = 0;
path->num_contours = 0;
path->num_curves = 0;
path->start_point = PLUTOVG_EMPTY_POINT;
plutovg_array_init(path->elements);
return path;
}
|
O1
|
c
|
plutovg_path_create:
pushq %rax
movl $0x28, %edi
callq 0xa400
movl $0x1, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x4(%rax)
movups %xmm0, 0x14(%rax)
movl $0x0, 0x24(%rax)
popq %rcx
retq
|
plutovg_path_create:
push rax
mov edi, 28h ; '('
call _malloc
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
pop rcx
retn
|
long long plutovg_path_create()
{
long long result; // rax
result = malloc(40LL);
*(_DWORD *)result = 1;
*(_OWORD *)(result + 4) = 0LL;
*(_OWORD *)(result + 20) = 0LL;
*(_DWORD *)(result + 36) = 0;
return result;
}
|
plutovg_path_create:
PUSH RAX
MOV EDI,0x28
CALL 0x0010a400
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
POP RCX
RET
|
void plutovg_path_create(void)
{
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;
return;
}
|
|
7,603 |
fs_get_cache_directory[abi:cxx11]()
|
monkey531[P]llama/common/common.cpp
|
std::string fs_get_cache_directory() {
std::string cache_directory = "";
auto ensure_trailing_slash = [](std::string p) {
// Make sure to add trailing slash
if (p.back() != DIRECTORY_SEPARATOR) {
p += DIRECTORY_SEPARATOR;
}
return p;
};
if (getenv("LLAMA_CACHE")) {
cache_directory = std::getenv("LLAMA_CACHE");
} else {
#ifdef __linux__
if (std::getenv("XDG_CACHE_HOME")) {
cache_directory = std::getenv("XDG_CACHE_HOME");
} else {
cache_directory = std::getenv("HOME") + std::string("/.cache/");
}
#elif defined(__APPLE__)
cache_directory = std::getenv("HOME") + std::string("/Library/Caches/");
#elif defined(_WIN32)
cache_directory = std::getenv("LOCALAPPDATA");
#endif // __linux__
cache_directory = ensure_trailing_slash(cache_directory);
cache_directory += "llama.cpp";
}
return ensure_trailing_slash(cache_directory);
}
|
O3
|
cpp
|
fs_get_cache_directory[abi:cxx11]():
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa0, %rsp
movq %rdi, %rbx
leaq 0x30(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x71a2b(%rip), %rdx # 0x10913a
leaq 0x20(%rsp), %rdi
movq %rdx, %rsi
callq 0x262b6
leaq 0x7ccbb(%rip), %rdi # 0x1143de
callq 0x1dec0
testq %rax, %rax
je 0x97759
movq %rax, %r14
leaq 0x20(%rsp), %r15
movq 0x8(%r15), %r12
movq %rax, %rdi
callq 0x1d4f0
movq %r15, %rdi
xorl %esi, %esi
movq %r12, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x1e320
jmp 0x97947
leaq 0x7cc8a(%rip), %rdi # 0x1143ea
callq 0x1dec0
testq %rax, %rax
je 0x97796
movq %rax, %r14
leaq 0x20(%rsp), %r15
movq 0x8(%r15), %r12
movq %rax, %rdi
callq 0x1d4f0
movq %r15, %rdi
xorl %esi, %esi
movq %r12, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x1e320
jmp 0x97876
leaq 0x7cc57(%rip), %rdi # 0x1143f4
callq 0x1dec0
movq %rax, %r14
leaq 0x90(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x7cc41(%rip), %rsi # 0x1143f9
leaq 0x7cc42(%rip), %rdx # 0x114401
leaq 0x80(%rsp), %rdi
callq 0x262b6
movq %r14, %rdi
callq 0x1d4f0
leaq 0x80(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
movq %r14, %rcx
movq %rax, %r8
callq 0x1ddf0
leaq 0x70(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x97813
movq %rdx, 0x60(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x70(%rsp)
jmp 0x9781b
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq 0x60(%rsp), %r14
movq %rdx, 0x8(%r14)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
callq 0x1dee0
movq (%r14), %rdi
cmpq %r12, %rdi
je 0x97859
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x1dc50
movq 0x80(%rsp), %rdi
cmpq %r15, %rdi
je 0x97876
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x1dc50
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
addq %rsi, %rdx
movq %rsp, %rdi
callq 0x25f90
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
cmpb $0x2f, -0x1(%rax,%rcx)
je 0x978b5
movq %rsp, %rdi
movl $0x2f, %esi
callq 0x1da30
movq (%rsp), %rax
leaq 0x70(%rsp), %r12
movq %r12, -0x10(%r12)
cmpq %r15, %rax
je 0x978d5
movq %rax, 0x60(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x70(%rsp)
jmp 0x978de
movups (%r15), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rsp), %rax
leaq 0x60(%rsp), %r14
movq %rax, 0x8(%r14)
movq %r15, (%rsp)
movq $0x0, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
callq 0x1dee0
movq (%r14), %rdi
cmpq %r12, %rdi
je 0x97920
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x1dc50
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x97936
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1dc50
leaq 0x7cac5(%rip), %rsi # 0x114402
leaq 0x20(%rsp), %rdi
callq 0x1e870
leaq 0x50(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
addq %rsi, %rdx
leaq 0x40(%rsp), %rdi
callq 0x25f90
movq 0x40(%rsp), %rax
movq 0x48(%rsp), %rcx
cmpb $0x2f, -0x1(%rax,%rcx)
je 0x9798c
leaq 0x40(%rsp), %rdi
movl $0x2f, %esi
callq 0x1da30
movq 0x40(%rsp), %rax
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
cmpq %r14, %rax
je 0x979a6
movq %rax, (%rbx)
movq 0x50(%rsp), %rax
movq %rax, 0x10(%rbx)
jmp 0x979ad
movups (%r14), %xmm0
movups %xmm0, (%rcx)
movq 0x48(%rsp), %rax
movq %rax, 0x8(%rbx)
movq %r14, 0x40(%rsp)
movq $0x0, 0x48(%rsp)
movb $0x0, 0x50(%rsp)
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x979e0
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1dc50
movq %rbx, %rax
addq $0xa0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x80(%rsp), %rdi
cmpq %r15, %rdi
je 0x97a44
movq 0x90(%rsp), %rsi
jmp 0x97a37
jmp 0x97a41
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x97a44
movq 0x10(%rsp), %rsi
jmp 0x97a37
jmp 0x97a41
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0x97a44
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x1dc50
jmp 0x97a44
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x97a5b
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1dc50
movq %rbx, %rdi
callq 0x1e660
|
_Z22fs_get_cache_directoryB5cxx11v:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0A0h
mov rbx, rdi
lea r13, [rsp+0C8h+var_98]
mov [r13-10h], r13
lea rdx, aSFailedToLoadI+2Ah; ""
lea rdi, [rsp+0C8h+var_A8]
mov rsi, rdx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rdi, aLlamaCache; "LLAMA_CACHE"
call _getenv
test rax, rax
jz short loc_97759
mov r14, rax
lea r15, [rsp+0C8h+var_A8]
mov r12, [r15+8]
mov rdi, rax
call _strlen
mov rdi, r15
xor esi, esi
mov rdx, r12
mov rcx, r14
mov r8, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
jmp loc_97947
loc_97759:
lea rdi, aXdgCacheHome; "XDG_CACHE_HOME"
call _getenv
test rax, rax
jz short loc_97796
mov r14, rax
lea r15, [rsp+0C8h+var_A8]
mov r12, [r15+8]
mov rdi, rax
call _strlen
mov rdi, r15
xor esi, esi
mov rdx, r12
mov rcx, r14
mov r8, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
jmp loc_97876
loc_97796:
lea rdi, aXdgCacheHome+0Ah; "HOME"
call _getenv
mov r14, rax
lea r15, [rsp+0C8h+var_38]
mov [r15-10h], r15
lea rsi, aCache; "/.cache/"
lea rdx, aCache+8; ""
lea rdi, [rsp+0C8h+var_48]
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, r14
call _strlen
lea rdi, [rsp+0C8h+var_48]
xor esi, esi
xor edx, edx
mov rcx, r14
mov r8, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong)
lea r12, [rsp+0C8h+var_58]
mov [r12-10h], r12
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jz short loc_97813
mov [rsp+0C8h+var_68], rdx
mov rdx, [rcx]
mov [rsp+0C8h+var_58], rdx
jmp short loc_9781B
loc_97813:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r12], xmm0
loc_9781B:
mov rdx, [rax+8]
lea r14, [rsp+0C8h+var_68]
mov [r14+8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
lea rdi, [rsp+0C8h+var_A8]
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [r14]; void *
cmp rdi, r12
jz short loc_97859
mov rsi, [rsp+0C8h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_97859:
mov rdi, [rsp+0C8h+var_48]; void *
cmp rdi, r15
jz short loc_97876
mov rsi, [rsp+0C8h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_97876:
lea r15, [rsp+0C8h+var_B8]
mov [r15-10h], r15
mov rsi, [rsp+0C8h+var_A8]
mov rdx, [rsp+0C8h+var_A0]
add rdx, rsi
mov rdi, rsp
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
mov rax, [rsp+0C8h+var_C8]
mov rcx, [rsp+0C8h+var_C0]
cmp byte ptr [rax+rcx-1], 2Fh ; '/'
jz short loc_978B5
mov rdi, rsp
mov esi, 2Fh ; '/'
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov rax, [rsp+0C8h+var_C8]
loc_978B5:
lea r12, [rsp+0C8h+var_58]
mov [r12-10h], r12
cmp rax, r15
jz short loc_978D5
mov [rsp+0C8h+var_68], rax
mov rax, [rsp+0C8h+var_B8]
mov [rsp+0C8h+var_58], rax
jmp short loc_978DE
loc_978D5:
movups xmm0, xmmword ptr [r15]
movups xmmword ptr [r12], xmm0
loc_978DE:
mov rax, [rsp+0C8h+var_C0]
lea r14, [rsp+0C8h+var_68]
mov [r14+8], rax
mov [rsp+0C8h+var_C8], r15
mov [rsp+0C8h+var_C0], 0
mov byte ptr [rsp+0C8h+var_B8], 0
lea rdi, [rsp+0C8h+var_A8]
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [r14]; void *
cmp rdi, r12
jz short loc_97920
mov rsi, [rsp+0C8h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_97920:
mov rdi, [rsp+0C8h+var_C8]; void *
cmp rdi, r15
jz short loc_97936
mov rsi, [rsp+0C8h+var_B8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_97936:
lea rsi, aLlamaCpp; "llama.cpp"
lea rdi, [rsp+0C8h+var_A8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
loc_97947:
lea r14, [rsp+0C8h+var_78]
mov [r14-10h], r14
mov rsi, [rsp+0C8h+var_A8]
mov rdx, [rsp+0C8h+var_A0]
add rdx, rsi
lea rdi, [rsp+0C8h+var_88]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
mov rax, [rsp+0C8h+var_88]
mov rcx, [rsp+0C8h+var_80]
cmp byte ptr [rax+rcx-1], 2Fh ; '/'
jz short loc_9798C
lea rdi, [rsp+0C8h+var_88]
mov esi, 2Fh ; '/'
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov rax, [rsp+0C8h+var_88]
loc_9798C:
lea rcx, [rbx+10h]
mov [rbx], rcx
cmp rax, r14
jz short loc_979A6
mov [rbx], rax
mov rax, [rsp+0C8h+var_78]
mov [rbx+10h], rax
jmp short loc_979AD
loc_979A6:
movups xmm0, xmmword ptr [r14]
movups xmmword ptr [rcx], xmm0
loc_979AD:
mov rax, [rsp+0C8h+var_80]
mov [rbx+8], rax
mov [rsp+0C8h+var_88], r14
mov [rsp+0C8h+var_80], 0
mov byte ptr [rsp+0C8h+var_78], 0
mov rdi, [rsp+0C8h+var_A8]; void *
cmp rdi, r13
jz short loc_979E0
mov rsi, [rsp+0C8h+var_98]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_979E0:
mov rax, rbx
add rsp, 0A0h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
mov rbx, rax
mov rdi, [rsp+arg_78]
cmp rdi, r15
jz short loc_97A44
mov rsi, [rsp+arg_88]
jmp short loc_97A37
jmp short loc_97A41
mov rbx, rax
mov rdi, [rsp+0]
cmp rdi, r15
jz short loc_97A44
mov rsi, [rsp+arg_8]
jmp short loc_97A37
jmp short loc_97A41
mov rbx, rax
mov rdi, [rsp+arg_38]; void *
cmp rdi, r14
jz short loc_97A44
mov rsi, [rsp+arg_48]
loc_97A37:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_97A44
loc_97A41:
mov rbx, rax
loc_97A44:
mov rdi, [rsp+arg_18]; void *
cmp rdi, r13
jz short loc_97A5B
mov rsi, [rsp+arg_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_97A5B:
mov rdi, rbx
call __Unwind_Resume
|
long long fs_get_cache_directory[abi:cxx11](long long a1)
{
long long v1; // rax
long long v2; // r14
long long v3; // r12
long long v4; // rax
long long v5; // rax
long long v6; // r14
long long v7; // r12
long long v8; // rax
long long v9; // r14
long long v10; // rax
long long v11; // rax
__int128 *v12; // rcx
__int128 *v13; // rax
__int128 *v14; // rax
void *v16; // [rsp+0h] [rbp-C8h] BYREF
long long v17; // [rsp+8h] [rbp-C0h]
__int128 v18; // [rsp+10h] [rbp-B8h] BYREF
void *v19; // [rsp+20h] [rbp-A8h] BYREF
long long v20; // [rsp+28h] [rbp-A0h]
_QWORD v21[2]; // [rsp+30h] [rbp-98h] BYREF
__int128 *v22; // [rsp+40h] [rbp-88h] BYREF
long long v23; // [rsp+48h] [rbp-80h]
__int128 v24; // [rsp+50h] [rbp-78h] BYREF
__int128 *v25; // [rsp+60h] [rbp-68h] BYREF
long long v26; // [rsp+68h] [rbp-60h]
__int128 v27; // [rsp+70h] [rbp-58h] BYREF
void *v28[2]; // [rsp+80h] [rbp-48h] BYREF
_QWORD v29[7]; // [rsp+90h] [rbp-38h] BYREF
v19 = v21;
std::string::_M_construct<char const*>((long long)&v19, "", (long long)"");
v1 = getenv("LLAMA_CACHE");
if ( v1 )
{
v2 = v1;
v3 = v20;
v4 = strlen(v1);
std::string::_M_replace(&v19, 0LL, v3, v2, v4);
}
else
{
v5 = getenv("XDG_CACHE_HOME");
if ( v5 )
{
v6 = v5;
v7 = v20;
v8 = strlen(v5);
std::string::_M_replace(&v19, 0LL, v7, v6, v8);
}
else
{
v9 = getenv("HOME");
v28[0] = v29;
std::string::_M_construct<char const*>((long long)v28, "/.cache/", (long long)"");
v10 = strlen(v9);
v11 = std::string::replace(v28, 0LL, 0LL, v9, v10);
v25 = &v27;
v12 = (__int128 *)(v11 + 16);
if ( *(_QWORD *)v11 == v11 + 16 )
{
v27 = *v12;
}
else
{
v25 = *(__int128 **)v11;
*(_QWORD *)&v27 = *(_QWORD *)v12;
}
v26 = *(_QWORD *)(v11 + 8);
*(_QWORD *)v11 = v12;
*(_QWORD *)(v11 + 8) = 0LL;
*(_BYTE *)(v11 + 16) = 0;
std::string::operator=(&v19, &v25);
if ( v25 != &v27 )
operator delete(v25, v27 + 1);
if ( v28[0] != v29 )
operator delete(v28[0], v29[0] + 1LL);
}
v16 = &v18;
std::string::_M_construct<char *>((long long)&v16, v19, (long long)v19 + v20);
v13 = (__int128 *)v16;
if ( *((char *)v16 + v17 - 1) != 47 )
{
std::string::push_back(&v16, 47LL);
v13 = (__int128 *)v16;
}
v25 = &v27;
if ( v13 == &v18 )
{
v27 = v18;
}
else
{
v25 = v13;
*(_QWORD *)&v27 = v18;
}
v26 = v17;
v16 = &v18;
v17 = 0LL;
LOBYTE(v18) = 0;
std::string::operator=(&v19, &v25);
if ( v25 != &v27 )
operator delete(v25, v27 + 1);
if ( v16 != &v18 )
operator delete(v16, v18 + 1);
std::string::append(&v19, "llama.cpp");
}
v22 = &v24;
std::string::_M_construct<char *>((long long)&v22, v19, (long long)v19 + v20);
v14 = v22;
if ( *((_BYTE *)v22 + v23 - 1) != 47 )
{
std::string::push_back(&v22, 47LL);
v14 = v22;
}
*(_QWORD *)a1 = a1 + 16;
if ( v14 == &v24 )
{
*(_OWORD *)(a1 + 16) = v24;
}
else
{
*(_QWORD *)a1 = v14;
*(_QWORD *)(a1 + 16) = v24;
}
*(_QWORD *)(a1 + 8) = v23;
v22 = &v24;
v23 = 0LL;
LOBYTE(v24) = 0;
if ( v19 != v21 )
operator delete(v19, v21[0] + 1LL);
return a1;
}
|
fs_get_cache_directory[abi:cxx11]:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xa0
MOV RBX,RDI
LEA R13,[RSP + 0x30]
MOV qword ptr [R13 + -0x10],R13
LEA RDX,[0x20913a]
LEA RDI,[RSP + 0x20]
MOV RSI,RDX
CALL 0x001262b6
LEA RDI,[0x2143de]
CALL 0x0011dec0
TEST RAX,RAX
JZ 0x00197759
MOV R14,RAX
LEA R15,[RSP + 0x20]
MOV R12,qword ptr [R15 + 0x8]
MOV RDI,RAX
CALL 0x0011d4f0
LAB_00197741:
MOV RDI,R15
XOR ESI,ESI
MOV RDX,R12
MOV RCX,R14
MOV R8,RAX
CALL 0x0011e320
JMP 0x00197947
LAB_00197759:
LEA RDI,[0x2143ea]
CALL 0x0011dec0
TEST RAX,RAX
JZ 0x00197796
MOV R14,RAX
LEA R15,[RSP + 0x20]
MOV R12,qword ptr [R15 + 0x8]
MOV RDI,RAX
CALL 0x0011d4f0
MOV RDI,R15
XOR ESI,ESI
MOV RDX,R12
MOV RCX,R14
MOV R8,RAX
CALL 0x0011e320
JMP 0x00197876
LAB_00197796:
LEA RDI,[0x2143f4]
CALL 0x0011dec0
MOV R14,RAX
LEA R15,[RSP + 0x90]
MOV qword ptr [R15 + -0x10],R15
LAB_001977b1:
LEA RSI,[0x2143f9]
LEA RDX,[0x214401]
LEA RDI,[RSP + 0x80]
CALL 0x001262b6
MOV RDI,R14
CALL 0x0011d4f0
LAB_001977d4:
LEA RDI,[RSP + 0x80]
XOR ESI,ESI
XOR EDX,EDX
MOV RCX,R14
MOV R8,RAX
CALL 0x0011ddf0
LEA R12,[RSP + 0x70]
MOV qword ptr [R12 + -0x10],R12
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JZ 0x00197813
MOV qword ptr [RSP + 0x60],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x70],RDX
JMP 0x0019781b
LAB_00197813:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R12],XMM0
LAB_0019781b:
MOV RDX,qword ptr [RAX + 0x8]
LEA R14,[RSP + 0x60]
MOV qword ptr [R14 + 0x8],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
LEA RDI,[RSP + 0x20]
MOV RSI,R14
CALL 0x0011dee0
MOV RDI,qword ptr [R14]
CMP RDI,R12
JZ 0x00197859
MOV RSI,qword ptr [RSP + 0x70]
INC RSI
CALL 0x0011dc50
LAB_00197859:
MOV RDI,qword ptr [RSP + 0x80]
CMP RDI,R15
JZ 0x00197876
MOV RSI,qword ptr [RSP + 0x90]
INC RSI
CALL 0x0011dc50
LAB_00197876:
LEA R15,[RSP + 0x10]
MOV qword ptr [R15 + -0x10],R15
MOV RSI,qword ptr [RSP + 0x20]
MOV RDX,qword ptr [RSP + 0x28]
ADD RDX,RSI
LAB_0019788c:
MOV RDI,RSP
CALL 0x00125f90
MOV RAX,qword ptr [RSP]
MOV RCX,qword ptr [RSP + 0x8]
CMP byte ptr [RAX + RCX*0x1 + -0x1],0x2f
JZ 0x001978b5
LAB_001978a4:
MOV RDI,RSP
MOV ESI,0x2f
CALL 0x0011da30
MOV RAX,qword ptr [RSP]
LAB_001978b5:
LEA R12,[RSP + 0x70]
MOV qword ptr [R12 + -0x10],R12
CMP RAX,R15
JZ 0x001978d5
MOV qword ptr [RSP + 0x60],RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x70],RAX
JMP 0x001978de
LAB_001978d5:
MOVUPS XMM0,xmmword ptr [R15]
MOVUPS xmmword ptr [R12],XMM0
LAB_001978de:
MOV RAX,qword ptr [RSP + 0x8]
LEA R14,[RSP + 0x60]
MOV qword ptr [R14 + 0x8],RAX
MOV qword ptr [RSP],R15
MOV qword ptr [RSP + 0x8],0x0
MOV byte ptr [RSP + 0x10],0x0
LEA RDI,[RSP + 0x20]
MOV RSI,R14
CALL 0x0011dee0
MOV RDI,qword ptr [R14]
CMP RDI,R12
JZ 0x00197920
MOV RSI,qword ptr [RSP + 0x70]
INC RSI
CALL 0x0011dc50
LAB_00197920:
MOV RDI,qword ptr [RSP]
CMP RDI,R15
JZ 0x00197936
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x0011dc50
LAB_00197936:
LEA RSI,[0x214402]
LEA RDI,[RSP + 0x20]
CALL 0x0011e870
LAB_00197947:
LEA R14,[RSP + 0x50]
MOV qword ptr [R14 + -0x10],R14
MOV RSI,qword ptr [RSP + 0x20]
MOV RDX,qword ptr [RSP + 0x28]
ADD RDX,RSI
LEA RDI,[RSP + 0x40]
CALL 0x00125f90
MOV RAX,qword ptr [RSP + 0x40]
MOV RCX,qword ptr [RSP + 0x48]
CMP byte ptr [RAX + RCX*0x1 + -0x1],0x2f
JZ 0x0019798c
LAB_00197978:
LEA RDI,[RSP + 0x40]
MOV ESI,0x2f
CALL 0x0011da30
LAB_00197987:
MOV RAX,qword ptr [RSP + 0x40]
LAB_0019798c:
LEA RCX,[RBX + 0x10]
MOV qword ptr [RBX],RCX
CMP RAX,R14
JZ 0x001979a6
MOV qword ptr [RBX],RAX
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RBX + 0x10],RAX
JMP 0x001979ad
LAB_001979a6:
MOVUPS XMM0,xmmword ptr [R14]
MOVUPS xmmword ptr [RCX],XMM0
LAB_001979ad:
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RBX + 0x8],RAX
MOV qword ptr [RSP + 0x40],R14
MOV qword ptr [RSP + 0x48],0x0
MOV byte ptr [RSP + 0x50],0x0
MOV RDI,qword ptr [RSP + 0x20]
CMP RDI,R13
JZ 0x001979e0
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
CALL 0x0011dc50
LAB_001979e0:
MOV RAX,RBX
ADD RSP,0xa0
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* fs_get_cache_directory[abi:cxx11]() */
void fs_get_cache_directory_abi_cxx11_(void)
{
char *pcVar1;
char *pcVar2;
long *plVar3;
long *plVar4;
long *in_RDI;
long *local_c8;
long local_c0;
int1 local_b8;
int7 uStack_b7;
long lStack_b0;
long *local_a8;
char *local_a0;
long local_98 [2];
int1 *local_88;
long local_80;
int1 local_78;
int7 uStack_77;
long lStack_70;
long *local_68;
long local_60;
long local_58;
long lStack_50;
long *local_48 [2];
long local_38 [2];
local_a8 = local_98;
std::__cxx11::string::_M_construct<char_const*>(&local_a8);
pcVar1 = getenv("LLAMA_CACHE");
pcVar2 = local_a0;
if (pcVar1 == (char *)0x0) {
pcVar1 = getenv("XDG_CACHE_HOME");
pcVar2 = local_a0;
if (pcVar1 == (char *)0x0) {
pcVar2 = getenv("HOME");
/* try { // try from 001977b1 to 001977cb has its CatchHandler @ 00197a0e */
local_48[0] = local_38;
std::__cxx11::string::_M_construct<char_const*>(local_48,"/.cache/","");
strlen(pcVar2);
/* try { // try from 001977d4 to 001977ea has its CatchHandler @ 001979f4 */
plVar3 = (long *)std::__cxx11::string::replace((ulong)local_48,0,(char *)0x0,(ulong)pcVar2);
plVar4 = plVar3 + 2;
if ((long *)*plVar3 == plVar4) {
local_58 = *plVar4;
lStack_50 = plVar3[3];
local_68 = &local_58;
}
else {
local_58 = *plVar4;
local_68 = (long *)*plVar3;
}
local_60 = plVar3[1];
*plVar3 = (long)plVar4;
plVar3[1] = 0;
*(int1 *)(plVar3 + 2) = 0;
std::__cxx11::string::operator=((string *)&local_a8,(string *)&local_68);
if (local_68 != &local_58) {
operator_delete(local_68,local_58 + 1);
}
if (local_48[0] != local_38) {
operator_delete(local_48[0],local_38[0] + 1);
}
}
else {
strlen(pcVar1);
std::__cxx11::string::_M_replace((ulong)&local_a8,0,pcVar2,(ulong)pcVar1);
}
local_c8 = (long *)&local_b8;
/* try { // try from 0019788c to 00197893 has its CatchHandler @ 00197a23 */
std::__cxx11::string::_M_construct<char*>(&local_c8,local_a8,local_a0 + (long)local_a8);
if (*(char *)((long)local_c8 + local_c0 + -1) != '/') {
/* try { // try from 001978a4 to 001978b0 has its CatchHandler @ 00197a10 */
std::__cxx11::string::push_back((char)&local_c8);
}
local_68 = local_c8;
if (local_c8 == (long *)&local_b8) {
lStack_50 = lStack_b0;
local_68 = &local_58;
}
local_58 = CONCAT71(uStack_b7,local_b8);
local_60 = local_c0;
local_c0 = 0;
local_b8 = 0;
local_c8 = (long *)&local_b8;
std::__cxx11::string::operator=((string *)&local_a8,(string *)&local_68);
if (local_68 != &local_58) {
operator_delete(local_68,local_58 + 1);
}
if (local_c8 != (long *)&local_b8) {
operator_delete(local_c8,CONCAT71(uStack_b7,local_b8) + 1);
}
/* try { // try from 00197936 to 00197966 has its CatchHandler @ 00197a41 */
std::__cxx11::string::append((char *)&local_a8);
}
else {
strlen(pcVar1);
/* try { // try from 00197741 to 00197790 has its CatchHandler @ 00197a41 */
std::__cxx11::string::_M_replace((ulong)&local_a8,0,pcVar2,(ulong)pcVar1);
}
local_88 = &local_78;
std::__cxx11::string::_M_construct<char*>(&local_88,local_a8,local_a0 + (long)local_a8);
if (local_88[local_80 + -1] != '/') {
/* try { // try from 00197978 to 00197986 has its CatchHandler @ 00197a25 */
std::__cxx11::string::push_back((char)&local_88);
}
*in_RDI = (long)(in_RDI + 2);
if (local_88 == &local_78) {
in_RDI[2] = CONCAT71(uStack_77,local_78);
in_RDI[3] = lStack_70;
}
else {
*in_RDI = (long)local_88;
in_RDI[2] = CONCAT71(uStack_77,local_78);
}
in_RDI[1] = local_80;
local_80 = 0;
local_78 = 0;
if (local_a8 != local_98) {
local_88 = &local_78;
operator_delete(local_a8,local_98[0] + 1);
}
return;
}
|
|
7,604 |
mariadb_get_socket
|
eloqsql/libmariadb/libmariadb/mariadb_lib.c
|
static my_socket mariadb_get_socket(MYSQL *mysql)
{
my_socket sock= INVALID_SOCKET;
if (mysql->net.pvio)
{
ma_pvio_get_handle(mysql->net.pvio, &sock);
}
/* if an asynchronous connect is in progress, we need to obtain
pvio handle from async_context until the connection was
successfully established.
*/
else if (mysql->options.extension && mysql->options.extension->async_context &&
mysql->options.extension->async_context->pvio)
{
ma_pvio_get_handle(mysql->options.extension->async_context->pvio, &sock);
}
return sock;
}
|
O3
|
c
|
mariadb_get_socket:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, %rax
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x1f542
leaq -0x4(%rbp), %rsi
callq 0x203df
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
movq 0x480(%rax), %rax
testq %rax, %rax
je 0x1f539
movq 0x28(%rax), %rax
testq %rax, %rax
je 0x1f539
movq 0x18(%rax), %rdi
testq %rdi, %rdi
jne 0x1f530
jmp 0x1f539
|
mariadb_get_socket:
push rbp
mov rbp, rsp
sub rsp, 10h
mov rax, rdi
mov [rbp+var_4], 0FFFFFFFFh
mov rdi, [rdi]
test rdi, rdi
jz short loc_1F542
loc_1F530:
lea rsi, [rbp+var_4]
call ma_pvio_get_handle
loc_1F539:
mov eax, [rbp+var_4]
add rsp, 10h
pop rbp
retn
loc_1F542:
mov rax, [rax+480h]
test rax, rax
jz short loc_1F539
mov rax, [rax+28h]
test rax, rax
jz short loc_1F539
mov rdi, [rax+18h]
test rdi, rdi
jnz short loc_1F530
jmp short loc_1F539
|
long long mariadb_get_socket(long long *a1)
{
long long v2; // rdi
long long v4; // rax
long long v5; // rax
unsigned int v6; // [rsp+Ch] [rbp-4h] BYREF
v6 = -1;
v2 = *a1;
if ( v2 || (v4 = a1[144]) != 0 && (v5 = *(_QWORD *)(v4 + 40)) != 0 && (v2 = *(_QWORD *)(v5 + 24)) != 0 )
ma_pvio_get_handle(v2, &v6);
return v6;
}
|
mariadb_get_socket:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV RAX,RDI
MOV dword ptr [RBP + -0x4],0xffffffff
MOV RDI,qword ptr [RDI]
TEST RDI,RDI
JZ 0x0011f542
LAB_0011f530:
LEA RSI,[RBP + -0x4]
CALL 0x001203df
LAB_0011f539:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x10
POP RBP
RET
LAB_0011f542:
MOV RAX,qword ptr [RAX + 0x480]
TEST RAX,RAX
JZ 0x0011f539
MOV RAX,qword ptr [RAX + 0x28]
TEST RAX,RAX
JZ 0x0011f539
MOV RDI,qword ptr [RAX + 0x18]
TEST RDI,RDI
JNZ 0x0011f530
JMP 0x0011f539
|
int4 mariadb_get_socket(long *param_1)
{
long lVar1;
int4 local_c;
local_c = 0xffffffff;
lVar1 = *param_1;
if ((lVar1 != 0) ||
(((param_1[0x90] != 0 && (lVar1 = *(long *)(param_1[0x90] + 0x28), lVar1 != 0)) &&
(lVar1 = *(long *)(lVar1 + 0x18), lVar1 != 0)))) {
ma_pvio_get_handle(lVar1,&local_c);
}
return local_c;
}
|
|
7,605 |
ftxui::Box::Intersection(ftxui::Box, ftxui::Box)
|
Andrewchistyakov[P]flashcards_lyc/build_O0/_deps/ftxui-src/src/ftxui/screen/box.cpp
|
Box Box::Intersection(Box a, Box b) {
return Box{
std::max(a.x_min, b.x_min),
std::min(a.x_max, b.x_max),
std::max(a.y_min, b.y_min),
std::min(a.y_max, b.y_max),
};
}
|
O0
|
cpp
|
ftxui::Box::Intersection(ftxui::Box, ftxui::Box):
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x20(%rbp)
leaq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x30(%rbp)
leaq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
movq %rcx, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x3e710
movl (%rax), %eax
movl %eax, -0x10(%rbp)
leaq -0x1c(%rbp), %rdi
leaq -0x2c(%rbp), %rsi
callq 0x4b0c0
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rsi
movl (%rax), %eax
movl %eax, -0xc(%rbp)
callq 0x3e710
movl (%rax), %eax
movl %eax, -0x8(%rbp)
leaq -0x14(%rbp), %rdi
leaq -0x24(%rbp), %rsi
callq 0x4b0c0
movl (%rax), %eax
movl %eax, -0x4(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rdx
addq $0x40, %rsp
popq %rbp
retq
nop
|
_ZN5ftxui3Box12IntersectionES0_S0_:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_20], rdi
lea rax, [rbp+var_18]
mov [rbp+var_40], rax
mov [rbp+var_18], rsi
mov [rbp+var_30], rdx
lea rax, [rbp+var_28]
mov [rbp+var_38], rax
mov [rbp+var_28], rcx
lea rdi, [rbp+var_20]
lea rsi, [rbp+var_30]
call _ZSt3maxIiERKT_S2_S2_; std::max<int>(int const&,int const&)
mov eax, [rax]
mov dword ptr [rbp+var_10], eax
lea rdi, [rbp+var_20+4]
lea rsi, [rbp+var_30+4]
call _ZSt3minIiERKT_S2_S2_; std::min<int>(int const&,int const&)
mov rdi, [rbp+var_40]
mov rsi, [rbp+var_38]
mov eax, [rax]
mov dword ptr [rbp+var_10+4], eax
call _ZSt3maxIiERKT_S2_S2_; std::max<int>(int const&,int const&)
mov eax, [rax]
mov dword ptr [rbp+var_8], eax
lea rdi, [rbp+var_18+4]
lea rsi, [rbp+var_28+4]
call _ZSt3minIiERKT_S2_S2_; std::min<int>(int const&,int const&)
mov eax, [rax]
mov dword ptr [rbp+var_8+4], eax
mov rax, [rbp+var_10]
mov rdx, [rbp+var_8]
add rsp, 40h
pop rbp
retn
|
long long ftxui::Box::Intersection(long long a1, long long a2, long long a3, long long a4)
{
long long v5; // [rsp+10h] [rbp-30h] BYREF
long long v6; // [rsp+18h] [rbp-28h] BYREF
long long v7; // [rsp+20h] [rbp-20h] BYREF
long long v8; // [rsp+28h] [rbp-18h] BYREF
long long v9; // [rsp+30h] [rbp-10h]
long long v10; // [rsp+38h] [rbp-8h]
v7 = a1;
v8 = a2;
v5 = a3;
v6 = a4;
LODWORD(v9) = *std::max<int>(&v7, &v5);
HIDWORD(v9) = *std::min<int>((_DWORD *)&v7 + 1, (_DWORD *)&v5 + 1);
LODWORD(v10) = *std::max<int>(&v8, &v6);
std::min<int>((_DWORD *)&v8 + 1, (_DWORD *)&v6 + 1);
return v9;
}
|
Intersection:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x20],RDI
LEA RAX,[RBP + -0x18]
MOV qword ptr [RBP + -0x40],RAX
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x30],RDX
LEA RAX,[RBP + -0x28]
MOV qword ptr [RBP + -0x38],RAX
MOV qword ptr [RBP + -0x28],RCX
LEA RDI,[RBP + -0x20]
LEA RSI,[RBP + -0x30]
CALL 0x0013e710
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x10],EAX
LEA RDI,[RBP + -0x1c]
LEA RSI,[RBP + -0x2c]
CALL 0x0014b0c0
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x38]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0xc],EAX
CALL 0x0013e710
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x8],EAX
LEA RDI,[RBP + -0x14]
LEA RSI,[RBP + -0x24]
CALL 0x0014b0c0
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x4],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
/* ftxui::Box::Intersection(ftxui::Box, ftxui::Box) */
int1 [16]
ftxui::Box::Intersection
(int8 param_1,int8 param_2,int8 param_3,int8 param_4)
{
int1 auVar1 [16];
int *piVar2;
int8 local_38;
int8 local_30;
int8 local_28;
int8 local_20;
int local_18;
int iStack_14;
int local_10;
local_38 = param_3;
local_30 = param_4;
local_28 = param_1;
local_20 = param_2;
piVar2 = std::max<int>((int *)&local_28,(int *)&local_38);
local_18 = *piVar2;
piVar2 = std::min<int>((int *)((long)&local_28 + 4),(int *)((long)&local_38 + 4));
iStack_14 = *piVar2;
piVar2 = std::max<int>((int *)&local_20,(int *)&local_30);
local_10 = *piVar2;
piVar2 = std::min<int>((int *)((long)&local_20 + 4),(int *)((long)&local_30 + 4));
auVar1._4_4_ = iStack_14;
auVar1._0_4_ = local_18;
auVar1._8_4_ = local_10;
auVar1._12_4_ = *piVar2;
return auVar1;
}
|
|
7,606 |
translog_write_variable_record_chunk2_page
|
eloqsql/storage/maria/ma_loghandler.c
|
static my_bool
translog_write_variable_record_chunk2_page(struct st_translog_parts *parts,
TRANSLOG_ADDRESS *horizon,
struct st_buffer_cursor *cursor)
{
uchar chunk2_header[1];
DBUG_ENTER("translog_write_variable_record_chunk2_page");
chunk2_header[0]= TRANSLOG_CHUNK_NOHDR;
if (translog_chaser_page_next(horizon, cursor))
DBUG_RETURN(1);
/* Puts chunk type */
translog_write_data_on_page(horizon, cursor, 1, chunk2_header);
/* Puts chunk body */
translog_write_parts_on_page(horizon, cursor,
log_descriptor.page_capacity_chunk_2, parts);
DBUG_RETURN(0);
}
|
O0
|
c
|
translog_write_variable_record_chunk2_page:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movb $-0x80, -0x21(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x98c20
cmpb $0x0, %al
je 0x98871
jmp 0x9886b
movb $0x1, -0x1(%rbp)
jmp 0x988a3
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
leaq -0x21(%rbp), %rcx
movl $0x1, %edx
callq 0x98ca0
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movzwl 0x3ebce0(%rip), %edx # 0x484576
movq -0x10(%rbp), %rcx
callq 0x981e0
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
|
translog_write_variable_record_chunk2_page:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_21], 80h
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
call translog_chaser_page_next
cmp al, 0
jz short loc_98871
jmp short $+2
loc_9886B:
mov [rbp+var_1], 1
jmp short loc_988A3
loc_98871:
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
lea rcx, [rbp+var_21]
mov edx, 1
call translog_write_data_on_page
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
movzx edx, cs:word_484576
mov rcx, [rbp+var_10]
call translog_write_parts_on_page
mov [rbp+var_1], 0
loc_988A3:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
|
char translog_write_variable_record_chunk2_page(long long a1, _QWORD *a2, long long a3)
{
char v4; // [rsp+Fh] [rbp-21h] BYREF
long long v5; // [rsp+10h] [rbp-20h]
_QWORD *v6; // [rsp+18h] [rbp-18h]
long long v7; // [rsp+20h] [rbp-10h]
v7 = a1;
v6 = a2;
v5 = a3;
v4 = 0x80;
if ( (unsigned __int8)translog_chaser_page_next(a2, a3) )
return 1;
translog_write_data_on_page(v6, v5, 1LL, &v4);
translog_write_parts_on_page(v6, v5, (unsigned __int16)word_484576, v7);
return 0;
}
|
translog_write_variable_record_chunk2_page:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RBP + -0x21],0x80
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x00198c20
CMP AL,0x0
JZ 0x00198871
JMP 0x0019886b
LAB_0019886b:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001988a3
LAB_00198871:
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
LEA RCX,[RBP + -0x21]
MOV EDX,0x1
CALL 0x00198ca0
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
MOVZX EDX,word ptr [0x00584576]
MOV RCX,qword ptr [RBP + -0x10]
CALL 0x001981e0
MOV byte ptr [RBP + -0x1],0x0
LAB_001988a3:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
bool translog_write_variable_record_chunk2_page
(int8 param_1,int8 param_2,int8 param_3)
{
char cVar1;
int1 local_29;
int8 local_28;
int8 local_20;
int8 local_18;
bool local_9;
local_29 = 0x80;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
cVar1 = translog_chaser_page_next(param_2,param_3);
if (cVar1 == '\0') {
translog_write_data_on_page(local_20,local_28,1,&local_29);
translog_write_parts_on_page(local_20,local_28,DAT_00584576,local_18);
}
local_9 = cVar1 != '\0';
return local_9;
}
|
|
7,607 |
string_from[abi:cxx11](std::vector<int, std::allocator<int>> const&)
|
llama.cpp/common/common.cpp
|
std::string string_from(const std::vector<int> & values) {
std::stringstream buf;
buf << "[ ";
bool first = true;
for (auto e : values) {
if (first) {
first = false;
} else {
buf << ", ";
}
buf << std::to_string(e);
}
buf << " ]";
return buf.str();
}
|
O3
|
cpp
|
string_from[abi:cxx11](std::vector<int, std::allocator<int>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1b8, %rsp # imm = 0x1B8
movq %rsi, %rbx
movq %rdi, 0x28(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x204c0
leaq 0x40(%rsp), %rdi
leaq 0x2cd36(%rip), %rsi # 0x12344c
movl $0x2, %edx
callq 0x21050
movq (%rbx), %r12
movq 0x8(%rbx), %r15
cmpq %r15, %r12
je 0xf6816
movb $0x1, %al
movl $0xd1b71759, %r14d # imm = 0xD1B71759
movl (%r12), %r13d
testb $0x1, %al
jne 0xf6756
movl $0x2, %edx
leaq 0x40(%rsp), %rdi
leaq 0x2d3f0(%rip), %rsi # 0x123b41
callq 0x21050
movl %r13d, %ebp
negl %ebp
cmovsl %r13d, %ebp
movl $0x1, %ebx
cmpl $0xa, %ebp
jb 0xf67a5
movl $0x4, %ebx
movl %ebp, %eax
cmpl $0x63, %eax
jbe 0xf679e
cmpl $0x3e7, %eax # imm = 0x3E7
jbe 0xf67a3
cmpl $0x2710, %eax # imm = 0x2710
jb 0xf67a5
movl %eax, %ecx
imulq %r14, %rcx
shrq $0x2d, %rcx
addl $0x4, %ebx
cmpl $0x1869f, %eax # imm = 0x1869F
movl %ecx, %eax
ja 0xf6770
addl $-0x3, %ebx
jmp 0xf67a5
addl $-0x2, %ebx
jmp 0xf67a5
decl %ebx
shrl $0x1f, %r13d
leal (%rbx,%r13), %esi
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x8(%rsp), %rdi
movl $0x2d, %edx
callq 0x209b0
addq 0x8(%rsp), %r13
movq %r13, %rdi
movl %ebx, %esi
movl %ebp, %edx
callq 0x72fb2
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x40(%rsp), %rdi
callq 0x21050
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xf6807
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x20170
addq $0x4, %r12
xorl %eax, %eax
cmpq %r15, %r12
jne 0xf6738
leaq 0x2cc32(%rip), %rsi # 0x12344f
movl $0x2, %edx
leaq 0x40(%rsp), %rdi
callq 0x21050
movq 0x28(%rsp), %rbx
leaq 0x48(%rsp), %rsi
movq %rbx, %rdi
callq 0x20640
movq 0x6a76b(%rip), %rsi # 0x160fb0
leaq 0x30(%rsp), %rdi
callq 0x20cd0
leaq 0xb0(%rsp), %rdi
callq 0x20c20
movq %rbx, %rax
addq $0x1b8, %rsp # imm = 0x1B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xf6875
jmp 0xf6875
movq %rax, %rbx
jmp 0xf68a1
movq %rax, %rdi
callq 0x27dc5
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xf68a1
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x20170
movq 0x6a708(%rip), %rsi # 0x160fb0
leaq 0x30(%rsp), %rdi
callq 0x20cd0
leaq 0xb0(%rsp), %rdi
callq 0x20c20
movq %rbx, %rdi
callq 0x20ad0
|
_Z11string_fromB5cxx11RKSt6vectorIiSaIiEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 1B8h
mov rbx, rsi
mov [rsp+1E8h+var_1C0], rdi
lea rdi, [rsp+1E8h+var_1B8]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void)
lea rdi, [rsp+1E8h+var_1A8]
lea rsi, asc_12344C; "[ "
mov edx, 2
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov r12, [rbx]
mov r15, [rbx+8]
cmp r12, r15
jz loc_F6816
mov al, 1
mov r14d, 0D1B71759h
loc_F6738:
mov r13d, [r12]
test al, 1
jnz short loc_F6756
mov edx, 2
lea rdi, [rsp+1E8h+var_1A8]
lea rsi, aZuD+6; ", "
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
loc_F6756:
mov ebp, r13d
neg ebp
cmovs ebp, r13d
mov ebx, 1
cmp ebp, 0Ah
jb short loc_F67A5
mov ebx, 4
mov eax, ebp
loc_F6770:
cmp eax, 63h ; 'c'
jbe short loc_F679E
cmp eax, 3E7h
jbe short loc_F67A3
cmp eax, 2710h
jb short loc_F67A5
mov ecx, eax
imul rcx, r14
shr rcx, 2Dh
add ebx, 4
cmp eax, 1869Fh
mov eax, ecx
ja short loc_F6770
add ebx, 0FFFFFFFDh
jmp short loc_F67A5
loc_F679E:
add ebx, 0FFFFFFFEh
jmp short loc_F67A5
loc_F67A3:
dec ebx
loc_F67A5:
shr r13d, 1Fh
lea esi, [rbx+r13]
lea rax, [rsp+1E8h+var_1D0]
mov [rsp+1E8h+var_1E0], rax
lea rdi, [rsp+1E8h+var_1E0]
mov edx, 2Dh ; '-'
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
add r13, [rsp+1E8h+var_1E0]
mov rdi, r13
mov esi, ebx
mov edx, ebp
call _ZNSt8__detail18__to_chars_10_implIjEEvPcjT_; std::__detail::__to_chars_10_impl<uint>(char *,uint,uint)
mov rsi, [rsp+1E8h+var_1E0]
mov rdx, [rsp+1E8h+var_1D8]
lea rdi, [rsp+1E8h+var_1A8]
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, [rsp+1E8h+var_1E0]; void *
lea rax, [rsp+1E8h+var_1D0]
cmp rdi, rax
jz short loc_F6807
mov rsi, [rsp+1E8h+var_1D0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_F6807:
add r12, 4
xor eax, eax
cmp r12, r15
jnz loc_F6738
loc_F6816:
lea rsi, asc_12344F; " ]"
mov edx, 2
lea rdi, [rsp+1E8h+var_1A8]
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rbx, [rsp+1E8h+var_1C0]
lea rsi, [rsp+1E8h+var_1A0]
mov rdi, rbx
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+1E8h+var_1B8]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
lea rdi, [rsp+1E8h+var_138]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rax, rbx
add rsp, 1B8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_F6875
jmp short $+2
loc_F6875:
mov rbx, rax
jmp short loc_F68A1
mov rdi, rax
call __clang_call_terminate
mov rbx, rax
mov rdi, [rsp+1E8h+var_1E0]; void *
lea rax, [rsp+1E8h+var_1D0]
cmp rdi, rax
jz short loc_F68A1
mov rsi, [rsp+1E8h+var_1D0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_F68A1:
mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+1E8h+var_1B8]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
lea rdi, [rsp+1E8h+var_138]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rdi, rbx
call __Unwind_Resume
|
long long string_from[abi:cxx11](long long a1, int **a2)
{
int *v2; // r12
int *v3; // r15
char v4; // al
int v5; // r13d
unsigned int v6; // ebp
int v7; // ebx
unsigned int v8; // eax
bool v9; // cc
unsigned int v10; // r13d
long long v11; // rbx
void *v13[2]; // [rsp+8h] [rbp-1E0h] BYREF
_QWORD v14[2]; // [rsp+18h] [rbp-1D0h] BYREF
long long v15; // [rsp+28h] [rbp-1C0h]
_BYTE v16[16]; // [rsp+30h] [rbp-1B8h] BYREF
char v17[8]; // [rsp+40h] [rbp-1A8h] BYREF
char v18[104]; // [rsp+48h] [rbp-1A0h] BYREF
char v19[312]; // [rsp+B0h] [rbp-138h] BYREF
v15 = a1;
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v16);
std::__ostream_insert<char,std::char_traits<char>>(v17, "[ ", 2LL);
v2 = *a2;
v3 = a2[1];
if ( *a2 != v3 )
{
v4 = 1;
do
{
v5 = *v2;
if ( (v4 & 1) == 0 )
std::__ostream_insert<char,std::char_traits<char>>(v17, ", ", 2LL);
v6 = -v5;
if ( v5 > 0 )
v6 = v5;
v7 = 1;
if ( v6 >= 0xA )
{
v7 = 4;
v8 = v6;
while ( 1 )
{
if ( v8 <= 0x63 )
{
v7 -= 2;
goto LABEL_16;
}
if ( v8 <= 0x3E7 )
break;
if ( v8 < 0x2710 )
goto LABEL_16;
v7 += 4;
v9 = v8 <= 0x1869F;
v8 /= 0x2710u;
if ( v9 )
{
v7 -= 3;
goto LABEL_16;
}
}
--v7;
}
LABEL_16:
v10 = (unsigned int)v5 >> 31;
v13[0] = v14;
std::string::_M_construct(v13, v7 + v10, 45LL);
std::__detail::__to_chars_10_impl<unsigned int>((char *)v13[0] + v10, v7, v6);
std::__ostream_insert<char,std::char_traits<char>>(v17, v13[0], v13[1]);
if ( v13[0] != v14 )
operator delete(v13[0], v14[0] + 1LL);
++v2;
v4 = 0;
}
while ( v2 != v3 );
}
std::__ostream_insert<char,std::char_traits<char>>(v17, " ]", 2LL);
v11 = v15;
std::stringbuf::str(v15, v18);
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(
v16,
&`VTT for'std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>);
std::ios_base::~ios_base((std::ios_base *)v19);
return v11;
}
|
string_from[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x1b8
MOV RBX,RSI
MOV qword ptr [RSP + 0x28],RDI
LEA RDI,[RSP + 0x30]
CALL 0x001204c0
LEA RDI,[RSP + 0x40]
LAB_001f670f:
LEA RSI,[0x22344c]
MOV EDX,0x2
CALL 0x00121050
MOV R12,qword ptr [RBX]
MOV R15,qword ptr [RBX + 0x8]
CMP R12,R15
JZ 0x001f6816
MOV AL,0x1
MOV R14D,0xd1b71759
LAB_001f6738:
MOV R13D,dword ptr [R12]
TEST AL,0x1
JNZ 0x001f6756
LAB_001f6740:
MOV EDX,0x2
LEA RDI,[RSP + 0x40]
LEA RSI,[0x223b41]
CALL 0x00121050
LAB_001f6756:
MOV EBP,R13D
NEG EBP
CMOVS EBP,R13D
MOV EBX,0x1
CMP EBP,0xa
JC 0x001f67a5
MOV EBX,0x4
MOV EAX,EBP
LAB_001f6770:
CMP EAX,0x63
JBE 0x001f679e
CMP EAX,0x3e7
JBE 0x001f67a3
CMP EAX,0x2710
JC 0x001f67a5
MOV ECX,EAX
IMUL RCX,R14
SHR RCX,0x2d
ADD EBX,0x4
CMP EAX,0x1869f
MOV EAX,ECX
JA 0x001f6770
ADD EBX,-0x3
JMP 0x001f67a5
LAB_001f679e:
ADD EBX,-0x2
JMP 0x001f67a5
LAB_001f67a3:
DEC EBX
LAB_001f67a5:
SHR R13D,0x1f
LEA ESI,[RBX + R13*0x1]
LEA RAX,[RSP + 0x18]
MOV qword ptr [RSP + 0x8],RAX
LAB_001f67b7:
LEA RDI,[RSP + 0x8]
MOV EDX,0x2d
CALL 0x001209b0
ADD R13,qword ptr [RSP + 0x8]
MOV RDI,R13
MOV ESI,EBX
MOV EDX,EBP
CALL 0x00172fb2
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_001f67e1:
LEA RDI,[RSP + 0x40]
CALL 0x00121050
MOV RDI,qword ptr [RSP + 0x8]
LEA RAX,[RSP + 0x18]
CMP RDI,RAX
JZ 0x001f6807
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00120170
LAB_001f6807:
ADD R12,0x4
XOR EAX,EAX
CMP R12,R15
JNZ 0x001f6738
LAB_001f6816:
LEA RSI,[0x22344f]
MOV EDX,0x2
LEA RDI,[RSP + 0x40]
CALL 0x00121050
MOV RBX,qword ptr [RSP + 0x28]
LEA RSI,[RSP + 0x48]
MOV RDI,RBX
CALL 0x00120640
LAB_001f683e:
MOV RSI,qword ptr [0x00260fb0]
LEA RDI,[RSP + 0x30]
CALL 0x00120cd0
LEA RDI,[RSP + 0xb0]
CALL 0x00120c20
MOV RAX,RBX
ADD RSP,0x1b8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* string_from[abi:cxx11](std::vector<int, std::allocator<int> > const&) */
vector * string_from_abi_cxx11_(vector *param_1)
{
uint uVar1;
uint *puVar2;
uint uVar3;
vector *pvVar4;
uint uVar5;
bool bVar6;
uint uVar7;
ulong uVar8;
uint uVar9;
int8 *in_RSI;
uint *puVar10;
long *local_1e0;
long local_1d8;
long local_1d0 [2];
vector *local_1c0;
stringstream local_1b8 [16];
ostream local_1a8 [112];
ios_base local_138 [264];
local_1c0 = param_1;
std::__cxx11::stringstream::stringstream(local_1b8);
/* try { // try from 001f670f to 001f671f has its CatchHandler @ 001f6871 */
std::__ostream_insert<char,std::char_traits<char>>(local_1a8,"[ ",2);
puVar10 = (uint *)*in_RSI;
puVar2 = (uint *)in_RSI[1];
if (puVar10 != puVar2) {
bVar6 = true;
do {
uVar1 = *puVar10;
if (!bVar6) {
/* try { // try from 001f6740 to 001f6755 has its CatchHandler @ 001f6875 */
std::__ostream_insert<char,std::char_traits<char>>(local_1a8,", ",2);
}
uVar3 = -uVar1;
if (0 < (int)uVar1) {
uVar3 = uVar1;
}
uVar9 = 1;
if (9 < uVar3) {
uVar8 = (ulong)uVar3;
uVar5 = 4;
do {
uVar9 = uVar5;
uVar7 = (uint)uVar8;
if (uVar7 < 100) {
uVar9 = uVar9 - 2;
goto LAB_001f67a5;
}
if (uVar7 < 1000) {
uVar9 = uVar9 - 1;
goto LAB_001f67a5;
}
if (uVar7 < 10000) goto LAB_001f67a5;
uVar8 = uVar8 / 10000;
uVar5 = uVar9 + 4;
} while (99999 < uVar7);
uVar9 = uVar9 + 1;
}
LAB_001f67a5:
local_1e0 = local_1d0;
/* try { // try from 001f67b7 to 001f67c5 has its CatchHandler @ 001f687a */
std::__cxx11::string::_M_construct((ulong)&local_1e0,(char)uVar9 - (char)((int)uVar1 >> 0x1f))
;
std::__detail::__to_chars_10_impl<unsigned_int>
((char *)((long)local_1e0 + (ulong)(uVar1 >> 0x1f)),uVar9,uVar3);
/* try { // try from 001f67e1 to 001f67ea has its CatchHandler @ 001f6882 */
std::__ostream_insert<char,std::char_traits<char>>(local_1a8,(char *)local_1e0,local_1d8);
if (local_1e0 != local_1d0) {
operator_delete(local_1e0,local_1d0[0] + 1);
}
puVar10 = puVar10 + 1;
bVar6 = false;
} while (puVar10 != puVar2);
}
/* try { // try from 001f6816 to 001f683d has its CatchHandler @ 001f6873 */
std::__ostream_insert<char,std::char_traits<char>>(local_1a8," ]",2);
pvVar4 = local_1c0;
std::__cxx11::stringbuf::str();
std::__cxx11::stringstream::~stringstream(local_1b8);
std::ios_base::~ios_base(local_138);
return pvVar4;
}
|
|
7,608 |
js_array_buffer_constructor3
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_array_buffer_constructor3(JSContext *ctx,
JSValue new_target,
uint64_t len, uint64_t *max_len,
JSClassID class_id,
uint8_t *buf,
JSFreeArrayBufferDataFunc *free_func,
void *opaque, BOOL alloc_flag)
{
JSRuntime *rt = ctx->rt;
JSValue obj;
JSArrayBuffer *abuf = NULL;
uint64_t sab_alloc_len;
if (!alloc_flag && buf && max_len && free_func != js_array_buffer_free) {
// not observable from JS land, only through C API misuse;
// JS code cannot create externally managed buffers directly
return JS_ThrowInternalError(ctx,
"resizable ArrayBuffers not supported "
"for externally managed buffers");
}
obj = js_create_from_ctor(ctx, new_target, class_id);
if (JS_IsException(obj))
return obj;
/* XXX: we are currently limited to 2 GB */
if (len > INT32_MAX) {
JS_ThrowRangeError(ctx, "invalid array buffer length");
goto fail;
}
if (max_len && *max_len > INT32_MAX) {
JS_ThrowRangeError(ctx, "invalid max array buffer length");
goto fail;
}
abuf = js_malloc(ctx, sizeof(*abuf));
if (!abuf)
goto fail;
abuf->byte_length = len;
abuf->max_byte_length = max_len ? *max_len : -1;
if (alloc_flag) {
if (class_id == JS_CLASS_SHARED_ARRAY_BUFFER &&
rt->sab_funcs.sab_alloc) {
// TOOD(bnoordhuis) resizing backing memory for SABs atomically
// is hard so we cheat and allocate |maxByteLength| bytes upfront
sab_alloc_len = max_len ? *max_len : len;
abuf->data = rt->sab_funcs.sab_alloc(rt->sab_funcs.sab_opaque,
max_int(sab_alloc_len, 1));
if (!abuf->data)
goto fail;
memset(abuf->data, 0, sab_alloc_len);
} else {
/* the allocation must be done after the object creation */
abuf->data = js_mallocz(ctx, max_int(len, 1));
if (!abuf->data)
goto fail;
}
} else {
if (class_id == JS_CLASS_SHARED_ARRAY_BUFFER &&
rt->sab_funcs.sab_dup) {
rt->sab_funcs.sab_dup(rt->sab_funcs.sab_opaque, buf);
}
abuf->data = buf;
}
init_list_head(&abuf->array_list);
abuf->detached = FALSE;
abuf->shared = (class_id == JS_CLASS_SHARED_ARRAY_BUFFER);
abuf->opaque = opaque;
abuf->free_func = free_func;
if (alloc_flag && buf)
memcpy(abuf->data, buf, len);
JS_SetOpaqueInternal(obj, abuf);
return obj;
fail:
JS_FreeValue(ctx, obj);
js_free(ctx, abuf);
return JS_EXCEPTION;
}
|
O2
|
c
|
js_array_buffer_constructor3:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, %ebp
movq %r8, %r12
movq %rdi, %r13
movq 0x18(%rdi), %r15
testq %r8, %r8
je 0x359ba
cmpq $0x0, 0x50(%rsp)
je 0x359ba
leaq 0x265(%rip), %rax # 0x35bf5
cmpq %rax, 0x58(%rsp)
je 0x359ba
cmpl $0x0, 0x68(%rsp)
jne 0x359ba
leaq 0x56b62(%rip), %rsi # 0x8c507
xorl %ebx, %ebx
movq %r13, %rdi
xorl %eax, %eax
callq 0x20321
pushq $0x6
popq %r14
jmp 0x35a3d
movq %rcx, 0x10(%rsp)
movq %r13, %rdi
movl %ebp, %ecx
callq 0x3400a
movq %rax, %rbx
movq %rdx, %r14
cmpl $0x6, %r14d
jne 0x359e7
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
movq %rbx, %rcx
andq %rax, %rcx
jmp 0x35a3f
cmpq $0x7fffffff, 0x10(%rsp) # imm = 0x7FFFFFFF
jbe 0x359fb
leaq 0x56b52(%rip), %rsi # 0x8c54b
jmp 0x35a11
testq %r12, %r12
je 0x35a56
cmpq $0x7fffffff, (%r12) # imm = 0x7FFFFFFF
jbe 0x35a56
leaq 0x56b56(%rip), %rsi # 0x8c567
xorl %r15d, %r15d
movq %r13, %rdi
xorl %eax, %eax
callq 0x1e863
movq %r13, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x1bbce
movq %r13, %rdi
movq %r15, %rsi
callq 0x1ae1e
pushq $0x6
popq %r14
xorl %ebx, %ebx
xorl %ecx, %ecx
movl %ebx, %eax
orq %rcx, %rax
movq %r14, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x38
popq %rsi
movq %r13, %rdi
callq 0x1adc4
testq %rax, %rax
je 0x35a7d
movq 0x10(%rsp), %rdx
movq %rax, 0x8(%rsp)
movl %edx, (%rax)
testq %r12, %r12
je 0x35a82
movl (%r12), %eax
jmp 0x35a85
xorl %r15d, %r15d
jmp 0x35a1e
pushq $-0x1
popq %rax
movq 0x50(%rsp), %rsi
movl 0x68(%rsp), %edi
movq 0x8(%rsp), %rcx
movl %eax, 0x4(%rcx)
testl %edi, %edi
je 0x35b28
cmpl $0x14, %ebp
jne 0x35afc
movq 0x160(%r15), %rax
testq %rax, %rax
je 0x35afc
movl %edx, %ecx
testq %r12, %r12
je 0x35abd
movq (%r12), %rcx
movq %rcx, %rdx
movq %rdx, %r12
movq 0x178(%r15), %rdi
cmpl $0x2, %ecx
pushq $0x1
popq %rsi
cmovgel %ecx, %esi
callq *%rax
movq 0x8(%rsp), %r15
movq %rax, 0x10(%r15)
testq %rax, %rax
je 0x35a1e
movq %rax, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0xe390
movq 0x50(%rsp), %rsi
movl 0x68(%rsp), %edi
jmp 0x35b54
cmpl $0x1, %edx
movl %edx, %esi
adcl $0x0, %esi
movq %r13, %rdi
callq 0x1adf1
movl 0x68(%rsp), %edi
movq 0x50(%rsp), %rsi
movq 0x8(%rsp), %r15
movq %rax, 0x10(%r15)
testq %rax, %rax
jne 0x35b54
jmp 0x35a1e
cmpl $0x14, %ebp
jne 0x35b4b
movq 0x170(%r15), %rax
testq %rax, %rax
je 0x35b4b
movq 0x178(%r15), %rdi
callq *%rax
movl 0x68(%rsp), %edi
movq 0x50(%rsp), %rsi
movq 0x8(%rsp), %r15
movq %rsi, 0x10(%r15)
testl %edi, %edi
sete %al
testq %rsi, %rsi
sete %cl
movq %r15, %rdx
addq $0x18, %rdx
movq %rdx, 0x18(%r15)
movq %rdx, 0x20(%r15)
movb $0x0, 0x8(%r15)
cmpl $0x14, %ebp
sete 0x9(%r15)
movq 0x60(%rsp), %rdx
movq %rdx, 0x28(%r15)
movq 0x58(%rsp), %rdx
movq %rdx, 0x30(%r15)
orb %al, %cl
jne 0x35b9f
movq 0x10(%r15), %rdi
movq 0x10(%rsp), %rdx
callq 0xe630
movq %r15, 0x30(%rbx)
jmp 0x359d5
|
js_array_buffer_constructor3:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov ebp, r9d
mov r12, r8
mov r13, rdi
mov r15, [rdi+18h]
test r8, r8
jz short loc_359BA
cmp [rsp+48h+arg_0], 0
jz short loc_359BA
lea rax, js_array_buffer_free
cmp [rsp+48h+arg_8], rax
jz short loc_359BA
cmp [rsp+48h+arg_18], 0
jnz short loc_359BA
lea rsi, aResizableArray; "resizable ArrayBuffers not supported fo"...
xor ebx, ebx
mov rdi, r13
xor eax, eax
call JS_ThrowInternalError
push 6
pop r14
jmp loc_35A3D
loc_359BA:
mov [rsp+48h+var_38], rcx
mov rdi, r13
mov ecx, ebp
call js_create_from_ctor
mov rbx, rax
mov r14, rdx
cmp r14d, 6
jnz short loc_359E7
loc_359D5:
mov rax, 0FFFFFFFF00000000h
mov rcx, rbx
and rcx, rax
jmp short loc_35A3F
loc_359E7:
cmp [rsp+48h+var_38], 7FFFFFFFh
jbe short loc_359FB
lea rsi, aInvalidArrayBu_0; "invalid array buffer length"
jmp short loc_35A11
loc_359FB:
test r12, r12
jz short loc_35A56
cmp qword ptr [r12], 7FFFFFFFh
jbe short loc_35A56
lea rsi, aInvalidMaxArra; "invalid max array buffer length"
loc_35A11:
xor r15d, r15d
mov rdi, r13
xor eax, eax
call JS_ThrowRangeError
loc_35A1E:
mov rdi, r13
mov rsi, rbx
mov rdx, r14
call JS_FreeValue
mov rdi, r13
mov rsi, r15
call js_free
push 6
pop r14
xor ebx, ebx
loc_35A3D:
xor ecx, ecx
loc_35A3F:
mov eax, ebx
or rax, rcx
mov rdx, r14
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_35A56:
push 38h ; '8'
pop rsi
mov rdi, r13
call js_malloc
test rax, rax
jz short loc_35A7D
mov rdx, [rsp+48h+var_38]
mov [rsp+48h+var_40], rax
mov [rax], edx
test r12, r12
jz short loc_35A82
mov eax, [r12]
jmp short loc_35A85
loc_35A7D:
xor r15d, r15d
jmp short loc_35A1E
loc_35A82:
push 0FFFFFFFFFFFFFFFFh
pop rax
loc_35A85:
mov rsi, [rsp+48h+arg_0]
mov edi, [rsp+48h+arg_18]
mov rcx, [rsp+48h+var_40]
mov [rcx+4], eax
test edi, edi
jz loc_35B28
cmp ebp, 14h
jnz short loc_35AFC
mov rax, [r15+160h]
test rax, rax
jz short loc_35AFC
mov ecx, edx
test r12, r12
jz short loc_35ABD
mov rcx, [r12]
mov rdx, rcx
loc_35ABD:
mov r12, rdx
mov rdi, [r15+178h]
cmp ecx, 2
push 1
pop rsi
cmovge esi, ecx
call rax
mov r15, [rsp+48h+var_40]
mov [r15+10h], rax
test rax, rax
jz loc_35A1E
mov rdi, rax
xor esi, esi
mov rdx, r12
call _memset
mov rsi, [rsp+48h+arg_0]
mov edi, [rsp+48h+arg_18]
jmp short loc_35B54
loc_35AFC:
cmp edx, 1
mov esi, edx
adc esi, 0
mov rdi, r13
call js_mallocz
mov edi, [rsp+48h+arg_18]
mov rsi, [rsp+48h+arg_0]
mov r15, [rsp+48h+var_40]
mov [r15+10h], rax
test rax, rax
jnz short loc_35B54
jmp loc_35A1E
loc_35B28:
cmp ebp, 14h
jnz short loc_35B4B
mov rax, [r15+170h]
test rax, rax
jz short loc_35B4B
mov rdi, [r15+178h]
call rax
mov edi, [rsp+48h+arg_18]
mov rsi, [rsp+48h+arg_0]
loc_35B4B:
mov r15, [rsp+48h+var_40]
mov [r15+10h], rsi
loc_35B54:
test edi, edi
setz al
test rsi, rsi
setz cl
mov rdx, r15
add rdx, 18h
mov [r15+18h], rdx
mov [r15+20h], rdx
mov byte ptr [r15+8], 0
cmp ebp, 14h
setz byte ptr [r15+9]
mov rdx, [rsp+48h+arg_10]
mov [r15+28h], rdx
mov rdx, [rsp+48h+arg_8]
mov [r15+30h], rdx
or cl, al
jnz short loc_35B9F
mov rdi, [r15+10h]
mov rdx, [rsp+48h+var_38]
call _memcpy
loc_35B9F:
mov [rbx+30h], r15
jmp loc_359D5
|
unsigned long long js_array_buffer_constructor3(
long long a1,
long long a2,
long long a3,
unsigned long long a4,
int *a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
long long a15,
long long ( *a16)(),
long long a17,
int a18)
{
int v18; // ebp
_QWORD *v21; // r15
unsigned long long v22; // rbx
long long v23; // rdx
long long v24; // rcx
long long v25; // r8
long long v26; // r9
__m128 v27; // xmm4
__m128 v28; // xmm5
long long v29; // r14
unsigned long long v30; // rcx
const char *v31; // rsi
long long v32; // r15
_DWORD *v34; // rax
unsigned long long v35; // rdx
int v36; // eax
long long v37; // rsi
int v38; // edi
long long ( *v39)(_QWORD, long long); // rax
unsigned long long v40; // rcx
unsigned long long v41; // r12
long long v42; // rsi
long long v43; // rax
long long v44; // rax
void ( *v45)(_QWORD, long long); // rax
char v46; // [rsp+0h] [rbp-48h]
_DWORD *v47; // [rsp+8h] [rbp-40h]
v18 = a6;
v21 = *(_QWORD **)(a1 + 24);
if ( a5 && a15 && a16 != js_array_buffer_free && !a18 )
{
LODWORD(v22) = 0;
JS_ThrowInternalError(
a1,
(long long)"resizable ArrayBuffers not supported for externally managed buffers",
a3,
a4,
(long long)a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v46);
LABEL_15:
v30 = 0LL;
return v30 | (unsigned int)v22;
}
v22 = js_create_from_ctor(a1, a2, a3, a6);
v29 = v23;
if ( (_DWORD)v23 != 6 )
{
if ( a4 <= 0x7FFFFFFF )
{
if ( !a5 || *(_QWORD *)a5 <= 0x7FFFFFFFuLL )
{
v34 = (_DWORD *)js_malloc(a1, 56LL);
if ( v34 )
{
v35 = a4;
v47 = v34;
*v34 = a4;
if ( a5 )
v36 = *a5;
else
v36 = -1;
v37 = a15;
v38 = a18;
v47[1] = v36;
if ( a18 )
{
if ( v18 == 20 && (v39 = (long long ( *)(_QWORD, long long))v21[44]) != 0LL )
{
LODWORD(v40) = a4;
if ( a5 )
{
v40 = *(_QWORD *)a5;
v35 = *(_QWORD *)a5;
}
v41 = v35;
v42 = 1LL;
if ( (int)v40 >= 2 )
v42 = (unsigned int)v40;
v43 = v39(v21[47], v42);
v32 = (long long)v47;
*((_QWORD *)v47 + 2) = v43;
if ( !v43 )
goto LABEL_14;
memset(v43, 0LL, v41);
v37 = a15;
v38 = a18;
}
else
{
v44 = js_mallocz(a1, ((_DWORD)a4 == 0) + (unsigned int)a4);
v38 = a18;
v37 = a15;
v32 = (long long)v47;
*((_QWORD *)v47 + 2) = v44;
if ( !v44 )
goto LABEL_14;
}
}
else
{
if ( v18 == 20 )
{
v45 = (void ( *)(_QWORD, long long))v21[46];
if ( v45 )
{
v45(v21[47], a15);
v38 = 0;
v37 = a15;
}
}
v32 = (long long)v47;
*((_QWORD *)v47 + 2) = v37;
}
*(_QWORD *)(v32 + 24) = v32 + 24;
*(_QWORD *)(v32 + 32) = v32 + 24;
*(_BYTE *)(v32 + 8) = 0;
*(_BYTE *)(v32 + 9) = v18 == 20;
*(_QWORD *)(v32 + 40) = a17;
*(_QWORD *)(v32 + 48) = a16;
if ( v38 != 0 && v37 != 0 )
memcpy(*(_QWORD *)(v32 + 16), v37, a4);
*(_QWORD *)(v22 + 48) = v32;
goto LABEL_7;
}
v32 = 0LL;
LABEL_14:
JS_FreeValue(a1, v22, v29);
js_free(a1, v32);
LODWORD(v22) = 0;
goto LABEL_15;
}
v31 = "invalid max array buffer length";
}
else
{
v31 = "invalid array buffer length";
}
v32 = 0LL;
JS_ThrowRangeError(a1, (long long)v31, v23, v24, v25, v26, a7, a8, a9, a10, v27, v28, a13, a14, v46);
goto LABEL_14;
}
LABEL_7:
v30 = v22 & 0xFFFFFFFF00000000LL;
return v30 | (unsigned int)v22;
}
|
js_array_buffer_constructor3:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV EBP,R9D
MOV R12,R8
MOV R13,RDI
MOV R15,qword ptr [RDI + 0x18]
TEST R8,R8
JZ 0x001359ba
CMP qword ptr [RSP + 0x50],0x0
JZ 0x001359ba
LEA RAX,[0x135bf5]
CMP qword ptr [RSP + 0x58],RAX
JZ 0x001359ba
CMP dword ptr [RSP + 0x68],0x0
JNZ 0x001359ba
LEA RSI,[0x18c507]
XOR EBX,EBX
MOV RDI,R13
XOR EAX,EAX
CALL 0x00120321
PUSH 0x6
POP R14
JMP 0x00135a3d
LAB_001359ba:
MOV qword ptr [RSP + 0x10],RCX
MOV RDI,R13
MOV ECX,EBP
CALL 0x0013400a
MOV RBX,RAX
MOV R14,RDX
CMP R14D,0x6
JNZ 0x001359e7
LAB_001359d5:
MOV RAX,-0x100000000
MOV RCX,RBX
AND RCX,RAX
JMP 0x00135a3f
LAB_001359e7:
CMP qword ptr [RSP + 0x10],0x7fffffff
JBE 0x001359fb
LEA RSI,[0x18c54b]
JMP 0x00135a11
LAB_001359fb:
TEST R12,R12
JZ 0x00135a56
CMP qword ptr [R12],0x7fffffff
JBE 0x00135a56
LEA RSI,[0x18c567]
LAB_00135a11:
XOR R15D,R15D
MOV RDI,R13
XOR EAX,EAX
CALL 0x0011e863
LAB_00135a1e:
MOV RDI,R13
MOV RSI,RBX
MOV RDX,R14
CALL 0x0011bbce
MOV RDI,R13
MOV RSI,R15
CALL 0x0011ae1e
PUSH 0x6
POP R14
XOR EBX,EBX
LAB_00135a3d:
XOR ECX,ECX
LAB_00135a3f:
MOV EAX,EBX
OR RAX,RCX
MOV RDX,R14
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00135a56:
PUSH 0x38
POP RSI
MOV RDI,R13
CALL 0x0011adc4
TEST RAX,RAX
JZ 0x00135a7d
MOV RDX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x8],RAX
MOV dword ptr [RAX],EDX
TEST R12,R12
JZ 0x00135a82
MOV EAX,dword ptr [R12]
JMP 0x00135a85
LAB_00135a7d:
XOR R15D,R15D
JMP 0x00135a1e
LAB_00135a82:
PUSH -0x1
POP RAX
LAB_00135a85:
MOV RSI,qword ptr [RSP + 0x50]
MOV EDI,dword ptr [RSP + 0x68]
MOV RCX,qword ptr [RSP + 0x8]
MOV dword ptr [RCX + 0x4],EAX
TEST EDI,EDI
JZ 0x00135b28
CMP EBP,0x14
JNZ 0x00135afc
MOV RAX,qword ptr [R15 + 0x160]
TEST RAX,RAX
JZ 0x00135afc
MOV ECX,EDX
TEST R12,R12
JZ 0x00135abd
MOV RCX,qword ptr [R12]
MOV RDX,RCX
LAB_00135abd:
MOV R12,RDX
MOV RDI,qword ptr [R15 + 0x178]
CMP ECX,0x2
PUSH 0x1
POP RSI
CMOVGE ESI,ECX
CALL RAX
MOV R15,qword ptr [RSP + 0x8]
MOV qword ptr [R15 + 0x10],RAX
TEST RAX,RAX
JZ 0x00135a1e
MOV RDI,RAX
XOR ESI,ESI
MOV RDX,R12
CALL 0x0010e390
MOV RSI,qword ptr [RSP + 0x50]
MOV EDI,dword ptr [RSP + 0x68]
JMP 0x00135b54
LAB_00135afc:
CMP EDX,0x1
MOV ESI,EDX
ADC ESI,0x0
MOV RDI,R13
CALL 0x0011adf1
MOV EDI,dword ptr [RSP + 0x68]
MOV RSI,qword ptr [RSP + 0x50]
MOV R15,qword ptr [RSP + 0x8]
MOV qword ptr [R15 + 0x10],RAX
TEST RAX,RAX
JNZ 0x00135b54
JMP 0x00135a1e
LAB_00135b28:
CMP EBP,0x14
JNZ 0x00135b4b
MOV RAX,qword ptr [R15 + 0x170]
TEST RAX,RAX
JZ 0x00135b4b
MOV RDI,qword ptr [R15 + 0x178]
CALL RAX
MOV EDI,dword ptr [RSP + 0x68]
MOV RSI,qword ptr [RSP + 0x50]
LAB_00135b4b:
MOV R15,qword ptr [RSP + 0x8]
MOV qword ptr [R15 + 0x10],RSI
LAB_00135b54:
TEST EDI,EDI
SETZ AL
TEST RSI,RSI
SETZ CL
MOV RDX,R15
ADD RDX,0x18
MOV qword ptr [R15 + 0x18],RDX
MOV qword ptr [R15 + 0x20],RDX
MOV byte ptr [R15 + 0x8],0x0
CMP EBP,0x14
SETZ byte ptr [R15 + 0x9]
MOV RDX,qword ptr [RSP + 0x60]
MOV qword ptr [R15 + 0x28],RDX
MOV RDX,qword ptr [RSP + 0x58]
MOV qword ptr [R15 + 0x30],RDX
OR CL,AL
JNZ 0x00135b9f
MOV RDI,qword ptr [R15 + 0x10]
MOV RDX,qword ptr [RSP + 0x10]
CALL 0x0010e630
LAB_00135b9f:
MOV qword ptr [RBX + 0x30],R15
JMP 0x001359d5
|
int1 [16]
js_array_buffer_constructor3
(long param_1,int8 param_2,int8 param_3,ulong param_4,ulong *param_5,
int param_6,void *param_7,code *param_8,int8 param_9,int param_10)
{
int iVar1;
int *piVar2;
void *__s;
long lVar3;
ulong uVar4;
int iVar5;
ulong __n;
char *pcVar6;
int1 auVar7 [16];
int1 auVar8 [16];
lVar3 = *(long *)(param_1 + 0x18);
if ((((param_5 == (ulong *)0x0) || (param_7 == (void *)0x0)) || (param_8 == js_array_buffer_free))
|| (param_10 != 0)) {
auVar7 = js_create_from_ctor(param_1,param_2,param_3,param_6);
uVar4 = auVar7._0_8_;
if (auVar7._8_4_ == 6) {
LAB_001359d5:
uVar4 = uVar4 & 0xffffffff00000000;
goto LAB_00135a3f;
}
if (param_4 < 0x80000000) {
if ((param_5 != (ulong *)0x0) && (0x7fffffff < *param_5)) {
pcVar6 = "invalid max array buffer length";
goto LAB_00135a11;
}
piVar2 = (int *)js_malloc(param_1,0x38);
if (piVar2 == (int *)0x0) {
piVar2 = (int *)0x0;
goto LAB_00135a1e;
}
iVar5 = (int)param_4;
*piVar2 = iVar5;
if (param_5 == (ulong *)0x0) {
iVar1 = -1;
}
else {
iVar1 = (int)*param_5;
}
piVar2[1] = iVar1;
if (param_10 == 0) {
if ((param_6 == 0x14) && (*(code **)(lVar3 + 0x170) != (code *)0x0)) {
(**(code **)(lVar3 + 0x170))(*(int8 *)(lVar3 + 0x178));
}
*(void **)(piVar2 + 4) = param_7;
LAB_00135b54:
*(int **)(piVar2 + 6) = piVar2 + 6;
*(int **)(piVar2 + 8) = piVar2 + 6;
*(int1 *)(piVar2 + 2) = 0;
*(bool *)((long)piVar2 + 9) = param_6 == 0x14;
*(int8 *)(piVar2 + 10) = param_9;
*(code **)(piVar2 + 0xc) = param_8;
if (param_7 != (void *)0x0 && param_10 != 0) {
memcpy(*(void **)(piVar2 + 4),param_7,param_4);
}
*(int **)(uVar4 + 0x30) = piVar2;
goto LAB_001359d5;
}
if ((param_6 == 0x14) && (*(code **)(lVar3 + 0x160) != (code *)0x0)) {
__n = param_4;
if (param_5 != (ulong *)0x0) {
__n = *param_5;
}
__s = (void *)(**(code **)(lVar3 + 0x160))(*(int8 *)(lVar3 + 0x178));
*(void **)(piVar2 + 4) = __s;
if (__s != (void *)0x0) {
memset(__s,0,__n);
goto LAB_00135b54;
}
}
else {
lVar3 = js_mallocz(param_1,iVar5 + (uint)(iVar5 == 0));
*(long *)(piVar2 + 4) = lVar3;
if (lVar3 != 0) goto LAB_00135b54;
}
}
else {
pcVar6 = "invalid array buffer length";
LAB_00135a11:
piVar2 = (int *)0x0;
JS_ThrowRangeError(param_1,pcVar6);
}
LAB_00135a1e:
JS_FreeValue(param_1,uVar4,auVar7._8_8_);
js_free(param_1,piVar2);
}
else {
JS_ThrowInternalError
(param_1,"resizable ArrayBuffers not supported for externally managed buffers");
}
auVar7 = ZEXT816(6) << 0x40;
uVar4 = 0;
LAB_00135a3f:
auVar8._0_8_ = auVar7._0_8_ & 0xffffffff | uVar4;
auVar8._8_8_ = auVar7._8_8_;
return auVar8;
}
|
|
7,609 |
std::pair<bool, 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::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::handle_value<std::nullptr_t>(std::nullptr_t&&, bool)
|
monkey531[P]llama/common/json.hpp
|
std::pair<bool, BasicJsonType*> handle_value(Value&& v, const bool skip_callback = false)
{
JSON_ASSERT(!keep_stack.empty());
// do not handle this value if we know it would be added to a discarded
// container
if (!keep_stack.back())
{
return {false, nullptr};
}
// create value
auto value = BasicJsonType(std::forward<Value>(v));
// check callback
const bool keep = skip_callback || callback(static_cast<int>(ref_stack.size()), parse_event_t::value, value);
// do not handle this value if we just learnt it shall be discarded
if (!keep)
{
return {false, nullptr};
}
if (ref_stack.empty())
{
root = std::move(value);
return {true, & root};
}
// skip this value if we already decided to skip the parent
// (https://github.com/nlohmann/json/issues/971#issuecomment-413678360)
if (!ref_stack.back())
{
return {false, nullptr};
}
// we now only expect arrays and objects
JSON_ASSERT(ref_stack.back()->is_array() || ref_stack.back()->is_object());
// array
if (ref_stack.back()->is_array())
{
ref_stack.back()->m_data.m_value.array->emplace_back(std::move(value));
return {true, & (ref_stack.back()->m_data.m_value.array->back())};
}
// object
JSON_ASSERT(ref_stack.back()->is_object());
// check if we should store an element for the current key
JSON_ASSERT(!key_keep_stack.empty());
const bool store_element = key_keep_stack.back();
key_keep_stack.pop_back();
if (!store_element)
{
return {false, nullptr};
}
JSON_ASSERT(object_element);
*object_element = std::move(value);
return {true, object_element};
}
|
O0
|
cpp
|
std::pair<bool, 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::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::handle_value<std::nullptr_t>(std::nullptr_t&&, bool):
subq $0x148, %rsp # imm = 0x148
movb %dl, %al
movq %rdi, 0x130(%rsp)
movq %rsi, 0x128(%rsp)
andb $0x1, %al
movb %al, 0x127(%rsp)
movq 0x130(%rsp), %rdi
movq %rdi, 0x40(%rsp)
addq $0x20, %rdi
callq 0xbbc90
testb $0x1, %al
jne 0xc6a1e
jmp 0xc6a3f
leaq 0x150fb3(%rip), %rdi # 0x2179d8
movl $0x1c28, %esi # imm = 0x1C28
leaq 0x14a699(%rip), %rdx # 0x2110ca
leaq 0x151f20(%rip), %rcx # 0x218958
movb $0x0, %al
callq 0x5bf60
movq 0x40(%rsp), %rdi
addq $0x20, %rdi
callq 0xbbd10
movq %rax, 0x110(%rsp)
movq %rdx, 0x118(%rsp)
leaq 0x110(%rsp), %rdi
callq 0xb9d00
xorb $-0x1, %al
testb $0x1, %al
jne 0xc6a72
jmp 0xc6aa8
movb $0x0, 0x10f(%rsp)
movq $0x0, 0x100(%rsp)
leaq 0x138(%rsp), %rdi
leaq 0x10f(%rsp), %rsi
leaq 0x100(%rsp), %rdx
callq 0xbc820
jmp 0xc6f11
movq 0x128(%rsp), %rsi
leaq 0xf0(%rsp), %rdi
callq 0xc6f40
movb $0x1, %al
testb $0x1, 0x127(%rsp)
movb %al, 0x3f(%rsp)
jne 0xc6b10
movq 0x40(%rsp), %rdi
movq %rdi, %rax
subq $-0x80, %rax
movq %rax, 0x30(%rsp)
addq $0x8, %rdi
callq 0xbbe10
movq 0x30(%rsp), %rdi
movl %eax, %esi
movl $0x5, %edx
leaq 0xf0(%rsp), %rcx
callq 0xbbdb0
movb %al, 0x3e(%rsp)
jmp 0xc6b06
movb 0x3e(%rsp), %al
movb %al, 0x3f(%rsp)
jmp 0xc6b10
movb 0x3f(%rsp), %al
andb $0x1, %al
movb %al, 0xef(%rsp)
testb $0x1, 0xef(%rsp)
jne 0xc6b90
movb $0x0, 0xdb(%rsp)
movq $0x0, 0xd0(%rsp)
leaq 0x138(%rsp), %rdi
leaq 0xdb(%rsp), %rsi
leaq 0xd0(%rsp), %rdx
callq 0xbc820
jmp 0xc6b5a
movl $0x1, 0xcc(%rsp)
jmp 0xc6f04
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe0(%rsp)
movl %eax, 0xdc(%rsp)
leaq 0xf0(%rsp), %rdi
callq 0xadff0
jmp 0xc6f28
movq 0x40(%rsp), %rdi
addq $0x8, %rdi
callq 0xbc850
testb $0x1, %al
jne 0xc6ba4
jmp 0xc6c21
leaq 0xb8(%rsp), %rdi
movq %rdi, 0x28(%rsp)
leaq 0xf0(%rsp), %rsi
callq 0xbc8a0
movq 0x28(%rsp), %rsi
movq 0x40(%rsp), %rax
movq (%rax), %rdi
callq 0xb6830
movq 0x28(%rsp), %rdi
callq 0xadff0
movq 0x40(%rsp), %rax
movb $0x1, 0xb7(%rsp)
movq (%rax), %rax
movq %rax, 0xa8(%rsp)
leaq 0x138(%rsp), %rdi
leaq 0xb7(%rsp), %rsi
leaq 0xa8(%rsp), %rdx
callq 0xbc920
jmp 0xc6c11
movl $0x1, 0xcc(%rsp)
jmp 0xc6f04
movq 0x40(%rsp), %rdi
addq $0x8, %rdi
callq 0xbc400
cmpq $0x0, (%rax)
jne 0xc6c78
movb $0x0, 0xa7(%rsp)
movq $0x0, 0x98(%rsp)
leaq 0x138(%rsp), %rdi
leaq 0xa7(%rsp), %rsi
leaq 0x98(%rsp), %rdx
callq 0xbc820
jmp 0xc6c68
movl $0x1, 0xcc(%rsp)
jmp 0xc6f04
movq 0x40(%rsp), %rdi
addq $0x8, %rdi
callq 0xbc400
movq (%rax), %rdi
callq 0xbc950
testb $0x1, %al
jne 0xc6ccf
movq 0x40(%rsp), %rdi
addq $0x8, %rdi
callq 0xbc400
movq (%rax), %rdi
callq 0xbc970
testb $0x1, %al
jne 0xc6ccf
leaq 0x150d25(%rip), %rdi # 0x2179d8
leaq 0x14a410(%rip), %rdx # 0x2110ca
leaq 0x151cab(%rip), %rcx # 0x21896c
xorl %eax, %eax
movl $0x1c4b, %esi # imm = 0x1C4B
callq 0x5bf60
jmp 0xc6ccf
movq 0x40(%rsp), %rdi
addq $0x8, %rdi
callq 0xbc400
movq (%rax), %rdi
callq 0xbc950
testb $0x1, %al
jne 0xc6ceb
jmp 0xc6d68
movq 0x40(%rsp), %rdi
addq $0x8, %rdi
callq 0xbc400
movq (%rax), %rax
movq 0x8(%rax), %rdi
leaq 0xf0(%rsp), %rsi
callq 0xbc990
jmp 0xc6d0f
movq 0x40(%rsp), %rdi
movb $0x1, 0x97(%rsp)
addq $0x8, %rdi
callq 0xbc400
movq (%rax), %rax
movq 0x8(%rax), %rdi
callq 0xbca10
movq %rax, 0x88(%rsp)
leaq 0x138(%rsp), %rdi
leaq 0x97(%rsp), %rsi
leaq 0x88(%rsp), %rdx
callq 0xbc920
jmp 0xc6d58
movl $0x1, 0xcc(%rsp)
jmp 0xc6f04
movq 0x40(%rsp), %rdi
addq $0x8, %rdi
callq 0xbc400
movq (%rax), %rdi
callq 0xbc970
testb $0x1, %al
jne 0xc6da5
leaq 0x150c4f(%rip), %rdi # 0x2179d8
leaq 0x14a33a(%rip), %rdx # 0x2110ca
leaq 0x151bf5(%rip), %rcx # 0x21898c
xorl %eax, %eax
movl $0x1c55, %esi # imm = 0x1C55
callq 0x5bf60
jmp 0xc6da5
movq 0x40(%rsp), %rdi
addq $0x48, %rdi
callq 0xbbc90
testb $0x1, %al
jne 0xc6db9
jmp 0xc6ddc
leaq 0x150c18(%rip), %rdi # 0x2179d8
leaq 0x14a303(%rip), %rdx # 0x2110ca
leaq 0x151bdc(%rip), %rcx # 0x2189aa
xorl %eax, %eax
movl $0x1c57, %esi # imm = 0x1C57
callq 0x5bf60
jmp 0xc6ddc
movq 0x40(%rsp), %rdi
addq $0x48, %rdi
callq 0xbbd10
movq %rdx, 0x18(%rsp)
movq %rax, 0x20(%rsp)
jmp 0xc6df6
movq 0x18(%rsp), %rax
movq 0x20(%rsp), %rcx
movq %rcx, 0x70(%rsp)
movq %rax, 0x78(%rsp)
leaq 0x70(%rsp), %rdi
callq 0xb9d00
movq 0x40(%rsp), %rdi
movb %al, 0x87(%rsp)
addq $0x48, %rdi
callq 0xbbd90
jmp 0xc6e2b
testb $0x1, 0x87(%rsp)
jne 0xc6e6c
movb $0x0, 0x6f(%rsp)
movq $0x0, 0x60(%rsp)
leaq 0x138(%rsp), %rdi
leaq 0x6f(%rsp), %rsi
leaq 0x60(%rsp), %rdx
callq 0xbc820
jmp 0xc6e5c
movl $0x1, 0xcc(%rsp)
jmp 0xc6f04
movq 0x40(%rsp), %rax
cmpq $0x0, 0x70(%rax)
jne 0xc6e9b
leaq 0x150b59(%rip), %rdi # 0x2179d8
leaq 0x14a244(%rip), %rdx # 0x2110ca
leaq 0x151b35(%rip), %rcx # 0x2189c2
xorl %eax, %eax
movl $0x1c60, %esi # imm = 0x1C60
callq 0x5bf60
jmp 0xc6e9b
leaq 0x50(%rsp), %rdi
movq %rdi, 0x8(%rsp)
leaq 0xf0(%rsp), %rsi
callq 0xbc8a0
movq 0x40(%rsp), %rax
movq 0x8(%rsp), %rsi
movq %rax, %rcx
addq $0x70, %rcx
movq %rcx, 0x10(%rsp)
movq 0x70(%rax), %rdi
callq 0xb6830
movq 0x8(%rsp), %rdi
callq 0xadff0
movq 0x10(%rsp), %rdx
movb $0x1, 0x4f(%rsp)
leaq 0x138(%rsp), %rdi
leaq 0x4f(%rsp), %rsi
callq 0xbca50
jmp 0xc6ef9
movl $0x1, 0xcc(%rsp)
leaq 0xf0(%rsp), %rdi
callq 0xadff0
movb 0x138(%rsp), %al
movq 0x140(%rsp), %rdx
addq $0x148, %rsp # imm = 0x148
retq
movq 0xe0(%rsp), %rdi
callq 0x5bc20
nopw %cs:(%rax,%rax)
nop
|
_ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12handle_valueIRlEESt4pairIbPSF_EOT_b:
sub rsp, 148h
mov al, dl
mov [rsp+148h+var_18], rdi
mov [rsp+148h+var_20], rsi
and al, 1
mov [rsp+148h+var_21], al
mov rdi, [rsp+148h+var_18]
mov [rsp+148h+var_108], rdi
add rdi, 20h ; ' '
call _ZNKSt6vectorIbSaIbEE5emptyEv; std::vector<bool>::empty(void)
test al, 1
jnz short loc_C6A1E
jmp short loc_C6A3F
loc_C6A1E:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
mov esi, 1C28h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKeepStackEmpty; "!keep_stack.empty()"
mov al, 0
call _ggml_abort
loc_C6A3F:
mov rdi, [rsp+148h+var_108]
add rdi, 20h ; ' '
call _ZNSt6vectorIbSaIbEE4backEv; std::vector<bool>::back(void)
mov [rsp+148h+var_38], rax
mov [rsp+148h+var_30], rdx
lea rdi, [rsp+148h+var_38]
call _ZNKSt14_Bit_referencecvbEv; std::_Bit_reference::operator bool(void)
xor al, 0FFh
test al, 1
jnz short loc_C6A72
jmp short loc_C6AA8
loc_C6A72:
mov [rsp+148h+var_39], 0
mov [rsp+148h+var_48], 0
lea rdi, [rsp+148h+var_10]
lea rsi, [rsp+148h+var_39]
lea rdx, [rsp+148h+var_48]
call _ZNSt4pairIbPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEC2IbDnTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISJ_SK_EEEbE4typeELb1EEEOSJ_OSK_
jmp loc_C6F11
loc_C6AA8:
mov rsi, [rsp+148h+var_20]
lea rdi, [rsp+148h+var_58]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRllTnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SH_EE5valueEiE4typeELi0EEEOT_
mov al, 1
test [rsp+148h+var_21], 1
mov [rsp+148h+var_109], al
jnz short loc_C6B10
mov rdi, [rsp+148h+var_108]
mov rax, rdi
sub rax, 0FFFFFFFFFFFFFF80h
mov [rsp+148h+var_118], rax
add rdi, 8
call _ZNKSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4sizeEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *>>::size(void)
mov rdi, [rsp+148h+var_118]
mov esi, eax
mov edx, 5
lea rcx, [rsp+148h+var_58]
call _ZNKSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEclEiS3_SH_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)>::operator()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)
mov [rsp+148h+var_10A], al
jmp short $+2
loc_C6B06:
mov al, [rsp+148h+var_10A]
mov [rsp+148h+var_109], al
jmp short $+2
loc_C6B10:
mov al, [rsp+148h+var_109]
and al, 1
mov [rsp+148h+var_59], al
test [rsp+148h+var_59], 1
jnz short loc_C6B90
mov [rsp+148h+var_6D], 0
mov [rsp+148h+var_78], 0
lea rdi, [rsp+148h+var_10]
lea rsi, [rsp+148h+var_6D]
lea rdx, [rsp+148h+var_78]
call _ZNSt4pairIbPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEC2IbDnTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISJ_SK_EEEbE4typeELb1EEEOSJ_OSK_
jmp short $+2
loc_C6B5A:
mov [rsp+148h+var_7C], 1
jmp loc_C6F04
mov rcx, rax
mov eax, edx
mov [rsp+arg_D8], rcx
mov [rsp+arg_D4], eax
lea rdi, [rsp+arg_E8]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
jmp loc_C6F28
loc_C6B90:
mov rdi, [rsp+148h+var_108]
add rdi, 8
call _ZNKSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE5emptyEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *>>::empty(void)
test al, 1
jnz short loc_C6BA4
jmp short loc_C6C21
loc_C6BA4:
lea rdi, [rsp+148h+var_90]
mov [rsp+148h+var_120], rdi
lea rsi, [rsp+148h+var_58]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2EOSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&&)
mov rsi, [rsp+148h+var_120]
mov rax, [rsp+148h+var_108]
mov rdi, [rax]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>)
mov rdi, [rsp+148h+var_120]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
mov rax, [rsp+148h+var_108]
mov [rsp+148h+var_91], 1
mov rax, [rax]
mov [rsp+148h+var_A0], rax
lea rdi, [rsp+148h+var_10]
lea rsi, [rsp+148h+var_91]
lea rdx, [rsp+148h+var_A0]
call _ZNSt4pairIbPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEC2IbSF_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISJ_SK_EEEbE4typeELb1EEEOSJ_OSK_
jmp short $+2
loc_C6C11:
mov [rsp+148h+var_7C], 1
jmp loc_C6F04
loc_C6C21:
mov rdi, [rsp+148h+var_108]
add rdi, 8
call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4backEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *>>::back(void)
cmp qword ptr [rax], 0
jnz short loc_C6C78
mov [rsp+148h+var_A1], 0
mov [rsp+148h+var_B0], 0
lea rdi, [rsp+148h+var_10]
lea rsi, [rsp+148h+var_A1]
lea rdx, [rsp+148h+var_B0]
call _ZNSt4pairIbPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEC2IbDnTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISJ_SK_EEEbE4typeELb1EEEOSJ_OSK_
jmp short $+2
loc_C6C68:
mov [rsp+148h+var_7C], 1
jmp loc_C6F04
loc_C6C78:
mov rdi, [rsp+148h+var_108]
add rdi, 8
call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4backEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *>>::back(void)
mov rdi, [rax]
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8is_arrayEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::is_array(void)
test al, 1
jnz short loc_C6CCF
mov rdi, [rsp+148h+var_108]
add rdi, 8
call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4backEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *>>::back(void)
mov rdi, [rax]
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9is_objectEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::is_object(void)
test al, 1
jnz short loc_C6CCF
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aRefStackBackIs; "ref_stack.back()->is_array() || ref_sta"...
xor eax, eax
mov esi, 1C4Bh
call _ggml_abort
jmp short $+2
loc_C6CCF:
mov rdi, [rsp+148h+var_108]
add rdi, 8
call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4backEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *>>::back(void)
mov rdi, [rax]
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8is_arrayEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::is_array(void)
test al, 1
jnz short loc_C6CEB
jmp short loc_C6D68
loc_C6CEB:
mov rdi, [rsp+148h+var_108]
add rdi, 8
call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4backEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *>>::back(void)
mov rax, [rax]
mov rdi, [rax+8]
lea rsi, [rsp+148h+var_58]
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJSD_EEERSD_DpOT_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &&)
jmp short $+2
loc_C6D0F:
mov rdi, [rsp+148h+var_108]
mov [rsp+148h+var_B1], 1
add rdi, 8
call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4backEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *>>::back(void)
mov rax, [rax]
mov rdi, [rax+8]
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE4backEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::back(void)
mov [rsp+148h+var_C0], rax
lea rdi, [rsp+148h+var_10]
lea rsi, [rsp+148h+var_B1]
lea rdx, [rsp+148h+var_C0]
call _ZNSt4pairIbPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEC2IbSF_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISJ_SK_EEEbE4typeELb1EEEOSJ_OSK_
jmp short $+2
loc_C6D58:
mov [rsp+148h+var_7C], 1
jmp loc_C6F04
loc_C6D68:
mov rdi, [rsp+148h+var_108]
add rdi, 8
call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4backEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *>>::back(void)
mov rdi, [rax]
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9is_objectEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::is_object(void)
test al, 1
jnz short loc_C6DA5
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aRefStackBackIs+20h; "ref_stack.back()->is_object()"
xor eax, eax
mov esi, 1C55h
call _ggml_abort
jmp short $+2
loc_C6DA5:
mov rdi, [rsp+148h+var_108]
add rdi, 48h ; 'H'
call _ZNKSt6vectorIbSaIbEE5emptyEv; std::vector<bool>::empty(void)
test al, 1
jnz short loc_C6DB9
jmp short loc_C6DDC
loc_C6DB9:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKeyKeepStackEm; "!key_keep_stack.empty()"
xor eax, eax
mov esi, 1C57h
call _ggml_abort
jmp short $+2
loc_C6DDC:
mov rdi, [rsp+148h+var_108]
add rdi, 48h ; 'H'
call _ZNSt6vectorIbSaIbEE4backEv; std::vector<bool>::back(void)
mov [rsp+148h+var_130], rdx
mov [rsp+148h+var_128], rax
jmp short $+2
loc_C6DF6:
mov rax, [rsp+148h+var_130]
mov rcx, [rsp+148h+var_128]
mov [rsp+148h+var_D8], rcx
mov [rsp+148h+var_D0], rax
lea rdi, [rsp+148h+var_D8]
call _ZNKSt14_Bit_referencecvbEv; std::_Bit_reference::operator bool(void)
mov rdi, [rsp+148h+var_108]
mov [rsp+148h+var_C1], al
add rdi, 48h ; 'H'
call _ZNSt6vectorIbSaIbEE8pop_backEv; std::vector<bool>::pop_back(void)
jmp short $+2
loc_C6E2B:
test [rsp+148h+var_C1], 1
jnz short loc_C6E6C
mov [rsp+148h+var_D9], 0
mov [rsp+148h+var_E8], 0
lea rdi, [rsp+148h+var_10]
lea rsi, [rsp+148h+var_D9]
lea rdx, [rsp+148h+var_E8]
call _ZNSt4pairIbPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEC2IbDnTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISJ_SK_EEEbE4typeELb1EEEOSJ_OSK_
jmp short $+2
loc_C6E5C:
mov [rsp+148h+var_7C], 1
jmp loc_C6F04
loc_C6E6C:
mov rax, [rsp+148h+var_108]
cmp qword ptr [rax+70h], 0
jnz short loc_C6E9B
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aObjectElement; "object_element"
xor eax, eax
mov esi, 1C60h
call _ggml_abort
jmp short $+2
loc_C6E9B:
lea rdi, [rsp+148h+var_F8]
mov [rsp+148h+var_140], rdi
lea rsi, [rsp+148h+var_58]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2EOSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&&)
mov rax, [rsp+148h+var_108]
mov rsi, [rsp+148h+var_140]
mov rcx, rax
add rcx, 70h ; 'p'
mov [rsp+148h+var_138], rcx
mov rdi, [rax+70h]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>)
mov rdi, [rsp+148h+var_140]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
mov rdx, [rsp+148h+var_138]
mov [rsp+148h+var_F9], 1
lea rdi, [rsp+148h+var_10]
lea rsi, [rsp+148h+var_F9]
call _ZNSt4pairIbPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEC2IbRSF_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISK_SL_EEEbE4typeELb1EEEOSK_OSL_
jmp short $+2
loc_C6EF9:
mov [rsp+148h+var_7C], 1
loc_C6F04:
lea rdi, [rsp+148h+var_58]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
loc_C6F11:
mov al, [rsp+148h+var_10]
mov rdx, [rsp+148h+var_8]
add rsp, 148h
retn
loc_C6F28:
mov rdi, [rsp+arg_D8]
call __Unwind_Resume
|
char nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::handle_value<long &>(
long long a1,
long long a2,
char a3)
{
long long v3; // rdx
int v4; // eax
_BYTE **v5; // rax
_BYTE **v6; // rax
_BYTE **v7; // rax
long long v8; // rax
long long v9; // rax
_BYTE **v10; // rax
long long v11; // rdx
char v13; // [rsp+3Fh] [rbp-109h]
char v14; // [rsp+4Fh] [rbp-F9h] BYREF
__int128 v15; // [rsp+50h] [rbp-F8h] BYREF
long long v16; // [rsp+60h] [rbp-E8h]
char v17; // [rsp+6Fh] [rbp-D9h] BYREF
_QWORD v18[2]; // [rsp+70h] [rbp-D8h] BYREF
bool v19; // [rsp+87h] [rbp-C1h]
long long v20; // [rsp+88h] [rbp-C0h] BYREF
char v21; // [rsp+97h] [rbp-B1h] BYREF
long long v22; // [rsp+98h] [rbp-B0h]
char v23; // [rsp+A7h] [rbp-A1h] BYREF
long long v24; // [rsp+A8h] [rbp-A0h] BYREF
char v25; // [rsp+B7h] [rbp-91h] BYREF
__int128 v26; // [rsp+B8h] [rbp-90h] BYREF
int v27; // [rsp+CCh] [rbp-7Ch]
long long v28; // [rsp+D0h] [rbp-78h]
_BYTE v29[21]; // [rsp+DBh] [rbp-6Dh] BYREF
_BYTE v30[16]; // [rsp+F0h] [rbp-58h] BYREF
long long v31; // [rsp+100h] [rbp-48h]
char v32; // [rsp+10Fh] [rbp-39h] BYREF
_QWORD v33[2]; // [rsp+110h] [rbp-38h] BYREF
char v34; // [rsp+127h] [rbp-21h]
long long v35; // [rsp+128h] [rbp-20h]
long long v36; // [rsp+130h] [rbp-18h]
_BYTE v37[8]; // [rsp+138h] [rbp-10h] BYREF
v36 = a1;
v35 = a2;
v34 = a3 & 1;
if ( (std::vector<bool>::empty((unsigned long long **)(a1 + 32)) & 1) != 0 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
7208LL,
"GGML_ASSERT(%s) failed",
"!keep_stack.empty()");
v33[0] = std::vector<bool>::back(a1 + 32);
v33[1] = v3;
if ( std::_Bit_reference::operator bool((long long)v33) )
{
ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRllTnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SH_EE5valueEiE4typeELi0EEEOT_(
v30,
v35);
v13 = 1;
if ( (v34 & 1) == 0 )
{
v4 = std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *>>::size((_QWORD *)(a1 + 8));
v13 = std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &)>::operator()(
(std::_Function_base *)(a1 + 128),
v4,
5,
(long long)v30);
}
v29[20] = v13 & 1;
if ( (v13 & 1) != 0 )
{
if ( (std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *>>::empty(a1 + 8) & 1) != 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>::basic_json(
&v26,
(long long)v30);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=(
*(_QWORD *)a1,
(long long)&v26);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)&v26);
v25 = 1;
v24 = *(_QWORD *)a1;
ZNSt4pairIbPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEC2IbSF_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISJ_SK_EEEbE4typeELb1EEEOSJ_OSK_(
(long long)v37,
&v25,
&v24);
v27 = 1;
}
else if ( *(_QWORD *)std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *>>::back(a1 + 8) )
{
v5 = (_BYTE **)std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *>>::back(a1 + 8);
if ( !nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::is_array(*v5) )
{
v6 = (_BYTE **)std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *>>::back(a1 + 8);
if ( !nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::is_object(*v6) )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
7243LL,
"GGML_ASSERT(%s) failed",
"ref_stack.back()->is_array() || ref_stack.back()->is_object()");
}
v7 = (_BYTE **)std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *>>::back(a1 + 8);
if ( nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::is_array(*v7) )
{
v8 = std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *>>::back(a1 + 8);
std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
*(_QWORD *)(*(_QWORD *)v8 + 8LL),
(long long)v30);
v21 = 1;
v9 = std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *>>::back(a1 + 8);
v20 = std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::back(*(_QWORD *)(*(_QWORD *)v9 + 8LL));
ZNSt4pairIbPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEC2IbSF_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISJ_SK_EEEbE4typeELb1EEEOSJ_OSK_(
(long long)v37,
&v21,
&v20);
v27 = 1;
}
else
{
v10 = (_BYTE **)std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *>>::back(a1 + 8);
if ( !nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::is_object(*v10) )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
7253LL,
"GGML_ASSERT(%s) failed",
"ref_stack.back()->is_object()");
if ( (std::vector<bool>::empty((unsigned long long **)(a1 + 72)) & 1) != 0 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
7255LL,
"GGML_ASSERT(%s) failed",
"!key_keep_stack.empty()");
v18[0] = std::vector<bool>::back(a1 + 72);
v18[1] = v11;
v19 = std::_Bit_reference::operator bool((long long)v18);
std::vector<bool>::pop_back(a1 + 72);
if ( v19 )
{
if ( !*(_QWORD *)(a1 + 112) )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
7264LL,
"GGML_ASSERT(%s) failed",
"object_element");
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
&v15,
(long long)v30);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=(
*(_QWORD *)(a1 + 112),
(long long)&v15);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)&v15);
v14 = 1;
ZNSt4pairIbPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEC2IbRSF_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISK_SL_EEEbE4typeELb1EEEOSK_OSL_(
(long long)v37,
&v14,
(_QWORD *)(a1 + 112));
v27 = 1;
}
else
{
v17 = 0;
v16 = 0LL;
ZNSt4pairIbPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEC2IbDnTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISJ_SK_EEEbE4typeELb1EEEOSJ_OSK_(
(long long)v37,
&v17);
v27 = 1;
}
}
}
else
{
v23 = 0;
v22 = 0LL;
ZNSt4pairIbPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEC2IbDnTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISJ_SK_EEEbE4typeELb1EEEOSJ_OSK_(
(long long)v37,
&v23);
v27 = 1;
}
}
else
{
v29[0] = 0;
v28 = 0LL;
ZNSt4pairIbPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEC2IbDnTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISJ_SK_EEEbE4typeELb1EEEOSJ_OSK_(
(long long)v37,
v29);
v27 = 1;
}
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)v30);
}
else
{
v32 = 0;
v31 = 0LL;
ZNSt4pairIbPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEC2IbDnTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISJ_SK_EEEbE4typeELb1EEEOSJ_OSK_(
(long long)v37,
&v32);
}
return v37[0];
}
|
handle_value<long&>:
SUB RSP,0x148
MOV AL,DL
MOV qword ptr [RSP + 0x130],RDI
MOV qword ptr [RSP + 0x128],RSI
AND AL,0x1
MOV byte ptr [RSP + 0x127],AL
MOV RDI,qword ptr [RSP + 0x130]
MOV qword ptr [RSP + 0x40],RDI
ADD RDI,0x20
CALL 0x001bbc90
TEST AL,0x1
JNZ 0x001c6a1e
JMP 0x001c6a3f
LAB_001c6a1e:
LEA RDI,[0x3179d8]
MOV ESI,0x1c28
LEA RDX,[0x3110ca]
LEA RCX,[0x318958]
MOV AL,0x0
CALL 0x0015bf60
LAB_001c6a3f:
MOV RDI,qword ptr [RSP + 0x40]
ADD RDI,0x20
CALL 0x001bbd10
MOV qword ptr [RSP + 0x110],RAX
MOV qword ptr [RSP + 0x118],RDX
LEA RDI,[RSP + 0x110]
CALL 0x001b9d00
XOR AL,0xff
TEST AL,0x1
JNZ 0x001c6a72
JMP 0x001c6aa8
LAB_001c6a72:
MOV byte ptr [RSP + 0x10f],0x0
MOV qword ptr [RSP + 0x100],0x0
LEA RDI,[RSP + 0x138]
LEA RSI,[RSP + 0x10f]
LEA RDX,[RSP + 0x100]
CALL 0x001bc820
JMP 0x001c6f11
LAB_001c6aa8:
MOV RSI,qword ptr [RSP + 0x128]
LEA RDI,[RSP + 0xf0]
CALL 0x001c6f40
MOV AL,0x1
TEST byte ptr [RSP + 0x127],0x1
MOV byte ptr [RSP + 0x3f],AL
JNZ 0x001c6b10
MOV RDI,qword ptr [RSP + 0x40]
MOV RAX,RDI
SUB RAX,-0x80
MOV qword ptr [RSP + 0x30],RAX
ADD RDI,0x8
CALL 0x001bbe10
MOV RDI,qword ptr [RSP + 0x30]
MOV ESI,EAX
LAB_001c6aee:
MOV EDX,0x5
LEA RCX,[RSP + 0xf0]
CALL 0x001bbdb0
MOV byte ptr [RSP + 0x3e],AL
JMP 0x001c6b06
LAB_001c6b06:
MOV AL,byte ptr [RSP + 0x3e]
MOV byte ptr [RSP + 0x3f],AL
JMP 0x001c6b10
LAB_001c6b10:
MOV AL,byte ptr [RSP + 0x3f]
AND AL,0x1
MOV byte ptr [RSP + 0xef],AL
TEST byte ptr [RSP + 0xef],0x1
JNZ 0x001c6b90
MOV byte ptr [RSP + 0xdb],0x0
MOV qword ptr [RSP + 0xd0],0x0
LEA RDI,[RSP + 0x138]
LEA RSI,[RSP + 0xdb]
LEA RDX,[RSP + 0xd0]
CALL 0x001bc820
JMP 0x001c6b5a
LAB_001c6b5a:
MOV dword ptr [RSP + 0xcc],0x1
JMP 0x001c6f04
LAB_001c6b90:
MOV RDI,qword ptr [RSP + 0x40]
ADD RDI,0x8
CALL 0x001bc850
TEST AL,0x1
JNZ 0x001c6ba4
JMP 0x001c6c21
LAB_001c6ba4:
LEA RDI,[RSP + 0xb8]
MOV qword ptr [RSP + 0x28],RDI
LEA RSI,[RSP + 0xf0]
CALL 0x001bc8a0
MOV RSI,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RSP + 0x40]
MOV RDI,qword ptr [RAX]
CALL 0x001b6830
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x001adff0
MOV RAX,qword ptr [RSP + 0x40]
MOV byte ptr [RSP + 0xb7],0x1
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0xa8],RAX
LEA RDI,[RSP + 0x138]
LEA RSI,[RSP + 0xb7]
LEA RDX,[RSP + 0xa8]
CALL 0x001bc920
JMP 0x001c6c11
LAB_001c6c11:
MOV dword ptr [RSP + 0xcc],0x1
JMP 0x001c6f04
LAB_001c6c21:
MOV RDI,qword ptr [RSP + 0x40]
ADD RDI,0x8
CALL 0x001bc400
CMP qword ptr [RAX],0x0
JNZ 0x001c6c78
MOV byte ptr [RSP + 0xa7],0x0
MOV qword ptr [RSP + 0x98],0x0
LEA RDI,[RSP + 0x138]
LEA RSI,[RSP + 0xa7]
LEA RDX,[RSP + 0x98]
CALL 0x001bc820
JMP 0x001c6c68
LAB_001c6c68:
MOV dword ptr [RSP + 0xcc],0x1
JMP 0x001c6f04
LAB_001c6c78:
MOV RDI,qword ptr [RSP + 0x40]
ADD RDI,0x8
CALL 0x001bc400
MOV RDI,qword ptr [RAX]
CALL 0x001bc950
TEST AL,0x1
JNZ 0x001c6ccf
MOV RDI,qword ptr [RSP + 0x40]
ADD RDI,0x8
CALL 0x001bc400
MOV RDI,qword ptr [RAX]
CALL 0x001bc970
TEST AL,0x1
JNZ 0x001c6ccf
LEA RDI,[0x3179d8]
LEA RDX,[0x3110ca]
LEA RCX,[0x31896c]
XOR EAX,EAX
MOV ESI,0x1c4b
CALL 0x0015bf60
JMP 0x001c6ccf
LAB_001c6ccf:
MOV RDI,qword ptr [RSP + 0x40]
ADD RDI,0x8
CALL 0x001bc400
MOV RDI,qword ptr [RAX]
CALL 0x001bc950
TEST AL,0x1
JNZ 0x001c6ceb
JMP 0x001c6d68
LAB_001c6ceb:
MOV RDI,qword ptr [RSP + 0x40]
ADD RDI,0x8
CALL 0x001bc400
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RAX + 0x8]
LEA RSI,[RSP + 0xf0]
CALL 0x001bc990
JMP 0x001c6d0f
LAB_001c6d0f:
MOV RDI,qword ptr [RSP + 0x40]
MOV byte ptr [RSP + 0x97],0x1
ADD RDI,0x8
CALL 0x001bc400
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RAX + 0x8]
CALL 0x001bca10
MOV qword ptr [RSP + 0x88],RAX
LEA RDI,[RSP + 0x138]
LEA RSI,[RSP + 0x97]
LEA RDX,[RSP + 0x88]
CALL 0x001bc920
JMP 0x001c6d58
LAB_001c6d58:
MOV dword ptr [RSP + 0xcc],0x1
JMP 0x001c6f04
LAB_001c6d68:
MOV RDI,qword ptr [RSP + 0x40]
ADD RDI,0x8
CALL 0x001bc400
MOV RDI,qword ptr [RAX]
CALL 0x001bc970
TEST AL,0x1
JNZ 0x001c6da5
LEA RDI,[0x3179d8]
LEA RDX,[0x3110ca]
LEA RCX,[0x31898c]
XOR EAX,EAX
MOV ESI,0x1c55
CALL 0x0015bf60
JMP 0x001c6da5
LAB_001c6da5:
MOV RDI,qword ptr [RSP + 0x40]
ADD RDI,0x48
CALL 0x001bbc90
TEST AL,0x1
JNZ 0x001c6db9
JMP 0x001c6ddc
LAB_001c6db9:
LEA RDI,[0x3179d8]
LEA RDX,[0x3110ca]
LEA RCX,[0x3189aa]
XOR EAX,EAX
MOV ESI,0x1c57
CALL 0x0015bf60
JMP 0x001c6ddc
LAB_001c6ddc:
MOV RDI,qword ptr [RSP + 0x40]
ADD RDI,0x48
CALL 0x001bbd10
MOV qword ptr [RSP + 0x18],RDX
MOV qword ptr [RSP + 0x20],RAX
JMP 0x001c6df6
LAB_001c6df6:
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x70],RCX
MOV qword ptr [RSP + 0x78],RAX
LEA RDI,[RSP + 0x70]
CALL 0x001b9d00
MOV RDI,qword ptr [RSP + 0x40]
MOV byte ptr [RSP + 0x87],AL
ADD RDI,0x48
CALL 0x001bbd90
JMP 0x001c6e2b
LAB_001c6e2b:
TEST byte ptr [RSP + 0x87],0x1
JNZ 0x001c6e6c
MOV byte ptr [RSP + 0x6f],0x0
MOV qword ptr [RSP + 0x60],0x0
LEA RDI,[RSP + 0x138]
LEA RSI,[RSP + 0x6f]
LEA RDX,[RSP + 0x60]
CALL 0x001bc820
JMP 0x001c6e5c
LAB_001c6e5c:
MOV dword ptr [RSP + 0xcc],0x1
JMP 0x001c6f04
LAB_001c6e6c:
MOV RAX,qword ptr [RSP + 0x40]
CMP qword ptr [RAX + 0x70],0x0
JNZ 0x001c6e9b
LEA RDI,[0x3179d8]
LEA RDX,[0x3110ca]
LEA RCX,[0x3189c2]
XOR EAX,EAX
MOV ESI,0x1c60
CALL 0x0015bf60
JMP 0x001c6e9b
LAB_001c6e9b:
LEA RDI,[RSP + 0x50]
MOV qword ptr [RSP + 0x8],RDI
LEA RSI,[RSP + 0xf0]
CALL 0x001bc8a0
MOV RAX,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x8]
MOV RCX,RAX
ADD RCX,0x70
MOV qword ptr [RSP + 0x10],RCX
MOV RDI,qword ptr [RAX + 0x70]
CALL 0x001b6830
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x001adff0
MOV RDX,qword ptr [RSP + 0x10]
MOV byte ptr [RSP + 0x4f],0x1
LEA RDI,[RSP + 0x138]
LEA RSI,[RSP + 0x4f]
CALL 0x001bca50
LAB_001c6ef7:
JMP 0x001c6ef9
LAB_001c6ef9:
MOV dword ptr [RSP + 0xcc],0x1
LAB_001c6f04:
LEA RDI,[RSP + 0xf0]
CALL 0x001adff0
LAB_001c6f11:
MOV AL,byte ptr [RSP + 0x138]
MOV RDX,qword ptr [RSP + 0x140]
ADD RSP,0x148
RET
|
/* std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>*>
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >::handle_value<long&>(long&, bool) */
int1 [16] __thiscall
nlohmann::json_abi_v3_11_3::detail::
json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::handle_value<long&>
(json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this,long *param_1,bool param_2)
{
bool bVar1;
int4 uVar2;
ulong uVar3;
long *plVar4;
int8 *puVar5;
int8 uVar6;
int1 auVar7 [16];
byte local_109;
int1 local_f9;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
local_f8 [16];
int8 local_e8;
int1 local_d9;
int1 local_d8 [16];
byte local_c1;
int8 local_c0;
int1 local_b1;
int8 local_b0;
int1 local_a1;
int8 local_a0;
int1 local_91;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
local_90 [20];
int4 local_7c;
int8 local_78;
int1 local_6d [20];
byte local_59;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
local_58 [16];
int8 local_48;
int1 local_39;
_Bit_reference local_38 [23];
byte local_21;
long *local_20;
json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*local_18;
int1 local_10 [8];
int8 local_8;
local_21 = param_2;
local_20 = param_1;
local_18 = this;
uVar3 = std::vector<bool,std::allocator<bool>>::empty
((vector<bool,std::allocator<bool>> *)(this + 0x20));
if ((uVar3 & 1) != 0) {
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x1c28,
"GGML_ASSERT(%s) failed","!keep_stack.empty()");
}
local_38._0_16_ =
std::vector<bool,std::allocator<bool>>::back
((vector<bool,std::allocator<bool>> *)(this + 0x20));
bVar1 = std::_Bit_reference::operator_cast_to_bool(local_38);
if (((bVar1 ^ 0xffU) & 1) == 0) {
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRllTnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SH_EE5valueEiE4typeELi0EEEOT_
(local_58,local_20);
local_109 = 1;
if ((local_21 & 1) == 0) {
uVar2 = std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
::size((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
*)(this + 8));
/* try { // try from 001c6aee to 001c6ef6 has its CatchHandler @ 001c6b6a */
local_109 = std::
function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)>
::operator()((function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)>
*)(this + 0x80),uVar2,5,local_58);
}
local_59 = local_109 & 1;
if (local_59 == 0) {
local_6d[0] = 0;
local_78 = 0;
_ZNSt4pairIbPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEC2IbDnTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISJ_SK_EEEbE4typeELb1EEEOSJ_OSK_
(local_10,local_6d,&local_78);
}
else {
uVar3 = std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
::empty((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
*)(this + 8));
if ((uVar3 & 1) == 0) {
plVar4 = (long *)std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
::back((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
*)(this + 8));
if (*plVar4 == 0) {
local_a1 = 0;
local_b0 = 0;
_ZNSt4pairIbPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEC2IbDnTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISJ_SK_EEEbE4typeELb1EEEOSJ_OSK_
(local_10,&local_a1,&local_b0);
}
else {
puVar5 = (int8 *)
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
::back((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
*)(this + 8));
uVar3 = 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>
::is_array((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>
*)*puVar5);
if ((uVar3 & 1) == 0) {
puVar5 = (int8 *)
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
::back((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
*)(this + 8));
uVar3 = 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>
::is_object((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>
*)*puVar5);
if ((uVar3 & 1) == 0) {
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp"
,0x1c4b,"GGML_ASSERT(%s) failed",
"ref_stack.back()->is_array() || ref_stack.back()->is_object()");
}
}
puVar5 = (int8 *)
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
::back((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
*)(this + 8));
uVar3 = 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>
::is_array((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>
*)*puVar5);
if ((uVar3 & 1) == 0) {
puVar5 = (int8 *)
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
::back((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
*)(this + 8));
uVar3 = 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>
::is_object((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>
*)*puVar5);
if ((uVar3 & 1) == 0) {
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp"
,0x1c55,"GGML_ASSERT(%s) failed","ref_stack.back()->is_object()");
}
uVar3 = std::vector<bool,std::allocator<bool>>::empty
((vector<bool,std::allocator<bool>> *)(this + 0x48));
if ((uVar3 & 1) != 0) {
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp"
,0x1c57,"GGML_ASSERT(%s) failed","!key_keep_stack.empty()");
}
local_d8 = std::vector<bool,std::allocator<bool>>::back
((vector<bool,std::allocator<bool>> *)(this + 0x48));
local_c1 = std::_Bit_reference::operator_cast_to_bool((_Bit_reference *)local_d8);
std::vector<bool,std::allocator<bool>>::pop_back
((vector<bool,std::allocator<bool>> *)(this + 0x48));
if ((local_c1 & 1) == 0) {
local_d9 = 0;
local_e8 = 0;
_ZNSt4pairIbPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEC2IbDnTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISJ_SK_EEEbE4typeELb1EEEOSJ_OSK_
(local_10,&local_d9,&local_e8);
}
else {
if (*(long *)(this + 0x70) == 0) {
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp"
,0x1c60,"GGML_ASSERT(%s) failed","object_element");
}
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::basic_json(local_f8,local_58);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator=(*(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
**)(this + 0x70),local_f8);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::~basic_json(local_f8);
local_f9 = 1;
_ZNSt4pairIbPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEC2IbRSF_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISK_SL_EEEbE4typeELb1EEEOSK_OSL_
(local_10,&local_f9,this + 0x70);
}
}
else {
plVar4 = (long *)std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
::back((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
*)(this + 8));
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::
emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
**)(*plVar4 + 8),local_58);
local_b1 = 1;
plVar4 = (long *)std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
::back((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
*)(this + 8));
local_c0 = std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::back(*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
**)(*plVar4 + 8));
_ZNSt4pairIbPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEC2IbSF_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISJ_SK_EEEbE4typeELb1EEEOSJ_OSK_
(local_10,&local_b1,&local_c0);
}
}
}
else {
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::basic_json(local_90,local_58);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator=(*(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
**)this,local_90);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::~basic_json(local_90);
local_91 = 1;
local_a0 = *(int8 *)this;
_ZNSt4pairIbPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEC2IbSF_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISJ_SK_EEEbE4typeELb1EEEOSJ_OSK_
(local_10,&local_91,&local_a0);
}
}
local_7c = 1;
uVar6 = basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::~basic_json(local_58);
}
else {
local_39 = 0;
local_48 = 0;
uVar6 = _ZNSt4pairIbPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEC2IbDnTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISJ_SK_EEEbE4typeELb1EEEOSJ_OSK_
(local_10,&local_39,&local_48);
}
auVar7._1_7_ = (int7)((ulong)uVar6 >> 8);
auVar7[0] = local_10[0];
auVar7._8_8_ = local_8;
return auVar7;
}
|
|
7,610 |
std::pair<bool, 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::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::handle_value<std::nullptr_t>(std::nullptr_t&&, bool)
|
monkey531[P]llama/common/json.hpp
|
std::pair<bool, BasicJsonType*> handle_value(Value&& v, const bool skip_callback = false)
{
JSON_ASSERT(!keep_stack.empty());
// do not handle this value if we know it would be added to a discarded
// container
if (!keep_stack.back())
{
return {false, nullptr};
}
// create value
auto value = BasicJsonType(std::forward<Value>(v));
// check callback
const bool keep = skip_callback || callback(static_cast<int>(ref_stack.size()), parse_event_t::value, value);
// do not handle this value if we just learnt it shall be discarded
if (!keep)
{
return {false, nullptr};
}
if (ref_stack.empty())
{
root = std::move(value);
return {true, & root};
}
// skip this value if we already decided to skip the parent
// (https://github.com/nlohmann/json/issues/971#issuecomment-413678360)
if (!ref_stack.back())
{
return {false, nullptr};
}
// we now only expect arrays and objects
JSON_ASSERT(ref_stack.back()->is_array() || ref_stack.back()->is_object());
// array
if (ref_stack.back()->is_array())
{
ref_stack.back()->m_data.m_value.array->emplace_back(std::move(value));
return {true, & (ref_stack.back()->m_data.m_value.array->back())};
}
// object
JSON_ASSERT(ref_stack.back()->is_object());
// check if we should store an element for the current key
JSON_ASSERT(!key_keep_stack.empty());
const bool store_element = key_keep_stack.back();
key_keep_stack.pop_back();
if (!store_element)
{
return {false, nullptr};
}
JSON_ASSERT(object_element);
*object_element = std::move(value);
return {true, object_element};
}
|
O1
|
cpp
|
std::pair<bool, 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::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::handle_value<std::nullptr_t>(std::nullptr_t&&, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movl %edx, %ebp
movq %rdi, %rbx
movq 0x30(%rdi), %rax
movl 0x38(%rdi), %ecx
cmpq %rax, 0x20(%rdi)
sete %dl
testl %ecx, %ecx
sete %dil
andb %dl, %dil
cmpb $0x1, %dil
je 0x651a8
movl %ecx, %ecx
movabsq $-0x8000000000000000, %r15 # imm = 0x8000000000000000
leaq -0x1(%rcx), %rdx
addq $0x3e, %rcx
testq %rdx, %rdx
cmovnsq %rdx, %rcx
sarq $0x6, %rcx
leaq (%rax,%rcx,8), %rax
leaq 0x3f(%r15), %rcx
andq %rdx, %rcx
xorl %edi, %edi
cmpq %r15, %rcx
setbe %dil
movq -0x8(%rax,%rdi,8), %rax
btq %rdx, %rax
jae 0x6503b
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r14
movaps %xmm0, (%r14)
movq (%rsi), %rsi
movq %r14, %rdi
callq 0x65242
movq %r14, %rdi
movl $0x1, %esi
callq 0x5cc1e
testb %bpl, %bpl
jne 0x64fe8
movq 0x10(%rbx), %rax
subq 0x8(%rbx), %rax
shrq $0x3, %rax
movl %eax, 0xc(%rsp)
movb $0x5, 0xb(%rsp)
cmpq $0x0, 0x90(%rbx)
je 0x651c9
leaq 0x80(%rbx), %rdi
leaq 0xc(%rsp), %rsi
leaq 0xb(%rsp), %rdx
leaq 0x10(%rsp), %rcx
callq *0x98(%rbx)
testb %al, %al
je 0x6517c
movq 0x10(%rbx), %rax
cmpq %rax, 0x8(%rbx)
je 0x65045
movq -0x8(%rax), %rax
testq %rax, %rax
je 0x6517c
movzbl (%rax), %ecx
cmpl $0x1, %ecx
je 0x6509f
cmpl $0x2, %ecx
jne 0x651ce
movq 0x8(%rax), %rdi
leaq 0x10(%rsp), %rsi
callq 0x619de
movq 0x10(%rbx), %rax
movq -0x8(%rax), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %r14
addq $-0x10, %r14
jmp 0x65178
xorl %ebx, %ebx
xorl %r14d, %r14d
jmp 0x65198
leaq 0x10(%rsp), %r14
movaps (%r14), %xmm0
leaq 0x30(%rsp), %r15
movaps %xmm0, (%r15)
movq %r14, %rdi
xorl %esi, %esi
callq 0x5cc1e
movb $0x0, (%r14)
movq $0x0, 0x8(%r14)
movq %r15, %rdi
movl $0x1, %esi
callq 0x5cc1e
movq (%rbx), %rdi
movq %r15, %rsi
callq 0x5f548
movq %r15, %rdi
xorl %esi, %esi
callq 0x5cc1e
movq %r15, %rdi
callq 0x62398
movq (%rbx), %r14
jmp 0x65178
movq 0x58(%rbx), %rax
movl 0x60(%rbx), %ecx
cmpq %rax, 0x48(%rbx)
sete %dl
testl %ecx, %ecx
sete %sil
andb %dl, %sil
cmpb $0x1, %sil
je 0x651dc
movl %ecx, %esi
leaq -0x1(%rsi), %rcx
movq %rsi, %rdx
addq $0x3e, %rdx
testq %rcx, %rcx
cmovnsq %rcx, %rdx
sarq $0x6, %rdx
leaq (%rax,%rdx,8), %rdi
leaq 0x3f(%r15), %rdx
andq %rcx, %rdx
xorl %r8d, %r8d
cmpq %r15, %rdx
setbe %r8b
movl $0x1, %edx
shlq %cl, %rdx
andq -0x8(%rdi,%r8,8), %rdx
subl $0x1, %esi
movl %esi, 0x60(%rbx)
jae 0x65111
movl $0x3f, 0x60(%rbx)
addq $-0x8, %rax
movq %rax, 0x58(%rbx)
testq %rdx, %rdx
je 0x6517c
cmpq $0x0, 0x70(%rbx)
je 0x651fd
leaq 0x10(%rsp), %r14
movaps (%r14), %xmm0
leaq 0x20(%rsp), %r15
movaps %xmm0, (%r15)
movq %r14, %rdi
xorl %esi, %esi
callq 0x5cc1e
movb $0x0, (%r14)
movq $0x0, 0x8(%r14)
movq %r15, %rdi
movl $0x1, %esi
callq 0x5cc1e
movq 0x70(%rbx), %rdi
movq %r15, %rsi
callq 0x5f548
movq %r15, %rdi
xorl %esi, %esi
callq 0x5cc1e
movq %r15, %rdi
callq 0x62398
movq 0x70(%rbx), %r14
movb $0x1, %bl
jmp 0x65181
xorl %ebx, %ebx
xorl %r14d, %r14d
leaq 0x10(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x5cc1e
movq %r15, %rdi
callq 0x62398
movl %ebx, %eax
movq %r14, %rdx
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8d29a(%rip), %rdi # 0xf2449
leaq 0x87004(%rip), %rdx # 0xec1ba
leaq 0x8e1f1(%rip), %rcx # 0xf33ae
movl $0x1c28, %esi # imm = 0x1C28
xorl %eax, %eax
callq 0x1bf40
callq 0x1b330
leaq 0x8e1ed(%rip), %rcx # 0xf33c2
movl $0x1c4b, %esi # imm = 0x1C4B
jmp 0x651e8
leaq 0x8e21d(%rip), %rcx # 0xf3400
movl $0x1c57, %esi # imm = 0x1C57
leaq 0x8d25a(%rip), %rdi # 0xf2449
leaq 0x86fc4(%rip), %rdx # 0xec1ba
xorl %eax, %eax
callq 0x1bf40
leaq 0x8d245(%rip), %rdi # 0xf2449
leaq 0x86faf(%rip), %rdx # 0xec1ba
leaq 0x8e206(%rip), %rcx # 0xf3418
movl $0x1c60, %esi # imm = 0x1C60
xorl %eax, %eax
callq 0x1bf40
jmp 0x65220
movq %rax, %rbx
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x5cc1e
movq %r14, %rdi
callq 0x62398
movq %rbx, %rdi
callq 0x1c030
|
_ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12handle_valueIRmEESt4pairIbPSF_EOT_b:
push rbp
push r15
push r14
push rbx
sub rsp, 48h
mov ebp, edx
mov rbx, rdi
mov rax, [rdi+30h]
mov ecx, [rdi+38h]
cmp [rdi+20h], rax
setz dl
test ecx, ecx
setz dil
and dil, dl
cmp dil, 1
jz loc_651A8
mov ecx, ecx
mov r15, 8000000000000000h
lea rdx, [rcx-1]
add rcx, 3Eh ; '>'
test rdx, rdx
cmovns rcx, rdx
sar rcx, 6
lea rax, [rax+rcx*8]
lea rcx, [r15+3Fh]
and rcx, rdx
xor edi, edi
cmp rcx, r15
setbe dil
mov rax, [rax+rdi*8-8]
bt rax, rdx
jnb loc_6503B
xorps xmm0, xmm0
lea r14, [rsp+68h+var_58]
movaps xmmword ptr [r14], xmm0
mov rsi, [rsi]
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE6EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_17number_unsigned_tE; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)6>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::number_unsigned_t)
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
test bpl, bpl
jnz short loc_64FE8
mov rax, [rbx+10h]
sub rax, [rbx+8]
shr rax, 3
mov [rsp+68h+var_5C], eax
mov [rsp+68h+var_5D], 5
cmp qword ptr [rbx+90h], 0
jz loc_651C9
lea rdi, [rbx+80h]
lea rsi, [rsp+68h+var_5C]
lea rdx, [rsp+68h+var_5D]
lea rcx, [rsp+68h+var_58]
call qword ptr [rbx+98h]
test al, al
jz loc_6517C
loc_64FE8:
mov rax, [rbx+10h]
cmp [rbx+8], rax
jz short loc_65045
mov rax, [rax-8]
test rax, rax
jz loc_6517C
movzx ecx, byte ptr [rax]
cmp ecx, 1
jz loc_6509F
cmp ecx, 2
jnz loc_651CE
mov rdi, [rax+8]
lea rsi, [rsp+68h+var_58]
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJSD_EEERSD_DpOT_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &&)
mov rax, [rbx+10h]
mov rax, [rax-8]
mov rax, [rax+8]
mov r14, [rax+8]
add r14, 0FFFFFFFFFFFFFFF0h
jmp loc_65178
loc_6503B:
xor ebx, ebx
xor r14d, r14d
jmp loc_65198
loc_65045:
lea r14, [rsp+68h+var_58]
movaps xmm0, xmmword ptr [r14]
lea r15, [rsp+68h+var_38]
movaps xmmword ptr [r15], xmm0
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov byte ptr [r14], 0
mov qword ptr [r14+8], 0
mov rdi, r15
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, [rbx]
mov rsi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>)
mov rdi, r15
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov r14, [rbx]
jmp loc_65178
loc_6509F:
mov rax, [rbx+58h]
mov ecx, [rbx+60h]
cmp [rbx+48h], rax
setz dl
test ecx, ecx
setz sil
and sil, dl
cmp sil, 1
jz loc_651DC
mov esi, ecx
lea rcx, [rsi-1]
mov rdx, rsi
add rdx, 3Eh ; '>'
test rcx, rcx
cmovns rdx, rcx
sar rdx, 6
lea rdi, [rax+rdx*8]
lea rdx, [r15+3Fh]
and rdx, rcx
xor r8d, r8d
cmp rdx, r15
setbe r8b
mov edx, 1
shl rdx, cl
and rdx, [rdi+r8*8-8]
sub esi, 1
mov [rbx+60h], esi
jnb short loc_65111
mov dword ptr [rbx+60h], 3Fh ; '?'
add rax, 0FFFFFFFFFFFFFFF8h
mov [rbx+58h], rax
loc_65111:
test rdx, rdx
jz short loc_6517C
cmp qword ptr [rbx+70h], 0
jz loc_651FD
lea r14, [rsp+68h+var_58]
movaps xmm0, xmmword ptr [r14]
lea r15, [rsp+68h+var_48]
movaps xmmword ptr [r15], xmm0
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov byte ptr [r14], 0
mov qword ptr [r14+8], 0
mov rdi, r15
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, [rbx+70h]
mov rsi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>)
mov rdi, r15
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov r14, [rbx+70h]
loc_65178:
mov bl, 1
jmp short loc_65181
loc_6517C:
xor ebx, ebx
xor r14d, r14d
loc_65181:
lea r15, [rsp+68h+var_58]
mov rdi, r15
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
loc_65198:
mov eax, ebx
mov rdx, r14
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_651A8:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKeepStackEmpty; "!keep_stack.empty()"
mov esi, 1C28h
xor eax, eax
call _ggml_abort
loc_651C9:
call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
loc_651CE:
lea rcx, aRefStackBackIs; "ref_stack.back()->is_array() || ref_sta"...
mov esi, 1C4Bh
jmp short loc_651E8
loc_651DC:
lea rcx, aKeyKeepStackEm; "!key_keep_stack.empty()"
mov esi, 1C57h
loc_651E8:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
xor eax, eax
call _ggml_abort
loc_651FD:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aObjectElement; "object_element"
mov esi, 1C60h
xor eax, eax
call _ggml_abort
jmp short $+2
loc_65220:
mov rbx, rax
lea r14, [rsp+68h+var_58]
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, rbx
call __Unwind_Resume
|
long long nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::handle_value<unsigned long &>(
long long a1,
_QWORD *a2,
char a3)
{
unsigned int v4; // ebx
long long v5; // rax
unsigned int v6; // ecx
signed long long v7; // rdx
long long v8; // rcx
long long v9; // rax
long long v10; // rax
unsigned __int8 *v11; // rax
int v12; // ecx
long long v13; // rax
unsigned int v14; // ecx
long long v15; // rsi
long long v16; // rcx
long long v17; // rdx
long long v18; // rdx
const char *v20; // rcx
long long v21; // rsi
long long v22; // rbx
char v23; // [rsp+Bh] [rbp-5Dh] BYREF
int v24; // [rsp+Ch] [rbp-5Ch] BYREF
__int128 v25; // [rsp+10h] [rbp-58h] BYREF
__int128 v26; // [rsp+20h] [rbp-48h] BYREF
_OWORD v27[3]; // [rsp+30h] [rbp-38h] BYREF
v4 = a1;
v5 = *(_QWORD *)(a1 + 48);
v6 = *(_DWORD *)(a1 + 56);
if ( *(_QWORD *)(a1 + 32) == v5 && v6 == 0 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
7208LL,
"GGML_ASSERT(%s) failed",
"!keep_stack.empty()");
goto LABEL_28;
}
v7 = v6 - 1LL;
v8 = v6 + 62LL;
if ( v7 >= 0 )
v8 = v7;
v9 = *(_QWORD *)(v5 + 8 * (v8 >> 6) + 8LL * ((v7 & 0x800000000000003FLL) <= 0x8000000000000000LL) - 8);
if ( _bittest64(&v9, v7) )
{
v25 = 0LL;
nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)6>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
&v25,
*a2);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v25);
if ( a3 )
{
LABEL_8:
v10 = *(_QWORD *)(a1 + 16);
if ( *(_QWORD *)(a1 + 8) == v10 )
{
v27[0] = v25;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v25);
LOBYTE(v25) = 0;
*((_QWORD *)&v25 + 1) = 0LL;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v27);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=(
*(_QWORD *)a1,
(long long)v27);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v27);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v27);
goto LABEL_23;
}
v11 = *(unsigned __int8 **)(v10 - 8);
if ( v11 )
{
v12 = *v11;
if ( v12 != 1 )
{
if ( v12 == 2 )
{
std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
*((_QWORD *)v11 + 1),
(long long)&v25);
LABEL_23:
LOBYTE(v4) = 1;
LABEL_25:
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v25);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v25);
return v4;
}
v20 = "ref_stack.back()->is_array() || ref_stack.back()->is_object()";
v21 = 7243LL;
goto LABEL_31;
}
v13 = *(_QWORD *)(a1 + 88);
v14 = *(_DWORD *)(a1 + 96);
if ( *(_QWORD *)(a1 + 72) == v13 && v14 == 0 )
{
v20 = "!key_keep_stack.empty()";
v21 = 7255LL;
LABEL_31:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
v21,
"GGML_ASSERT(%s) failed",
v20);
goto LABEL_32;
}
v15 = v14;
v16 = v14 - 1LL;
v17 = v15 + 62;
if ( v16 >= 0 )
v17 = v16;
v18 = *(_QWORD *)(v13 + 8 * (v17 >> 6) + 8LL * ((v16 & 0x800000000000003FLL) <= 0x8000000000000000LL) - 8) & (1LL << v16);
*(_DWORD *)(a1 + 96) = v15 - 1;
if ( !(_DWORD)v15 )
{
*(_DWORD *)(a1 + 96) = 63;
*(_QWORD *)(a1 + 88) = v13 - 8;
}
if ( v18 )
{
if ( *(_QWORD *)(a1 + 112) )
{
v26 = v25;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v25);
LOBYTE(v25) = 0;
*((_QWORD *)&v25 + 1) = 0LL;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v26);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=(
*(_QWORD *)(a1 + 112),
(long long)&v26);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v26);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v26);
goto LABEL_23;
}
LABEL_32:
v22 = ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
7264LL,
"GGML_ASSERT(%s) failed",
"object_element");
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v25);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v25);
_Unwind_Resume(v22);
}
}
LABEL_24:
v4 = 0;
goto LABEL_25;
}
v24 = (*(_QWORD *)(a1 + 16) - *(_QWORD *)(a1 + 8)) >> 3;
v23 = 5;
if ( *(_QWORD *)(a1 + 144) )
{
if ( !(*(unsigned __int8 ( **)(long long, int *, char *, __int128 *))(a1 + 152))(
a1 + 128,
&v24,
&v23,
&v25) )
goto LABEL_24;
goto LABEL_8;
}
LABEL_28:
std::__throw_bad_function_call();
}
return 0;
}
|
handle_value<unsigned_long&>:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV EBP,EDX
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x30]
MOV ECX,dword ptr [RDI + 0x38]
CMP qword ptr [RDI + 0x20],RAX
SETZ DL
TEST ECX,ECX
SETZ DIL
AND DIL,DL
CMP DIL,0x1
JZ 0x001651a8
MOV ECX,ECX
MOV R15,-0x8000000000000000
LEA RDX,[RCX + -0x1]
ADD RCX,0x3e
TEST RDX,RDX
CMOVNS RCX,RDX
SAR RCX,0x6
LEA RAX,[RAX + RCX*0x8]
LEA RCX,[R15 + 0x3f]
AND RCX,RDX
XOR EDI,EDI
CMP RCX,R15
SETBE DIL
MOV RAX,qword ptr [RAX + RDI*0x8 + -0x8]
BT RAX,RDX
JNC 0x0016503b
XORPS XMM0,XMM0
LEA R14,[RSP + 0x10]
MOVAPS xmmword ptr [R14],XMM0
MOV RSI,qword ptr [RSI]
MOV RDI,R14
CALL 0x00165242
MOV RDI,R14
MOV ESI,0x1
CALL 0x0015cc1e
TEST BPL,BPL
JNZ 0x00164fe8
MOV RAX,qword ptr [RBX + 0x10]
SUB RAX,qword ptr [RBX + 0x8]
SHR RAX,0x3
MOV dword ptr [RSP + 0xc],EAX
MOV byte ptr [RSP + 0xb],0x5
CMP qword ptr [RBX + 0x90],0x0
JZ 0x001651c9
LEA RDI,[RBX + 0x80]
LAB_00164fcb:
LEA RSI,[RSP + 0xc]
LEA RDX,[RSP + 0xb]
LEA RCX,[RSP + 0x10]
CALL qword ptr [RBX + 0x98]
TEST AL,AL
JZ 0x0016517c
LAB_00164fe8:
MOV RAX,qword ptr [RBX + 0x10]
CMP qword ptr [RBX + 0x8],RAX
JZ 0x00165045
MOV RAX,qword ptr [RAX + -0x8]
TEST RAX,RAX
JZ 0x0016517c
MOVZX ECX,byte ptr [RAX]
CMP ECX,0x1
JZ 0x0016509f
CMP ECX,0x2
JNZ 0x001651ce
MOV RDI,qword ptr [RAX + 0x8]
LEA RSI,[RSP + 0x10]
CALL 0x001619de
LAB_00165022:
MOV RAX,qword ptr [RBX + 0x10]
MOV RAX,qword ptr [RAX + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV R14,qword ptr [RAX + 0x8]
ADD R14,-0x10
JMP 0x00165178
LAB_0016503b:
XOR EBX,EBX
XOR R14D,R14D
JMP 0x00165198
LAB_00165045:
LEA R14,[RSP + 0x10]
MOVAPS XMM0,xmmword ptr [R14]
LEA R15,[RSP + 0x30]
MOVAPS xmmword ptr [R15],XMM0
MOV RDI,R14
XOR ESI,ESI
CALL 0x0015cc1e
MOV byte ptr [R14],0x0
MOV qword ptr [R14 + 0x8],0x0
MOV RDI,R15
MOV ESI,0x1
CALL 0x0015cc1e
MOV RDI,qword ptr [RBX]
MOV RSI,R15
CALL 0x0015f548
MOV RDI,R15
XOR ESI,ESI
CALL 0x0015cc1e
MOV RDI,R15
CALL 0x00162398
MOV R14,qword ptr [RBX]
JMP 0x00165178
LAB_0016509f:
MOV RAX,qword ptr [RBX + 0x58]
MOV ECX,dword ptr [RBX + 0x60]
CMP qword ptr [RBX + 0x48],RAX
SETZ DL
TEST ECX,ECX
SETZ SIL
AND SIL,DL
CMP SIL,0x1
JZ 0x001651dc
MOV ESI,ECX
LEA RCX,[RSI + -0x1]
MOV RDX,RSI
ADD RDX,0x3e
TEST RCX,RCX
CMOVNS RDX,RCX
SAR RDX,0x6
LEA RDI,[RAX + RDX*0x8]
LEA RDX,[R15 + 0x3f]
AND RDX,RCX
XOR R8D,R8D
CMP RDX,R15
SETBE R8B
MOV EDX,0x1
SHL RDX,CL
AND RDX,qword ptr [RDI + R8*0x8 + -0x8]
SUB ESI,0x1
MOV dword ptr [RBX + 0x60],ESI
JNC 0x00165111
MOV dword ptr [RBX + 0x60],0x3f
ADD RAX,-0x8
MOV qword ptr [RBX + 0x58],RAX
LAB_00165111:
TEST RDX,RDX
JZ 0x0016517c
CMP qword ptr [RBX + 0x70],0x0
JZ 0x001651fd
LEA R14,[RSP + 0x10]
MOVAPS XMM0,xmmword ptr [R14]
LEA R15,[RSP + 0x20]
MOVAPS xmmword ptr [R15],XMM0
MOV RDI,R14
XOR ESI,ESI
CALL 0x0015cc1e
MOV byte ptr [R14],0x0
MOV qword ptr [R14 + 0x8],0x0
MOV RDI,R15
MOV ESI,0x1
CALL 0x0015cc1e
MOV RDI,qword ptr [RBX + 0x70]
MOV RSI,R15
CALL 0x0015f548
MOV RDI,R15
XOR ESI,ESI
CALL 0x0015cc1e
MOV RDI,R15
CALL 0x00162398
MOV R14,qword ptr [RBX + 0x70]
LAB_00165178:
MOV BL,0x1
JMP 0x00165181
LAB_0016517c:
XOR EBX,EBX
XOR R14D,R14D
LAB_00165181:
LEA R15,[RSP + 0x10]
MOV RDI,R15
XOR ESI,ESI
CALL 0x0015cc1e
MOV RDI,R15
CALL 0x00162398
LAB_00165198:
MOV EAX,EBX
MOV RDX,R14
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_001651a8:
LEA RDI,[0x1f2449]
LEA RDX,[0x1ec1ba]
LEA RCX,[0x1f33ae]
MOV ESI,0x1c28
XOR EAX,EAX
CALL 0x0011bf40
LAB_001651c9:
CALL 0x0011b330
LAB_001651ce:
LEA RCX,[0x1f33c2]
MOV ESI,0x1c4b
JMP 0x001651e8
LAB_001651dc:
LEA RCX,[0x1f3400]
MOV ESI,0x1c57
LAB_001651e8:
LEA RDI,[0x1f2449]
LEA RDX,[0x1ec1ba]
XOR EAX,EAX
CALL 0x0011bf40
LAB_001651fd:
LEA RDI,[0x1f2449]
LEA RDX,[0x1ec1ba]
LEA RCX,[0x1f3418]
MOV ESI,0x1c60
XOR EAX,EAX
CALL 0x0011bf40
|
/* std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>*>
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >::handle_value<unsigned long&>(unsigned long&, bool) */
int1 [16] __thiscall
nlohmann::json_abi_v3_11_3::detail::
json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::handle_value<unsigned_long&>
(json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this,ulong *param_1,bool param_2)
{
uint uVar1;
char cVar2;
ulong uVar3;
char *pcVar4;
ulong uVar5;
int8 uVar6;
bool bVar7;
long lVar8;
int1 auVar9 [16];
int1 local_5d;
int4 local_5c;
ulong local_58;
int8 uStack_50;
ulong local_48;
int8 uStack_40;
ulong local_38;
int8 uStack_30;
uVar1 = *(uint *)(this + 0x38);
if (uVar1 == 0 && *(long *)(this + 0x20) == *(long *)(this + 0x30)) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x1c28,
"GGML_ASSERT(%s) failed","!keep_stack.empty()");
}
uVar5 = (ulong)uVar1 - 1;
uVar3 = (ulong)uVar1 + 0x3e;
if (-1 < (long)uVar5) {
uVar3 = uVar5;
}
if ((*(ulong *)(*(long *)(this + 0x30) + ((long)uVar3 >> 6) * 8 + -8 +
(ulong)((uVar5 & 0x800000000000003f) < 0x8000000000000001) * 8) >> (uVar5 & 0x3f) &
1) == 0) {
uVar5 = 0;
lVar8 = 0;
goto LAB_00165198;
}
local_58 = 0;
uStack_50 = 0;
external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)6>::
construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(&local_58,*param_1);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(&local_58,0));
if (param_2) {
LAB_00164fe8:
if (*(long *)(this + 8) == *(long *)(this + 0x10)) {
local_38 = local_58;
uStack_30 = uStack_50;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(&local_58,0));
local_58 = local_58 & 0xffffffffffffff00;
uStack_50 = 0;
bVar7 = SUB81((data *)&local_38,0);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar7);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator=(*(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
**)this,(data *)&local_38);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar7);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)&local_38);
lVar8 = *(long *)this;
}
else {
pcVar4 = *(char **)(*(long *)(this + 0x10) + -8);
if (pcVar4 == (char *)0x0) goto LAB_0016517c;
if (*pcVar4 == '\x01') {
lVar8 = *(long *)(this + 0x58);
uVar1 = *(uint *)(this + 0x60);
if (uVar1 == 0 && *(long *)(this + 0x48) == lVar8) {
pcVar4 = "!key_keep_stack.empty()";
uVar6 = 0x1c57;
goto LAB_001651e8;
}
uVar5 = (ulong)uVar1 - 1;
uVar3 = (ulong)uVar1 + 0x3e;
if (-1 < (long)uVar5) {
uVar3 = uVar5;
}
uVar3 = *(ulong *)(lVar8 + ((long)uVar3 >> 6) * 8 + -8 +
(ulong)((uVar5 & 0x800000000000003f) < 0x8000000000000001) * 8);
*(uint *)(this + 0x60) = uVar1 - 1;
if (uVar1 == 0) {
*(int4 *)(this + 0x60) = 0x3f;
*(long *)(this + 0x58) = lVar8 + -8;
}
if ((1L << ((byte)uVar5 & 0x3f) & uVar3) == 0) goto LAB_0016517c;
if (*(long *)(this + 0x70) == 0) {
/* try { // try from 001651fd to 0016521d has its CatchHandler @ 0016521e */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
0x1c60,"GGML_ASSERT(%s) failed","object_element");
}
local_48 = local_58;
uStack_40 = uStack_50;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(&local_58,0));
local_58 = local_58 & 0xffffffffffffff00;
uStack_50 = 0;
bVar7 = SUB81((data *)&local_48,0);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar7);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator=(*(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
**)(this + 0x70),(data *)&local_48);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar7);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)&local_48);
lVar8 = *(long *)(this + 0x70);
}
else {
if (*pcVar4 != '\x02') {
pcVar4 = "ref_stack.back()->is_array() || ref_stack.back()->is_object()";
uVar6 = 0x1c4b;
LAB_001651e8:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
uVar6,"GGML_ASSERT(%s) failed",pcVar4);
}
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::
emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
**)(pcVar4 + 8),(basic_json *)&local_58);
lVar8 = *(long *)(*(long *)(*(long *)(*(long *)(this + 0x10) + -8) + 8) + 8) + -0x10;
}
}
uVar5 = CONCAT71((int7)((ulong)this >> 8),1);
}
else {
local_5c = (int4)((ulong)(*(long *)(this + 0x10) - *(long *)(this + 8)) >> 3);
local_5d = 5;
if (*(long *)(this + 0x90) == 0) {
/* WARNING: Subroutine does not return */
/* try { // try from 001651c9 to 001651fc has its CatchHandler @ 00165220 */
std::__throw_bad_function_call();
}
/* try { // try from 00164fcb to 00165021 has its CatchHandler @ 00165220 */
cVar2 = (**(code **)(this + 0x98))(this + 0x80,&local_5c,&local_5d,&local_58);
if (cVar2 != '\0') goto LAB_00164fe8;
LAB_0016517c:
uVar5 = 0;
lVar8 = 0;
}
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81((data *)&local_58,0));
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)&local_58);
LAB_00165198:
auVar9._0_8_ = uVar5 & 0xffffffff;
auVar9._8_8_ = lVar8;
return auVar9;
}
|
|
7,611 |
std::pair<bool, 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::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::handle_value<std::nullptr_t>(std::nullptr_t&&, bool)
|
monkey531[P]llama/common/json.hpp
|
std::pair<bool, BasicJsonType*> handle_value(Value&& v, const bool skip_callback = false)
{
JSON_ASSERT(!keep_stack.empty());
// do not handle this value if we know it would be added to a discarded
// container
if (!keep_stack.back())
{
return {false, nullptr};
}
// create value
auto value = BasicJsonType(std::forward<Value>(v));
// check callback
const bool keep = skip_callback || callback(static_cast<int>(ref_stack.size()), parse_event_t::value, value);
// do not handle this value if we just learnt it shall be discarded
if (!keep)
{
return {false, nullptr};
}
if (ref_stack.empty())
{
root = std::move(value);
return {true, & root};
}
// skip this value if we already decided to skip the parent
// (https://github.com/nlohmann/json/issues/971#issuecomment-413678360)
if (!ref_stack.back())
{
return {false, nullptr};
}
// we now only expect arrays and objects
JSON_ASSERT(ref_stack.back()->is_array() || ref_stack.back()->is_object());
// array
if (ref_stack.back()->is_array())
{
ref_stack.back()->m_data.m_value.array->emplace_back(std::move(value));
return {true, & (ref_stack.back()->m_data.m_value.array->back())};
}
// object
JSON_ASSERT(ref_stack.back()->is_object());
// check if we should store an element for the current key
JSON_ASSERT(!key_keep_stack.empty());
const bool store_element = key_keep_stack.back();
key_keep_stack.pop_back();
if (!store_element)
{
return {false, nullptr};
}
JSON_ASSERT(object_element);
*object_element = std::move(value);
return {true, object_element};
}
|
O2
|
cpp
|
std::pair<bool, 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::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::handle_value<std::nullptr_t>(std::nullptr_t&&, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x20(%rdi), %rax
cmpq 0x30(%rdi), %rax
jne 0x484c8
cmpl $0x0, 0x38(%rbx)
je 0x48620
leaq 0x20(%rbx), %rdi
callq 0x45eac
testq %rdx, (%rax)
je 0x48563
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x486aa
testb %bpl, %bpl
jne 0x48514
leaq 0x80(%rbx), %rdi
movq 0x10(%rbx), %rsi
subq 0x8(%rbx), %rsi
shrq $0x3, %rsi
pushq $0x5
popq %rdx
leaq 0x8(%rsp), %rcx
callq 0x45eda
testb %al, %al
je 0x48601
movq 0x10(%rbx), %rax
cmpq %rax, 0x8(%rbx)
je 0x4856d
movq -0x8(%rax), %rax
testq %rax, %rax
je 0x48601
movzbl (%rax), %ecx
cmpl $0x1, %ecx
je 0x48597
cmpl $0x2, %ecx
jne 0x48641
movq 0x8(%rax), %rdi
leaq 0x8(%rsp), %rsi
callq 0x46310
movq 0x10(%rbx), %rax
movq -0x8(%rax), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %r14
addq $-0x10, %r14
jmp 0x485fd
xorl %ebx, %ebx
xorl %r14d, %r14d
jmp 0x48610
leaq 0x28(%rsp), %r14
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x462dc
movq (%rbx), %rdi
movq %r14, %rsi
callq 0x445b8
movq %r14, %rdi
callq 0x41bb8
movq (%rbx), %r14
jmp 0x485fd
movq 0x48(%rbx), %rax
cmpq 0x58(%rbx), %rax
jne 0x485ab
cmpl $0x0, 0x60(%rbx)
je 0x4864f
leaq 0x48(%rbx), %rdi
callq 0x45eac
movq %rdx, %r14
leaq 0x58(%rbx), %rdi
movq (%rax), %r15
callq 0x45512
testq %r14, %r15
je 0x48601
cmpq $0x0, 0x70(%rbx)
je 0x48670
leaq 0x18(%rsp), %r14
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x462dc
movq 0x70(%rbx), %rdi
movq %r14, %rsi
callq 0x445b8
movq %r14, %rdi
callq 0x41bb8
movq 0x70(%rbx), %r14
movb $0x1, %bl
jmp 0x48606
xorl %ebx, %ebx
xorl %r14d, %r14d
leaq 0x8(%rsp), %rdi
callq 0x41bb8
movl %ebx, %eax
movq %r14, %rdx
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6be05(%rip), %rdi # 0xb442c
leaq 0x65b5c(%rip), %rdx # 0xae18a
leaq 0x6cd6b(%rip), %rcx # 0xb53a0
movl $0x1c28, %esi # imm = 0x1C28
xorl %eax, %eax
callq 0x24f50
leaq 0x6cd6c(%rip), %rcx # 0xb53b4
movl $0x1c4b, %esi # imm = 0x1C4B
jmp 0x4865b
leaq 0x6cd9c(%rip), %rcx # 0xb53f2
movl $0x1c57, %esi # imm = 0x1C57
leaq 0x6bdca(%rip), %rdi # 0xb442c
leaq 0x65b21(%rip), %rdx # 0xae18a
xorl %eax, %eax
callq 0x24f50
leaq 0x6bdb5(%rip), %rdi # 0xb442c
leaq 0x65b0c(%rip), %rdx # 0xae18a
leaq 0x6cd85(%rip), %rcx # 0xb540a
movl $0x1c60, %esi # imm = 0x1C60
xorl %eax, %eax
callq 0x24f50
jmp 0x48695
jmp 0x48695
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x41bb8
movq %rbx, %rdi
callq 0x25020
|
_ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12handle_valueIRbEESt4pairIbPSF_EOT_b:
push rbp
push r15
push r14
push rbx
sub rsp, 38h
mov ebp, edx
mov r14, rsi
mov rbx, rdi
mov rax, [rdi+20h]
cmp rax, [rdi+30h]
jnz short loc_484C8
cmp dword ptr [rbx+38h], 0
jz loc_48620
loc_484C8:
lea rdi, [rbx+20h]
call _ZNSt6vectorIbSaIbEE4backEv; std::vector<bool>::back(void)
test [rax], rdx
jz loc_48563
lea rdi, [rsp+58h+var_50]
mov rsi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRbbTnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SH_EE5valueEiE4typeELi0EEEOT_
test bpl, bpl
jnz short loc_48514
lea rdi, [rbx+80h]
mov rsi, [rbx+10h]
sub rsi, [rbx+8]
shr rsi, 3
push 5
pop rdx
lea rcx, [rsp+58h+var_50]
call _ZNKSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEclEiS3_SH_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)>::operator()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)
test al, al
jz loc_48601
loc_48514:
mov rax, [rbx+10h]
cmp [rbx+8], rax
jz short loc_4856D
mov rax, [rax-8]
test rax, rax
jz loc_48601
movzx ecx, byte ptr [rax]
cmp ecx, 1
jz short loc_48597
cmp ecx, 2
jnz loc_48641
mov rdi, [rax+8]
lea rsi, [rsp+58h+var_50]
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJSD_EEERSD_DpOT_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &&)
mov rax, [rbx+10h]
mov rax, [rax-8]
mov rax, [rax+8]
mov r14, [rax+8]
add r14, 0FFFFFFFFFFFFFFF0h
jmp loc_485FD
loc_48563:
xor ebx, ebx
xor r14d, r14d
jmp loc_48610
loc_4856D:
lea r14, [rsp+58h+var_30]
lea rsi, [rsp+58h+var_50]
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2EOSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&&)
mov rdi, [rbx]
mov rsi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
mov r14, [rbx]
jmp short loc_485FD
loc_48597:
mov rax, [rbx+48h]
cmp rax, [rbx+58h]
jnz short loc_485AB
cmp dword ptr [rbx+60h], 0
jz loc_4864F
loc_485AB:
lea rdi, [rbx+48h]
call _ZNSt6vectorIbSaIbEE4backEv; std::vector<bool>::back(void)
mov r14, rdx
lea rdi, [rbx+58h]; this
mov r15, [rax]
call _ZNSt18_Bit_iterator_base12_M_bump_downEv; std::_Bit_iterator_base::_M_bump_down(void)
test r15, r14
jz short loc_48601
cmp qword ptr [rbx+70h], 0
jz loc_48670
lea r14, [rsp+58h+var_40]
lea rsi, [rsp+58h+var_50]
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2EOSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&&)
mov rdi, [rbx+70h]
mov rsi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
mov r14, [rbx+70h]
loc_485FD:
mov bl, 1
jmp short loc_48606
loc_48601:
xor ebx, ebx
xor r14d, r14d
loc_48606:
lea rdi, [rsp+58h+var_50]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
loc_48610:
mov eax, ebx
mov rdx, r14
add rsp, 38h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_48620:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKeepStackEmpty; "!keep_stack.empty()"
mov esi, 1C28h
xor eax, eax
call _ggml_abort
loc_48641:
lea rcx, aRefStackBackIs; "ref_stack.back()->is_array() || ref_sta"...
mov esi, 1C4Bh
jmp short loc_4865B
loc_4864F:
lea rcx, aKeyKeepStackEm; "!key_keep_stack.empty()"
mov esi, 1C57h
loc_4865B:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
xor eax, eax
call _ggml_abort
loc_48670:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aObjectElement; "object_element"
mov esi, 1C60h
xor eax, eax
call _ggml_abort
jmp short loc_48695
jmp short $+2
loc_48695:
mov rbx, rax
lea rdi, [rsp+58h+var_50]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
mov rdi, rbx
call __Unwind_Resume
|
long long nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::handle_value<bool &>(
long long a1,
long long a2,
char a3)
{
unsigned int v4; // ebx
_QWORD *v5; // rax
long long v6; // rdx
long long v7; // rax
unsigned __int8 *v8; // rax
int v9; // ecx
long long *v10; // rax
long long v11; // rdx
long long v12; // r14
long long v13; // r15
const char *v15; // rcx
long long v16; // rsi
long long v17; // rbx
_BYTE v18[16]; // [rsp+8h] [rbp-50h] BYREF
char v19[16]; // [rsp+18h] [rbp-40h] BYREF
char v20[48]; // [rsp+28h] [rbp-30h] BYREF
v4 = a1;
if ( *(_QWORD *)(a1 + 32) == *(_QWORD *)(a1 + 48) && !*(_DWORD *)(a1 + 56) )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
7208LL,
"GGML_ASSERT(%s) failed",
"!keep_stack.empty()");
LABEL_23:
v15 = "ref_stack.back()->is_array() || ref_stack.back()->is_object()";
v16 = 7243LL;
LABEL_25:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
v16,
"GGML_ASSERT(%s) failed",
v15);
goto LABEL_26;
}
v5 = (_QWORD *)std::vector<bool>::back(a1 + 32);
if ( (v6 & *v5) != 0 )
{
ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRbbTnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SH_EE5valueEiE4typeELi0EEEOT_(
v18,
a2);
if ( a3
|| (unsigned __int8)std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &)>::operator()(
a1 + 128,
(*(_QWORD *)(a1 + 16) - *(_QWORD *)(a1 + 8)) >> 3,
5) )
{
v7 = *(_QWORD *)(a1 + 16);
if ( *(_QWORD *)(a1 + 8) == v7 )
{
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
v20,
(long long)v18);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=(
*(_QWORD *)a1,
(long long)v20);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)v20);
goto LABEL_18;
}
v8 = *(unsigned __int8 **)(v7 - 8);
if ( v8 )
{
v9 = *v8;
if ( v9 != 1 )
{
if ( v9 == 2 )
{
std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
*((_QWORD *)v8 + 1),
(long long)v18);
LABEL_18:
LOBYTE(v4) = 1;
LABEL_20:
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)v18);
return v4;
}
goto LABEL_23;
}
if ( *(_QWORD *)(a1 + 72) == *(_QWORD *)(a1 + 88) && !*(_DWORD *)(a1 + 96) )
{
v15 = "!key_keep_stack.empty()";
v16 = 7255LL;
goto LABEL_25;
}
v10 = (long long *)std::vector<bool>::back(a1 + 72);
v12 = v11;
v13 = *v10;
std::_Bit_iterator_base::_M_bump_down((std::_Bit_iterator_base *)(a1 + 88));
if ( (v12 & v13) != 0 )
{
if ( *(_QWORD *)(a1 + 112) )
{
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
v19,
(long long)v18);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=(
*(_QWORD *)(a1 + 112),
(long long)v19);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)v19);
goto LABEL_18;
}
LABEL_26:
v17 = ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
7264LL,
"GGML_ASSERT(%s) failed",
"object_element");
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)v18);
_Unwind_Resume(v17);
}
}
}
v4 = 0;
goto LABEL_20;
}
return 0;
}
|
handle_value<bool&>:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x38
MOV EBP,EDX
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x20]
CMP RAX,qword ptr [RDI + 0x30]
JNZ 0x001484c8
CMP dword ptr [RBX + 0x38],0x0
JZ 0x00148620
LAB_001484c8:
LEA RDI,[RBX + 0x20]
CALL 0x00145eac
TEST qword ptr [RAX],RDX
JZ 0x00148563
LEA RDI,[RSP + 0x8]
MOV RSI,R14
CALL 0x001486aa
TEST BPL,BPL
JNZ 0x00148514
LEA RDI,[RBX + 0x80]
MOV RSI,qword ptr [RBX + 0x10]
SUB RSI,qword ptr [RBX + 0x8]
SHR RSI,0x3
LAB_001484ff:
PUSH 0x5
POP RDX
LEA RCX,[RSP + 0x8]
CALL 0x00145eda
TEST AL,AL
JZ 0x00148601
LAB_00148514:
MOV RAX,qword ptr [RBX + 0x10]
CMP qword ptr [RBX + 0x8],RAX
JZ 0x0014856d
MOV RAX,qword ptr [RAX + -0x8]
TEST RAX,RAX
JZ 0x00148601
MOVZX ECX,byte ptr [RAX]
CMP ECX,0x1
JZ 0x00148597
CMP ECX,0x2
JNZ 0x00148641
MOV RDI,qword ptr [RAX + 0x8]
LEA RSI,[RSP + 0x8]
CALL 0x00146310
MOV RAX,qword ptr [RBX + 0x10]
MOV RAX,qword ptr [RAX + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV R14,qword ptr [RAX + 0x8]
ADD R14,-0x10
JMP 0x001485fd
LAB_00148563:
XOR EBX,EBX
XOR R14D,R14D
JMP 0x00148610
LAB_0014856d:
LEA R14,[RSP + 0x28]
LEA RSI,[RSP + 0x8]
MOV RDI,R14
CALL 0x001462dc
MOV RDI,qword ptr [RBX]
MOV RSI,R14
CALL 0x001445b8
MOV RDI,R14
CALL 0x00141bb8
MOV R14,qword ptr [RBX]
JMP 0x001485fd
LAB_00148597:
MOV RAX,qword ptr [RBX + 0x48]
CMP RAX,qword ptr [RBX + 0x58]
JNZ 0x001485ab
CMP dword ptr [RBX + 0x60],0x0
JZ 0x0014864f
LAB_001485ab:
LEA RDI,[RBX + 0x48]
CALL 0x00145eac
LAB_001485b4:
MOV R14,RDX
LEA RDI,[RBX + 0x58]
MOV R15,qword ptr [RAX]
CALL 0x00145512
TEST R15,R14
JZ 0x00148601
CMP qword ptr [RBX + 0x70],0x0
JZ 0x00148670
LEA R14,[RSP + 0x18]
LEA RSI,[RSP + 0x8]
MOV RDI,R14
CALL 0x001462dc
MOV RDI,qword ptr [RBX + 0x70]
MOV RSI,R14
CALL 0x001445b8
MOV RDI,R14
CALL 0x00141bb8
MOV R14,qword ptr [RBX + 0x70]
LAB_001485fd:
MOV BL,0x1
JMP 0x00148606
LAB_00148601:
XOR EBX,EBX
XOR R14D,R14D
LAB_00148606:
LEA RDI,[RSP + 0x8]
CALL 0x00141bb8
LAB_00148610:
MOV EAX,EBX
MOV RDX,R14
ADD RSP,0x38
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00148620:
LEA RDI,[0x1b442c]
LEA RDX,[0x1ae18a]
LEA RCX,[0x1b53a0]
MOV ESI,0x1c28
XOR EAX,EAX
CALL 0x00124f50
LAB_00148641:
LEA RCX,[0x1b53b4]
MOV ESI,0x1c4b
JMP 0x0014865b
LAB_0014864f:
LEA RCX,[0x1b53f2]
MOV ESI,0x1c57
LAB_0014865b:
LEA RDI,[0x1b442c]
LEA RDX,[0x1ae18a]
XOR EAX,EAX
CALL 0x00124f50
LAB_00148670:
LEA RDI,[0x1b442c]
LEA RDX,[0x1ae18a]
LEA RCX,[0x1b540a]
MOV ESI,0x1c60
XOR EAX,EAX
CALL 0x00124f50
|
/* std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>*>
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >::handle_value<bool&>(bool&, bool) */
int1 [16] __thiscall
nlohmann::json_abi_v3_11_3::detail::
json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::handle_value<bool&>
(json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this,bool *param_1,bool param_2)
{
char cVar1;
char *pcVar2;
ulong uVar3;
int8 uVar4;
long lVar5;
int1 auVar6 [16];
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
local_50 [16];
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
local_40 [16];
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
local_30 [16];
if ((*(long *)(this + 0x20) == *(long *)(this + 0x30)) && (*(int *)(this + 0x38) == 0)) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x1c28,
"GGML_ASSERT(%s) failed","!keep_stack.empty()");
}
auVar6 = std::vector<bool,std::allocator<bool>>::back
((vector<bool,std::allocator<bool>> *)(this + 0x20));
if ((*auVar6._0_8_ & auVar6._8_8_) == 0) {
uVar3 = 0;
lVar5 = 0;
goto LAB_00148610;
}
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRbbTnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SH_EE5valueEiE4typeELi0EEEOT_
(local_50,param_1);
if (param_2) {
LAB_00148514:
if (*(long *)(this + 8) == *(long *)(this + 0x10)) {
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::basic_json(local_30,local_50);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator=(*(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
**)this,local_30);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::~basic_json(local_30);
lVar5 = *(long *)this;
}
else {
pcVar2 = *(char **)(*(long *)(this + 0x10) + -8);
if (pcVar2 == (char *)0x0) goto LAB_00148601;
if (*pcVar2 == '\x01') {
if ((*(long *)(this + 0x48) == *(long *)(this + 0x58)) && (*(int *)(this + 0x60) == 0)) {
pcVar2 = "!key_keep_stack.empty()";
uVar4 = 0x1c57;
goto LAB_0014865b;
}
/* try { // try from 001485ab to 001485b3 has its CatchHandler @ 00148693 */
auVar6 = std::vector<bool,std::allocator<bool>>::back
((vector<bool,std::allocator<bool>> *)(this + 0x48));
uVar3 = *auVar6._0_8_;
std::_Bit_iterator_base::_M_bump_down((_Bit_iterator_base *)(this + 0x58));
if ((uVar3 & auVar6._8_8_) == 0) goto LAB_00148601;
if (*(long *)(this + 0x70) == 0) {
/* try { // try from 00148670 to 00148690 has its CatchHandler @ 00148691 */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
0x1c60,"GGML_ASSERT(%s) failed","object_element");
}
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::basic_json(local_40,local_50);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator=(*(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
**)(this + 0x70),local_40);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::~basic_json(local_40);
lVar5 = *(long *)(this + 0x70);
}
else {
if (*pcVar2 != '\x02') {
pcVar2 = "ref_stack.back()->is_array() || ref_stack.back()->is_object()";
uVar4 = 0x1c4b;
LAB_0014865b:
/* try { // try from 0014865b to 0014866f has its CatchHandler @ 00148695 */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
uVar4,"GGML_ASSERT(%s) failed",pcVar2);
}
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::
emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
**)(pcVar2 + 8),local_50);
lVar5 = *(long *)(*(long *)(*(long *)(*(long *)(this + 0x10) + -8) + 8) + 8) + -0x10;
}
}
uVar3 = CONCAT71((int7)((ulong)this >> 8),1);
}
else {
/* try { // try from 001484ff to 00148549 has its CatchHandler @ 00148695 */
cVar1 = std::
function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)>
::operator()(this + 0x80,(ulong)(*(long *)(this + 0x10) - *(long *)(this + 8)) >> 3,5,
local_50);
if (cVar1 != '\0') goto LAB_00148514;
LAB_00148601:
uVar3 = 0;
lVar5 = 0;
}
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::~basic_json(local_50);
LAB_00148610:
auVar6._0_8_ = uVar3 & 0xffffffff;
auVar6._8_8_ = lVar5;
return auVar6;
}
|
|
7,612 |
ImageClearBackground
|
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtextures.c
|
void ImageClearBackground(Image *dst, Color color)
{
// Security check to avoid program crash
if ((dst->data == NULL) || (dst->width == 0) || (dst->height == 0)) return;
// Fill in first pixel based on image format
ImageDrawPixel(dst, 0, 0, color);
unsigned char *pSrcPixel = (unsigned char *)dst->data;
int bytesPerPixel = GetPixelDataSize(1, 1, dst->format);
// Repeat the first pixel data throughout the image
for (int i = 1; i < dst->width*dst->height; i++)
{
memcpy(pSrcPixel + i*bytesPerPixel, pSrcPixel, bytesPerPixel);
}
}
|
O1
|
c
|
ImageClearBackground:
cmpq $0x0, (%rdi)
je 0x9efaf
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, 0x8(%rdi)
je 0x9efa6
cmpl $0x0, 0xc(%rbx)
je 0x9efa6
movl %esi, %ecx
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x9efb0
movl 0xc(%rbx), %eax
imull 0x8(%rbx), %eax
cmpl $0x2, %eax
jl 0x9efa6
movq (%rbx), %r14
movl 0x14(%rbx), %edx
movl $0x1, %edi
movl $0x1, %esi
callq 0x97a0f
movslq %eax, %r15
leaq (%r14,%r15), %r12
movl $0x1, %r13d
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x9410
incq %r13
movslq 0x8(%rbx), %rax
movslq 0xc(%rbx), %rcx
imulq %rax, %rcx
addq %r15, %r12
cmpq %rcx, %r13
jl 0x9ef81
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
|
ImageClearBackground:
cmp qword ptr [rdi], 0
jz locret_9EFAF
push r15
push r14
push r13
push r12
push rbx
mov rbx, rdi
cmp dword ptr [rdi+8], 0
jz short loc_9EFA6
cmp dword ptr [rbx+0Ch], 0
jz short loc_9EFA6
mov ecx, esi
mov rdi, rbx
xor esi, esi
xor edx, edx
call ImageDrawPixel
mov eax, [rbx+0Ch]
imul eax, [rbx+8]
cmp eax, 2
jl short loc_9EFA6
mov r14, [rbx]
mov edx, [rbx+14h]
mov edi, 1
mov esi, 1
call GetPixelDataSize
movsxd r15, eax
lea r12, [r14+r15]
mov r13d, 1
loc_9EF81:
mov rdi, r12
mov rsi, r14
mov rdx, r15
call _memcpy
inc r13
movsxd rax, dword ptr [rbx+8]
movsxd rcx, dword ptr [rbx+0Ch]
imul rcx, rax
add r12, r15
cmp r13, rcx
jl short loc_9EF81
loc_9EFA6:
pop rbx
pop r12
pop r13
pop r14
pop r15
locret_9EFAF:
retn
|
void ImageClearBackground(long long *a1, unsigned int a2)
{
long long v2; // r14
long long PixelDataSize; // r15
long long v4; // r12
long long v5; // r13
if ( *a1 )
{
if ( *((_DWORD *)a1 + 2) )
{
if ( *((_DWORD *)a1 + 3) )
{
ImageDrawPixel(a1, 0LL, 0LL, a2);
if ( *((_DWORD *)a1 + 2) * *((_DWORD *)a1 + 3) >= 2 )
{
v2 = *a1;
PixelDataSize = (int)GetPixelDataSize(1, 1, *((_DWORD *)a1 + 5));
v4 = v2 + PixelDataSize;
v5 = 1LL;
do
{
memcpy(v4);
++v5;
v4 += PixelDataSize;
}
while ( v5 < *((int *)a1 + 2) * (long long)*((int *)a1 + 3) );
}
}
}
}
}
|
ImageClearBackground:
CMP qword ptr [RDI],0x0
JZ 0x0019efaf
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV RBX,RDI
CMP dword ptr [RDI + 0x8],0x0
JZ 0x0019efa6
CMP dword ptr [RBX + 0xc],0x0
JZ 0x0019efa6
MOV ECX,ESI
MOV RDI,RBX
XOR ESI,ESI
XOR EDX,EDX
CALL 0x0019efb0
MOV EAX,dword ptr [RBX + 0xc]
IMUL EAX,dword ptr [RBX + 0x8]
CMP EAX,0x2
JL 0x0019efa6
MOV R14,qword ptr [RBX]
MOV EDX,dword ptr [RBX + 0x14]
MOV EDI,0x1
MOV ESI,0x1
CALL 0x00197a0f
MOVSXD R15,EAX
LEA R12,[R14 + R15*0x1]
MOV R13D,0x1
LAB_0019ef81:
MOV RDI,R12
MOV RSI,R14
MOV RDX,R15
CALL 0x00109410
INC R13
MOVSXD RAX,dword ptr [RBX + 0x8]
MOVSXD RCX,dword ptr [RBX + 0xc]
IMUL RCX,RAX
ADD R12,R15
CMP R13,RCX
JL 0x0019ef81
LAB_0019efa6:
POP RBX
POP R12
POP R13
POP R14
POP R15
LAB_0019efaf:
RET
|
void ImageClearBackground(long *param_1,int4 param_2)
{
void *__src;
int iVar1;
void *__dest;
long lVar2;
if ((((*param_1 != 0) && ((int)param_1[1] != 0)) && (*(int *)((long)param_1 + 0xc) != 0)) &&
(ImageDrawPixel(param_1,0,0,param_2), 1 < *(int *)((long)param_1 + 0xc) * (int)param_1[1])) {
__src = (void *)*param_1;
iVar1 = GetPixelDataSize(1,1,*(int4 *)((long)param_1 + 0x14));
lVar2 = 1;
__dest = __src;
do {
__dest = (void *)((long)__dest + (long)iVar1);
memcpy(__dest,__src,(long)iVar1);
lVar2 = lVar2 + 1;
} while (lVar2 < (long)*(int *)((long)param_1 + 0xc) * (long)(int)param_1[1]);
}
return;
}
|
|
7,613 |
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>::cend() const
|
monkey531[P]llama/common/json.hpp
|
const_iterator cend() const noexcept
{
const_iterator result(this);
result.set_end();
return result;
}
|
O1
|
cpp
|
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::cend() const:
pushq %rbx
movq %rdi, %rbx
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rsi, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movq %rax, 0x18(%rdi)
movzbl (%rsi), %ecx
cmpl $0x2, %ecx
je 0x53daa
cmpl $0x1, %ecx
jne 0x53db4
leaq 0x8(%rbx), %rax
movq $0x0, (%rax)
jmp 0x53db8
movq $0x0, 0x10(%rbx)
jmp 0x53db8
movq %rax, 0x18(%rbx)
movq %rbx, %rdi
callq 0x53dc6
movq %rbx, %rax
popq %rbx
retq
nop
|
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4cendEv:
push rbx
mov rbx, rdi
mov rax, 8000000000000000h
mov [rdi], rsi
xorps xmm0, xmm0
movups xmmword ptr [rdi+8], xmm0
mov [rdi+18h], rax
movzx ecx, byte ptr [rsi]
cmp ecx, 2
jz short loc_53DAA
cmp ecx, 1
jnz short loc_53DB4
lea rax, [rbx+8]
mov qword ptr [rax], 0
jmp short loc_53DB8
loc_53DAA:
mov qword ptr [rbx+10h], 0
jmp short loc_53DB8
loc_53DB4:
mov [rbx+18h], rax
loc_53DB8:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE7set_endEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>::set_end(void)
mov rax, rbx
pop rbx
retn
|
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::cend(
long long a1,
unsigned __int8 *a2)
{
int v2; // ecx
*(_QWORD *)a1 = a2;
*(_OWORD *)(a1 + 8) = 0LL;
*(_QWORD *)(a1 + 24) = 0x8000000000000000LL;
v2 = *a2;
if ( v2 == 2 )
{
*(_QWORD *)(a1 + 16) = 0LL;
}
else if ( v2 == 1 )
{
*(_QWORD *)(a1 + 8) = 0LL;
}
else
{
*(_QWORD *)(a1 + 24) = 0x8000000000000000LL;
}
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::set_end(a1);
return a1;
}
|
cend:
PUSH RBX
MOV RBX,RDI
MOV RAX,-0x8000000000000000
MOV qword ptr [RDI],RSI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x8],XMM0
MOV qword ptr [RDI + 0x18],RAX
MOVZX ECX,byte ptr [RSI]
CMP ECX,0x2
JZ 0x00153daa
CMP ECX,0x1
JNZ 0x00153db4
LEA RAX,[RBX + 0x8]
MOV qword ptr [RAX],0x0
JMP 0x00153db8
LAB_00153daa:
MOV qword ptr [RBX + 0x10],0x0
JMP 0x00153db8
LAB_00153db4:
MOV qword ptr [RBX + 0x18],RAX
LAB_00153db8:
MOV RDI,RBX
CALL 0x00153dc6
MOV RAX,RBX
POP RBX
RET
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::cend() const */
void nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::cend(void)
{
char *in_RSI;
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
*in_RDI;
*(char **)in_RDI = in_RSI;
*(int8 *)(in_RDI + 8) = 0;
*(int8 *)(in_RDI + 0x10) = 0;
*(int8 *)(in_RDI + 0x18) = 0x8000000000000000;
if (*in_RSI == '\x02') {
*(int8 *)(in_RDI + 0x10) = 0;
}
else if (*in_RSI == '\x01') {
*(int8 *)(in_RDI + 8) = 0;
}
else {
*(int8 *)(in_RDI + 0x18) = 0x8000000000000000;
}
detail::
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
::set_end(in_RDI);
return;
}
|
|
7,614 |
do_cut_string(Copy_field*)
|
eloqsql/sql/field_conv.cc
|
static void do_cut_string(Copy_field *copy)
{
CHARSET_INFO *cs= copy->from_field->charset();
memcpy(copy->to_ptr,copy->from_ptr,copy->to_length);
/* Check if we loosed any important characters */
if (cs->scan((char*) copy->from_ptr + copy->to_length,
(char*) copy->from_ptr + copy->from_length,
MY_SEQ_SPACES) < copy->from_length - copy->to_length)
{
copy->to_field->set_warning(Sql_condition::WARN_LEVEL_WARN,
WARN_DATA_TRUNCATED, 1);
}
}
|
O0
|
cpp
|
do_cut_string(Copy_field*):
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rdi
movq (%rdi), %rax
callq *0x348(%rax)
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
movq -0x8(%rbp), %rax
movl 0x34(%rax), %eax
movl %eax, %edx
callq 0x776440
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
movq -0x8(%rbp), %rax
movl 0x34(%rax), %eax
addq %rax, %rsi
movq -0x8(%rbp), %rax
movq (%rax), %rdx
movq -0x8(%rbp), %rax
movl 0x30(%rax), %eax
addq %rax, %rdx
movl $0x2, %ecx
callq 0xcfae40
movq -0x8(%rbp), %rcx
movl 0x30(%rcx), %ecx
movq -0x8(%rbp), %rdx
subl 0x34(%rdx), %ecx
movl %ecx, %ecx
cmpq %rcx, %rax
jae 0xcfe211
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rdi
movl $0x1, %ecx
movl $0x4f1, %edx # imm = 0x4F1
xorl %eax, %eax
movl %eax, %r8d
movl %ecx, %esi
callq 0xcd73d0
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
_ZL13do_cut_stringP10Copy_field:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov rdi, [rax+38h]
mov rax, [rdi]
call qword ptr [rax+348h]
mov [rbp+var_10], rax
mov rax, [rbp+var_8]
mov rdi, [rax+8]
mov rax, [rbp+var_8]
mov rsi, [rax]
mov rax, [rbp+var_8]
mov eax, [rax+34h]
mov edx, eax
call _memcpy
mov rdi, [rbp+var_10]; this
mov rax, [rbp+var_8]
mov rsi, [rax]
mov rax, [rbp+var_8]
mov eax, [rax+34h]
add rsi, rax; char *
mov rax, [rbp+var_8]
mov rdx, [rax]
mov rax, [rbp+var_8]
mov eax, [rax+30h]
add rdx, rax; char *
mov ecx, 2; int
call _ZNK15charset_info_st4scanEPKcS1_i; charset_info_st::scan(char const*,char const*,int)
mov rcx, [rbp+var_8]
mov ecx, [rcx+30h]
mov rdx, [rbp+var_8]
sub ecx, [rdx+34h]
mov ecx, ecx
cmp rax, rcx
jnb short loc_CFE211
mov rax, [rbp+var_8]
mov rdi, [rax+40h]
mov ecx, 1
mov edx, 4F1h
xor eax, eax
mov r8d, eax
mov esi, ecx
call _ZNK5Field11set_warningEN21Sql_state_errno_level18enum_warning_levelEjim; Field::set_warning(Sql_state_errno_level::enum_warning_level,uint,int,ulong)
loc_CFE211:
add rsp, 10h
pop rbp
retn
|
char do_cut_string(Copy_field *a1)
{
unsigned long long v1; // rax
charset_info_st *v3; // [rsp+0h] [rbp-10h]
v3 = (charset_info_st *)(*(long long ( **)(_QWORD))(**((_QWORD **)a1 + 7) + 840LL))(*((_QWORD *)a1 + 7));
memcpy(*((_QWORD *)a1 + 1), *(_QWORD *)a1, *((unsigned int *)a1 + 13));
v1 = charset_info_st::scan(
v3,
(const char *)(*((unsigned int *)a1 + 13) + *(_QWORD *)a1),
(const char *)(*((unsigned int *)a1 + 12) + *(_QWORD *)a1),
2u);
if ( v1 < (unsigned int)(*((_DWORD *)a1 + 12) - *((_DWORD *)a1 + 13)) )
LOBYTE(v1) = Field::set_warning(*((Field **)a1 + 8), 1, 0x4F1u, 1, 0LL);
return v1;
}
|
~Named_type_handler:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00c3f300
ADD RSP,0x10
POP RBP
RET
|
/* Named_type_handler<Type_handler_varchar_compressed>::~Named_type_handler() */
void __thiscall
Named_type_handler<Type_handler_varchar_compressed>::~Named_type_handler
(Named_type_handler<Type_handler_varchar_compressed> *this)
{
Type_handler_varchar_compressed::~Type_handler_varchar_compressed
((Type_handler_varchar_compressed *)this);
return;
}
|
|
7,615 |
ok1
|
eloqsql/unittest/mytap/tap.c
|
void
ok1(int const pass)
{
va_list ap;
memset(&ap, 0, sizeof(ap));
if (!pass && *g_test.todo == '\0')
++g_test.failed;
vemit_tap(pass, NULL, ap);
if (*g_test.todo != '\0')
emit_dir("todo", g_test.todo);
emit_endl();
}
|
O0
|
c
|
ok1:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
leaq -0x20(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x24180
cmpl $0x0, -0x4(%rbp)
jne 0x255bc
movsbl 0x360614(%rip), %eax # 0x385bbc
cmpl $0x0, %eax
jne 0x255bc
movl 0x360605(%rip), %eax # 0x385bb8
addl $0x1, %eax
movl %eax, 0x3605fc(%rip) # 0x385bb8
movl -0x4(%rbp), %edi
leaq -0x20(%rbp), %rdx
xorl %eax, %eax
movl %eax, %esi
callq 0x25450
movsbl 0x3605e9(%rip), %eax # 0x385bbc
cmpl $0x0, %eax
je 0x255ef
leaq 0x54930(%rip), %rdi # 0x79f0f
leaq 0x3605ca(%rip), %rsi # 0x385bb0
addq $0xc, %rsi
callq 0x25530
callq 0x25990
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
ok1:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_4], edi
lea rdi, [rbp+var_20]
xor esi, esi
mov edx, 18h
call _memset
cmp [rbp+var_4], 0
jnz short loc_255BC
movsx eax, cs:byte_385BBC
cmp eax, 0
jnz short loc_255BC
mov eax, cs:dword_385BB8
add eax, 1
mov cs:dword_385BB8, eax
loc_255BC:
mov edi, [rbp+var_4]
lea rdx, [rbp+var_20]
xor eax, eax
mov esi, eax
call vemit_tap
movsx eax, cs:byte_385BBC
cmp eax, 0
jz short loc_255EF
lea rdi, aTodo; "todo"
lea rsi, g_test
add rsi, 0Ch
call emit_dir
loc_255EF:
call emit_endl
add rsp, 20h
pop rbp
retn
|
long long ok1(int a1)
{
_BYTE v2[28]; // [rsp+0h] [rbp-20h] BYREF
int v3; // [rsp+1Ch] [rbp-4h]
v3 = a1;
memset(v2, 0LL, 24LL);
if ( !v3 && !byte_385BBC )
++dword_385BB8;
vemit_tap(v3, 0LL, (long long)v2);
if ( byte_385BBC )
emit_dir("todo", (const char *)&g_test + 12);
return emit_endl();
}
|
ok1:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x4],EDI
LEA RDI,[RBP + -0x20]
XOR ESI,ESI
MOV EDX,0x18
CALL 0x00124180
CMP dword ptr [RBP + -0x4],0x0
JNZ 0x001255bc
MOVSX EAX,byte ptr [0x00485bbc]
CMP EAX,0x0
JNZ 0x001255bc
MOV EAX,dword ptr [0x00485bb8]
ADD EAX,0x1
MOV dword ptr [0x00485bb8],EAX
LAB_001255bc:
MOV EDI,dword ptr [RBP + -0x4]
LEA RDX,[RBP + -0x20]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x00125450
MOVSX EAX,byte ptr [0x00485bbc]
CMP EAX,0x0
JZ 0x001255ef
LEA RDI,[0x179f0f]
LEA RSI,[0x485bb0]
ADD RSI,0xc
CALL 0x00125530
LAB_001255ef:
CALL 0x00125990
ADD RSP,0x20
POP RBP
RET
|
void ok1(int param_1)
{
int1 local_28 [28];
int local_c;
local_c = param_1;
memset(local_28,0,0x18);
if ((local_c == 0) && (DAT_00485bbc == '\0')) {
DAT_00485bb8 = DAT_00485bb8 + 1;
}
vemit_tap(local_c,0,local_28);
if (DAT_00485bbc != '\0') {
emit_dir(&DAT_00179f0f,&DAT_00485bbc);
}
emit_endl();
return;
}
|
|
7,616 |
make_empty_page
|
eloqsql/storage/maria/ma_blockrec.c
|
static void make_empty_page(MARIA_HA *info, uchar *buff, uint page_type,
my_bool create_dir_entry)
{
uint block_size= info->s->block_size;
DBUG_ENTER("make_empty_page");
bzero(buff, PAGE_HEADER_SIZE(info->s));
#if !defined(DONT_ZERO_PAGE_BLOCKS) || defined(HAVE_valgrind)
/*
We zero the rest of the block to avoid getting old memory information
to disk and to allow the file to be compressed better if archived.
The code does not assume the block is zeroed.
*/
if (page_type != BLOB_PAGE)
bzero(buff+ PAGE_HEADER_SIZE(info->s),
block_size - PAGE_HEADER_SIZE(info->s));
#endif
buff[PAGE_TYPE_OFFSET]= (uchar) page_type;
buff[DIR_COUNT_OFFSET]= (int) create_dir_entry;
buff[DIR_FREE_OFFSET]= END_OF_DIR_FREE_LIST;
if (create_dir_entry)
{
/* Create directory entry to point to start of page with size 0 */
buff+= block_size - PAGE_SUFFIX_SIZE - DIR_ENTRY_SIZE;
int2store(buff, PAGE_HEADER_SIZE(info->s));
int2store(buff+2, 0);
}
DBUG_VOID_RETURN;
}
|
O0
|
c
|
make_empty_page:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %cl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movb %al, -0x15(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl 0x7bc(%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl 0xc18(%rax), %eax
addl $0xc, %eax
movl %eax, %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x2a2c0
cmpl $0x3, -0x14(%rbp)
je 0x7a0f6
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl 0xc18(%rax), %eax
addl $0xc, %eax
movl %eax, %eax
addq %rax, %rdi
movl -0x1c(%rbp), %eax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
movl 0xc18(%rcx), %ecx
addl $0xc, %ecx
subl %ecx, %eax
movl %eax, %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x2a2c0
movl -0x14(%rbp), %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x7(%rax)
movsbl -0x15(%rbp), %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x8(%rax)
movq -0x10(%rbp), %rax
movb $-0x1, 0x9(%rax)
cmpb $0x0, -0x15(%rbp)
je 0x7a16e
movl -0x1c(%rbp), %ecx
subl $0x4, %ecx
subl $0x4, %ecx
movq -0x10(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl 0xc18(%rax), %eax
addl $0xc, %eax
movw %ax, %cx
movq -0x28(%rbp), %rax
movw %cx, (%rax)
jmp 0x7a157
movq -0x10(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movw $0x0, (%rax)
jmp 0x7a16e
jmp 0x7a170
jmp 0x7a172
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
make_empty_page:
push rbp
mov rbp, rsp
sub rsp, 30h
mov al, cl
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov [rbp+var_15], al
mov rax, [rbp+var_8]
mov rax, [rax]
mov eax, [rax+7BCh]
mov [rbp+var_1C], eax
mov rdi, [rbp+var_10]
mov rax, [rbp+var_8]
mov rax, [rax]
mov eax, [rax+0C18h]
add eax, 0Ch
mov eax, eax
mov edx, eax
xor esi, esi
call _memset
cmp [rbp+var_14], 3
jz short loc_7A0F6
mov rdi, [rbp+var_10]
mov rax, [rbp+var_8]
mov rax, [rax]
mov eax, [rax+0C18h]
add eax, 0Ch
mov eax, eax
add rdi, rax
mov eax, [rbp+var_1C]
mov rcx, [rbp+var_8]
mov rcx, [rcx]
mov ecx, [rcx+0C18h]
add ecx, 0Ch
sub eax, ecx
mov eax, eax
mov edx, eax
xor esi, esi
call _memset
loc_7A0F6:
mov eax, [rbp+var_14]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+7], cl
movsx eax, [rbp+var_15]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+8], cl
mov rax, [rbp+var_10]
mov byte ptr [rax+9], 0FFh
cmp [rbp+var_15], 0
jz short loc_7A16E
mov ecx, [rbp+var_1C]
sub ecx, 4
sub ecx, 4
mov rax, [rbp+var_10]
mov ecx, ecx
add rax, rcx
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov [rbp+var_28], rax
mov rax, [rbp+var_8]
mov rax, [rax]
mov eax, [rax+0C18h]
add eax, 0Ch
mov cx, ax
mov rax, [rbp+var_28]
mov [rax], cx
jmp short $+2
loc_7A157:
mov rax, [rbp+var_10]
add rax, 2
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
mov word ptr [rax], 0
jmp short $+2
loc_7A16E:
jmp short $+2
loc_7A170:
jmp short $+2
loc_7A172:
add rsp, 30h
pop rbp
retn
|
_WORD * make_empty_page(long long a1, _BYTE *a2, int a3, char a4)
{
_WORD *result; // rax
_WORD *v5; // [rsp+8h] [rbp-28h]
int v6; // [rsp+14h] [rbp-1Ch]
v6 = *(_DWORD *)(*(_QWORD *)a1 + 1980LL);
memset(a2, 0LL, (unsigned int)(*(_DWORD *)(*(_QWORD *)a1 + 3096LL) + 12));
if ( a3 != 3 )
memset(
&a2[*(_DWORD *)(*(_QWORD *)a1 + 3096LL) + 12],
0LL,
(unsigned int)(v6 - (*(_DWORD *)(*(_QWORD *)a1 + 3096LL) + 12)));
a2[7] = a3;
a2[8] = a4;
result = a2;
a2[9] = -1;
if ( a4 )
{
v5 = &a2[v6 - 8];
*v5 = *(_DWORD *)(*(_QWORD *)a1 + 3096LL) + 12;
result = v5 + 1;
v5[1] = 0;
}
return result;
}
|
make_empty_page:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV AL,CL
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV byte ptr [RBP + -0x15],AL
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x7bc]
MOV dword ptr [RBP + -0x1c],EAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0xc18]
ADD EAX,0xc
MOV EAX,EAX
MOV EDX,EAX
XOR ESI,ESI
CALL 0x0012a2c0
CMP dword ptr [RBP + -0x14],0x3
JZ 0x0017a0f6
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0xc18]
ADD EAX,0xc
MOV EAX,EAX
ADD RDI,RAX
MOV EAX,dword ptr [RBP + -0x1c]
MOV RCX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RCX]
MOV ECX,dword ptr [RCX + 0xc18]
ADD ECX,0xc
SUB EAX,ECX
MOV EAX,EAX
MOV EDX,EAX
XOR ESI,ESI
CALL 0x0012a2c0
LAB_0017a0f6:
MOV EAX,dword ptr [RBP + -0x14]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x7],CL
MOVSX EAX,byte ptr [RBP + -0x15]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x8],CL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x9],0xff
CMP byte ptr [RBP + -0x15],0x0
JZ 0x0017a16e
MOV ECX,dword ptr [RBP + -0x1c]
SUB ECX,0x4
SUB ECX,0x4
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0xc18]
ADD EAX,0xc
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x28]
MOV word ptr [RAX],CX
JMP 0x0017a157
LAB_0017a157:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x2
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV word ptr [RAX],0x0
JMP 0x0017a16e
LAB_0017a16e:
JMP 0x0017a170
LAB_0017a170:
JMP 0x0017a172
LAB_0017a172:
ADD RSP,0x30
POP RBP
RET
|
void make_empty_page(long *param_1,void *param_2,int param_3,char param_4)
{
int iVar1;
short *psVar2;
iVar1 = *(int *)(*param_1 + 0x7bc);
memset(param_2,0,(ulong)(*(int *)(*param_1 + 0xc18) + 0xc));
if (param_3 != 3) {
memset((void *)((long)param_2 + (ulong)(*(int *)(*param_1 + 0xc18) + 0xc)),0,
(ulong)(uint)(iVar1 - (*(int *)(*param_1 + 0xc18) + 0xc)));
}
*(char *)((long)param_2 + 7) = (char)param_3;
*(char *)((long)param_2 + 8) = param_4;
*(int1 *)((long)param_2 + 9) = 0xff;
if (param_4 != '\0') {
psVar2 = (short *)((long)param_2 + (ulong)(iVar1 - 8));
*psVar2 = (short)*(int4 *)(*param_1 + 0xc18) + 0xc;
psVar2[1] = 0;
}
return;
}
|
|
7,617 |
make_empty_page
|
eloqsql/storage/maria/ma_blockrec.c
|
static void make_empty_page(MARIA_HA *info, uchar *buff, uint page_type,
my_bool create_dir_entry)
{
uint block_size= info->s->block_size;
DBUG_ENTER("make_empty_page");
bzero(buff, PAGE_HEADER_SIZE(info->s));
#if !defined(DONT_ZERO_PAGE_BLOCKS) || defined(HAVE_valgrind)
/*
We zero the rest of the block to avoid getting old memory information
to disk and to allow the file to be compressed better if archived.
The code does not assume the block is zeroed.
*/
if (page_type != BLOB_PAGE)
bzero(buff+ PAGE_HEADER_SIZE(info->s),
block_size - PAGE_HEADER_SIZE(info->s));
#endif
buff[PAGE_TYPE_OFFSET]= (uchar) page_type;
buff[DIR_COUNT_OFFSET]= (int) create_dir_entry;
buff[DIR_FREE_OFFSET]= END_OF_DIR_FREE_LIST;
if (create_dir_entry)
{
/* Create directory entry to point to start of page with size 0 */
buff+= block_size - PAGE_SUFFIX_SIZE - DIR_ENTRY_SIZE;
int2store(buff, PAGE_HEADER_SIZE(info->s));
int2store(buff+2, 0);
}
DBUG_VOID_RETURN;
}
|
O3
|
c
|
make_empty_page:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r15d
movl %edx, %r12d
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rax
movl 0x7bc(%rax), %r13d
movl 0xc18(%rax), %edx
addl $0xc, %edx
movq %rsi, %rdi
xorl %esi, %esi
callq 0x292c0
cmpl $0x3, %r12d
je 0x5f4df
movq (%r14), %rax
movl 0xc18(%rax), %eax
addl $0xc, %eax
leaq (%rbx,%rax), %rdi
movl %r13d, %edx
subl %eax, %edx
xorl %esi, %esi
callq 0x292c0
movb %r12b, 0x7(%rbx)
movb %r15b, 0x8(%rbx)
movb $-0x1, 0x9(%rbx)
testb %r15b, %r15b
je 0x5f50d
addl $-0x8, %r13d
movq (%r14), %rax
movl 0xc18(%rax), %eax
addl $0xc, %eax
movw %ax, (%rbx,%r13)
movw $0x0, 0x2(%rbx,%r13)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
make_empty_page:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r15d, ecx
mov r12d, edx
mov rbx, rsi
mov r14, rdi
mov rax, [rdi]
mov r13d, [rax+7BCh]
mov edx, [rax+0C18h]
add edx, 0Ch
mov rdi, rsi
xor esi, esi
call _memset
cmp r12d, 3
jz short loc_5F4DF
mov rax, [r14]
mov eax, [rax+0C18h]
add eax, 0Ch
lea rdi, [rbx+rax]
mov edx, r13d
sub edx, eax
xor esi, esi
call _memset
loc_5F4DF:
mov [rbx+7], r12b
mov [rbx+8], r15b
mov byte ptr [rbx+9], 0FFh
test r15b, r15b
jz short loc_5F50D
add r13d, 0FFFFFFF8h
mov rax, [r14]
mov eax, [rax+0C18h]
add eax, 0Ch
mov [rbx+r13], ax
mov word ptr [rbx+r13+2], 0
loc_5F50D:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long make_empty_page(long long a1, _BYTE *a2, int a3, char a4)
{
int v6; // r13d
long long result; // rax
long long v8; // rax
v6 = *(_DWORD *)(*(_QWORD *)a1 + 1980LL);
result = memset(a2, 0LL, (unsigned int)(*(_DWORD *)(*(_QWORD *)a1 + 3096LL) + 12));
if ( a3 != 3 )
{
v8 = (unsigned int)(*(_DWORD *)(*(_QWORD *)a1 + 3096LL) + 12);
result = memset(&a2[v8], 0LL, (unsigned int)(v6 - v8));
}
a2[7] = a3;
a2[8] = a4;
a2[9] = -1;
if ( a4 )
{
result = (unsigned int)(*(_DWORD *)(*(_QWORD *)a1 + 3096LL) + 12);
*(_DWORD *)&a2[v6 - 8] = (unsigned __int16)(*(_WORD *)(*(_QWORD *)a1 + 3096LL) + 12);
}
return result;
}
|
make_empty_page:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R15D,ECX
MOV R12D,EDX
MOV RBX,RSI
MOV R14,RDI
MOV RAX,qword ptr [RDI]
MOV R13D,dword ptr [RAX + 0x7bc]
MOV EDX,dword ptr [RAX + 0xc18]
ADD EDX,0xc
MOV RDI,RSI
XOR ESI,ESI
CALL 0x001292c0
CMP R12D,0x3
JZ 0x0015f4df
MOV RAX,qword ptr [R14]
MOV EAX,dword ptr [RAX + 0xc18]
ADD EAX,0xc
LEA RDI,[RBX + RAX*0x1]
MOV EDX,R13D
SUB EDX,EAX
XOR ESI,ESI
CALL 0x001292c0
LAB_0015f4df:
MOV byte ptr [RBX + 0x7],R12B
MOV byte ptr [RBX + 0x8],R15B
MOV byte ptr [RBX + 0x9],0xff
TEST R15B,R15B
JZ 0x0015f50d
ADD R13D,-0x8
MOV RAX,qword ptr [R14]
MOV EAX,dword ptr [RAX + 0xc18]
ADD EAX,0xc
MOV word ptr [RBX + R13*0x1],AX
MOV word ptr [RBX + R13*0x1 + 0x2],0x0
LAB_0015f50d:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void make_empty_page(long *param_1,void *param_2,int param_3,char param_4)
{
int iVar1;
uint uVar2;
ulong uVar3;
iVar1 = *(int *)(*param_1 + 0x7bc);
memset(param_2,0,(ulong)(*(int *)(*param_1 + 0xc18) + 0xc));
if (param_3 != 3) {
uVar2 = *(int *)(*param_1 + 0xc18) + 0xc;
memset((void *)((long)param_2 + (ulong)uVar2),0,(ulong)(iVar1 - uVar2));
}
*(char *)((long)param_2 + 7) = (char)param_3;
*(char *)((long)param_2 + 8) = param_4;
*(int1 *)((long)param_2 + 9) = 0xff;
if (param_4 != '\0') {
uVar3 = (ulong)(iVar1 - 8);
*(short *)((long)param_2 + uVar3) = (short)*(int4 *)(*param_1 + 0xc18) + 0xc;
*(int2 *)((long)param_2 + uVar3 + 2) = 0;
}
return;
}
|
|
7,618 |
minja::Value::Value(std::shared_ptr<std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&)>> const&)
|
monkey531[P]llama/common/minja.hpp
|
Value(const std::shared_ptr<CallableType> & callable) : object_(std::make_shared<ObjectType>()), callable_(callable) {}
|
O3
|
cpp
|
minja::Value::Value(std::shared_ptr<std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&)>> const&):
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
movl $0x30, %edi
callq 0x1a8c0
movabsq $0x100000001, %rcx # imm = 0x100000001
movq %rcx, 0x8(%rax)
leaq 0x93999(%rip), %rcx # 0x12a448
addq $0x10, %rcx
movq %rcx, (%rax)
movq %rax, %rcx
addq $0x10, %rcx
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movq $0x0, 0x20(%rax)
movq %rax, 0x28(%rbx)
movq %rcx, 0x20(%rbx)
movq (%r14), %rax
movq %rax, 0x30(%rbx)
movq 0x8(%r14), %rax
movq %rax, 0x38(%rbx)
testq %rax, %rax
je 0x96afd
movq 0x95499(%rip), %rcx # 0x12bf88
cmpb $0x0, (%rcx)
je 0x96af9
incl 0x8(%rax)
jmp 0x96afd
lock
incl 0x8(%rax)
leaq 0x40(%rbx), %r14
movb $0x0, 0x40(%rbx)
movq $0x0, 0x48(%rbx)
movq %r14, %rdi
movl $0x1, %esi
callq 0x58f20
movq %r14, %rdi
movl $0x1, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x58f20
movq %rax, %r14
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x96b3f
callq 0x6de32
movq %rbx, %rdi
callq 0x87e4a
movq %r14, %rdi
callq 0x1af90
nop
|
_ZN5minja5ValueC2ERKSt10shared_ptrISt8functionIFS0_RKS1_INS_7ContextEERNS_14ArgumentsValueEEEE:
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi+10h], xmm0
movups xmmword ptr [rdi], xmm0
mov edi, 30h ; '0'; unsigned __int64
call __Znwm; operator new(ulong)
mov rcx, 100000001h
mov [rax+8], rcx
lea rcx, _ZTVSt23_Sp_counted_ptr_inplaceIN8nlohmann16json_abi_v3_11_311ordered_mapINS1_10basic_jsonIS2_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueESt4lessISE_ESaISt4pairIKSE_SG_EEEESaISN_ELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<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::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<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::allocator<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::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<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::_Lock_policy)2>
add rcx, 10h
mov [rax], rcx
mov rcx, rax
add rcx, 10h
xorps xmm0, xmm0
movups xmmword ptr [rax+10h], xmm0
mov qword ptr [rax+20h], 0
mov [rbx+28h], rax
mov [rbx+20h], rcx
mov rax, [r14]
mov [rbx+30h], rax
mov rax, [r14+8]
mov [rbx+38h], rax
test rax, rax
jz short loc_96AFD
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_96AF9
inc dword ptr [rax+8]
jmp short loc_96AFD
loc_96AF9:
lock inc dword ptr [rax+8]
loc_96AFD:
lea r14, [rbx+40h]
mov byte ptr [rbx+40h], 0
mov qword ptr [rbx+48h], 0
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
mov esi, 1
add rsp, 8
pop rbx
pop r14
jmp _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov r14, rax
mov rdi, [rbx+18h]
test rdi, rdi
jz short loc_96B3F
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_96B3F:
mov rdi, rbx
call _ZNSt23enable_shared_from_thisIN5minja5ValueEED2Ev; std::enable_shared_from_this<minja::Value>::~enable_shared_from_this()
mov rdi, r14
call __Unwind_Resume
|
long long minja::Value::Value(long long a1, _QWORD *a2)
{
long long v2; // rax
long long result; // rax
*(_OWORD *)(a1 + 16) = 0LL;
*(_OWORD *)a1 = 0LL;
v2 = operator new(0x30uLL);
*(_QWORD *)(v2 + 8) = 0x100000001LL;
*(_QWORD *)v2 = &`vtable for'std::_Sp_counted_ptr_inplace<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::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<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::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<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::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::allocator<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::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<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::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<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::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>>,(__gnu_cxx::_Lock_policy)2>
+ 2;
*(_OWORD *)(v2 + 16) = 0LL;
*(_QWORD *)(v2 + 32) = 0LL;
*(_QWORD *)(a1 + 40) = v2;
*(_QWORD *)(a1 + 32) = v2 + 16;
*(_QWORD *)(a1 + 48) = *a2;
result = a2[1];
*(_QWORD *)(a1 + 56) = result;
if ( result )
{
if ( _libc_single_threaded )
++*(_DWORD *)(result + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(result + 8));
}
*(_BYTE *)(a1 + 64) = 0;
*(_QWORD *)(a1 + 72) = 0LL;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)(a1 + 64));
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)(a1 + 64));
return result;
}
|
Value:
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x10],XMM0
MOVUPS xmmword ptr [RDI],XMM0
LAB_00196a90:
MOV EDI,0x30
CALL 0x0011a8c0
LAB_00196a9a:
MOV RCX,0x100000001
MOV qword ptr [RAX + 0x8],RCX
LEA RCX,[0x22a448]
ADD RCX,0x10
MOV qword ptr [RAX],RCX
MOV RCX,RAX
ADD RCX,0x10
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + 0x10],XMM0
MOV qword ptr [RAX + 0x20],0x0
MOV qword ptr [RBX + 0x28],RAX
MOV qword ptr [RBX + 0x20],RCX
MOV RAX,qword ptr [R14]
MOV qword ptr [RBX + 0x30],RAX
MOV RAX,qword ptr [R14 + 0x8]
MOV qword ptr [RBX + 0x38],RAX
TEST RAX,RAX
JZ 0x00196afd
MOV RCX,qword ptr [0x0022bf88]
CMP byte ptr [RCX],0x0
JZ 0x00196af9
INC dword ptr [RAX + 0x8]
JMP 0x00196afd
LAB_00196af9:
INC.LOCK dword ptr [RAX + 0x8]
LAB_00196afd:
LEA R14,[RBX + 0x40]
MOV byte ptr [RBX + 0x40],0x0
MOV qword ptr [RBX + 0x48],0x0
MOV RDI,R14
MOV ESI,0x1
CALL 0x00158f20
MOV RDI,R14
MOV ESI,0x1
ADD RSP,0x8
POP RBX
POP R14
JMP 0x00158f20
|
/* minja::Value::Value(std::shared_ptr<std::function<minja::Value (std::shared_ptr<minja::Context>
const&, minja::ArgumentsValue&)> > const&) */
void __thiscall minja::Value::Value(Value *this,shared_ptr *param_1)
{
long lVar1;
int8 *puVar2;
bool bVar3;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
/* try { // try from 00196a90 to 00196a99 has its CatchHandler @ 00196b2e */
puVar2 = (int8 *)operator_new(0x30);
puVar2[1] = 0x100000001;
*puVar2 = &PTR___Sp_counted_ptr_inplace_0022a458;
puVar2[2] = 0;
puVar2[3] = 0;
puVar2[4] = 0;
*(int8 **)(this + 0x28) = puVar2;
*(int8 **)(this + 0x20) = puVar2 + 2;
*(int8 *)(this + 0x30) = *(int8 *)param_1;
lVar1 = *(long *)(param_1 + 8);
*(long *)(this + 0x38) = 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;
}
}
bVar3 = (bool)((char)this + '@');
this[0x40] = (Value)0x0;
*(int8 *)(this + 0x48) = 0;
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar3);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar3);
return;
}
|
|
7,619 |
mark_blocks_free
|
eloqsql/mysys/my_alloc.c
|
static inline void mark_blocks_free(MEM_ROOT* root)
{
reg1 USED_MEM *next;
reg2 USED_MEM **last;
/* iterate through (partially) free blocks, mark them free */
last= &root->free;
for (next= root->free; next; next= *(last= &next->next))
{
next->left= next->size - ALIGN_SIZE(sizeof(USED_MEM));
TRASH_MEM(next);
}
/* Combine the free and the used list */
*last= next=root->used;
/* now go through the used blocks and mark them free */
for (; next; next= next->next)
{
next->left= next->size - ALIGN_SIZE(sizeof(USED_MEM));
TRASH_MEM(next);
}
/* Now everything is set; Indicate that nothing is used anymore */
root->used= 0;
root->first_block_usage= 0;
root->block_num= 4;
}
|
O0
|
c
|
mark_blocks_free:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x3622f
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
subq $0x18, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x36218
jmp 0x3621a
jmp 0x3621c
jmp 0x3621e
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq (%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x361fb
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rcx
movq %rcx, -0x10(%rbp)
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
cmpq $0x0, -0x10(%rbp)
je 0x36272
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
subq $0x18, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x3625f
jmp 0x36261
jmp 0x36263
jmp 0x36265
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x36242
movq -0x8(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x2c(%rax)
movq -0x8(%rbp), %rax
movl $0x4, 0x28(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
mark_blocks_free:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_18], rax
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_10], rax
loc_361FB:
cmp [rbp+var_10], 0
jz short loc_3622F
mov rax, [rbp+var_10]
mov rcx, [rax+10h]
sub rcx, 18h
mov rax, [rbp+var_10]
mov [rax+8], rcx
jmp short $+2
loc_36218:
jmp short $+2
loc_3621A:
jmp short $+2
loc_3621C:
jmp short $+2
loc_3621E:
mov rax, [rbp+var_10]
mov [rbp+var_18], rax
mov rax, [rax]
mov [rbp+var_10], rax
jmp short loc_361FB
loc_3622F:
mov rax, [rbp+var_8]
mov rcx, [rax+8]
mov [rbp+var_10], rcx
mov rax, [rbp+var_18]
mov [rax], rcx
loc_36242:
cmp [rbp+var_10], 0
jz short loc_36272
mov rax, [rbp+var_10]
mov rcx, [rax+10h]
sub rcx, 18h
mov rax, [rbp+var_10]
mov [rax+8], rcx
jmp short $+2
loc_3625F:
jmp short $+2
loc_36261:
jmp short $+2
loc_36263:
jmp short $+2
loc_36265:
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_10], rax
jmp short loc_36242
loc_36272:
mov rax, [rbp+var_8]
mov qword ptr [rax+8], 0
mov rax, [rbp+var_8]
mov dword ptr [rax+2Ch], 0
mov rax, [rbp+var_8]
mov dword ptr [rax+28h], 4
pop rbp
retn
|
long long mark_blocks_free(long long a1)
{
long long result; // rax
_QWORD *v2; // [rsp+0h] [rbp-18h]
_QWORD *i; // [rsp+8h] [rbp-10h]
_QWORD *v4; // [rsp+8h] [rbp-10h]
v2 = (_QWORD *)a1;
for ( i = *(_QWORD **)a1; i; i = (_QWORD *)*i )
{
i[1] = i[2] - 24LL;
v2 = i;
}
v4 = *(_QWORD **)(a1 + 8);
*v2 = v4;
while ( v4 )
{
v4[1] = v4[2] - 24LL;
v4 = (_QWORD *)*v4;
}
*(_QWORD *)(a1 + 8) = 0LL;
*(_DWORD *)(a1 + 44) = 0;
result = a1;
*(_DWORD *)(a1 + 40) = 4;
return result;
}
|
mark_blocks_free:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x10],RAX
LAB_001361fb:
CMP qword ptr [RBP + -0x10],0x0
JZ 0x0013622f
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x10]
SUB RCX,0x18
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],RCX
JMP 0x00136218
LAB_00136218:
JMP 0x0013621a
LAB_0013621a:
JMP 0x0013621c
LAB_0013621c:
JMP 0x0013621e
LAB_0013621e:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x10],RAX
JMP 0x001361fb
LAB_0013622f:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x10],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
LAB_00136242:
CMP qword ptr [RBP + -0x10],0x0
JZ 0x00136272
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x10]
SUB RCX,0x18
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],RCX
JMP 0x0013625f
LAB_0013625f:
JMP 0x00136261
LAB_00136261:
JMP 0x00136263
LAB_00136263:
JMP 0x00136265
LAB_00136265:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x10],RAX
JMP 0x00136242
LAB_00136272:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x8],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x2c],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x28],0x4
POP RBP
RET
|
void mark_blocks_free(int8 *param_1)
{
int8 *local_20;
int8 *local_18;
local_20 = param_1;
for (local_18 = (int8 *)*param_1; local_18 != (int8 *)0x0;
local_18 = (int8 *)*local_18) {
local_18[1] = local_18[2] + -0x18;
local_20 = local_18;
}
local_18 = (int8 *)param_1[1];
*local_20 = local_18;
for (; local_18 != (int8 *)0x0; local_18 = (int8 *)*local_18) {
local_18[1] = local_18[2] + -0x18;
}
param_1[1] = 0;
*(int4 *)((long)param_1 + 0x2c) = 0;
*(int4 *)(param_1 + 5) = 4;
return;
}
|
|
7,620 |
CLI::Formatter::make_option_usage[abi:cxx11](CLI::Option const*) const
|
MikePodsytnik[P]TCRtrie/build_O3/_deps/cli11-src/include/CLI/impl/Formatter_inl.hpp
|
CLI11_INLINE std::string Formatter::make_option_usage(const Option *opt) const {
// Note that these are positionals usages
std::stringstream out;
out << make_option_name(opt, true);
if(opt->get_expected_max() >= detail::expected_max_vector_size)
out << "...";
else if(opt->get_expected_max() > 1)
out << "(" << opt->get_expected() << "x)";
return opt->get_required() ? out.str() : "[" + out.str() + "]";
}
|
O3
|
cpp
|
CLI::Formatter::make_option_usage[abi:cxx11](CLI::Option const*) const:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1c8, %rsp # imm = 0x1C8
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x40(%rsp), %rdi
callq 0x72d0
movq (%r15), %rax
movq %rsp, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl $0x1, %ecx
callq *0x60(%rax)
leaq 0x50(%rsp), %r15
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %r15, %rdi
callq 0x74b0
leaq 0x10(%rsp), %r12
movq -0x10(%r12), %rdi
cmpq %r12, %rdi
je 0x11849
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x7430
movl 0x174(%r14), %eax
cmpl $0x1fffffff, %eax # imm = 0x1FFFFFFF
jle 0x11865
movl $0x3, %edx
leaq 0x26672(%rip), %rsi # 0x37ed5
jmp 0x1189c
cmpl $0x2, %eax
jl 0x118a4
leaq 0x25b8d(%rip), %rsi # 0x373fe
movl $0x1, %edx
movq %r15, %rdi
callq 0x74b0
movl 0x170(%r14), %esi
movq %r15, %rdi
callq 0x7760
movq %rax, %r15
movl $0x2, %edx
leaq 0x2665d(%rip), %rsi # 0x37ef9
movq %r15, %rdi
callq 0x74b0
cmpb $0x1, 0x20(%r14)
jne 0x118bd
leaq 0x58(%rsp), %rsi
movq %rbx, %rdi
callq 0x7680
jmp 0x119a6
leaq 0x58(%rsp), %rsi
leaq 0x20(%rsp), %rdi
callq 0x7680
leaq 0x26665(%rip), %rcx # 0x37f38
leaq 0x20(%rsp), %rdi
movl $0x1, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x74a0
movq %r12, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x11908
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x11910
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rsp, %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x26579(%rip), %rsi # 0x37eaa
callq 0x77e0
leaq 0x10(%rbx), %rdx
movq %rdx, (%rbx)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
je 0x11958
movq %rsi, (%rbx)
movq (%rcx), %rdx
movq %rdx, 0x10(%rbx)
jmp 0x1195e
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x1198b
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x7430
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x119a6
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x7430
movq 0x3859b(%rip), %rsi # 0x49f48
leaq 0x40(%rsp), %rdi
callq 0x7330
leaq 0xc0(%rsp), %rdi
callq 0x7150
movq %rbx, %rax
addq $0x1c8, %rsp # imm = 0x1C8
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x119f4
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x7430
jmp 0x119f4
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x11a30
movq 0x30(%rsp), %rsi
jmp 0x11a21
jmp 0x11a2d
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x11a30
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x7430
jmp 0x11a30
jmp 0x11a2d
movq %rax, %rbx
movq 0x38511(%rip), %rsi # 0x49f48
leaq 0x40(%rsp), %rdi
callq 0x7330
leaq 0xc0(%rsp), %rdi
callq 0x7150
movq %rbx, %rdi
callq 0x7780
|
_ZNK3CLI9Formatter17make_option_usageB5cxx11EPKNS_6OptionE:
push r15
push r14
push r12
push rbx
sub rsp, 1C8h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
lea rdi, [rsp+1E8h+var_1A8]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void)
mov rax, [r15]
mov rdi, rsp
mov rsi, r15
mov rdx, r14
mov ecx, 1
call qword ptr [rax+60h]
lea r15, [rsp+1E8h+var_198]
mov rsi, [rsp+1E8h+var_1E8]
mov rdx, [rsp+1E8h+var_1E0]
mov rdi, r15
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea r12, [rsp+1E8h+var_1D8]
mov rdi, [r12-10h]; void *
cmp rdi, r12
jz short loc_11849
mov rsi, [rsp+1E8h+var_1D8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_11849:
mov eax, [r14+174h]
cmp eax, 1FFFFFFFh
jle short loc_11865
mov edx, 3
lea rsi, asc_37ED4+1; "..."
jmp short loc_1189C
loc_11865:
cmp eax, 2
jl short loc_118A4
lea rsi, aFailedParsingN+16h; "("
mov edx, 1
mov rdi, r15
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov esi, [r14+170h]
mov rdi, r15
call __ZNSolsEi; std::ostream::operator<<(int)
mov r15, rax
mov edx, 2
lea rsi, asc_37EF9; "x)"
loc_1189C:
mov rdi, r15
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
loc_118A4:
cmp byte ptr [r14+20h], 1
jnz short loc_118BD
lea rsi, [rsp+1E8h+var_190]
mov rdi, rbx
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
jmp loc_119A6
loc_118BD:
lea rsi, [rsp+1E8h+var_190]
lea rdi, [rsp+1E8h+var_1C8]
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
lea rcx, aNotInRange+0Eh; "["
lea rdi, [rsp+1E8h+var_1C8]
mov r8d, 1
xor esi, esi
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong)
mov [rsp+1E8h+var_1E8], r12
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jz short loc_11908
mov [rsp+1E8h+var_1E8], rdx
mov rdx, [rcx]
mov [rsp+1E8h+var_1D8], rdx
jmp short loc_11910
loc_11908:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r12], xmm0
loc_11910:
mov rdx, [rax+8]
mov rdi, rsp
mov [rdi+8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
lea rsi, aOfTheFollowing+26h; "]"
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea rdx, [rbx+10h]
mov [rbx], rdx
mov rsi, [rax]
mov rcx, rax
add rcx, 10h
cmp rsi, rcx
jz short loc_11958
mov [rbx], rsi
mov rdx, [rcx]
mov [rbx+10h], rdx
jmp short loc_1195E
loc_11958:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [rdx], xmm0
loc_1195E:
mov rdx, [rax+8]
mov [rbx+8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
mov rdi, [rsp+1E8h+var_1E8]; void *
cmp rdi, r12
jz short loc_1198B
mov rsi, [rsp+1E8h+var_1D8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1198B:
lea rax, [rsp+1E8h+var_1B8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_119A6
mov rsi, [rsp+1E8h+var_1B8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_119A6:
mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+1E8h+var_1A8]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
lea rdi, [rsp+1E8h+var_128]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rax, rbx
add rsp, 1C8h
pop rbx
pop r12
pop r14
pop r15
retn
mov rbx, rax
mov rdi, [rsp+0]; void *
cmp rdi, r12
jz short loc_119F4
mov rsi, [rsp+arg_8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_119F4
mov rbx, rax
loc_119F4:
lea rax, [rsp+arg_28]
mov rdi, [rax-10h]
cmp rdi, rax
jz short loc_11A30
mov rsi, [rsp+arg_28]
jmp short loc_11A21
jmp short loc_11A2D
mov rbx, rax
lea rax, [rsp+arg_8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_11A30
mov rsi, [rsp+arg_8]
loc_11A21:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_11A30
jmp short $+2
loc_11A2D:
mov rbx, rax
loc_11A30:
mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+arg_38]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
lea rdi, [rsp+arg_B8]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rdi, rbx
call __Unwind_Resume
|
long long CLI::Formatter::make_option_usage[abi:cxx11](long long a1, long long a2, long long a3)
{
_BYTE *v4; // r15
int v5; // eax
long long v6; // rdx
char *v7; // rsi
long long v8; // rax
__int128 *v9; // rcx
long long v10; // rax
_OWORD *v11; // rcx
void *v13; // [rsp+0h] [rbp-1E8h] BYREF
long long v14; // [rsp+8h] [rbp-1E0h]
__int128 v15; // [rsp+10h] [rbp-1D8h] BYREF
void *v16[2]; // [rsp+20h] [rbp-1C8h] BYREF
long long v17; // [rsp+30h] [rbp-1B8h] BYREF
_BYTE v18[16]; // [rsp+40h] [rbp-1A8h] BYREF
_BYTE v19[8]; // [rsp+50h] [rbp-198h] BYREF
_BYTE v20[104]; // [rsp+58h] [rbp-190h] BYREF
_BYTE v21[296]; // [rsp+C0h] [rbp-128h] BYREF
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v18);
(*(void ( **)(void **, long long, long long, long long))(*(_QWORD *)a2 + 96LL))(&v13, a2, a3, 1LL);
v4 = v19;
std::__ostream_insert<char,std::char_traits<char>>(v19, v13, v14);
if ( v13 != &v15 )
operator delete(v13, v15 + 1);
v5 = *(_DWORD *)(a3 + 372);
if ( v5 <= 0x1FFFFFFF )
{
if ( v5 < 2 )
goto LABEL_8;
std::__ostream_insert<char,std::char_traits<char>>(v19, "(", 1LL);
v4 = (_BYTE *)std::ostream::operator<<(v19, *(unsigned int *)(a3 + 368));
v6 = 2LL;
v7 = "x)";
}
else
{
v6 = 3LL;
v7 = "...";
}
std::__ostream_insert<char,std::char_traits<char>>(v4, v7, v6);
LABEL_8:
if ( *(_BYTE *)(a3 + 32) == 1 )
{
std::stringbuf::str(a1, v20);
}
else
{
std::stringbuf::str(v16, v20);
v8 = std::string::replace(v16, 0LL, 0LL);
v13 = &v15;
v9 = (__int128 *)(v8 + 16);
if ( *(_QWORD *)v8 == v8 + 16 )
{
v15 = *v9;
}
else
{
v13 = *(void **)v8;
*(_QWORD *)&v15 = *(_QWORD *)v9;
}
v14 = *(_QWORD *)(v8 + 8);
*(_QWORD *)v8 = v9;
*(_QWORD *)(v8 + 8) = 0LL;
*(_BYTE *)(v8 + 16) = 0;
v10 = std::string::append(&v13, "]");
*(_QWORD *)a1 = a1 + 16;
v11 = (_OWORD *)(v10 + 16);
if ( *(_QWORD *)v10 == v10 + 16 )
{
*(_OWORD *)(a1 + 16) = *v11;
}
else
{
*(_QWORD *)a1 = *(_QWORD *)v10;
*(_QWORD *)(a1 + 16) = *(_QWORD *)v11;
}
*(_QWORD *)(a1 + 8) = *(_QWORD *)(v10 + 8);
*(_QWORD *)v10 = v11;
*(_QWORD *)(v10 + 8) = 0LL;
*(_BYTE *)(v10 + 16) = 0;
if ( v13 != &v15 )
operator delete(v13, v15 + 1);
if ( v16[0] != &v17 )
operator delete(v16[0], v17 + 1);
}
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(
v18,
&`VTT for'std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>);
std::ios_base::~ios_base((std::ios_base *)v21);
return a1;
}
|
make_option_usage[abi:cxx11]:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x1c8
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
LEA RDI,[RSP + 0x40]
CALL 0x001072d0
MOV RAX,qword ptr [R15]
LAB_00111806:
MOV RDI,RSP
MOV RSI,R15
MOV RDX,R14
MOV ECX,0x1
CALL qword ptr [RAX + 0x60]
LEA R15,[RSP + 0x50]
MOV RSI,qword ptr [RSP]
MOV RDX,qword ptr [RSP + 0x8]
LAB_00111825:
MOV RDI,R15
CALL 0x001074b0
LEA R12,[RSP + 0x10]
MOV RDI,qword ptr [R12 + -0x10]
CMP RDI,R12
JZ 0x00111849
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x00107430
LAB_00111849:
MOV EAX,dword ptr [R14 + 0x174]
CMP EAX,0x1fffffff
JLE 0x00111865
MOV EDX,0x3
LEA RSI,[0x137ed5]
JMP 0x0011189c
LAB_00111865:
CMP EAX,0x2
JL 0x001118a4
LAB_0011186a:
LEA RSI,[0x1373fe]
MOV EDX,0x1
MOV RDI,R15
CALL 0x001074b0
MOV ESI,dword ptr [R14 + 0x170]
MOV RDI,R15
CALL 0x00107760
MOV R15,RAX
MOV EDX,0x2
LEA RSI,[0x137ef9]
LAB_0011189c:
MOV RDI,R15
CALL 0x001074b0
LAB_001118a4:
CMP byte ptr [R14 + 0x20],0x1
JNZ 0x001118bd
LEA RSI,[RSP + 0x58]
MOV RDI,RBX
CALL 0x00107680
JMP 0x001119a6
LAB_001118bd:
LEA RSI,[RSP + 0x58]
LAB_001118c2:
LEA RDI,[RSP + 0x20]
CALL 0x00107680
LAB_001118cc:
LEA RCX,[0x137f38]
LEA RDI,[RSP + 0x20]
MOV R8D,0x1
XOR ESI,ESI
XOR EDX,EDX
CALL 0x001074a0
MOV qword ptr [RSP],R12
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JZ 0x00111908
MOV qword ptr [RSP],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x10],RDX
JMP 0x00111910
LAB_00111908:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R12],XMM0
LAB_00111910:
MOV RDX,qword ptr [RAX + 0x8]
MOV RDI,RSP
MOV qword ptr [RDI + 0x8],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
LAB_0011192a:
LEA RSI,[0x137eaa]
CALL 0x001077e0
LAB_00111936:
LEA RDX,[RBX + 0x10]
MOV qword ptr [RBX],RDX
MOV RSI,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RSI,RCX
JZ 0x00111958
MOV qword ptr [RBX],RSI
MOV RDX,qword ptr [RCX]
MOV qword ptr [RBX + 0x10],RDX
JMP 0x0011195e
LAB_00111958:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [RDX],XMM0
LAB_0011195e:
MOV RDX,qword ptr [RAX + 0x8]
MOV qword ptr [RBX + 0x8],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
MOV RDI,qword ptr [RSP]
CMP RDI,R12
JZ 0x0011198b
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x00107430
LAB_0011198b:
LEA RAX,[RSP + 0x30]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001119a6
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
CALL 0x00107430
LAB_001119a6:
MOV RSI,qword ptr [0x00149f48]
LEA RDI,[RSP + 0x40]
CALL 0x00107330
LEA RDI,[RSP + 0xc0]
CALL 0x00107150
MOV RAX,RBX
ADD RSP,0x1c8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* CLI::Formatter::make_option_usage[abi:cxx11](CLI::Option const*) const */
Option * CLI::Formatter::make_option_usage_abi_cxx11_(Option *param_1)
{
ostream *this;
long *plVar1;
long *plVar2;
long in_RDX;
long lVar3;
long *in_RSI;
char *pcVar4;
long *local_1e8;
long local_1e0;
long local_1d8;
long lStack_1d0;
long *local_1c8 [2];
long local_1b8 [2];
stringstream local_1a8 [16];
ostream local_198 [112];
ios_base local_128 [264];
std::__cxx11::stringstream::stringstream(local_1a8);
/* try { // try from 00111806 to 00111816 has its CatchHandler @ 00111a2b */
(**(code **)(*in_RSI + 0x60))(&local_1e8);
this = local_198;
/* try { // try from 00111825 to 0011182c has its CatchHandler @ 00111a0b */
std::__ostream_insert<char,std::char_traits<char>>(this,(char *)local_1e8,local_1e0);
if (local_1e8 != &local_1d8) {
operator_delete(local_1e8,local_1d8 + 1);
}
if (*(int *)(in_RDX + 0x174) < 0x20000000) {
if (*(int *)(in_RDX + 0x174) < 2) goto LAB_001118a4;
/* try { // try from 0011186a to 001118b7 has its CatchHandler @ 00111a2d */
std::__ostream_insert<char,std::char_traits<char>>(this,"(",1);
this = (ostream *)std::ostream::operator<<(this,*(int *)(in_RDX + 0x170));
lVar3 = 2;
pcVar4 = "x)";
}
else {
lVar3 = 3;
pcVar4 = "...";
}
std::__ostream_insert<char,std::char_traits<char>>(this,pcVar4,lVar3);
LAB_001118a4:
if (*(char *)(in_RDX + 0x20) == '\x01') {
std::__cxx11::stringbuf::str();
}
else {
/* try { // try from 001118c2 to 001118cb has its CatchHandler @ 00111a09 */
std::__cxx11::stringbuf::str();
/* try { // try from 001118cc to 001118e6 has its CatchHandler @ 001119f1 */
plVar1 = (long *)std::__cxx11::string::replace((ulong)local_1c8,0,(char *)0x0,0x137f38);
plVar2 = plVar1 + 2;
if ((long *)*plVar1 == plVar2) {
local_1d8 = *plVar2;
lStack_1d0 = plVar1[3];
local_1e8 = &local_1d8;
}
else {
local_1d8 = *plVar2;
local_1e8 = (long *)*plVar1;
}
local_1e0 = plVar1[1];
*plVar1 = (long)plVar2;
plVar1[1] = 0;
*(int1 *)(plVar1 + 2) = 0;
/* try { // try from 0011192a to 00111935 has its CatchHandler @ 001119d6 */
plVar1 = (long *)std::__cxx11::string::append((char *)&local_1e8);
*(Option **)param_1 = param_1 + 0x10;
plVar2 = plVar1 + 2;
if ((long *)*plVar1 == plVar2) {
lVar3 = plVar1[3];
*(long *)(param_1 + 0x10) = *plVar2;
*(long *)(param_1 + 0x18) = lVar3;
}
else {
*(long **)param_1 = (long *)*plVar1;
*(long *)(param_1 + 0x10) = *plVar2;
}
*(long *)(param_1 + 8) = plVar1[1];
*plVar1 = (long)plVar2;
plVar1[1] = 0;
*(int1 *)(plVar1 + 2) = 0;
if (local_1e8 != &local_1d8) {
operator_delete(local_1e8,local_1d8 + 1);
}
if (local_1c8[0] != local_1b8) {
operator_delete(local_1c8[0],local_1b8[0] + 1);
}
}
std::__cxx11::stringstream::~stringstream(local_1a8);
std::ios_base::~ios_base(local_128);
return param_1;
}
|
|
7,621 |
common_sampler_prev_str[abi:cxx11](common_sampler*, llama_context*, int)
|
monkey531[P]llama/common/sampling.cpp
|
std::string common_sampler_prev_str(common_sampler * gsmpl, llama_context * ctx_main, int n) {
n = std::min(n, (int) gsmpl->prev.size());
if (n <= 0) {
return "";
}
std::string result;
result.reserve(8*n); // 8 is the average length of a token [citation needed], TODO: compute this from the vocab
for (int i = n - 1; i >= 0; i--) {
const llama_token id = gsmpl->prev.rat(i);
GGML_ASSERT(id != LLAMA_TOKEN_NULL && "null token in the sampling history - should not happen");
result += common_token_to_piece(ctx_main, id);
}
return result;
}
|
O1
|
cpp
|
common_sampler_prev_str[abi:cxx11](common_sampler*, llama_context*, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %ecx, %r12d
movl 0x150(%rsi), %eax
cmpl %ecx, %eax
cmovll %eax, %r12d
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
testl %r12d, %r12d
jle 0xd368f
movq %rdx, %r14
movq %rsi, %r15
movq %rax, (%rsp)
movq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
leal (,%r12,8), %esi
movq %rbx, %rdi
callq 0x1bdd0
addq $0x148, %r15 # imm = 0x148
leaq 0x18(%rsp), %rbp
movl %r12d, %r13d
incq %r13
leaq 0x8(%rsp), %r12
leaq -0x2(%r13), %rsi
movq %r15, %rdi
callq 0xd423a
movl (%rax), %edx
cmpl $-0x1, %edx
je 0xd36b3
movq %r12, %rdi
movq %r14, %rsi
movl $0x1, %ecx
callq 0x780a3
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x1b270
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0xd3684
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b910
decq %r13
cmpq $0x1, %r13
jg 0xd3638
jmp 0xd36a1
leaq 0x2135e(%rip), %rdx # 0xf49f4
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x28a68
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x29ceb(%rip), %rdi # 0xfd3a5
leaq 0x19f14(%rip), %rdx # 0xed5d5
leaq 0x29eb8(%rip), %rcx # 0xfd580
movl $0x1a1, %esi # imm = 0x1A1
xorl %eax, %eax
callq 0x1bef0
jmp 0xd36f6
jmp 0xd36f6
jmp 0xd36f6
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0xd36f9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b910
jmp 0xd36f9
movq %rax, %r14
movq (%rbx), %rdi
cmpq (%rsp), %rdi
je 0xd3711
movq (%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x1b910
movq %r14, %rdi
callq 0x1bff0
|
_Z23common_sampler_prev_strB5cxx11P14common_samplerP13llama_contexti:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r12d, ecx
mov eax, [rsi+150h]
cmp eax, ecx
cmovl r12d, eax
mov rbx, rdi
lea rax, [rdi+10h]
mov [rdi], rax
test r12d, r12d
jle loc_D368F
mov r14, rdx
mov r15, rsi
mov [rsp+58h+var_58], rax
mov qword ptr [rbx+8], 0
mov byte ptr [rbx+10h], 0
lea esi, ds:0[r12*8]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
add r15, 148h
lea rbp, [rsp+58h+var_40]
mov r13d, r12d
inc r13
lea r12, [rsp+58h+var_50]
loc_D3638:
lea rsi, [r13-2]
mov rdi, r15
call _ZNK11ring_bufferIiE3ratEm; ring_buffer<int>::rat(ulong)
mov edx, [rax]
cmp edx, 0FFFFFFFFh
jz short loc_D36B3
mov rdi, r12
mov rsi, r14
mov ecx, 1
call _Z21common_token_to_pieceB5cxx11PK13llama_contextib; common_token_to_piece(llama_context const*,int,bool)
mov rsi, [rsp+58h+var_50]
mov rdx, [rsp+58h+var_48]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rdi, [rsp+58h+var_50]; void *
cmp rdi, rbp
jz short loc_D3684
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_D3684:
dec r13
cmp r13, 1
jg short loc_D3638
jmp short loc_D36A1
loc_D368F:
lea rdx, aErrorWhileHand_0+34h; ""
mov rdi, rbx
mov rsi, rdx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
loc_D36A1:
mov rax, rbx
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_D36B3:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aIdLlamaTokenNu; "id != LLAMA_TOKEN_NULL && \"null token "...
mov esi, 1A1h
xor eax, eax
call _ggml_abort
jmp short loc_D36F6
jmp short loc_D36F6
jmp short loc_D36F6
mov r14, rax
mov rdi, [rsp+58h+var_50]; void *
cmp rdi, rbp
jz short loc_D36F9
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_D36F9
loc_D36F6:
mov r14, rax
loc_D36F9:
mov rdi, [rbx]; void *
cmp rdi, [rsp+58h+var_58]
jz short loc_D3711
mov rax, [rsp+58h+var_58]
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_D3711:
mov rdi, r14
call __Unwind_Resume
|
_QWORD * common_sampler_prev_str[abi:cxx11](_QWORD *a1, long long a2, long long a3, int a4)
{
int v4; // r12d
long long v6; // r13
unsigned int v7; // edx
long long v9; // rax
long long v10; // r14
_QWORD *v11; // [rsp+0h] [rbp-58h]
void *v12[2]; // [rsp+8h] [rbp-50h] BYREF
long long v13; // [rsp+18h] [rbp-40h] BYREF
v4 = a4;
if ( *(_DWORD *)(a2 + 336) < a4 )
v4 = *(_DWORD *)(a2 + 336);
*a1 = a1 + 2;
if ( v4 <= 0 )
{
std::string::_M_construct<char const*>(a1, "", (long long)"");
}
else
{
v11 = a1 + 2;
a1[1] = 0LL;
*((_BYTE *)a1 + 16) = 0;
std::string::reserve(a1, (unsigned int)(8 * v4));
v6 = (unsigned int)v4 + 1LL;
do
{
v7 = *(_DWORD *)ring_buffer<int>::rat(a2 + 328, v6 - 2);
if ( v7 == -1 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp",
417LL,
"GGML_ASSERT(%s) failed",
"id != LLAMA_TOKEN_NULL && \"null token in the sampling history - should not happen\"");
v10 = v9;
if ( (_QWORD *)*a1 != v11 )
operator delete((void *)*a1, *v11 + 1LL);
_Unwind_Resume(v10);
}
common_token_to_piece[abi:cxx11]((long long)v12, a3, v7, 1u);
std::string::_M_append(a1, v12[0], v12[1]);
if ( v12[0] != &v13 )
operator delete(v12[0], v13 + 1);
--v6;
}
while ( v6 > 1 );
}
return a1;
}
|
common_sampler_prev_str[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R12D,ECX
MOV EAX,dword ptr [RSI + 0x150]
CMP EAX,ECX
CMOVL R12D,EAX
MOV RBX,RDI
LEA RAX,[RDI + 0x10]
MOV qword ptr [RDI],RAX
TEST R12D,R12D
JLE 0x001d368f
MOV R14,RDX
MOV R15,RSI
MOV qword ptr [RSP],RAX
MOV qword ptr [RBX + 0x8],0x0
MOV byte ptr [RBX + 0x10],0x0
LEA ESI,[R12*0x8]
LAB_001d3619:
MOV RDI,RBX
CALL 0x0011bdd0
ADD R15,0x148
LEA RBP,[RSP + 0x18]
MOV R13D,R12D
INC R13
LEA R12,[RSP + 0x8]
LAB_001d3638:
LEA RSI,[R13 + -0x2]
LAB_001d363c:
MOV RDI,R15
CALL 0x001d423a
MOV EDX,dword ptr [RAX]
CMP EDX,-0x1
JZ 0x001d36b3
LAB_001d364b:
MOV RDI,R12
MOV RSI,R14
MOV ECX,0x1
CALL 0x001780a3
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_001d3665:
MOV RDI,RBX
CALL 0x0011b270
LAB_001d366d:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,RBP
JZ 0x001d3684
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011b910
LAB_001d3684:
DEC R13
CMP R13,0x1
JG 0x001d3638
JMP 0x001d36a1
LAB_001d368f:
LEA RDX,[0x1f49f4]
MOV RDI,RBX
MOV RSI,RDX
CALL 0x00128a68
LAB_001d36a1:
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001d36b3:
LEA RDI,[0x1fd3a5]
LEA RDX,[0x1ed5d5]
LEA RCX,[0x1fd580]
MOV ESI,0x1a1
XOR EAX,EAX
CALL 0x0011bef0
|
/* common_sampler_prev_str[abi:cxx11](common_sampler*, llama_context*, int) */
common_sampler *
common_sampler_prev_str_abi_cxx11_(common_sampler *param_1,llama_context *param_2,int param_3)
{
int *piVar1;
uint in_ECX;
int8 in_R8;
int8 in_R9;
long lVar2;
common_sampler *pcVar3;
long *local_50 [2];
long local_40 [2];
if ((int)*(uint *)(param_2 + 0x150) < (int)in_ECX) {
in_ECX = *(uint *)(param_2 + 0x150);
}
pcVar3 = param_1 + 0x10;
*(common_sampler **)param_1 = pcVar3;
if ((int)in_ECX < 1) {
std::__cxx11::string::_M_construct<char_const*>(param_1,"");
}
else {
*(int8 *)(param_1 + 8) = 0;
param_1[0x10] = (common_sampler)0x0;
/* try { // try from 001d3619 to 001d3620 has its CatchHandler @ 001d36d4 */
std::__cxx11::string::reserve((ulong)param_1);
lVar2 = (ulong)in_ECX + 1;
do {
/* try { // try from 001d363c to 001d3643 has its CatchHandler @ 001d36d6 */
piVar1 = (int *)ring_buffer<int>::rat((ring_buffer<int> *)(param_2 + 0x148),lVar2 - 2);
if (*piVar1 == -1) {
/* try { // try from 001d36b3 to 001d36d3 has its CatchHandler @ 001d36f6 */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp",
0x1a1,"GGML_ASSERT(%s) failed",
"id != LLAMA_TOKEN_NULL && \"null token in the sampling history - should not happen\""
,in_R8,in_R9,pcVar3);
}
/* try { // try from 001d364b to 001d365a has its CatchHandler @ 001d36d8 */
common_token_to_piece_abi_cxx11_((llama_context *)local_50,param_3,SUB41(*piVar1,0));
/* try { // try from 001d3665 to 001d366c has its CatchHandler @ 001d36da */
std::__cxx11::string::_M_append((char *)param_1,(ulong)local_50[0]);
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
lVar2 = lVar2 + -1;
} while (1 < lVar2);
}
return param_1;
}
|
|
7,622 |
minja::Context::make(minja::Value&&, std::shared_ptr<minja::Context> const&)
|
llama.cpp/common/minja/minja.hpp
|
inline std::shared_ptr<Context> Context::make(Value && values, const std::shared_ptr<Context> & parent) {
return std::make_shared<Context>(values.is_null() ? Value::object() : std::move(values), parent);
}
|
O3
|
cpp
|
minja::Context::make(minja::Value&&, std::shared_ptr<minja::Context> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq 0x10(%rsi), %rdx
movq 0x20(%rsi), %rax
movq %rax, %rcx
orq %rdx, %rcx
sete %cl
cmpb $0x0, 0x40(%rsi)
movq %rdi, %rbx
sete %sil
andb %cl, %sil
movq 0x30(%r15), %rcx
testq %rcx, %rcx
sete %bpl
andb %sil, %bpl
cmpb $0x1, %bpl
jne 0x5bdf8
movl $0x30, %edi
callq 0x1d1e0
movabsq $0x100000001, %rcx # imm = 0x100000001
movq %rcx, 0x8(%rax)
leaq 0xad39a(%rip), %rcx # 0x109160
addq $0x10, %rcx
movq %rcx, (%rax)
leaq 0x10(%rax), %rcx
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movq $0x0, 0x20(%rax)
leaq 0x10(%rsp), %rsi
movq %rax, 0x8(%rsi)
movq %rcx, (%rsi)
leaq 0x20(%rsp), %rdi
callq 0x6dec4
jmp 0x5be74
leaq 0x40(%r15), %rdi
xorps %xmm0, %xmm0
leaq 0x60(%rsp), %r12
movaps %xmm0, -0x40(%r12)
movq %rdx, -0x30(%r12)
movq 0x18(%r15), %rdx
xorl %r13d, %r13d
movq %r13, 0x18(%r15)
movq %rdx, -0x28(%r12)
movq %r13, 0x10(%r15)
movq %rax, -0x20(%r12)
movq 0x28(%r15), %rax
movq %r13, 0x28(%r15)
movq %rax, -0x18(%r12)
movq %r13, 0x20(%r15)
movq %rcx, -0x10(%r12)
movq 0x38(%r15), %rax
movq %r13, 0x38(%r15)
movq %rax, -0x8(%r12)
movq %r13, 0x30(%r15)
movups (%rdi), %xmm0
movaps %xmm0, (%r12)
xorl %esi, %esi
callq 0x60b38
movb $0x0, 0x40(%r15)
movq %r13, 0x48(%r15)
movq %r12, %rdi
movl $0x1, %esi
callq 0x60b38
leaq 0xf(%rsp), %rsi
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movq %r14, %rcx
callq 0x6ca58
leaq 0x60(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x60b38
movq %r14, %rdi
callq 0x60bd8
leaq 0x58(%rsp), %rdi
callq 0x56124
leaq 0x48(%rsp), %rdi
callq 0x56124
leaq 0x38(%rsp), %r14
movq %r14, %rdi
callq 0x56124
movq -0x10(%r14), %rdi
testq %rdi, %rdi
je 0x5bef6
movq 0xaf0b7(%rip), %rax # 0x10af88
cmpb $0x0, (%rax)
je 0x5bee1
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0x5beeb
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0x5bef6
movq (%rdi), %rax
callq *0x18(%rax)
testb %bpl, %bpl
je 0x5bf05
leaq 0x18(%rsp), %rdi
callq 0x56124
movq %rbx, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x5a540
testb %bpl, %bpl
je 0x5bf33
leaq 0x18(%rsp), %rdi
callq 0x56124
movq %rbx, %rdi
callq 0x1d8e0
nop
|
_ZN5minja7Context4makeEONS_5ValueERKSt10shared_ptrIS0_E:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 78h
mov r14, rdx
mov r15, rsi
mov rdx, [rsi+10h]
mov rax, [rsi+20h]
mov rcx, rax
or rcx, rdx
setz cl
cmp byte ptr [rsi+40h], 0
mov rbx, rdi
setz sil
and sil, cl
mov rcx, [r15+30h]
test rcx, rcx
setz bpl
and bpl, sil
cmp bpl, 1
jnz short loc_5BDF8
mov edi, 30h ; '0'; unsigned __int64
call __Znwm; operator new(ulong)
mov rcx, 100000001h
mov [rax+8], rcx
lea rcx, _ZTVSt23_Sp_counted_ptr_inplaceIN8nlohmann16json_abi_v3_11_311ordered_mapINS1_10basic_jsonIS2_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueESt4lessISE_ESaISt4pairIKSE_SG_EEEESaIvELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<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::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<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::allocator<void>,(__gnu_cxx::_Lock_policy)2>
add rcx, 10h
mov [rax], rcx
lea rcx, [rax+10h]
xorps xmm0, xmm0
movups xmmword ptr [rax+10h], xmm0
mov qword ptr [rax+20h], 0
lea rsi, [rsp+0A8h+var_98]
mov [rsi+8], rax
mov [rsi], rcx
lea rdi, [rsp+0A8h+var_88]
call _ZN5minja5ValueC2ERKSt10shared_ptrIN8nlohmann16json_abi_v3_11_311ordered_mapINS3_10basic_jsonIS4_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEES0_St4lessISG_ESaISt4pairIKSG_S0_EEEEE; minja::Value::Value(std::shared_ptr<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::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<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&)
jmp short loc_5BE74
loc_5BDF8:
lea rdi, [r15+40h]
xorps xmm0, xmm0
lea r12, [rsp+0A8h+var_48]
movaps xmmword ptr [r12-40h], xmm0
mov [r12-30h], rdx
mov rdx, [r15+18h]
xor r13d, r13d
mov [r15+18h], r13
mov [r12-28h], rdx
mov [r15+10h], r13
mov [r12-20h], rax
mov rax, [r15+28h]
mov [r15+28h], r13
mov [r12-18h], rax
mov [r15+20h], r13
mov [r12-10h], rcx
mov rax, [r15+38h]
mov [r15+38h], r13
mov [r12-8], rax
mov [r15+30h], r13
movups xmm0, xmmword ptr [rdi]
movaps xmmword ptr [r12], xmm0
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov byte ptr [r15+40h], 0
mov [r15+48h], r13
mov rdi, r12
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
loc_5BE74:
lea rsi, [rsp+0A8h+var_99]
lea rdx, [rsp+0A8h+var_88]
mov rdi, rbx
mov rcx, r14
call _ZNSt12__shared_ptrIN5minja7ContextELN9__gnu_cxx12_Lock_policyE2EEC2ISaIvEJNS0_5ValueERKSt10shared_ptrIS1_EEEESt20_Sp_alloc_shared_tagIT_EDpOT0_; std::__shared_ptr<minja::Context,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<void>,minja::Value,std::shared_ptr<minja::Context> const&>(std::_Sp_alloc_shared_tag<std::allocator<void>>,minja::Value,std::shared_ptr<minja::Context> const&)
lea r14, [rsp+0A8h+var_48]
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
lea rdi, [rsp+0A8h+var_50]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+0A8h+var_60]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea r14, [rsp+0A8h+var_70]
mov rdi, r14
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, [r14-10h]
test rdi, rdi
jz short loc_5BEF6
mov rax, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag
cmp byte ptr [rax], 0
jz short loc_5BEE1
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_5BEEB
loc_5BEE1:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_5BEEB:
cmp eax, 1
jnz short loc_5BEF6
mov rax, [rdi]
call qword ptr [rax+18h]
loc_5BEF6:
test bpl, bpl
jz short loc_5BF05
lea rdi, [rsp+0A8h+var_90]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
loc_5BF05:
mov rax, rbx
add rsp, 78h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
lea rdi, [rsp+arg_18]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
test bpl, bpl
jz short loc_5BF33
lea rdi, [rsp+arg_10]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
loc_5BF33:
mov rdi, rbx
call __Unwind_Resume
|
long long minja::Context::make(long long a1, long long a2, long long a3)
{
__int128 v4; // rax
volatile signed __int32 *v6; // rcx
bool v7; // bp
long long v8; // rax
volatile signed __int32 *v9; // rax
volatile signed __int32 *v10; // rax
long long v11; // rdi
signed __int32 v12; // eax
char v14; // [rsp+Fh] [rbp-99h] BYREF
long long v15; // [rsp+10h] [rbp-98h] BYREF
volatile signed __int32 *v16; // [rsp+18h] [rbp-90h] BYREF
__int128 v17; // [rsp+20h] [rbp-88h] BYREF
long long v18; // [rsp+30h] [rbp-78h]
volatile signed __int32 *v19[2]; // [rsp+38h] [rbp-70h] BYREF
volatile signed __int32 *v20[2]; // [rsp+48h] [rbp-60h] BYREF
volatile signed __int32 *v21; // [rsp+58h] [rbp-50h] BYREF
_OWORD v22[4]; // [rsp+60h] [rbp-48h] BYREF
*((_QWORD *)&v4 + 1) = *(_QWORD *)(a2 + 16);
*(_QWORD *)&v4 = *(_QWORD *)(a2 + 32);
v6 = *(volatile signed __int32 **)(a2 + 48);
v7 = v4 == 0 && *(_BYTE *)(a2 + 64) == 0 && v6 == 0LL;
if ( v7 )
{
v8 = operator new(0x30uLL);
*(_QWORD *)(v8 + 8) = 0x100000001LL;
*(_QWORD *)v8 = &`vtable for'std::_Sp_counted_ptr_inplace<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::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<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::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<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::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::allocator<void>,(__gnu_cxx::_Lock_policy)2>
+ 2;
*(_OWORD *)(v8 + 16) = 0LL;
*(_QWORD *)(v8 + 32) = 0LL;
v16 = (volatile signed __int32 *)v8;
v15 = v8 + 16;
minja::Value::Value(&v17, &v15);
}
else
{
v17 = 0LL;
v18 = *((_QWORD *)&v4 + 1);
*((_QWORD *)&v4 + 1) = *(_QWORD *)(a2 + 24);
*(_QWORD *)(a2 + 24) = 0LL;
v19[0] = *((volatile signed __int32 **)&v4 + 1);
*(_QWORD *)(a2 + 16) = 0LL;
v19[1] = (volatile signed __int32 *)v4;
v9 = *(volatile signed __int32 **)(a2 + 40);
*(_QWORD *)(a2 + 40) = 0LL;
v20[0] = v9;
*(_QWORD *)(a2 + 32) = 0LL;
v20[1] = v6;
v10 = *(volatile signed __int32 **)(a2 + 56);
*(_QWORD *)(a2 + 56) = 0LL;
v21 = v10;
*(_QWORD *)(a2 + 48) = 0LL;
v22[0] = *(_OWORD *)(a2 + 64);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(
a2 + 64,
0LL);
*(_BYTE *)(a2 + 64) = 0;
*(_QWORD *)(a2 + 72) = 0LL;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(
v22,
1LL);
}
std::__shared_ptr<minja::Context,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<void>,minja::Value,std::shared_ptr<minja::Context> const&>(
a1,
&v14,
&v17,
a3);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(
v22,
0LL);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v22);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v21);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v20);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v19);
v11 = *((_QWORD *)&v17 + 1);
if ( *((_QWORD *)&v17 + 1) )
{
if ( _libc_single_threaded )
{
v12 = *(_DWORD *)(*((_QWORD *)&v17 + 1) + 12LL);
*(_DWORD *)(*((_QWORD *)&v17 + 1) + 12LL) = v12 - 1;
}
else
{
v12 = _InterlockedExchangeAdd((volatile signed __int32 *)(*((_QWORD *)&v17 + 1) + 12LL), 0xFFFFFFFF);
}
if ( v12 == 1 )
(*(void ( **)(long long))(*(_QWORD *)v11 + 24LL))(v11);
}
if ( v7 )
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v16);
return a1;
}
|
make:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x78
MOV R14,RDX
MOV R15,RSI
MOV RDX,qword ptr [RSI + 0x10]
MOV RAX,qword ptr [RSI + 0x20]
MOV RCX,RAX
OR RCX,RDX
SETZ CL
CMP byte ptr [RSI + 0x40],0x0
MOV RBX,RDI
SETZ SIL
AND SIL,CL
MOV RCX,qword ptr [R15 + 0x30]
TEST RCX,RCX
SETZ BPL
AND BPL,SIL
CMP BPL,0x1
JNZ 0x0015bdf8
MOV EDI,0x30
CALL 0x0011d1e0
MOV RCX,0x100000001
MOV qword ptr [RAX + 0x8],RCX
LEA RCX,[0x209160]
ADD RCX,0x10
MOV qword ptr [RAX],RCX
LEA RCX,[RAX + 0x10]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + 0x10],XMM0
MOV qword ptr [RAX + 0x20],0x0
LEA RSI,[RSP + 0x10]
MOV qword ptr [RSI + 0x8],RAX
MOV qword ptr [RSI],RCX
LEA RDI,[RSP + 0x20]
CALL 0x0016dec4
JMP 0x0015be74
LAB_0015bdf8:
LEA RDI,[R15 + 0x40]
XORPS XMM0,XMM0
LEA R12,[RSP + 0x60]
MOVAPS xmmword ptr [R12 + -0x40],XMM0
MOV qword ptr [R12 + -0x30],RDX
MOV RDX,qword ptr [R15 + 0x18]
XOR R13D,R13D
MOV qword ptr [R15 + 0x18],R13
MOV qword ptr [R12 + -0x28],RDX
MOV qword ptr [R15 + 0x10],R13
MOV qword ptr [R12 + -0x20],RAX
MOV RAX,qword ptr [R15 + 0x28]
MOV qword ptr [R15 + 0x28],R13
MOV qword ptr [R12 + -0x18],RAX
MOV qword ptr [R15 + 0x20],R13
MOV qword ptr [R12 + -0x10],RCX
MOV RAX,qword ptr [R15 + 0x38]
MOV qword ptr [R15 + 0x38],R13
MOV qword ptr [R12 + -0x8],RAX
MOV qword ptr [R15 + 0x30],R13
MOVUPS XMM0,xmmword ptr [RDI]
MOVAPS xmmword ptr [R12],XMM0
XOR ESI,ESI
CALL 0x00160b38
MOV byte ptr [R15 + 0x40],0x0
MOV qword ptr [R15 + 0x48],R13
MOV RDI,R12
MOV ESI,0x1
CALL 0x00160b38
LAB_0015be74:
LEA RSI,[RSP + 0xf]
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
MOV RCX,R14
CALL 0x0016ca58
LAB_0015be89:
LEA R14,[RSP + 0x60]
MOV RDI,R14
XOR ESI,ESI
CALL 0x00160b38
MOV RDI,R14
CALL 0x00160bd8
LEA RDI,[RSP + 0x58]
CALL 0x00156124
LEA RDI,[RSP + 0x48]
CALL 0x00156124
LEA R14,[RSP + 0x38]
MOV RDI,R14
CALL 0x00156124
MOV RDI,qword ptr [R14 + -0x10]
TEST RDI,RDI
JZ 0x0015bef6
MOV RAX,qword ptr [0x0020af88]
CMP byte ptr [RAX],0x0
JZ 0x0015bee1
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x0015beeb
LAB_0015bee1:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_0015beeb:
CMP EAX,0x1
JNZ 0x0015bef6
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_0015bef6:
TEST BPL,BPL
JZ 0x0015bf05
LEA RDI,[RSP + 0x18]
CALL 0x00156124
LAB_0015bf05:
MOV RAX,RBX
ADD RSP,0x78
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* minja::Context::make(minja::Value&&, std::shared_ptr<minja::Context> const&) */
Context * __thiscall minja::Context::make(Context *this,Value *param_1,shared_ptr *param_2)
{
int *piVar1;
Value VVar2;
long lVar3;
long lVar4;
long lVar5;
int iVar6;
int1 local_99;
int8 *local_98;
int8 *local_90;
int8 local_88;
long *plStack_80;
long local_78;
int8 local_70;
long local_68;
int8 local_60;
long local_58;
int8 local_50;
int8 local_48;
int8 uStack_40;
lVar3 = *(long *)(param_1 + 0x10);
lVar4 = *(long *)(param_1 + 0x20);
VVar2 = param_1[0x40];
lVar5 = *(long *)(param_1 + 0x30);
if (lVar5 != 0 || (VVar2 != (Value)0x0 || (lVar4 != 0 || lVar3 != 0))) {
local_88 = 0;
plStack_80 = (long *)0x0;
local_70 = *(int8 *)(param_1 + 0x18);
*(int8 *)(param_1 + 0x18) = 0;
*(int8 *)(param_1 + 0x10) = 0;
local_60 = *(int8 *)(param_1 + 0x28);
*(int8 *)(param_1 + 0x28) = 0;
*(int8 *)(param_1 + 0x20) = 0;
local_50 = *(int8 *)(param_1 + 0x38);
*(int8 *)(param_1 + 0x38) = 0;
*(int8 *)(param_1 + 0x30) = 0;
local_48 = *(int8 *)(param_1 + 0x40);
uStack_40 = *(int8 *)(param_1 + 0x48);
local_78 = lVar3;
local_68 = lVar4;
local_58 = lVar5;
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(param_1 + 0x40,0));
param_1[0x40] = (Value)0x0;
*(int8 *)(param_1 + 0x48) = 0;
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(&local_48,0));
}
else {
local_90 = (int8 *)operator_new(0x30);
local_90[1] = 0x100000001;
*local_90 = &PTR___Sp_counted_base_00209170;
local_98 = local_90 + 2;
local_90[2] = 0;
local_90[3] = 0;
local_90[4] = 0;
Value::Value((Value *)&local_88,(shared_ptr *)&local_98);
}
/* try { // try from 0015be74 to 0015be88 has its CatchHandler @ 0015bf17 */
std::__shared_ptr<minja::Context,(__gnu_cxx::_Lock_policy)2>::
__shared_ptr<std::allocator<void>,minja::Value,std::shared_ptr<minja::Context>const&>
((__shared_ptr<minja::Context,(__gnu_cxx::_Lock_policy)2> *)this,&local_99,&local_88,
param_2);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81((data *)&local_48,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)&local_48);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_50);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_60);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_70);
if (plStack_80 != (long *)0x0) {
if (*PTR___libc_single_threaded_0020af88 == '\0') {
LOCK();
piVar1 = (int *)((long)plStack_80 + 0xc);
iVar6 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar6 = *(int *)((long)plStack_80 + 0xc);
*(int *)((long)plStack_80 + 0xc) = iVar6 + -1;
}
if (iVar6 == 1) {
(**(code **)(*plStack_80 + 0x18))();
}
}
if (lVar5 == 0 && (VVar2 == (Value)0x0 && (lVar4 == 0 && lVar3 == 0))) {
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_90);
}
return this;
}
|
|
7,623 |
void google::protobuf::internal::SwapFieldHelper::SwapRepeatedMessageField<false>(google::protobuf::Reflection const*, google::protobuf::Message*, google::protobuf::Message*, google::protobuf::FieldDescriptor const*)
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/generated_message_reflection.cc
|
void SwapFieldHelper::SwapRepeatedMessageField(const Reflection* r,
Message* lhs, Message* rhs,
const FieldDescriptor* field) {
if (IsMapFieldInApi(field)) {
auto* lhs_map = r->MutableRaw<MapFieldBase>(lhs, field);
auto* rhs_map = r->MutableRaw<MapFieldBase>(rhs, field);
if (unsafe_shallow_swap) {
lhs_map->UnsafeShallowSwap(rhs_map);
} else {
lhs_map->Swap(rhs_map);
}
} else {
auto* lhs_rm = r->MutableRaw<RepeatedPtrFieldBase>(lhs, field);
auto* rhs_rm = r->MutableRaw<RepeatedPtrFieldBase>(rhs, field);
if (unsafe_shallow_swap) {
lhs_rm->InternalSwap(rhs_rm);
} else {
lhs_rm->Swap<GenericTypeHandler<Message>>(rhs_rm);
}
}
}
|
O3
|
cpp
|
void google::protobuf::internal::SwapFieldHelper::SwapRepeatedMessageField<false>(google::protobuf::Reflection const*, google::protobuf::Message*, google::protobuf::Message*, google::protobuf::FieldDescriptor const*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
movq %rcx, %rdi
callq 0x8d966
movl %eax, %ebp
addq $0x8, %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0x97f78
movl %eax, %ebx
addq %r12, %rbx
movq %r13, %rdi
movq %r14, %rsi
callq 0x97f78
movl %eax, %esi
addq %r15, %rsi
testb %bpl, %bpl
je 0x9636a
movq (%rbx), %rax
movq 0x48(%rax), %rax
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rax
movq (%rsi), %rax
movq 0x10(%rsi), %rcx
movq (%rbx), %rdx
movq 0x10(%rbx), %rdi
movq %rdx, (%rsi)
movq 0x8(%rbx), %rdx
movq %rdi, 0x10(%rsi)
movq %rax, (%rbx)
movq 0x8(%rsi), %rax
movq %rdx, 0x8(%rsi)
movq %rax, 0x8(%rbx)
movq %rcx, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
|
_ZN6google8protobuf8internal15SwapFieldHelper24SwapRepeatedMessageFieldILb1EEEvPKNS0_10ReflectionEPNS0_7MessageES8_PKNS0_15FieldDescriptorE:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rcx
mov r15, rdx
mov r12, rsi
mov r13, rdi
mov rdi, rcx; this
call _ZN6google8protobuf12_GLOBAL__N_115IsMapFieldInApiEPKNS0_15FieldDescriptorE; google::protobuf::`anonymous namespace'::IsMapFieldInApi(google::protobuf::FieldDescriptor const*)
mov ebp, eax
add r13, 8
mov rdi, r13; this
mov rsi, r14; google::protobuf::FieldDescriptor *
call _ZNK6google8protobuf8internal16ReflectionSchema14GetFieldOffsetEPKNS0_15FieldDescriptorE; google::protobuf::internal::ReflectionSchema::GetFieldOffset(google::protobuf::FieldDescriptor const*)
mov ebx, eax
add rbx, r12
mov rdi, r13; this
mov rsi, r14; google::protobuf::FieldDescriptor *
call _ZNK6google8protobuf8internal16ReflectionSchema14GetFieldOffsetEPKNS0_15FieldDescriptorE; google::protobuf::internal::ReflectionSchema::GetFieldOffset(google::protobuf::FieldDescriptor const*)
mov esi, eax
add rsi, r15
test bpl, bpl
jz short loc_9636A
mov rax, [rbx]
mov rax, [rax+48h]
mov rdi, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp rax
loc_9636A:
mov rax, [rsi]
mov rcx, [rsi+10h]
mov rdx, [rbx]
mov rdi, [rbx+10h]
mov [rsi], rdx
mov rdx, [rbx+8]
mov [rsi+10h], rdi
mov [rbx], rax
mov rax, [rsi+8]
mov [rsi+8], rdx
mov [rbx+8], rax
mov [rbx+10h], rcx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long google::protobuf::internal::SwapFieldHelper::SwapRepeatedMessageField<true>(
long long a1,
const google::protobuf::FieldDescriptor *a2,
long long a3,
google::protobuf::_anonymous_namespace_ *a4)
{
char IsMapFieldInApi; // bp
long long *v7; // rbx
long long *v8; // rsi
long long result; // rax
long long v10; // rax
long long v11; // rcx
long long v12; // rdi
long long v13; // rdx
IsMapFieldInApi = google::protobuf::`anonymous namespace'::IsMapFieldInApi(a4, a2);
v7 = (long long *)((char *)a2
+ (unsigned int)google::protobuf::internal::ReflectionSchema::GetFieldOffset(
(google::protobuf::internal::ReflectionSchema *)(a1 + 8),
a4));
v8 = (long long *)(a3
+ (unsigned int)google::protobuf::internal::ReflectionSchema::GetFieldOffset(
(google::protobuf::internal::ReflectionSchema *)(a1 + 8),
a4));
if ( IsMapFieldInApi )
return (*(long long ( **)(long long *, long long *))(*v7 + 72))(v7, v8);
v10 = *v8;
v11 = v8[2];
v12 = v7[2];
*v8 = *v7;
v13 = v7[1];
v8[2] = v12;
*v7 = v10;
result = v8[1];
v8[1] = v13;
v7[1] = result;
v7[2] = v11;
return result;
}
|
SwapRepeatedMessageField<true>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RCX
MOV R15,RDX
MOV R12,RSI
MOV R13,RDI
MOV RDI,RCX
CALL 0x0018d966
MOV EBP,EAX
ADD R13,0x8
MOV RDI,R13
MOV RSI,R14
CALL 0x00197f78
MOV EBX,EAX
ADD RBX,R12
MOV RDI,R13
MOV RSI,R14
CALL 0x00197f78
MOV ESI,EAX
ADD RSI,R15
TEST BPL,BPL
JZ 0x0019636a
MOV RAX,qword ptr [RBX]
MOV RAX,qword ptr [RAX + 0x48]
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP RAX
LAB_0019636a:
MOV RAX,qword ptr [RSI]
MOV RCX,qword ptr [RSI + 0x10]
MOV RDX,qword ptr [RBX]
MOV RDI,qword ptr [RBX + 0x10]
MOV qword ptr [RSI],RDX
MOV RDX,qword ptr [RBX + 0x8]
MOV qword ptr [RSI + 0x10],RDI
MOV qword ptr [RBX],RAX
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RSI + 0x8],RDX
MOV qword ptr [RBX + 0x8],RAX
MOV qword ptr [RBX + 0x10],RCX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* void
google::protobuf::internal::SwapFieldHelper::SwapRepeatedMessageField<true>(google::protobuf::Reflection
const*, google::protobuf::Message*, google::protobuf::Message*, google::protobuf::FieldDescriptor
const*) */
void google::protobuf::internal::SwapFieldHelper::SwapRepeatedMessageField<true>
(Reflection *param_1,Message *param_2,Message *param_3,FieldDescriptor *param_4)
{
long lVar1;
long lVar2;
long lVar3;
long lVar4;
char cVar5;
uint uVar6;
Message *pMVar7;
Message *pMVar8;
cVar5 = protobuf::(anonymous_namespace)::IsMapFieldInApi(param_4);
uVar6 = ReflectionSchema::GetFieldOffset((ReflectionSchema *)(param_1 + 8),param_4);
pMVar7 = param_2 + uVar6;
uVar6 = ReflectionSchema::GetFieldOffset((ReflectionSchema *)(param_1 + 8),param_4);
pMVar8 = param_3 + uVar6;
if (cVar5 != '\0') {
/* WARNING: Could not recover jumptable at 0x00196368. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(*(long *)pMVar7 + 0x48))(pMVar7);
return;
}
lVar1 = *(long *)pMVar8;
lVar2 = *(long *)(pMVar8 + 0x10);
lVar3 = *(long *)(pMVar7 + 0x10);
*(long *)pMVar8 = *(long *)pMVar7;
lVar4 = *(long *)(pMVar7 + 8);
*(long *)(pMVar8 + 0x10) = lVar3;
*(long *)pMVar7 = lVar1;
lVar1 = *(long *)(pMVar8 + 8);
*(long *)(pMVar8 + 8) = lVar4;
*(long *)(pMVar7 + 8) = lVar1;
*(long *)(pMVar7 + 0x10) = lVar2;
return;
}
|
|
7,624 |
my_rw_unlock
|
eloqsql/mysys/thr_rwlock.c
|
int my_rw_unlock(my_rw_lock_t *rwp)
{
DBUG_PRINT("rw_unlock",
("state: %d waiters: %d", rwp->state, rwp->waiters));
pthread_mutex_lock(&rwp->lock);
DBUG_ASSERT(rwp->state != 0);
if (rwp->state == -1) /* writer releasing */
{
my_rw_lock_assert_write_owner(rwp);
rwp->state= 0; /* mark as available */
#ifdef SAFE_MUTEX
rwp->write_thread= 0;
#endif
if ( rwp->waiters ) /* writers queued */
pthread_cond_signal( &rwp->writers );
else
pthread_cond_broadcast( &rwp->readers );
}
else
{
if ( --rwp->state == 0 && /* no more readers */
rwp->waiters)
pthread_cond_signal( &rwp->writers );
}
pthread_mutex_unlock( &rwp->lock );
return(0);
}
|
O0
|
c
|
my_rw_unlock:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
jmp 0xfb00e
movq -0x8(%rbp), %rdi
callq 0x2a210
jmp 0xfb019
movq -0x8(%rbp), %rax
cmpl $-0x1, 0x88(%rax)
jne 0xfb05f
movq -0x8(%rbp), %rax
movl $0x0, 0x88(%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x8c(%rax)
je 0xfb050
movq -0x8(%rbp), %rdi
addq $0x58, %rdi
callq 0x2a590
jmp 0xfb05d
movq -0x8(%rbp), %rdi
addq $0x28, %rdi
callq 0x2a6c0
jmp 0xfb093
movq -0x8(%rbp), %rcx
movl 0x88(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x88(%rcx)
cmpl $0x0, %eax
jne 0xfb091
movq -0x8(%rbp), %rax
cmpl $0x0, 0x8c(%rax)
je 0xfb091
movq -0x8(%rbp), %rdi
addq $0x58, %rdi
callq 0x2a590
jmp 0xfb093
movq -0x8(%rbp), %rdi
callq 0x2a1e0
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_rw_unlock:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
jmp short $+2
loc_FB00E:
mov rdi, [rbp+var_8]
call _pthread_mutex_lock
jmp short $+2
loc_FB019:
mov rax, [rbp+var_8]
cmp dword ptr [rax+88h], 0FFFFFFFFh
jnz short loc_FB05F
mov rax, [rbp+var_8]
mov dword ptr [rax+88h], 0
mov rax, [rbp+var_8]
cmp dword ptr [rax+8Ch], 0
jz short loc_FB050
mov rdi, [rbp+var_8]
add rdi, 58h ; 'X'
call _pthread_cond_signal
jmp short loc_FB05D
loc_FB050:
mov rdi, [rbp+var_8]
add rdi, 28h ; '('
call _pthread_cond_broadcast
loc_FB05D:
jmp short loc_FB093
loc_FB05F:
mov rcx, [rbp+var_8]
mov eax, [rcx+88h]
add eax, 0FFFFFFFFh
mov [rcx+88h], eax
cmp eax, 0
jnz short loc_FB091
mov rax, [rbp+var_8]
cmp dword ptr [rax+8Ch], 0
jz short loc_FB091
mov rdi, [rbp+var_8]
add rdi, 58h ; 'X'
call _pthread_cond_signal
loc_FB091:
jmp short $+2
loc_FB093:
mov rdi, [rbp+var_8]
call _pthread_mutex_unlock
xor eax, eax
add rsp, 10h
pop rbp
retn
|
long long my_rw_unlock(long long a1)
{
int v1; // eax
pthread_mutex_lock(a1);
if ( *(_DWORD *)(a1 + 136) == -1 )
{
*(_DWORD *)(a1 + 136) = 0;
if ( !*(_DWORD *)(a1 + 140) )
{
pthread_cond_broadcast(a1 + 40);
goto LABEL_7;
}
LABEL_6:
pthread_cond_signal(a1 + 88);
goto LABEL_7;
}
v1 = *(_DWORD *)(a1 + 136) - 1;
*(_DWORD *)(a1 + 136) = v1;
if ( !v1 && *(_DWORD *)(a1 + 140) )
goto LABEL_6;
LABEL_7:
pthread_mutex_unlock(a1);
return 0LL;
}
|
my_rw_unlock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
JMP 0x001fb00e
LAB_001fb00e:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0012a210
JMP 0x001fb019
LAB_001fb019:
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x88],-0x1
JNZ 0x001fb05f
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x88],0x0
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x8c],0x0
JZ 0x001fb050
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x58
CALL 0x0012a590
JMP 0x001fb05d
LAB_001fb050:
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x28
CALL 0x0012a6c0
LAB_001fb05d:
JMP 0x001fb093
LAB_001fb05f:
MOV RCX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RCX + 0x88]
ADD EAX,-0x1
MOV dword ptr [RCX + 0x88],EAX
CMP EAX,0x0
JNZ 0x001fb091
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x8c],0x0
JZ 0x001fb091
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x58
CALL 0x0012a590
LAB_001fb091:
JMP 0x001fb093
LAB_001fb093:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0012a1e0
XOR EAX,EAX
ADD RSP,0x10
POP RBP
RET
|
int8 my_rw_unlock(pthread_mutex_t *param_1)
{
int iVar1;
pthread_mutex_lock(param_1);
if (*(int *)((long)param_1 + 0x88) == -1) {
*(int4 *)((long)param_1 + 0x88) = 0;
if (*(int *)((long)param_1 + 0x8c) == 0) {
pthread_cond_broadcast((pthread_cond_t *)(param_1 + 1));
}
else {
pthread_cond_signal((pthread_cond_t *)((long)param_1 + 0x58));
}
}
else {
iVar1 = *(int *)((long)param_1 + 0x88) + -1;
*(int *)((long)param_1 + 0x88) = iVar1;
if ((iVar1 == 0) && (*(int *)((long)param_1 + 0x8c) != 0)) {
pthread_cond_signal((pthread_cond_t *)((long)param_1 + 0x58));
}
}
pthread_mutex_unlock(param_1);
return 0;
}
|
|
7,625 |
testing::internal::GTestLog::~GTestLog()
|
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest-port.cc
|
GTestLog::~GTestLog() {
GetStream() << ::std::endl;
if (severity_ == GTEST_FATAL) {
fflush(stderr);
posix::Abort();
}
}
|
O0
|
cpp
|
testing::internal::GTestLog::~GTestLog():
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x1ea10
movq %rax, 0x8(%rsp)
jmp 0xb91fe
movq 0x8(%rsp), %rdi
movq 0xbed26(%rip), %rsi # 0x177f30
callq 0x14720
jmp 0xb9211
movq (%rsp), %rax
cmpl $0x3, (%rax)
jne 0xb9232
movq 0xbed6f(%rip), %rax # 0x177f90
movq (%rax), %rdi
callq 0x14810
jmp 0xb922b
callq 0xe3e10
jmp 0xb9232
addq $0x18, %rsp
retq
movq %rax, %rdi
callq 0x1b6b0
nop
|
_ZN7testing8internal8GTestLogD2Ev:
sub rsp, 18h; Alternative name is 'testing::internal::GTestLog::~GTestLog()'
mov [rsp+18h+var_8], rdi
mov rdi, [rsp+18h+var_8]; this
mov [rsp+18h+var_18], rdi
call _ZN7testing8internal8GTestLog9GetStreamEv; testing::internal::GTestLog::GetStream(void)
mov [rsp+18h+var_10], rax
jmp short $+2
loc_B91FE:
mov rdi, [rsp+18h+var_10]
mov rsi, cs:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6__ptr
call __ZNSolsEPFRSoS_E; std::ostream::operator<<(std::ostream & (*)(std::ostream &))
jmp short $+2
loc_B9211:
mov rax, [rsp+18h+var_18]
cmp dword ptr [rax], 3
jnz short loc_B9232
mov rax, cs:stderr_ptr
mov rdi, [rax]; this
call _fflush
jmp short $+2
loc_B922B:
call _ZN7testing8internal5posix5AbortEv; testing::internal::posix::Abort(void)
jmp short $+2
loc_B9232:
add rsp, 18h
retn
mov rdi, rax
call __clang_call_terminate
|
void testing::internal::GTestLog::~GTestLog(testing::internal::GTestLog *this)
{
testing::internal::posix *v1; // rdi
void *Stream; // [rsp+8h] [rbp-10h]
Stream = testing::internal::GTestLog::GetStream(this);
std::ostream::operator<<(Stream, &std::endl<char,std::char_traits<char>>);
if ( *(_DWORD *)this == 3 )
{
v1 = (testing::internal::posix *)stderr;
fflush(stderr);
testing::internal::posix::Abort(v1);
}
}
|
~GTestLog:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV RDI,qword ptr [RSP + 0x10]
MOV qword ptr [RSP],RDI
LAB_001b91f2:
CALL 0x0011ea10
MOV qword ptr [RSP + 0x8],RAX
JMP 0x001b91fe
LAB_001b91fe:
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [0x00277f30]
CALL 0x00114720
JMP 0x001b9211
LAB_001b9211:
MOV RAX,qword ptr [RSP]
CMP dword ptr [RAX],0x3
JNZ 0x001b9232
MOV RAX,qword ptr [0x00277f90]
MOV RDI,qword ptr [RAX]
CALL 0x00114810
JMP 0x001b922b
LAB_001b922b:
CALL 0x001e3e10
JMP 0x001b9232
LAB_001b9232:
ADD RSP,0x18
RET
|
/* testing::internal::GTestLog::~GTestLog() */
void __thiscall testing::internal::GTestLog::~GTestLog(GTestLog *this)
{
ostream *this_00;
/* try { // try from 001b91f2 to 001b922f has its CatchHandler @ 001b9237 */
this_00 = (ostream *)GetStream();
std::ostream::operator<<
(this_00,(_func_ostream_ptr_ostream_ptr *)PTR_endl<char,std_char_traits<char>>_00277f30)
;
if (*(int *)this == 3) {
fflush(*(FILE **)PTR_stderr_00277f90);
posix::Abort();
}
return;
}
|
|
7,626 |
mysql_stmt_send_long_data_start
|
eloqsql/libmariadb/libmariadb/mariadb_async.c
|
int STDCALL
mysql_stmt_send_long_data_start(my_bool *ret, MYSQL_STMT *stmt,
unsigned int param_number,
const char *data, unsigned long length)
{
MK_ASYNC_START_BODY(
mysql_stmt_send_long_data,
stmt->mysql,
{
WIN_SET_NONBLOCKING(stmt->mysql)
parms.stmt= stmt;
parms.param_number= param_number;
parms.data= data;
parms.length= length;
},
TRUE,
r_my_bool,
/* If stmt->mysql==NULL then we will not block so can call directly. */
if (!stmt->mysql)
{
*ret= mysql_stmt_send_long_data(stmt, param_number, data, length);
return 0;
})
}
|
O0
|
c
|
mysql_stmt_send_long_data_start:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x38(%rax)
jne 0x6fc7e
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %esi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
callq 0x5e050
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x6fda2
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x60(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x58(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
movb $0x1, 0x14(%rax)
movq -0x40(%rbp), %rdi
addq $0x38, %rdi
leaq 0xe6(%rip), %rsi # 0x6fdb0
leaq -0x60(%rbp), %rdx
callq 0x70f10
movl %eax, -0x34(%rbp)
movq -0x40(%rbp), %rax
movb $0x0, 0x15(%rax)
movq -0x40(%rbp), %rax
movb $0x0, 0x14(%rax)
cmpl $0x0, -0x34(%rbp)
jle 0x6fd02
movq -0x40(%rbp), %rax
movb $0x1, 0x15(%rax)
movq -0x40(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x6fda2
cmpl $0x0, -0x34(%rbp)
jge 0x6fd8e
jmp 0x6fd0e
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rax
movl $0x7d8, 0x90(%rax) # imm = 0x7D8
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rdi
addq $0x297, %rdi # imm = 0x297
leaq 0x1d9c9a(%rip), %rax # 0x2499d0
movq (%rax), %rsi
movl $0x5, %edx
callq 0x38140
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rax
movb $0x0, 0x29c(%rax)
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rdi
addq $0x97, %rdi
leaq 0x1d9c78(%rip), %rax # 0x2499e0
movq 0x40(%rax), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x38140
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rax
movb $0x0, 0x296(%rax)
movq -0x10(%rbp), %rax
movb $0x1, (%rax)
jmp 0x6fd9b
movq -0x40(%rbp), %rax
movb 0x8(%rax), %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
mysql_stmt_send_long_data_start:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov rax, [rbp+var_18]
cmp qword ptr [rax+38h], 0
jnz short loc_6FC7E
mov rdi, [rbp+var_18]
mov esi, [rbp+var_1C]
mov rdx, [rbp+var_28]
mov rcx, [rbp+var_30]
call mysql_stmt_send_long_data
mov cl, al
mov rax, [rbp+var_10]
mov [rax], cl
mov [rbp+var_4], 0
jmp loc_6FDA2
loc_6FC7E:
mov rax, [rbp+var_18]
mov rax, [rax+38h]
mov rax, [rax+480h]
mov rax, [rax+28h]
mov [rbp+var_40], rax
mov rax, [rbp+var_18]
mov [rbp+var_60], rax
mov eax, [rbp+var_1C]
mov [rbp+var_58], eax
mov rax, [rbp+var_28]
mov [rbp+var_50], rax
mov rax, [rbp+var_30]
mov [rbp+var_48], rax
mov rax, [rbp+var_40]
mov byte ptr [rax+14h], 1
mov rdi, [rbp+var_40]
add rdi, 38h ; '8'
lea rsi, mysql_stmt_send_long_data_start_internal
lea rdx, [rbp+var_60]
call my_context_spawn
mov [rbp+var_34], eax
mov rax, [rbp+var_40]
mov byte ptr [rax+15h], 0
mov rax, [rbp+var_40]
mov byte ptr [rax+14h], 0
cmp [rbp+var_34], 0
jle short loc_6FD02
mov rax, [rbp+var_40]
mov byte ptr [rax+15h], 1
mov rax, [rbp+var_40]
mov eax, [rax]
mov [rbp+var_4], eax
jmp loc_6FDA2
loc_6FD02:
cmp [rbp+var_34], 0
jge loc_6FD8E
jmp short $+2
loc_6FD0E:
mov rax, [rbp+var_18]
mov rax, [rax+38h]
mov dword ptr [rax+90h], 7D8h
mov rax, [rbp+var_18]
mov rdi, [rax+38h]
add rdi, 297h
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [rbp+var_18]
mov rax, [rax+38h]
mov byte ptr [rax+29Ch], 0
mov rax, [rbp+var_18]
mov rdi, [rax+38h]
add rdi, 97h
lea rax, client_errors
mov rsi, [rax+40h]
mov edx, 1FFh
call _strncpy
mov rax, [rbp+var_18]
mov rax, [rax+38h]
mov byte ptr [rax+296h], 0
mov rax, [rbp+var_10]
mov byte ptr [rax], 1
jmp short loc_6FD9B
loc_6FD8E:
mov rax, [rbp+var_40]
mov cl, [rax+8]
mov rax, [rbp+var_10]
mov [rax], cl
loc_6FD9B:
mov [rbp+var_4], 0
loc_6FDA2:
mov eax, [rbp+var_4]
add rsp, 60h
pop rbp
retn
|
long long mysql_stmt_send_long_data_start(char *a1, long long a2, unsigned int a3, long long a4, long long a5)
{
long long v6; // [rsp+0h] [rbp-60h] BYREF
unsigned int v7; // [rsp+8h] [rbp-58h]
long long v8; // [rsp+10h] [rbp-50h]
long long v9; // [rsp+18h] [rbp-48h]
_BYTE *v10; // [rsp+20h] [rbp-40h]
int v11; // [rsp+2Ch] [rbp-34h]
long long v12; // [rsp+30h] [rbp-30h]
long long v13; // [rsp+38h] [rbp-28h]
unsigned int v14; // [rsp+44h] [rbp-1Ch]
long long v15; // [rsp+48h] [rbp-18h]
char *v16; // [rsp+50h] [rbp-10h]
v16 = a1;
v15 = a2;
v14 = a3;
v13 = a4;
v12 = a5;
if ( *(_QWORD *)(a2 + 56) )
{
v10 = *(_BYTE **)(*(_QWORD *)(*(_QWORD *)(v15 + 56) + 1152LL) + 40LL);
v6 = v15;
v7 = v14;
v8 = v13;
v9 = v12;
v10[20] = 1;
v11 = my_context_spawn(v10 + 56, mysql_stmt_send_long_data_start_internal, &v6);
v10[21] = 0;
v10[20] = 0;
if ( v11 <= 0 )
{
if ( v11 >= 0 )
{
*v16 = v10[8];
}
else
{
*(_DWORD *)(*(_QWORD *)(v15 + 56) + 144LL) = 2008;
strncpy(*(_QWORD *)(v15 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(*(_QWORD *)(v15 + 56) + 668LL) = 0;
strncpy(*(_QWORD *)(v15 + 56) + 151LL, client_errors[8], 511LL);
*(_BYTE *)(*(_QWORD *)(v15 + 56) + 662LL) = 0;
*v16 = 1;
}
return 0;
}
else
{
v10[21] = 1;
return *(unsigned int *)v10;
}
}
else
{
*v16 = mysql_stmt_send_long_data(v15, v14, v13, v12);
return 0;
}
}
|
mysql_stmt_send_long_data_start:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x38],0x0
JNZ 0x0016fc7e
MOV RDI,qword ptr [RBP + -0x18]
MOV ESI,dword ptr [RBP + -0x1c]
MOV RDX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
CALL 0x0015e050
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0016fda2
LAB_0016fc7e:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x38]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x60],RAX
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x58],EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV byte ptr [RAX + 0x14],0x1
MOV RDI,qword ptr [RBP + -0x40]
ADD RDI,0x38
LEA RSI,[0x16fdb0]
LEA RDX,[RBP + -0x60]
CALL 0x00170f10
MOV dword ptr [RBP + -0x34],EAX
MOV RAX,qword ptr [RBP + -0x40]
MOV byte ptr [RAX + 0x15],0x0
MOV RAX,qword ptr [RBP + -0x40]
MOV byte ptr [RAX + 0x14],0x0
CMP dword ptr [RBP + -0x34],0x0
JLE 0x0016fd02
MOV RAX,qword ptr [RBP + -0x40]
MOV byte ptr [RAX + 0x15],0x1
MOV RAX,qword ptr [RBP + -0x40]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0016fda2
LAB_0016fd02:
CMP dword ptr [RBP + -0x34],0x0
JGE 0x0016fd8e
JMP 0x0016fd0e
LAB_0016fd0e:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x38]
MOV dword ptr [RAX + 0x90],0x7d8
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RAX + 0x38]
ADD RDI,0x297
LEA RAX,[0x3499d0]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00138140
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x38]
MOV byte ptr [RAX + 0x29c],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RAX + 0x38]
ADD RDI,0x97
LEA RAX,[0x3499e0]
MOV RSI,qword ptr [RAX + 0x40]
MOV EDX,0x1ff
CALL 0x00138140
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x38]
MOV byte ptr [RAX + 0x296],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],0x1
JMP 0x0016fd9b
LAB_0016fd8e:
MOV RAX,qword ptr [RBP + -0x40]
MOV CL,byte ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
LAB_0016fd9b:
MOV dword ptr [RBP + -0x4],0x0
LAB_0016fda2:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x60
POP RBP
RET
|
int4
mysql_stmt_send_long_data_start
(int1 *param_1,long param_2,int4 param_3,int8 param_4,int8 param_5
)
{
int1 uVar1;
long local_68;
int4 local_60;
int8 local_58;
int8 local_50;
int4 *local_48;
int local_3c;
int8 local_38;
int8 local_30;
int4 local_24;
long local_20;
int1 *local_18;
int4 local_c;
local_38 = param_5;
local_30 = param_4;
local_24 = param_3;
local_20 = param_2;
local_18 = param_1;
if (*(long *)(param_2 + 0x38) == 0) {
uVar1 = mysql_stmt_send_long_data(param_2,param_3,param_4,param_5);
*local_18 = uVar1;
local_c = 0;
}
else {
local_48 = *(int4 **)(*(long *)(*(long *)(param_2 + 0x38) + 0x480) + 0x28);
*(int1 *)(local_48 + 5) = 1;
local_68 = param_2;
local_60 = param_3;
local_58 = param_4;
local_50 = param_5;
local_3c = my_context_spawn(local_48 + 0xe,mysql_stmt_send_long_data_start_internal,&local_68);
*(int1 *)((long)local_48 + 0x15) = 0;
*(int1 *)(local_48 + 5) = 0;
if (local_3c < 1) {
if (local_3c < 0) {
*(int4 *)(*(long *)(local_20 + 0x38) + 0x90) = 0x7d8;
strncpy((char *)(*(long *)(local_20 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5);
*(int1 *)(*(long *)(local_20 + 0x38) + 0x29c) = 0;
strncpy((char *)(*(long *)(local_20 + 0x38) + 0x97),PTR_s_Client_run_out_of_memory_00349a20,
0x1ff);
*(int1 *)(*(long *)(local_20 + 0x38) + 0x296) = 0;
*local_18 = 1;
}
else {
*local_18 = *(int1 *)(local_48 + 2);
}
local_c = 0;
}
else {
*(int1 *)((long)local_48 + 0x15) = 1;
local_c = *local_48;
}
}
return local_c;
}
|
|
7,627 |
google::protobuf::compiler::java::ExtraMessageOrBuilderInterfaces[abi:cxx11](google::protobuf::Descriptor const*)
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/java/helpers.cc
|
std::string ExtraMessageOrBuilderInterfaces(const Descriptor* descriptor) {
std::string interfaces = "// @@protoc_insertion_point(interface_extends:" +
descriptor->full_name() + ")";
return interfaces;
}
|
O3
|
cpp
|
google::protobuf::compiler::java::ExtraMessageOrBuilderInterfaces[abi:cxx11](google::protobuf::Descriptor const*):
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x8(%rsi), %rdx
addq $0x20, %rdx
leaq 0x15ddf9(%rip), %rsi # 0x1a1c26
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x328fc
leaq 0x15a1a8(%rip), %rsi # 0x19dfe9
movq %r14, %rdi
callq 0x1f8e0
leaq 0x10(%rbx), %rdx
movq %rdx, (%rbx)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
je 0x43e6b
movq %rsi, (%rbx)
movq (%rcx), %rdx
movq %rdx, 0x10(%rbx)
jmp 0x43e71
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x43e9b
callq 0x1f4a0
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x43ebc
callq 0x1f4a0
movq %rbx, %rdi
callq 0x1f860
|
_ZN6google8protobuf8compiler4java31ExtraMessageOrBuilderInterfacesB5cxx11EPKNS0_10DescriptorE:
push r14
push rbx
sub rsp, 28h
mov rbx, rdi
mov rdx, [rsi+8]
add rdx, 20h ; ' '
lea rsi, aProtocInsertio_2; "// @@protoc_insertion_point(interface_e"...
lea r14, [rsp+38h+var_30]
mov rdi, r14
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&)
lea rsi, a1_1+5; ")"
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea rdx, [rbx+10h]
mov [rbx], rdx
mov rsi, [rax]
mov rcx, rax
add rcx, 10h
cmp rsi, rcx
jz short loc_43E6B
mov [rbx], rsi
mov rdx, [rcx]
mov [rbx+10h], rdx
jmp short loc_43E71
loc_43E6B:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [rdx], xmm0
loc_43E71:
mov rdx, [rax+8]
mov [rbx+8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
lea rax, [rsp+38h+var_20]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_43E9B
call __ZdlPv; operator delete(void *)
loc_43E9B:
mov rax, rbx
add rsp, 28h
pop rbx
pop r14
retn
mov rbx, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_43EBC
call __ZdlPv; operator delete(void *)
loc_43EBC:
mov rdi, rbx
call __Unwind_Resume
|
long long google::protobuf::compiler::java::ExtraMessageOrBuilderInterfaces[abi:cxx11](long long a1, long long a2)
{
long long v2; // rax
_OWORD *v3; // rcx
void *v5[2]; // [rsp+8h] [rbp-30h] BYREF
char v6; // [rsp+18h] [rbp-20h] BYREF
std::operator+<char>(
(long long)v5,
(long long)"// @@protoc_insertion_point(interface_extends:",
(_QWORD *)(*(_QWORD *)(a2 + 8) + 32LL));
v2 = std::string::append(v5, ")");
*(_QWORD *)a1 = a1 + 16;
v3 = (_OWORD *)(v2 + 16);
if ( *(_QWORD *)v2 == v2 + 16 )
{
*(_OWORD *)(a1 + 16) = *v3;
}
else
{
*(_QWORD *)a1 = *(_QWORD *)v2;
*(_QWORD *)(a1 + 16) = *(_QWORD *)v3;
}
*(_QWORD *)(a1 + 8) = *(_QWORD *)(v2 + 8);
*(_QWORD *)v2 = v3;
*(_QWORD *)(v2 + 8) = 0LL;
*(_BYTE *)(v2 + 16) = 0;
if ( v5[0] != &v6 )
operator delete(v5[0]);
return a1;
}
|
ExtraMessageOrBuilderInterfaces[abi:cxx11]:
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV RBX,RDI
MOV RDX,qword ptr [RSI + 0x8]
ADD RDX,0x20
LEA RSI,[0x2a1c26]
LEA R14,[RSP + 0x8]
MOV RDI,R14
CALL 0x001328fc
LAB_00143e3a:
LEA RSI,[0x29dfe9]
MOV RDI,R14
CALL 0x0011f8e0
LAB_00143e49:
LEA RDX,[RBX + 0x10]
MOV qword ptr [RBX],RDX
MOV RSI,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RSI,RCX
JZ 0x00143e6b
MOV qword ptr [RBX],RSI
MOV RDX,qword ptr [RCX]
MOV qword ptr [RBX + 0x10],RDX
JMP 0x00143e71
LAB_00143e6b:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [RDX],XMM0
LAB_00143e71:
MOV RDX,qword ptr [RAX + 0x8]
MOV qword ptr [RBX + 0x8],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00143e9b
CALL 0x0011f4a0
LAB_00143e9b:
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R14
RET
|
/* google::protobuf::compiler::java::ExtraMessageOrBuilderInterfaces[abi:cxx11](google::protobuf::Descriptor
const*) */
Descriptor *
google::protobuf::compiler::java::ExtraMessageOrBuilderInterfaces_abi_cxx11_(Descriptor *param_1)
{
long lVar1;
long *plVar2;
long *plVar3;
int1 *local_30 [2];
int1 local_20 [16];
std::operator+((char *)local_30,(string *)"// @@protoc_insertion_point(interface_extends:");
/* try { // try from 00143e3a to 00143e48 has its CatchHandler @ 00143ea6 */
plVar2 = (long *)std::__cxx11::string::append((char *)local_30);
*(Descriptor **)param_1 = param_1 + 0x10;
plVar3 = plVar2 + 2;
if ((long *)*plVar2 == plVar3) {
lVar1 = plVar2[3];
*(long *)(param_1 + 0x10) = *plVar3;
*(long *)(param_1 + 0x18) = lVar1;
}
else {
*(long **)param_1 = (long *)*plVar2;
*(long *)(param_1 + 0x10) = *plVar3;
}
*(long *)(param_1 + 8) = plVar2[1];
*plVar2 = (long)plVar3;
plVar2[1] = 0;
*(int1 *)(plVar2 + 2) = 0;
if (local_30[0] != local_20) {
operator_delete(local_30[0]);
}
return param_1;
}
|
|
7,628 |
execute_direct_example
|
eloqsql/libmariadb/unittest/libmariadb/features-10_2.c
|
static int execute_direct_example(MYSQL *mysql)
{
MYSQL_STMT *stmt= mysql_stmt_init(mysql);
MYSQL_BIND bind[2];
int intval= 1;
int param_count= 2;
int rc;
const char *strval= "execute_direct_example1";
/* Direct execution without parameters */
rc= mariadb_stmt_execute_direct(stmt, "DROP TABLE IF EXISTS execute_direct", -1);
check_stmt_rc(rc, stmt);
rc= mariadb_stmt_execute_direct(stmt, "CREATE TABLE execute_direct (a int, b varchar(20))", -1);
rc= mysql_stmt_close(stmt);
stmt= mysql_stmt_init(mysql);
check_stmt_rc(rc, stmt);
memset(bind, 0, sizeof(MYSQL_BIND) * 2);
bind[0].buffer_type= MYSQL_TYPE_SHORT;
bind[0].buffer= &intval;
bind[1].buffer_type= MYSQL_TYPE_STRING;
bind[1].buffer= (char *)strval;
bind[1].buffer_length= (unsigned long)strlen(strval);
// https://jira.mariadb.org/browse/XPT-266
if (IS_XPAND()) {
rc= mysql_query(mysql, "SET NAMES UTF8");
check_mysql_rc(rc, mysql);
}
/* set number of parameters */
rc= mysql_stmt_attr_set(stmt, STMT_ATTR_PREBIND_PARAMS, ¶m_count);
check_stmt_rc(rc, stmt);
/* bind parameters */
rc= mysql_stmt_bind_param(stmt, bind);
check_stmt_rc(rc, stmt);
rc= mariadb_stmt_execute_direct(stmt, "INSERT INTO execute_direct VALUES (?,?)", -1);
check_stmt_rc(rc, stmt);
mysql_stmt_close(stmt);
rc= mysql_query(mysql, "DROP TABLE execute_direct");
check_mysql_rc(rc, mysql);
return OK;
}
|
O3
|
c
|
execute_direct_example:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xe8, %rsp
movq %rdi, %rbx
callq 0x21598
movq %rax, %r14
movl $0x1, -0x20(%rbp)
movl $0x2, -0x1c(%rbp)
leaq 0x2045d(%rip), %rsi # 0x357f9
movq %rax, %rdi
movq $-0x1, %rdx
callq 0x22f18
testl %eax, %eax
je 0x153cf
movq %r14, %rdi
callq 0x21038
leaq 0x1fc4a(%rip), %rdi # 0x35008
leaq 0x202d8(%rip), %rdx # 0x3569d
movq %rax, %rsi
movl $0x57, %ecx
jmp 0x1541e
leaq 0x20447(%rip), %rsi # 0x3581d
movq %r14, %rdi
movq $-0x1, %rdx
callq 0x22f18
movq %r14, %rdi
callq 0x20fa9
movl %eax, %r15d
movq %rbx, %rdi
callq 0x21598
movq %rax, %r14
testb %r15b, %r15b
je 0x15438
movq %r14, %rdi
callq 0x21038
leaq 0x1fbf9(%rip), %rdi # 0x35008
leaq 0x20287(%rip), %rdx # 0x3569d
movq %rax, %rsi
movl $0x5b, %ecx
xorl %eax, %eax
callq 0x157cf
movl $0x1, %eax
addq $0xe8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq -0x100(%rbp), %r15
movl $0xe0, %edx
movq %r15, %rdi
xorl %esi, %esi
callq 0x13260
movl $0x2, 0x60(%r15)
leaq -0x20(%rbp), %rax
movq %rax, 0x10(%r15)
movl $0xfe, 0xd0(%r15)
leaq 0x20371(%rip), %rax # 0x357e1
movq %rax, 0x80(%r15)
movq $0x17, 0xb0(%r15)
movq 0x35987(%rip), %rdi # 0x4ae10
testq %rdi, %rdi
je 0x154a7
callq 0x1c6e2
leaq 0x1ffa2(%rip), %rsi # 0x3543c
movq %rax, %rdi
callq 0x13100
testq %rax, %rax
jne 0x154cb
leaq 0x1ff94(%rip), %rdi # 0x35442
callq 0x13590
testq %rax, %rax
je 0x1551c
leaq 0x1ff87(%rip), %rsi # 0x35446
movq %rax, %rdi
callq 0x13640
testl %eax, %eax
jne 0x1551c
leaq 0x2037e(%rip), %rsi # 0x35850
movq %rbx, %rdi
callq 0x1aed9
testl %eax, %eax
je 0x1551c
movl %eax, %r15d
movq %rbx, %rdi
callq 0x1cf52
movq %rax, %r14
movq %rbx, %rdi
callq 0x1cf3d
leaq 0x1fc52(%rip), %rdi # 0x3514d
leaq 0x2019b(%rip), %r8 # 0x3569d
movl %r15d, %esi
movq %r14, %rdx
movl %eax, %ecx
movl $0x66, %r9d
xorl %eax, %eax
callq 0x157cf
jmp 0x15425
leaq -0x1c(%rbp), %rdx
movq %r14, %rdi
movl $0xc8, %esi
callq 0x2055a
testb %al, %al
je 0x15554
movq %r14, %rdi
callq 0x21038
leaq 0x1fac8(%rip), %rdi # 0x35008
leaq 0x20156(%rip), %rdx # 0x3569d
movq %rax, %rsi
movl $0x6b, %ecx
jmp 0x1541e
leaq -0x100(%rbp), %rsi
movq %r14, %rdi
callq 0x209ca
testb %al, %al
je 0x1558a
movq %r14, %rdi
callq 0x21038
leaq 0x1fa92(%rip), %rdi # 0x35008
leaq 0x20120(%rip), %rdx # 0x3569d
movq %rax, %rsi
movl $0x6f, %ecx
jmp 0x1541e
leaq 0x202ce(%rip), %rsi # 0x3585f
movq %r14, %rdi
movq $-0x1, %rdx
callq 0x22f18
movq %r14, %rdi
testl %eax, %eax
je 0x155c7
callq 0x21038
leaq 0x1fa55(%rip), %rdi # 0x35008
leaq 0x200e3(%rip), %rdx # 0x3569d
movq %rax, %rsi
movl $0x72, %ecx
jmp 0x1541e
callq 0x20fa9
leaq 0x202b4(%rip), %rsi # 0x35887
movq %rbx, %rdi
callq 0x1aed9
testl %eax, %eax
je 0x15616
movl %eax, %r14d
movq %rbx, %rdi
callq 0x1cf52
movq %rax, %r15
movq %rbx, %rdi
callq 0x1cf3d
leaq 0x1fb51(%rip), %rdi # 0x3514d
leaq 0x2009a(%rip), %r8 # 0x3569d
movl %r14d, %esi
movq %r15, %rdx
movl %eax, %ecx
movl $0x77, %r9d
jmp 0x15510
xorl %eax, %eax
jmp 0x1542a
|
execute_direct_example:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 0E8h
mov rbx, rdi
call mysql_stmt_init
mov r14, rax
mov [rbp+var_20], 1
mov [rbp+var_1C], 2
lea rsi, aDropTableIfExi_0; "DROP TABLE IF EXISTS execute_direct"
mov rdi, rax
mov rdx, 0FFFFFFFFFFFFFFFFh
call mariadb_stmt_execute_direct
test eax, eax
jz short loc_153CF
mov rdi, r14
call mysql_stmt_error
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov rsi, rax
mov ecx, 57h ; 'W'
jmp short loc_1541E
loc_153CF:
lea rsi, aCreateTableExe; "CREATE TABLE execute_direct (a int, b v"...
mov rdi, r14
mov rdx, 0FFFFFFFFFFFFFFFFh
call mariadb_stmt_execute_direct
mov rdi, r14
call mysql_stmt_close
mov r15d, eax
mov rdi, rbx
call mysql_stmt_init
mov r14, rax
test r15b, r15b
jz short loc_15438
mov rdi, r14
call mysql_stmt_error
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov rsi, rax
mov ecx, 5Bh ; '['
loc_1541E:
xor eax, eax
call diag
loc_15425:
mov eax, 1
loc_1542A:
add rsp, 0E8h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_15438:
lea r15, [rbp+var_100]
mov edx, 0E0h
mov rdi, r15
xor esi, esi
call _memset
mov dword ptr [r15+60h], 2
lea rax, [rbp+var_20]
mov [r15+10h], rax
mov dword ptr [r15+0D0h], 0FEh
lea rax, aExecuteDirectE; "execute_direct_example1"
mov [r15+80h], rax
mov qword ptr [r15+0B0h], 17h
mov rdi, cs:mysql_default
test rdi, rdi
jz short loc_154A7
call mysql_get_server_info
lea rsi, aXpand; "Xpand"
mov rdi, rax
call _strstr
test rax, rax
jnz short loc_154CB
loc_154A7:
lea rdi, aSrv; "srv"
call _getenv
test rax, rax
jz short loc_1551C
lea rsi, aXpand_0; "xpand"
mov rdi, rax
call _strcmp
test eax, eax
jnz short loc_1551C
loc_154CB:
lea rsi, aSetNamesUtf8; "SET NAMES UTF8"
mov rdi, rbx
call mysql_query
test eax, eax
jz short loc_1551C
mov r15d, eax
mov rdi, rbx
call mysql_error
mov r14, rax
mov rdi, rbx
call mysql_errno
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, r15d
mov rdx, r14
mov ecx, eax
mov r9d, 66h ; 'f'
loc_15510:
xor eax, eax
call diag
jmp loc_15425
loc_1551C:
lea rdx, [rbp+var_1C]
mov rdi, r14
mov esi, 0C8h
call mysql_stmt_attr_set
test al, al
jz short loc_15554
mov rdi, r14
call mysql_stmt_error
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov rsi, rax
mov ecx, 6Bh ; 'k'
jmp loc_1541E
loc_15554:
lea rsi, [rbp+var_100]
mov rdi, r14
call mysql_stmt_bind_param
test al, al
jz short loc_1558A
mov rdi, r14
call mysql_stmt_error
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov rsi, rax
mov ecx, 6Fh ; 'o'
jmp loc_1541E
loc_1558A:
lea rsi, aInsertIntoExec; "INSERT INTO execute_direct VALUES (?,?)"
mov rdi, r14
mov rdx, 0FFFFFFFFFFFFFFFFh
call mariadb_stmt_execute_direct
mov rdi, r14
test eax, eax
jz short loc_155C7
call mysql_stmt_error
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov rsi, rax
mov ecx, 72h ; 'r'
jmp loc_1541E
loc_155C7:
call mysql_stmt_close
lea rsi, aDropTableExecu; "DROP TABLE execute_direct"
mov rdi, rbx
call mysql_query
test eax, eax
jz short loc_15616
mov r14d, eax
mov rdi, rbx
call mysql_error
mov r15, rax
mov rdi, rbx
call mysql_errno
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, r14d
mov rdx, r15
mov ecx, eax
mov r9d, 77h ; 'w'
jmp loc_15510
loc_15616:
xor eax, eax
jmp loc_1542A
|
long long execute_direct_example(long long a1)
{
long long v1; // r14
int v2; // eax
const char *v3; // r8
int v4; // r9d
const char *v5; // rdi
const char *v6; // rdx
int v7; // esi
int v8; // ecx
char v9; // r15
long long v10; // rax
long long v11; // r14
int v12; // eax
long long server_info; // rax
long long v15; // rax
int v16; // eax
int v17; // r15d
int v18; // r14d
int v19; // eax
int v20; // eax
int v21; // eax
int v22; // eax
int v23; // eax
int v24; // r14d
int v25; // r15d
int v26; // eax
_BYTE v27[16]; // [rsp+0h] [rbp-100h] BYREF
int *v28; // [rsp+10h] [rbp-F0h]
int v29; // [rsp+60h] [rbp-A0h]
const char *v30; // [rsp+80h] [rbp-80h]
long long v31; // [rsp+B0h] [rbp-50h]
int v32; // [rsp+D0h] [rbp-30h]
int v33; // [rsp+E0h] [rbp-20h] BYREF
int v34[7]; // [rsp+E4h] [rbp-1Ch] BYREF
v1 = mysql_stmt_init(a1);
v33 = 1;
v34[0] = 2;
if ( (unsigned int)mariadb_stmt_execute_direct(v1, "DROP TABLE IF EXISTS execute_direct", -1LL) )
{
v2 = mysql_stmt_error(v1);
v5 = "Error: %s (%s: %d)";
v6 = "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/features-10_2.c";
v7 = v2;
v8 = 87;
LABEL_5:
diag((_DWORD)v5, v7, (_DWORD)v6, v8, (_DWORD)v3, v4);
return 1LL;
}
mariadb_stmt_execute_direct(v1, "CREATE TABLE execute_direct (a int, b varchar(20))", -1LL);
v9 = mysql_stmt_close(v1);
v10 = mysql_stmt_init(a1);
v11 = v10;
if ( v9 )
{
v12 = mysql_stmt_error(v10);
v5 = "Error: %s (%s: %d)";
v6 = "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/features-10_2.c";
v7 = v12;
v8 = 91;
goto LABEL_5;
}
memset(v27, 0LL, 224LL);
v29 = 2;
v28 = &v33;
v32 = 254;
v30 = "execute_direct_example1";
v31 = 23LL;
if ( mysql_default && (server_info = mysql_get_server_info(mysql_default), strstr(server_info, "Xpand"))
|| (v15 = getenv("srv")) != 0 && !(unsigned int)strcmp(v15, "xpand") )
{
v16 = mysql_query(a1, "SET NAMES UTF8");
if ( v16 )
{
v17 = v16;
v18 = mysql_error(a1);
v19 = mysql_errno(a1);
v5 = "Error (%d): %s (%d) in %s line %d";
v3 = "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/features-10_2.c";
v7 = v17;
LODWORD(v6) = v18;
v8 = v19;
v4 = 102;
goto LABEL_5;
}
}
if ( (unsigned __int8)mysql_stmt_attr_set(v11, 200LL, v34) )
{
v20 = mysql_stmt_error(v11);
v5 = "Error: %s (%s: %d)";
v6 = "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/features-10_2.c";
v7 = v20;
v8 = 107;
goto LABEL_5;
}
if ( (unsigned __int8)mysql_stmt_bind_param(v11, v27) )
{
v21 = mysql_stmt_error(v11);
v5 = "Error: %s (%s: %d)";
v6 = "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/features-10_2.c";
v7 = v21;
v8 = 111;
goto LABEL_5;
}
if ( (unsigned int)mariadb_stmt_execute_direct(v11, "INSERT INTO execute_direct VALUES (?,?)", -1LL) )
{
v22 = mysql_stmt_error(v11);
v5 = "Error: %s (%s: %d)";
v6 = "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/features-10_2.c";
v7 = v22;
v8 = 114;
goto LABEL_5;
}
mysql_stmt_close(v11);
v23 = mysql_query(a1, "DROP TABLE execute_direct");
if ( v23 )
{
v24 = v23;
v25 = mysql_error(a1);
v26 = mysql_errno(a1);
v5 = "Error (%d): %s (%d) in %s line %d";
v3 = "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/features-10_2.c";
v7 = v24;
LODWORD(v6) = v25;
v8 = v26;
v4 = 119;
goto LABEL_5;
}
return 0LL;
}
|
execute_direct_example:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0xe8
MOV RBX,RDI
CALL 0x00121598
MOV R14,RAX
MOV dword ptr [RBP + -0x20],0x1
MOV dword ptr [RBP + -0x1c],0x2
LEA RSI,[0x1357f9]
MOV RDI,RAX
MOV RDX,-0x1
CALL 0x00122f18
TEST EAX,EAX
JZ 0x001153cf
MOV RDI,R14
CALL 0x00121038
LEA RDI,[0x135008]
LEA RDX,[0x13569d]
MOV RSI,RAX
MOV ECX,0x57
JMP 0x0011541e
LAB_001153cf:
LEA RSI,[0x13581d]
MOV RDI,R14
MOV RDX,-0x1
CALL 0x00122f18
MOV RDI,R14
CALL 0x00120fa9
MOV R15D,EAX
MOV RDI,RBX
CALL 0x00121598
MOV R14,RAX
TEST R15B,R15B
JZ 0x00115438
MOV RDI,R14
CALL 0x00121038
LEA RDI,[0x135008]
LEA RDX,[0x13569d]
MOV RSI,RAX
MOV ECX,0x5b
LAB_0011541e:
XOR EAX,EAX
CALL 0x001157cf
LAB_00115425:
MOV EAX,0x1
LAB_0011542a:
ADD RSP,0xe8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00115438:
LEA R15,[RBP + -0x100]
MOV EDX,0xe0
MOV RDI,R15
XOR ESI,ESI
CALL 0x00113260
MOV dword ptr [R15 + 0x60],0x2
LEA RAX,[RBP + -0x20]
MOV qword ptr [R15 + 0x10],RAX
MOV dword ptr [R15 + 0xd0],0xfe
LEA RAX,[0x1357e1]
MOV qword ptr [R15 + 0x80],RAX
MOV qword ptr [R15 + 0xb0],0x17
MOV RDI,qword ptr [0x0014ae10]
TEST RDI,RDI
JZ 0x001154a7
CALL 0x0011c6e2
LEA RSI,[0x13543c]
MOV RDI,RAX
CALL 0x00113100
TEST RAX,RAX
JNZ 0x001154cb
LAB_001154a7:
LEA RDI,[0x135442]
CALL 0x00113590
TEST RAX,RAX
JZ 0x0011551c
LEA RSI,[0x135446]
MOV RDI,RAX
CALL 0x00113640
TEST EAX,EAX
JNZ 0x0011551c
LAB_001154cb:
LEA RSI,[0x135850]
MOV RDI,RBX
CALL 0x0011aed9
TEST EAX,EAX
JZ 0x0011551c
MOV R15D,EAX
MOV RDI,RBX
CALL 0x0011cf52
MOV R14,RAX
MOV RDI,RBX
CALL 0x0011cf3d
LEA RDI,[0x13514d]
LEA R8,[0x13569d]
MOV ESI,R15D
MOV RDX,R14
MOV ECX,EAX
MOV R9D,0x66
LAB_00115510:
XOR EAX,EAX
CALL 0x001157cf
JMP 0x00115425
LAB_0011551c:
LEA RDX,[RBP + -0x1c]
MOV RDI,R14
MOV ESI,0xc8
CALL 0x0012055a
TEST AL,AL
JZ 0x00115554
MOV RDI,R14
CALL 0x00121038
LEA RDI,[0x135008]
LEA RDX,[0x13569d]
MOV RSI,RAX
MOV ECX,0x6b
JMP 0x0011541e
LAB_00115554:
LEA RSI,[RBP + -0x100]
MOV RDI,R14
CALL 0x001209ca
TEST AL,AL
JZ 0x0011558a
MOV RDI,R14
CALL 0x00121038
LEA RDI,[0x135008]
LEA RDX,[0x13569d]
MOV RSI,RAX
MOV ECX,0x6f
JMP 0x0011541e
LAB_0011558a:
LEA RSI,[0x13585f]
MOV RDI,R14
MOV RDX,-0x1
CALL 0x00122f18
MOV RDI,R14
TEST EAX,EAX
JZ 0x001155c7
CALL 0x00121038
LEA RDI,[0x135008]
LEA RDX,[0x13569d]
MOV RSI,RAX
MOV ECX,0x72
JMP 0x0011541e
LAB_001155c7:
CALL 0x00120fa9
LEA RSI,[0x135887]
MOV RDI,RBX
CALL 0x0011aed9
TEST EAX,EAX
JZ 0x00115616
MOV R14D,EAX
MOV RDI,RBX
CALL 0x0011cf52
MOV R15,RAX
MOV RDI,RBX
CALL 0x0011cf3d
LEA RDI,[0x13514d]
LEA R8,[0x13569d]
MOV ESI,R14D
MOV RDX,R15
MOV ECX,EAX
MOV R9D,0x77
JMP 0x00115510
LAB_00115616:
XOR EAX,EAX
JMP 0x0011542a
|
int8 execute_direct_example(int8 param_1)
{
char cVar1;
int iVar2;
int4 uVar3;
int8 uVar4;
char *pcVar5;
int8 uVar6;
int1 local_108 [16];
int4 *local_f8;
int4 local_a8;
char *local_88;
int8 local_58;
int4 local_38;
int4 local_28;
int4 local_24;
uVar4 = mysql_stmt_init();
local_28 = 1;
local_24 = 2;
iVar2 = mariadb_stmt_execute_direct
(uVar4,"DROP TABLE IF EXISTS execute_direct",0xffffffffffffffff);
if (iVar2 != 0) {
uVar4 = mysql_stmt_error(uVar4);
uVar6 = 0x57;
goto LAB_0011541e;
}
mariadb_stmt_execute_direct
(uVar4,"CREATE TABLE execute_direct (a int, b varchar(20))",0xffffffffffffffff);
cVar1 = mysql_stmt_close(uVar4);
uVar4 = mysql_stmt_init(param_1);
if (cVar1 != '\0') {
uVar4 = mysql_stmt_error(uVar4);
uVar6 = 0x5b;
goto LAB_0011541e;
}
memset(local_108,0,0xe0);
local_a8 = 2;
local_f8 = &local_28;
local_38 = 0xfe;
local_88 = "execute_direct_example1";
local_58 = 0x17;
if (mysql_default == 0) {
LAB_001154a7:
pcVar5 = getenv("srv");
if ((pcVar5 != (char *)0x0) && (iVar2 = strcmp(pcVar5,"xpand"), iVar2 == 0)) goto LAB_001154cb;
}
else {
pcVar5 = (char *)mysql_get_server_info();
pcVar5 = strstr(pcVar5,"Xpand");
if (pcVar5 == (char *)0x0) goto LAB_001154a7;
LAB_001154cb:
iVar2 = mysql_query(param_1,"SET NAMES UTF8");
if (iVar2 != 0) {
uVar4 = mysql_error(param_1);
uVar3 = mysql_errno(param_1);
uVar6 = 0x66;
goto LAB_00115510;
}
}
cVar1 = mysql_stmt_attr_set(uVar4,200,&local_24);
if (cVar1 == '\0') {
cVar1 = mysql_stmt_bind_param(uVar4,local_108);
if (cVar1 == '\0') {
iVar2 = mariadb_stmt_execute_direct
(uVar4,"INSERT INTO execute_direct VALUES (?,?)",0xffffffffffffffff);
if (iVar2 == 0) {
mysql_stmt_close(uVar4);
iVar2 = mysql_query(param_1,"DROP TABLE execute_direct");
if (iVar2 == 0) {
return 0;
}
uVar4 = mysql_error(param_1);
uVar3 = mysql_errno(param_1);
uVar6 = 0x77;
LAB_00115510:
diag("Error (%d): %s (%d) in %s line %d",iVar2,uVar4,uVar3,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/features-10_2.c"
,uVar6);
return 1;
}
uVar4 = mysql_stmt_error();
uVar6 = 0x72;
}
else {
uVar4 = mysql_stmt_error(uVar4);
uVar6 = 0x6f;
}
}
else {
uVar4 = mysql_stmt_error(uVar4);
uVar6 = 0x6b;
}
LAB_0011541e:
diag("Error: %s (%s: %d)",uVar4,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/features-10_2.c",
uVar6);
return 1;
}
|
|
7,629 |
my_caseup_utf32
|
eloqsql/strings/ctype-ucs2.c
|
static size_t
my_caseup_utf32(CHARSET_INFO *cs, const char *src, size_t srclen,
char *dst, size_t dstlen)
{
my_wc_t wc;
int res;
const char *srcend= src + srclen;
char *dstend= dst + dstlen;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
DBUG_ASSERT(srclen <= dstlen);
while ((src < srcend) &&
(res= my_utf32_uni(cs, &wc, (uchar *)src, (uchar*) srcend)) > 0)
{
my_toupper_utf32(uni_plane, &wc);
if (res != my_uni_utf32(cs, wc, (uchar*) dst, (uchar*) dstend))
break;
src+= res;
dst+= res;
}
return srclen;
}
|
O3
|
c
|
my_caseup_utf32:
movq %rdx, %rax
cmpq $0x4, %rdx
jl 0xc77a9
pushq %rbp
movq %rsp, %rbp
pushq %rbx
leaq (%rsi,%rax), %rdx
addq %rcx, %r8
movq 0x78(%rdi), %rdi
addq $0x4, %rcx
movzbl (%rsi), %r9d
shll $0x18, %r9d
movzbl 0x1(%rsi), %r10d
shll $0x10, %r10d
orl %r9d, %r10d
cmpl $0x10ffff, %r10d # imm = 0x10FFFF
ja 0xc77a7
movzbl 0x2(%rsi), %ebx
shll $0x8, %ebx
movzbl 0x3(%rsi), %r9d
orq %r9, %rbx
orq %r10, %rbx
cmpq (%rdi), %rbx
ja 0xc7768
movq 0x8(%rdi), %r10
movl %ebx, %r11d
shrl $0x8, %r11d
movq (%r10,%r11,8), %r10
testq %r10, %r10
je 0xc7768
leaq (%r9,%r9,2), %r9
movl (%r10,%r9,4), %ebx
cmpq %r8, %rcx
ja 0xc77a7
cmpl $0x10ffff, %ebx # imm = 0x10FFFF
ja 0xc77a7
movb $0x0, -0x4(%rcx)
movl %ebx, %r9d
shrl $0x10, %r9d
movb %r9b, -0x3(%rcx)
movb %bh, -0x2(%rcx)
movb %bl, -0x1(%rcx)
leaq 0x4(%rsi), %r9
cmpq %rdx, %r9
jae 0xc77a7
addq $0x8, %rsi
addq $0x4, %rcx
cmpq %rdx, %rsi
movq %r9, %rsi
jbe 0xc7718
popq %rbx
popq %rbp
retq
|
my_caseup_utf32:
mov rax, rdx
cmp rdx, 4
jl locret_C77A9
push rbp
mov rbp, rsp
push rbx
lea rdx, [rsi+rax]
add r8, rcx
mov rdi, [rdi+78h]
add rcx, 4
loc_C7718:
movzx r9d, byte ptr [rsi]
shl r9d, 18h
movzx r10d, byte ptr [rsi+1]
shl r10d, 10h
or r10d, r9d
cmp r10d, offset aYbyYgylyiy; "YbY`YgYlYiY"
ja short loc_C77A7
movzx ebx, byte ptr [rsi+2]
shl ebx, 8
movzx r9d, byte ptr [rsi+3]
or rbx, r9
or rbx, r10
cmp rbx, [rdi]
ja short loc_C7768
mov r10, [rdi+8]
mov r11d, ebx
shr r11d, 8
mov r10, [r10+r11*8]
test r10, r10
jz short loc_C7768
lea r9, [r9+r9*2]
mov ebx, [r10+r9*4]
loc_C7768:
cmp rcx, r8
ja short loc_C77A7
cmp ebx, offset aYbyYgylyiy; "YbY`YgYlYiY"
ja short loc_C77A7
mov byte ptr [rcx-4], 0
mov r9d, ebx
shr r9d, 10h
mov [rcx-3], r9b
mov [rcx-2], bh
mov [rcx-1], bl
lea r9, [rsi+4]
cmp r9, rdx
jnb short loc_C77A7
add rsi, 8
add rcx, 4
cmp rsi, rdx
mov rsi, r9
jbe loc_C7718
loc_C77A7:
pop rbx
pop rbp
locret_C77A9:
retn
|
long long my_caseup_utf32(long long a1, unsigned __int8 *a2, long long a3, long long a4, long long a5)
{
long long result; // rax
unsigned long long v6; // rdx
unsigned long long v7; // r8
unsigned long long *v8; // rdi
unsigned long long v9; // rcx
long long v10; // r10
long long v11; // r9
unsigned long long v12; // rbx
long long v13; // r10
bool v14; // cc
result = a3;
if ( a3 >= 4 )
{
v6 = (unsigned long long)&a2[a3];
v7 = a4 + a5;
v8 = *(unsigned long long **)(a1 + 120);
v9 = a4 + 4;
do
{
v10 = (*a2 << 24) | (a2[1] << 16);
if ( (unsigned int)v10 > (unsigned int)"YbY`YgYlYiY" )
break;
v11 = a2[3];
v12 = v10 | v11 | (a2[2] << 8);
if ( v12 <= *v8 )
{
v13 = *(_QWORD *)(v8[1] + 8LL * ((unsigned int)v12 >> 8));
if ( v13 )
LODWORD(v12) = *(_DWORD *)(v13 + 12 * v11);
}
if ( v9 > v7 )
break;
if ( (unsigned int)v12 > (unsigned int)"YbY`YgYlYiY" )
break;
*(_BYTE *)(v9 - 4) = 0;
*(_BYTE *)(v9 - 3) = BYTE2(v12);
*(_BYTE *)(v9 - 2) = BYTE1(v12);
*(_BYTE *)(v9 - 1) = v12;
if ( (unsigned long long)(a2 + 4) >= v6 )
break;
v9 += 4LL;
v14 = (unsigned long long)(a2 + 8) <= v6;
a2 += 4;
}
while ( v14 );
}
return result;
}
|
my_caseup_utf32:
MOV RAX,RDX
CMP RDX,0x4
JL 0x001c77a9
PUSH RBP
MOV RBP,RSP
PUSH RBX
LEA RDX,[RSI + RAX*0x1]
ADD R8,RCX
MOV RDI,qword ptr [RDI + 0x78]
ADD RCX,0x4
LAB_001c7718:
MOVZX R9D,byte ptr [RSI]
SHL R9D,0x18
MOVZX R10D,byte ptr [RSI + 0x1]
SHL R10D,0x10
OR R10D,R9D
CMP R10D,0x10ffff
JA 0x001c77a7
MOVZX EBX,byte ptr [RSI + 0x2]
SHL EBX,0x8
MOVZX R9D,byte ptr [RSI + 0x3]
OR RBX,R9
OR RBX,R10
CMP RBX,qword ptr [RDI]
JA 0x001c7768
MOV R10,qword ptr [RDI + 0x8]
MOV R11D,EBX
SHR R11D,0x8
MOV R10,qword ptr [R10 + R11*0x8]
TEST R10,R10
JZ 0x001c7768
LEA R9,[R9 + R9*0x2]
MOV EBX,dword ptr [R10 + R9*0x4]
LAB_001c7768:
CMP RCX,R8
JA 0x001c77a7
CMP EBX,0x10ffff
JA 0x001c77a7
MOV byte ptr [RCX + -0x4],0x0
MOV R9D,EBX
SHR R9D,0x10
MOV byte ptr [RCX + -0x3],R9B
MOV byte ptr [RCX + -0x2],BH
MOV byte ptr [RCX + -0x1],BL
LEA R9,[RSI + 0x4]
CMP R9,RDX
JNC 0x001c77a7
ADD RSI,0x8
ADD RCX,0x4
CMP RSI,RDX
MOV RSI,R9
JBE 0x001c7718
LAB_001c77a7:
POP RBX
POP RBP
LAB_001c77a9:
RET
|
void my_caseup_utf32(long param_1,byte *param_2,long param_3,long param_4,long param_5)
{
ulong *puVar1;
long lVar2;
ulong uVar3;
ulong uVar4;
byte *pbVar5;
byte *pbVar6;
uint uVar7;
if (3 < param_3) {
puVar1 = *(ulong **)(param_1 + 0x78);
uVar3 = param_4 + 4;
pbVar5 = param_2;
while (uVar7 = (uint)pbVar5[1] << 0x10 | (uint)*pbVar5 << 0x18, uVar7 < 0x110000) {
uVar4 = (ulong)CONCAT11(pbVar5[2],pbVar5[3]) | (ulong)uVar7;
if ((uVar4 <= *puVar1) && (lVar2 = *(long *)(puVar1[1] + (uVar4 >> 8) * 8), lVar2 != 0)) {
uVar4 = (ulong)*(uint *)(lVar2 + (ulong)pbVar5[3] * 0xc);
}
if ((ulong)(param_5 + param_4) < uVar3) {
return;
}
if (0x10ffff < (uint)uVar4) {
return;
}
*(int1 *)(uVar3 - 4) = 0;
*(char *)(uVar3 - 3) = (char)(uVar4 >> 0x10);
*(char *)(uVar3 - 2) = (char)(uVar4 >> 8);
*(char *)(uVar3 - 1) = (char)uVar4;
if (param_2 + param_3 <= pbVar5 + 4) {
return;
}
pbVar6 = pbVar5 + 8;
uVar3 = uVar3 + 4;
pbVar5 = pbVar5 + 4;
if (param_2 + param_3 < pbVar6) {
return;
}
}
}
return;
}
|
|
7,630 |
wsrep::to_c_string(wsrep::client_state::mode)
|
eloqsql/wsrep-lib/include/wsrep/client_state.hpp
|
static inline const char* to_c_string(enum wsrep::client_state::mode mode)
{
switch (mode)
{
case wsrep::client_state::m_undefined: return "undefined";
case wsrep::client_state::m_local: return "local";
case wsrep::client_state::m_high_priority: return "high priority";
case wsrep::client_state::m_toi: return "toi";
case wsrep::client_state::m_rsu: return "rsu";
case wsrep::client_state::m_nbo: return "nbo";
}
return "unknown";
}
|
O0
|
cpp
|
wsrep::to_c_string(wsrep::client_state::mode):
pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq %rax, -0x18(%rbp)
subq $0x5, %rax
ja 0xfea786
movq -0x18(%rbp), %rax
leaq 0x5fa949(%rip), %rcx # 0x15e5078
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x4b4ba6(%rip), %rax # 0x149f2e5
movq %rax, -0x8(%rbp)
jmp 0xfea791
leaq 0x42f66f(%rip), %rax # 0x1419dbb
movq %rax, -0x8(%rbp)
jmp 0xfea791
leaq 0x47998d(%rip), %rax # 0x14640e6
movq %rax, -0x8(%rbp)
jmp 0xfea791
leaq 0x48967d(%rip), %rax # 0x1473de3
movq %rax, -0x8(%rbp)
jmp 0xfea791
leaq 0x42f64e(%rip), %rax # 0x1419dc1
movq %rax, -0x8(%rbp)
jmp 0xfea791
leaq 0x42f645(%rip), %rax # 0x1419dc5
movq %rax, -0x8(%rbp)
jmp 0xfea791
leaq 0x459429(%rip), %rax # 0x1443bb6
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw (%rax,%rax)
|
_ZN5wsrepL11to_c_stringENS_12client_state4modeE_7:
push rbp
mov rbp, rsp
mov [rbp+var_C], edi
mov eax, [rbp+var_C]
mov [rbp+var_18], rax
sub rax, 5; switch 6 cases
ja short def_FEA736; jumptable 0000000000FEA736 default case
mov rax, [rbp+var_18]
lea rcx, jpt_FEA736
movsxd rax, ds:(jpt_FEA736 - 15E5078h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_FEA738:
lea rax, aUndefined+1; jumptable 0000000000FEA736 case 0
mov [rbp+var_8], rax
jmp short loc_FEA791
loc_FEA745:
lea rax, aLocal_0; jumptable 0000000000FEA736 case 1
mov [rbp+var_8], rax
jmp short loc_FEA791
loc_FEA752:
lea rax, aReadHighPriori_0+5; jumptable 0000000000FEA736 case 2
mov [rbp+var_8], rax
jmp short loc_FEA791
loc_FEA75F:
lea rax, aWsrepApplierTo+0Eh; jumptable 0000000000FEA736 case 3
mov [rbp+var_8], rax
jmp short loc_FEA791
loc_FEA76C:
lea rax, aRsu; jumptable 0000000000FEA736 case 4
mov [rbp+var_8], rax
jmp short loc_FEA791
loc_FEA779:
lea rax, aNbo; jumptable 0000000000FEA736 case 5
mov [rbp+var_8], rax
jmp short loc_FEA791
def_FEA736:
lea rax, aSpatialDecompU+0Fh; jumptable 0000000000FEA736 default case
mov [rbp+var_8], rax
loc_FEA791:
mov rax, [rbp+var_8]
pop rbp
retn
|
char * wsrep::to_c_string(int a1)
{
char *v2; // [rsp+10h] [rbp-8h]
switch ( a1 )
{
case 0:
v2 = "undefined";
break;
case 1:
v2 = "local";
break;
case 2:
v2 = "high priority";
break;
case 3:
v2 = "toi";
break;
case 4:
v2 = "rsu";
break;
case 5:
v2 = "nbo";
break;
default:
v2 = "unknown";
break;
}
return v2;
}
|
_ma_calc_pack_length:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
CMP qword ptr [RBP + -0x10],0xfe
JNC 0x00fea72f
MOV EAX,0x1
MOV dword ptr [RBP + -0x14],EAX
JMP 0x00fea75f
LAB_00fea72f:
CMP qword ptr [RBP + -0x10],0x10000
JNC 0x00fea743
MOV EAX,0x3
MOV dword ptr [RBP + -0x18],EAX
JMP 0x00fea759
LAB_00fea743:
MOV EDX,dword ptr [RBP + -0x4]
MOV EAX,0x5
MOV ECX,0x4
CMP EDX,0x1
CMOVZ EAX,ECX
MOV dword ptr [RBP + -0x18],EAX
LAB_00fea759:
MOV EAX,dword ptr [RBP + -0x18]
MOV dword ptr [RBP + -0x14],EAX
LAB_00fea75f:
MOV EAX,dword ptr [RBP + -0x14]
POP RBP
RET
|
int4 _ma_calc_pack_length(int param_1,ulong param_2)
{
int4 local_20;
int4 local_1c;
if (param_2 < 0xfe) {
local_1c = 1;
}
else {
if (param_2 < 0x10000) {
local_20 = 3;
}
else {
local_20 = 5;
if (param_1 == 1) {
local_20 = 4;
}
}
local_1c = local_20;
}
return local_1c;
}
|
|
7,631 |
restore_cs_variables
|
eloqsql/client/mysqldump.c
|
static void restore_cs_variables(FILE *sql_file,
const char *delimiter)
{
fprintf(sql_file,
"/*!50003 SET character_set_client = @saved_cs_client */ %s\n"
"/*!50003 SET character_set_results = @saved_cs_results */ %s\n"
"/*!50003 SET collation_connection = @saved_col_connection */ %s\n",
(const char *) delimiter,
(const char *) delimiter,
(const char *) delimiter);
}
|
O0
|
c
|
restore_cs_variables:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
movq -0x10(%rbp), %rcx
movq -0x10(%rbp), %r8
leaq 0x97b71(%rip), %rsi # 0xdd078
movb $0x0, %al
callq 0x381d0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
restore_cs_variables:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rdi, [rbp+var_8]
mov rdx, [rbp+var_10]
mov rcx, [rbp+var_10]
mov r8, [rbp+var_10]
lea rsi, a50003SetCharac; "/*!50003 SET character_set_client = @s"...
mov al, 0
call _fprintf
add rsp, 10h
pop rbp
retn
|
long long restore_cs_variables(long long a1, const char *a2)
{
return fprintf(
a1,
"/*!50003 SET character_set_client = @saved_cs_client */ %s\n"
"/*!50003 SET character_set_results = @saved_cs_results */ %s\n"
"/*!50003 SET collation_connection = @saved_col_connection */ %s\n",
a2,
a2,
a2);
}
|
restore_cs_variables:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RDI,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x10]
MOV R8,qword ptr [RBP + -0x10]
LEA RSI,[0x1dd078]
MOV AL,0x0
CALL 0x001381d0
ADD RSP,0x10
POP RBP
RET
|
void restore_cs_variables(FILE *param_1,int8 param_2)
{
fprintf(param_1,
"/*!50003 SET character_set_client = @saved_cs_client */ %s\n/*!50003 SET character_set_results = @saved_cs_results */ %s\n/*!50003 SET collation_connection = @saved_col_connection */ %s\n"
,param_2,param_2,param_2);
return;
}
|
|
7,632 |
downheap
|
eloqsql/mysys/queues.c
|
void _downheap(QUEUE *queue, uint idx)
{
uchar *element= queue->root[idx];
uint next_index,
elements= queue->elements,
half_queue= elements >> 1,
offset_to_key= queue->offset_to_key,
offset_to_queue_pos= queue->offset_to_queue_pos;
while (idx <= half_queue)
{
next_index= idx+idx;
if (next_index < elements &&
(queue->compare(queue->first_cmp_arg,
queue->root[next_index]+offset_to_key,
queue->root[next_index+1]+offset_to_key) *
queue->max_at_top) > 0)
next_index++;
if ((queue->compare(queue->first_cmp_arg,
queue->root[next_index]+offset_to_key,
element+offset_to_key) * queue->max_at_top) >= 0)
break;
queue->root[idx]= queue->root[next_index];
if (offset_to_queue_pos)
(*(uint*) (queue->root[idx] + offset_to_queue_pos-1))= idx;
idx= next_index;
}
queue->root[idx]=element;
if (offset_to_queue_pos)
(*(uint*) (element + offset_to_queue_pos-1))= idx;
}
|
O0
|
c
|
downheap:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl -0xc(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
shrl %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %eax
movl %eax, -0x2c(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x24(%rbp), %eax
ja 0xf709d
movl -0xc(%rbp), %eax
addl -0xc(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x20(%rbp), %eax
jae 0xf7019
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x8(%rcx), %rdi
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
movl -0x1c(%rbp), %edx
movq (%rcx,%rdx,8), %rsi
movl -0x28(%rbp), %ecx
addq %rcx, %rsi
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
movl -0x1c(%rbp), %edx
addl $0x1, %edx
movl %edx, %edx
movq (%rcx,%rdx,8), %rdx
movl -0x28(%rbp), %ecx
addq %rcx, %rdx
callq *%rax
movq -0x8(%rbp), %rcx
imull 0x24(%rcx), %eax
cmpl $0x0, %eax
jle 0xf7019
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x8(%rcx), %rdi
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
movl -0x1c(%rbp), %edx
movq (%rcx,%rdx,8), %rsi
movl -0x28(%rbp), %ecx
addq %rcx, %rsi
movq -0x18(%rbp), %rdx
movl -0x28(%rbp), %ecx
addq %rcx, %rdx
callq *%rax
movq -0x8(%rbp), %rcx
imull 0x24(%rcx), %eax
cmpl $0x0, %eax
jl 0xf7058
jmp 0xf709d
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl -0x1c(%rbp), %ecx
movq (%rax,%rcx,8), %rdx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl -0xc(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
cmpl $0x0, -0x2c(%rbp)
je 0xf7092
movl -0xc(%rbp), %edx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl -0xc(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl -0x2c(%rbp), %ecx
movl %edx, -0x1(%rax,%rcx)
movl -0x1c(%rbp), %eax
movl %eax, -0xc(%rbp)
jmp 0xf6fa7
movq -0x18(%rbp), %rdx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl -0xc(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
cmpl $0x0, -0x2c(%rbp)
je 0xf70c3
movl -0xc(%rbp), %edx
movq -0x18(%rbp), %rax
movl -0x2c(%rbp), %ecx
movl %edx, -0x1(%rax,%rcx)
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
|
_downheap:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov rax, [rbp+var_8]
mov rax, [rax]
mov ecx, [rbp+var_C]
mov rax, [rax+rcx*8]
mov [rbp+var_18], rax
mov rax, [rbp+var_8]
mov eax, [rax+10h]
mov [rbp+var_20], eax
mov eax, [rbp+var_20]
shr eax, 1
mov [rbp+var_24], eax
mov rax, [rbp+var_8]
mov eax, [rax+18h]
mov [rbp+var_28], eax
mov rax, [rbp+var_8]
mov eax, [rax+1Ch]
mov [rbp+var_2C], eax
loc_F6FA7:
mov eax, [rbp+var_C]
cmp eax, [rbp+var_24]
ja loc_F709D
mov eax, [rbp+var_C]
add eax, [rbp+var_C]
mov [rbp+var_1C], eax
mov eax, [rbp+var_1C]
cmp eax, [rbp+var_20]
jnb short loc_F7019
mov rax, [rbp+var_8]
mov rax, [rax+28h]
mov rcx, [rbp+var_8]
mov rdi, [rcx+8]
mov rcx, [rbp+var_8]
mov rcx, [rcx]
mov edx, [rbp+var_1C]
mov rsi, [rcx+rdx*8]
mov ecx, [rbp+var_28]
add rsi, rcx
mov rcx, [rbp+var_8]
mov rcx, [rcx]
mov edx, [rbp+var_1C]
add edx, 1
mov edx, edx
mov rdx, [rcx+rdx*8]
mov ecx, [rbp+var_28]
add rdx, rcx
call rax
mov rcx, [rbp+var_8]
imul eax, [rcx+24h]
cmp eax, 0
jle short loc_F7019
mov eax, [rbp+var_1C]
add eax, 1
mov [rbp+var_1C], eax
loc_F7019:
mov rax, [rbp+var_8]
mov rax, [rax+28h]
mov rcx, [rbp+var_8]
mov rdi, [rcx+8]
mov rcx, [rbp+var_8]
mov rcx, [rcx]
mov edx, [rbp+var_1C]
mov rsi, [rcx+rdx*8]
mov ecx, [rbp+var_28]
add rsi, rcx
mov rdx, [rbp+var_18]
mov ecx, [rbp+var_28]
add rdx, rcx
call rax
mov rcx, [rbp+var_8]
imul eax, [rcx+24h]
cmp eax, 0
jl short loc_F7058
jmp short loc_F709D
loc_F7058:
mov rax, [rbp+var_8]
mov rax, [rax]
mov ecx, [rbp+var_1C]
mov rdx, [rax+rcx*8]
mov rax, [rbp+var_8]
mov rax, [rax]
mov ecx, [rbp+var_C]
mov [rax+rcx*8], rdx
cmp [rbp+var_2C], 0
jz short loc_F7092
mov edx, [rbp+var_C]
mov rax, [rbp+var_8]
mov rax, [rax]
mov ecx, [rbp+var_C]
mov rax, [rax+rcx*8]
mov ecx, [rbp+var_2C]
mov [rax+rcx-1], edx
loc_F7092:
mov eax, [rbp+var_1C]
mov [rbp+var_C], eax
jmp loc_F6FA7
loc_F709D:
mov rdx, [rbp+var_18]
mov rax, [rbp+var_8]
mov rax, [rax]
mov ecx, [rbp+var_C]
mov [rax+rcx*8], rdx
cmp [rbp+var_2C], 0
jz short loc_F70C3
mov edx, [rbp+var_C]
mov rax, [rbp+var_18]
mov ecx, [rbp+var_2C]
mov [rax+rcx-1], edx
loc_F70C3:
add rsp, 30h
pop rbp
retn
|
long long downheap(long long *a1, unsigned int a2)
{
long long result; // rax
unsigned int v3; // [rsp+4h] [rbp-2Ch]
unsigned int v4; // [rsp+8h] [rbp-28h]
unsigned int v5; // [rsp+10h] [rbp-20h]
unsigned int v6; // [rsp+14h] [rbp-1Ch]
long long v7; // [rsp+18h] [rbp-18h]
unsigned int v8; // [rsp+24h] [rbp-Ch]
v8 = a2;
v7 = *(_QWORD *)(*a1 + 8LL * a2);
v5 = *((_DWORD *)a1 + 4);
v4 = *((_DWORD *)a1 + 6);
v3 = *((_DWORD *)a1 + 7);
while ( v8 <= v5 >> 1 )
{
v6 = 2 * v8;
if ( 2 * v8 < v5
&& (int)(*((_DWORD *)a1 + 9)
* ((long long ( *)(long long, _QWORD, _QWORD))a1[5])(
a1[1],
v4 + *(_QWORD *)(*a1 + 8LL * v6),
v4 + *(_QWORD *)(*a1 + 8LL * (v6 + 1)))) > 0 )
{
++v6;
}
if ( (int)(*((_DWORD *)a1 + 9)
* ((long long ( *)(long long, _QWORD, long long))a1[5])(
a1[1],
v4 + *(_QWORD *)(*a1 + 8LL * v6),
v4 + v7)) >= 0 )
break;
*(_QWORD *)(*a1 + 8LL * v8) = *(_QWORD *)(*a1 + 8LL * v6);
if ( v3 )
*(_DWORD *)(*(_QWORD *)(*a1 + 8LL * v8) + v3 - 1LL) = v8;
v8 = v6;
}
result = *a1;
*(_QWORD *)(*a1 + 8LL * v8) = v7;
if ( v3 )
{
result = v7;
*(_DWORD *)(v7 + v3 - 1) = v8;
}
return result;
}
|
_downheap:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RBP + -0xc]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x10]
MOV dword ptr [RBP + -0x20],EAX
MOV EAX,dword ptr [RBP + -0x20]
SHR EAX,0x1
MOV dword ptr [RBP + -0x24],EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x18]
MOV dword ptr [RBP + -0x28],EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x1c]
MOV dword ptr [RBP + -0x2c],EAX
LAB_001f6fa7:
MOV EAX,dword ptr [RBP + -0xc]
CMP EAX,dword ptr [RBP + -0x24]
JA 0x001f709d
MOV EAX,dword ptr [RBP + -0xc]
ADD EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x1c],EAX
MOV EAX,dword ptr [RBP + -0x1c]
CMP EAX,dword ptr [RBP + -0x20]
JNC 0x001f7019
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x28]
MOV RCX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RCX + 0x8]
MOV RCX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RCX]
MOV EDX,dword ptr [RBP + -0x1c]
MOV RSI,qword ptr [RCX + RDX*0x8]
MOV ECX,dword ptr [RBP + -0x28]
ADD RSI,RCX
MOV RCX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RCX]
MOV EDX,dword ptr [RBP + -0x1c]
ADD EDX,0x1
MOV EDX,EDX
MOV RDX,qword ptr [RCX + RDX*0x8]
MOV ECX,dword ptr [RBP + -0x28]
ADD RDX,RCX
CALL RAX
MOV RCX,qword ptr [RBP + -0x8]
IMUL EAX,dword ptr [RCX + 0x24]
CMP EAX,0x0
JLE 0x001f7019
MOV EAX,dword ptr [RBP + -0x1c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x1c],EAX
LAB_001f7019:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x28]
MOV RCX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RCX + 0x8]
MOV RCX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RCX]
MOV EDX,dword ptr [RBP + -0x1c]
MOV RSI,qword ptr [RCX + RDX*0x8]
MOV ECX,dword ptr [RBP + -0x28]
ADD RSI,RCX
MOV RDX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0x28]
ADD RDX,RCX
CALL RAX
MOV RCX,qword ptr [RBP + -0x8]
IMUL EAX,dword ptr [RCX + 0x24]
CMP EAX,0x0
JL 0x001f7058
JMP 0x001f709d
LAB_001f7058:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RBP + -0x1c]
MOV RDX,qword ptr [RAX + RCX*0x8]
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RBP + -0xc]
MOV qword ptr [RAX + RCX*0x8],RDX
CMP dword ptr [RBP + -0x2c],0x0
JZ 0x001f7092
MOV EDX,dword ptr [RBP + -0xc]
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RBP + -0xc]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV ECX,dword ptr [RBP + -0x2c]
MOV dword ptr [RAX + RCX*0x1 + -0x1],EDX
LAB_001f7092:
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0xc],EAX
JMP 0x001f6fa7
LAB_001f709d:
MOV RDX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RBP + -0xc]
MOV qword ptr [RAX + RCX*0x8],RDX
CMP dword ptr [RBP + -0x2c],0x0
JZ 0x001f70c3
MOV EDX,dword ptr [RBP + -0xc]
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0x2c]
MOV dword ptr [RAX + RCX*0x1 + -0x1],EDX
LAB_001f70c3:
ADD RSP,0x30
POP RBP
RET
|
void _downheap(long *param_1,uint param_2)
{
uint uVar1;
uint uVar2;
uint uVar3;
long lVar4;
int iVar5;
uint local_24;
uint local_14;
lVar4 = *(long *)(*param_1 + (ulong)param_2 * 8);
uVar1 = *(uint *)(param_1 + 2);
uVar2 = *(uint *)(param_1 + 3);
uVar3 = *(uint *)((long)param_1 + 0x1c);
local_14 = param_2;
while (local_14 <= uVar1 >> 1) {
local_24 = local_14 * 2;
if ((local_24 < uVar1) &&
(iVar5 = (*(code *)param_1[5])
(param_1[1],*(long *)(*param_1 + (ulong)local_24 * 8) + (ulong)uVar2,
*(long *)(*param_1 + (ulong)(local_24 + 1) * 8) + (ulong)uVar2),
0 < iVar5 * *(int *)((long)param_1 + 0x24))) {
local_24 = local_24 + 1;
}
iVar5 = (*(code *)param_1[5])
(param_1[1],*(long *)(*param_1 + (ulong)local_24 * 8) + (ulong)uVar2,
lVar4 + (ulong)uVar2);
if (-1 < iVar5 * *(int *)((long)param_1 + 0x24)) break;
*(int8 *)(*param_1 + (ulong)local_14 * 8) =
*(int8 *)(*param_1 + (ulong)local_24 * 8);
if (uVar3 != 0) {
*(uint *)(*(long *)(*param_1 + (ulong)local_14 * 8) + -1 + (ulong)uVar3) = local_14;
}
local_14 = local_24;
}
*(long *)(*param_1 + (ulong)local_14 * 8) = lVar4;
if (uVar3 != 0) {
*(uint *)(lVar4 + -1 + (ulong)uVar3) = local_14;
}
return;
}
|
|
7,633 |
downheap
|
eloqsql/mysys/queues.c
|
void _downheap(QUEUE *queue, uint idx)
{
uchar *element= queue->root[idx];
uint next_index,
elements= queue->elements,
half_queue= elements >> 1,
offset_to_key= queue->offset_to_key,
offset_to_queue_pos= queue->offset_to_queue_pos;
while (idx <= half_queue)
{
next_index= idx+idx;
if (next_index < elements &&
(queue->compare(queue->first_cmp_arg,
queue->root[next_index]+offset_to_key,
queue->root[next_index+1]+offset_to_key) *
queue->max_at_top) > 0)
next_index++;
if ((queue->compare(queue->first_cmp_arg,
queue->root[next_index]+offset_to_key,
element+offset_to_key) * queue->max_at_top) >= 0)
break;
queue->root[idx]= queue->root[next_index];
if (offset_to_queue_pos)
(*(uint*) (queue->root[idx] + offset_to_queue_pos-1))= idx;
idx= next_index;
}
queue->root[idx]=element;
if (offset_to_queue_pos)
(*(uint*) (element + offset_to_queue_pos-1))= idx;
}
|
O3
|
c
|
downheap:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %esi, %ebx
movq (%rdi), %rax
movl %esi, %r13d
movq (%rax,%r13,8), %rcx
movl 0x10(%rdi), %edx
movl %edx, -0x30(%rbp)
shrl %edx
movl 0x1c(%rdi), %r15d
movl %edx, -0x2c(%rbp)
cmpl %esi, %edx
jb 0xa203a
movq %rdi, %r14
movl 0x18(%rdi), %eax
movq %rcx, -0x40(%rbp)
movq %rax, -0x38(%rbp)
addq %rcx, %rax
movq %rax, -0x48(%rbp)
leal (%rbx,%rbx), %r12d
movq (%r14), %rax
cmpl -0x30(%rbp), %r12d
jae 0xa1fdd
movq 0x8(%r14), %rdi
movl %r12d, %ecx
movq (%rax,%rcx,8), %rsi
movq -0x38(%rbp), %rcx
addq %rcx, %rsi
movl %r12d, %r13d
orl $0x1, %r13d
movq (%rax,%r13,8), %rdx
addq %rcx, %rdx
callq *0x28(%r14)
imull 0x24(%r14), %eax
testl %eax, %eax
jg 0xa1fd7
movl %r12d, %r13d
movq (%r14), %rax
movl %r13d, %r12d
movq 0x8(%r14), %rdi
movl %r12d, %r13d
movq (%rax,%r13,8), %rsi
addq -0x38(%rbp), %rsi
movq -0x48(%rbp), %rdx
callq *0x28(%r14)
imull 0x24(%r14), %eax
testl %eax, %eax
jns 0xa202a
movq (%r14), %rcx
movq (%rcx,%r13,8), %rdx
movl %ebx, %eax
movq %rdx, (%rcx,%rax,8)
testq %r15, %r15
je 0xa201b
movq (%r14), %rcx
movq (%rcx,%rax,8), %rax
movl %ebx, -0x1(%rax,%r15)
movl %r12d, %ebx
cmpl -0x2c(%rbp), %r12d
jbe 0xa1f9a
jmp 0xa2030
movl %ebx, %r13d
movl %ebx, %r12d
movq (%r14), %rax
movl %r12d, %ebx
movq -0x40(%rbp), %rcx
movq %rcx, (%rax,%r13,8)
testq %r15, %r15
je 0xa2048
movl %ebx, -0x1(%rcx,%r15)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
_downheap:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov ebx, esi
mov rax, [rdi]
mov r13d, esi
mov rcx, [rax+r13*8]
mov edx, [rdi+10h]
mov [rbp+var_30], edx
shr edx, 1
mov r15d, [rdi+1Ch]
mov [rbp+var_2C], edx
cmp edx, esi
jb loc_A203A
mov r14, rdi
mov eax, [rdi+18h]
mov [rbp+var_40], rcx
mov [rbp+var_38], rax
add rax, rcx
mov [rbp+var_48], rax
loc_A1F9A:
lea r12d, [rbx+rbx]
mov rax, [r14]
cmp r12d, [rbp+var_30]
jnb short loc_A1FDD
mov rdi, [r14+8]
mov ecx, r12d
mov rsi, [rax+rcx*8]
mov rcx, [rbp+var_38]
add rsi, rcx
mov r13d, r12d
or r13d, 1
mov rdx, [rax+r13*8]
add rdx, rcx
call qword ptr [r14+28h]
imul eax, [r14+24h]
test eax, eax
jg short loc_A1FD7
mov r13d, r12d
loc_A1FD7:
mov rax, [r14]
mov r12d, r13d
loc_A1FDD:
mov rdi, [r14+8]
mov r13d, r12d
mov rsi, [rax+r13*8]
add rsi, [rbp+var_38]
mov rdx, [rbp+var_48]
call qword ptr [r14+28h]
imul eax, [r14+24h]
test eax, eax
jns short loc_A202A
mov rcx, [r14]
mov rdx, [rcx+r13*8]
mov eax, ebx
mov [rcx+rax*8], rdx
test r15, r15
jz short loc_A201B
mov rcx, [r14]
mov rax, [rcx+rax*8]
mov [rax+r15-1], ebx
loc_A201B:
mov ebx, r12d
cmp r12d, [rbp+var_2C]
jbe loc_A1F9A
jmp short loc_A2030
loc_A202A:
mov r13d, ebx
mov r12d, ebx
loc_A2030:
mov rax, [r14]
mov ebx, r12d
mov rcx, [rbp+var_40]
loc_A203A:
mov [rax+r13*8], rcx
test r15, r15
jz short loc_A2048
mov [rcx+r15-1], ebx
loc_A2048:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long downheap(long long *a1, unsigned int a2)
{
unsigned int v2; // ebx
long long result; // rax
long long v4; // r13
long long v5; // rcx
long long v6; // r15
unsigned int v7; // r12d
long long v8; // rax
long long v9; // r13
long long v10; // [rsp+8h] [rbp-48h]
long long v11; // [rsp+10h] [rbp-40h]
long long v12; // [rsp+18h] [rbp-38h]
unsigned int v13; // [rsp+20h] [rbp-30h]
v2 = a2;
result = *a1;
v4 = a2;
v5 = *(_QWORD *)(*a1 + 8LL * a2);
v13 = *((_DWORD *)a1 + 4);
v6 = *((unsigned int *)a1 + 7);
if ( v13 >> 1 >= a2 )
{
v11 = *(_QWORD *)(*a1 + 8LL * a2);
v12 = *((unsigned int *)a1 + 6);
v10 = v5 + v12;
while ( 1 )
{
v7 = 2 * v2;
v8 = *a1;
if ( 2 * v2 < v13 )
{
v9 = v7 | 1;
if ( (int)(*((_DWORD *)a1 + 9)
* ((long long ( *)(long long, long long, long long))a1[5])(
a1[1],
v12 + *(_QWORD *)(v8 + 8LL * v7),
v12 + *(_QWORD *)(v8 + 8 * v9))) <= 0 )
LODWORD(v9) = 2 * v2;
v8 = *a1;
v7 = v9;
}
v4 = v7;
if ( (int)(*((_DWORD *)a1 + 9)
* ((long long ( *)(long long, long long, long long))a1[5])(
a1[1],
v12 + *(_QWORD *)(v8 + 8LL * v7),
v10)) >= 0 )
break;
*(_QWORD *)(*a1 + 8LL * v2) = *(_QWORD *)(*a1 + 8LL * v7);
if ( v6 )
*(_DWORD *)(*(_QWORD *)(*a1 + 8LL * v2) + v6 - 1) = v2;
v2 = v7;
if ( v7 > v13 >> 1 )
goto LABEL_13;
}
v4 = v2;
v7 = v2;
LABEL_13:
result = *a1;
v2 = v7;
v5 = v11;
}
*(_QWORD *)(result + 8 * v4) = v5;
if ( v6 )
*(_DWORD *)(v5 + v6 - 1) = v2;
return result;
}
|
_downheap:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV EBX,ESI
MOV RAX,qword ptr [RDI]
MOV R13D,ESI
MOV RCX,qword ptr [RAX + R13*0x8]
MOV EDX,dword ptr [RDI + 0x10]
MOV dword ptr [RBP + -0x30],EDX
SHR EDX,0x1
MOV R15D,dword ptr [RDI + 0x1c]
MOV dword ptr [RBP + -0x2c],EDX
CMP EDX,ESI
JC 0x001a203a
MOV R14,RDI
MOV EAX,dword ptr [RDI + 0x18]
MOV qword ptr [RBP + -0x40],RCX
MOV qword ptr [RBP + -0x38],RAX
ADD RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
LAB_001a1f9a:
LEA R12D,[RBX + RBX*0x1]
MOV RAX,qword ptr [R14]
CMP R12D,dword ptr [RBP + -0x30]
JNC 0x001a1fdd
MOV RDI,qword ptr [R14 + 0x8]
MOV ECX,R12D
MOV RSI,qword ptr [RAX + RCX*0x8]
MOV RCX,qword ptr [RBP + -0x38]
ADD RSI,RCX
MOV R13D,R12D
OR R13D,0x1
MOV RDX,qword ptr [RAX + R13*0x8]
ADD RDX,RCX
CALL qword ptr [R14 + 0x28]
IMUL EAX,dword ptr [R14 + 0x24]
TEST EAX,EAX
JG 0x001a1fd7
MOV R13D,R12D
LAB_001a1fd7:
MOV RAX,qword ptr [R14]
MOV R12D,R13D
LAB_001a1fdd:
MOV RDI,qword ptr [R14 + 0x8]
MOV R13D,R12D
MOV RSI,qword ptr [RAX + R13*0x8]
ADD RSI,qword ptr [RBP + -0x38]
MOV RDX,qword ptr [RBP + -0x48]
CALL qword ptr [R14 + 0x28]
IMUL EAX,dword ptr [R14 + 0x24]
TEST EAX,EAX
JNS 0x001a202a
MOV RCX,qword ptr [R14]
MOV RDX,qword ptr [RCX + R13*0x8]
MOV EAX,EBX
MOV qword ptr [RCX + RAX*0x8],RDX
TEST R15,R15
JZ 0x001a201b
MOV RCX,qword ptr [R14]
MOV RAX,qword ptr [RCX + RAX*0x8]
MOV dword ptr [RAX + R15*0x1 + -0x1],EBX
LAB_001a201b:
MOV EBX,R12D
CMP R12D,dword ptr [RBP + -0x2c]
JBE 0x001a1f9a
JMP 0x001a2030
LAB_001a202a:
MOV R13D,EBX
MOV R12D,EBX
LAB_001a2030:
MOV RAX,qword ptr [R14]
MOV EBX,R12D
MOV RCX,qword ptr [RBP + -0x40]
LAB_001a203a:
MOV qword ptr [RAX + R13*0x8],RCX
TEST R15,R15
JZ 0x001a2048
MOV dword ptr [RCX + R15*0x1 + -0x1],EBX
LAB_001a2048:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void _downheap(long *param_1,uint param_2)
{
uint uVar1;
long lVar2;
uint uVar3;
int iVar4;
ulong uVar5;
long lVar6;
uint uVar7;
uint uVar8;
ulong uVar9;
ulong uVar10;
lVar6 = *param_1;
uVar9 = (ulong)param_2;
lVar2 = *(long *)(lVar6 + uVar9 * 8);
uVar1 = *(uint *)(param_1 + 2);
uVar7 = uVar1 >> 1;
uVar10 = (ulong)*(uint *)((long)param_1 + 0x1c);
if (param_2 <= uVar7) {
uVar5 = (ulong)*(uint *)(param_1 + 3);
uVar8 = param_2;
do {
uVar3 = uVar8 * 2;
uVar9 = (ulong)uVar3;
lVar6 = *param_1;
if (uVar3 < uVar1) {
uVar9 = (ulong)(uVar3 | 1);
iVar4 = (*(code *)param_1[5])
(param_1[1],*(long *)(lVar6 + (ulong)uVar3 * 8) + uVar5,
*(long *)(lVar6 + uVar9 * 8) + uVar5);
if (iVar4 * *(int *)((long)param_1 + 0x24) < 1) {
uVar9 = (ulong)uVar3;
}
lVar6 = *param_1;
}
param_2 = (uint)uVar9;
iVar4 = (*(code *)param_1[5])(param_1[1],*(long *)(lVar6 + uVar9 * 8) + uVar5,uVar5 + lVar2);
if (-1 < iVar4 * *(int *)((long)param_1 + 0x24)) {
uVar9 = (ulong)uVar8;
param_2 = uVar8;
break;
}
*(int8 *)(*param_1 + (ulong)uVar8 * 8) = *(int8 *)(*param_1 + uVar9 * 8);
if (uVar10 != 0) {
*(uint *)(*(long *)(*param_1 + (ulong)uVar8 * 8) + -1 + uVar10) = uVar8;
}
uVar8 = param_2;
} while (param_2 <= uVar7);
lVar6 = *param_1;
}
*(long *)(lVar6 + uVar9 * 8) = lVar2;
if (uVar10 != 0) {
*(uint *)(lVar2 + -1 + uVar10) = param_2;
}
return;
}
|
|
7,634 |
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);
}
|
O0
|
c
|
my_strntol_mb2_or_mb4:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movl $0x0, -0x3c(%rbp)
movq -0x10(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x18(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x38(%rbp), %rax
movl $0x0, (%rax)
movq -0x58(%rbp), %rax
movq -0x10(%rbp), %rdi
movq -0x70(%rbp), %rdx
movq -0x78(%rbp), %rcx
leaq -0x50(%rbp), %rsi
callq *%rax
movl %eax, -0x44(%rbp)
cmpl $0x0, %eax
jle 0xb8791
movq -0x50(%rbp), %rax
addq $-0x9, %rax
movq %rax, -0x88(%rbp)
subq $0x24, %rax
ja 0xb878d
movq -0x88(%rbp), %rax
leaq 0x15a735(%rip), %rcx # 0x212ea0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0xb878f
jmp 0xb878f
cmpl $0x0, -0x3c(%rbp)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x3c(%rbp)
jmp 0xb878f
jmp 0xb878f
jmp 0xb87e8
jmp 0xb87c9
cmpq $0x0, -0x30(%rbp)
je 0xb87a3
movq -0x70(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movl -0x44(%rbp), %edx
movl $0x21, %ecx
movl $0x54, %eax
cmpl $0x0, %edx
cmovel %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0xb89f1
movl -0x44(%rbp), %ecx
movq -0x70(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x70(%rbp)
movb $0x1, %al
testb $0x1, %al
jne 0xb872a
jmp 0xb87e6
jmp 0xb87e8
movl $0x0, -0x40(%rbp)
movl $0x0, -0x64(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x80(%rbp)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
xorl %edx, %edx
divl -0x24(%rbp)
movl %eax, -0x60(%rbp)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
xorl %edx, %edx
divl -0x24(%rbp)
movl %edx, -0x5c(%rbp)
movq -0x58(%rbp), %rax
movq -0x10(%rbp), %rdi
movq -0x70(%rbp), %rdx
movq -0x78(%rbp), %rcx
leaq -0x50(%rbp), %rsi
callq *%rax
movl %eax, -0x44(%rbp)
cmpl $0x0, %eax
jle 0xb88f9
movl -0x44(%rbp), %ecx
movq -0x70(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x70(%rbp)
cmpq $0x30, -0x50(%rbp)
jb 0xb8867
cmpq $0x39, -0x50(%rbp)
ja 0xb8867
movq -0x50(%rbp), %rax
subq $0x30, %rax
movq %rax, -0x50(%rbp)
jmp 0xb88b0
cmpq $0x41, -0x50(%rbp)
jb 0xb8887
cmpq $0x5a, -0x50(%rbp)
ja 0xb8887
movq -0x50(%rbp), %rax
subq $0x41, %rax
addq $0xa, %rax
movq %rax, -0x50(%rbp)
jmp 0xb88ae
cmpq $0x61, -0x50(%rbp)
jb 0xb88a7
cmpq $0x7a, -0x50(%rbp)
ja 0xb88a7
movq -0x50(%rbp), %rax
subq $0x61, %rax
addq $0xa, %rax
movq %rax, -0x50(%rbp)
jmp 0xb88ac
jmp 0xb8938
jmp 0xb88ae
jmp 0xb88b0
movq -0x50(%rbp), %rax
cmpl -0x24(%rbp), %eax
jl 0xb88bb
jmp 0xb8938
movl -0x64(%rbp), %eax
cmpl -0x60(%rbp), %eax
ja 0xb88d7
movl -0x64(%rbp), %eax
cmpl -0x60(%rbp), %eax
jne 0xb88e0
movq -0x50(%rbp), %rax
movl -0x5c(%rbp), %ecx
cmpq %rcx, %rax
jbe 0xb88e0
movl $0x1, -0x40(%rbp)
jmp 0xb88f7
movl -0x24(%rbp), %eax
imull -0x64(%rbp), %eax
movl %eax, -0x64(%rbp)
movq -0x50(%rbp), %rcx
movl -0x64(%rbp), %eax
addq %rcx, %rax
movl %eax, -0x64(%rbp)
jmp 0xb892a
cmpl $0x0, -0x44(%rbp)
jne 0xb8928
cmpq $0x0, -0x30(%rbp)
je 0xb8911
movq -0x70(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x38(%rbp), %rax
movl $0x54, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0xb89f1
jmp 0xb8938
jmp 0xb892c
movb $0x1, %al
testb $0x1, %al
jne 0xb8818
jmp 0xb8938
cmpq $0x0, -0x30(%rbp)
je 0xb894a
movq -0x70(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x70(%rbp), %rax
cmpq -0x80(%rbp), %rax
jne 0xb896b
movq -0x38(%rbp), %rax
movl $0x21, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0xb89f1
cmpl $0x0, -0x3c(%rbp)
je 0xb8983
cmpl $0x80000000, -0x64(%rbp) # imm = 0x80000000
jbe 0xb8981
movl $0x1, -0x40(%rbp)
jmp 0xb8997
movl -0x64(%rbp), %eax
cmpq $0x7fffffff, %rax # imm = 0x7FFFFFFF
jle 0xb8995
movl $0x1, -0x40(%rbp)
jmp 0xb8997
cmpl $0x0, -0x40(%rbp)
je 0xb89c3
movq -0x38(%rbp), %rax
movl $0x22, (%rax)
movl -0x3c(%rbp), %edx
movl $0x7fffffff, %eax # imm = 0x7FFFFFFF
movq $-0x80000000, %rcx # imm = 0x80000000
cmpl $0x0, %edx
cmovneq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0xb89f1
cmpl $0x0, -0x3c(%rbp)
je 0xb89dc
movl -0x64(%rbp), %eax
movl %eax, %ecx
xorl %eax, %eax
subq %rcx, %rax
movq %rax, -0x90(%rbp)
jmp 0xb89e6
movl -0x64(%rbp), %eax
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
nop
|
my_strntol_mb2_or_mb4:
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_24], ecx
mov [rbp+var_30], r8
mov [rbp+var_38], r9
mov [rbp+var_3C], 0
mov rax, [rbp+var_10]
mov rax, [rax+0B8h]
mov rax, [rax+28h]
mov [rbp+var_58], rax
mov rax, [rbp+var_18]
mov [rbp+var_70], rax
mov rax, [rbp+var_18]
add rax, [rbp+var_20]
mov [rbp+var_78], rax
mov rax, [rbp+var_38]
mov dword ptr [rax], 0
loc_B872A:
mov rax, [rbp+var_58]
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_70]
mov rcx, [rbp+var_78]
lea rsi, [rbp+var_50]
call rax
mov [rbp+var_44], eax
cmp eax, 0
jle short loc_B8791
mov rax, [rbp+var_50]
add rax, 0FFFFFFFFFFFFFFF7h; switch 37 cases
mov [rbp+var_88], rax
sub rax, 24h
ja short def_B8772; jumptable 00000000000B8772 default case, cases 10-31,33-42,44
mov rax, [rbp+var_88]
lea rcx, jpt_B8772
movsxd rax, ds:(jpt_B8772 - 212EA0h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_B8774:
jmp short loc_B878F; jumptable 00000000000B8772 case 32
loc_B8776:
jmp short loc_B878F; jumptable 00000000000B8772 case 9
loc_B8778:
cmp [rbp+var_3C], 0; jumptable 00000000000B8772 case 45
setnz al
xor al, 0FFh
and al, 1
movzx eax, al
mov [rbp+var_3C], eax
jmp short loc_B878F
loc_B878B:
jmp short loc_B878F; jumptable 00000000000B8772 case 43
def_B8772:
jmp short loc_B87E8; jumptable 00000000000B8772 default case, cases 10-31,33-42,44
loc_B878F:
jmp short loc_B87C9
loc_B8791:
cmp [rbp+var_30], 0
jz short loc_B87A3
mov rcx, [rbp+var_70]
mov rax, [rbp+var_30]
mov [rax], rcx
loc_B87A3:
mov edx, [rbp+var_44]
mov ecx, 21h ; '!'
mov eax, 54h ; 'T'
cmp edx, 0
cmovz ecx, eax
mov rax, [rbp+var_38]
mov [rax], ecx
mov [rbp+var_8], 0
jmp loc_B89F1
loc_B87C9:
mov ecx, [rbp+var_44]
mov rax, [rbp+var_70]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_70], rax
mov al, 1
test al, 1
jnz loc_B872A
jmp short $+2
loc_B87E6:
jmp short $+2
loc_B87E8:
mov [rbp+var_40], 0
mov [rbp+var_64], 0
mov rax, [rbp+var_70]
mov [rbp+var_80], rax
mov eax, 0FFFFFFFFh
xor edx, edx
div [rbp+var_24]
mov [rbp+var_60], eax
mov eax, 0FFFFFFFFh
xor edx, edx
div [rbp+var_24]
mov [rbp+var_5C], edx
loc_B8818:
mov rax, [rbp+var_58]
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_70]
mov rcx, [rbp+var_78]
lea rsi, [rbp+var_50]
call rax
mov [rbp+var_44], eax
cmp eax, 0
jle loc_B88F9
mov ecx, [rbp+var_44]
mov rax, [rbp+var_70]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_70], rax
cmp [rbp+var_50], 30h ; '0'
jb short loc_B8867
cmp [rbp+var_50], 39h ; '9'
ja short loc_B8867
mov rax, [rbp+var_50]
sub rax, 30h ; '0'
mov [rbp+var_50], rax
jmp short loc_B88B0
loc_B8867:
cmp [rbp+var_50], 41h ; 'A'
jb short loc_B8887
cmp [rbp+var_50], 5Ah ; 'Z'
ja short loc_B8887
mov rax, [rbp+var_50]
sub rax, 41h ; 'A'
add rax, 0Ah
mov [rbp+var_50], rax
jmp short loc_B88AE
loc_B8887:
cmp [rbp+var_50], 61h ; 'a'
jb short loc_B88A7
cmp [rbp+var_50], 7Ah ; 'z'
ja short loc_B88A7
mov rax, [rbp+var_50]
sub rax, 61h ; 'a'
add rax, 0Ah
mov [rbp+var_50], rax
jmp short loc_B88AC
loc_B88A7:
jmp loc_B8938
loc_B88AC:
jmp short $+2
loc_B88AE:
jmp short $+2
loc_B88B0:
mov rax, [rbp+var_50]
cmp eax, [rbp+var_24]
jl short loc_B88BB
jmp short loc_B8938
loc_B88BB:
mov eax, [rbp+var_64]
cmp eax, [rbp+var_60]
ja short loc_B88D7
mov eax, [rbp+var_64]
cmp eax, [rbp+var_60]
jnz short loc_B88E0
mov rax, [rbp+var_50]
mov ecx, [rbp+var_5C]
cmp rax, rcx
jbe short loc_B88E0
loc_B88D7:
mov [rbp+var_40], 1
jmp short loc_B88F7
loc_B88E0:
mov eax, [rbp+var_24]
imul eax, [rbp+var_64]
mov [rbp+var_64], eax
mov rcx, [rbp+var_50]
mov eax, [rbp+var_64]
add rax, rcx
mov [rbp+var_64], eax
loc_B88F7:
jmp short loc_B892A
loc_B88F9:
cmp [rbp+var_44], 0
jnz short loc_B8928
cmp [rbp+var_30], 0
jz short loc_B8911
mov rcx, [rbp+var_70]
mov rax, [rbp+var_30]
mov [rax], rcx
loc_B8911:
mov rax, [rbp+var_38]
mov dword ptr [rax], 54h ; 'T'
mov [rbp+var_8], 0
jmp loc_B89F1
loc_B8928:
jmp short loc_B8938
loc_B892A:
jmp short $+2
loc_B892C:
mov al, 1
test al, 1
jnz loc_B8818
jmp short $+2
loc_B8938:
cmp [rbp+var_30], 0
jz short loc_B894A
mov rcx, [rbp+var_70]
mov rax, [rbp+var_30]
mov [rax], rcx
loc_B894A:
mov rax, [rbp+var_70]
cmp rax, [rbp+var_80]
jnz short loc_B896B
mov rax, [rbp+var_38]
mov dword ptr [rax], 21h ; '!'
mov [rbp+var_8], 0
jmp loc_B89F1
loc_B896B:
cmp [rbp+var_3C], 0
jz short loc_B8983
cmp [rbp+var_64], 80000000h
jbe short loc_B8981
mov [rbp+var_40], 1
loc_B8981:
jmp short loc_B8997
loc_B8983:
mov eax, [rbp+var_64]
cmp rax, 7FFFFFFFh
jle short loc_B8995
mov [rbp+var_40], 1
loc_B8995:
jmp short $+2
loc_B8997:
cmp [rbp+var_40], 0
jz short loc_B89C3
mov rax, [rbp+var_38]
mov dword ptr [rax], 22h ; '"'
mov edx, [rbp+var_3C]
mov eax, 7FFFFFFFh
mov rcx, 0FFFFFFFF80000000h
cmp edx, 0
cmovnz rax, rcx
mov [rbp+var_8], rax
jmp short loc_B89F1
loc_B89C3:
cmp [rbp+var_3C], 0
jz short loc_B89DC
mov eax, [rbp+var_64]
mov ecx, eax
xor eax, eax
sub rax, rcx
mov [rbp+var_90], rax
jmp short loc_B89E6
loc_B89DC:
mov eax, [rbp+var_64]
mov [rbp+var_90], rax
loc_B89E6:
mov rax, [rbp+var_90]
mov [rbp+var_8], rax
loc_B89F1:
mov rax, [rbp+var_8]
add rsp, 90h
pop rbp
retn
|
long long my_strntol_mb2_or_mb4(long long a1, long long a2, long long a3, unsigned int a4, _QWORD *a5, int *a6)
{
int v6; // ecx
long long v7; // rax
long long v10; // [rsp+10h] [rbp-80h]
long long v11; // [rsp+18h] [rbp-78h]
long long v12; // [rsp+20h] [rbp-70h]
unsigned int v13; // [rsp+2Ch] [rbp-64h]
unsigned int v14; // [rsp+30h] [rbp-60h]
unsigned int v15; // [rsp+34h] [rbp-5Ch]
long long ( *v16)(long long, unsigned long long *, long long, long long); // [rsp+38h] [rbp-58h]
unsigned long long v17; // [rsp+40h] [rbp-50h] BYREF
int v18; // [rsp+4Ch] [rbp-44h]
int v19; // [rsp+50h] [rbp-40h]
BOOL v20; // [rsp+54h] [rbp-3Ch]
int *v21; // [rsp+58h] [rbp-38h]
_QWORD *v22; // [rsp+60h] [rbp-30h]
unsigned int v23; // [rsp+6Ch] [rbp-24h]
long long v24; // [rsp+70h] [rbp-20h]
long long v25; // [rsp+78h] [rbp-18h]
long long v26; // [rsp+80h] [rbp-10h]
v26 = a1;
v25 = a2;
v24 = a3;
v23 = a4;
v22 = a5;
v21 = a6;
v20 = 0;
v16 = *(long long ( **)(long long, unsigned long long *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL);
v12 = a2;
v11 = a3 + a2;
*a6 = 0;
while ( 2 )
{
v18 = v16(v26, &v17, v12, v11);
if ( v18 <= 0 )
{
if ( v22 )
*v22 = v12;
v6 = 33;
if ( !v18 )
v6 = 84;
*v21 = v6;
return 0LL;
}
else
{
switch ( v17 )
{
case 9uLL:
case 0x20uLL:
case 0x2BuLL:
goto LABEL_10;
case 0x2DuLL:
v20 = !v20;
LABEL_10:
v12 += v18;
continue;
default:
v19 = 0;
v13 = 0;
v10 = v12;
v14 = 0xFFFFFFFF / v23;
v15 = 0xFFFFFFFF % v23;
break;
}
while ( 1 )
{
v18 = v16(v26, &v17, v12, v11);
if ( v18 <= 0 )
break;
v12 += v18;
if ( v17 < 0x30 || v17 > 0x39 )
{
if ( v17 < 0x41 || v17 > 0x5A )
{
if ( v17 < 0x61 || v17 > 0x7A )
goto LABEL_33;
v17 = v17 - 97 + 10;
}
else
{
v17 = v17 - 65 + 10;
}
}
else
{
v17 -= 48LL;
}
if ( (int)v17 >= (int)v23 )
goto LABEL_33;
if ( v13 > v14 || v13 == v14 && v17 > v15 )
v19 = 1;
else
v13 = v17 + v13 * v23;
}
if ( v18 )
{
LABEL_33:
if ( v22 )
*v22 = v12;
if ( v12 == v10 )
{
*v21 = 33;
return 0LL;
}
else
{
if ( v20 )
{
if ( v13 > 0x80000000 )
v19 = 1;
}
else if ( v13 > 0x7FFFFFFFuLL )
{
v19 = 1;
}
if ( v19 )
{
*v21 = 34;
v7 = 0x7FFFFFFFLL;
if ( v20 )
return 0xFFFFFFFF80000000LL;
return v7;
}
else if ( v20 )
{
return -(long long)v13;
}
else
{
return v13;
}
}
}
if ( v22 )
*v22 = v12;
*v21 = 84;
return 0LL;
}
}
}
|
my_strntol_mb2_or_mb4:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV dword ptr [RBP + -0x24],ECX
MOV qword ptr [RBP + -0x30],R8
MOV qword ptr [RBP + -0x38],R9
MOV dword ptr [RBP + -0x3c],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x70],RAX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x78],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x0
LAB_001b872a:
MOV RAX,qword ptr [RBP + -0x58]
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x70]
MOV RCX,qword ptr [RBP + -0x78]
LEA RSI,[RBP + -0x50]
CALL RAX
MOV dword ptr [RBP + -0x44],EAX
CMP EAX,0x0
JLE 0x001b8791
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,-0x9
MOV qword ptr [RBP + -0x88],RAX
SUB RAX,0x24
JA 0x001b878d
MOV RAX,qword ptr [RBP + -0x88]
LEA RCX,[0x312ea0]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_20:
JMP 0x001b878f
caseD_9:
JMP 0x001b878f
caseD_2d:
CMP dword ptr [RBP + -0x3c],0x0
SETNZ AL
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
MOV dword ptr [RBP + -0x3c],EAX
JMP 0x001b878f
caseD_2b:
JMP 0x001b878f
caseD_a:
JMP 0x001b87e8
LAB_001b878f:
JMP 0x001b87c9
LAB_001b8791:
CMP qword ptr [RBP + -0x30],0x0
JZ 0x001b87a3
MOV RCX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
LAB_001b87a3:
MOV EDX,dword ptr [RBP + -0x44]
MOV ECX,0x21
MOV EAX,0x54
CMP EDX,0x0
CMOVZ ECX,EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],ECX
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001b89f1
LAB_001b87c9:
MOV ECX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + -0x70]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x70],RAX
MOV AL,0x1
TEST AL,0x1
JNZ 0x001b872a
JMP 0x001b87e6
LAB_001b87e6:
JMP 0x001b87e8
LAB_001b87e8:
MOV dword ptr [RBP + -0x40],0x0
MOV dword ptr [RBP + -0x64],0x0
MOV RAX,qword ptr [RBP + -0x70]
MOV qword ptr [RBP + -0x80],RAX
MOV EAX,0xffffffff
XOR EDX,EDX
DIV dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x60],EAX
MOV EAX,0xffffffff
XOR EDX,EDX
DIV dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x5c],EDX
LAB_001b8818:
MOV RAX,qword ptr [RBP + -0x58]
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x70]
MOV RCX,qword ptr [RBP + -0x78]
LEA RSI,[RBP + -0x50]
CALL RAX
MOV dword ptr [RBP + -0x44],EAX
CMP EAX,0x0
JLE 0x001b88f9
MOV ECX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + -0x70]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x70],RAX
CMP qword ptr [RBP + -0x50],0x30
JC 0x001b8867
CMP qword ptr [RBP + -0x50],0x39
JA 0x001b8867
MOV RAX,qword ptr [RBP + -0x50]
SUB RAX,0x30
MOV qword ptr [RBP + -0x50],RAX
JMP 0x001b88b0
LAB_001b8867:
CMP qword ptr [RBP + -0x50],0x41
JC 0x001b8887
CMP qword ptr [RBP + -0x50],0x5a
JA 0x001b8887
MOV RAX,qword ptr [RBP + -0x50]
SUB RAX,0x41
ADD RAX,0xa
MOV qword ptr [RBP + -0x50],RAX
JMP 0x001b88ae
LAB_001b8887:
CMP qword ptr [RBP + -0x50],0x61
JC 0x001b88a7
CMP qword ptr [RBP + -0x50],0x7a
JA 0x001b88a7
MOV RAX,qword ptr [RBP + -0x50]
SUB RAX,0x61
ADD RAX,0xa
MOV qword ptr [RBP + -0x50],RAX
JMP 0x001b88ac
LAB_001b88a7:
JMP 0x001b8938
LAB_001b88ac:
JMP 0x001b88ae
LAB_001b88ae:
JMP 0x001b88b0
LAB_001b88b0:
MOV RAX,qword ptr [RBP + -0x50]
CMP EAX,dword ptr [RBP + -0x24]
JL 0x001b88bb
JMP 0x001b8938
LAB_001b88bb:
MOV EAX,dword ptr [RBP + -0x64]
CMP EAX,dword ptr [RBP + -0x60]
JA 0x001b88d7
MOV EAX,dword ptr [RBP + -0x64]
CMP EAX,dword ptr [RBP + -0x60]
JNZ 0x001b88e0
MOV RAX,qword ptr [RBP + -0x50]
MOV ECX,dword ptr [RBP + -0x5c]
CMP RAX,RCX
JBE 0x001b88e0
LAB_001b88d7:
MOV dword ptr [RBP + -0x40],0x1
JMP 0x001b88f7
LAB_001b88e0:
MOV EAX,dword ptr [RBP + -0x24]
IMUL EAX,dword ptr [RBP + -0x64]
MOV dword ptr [RBP + -0x64],EAX
MOV RCX,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RBP + -0x64]
ADD RAX,RCX
MOV dword ptr [RBP + -0x64],EAX
LAB_001b88f7:
JMP 0x001b892a
LAB_001b88f9:
CMP dword ptr [RBP + -0x44],0x0
JNZ 0x001b8928
CMP qword ptr [RBP + -0x30],0x0
JZ 0x001b8911
MOV RCX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
LAB_001b8911:
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x54
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001b89f1
LAB_001b8928:
JMP 0x001b8938
LAB_001b892a:
JMP 0x001b892c
LAB_001b892c:
MOV AL,0x1
TEST AL,0x1
JNZ 0x001b8818
JMP 0x001b8938
LAB_001b8938:
CMP qword ptr [RBP + -0x30],0x0
JZ 0x001b894a
MOV RCX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
LAB_001b894a:
MOV RAX,qword ptr [RBP + -0x70]
CMP RAX,qword ptr [RBP + -0x80]
JNZ 0x001b896b
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x21
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001b89f1
LAB_001b896b:
CMP dword ptr [RBP + -0x3c],0x0
JZ 0x001b8983
CMP dword ptr [RBP + -0x64],0x80000000
JBE 0x001b8981
MOV dword ptr [RBP + -0x40],0x1
LAB_001b8981:
JMP 0x001b8997
LAB_001b8983:
MOV EAX,dword ptr [RBP + -0x64]
CMP RAX,0x7fffffff
JLE 0x001b8995
MOV dword ptr [RBP + -0x40],0x1
LAB_001b8995:
JMP 0x001b8997
LAB_001b8997:
CMP dword ptr [RBP + -0x40],0x0
JZ 0x001b89c3
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x22
MOV EDX,dword ptr [RBP + -0x3c]
MOV EAX,0x7fffffff
MOV RCX,-0x80000000
CMP EDX,0x0
CMOVNZ RAX,RCX
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001b89f1
LAB_001b89c3:
CMP dword ptr [RBP + -0x3c],0x0
JZ 0x001b89dc
MOV EAX,dword ptr [RBP + -0x64]
MOV ECX,EAX
XOR EAX,EAX
SUB RAX,RCX
MOV qword ptr [RBP + -0x90],RAX
JMP 0x001b89e6
LAB_001b89dc:
MOV EAX,dword ptr [RBP + -0x64]
MOV qword ptr [RBP + -0x90],RAX
LAB_001b89e6:
MOV RAX,qword ptr [RBP + -0x90]
MOV qword ptr [RBP + -0x8],RAX
LAB_001b89f1:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x90
POP RBP
RET
|
/* WARNING: Removing unreachable block (ram,0x001b87e4) */
/* WARNING: Removing unreachable block (ram,0x001b8936) */
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;
ulong uVar2;
long lVar3;
uint uVar4;
int4 uVar5;
ulong local_98;
long local_78;
uint local_6c;
ulong local_58;
int local_4c;
int local_48;
uint local_44;
int4 *local_40;
long *local_38;
uint local_2c;
long local_28;
long local_20;
long local_18;
ulong local_10;
local_44 = 0;
pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28);
*param_6 = 0;
local_78 = param_2;
local_40 = param_6;
local_38 = param_5;
local_2c = param_4;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
do {
lVar3 = local_78;
local_4c = (*pcVar1)(local_18,&local_58,local_78,param_2 + param_3);
if (local_4c < 1) {
if (local_38 != (long *)0x0) {
*local_38 = local_78;
}
uVar5 = 0x21;
if (local_4c == 0) {
uVar5 = 0x54;
}
*local_40 = uVar5;
return 0;
}
switch(local_58) {
case 9:
break;
default:
local_48 = 0;
local_6c = 0;
uVar4 = (uint)(0xffffffff / (ulong)local_2c);
uVar2 = (ulong)local_2c;
goto LAB_001b8818;
case 0x20:
break;
case 0x2b:
break;
case 0x2d:
local_44 = (uint)((local_44 != 0 ^ 0xffU) & 1);
}
local_78 = local_78 + local_4c;
} while( true );
LAB_001b8818:
local_4c = (*pcVar1)(local_18,&local_58,local_78,param_2 + param_3);
if (local_4c < 1) {
if (local_4c == 0) {
if (local_38 != (long *)0x0) {
*local_38 = local_78;
}
*local_40 = 0x54;
local_10 = 0;
}
else {
LAB_001b8938:
if (local_38 != (long *)0x0) {
*local_38 = local_78;
}
if (local_78 == lVar3) {
*local_40 = 0x21;
local_10 = 0;
}
else {
if (local_44 == 0) {
if (0x7fffffff < local_6c) {
local_48 = 1;
}
}
else if (0x80000000 < local_6c) {
local_48 = 1;
}
if (local_48 == 0) {
if (local_44 == 0) {
local_98 = (ulong)local_6c;
}
else {
local_98 = -(ulong)local_6c;
}
local_10 = local_98;
}
else {
*local_40 = 0x22;
local_10 = 0x7fffffff;
if (local_44 != 0) {
local_10 = 0xffffffff80000000;
}
}
}
}
return local_10;
}
local_78 = local_78 + local_4c;
if ((local_58 < 0x30) || (0x39 < local_58)) {
if ((local_58 < 0x41) || (0x5a < local_58)) {
if ((local_58 < 0x61) || (0x7a < local_58)) goto LAB_001b8938;
local_58 = local_58 - 0x57;
}
else {
local_58 = local_58 - 0x37;
}
}
else {
local_58 = local_58 - 0x30;
}
if ((int)local_2c <= (int)local_58) goto LAB_001b8938;
if ((uVar4 < local_6c) || ((local_6c == uVar4 && (0xffffffffU % uVar2 < local_58)))) {
local_48 = 1;
}
else {
local_6c = local_2c * local_6c + (int)local_58;
}
goto LAB_001b8818;
}
|
|
7,635 |
ggml_compute_forward_sgn
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c
|
static void ggml_compute_forward_sgn(
const struct ggml_compute_params * params,
struct ggml_tensor * dst) {
const struct ggml_tensor * src0 = dst->src[0];
switch (src0->type) {
case GGML_TYPE_F32:
{
ggml_compute_forward_sgn_f32(params, dst);
} break;
default:
{
GGML_ABORT("fatal error");
}
}
}
|
O0
|
c
|
ggml_compute_forward_sgn:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %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
movl (%rax), %eax
testl %eax, %eax
jne 0x38c9a
jmp 0x38c8b
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x392e0
jmp 0x38cb4
leaq 0x3aec1(%rip), %rdi # 0x73b62
movl $0x1831, %esi # imm = 0x1831
leaq 0x3b110(%rip), %rdx # 0x73dbd
movb $0x0, %al
callq 0xe270
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
ggml_compute_forward_sgn:
push rbp
mov rbp, rsp
sub rsp, 20h
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]
mov eax, [rax]
test eax, eax
jnz short loc_38C9A
jmp short $+2
loc_38C8B:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
call ggml_compute_forward_sgn_f32
jmp short loc_38CB4
loc_38C9A:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov esi, 1831h
lea rdx, aFatalError; "fatal error"
mov al, 0
call _ggml_abort
loc_38CB4:
add rsp, 20h
pop rbp
retn
|
double ggml_compute_forward_sgn(long long a1, long long a2)
{
double result; // xmm0_8
if ( **(_DWORD **)(a2 + 152) )
return ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c",
6193LL,
"fatal error");
ggml_compute_forward_sgn_f32(a1, a2);
return result;
}
|
ggml_compute_forward_sgn:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x98]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX]
TEST EAX,EAX
JNZ 0x00138c9a
JMP 0x00138c8b
LAB_00138c8b:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x001392e0
JMP 0x00138cb4
LAB_00138c9a:
LEA RDI,[0x173b62]
MOV ESI,0x1831
LEA RDX,[0x173dbd]
MOV AL,0x0
CALL 0x0010e270
LAB_00138cb4:
ADD RSP,0x20
POP RBP
RET
|
void ggml_compute_forward_sgn(int8 param_1,long param_2)
{
if (**(int **)(param_2 + 0x98) == 0) {
ggml_compute_forward_sgn_f32(param_1,param_2);
}
else {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c"
,0x1831,"fatal error");
}
return;
}
|
|
7,636 |
PFS_buffer_scalable_container<PFS_setup_object, 128, 1024, PFS_buffer_default_array<PFS_setup_object>, PFS_buffer_default_allocator<PFS_setup_object>>::cleanup()
|
eloqsql/storage/perfschema/pfs_buffer_container.h
|
void cleanup()
{
int i;
array_type *page;
if (! m_initialized)
return;
pthread_mutex_lock(& m_critical_section);
for (i=0 ; i < PFS_PAGE_COUNT; i++)
{
page= m_pages[i];
if (page != NULL)
{
m_allocator->free_array(page);
delete page;
m_pages[i]= NULL;
}
}
pthread_mutex_unlock(& m_critical_section);
pthread_mutex_destroy(& m_critical_section);
m_initialized= false;
}
|
O0
|
c
|
PFS_buffer_scalable_container<PFS_setup_object, 128, 1024, PFS_buffer_default_array<PFS_setup_object>, PFS_buffer_default_allocator<PFS_setup_object>>::cleanup():
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
testb $0x1, 0x8(%rax)
jne 0x5642f
jmp 0x564e3
movq -0x20(%rbp), %rdi
addq $0x20b0, %rdi # imm = 0x20B0
callq 0x264c0
movl $0x0, -0xc(%rbp)
cmpl $0x400, -0xc(%rbp) # imm = 0x400
jge 0x564bb
movq -0x20(%rbp), %rax
movslq -0xc(%rbp), %rcx
movq 0xa8(%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x564ae
movq -0x20(%rbp), %rax
movq 0x20a8(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x56990
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x5649a
movq -0x28(%rbp), %rdi
movl $0x60, %esi
callq 0x26320
movq -0x20(%rbp), %rax
movslq -0xc(%rbp), %rcx
movq $0x0, 0xa8(%rax,%rcx,8)
jmp 0x564b0
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x56446
movq -0x20(%rbp), %rdi
addq $0x20b0, %rdi # imm = 0x20B0
callq 0x26260
movq -0x20(%rbp), %rdi
addq $0x20b0, %rdi # imm = 0x20B0
callq 0x263a0
movq -0x20(%rbp), %rax
movb $0x0, 0x8(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
|
_ZN29PFS_buffer_scalable_containerI17PFS_prepared_stmtLi1024ELi1024E24PFS_buffer_default_arrayIS0_E28PFS_buffer_default_allocatorIS0_EE7cleanupEv:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_20], rax
test byte ptr [rax+8], 1
jnz short loc_5642F
jmp loc_564E3
loc_5642F:
mov rdi, [rbp+var_20]
add rdi, 20B0h
call _pthread_mutex_lock
mov [rbp+var_C], 0
loc_56446:
cmp [rbp+var_C], 400h
jge short loc_564BB
mov rax, [rbp+var_20]
movsxd rcx, [rbp+var_C]
mov rax, [rax+rcx*8+0A8h]
mov [rbp+var_18], rax
cmp [rbp+var_18], 0
jz short loc_564AE
mov rax, [rbp+var_20]
mov rdi, [rax+20A8h]
mov rsi, [rbp+var_18]
call _ZN28PFS_buffer_default_allocatorI17PFS_prepared_stmtE10free_arrayEP24PFS_buffer_default_arrayIS0_E; PFS_buffer_default_allocator<PFS_prepared_stmt>::free_array(PFS_buffer_default_array<PFS_prepared_stmt> *)
mov rax, [rbp+var_18]
mov [rbp+var_28], rax
cmp rax, 0
jz short loc_5649A
mov rdi, [rbp+var_28]; void *
mov esi, 60h ; '`'; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5649A:
mov rax, [rbp+var_20]
movsxd rcx, [rbp+var_C]
mov qword ptr [rax+rcx*8+0A8h], 0
loc_564AE:
jmp short $+2
loc_564B0:
mov eax, [rbp+var_C]
add eax, 1
mov [rbp+var_C], eax
jmp short loc_56446
loc_564BB:
mov rdi, [rbp+var_20]
add rdi, 20B0h
call _pthread_mutex_unlock
mov rdi, [rbp+var_20]
add rdi, 20B0h
call _pthread_mutex_destroy
mov rax, [rbp+var_20]
mov byte ptr [rax+8], 0
loc_564E3:
add rsp, 30h
pop rbp
retn
|
long long PFS_buffer_scalable_container<PFS_prepared_stmt,1024,1024,PFS_buffer_default_array<PFS_prepared_stmt>,PFS_buffer_default_allocator<PFS_prepared_stmt>>::cleanup(
long long a1)
{
long long result; // rax
void *v2; // [rsp+18h] [rbp-18h]
int i; // [rsp+24h] [rbp-Ch]
result = a1;
if ( (*(_BYTE *)(a1 + 8) & 1) != 0 )
{
pthread_mutex_lock(a1 + 8368);
for ( i = 0; i < 1024; ++i )
{
v2 = *(void **)(a1 + 8LL * i + 168);
if ( v2 )
{
PFS_buffer_default_allocator<PFS_prepared_stmt>::free_array(*(_QWORD *)(a1 + 8360), v2);
operator delete(v2, 0x60uLL);
*(_QWORD *)(a1 + 8LL * i + 168) = 0LL;
}
}
pthread_mutex_unlock(a1 + 8368);
pthread_mutex_destroy(a1 + 8368);
result = a1;
*(_BYTE *)(a1 + 8) = 0;
}
return result;
}
|
cleanup:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x20],RAX
TEST byte ptr [RAX + 0x8],0x1
JNZ 0x0015642f
JMP 0x001564e3
LAB_0015642f:
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x20b0
CALL 0x001264c0
MOV dword ptr [RBP + -0xc],0x0
LAB_00156446:
CMP dword ptr [RBP + -0xc],0x400
JGE 0x001564bb
MOV RAX,qword ptr [RBP + -0x20]
MOVSXD RCX,dword ptr [RBP + -0xc]
MOV RAX,qword ptr [RAX + RCX*0x8 + 0xa8]
MOV qword ptr [RBP + -0x18],RAX
CMP qword ptr [RBP + -0x18],0x0
JZ 0x001564ae
MOV RAX,qword ptr [RBP + -0x20]
MOV RDI,qword ptr [RAX + 0x20a8]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x00156990
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x28],RAX
CMP RAX,0x0
JZ 0x0015649a
MOV RDI,qword ptr [RBP + -0x28]
MOV ESI,0x60
CALL 0x00126320
LAB_0015649a:
MOV RAX,qword ptr [RBP + -0x20]
MOVSXD RCX,dword ptr [RBP + -0xc]
MOV qword ptr [RAX + RCX*0x8 + 0xa8],0x0
LAB_001564ae:
JMP 0x001564b0
LAB_001564b0:
MOV EAX,dword ptr [RBP + -0xc]
ADD EAX,0x1
MOV dword ptr [RBP + -0xc],EAX
JMP 0x00156446
LAB_001564bb:
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x20b0
CALL 0x00126260
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x20b0
CALL 0x001263a0
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x8],0x0
LAB_001564e3:
ADD RSP,0x30
POP RBP
RET
|
/* PFS_buffer_scalable_container<PFS_prepared_stmt, 1024, 1024,
PFS_buffer_default_array<PFS_prepared_stmt>, PFS_buffer_default_allocator<PFS_prepared_stmt>
>::cleanup() */
void __thiscall
PFS_buffer_scalable_container<PFS_prepared_stmt,1024,1024,PFS_buffer_default_array<PFS_prepared_stmt>,PFS_buffer_default_allocator<PFS_prepared_stmt>>
::cleanup(PFS_buffer_scalable_container<PFS_prepared_stmt,1024,1024,PFS_buffer_default_array<PFS_prepared_stmt>,PFS_buffer_default_allocator<PFS_prepared_stmt>>
*this)
{
PFS_buffer_default_array *pPVar1;
int local_14;
if (((byte)this[8] & 1) != 0) {
pthread_mutex_lock((pthread_mutex_t *)(this + 0x20b0));
for (local_14 = 0; local_14 < 0x400; local_14 = local_14 + 1) {
pPVar1 = *(PFS_buffer_default_array **)(this + (long)local_14 * 8 + 0xa8);
if (pPVar1 != (PFS_buffer_default_array *)0x0) {
PFS_buffer_default_allocator<PFS_prepared_stmt>::free_array
(*(PFS_buffer_default_allocator<PFS_prepared_stmt> **)(this + 0x20a8),pPVar1);
if (pPVar1 != (PFS_buffer_default_array *)0x0) {
operator_delete(pPVar1,0x60);
}
*(int8 *)(this + (long)local_14 * 8 + 0xa8) = 0;
}
}
pthread_mutex_unlock((pthread_mutex_t *)(this + 0x20b0));
pthread_mutex_destroy((pthread_mutex_t *)(this + 0x20b0));
this[8] = (PFS_buffer_scalable_container<PFS_prepared_stmt,1024,1024,PFS_buffer_default_array<PFS_prepared_stmt>,PFS_buffer_default_allocator<PFS_prepared_stmt>>
)0x0;
}
return;
}
|
|
7,637 |
PFS_buffer_scalable_container<PFS_setup_object, 128, 1024, PFS_buffer_default_array<PFS_setup_object>, PFS_buffer_default_allocator<PFS_setup_object>>::cleanup()
|
eloqsql/storage/perfschema/pfs_buffer_container.h
|
void cleanup()
{
int i;
array_type *page;
if (! m_initialized)
return;
pthread_mutex_lock(& m_critical_section);
for (i=0 ; i < PFS_PAGE_COUNT; i++)
{
page= m_pages[i];
if (page != NULL)
{
m_allocator->free_array(page);
delete page;
m_pages[i]= NULL;
}
}
pthread_mutex_unlock(& m_critical_section);
pthread_mutex_destroy(& m_critical_section);
m_initialized= false;
}
|
O3
|
c
|
PFS_buffer_scalable_container<PFS_setup_object, 128, 1024, PFS_buffer_default_array<PFS_setup_object>, PFS_buffer_default_allocator<PFS_setup_object>>::cleanup():
cmpb $0x1, 0x8(%rdi)
jne 0x463ab
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x4b0(%rdi), %r14
movq %r14, %rdi
callq 0x264e0
xorl %r12d, %r12d
movq 0xa8(%rbx,%r12,8), %r15
testq %r15, %r15
je 0x46383
movq 0x4a8(%rbx), %rdi
movq %r15, %rsi
callq 0x34874
movl $0x88, %esi
movq %r15, %rdi
callq 0x26340
movq $0x0, 0xa8(%rbx,%r12,8)
incq %r12
cmpq $0x80, %r12
jne 0x4634e
movq %r14, %rdi
callq 0x26250
movq %r14, %rdi
callq 0x263e0
movb $0x0, 0x8(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
_ZN29PFS_buffer_scalable_containerI8PFS_hostLi128ELi128E14PFS_host_array18PFS_host_allocatorE7cleanupEv:
cmp byte ptr [rdi+8], 1
jnz short locret_463AB
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov rbx, rdi
lea r14, [rdi+4B0h]
mov rdi, r14
call _pthread_mutex_lock
xor r12d, r12d
loc_4634E:
mov r15, [rbx+r12*8+0A8h]
test r15, r15
jz short loc_46383
mov rdi, [rbx+4A8h]
mov rsi, r15
call _ZN18PFS_host_allocator10free_arrayEP14PFS_host_array; PFS_host_allocator::free_array(PFS_host_array *)
mov esi, 88h; unsigned __int64
mov rdi, r15; void *
call __ZdlPvm; operator delete(void *,ulong)
mov qword ptr [rbx+r12*8+0A8h], 0
loc_46383:
inc r12
cmp r12, 80h
jnz short loc_4634E
mov rdi, r14
call _pthread_mutex_unlock
mov rdi, r14
call _pthread_mutex_destroy
mov byte ptr [rbx+8], 0
pop rbx
pop r12
pop r14
pop r15
pop rbp
locret_463AB:
retn
|
long long PFS_buffer_scalable_container<PFS_host,128,128,PFS_host_array,PFS_host_allocator>::cleanup(
long long a1)
{
long long v1; // r14
long long i; // r12
void *v3; // r15
long long result; // rax
if ( *(_BYTE *)(a1 + 8) == 1 )
{
v1 = a1 + 1200;
pthread_mutex_lock(a1 + 1200);
for ( i = 0LL; i != 128; ++i )
{
v3 = *(void **)(a1 + 8 * i + 168);
if ( v3 )
{
PFS_host_allocator::free_array(*(_QWORD *)(a1 + 1192), *(_QWORD **)(a1 + 8 * i + 168));
operator delete(v3, 0x88uLL);
*(_QWORD *)(a1 + 8 * i + 168) = 0LL;
}
}
pthread_mutex_unlock(v1);
result = pthread_mutex_destroy(v1);
*(_BYTE *)(a1 + 8) = 0;
}
return result;
}
|
cleanup:
CMP byte ptr [RDI + 0x8],0x1
JNZ 0x001463ab
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,RDI
LEA R14,[RDI + 0x4b0]
MOV RDI,R14
CALL 0x001264e0
XOR R12D,R12D
LAB_0014634e:
MOV R15,qword ptr [RBX + R12*0x8 + 0xa8]
TEST R15,R15
JZ 0x00146383
MOV RDI,qword ptr [RBX + 0x4a8]
MOV RSI,R15
CALL 0x00134874
MOV ESI,0x88
MOV RDI,R15
CALL 0x00126340
MOV qword ptr [RBX + R12*0x8 + 0xa8],0x0
LAB_00146383:
INC R12
CMP R12,0x80
JNZ 0x0014634e
MOV RDI,R14
CALL 0x00126250
MOV RDI,R14
CALL 0x001263e0
MOV byte ptr [RBX + 0x8],0x0
POP RBX
POP R12
POP R14
POP R15
POP RBP
LAB_001463ab:
RET
|
/* PFS_buffer_scalable_container<PFS_host, 128, 128, PFS_host_array, PFS_host_allocator>::cleanup()
*/
void __thiscall
PFS_buffer_scalable_container<PFS_host,128,128,PFS_host_array,PFS_host_allocator>::cleanup
(PFS_buffer_scalable_container<PFS_host,128,128,PFS_host_array,PFS_host_allocator> *this)
{
pthread_mutex_t *__mutex;
PFS_host_array *pPVar1;
long lVar2;
if (this[8] ==
(PFS_buffer_scalable_container<PFS_host,128,128,PFS_host_array,PFS_host_allocator>)0x1) {
__mutex = (pthread_mutex_t *)(this + 0x4b0);
pthread_mutex_lock(__mutex);
lVar2 = 0;
do {
pPVar1 = *(PFS_host_array **)(this + lVar2 * 8 + 0xa8);
if (pPVar1 != (PFS_host_array *)0x0) {
PFS_host_allocator::free_array(*(PFS_host_allocator **)(this + 0x4a8),pPVar1);
operator_delete(pPVar1,0x88);
*(int8 *)(this + lVar2 * 8 + 0xa8) = 0;
}
lVar2 = lVar2 + 1;
} while (lVar2 != 0x80);
pthread_mutex_unlock(__mutex);
pthread_mutex_destroy(__mutex);
this[8] = (PFS_buffer_scalable_container<PFS_host,128,128,PFS_host_array,PFS_host_allocator>)0x0
;
}
return;
}
|
|
7,638 |
LefDefParser::defiTimingDisable::Init()
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiTimingDisable.cpp
|
void defiTimingDisable::Init() {
fromInst_ = 0;
fromInstLength_ = 0;
toInst_ = 0;
toInstLength_ = 0;
toPin_ = 0;
toPinLength_ = 0;
fromPin_ = 0;
fromPinLength_ = 0;
}
|
O3
|
cpp
|
LefDefParser::defiTimingDisable::Init():
xorl %eax, %eax
movq %rax, (%rdi)
movl %eax, 0x8(%rdi)
movq %rax, 0x10(%rdi)
movl %eax, 0x18(%rdi)
movq %rax, 0x30(%rdi)
movl %eax, 0x38(%rdi)
movq %rax, 0x20(%rdi)
movl %eax, 0x28(%rdi)
retq
|
_ZN12LefDefParser17defiTimingDisable4InitEv:
xor eax, eax
mov [rdi], rax
mov [rdi+8], eax
mov [rdi+10h], rax
mov [rdi+18h], eax
mov [rdi+30h], rax
mov [rdi+38h], eax
mov [rdi+20h], rax
mov [rdi+28h], eax
retn
|
long long LefDefParser::defiTimingDisable::Init(LefDefParser::defiTimingDisable *this)
{
long long result; // rax
result = 0LL;
*(_QWORD *)this = 0LL;
*((_DWORD *)this + 2) = 0;
*((_QWORD *)this + 2) = 0LL;
*((_DWORD *)this + 6) = 0;
*((_QWORD *)this + 6) = 0LL;
*((_DWORD *)this + 14) = 0;
*((_QWORD *)this + 4) = 0LL;
*((_DWORD *)this + 10) = 0;
return result;
}
|
Init:
XOR EAX,EAX
MOV qword ptr [RDI],RAX
MOV dword ptr [RDI + 0x8],EAX
MOV qword ptr [RDI + 0x10],RAX
MOV dword ptr [RDI + 0x18],EAX
MOV qword ptr [RDI + 0x30],RAX
MOV dword ptr [RDI + 0x38],EAX
MOV qword ptr [RDI + 0x20],RAX
MOV dword ptr [RDI + 0x28],EAX
RET
|
/* LefDefParser::defiTimingDisable::Init() */
void __thiscall LefDefParser::defiTimingDisable::Init(defiTimingDisable *this)
{
*(int8 *)this = 0;
*(int4 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
*(int4 *)(this + 0x18) = 0;
*(int8 *)(this + 0x30) = 0;
*(int4 *)(this + 0x38) = 0;
*(int8 *)(this + 0x20) = 0;
*(int4 *)(this + 0x28) = 0;
return;
}
|
|
7,639 |
composition_solid_source_atop
|
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-blend.c
|
static void composition_solid_source_atop(uint32_t* dest, int length, uint32_t color, uint32_t const_alpha)
{
if(const_alpha != 255)
color = BYTE_MUL(color, const_alpha);
uint32_t sia = plutovg_alpha(~color);
for(int i = 0; i < length; i++) {
uint32_t d = dest[i];
dest[i] = INTERPOLATE_PIXEL(color, plutovg_alpha(d), d, sia);
}
}
|
O2
|
c
|
composition_solid_source_atop:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movl %esi, %ebx
movq %rdi, %r14
cmpl $0xff, %ecx
je 0x38c6b
movl %ebp, %edi
movl %ecx, %esi
callq 0x38d7d
movl %eax, %ebp
movl %ebp, %r15d
notl %r15d
shrl $0x18, %r15d
xorl %r12d, %r12d
testl %ebx, %ebx
cmovlel %r12d, %ebx
cmpq %r12, %rbx
je 0x38c9f
movl (%r14,%r12,4), %edx
movl %edx, %esi
shrl $0x18, %esi
movl %ebp, %edi
movl %r15d, %ecx
callq 0x38dbb
movl %eax, (%r14,%r12,4)
incq %r12
jmp 0x38c7e
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
composition_solid_source_atop:
push rbp
push r15
push r14
push r12
push rbx
mov ebp, edx
mov ebx, esi
mov r14, rdi
cmp ecx, 0FFh
jz short loc_38C6B
mov edi, ebp
mov esi, ecx
call BYTE_MUL
mov ebp, eax
loc_38C6B:
mov r15d, ebp
not r15d
shr r15d, 18h
xor r12d, r12d
test ebx, ebx
cmovle ebx, r12d
loc_38C7E:
cmp rbx, r12
jz short loc_38C9F
mov edx, [r14+r12*4]
mov esi, edx
shr esi, 18h
mov edi, ebp
mov ecx, r15d
call INTERPOLATE_PIXEL
mov [r14+r12*4], eax
inc r12
jmp short loc_38C7E
loc_38C9F:
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
void composition_solid_source_atop(long long a1, int a2, unsigned int a3, unsigned int a4)
{
unsigned int v4; // ebp
long long v5; // rbx
long long v6; // r12
v4 = a3;
v5 = (unsigned int)a2;
if ( a4 != 255 )
v4 = BYTE_MUL(a3, a4);
v6 = 0LL;
if ( a2 <= 0 )
v5 = 0LL;
while ( v5 != v6 )
{
*(_DWORD *)(a1 + 4 * v6) = INTERPOLATE_PIXEL(v4, HIBYTE(*(_DWORD *)(a1 + 4 * v6)), *(unsigned int *)(a1 + 4 * v6));
++v6;
}
}
|
composition_solid_source_atop:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV EBP,EDX
MOV EBX,ESI
MOV R14,RDI
CMP ECX,0xff
JZ 0x00138c6b
MOV EDI,EBP
MOV ESI,ECX
CALL 0x00138d7d
MOV EBP,EAX
LAB_00138c6b:
MOV R15D,EBP
NOT R15D
SHR R15D,0x18
XOR R12D,R12D
TEST EBX,EBX
CMOVLE EBX,R12D
LAB_00138c7e:
CMP RBX,R12
JZ 0x00138c9f
MOV EDX,dword ptr [R14 + R12*0x4]
MOV ESI,EDX
SHR ESI,0x18
MOV EDI,EBP
MOV ECX,R15D
CALL 0x00138dbb
MOV dword ptr [R14 + R12*0x4],EAX
INC R12
JMP 0x00138c7e
LAB_00138c9f:
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
void composition_solid_source_atop(long param_1,uint param_2,uint param_3,int param_4)
{
uint uVar1;
int4 uVar2;
ulong uVar3;
ulong uVar4;
if (param_4 != 0xff) {
param_3 = BYTE_MUL(param_3,param_4);
}
uVar4 = 0;
uVar3 = (ulong)param_2;
if ((int)param_2 < 1) {
uVar3 = uVar4;
}
for (; uVar3 != uVar4; uVar4 = uVar4 + 1) {
uVar1 = *(uint *)(param_1 + uVar4 * 4);
uVar2 = INTERPOLATE_PIXEL(param_3,uVar1 >> 0x18,uVar1,~param_3 >> 0x18);
*(int4 *)(param_1 + uVar4 * 4) = uVar2;
}
return;
}
|
|
7,640 |
js_std_tmpfile
|
bluesky950520[P]quickjs/quickjs-libc.c
|
static JSValue js_std_tmpfile(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
FILE *f;
f = tmpfile();
if (argc >= 1)
js_set_error_object(ctx, argv[0], f ? 0 : errno);
if (!f)
return JS_NULL;
return js_new_std_file(ctx, f, FALSE);
}
|
O1
|
c
|
js_std_tmpfile:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %r8, %r15
movl %ecx, %ebp
movq %rdi, %rbx
callq 0xe560
movq %rax, %r14
testl %ebp, %ebp
jle 0x1bc84
testq %r14, %r14
je 0x1bc5e
xorl %r8d, %r8d
jmp 0x1bc66
callq 0xe0b0
movl (%rax), %r8d
movq 0x8(%r15), %rdx
cmpl $0x3, %edx
je 0x1bc84
movq (%r15), %rsi
leaq 0x84351(%rip), %rcx # 0x9ffca
movq %rbx, %rdi
xorl %r9d, %r9d
callq 0x29484
testq %r14, %r14
je 0x1bc98
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x19dd3
jmp 0x1bc9f
movl $0x2, %edx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
js_std_tmpfile:
push rbp
push r15
push r14
push rbx
push rax
mov r15, r8
mov ebp, ecx
mov rbx, rdi
call _tmpfile
mov r14, rax
test ebp, ebp
jle short loc_1BC84
test r14, r14
jz short loc_1BC5E
xor r8d, r8d
jmp short loc_1BC66
loc_1BC5E:
call ___errno_location
mov r8d, [rax]
loc_1BC66:
mov rdx, [r15+8]
cmp edx, 3
jz short loc_1BC84
mov rsi, [r15]
lea rcx, aErrno; "errno"
mov rdi, rbx
xor r9d, r9d
call JS_SetPropertyStr
loc_1BC84:
test r14, r14
jz short loc_1BC98
mov rdi, rbx
mov rsi, r14
xor edx, edx
call js_new_std_file
jmp short loc_1BC9F
loc_1BC98:
mov edx, 2
xor eax, eax
loc_1BC9F:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
|
unsigned long long js_std_tmpfile(long long a1, long long a2, long long a3, int a4, _QWORD *a5)
{
long long v7; // rax
long long v8; // rcx
long long v9; // r14
long long v10; // r8
long long v11; // rdx
v7 = tmpfile(a1);
v9 = v7;
if ( a4 > 0 )
{
v10 = v7 ? 0LL : *(unsigned int *)__errno_location(a1);
v11 = a5[1];
if ( (_DWORD)v11 != 3 )
JS_SetPropertyStr(a1, *a5, v11, "errno", v10, 0LL);
}
if ( v9 )
return js_new_std_file(a1, v9, 0LL, v8);
else
return 0LL;
}
|
js_std_tmpfile:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R15,R8
MOV EBP,ECX
MOV RBX,RDI
CALL 0x0010e560
MOV R14,RAX
TEST EBP,EBP
JLE 0x0011bc84
TEST R14,R14
JZ 0x0011bc5e
XOR R8D,R8D
JMP 0x0011bc66
LAB_0011bc5e:
CALL 0x0010e0b0
MOV R8D,dword ptr [RAX]
LAB_0011bc66:
MOV RDX,qword ptr [R15 + 0x8]
CMP EDX,0x3
JZ 0x0011bc84
MOV RSI,qword ptr [R15]
LEA RCX,[0x19ffca]
MOV RDI,RBX
XOR R9D,R9D
CALL 0x00129484
LAB_0011bc84:
TEST R14,R14
JZ 0x0011bc98
MOV RDI,RBX
MOV RSI,R14
XOR EDX,EDX
CALL 0x00119dd3
JMP 0x0011bc9f
LAB_0011bc98:
MOV EDX,0x2
XOR EAX,EAX
LAB_0011bc9f:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
int8
js_std_tmpfile(int8 param_1,int8 param_2,int8 param_3,int param_4,
int8 *param_5)
{
FILE *pFVar1;
int *piVar2;
int8 uVar3;
int iVar4;
pFVar1 = tmpfile();
if (0 < param_4) {
if (pFVar1 == (FILE *)0x0) {
piVar2 = __errno_location();
iVar4 = *piVar2;
}
else {
iVar4 = 0;
}
if ((int)param_5[1] != 3) {
JS_SetPropertyStr(param_1,*param_5,param_5[1],"errno",iVar4,0);
}
}
if (pFVar1 == (FILE *)0x0) {
uVar3 = 0;
}
else {
uVar3 = js_new_std_file(param_1,pFVar1,0);
}
return uVar3;
}
|
|
7,641 |
js_std_tmpfile
|
bluesky950520[P]quickjs/quickjs-libc.c
|
static JSValue js_std_tmpfile(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
FILE *f;
f = tmpfile();
if (argc >= 1)
js_set_error_object(ctx, argv[0], f ? 0 : errno);
if (!f)
return JS_NULL;
return js_new_std_file(ctx, f, FALSE);
}
|
O3
|
c
|
js_std_tmpfile:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %r8, %r15
movl %ecx, %ebp
movq %rdi, %rbx
callq 0xe560
movq %rax, %r14
testl %ebp, %ebp
jle 0x1c666
testq %r14, %r14
je 0x1c640
xorl %r8d, %r8d
jmp 0x1c648
callq 0xe0b0
movl (%rax), %r8d
movq 0x8(%r15), %rdx
cmpl $0x3, %edx
je 0x1c666
movq (%r15), %rsi
leaq 0x868eb(%rip), %rcx # 0xa2f46
movq %rbx, %rdi
xorl %r9d, %r9d
callq 0x29a43
testq %r14, %r14
je 0x1c67a
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x1a78d
jmp 0x1c681
movl $0x2, %edx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
js_std_tmpfile:
push rbp
push r15
push r14
push rbx
push rax
mov r15, r8
mov ebp, ecx
mov rbx, rdi
call _tmpfile
mov r14, rax
test ebp, ebp
jle short loc_1C666
test r14, r14
jz short loc_1C640
xor r8d, r8d
jmp short loc_1C648
loc_1C640:
call ___errno_location
mov r8d, [rax]
loc_1C648:
mov rdx, [r15+8]
cmp edx, 3
jz short loc_1C666
mov rsi, [r15]
lea rcx, aErrno; "errno"
mov rdi, rbx
xor r9d, r9d
call JS_SetPropertyStr
loc_1C666:
test r14, r14
jz short loc_1C67A
mov rdi, rbx
mov rsi, r14
xor edx, edx
call js_new_std_file
jmp short loc_1C681
loc_1C67A:
mov edx, 2
xor eax, eax
loc_1C681:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
|
unsigned long long js_std_tmpfile(long long a1, long long a2, long long a3, int a4, _QWORD *a5)
{
long long v7; // rax
long long v8; // r14
long long v9; // r8
long long v10; // rdx
v7 = tmpfile(a1);
v8 = v7;
if ( a4 > 0 )
{
v9 = v7 ? 0LL : *(unsigned int *)__errno_location(a1);
v10 = a5[1];
if ( (_DWORD)v10 != 3 )
JS_SetPropertyStr(a1, *a5, v10, "errno", v9, 0LL);
}
if ( v8 )
return js_new_std_file(a1, v8, 0);
else
return 0LL;
}
|
js_std_tmpfile:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R15,R8
MOV EBP,ECX
MOV RBX,RDI
CALL 0x0010e560
MOV R14,RAX
TEST EBP,EBP
JLE 0x0011c666
TEST R14,R14
JZ 0x0011c640
XOR R8D,R8D
JMP 0x0011c648
LAB_0011c640:
CALL 0x0010e0b0
MOV R8D,dword ptr [RAX]
LAB_0011c648:
MOV RDX,qword ptr [R15 + 0x8]
CMP EDX,0x3
JZ 0x0011c666
MOV RSI,qword ptr [R15]
LEA RCX,[0x1a2f46]
MOV RDI,RBX
XOR R9D,R9D
CALL 0x00129a43
LAB_0011c666:
TEST R14,R14
JZ 0x0011c67a
MOV RDI,RBX
MOV RSI,R14
XOR EDX,EDX
CALL 0x0011a78d
JMP 0x0011c681
LAB_0011c67a:
MOV EDX,0x2
XOR EAX,EAX
LAB_0011c681:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
int8
js_std_tmpfile(int8 param_1,int8 param_2,int8 param_3,int param_4,
int8 *param_5)
{
FILE *pFVar1;
int *piVar2;
int8 uVar3;
int iVar4;
pFVar1 = tmpfile();
if (0 < param_4) {
if (pFVar1 == (FILE *)0x0) {
piVar2 = __errno_location();
iVar4 = *piVar2;
}
else {
iVar4 = 0;
}
if ((int)param_5[1] != 3) {
JS_SetPropertyStr(param_1,*param_5,param_5[1],"errno",iVar4,0);
}
}
if (pFVar1 == (FILE *)0x0) {
uVar3 = 0;
}
else {
uVar3 = js_new_std_file(param_1,pFVar1,0);
}
return uVar3;
}
|
|
7,642 |
mp_add_mul1
|
bluesky950520[P]quickjs/libbf.c
|
static limb_t mp_add_mul1(limb_t *tabr, const limb_t *taba, limb_t n,
limb_t b)
{
limb_t i, l;
dlimb_t t;
l = 0;
for(i = 0; i < n; i++) {
t = (dlimb_t)taba[i] * (dlimb_t)b + l + tabr[i];
tabr[i] = t;
l = t >> LIMB_BITS;
}
return l;
}
|
O2
|
c
|
mp_add_mul1:
movq %rdx, %r8
xorl %r9d, %r9d
xorl %r10d, %r10d
cmpq %r10, %r8
je 0x78469
movq %rcx, %rax
mulq (%rsi,%r10,8)
addq %r9, %rax
movq %rdx, %r9
adcq $0x0, %r9
addq %rax, (%rdi,%r10,8)
adcq $0x0, %r9
incq %r10
jmp 0x78446
movq %r9, %rax
retq
|
mp_add_mul1:
mov r8, rdx
xor r9d, r9d
xor r10d, r10d
loc_78446:
cmp r8, r10
jz short loc_78469
mov rax, rcx
mul qword ptr [rsi+r10*8]
add rax, r9
mov r9, rdx
adc r9, 0
add [rdi+r10*8], rax
adc r9, 0
inc r10
jmp short loc_78446
loc_78469:
mov rax, r9
retn
|
unsigned long long mp_add_mul1(long long a1, long long a2, long long a3, unsigned long long a4)
{
unsigned long long v4; // r9
long long i; // r10
long long v6; // r9
unsigned long long v7; // kr10_8
bool v8; // cf
v4 = 0LL;
for ( i = 0LL; a3 != i; ++i )
{
v7 = *(_QWORD *)(a2 + 8 * i) * a4 + v4;
v6 = (*(unsigned long long *)(a2 + 8 * i) * (unsigned __int128)a4 + v4) >> 64;
v8 = __CFADD__(v7, *(_QWORD *)(a1 + 8 * i));
*(_QWORD *)(a1 + 8 * i) += v7;
v4 = v8 + v6;
}
return v4;
}
|
mp_add_mul1:
MOV R8,RDX
XOR R9D,R9D
XOR R10D,R10D
LAB_00178446:
CMP R8,R10
JZ 0x00178469
MOV RAX,RCX
MUL qword ptr [RSI + R10*0x8]
ADD RAX,R9
MOV R9,RDX
ADC R9,0x0
ADD qword ptr [RDI + R10*0x8],RAX
ADC R9,0x0
INC R10
JMP 0x00178446
LAB_00178469:
MOV RAX,R9
RET
|
ulong mp_add_mul1(long param_1,long param_2,long param_3,ulong param_4)
{
ulong *puVar1;
int1 auVar2 [16];
int1 auVar3 [16];
int1 auVar4 [16];
ulong uVar5;
ulong uVar6;
long lVar7;
uVar6 = 0;
for (lVar7 = 0; auVar4._8_8_ = 0, auVar4._0_8_ = uVar6, param_3 != lVar7; lVar7 = lVar7 + 1) {
auVar2._8_8_ = 0;
auVar2._0_8_ = param_4;
auVar3._8_8_ = 0;
auVar3._0_8_ = *(ulong *)(param_2 + lVar7 * 8);
auVar4 = auVar2 * auVar3 + auVar4;
uVar5 = auVar4._0_8_;
puVar1 = (ulong *)(param_1 + lVar7 * 8);
uVar6 = *puVar1;
*puVar1 = *puVar1 + uVar5;
uVar6 = auVar4._8_8_ + (ulong)CARRY8(uVar6,uVar5);
}
return uVar6;
}
|
|
7,643 |
my_open
|
eloqsql/mysys/my_open.c
|
File my_open(const char *FileName, int Flags, myf MyFlags)
/* Path-name of file */
/* Read | write .. */
/* Special flags */
{
File fd;
DBUG_ENTER("my_open");
DBUG_PRINT("my",("Name: '%s' Flags: %d MyFlags: %lu",
FileName, Flags, MyFlags));
if (!(MyFlags & (MY_WME | MY_FAE | MY_FFNF)))
MyFlags|= my_global_flags;
#if defined(_WIN32)
fd= my_win_open(FileName, Flags);
#else
if (MyFlags & MY_NOSYMLINKS)
fd = open_nosymlinks(FileName, Flags | O_CLOEXEC, my_umask);
else
fd = open(FileName, Flags | O_CLOEXEC, my_umask);
#endif
fd= my_register_filename(fd, FileName, FILE_BY_OPEN,
EE_FILENOTFOUND, MyFlags);
DBUG_RETURN(fd);
}
|
O0
|
c
|
my_open:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
jmp 0x7db25
movq -0x18(%rbp), %rax
andq $0x19, %rax
cmpq $0x0, %rax
jne 0x7db45
leaq 0x3781ae(%rip), %rax # 0x3f5ce8
movq (%rax), %rax
orq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
andq $0x200, %rax # imm = 0x200
cmpq $0x0, %rax
je 0x7db75
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
orl $0x80000, %esi # imm = 0x80000
leaq 0x1b61cf(%rip), %rax # 0x233d38
movl (%rax), %edx
callq 0x7dbd0
movl %eax, -0x1c(%rbp)
jmp 0x7db95
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
orl $0x80000, %esi # imm = 0x80000
leaq 0x1b61af(%rip), %rax # 0x233d38
movl (%rax), %edx
movb $0x0, %al
callq 0x36be0
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %edi
movq -0x8(%rbp), %rsi
movq -0x18(%rbp), %r8
movl $0x1, %edx
movl $0x1d, %ecx
callq 0x7dc40
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_open:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
jmp short $+2
loc_7DB25:
mov rax, [rbp+var_18]
and rax, 19h
cmp rax, 0
jnz short loc_7DB45
lea rax, my_global_flags
mov rax, [rax]
or rax, [rbp+var_18]
mov [rbp+var_18], rax
loc_7DB45:
mov rax, [rbp+var_18]
and rax, 200h
cmp rax, 0
jz short loc_7DB75
mov rdi, [rbp+var_8]
mov esi, [rbp+var_C]
or esi, 80000h
lea rax, my_umask
mov edx, [rax]
call open_nosymlinks
mov [rbp+var_1C], eax
jmp short loc_7DB95
loc_7DB75:
mov rdi, [rbp+var_8]
mov esi, [rbp+var_C]
or esi, 80000h
lea rax, my_umask
mov edx, [rax]
mov al, 0
call _open64
mov [rbp+var_1C], eax
loc_7DB95:
mov edi, [rbp+var_1C]
mov rsi, [rbp+var_8]
mov r8, [rbp+var_18]
mov edx, 1
mov ecx, 1Dh
call my_register_filename
mov [rbp+var_1C], eax
mov eax, [rbp+var_1C]
mov [rbp+var_20], eax
mov eax, [rbp+var_20]
add rsp, 20h
pop rbp
retn
|
long long my_open(long long a1, int a2, long long a3)
{
unsigned int v4; // [rsp+4h] [rbp-1Ch]
long long v5; // [rsp+8h] [rbp-18h]
v5 = a3;
if ( (a3 & 0x19) == 0 )
v5 = a3 | my_global_flags;
if ( (v5 & 0x200) != 0 )
v4 = open_nosymlinks(a1, a2 | 0x80000u, my_umask);
else
v4 = open64(a1, a2 | 0x80000u, my_umask);
return (unsigned int)my_register_filename(v4, a1, 1LL, 29LL, v5);
}
|
my_open:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV qword ptr [RBP + -0x18],RDX
JMP 0x0017db25
LAB_0017db25:
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0x19
CMP RAX,0x0
JNZ 0x0017db45
LEA RAX,[0x4f5ce8]
MOV RAX,qword ptr [RAX]
OR RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x18],RAX
LAB_0017db45:
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0x200
CMP RAX,0x0
JZ 0x0017db75
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0xc]
OR ESI,0x80000
LEA RAX,[0x333d38]
MOV EDX,dword ptr [RAX]
CALL 0x0017dbd0
MOV dword ptr [RBP + -0x1c],EAX
JMP 0x0017db95
LAB_0017db75:
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0xc]
OR ESI,0x80000
LEA RAX,[0x333d38]
MOV EDX,dword ptr [RAX]
MOV AL,0x0
CALL 0x00136be0
MOV dword ptr [RBP + -0x1c],EAX
LAB_0017db95:
MOV EDI,dword ptr [RBP + -0x1c]
MOV RSI,qword ptr [RBP + -0x8]
MOV R8,qword ptr [RBP + -0x18]
MOV EDX,0x1
MOV ECX,0x1d
CALL 0x0017dc40
MOV dword ptr [RBP + -0x1c],EAX
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x20],EAX
MOV EAX,dword ptr [RBP + -0x20]
ADD RSP,0x20
POP RBP
RET
|
int4 my_open(char *param_1,uint param_2,ulong param_3)
{
int4 uVar1;
int4 local_24;
int8 local_20;
local_20 = param_3;
if ((param_3 & 0x19) == 0) {
local_20 = my_global_flags | param_3;
}
if ((local_20 & 0x200) == 0) {
local_24 = open64(param_1,param_2 | 0x80000,(ulong)my_umask);
}
else {
local_24 = open_nosymlinks(param_1,param_2 | 0x80000,my_umask);
}
uVar1 = my_register_filename(local_24,param_1,1,0x1d,local_20);
return uVar1;
}
|
|
7,644 |
start_of_next_entry
|
eloqsql/storage/maria/ma_blockrec.c
|
static inline uint start_of_next_entry(uchar *dir)
{
uchar *prev;
/*
Find previous used entry. (There is always a previous entry as
the directory never starts with a deleted entry)
*/
for (prev= dir - DIR_ENTRY_SIZE ;
prev[0] == 0 && prev[1] == 0 ;
prev-= DIR_ENTRY_SIZE)
{}
return (uint) uint2korr(prev);
}
|
O0
|
c
|
start_of_next_entry:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $-0x4, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movzbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x11(%rbp)
jne 0x5c9a6
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x0, %eax
sete %al
movb %al, -0x11(%rbp)
movb -0x11(%rbp), %al
testb $0x1, %al
jne 0x5c9af
jmp 0x5c9bf
jmp 0x5c9b1
movq -0x10(%rbp), %rax
addq $-0x4, %rax
movq %rax, -0x10(%rbp)
jmp 0x5c984
movq -0x10(%rbp), %rax
movzwl (%rax), %eax
popq %rbp
retq
nopl (%rax,%rax)
|
start_of_next_entry:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
add rax, 0FFFFFFFFFFFFFFFCh
mov [rbp+var_10], rax
loc_5C984:
mov rax, [rbp+var_10]
movzx ecx, byte ptr [rax]
xor eax, eax
cmp ecx, 0
mov [rbp+var_11], al
jnz short loc_5C9A6
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax+1]
cmp eax, 0
setz al
mov [rbp+var_11], al
loc_5C9A6:
mov al, [rbp+var_11]
test al, 1
jnz short loc_5C9AF
jmp short loc_5C9BF
loc_5C9AF:
jmp short $+2
loc_5C9B1:
mov rax, [rbp+var_10]
add rax, 0FFFFFFFFFFFFFFFCh
mov [rbp+var_10], rax
jmp short loc_5C984
loc_5C9BF:
mov rax, [rbp+var_10]
movzx eax, word ptr [rax]
pop rbp
retn
|
long long start_of_next_entry(long long a1)
{
bool v2; // [rsp+1h] [rbp-11h]
_BYTE *i; // [rsp+2h] [rbp-10h]
for ( i = (_BYTE *)(a1 - 4); ; i -= 4 )
{
v2 = 0;
if ( !*i )
v2 = i[1] == 0;
if ( !v2 )
break;
}
return *(unsigned __int16 *)i;
}
|
start_of_next_entry:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,-0x4
MOV qword ptr [RBP + -0x10],RAX
LAB_0015c984:
MOV RAX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RAX]
XOR EAX,EAX
CMP ECX,0x0
MOV byte ptr [RBP + -0x11],AL
JNZ 0x0015c9a6
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x0
SETZ AL
MOV byte ptr [RBP + -0x11],AL
LAB_0015c9a6:
MOV AL,byte ptr [RBP + -0x11]
TEST AL,0x1
JNZ 0x0015c9af
JMP 0x0015c9bf
LAB_0015c9af:
JMP 0x0015c9b1
LAB_0015c9b1:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,-0x4
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0015c984
LAB_0015c9bf:
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,word ptr [RAX]
POP RBP
RET
|
int2 start_of_next_entry(long param_1)
{
bool bVar1;
char *local_18;
local_18 = (char *)(param_1 + -4);
while( true ) {
bVar1 = false;
if (*local_18 == '\0') {
bVar1 = local_18[1] == '\0';
}
if (!bVar1) break;
local_18 = local_18 + -4;
}
return *(int2 *)local_18;
}
|
|
7,645 |
my_strnxfrm_czech
|
eloqsql/strings/ctype-czech.c
|
static size_t
my_strnxfrm_czech(CHARSET_INFO *cs __attribute__((unused)),
uchar *dest, size_t len,
uint nweights_arg __attribute__((unused)),
const uchar *src, size_t srclen, uint flags)
{
int value;
const uchar *p, * store;
int pass = 0;
size_t totlen = 0;
p = src; store = src;
if (!(flags & 0x0F)) /* All levels by default */
flags|= 0x0F;
do
{
int add= (1 << pass) & flags; /* If this level is needed */
NEXT_CMP_VALUE(src, p, store, pass, value, (int)srclen);
if (add)
ADD_TO_RESULT(dest, len, totlen, value);
}
while (value);
if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && len > totlen)
{
memset(dest + totlen, ' ', len - totlen);
totlen= len;
}
return totlen;
}
|
O0
|
c
|
my_strnxfrm_czech:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movl $0x0, -0x4c(%rbp)
movq $0x0, -0x58(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
movl 0x10(%rbp), %eax
andl $0xf, %eax
cmpl $0x0, %eax
jne 0x10fc08
movl 0x10(%rbp), %eax
orl $0xf, %eax
movl %eax, 0x10(%rbp)
jmp 0x10fc0a
movl -0x4c(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
andl 0x10(%rbp), %eax
movl %eax, -0x5c(%rbp)
movq -0x40(%rbp), %rax
movq -0x28(%rbp), %rcx
subq %rcx, %rax
movq -0x30(%rbp), %rcx
movslq %ecx, %rcx
cmpq %rcx, %rax
jl 0x10fc7d
movl $0x0, -0x34(%rbp)
cmpl $0x3, -0x4c(%rbp)
je 0x10fc78
movl -0x4c(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x4c(%rbp)
cmpl $0x0, %eax
jne 0x10fc5b
movq -0x48(%rbp), %rax
movq %rax, -0x98(%rbp)
jmp 0x10fc66
movq -0x28(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
movq %rax, -0x40(%rbp)
movl $0x1, -0x34(%rbp)
jmp 0x10fed7
movslq -0x4c(%rbp), %rcx
leaq 0x1a5768(%rip), %rax # 0x2b53f0
movq (%rax,%rcx,8), %rax
movq -0x40(%rbp), %rcx
movzbl (%rcx), %ecx
movzbl (%rax,%rcx), %eax
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
jne 0x10fcb1
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x10fc1a
cmpl $0x2, -0x34(%rbp)
jne 0x10fdbd
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rcx
movq -0x28(%rbp), %rax
subq %rax, %rcx
movq -0x30(%rbp), %rax
movslq %eax, %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, -0x99(%rbp)
jge 0x10fd10
movslq -0x4c(%rbp), %rcx
leaq 0x1a56fb(%rip), %rax # 0x2b53f0
movq (%rax,%rcx,8), %rax
movq -0x70(%rbp), %rcx
movzbl (%rcx), %ecx
movzbl (%rax,%rcx), %eax
cmpl $0x2, %eax
sete %al
movb %al, -0x99(%rbp)
movb -0x99(%rbp), %al
testb $0x1, %al
jne 0x10fd1c
jmp 0x10fd2a
movq -0x70(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x70(%rbp)
jmp 0x10fccb
movq -0x70(%rbp), %rax
movq -0x28(%rbp), %rcx
subq %rcx, %rax
movq -0x30(%rbp), %rcx
movslq %ecx, %rcx
cmpq %rcx, %rax
jl 0x10fd49
movq -0x70(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpl $0x2, -0x4c(%rbp)
jg 0x10fd6e
movq -0x70(%rbp), %rax
movq -0x28(%rbp), %rcx
subq %rcx, %rax
movq -0x30(%rbp), %rcx
movslq %ecx, %rcx
cmpq %rcx, %rax
jge 0x10fd6e
movq -0x70(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq -0x28(%rbp), %rcx
subq %rcx, %rax
movq -0x30(%rbp), %rcx
movslq %ecx, %rcx
cmpq %rcx, %rax
jl 0x10fd8a
jmp 0x10fc1a
cmpl $0x1, -0x4c(%rbp)
jle 0x10fd95
jmp 0x10fed7
movq -0x40(%rbp), %rax
movq %rax, -0x68(%rbp)
movl $0x1, %eax
subl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x10fed7
cmpl $0xff, -0x34(%rbp)
jne 0x10fecb
movl $0x0, -0x74(%rbp)
cmpl $0x50, -0x74(%rbp)
jge 0x10fec9
movslq -0x74(%rbp), %rcx
leaq 0x1a562a(%rip), %rax # 0x2b5410
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0x80(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x88(%rbp)
movl $0x0, -0x8c(%rbp)
movq -0x80(%rbp), %rax
movslq -0x8c(%rbp), %rcx
cmpb $0x0, (%rax,%rcx)
je 0x10fe76
movq -0x88(%rbp), %rax
movq -0x28(%rbp), %rcx
subq %rcx, %rax
movq -0x30(%rbp), %rcx
movslq %ecx, %rcx
cmpq %rcx, %rax
jge 0x10fe51
movq -0x88(%rbp), %rax
movsbl (%rax), %eax
movq -0x80(%rbp), %rcx
movslq -0x8c(%rbp), %rdx
movsbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
je 0x10fe53
jmp 0x10fe76
movl -0x8c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8c(%rbp)
movq -0x88(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x88(%rbp)
jmp 0x10fe09
movq -0x80(%rbp), %rax
movslq -0x8c(%rbp), %rcx
cmpb $0x0, (%rax,%rcx)
jne 0x10feb9
movslq -0x74(%rbp), %rcx
leaq 0x1a557e(%rip), %rax # 0x2b5410
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movslq -0x4c(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x34(%rbp)
movq -0x88(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x10fec9
jmp 0x10febb
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
jmp 0x10fdd1
jmp 0x10fecb
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
cmpl $0x0, -0x5c(%rbp)
je 0x10ff04
movq -0x58(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x10ff02
movl -0x34(%rbp), %eax
movb %al, %dl
movq -0x10(%rbp), %rax
movq -0x58(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0x58(%rbp)
movb %dl, (%rax,%rcx)
jmp 0x10ff04
jmp 0x10ff06
cmpl $0x0, -0x34(%rbp)
jne 0x10fc0a
movl 0x10(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x10ff49
movq -0x18(%rbp), %rax
cmpq -0x58(%rbp), %rax
jbe 0x10ff49
movq -0x10(%rbp), %rdi
addq -0x58(%rbp), %rdi
movq -0x18(%rbp), %rdx
subq -0x58(%rbp), %rdx
movl $0x20, %esi
callq 0x2a2c0
movq -0x18(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_strnxfrm_czech:
push rbp
mov rbp, rsp
sub rsp, 0A0h
mov eax, [rbp+arg_0]
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_1C], ecx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
mov [rbp+var_4C], 0
mov [rbp+var_58], 0
mov rax, [rbp+var_28]
mov [rbp+var_40], rax
mov rax, [rbp+var_28]
mov [rbp+var_48], rax
mov eax, [rbp+arg_0]
and eax, 0Fh
cmp eax, 0
jnz short loc_10FC08
mov eax, [rbp+arg_0]
or eax, 0Fh
mov [rbp+arg_0], eax
loc_10FC08:
jmp short $+2
loc_10FC0A:
mov ecx, [rbp+var_4C]
mov eax, 1
shl eax, cl
and eax, [rbp+arg_0]
mov [rbp+var_5C], eax
loc_10FC1A:
mov rax, [rbp+var_40]
mov rcx, [rbp+var_28]
sub rax, rcx
mov rcx, [rbp+var_30]
movsxd rcx, ecx
cmp rax, rcx
jl short loc_10FC7D
mov [rbp+var_34], 0
cmp [rbp+var_4C], 3
jz short loc_10FC78
mov eax, [rbp+var_4C]
mov ecx, eax
add ecx, 1
mov [rbp+var_4C], ecx
cmp eax, 0
jnz short loc_10FC5B
mov rax, [rbp+var_48]
mov [rbp+var_98], rax
jmp short loc_10FC66
loc_10FC5B:
mov rax, [rbp+var_28]
mov [rbp+var_98], rax
loc_10FC66:
mov rax, [rbp+var_98]
mov [rbp+var_40], rax
mov [rbp+var_34], 1
loc_10FC78:
jmp loc_10FED7
loc_10FC7D:
movsxd rcx, [rbp+var_4C]
lea rax, CZ_SORT_TABLE
mov rax, [rax+rcx*8]
mov rcx, [rbp+var_40]
movzx ecx, byte ptr [rcx]
movzx eax, byte ptr [rax+rcx]
mov [rbp+var_34], eax
cmp [rbp+var_34], 0
jnz short loc_10FCB1
mov rax, [rbp+var_40]
add rax, 1
mov [rbp+var_40], rax
jmp loc_10FC1A
loc_10FCB1:
cmp [rbp+var_34], 2
jnz loc_10FDBD
mov rax, [rbp+var_40]
add rax, 1
mov [rbp+var_40], rax
mov [rbp+var_70], rax
loc_10FCCB:
mov rcx, [rbp+var_70]
mov rax, [rbp+var_28]
sub rcx, rax
mov rax, [rbp+var_30]
movsxd rdx, eax
xor eax, eax
cmp rcx, rdx
mov [rbp+var_99], al
jge short loc_10FD10
movsxd rcx, [rbp+var_4C]
lea rax, CZ_SORT_TABLE
mov rax, [rax+rcx*8]
mov rcx, [rbp+var_70]
movzx ecx, byte ptr [rcx]
movzx eax, byte ptr [rax+rcx]
cmp eax, 2
setz al
mov [rbp+var_99], al
loc_10FD10:
mov al, [rbp+var_99]
test al, 1
jnz short loc_10FD1C
jmp short loc_10FD2A
loc_10FD1C:
mov rax, [rbp+var_70]
add rax, 1
mov [rbp+var_70], rax
jmp short loc_10FCCB
loc_10FD2A:
mov rax, [rbp+var_70]
mov rcx, [rbp+var_28]
sub rax, rcx
mov rcx, [rbp+var_30]
movsxd rcx, ecx
cmp rax, rcx
jl short loc_10FD49
mov rax, [rbp+var_70]
mov [rbp+var_40], rax
loc_10FD49:
cmp [rbp+var_4C], 2
jg short loc_10FD6E
mov rax, [rbp+var_70]
mov rcx, [rbp+var_28]
sub rax, rcx
mov rcx, [rbp+var_30]
movsxd rcx, ecx
cmp rax, rcx
jge short loc_10FD6E
mov rax, [rbp+var_70]
mov [rbp+var_40], rax
loc_10FD6E:
mov rax, [rbp+var_40]
mov rcx, [rbp+var_28]
sub rax, rcx
mov rcx, [rbp+var_30]
movsxd rcx, ecx
cmp rax, rcx
jl short loc_10FD8A
jmp loc_10FC1A
loc_10FD8A:
cmp [rbp+var_4C], 1
jle short loc_10FD95
jmp loc_10FED7
loc_10FD95:
mov rax, [rbp+var_40]
mov [rbp+var_68], rax
mov eax, 1
sub eax, [rbp+var_4C]
mov [rbp+var_4C], eax
mov rax, [rbp+var_48]
mov [rbp+var_40], rax
mov rax, [rbp+var_68]
mov [rbp+var_48], rax
jmp loc_10FED7
loc_10FDBD:
cmp [rbp+var_34], 0FFh
jnz loc_10FECB
mov [rbp+var_74], 0
loc_10FDD1:
cmp [rbp+var_74], 50h ; 'P'
jge loc_10FEC9
movsxd rcx, [rbp+var_74]
lea rax, doubles
shl rcx, 4
add rax, rcx
mov rax, [rax]
mov [rbp+var_80], rax
mov rax, [rbp+var_40]
mov [rbp+var_88], rax
mov [rbp+var_8C], 0
loc_10FE09:
mov rax, [rbp+var_80]
movsxd rcx, [rbp+var_8C]
cmp byte ptr [rax+rcx], 0
jz short loc_10FE76
mov rax, [rbp+var_88]
mov rcx, [rbp+var_28]
sub rax, rcx
mov rcx, [rbp+var_30]
movsxd rcx, ecx
cmp rax, rcx
jge short loc_10FE51
mov rax, [rbp+var_88]
movsx eax, byte ptr [rax]
mov rcx, [rbp+var_80]
movsxd rdx, [rbp+var_8C]
movsx ecx, byte ptr [rcx+rdx]
cmp eax, ecx
jz short loc_10FE53
loc_10FE51:
jmp short loc_10FE76
loc_10FE53:
mov eax, [rbp+var_8C]
add eax, 1
mov [rbp+var_8C], eax
mov rax, [rbp+var_88]
add rax, 1
mov [rbp+var_88], rax
jmp short loc_10FE09
loc_10FE76:
mov rax, [rbp+var_80]
movsxd rcx, [rbp+var_8C]
cmp byte ptr [rax+rcx], 0
jnz short loc_10FEB9
movsxd rcx, [rbp+var_74]
lea rax, doubles
shl rcx, 4
add rax, rcx
mov rax, [rax+8]
movsxd rcx, [rbp+var_4C]
movzx eax, byte ptr [rax+rcx]
mov [rbp+var_34], eax
mov rax, [rbp+var_88]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_40], rax
jmp short loc_10FEC9
loc_10FEB9:
jmp short $+2
loc_10FEBB:
mov eax, [rbp+var_74]
add eax, 1
mov [rbp+var_74], eax
jmp loc_10FDD1
loc_10FEC9:
jmp short $+2
loc_10FECB:
mov rax, [rbp+var_40]
add rax, 1
mov [rbp+var_40], rax
loc_10FED7:
cmp [rbp+var_5C], 0
jz short loc_10FF04
mov rax, [rbp+var_58]
cmp rax, [rbp+var_18]
jnb short loc_10FF02
mov eax, [rbp+var_34]
mov dl, al
mov rax, [rbp+var_10]
mov rcx, [rbp+var_58]
mov rsi, rcx
add rsi, 1
mov [rbp+var_58], rsi
mov [rax+rcx], dl
loc_10FF02:
jmp short $+2
loc_10FF04:
jmp short $+2
loc_10FF06:
cmp [rbp+var_34], 0
jnz loc_10FC0A
mov eax, [rbp+arg_0]
and eax, 80h
cmp eax, 0
jz short loc_10FF49
mov rax, [rbp+var_18]
cmp rax, [rbp+var_58]
jbe short loc_10FF49
mov rdi, [rbp+var_10]
add rdi, [rbp+var_58]
mov rdx, [rbp+var_18]
sub rdx, [rbp+var_58]
mov esi, 20h ; ' '
call _memset
mov rax, [rbp+var_18]
mov [rbp+var_58], rax
loc_10FF49:
mov rax, [rbp+var_58]
add rsp, 0A0h
pop rbp
retn
|
unsigned long long my_strnxfrm_czech(
long long a1,
long long a2,
unsigned long long a3,
long long a4,
char *a5,
int a6,
int a7)
{
long long v8; // rcx
long long v9; // rcx
bool v11; // [rsp+7h] [rbp-99h]
char *v12; // [rsp+8h] [rbp-98h]
int k; // [rsp+14h] [rbp-8Ch]
char *v14; // [rsp+18h] [rbp-88h]
long long v15; // [rsp+20h] [rbp-80h]
int j; // [rsp+2Ch] [rbp-74h]
unsigned __int8 *i; // [rsp+30h] [rbp-70h]
char *v18; // [rsp+38h] [rbp-68h]
int v19; // [rsp+44h] [rbp-5Ch]
unsigned long long v20; // [rsp+48h] [rbp-58h]
int v21; // [rsp+54h] [rbp-4Ch]
char *v22; // [rsp+58h] [rbp-48h]
char *v23; // [rsp+60h] [rbp-40h]
int v24; // [rsp+6Ch] [rbp-34h]
v21 = 0;
v20 = 0LL;
v23 = a5;
v22 = a5;
if ( (a7 & 0xF) == 0 )
a7 |= 0xFu;
do
{
v19 = a7 & (1 << v21);
while ( 1 )
{
while ( 1 )
{
if ( v23 - a5 >= a6 )
{
v24 = 0;
if ( v21 != 3 )
{
if ( v21++ )
v12 = a5;
else
v12 = v22;
v23 = v12;
v24 = 1;
}
goto LABEL_40;
}
v8 = (unsigned __int8)*v23;
v24 = *((unsigned __int8 *)*(&CZ_SORT_TABLE + v21) + v8);
if ( *((_BYTE *)*(&CZ_SORT_TABLE + v21) + v8) )
break;
++v23;
}
if ( v24 != 2 )
break;
for ( i = (unsigned __int8 *)++v23; ; ++i )
{
v11 = 0;
if ( i - (unsigned __int8 *)a5 < a6 )
v11 = *((_BYTE *)*(&CZ_SORT_TABLE + v21) + *i) == 2;
if ( !v11 )
break;
}
if ( i - (unsigned __int8 *)a5 >= a6 )
v23 = (char *)i;
if ( v21 <= 2 && i - (unsigned __int8 *)a5 < a6 )
v23 = (char *)i;
if ( v23 - a5 < a6 )
{
if ( v21 <= 1 )
{
v18 = v23;
v21 = 1 - v21;
v23 = v22;
v22 = v18;
}
goto LABEL_40;
}
}
if ( v24 == 255 )
{
for ( j = 0; j < 80; ++j )
{
v15 = (long long)*(&doubles + 2 * j);
v14 = v23;
for ( k = 0; *(_BYTE *)(v15 + k) && v14 - a5 < a6 && *v14 == *(char *)(v15 + k); ++k )
++v14;
if ( !*(_BYTE *)(v15 + k) )
{
v24 = *((unsigned __int8 *)*(&doubles + 2 * j + 1) + v21);
v23 = v14 - 1;
break;
}
}
}
++v23;
LABEL_40:
if ( v19 && v20 < a3 )
{
v9 = v20++;
*(_BYTE *)(a2 + v9) = v24;
}
}
while ( v24 );
if ( (a7 & 0x80) != 0 && a3 > v20 )
{
memset(v20 + a2, 32LL, a3 - v20);
return a3;
}
return v20;
}
| |||
7,646 |
my_strnxfrm_czech
|
eloqsql/strings/ctype-czech.c
|
static size_t
my_strnxfrm_czech(CHARSET_INFO *cs __attribute__((unused)),
uchar *dest, size_t len,
uint nweights_arg __attribute__((unused)),
const uchar *src, size_t srclen, uint flags)
{
int value;
const uchar *p, * store;
int pass = 0;
size_t totlen = 0;
p = src; store = src;
if (!(flags & 0x0F)) /* All levels by default */
flags|= 0x0F;
do
{
int add= (1 << pass) & flags; /* If this level is needed */
NEXT_CMP_VALUE(src, p, store, pass, value, (int)srclen);
if (add)
ADD_TO_RESULT(dest, len, totlen, value);
}
while (value);
if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && len > totlen)
{
memset(dest + totlen, ' ', len - totlen);
totlen= len;
}
return totlen;
}
|
O3
|
c
|
my_strnxfrm_czech:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, %r15
movq %rdx, %rbx
movq %rsi, -0x48(%rbp)
movl 0x10(%rbp), %eax
movl %eax, %r11d
orl $0xf, %r11d
testb $0xf, %al
cmovnel %eax, %r11d
movslq %r9d, %rdx
movl $0x1, %eax
subq %r8, %rax
movq %rax, -0x50(%rbp)
xorl %ecx, %ecx
leaq 0x2ce168(%rip), %r13 # 0x37c310
movq %r8, %r14
xorl %r12d, %r12d
movq %rbx, -0x38(%rbp)
movl %r11d, -0x2c(%rbp)
movl $0x1, %esi
shll %cl, %esi
movq %r8, %rax
subq %r15, %rax
cmpq %rdx, %rax
jge 0xae247
movslq %ecx, %rax
movq %rax, -0x58(%rbp)
movq (%r13,%rax,8), %r9
movzbl (%r8), %eax
movzbl (%r9,%rax), %eax
testl %eax, %eax
je 0xae216
cmpl $0x2, %eax
jne 0xae27b
incq %r8
movq %r8, %rax
subq %r15, %rax
movq %r8, %r10
cmpq %rdx, %rax
jge 0xae224
movzbl (%r10), %edi
cmpb $0x2, (%r9,%rdi)
jne 0xae224
incq %r10
incq %rax
movq %r10, %rdi
cmpq %rdx, %rax
jl 0xae1fb
jmp 0xae227
incq %r8
movq %r8, %rax
subq %r15, %rax
movq %r8, %r10
jmp 0xae240
movq %r8, %rdi
cmpl $0x3, %ecx
cmovgeq %rdi, %r10
movq %r10, %rax
subq %r15, %rax
cmpq %rdx, %rax
jl 0xae2fc
movq %r10, %r8
cmpq %rdx, %rax
jl 0xae1d4
jmp 0xae24a
movq %r8, %r10
cmpl $0x3, %ecx
jne 0xae262
xorl %r9d, %r9d
movl $0x3, %ecx
movq %r14, %rax
movq %r10, %r8
jmp 0xae354
testl %ecx, %ecx
movq %r15, %r8
cmoveq %r14, %r8
incl %ecx
movl $0x1, %r9d
movq %r14, %rax
jmp 0xae354
cmpl $0xff, %eax
jne 0xae34a
movq %r12, -0x40(%rbp)
movq %r8, %r9
subq %r15, %r9
movq -0x50(%rbp), %rax
addq %r8, %rax
movq %rax, -0x60(%rbp)
xorl %ebx, %ebx
movq %rbx, %r11
shlq $0x4, %r11
leaq 0x2ce085(%rip), %rax # 0x37c330
movq (%r11,%rax), %r13
movb (%r13), %al
testb %al, %al
je 0xae2e8
cmpq %rdx, %r9
jge 0xae2e8
incq %r13
movq -0x60(%rbp), %r10
movq %r8, %r12
cmpb %al, (%r12)
jne 0xae2ef
incq %r12
movb (%r13), %al
testb %al, %al
je 0xae2eb
incq %r13
leaq 0x1(%r10), %rdi
cmpq %rdx, %r10
movq %rdi, %r10
jl 0xae2c6
jmp 0xae2eb
movq %r8, %r12
testb %al, %al
je 0xae31c
incq %rbx
cmpq $0x50, %rbx
jne 0xae29d
movb $-0x1, %al
jmp 0xae337
movl $0x2, %r9d
cmpl $0x1, %ecx
jg 0xae257
movl $0x1, %edi
subl %ecx, %edi
movq %r10, %rax
movl %edi, %ecx
movq %r14, %r8
jmp 0xae354
leaq 0x2ce00d(%rip), %rax # 0x37c330
addq %rax, %r11
movq 0x8(%r11), %rax
movq -0x58(%rbp), %rdi
movb (%rax,%rdi), %al
decq %r12
movq %r12, %r8
movq -0x38(%rbp), %rbx
movl -0x2c(%rbp), %r11d
movq -0x40(%rbp), %r12
leaq 0x2cdfc6(%rip), %r13 # 0x37c310
movzbl %al, %r9d
incq %r8
movq %r14, %rax
testl %r11d, %esi
setne %r10b
cmpq %rbx, %r12
setb %dil
andb %r10b, %dil
cmpb $0x1, %dil
jne 0xae376
movq -0x48(%rbp), %rsi
movb %r9b, (%rsi,%r12)
incq %r12
movq %rax, %r14
testl %r9d, %r9d
jne 0xae1b6
testb %r11b, %r11b
sets %al
movq %rbx, %rdx
subq %r12, %rdx
seta %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0xae3ab
movq -0x48(%rbp), %rdi
addq %r12, %rdi
movl $0x20, %esi
callq 0x292c0
jmp 0xae3ae
movq %r12, %rbx
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
my_strnxfrm_czech:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r15, r8
mov rbx, rdx
mov [rbp+var_48], rsi
mov eax, [rbp+arg_0]
mov r11d, eax
or r11d, 0Fh
test al, 0Fh
cmovnz r11d, eax
movsxd rdx, r9d
mov eax, 1
sub rax, r8
mov [rbp+var_50], rax
xor ecx, ecx
lea r13, CZ_SORT_TABLE
mov r14, r8
xor r12d, r12d
mov [rbp+var_38], rbx
mov [rbp+var_2C], r11d
loc_AE1B6:
mov esi, 1
shl esi, cl
mov rax, r8
sub rax, r15
cmp rax, rdx
jge short loc_AE247
movsxd rax, ecx
mov [rbp+var_58], rax
mov r9, [r13+rax*8+0]
loc_AE1D4:
movzx eax, byte ptr [r8]
movzx eax, byte ptr [r9+rax]
test eax, eax
jz short loc_AE216
cmp eax, 2
jnz loc_AE27B
inc r8
mov rax, r8
sub rax, r15
mov r10, r8
cmp rax, rdx
jge short loc_AE224
loc_AE1FB:
movzx edi, byte ptr [r10]
cmp byte ptr [r9+rdi], 2
jnz short loc_AE224
inc r10
inc rax
mov rdi, r10
cmp rax, rdx
jl short loc_AE1FB
jmp short loc_AE227
loc_AE216:
inc r8
mov rax, r8
sub rax, r15
mov r10, r8
jmp short loc_AE240
loc_AE224:
mov rdi, r8
loc_AE227:
cmp ecx, 3
cmovge r10, rdi
mov rax, r10
sub rax, r15
cmp rax, rdx
jl loc_AE2FC
mov r8, r10
loc_AE240:
cmp rax, rdx
jl short loc_AE1D4
jmp short loc_AE24A
loc_AE247:
mov r10, r8
loc_AE24A:
cmp ecx, 3
jnz short loc_AE262
xor r9d, r9d
mov ecx, 3
loc_AE257:
mov rax, r14
mov r8, r10
jmp loc_AE354
loc_AE262:
test ecx, ecx
mov r8, r15
cmovz r8, r14
inc ecx
mov r9d, 1
mov rax, r14
jmp loc_AE354
loc_AE27B:
cmp eax, 0FFh
jnz loc_AE34A
mov [rbp+var_40], r12
mov r9, r8
sub r9, r15
mov rax, [rbp+var_50]
add rax, r8
mov [rbp+var_60], rax
xor ebx, ebx
loc_AE29D:
mov r11, rbx
shl r11, 4
lea rax, doubles
mov r13, [r11+rax]
mov al, [r13+0]
test al, al
jz short loc_AE2E8
cmp r9, rdx
jge short loc_AE2E8
inc r13
mov r10, [rbp+var_60]
mov r12, r8
loc_AE2C6:
cmp [r12], al
jnz short loc_AE2EF
inc r12
mov al, [r13+0]
test al, al
jz short loc_AE2EB
inc r13
lea rdi, [r10+1]
cmp r10, rdx
mov r10, rdi
jl short loc_AE2C6
jmp short loc_AE2EB
loc_AE2E8:
mov r12, r8
loc_AE2EB:
test al, al
jz short loc_AE31C
loc_AE2EF:
inc rbx
cmp rbx, 50h ; 'P'
jnz short loc_AE29D
mov al, 0FFh
jmp short loc_AE337
loc_AE2FC:
mov r9d, 2
cmp ecx, 1
jg loc_AE257
mov edi, 1
sub edi, ecx
mov rax, r10
mov ecx, edi
mov r8, r14
jmp short loc_AE354
loc_AE31C:
lea rax, doubles
add r11, rax
mov rax, [r11+8]
mov rdi, [rbp+var_58]
mov al, [rax+rdi]
dec r12
mov r8, r12
loc_AE337:
mov rbx, [rbp+var_38]
mov r11d, [rbp+var_2C]
mov r12, [rbp+var_40]
lea r13, CZ_SORT_TABLE
loc_AE34A:
movzx r9d, al
inc r8
mov rax, r14
loc_AE354:
test esi, r11d
setnz r10b
cmp r12, rbx
setb dil
and dil, r10b
cmp dil, 1
jnz short loc_AE376
mov rsi, [rbp+var_48]
mov [rsi+r12], r9b
inc r12
loc_AE376:
mov r14, rax
test r9d, r9d
jnz loc_AE1B6
test r11b, r11b
sets al
mov rdx, rbx
sub rdx, r12
setnbe cl
and cl, al
cmp cl, 1
jnz short loc_AE3AB
mov rdi, [rbp+var_48]
add rdi, r12
mov esi, 20h ; ' '
call _memset
jmp short loc_AE3AE
loc_AE3AB:
mov rbx, r12
loc_AE3AE:
mov rax, rbx
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
unsigned long long my_strnxfrm_czech(
long long a1,
long long a2,
unsigned long long a3,
long long a4,
unsigned __int8 *a5,
int a6,
int a7)
{
unsigned __int8 *v7; // r15
int v9; // r11d
long long v10; // rdx
int v11; // ecx
unsigned __int8 *v12; // r14
unsigned long long v13; // r12
int v14; // esi
long long v15; // r9
int v16; // eax
unsigned __int8 *v17; // r8
long long v18; // rax
unsigned __int8 *v19; // r10
unsigned __int8 *v20; // rdi
unsigned __int8 *v21; // rax
int v22; // r9d
unsigned __int8 *v23; // rax
long long v24; // rbx
char *v25; // r13
char v26; // al
char *v27; // r13
unsigned __int8 *v28; // r10
_BYTE *v29; // r12
long long v32; // [rsp+10h] [rbp-50h]
unsigned long long v34; // [rsp+20h] [rbp-40h]
unsigned long long v35; // [rsp+28h] [rbp-38h]
int v36; // [rsp+34h] [rbp-2Ch]
v7 = a5;
v9 = a7 | 0xF;
if ( (a7 & 0xF) != 0 )
v9 = a7;
v10 = a6;
v32 = 1LL - (_QWORD)a5;
v11 = 0;
v12 = a5;
v13 = 0LL;
v35 = a3;
v36 = v9;
do
{
v14 = 1 << v11;
if ( a5 - v7 >= v10 )
{
v19 = a5;
LABEL_21:
if ( v11 != 3 )
{
a5 = v7;
if ( !v11 )
a5 = v12;
++v11;
v22 = 1;
v23 = v12;
goto LABEL_45;
}
v22 = 0;
v11 = 3;
LABEL_23:
v23 = v12;
a5 = v19;
goto LABEL_45;
}
v15 = (long long)*(&CZ_SORT_TABLE + v11);
while ( 1 )
{
v16 = *(unsigned __int8 *)(v15 + *a5);
if ( !*(_BYTE *)(v15 + *a5) )
{
v21 = (unsigned __int8 *)(++a5 - v7);
v19 = a5;
goto LABEL_18;
}
if ( v16 != 2 )
break;
v17 = a5 + 1;
v18 = v17 - v7;
v19 = v17;
if ( v17 - v7 < v10 )
{
while ( *(_BYTE *)(v15 + *v19) == 2 )
{
++v19;
++v18;
v20 = v19;
if ( v18 >= v10 )
goto LABEL_14;
}
}
v20 = v17;
LABEL_14:
if ( v11 >= 3 )
v19 = v20;
v21 = (unsigned __int8 *)(v19 - v7);
if ( v19 - v7 < v10 )
{
v22 = 2;
if ( v11 <= 1 )
{
v23 = v19;
v11 = 1 - v11;
a5 = v12;
goto LABEL_45;
}
goto LABEL_23;
}
a5 = v19;
LABEL_18:
if ( (long long)v21 >= v10 )
goto LABEL_21;
}
if ( v16 != 255 )
goto LABEL_44;
v34 = v13;
v24 = 0LL;
while ( 2 )
{
v25 = (char *)*(&doubles + 2 * v24);
v26 = *v25;
if ( *v25 && a5 - v7 < v10 )
{
v27 = v25 + 1;
v28 = &a5[v32];
v29 = a5;
while ( *v29 == v26 )
{
++v29;
v26 = *v27;
if ( *v27 )
{
++v27;
if ( (long long)v28++ < v10 )
continue;
}
goto LABEL_37;
}
goto LABEL_38;
}
v29 = a5;
LABEL_37:
if ( v26 )
{
LABEL_38:
if ( ++v24 == 80 )
{
LOBYTE(v16) = -1;
goto LABEL_43;
}
continue;
}
break;
}
LOBYTE(v16) = *((_BYTE *)*(&doubles + 2 * v24 + 1) + v11);
a5 = v29 - 1;
LABEL_43:
a3 = v35;
v9 = v36;
v13 = v34;
LABEL_44:
v22 = (unsigned __int8)v16;
++a5;
v23 = v12;
LABEL_45:
if ( (v9 & v14) != 0 && v13 < a3 )
*(_BYTE *)(a2 + v13++) = v22;
v12 = v23;
}
while ( v22 );
if ( (v9 & 0x80u) == 0 || a3 <= v13 )
return v13;
memset(v13 + a2, 32LL, a3 - v13);
return a3;
}
|
my_strnxfrm_czech:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R15,R8
MOV RBX,RDX
MOV qword ptr [RBP + -0x48],RSI
MOV EAX,dword ptr [RBP + 0x10]
MOV R11D,EAX
OR R11D,0xf
TEST AL,0xf
CMOVNZ R11D,EAX
MOVSXD RDX,R9D
MOV EAX,0x1
SUB RAX,R8
MOV qword ptr [RBP + -0x50],RAX
XOR ECX,ECX
LEA R13,[0x47c310]
MOV R14,R8
XOR R12D,R12D
MOV qword ptr [RBP + -0x38],RBX
MOV dword ptr [RBP + -0x2c],R11D
LAB_001ae1b6:
MOV ESI,0x1
SHL ESI,CL
MOV RAX,R8
SUB RAX,R15
CMP RAX,RDX
JGE 0x001ae247
MOVSXD RAX,ECX
MOV qword ptr [RBP + -0x58],RAX
MOV R9,qword ptr [R13 + RAX*0x8]
LAB_001ae1d4:
MOVZX EAX,byte ptr [R8]
MOVZX EAX,byte ptr [R9 + RAX*0x1]
TEST EAX,EAX
JZ 0x001ae216
CMP EAX,0x2
JNZ 0x001ae27b
INC R8
MOV RAX,R8
SUB RAX,R15
MOV R10,R8
CMP RAX,RDX
JGE 0x001ae224
LAB_001ae1fb:
MOVZX EDI,byte ptr [R10]
CMP byte ptr [R9 + RDI*0x1],0x2
JNZ 0x001ae224
INC R10
INC RAX
MOV RDI,R10
CMP RAX,RDX
JL 0x001ae1fb
JMP 0x001ae227
LAB_001ae216:
INC R8
MOV RAX,R8
SUB RAX,R15
MOV R10,R8
JMP 0x001ae240
LAB_001ae224:
MOV RDI,R8
LAB_001ae227:
CMP ECX,0x3
CMOVGE R10,RDI
MOV RAX,R10
SUB RAX,R15
CMP RAX,RDX
JL 0x001ae2fc
MOV R8,R10
LAB_001ae240:
CMP RAX,RDX
JL 0x001ae1d4
JMP 0x001ae24a
LAB_001ae247:
MOV R10,R8
LAB_001ae24a:
CMP ECX,0x3
JNZ 0x001ae262
XOR R9D,R9D
MOV ECX,0x3
LAB_001ae257:
MOV RAX,R14
MOV R8,R10
JMP 0x001ae354
LAB_001ae262:
TEST ECX,ECX
MOV R8,R15
CMOVZ R8,R14
INC ECX
MOV R9D,0x1
MOV RAX,R14
JMP 0x001ae354
LAB_001ae27b:
CMP EAX,0xff
JNZ 0x001ae34a
MOV qword ptr [RBP + -0x40],R12
MOV R9,R8
SUB R9,R15
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,R8
MOV qword ptr [RBP + -0x60],RAX
XOR EBX,EBX
LAB_001ae29d:
MOV R11,RBX
SHL R11,0x4
LEA RAX,[0x47c330]
MOV R13,qword ptr [R11 + RAX*0x1]
MOV AL,byte ptr [R13]
TEST AL,AL
JZ 0x001ae2e8
CMP R9,RDX
JGE 0x001ae2e8
INC R13
MOV R10,qword ptr [RBP + -0x60]
MOV R12,R8
LAB_001ae2c6:
CMP byte ptr [R12],AL
JNZ 0x001ae2ef
INC R12
MOV AL,byte ptr [R13]
TEST AL,AL
JZ 0x001ae2eb
INC R13
LEA RDI,[R10 + 0x1]
CMP R10,RDX
MOV R10,RDI
JL 0x001ae2c6
JMP 0x001ae2eb
LAB_001ae2e8:
MOV R12,R8
LAB_001ae2eb:
TEST AL,AL
JZ 0x001ae31c
LAB_001ae2ef:
INC RBX
CMP RBX,0x50
JNZ 0x001ae29d
MOV AL,0xff
JMP 0x001ae337
LAB_001ae2fc:
MOV R9D,0x2
CMP ECX,0x1
JG 0x001ae257
MOV EDI,0x1
SUB EDI,ECX
MOV RAX,R10
MOV ECX,EDI
MOV R8,R14
JMP 0x001ae354
LAB_001ae31c:
LEA RAX,[0x47c330]
ADD R11,RAX
MOV RAX,qword ptr [R11 + 0x8]
MOV RDI,qword ptr [RBP + -0x58]
MOV AL,byte ptr [RAX + RDI*0x1]
DEC R12
MOV R8,R12
LAB_001ae337:
MOV RBX,qword ptr [RBP + -0x38]
MOV R11D,dword ptr [RBP + -0x2c]
MOV R12,qword ptr [RBP + -0x40]
LEA R13,[0x47c310]
LAB_001ae34a:
MOVZX R9D,AL
INC R8
MOV RAX,R14
LAB_001ae354:
TEST ESI,R11D
SETNZ R10B
CMP R12,RBX
SETC DIL
AND DIL,R10B
CMP DIL,0x1
JNZ 0x001ae376
MOV RSI,qword ptr [RBP + -0x48]
MOV byte ptr [RSI + R12*0x1],R9B
INC R12
LAB_001ae376:
MOV R14,RAX
TEST R9D,R9D
JNZ 0x001ae1b6
TEST R11B,R11B
SETS AL
MOV RDX,RBX
SUB RDX,R12
SETA CL
AND CL,AL
CMP CL,0x1
JNZ 0x001ae3ab
MOV RDI,qword ptr [RBP + -0x48]
ADD RDI,R12
MOV ESI,0x20
CALL 0x001292c0
JMP 0x001ae3ae
LAB_001ae3ab:
MOV RBX,R12
LAB_001ae3ae:
MOV RAX,RBX
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
ulong my_strnxfrm_czech(int8 param_1,long param_2,ulong param_3,int8 param_4,
byte *param_5,int param_6,uint param_7)
{
uint uVar1;
byte *pbVar2;
byte *pbVar3;
byte bVar4;
char cVar5;
long lVar6;
byte *pbVar7;
byte bVar8;
int iVar9;
long lVar10;
byte *pbVar11;
byte *pbVar12;
byte *pbVar13;
ulong uVar14;
byte *pbVar15;
uVar1 = param_7 | 0xf;
if ((param_7 & 0xf) != 0) {
uVar1 = param_7;
}
lVar10 = (long)param_6;
iVar9 = 0;
uVar14 = 0;
pbVar13 = param_5;
pbVar15 = param_5;
LAB_001ae1b6:
bVar8 = (byte)iVar9;
pbVar7 = pbVar15;
if ((long)pbVar13 - (long)param_5 < lVar10) {
do {
cVar5 = (&CZ_SORT_TABLE)[iVar9][*pbVar13];
if (cVar5 == '\0') {
pbVar13 = pbVar13 + 1;
lVar6 = (long)pbVar13 - (long)param_5;
}
else {
if (cVar5 != '\x02') {
if (cVar5 != -1) goto LAB_001ae34a;
lVar6 = 0;
goto LAB_001ae29d;
}
pbVar12 = pbVar13 + 1;
lVar6 = (long)pbVar12 - (long)param_5;
pbVar13 = pbVar12;
while ((pbVar11 = pbVar13, lVar6 < lVar10 &&
(pbVar11 = pbVar12, (&CZ_SORT_TABLE)[iVar9][*pbVar13] == '\x02'))) {
pbVar13 = pbVar13 + 1;
lVar6 = lVar6 + 1;
}
if (2 < iVar9) {
pbVar13 = pbVar11;
}
lVar6 = (long)pbVar13 - (long)param_5;
if (lVar6 < lVar10) {
cVar5 = '\x02';
if (iVar9 < 2) {
iVar9 = 1 - iVar9;
pbVar7 = pbVar13;
pbVar13 = pbVar15;
}
goto LAB_001ae354;
}
}
} while (lVar6 < lVar10);
}
if (iVar9 == 3) {
cVar5 = '\0';
iVar9 = 3;
}
else {
pbVar13 = param_5;
if (iVar9 == 0) {
pbVar13 = pbVar15;
}
iVar9 = iVar9 + 1;
cVar5 = '\x01';
}
goto LAB_001ae354;
LAB_001ae29d:
do {
pbVar15 = (&doubles)[lVar6 * 2];
bVar4 = *pbVar15;
pbVar12 = pbVar13;
pbVar3 = pbVar13 + (1 - (long)param_5);
pbVar11 = pbVar13 + -(long)param_5;
if (bVar4 != 0) {
while (pbVar2 = pbVar3, (long)pbVar11 < lVar10) {
pbVar15 = pbVar15 + 1;
if (*pbVar12 != bVar4) goto LAB_001ae2ef;
pbVar12 = pbVar12 + 1;
bVar4 = *pbVar15;
if (bVar4 == 0) break;
pbVar3 = pbVar2 + 1;
pbVar11 = pbVar2;
}
}
if (bVar4 == 0) {
cVar5 = (&PTR_DAT_0047c338)[lVar6 * 2][iVar9];
pbVar13 = pbVar12 + -1;
goto LAB_001ae34a;
}
LAB_001ae2ef:
lVar6 = lVar6 + 1;
} while (lVar6 != 0x50);
cVar5 = -1;
LAB_001ae34a:
pbVar13 = pbVar13 + 1;
LAB_001ae354:
if (uVar14 < param_3 && (1 << (bVar8 & 0x1f) & uVar1) != 0) {
*(char *)(param_2 + uVar14) = cVar5;
uVar14 = uVar14 + 1;
}
pbVar15 = pbVar7;
if (cVar5 == '\0') {
if ((uVar14 <= param_3 && param_3 - uVar14 != 0) && (char)uVar1 < '\0') {
memset((void *)(param_2 + uVar14),0x20,param_3 - uVar14);
uVar14 = param_3;
}
return uVar14;
}
goto LAB_001ae1b6;
}
|
|
7,647 |
get_collation_number
|
eloqsql/mysys/charset.c
|
uint get_collation_number(const char *name, myf flags)
{
uint id;
char alias[64];
my_pthread_once(&charsets_initialized, init_available_charsets);
if ((id= get_collation_number_internal(name)))
return id;
if ((name= get_collation_name_alias(name, alias, sizeof(alias),flags)))
return get_collation_number_internal(name);
return 0;
}
|
O0
|
c
|
get_collation_number:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x60(%rbp)
movq %rsi, -0x68(%rbp)
leaq 0xba6de0(%rip), %rdi # 0xc82734
leaq 0x85(%rip), %rsi # 0xdb9e0
callq 0x2a240
movq -0x60(%rbp), %rdi
callq 0xdbb70
movl %eax, -0x6c(%rbp)
cmpl $0x0, %eax
je 0xdb979
movl -0x6c(%rbp), %eax
movl %eax, -0x54(%rbp)
jmp 0xdb9ae
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rsi
movq -0x68(%rbp), %rcx
movl $0x40, %edx
callq 0xdbc10
movq %rax, -0x60(%rbp)
cmpq $0x0, %rax
je 0xdb9a7
movq -0x60(%rbp), %rdi
callq 0xdbb70
movl %eax, -0x54(%rbp)
jmp 0xdb9ae
movl $0x0, -0x54(%rbp)
movl -0x54(%rbp), %eax
movl %eax, -0x70(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0xdb9cf
movl -0x70(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
callq 0x2a270
nopw %cs:(%rax,%rax)
|
get_collation_number:
push rbp
mov rbp, rsp
sub rsp, 70h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_60], rdi
mov [rbp+var_68], rsi
lea rdi, charsets_initialized
lea rsi, init_available_charsets
call _pthread_once
mov rdi, [rbp+var_60]
call get_collation_number_internal
mov [rbp+var_6C], eax
cmp eax, 0
jz short loc_DB979
mov eax, [rbp+var_6C]
mov [rbp+var_54], eax
jmp short loc_DB9AE
loc_DB979:
mov rdi, [rbp+var_60]
lea rsi, [rbp+var_50]
mov rcx, [rbp+var_68]
mov edx, 40h ; '@'
call get_collation_name_alias
mov [rbp+var_60], rax
cmp rax, 0
jz short loc_DB9A7
mov rdi, [rbp+var_60]
call get_collation_number_internal
mov [rbp+var_54], eax
jmp short loc_DB9AE
loc_DB9A7:
mov [rbp+var_54], 0
loc_DB9AE:
mov eax, [rbp+var_54]
mov [rbp+var_70], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_DB9CF
mov eax, [rbp+var_70]
add rsp, 70h
pop rbp
retn
loc_DB9CF:
call ___stack_chk_fail
|
long long get_collation_number(long long a1, long long a2)
{
unsigned int collation_number_internal; // [rsp+4h] [rbp-6Ch]
long long collation_name_alias; // [rsp+10h] [rbp-60h]
_BYTE v6[72]; // [rsp+20h] [rbp-50h] BYREF
unsigned long long v7; // [rsp+68h] [rbp-8h]
v7 = __readfsqword(0x28u);
pthread_once(&charsets_initialized, init_available_charsets);
collation_number_internal = get_collation_number_internal(a1);
if ( collation_number_internal )
{
return collation_number_internal;
}
else
{
collation_name_alias = get_collation_name_alias(a1, v6, 64LL, a2);
if ( collation_name_alias )
return (unsigned int)get_collation_number_internal(collation_name_alias);
else
return 0;
}
}
|
get_collation_number:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x60],RDI
MOV qword ptr [RBP + -0x68],RSI
LEA RDI,[0xd82734]
LEA RSI,[0x1db9e0]
CALL 0x0012a240
MOV RDI,qword ptr [RBP + -0x60]
CALL 0x001dbb70
MOV dword ptr [RBP + -0x6c],EAX
CMP EAX,0x0
JZ 0x001db979
MOV EAX,dword ptr [RBP + -0x6c]
MOV dword ptr [RBP + -0x54],EAX
JMP 0x001db9ae
LAB_001db979:
MOV RDI,qword ptr [RBP + -0x60]
LEA RSI,[RBP + -0x50]
MOV RCX,qword ptr [RBP + -0x68]
MOV EDX,0x40
CALL 0x001dbc10
MOV qword ptr [RBP + -0x60],RAX
CMP RAX,0x0
JZ 0x001db9a7
MOV RDI,qword ptr [RBP + -0x60]
CALL 0x001dbb70
MOV dword ptr [RBP + -0x54],EAX
JMP 0x001db9ae
LAB_001db9a7:
MOV dword ptr [RBP + -0x54],0x0
LAB_001db9ae:
MOV EAX,dword ptr [RBP + -0x54]
MOV dword ptr [RBP + -0x70],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001db9cf
MOV EAX,dword ptr [RBP + -0x70]
ADD RSP,0x70
POP RBP
RET
LAB_001db9cf:
CALL 0x0012a270
|
int get_collation_number(int8 param_1,int8 param_2)
{
long lVar1;
long in_FS_OFFSET;
int local_5c;
int1 local_58 [72];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
pthread_once(&charsets_initialized,init_available_charsets);
local_5c = get_collation_number_internal(param_1);
if (local_5c == 0) {
lVar1 = get_collation_name_alias(param_1,local_58,0x40,param_2);
if (lVar1 == 0) {
local_5c = 0;
}
else {
local_5c = get_collation_number_internal(lVar1);
}
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_5c;
}
|
|
7,648 |
JS_ConcatString1
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue JS_ConcatString1(JSContext *ctx,
const JSString *p1, const JSString *p2)
{
JSString *p;
uint32_t len;
int is_wide_char;
len = p1->len + p2->len;
if (len > JS_STRING_LEN_MAX)
return JS_ThrowRangeError(ctx, "invalid string length");
is_wide_char = p1->is_wide_char | p2->is_wide_char;
p = js_alloc_string(ctx, len, is_wide_char);
if (!p)
return JS_EXCEPTION;
if (!is_wide_char) {
memcpy(p->u.str8, p1->u.str8, p1->len);
memcpy(p->u.str8 + p1->len, p2->u.str8, p2->len);
p->u.str8[len] = '\0';
} else {
copy_str16(p->u.str16, p1, 0, p1->len);
copy_str16(p->u.str16 + p1->len, p2, 0, p2->len);
}
return JS_MKPTR(JS_TAG_STRING, p);
}
|
O0
|
c
|
JS_ConcatString1:
subq $0x38, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x18(%rsp), %rax
movq 0x4(%rax), %rax
andq $0x7fffffff, %rax # imm = 0x7FFFFFFF
movq 0x10(%rsp), %rcx
movq 0x4(%rcx), %rcx
andq $0x7fffffff, %rcx # imm = 0x7FFFFFFF
addl %ecx, %eax
movl %eax, 0x4(%rsp)
cmpl $0x3fffffff, 0x4(%rsp) # imm = 0x3FFFFFFF
jbe 0x77824
movq 0x20(%rsp), %rdi
leaq 0x9c3c0(%rip), %rsi # 0x113bce
movb $0x0, %al
callq 0x2f960
movq %rax, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
jmp 0x77979
movq 0x18(%rsp), %rax
movq 0x4(%rax), %rax
shrq $0x1f, %rax
andq $0x1, %rax
movzbl %al, %eax
movq 0x10(%rsp), %rcx
movq 0x4(%rcx), %rcx
shrq $0x1f, %rcx
andq $0x1, %rcx
movzbl %cl, %ecx
orl %ecx, %eax
movl %eax, (%rsp)
movq 0x20(%rsp), %rdi
movl 0x4(%rsp), %esi
movl (%rsp), %edx
callq 0x2fa50
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x77885
movl $0x0, 0x28(%rsp)
movq $0x6, 0x30(%rsp)
jmp 0x77979
cmpl $0x0, (%rsp)
jne 0x77903
movq 0x8(%rsp), %rdi
addq $0x18, %rdi
movq 0x18(%rsp), %rsi
addq $0x18, %rsi
movq 0x18(%rsp), %rax
movq 0x4(%rax), %rax
andq $0x7fffffff, %rax # imm = 0x7FFFFFFF
movl %eax, %eax
movl %eax, %edx
callq 0xe610
movq 0x8(%rsp), %rdi
addq $0x18, %rdi
movq 0x18(%rsp), %rax
movq 0x4(%rax), %rax
andq $0x7fffffff, %rax # imm = 0x7FFFFFFF
cltq
addq %rax, %rdi
movq 0x10(%rsp), %rsi
addq $0x18, %rsi
movq 0x10(%rsp), %rax
movq 0x4(%rax), %rax
andq $0x7fffffff, %rax # imm = 0x7FFFFFFF
movl %eax, %eax
movl %eax, %edx
callq 0xe610
movq 0x8(%rsp), %rax
movl 0x4(%rsp), %ecx
movb $0x0, 0x18(%rax,%rcx)
jmp 0x77966
movq 0x8(%rsp), %rdi
addq $0x18, %rdi
movq 0x18(%rsp), %rsi
movq 0x18(%rsp), %rax
movq 0x4(%rax), %rax
andq $0x7fffffff, %rax # imm = 0x7FFFFFFF
movl %eax, %ecx
xorl %edx, %edx
callq 0x77990
movq 0x8(%rsp), %rdi
addq $0x18, %rdi
movq 0x18(%rsp), %rax
movq 0x4(%rax), %rax
andq $0x7fffffff, %rax # imm = 0x7FFFFFFF
cltq
shlq %rax
addq %rax, %rdi
movq 0x10(%rsp), %rsi
movq 0x10(%rsp), %rax
movq 0x4(%rax), %rax
andq $0x7fffffff, %rax # imm = 0x7FFFFFFF
movl %eax, %ecx
xorl %edx, %edx
callq 0x77990
movq 0x8(%rsp), %rax
movq %rax, 0x28(%rsp)
movq $-0x7, 0x30(%rsp)
movq 0x28(%rsp), %rax
movq 0x30(%rsp), %rdx
addq $0x38, %rsp
retq
nopl (%rax,%rax)
|
JS_ConcatString1:
sub rsp, 38h
mov [rsp+38h+var_18], rdi
mov [rsp+38h+var_20], rsi
mov [rsp+38h+var_28], rdx
mov rax, [rsp+38h+var_20]
mov rax, [rax+4]
and rax, 7FFFFFFFh
mov rcx, [rsp+38h+var_28]
mov rcx, [rcx+4]
and rcx, 7FFFFFFFh
add eax, ecx
mov [rsp+38h+var_34], eax
cmp [rsp+38h+var_34], 3FFFFFFFh
jbe short loc_77824
mov rdi, [rsp+38h+var_18]
lea rsi, aInvalidStringL; "invalid string length"
mov al, 0
call JS_ThrowRangeError
mov [rsp+38h+var_10], rax
mov [rsp+38h+var_8], rdx
jmp loc_77979
loc_77824:
mov rax, [rsp+38h+var_20]
mov rax, [rax+4]
shr rax, 1Fh
and rax, 1
movzx eax, al
mov rcx, [rsp+38h+var_28]
mov rcx, [rcx+4]
shr rcx, 1Fh
and rcx, 1
movzx ecx, cl
or eax, ecx
mov [rsp+38h+var_38], eax
mov rdi, [rsp+38h+var_18]
mov esi, [rsp+38h+var_34]
mov edx, [rsp+38h+var_38]
call js_alloc_string
mov [rsp+38h+var_30], rax
cmp [rsp+38h+var_30], 0
jnz short loc_77885
mov dword ptr [rsp+38h+var_10], 0
mov [rsp+38h+var_8], 6
jmp loc_77979
loc_77885:
cmp [rsp+38h+var_38], 0
jnz short loc_77903
mov rdi, [rsp+38h+var_30]
add rdi, 18h
mov rsi, [rsp+38h+var_20]
add rsi, 18h
mov rax, [rsp+38h+var_20]
mov rax, [rax+4]
and rax, 7FFFFFFFh
mov eax, eax
mov edx, eax
call _memcpy
mov rdi, [rsp+38h+var_30]
add rdi, 18h
mov rax, [rsp+38h+var_20]
mov rax, [rax+4]
and rax, 7FFFFFFFh
cdqe
add rdi, rax
mov rsi, [rsp+38h+var_28]
add rsi, 18h
mov rax, [rsp+38h+var_28]
mov rax, [rax+4]
and rax, 7FFFFFFFh
mov eax, eax
mov edx, eax
call _memcpy
mov rax, [rsp+38h+var_30]
mov ecx, [rsp+38h+var_34]
mov byte ptr [rax+rcx+18h], 0
jmp short loc_77966
loc_77903:
mov rdi, [rsp+38h+var_30]
add rdi, 18h
mov rsi, [rsp+38h+var_20]
mov rax, [rsp+38h+var_20]
mov rax, [rax+4]
and rax, 7FFFFFFFh
mov ecx, eax
xor edx, edx
call copy_str16
mov rdi, [rsp+38h+var_30]
add rdi, 18h
mov rax, [rsp+38h+var_20]
mov rax, [rax+4]
and rax, 7FFFFFFFh
cdqe
shl rax, 1
add rdi, rax
mov rsi, [rsp+38h+var_28]
mov rax, [rsp+38h+var_28]
mov rax, [rax+4]
and rax, 7FFFFFFFh
mov ecx, eax
xor edx, edx
call copy_str16
loc_77966:
mov rax, [rsp+38h+var_30]
mov [rsp+38h+var_10], rax
mov [rsp+38h+var_8], 0FFFFFFFFFFFFFFF9h
loc_77979:
mov rax, [rsp+38h+var_10]
mov rdx, [rsp+38h+var_8]
add rsp, 38h
retn
|
long long JS_ConcatString1(
long long a1,
long long a2,
long long a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
long long a12,
long long a13,
long long a14)
{
long long v14; // rcx
char v16; // [rsp+0h] [rbp-38h]
unsigned int v17; // [rsp+0h] [rbp-38h]
unsigned int v18; // [rsp+4h] [rbp-34h]
long long v19; // [rsp+8h] [rbp-30h]
long long v21; // [rsp+28h] [rbp-10h]
v14 = *(_QWORD *)(a3 + 4) & 0x7FFFFFFFLL;
v18 = v14 + (*(_QWORD *)(a2 + 4) & 0x7FFFFFFF);
if ( v18 > 0x3FFFFFFF )
return JS_ThrowRangeError(
a1,
(long long)"invalid string length",
a3,
v14,
a13,
a14,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
v16);
v17 = (*(_QWORD *)(a3 + 4) & 0x80000000LL) != 0 || (*(_QWORD *)(a2 + 4) & 0x80000000LL) != 0;
v19 = js_alloc_string(a1, v18, v17);
if ( v19 )
{
if ( v17 )
{
copy_str16(v19 + 24, a2, 0LL, *(_DWORD *)(a2 + 4) & 0x7FFFFFFF);
copy_str16(2LL * (*(_QWORD *)(a2 + 4) & 0x7FFFFFFF) + v19 + 24, a3, 0LL, *(_DWORD *)(a3 + 4) & 0x7FFFFFFF);
}
else
{
memcpy(v19 + 24, a2 + 24, *(_DWORD *)(a2 + 4) & 0x7FFFFFFF);
memcpy((*(_QWORD *)(a2 + 4) & 0x7FFFFFFF) + v19 + 24, a3 + 24, *(_DWORD *)(a3 + 4) & 0x7FFFFFFF);
*(_BYTE *)(v19 + v18 + 24) = 0;
}
return v19;
}
else
{
LODWORD(v21) = 0;
}
return v21;
}
|
JS_ConcatString1:
SUB RSP,0x38
MOV qword ptr [RSP + 0x20],RDI
MOV qword ptr [RSP + 0x18],RSI
MOV qword ptr [RSP + 0x10],RDX
MOV RAX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RAX + 0x4]
AND RAX,0x7fffffff
MOV RCX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RCX + 0x4]
AND RCX,0x7fffffff
ADD EAX,ECX
MOV dword ptr [RSP + 0x4],EAX
CMP dword ptr [RSP + 0x4],0x3fffffff
JBE 0x00177824
MOV RDI,qword ptr [RSP + 0x20]
LEA RSI,[0x213bce]
MOV AL,0x0
CALL 0x0012f960
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP + 0x30],RDX
JMP 0x00177979
LAB_00177824:
MOV RAX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RAX + 0x4]
SHR RAX,0x1f
AND RAX,0x1
MOVZX EAX,AL
MOV RCX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RCX + 0x4]
SHR RCX,0x1f
AND RCX,0x1
MOVZX ECX,CL
OR EAX,ECX
MOV dword ptr [RSP],EAX
MOV RDI,qword ptr [RSP + 0x20]
MOV ESI,dword ptr [RSP + 0x4]
MOV EDX,dword ptr [RSP]
CALL 0x0012fa50
MOV qword ptr [RSP + 0x8],RAX
CMP qword ptr [RSP + 0x8],0x0
JNZ 0x00177885
MOV dword ptr [RSP + 0x28],0x0
MOV qword ptr [RSP + 0x30],0x6
JMP 0x00177979
LAB_00177885:
CMP dword ptr [RSP],0x0
JNZ 0x00177903
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x18
MOV RSI,qword ptr [RSP + 0x18]
ADD RSI,0x18
MOV RAX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RAX + 0x4]
AND RAX,0x7fffffff
MOV EAX,EAX
MOV EDX,EAX
CALL 0x0010e610
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x18
MOV RAX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RAX + 0x4]
AND RAX,0x7fffffff
CDQE
ADD RDI,RAX
MOV RSI,qword ptr [RSP + 0x10]
ADD RSI,0x18
MOV RAX,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RAX + 0x4]
AND RAX,0x7fffffff
MOV EAX,EAX
MOV EDX,EAX
CALL 0x0010e610
MOV RAX,qword ptr [RSP + 0x8]
MOV ECX,dword ptr [RSP + 0x4]
MOV byte ptr [RAX + RCX*0x1 + 0x18],0x0
JMP 0x00177966
LAB_00177903:
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x18
MOV RSI,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RAX + 0x4]
AND RAX,0x7fffffff
MOV ECX,EAX
XOR EDX,EDX
CALL 0x00177990
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x18
MOV RAX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RAX + 0x4]
AND RAX,0x7fffffff
CDQE
SHL RAX,0x1
ADD RDI,RAX
MOV RSI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RAX + 0x4]
AND RAX,0x7fffffff
MOV ECX,EAX
XOR EDX,EDX
CALL 0x00177990
LAB_00177966:
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP + 0x30],-0x7
LAB_00177979:
MOV RAX,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x30]
ADD RSP,0x38
RET
|
int1 [16] JS_ConcatString1(int8 param_1,long param_2,long param_3)
{
byte bVar1;
uint uVar2;
long lVar3;
int1 auVar4 [16];
int4 local_10;
int4 uStack_c;
int8 local_8;
uVar2 = ((uint)*(int8 *)(param_2 + 4) & 0x7fffffff) +
((uint)*(int8 *)(param_3 + 4) & 0x7fffffff);
if (uVar2 < 0x40000000) {
bVar1 = (byte)(*(ulong *)(param_2 + 4) >> 0x1f) & 1 |
(byte)(*(ulong *)(param_3 + 4) >> 0x1f) & 1;
lVar3 = js_alloc_string(param_1,uVar2,bVar1);
if (lVar3 == 0) {
local_10 = 0;
local_8 = 6;
}
else {
if (bVar1 == 0) {
memcpy((void *)(lVar3 + 0x18),(void *)(param_2 + 0x18),
(ulong)((uint)*(int8 *)(param_2 + 4) & 0x7fffffff));
memcpy((void *)(lVar3 + 0x18 + (long)(int)((uint)*(int8 *)(param_2 + 4) & 0x7fffffff))
,(void *)(param_3 + 0x18),(ulong)((uint)*(int8 *)(param_3 + 4) & 0x7fffffff));
*(int1 *)(lVar3 + 0x18 + (ulong)uVar2) = 0;
}
else {
copy_str16(lVar3 + 0x18,param_2,0,(uint)*(int8 *)(param_2 + 4) & 0x7fffffff);
copy_str16(lVar3 + 0x18 + (long)(int)((uint)*(int8 *)(param_2 + 4) & 0x7fffffff) * 2,
param_3,0,(uint)*(int8 *)(param_3 + 4) & 0x7fffffff);
}
local_10 = (int4)lVar3;
uStack_c = (int4)((ulong)lVar3 >> 0x20);
local_8 = 0xfffffffffffffff9;
}
}
else {
auVar4 = JS_ThrowRangeError(param_1,"invalid string length");
local_8 = auVar4._8_8_;
local_10 = auVar4._0_4_;
uStack_c = auVar4._4_4_;
}
auVar4._4_4_ = uStack_c;
auVar4._0_4_ = local_10;
auVar4._8_8_ = local_8;
return auVar4;
}
|
|
7,649 |
void OpenSubdiv::v3_6_0::Far::PatchParam::Normalize<float>(float&, float&) const
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/../far/../far/patchParam.h
|
constexpr unsigned short GetDepth() const { return (unsigned short)unpack(field1,4,0); }
|
O1
|
c
|
void OpenSubdiv::v3_6_0::Far::PatchParam::Normalize<float>(float&, float&) const:
movq (%rdi), %rax
movq %rax, %rcx
shrq $0x20, %rcx
andl $0xf, %ecx
movq %rax, %r8
shlq $0x1b, %r8
sarq $0x3f, %r8
addl %ecx, %r8d
shll $0x17, %r8d
movl $0x3f800000, %ecx # imm = 0x3F800000
subl %r8d, %ecx
movd %ecx, %xmm0
movss 0x4d237(%rip), %xmm1 # 0xb2000
divss %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtss2sd %xmm1, %xmm0
shrq $0x36, %rax
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
movsd (%rsi), %xmm2
mulsd %xmm0, %xmm2
subsd %xmm1, %xmm2
movsd %xmm2, (%rsi)
movq (%rdi), %rax
shrq $0x2c, %rax
andl $0x3ff, %eax # imm = 0x3FF
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
mulsd (%rdx), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, (%rdx)
retq
|
_ZNK10OpenSubdiv6v3_6_03Far10PatchParam9NormalizeIdEEvRT_S5_:
mov rax, [rdi]
mov rcx, rax
shr rcx, 20h
and ecx, 0Fh
mov r8, rax
shl r8, 1Bh
sar r8, 3Fh
add r8d, ecx
shl r8d, 17h
mov ecx, 3F800000h
sub ecx, r8d
movd xmm0, ecx
movss xmm1, cs:dword_B2000
divss xmm1, xmm0
xorps xmm0, xmm0
cvtss2sd xmm0, xmm1
shr rax, 36h
xorps xmm1, xmm1
cvtsi2sd xmm1, eax
movsd xmm2, qword ptr [rsi]
mulsd xmm2, xmm0
subsd xmm2, xmm1
movsd qword ptr [rsi], xmm2
mov rax, [rdi]
shr rax, 2Ch
and eax, 3FFh
xorps xmm1, xmm1
cvtsi2sd xmm1, eax
mulsd xmm0, qword ptr [rdx]
subsd xmm0, xmm1
movsd qword ptr [rdx], xmm0
retn
|
long long OpenSubdiv::v3_6_0::Far::PatchParam::Normalize<double>(_QWORD *a1, double *a2, double *a3)
{
double v3; // xmm0_8
long long result; // rax
v3 = (float)(1.0 / COERCE_FLOAT(1065353216 - (((HIDWORD(*a1) & 0xF) + ((int)(*a1 >> 5) >> 31)) << 23)));
*a2 = *a2 * v3 - (double)(*a1 >> 54);
result = (*a1 >> 44) & 0x3FFLL;
*a3 = v3 * *a3 - (double)(int)result;
return result;
}
|
Normalize<double>:
MOV RAX,qword ptr [RDI]
MOV RCX,RAX
SHR RCX,0x20
AND ECX,0xf
MOV R8,RAX
SHL R8,0x1b
SAR R8,0x3f
ADD R8D,ECX
SHL R8D,0x17
MOV ECX,0x3f800000
SUB ECX,R8D
MOVD XMM0,ECX
MOVSS XMM1,dword ptr [0x001b2000]
DIVSS XMM1,XMM0
XORPS XMM0,XMM0
CVTSS2SD XMM0,XMM1
SHR RAX,0x36
XORPS XMM1,XMM1
CVTSI2SD XMM1,EAX
MOVSD XMM2,qword ptr [RSI]
MULSD XMM2,XMM0
SUBSD XMM2,XMM1
MOVSD qword ptr [RSI],XMM2
MOV RAX,qword ptr [RDI]
SHR RAX,0x2c
AND EAX,0x3ff
XORPS XMM1,XMM1
CVTSI2SD XMM1,EAX
MULSD XMM0,qword ptr [RDX]
SUBSD XMM0,XMM1
MOVSD qword ptr [RDX],XMM0
RET
|
/* void OpenSubdiv::v3_6_0::Far::PatchParam::Normalize<double>(double&, double&) const */
void __thiscall
OpenSubdiv::v3_6_0::Far::PatchParam::Normalize<double>
(PatchParam *this,double *param_1,double *param_2)
{
uint uVar1;
double dVar2;
uVar1 = (uint)((ulong)*(long *)this >> 0x20);
dVar2 = (double)(DAT_001b2000 /
(float)(((int)((*(long *)this << 0x1b) >> 0x3f) + (uVar1 & 0xf)) * -0x800000 +
0x3f800000));
*param_1 = *param_1 * dVar2 - (double)(uVar1 >> 0x16);
*param_2 = dVar2 * *param_2 - (double)((uint)((ulong)*(int8 *)this >> 0x2c) & 0x3ff);
return;
}
|
|
7,650 |
void OpenSubdiv::v3_6_0::Far::PatchParam::Normalize<float>(float&, float&) const
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/../far/../far/patchParam.h
|
constexpr unsigned short GetDepth() const { return (unsigned short)unpack(field1,4,0); }
|
O3
|
c
|
void OpenSubdiv::v3_6_0::Far::PatchParam::Normalize<float>(float&, float&) const:
movq (%rdi), %rax
movq %rax, %rcx
shrq $0x20, %rcx
andl $0xf, %ecx
movq %rax, %r8
shlq $0x1b, %r8
sarq $0x3f, %r8
addl %ecx, %r8d
shll $0x17, %r8d
movl $0x3f800000, %ecx # imm = 0x3F800000
subl %r8d, %ecx
movd %ecx, %xmm0
movss 0x4ec9b(%rip), %xmm1 # 0xb5000
divss %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtss2sd %xmm1, %xmm0
shrq $0x36, %rax
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
movsd (%rsi), %xmm2
mulsd %xmm0, %xmm2
subsd %xmm1, %xmm2
movsd %xmm2, (%rsi)
movq (%rdi), %rax
shrq $0x2c, %rax
andl $0x3ff, %eax # imm = 0x3FF
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
mulsd (%rdx), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, (%rdx)
retq
|
_ZNK10OpenSubdiv6v3_6_03Far10PatchParam9NormalizeIdEEvRT_S5_:
mov rax, [rdi]
mov rcx, rax
shr rcx, 20h
and ecx, 0Fh
mov r8, rax
shl r8, 1Bh
sar r8, 3Fh
add r8d, ecx
shl r8d, 17h
mov ecx, 3F800000h
sub ecx, r8d
movd xmm0, ecx
movss xmm1, cs:dword_B5000
divss xmm1, xmm0
xorps xmm0, xmm0
cvtss2sd xmm0, xmm1
shr rax, 36h
xorps xmm1, xmm1
cvtsi2sd xmm1, eax
movsd xmm2, qword ptr [rsi]
mulsd xmm2, xmm0
subsd xmm2, xmm1
movsd qword ptr [rsi], xmm2
mov rax, [rdi]
shr rax, 2Ch
and eax, 3FFh
xorps xmm1, xmm1
cvtsi2sd xmm1, eax
mulsd xmm0, qword ptr [rdx]
subsd xmm0, xmm1
movsd qword ptr [rdx], xmm0
retn
|
long long OpenSubdiv::v3_6_0::Far::PatchParam::Normalize<double>(_QWORD *a1, double *a2, double *a3)
{
double v3; // xmm0_8
long long result; // rax
v3 = (float)(1.0 / COERCE_FLOAT(1065353216 - (((HIDWORD(*a1) & 0xF) + ((int)(*a1 >> 5) >> 31)) << 23)));
*a2 = *a2 * v3 - (double)(*a1 >> 54);
result = (*a1 >> 44) & 0x3FFLL;
*a3 = v3 * *a3 - (double)(int)result;
return result;
}
|
Normalize<double>:
MOV RAX,qword ptr [RDI]
MOV RCX,RAX
SHR RCX,0x20
AND ECX,0xf
MOV R8,RAX
SHL R8,0x1b
SAR R8,0x3f
ADD R8D,ECX
SHL R8D,0x17
MOV ECX,0x3f800000
SUB ECX,R8D
MOVD XMM0,ECX
MOVSS XMM1,dword ptr [0x001b5000]
DIVSS XMM1,XMM0
XORPS XMM0,XMM0
CVTSS2SD XMM0,XMM1
SHR RAX,0x36
XORPS XMM1,XMM1
CVTSI2SD XMM1,EAX
MOVSD XMM2,qword ptr [RSI]
MULSD XMM2,XMM0
SUBSD XMM2,XMM1
MOVSD qword ptr [RSI],XMM2
MOV RAX,qword ptr [RDI]
SHR RAX,0x2c
AND EAX,0x3ff
XORPS XMM1,XMM1
CVTSI2SD XMM1,EAX
MULSD XMM0,qword ptr [RDX]
SUBSD XMM0,XMM1
MOVSD qword ptr [RDX],XMM0
RET
|
/* void OpenSubdiv::v3_6_0::Far::PatchParam::Normalize<double>(double&, double&) const */
void __thiscall
OpenSubdiv::v3_6_0::Far::PatchParam::Normalize<double>
(PatchParam *this,double *param_1,double *param_2)
{
uint uVar1;
double dVar2;
uVar1 = (uint)((ulong)*(long *)this >> 0x20);
dVar2 = (double)(DAT_001b5000 /
(float)(((int)((*(long *)this << 0x1b) >> 0x3f) + (uVar1 & 0xf)) * -0x800000 +
0x3f800000));
*param_1 = *param_1 * dVar2 - (double)(uVar1 >> 0x16);
*param_2 = dVar2 * *param_2 - (double)((uint)((ulong)*(int8 *)this >> 0x2c) & 0x3ff);
return;
}
|
|
7,651 |
google::protobuf::internal::ExtensionSet::RemoveLast(int)
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/extension_set.cc
|
ExtensionSet::Extension* ExtensionSet::FindOrNull(int key) {
const auto* const_this = this;
return const_cast<ExtensionSet::Extension*>(const_this->FindOrNull(key));
}
|
O3
|
cpp
|
google::protobuf::internal::ExtensionSet::RemoveLast(int):
pushq %r14
pushq %rbx
subq $0x48, %rsp
callq 0x93e0e
movq %rax, %rbx
testq %rax, %rax
jne 0x96637
leaq 0x26ead(%rip), %rdx # 0xbd498
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl $0x3, %esi
movl $0x341, %ecx # imm = 0x341
callq 0x169ca
leaq 0x270a4(%rip), %rsi # 0xbd6ad
movq %r14, %rdi
callq 0x164c8
leaq 0x270ba(%rip), %rsi # 0xbd6d2
movq %rax, %rdi
callq 0x164c8
leaq 0xf(%rsp), %rdi
movq %rax, %rsi
callq 0x165a2
leaq 0x10(%rsp), %rdi
callq 0x169e8
movzbl 0x8(%rbx), %eax
leaq 0x28a7e(%rip), %rcx # 0xbf0c0
movl (%rcx,%rax,4), %eax
decl %eax
cmpl $0x9, %eax
ja 0x96661
leaq 0x26af9(%rip), %rcx # 0xbd14c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq (%rbx), %rax
decl (%rax)
addq $0x48, %rsp
popq %rbx
popq %r14
retq
movq (%rbx), %rax
movq 0x10(%rax), %rcx
movslq 0x8(%rax), %rdx
leaq -0x1(%rdx), %rsi
movl %esi, 0x8(%rax)
movq (%rcx,%rdx,8), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
jmp 0x96661
movq (%rbx), %rax
movq 0x10(%rax), %rcx
movslq 0x8(%rax), %rdx
leaq -0x1(%rdx), %rsi
movl %esi, 0x8(%rax)
movq (%rcx,%rdx,8), %rax
movq $0x0, 0x8(%rax)
movq (%rax), %rax
movb $0x0, (%rax)
jmp 0x96661
jmp 0x966af
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x169e8
movq %rbx, %rdi
callq 0xf570
|
_ZN6google8protobuf8internal12ExtensionSet10RemoveLastEi:
push r14
push rbx
sub rsp, 48h
call _ZNK6google8protobuf8internal12ExtensionSet10FindOrNullEi; google::protobuf::internal::ExtensionSet::FindOrNull(int)
mov rbx, rax
test rax, rax
jnz short loc_96637
lea rdx, aWorkspaceLlm4b_22; "/workspace/llm4binary/github2025/aimrt_"...
lea r14, [rsp+58h+var_48]
mov rdi, r14
mov esi, 3
mov ecx, 341h
call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int)
lea rsi, aCheckFailedExt; "CHECK failed: extension != nullptr: "
mov rdi, r14
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
lea rsi, aIndexOutOfBoun; "Index out-of-bounds (field is empty)."
mov rdi, rax
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
lea rdi, [rsp+58h+var_49]
mov rsi, rax
call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &)
lea rdi, [rsp+58h+var_48]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
loc_96637:
movzx eax, byte ptr [rbx+8]
lea rcx, _ZN6google8protobuf8internal14WireFormatLite22kFieldTypeToCppTypeMapE; google::protobuf::internal::WireFormatLite::kFieldTypeToCppTypeMap
mov eax, [rcx+rax*4]
dec eax; switch 10 cases
cmp eax, 9
ja short def_9665A; jumptable 000000000009665A default case
lea rcx, jpt_9665A
movsxd rax, ds:(jpt_9665A - 0BD14Ch)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_9665C:
mov rax, [rbx]; jumptable 000000000009665A cases 1-8
dec dword ptr [rax]
def_9665A:
add rsp, 48h; jumptable 000000000009665A default case
pop rbx
pop r14
retn
loc_96669:
mov rax, [rbx]; jumptable 000000000009665A case 10
mov rcx, [rax+10h]
movsxd rdx, dword ptr [rax+8]
lea rsi, [rdx-1]
mov [rax+8], esi
mov rdi, [rcx+rdx*8]
mov rax, [rdi]
call qword ptr [rax+20h]
jmp short def_9665A; jumptable 000000000009665A default case
loc_96687:
mov rax, [rbx]; jumptable 000000000009665A case 9
mov rcx, [rax+10h]
movsxd rdx, dword ptr [rax+8]
lea rsi, [rdx-1]
mov [rax+8], esi
mov rax, [rcx+rdx*8]
mov qword ptr [rax+8], 0
mov rax, [rax]
mov byte ptr [rax], 0
jmp short def_9665A; jumptable 000000000009665A default case
jmp short $+2
loc_966AF:
mov rbx, rax
lea rdi, [rsp+arg_8]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
mov rdi, rbx
call __Unwind_Resume
|
long long google::protobuf::internal::ExtensionSet::RemoveLast(
google::protobuf::internal::ExtensionSet *this,
int a2)
{
unsigned __int8 *v2; // rbx
long long v3; // rax
google::protobuf::internal::LogMessage *v4; // rax
long long result; // rax
long long v6; // rcx
long long v7; // rdx
long long v8; // rcx
long long v9; // rdx
long long *v10; // rax
char v11; // [rsp+Fh] [rbp-49h] BYREF
_BYTE v12[72]; // [rsp+10h] [rbp-48h] BYREF
v2 = (unsigned __int8 *)google::protobuf::internal::ExtensionSet::FindOrNull(this, a2);
if ( !v2 )
{
google::protobuf::internal::LogMessage::LogMessage(
(long long)v12,
3,
(long long)"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/extension_set.cc",
833);
v3 = google::protobuf::internal::LogMessage::operator<<(
(long long)v12,
(long long)"CHECK failed: extension != nullptr: ");
v4 = (google::protobuf::internal::LogMessage *)google::protobuf::internal::LogMessage::operator<<(
v3,
(long long)"Index out-of-bounds (field is empty).");
google::protobuf::internal::LogFinisher::operator=((long long)&v11, v4);
google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v12);
}
result = (unsigned int)(google::protobuf::internal::WireFormatLite::kFieldTypeToCppTypeMap[v2[8]] - 1);
switch ( v2[8] )
{
case 1u:
case 2u:
case 3u:
case 4u:
case 5u:
case 6u:
case 7u:
case 8u:
case 0xDu:
case 0xEu:
case 0xFu:
case 0x10u:
case 0x11u:
case 0x12u:
result = *(_QWORD *)v2;
--**(_DWORD **)v2;
break;
case 9u:
case 0xCu:
v8 = *(_QWORD *)(*(_QWORD *)v2 + 16LL);
v9 = *(int *)(*(_QWORD *)v2 + 8LL);
*(_DWORD *)(*(_QWORD *)v2 + 8LL) = v9 - 1;
v10 = *(long long **)(v8 + 8 * v9);
v10[1] = 0LL;
result = *v10;
*(_BYTE *)result = 0;
break;
case 0xAu:
case 0xBu:
v6 = *(_QWORD *)(*(_QWORD *)v2 + 16LL);
v7 = *(int *)(*(_QWORD *)v2 + 8LL);
*(_DWORD *)(*(_QWORD *)v2 + 8LL) = v7 - 1;
result = (*(long long ( **)(_QWORD))(**(_QWORD **)(v6 + 8 * v7) + 32LL))(*(_QWORD *)(v6 + 8 * v7));
break;
default:
return result;
}
return result;
}
|
RemoveLast:
PUSH R14
PUSH RBX
SUB RSP,0x48
CALL 0x00193e0e
MOV RBX,RAX
TEST RAX,RAX
JNZ 0x00196637
LEA RDX,[0x1bd498]
LEA R14,[RSP + 0x10]
MOV RDI,R14
MOV ESI,0x3
MOV ECX,0x341
CALL 0x001169ca
LAB_00196602:
LEA RSI,[0x1bd6ad]
MOV RDI,R14
CALL 0x001164c8
LEA RSI,[0x1bd6d2]
MOV RDI,RAX
CALL 0x001164c8
LAB_00196620:
LEA RDI,[RSP + 0xf]
MOV RSI,RAX
CALL 0x001165a2
LAB_0019662d:
LEA RDI,[RSP + 0x10]
CALL 0x001169e8
LAB_00196637:
MOVZX EAX,byte ptr [RBX + 0x8]
LEA RCX,[0x1bf0c0]
MOV EAX,dword ptr [RCX + RAX*0x4]
DEC EAX
CMP EAX,0x9
JA 0x00196661
LEA RCX,[0x1bd14c]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
MOV RAX,qword ptr [RBX]
DEC dword ptr [RAX]
default:
ADD RSP,0x48
POP RBX
POP R14
RET
caseD_a:
MOV RAX,qword ptr [RBX]
MOV RCX,qword ptr [RAX + 0x10]
MOVSXD RDX,dword ptr [RAX + 0x8]
LEA RSI,[RDX + -0x1]
MOV dword ptr [RAX + 0x8],ESI
MOV RDI,qword ptr [RCX + RDX*0x8]
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x20]
JMP 0x00196661
caseD_9:
MOV RAX,qword ptr [RBX]
MOV RCX,qword ptr [RAX + 0x10]
MOVSXD RDX,dword ptr [RAX + 0x8]
LEA RSI,[RDX + -0x1]
MOV dword ptr [RAX + 0x8],ESI
MOV RAX,qword ptr [RCX + RDX*0x8]
MOV qword ptr [RAX + 0x8],0x0
MOV RAX,qword ptr [RAX]
MOV byte ptr [RAX],0x0
JMP 0x00196661
|
/* google::protobuf::internal::ExtensionSet::RemoveLast(int) */
void __thiscall google::protobuf::internal::ExtensionSet::RemoveLast(ExtensionSet *this,int param_1)
{
int iVar1;
long lVar2;
int8 *puVar3;
long *plVar4;
LogMessage *pLVar5;
LogFinisher local_49;
LogMessage local_48 [56];
plVar4 = (long *)FindOrNull(this,param_1);
if (plVar4 == (long *)0x0) {
LogMessage::LogMessage
(local_48,3,
"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/extension_set.cc"
,0x341);
/* try { // try from 00196602 to 0019661f has its CatchHandler @ 001966af */
pLVar5 = (LogMessage *)LogMessage::operator<<(local_48,"CHECK failed: extension != nullptr: ");
pLVar5 = (LogMessage *)LogMessage::operator<<(pLVar5,"Index out-of-bounds (field is empty).");
/* try { // try from 00196620 to 0019662c has its CatchHandler @ 001966ad */
LogFinisher::operator=(&local_49,pLVar5);
LogMessage::~LogMessage(local_48);
}
switch(*(int4 *)(WireFormatLite::kFieldTypeToCppTypeMap + (ulong)*(byte *)(plVar4 + 1) * 4))
{
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
*(int *)*plVar4 = *(int *)*plVar4 + -1;
break;
case 9:
lVar2 = *plVar4;
iVar1 = *(int *)(lVar2 + 8);
*(int *)(lVar2 + 8) = iVar1 + -1;
puVar3 = *(int8 **)(*(long *)(lVar2 + 0x10) + (long)iVar1 * 8);
puVar3[1] = 0;
*(int1 *)*puVar3 = 0;
break;
case 10:
lVar2 = *plVar4;
iVar1 = *(int *)(lVar2 + 8);
*(int *)(lVar2 + 8) = iVar1 + -1;
(**(code **)(**(long **)(*(long *)(lVar2 + 0x10) + (long)iVar1 * 8) + 0x20))();
}
return;
}
|
|
7,652 |
list_free
|
eloqsql/libmariadb/libmariadb/ma_list.c
|
void list_free(LIST *root, unsigned int free_data)
{
LIST *next;
while (root)
{
next=root->next;
if (free_data)
free(root->data);
free(root);
root=next;
}
}
|
O3
|
c
|
list_free:
testq %rdi, %rdi
je 0x2e63e
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movq 0x8(%r14), %r15
testl %ebx, %ebx
je 0x2e624
movq 0x10(%r14), %rdi
callq 0x14590
movq %r14, %rdi
callq 0x14590
movq %r15, %r14
testq %r15, %r15
jne 0x2e613
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
list_free:
test rdi, rdi
jz short locret_2E63E
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov ebx, esi
mov r14, rdi
loc_2E613:
mov r15, [r14+8]
test ebx, ebx
jz short loc_2E624
mov rdi, [r14+10h]
call _free
loc_2E624:
mov rdi, r14
call _free
mov r14, r15
test r15, r15
jnz short loc_2E613
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
locret_2E63E:
retn
|
long long list_free(long long a1, int a2)
{
long long v2; // r14
long long v3; // r15
long long result; // rax
if ( a1 )
{
v2 = a1;
do
{
v3 = *(_QWORD *)(v2 + 8);
if ( a2 )
free(*(_QWORD *)(v2 + 16));
result = free(v2);
v2 = v3;
}
while ( v3 );
}
return result;
}
|
list_free:
TEST RDI,RDI
JZ 0x0012e63e
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EBX,ESI
MOV R14,RDI
LAB_0012e613:
MOV R15,qword ptr [R14 + 0x8]
TEST EBX,EBX
JZ 0x0012e624
MOV RDI,qword ptr [R14 + 0x10]
CALL 0x00114590
LAB_0012e624:
MOV RDI,R14
CALL 0x00114590
MOV R14,R15
TEST R15,R15
JNZ 0x0012e613
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
LAB_0012e63e:
RET
|
void list_free(void *param_1,int param_2)
{
void *pvVar1;
if (param_1 != (void *)0x0) {
do {
pvVar1 = *(void **)((long)param_1 + 8);
if (param_2 != 0) {
free(*(void **)((long)param_1 + 0x10));
}
free(param_1);
param_1 = pvVar1;
} while (pvVar1 != (void *)0x0);
}
return;
}
|
|
7,653 |
nlohmann::json_abi_v3_11_3::detail::binary_reader<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>>>>, parse_json(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>&, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)::json_error_locator>::get_bson_cstr(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
|
monkey531[P]llama/common/./json.hpp
|
bool get_bson_cstr(string_t& result)
{
auto out = std::back_inserter(result);
while (true)
{
get();
if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format_t::bson, "cstring")))
{
return false;
}
if (current == 0x00)
{
return true;
}
*out++ = static_cast<typename string_t::value_type>(current);
}
}
|
O0
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::binary_reader<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>>>>, parse_json(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>&, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)::json_error_locator>::get_bson_cstr(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&):
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq 0x28(%rsp), %rax
movq %rax, (%rsp)
movq 0x20(%rsp), %rdi
callq 0x131e20
movq %rax, 0x18(%rsp)
movq (%rsp), %rdi
callq 0x1adc50
movq (%rsp), %rdi
movl $0x4, %esi
leaq 0x41deb(%rip), %rdx # 0x1f02ea
callq 0x1ae1b0
xorb $-0x1, %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x1ae510
jmp 0x1ae517
movb $0x0, 0x37(%rsp)
jmp 0x1ae55d
movq (%rsp), %rax
cmpl $0x0, 0x10(%rax)
jne 0x1ae528
movb $0x1, 0x37(%rsp)
jmp 0x1ae55d
movq (%rsp), %rax
movl 0x10(%rax), %eax
movb %al, 0x17(%rsp)
leaq 0x18(%rsp), %rdi
xorl %esi, %esi
callq 0x132e90
movq %rax, 0x8(%rsp)
leaq 0x8(%rsp), %rdi
callq 0x132da0
movq %rax, %rdi
leaq 0x17(%rsp), %rsi
callq 0x132eb0
jmp 0x1ae4e6
movb 0x37(%rsp), %al
andb $0x1, %al
addq $0x38, %rsp
retq
nopl (%rax,%rax)
|
_ZN8nlohmann16json_abi_v3_11_36detail13binary_readerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEZL10parse_jsonRSL_RKSL_RSF_E18json_error_locatorE13get_bson_cstrERSB_:
sub rsp, 38h
mov [rsp+38h+var_10], rdi
mov [rsp+38h+var_18], rsi
mov rax, [rsp+38h+var_10]
mov [rsp+38h+var_38], rax
mov rdi, [rsp+38h+var_18]
call _ZSt13back_inserterINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt20back_insert_iteratorIT_ERS7_; std::back_inserter<std::string>(std::string&)
mov [rsp+38h+var_20], rax
loc_1AE4E6:
mov rdi, [rsp+38h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail13binary_readerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEZL10parse_jsonRSL_RKSL_RSF_E18json_error_locatorE3getEv; nlohmann::json_abi_v3_11_3::detail::binary_reader<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>,parse_json(__gnu_cxx::__normal_iterator<char const*,std::string>&,__gnu_cxx::__normal_iterator<char const*,std::string> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&)::json_error_locator>::get(void)
mov rdi, [rsp+38h+var_38]
mov esi, 4
lea rdx, aCstring; "cstring"
call _ZNK8nlohmann16json_abi_v3_11_36detail13binary_readerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEZL10parse_jsonRSL_RKSL_RSF_E18json_error_locatorE12unexpect_eofENS1_14input_format_tESK_; nlohmann::json_abi_v3_11_3::detail::binary_reader<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>,parse_json(__gnu_cxx::__normal_iterator<char const*,std::string>&,__gnu_cxx::__normal_iterator<char const*,std::string> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&)::json_error_locator>::unexpect_eof(nlohmann::json_abi_v3_11_3::detail::input_format_t,char const*)
xor al, 0FFh
xor al, 0FFh
xor al, 0FFh
test al, 1
jnz short loc_1AE510
jmp short loc_1AE517
loc_1AE510:
mov [rsp+38h+var_1], 0
jmp short loc_1AE55D
loc_1AE517:
mov rax, [rsp+38h+var_38]
cmp dword ptr [rax+10h], 0
jnz short loc_1AE528
mov [rsp+38h+var_1], 1
jmp short loc_1AE55D
loc_1AE528:
mov rax, [rsp+38h+var_38]
mov eax, [rax+10h]
mov [rsp+38h+var_21], al
lea rdi, [rsp+38h+var_20]
xor esi, esi
call _ZNSt20back_insert_iteratorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEi; std::back_insert_iterator<std::string>::operator++(int)
mov [rsp+38h+var_30], rax
lea rdi, [rsp+38h+var_30]
call _ZNSt20back_insert_iteratorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv; std::back_insert_iterator<std::string>::operator*(void)
mov rdi, rax
lea rsi, [rsp+38h+var_21]
call _ZNSt20back_insert_iteratorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEaSEOc; std::back_insert_iterator<std::string>::operator=(char &&)
jmp short loc_1AE4E6
loc_1AE55D:
mov al, [rsp+38h+var_1]
and al, 1
add rsp, 38h
retn
|
char nlohmann::json_abi_v3_11_3::detail::binary_reader<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>>,parse_json(__gnu_cxx::__normal_iterator<char const*,std::string>&,__gnu_cxx::__normal_iterator<char const*,std::string> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>&)::json_error_locator>::get_bson_cstr(
long long a1,
long long a2)
{
_QWORD *v2; // rax
long long v4; // [rsp+8h] [rbp-30h] BYREF
char v5; // [rsp+17h] [rbp-21h] BYREF
_QWORD v6[3]; // [rsp+18h] [rbp-20h] BYREF
v6[2] = a1;
v6[1] = a2;
v6[0] = std::back_inserter<std::string>(a2);
while ( 1 )
{
nlohmann::json_abi_v3_11_3::detail::binary_reader<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>>,parse_json(__gnu_cxx::__normal_iterator<char const*,std::string>&,__gnu_cxx::__normal_iterator<char const*,std::string> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>&)::json_error_locator>::get(a1);
if ( (nlohmann::json_abi_v3_11_3::detail::binary_reader<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>>,parse_json(__gnu_cxx::__normal_iterator<char const*,std::string>&,__gnu_cxx::__normal_iterator<char const*,std::string> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>&)::json_error_locator>::unexpect_eof(
a1,
4LL,
(long long)"cstring") & 1) == 0 )
return 0;
if ( !*(_DWORD *)(a1 + 16) )
break;
v5 = *(_DWORD *)(a1 + 16);
v4 = std::back_insert_iterator<std::string>::operator++((long long)v6);
v2 = (_QWORD *)std::back_insert_iterator<std::string>::operator*((long long)&v4);
std::back_insert_iterator<std::string>::operator=(v2, &v5);
}
return 1;
}
|
construct<std::__cxx11::string,char_const(&)[4]>:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV qword ptr [RSP + 0x8],RSI
MOV qword ptr [RSP],RDX
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP]
CALL 0x001ae790
ADD RSP,0x18
RET
|
/* void std::allocator_traits<std::allocator<std::__cxx11::string >
>::construct<std::__cxx11::string, char const (&) [4]>(std::allocator<std::__cxx11::string >&,
std::__cxx11::string*, char const (&) [4]) */
void std::allocator_traits<std::allocator<std::__cxx11::string>>::
construct<std::__cxx11::string,char_const(&)[4]>
(allocator *param_1,string *param_2,char *param_3)
{
__gnu_cxx::new_allocator<std::__cxx11::string>::construct<std::__cxx11::string,char_const(&)[4]>
((new_allocator<std::__cxx11::string> *)param_1,param_2,param_3);
return;
}
|
|
7,654 |
mthd_stmt_read_prepare_response
|
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
|
my_bool mthd_stmt_read_prepare_response(MYSQL_STMT *stmt)
{
ulong packet_length;
uchar *p;
if ((packet_length= ma_net_safe_read(stmt->mysql)) == packet_error)
return(1);
p= (uchar *)stmt->mysql->net.read_pos;
if (0xFF == p[0]) /* Error occurred */
{
return(1);
}
p++;
stmt->stmt_id= uint4korr(p);
p+= 4;
stmt->field_count= uint2korr(p);
p+= 2;
stmt->param_count= uint2korr(p);
p+= 2;
/* filler */
p++;
/* for backward compatibility we also update mysql->warning_count */
stmt->mysql->warning_count= stmt->upsert_status.warning_count= uint2korr(p);
/* metadata not supported yet */
if (stmt->param_count &&
stmt->mysql->methods->db_stmt_get_param_metadata(stmt))
{
return 1;
}
/* allocated bind buffer for parameters */
if (stmt->field_count &&
stmt->mysql->methods->db_stmt_get_result_metadata(stmt))
{
return 1;
}
if (stmt->param_count)
{
if (stmt->prebind_params)
{
if (stmt->prebind_params != stmt->param_count)
{
SET_CLIENT_STMT_ERROR(stmt, CR_INVALID_PARAMETER_NO, SQLSTATE_UNKNOWN, 0);
stmt->param_count= stmt->prebind_params;
return 1;
}
} else {
if (!(stmt->params= (MYSQL_BIND *)ma_alloc_root(&stmt->mem_root, stmt->param_count * sizeof(MYSQL_BIND))))
{
SET_CLIENT_STMT_ERROR(stmt, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0);
return 1;
}
memset(stmt->params, '\0', stmt->param_count * sizeof(MYSQL_BIND));
}
}
/* allocated bind buffer for result */
if (stmt->field_count)
{
MA_MEM_ROOT *fields_ma_alloc_root= &((MADB_STMT_EXTENSION *)stmt->extension)->fields_ma_alloc_root;
if (!(stmt->bind= (MYSQL_BIND *)ma_alloc_root(fields_ma_alloc_root, stmt->field_count * sizeof(MYSQL_BIND))))
{
SET_CLIENT_STMT_ERROR(stmt, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0);
return 1;
}
memset(stmt->bind, 0, sizeof(MYSQL_BIND) * stmt->field_count);
}
stmt->state = MYSQL_STMT_PREPARED;
return(0);
}
|
O3
|
c
|
mthd_stmt_read_prepare_response:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x38(%rdi), %rdi
callq 0x18ed3
movb $0x1, %bl
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
cmpq %rcx, %rax
je 0x248b2
movq 0x38(%r14), %rax
movq 0x20(%rax), %rcx
cmpb $-0x1, (%rcx)
je 0x248b2
movl 0x1(%rcx), %edx
movq %rdx, 0x40(%r14)
movzwl 0x5(%rcx), %edx
movl %edx, 0x60(%r14)
movzwl 0x7(%rcx), %edx
movl %edx, 0x64(%r14)
movzwl 0xa(%rcx), %ecx
movl %ecx, 0xf0(%r14)
movl %ecx, 0x388(%rax)
cmpl $0x0, 0x64(%r14)
je 0x24752
movq 0x38(%r14), %rax
movq 0x4d0(%rax), %rax
movq %r14, %rdi
callq *0x58(%rax)
testb %al, %al
jne 0x248b2
cmpl $0x0, 0x60(%r14)
je 0x24772
movq 0x38(%r14), %rax
movq 0x4d0(%rax), %rax
movq %r14, %rdi
callq *0x50(%rax)
testb %al, %al
jne 0x248b2
movl 0x64(%r14), %eax
testq %rax, %rax
je 0x2481f
movl 0x378(%r14), %ecx
testl %ecx, %ecx
je 0x247f8
cmpl %eax, %ecx
je 0x2481f
movl $0x7f2, 0x108(%r14) # imm = 0x7F2
leaq 0x30d(%r14), %rdi
leaq 0x2a5e5(%rip), %rax # 0x4ed90
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13220
xorl %r15d, %r15d
movb %r15b, 0x312(%r14)
leaq 0x10c(%r14), %rdi
leaq 0x2a5d0(%rip), %rax # 0x4eda0
movq 0x110(%rax), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x13220
movb %r15b, 0x30b(%r14)
movl 0x378(%r14), %eax
movl %eax, 0x64(%r14)
jmp 0x248b2
imulq $0x70, %rax, %rsi
movq %r14, %rdi
callq 0x2170b
movq %rax, 0x70(%r14)
testq %rax, %rax
je 0x2485f
movl 0x64(%r14), %ecx
imulq $0x70, %rcx, %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x13260
movl 0x60(%r14), %eax
testq %rax, %rax
je 0x24853
movq 0x340(%r14), %rdi
imulq $0x70, %rax, %rsi
callq 0x2170b
movq %rax, 0x78(%r14)
testq %rax, %rax
je 0x2485f
movl 0x60(%r14), %ecx
imulq $0x70, %rcx, %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x13260
movl $0x1, 0x50(%r14)
xorl %ebx, %ebx
jmp 0x248b2
movl $0x7d8, 0x108(%r14) # imm = 0x7D8
leaq 0x30d(%r14), %rdi
leaq 0x2a518(%rip), %rax # 0x4ed90
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13220
xorl %r15d, %r15d
movb %r15b, 0x312(%r14)
leaq 0x10c(%r14), %rdi
leaq 0x2a503(%rip), %rax # 0x4eda0
movq 0x40(%rax), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x13220
movb %r15b, 0x30b(%r14)
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
mthd_stmt_read_prepare_response:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov r14, rdi
mov rdi, [rdi+38h]
call ma_net_safe_read
mov bl, 1
mov ecx, 0FFFFFFFFh
cmp rax, rcx
jz loc_248B2
mov rax, [r14+38h]
mov rcx, [rax+20h]
cmp byte ptr [rcx], 0FFh
jz loc_248B2
mov edx, [rcx+1]
mov [r14+40h], rdx
movzx edx, word ptr [rcx+5]
mov [r14+60h], edx
movzx edx, word ptr [rcx+7]
mov [r14+64h], edx
movzx ecx, word ptr [rcx+0Ah]
mov [r14+0F0h], ecx
mov [rax+388h], ecx
cmp dword ptr [r14+64h], 0
jz short loc_24752
mov rax, [r14+38h]
mov rax, [rax+4D0h]
mov rdi, r14
call qword ptr [rax+58h]
test al, al
jnz loc_248B2
loc_24752:
cmp dword ptr [r14+60h], 0
jz short loc_24772
mov rax, [r14+38h]
mov rax, [rax+4D0h]
mov rdi, r14
call qword ptr [rax+50h]
test al, al
jnz loc_248B2
loc_24772:
mov eax, [r14+64h]
test rax, rax
jz loc_2481F
mov ecx, [r14+378h]
test ecx, ecx
jz short loc_247F8
cmp ecx, eax
jz loc_2481F
mov dword ptr [r14+108h], 7F2h
lea rdi, [r14+30Dh]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
xor r15d, r15d
mov [r14+312h], r15b
lea rdi, [r14+10Ch]
lea rax, client_errors
mov rsi, [rax+110h]
mov edx, 200h
call _strncpy
mov [r14+30Bh], r15b
mov eax, [r14+378h]
mov [r14+64h], eax
jmp loc_248B2
loc_247F8:
imul rsi, rax, 70h ; 'p'
mov rdi, r14
call ma_alloc_root
mov [r14+70h], rax
test rax, rax
jz short loc_2485F
mov ecx, [r14+64h]
imul rdx, rcx, 70h ; 'p'
mov rdi, rax
xor esi, esi
call _memset
loc_2481F:
mov eax, [r14+60h]
test rax, rax
jz short loc_24853
mov rdi, [r14+340h]
imul rsi, rax, 70h ; 'p'
call ma_alloc_root
mov [r14+78h], rax
test rax, rax
jz short loc_2485F
mov ecx, [r14+60h]
imul rdx, rcx, 70h ; 'p'
mov rdi, rax
xor esi, esi
call _memset
loc_24853:
mov dword ptr [r14+50h], 1
xor ebx, ebx
jmp short loc_248B2
loc_2485F:
mov dword ptr [r14+108h], 7D8h
lea rdi, [r14+30Dh]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
xor r15d, r15d
mov [r14+312h], r15b
lea rdi, [r14+10Ch]
lea rax, client_errors
mov rsi, [rax+40h]
mov edx, 200h
call _strncpy
mov [r14+30Bh], r15b
loc_248B2:
mov eax, ebx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long mthd_stmt_read_prepare_response(
long long a1,
long long a2,
long long a3,
long long a4,
unsigned long long a5,
int a6)
{
unsigned int v6; // ebx
long long v7; // rax
long long v8; // rcx
int v9; // ecx
long long v10; // rax
int v11; // ecx
char *v12; // rax
char *v13; // rax
LOBYTE(v6) = 1;
if ( ma_net_safe_read(*(_QWORD *)(a1 + 56), a2, a3, a4, a5, a6) != 0xFFFFFFFF )
{
v7 = *(_QWORD *)(a1 + 56);
v8 = *(_QWORD *)(v7 + 32);
if ( *(_BYTE *)v8 != 0xFF )
{
*(_QWORD *)(a1 + 64) = *(unsigned int *)(v8 + 1);
*(_DWORD *)(a1 + 96) = *(unsigned __int16 *)(v8 + 5);
*(_DWORD *)(a1 + 100) = *(unsigned __int16 *)(v8 + 7);
v9 = *(unsigned __int16 *)(v8 + 10);
*(_DWORD *)(a1 + 240) = v9;
*(_DWORD *)(v7 + 904) = v9;
if ( (!*(_DWORD *)(a1 + 100)
|| !(*(unsigned __int8 ( **)(long long))(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 1232LL) + 88LL))(a1))
&& (!*(_DWORD *)(a1 + 96)
|| !(*(unsigned __int8 ( **)(long long))(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 1232LL) + 80LL))(a1)) )
{
v10 = *(unsigned int *)(a1 + 100);
if ( *(_DWORD *)(a1 + 100) )
{
v11 = *(_DWORD *)(a1 + 888);
if ( v11 )
{
if ( v11 != (_DWORD)v10 )
{
*(_DWORD *)(a1 + 264) = 2034;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 786) = 0;
strncpy(a1 + 268, client_errors[34], 512LL);
*(_BYTE *)(a1 + 779) = 0;
*(_DWORD *)(a1 + 100) = *(_DWORD *)(a1 + 888);
return v6;
}
}
else
{
v12 = ma_alloc_root(a1, 112 * v10);
*(_QWORD *)(a1 + 112) = v12;
if ( !v12 )
goto LABEL_17;
memset(v12, 0LL, 112LL * *(unsigned int *)(a1 + 100));
}
}
if ( !*(_DWORD *)(a1 + 96) )
{
LABEL_16:
*(_DWORD *)(a1 + 80) = 1;
return 0;
}
v13 = ma_alloc_root(*(_QWORD *)(a1 + 832), 112LL * *(unsigned int *)(a1 + 96));
*(_QWORD *)(a1 + 120) = v13;
if ( v13 )
{
memset(v13, 0LL, 112LL * *(unsigned int *)(a1 + 96));
goto LABEL_16;
}
LABEL_17:
*(_DWORD *)(a1 + 264) = 2008;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 786) = 0;
strncpy(a1 + 268, client_errors[8], 512LL);
*(_BYTE *)(a1 + 779) = 0;
}
}
}
return v6;
}
|
mthd_stmt_read_prepare_response:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RDI
MOV RDI,qword ptr [RDI + 0x38]
CALL 0x00118ed3
MOV BL,0x1
MOV ECX,0xffffffff
CMP RAX,RCX
JZ 0x001248b2
MOV RAX,qword ptr [R14 + 0x38]
MOV RCX,qword ptr [RAX + 0x20]
CMP byte ptr [RCX],0xff
JZ 0x001248b2
MOV EDX,dword ptr [RCX + 0x1]
MOV qword ptr [R14 + 0x40],RDX
MOVZX EDX,word ptr [RCX + 0x5]
MOV dword ptr [R14 + 0x60],EDX
MOVZX EDX,word ptr [RCX + 0x7]
MOV dword ptr [R14 + 0x64],EDX
MOVZX ECX,word ptr [RCX + 0xa]
MOV dword ptr [R14 + 0xf0],ECX
MOV dword ptr [RAX + 0x388],ECX
CMP dword ptr [R14 + 0x64],0x0
JZ 0x00124752
MOV RAX,qword ptr [R14 + 0x38]
MOV RAX,qword ptr [RAX + 0x4d0]
MOV RDI,R14
CALL qword ptr [RAX + 0x58]
TEST AL,AL
JNZ 0x001248b2
LAB_00124752:
CMP dword ptr [R14 + 0x60],0x0
JZ 0x00124772
MOV RAX,qword ptr [R14 + 0x38]
MOV RAX,qword ptr [RAX + 0x4d0]
MOV RDI,R14
CALL qword ptr [RAX + 0x50]
TEST AL,AL
JNZ 0x001248b2
LAB_00124772:
MOV EAX,dword ptr [R14 + 0x64]
TEST RAX,RAX
JZ 0x0012481f
MOV ECX,dword ptr [R14 + 0x378]
TEST ECX,ECX
JZ 0x001247f8
CMP ECX,EAX
JZ 0x0012481f
MOV dword ptr [R14 + 0x108],0x7f2
LEA RDI,[R14 + 0x30d]
LEA RAX,[0x14ed90]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113220
XOR R15D,R15D
MOV byte ptr [R14 + 0x312],R15B
LEA RDI,[R14 + 0x10c]
LEA RAX,[0x14eda0]
MOV RSI,qword ptr [RAX + 0x110]
MOV EDX,0x200
CALL 0x00113220
MOV byte ptr [R14 + 0x30b],R15B
MOV EAX,dword ptr [R14 + 0x378]
MOV dword ptr [R14 + 0x64],EAX
JMP 0x001248b2
LAB_001247f8:
IMUL RSI,RAX,0x70
MOV RDI,R14
CALL 0x0012170b
MOV qword ptr [R14 + 0x70],RAX
TEST RAX,RAX
JZ 0x0012485f
MOV ECX,dword ptr [R14 + 0x64]
IMUL RDX,RCX,0x70
MOV RDI,RAX
XOR ESI,ESI
CALL 0x00113260
LAB_0012481f:
MOV EAX,dword ptr [R14 + 0x60]
TEST RAX,RAX
JZ 0x00124853
MOV RDI,qword ptr [R14 + 0x340]
IMUL RSI,RAX,0x70
CALL 0x0012170b
MOV qword ptr [R14 + 0x78],RAX
TEST RAX,RAX
JZ 0x0012485f
MOV ECX,dword ptr [R14 + 0x60]
IMUL RDX,RCX,0x70
MOV RDI,RAX
XOR ESI,ESI
CALL 0x00113260
LAB_00124853:
MOV dword ptr [R14 + 0x50],0x1
XOR EBX,EBX
JMP 0x001248b2
LAB_0012485f:
MOV dword ptr [R14 + 0x108],0x7d8
LEA RDI,[R14 + 0x30d]
LEA RAX,[0x14ed90]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113220
XOR R15D,R15D
MOV byte ptr [R14 + 0x312],R15B
LEA RDI,[R14 + 0x10c]
LEA RAX,[0x14eda0]
MOV RSI,qword ptr [RAX + 0x40]
MOV EDX,0x200
CALL 0x00113220
MOV byte ptr [R14 + 0x30b],R15B
LAB_001248b2:
MOV EAX,EBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
ulong mthd_stmt_read_prepare_response(long param_1)
{
ushort uVar1;
char *pcVar2;
char cVar3;
long lVar4;
void *pvVar5;
int8 unaff_RBX;
ulong uVar6;
lVar4 = ma_net_safe_read(*(int8 *)(param_1 + 0x38));
uVar6 = CONCAT71((int7)((ulong)unaff_RBX >> 8),1);
if (lVar4 == 0xffffffff) goto LAB_001248b2;
pcVar2 = *(char **)(*(long *)(param_1 + 0x38) + 0x20);
if (*pcVar2 == -1) goto LAB_001248b2;
*(ulong *)(param_1 + 0x40) = (ulong)*(uint *)(pcVar2 + 1);
*(uint *)(param_1 + 0x60) = (uint)*(ushort *)(pcVar2 + 5);
*(uint *)(param_1 + 100) = (uint)*(ushort *)(pcVar2 + 7);
uVar1 = *(ushort *)(pcVar2 + 10);
*(uint *)(param_1 + 0xf0) = (uint)uVar1;
*(uint *)(*(long *)(param_1 + 0x38) + 0x388) = (uint)uVar1;
if (*(int *)(param_1 + 100) != 0) {
cVar3 = (**(code **)(*(long *)(*(long *)(param_1 + 0x38) + 0x4d0) + 0x58))(param_1);
if (cVar3 != '\0') goto LAB_001248b2;
}
if (*(int *)(param_1 + 0x60) != 0) {
cVar3 = (**(code **)(*(long *)(*(long *)(param_1 + 0x38) + 0x4d0) + 0x50))(param_1);
if (cVar3 != '\0') goto LAB_001248b2;
}
if (*(int *)(param_1 + 100) == 0) {
LAB_0012481f:
if (*(int *)(param_1 + 0x60) != 0) {
pvVar5 = (void *)ma_alloc_root(*(int8 *)(param_1 + 0x340));
*(void **)(param_1 + 0x78) = pvVar5;
if (pvVar5 == (void *)0x0) goto LAB_0012485f;
memset(pvVar5,0,(ulong)*(uint *)(param_1 + 0x60) * 0x70);
}
*(int4 *)(param_1 + 0x50) = 1;
uVar6 = 0;
}
else {
if (*(int *)(param_1 + 0x378) != 0) {
if (*(int *)(param_1 + 0x378) != *(int *)(param_1 + 100)) {
*(int4 *)(param_1 + 0x108) = 0x7f2;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
strncpy((char *)(param_1 + 0x10c),PTR_s_Invalid_parameter_number_0014eeb0,0x200);
*(int1 *)(param_1 + 0x30b) = 0;
*(int4 *)(param_1 + 100) = *(int4 *)(param_1 + 0x378);
goto LAB_001248b2;
}
goto LAB_0012481f;
}
pvVar5 = (void *)ma_alloc_root(param_1);
*(void **)(param_1 + 0x70) = pvVar5;
if (pvVar5 != (void *)0x0) {
memset(pvVar5,0,(ulong)*(uint *)(param_1 + 100) * 0x70);
goto LAB_0012481f;
}
LAB_0012485f:
*(int4 *)(param_1 + 0x108) = 0x7d8;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
strncpy((char *)(param_1 + 0x10c),PTR_s_Client_run_out_of_memory_0014ede0,0x200);
*(int1 *)(param_1 + 0x30b) = 0;
}
LAB_001248b2:
return uVar6 & 0xffffffff;
}
|
|
7,655 |
mysql_close_options
|
eloqsql/libmariadb/libmariadb/mariadb_lib.c
|
static void mysql_close_options(MYSQL *mysql)
{
if (mysql->options.init_command)
{
char **begin= (char **)mysql->options.init_command->buffer;
char **end= begin + mysql->options.init_command->elements;
for (;begin < end; begin++)
free(*begin);
ma_delete_dynamic(mysql->options.init_command);
free(mysql->options.init_command);
}
free(mysql->options.user);
free(mysql->options.host);
free(mysql->options.password);
free(mysql->options.unix_socket);
free(mysql->options.db);
free(mysql->options.my_cnf_file);
free(mysql->options.my_cnf_group);
free(mysql->options.charset_dir);
free(mysql->options.charset_name);
free(mysql->options.bind_address);
free(mysql->options.ssl_key);
free(mysql->options.ssl_cert);
free(mysql->options.ssl_ca);
free(mysql->options.ssl_capath);
free(mysql->options.ssl_cipher);
if (mysql->options.extension)
{
struct mysql_async_context *ctxt;
if ((ctxt = mysql->options.extension->async_context))
{
my_context_destroy(&ctxt->async_context);
free(ctxt);
mysql->options.extension->async_context= 0;
}
free(mysql->options.extension->plugin_dir);
free(mysql->options.extension->default_auth);
free(mysql->options.extension->db_driver);
free(mysql->options.extension->ssl_crl);
free(mysql->options.extension->ssl_crlpath);
free(mysql->options.extension->tls_fp);
free(mysql->options.extension->tls_fp_list);
free(mysql->options.extension->tls_pw);
free(mysql->options.extension->tls_version);
free(mysql->options.extension->url);
free(mysql->options.extension->connection_handler);
free(mysql->options.extension->proxy_header);
if(ma_hashtbl_inited(&mysql->options.extension->connect_attrs))
ma_hashtbl_free(&mysql->options.extension->connect_attrs);
if (ma_hashtbl_inited(&mysql->options.extension->userdata))
ma_hashtbl_free(&mysql->options.extension->userdata);
free(mysql->options.extension->restricted_auth);
free(mysql->options.extension->rpl_host);
}
free(mysql->options.extension);
/* clear all pointer */
memset(&mysql->options, 0, sizeof(mysql->options));
}
|
O3
|
c
|
mysql_close_options:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x3d8(%rdi), %rdi
testq %rdi, %rdi
je 0x1e51d
movl 0x8(%rdi), %eax
testq %rax, %rax
je 0x1e50c
movq (%rdi), %r14
leaq (%r14,%rax,8), %r15
movq (%r14), %rdi
callq 0x13580
addq $0x8, %r14
cmpq %r15, %r14
jb 0x1e4f4
movq 0x3d8(%rbx), %rdi
callq 0x3433c
movq 0x3d8(%rbx), %rdi
callq 0x13580
movq 0x3b8(%rbx), %rdi
callq 0x13580
movq 0x3b0(%rbx), %rdi
callq 0x13580
movq 0x3c0(%rbx), %rdi
callq 0x13580
movq 0x3c8(%rbx), %rdi
callq 0x13580
movq 0x3d0(%rbx), %rdi
callq 0x13580
movq 0x3e0(%rbx), %rdi
callq 0x13580
movq 0x3e8(%rbx), %rdi
callq 0x13580
movq 0x3f0(%rbx), %rdi
callq 0x13580
movq 0x3f8(%rbx), %rdi
callq 0x13580
movq 0x448(%rbx), %rdi
callq 0x13580
movq 0x400(%rbx), %rdi
callq 0x13580
movq 0x408(%rbx), %rdi
callq 0x13580
movq 0x410(%rbx), %rdi
callq 0x13580
movq 0x418(%rbx), %rdi
callq 0x13580
movq 0x420(%rbx), %rdi
callq 0x13580
movq 0x480(%rbx), %rax
testq %rax, %rax
je 0x1e744
movq 0x28(%rax), %r14
testq %r14, %r14
je 0x1e611
leaq 0x38(%r14), %rdi
callq 0x32321
movq %r14, %rdi
callq 0x13580
movq 0x480(%rbx), %rax
movq $0x0, 0x28(%rax)
movq 0x480(%rbx), %rax
movq (%rax), %rdi
callq 0x13580
movq 0x480(%rbx), %rax
movq 0x8(%rax), %rdi
callq 0x13580
movq 0x480(%rbx), %rax
movq 0x88(%rax), %rdi
callq 0x13580
movq 0x480(%rbx), %rax
movq 0x10(%rax), %rdi
callq 0x13580
movq 0x480(%rbx), %rax
movq 0x18(%rax), %rdi
callq 0x13580
movq 0x480(%rbx), %rax
movq 0x90(%rax), %rdi
callq 0x13580
movq 0x480(%rbx), %rax
movq 0x98(%rax), %rdi
callq 0x13580
movq 0x480(%rbx), %rax
movq 0xa0(%rax), %rdi
callq 0x13580
movq 0x480(%rbx), %rax
movq 0xc0(%rax), %rdi
callq 0x13580
movq 0x480(%rbx), %rax
movq 0xb0(%rax), %rdi
callq 0x13580
movq 0x480(%rbx), %rax
movq 0xd0(%rax), %rdi
callq 0x13580
movq 0x480(%rbx), %rax
movq 0x130(%rax), %rdi
callq 0x13580
movq 0x480(%rbx), %rdi
cmpq $0x0, 0x48(%rdi)
je 0x1e6ff
addq $0x30, %rdi
callq 0x34f21
movq 0x480(%rbx), %rdi
cmpq $0x0, 0xf8(%rdi)
je 0x1e71c
addq $0xe0, %rdi
callq 0x34f21
movq 0x480(%rbx), %rdi
movq 0x150(%rdi), %rdi
callq 0x13580
movq 0x480(%rbx), %rax
movq 0x158(%rax), %rdi
callq 0x13580
movq 0x480(%rbx), %rdi
jmp 0x1e746
xorl %edi, %edi
addq $0x390, %rbx # imm = 0x390
callq 0x13580
movl $0xf8, %edx
movq %rbx, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x13270
|
mysql_close_options:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rdi
mov rdi, [rdi+3D8h]
test rdi, rdi
jz short loc_1E51D
mov eax, [rdi+8]
test rax, rax
jz short loc_1E50C
mov r14, [rdi]
lea r15, [r14+rax*8]
loc_1E4F4:
mov rdi, [r14]
call _free
add r14, 8
cmp r14, r15
jb short loc_1E4F4
mov rdi, [rbx+3D8h]
loc_1E50C:
call ma_delete_dynamic
mov rdi, [rbx+3D8h]
call _free
loc_1E51D:
mov rdi, [rbx+3B8h]
call _free
mov rdi, [rbx+3B0h]
call _free
mov rdi, [rbx+3C0h]
call _free
mov rdi, [rbx+3C8h]
call _free
mov rdi, [rbx+3D0h]
call _free
mov rdi, [rbx+3E0h]
call _free
mov rdi, [rbx+3E8h]
call _free
mov rdi, [rbx+3F0h]
call _free
mov rdi, [rbx+3F8h]
call _free
mov rdi, [rbx+448h]
call _free
mov rdi, [rbx+400h]
call _free
mov rdi, [rbx+408h]
call _free
mov rdi, [rbx+410h]
call _free
mov rdi, [rbx+418h]
call _free
mov rdi, [rbx+420h]
call _free
mov rax, [rbx+480h]
test rax, rax
jz loc_1E744
mov r14, [rax+28h]
test r14, r14
jz short loc_1E611
lea rdi, [r14+38h]
call my_context_destroy
mov rdi, r14
call _free
mov rax, [rbx+480h]
mov qword ptr [rax+28h], 0
mov rax, [rbx+480h]
loc_1E611:
mov rdi, [rax]
call _free
mov rax, [rbx+480h]
mov rdi, [rax+8]
call _free
mov rax, [rbx+480h]
mov rdi, [rax+88h]
call _free
mov rax, [rbx+480h]
mov rdi, [rax+10h]
call _free
mov rax, [rbx+480h]
mov rdi, [rax+18h]
call _free
mov rax, [rbx+480h]
mov rdi, [rax+90h]
call _free
mov rax, [rbx+480h]
mov rdi, [rax+98h]
call _free
mov rax, [rbx+480h]
mov rdi, [rax+0A0h]
call _free
mov rax, [rbx+480h]
mov rdi, [rax+0C0h]
call _free
mov rax, [rbx+480h]
mov rdi, [rax+0B0h]
call _free
mov rax, [rbx+480h]
mov rdi, [rax+0D0h]
call _free
mov rax, [rbx+480h]
mov rdi, [rax+130h]
call _free
mov rdi, [rbx+480h]
cmp qword ptr [rdi+48h], 0
jz short loc_1E6FF
add rdi, 30h ; '0'
call ma_hashtbl_free
mov rdi, [rbx+480h]
loc_1E6FF:
cmp qword ptr [rdi+0F8h], 0
jz short loc_1E71C
add rdi, 0E0h
call ma_hashtbl_free
mov rdi, [rbx+480h]
loc_1E71C:
mov rdi, [rdi+150h]
call _free
mov rax, [rbx+480h]
mov rdi, [rax+158h]
call _free
mov rdi, [rbx+480h]
jmp short loc_1E746
loc_1E744:
xor edi, edi
loc_1E746:
add rbx, 390h
call _free
mov edx, 0F8h
mov rdi, rbx
xor esi, esi
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
jmp _memset
|
long long mysql_close_options(_QWORD *a1)
{
long long v2; // rdi
_QWORD *v3; // r14
unsigned long long v4; // r15
_QWORD *v5; // rax
long long v6; // r14
_QWORD *v7; // rdi
long long v8; // rdi
v2 = a1[123];
if ( v2 )
{
if ( *(_DWORD *)(v2 + 8) )
{
v3 = *(_QWORD **)v2;
v4 = *(_QWORD *)v2 + 8LL * *(unsigned int *)(v2 + 8);
do
free(*v3++);
while ( (unsigned long long)v3 < v4 );
v2 = a1[123];
}
ma_delete_dynamic(v2);
free(a1[123]);
}
free(a1[119]);
free(a1[118]);
free(a1[120]);
free(a1[121]);
free(a1[122]);
free(a1[124]);
free(a1[125]);
free(a1[126]);
free(a1[127]);
free(a1[137]);
free(a1[128]);
free(a1[129]);
free(a1[130]);
free(a1[131]);
free(a1[132]);
v5 = (_QWORD *)a1[144];
if ( v5 )
{
v6 = v5[5];
if ( v6 )
{
my_context_destroy(v6 + 56);
free(v6);
*(_QWORD *)(a1[144] + 40LL) = 0LL;
v5 = (_QWORD *)a1[144];
}
free(*v5);
free(*(_QWORD *)(a1[144] + 8LL));
free(*(_QWORD *)(a1[144] + 136LL));
free(*(_QWORD *)(a1[144] + 16LL));
free(*(_QWORD *)(a1[144] + 24LL));
free(*(_QWORD *)(a1[144] + 144LL));
free(*(_QWORD *)(a1[144] + 152LL));
free(*(_QWORD *)(a1[144] + 160LL));
free(*(_QWORD *)(a1[144] + 192LL));
free(*(_QWORD *)(a1[144] + 176LL));
free(*(_QWORD *)(a1[144] + 208LL));
free(*(_QWORD *)(a1[144] + 304LL));
v7 = (_QWORD *)a1[144];
if ( v7[9] )
{
ma_hashtbl_free(v7 + 6);
v7 = (_QWORD *)a1[144];
}
if ( v7[31] )
{
ma_hashtbl_free(v7 + 28);
v7 = (_QWORD *)a1[144];
}
free(v7[42]);
free(*(_QWORD *)(a1[144] + 344LL));
v8 = a1[144];
}
else
{
v8 = 0LL;
}
free(v8);
return memset(a1 + 114, 0LL, 248LL);
}
|
mysql_close_options:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x3d8]
TEST RDI,RDI
JZ 0x0011e51d
MOV EAX,dword ptr [RDI + 0x8]
TEST RAX,RAX
JZ 0x0011e50c
MOV R14,qword ptr [RDI]
LEA R15,[R14 + RAX*0x8]
LAB_0011e4f4:
MOV RDI,qword ptr [R14]
CALL 0x00113580
ADD R14,0x8
CMP R14,R15
JC 0x0011e4f4
MOV RDI,qword ptr [RBX + 0x3d8]
LAB_0011e50c:
CALL 0x0013433c
MOV RDI,qword ptr [RBX + 0x3d8]
CALL 0x00113580
LAB_0011e51d:
MOV RDI,qword ptr [RBX + 0x3b8]
CALL 0x00113580
MOV RDI,qword ptr [RBX + 0x3b0]
CALL 0x00113580
MOV RDI,qword ptr [RBX + 0x3c0]
CALL 0x00113580
MOV RDI,qword ptr [RBX + 0x3c8]
CALL 0x00113580
MOV RDI,qword ptr [RBX + 0x3d0]
CALL 0x00113580
MOV RDI,qword ptr [RBX + 0x3e0]
CALL 0x00113580
MOV RDI,qword ptr [RBX + 0x3e8]
CALL 0x00113580
MOV RDI,qword ptr [RBX + 0x3f0]
CALL 0x00113580
MOV RDI,qword ptr [RBX + 0x3f8]
CALL 0x00113580
MOV RDI,qword ptr [RBX + 0x448]
CALL 0x00113580
MOV RDI,qword ptr [RBX + 0x400]
CALL 0x00113580
MOV RDI,qword ptr [RBX + 0x408]
CALL 0x00113580
MOV RDI,qword ptr [RBX + 0x410]
CALL 0x00113580
MOV RDI,qword ptr [RBX + 0x418]
CALL 0x00113580
MOV RDI,qword ptr [RBX + 0x420]
CALL 0x00113580
MOV RAX,qword ptr [RBX + 0x480]
TEST RAX,RAX
JZ 0x0011e744
MOV R14,qword ptr [RAX + 0x28]
TEST R14,R14
JZ 0x0011e611
LEA RDI,[R14 + 0x38]
CALL 0x00132321
MOV RDI,R14
CALL 0x00113580
MOV RAX,qword ptr [RBX + 0x480]
MOV qword ptr [RAX + 0x28],0x0
MOV RAX,qword ptr [RBX + 0x480]
LAB_0011e611:
MOV RDI,qword ptr [RAX]
CALL 0x00113580
MOV RAX,qword ptr [RBX + 0x480]
MOV RDI,qword ptr [RAX + 0x8]
CALL 0x00113580
MOV RAX,qword ptr [RBX + 0x480]
MOV RDI,qword ptr [RAX + 0x88]
CALL 0x00113580
MOV RAX,qword ptr [RBX + 0x480]
MOV RDI,qword ptr [RAX + 0x10]
CALL 0x00113580
MOV RAX,qword ptr [RBX + 0x480]
MOV RDI,qword ptr [RAX + 0x18]
CALL 0x00113580
MOV RAX,qword ptr [RBX + 0x480]
MOV RDI,qword ptr [RAX + 0x90]
CALL 0x00113580
MOV RAX,qword ptr [RBX + 0x480]
MOV RDI,qword ptr [RAX + 0x98]
CALL 0x00113580
MOV RAX,qword ptr [RBX + 0x480]
MOV RDI,qword ptr [RAX + 0xa0]
CALL 0x00113580
MOV RAX,qword ptr [RBX + 0x480]
MOV RDI,qword ptr [RAX + 0xc0]
CALL 0x00113580
MOV RAX,qword ptr [RBX + 0x480]
MOV RDI,qword ptr [RAX + 0xb0]
CALL 0x00113580
MOV RAX,qword ptr [RBX + 0x480]
MOV RDI,qword ptr [RAX + 0xd0]
CALL 0x00113580
MOV RAX,qword ptr [RBX + 0x480]
MOV RDI,qword ptr [RAX + 0x130]
CALL 0x00113580
MOV RDI,qword ptr [RBX + 0x480]
CMP qword ptr [RDI + 0x48],0x0
JZ 0x0011e6ff
ADD RDI,0x30
CALL 0x00134f21
MOV RDI,qword ptr [RBX + 0x480]
LAB_0011e6ff:
CMP qword ptr [RDI + 0xf8],0x0
JZ 0x0011e71c
ADD RDI,0xe0
CALL 0x00134f21
MOV RDI,qword ptr [RBX + 0x480]
LAB_0011e71c:
MOV RDI,qword ptr [RDI + 0x150]
CALL 0x00113580
MOV RAX,qword ptr [RBX + 0x480]
MOV RDI,qword ptr [RAX + 0x158]
CALL 0x00113580
MOV RDI,qword ptr [RBX + 0x480]
JMP 0x0011e746
LAB_0011e744:
XOR EDI,EDI
LAB_0011e746:
ADD RBX,0x390
CALL 0x00113580
MOV EDX,0xf8
MOV RDI,RBX
XOR ESI,ESI
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
JMP 0x00113270
|
void mysql_close_options(long param_1)
{
int8 *puVar1;
long *plVar2;
long lVar3;
void *pvVar4;
int8 *puVar5;
plVar2 = *(long **)(param_1 + 0x3d8);
if (plVar2 != (long *)0x0) {
if ((ulong)*(uint *)(plVar2 + 1) != 0) {
puVar5 = (int8 *)*plVar2;
puVar1 = puVar5 + *(uint *)(plVar2 + 1);
do {
free((void *)*puVar5);
puVar5 = puVar5 + 1;
} while (puVar5 < puVar1);
plVar2 = *(long **)(param_1 + 0x3d8);
}
ma_delete_dynamic(plVar2);
free(*(void **)(param_1 + 0x3d8));
}
free(*(void **)(param_1 + 0x3b8));
free(*(void **)(param_1 + 0x3b0));
free(*(void **)(param_1 + 0x3c0));
free(*(void **)(param_1 + 0x3c8));
free(*(void **)(param_1 + 0x3d0));
free(*(void **)(param_1 + 0x3e0));
free(*(void **)(param_1 + 1000));
free(*(void **)(param_1 + 0x3f0));
free(*(void **)(param_1 + 0x3f8));
free(*(void **)(param_1 + 0x448));
free(*(void **)(param_1 + 0x400));
free(*(void **)(param_1 + 0x408));
free(*(void **)(param_1 + 0x410));
free(*(void **)(param_1 + 0x418));
free(*(void **)(param_1 + 0x420));
puVar1 = *(int8 **)(param_1 + 0x480);
if (puVar1 == (int8 *)0x0) {
pvVar4 = (void *)0x0;
}
else {
pvVar4 = (void *)puVar1[5];
if (pvVar4 != (void *)0x0) {
my_context_destroy((long)pvVar4 + 0x38);
free(pvVar4);
*(int8 *)(*(long *)(param_1 + 0x480) + 0x28) = 0;
puVar1 = *(int8 **)(param_1 + 0x480);
}
free((void *)*puVar1);
free(*(void **)(*(long *)(param_1 + 0x480) + 8));
free(*(void **)(*(long *)(param_1 + 0x480) + 0x88));
free(*(void **)(*(long *)(param_1 + 0x480) + 0x10));
free(*(void **)(*(long *)(param_1 + 0x480) + 0x18));
free(*(void **)(*(long *)(param_1 + 0x480) + 0x90));
free(*(void **)(*(long *)(param_1 + 0x480) + 0x98));
free(*(void **)(*(long *)(param_1 + 0x480) + 0xa0));
free(*(void **)(*(long *)(param_1 + 0x480) + 0xc0));
free(*(void **)(*(long *)(param_1 + 0x480) + 0xb0));
free(*(void **)(*(long *)(param_1 + 0x480) + 0xd0));
free(*(void **)(*(long *)(param_1 + 0x480) + 0x130));
lVar3 = *(long *)(param_1 + 0x480);
if (*(long *)(lVar3 + 0x48) != 0) {
ma_hashtbl_free(lVar3 + 0x30);
lVar3 = *(long *)(param_1 + 0x480);
}
if (*(long *)(lVar3 + 0xf8) != 0) {
ma_hashtbl_free(lVar3 + 0xe0);
lVar3 = *(long *)(param_1 + 0x480);
}
free(*(void **)(lVar3 + 0x150));
free(*(void **)(*(long *)(param_1 + 0x480) + 0x158));
pvVar4 = *(void **)(param_1 + 0x480);
}
free(pvVar4);
memset((void *)(param_1 + 0x390),0,0xf8);
return;
}
|
|
7,656 |
stbi_info_from_callbacks
|
llama.cpp/examples/llava/../../common/stb_image.h
|
STBIDEF int stbi_info_from_callbacks(stbi_io_callbacks const *c, void *user, int *x, int *y, int *comp)
{
stbi__context s;
stbi__start_callbacks(&s, (stbi_io_callbacks *) c, user);
return stbi__info_main(&s,x,y,comp);
}
|
O3
|
c
|
stbi_info_from_callbacks:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq 0x10(%rdi), %rax
leaq 0x40(%rsp), %rcx
movq %rax, -0x18(%rcx)
movups (%rdi), %xmm0
movups %xmm0, -0x28(%rcx)
movq %rsi, -0x10(%rcx)
movabsq $0x8000000001, %rax # imm = 0x8000000001
movq %rax, -0x8(%rcx)
movl $0x0, 0x80(%rcx)
movq %rcx, 0x98(%rcx)
movq %rcx, 0x88(%rcx)
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x2fe81
movq 0xc8(%r12), %rax
movq %rax, 0xd8(%r12)
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x23c3d
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
|
stbi_info_from_callbacks:
push r15
push r14
push r12
push rbx
sub rsp, 0E8h
mov rbx, r8
mov r14, rcx
mov r15, rdx
mov rax, [rdi+10h]
lea rcx, [rsp+108h+var_C8]
mov [rcx-18h], rax
movups xmm0, xmmword ptr [rdi]
movups xmmword ptr [rcx-28h], xmm0
mov [rcx-10h], rsi
mov rax, 8000000001h
mov [rcx-8], rax
mov dword ptr [rcx+80h], 0
mov [rcx+98h], rcx
mov [rcx+88h], rcx
lea r12, [rsp+108h+var_100]
mov rdi, r12
call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *)
mov rax, [r12+0C8h]
mov [r12+0D8h], rax
mov rdi, r12
mov rsi, r15
mov rdx, r14
mov rcx, rbx
call _ZL15stbi__info_mainP13stbi__contextPiS1_S1_; stbi__info_main(stbi__context *,int *,int *,int *)
add rsp, 0E8h
pop rbx
pop r12
pop r14
pop r15
retn
|
long long stbi_info_from_callbacks(__int128 *a1, long long a2, _DWORD *a3, _DWORD *a4, _DWORD *a5)
{
_BYTE v9[16]; // [rsp+8h] [rbp-100h] BYREF
__int128 v10; // [rsp+18h] [rbp-F0h]
long long v11; // [rsp+28h] [rbp-E0h]
long long v12; // [rsp+30h] [rbp-D8h]
long long v13; // [rsp+38h] [rbp-D0h]
_BYTE v14[128]; // [rsp+40h] [rbp-C8h] BYREF
int v15; // [rsp+C0h] [rbp-48h]
_BYTE *v16; // [rsp+C8h] [rbp-40h]
long long v17; // [rsp+D0h] [rbp-38h]
_BYTE *v18; // [rsp+D8h] [rbp-30h]
long long v19; // [rsp+E0h] [rbp-28h]
v11 = *((_QWORD *)a1 + 2);
v10 = *a1;
v12 = a2;
v13 = 0x8000000001LL;
v15 = 0;
v18 = v14;
v16 = v14;
stbi__refill_buffer(v9);
v19 = v17;
return stbi__info_main((long long)v9, a3, a4, a5);
}
|
stbi_info_from_callbacks:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0xe8
MOV RBX,R8
MOV R14,RCX
MOV R15,RDX
MOV RAX,qword ptr [RDI + 0x10]
LEA RCX,[RSP + 0x40]
MOV qword ptr [RCX + -0x18],RAX
MOVUPS XMM0,xmmword ptr [RDI]
MOVUPS xmmword ptr [RCX + -0x28],XMM0
MOV qword ptr [RCX + -0x10],RSI
MOV RAX,0x8000000001
MOV qword ptr [RCX + -0x8],RAX
MOV dword ptr [RCX + 0x80],0x0
MOV qword ptr [RCX + 0x98],RCX
MOV qword ptr [RCX + 0x88],RCX
LEA R12,[RSP + 0x8]
MOV RDI,R12
CALL 0x0012fe81
MOV RAX,qword ptr [R12 + 0xc8]
MOV qword ptr [R12 + 0xd8],RAX
MOV RDI,R12
MOV RSI,R15
MOV RDX,R14
MOV RCX,RBX
CALL 0x00123c3d
ADD RSP,0xe8
POP RBX
POP R12
POP R14
POP R15
RET
|
void stbi_info_from_callbacks
(int8 *param_1,int8 param_2,int *param_3,int *param_4,int *param_5)
{
stbi__context local_100 [16];
int8 local_f0;
int8 uStack_e8;
int8 local_e0;
int8 local_d8;
int8 local_d0;
int1 local_c8 [128];
int4 local_48;
int1 *local_40;
int8 local_38;
int1 *local_30;
int8 local_28;
local_e0 = param_1[2];
local_40 = local_c8;
local_f0 = *param_1;
uStack_e8 = param_1[1];
local_d0 = 0x8000000001;
local_48 = 0;
local_d8 = param_2;
local_30 = local_40;
stbi__refill_buffer(local_100);
local_28 = local_38;
stbi__info_main(local_100,param_3,param_4,param_5);
return;
}
|
|
7,657 |
js_array_flatten
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_array_flatten(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv, int map)
{
JSValue obj, arr;
JSValue mapperFunction, thisArg;
int64_t sourceLen;
int depthNum;
arr = JS_UNDEFINED;
obj = JS_ToObject(ctx, this_val);
if (js_get_length64(ctx, &sourceLen, obj))
goto exception;
depthNum = 1;
mapperFunction = JS_UNDEFINED;
thisArg = JS_UNDEFINED;
if (map) {
mapperFunction = argv[0];
if (argc > 1) {
thisArg = argv[1];
}
if (check_function(ctx, mapperFunction))
goto exception;
} else {
if (argc > 0 && !JS_IsUndefined(argv[0])) {
if (JS_ToInt32Sat(ctx, &depthNum, argv[0]) < 0)
goto exception;
}
}
arr = JS_ArraySpeciesCreate(ctx, obj, js_int32(0));
if (JS_IsException(arr))
goto exception;
if (JS_FlattenIntoArray(ctx, arr, obj, sourceLen, 0, depthNum,
mapperFunction, thisArg) < 0)
goto exception;
JS_FreeValue(ctx, obj);
return arr;
exception:
JS_FreeValue(ctx, obj);
JS_FreeValue(ctx, arr);
return JS_EXCEPTION;
}
|
O1
|
c
|
js_array_flatten:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %r9d, 0x3c(%rsp)
movq %r8, %r12
movl %ecx, %r14d
movq %rdi, %rbx
callq 0x261c9
movq %rdx, %rcx
leaq 0x68(%rsp), %rsi
movq %rbx, %rdi
movq %rax, %r15
movq %rax, %rdx
movq %rcx, %rbp
callq 0x21ec8
xorl %r13d, %r13d
testl %eax, %eax
je 0x76f99
movl $0x3, %r12d
jmp 0x77003
movl $0x1, 0x38(%rsp)
movl %r13d, 0x40(%rsp)
movl $0x3, %eax
movq %rax, 0x48(%rsp)
movl %r13d, 0x50(%rsp)
movq %rax, 0x58(%rsp)
cmpl $0x0, 0x3c(%rsp)
je 0x77049
movups (%r12), %xmm0
movaps %xmm0, 0x40(%rsp)
cmpl $0x2, %r14d
jl 0x76fe0
movups 0x10(%r12), %xmm0
movaps %xmm0, 0x50(%rsp)
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
movq %rbx, %rdi
callq 0x4099d
testl %eax, %eax
je 0x77082
movl $0x3, %r12d
xorl %r13d, %r13d
xorl %r14d, %r14d
movq 0x18(%rbx), %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0x1ccb2
shlq $0x20, %r14
movl %r13d, %esi
orq %r14, %rsi
movq 0x18(%rbx), %rdi
movq %r12, %rdx
callq 0x1ccb2
movl $0x6, %r12d
xorl %r13d, %r13d
movq %r13, %rax
movq %r12, %rdx
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testl %r14d, %r14d
jle 0x77082
movq 0x8(%r12), %rcx
cmpl $0x3, %ecx
je 0x77082
movq (%r12), %rdx
movq %rdx, 0x70(%rsp)
cmpl $-0x9, %ecx
jb 0x7706d
movq 0x70(%rsp), %rax
incl (%rax)
leaq 0x38(%rsp), %rsi
movq %rbx, %rdi
callq 0x26aaf
testl %eax, %eax
js 0x76ffa
movq %rbx, %rdi
movq %r15, %rsi
movq %rbp, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x77106
movq %rax, %r13
movq %rdx, %r12
movq %rax, %r14
shrq $0x20, %r14
cmpl $0x6, %r12d
je 0x77006
movq 0x68(%rsp), %r9
movl 0x38(%rsp), %eax
movaps 0x50(%rsp), %xmm0
movups %xmm0, 0x20(%rsp)
movaps 0x40(%rsp), %xmm0
movups %xmm0, 0x10(%rsp)
movl %eax, 0x8(%rsp)
movq $0x0, (%rsp)
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %r15, %rcx
movq %rbp, %r8
callq 0x77827
testq %rax, %rax
js 0x77006
movq 0x18(%rbx), %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0x1ccb2
jmp 0x77034
|
js_array_flatten:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 78h
mov [rsp+0A8h+var_6C], r9d
mov r12, r8
mov r14d, ecx
mov rbx, rdi
call JS_ToObject
mov rcx, rdx
lea rsi, [rsp+0A8h+var_40]
mov rdi, rbx
mov r15, rax
mov rdx, rax
mov rbp, rcx
call js_get_length64
xor r13d, r13d
test eax, eax
jz short loc_76F99
mov r12d, 3
jmp short loc_77003
loc_76F99:
mov [rsp+0A8h+var_70], 1
mov dword ptr [rsp+0A8h+var_68], r13d
mov eax, 3
mov qword ptr [rsp+0A8h+var_68+8], rax
mov dword ptr [rsp+0A8h+var_58], r13d
mov qword ptr [rsp+0A8h+var_58+8], rax
cmp [rsp+0A8h+var_6C], 0
jz loc_77049
movups xmm0, xmmword ptr [r12]
movaps [rsp+0A8h+var_68], xmm0
cmp r14d, 2
jl short loc_76FE0
movups xmm0, xmmword ptr [r12+10h]
movaps [rsp+0A8h+var_58], xmm0
loc_76FE0:
mov rsi, qword ptr [rsp+0A8h+var_68]
mov rdx, qword ptr [rsp+0A8h+var_68+8]
mov rdi, rbx
call check_function
test eax, eax
jz loc_77082
loc_76FFA:
mov r12d, 3
xor r13d, r13d
loc_77003:
xor r14d, r14d
loc_77006:
mov rdi, [rbx+18h]
mov rsi, r15
mov rdx, rbp
call JS_FreeValueRT
shl r14, 20h
mov esi, r13d
or rsi, r14
mov rdi, [rbx+18h]
mov rdx, r12
call JS_FreeValueRT
mov r12d, 6
xor r13d, r13d
loc_77034:
mov rax, r13
mov rdx, r12
add rsp, 78h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_77049:
test r14d, r14d
jle short loc_77082
mov rcx, [r12+8]
cmp ecx, 3
jz short loc_77082
mov rdx, [r12]
mov [rsp+0A8h+var_38], rdx
cmp ecx, 0FFFFFFF7h
jb short loc_7706D
mov rax, [rsp+0A8h+var_38]
inc dword ptr [rax]
loc_7706D:
lea rsi, [rsp+0A8h+var_70]
mov rdi, rbx
call JS_ToInt32SatFree
test eax, eax
js loc_76FFA
loc_77082:
mov rdi, rbx
mov rsi, r15
mov rdx, rbp
xor ecx, ecx
xor r8d, r8d
call JS_ArraySpeciesCreate
mov r13, rax
mov r12, rdx
mov r14, rax
shr r14, 20h
cmp r12d, 6
jz loc_77006
mov r9, [rsp+0A8h+var_40]
mov eax, [rsp+0A8h+var_70]
movaps xmm0, [rsp+0A8h+var_58]
movups [rsp+0A8h+var_88], xmm0
movaps xmm0, [rsp+0A8h+var_68]
movups [rsp+0A8h+var_98], xmm0
mov [rsp+0A8h+var_A0], eax
mov [rsp+0A8h+var_A8], 0
mov rdi, rbx
mov rsi, r13
mov rdx, r12
mov rcx, r15
mov r8, rbp
call JS_FlattenIntoArray
test rax, rax
js loc_77006
mov rdi, [rbx+18h]
mov rsi, r15
mov rdx, rbp
call JS_FreeValueRT
jmp loc_77034
|
unsigned long long js_array_flatten(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
int v15; // r14d
_DWORD *v16; // r15
long long v17; // rdx
long long v18; // rbp
double v19; // xmm4_8
double v20; // xmm5_8
unsigned long long v21; // r13
long long v22; // r12
__m128 v23; // xmm0
unsigned long long v24; // r14
long long v26; // rcx
long long v27; // rdx
long long v28; // rdx
int v29; // [rsp+38h] [rbp-70h] BYREF
int v30; // [rsp+3Ch] [rbp-6Ch]
__m128 v31; // [rsp+40h] [rbp-68h]
__m128 v32; // [rsp+50h] [rbp-58h]
long long v33; // [rsp+68h] [rbp-40h] BYREF
_DWORD *v34; // [rsp+70h] [rbp-38h]
v30 = a6;
v15 = a4;
v16 = JS_ToObject(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
v18 = v17;
LODWORD(v21) = 0;
if ( (unsigned int)js_get_length64(a1, &v33, (int)v16, v17) )
{
v22 = 3LL;
LABEL_8:
v24 = 0LL;
goto LABEL_9;
}
v29 = 1;
v31.m128_i32[0] = 0;
v31.m128_u64[1] = 3LL;
v32.m128_i32[0] = 0;
v32.m128_u64[1] = 3LL;
if ( v30 )
{
v23 = *(__m128 *)a5;
v31 = *(__m128 *)a5;
if ( v15 >= 2 )
{
v23 = *(__m128 *)(a5 + 16);
v32 = v23;
}
if ( (unsigned int)check_function(a1, v31.m128_i64[0], v31.m128_i32[2], v23, a8, a9, a10, v19, v20, a13, a14) )
{
LABEL_7:
v22 = 3LL;
LODWORD(v21) = 0;
goto LABEL_8;
}
}
else if ( v15 > 0 )
{
v26 = *(_QWORD *)(a5 + 8);
if ( (_DWORD)v26 != 3 )
{
v27 = *(_QWORD *)a5;
v34 = *(_DWORD **)a5;
if ( (unsigned int)v26 >= 0xFFFFFFF7 )
++*v34;
if ( (int)JS_ToInt32SatFree(a1, &v29, v27, v26) < 0 )
goto LABEL_7;
}
}
v21 = JS_ArraySpeciesCreate(a1, v16, v18, 0LL, 0LL);
v22 = v28;
v24 = HIDWORD(v21);
if ( (_DWORD)v28 != 6
&& JS_FlattenIntoArray(
a1,
v21,
v28,
(_DWORD)v16,
v18,
v33,
0LL,
v29,
v31.m128_i8[0],
v31.m128_i32[2],
*(_OWORD *)&v32) >= 0 )
{
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v16, v18);
return v21;
}
LABEL_9:
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v16, v18);
JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)((v24 << 32) | (unsigned int)v21), v22);
return 0LL;
}
|
js_array_flatten:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x78
MOV dword ptr [RSP + 0x3c],R9D
MOV R12,R8
MOV R14D,ECX
MOV RBX,RDI
CALL 0x001261c9
MOV RCX,RDX
LEA RSI,[RSP + 0x68]
MOV RDI,RBX
MOV R15,RAX
MOV RDX,RAX
MOV RBP,RCX
CALL 0x00121ec8
XOR R13D,R13D
TEST EAX,EAX
JZ 0x00176f99
MOV R12D,0x3
JMP 0x00177003
LAB_00176f99:
MOV dword ptr [RSP + 0x38],0x1
MOV dword ptr [RSP + 0x40],R13D
MOV EAX,0x3
MOV qword ptr [RSP + 0x48],RAX
MOV dword ptr [RSP + 0x50],R13D
MOV qword ptr [RSP + 0x58],RAX
CMP dword ptr [RSP + 0x3c],0x0
JZ 0x00177049
MOVUPS XMM0,xmmword ptr [R12]
MOVAPS xmmword ptr [RSP + 0x40],XMM0
CMP R14D,0x2
JL 0x00176fe0
MOVUPS XMM0,xmmword ptr [R12 + 0x10]
MOVAPS xmmword ptr [RSP + 0x50],XMM0
LAB_00176fe0:
MOV RSI,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RSP + 0x48]
MOV RDI,RBX
CALL 0x0014099d
TEST EAX,EAX
JZ 0x00177082
LAB_00176ffa:
MOV R12D,0x3
XOR R13D,R13D
LAB_00177003:
XOR R14D,R14D
LAB_00177006:
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R15
MOV RDX,RBP
CALL 0x0011ccb2
SHL R14,0x20
MOV ESI,R13D
OR RSI,R14
MOV RDI,qword ptr [RBX + 0x18]
MOV RDX,R12
CALL 0x0011ccb2
MOV R12D,0x6
XOR R13D,R13D
LAB_00177034:
MOV RAX,R13
MOV RDX,R12
ADD RSP,0x78
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00177049:
TEST R14D,R14D
JLE 0x00177082
MOV RCX,qword ptr [R12 + 0x8]
CMP ECX,0x3
JZ 0x00177082
MOV RDX,qword ptr [R12]
MOV qword ptr [RSP + 0x70],RDX
CMP ECX,-0x9
JC 0x0017706d
MOV RAX,qword ptr [RSP + 0x70]
INC dword ptr [RAX]
LAB_0017706d:
LEA RSI,[RSP + 0x38]
MOV RDI,RBX
CALL 0x00126aaf
TEST EAX,EAX
JS 0x00176ffa
LAB_00177082:
MOV RDI,RBX
MOV RSI,R15
MOV RDX,RBP
XOR ECX,ECX
XOR R8D,R8D
CALL 0x00177106
MOV R13,RAX
MOV R12,RDX
MOV R14,RAX
SHR R14,0x20
CMP R12D,0x6
JZ 0x00177006
MOV R9,qword ptr [RSP + 0x68]
MOV EAX,dword ptr [RSP + 0x38]
MOVAPS XMM0,xmmword ptr [RSP + 0x50]
MOVUPS xmmword ptr [RSP + 0x20],XMM0
MOVAPS XMM0,xmmword ptr [RSP + 0x40]
MOVUPS xmmword ptr [RSP + 0x10],XMM0
MOV dword ptr [RSP + 0x8],EAX
MOV qword ptr [RSP],0x0
MOV RDI,RBX
MOV RSI,R13
MOV RDX,R12
MOV RCX,R15
MOV R8,RBP
CALL 0x00177827
TEST RAX,RAX
JS 0x00177006
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R15
MOV RDX,RBP
CALL 0x0011ccb2
JMP 0x00177034
|
int1 [16]
js_array_flatten(long param_1,int8 param_2,int8 param_3,int param_4,int8 *param_5,
int param_6)
{
int iVar1;
int8 uVar2;
long lVar3;
int8 uVar4;
ulong uVar5;
int1 auVar6 [16];
int4 local_70;
int local_6c;
int4 local_68;
int4 uStack_64;
int8 uStack_60;
int4 local_58;
int4 uStack_54;
int8 uStack_50;
int8 local_40;
int *local_38;
local_6c = param_6;
auVar6 = JS_ToObject();
uVar4 = auVar6._8_8_;
uVar2 = auVar6._0_8_;
iVar1 = js_get_length64(param_1,&local_40,uVar2);
if (iVar1 == 0) {
local_70 = 1;
local_68 = 0;
uStack_60 = 3;
local_58 = 0;
uStack_50 = 3;
if (local_6c == 0) {
if ((0 < param_4) && ((uint)param_5[1] != 3)) {
local_38 = (int *)*param_5;
if (0xfffffff6 < (uint)param_5[1]) {
*local_38 = *local_38 + 1;
}
iVar1 = JS_ToInt32SatFree(param_1,&local_70);
if (iVar1 < 0) goto LAB_00177003;
}
}
else {
local_68 = *(int4 *)param_5;
uStack_64 = *(int4 *)((long)param_5 + 4);
uStack_60 = param_5[1];
if (1 < param_4) {
local_58 = *(int4 *)(param_5 + 2);
uStack_54 = *(int4 *)((long)param_5 + 0x14);
uStack_50 = param_5[3];
}
iVar1 = check_function(param_1,*param_5,uStack_60);
if (iVar1 != 0) goto LAB_00177003;
}
auVar6 = JS_ArraySpeciesCreate(param_1,uVar2,uVar4,0,0);
uVar5 = auVar6._0_8_ >> 0x20;
if (auVar6._8_4_ != 6) {
lVar3 = JS_FlattenIntoArray(param_1,auVar6._0_8_,auVar6._8_8_,uVar2,uVar4,local_40,0,local_70,
local_68,(int4)uStack_60,CONCAT44(uStack_54,local_58),
uStack_50);
if (-1 < lVar3) {
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar2,uVar4);
return auVar6;
}
}
}
else {
LAB_00177003:
auVar6 = ZEXT816(3) << 0x40;
uVar5 = 0;
}
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar2,uVar4);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar6._0_8_ & 0xffffffff | uVar5 << 0x20,
auVar6._8_8_);
return ZEXT816(6) << 0x40;
}
|
|
7,658 |
js_array_flatten
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_array_flatten(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv, int map)
{
JSValue obj, arr;
JSValue mapperFunction, thisArg;
int64_t sourceLen;
int depthNum;
arr = JS_UNDEFINED;
obj = JS_ToObject(ctx, this_val);
if (js_get_length64(ctx, &sourceLen, obj))
goto exception;
depthNum = 1;
mapperFunction = JS_UNDEFINED;
thisArg = JS_UNDEFINED;
if (map) {
mapperFunction = argv[0];
if (argc > 1) {
thisArg = argv[1];
}
if (check_function(ctx, mapperFunction))
goto exception;
} else {
if (argc > 0 && !JS_IsUndefined(argv[0])) {
if (JS_ToInt32Sat(ctx, &depthNum, argv[0]) < 0)
goto exception;
}
}
arr = JS_ArraySpeciesCreate(ctx, obj, js_int32(0));
if (JS_IsException(arr))
goto exception;
if (JS_FlattenIntoArray(ctx, arr, obj, sourceLen, 0, depthNum,
mapperFunction, thisArg) < 0)
goto exception;
JS_FreeValue(ctx, obj);
return arr;
exception:
JS_FreeValue(ctx, obj);
JS_FreeValue(ctx, arr);
return JS_EXCEPTION;
}
|
O3
|
c
|
js_array_flatten:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r9d, %r13d
movq %r8, %r12
movl %ecx, %ebp
movq %rdi, %r14
callq 0x268d8
movq %rax, %r15
movq %rdx, %rcx
leaq 0x30(%rsp), %rsi
movq %r14, %rdi
movq %rax, %rdx
movq %rcx, (%rsp)
callq 0x226df
testl %eax, %eax
je 0x798e2
movl $0x3, %r13d
xorl %ebx, %ebx
xorl %r12d, %r12d
movq (%rsp), %rbp
movq 0x18(%r14), %rdi
cmpl $-0x9, %ebp
jb 0x798a3
movl (%r15), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r15)
cmpl $0x1, %eax
jg 0x798a3
movq %r15, %rsi
movq %rbp, %rdx
callq 0x20d90
movq 0x18(%r14), %rdi
movl $0x6, %ebp
cmpl $-0x9, %r13d
jb 0x798cb
shlq $0x20, %r12
movl %ebx, %esi
orq %r12, %rsi
movl (%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rsi)
cmpl $0x1, %eax
jg 0x798cb
movq %r13, %rdx
callq 0x20d90
xorl %ebx, %ebx
movq %rbx, %rax
movq %rbp, %rdx
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, 0x1c(%rsp)
testl %r13d, %r13d
je 0x79914
movq (%r12), %rax
movq 0x8(%r12), %rbx
movl $0x3, %r13d
cmpl $0x2, %ebp
jl 0x7994f
movq 0x10(%r12), %rcx
movq %rcx, 0x10(%rsp)
movq 0x18(%r12), %rcx
jmp 0x7995d
testl %ebp, %ebp
jle 0x7999c
movq 0x8(%r12), %rcx
cmpl $0x3, %ecx
movq (%rsp), %rbp
jne 0x799be
movl $0x3, %eax
movq %rax, 0x20(%rsp)
xorl %esi, %esi
xorl %ecx, %ecx
movq $0x0, 0x10(%rsp)
movq %rax, 0x8(%rsp)
jmp 0x79a14
movq $0x0, 0x10(%rsp)
movl $0x3, %ecx
movq %rcx, 0x8(%rsp)
movq (%rsp), %rbp
movq %r14, %rdi
movq %rax, %r12
movq %rax, %rsi
movq %rbx, %rdx
callq 0x42327
testl %eax, %eax
je 0x79985
xorl %ebx, %ebx
xorl %r12d, %r12d
jmp 0x7987d
movq %rbx, 0x20(%rsp)
movabsq $-0x100000000, %rsi # imm = 0xFFFFFFFF00000000
andq %r12, %rsi
movq %r12, %rcx
jmp 0x79a14
movl $0x3, %eax
movq %rax, 0x20(%rsp)
xorl %esi, %esi
xorl %ecx, %ecx
movq $0x0, 0x10(%rsp)
movq %rax, 0x8(%rsp)
movq (%rsp), %rbp
jmp 0x79a14
movq (%r12), %rdx
cmpl $-0x9, %ecx
jb 0x799c9
incl (%rdx)
leaq 0x1c(%rsp), %rsi
movq %r14, %rdi
callq 0x27161
movl $0x3, %ecx
movq %rcx, 0x20(%rsp)
xorl %esi, %esi
movl $0x0, %ecx
movl $0x0, %edx
movq %rdx, 0x10(%rsp)
movl $0x3, %edx
movq %rdx, 0x8(%rsp)
movl $0x3, %r13d
movl $0x0, %ebx
movl $0x0, %r12d
testl %eax, %eax
js 0x7987d
movq %rsi, 0x28(%rsp)
movq %rcx, %r13
movq %r14, %rdi
movq %r15, %rsi
movq %rbp, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x79ac4
movq %rax, %rbx
movq %rbp, %r8
movq %rdx, %rbp
movq %rax, %r12
shrq $0x20, %r12
cmpl $0x6, %ebp
jne 0x79a4f
movq %rbp, %r13
movq %r8, %rbp
jmp 0x7987d
movq 0x30(%rsp), %r9
movl 0x1c(%rsp), %eax
movl %r13d, %r10d
orq 0x28(%rsp), %r10
movq %r14, %rdi
movq %rbx, %rsi
movq %rbp, %rdx
movq %r15, %rcx
pushq 0x8(%rsp)
pushq 0x18(%rsp)
pushq 0x30(%rsp)
pushq %r10
pushq %rax
pushq $0x0
callq 0x7a166
addq $0x30, %rsp
testq %rax, %rax
js 0x79abc
cmpl $-0x9, (%rsp)
jb 0x798cd
movq 0x18(%r14), %rdi
movl (%r15), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r15)
cmpl $0x1, %eax
jg 0x798cd
movq %r15, %rsi
movq (%rsp), %rdx
callq 0x20d90
jmp 0x798cd
movq %rbp, %r13
jmp 0x79879
|
js_array_flatten:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r13d, r9d
mov r12, r8
mov ebp, ecx
mov r14, rdi
call JS_ToObject
mov r15, rax
mov rcx, rdx
lea rsi, [rsp+68h+var_38]
mov rdi, r14
mov rdx, rax
mov [rsp+68h+var_68], rcx
call js_get_length64
test eax, eax
jz short loc_798E2
mov r13d, 3
xor ebx, ebx
xor r12d, r12d
loc_79879:
mov rbp, [rsp+68h+var_68]
loc_7987D:
mov rdi, [r14+18h]
cmp ebp, 0FFFFFFF7h
jb short loc_798A3
mov eax, [r15]
lea ecx, [rax-1]
mov [r15], ecx
cmp eax, 1
jg short loc_798A3
mov rsi, r15
mov rdx, rbp
call js_free_value_rt
mov rdi, [r14+18h]
loc_798A3:
mov ebp, 6
cmp r13d, 0FFFFFFF7h
jb short loc_798CB
shl r12, 20h
mov esi, ebx
or rsi, r12
mov eax, [rsi]
lea ecx, [rax-1]
mov [rsi], ecx
cmp eax, 1
jg short loc_798CB
mov rdx, r13
call js_free_value_rt
loc_798CB:
xor ebx, ebx
loc_798CD:
mov rax, rbx
mov rdx, rbp
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_798E2:
mov [rsp+68h+var_4C], 1
test r13d, r13d
jz short loc_79914
mov rax, [r12]
mov rbx, [r12+8]
mov r13d, 3
cmp ebp, 2
jl short loc_7994F
mov rcx, [r12+10h]
mov [rsp+68h+var_58], rcx
mov rcx, [r12+18h]
jmp short loc_7995D
loc_79914:
test ebp, ebp
jle loc_7999C
mov rcx, [r12+8]
cmp ecx, 3
mov rbp, [rsp+68h+var_68]
jnz loc_799BE
mov eax, 3
mov [rsp+68h+var_48], rax
xor esi, esi
xor ecx, ecx
mov [rsp+68h+var_58], 0
mov [rsp+68h+var_60], rax
jmp loc_79A14
loc_7994F:
mov [rsp+68h+var_58], 0
mov ecx, 3
loc_7995D:
mov [rsp+68h+var_60], rcx
mov rbp, [rsp+68h+var_68]
mov rdi, r14
mov r12, rax
mov rsi, rax
mov rdx, rbx
call check_function
test eax, eax
jz short loc_79985
xor ebx, ebx
xor r12d, r12d
jmp loc_7987D
loc_79985:
mov [rsp+68h+var_48], rbx
mov rsi, 0FFFFFFFF00000000h
and rsi, r12
mov rcx, r12
jmp short loc_79A14
loc_7999C:
mov eax, 3
mov [rsp+68h+var_48], rax
xor esi, esi
xor ecx, ecx
mov [rsp+68h+var_58], 0
mov [rsp+68h+var_60], rax
mov rbp, [rsp+68h+var_68]
jmp short loc_79A14
loc_799BE:
mov rdx, [r12]
cmp ecx, 0FFFFFFF7h
jb short loc_799C9
inc dword ptr [rdx]
loc_799C9:
lea rsi, [rsp+68h+var_4C]
mov rdi, r14
call JS_ToInt32SatFree
mov ecx, 3
mov [rsp+68h+var_48], rcx
xor esi, esi
mov ecx, 0
mov edx, 0
mov [rsp+68h+var_58], rdx
mov edx, 3
mov [rsp+68h+var_60], rdx
mov r13d, 3
mov ebx, 0
mov r12d, 0
test eax, eax
js loc_7987D
loc_79A14:
mov [rsp+68h+var_40], rsi
mov r13, rcx
mov rdi, r14
mov rsi, r15
mov rdx, rbp
xor ecx, ecx
xor r8d, r8d
call JS_ArraySpeciesCreate
mov rbx, rax
mov r8, rbp
mov rbp, rdx
mov r12, rax
shr r12, 20h
cmp ebp, 6
jnz short loc_79A4F
mov r13, rbp
mov rbp, r8
jmp loc_7987D
loc_79A4F:
mov r9, [rsp+68h+var_38]
mov eax, [rsp+68h+var_4C]
mov r10d, r13d
or r10, [rsp+68h+var_40]
mov rdi, r14
mov rsi, rbx
mov rdx, rbp
mov rcx, r15
push [rsp+68h+var_60]
push [rsp+70h+var_58]
push [rsp+78h+var_48]
push r10
push rax
push 0
call JS_FlattenIntoArray
add rsp, 30h
test rax, rax
js short loc_79ABC
cmp dword ptr [rsp+68h+var_68], 0FFFFFFF7h
jb loc_798CD
mov rdi, [r14+18h]
mov eax, [r15]
lea ecx, [rax-1]
mov [r15], ecx
cmp eax, 1
jg loc_798CD
mov rsi, r15
mov rdx, [rsp+68h+var_68]
call js_free_value_rt
jmp loc_798CD
loc_79ABC:
mov r13, rbp
jmp loc_79879
|
unsigned long long js_array_flatten(
long long a1,
long long a2,
long long a3,
long long a4,
long long *a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
int v14; // r13d
int v16; // ebp
_QWORD *v18; // r15
long long v19; // rdx
long long v20; // r8
long long v21; // r9
__m128 v22; // xmm4
__m128 v23; // xmm5
long long v24; // r13
unsigned long long v25; // rbx
unsigned long long v26; // r12
long long v27; // rbp
long long v28; // rdi
int v29; // eax
long long v30; // rcx
_QWORD *v31; // rsi
int v32; // eax
long long v33; // rcx
long long v35; // rax
long long v36; // rbx
long long v37; // rcx
long long v38; // rcx
unsigned long long v39; // rsi
unsigned int v40; // ecx
long long v41; // r12
_DWORD *v42; // rdx
int v43; // eax
unsigned int v44; // r13d
long long v45; // rdx
long long v46; // rbp
long long v47; // rdi
int v48; // eax
long long v49; // rcx
long long v50; // [rsp+0h] [rbp-68h]
long long v51; // [rsp+8h] [rbp-60h]
long long v52; // [rsp+10h] [rbp-58h]
int v53; // [rsp+1Ch] [rbp-4Ch] BYREF
long long v54; // [rsp+20h] [rbp-48h]
unsigned long long v55; // [rsp+28h] [rbp-40h]
_QWORD v56[7]; // [rsp+30h] [rbp-38h] BYREF
v14 = a6;
v16 = a4;
v18 = (_QWORD *)JS_ToObject(a1, a2, a3, a4, (long long)a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
v50 = v19;
if ( (unsigned int)js_get_length64(a1, v56, (int)v18, v19) )
{
v24 = 3LL;
LODWORD(v25) = 0;
v26 = 0LL;
LABEL_3:
v27 = v50;
goto LABEL_4;
}
v53 = 1;
if ( v14 )
{
v35 = *a5;
v36 = a5[1];
v24 = 3LL;
if ( v16 < 2 )
{
v52 = 0LL;
v37 = 3LL;
}
else
{
v52 = a5[2];
v37 = a5[3];
}
v51 = v37;
v27 = v50;
v41 = *a5;
if ( (unsigned int)check_function(a1, v35, v36, v37, v20, v21, a7, a8, a9, a10, v22, v23, a13, a14) )
{
LODWORD(v25) = 0;
v26 = 0LL;
goto LABEL_4;
}
v54 = v36;
v39 = v41 & 0xFFFFFFFF00000000LL;
v40 = v41;
}
else if ( v16 <= 0 )
{
v54 = 3LL;
v39 = 0LL;
v40 = 0;
v52 = 0LL;
v51 = 3LL;
v27 = v50;
}
else
{
v38 = a5[1];
v27 = v50;
if ( (_DWORD)v38 == 3 )
{
v54 = 3LL;
v39 = 0LL;
v40 = 0;
v52 = 0LL;
v51 = 3LL;
}
else
{
v42 = (_DWORD *)*a5;
if ( (unsigned int)v38 >= 0xFFFFFFF7 )
++*v42;
v43 = JS_ToInt32SatFree(a1, &v53, (long long)v42, v38);
v54 = 3LL;
v39 = 0LL;
v40 = 0;
v52 = 0LL;
v51 = 3LL;
v24 = 3LL;
LODWORD(v25) = 0;
v26 = 0LL;
if ( v43 < 0 )
goto LABEL_4;
}
}
v55 = v39;
v44 = v40;
v25 = JS_ArraySpeciesCreate(a1, v18, v27, 0LL, 0LL);
v20 = v27;
v46 = v45;
v26 = HIDWORD(v25);
if ( (_DWORD)v45 == 6 )
{
v24 = v45;
v27 = v20;
LABEL_4:
v28 = *(_QWORD *)(a1 + 24);
if ( (unsigned int)v27 >= 0xFFFFFFF7 )
{
v29 = *(_DWORD *)v18;
v30 = (unsigned int)(*(_DWORD *)v18 - 1);
*(_DWORD *)v18 = v30;
if ( v29 <= 1 )
{
js_free_value_rt(v28, v18, v27, v30, v20, v21);
v28 = *(_QWORD *)(a1 + 24);
}
}
if ( (unsigned int)v24 >= 0xFFFFFFF7 )
{
v31 = (_QWORD *)((v26 << 32) | (unsigned int)v25);
v32 = *(_DWORD *)v31;
v33 = (unsigned int)(*(_DWORD *)v31 - 1);
*(_DWORD *)v31 = v33;
if ( v32 <= 1 )
js_free_value_rt(v28, v31, v24, v33, v20, v21);
}
return 0LL;
}
if ( JS_FlattenIntoArray(a1, v25, v45, (_DWORD)v18, v20, v56[0], 0LL, v53, v55 | v44, v54, v52, v51) < 0 )
{
v24 = v46;
goto LABEL_3;
}
if ( (unsigned int)v50 >= 0xFFFFFFF7 )
{
v47 = *(_QWORD *)(a1 + 24);
v48 = *(_DWORD *)v18;
v49 = (unsigned int)(*(_DWORD *)v18 - 1);
*(_DWORD *)v18 = v49;
if ( v48 <= 1 )
js_free_value_rt(v47, v18, v50, v49, v20, v21);
}
return v25;
}
|
js_array_flatten:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R13D,R9D
MOV R12,R8
MOV EBP,ECX
MOV R14,RDI
CALL 0x001268d8
MOV R15,RAX
MOV RCX,RDX
LEA RSI,[RSP + 0x30]
MOV RDI,R14
MOV RDX,RAX
MOV qword ptr [RSP],RCX
CALL 0x001226df
TEST EAX,EAX
JZ 0x001798e2
MOV R13D,0x3
XOR EBX,EBX
XOR R12D,R12D
LAB_00179879:
MOV RBP,qword ptr [RSP]
LAB_0017987d:
MOV RDI,qword ptr [R14 + 0x18]
CMP EBP,-0x9
JC 0x001798a3
MOV EAX,dword ptr [R15]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R15],ECX
CMP EAX,0x1
JG 0x001798a3
MOV RSI,R15
MOV RDX,RBP
CALL 0x00120d90
MOV RDI,qword ptr [R14 + 0x18]
LAB_001798a3:
MOV EBP,0x6
CMP R13D,-0x9
JC 0x001798cb
SHL R12,0x20
MOV ESI,EBX
OR RSI,R12
MOV EAX,dword ptr [RSI]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RSI],ECX
CMP EAX,0x1
JG 0x001798cb
MOV RDX,R13
CALL 0x00120d90
LAB_001798cb:
XOR EBX,EBX
LAB_001798cd:
MOV RAX,RBX
MOV RDX,RBP
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001798e2:
MOV dword ptr [RSP + 0x1c],0x1
TEST R13D,R13D
JZ 0x00179914
MOV RAX,qword ptr [R12]
MOV RBX,qword ptr [R12 + 0x8]
MOV R13D,0x3
CMP EBP,0x2
JL 0x0017994f
MOV RCX,qword ptr [R12 + 0x10]
MOV qword ptr [RSP + 0x10],RCX
MOV RCX,qword ptr [R12 + 0x18]
JMP 0x0017995d
LAB_00179914:
TEST EBP,EBP
JLE 0x0017999c
MOV RCX,qword ptr [R12 + 0x8]
CMP ECX,0x3
MOV RBP,qword ptr [RSP]
JNZ 0x001799be
MOV EAX,0x3
MOV qword ptr [RSP + 0x20],RAX
XOR ESI,ESI
XOR ECX,ECX
MOV qword ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x8],RAX
JMP 0x00179a14
LAB_0017994f:
MOV qword ptr [RSP + 0x10],0x0
MOV ECX,0x3
LAB_0017995d:
MOV qword ptr [RSP + 0x8],RCX
MOV RBP,qword ptr [RSP]
MOV RDI,R14
MOV R12,RAX
MOV RSI,RAX
MOV RDX,RBX
CALL 0x00142327
TEST EAX,EAX
JZ 0x00179985
XOR EBX,EBX
XOR R12D,R12D
JMP 0x0017987d
LAB_00179985:
MOV qword ptr [RSP + 0x20],RBX
MOV RSI,-0x100000000
AND RSI,R12
MOV RCX,R12
JMP 0x00179a14
LAB_0017999c:
MOV EAX,0x3
MOV qword ptr [RSP + 0x20],RAX
XOR ESI,ESI
XOR ECX,ECX
MOV qword ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x8],RAX
MOV RBP,qword ptr [RSP]
JMP 0x00179a14
LAB_001799be:
MOV RDX,qword ptr [R12]
CMP ECX,-0x9
JC 0x001799c9
INC dword ptr [RDX]
LAB_001799c9:
LEA RSI,[RSP + 0x1c]
MOV RDI,R14
CALL 0x00127161
MOV ECX,0x3
MOV qword ptr [RSP + 0x20],RCX
XOR ESI,ESI
MOV ECX,0x0
MOV EDX,0x0
MOV qword ptr [RSP + 0x10],RDX
MOV EDX,0x3
MOV qword ptr [RSP + 0x8],RDX
MOV R13D,0x3
MOV EBX,0x0
MOV R12D,0x0
TEST EAX,EAX
JS 0x0017987d
LAB_00179a14:
MOV qword ptr [RSP + 0x28],RSI
MOV R13,RCX
MOV RDI,R14
MOV RSI,R15
MOV RDX,RBP
XOR ECX,ECX
XOR R8D,R8D
CALL 0x00179ac4
MOV RBX,RAX
MOV R8,RBP
MOV RBP,RDX
MOV R12,RAX
SHR R12,0x20
CMP EBP,0x6
JNZ 0x00179a4f
MOV R13,RBP
MOV RBP,R8
JMP 0x0017987d
LAB_00179a4f:
MOV R9,qword ptr [RSP + 0x30]
MOV EAX,dword ptr [RSP + 0x1c]
MOV R10D,R13D
OR R10,qword ptr [RSP + 0x28]
MOV RDI,R14
MOV RSI,RBX
MOV RDX,RBP
MOV RCX,R15
PUSH qword ptr [RSP + 0x8]
PUSH qword ptr [RSP + 0x18]
PUSH qword ptr [RSP + 0x30]
PUSH R10
PUSH RAX
PUSH 0x0
CALL 0x0017a166
ADD RSP,0x30
TEST RAX,RAX
JS 0x00179abc
CMP dword ptr [RSP],-0x9
JC 0x001798cd
MOV RDI,qword ptr [R14 + 0x18]
MOV EAX,dword ptr [R15]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R15],ECX
CMP EAX,0x1
JG 0x001798cd
MOV RSI,R15
MOV RDX,qword ptr [RSP]
CALL 0x00120d90
JMP 0x001798cd
LAB_00179abc:
MOV R13,RBP
JMP 0x00179879
|
int1 [16]
js_array_flatten(long param_1,int8 param_2,int8 param_3,int param_4,ulong *param_5,
int param_6)
{
int iVar1;
long lVar2;
ulong uVar3;
int8 uVar4;
int *piVar5;
ulong uVar6;
int8 uVar7;
ulong uVar8;
int1 auVar9 [16];
uint local_68;
ulong local_60;
ulong local_58;
ulong local_48;
int8 local_38;
auVar9 = JS_ToObject();
uVar4 = auVar9._8_8_;
piVar5 = auVar9._0_8_;
iVar1 = js_get_length64(param_1,&local_38,piVar5);
local_68 = auVar9._8_4_;
if (iVar1 == 0) {
if (param_6 == 0) {
if (param_4 < 1) {
local_48 = 3;
uVar6 = 0;
uVar3 = 0;
local_58 = 0;
local_60 = 3;
}
else if ((uint)param_5[1] == 3) {
local_48 = 3;
uVar6 = 0;
uVar3 = 0;
local_58 = 0;
local_60 = 3;
}
else {
if (0xfffffff6 < (uint)param_5[1]) {
*(int *)*param_5 = *(int *)*param_5 + 1;
}
iVar1 = JS_ToInt32SatFree(param_1);
local_48 = 3;
uVar6 = 0;
uVar3 = 0;
local_58 = 0;
local_60 = 3;
auVar9 = ZEXT816(3) << 0x40;
uVar8 = 0;
if (iVar1 < 0) goto LAB_0017987d;
}
}
else {
uVar3 = *param_5;
local_48 = param_5[1];
if (param_4 < 2) {
local_58 = 0;
local_60 = 3;
}
else {
local_58 = param_5[2];
local_60 = param_5[3];
}
iVar1 = check_function(param_1,uVar3,local_48);
if (iVar1 != 0) {
auVar9 = ZEXT816(3) << 0x40;
uVar8 = 0;
goto LAB_0017987d;
}
uVar6 = uVar3 & 0xffffffff00000000;
}
auVar9 = JS_ArraySpeciesCreate(param_1,piVar5,uVar4,0,0);
uVar8 = auVar9._0_8_ >> 0x20;
if ((auVar9._8_4_ != 6) &&
(lVar2 = JS_FlattenIntoArray(param_1,auVar9._0_8_,auVar9._8_8_,piVar5,uVar4,local_38,0,1,
uVar3 & 0xffffffff | uVar6,local_48,local_58,local_60),
-1 < lVar2)) {
if (local_68 < 0xfffffff7) {
return auVar9;
}
uVar7 = *(int8 *)(param_1 + 0x18);
iVar1 = *piVar5;
*piVar5 = iVar1 + -1;
if (1 < iVar1) {
return auVar9;
}
js_free_value_rt(uVar7,piVar5,uVar4);
return auVar9;
}
}
else {
auVar9 = ZEXT816(3) << 0x40;
uVar8 = 0;
}
LAB_0017987d:
uVar7 = *(int8 *)(param_1 + 0x18);
if ((0xfffffff6 < local_68) && (iVar1 = *piVar5, *piVar5 = iVar1 + -1, iVar1 < 2)) {
js_free_value_rt(uVar7,piVar5,uVar4);
uVar7 = *(int8 *)(param_1 + 0x18);
}
if (0xfffffff6 < auVar9._8_4_) {
piVar5 = (int *)(auVar9._0_8_ & 0xffffffff | uVar8 << 0x20);
iVar1 = *piVar5;
*piVar5 = iVar1 + -1;
if (iVar1 < 2) {
js_free_value_rt(uVar7,piVar5,auVar9._8_8_);
}
}
return ZEXT816(6) << 0x40;
}
|
|
7,659 |
ma_pvio_wait_io_or_timeout
|
eloqsql/libmariadb/libmariadb/ma_pvio.c
|
int ma_pvio_wait_io_or_timeout(MARIADB_PVIO *pvio, my_bool is_read, int timeout)
{
if (pvio)
{
if (IS_PVIO_ASYNC_ACTIVE(pvio))
return ma_pvio_wait_async(pvio->mysql->options.extension->async_context,
(is_read) ? VIO_IO_EVENT_READ : VIO_IO_EVENT_WRITE,
timeout);
if (pvio && pvio->methods->wait_io_or_timeout)
return pvio->methods->wait_io_or_timeout(pvio, is_read, timeout);
}
return 1;
}
|
O3
|
c
|
ma_pvio_wait_io_or_timeout:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl $0x1, %eax
testq %rdi, %rdi
je 0x204e9
movq 0x40(%rdi), %rcx
testq %rcx, %rcx
je 0x204d0
movq 0x480(%rcx), %rcx
testq %rcx, %rcx
je 0x204d0
movq 0x28(%rcx), %rbx
testq %rbx, %rbx
je 0x204d0
cmpb $0x0, 0x14(%rbx)
je 0x204d0
xorl %eax, %eax
cmpb $0x1, %sil
adcl $0x1, %eax
movl %eax, (%rbx)
testl %edx, %edx
js 0x20497
orl $0x8, %eax
movl %eax, (%rbx)
movl %edx, 0x10(%rbx)
movq 0x20(%rbx), %rax
testq %rax, %rax
je 0x204ab
movq 0x28(%rbx), %rsi
movl $0x1, %edi
callq *%rax
leaq 0x38(%rbx), %rdi
callq 0x306d9
movq 0x20(%rbx), %rax
testq %rax, %rax
je 0x204c5
movq 0x28(%rbx), %rsi
xorl %edi, %edi
callq *%rax
xorl %eax, %eax
testb $0x8, 0x4(%rbx)
sete %al
jmp 0x204e9
movq 0x48(%rdi), %rcx
movq 0x30(%rcx), %rcx
testq %rcx, %rcx
je 0x204e9
movsbl %sil, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmpq *%rcx
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
|
ma_pvio_wait_io_or_timeout:
push rbp
mov rbp, rsp
push rbx
push rax
mov eax, 1
test rdi, rdi
jz loc_204E9
mov rcx, [rdi+40h]
test rcx, rcx
jz short loc_204D0
mov rcx, [rcx+480h]
test rcx, rcx
jz short loc_204D0
mov rbx, [rcx+28h]
test rbx, rbx
jz short loc_204D0
cmp byte ptr [rbx+14h], 0
jz short loc_204D0
xor eax, eax
cmp sil, 1
adc eax, 1
mov [rbx], eax
test edx, edx
js short loc_20497
or eax, 8
mov [rbx], eax
mov [rbx+10h], edx
loc_20497:
mov rax, [rbx+20h]
test rax, rax
jz short loc_204AB
mov rsi, [rbx+28h]
mov edi, 1
call rax
loc_204AB:
lea rdi, [rbx+38h]
call my_context_yield
mov rax, [rbx+20h]
test rax, rax
jz short loc_204C5
mov rsi, [rbx+28h]
xor edi, edi
call rax
loc_204C5:
xor eax, eax
test byte ptr [rbx+4], 8
setz al
jmp short loc_204E9
loc_204D0:
mov rcx, [rdi+48h]
mov rcx, [rcx+30h]
test rcx, rcx
jz short loc_204E9
movsx esi, sil
add rsp, 8
pop rbx
pop rbp
jmp rcx
loc_204E9:
add rsp, 8
pop rbx
pop rbp
retn
|
long long ma_pvio_wait_io_or_timeout(long long a1, char a2, int a3)
{
long long result; // rax
long long v4; // rcx
long long v5; // rcx
long long v6; // rbx
int v7; // eax
void ( *v8)(long long, _QWORD); // rax
void ( *v9)(_QWORD, _QWORD); // rax
long long ( *v10)(long long, _QWORD); // rcx
result = 1LL;
if ( a1 )
{
v4 = *(_QWORD *)(a1 + 64);
if ( v4 && (v5 = *(_QWORD *)(v4 + 1152)) != 0 && (v6 = *(_QWORD *)(v5 + 40)) != 0 && *(_BYTE *)(v6 + 20) )
{
v7 = (a2 == 0) + 1;
*(_DWORD *)v6 = v7;
if ( a3 >= 0 )
{
*(_DWORD *)v6 = v7 | 8;
*(_DWORD *)(v6 + 16) = a3;
}
v8 = *(void ( **)(long long, _QWORD))(v6 + 32);
if ( v8 )
v8(1LL, *(_QWORD *)(v6 + 40));
my_context_yield(v6 + 56);
v9 = *(void ( **)(_QWORD, _QWORD))(v6 + 32);
if ( v9 )
v9(0LL, *(_QWORD *)(v6 + 40));
return (*(_BYTE *)(v6 + 4) & 8) == 0;
}
else
{
v10 = *(long long ( **)(long long, _QWORD))(*(_QWORD *)(a1 + 72) + 48LL);
if ( v10 )
return v10(a1, (unsigned int)a2);
}
}
return result;
}
|
ma_pvio_wait_io_or_timeout:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV EAX,0x1
TEST RDI,RDI
JZ 0x001204e9
MOV RCX,qword ptr [RDI + 0x40]
TEST RCX,RCX
JZ 0x001204d0
MOV RCX,qword ptr [RCX + 0x480]
TEST RCX,RCX
JZ 0x001204d0
MOV RBX,qword ptr [RCX + 0x28]
TEST RBX,RBX
JZ 0x001204d0
CMP byte ptr [RBX + 0x14],0x0
JZ 0x001204d0
XOR EAX,EAX
CMP SIL,0x1
ADC EAX,0x1
MOV dword ptr [RBX],EAX
TEST EDX,EDX
JS 0x00120497
OR EAX,0x8
MOV dword ptr [RBX],EAX
MOV dword ptr [RBX + 0x10],EDX
LAB_00120497:
MOV RAX,qword ptr [RBX + 0x20]
TEST RAX,RAX
JZ 0x001204ab
MOV RSI,qword ptr [RBX + 0x28]
MOV EDI,0x1
CALL RAX
LAB_001204ab:
LEA RDI,[RBX + 0x38]
CALL 0x001306d9
MOV RAX,qword ptr [RBX + 0x20]
TEST RAX,RAX
JZ 0x001204c5
MOV RSI,qword ptr [RBX + 0x28]
XOR EDI,EDI
CALL RAX
LAB_001204c5:
XOR EAX,EAX
TEST byte ptr [RBX + 0x4],0x8
SETZ AL
JMP 0x001204e9
LAB_001204d0:
MOV RCX,qword ptr [RDI + 0x48]
MOV RCX,qword ptr [RCX + 0x30]
TEST RCX,RCX
JZ 0x001204e9
MOVSX ESI,SIL
ADD RSP,0x8
POP RBX
POP RBP
JMP RCX
LAB_001204e9:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
ulong ma_pvio_wait_io_or_timeout(long param_1,char param_2,uint param_3)
{
long lVar1;
uint *puVar2;
code *UNRECOVERED_JUMPTABLE;
uint uVar3;
ulong uVar4;
uVar4 = 1;
if (param_1 != 0) {
if ((((*(long *)(param_1 + 0x40) == 0) ||
(lVar1 = *(long *)(*(long *)(param_1 + 0x40) + 0x480), lVar1 == 0)) ||
(puVar2 = *(uint **)(lVar1 + 0x28), puVar2 == (uint *)0x0)) || ((char)puVar2[5] == '\0')) {
UNRECOVERED_JUMPTABLE = *(code **)(*(long *)(param_1 + 0x48) + 0x30);
if (UNRECOVERED_JUMPTABLE != (code *)0x0) {
/* WARNING: Could not recover jumptable at 0x001204e7. Too many branches */
/* WARNING: Treating indirect jump as call */
uVar4 = (*UNRECOVERED_JUMPTABLE)(param_1,(int)param_2);
return uVar4;
}
}
else {
uVar3 = (param_2 == '\0') + 1;
*puVar2 = uVar3;
if (-1 < (int)param_3) {
*puVar2 = uVar3 | 8;
puVar2[4] = param_3;
}
if (*(code **)(puVar2 + 8) != (code *)0x0) {
(**(code **)(puVar2 + 8))(1,*(int8 *)(puVar2 + 10));
}
my_context_yield(puVar2 + 0xe);
if (*(code **)(puVar2 + 8) != (code *)0x0) {
(**(code **)(puVar2 + 8))(0,*(int8 *)(puVar2 + 10));
}
uVar4 = (ulong)((puVar2[1] & 8) == 0);
}
}
return uVar4;
}
|
|
7,660 |
find_or_create_account(PFS_thread*, char const*, unsigned int, char const*, unsigned int)
|
eloqsql/storage/perfschema/pfs_account.cc
|
PFS_account *
find_or_create_account(PFS_thread *thread,
const char *username, uint username_length,
const char *hostname, uint hostname_length)
{
LF_PINS *pins= get_account_hash_pins(thread);
if (unlikely(pins == NULL))
{
global_account_container.m_lost++;
return NULL;
}
PFS_account_key key;
set_account_key(&key, username, username_length,
hostname, hostname_length);
PFS_account **entry;
PFS_account *pfs;
uint retry_count= 0;
const uint retry_max= 3;
pfs_dirty_state dirty_state;
search:
entry= reinterpret_cast<PFS_account**>
(lf_hash_search(&account_hash, pins,
key.m_hash_key, key.m_key_length));
if (entry && (entry != MY_ERRPTR))
{
pfs= *entry;
pfs->inc_refcount();
lf_hash_search_unpin(pins);
return pfs;
}
lf_hash_search_unpin(pins);
pfs= global_account_container.allocate(& dirty_state);
if (pfs != NULL)
{
pfs->m_key= key;
if (username_length > 0)
pfs->m_username= &pfs->m_key.m_hash_key[0];
else
pfs->m_username= NULL;
pfs->m_username_length= username_length;
if (hostname_length > 0)
pfs->m_hostname= &pfs->m_key.m_hash_key[username_length + 1];
else
pfs->m_hostname= NULL;
pfs->m_hostname_length= hostname_length;
pfs->m_user= find_or_create_user(thread, username, username_length);
pfs->m_host= find_or_create_host(thread, hostname, hostname_length);
pfs->init_refcount();
pfs->reset_stats();
pfs->m_disconnected_count= 0;
if (username_length > 0 && hostname_length > 0)
{
lookup_setup_actor(thread, username, username_length, hostname, hostname_length,
& pfs->m_enabled, & pfs->m_history);
}
else
{
pfs->m_enabled= true;
pfs->m_history= true;
}
int res;
pfs->m_lock.dirty_to_allocated(& dirty_state);
res= lf_hash_insert(&account_hash, pins, &pfs);
if (likely(res == 0))
{
return pfs;
}
if (pfs->m_user)
{
pfs->m_user->release();
pfs->m_user= NULL;
}
if (pfs->m_host)
{
pfs->m_host->release();
pfs->m_host= NULL;
}
global_account_container.deallocate(pfs);
if (res > 0)
{
if (++retry_count > retry_max)
{
global_account_container.m_lost++;
return NULL;
}
goto search;
}
global_account_container.m_lost++;
return NULL;
}
return NULL;
}
|
O0
|
cpp
|
find_or_create_account(PFS_thread*, char const*, unsigned int, char const*, unsigned int):
pushq %rbp
movq %rsp, %rbp
subq $0x310, %rsp # imm = 0x310
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x2a0(%rbp)
movq %rsi, -0x2a8(%rbp)
movl %edx, -0x2ac(%rbp)
movq %rcx, -0x2b8(%rbp)
movl %r8d, -0x2bc(%rbp)
movq -0x2a0(%rbp), %rdi
callq 0x4f270
movq %rax, -0x2c8(%rbp)
cmpq $0x0, -0x2c8(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x4ee0a
leaq 0x3b40bf(%rip), %rax # 0x402ea8
movq (%rax), %rcx
addq $0x1, %rcx
leaq 0x3b40b1(%rip), %rax # 0x402ea8
movq %rcx, (%rax)
movq $0x0, -0x298(%rbp)
jmp 0x4f22d
movq -0x2a8(%rbp), %rsi
movl -0x2ac(%rbp), %edx
movq -0x2b8(%rbp), %rcx
movl -0x2bc(%rbp), %r8d
leaq -0x290(%rbp), %rdi
callq 0x4f2e0
movl $0x0, -0x2dc(%rbp)
movl $0x3, -0x2e0(%rbp)
movq -0x2c8(%rbp), %rsi
leaq -0x290(%rbp), %rdx
movl -0xc(%rbp), %ecx
leaq 0x3be543(%rip), %rdi # 0x40d3a0
callq 0x5d790
movq %rax, -0x2d0(%rbp)
cmpq $0x0, -0x2d0(%rbp)
je 0x4eed2
movl $0x1, %eax
cmpq %rax, -0x2d0(%rbp)
je 0x4eed2
movq -0x2d0(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x2d8(%rbp)
movq -0x2d8(%rbp), %rdi
callq 0x500c0
jmp 0x4eea0
jmp 0x4eea2
movq -0x2c8(%rbp), %rcx
movq $0x0, -0x2f0(%rbp)
movq -0x2f0(%rbp), %rax
xchgq %rax, 0x10(%rcx)
movq -0x2d8(%rbp), %rax
movq %rax, -0x298(%rbp)
jmp 0x4f22d
jmp 0x4eed4
jmp 0x4eed6
jmp 0x4eed8
movq -0x2c8(%rbp), %rcx
movq $0x0, -0x2f8(%rbp)
movq -0x2f8(%rbp), %rax
xchgq %rax, 0x10(%rcx)
leaq 0x3b3fac(%rip), %rdi # 0x402ea8
leaq -0x2e4(%rbp), %rsi
callq 0x500f0
movq %rax, -0x2d8(%rbp)
cmpq $0x0, -0x2d8(%rbp)
je 0x4f222
movq -0x2d8(%rbp), %rdi
addq $0x7e4, %rdi # imm = 0x7E4
leaq -0x290(%rbp), %rsi
movl $0x288, %edx # imm = 0x288
callq 0x26280
cmpl $0x0, -0x2ac(%rbp)
jbe 0x4ef63
movq -0x2d8(%rbp), %rcx
addq $0x7e4, %rcx # imm = 0x7E4
movq -0x2d8(%rbp), %rax
movq %rcx, 0xa70(%rax)
jmp 0x4ef75
movq -0x2d8(%rbp), %rax
movq $0x0, 0xa70(%rax)
movl -0x2ac(%rbp), %ecx
movq -0x2d8(%rbp), %rax
movl %ecx, 0xa78(%rax)
cmpl $0x0, -0x2bc(%rbp)
jbe 0x4efbd
movq -0x2d8(%rbp), %rcx
addq $0x7e4, %rcx # imm = 0x7E4
movl -0x2ac(%rbp), %eax
addl $0x1, %eax
movl %eax, %eax
addq %rax, %rcx
movq -0x2d8(%rbp), %rax
movq %rcx, 0xa80(%rax)
jmp 0x4efcf
movq -0x2d8(%rbp), %rax
movq $0x0, 0xa80(%rax)
movl -0x2bc(%rbp), %ecx
movq -0x2d8(%rbp), %rax
movl %ecx, 0xa88(%rax)
movq -0x2a0(%rbp), %rdi
movq -0x2a8(%rbp), %rsi
movl -0x2ac(%rbp), %edx
callq 0x42ff0
movq %rax, %rcx
movq -0x2d8(%rbp), %rax
movq %rcx, 0xa90(%rax)
movq -0x2a0(%rbp), %rdi
movq -0x2b8(%rbp), %rsi
movl -0x2bc(%rbp), %edx
callq 0x56550
movq %rax, %rcx
movq -0x2d8(%rbp), %rax
movq %rcx, 0xa98(%rax)
movq -0x2d8(%rbp), %rdi
callq 0x504c0
movq -0x2d8(%rbp), %rdi
callq 0x34360
movq -0x2d8(%rbp), %rax
movq $0x0, 0xaa0(%rax)
cmpl $0x0, -0x2ac(%rbp)
jbe 0x4f0ba
cmpl $0x0, -0x2bc(%rbp)
jbe 0x4f0ba
movq -0x2a0(%rbp), %rdi
movq -0x2a8(%rbp), %rsi
movl -0x2ac(%rbp), %edx
movq -0x2b8(%rbp), %rcx
movl -0x2bc(%rbp), %r8d
movq -0x2d8(%rbp), %r9
addq $0xa6c, %r9 # imm = 0xA6C
movq -0x2d8(%rbp), %rax
addq $0xa6d, %rax # imm = 0xA6D
movq %rax, (%rsp)
callq 0x3fdf0
jmp 0x4f0d6
movq -0x2d8(%rbp), %rax
movb $0x1, 0xa6c(%rax)
movq -0x2d8(%rbp), %rax
movb $0x1, 0xa6d(%rax)
movq -0x2d8(%rbp), %rdi
addq $0x7e0, %rdi # imm = 0x7E0
leaq -0x2e4(%rbp), %rsi
callq 0x33390
movq -0x2c8(%rbp), %rsi
leaq 0x3be2a2(%rip), %rdi # 0x40d3a0
leaq -0x2d8(%rbp), %rdx
callq 0x5c770
movl %eax, -0x2fc(%rbp)
cmpl $0x0, -0x2fc(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x4f137
movq -0x2d8(%rbp), %rax
movq %rax, -0x298(%rbp)
jmp 0x4f22d
movq -0x2d8(%rbp), %rax
cmpq $0x0, 0xa90(%rax)
je 0x4f16d
movq -0x2d8(%rbp), %rax
movq 0xa90(%rax), %rdi
callq 0x43580
movq -0x2d8(%rbp), %rax
movq $0x0, 0xa90(%rax)
movq -0x2d8(%rbp), %rax
cmpq $0x0, 0xa98(%rax)
je 0x4f1a3
movq -0x2d8(%rbp), %rax
movq 0xa98(%rax), %rdi
callq 0x56c10
movq -0x2d8(%rbp), %rax
movq $0x0, 0xa98(%rax)
movq -0x2d8(%rbp), %rsi
leaq 0x3b3cf7(%rip), %rdi # 0x402ea8
callq 0x504f0
cmpl $0x0, -0x2fc(%rbp)
jle 0x4f1fd
movl -0x2dc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2dc(%rbp)
cmpl $0x3, %eax
jbe 0x4f1f8
leaq 0x3b3cce(%rip), %rax # 0x402ea8
movq (%rax), %rcx
addq $0x1, %rcx
leaq 0x3b3cc0(%rip), %rax # 0x402ea8
movq %rcx, (%rax)
movq $0x0, -0x298(%rbp)
jmp 0x4f22d
jmp 0x4ee45
leaq 0x3b3ca4(%rip), %rax # 0x402ea8
movq (%rax), %rcx
addq $0x1, %rcx
leaq 0x3b3c96(%rip), %rax # 0x402ea8
movq %rcx, (%rax)
movq $0x0, -0x298(%rbp)
jmp 0x4f22d
movq $0x0, -0x298(%rbp)
movq -0x298(%rbp), %rax
movq %rax, -0x308(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x4f25d
movq -0x308(%rbp), %rax
addq $0x310, %rsp # imm = 0x310
popq %rbp
retq
callq 0x26360
nopw %cs:(%rax,%rax)
|
_Z22find_or_create_accountP10PFS_threadPKcjS2_j:
push rbp
mov rbp, rsp
sub rsp, 310h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_2A0], rdi
mov [rbp+var_2A8], rsi
mov [rbp+var_2AC], edx
mov [rbp+var_2B8], rcx
mov [rbp+var_2BC], r8d
mov rdi, [rbp+var_2A0]; PFS_thread *
call _ZL21get_account_hash_pinsP10PFS_thread; get_account_hash_pins(PFS_thread *)
mov [rbp+var_2C8], rax
cmp [rbp+var_2C8], 0
setz al
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_4EE0A
lea rax, global_account_container
mov rcx, [rax]
add rcx, 1
lea rax, global_account_container
mov [rax], rcx
mov [rbp+var_298], 0
jmp loc_4F22D
loc_4EE0A:
mov rsi, [rbp+var_2A8]
mov edx, [rbp+var_2AC]
mov rcx, [rbp+var_2B8]
mov r8d, [rbp+var_2BC]
lea rdi, [rbp+var_290]
call _ZL15set_account_keyP15PFS_account_keyPKcjS2_j; set_account_key(PFS_account_key *,char const*,uint,char const*,uint)
mov [rbp+var_2DC], 0
mov [rbp+var_2E0], 3
loc_4EE45:
mov rsi, [rbp+var_2C8]
lea rdx, [rbp+var_290]
mov ecx, [rbp+var_C]
lea rdi, account_hash
call lf_hash_search
mov [rbp+var_2D0], rax
cmp [rbp+var_2D0], 0
jz short loc_4EED2
mov eax, 1
cmp [rbp+var_2D0], rax
jz short loc_4EED2
mov rax, [rbp+var_2D0]
mov rax, [rax]
mov [rbp+var_2D8], rax
mov rdi, [rbp+var_2D8]; this
call _ZN11PFS_account12inc_refcountEv; PFS_account::inc_refcount(void)
jmp short $+2
loc_4EEA0:
jmp short $+2
loc_4EEA2:
mov rcx, [rbp+var_2C8]
mov [rbp+var_2F0], 0
mov rax, [rbp+var_2F0]
xchg rax, [rcx+10h]
mov rax, [rbp+var_2D8]
mov [rbp+var_298], rax
jmp loc_4F22D
loc_4EED2:
jmp short $+2
loc_4EED4:
jmp short $+2
loc_4EED6:
jmp short $+2
loc_4EED8:
mov rcx, [rbp+var_2C8]
mov [rbp+var_2F8], 0
mov rax, [rbp+var_2F8]
xchg rax, [rcx+10h]
lea rdi, global_account_container
lea rsi, [rbp+var_2E4]
call _ZN29PFS_buffer_scalable_containerI11PFS_accountLi128ELi128E17PFS_account_array21PFS_account_allocatorE8allocateEP15pfs_dirty_state; PFS_buffer_scalable_container<PFS_account,128,128,PFS_account_array,PFS_account_allocator>::allocate(pfs_dirty_state *)
mov [rbp+var_2D8], rax
cmp [rbp+var_2D8], 0
jz loc_4F222
mov rdi, [rbp+var_2D8]
add rdi, 7E4h
lea rsi, [rbp+var_290]
mov edx, 288h
call _memcpy
cmp [rbp+var_2AC], 0
jbe short loc_4EF63
mov rcx, [rbp+var_2D8]
add rcx, 7E4h
mov rax, [rbp+var_2D8]
mov [rax+0A70h], rcx
jmp short loc_4EF75
loc_4EF63:
mov rax, [rbp+var_2D8]
mov qword ptr [rax+0A70h], 0
loc_4EF75:
mov ecx, [rbp+var_2AC]
mov rax, [rbp+var_2D8]
mov [rax+0A78h], ecx
cmp [rbp+var_2BC], 0
jbe short loc_4EFBD
mov rcx, [rbp+var_2D8]
add rcx, 7E4h
mov eax, [rbp+var_2AC]
add eax, 1
mov eax, eax
add rcx, rax
mov rax, [rbp+var_2D8]
mov [rax+0A80h], rcx
jmp short loc_4EFCF
loc_4EFBD:
mov rax, [rbp+var_2D8]
mov qword ptr [rax+0A80h], 0
loc_4EFCF:
mov ecx, [rbp+var_2BC]
mov rax, [rbp+var_2D8]
mov [rax+0A88h], ecx
mov rdi, [rbp+var_2A0]; PFS_thread *
mov rsi, [rbp+var_2A8]; char *
mov edx, [rbp+var_2AC]; unsigned int
call _Z19find_or_create_userP10PFS_threadPKcj; find_or_create_user(PFS_thread *,char const*,uint)
mov rcx, rax
mov rax, [rbp+var_2D8]
mov [rax+0A90h], rcx
mov rdi, [rbp+var_2A0]; PFS_thread *
mov rsi, [rbp+var_2B8]; char *
mov edx, [rbp+var_2BC]; unsigned int
call _Z19find_or_create_hostP10PFS_threadPKcj; find_or_create_host(PFS_thread *,char const*,uint)
mov rcx, rax
mov rax, [rbp+var_2D8]
mov [rax+0A98h], rcx
mov rdi, [rbp+var_2D8]; this
call _ZN11PFS_account13init_refcountEv; PFS_account::init_refcount(void)
mov rdi, [rbp+var_2D8]; this
call _ZN20PFS_connection_slice11reset_statsEv; PFS_connection_slice::reset_stats(void)
mov rax, [rbp+var_2D8]
mov qword ptr [rax+0AA0h], 0
cmp [rbp+var_2AC], 0
jbe short loc_4F0BA
cmp [rbp+var_2BC], 0
jbe short loc_4F0BA
mov rdi, [rbp+var_2A0]; PFS_thread *
mov rsi, [rbp+var_2A8]; char *
mov edx, [rbp+var_2AC]; unsigned int
mov rcx, [rbp+var_2B8]; char *
mov r8d, [rbp+var_2BC]; unsigned int
mov r9, [rbp+var_2D8]
add r9, 0A6Ch; bool *
mov rax, [rbp+var_2D8]
add rax, 0A6Dh
mov [rsp+310h+var_310], rax; bool *
call _Z18lookup_setup_actorP10PFS_threadPKcjS2_jPbS3_; lookup_setup_actor(PFS_thread *,char const*,uint,char const*,uint,bool *,bool *)
jmp short loc_4F0D6
loc_4F0BA:
mov rax, [rbp+var_2D8]
mov byte ptr [rax+0A6Ch], 1
mov rax, [rbp+var_2D8]
mov byte ptr [rax+0A6Dh], 1
loc_4F0D6:
mov rdi, [rbp+var_2D8]
add rdi, 7E0h
lea rsi, [rbp+var_2E4]
call _ZN8pfs_lock18dirty_to_allocatedEPK15pfs_dirty_state; pfs_lock::dirty_to_allocated(pfs_dirty_state const*)
mov rsi, [rbp+var_2C8]
lea rdi, account_hash
lea rdx, [rbp+var_2D8]
call lf_hash_insert
mov [rbp+var_2FC], eax
cmp [rbp+var_2FC], 0
setz al
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_4F137
mov rax, [rbp+var_2D8]
mov [rbp+var_298], rax
jmp loc_4F22D
loc_4F137:
mov rax, [rbp+var_2D8]
cmp qword ptr [rax+0A90h], 0
jz short loc_4F16D
mov rax, [rbp+var_2D8]
mov rdi, [rax+0A90h]; this
call _ZN8PFS_user7releaseEv; PFS_user::release(void)
mov rax, [rbp+var_2D8]
mov qword ptr [rax+0A90h], 0
loc_4F16D:
mov rax, [rbp+var_2D8]
cmp qword ptr [rax+0A98h], 0
jz short loc_4F1A3
mov rax, [rbp+var_2D8]
mov rdi, [rax+0A98h]; this
call _ZN8PFS_host7releaseEv; PFS_host::release(void)
mov rax, [rbp+var_2D8]
mov qword ptr [rax+0A98h], 0
loc_4F1A3:
mov rsi, [rbp+var_2D8]
lea rdi, global_account_container
call _ZN29PFS_buffer_scalable_containerI11PFS_accountLi128ELi128E17PFS_account_array21PFS_account_allocatorE10deallocateEPS0_; PFS_buffer_scalable_container<PFS_account,128,128,PFS_account_array,PFS_account_allocator>::deallocate(PFS_account*)
cmp [rbp+var_2FC], 0
jle short loc_4F1FD
mov eax, [rbp+var_2DC]
add eax, 1
mov [rbp+var_2DC], eax
cmp eax, 3
jbe short loc_4F1F8
lea rax, global_account_container
mov rcx, [rax]
add rcx, 1
lea rax, global_account_container
mov [rax], rcx
mov [rbp+var_298], 0
jmp short loc_4F22D
loc_4F1F8:
jmp loc_4EE45
loc_4F1FD:
lea rax, global_account_container
mov rcx, [rax]
add rcx, 1
lea rax, global_account_container
mov [rax], rcx
mov [rbp+var_298], 0
jmp short loc_4F22D
loc_4F222:
mov [rbp+var_298], 0
loc_4F22D:
mov rax, [rbp+var_298]
mov [rbp+var_308], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_4F25D
mov rax, [rbp+var_308]
add rsp, 310h
pop rbp
retn
loc_4F25D:
call ___stack_chk_fail
|
PFS_account * find_or_create_account(PFS_thread *a1, char *a2, unsigned int a3, char *a4, unsigned int a5)
{
PFS_user *user; // rax
long long host; // rax
unsigned int v7; // edx
int v9; // [rsp+14h] [rbp-2FCh]
_DWORD v10[2]; // [rsp+2Ch] [rbp-2E4h] BYREF
int v11; // [rsp+34h] [rbp-2DCh]
PFS_account *v12; // [rsp+38h] [rbp-2D8h] BYREF
PFS_account **v13; // [rsp+40h] [rbp-2D0h]
long long account_hash_pins; // [rsp+48h] [rbp-2C8h]
unsigned int v15; // [rsp+54h] [rbp-2BCh]
char *v16; // [rsp+58h] [rbp-2B8h]
unsigned int v17; // [rsp+64h] [rbp-2ACh]
char *v18; // [rsp+68h] [rbp-2A8h]
PFS_thread *v19; // [rsp+70h] [rbp-2A0h]
_BYTE v21[644]; // [rsp+80h] [rbp-290h] BYREF
unsigned int v22; // [rsp+304h] [rbp-Ch]
unsigned long long v23; // [rsp+308h] [rbp-8h]
v23 = __readfsqword(0x28u);
v19 = a1;
v18 = a2;
v17 = a3;
v16 = a4;
v15 = a5;
account_hash_pins = get_account_hash_pins(a1);
if ( account_hash_pins )
{
set_account_key(v21, v18, v17, v16, v15);
v11 = 0;
v10[1] = 3;
while ( 1 )
{
v13 = (PFS_account **)lf_hash_search(&account_hash, account_hash_pins, v21, v22);
if ( (unsigned long long)v13 >= 2 )
{
v12 = *v13;
PFS_account::inc_refcount(v12);
_InterlockedExchange64((volatile long long *)(account_hash_pins + 16), 0LL);
return v12;
}
_InterlockedExchange64((volatile long long *)(account_hash_pins + 16), 0LL);
v12 = (PFS_account *)PFS_buffer_scalable_container<PFS_account,128,128,PFS_account_array,PFS_account_allocator>::allocate(
global_account_container,
v10);
if ( !v12 )
break;
memcpy((char *)v12 + 2020, v21, 648LL);
if ( v17 )
*((_QWORD *)v12 + 334) = (char *)v12 + 2020;
else
*((_QWORD *)v12 + 334) = 0LL;
*((_DWORD *)v12 + 670) = v17;
if ( v15 )
*((_QWORD *)v12 + 336) = (char *)v12 + v17 + 2021;
else
*((_QWORD *)v12 + 336) = 0LL;
*((_DWORD *)v12 + 674) = v15;
user = find_or_create_user(v19, v18, v17);
*((_QWORD *)v12 + 338) = user;
host = find_or_create_host(v19, v16, v15);
*((_QWORD *)v12 + 339) = host;
PFS_account::init_refcount(v12);
PFS_connection_slice::reset_stats(v12);
*((_QWORD *)v12 + 340) = 0LL;
if ( v17 && v15 )
{
lookup_setup_actor(v19, v18, v17, v16, v15, (bool *)v12 + 2668, (bool *)v12 + 2669);
}
else
{
*((_BYTE *)v12 + 2668) = 1;
*((_BYTE *)v12 + 2669) = 1;
}
pfs_lock::dirty_to_allocated((PFS_account *)((char *)v12 + 2016), v10, v7);
v9 = lf_hash_insert(&account_hash, account_hash_pins, &v12);
if ( !v9 )
return v12;
if ( *((_QWORD *)v12 + 338) )
{
PFS_user::release(*((PFS_user **)v12 + 338));
*((_QWORD *)v12 + 338) = 0LL;
}
if ( *((_QWORD *)v12 + 339) )
{
PFS_host::release(*((PFS_host **)v12 + 339));
*((_QWORD *)v12 + 339) = 0LL;
}
PFS_buffer_scalable_container<PFS_account,128,128,PFS_account_array,PFS_account_allocator>::deallocate(
global_account_container,
v12);
if ( v9 <= 0 )
{
++global_account_container[0];
return 0LL;
}
if ( (unsigned int)++v11 > 3 )
{
++global_account_container[0];
return 0LL;
}
}
return 0LL;
}
else
{
++global_account_container[0];
return 0LL;
}
}
|
find_or_create_account:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x310
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x2a0],RDI
MOV qword ptr [RBP + -0x2a8],RSI
MOV dword ptr [RBP + -0x2ac],EDX
MOV qword ptr [RBP + -0x2b8],RCX
MOV dword ptr [RBP + -0x2bc],R8D
MOV RDI,qword ptr [RBP + -0x2a0]
CALL 0x0014f270
MOV qword ptr [RBP + -0x2c8],RAX
CMP qword ptr [RBP + -0x2c8],0x0
SETZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x0014ee0a
LEA RAX,[0x502ea8]
MOV RCX,qword ptr [RAX]
ADD RCX,0x1
LEA RAX,[0x502ea8]
MOV qword ptr [RAX],RCX
MOV qword ptr [RBP + -0x298],0x0
JMP 0x0014f22d
LAB_0014ee0a:
MOV RSI,qword ptr [RBP + -0x2a8]
MOV EDX,dword ptr [RBP + -0x2ac]
MOV RCX,qword ptr [RBP + -0x2b8]
MOV R8D,dword ptr [RBP + -0x2bc]
LEA RDI,[RBP + -0x290]
CALL 0x0014f2e0
MOV dword ptr [RBP + -0x2dc],0x0
MOV dword ptr [RBP + -0x2e0],0x3
LAB_0014ee45:
MOV RSI,qword ptr [RBP + -0x2c8]
LEA RDX,[RBP + -0x290]
MOV ECX,dword ptr [RBP + -0xc]
LEA RDI,[0x50d3a0]
CALL 0x0015d790
MOV qword ptr [RBP + -0x2d0],RAX
CMP qword ptr [RBP + -0x2d0],0x0
JZ 0x0014eed2
MOV EAX,0x1
CMP qword ptr [RBP + -0x2d0],RAX
JZ 0x0014eed2
MOV RAX,qword ptr [RBP + -0x2d0]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x2d8],RAX
MOV RDI,qword ptr [RBP + -0x2d8]
CALL 0x001500c0
JMP 0x0014eea0
LAB_0014eea0:
JMP 0x0014eea2
LAB_0014eea2:
MOV RCX,qword ptr [RBP + -0x2c8]
MOV qword ptr [RBP + -0x2f0],0x0
MOV RAX,qword ptr [RBP + -0x2f0]
XCHG qword ptr [RCX + 0x10],RAX
MOV RAX,qword ptr [RBP + -0x2d8]
MOV qword ptr [RBP + -0x298],RAX
JMP 0x0014f22d
LAB_0014eed2:
JMP 0x0014eed4
LAB_0014eed4:
JMP 0x0014eed6
LAB_0014eed6:
JMP 0x0014eed8
LAB_0014eed8:
MOV RCX,qword ptr [RBP + -0x2c8]
MOV qword ptr [RBP + -0x2f8],0x0
MOV RAX,qword ptr [RBP + -0x2f8]
XCHG qword ptr [RCX + 0x10],RAX
LEA RDI,[0x502ea8]
LEA RSI,[RBP + -0x2e4]
CALL 0x001500f0
MOV qword ptr [RBP + -0x2d8],RAX
CMP qword ptr [RBP + -0x2d8],0x0
JZ 0x0014f222
MOV RDI,qword ptr [RBP + -0x2d8]
ADD RDI,0x7e4
LEA RSI,[RBP + -0x290]
MOV EDX,0x288
CALL 0x00126280
CMP dword ptr [RBP + -0x2ac],0x0
JBE 0x0014ef63
MOV RCX,qword ptr [RBP + -0x2d8]
ADD RCX,0x7e4
MOV RAX,qword ptr [RBP + -0x2d8]
MOV qword ptr [RAX + 0xa70],RCX
JMP 0x0014ef75
LAB_0014ef63:
MOV RAX,qword ptr [RBP + -0x2d8]
MOV qword ptr [RAX + 0xa70],0x0
LAB_0014ef75:
MOV ECX,dword ptr [RBP + -0x2ac]
MOV RAX,qword ptr [RBP + -0x2d8]
MOV dword ptr [RAX + 0xa78],ECX
CMP dword ptr [RBP + -0x2bc],0x0
JBE 0x0014efbd
MOV RCX,qword ptr [RBP + -0x2d8]
ADD RCX,0x7e4
MOV EAX,dword ptr [RBP + -0x2ac]
ADD EAX,0x1
MOV EAX,EAX
ADD RCX,RAX
MOV RAX,qword ptr [RBP + -0x2d8]
MOV qword ptr [RAX + 0xa80],RCX
JMP 0x0014efcf
LAB_0014efbd:
MOV RAX,qword ptr [RBP + -0x2d8]
MOV qword ptr [RAX + 0xa80],0x0
LAB_0014efcf:
MOV ECX,dword ptr [RBP + -0x2bc]
MOV RAX,qword ptr [RBP + -0x2d8]
MOV dword ptr [RAX + 0xa88],ECX
MOV RDI,qword ptr [RBP + -0x2a0]
MOV RSI,qword ptr [RBP + -0x2a8]
MOV EDX,dword ptr [RBP + -0x2ac]
CALL 0x00142ff0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x2d8]
MOV qword ptr [RAX + 0xa90],RCX
MOV RDI,qword ptr [RBP + -0x2a0]
MOV RSI,qword ptr [RBP + -0x2b8]
MOV EDX,dword ptr [RBP + -0x2bc]
CALL 0x00156550
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x2d8]
MOV qword ptr [RAX + 0xa98],RCX
MOV RDI,qword ptr [RBP + -0x2d8]
CALL 0x001504c0
MOV RDI,qword ptr [RBP + -0x2d8]
CALL 0x00134360
MOV RAX,qword ptr [RBP + -0x2d8]
MOV qword ptr [RAX + 0xaa0],0x0
CMP dword ptr [RBP + -0x2ac],0x0
JBE 0x0014f0ba
CMP dword ptr [RBP + -0x2bc],0x0
JBE 0x0014f0ba
MOV RDI,qword ptr [RBP + -0x2a0]
MOV RSI,qword ptr [RBP + -0x2a8]
MOV EDX,dword ptr [RBP + -0x2ac]
MOV RCX,qword ptr [RBP + -0x2b8]
MOV R8D,dword ptr [RBP + -0x2bc]
MOV R9,qword ptr [RBP + -0x2d8]
ADD R9,0xa6c
MOV RAX,qword ptr [RBP + -0x2d8]
ADD RAX,0xa6d
MOV qword ptr [RSP],RAX
CALL 0x0013fdf0
JMP 0x0014f0d6
LAB_0014f0ba:
MOV RAX,qword ptr [RBP + -0x2d8]
MOV byte ptr [RAX + 0xa6c],0x1
MOV RAX,qword ptr [RBP + -0x2d8]
MOV byte ptr [RAX + 0xa6d],0x1
LAB_0014f0d6:
MOV RDI,qword ptr [RBP + -0x2d8]
ADD RDI,0x7e0
LEA RSI,[RBP + -0x2e4]
CALL 0x00133390
MOV RSI,qword ptr [RBP + -0x2c8]
LEA RDI,[0x50d3a0]
LEA RDX,[RBP + -0x2d8]
CALL 0x0015c770
MOV dword ptr [RBP + -0x2fc],EAX
CMP dword ptr [RBP + -0x2fc],0x0
SETZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x0014f137
MOV RAX,qword ptr [RBP + -0x2d8]
MOV qword ptr [RBP + -0x298],RAX
JMP 0x0014f22d
LAB_0014f137:
MOV RAX,qword ptr [RBP + -0x2d8]
CMP qword ptr [RAX + 0xa90],0x0
JZ 0x0014f16d
MOV RAX,qword ptr [RBP + -0x2d8]
MOV RDI,qword ptr [RAX + 0xa90]
CALL 0x00143580
MOV RAX,qword ptr [RBP + -0x2d8]
MOV qword ptr [RAX + 0xa90],0x0
LAB_0014f16d:
MOV RAX,qword ptr [RBP + -0x2d8]
CMP qword ptr [RAX + 0xa98],0x0
JZ 0x0014f1a3
MOV RAX,qword ptr [RBP + -0x2d8]
MOV RDI,qword ptr [RAX + 0xa98]
CALL 0x00156c10
MOV RAX,qword ptr [RBP + -0x2d8]
MOV qword ptr [RAX + 0xa98],0x0
LAB_0014f1a3:
MOV RSI,qword ptr [RBP + -0x2d8]
LEA RDI,[0x502ea8]
CALL 0x001504f0
CMP dword ptr [RBP + -0x2fc],0x0
JLE 0x0014f1fd
MOV EAX,dword ptr [RBP + -0x2dc]
ADD EAX,0x1
MOV dword ptr [RBP + -0x2dc],EAX
CMP EAX,0x3
JBE 0x0014f1f8
LEA RAX,[0x502ea8]
MOV RCX,qword ptr [RAX]
ADD RCX,0x1
LEA RAX,[0x502ea8]
MOV qword ptr [RAX],RCX
MOV qword ptr [RBP + -0x298],0x0
JMP 0x0014f22d
LAB_0014f1f8:
JMP 0x0014ee45
LAB_0014f1fd:
LEA RAX,[0x502ea8]
MOV RCX,qword ptr [RAX]
ADD RCX,0x1
LEA RAX,[0x502ea8]
MOV qword ptr [RAX],RCX
MOV qword ptr [RBP + -0x298],0x0
JMP 0x0014f22d
LAB_0014f222:
MOV qword ptr [RBP + -0x298],0x0
LAB_0014f22d:
MOV RAX,qword ptr [RBP + -0x298]
MOV qword ptr [RBP + -0x308],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0014f25d
MOV RAX,qword ptr [RBP + -0x308]
ADD RSP,0x310
POP RBP
RET
LAB_0014f25d:
CALL 0x00126360
|
/* find_or_create_account(PFS_thread*, char const*, unsigned int, char const*, unsigned int) */
PFS_account *
find_or_create_account(PFS_thread *param_1,char *param_2,uint param_3,char *param_4,uint param_5)
{
int iVar1;
int8 uVar2;
long in_FS_OFFSET;
pfs_dirty_state local_2ec [4];
int4 local_2e8;
uint local_2e4;
PFS_account *local_2e0;
int8 *local_2d8;
long local_2d0;
uint local_2c4;
char *local_2c0;
uint local_2b4;
char *local_2b0;
PFS_thread *local_2a8;
PFS_account *local_2a0;
PFS_account_key local_298 [644];
int4 local_14;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_2c4 = param_5;
local_2c0 = param_4;
local_2b4 = param_3;
local_2b0 = param_2;
local_2a8 = param_1;
local_2d0 = get_account_hash_pins(param_1);
if (local_2d0 == 0) {
global_account_container = global_account_container + 1;
local_2a0 = (PFS_account *)0x0;
}
else {
set_account_key(local_298,local_2b0,local_2b4,local_2c0,local_2c4);
local_2e4 = 0;
local_2e8 = 3;
do {
local_2d8 = (int8 *)lf_hash_search(account_hash,local_2d0,local_298,local_14);
if ((local_2d8 != (int8 *)0x0) && (local_2d8 != (int8 *)0x1)) {
local_2e0 = (PFS_account *)*local_2d8;
PFS_account::inc_refcount(local_2e0);
LOCK();
*(int8 *)(local_2d0 + 0x10) = 0;
UNLOCK();
local_2a0 = local_2e0;
goto LAB_0014f22d;
}
LOCK();
*(int8 *)(local_2d0 + 0x10) = 0;
UNLOCK();
local_2e0 = (PFS_account *)
PFS_buffer_scalable_container<PFS_account,128,128,PFS_account_array,PFS_account_allocator>
::allocate((PFS_buffer_scalable_container<PFS_account,128,128,PFS_account_array,PFS_account_allocator>
*)&global_account_container,local_2ec);
if (local_2e0 == (PFS_account *)0x0) {
local_2a0 = (PFS_account *)0x0;
goto LAB_0014f22d;
}
memcpy(local_2e0 + 0x7e4,local_298,0x288);
if (local_2b4 == 0) {
*(int8 *)(local_2e0 + 0xa70) = 0;
}
else {
*(PFS_account **)(local_2e0 + 0xa70) = local_2e0 + 0x7e4;
}
*(uint *)(local_2e0 + 0xa78) = local_2b4;
if (local_2c4 == 0) {
*(int8 *)(local_2e0 + 0xa80) = 0;
}
else {
*(PFS_account **)(local_2e0 + 0xa80) = local_2e0 + (ulong)(local_2b4 + 1) + 0x7e4;
}
*(uint *)(local_2e0 + 0xa88) = local_2c4;
uVar2 = find_or_create_user(local_2a8,local_2b0,local_2b4);
*(int8 *)(local_2e0 + 0xa90) = uVar2;
uVar2 = find_or_create_host(local_2a8,local_2c0,local_2c4);
*(int8 *)(local_2e0 + 0xa98) = uVar2;
PFS_account::init_refcount(local_2e0);
PFS_connection_slice::reset_stats((PFS_connection_slice *)local_2e0);
*(int8 *)(local_2e0 + 0xaa0) = 0;
if ((local_2b4 == 0) || (local_2c4 == 0)) {
local_2e0[0xa6c] = (PFS_account)0x1;
local_2e0[0xa6d] = (PFS_account)0x1;
}
else {
lookup_setup_actor(local_2a8,local_2b0,local_2b4,local_2c0,local_2c4,
(bool *)(local_2e0 + 0xa6c),(bool *)(local_2e0 + 0xa6d));
}
pfs_lock::dirty_to_allocated((pfs_lock *)(local_2e0 + 0x7e0),local_2ec);
iVar1 = lf_hash_insert(account_hash,local_2d0,&local_2e0);
if (iVar1 == 0) {
local_2a0 = local_2e0;
goto LAB_0014f22d;
}
if (*(long *)(local_2e0 + 0xa90) != 0) {
PFS_user::release(*(PFS_user **)(local_2e0 + 0xa90));
*(int8 *)(local_2e0 + 0xa90) = 0;
}
if (*(long *)(local_2e0 + 0xa98) != 0) {
PFS_host::release(*(PFS_host **)(local_2e0 + 0xa98));
*(int8 *)(local_2e0 + 0xa98) = 0;
}
PFS_buffer_scalable_container<PFS_account,128,128,PFS_account_array,PFS_account_allocator>::
deallocate((PFS_buffer_scalable_container<PFS_account,128,128,PFS_account_array,PFS_account_allocator>
*)&global_account_container,local_2e0);
if (iVar1 < 1) {
global_account_container = global_account_container + 1;
local_2a0 = (PFS_account *)0x0;
goto LAB_0014f22d;
}
local_2e4 = local_2e4 + 1;
} while (local_2e4 < 4);
global_account_container = global_account_container + 1;
local_2a0 = (PFS_account *)0x0;
}
LAB_0014f22d:
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_2a0;
}
|
|
7,661 |
find_or_create_account(PFS_thread*, char const*, unsigned int, char const*, unsigned int)
|
eloqsql/storage/perfschema/pfs_account.cc
|
PFS_account *
find_or_create_account(PFS_thread *thread,
const char *username, uint username_length,
const char *hostname, uint hostname_length)
{
LF_PINS *pins= get_account_hash_pins(thread);
if (unlikely(pins == NULL))
{
global_account_container.m_lost++;
return NULL;
}
PFS_account_key key;
set_account_key(&key, username, username_length,
hostname, hostname_length);
PFS_account **entry;
PFS_account *pfs;
uint retry_count= 0;
const uint retry_max= 3;
pfs_dirty_state dirty_state;
search:
entry= reinterpret_cast<PFS_account**>
(lf_hash_search(&account_hash, pins,
key.m_hash_key, key.m_key_length));
if (entry && (entry != MY_ERRPTR))
{
pfs= *entry;
pfs->inc_refcount();
lf_hash_search_unpin(pins);
return pfs;
}
lf_hash_search_unpin(pins);
pfs= global_account_container.allocate(& dirty_state);
if (pfs != NULL)
{
pfs->m_key= key;
if (username_length > 0)
pfs->m_username= &pfs->m_key.m_hash_key[0];
else
pfs->m_username= NULL;
pfs->m_username_length= username_length;
if (hostname_length > 0)
pfs->m_hostname= &pfs->m_key.m_hash_key[username_length + 1];
else
pfs->m_hostname= NULL;
pfs->m_hostname_length= hostname_length;
pfs->m_user= find_or_create_user(thread, username, username_length);
pfs->m_host= find_or_create_host(thread, hostname, hostname_length);
pfs->init_refcount();
pfs->reset_stats();
pfs->m_disconnected_count= 0;
if (username_length > 0 && hostname_length > 0)
{
lookup_setup_actor(thread, username, username_length, hostname, hostname_length,
& pfs->m_enabled, & pfs->m_history);
}
else
{
pfs->m_enabled= true;
pfs->m_history= true;
}
int res;
pfs->m_lock.dirty_to_allocated(& dirty_state);
res= lf_hash_insert(&account_hash, pins, &pfs);
if (likely(res == 0))
{
return pfs;
}
if (pfs->m_user)
{
pfs->m_user->release();
pfs->m_user= NULL;
}
if (pfs->m_host)
{
pfs->m_host->release();
pfs->m_host= NULL;
}
global_account_container.deallocate(pfs);
if (res > 0)
{
if (++retry_count > retry_max)
{
global_account_container.m_lost++;
return NULL;
}
goto search;
}
global_account_container.m_lost++;
return NULL;
}
return NULL;
}
|
O3
|
cpp
|
find_or_create_account(PFS_thread*, char const*, unsigned int, char const*, unsigned int):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2d8, %rsp # imm = 0x2D8
movl %r8d, %ebx
movq %rcx, -0x2d0(%rbp)
movl %edx, %r15d
movq %rsi, %r13
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq %rdi, -0x2e0(%rbp)
movq 0x838(%rdi), %rcx
testq %rcx, %rcx
je 0x3ee6f
movq %rcx, -0x2e8(%rbp)
testl %r15d, %r15d
je 0x3eb72
movl %r15d, %r12d
leaq -0x2b8(%rbp), %rdi
movl $0x288, %ecx # imm = 0x288
movq %r13, %rsi
movq %r12, %rdx
callq 0x265f0
addq %rbp, %r12
addq $-0x2b8, %r12 # imm = 0xFD48
jmp 0x3eb79
leaq -0x2b8(%rbp), %r12
movq %r13, -0x2f8(%rbp)
movb $0x0, (%r12)
incq %r12
testl %ebx, %ebx
je 0x3eba4
movl %ebx, %r13d
movq %r12, %rdi
movq -0x2d0(%rbp), %rsi
movq %r13, %rdx
callq 0x26290
addq %r13, %r12
movb $0x0, (%r12)
leaq -0x2b8(%rbp), %rdx
subl %edx, %r12d
incl %r12d
movl %r12d, 0x284(%rdx)
testl %r15d, %r15d
setne %al
testl %ebx, %ebx
setne %cl
leal 0x1(%r15), %esi
movq %rsi, -0x2f0(%rbp)
andb %al, %cl
movb %cl, -0x2b9(%rbp)
movl $0x4, %r13d
leaq 0x3916b0(%rip), %rdi # 0x3d0298
xorl %r14d, %r14d
movq -0x2e8(%rbp), %r12
movl -0x34(%rbp), %ecx
movq %r12, %rsi
callq 0x2c462
cmpq $0x2, %rax
jae 0x3ee2c
movl %r13d, -0x2d4(%rbp)
xorl %eax, %eax
xchgq %rax, 0x10(%r12)
leaq 0x38731c(%rip), %rdi # 0x3c5f38
leaq -0x2d8(%rbp), %rsi
callq 0x3f7b8
movq %rax, -0x2c8(%rbp)
testq %rax, %rax
je 0x3ee4b
movq %rax, %r13
leaq 0x7e4(%rax), %r14
movl $0x288, %edx # imm = 0x288
movq %r14, %rdi
leaq -0x2b8(%rbp), %rsi
callq 0x26290
testl %r15d, %r15d
movl $0x0, %ecx
cmoveq %rcx, %r14
testl %ebx, %ebx
movq %r14, 0xa70(%r13)
movq -0x2d0(%rbp), %r14
movl %r15d, 0xa78(%r13)
movq -0x2f0(%rbp), %rax
leaq 0x7e4(%r13,%rax), %rax
cmoveq %rcx, %rax
movq %rax, 0xa80(%r13)
movl %ebx, 0xa88(%r13)
movq -0x2e0(%rbp), %r13
movq %r13, %rdi
movq -0x2f8(%rbp), %r12
movq %r12, %rsi
movl %r15d, %edx
callq 0x3a9cc
movq -0x2c8(%rbp), %rcx
movq %rax, 0xa90(%rcx)
movq %r13, %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x43ec0
movq -0x2c8(%rbp), %rcx
movq %rax, 0xa98(%rcx)
movl $0x1, %eax
xchgl %eax, 0xaa8(%rcx)
leaq 0x30(%rcx), %rdi
movb $0x0, 0x4(%rcx)
movl $0x0, (%rcx)
callq 0x3a10c
movq -0x2c8(%rbp), %rax
movq $0x0, 0xaa0(%rax)
cmpb $0x0, -0x2b9(%rbp)
je 0x3ed4a
leaq 0xa6c(%rax), %r9
addq $0xa6d, %rax # imm = 0xA6D
movq %rax, (%rsp)
movq %r13, %rdi
movq %r12, %rsi
movl %r15d, %edx
movq -0x2d0(%rbp), %rcx
movl %ebx, %r8d
callq 0x39143
movq -0x2c8(%rbp), %rax
jmp 0x3ed53
movw $0x101, 0xa6c(%rax) # imm = 0x101
leaq 0x39153e(%rip), %rdi # 0x3d0298
leaq -0x2c8(%rbp), %rdx
movl -0x2d8(%rbp), %ecx
andl $-0x4, %ecx
addl $0x6, %ecx
xchgl %ecx, 0x7e0(%rax)
movq -0x2e8(%rbp), %r12
movq %r12, %rsi
callq 0x2bc03
movq -0x2c8(%rbp), %r14
testl %eax, %eax
je 0x3ee4b
movl %eax, %r13d
movq 0xa90(%r14), %rdi
testq %rdi, %rdi
je 0x3edb7
callq 0x3acba
movq -0x2c8(%rbp), %r14
movq $0x0, 0xa90(%r14)
movq 0xa98(%r14), %rdi
testq %rdi, %rdi
je 0x3edda
callq 0x4429e
movq -0x2c8(%rbp), %r14
movq $0x0, 0xa98(%r14)
movq 0x7d8(%r14), %rcx
movl 0x7e0(%r14), %edx
andl $-0x4, %edx
xchgl %edx, 0x7e0(%r14)
xorl %eax, %eax
movb %al, (%rcx)
xorl %r14d, %r14d
leaq 0x387138(%rip), %rcx # 0x3c5f38
movb %al, 0x9(%rcx)
testl %r13d, %r13d
movl -0x2d4(%rbp), %r13d
jle 0x3ee9e
decl %r13d
leaq -0x2b8(%rbp), %rdx
leaq 0x391474(%rip), %rdi # 0x3d0298
jne 0x3ebf2
jmp 0x3ee9e
movq (%rax), %rax
movq %rax, -0x2c8(%rbp)
lock
incl 0xaa8(%rax)
xorl %eax, %eax
xchgq %rax, 0x10(%r12)
movq -0x2c8(%rbp), %r14
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x3eead
movq %r14, %rax
addq $0x2d8, %rsp # imm = 0x2D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpb $0x1, 0x3914ea(%rip) # 0x3d0360
jne 0x3ee9e
leaq 0x391441(%rip), %rdi # 0x3d02c0
callq 0x2ba28
movq %rax, %rcx
movq -0x2e0(%rbp), %rax
movq %rcx, 0x838(%rax)
testq %rcx, %rcx
jne 0x3eb40
leaq 0x387093(%rip), %rax # 0x3c5f38
incq (%rax)
xorl %r14d, %r14d
jmp 0x3ee4b
callq 0x263a0
|
_Z22find_or_create_accountP10PFS_threadPKcjS2_j:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 2D8h
mov ebx, r8d
mov [rbp+var_2D0], rcx
mov r15d, edx
mov r13, rsi
mov rax, fs:28h
mov [rbp+var_30], rax
mov [rbp+var_2E0], rdi
mov rcx, [rdi+838h]
test rcx, rcx
jz loc_3EE6F
loc_3EB40:
mov [rbp+var_2E8], rcx
test r15d, r15d
jz short loc_3EB72
mov r12d, r15d
lea rdi, [rbp+var_2B8]
mov ecx, 288h
mov rsi, r13
mov rdx, r12
call ___memcpy_chk
add r12, rbp
add r12, 0FFFFFFFFFFFFFD48h
jmp short loc_3EB79
loc_3EB72:
lea r12, [rbp+var_2B8]
loc_3EB79:
mov [rbp+var_2F8], r13
mov byte ptr [r12], 0
inc r12
test ebx, ebx
jz short loc_3EBA4
mov r13d, ebx
mov rdi, r12
mov rsi, [rbp+var_2D0]
mov rdx, r13
call _memcpy
add r12, r13
loc_3EBA4:
mov byte ptr [r12], 0
lea rdx, [rbp+var_2B8]
sub r12d, edx
inc r12d
mov [rdx+284h], r12d
test r15d, r15d
setnz al
test ebx, ebx
setnz cl
lea esi, [r15+1]
mov [rbp+var_2F0], rsi
and cl, al
mov [rbp+var_2B9], cl
mov r13d, 4
lea rdi, account_hash
xor r14d, r14d
mov r12, [rbp+var_2E8]
loc_3EBF2:
mov ecx, [rbp+var_34]
mov rsi, r12
call lf_hash_search
cmp rax, 2
jnb loc_3EE2C
mov [rbp+var_2D4], r13d
xor eax, eax
xchg rax, [r12+10h]
lea rdi, global_account_container
lea rsi, [rbp+var_2D8]
call _ZN29PFS_buffer_scalable_containerI11PFS_accountLi128ELi128E17PFS_account_array21PFS_account_allocatorE8allocateEP15pfs_dirty_state; PFS_buffer_scalable_container<PFS_account,128,128,PFS_account_array,PFS_account_allocator>::allocate(pfs_dirty_state *)
mov [rbp+var_2C8], rax
test rax, rax
jz loc_3EE4B
mov r13, rax
lea r14, [rax+7E4h]
mov edx, 288h
mov rdi, r14
lea rsi, [rbp+var_2B8]
call _memcpy
test r15d, r15d
mov ecx, 0
cmovz r14, rcx
test ebx, ebx
mov [r13+0A70h], r14
mov r14, [rbp+var_2D0]
mov [r13+0A78h], r15d
mov rax, [rbp+var_2F0]
lea rax, [r13+rax+7E4h]
cmovz rax, rcx
mov [r13+0A80h], rax
mov [r13+0A88h], ebx
mov r13, [rbp+var_2E0]
mov rdi, r13; PFS_thread *
mov r12, [rbp+var_2F8]
mov rsi, r12; char *
mov edx, r15d; unsigned int
call _Z19find_or_create_userP10PFS_threadPKcj; find_or_create_user(PFS_thread *,char const*,uint)
mov rcx, [rbp+var_2C8]
mov [rcx+0A90h], rax
mov rdi, r13; PFS_thread *
mov rsi, r14; char *
mov edx, ebx; unsigned int
call _Z19find_or_create_hostP10PFS_threadPKcj; find_or_create_host(PFS_thread *,char const*,uint)
mov rcx, [rbp+var_2C8]
mov [rcx+0A98h], rax
mov eax, 1
xchg eax, [rcx+0AA8h]
lea rdi, [rcx+30h]; this
mov byte ptr [rcx+4], 0
mov dword ptr [rcx], 0
call _ZN16PFS_status_stats5resetEv; PFS_status_stats::reset(void)
mov rax, [rbp+var_2C8]
mov qword ptr [rax+0AA0h], 0
cmp [rbp+var_2B9], 0
jz short loc_3ED4A
lea r9, [rax+0A6Ch]; bool *
add rax, 0A6Dh
mov [rsp+300h+var_300], rax; bool *
mov rdi, r13; PFS_thread *
mov rsi, r12; char *
mov edx, r15d; unsigned int
mov rcx, [rbp+var_2D0]; char *
mov r8d, ebx; unsigned int
call _Z18lookup_setup_actorP10PFS_threadPKcjS2_jPbS3_; lookup_setup_actor(PFS_thread *,char const*,uint,char const*,uint,bool *,bool *)
mov rax, [rbp+var_2C8]
jmp short loc_3ED53
loc_3ED4A:
mov word ptr [rax+0A6Ch], 101h
loc_3ED53:
lea rdi, account_hash
lea rdx, [rbp+var_2C8]
mov ecx, [rbp+var_2D8]
and ecx, 0FFFFFFFCh
add ecx, 6
xchg ecx, [rax+7E0h]
mov r12, [rbp+var_2E8]
mov rsi, r12
call lf_hash_insert
mov r14, [rbp+var_2C8]
test eax, eax
jz loc_3EE4B
mov r13d, eax
mov rdi, [r14+0A90h]; this
test rdi, rdi
jz short loc_3EDB7
call _ZN8PFS_user7releaseEv; PFS_user::release(void)
mov r14, [rbp+var_2C8]
mov qword ptr [r14+0A90h], 0
loc_3EDB7:
mov rdi, [r14+0A98h]; this
test rdi, rdi
jz short loc_3EDDA
call _ZN8PFS_host7releaseEv; PFS_host::release(void)
mov r14, [rbp+var_2C8]
mov qword ptr [r14+0A98h], 0
loc_3EDDA:
mov rcx, [r14+7D8h]
mov edx, [r14+7E0h]
and edx, 0FFFFFFFCh
xchg edx, [r14+7E0h]
xor eax, eax
mov [rcx], al
xor r14d, r14d
lea rcx, global_account_container
mov [rcx+9], al
test r13d, r13d
mov r13d, [rbp+var_2D4]
jle loc_3EE9E
dec r13d
lea rdx, [rbp+var_2B8]
lea rdi, account_hash
jnz loc_3EBF2
jmp short loc_3EE9E
loc_3EE2C:
mov rax, [rax]
mov [rbp+var_2C8], rax
lock inc dword ptr [rax+0AA8h]
xor eax, eax
xchg rax, [r12+10h]
mov r14, [rbp+var_2C8]
loc_3EE4B:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_3EEAD
mov rax, r14
add rsp, 2D8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3EE6F:
cmp cs:_ZL19account_hash_inited, 1; account_hash_inited
jnz short loc_3EE9E
lea rdi, unk_3D02C0
call lf_pinbox_get_pins
mov rcx, rax
mov rax, [rbp+var_2E0]
mov [rax+838h], rcx
test rcx, rcx
jnz loc_3EB40
loc_3EE9E:
lea rax, global_account_container
inc qword ptr [rax]
xor r14d, r14d
jmp short loc_3EE4B
loc_3EEAD:
call ___stack_chk_fail
|
long long find_or_create_account(PFS_thread *a1, const char *a2, unsigned int a3, char *a4, unsigned int a5)
{
long long pins; // rcx
_BYTE *v8; // r12
_BYTE *v9; // r12
int v10; // r13d
long long v11; // r14
volatile long long *v12; // r12
long long *v13; // rax
long long v14; // rax
long long v15; // r13
long long v16; // r14
char *v17; // r14
long long v18; // rax
long long user; // rax
long long host; // rax
long long v21; // rcx
long long v22; // rax
int v23; // eax
int v24; // r13d
PFS_user *v25; // rdi
PFS_host *v26; // rdi
_BYTE *v27; // rcx
long long v29; // [rsp+18h] [rbp-2E8h]
int v31; // [rsp+28h] [rbp-2D8h] BYREF
int v32; // [rsp+2Ch] [rbp-2D4h]
char *v33; // [rsp+30h] [rbp-2D0h]
long long v34; // [rsp+38h] [rbp-2C8h] BYREF
bool v35; // [rsp+47h] [rbp-2B9h]
_BYTE v36[644]; // [rsp+48h] [rbp-2B8h] BYREF
unsigned int v37; // [rsp+2CCh] [rbp-34h]
unsigned long long v38; // [rsp+2D0h] [rbp-30h]
v33 = a4;
v38 = __readfsqword(0x28u);
pins = *((_QWORD *)a1 + 263);
if ( pins
|| account_hash_inited == 1
&& (pins = lf_pinbox_get_pins((long long)&unk_3D02C0), (*((_QWORD *)a1 + 263) = pins) != 0LL) )
{
v29 = pins;
if ( a3 )
{
__memcpy_chk(v36, a2, a3, 648LL);
v8 = &v36[a3];
}
else
{
v8 = v36;
}
*v8 = 0;
v9 = v8 + 1;
if ( a5 )
{
memcpy(v9, v33, a5);
v9 += a5;
}
*v9 = 0;
v37 = (_DWORD)v9 - (unsigned int)v36 + 1;
v35 = a3 != 0 && a5 != 0;
v10 = 4;
v11 = 0LL;
v12 = (volatile long long *)v29;
while ( 1 )
{
v13 = (long long *)lf_hash_search((long long)&account_hash, v12, (long long)v36, v37);
if ( (unsigned long long)v13 >= 2 )
break;
v32 = v10;
_InterlockedExchange64(v12 + 2, 0LL);
v14 = PFS_buffer_scalable_container<PFS_account,128,128,PFS_account_array,PFS_account_allocator>::allocate(
global_account_container,
&v31);
v34 = v14;
if ( !v14 )
return v11;
v15 = v14;
v16 = v14 + 2020;
memcpy(v14 + 2020, v36, 648LL);
if ( !a3 )
v16 = 0LL;
*(_QWORD *)(v15 + 2672) = v16;
v17 = v33;
*(_DWORD *)(v15 + 2680) = a3;
v18 = v15 + a3 + 1 + 2020;
if ( !a5 )
v18 = 0LL;
*(_QWORD *)(v15 + 2688) = v18;
*(_DWORD *)(v15 + 2696) = a5;
user = find_or_create_user(a1, a2, a3);
*(_QWORD *)(v34 + 2704) = user;
host = find_or_create_host(a1, v17, a5);
v21 = v34;
*(_QWORD *)(v34 + 2712) = host;
_InterlockedExchange((volatile __int32 *)(v21 + 2728), 1);
*(_BYTE *)(v21 + 4) = 0;
*(_DWORD *)v21 = 0;
PFS_status_stats::reset((PFS_status_stats *)(v21 + 48));
v22 = v34;
*(_QWORD *)(v34 + 2720) = 0LL;
if ( v35 )
{
lookup_setup_actor(a1, a2, a3, v33, a5, (bool *)(v22 + 2668), (bool *)(v22 + 2669));
v22 = v34;
}
else
{
*(_WORD *)(v22 + 2668) = 257;
}
_InterlockedExchange((volatile __int32 *)(v22 + 2016), (v31 & 0xFFFFFFFC) + 6);
v12 = (volatile long long *)v29;
v23 = lf_hash_insert((long long)&account_hash, v29, (long long)&v34);
v11 = v34;
if ( !v23 )
return v11;
v24 = v23;
v25 = *(PFS_user **)(v34 + 2704);
if ( v25 )
{
PFS_user::release(v25);
v11 = v34;
*(_QWORD *)(v34 + 2704) = 0LL;
}
v26 = *(PFS_host **)(v11 + 2712);
if ( v26 )
{
PFS_host::release(v26);
v11 = v34;
*(_QWORD *)(v34 + 2712) = 0LL;
}
v27 = *(_BYTE **)(v11 + 2008);
_InterlockedExchange((volatile __int32 *)(v11 + 2016), *(_DWORD *)(v11 + 2016) & 0xFFFFFFFC);
*v27 = 0;
v11 = 0LL;
BYTE1(global_account_container[1]) = 0;
if ( v24 > 0 )
{
v10 = v32 - 1;
if ( v32 != 1 )
continue;
}
goto LABEL_29;
}
v34 = *v13;
_InterlockedIncrement((volatile signed __int32 *)(v34 + 2728));
_InterlockedExchange64(v12 + 2, 0LL);
return v34;
}
else
{
LABEL_29:
++global_account_container[0];
return 0LL;
}
}
|
find_or_create_account:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x2d8
MOV EBX,R8D
MOV qword ptr [RBP + -0x2d0],RCX
MOV R15D,EDX
MOV R13,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV qword ptr [RBP + -0x2e0],RDI
MOV RCX,qword ptr [RDI + 0x838]
TEST RCX,RCX
JZ 0x0013ee6f
LAB_0013eb40:
MOV qword ptr [RBP + -0x2e8],RCX
TEST R15D,R15D
JZ 0x0013eb72
MOV R12D,R15D
LEA RDI,[RBP + -0x2b8]
MOV ECX,0x288
MOV RSI,R13
MOV RDX,R12
CALL 0x001265f0
ADD R12,RBP
ADD R12,-0x2b8
JMP 0x0013eb79
LAB_0013eb72:
LEA R12,[RBP + -0x2b8]
LAB_0013eb79:
MOV qword ptr [RBP + -0x2f8],R13
MOV byte ptr [R12],0x0
INC R12
TEST EBX,EBX
JZ 0x0013eba4
MOV R13D,EBX
MOV RDI,R12
MOV RSI,qword ptr [RBP + -0x2d0]
MOV RDX,R13
CALL 0x00126290
ADD R12,R13
LAB_0013eba4:
MOV byte ptr [R12],0x0
LEA RDX,[RBP + -0x2b8]
SUB R12D,EDX
INC R12D
MOV dword ptr [RDX + 0x284],R12D
TEST R15D,R15D
SETNZ AL
TEST EBX,EBX
SETNZ CL
LEA ESI,[R15 + 0x1]
MOV qword ptr [RBP + -0x2f0],RSI
AND CL,AL
MOV byte ptr [RBP + -0x2b9],CL
MOV R13D,0x4
LEA RDI,[0x4d0298]
XOR R14D,R14D
MOV R12,qword ptr [RBP + -0x2e8]
LAB_0013ebf2:
MOV ECX,dword ptr [RBP + -0x34]
MOV RSI,R12
CALL 0x0012c462
CMP RAX,0x2
JNC 0x0013ee2c
MOV dword ptr [RBP + -0x2d4],R13D
XOR EAX,EAX
XCHG qword ptr [R12 + 0x10],RAX
LEA RDI,[0x4c5f38]
LEA RSI,[RBP + -0x2d8]
CALL 0x0013f7b8
MOV qword ptr [RBP + -0x2c8],RAX
TEST RAX,RAX
JZ 0x0013ee4b
MOV R13,RAX
LEA R14,[RAX + 0x7e4]
MOV EDX,0x288
MOV RDI,R14
LEA RSI,[RBP + -0x2b8]
CALL 0x00126290
TEST R15D,R15D
MOV ECX,0x0
CMOVZ R14,RCX
TEST EBX,EBX
MOV qword ptr [R13 + 0xa70],R14
MOV R14,qword ptr [RBP + -0x2d0]
MOV dword ptr [R13 + 0xa78],R15D
MOV RAX,qword ptr [RBP + -0x2f0]
LEA RAX,[R13 + RAX*0x1 + 0x7e4]
CMOVZ RAX,RCX
MOV qword ptr [R13 + 0xa80],RAX
MOV dword ptr [R13 + 0xa88],EBX
MOV R13,qword ptr [RBP + -0x2e0]
MOV RDI,R13
MOV R12,qword ptr [RBP + -0x2f8]
MOV RSI,R12
MOV EDX,R15D
CALL 0x0013a9cc
MOV RCX,qword ptr [RBP + -0x2c8]
MOV qword ptr [RCX + 0xa90],RAX
MOV RDI,R13
MOV RSI,R14
MOV EDX,EBX
CALL 0x00143ec0
MOV RCX,qword ptr [RBP + -0x2c8]
MOV qword ptr [RCX + 0xa98],RAX
MOV EAX,0x1
XCHG dword ptr [RCX + 0xaa8],EAX
LEA RDI,[RCX + 0x30]
MOV byte ptr [RCX + 0x4],0x0
MOV dword ptr [RCX],0x0
CALL 0x0013a10c
MOV RAX,qword ptr [RBP + -0x2c8]
MOV qword ptr [RAX + 0xaa0],0x0
CMP byte ptr [RBP + -0x2b9],0x0
JZ 0x0013ed4a
LEA R9,[RAX + 0xa6c]
ADD RAX,0xa6d
MOV qword ptr [RSP],RAX
MOV RDI,R13
MOV RSI,R12
MOV EDX,R15D
MOV RCX,qword ptr [RBP + -0x2d0]
MOV R8D,EBX
CALL 0x00139143
MOV RAX,qword ptr [RBP + -0x2c8]
JMP 0x0013ed53
LAB_0013ed4a:
MOV word ptr [RAX + 0xa6c],0x101
LAB_0013ed53:
LEA RDI,[0x4d0298]
LEA RDX,[RBP + -0x2c8]
MOV ECX,dword ptr [RBP + -0x2d8]
AND ECX,0xfffffffc
ADD ECX,0x6
XCHG dword ptr [RAX + 0x7e0],ECX
MOV R12,qword ptr [RBP + -0x2e8]
MOV RSI,R12
CALL 0x0012bc03
MOV R14,qword ptr [RBP + -0x2c8]
TEST EAX,EAX
JZ 0x0013ee4b
MOV R13D,EAX
MOV RDI,qword ptr [R14 + 0xa90]
TEST RDI,RDI
JZ 0x0013edb7
CALL 0x0013acba
MOV R14,qword ptr [RBP + -0x2c8]
MOV qword ptr [R14 + 0xa90],0x0
LAB_0013edb7:
MOV RDI,qword ptr [R14 + 0xa98]
TEST RDI,RDI
JZ 0x0013edda
CALL 0x0014429e
MOV R14,qword ptr [RBP + -0x2c8]
MOV qword ptr [R14 + 0xa98],0x0
LAB_0013edda:
MOV RCX,qword ptr [R14 + 0x7d8]
MOV EDX,dword ptr [R14 + 0x7e0]
AND EDX,0xfffffffc
XCHG dword ptr [R14 + 0x7e0],EDX
XOR EAX,EAX
MOV byte ptr [RCX],AL
XOR R14D,R14D
LEA RCX,[0x4c5f38]
MOV byte ptr [RCX + 0x9],AL
TEST R13D,R13D
MOV R13D,dword ptr [RBP + -0x2d4]
JLE 0x0013ee9e
DEC R13D
LEA RDX,[RBP + -0x2b8]
LEA RDI,[0x4d0298]
JNZ 0x0013ebf2
JMP 0x0013ee9e
LAB_0013ee2c:
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x2c8],RAX
INC.LOCK dword ptr [RAX + 0xaa8]
XOR EAX,EAX
XCHG qword ptr [R12 + 0x10],RAX
MOV R14,qword ptr [RBP + -0x2c8]
LAB_0013ee4b:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0013eead
MOV RAX,R14
ADD RSP,0x2d8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0013ee6f:
CMP byte ptr [0x004d0360],0x1
JNZ 0x0013ee9e
LEA RDI,[0x4d02c0]
CALL 0x0012ba28
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x2e0]
MOV qword ptr [RAX + 0x838],RCX
TEST RCX,RCX
JNZ 0x0013eb40
LAB_0013ee9e:
LEA RAX,[0x4c5f38]
INC qword ptr [RAX]
XOR R14D,R14D
JMP 0x0013ee4b
LAB_0013eead:
CALL 0x001263a0
|
/* find_or_create_account(PFS_thread*, char const*, unsigned int, char const*, unsigned int) */
int4 *
find_or_create_account(PFS_thread *param_1,char *param_2,uint param_3,char *param_4,uint param_5)
{
char *pcVar1;
int iVar2;
int8 *puVar3;
int4 *puVar4;
long lVar5;
int8 uVar6;
long lVar7;
int1 *puVar8;
int4 *puVar9;
long in_FS_OFFSET;
uint local_2e0;
int local_2dc;
char *local_2d8;
int4 *local_2d0;
char local_2c1;
int1 local_2c0 [644];
int local_3c;
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
lVar7 = *(long *)(param_1 + 0x838);
local_2d8 = param_4;
if (lVar7 == 0) {
if (account_hash_inited != '\x01') goto LAB_0013ee9e;
lVar7 = lf_pinbox_get_pins(0x4d02c0);
*(long *)(param_1 + 0x838) = lVar7;
if (lVar7 == 0) goto LAB_0013ee9e;
}
if (param_3 == 0) {
puVar8 = local_2c0;
}
else {
__memcpy_chk(local_2c0,param_2,(ulong)param_3,0x288);
puVar8 = local_2c0 + param_3;
}
*puVar8 = 0;
puVar8 = puVar8 + 1;
if (param_5 != 0) {
memcpy(puVar8,local_2d8,(ulong)param_5);
puVar8 = puVar8 + param_5;
}
*puVar8 = 0;
local_3c = ((int)puVar8 - (int)local_2c0) + 1;
local_2c1 = param_5 != 0 && param_3 != 0;
iVar2 = 4;
do {
puVar3 = (int8 *)lf_hash_search(account_hash,lVar7,local_2c0,local_3c);
if ((int8 *)0x1 < puVar3) {
puVar9 = (int4 *)*puVar3;
LOCK();
puVar9[0x2aa] = puVar9[0x2aa] + 1;
UNLOCK();
LOCK();
*(int8 *)(lVar7 + 0x10) = 0;
UNLOCK();
local_2d0 = puVar9;
goto LAB_0013ee4b;
}
LOCK();
*(int8 *)(lVar7 + 0x10) = 0;
UNLOCK();
local_2dc = iVar2;
puVar4 = (int4 *)
PFS_buffer_scalable_container<PFS_account,128,128,PFS_account_array,PFS_account_allocator>
::allocate((PFS_buffer_scalable_container<PFS_account,128,128,PFS_account_array,PFS_account_allocator>
*)&global_account_container,(pfs_dirty_state *)&local_2e0);
puVar9 = (int4 *)0x0;
local_2d0 = puVar4;
if (puVar4 == (int4 *)0x0) goto LAB_0013ee4b;
puVar9 = puVar4 + 0x1f9;
memcpy(puVar9,local_2c0,0x288);
pcVar1 = local_2d8;
if (param_3 == 0) {
puVar9 = (int4 *)0x0;
}
*(int4 **)(puVar4 + 0x29c) = puVar9;
puVar4[0x29e] = param_3;
lVar5 = (long)puVar4 + (ulong)(param_3 + 1) + 0x7e4;
if (param_5 == 0) {
lVar5 = 0;
}
*(long *)(puVar4 + 0x2a0) = lVar5;
puVar4[0x2a2] = param_5;
uVar6 = find_or_create_user(param_1,param_2,param_3);
*(int8 *)(local_2d0 + 0x2a4) = uVar6;
uVar6 = find_or_create_host(param_1,pcVar1,param_5);
*(int8 *)(local_2d0 + 0x2a6) = uVar6;
LOCK();
local_2d0[0x2aa] = 1;
UNLOCK();
*(int1 *)(local_2d0 + 1) = 0;
*local_2d0 = 0;
PFS_status_stats::reset((PFS_status_stats *)(local_2d0 + 0xc));
*(int8 *)(local_2d0 + 0x2a8) = 0;
if (local_2c1 == '\0') {
*(int2 *)(local_2d0 + 0x29b) = 0x101;
}
else {
lookup_setup_actor(param_1,param_2,param_3,local_2d8,param_5,(bool *)(local_2d0 + 0x29b),
(bool *)((long)local_2d0 + 0xa6d));
}
LOCK();
iVar2 = local_2d0[0x1f8];
local_2d0[0x1f8] = (local_2e0 & 0xfffffffc) + 6;
UNLOCK();
iVar2 = lf_hash_insert(account_hash,lVar7,&local_2d0,iVar2);
puVar9 = local_2d0;
if (iVar2 == 0) goto LAB_0013ee4b;
if (*(PFS_user **)(local_2d0 + 0x2a4) != (PFS_user *)0x0) {
PFS_user::release(*(PFS_user **)(local_2d0 + 0x2a4));
*(int8 *)(local_2d0 + 0x2a4) = 0;
}
if (*(PFS_host **)(local_2d0 + 0x2a6) != (PFS_host *)0x0) {
PFS_host::release(*(PFS_host **)(local_2d0 + 0x2a6));
*(int8 *)(local_2d0 + 0x2a6) = 0;
}
LOCK();
local_2d0[0x1f8] = local_2d0[0x1f8] & 0xfffffffc;
UNLOCK();
**(int1 **)(local_2d0 + 0x1f6) = 0;
DAT_004c5f41 = 0;
} while ((0 < iVar2) && (iVar2 = local_2dc + -1, iVar2 != 0));
LAB_0013ee9e:
global_account_container = global_account_container + 1;
puVar9 = (int4 *)0x0;
LAB_0013ee4b:
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return puVar9;
}
|
|
7,662 |
google::protobuf::(anonymous namespace)::FormatLineOptions(int, google::protobuf::Message const&, google::protobuf::DescriptorPool const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*)
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
|
bool FormatLineOptions(int depth, const Message& options,
const DescriptorPool* pool, std::string* output) {
std::string prefix(depth * 2, ' ');
std::vector<std::string> all_options;
if (RetrieveOptions(depth, options, pool, &all_options)) {
for (const std::string& option : all_options) {
strings::SubstituteAndAppend(output, "$0option $1;\n", prefix, option);
}
}
return !all_options.empty();
}
|
O0
|
cpp
|
google::protobuf::(anonymous namespace)::FormatLineOptions(int, google::protobuf::Message const&, google::protobuf::DescriptorPool const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*):
subq $0x2d8, %rsp # imm = 0x2D8
movl %edi, 0x2d4(%rsp)
movq %rsi, 0x2c8(%rsp)
movq %rdx, 0x2c0(%rsp)
movq %rcx, 0x2b8(%rsp)
movl 0x2d4(%rsp), %eax
addl %eax, %eax
cltq
movq %rax, 0x58(%rsp)
leaq 0x297(%rsp), %rdi
movq %rdi, 0x60(%rsp)
callq 0x13760
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rcx
leaq 0x298(%rsp), %rdi
movl $0x20, %edx
callq 0x132f0
jmp 0x3b326
leaq 0x297(%rsp), %rdi
callq 0x134d0
leaq 0x268(%rsp), %rdi
movq %rdi, 0x48(%rsp)
callq 0x147e0
movq 0x48(%rsp), %rcx
movl 0x2d4(%rsp), %edi
movq 0x2c8(%rsp), %rsi
movq 0x2c0(%rsp), %rdx
callq 0x63ec0
movb %al, 0x57(%rsp)
jmp 0x3b36c
movb 0x57(%rsp), %al
testb $0x1, %al
jne 0x3b379
jmp 0x3b579
leaq 0x268(%rsp), %rax
movq %rax, 0x260(%rsp)
movq 0x260(%rsp), %rdi
callq 0x19110
movq %rax, 0x258(%rsp)
movq 0x260(%rsp), %rdi
callq 0x19140
movq %rax, 0x250(%rsp)
leaq 0x258(%rsp), %rdi
leaq 0x250(%rsp), %rsi
callq 0x81d70
testb $0x1, %al
jne 0x3b3d1
jmp 0x3b577
leaq 0x258(%rsp), %rdi
callq 0x191b0
movq %rax, 0x248(%rsp)
movq 0x2b8(%rsp), %rax
movq %rax, 0x40(%rsp)
leaq 0x218(%rsp), %rdi
leaq 0x298(%rsp), %rsi
callq 0x769e0
jmp 0x3b40a
movq 0x248(%rsp), %rsi
leaq 0x1e8(%rsp), %rdi
callq 0x769e0
jmp 0x3b421
leaq 0x1b8(%rsp), %rdi
callq 0x76920
jmp 0x3b430
leaq 0x188(%rsp), %rdi
callq 0x76920
jmp 0x3b43f
leaq 0x158(%rsp), %rdi
callq 0x76920
jmp 0x3b44e
leaq 0x128(%rsp), %rdi
callq 0x76920
jmp 0x3b45d
leaq 0xf8(%rsp), %rdi
callq 0x76920
jmp 0x3b46c
leaq 0xc8(%rsp), %rdi
callq 0x76920
jmp 0x3b47b
leaq 0x98(%rsp), %rdi
callq 0x76920
jmp 0x3b48a
leaq 0x68(%rsp), %rdi
callq 0x76920
jmp 0x3b496
movq 0x40(%rsp), %rdi
movq %rsp, %rax
leaq 0x68(%rsp), %rcx
movq %rcx, 0x28(%rax)
leaq 0x98(%rsp), %rcx
movq %rcx, 0x20(%rax)
leaq 0xc8(%rsp), %rcx
movq %rcx, 0x18(%rax)
leaq 0xf8(%rsp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x128(%rsp), %rcx
movq %rcx, 0x8(%rax)
leaq 0x158(%rsp), %rcx
movq %rcx, (%rax)
leaq 0x1b4a0b(%rip), %rsi # 0x1efef4
leaq 0x218(%rsp), %rdx
leaq 0x1e8(%rsp), %rcx
leaq 0x1b8(%rsp), %r8
leaq 0x188(%rsp), %r9
callq 0x144ce0
jmp 0x3b510
jmp 0x3b512
leaq 0x258(%rsp), %rdi
callq 0x19370
jmp 0x3b3b3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x288(%rsp)
movl %eax, 0x284(%rsp)
leaq 0x297(%rsp), %rdi
callq 0x134d0
jmp 0x3b5b4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x288(%rsp)
movl %eax, 0x284(%rsp)
leaq 0x268(%rsp), %rdi
callq 0x14940
leaq 0x298(%rsp), %rdi
callq 0x13290
jmp 0x3b5b4
jmp 0x3b579
leaq 0x268(%rsp), %rdi
callq 0x81f00
xorb $-0x1, %al
movb %al, 0x3f(%rsp)
leaq 0x268(%rsp), %rdi
callq 0x14940
leaq 0x298(%rsp), %rdi
callq 0x13290
movb 0x3f(%rsp), %al
andb $0x1, %al
addq $0x2d8, %rsp # imm = 0x2D8
retq
movq 0x288(%rsp), %rdi
callq 0x13750
nopw %cs:(%rax,%rax)
|
_ZN6google8protobuf12_GLOBAL__N_117FormatLineOptionsEiRKNS0_7MessageEPKNS0_14DescriptorPoolEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
sub rsp, 2D8h
mov [rsp+2D8h+var_4], edi
mov [rsp+2D8h+var_10], rsi
mov [rsp+2D8h+var_18], rdx
mov [rsp+2D8h+var_20], rcx
mov eax, [rsp+2D8h+var_4]
add eax, eax
cdqe
mov [rsp+2D8h+var_280], rax
lea rdi, [rsp+2D8h+var_41]
mov [rsp+2D8h+var_278], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rsi, [rsp+2D8h+var_280]
mov rcx, [rsp+2D8h+var_278]
lea rdi, [rsp+2D8h+var_40]
mov edx, 20h ; ' '
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EmcRKS3_; std::string::basic_string(ulong,char,std::allocator<char> const&)
jmp short $+2
loc_3B326:
lea rdi, [rsp+2D8h+var_41]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
lea rdi, [rsp+2D8h+var_70]
mov [rsp+2D8h+var_290], rdi
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2Ev; std::vector<std::string>::vector(void)
mov rcx, [rsp+2D8h+var_290]
mov edi, [rsp+2D8h+var_4]
mov rsi, [rsp+2D8h+var_10]
mov rdx, [rsp+2D8h+var_18]
call _ZN6google8protobuf12_GLOBAL__N_115RetrieveOptionsEiRKNS0_7MessageEPKNS0_14DescriptorPoolEPSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISE_EE; google::protobuf::`anonymous namespace'::RetrieveOptions(int,google::protobuf::Message const&,google::protobuf::DescriptorPool const*,std::vector<std::string> *)
mov [rsp+2D8h+var_281], al
jmp short $+2
loc_3B36C:
mov al, [rsp+2D8h+var_281]
test al, 1
jnz short loc_3B379
jmp loc_3B579
loc_3B379:
lea rax, [rsp+2D8h+var_70]
mov [rsp+2D8h+var_78], rax
mov rdi, [rsp+2D8h+var_78]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5beginEv; std::vector<std::string>::begin(void)
mov [rsp+2D8h+var_80], rax
mov rdi, [rsp+2D8h+var_78]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE3endEv; std::vector<std::string>::end(void)
mov [rsp+2D8h+var_88], rax
loc_3B3B3:
lea rdi, [rsp+2D8h+var_80]
lea rsi, [rsp+2D8h+var_88]
call _ZN9__gnu_cxxneIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESG_; __gnu_cxx::operator!=<std::string *,std::vector<std::string>>(__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>> const&,__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>> const&)
test al, 1
jnz short loc_3B3D1
jmp loc_3B577
loc_3B3D1:
lea rdi, [rsp+2D8h+var_80]
call _ZNK9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEdeEv; __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator*(void)
mov [rsp+2D8h+var_90], rax
mov rax, [rsp+2D8h+var_20]
mov [rsp+2D8h+var_298], rax
lea rdi, [rsp+2D8h+var_C0]
lea rsi, [rsp+2D8h+var_40]
call _ZN6google8protobuf7strings8internal13SubstituteArgC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::strings::internal::SubstituteArg::SubstituteArg(std::string const&)
jmp short $+2
loc_3B40A:
mov rsi, [rsp+2D8h+var_90]
lea rdi, [rsp+2D8h+var_F0]
call _ZN6google8protobuf7strings8internal13SubstituteArgC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::strings::internal::SubstituteArg::SubstituteArg(std::string const&)
jmp short $+2
loc_3B421:
lea rdi, [rsp+2D8h+var_120]; this
call _ZN6google8protobuf7strings8internal13SubstituteArgC2Ev; google::protobuf::strings::internal::SubstituteArg::SubstituteArg(void)
jmp short $+2
loc_3B430:
lea rdi, [rsp+2D8h+var_150]; this
call _ZN6google8protobuf7strings8internal13SubstituteArgC2Ev; google::protobuf::strings::internal::SubstituteArg::SubstituteArg(void)
jmp short $+2
loc_3B43F:
lea rdi, [rsp+2D8h+var_180]; this
call _ZN6google8protobuf7strings8internal13SubstituteArgC2Ev; google::protobuf::strings::internal::SubstituteArg::SubstituteArg(void)
jmp short $+2
loc_3B44E:
lea rdi, [rsp+2D8h+var_1B0]; this
call _ZN6google8protobuf7strings8internal13SubstituteArgC2Ev; google::protobuf::strings::internal::SubstituteArg::SubstituteArg(void)
jmp short $+2
loc_3B45D:
lea rdi, [rsp+2D8h+var_1E0]; this
call _ZN6google8protobuf7strings8internal13SubstituteArgC2Ev; google::protobuf::strings::internal::SubstituteArg::SubstituteArg(void)
jmp short $+2
loc_3B46C:
lea rdi, [rsp+2D8h+var_210]; this
call _ZN6google8protobuf7strings8internal13SubstituteArgC2Ev; google::protobuf::strings::internal::SubstituteArg::SubstituteArg(void)
jmp short $+2
loc_3B47B:
lea rdi, [rsp+2D8h+var_240]; this
call _ZN6google8protobuf7strings8internal13SubstituteArgC2Ev; google::protobuf::strings::internal::SubstituteArg::SubstituteArg(void)
jmp short $+2
loc_3B48A:
lea rdi, [rsp+2D8h+var_270]; this
call _ZN6google8protobuf7strings8internal13SubstituteArgC2Ev; google::protobuf::strings::internal::SubstituteArg::SubstituteArg(void)
jmp short $+2
loc_3B496:
mov rdi, [rsp+2D8h+var_298]
mov rax, rsp
lea rcx, [rsp+2D8h+var_270]
mov [rax+28h], rcx
lea rcx, [rsp+2D8h+var_240]
mov [rax+20h], rcx
lea rcx, [rsp+2D8h+var_210]
mov [rax+18h], rcx
lea rcx, [rsp+2D8h+var_1E0]
mov [rax+10h], rcx
lea rcx, [rsp+2D8h+var_1B0]
mov [rax+8], rcx
lea rcx, [rsp+2D8h+var_180]
mov [rax], rcx
lea rsi, a0option1; "$0option $1;\n"
lea rdx, [rsp+2D8h+var_C0]
lea rcx, [rsp+2D8h+var_F0]
lea r8, [rsp+2D8h+var_120]
lea r9, [rsp+2D8h+var_150]
call _ZN6google8protobuf7strings19SubstituteAndAppendEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKcRKNS1_8internal13SubstituteArgESE_SE_SE_SE_SE_SE_SE_SE_SE_; google::protobuf::strings::SubstituteAndAppend(std::string *,char const*,google::protobuf::strings::internal::SubstituteArg const&,google::protobuf::strings::internal::SubstituteArg const&,google::protobuf::strings::internal::SubstituteArg const&,google::protobuf::strings::internal::SubstituteArg const&,google::protobuf::strings::internal::SubstituteArg const&,google::protobuf::strings::internal::SubstituteArg const&,google::protobuf::strings::internal::SubstituteArg const&,google::protobuf::strings::internal::SubstituteArg const&,google::protobuf::strings::internal::SubstituteArg const&,google::protobuf::strings::internal::SubstituteArg const&)
jmp short $+2
loc_3B510:
jmp short $+2
loc_3B512:
lea rdi, [rsp+2D8h+var_80]
call _ZN9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEppEv; __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator++(void)
jmp loc_3B3B3
mov rcx, rax
mov eax, edx
mov [rsp+arg_280], rcx
mov [rsp+arg_27C], eax
lea rdi, [rsp+arg_28F]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_3B5B4
mov rcx, rax
mov eax, edx
mov [rsp+arg_280], rcx
mov [rsp+arg_27C], eax
lea rdi, [rsp+arg_260]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
lea rdi, [rsp+arg_290]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_3B5B4
loc_3B577:
jmp short $+2
loc_3B579:
lea rdi, [rsp+2D8h+var_70]
call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5emptyEv; std::vector<std::string>::empty(void)
xor al, 0FFh
mov [rsp+2D8h+var_299], al
lea rdi, [rsp+2D8h+var_70]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
lea rdi, [rsp+2D8h+var_40]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov al, [rsp+2D8h+var_299]
and al, 1
add rsp, 2D8h
retn
loc_3B5B4:
mov rdi, [rsp+arg_280]
call __Unwind_Resume
|
char google::protobuf::`anonymous namespace'::FormatLineOptions(int a1, long long *a2, long long a3, long long a4)
{
long long *v4; // rsi
int v5; // r8d
int v6; // r9d
long long v7; // rdx
long long v8; // rcx
long long v9; // r8
long long v10; // r9
_BYTE *v12; // [rsp+0h] [rbp-2D8h]
_BYTE *v13; // [rsp+8h] [rbp-2D0h]
_BYTE *v14; // [rsp+10h] [rbp-2C8h]
_BYTE *v15; // [rsp+18h] [rbp-2C0h]
_BYTE *v16; // [rsp+20h] [rbp-2B8h]
_BYTE *v17; // [rsp+28h] [rbp-2B0h]
char v18; // [rsp+3Fh] [rbp-299h]
long long v19; // [rsp+40h] [rbp-298h]
_BYTE v20[48]; // [rsp+68h] [rbp-270h] BYREF
_BYTE v21[48]; // [rsp+98h] [rbp-240h] BYREF
_BYTE v22[48]; // [rsp+C8h] [rbp-210h] BYREF
_BYTE v23[48]; // [rsp+F8h] [rbp-1E0h] BYREF
_BYTE v24[48]; // [rsp+128h] [rbp-1B0h] BYREF
_BYTE v25[48]; // [rsp+158h] [rbp-180h] BYREF
_BYTE v26[48]; // [rsp+188h] [rbp-150h] BYREF
_BYTE v27[48]; // [rsp+1B8h] [rbp-120h] BYREF
_BYTE v28[48]; // [rsp+1E8h] [rbp-F0h] BYREF
_BYTE v29[48]; // [rsp+218h] [rbp-C0h] BYREF
long long v30; // [rsp+248h] [rbp-90h]
long long v31; // [rsp+250h] [rbp-88h] BYREF
_QWORD v32[2]; // [rsp+258h] [rbp-80h] BYREF
long long v33[5]; // [rsp+268h] [rbp-70h] BYREF
char v34; // [rsp+297h] [rbp-41h] BYREF
_BYTE v35[32]; // [rsp+298h] [rbp-40h] BYREF
long long v36; // [rsp+2B8h] [rbp-20h]
long long v37; // [rsp+2C0h] [rbp-18h]
long long *v38; // [rsp+2C8h] [rbp-10h]
int v39; // [rsp+2D4h] [rbp-4h]
v39 = a1;
v38 = a2;
v37 = a3;
v36 = a4;
std::allocator<char>::allocator(&v34, a2);
std::string::basic_string(v35, 2 * a1, 32LL, &v34);
std::allocator<char>::~allocator(&v34);
std::vector<std::string>::vector((long long)v33);
v4 = v38;
if ( (google::protobuf::`anonymous namespace'::RetrieveOptions(v39, (_DWORD)v38, v37, (unsigned int)v33, v5, v6) & 1) != 0 )
{
v32[1] = v33;
v32[0] = std::vector<std::string>::begin((long long)v33);
v31 = std::vector<std::string>::end((long long)v33);
while ( 1 )
{
v4 = &v31;
if ( (__gnu_cxx::operator!=<std::string *,std::vector<std::string>>(v32, &v31) & 1) == 0 )
break;
v30 = __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator*((long long)v32);
v19 = v36;
google::protobuf::strings::internal::SubstituteArg::SubstituteArg(v29, v35);
google::protobuf::strings::internal::SubstituteArg::SubstituteArg(v28, v30);
google::protobuf::strings::internal::SubstituteArg::SubstituteArg((google::protobuf::strings::internal::SubstituteArg *)v27);
google::protobuf::strings::internal::SubstituteArg::SubstituteArg((google::protobuf::strings::internal::SubstituteArg *)v26);
google::protobuf::strings::internal::SubstituteArg::SubstituteArg((google::protobuf::strings::internal::SubstituteArg *)v25);
google::protobuf::strings::internal::SubstituteArg::SubstituteArg((google::protobuf::strings::internal::SubstituteArg *)v24);
google::protobuf::strings::internal::SubstituteArg::SubstituteArg((google::protobuf::strings::internal::SubstituteArg *)v23);
google::protobuf::strings::internal::SubstituteArg::SubstituteArg((google::protobuf::strings::internal::SubstituteArg *)v22);
google::protobuf::strings::internal::SubstituteArg::SubstituteArg((google::protobuf::strings::internal::SubstituteArg *)v21);
google::protobuf::strings::internal::SubstituteArg::SubstituteArg((google::protobuf::strings::internal::SubstituteArg *)v20);
v17 = v20;
v16 = v21;
v15 = v22;
v14 = v23;
v13 = v24;
v12 = v25;
google::protobuf::strings::SubstituteAndAppend(v19, "$0option $1;\n", v29, v28, v27, v26);
__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator++(v32);
}
}
v18 = ~(unsigned __int8)std::vector<std::string>::empty(v33, v4, v7, v8, v9, v10, v12, v13, v14, v15, v16, v17);
std::vector<std::string>::~vector(v33);
std::string::~string(v35);
return v18 & 1;
}
|
FormatLineOptions:
SUB RSP,0x2d8
MOV dword ptr [RSP + 0x2d4],EDI
MOV qword ptr [RSP + 0x2c8],RSI
MOV qword ptr [RSP + 0x2c0],RDX
MOV qword ptr [RSP + 0x2b8],RCX
MOV EAX,dword ptr [RSP + 0x2d4]
ADD EAX,EAX
CDQE
MOV qword ptr [RSP + 0x58],RAX
LEA RDI,[RSP + 0x297]
MOV qword ptr [RSP + 0x60],RDI
CALL 0x00113760
MOV RSI,qword ptr [RSP + 0x58]
MOV RCX,qword ptr [RSP + 0x60]
LAB_0013b312:
LEA RDI,[RSP + 0x298]
MOV EDX,0x20
CALL 0x001132f0
JMP 0x0013b326
LAB_0013b326:
LEA RDI,[RSP + 0x297]
CALL 0x001134d0
LEA RDI,[RSP + 0x268]
MOV qword ptr [RSP + 0x48],RDI
CALL 0x001147e0
MOV RCX,qword ptr [RSP + 0x48]
MOV EDI,dword ptr [RSP + 0x2d4]
MOV RSI,qword ptr [RSP + 0x2c8]
MOV RDX,qword ptr [RSP + 0x2c0]
LAB_0013b361:
CALL 0x00163ec0
MOV byte ptr [RSP + 0x57],AL
JMP 0x0013b36c
LAB_0013b36c:
MOV AL,byte ptr [RSP + 0x57]
TEST AL,0x1
JNZ 0x0013b379
JMP 0x0013b579
LAB_0013b379:
LEA RAX,[RSP + 0x268]
MOV qword ptr [RSP + 0x260],RAX
MOV RDI,qword ptr [RSP + 0x260]
CALL 0x00119110
MOV qword ptr [RSP + 0x258],RAX
MOV RDI,qword ptr [RSP + 0x260]
CALL 0x00119140
MOV qword ptr [RSP + 0x250],RAX
LAB_0013b3b3:
LEA RDI,[RSP + 0x258]
LEA RSI,[RSP + 0x250]
CALL 0x00181d70
TEST AL,0x1
JNZ 0x0013b3d1
JMP 0x0013b577
LAB_0013b3d1:
LEA RDI,[RSP + 0x258]
CALL 0x001191b0
MOV qword ptr [RSP + 0x248],RAX
MOV RAX,qword ptr [RSP + 0x2b8]
MOV qword ptr [RSP + 0x40],RAX
LEA RDI,[RSP + 0x218]
LEA RSI,[RSP + 0x298]
CALL 0x001769e0
JMP 0x0013b40a
LAB_0013b40a:
MOV RSI,qword ptr [RSP + 0x248]
LEA RDI,[RSP + 0x1e8]
CALL 0x001769e0
JMP 0x0013b421
LAB_0013b421:
LEA RDI,[RSP + 0x1b8]
CALL 0x00176920
JMP 0x0013b430
LAB_0013b430:
LEA RDI,[RSP + 0x188]
CALL 0x00176920
JMP 0x0013b43f
LAB_0013b43f:
LEA RDI,[RSP + 0x158]
CALL 0x00176920
JMP 0x0013b44e
LAB_0013b44e:
LEA RDI,[RSP + 0x128]
CALL 0x00176920
JMP 0x0013b45d
LAB_0013b45d:
LEA RDI,[RSP + 0xf8]
CALL 0x00176920
JMP 0x0013b46c
LAB_0013b46c:
LEA RDI,[RSP + 0xc8]
CALL 0x00176920
JMP 0x0013b47b
LAB_0013b47b:
LEA RDI,[RSP + 0x98]
CALL 0x00176920
JMP 0x0013b48a
LAB_0013b48a:
LEA RDI,[RSP + 0x68]
CALL 0x00176920
JMP 0x0013b496
LAB_0013b496:
MOV RDI,qword ptr [RSP + 0x40]
MOV RAX,RSP
LEA RCX,[RSP + 0x68]
MOV qword ptr [RAX + 0x28],RCX
LEA RCX,[RSP + 0x98]
MOV qword ptr [RAX + 0x20],RCX
LEA RCX,[RSP + 0xc8]
MOV qword ptr [RAX + 0x18],RCX
LEA RCX,[RSP + 0xf8]
MOV qword ptr [RAX + 0x10],RCX
LEA RCX,[RSP + 0x128]
MOV qword ptr [RAX + 0x8],RCX
LEA RCX,[RSP + 0x158]
MOV qword ptr [RAX],RCX
LEA RSI,[0x2efef4]
LEA RDX,[RSP + 0x218]
LEA RCX,[RSP + 0x1e8]
LEA R8,[RSP + 0x1b8]
LEA R9,[RSP + 0x188]
CALL 0x00244ce0
LAB_0013b50e:
JMP 0x0013b510
LAB_0013b510:
JMP 0x0013b512
LAB_0013b512:
LEA RDI,[RSP + 0x258]
CALL 0x00119370
JMP 0x0013b3b3
LAB_0013b577:
JMP 0x0013b579
LAB_0013b579:
LEA RDI,[RSP + 0x268]
CALL 0x00181f00
XOR AL,0xff
MOV byte ptr [RSP + 0x3f],AL
LEA RDI,[RSP + 0x268]
CALL 0x00114940
LEA RDI,[RSP + 0x298]
CALL 0x00113290
MOV AL,byte ptr [RSP + 0x3f]
AND AL,0x1
ADD RSP,0x2d8
RET
|
/* google::protobuf::(anonymous namespace)::FormatLineOptions(int, google::protobuf::Message const&,
google::protobuf::DescriptorPool const*, std::__cxx11::string*) */
ulong google::protobuf::(anonymous_namespace)::FormatLineOptions
(int param_1,Message *param_2,DescriptorPool *param_3,string *param_4)
{
string *psVar1;
byte bVar2;
bool bVar3;
int1 uVar4;
int8 uVar5;
SubstituteArg local_270 [48];
SubstituteArg local_240 [48];
SubstituteArg local_210 [48];
SubstituteArg local_1e0 [48];
SubstituteArg local_1b0 [48];
SubstituteArg local_180 [48];
SubstituteArg local_150 [48];
SubstituteArg local_120 [48];
SubstituteArg local_f0 [48];
SubstituteArg local_c0 [48];
string *local_90;
int8 local_88;
int8 local_80;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_78;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_70 [47];
allocator local_41;
string local_40 [32];
string *local_20;
DescriptorPool *local_18;
Message *local_10;
int local_4;
local_20 = param_4;
local_18 = param_3;
local_10 = param_2;
local_4 = param_1;
std::allocator<char>::allocator();
/* try { // try from 0013b312 to 0013b323 has its CatchHandler @ 0013b524 */
std::__cxx11::string::string(local_40,(long)(param_1 * 2),' ',&local_41);
std::allocator<char>::~allocator((allocator<char> *)&local_41);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector(local_70);
/* try { // try from 0013b361 to 0013b50d has its CatchHandler @ 0013b547 */
bVar2 = RetrieveOptions(local_4,local_10,local_18,(vector *)local_70);
if ((bVar2 & 1) != 0) {
local_78 = local_70;
local_80 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::begin
(local_78);
local_88 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::end(local_78)
;
while (bVar3 = __gnu_cxx::operator!=
((__normal_iterator *)&local_80,(__normal_iterator *)&local_88), bVar3)
{
local_90 = (string *)
__gnu_cxx::
__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>
::operator*((__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>
*)&local_80);
psVar1 = local_20;
strings::internal::SubstituteArg::SubstituteArg(local_c0,local_40);
strings::internal::SubstituteArg::SubstituteArg(local_f0,local_90);
strings::internal::SubstituteArg::SubstituteArg(local_120);
strings::internal::SubstituteArg::SubstituteArg(local_150);
strings::internal::SubstituteArg::SubstituteArg(local_180);
strings::internal::SubstituteArg::SubstituteArg(local_1b0);
strings::internal::SubstituteArg::SubstituteArg(local_1e0);
strings::internal::SubstituteArg::SubstituteArg(local_210);
strings::internal::SubstituteArg::SubstituteArg(local_240);
strings::internal::SubstituteArg::SubstituteArg(local_270);
strings::SubstituteAndAppend
(psVar1,"$0option $1;\n",local_c0,local_f0,local_120,local_150,local_180,local_1b0,
local_1e0,local_210,local_240,local_270);
__gnu_cxx::
__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>
::operator++((__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>
*)&local_80);
}
}
uVar4 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::empty(local_70);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_70);
uVar5 = std::__cxx11::string::~string(local_40);
return (CONCAT71((int7)((ulong)uVar5 >> 8),uVar4) ^ 0xff) & 0xffffffffffffff01;
}
|
|
7,663 |
google::protobuf::(anonymous namespace)::FormatLineOptions(int, google::protobuf::Message const&, google::protobuf::DescriptorPool const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*)
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
|
bool FormatLineOptions(int depth, const Message& options,
const DescriptorPool* pool, std::string* output) {
std::string prefix(depth * 2, ' ');
std::vector<std::string> all_options;
if (RetrieveOptions(depth, options, pool, &all_options)) {
for (const std::string& option : all_options) {
strings::SubstituteAndAppend(output, "$0option $1;\n", prefix, option);
}
}
return !all_options.empty();
}
|
O3
|
cpp
|
google::protobuf::(anonymous namespace)::FormatLineOptions(int, google::protobuf::Message const&, google::protobuf::DescriptorPool const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp # imm = 0x218
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movl %edi, %r12d
leal (%r12,%r12), %eax
movslq %eax, %rsi
leaq 0x28(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x18(%rsp), %rdi
movl $0x20, %edx
callq 0xf3c0
xorps %xmm0, %xmm0
movq %rsp, %rcx
movaps %xmm0, (%rcx)
movq $0x0, 0x10(%rcx)
movl %r12d, %edi
movq %r15, %rsi
movq %r14, %rdx
callq 0x3b627
movq (%rsp), %r14
testb %al, %al
je 0x22375
movq 0x8(%rsp), %r15
cmpq %r15, %r14
je 0x22375
xorl %r12d, %r12d
movl $0xffffffff, %r13d # imm = 0xFFFFFFFF
leaq 0x158(%rsp), %rbp
movq 0x18(%rsp), %rax
movq %rax, 0x1e8(%rsp)
movl 0x20(%rsp), %eax
movl %eax, 0x1f0(%rsp)
movq (%r14), %rax
movq %rax, 0x1b8(%rsp)
movl 0x8(%r14), %eax
movl %eax, 0x1c0(%rsp)
movq %r12, 0x188(%rsp)
movl %r13d, 0x190(%rsp)
movq %r12, 0x158(%rsp)
movl %r13d, 0x160(%rsp)
movq %r12, 0x128(%rsp)
movl %r13d, 0x130(%rsp)
movq %r12, 0xf8(%rsp)
movl %r13d, 0x100(%rsp)
movq %r12, 0xc8(%rsp)
movl %r13d, 0xd0(%rsp)
movq %r12, 0x98(%rsp)
movl %r13d, 0xa0(%rsp)
movq %r12, 0x68(%rsp)
movl %r13d, 0x70(%rsp)
movq %r12, 0x38(%rsp)
movl %r13d, 0x40(%rsp)
movq %rbx, %rdi
leaq 0x96327(%rip), %rsi # 0xb8632
leaq 0x1e8(%rsp), %rdx
leaq 0x1b8(%rsp), %rcx
leaq 0x188(%rsp), %r8
movq %rbp, %r9
leaq 0x38(%rsp), %rax
pushq %rax
leaq 0x70(%rsp), %rax
pushq %rax
leaq 0xa8(%rsp), %rax
pushq %rax
leaq 0xe0(%rsp), %rax
pushq %rax
leaq 0x118(%rsp), %rax
pushq %rax
leaq 0x150(%rsp), %rax
pushq %rax
callq 0x7b9bd
addq $0x30, %rsp
addq $0x20, %r14
cmpq %r15, %r14
jne 0x2225f
movq (%rsp), %r14
leaq 0x28(%rsp), %r13
movq %rsp, %rdi
movq 0x8(%rdi), %rbx
callq 0x11e36
movq 0x18(%rsp), %rdi
cmpq %r13, %rdi
je 0x22390
callq 0xf330
cmpq %rbx, %r14
setne %al
addq $0x218, %rsp # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x223aa
movq %rax, %rbx
movq %rsp, %rdi
callq 0x11e36
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x223c9
callq 0xf330
movq %rbx, %rdi
callq 0xf570
nop
|
_ZN6google8protobuf12_GLOBAL__N_117FormatLineOptionsEiRKNS0_7MessageEPKNS0_14DescriptorPoolEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 218h
mov rbx, rcx
mov r14, rdx
mov r15, rsi
mov r12d, edi
lea eax, [r12+r12]
movsxd rsi, eax
lea r13, [rsp+248h+var_220]
mov [r13-10h], r13
lea rdi, [rsp+248h+var_230]
mov edx, 20h ; ' '
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
xorps xmm0, xmm0
mov rcx, rsp
movaps xmmword ptr [rcx], xmm0
mov qword ptr [rcx+10h], 0
mov edi, r12d
mov rsi, r15
mov rdx, r14
call _ZN6google8protobuf12_GLOBAL__N_115RetrieveOptionsEiRKNS0_7MessageEPKNS0_14DescriptorPoolEPSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISE_EE; google::protobuf::`anonymous namespace'::RetrieveOptions(int,google::protobuf::Message const&,google::protobuf::DescriptorPool const*,std::vector<std::string> *)
mov r14, [rsp+248h+var_248]
test al, al
jz loc_22375
mov r15, [rsp+248h+var_240]
cmp r14, r15
jz loc_22375
xor r12d, r12d
mov r13d, 0FFFFFFFFh
lea rbp, [rsp+248h+var_F0]
loc_2225F:
mov rax, [rsp+248h+var_230]
mov qword ptr [rsp+248h+var_60], rax
mov eax, [rsp+248h+var_228]
mov [rsp+248h+var_58], eax
mov rax, [r14]
mov qword ptr [rsp+248h+var_90], rax
mov eax, [r14+8]
mov [rsp+248h+var_88], eax
mov qword ptr [rsp+248h+var_C0], r12
mov [rsp+248h+var_B8], r13d
mov qword ptr [rsp+248h+var_F0], r12
mov [rsp+248h+var_E8], r13d
mov [rsp+248h+var_120], r12
mov [rsp+248h+var_118], r13d
mov qword ptr [rsp+248h+var_150], r12
mov [rsp+248h+var_148], r13d
mov qword ptr [rsp+248h+var_180], r12
mov dword ptr [rsp+248h+var_180+8], r13d
mov [rsp+248h+var_1B0], r12
mov [rsp+248h+var_1A8], r13d
mov qword ptr [rsp+248h+var_1E0], r12; int
mov [rsp+248h+var_1D8], r13d; int
mov qword ptr [rsp+248h+var_210], r12; int
mov [rsp+248h+var_208], r13d; int
mov rdi, rbx; int
lea rsi, a0option1; "$0option $1;\n"
lea rdx, [rsp+248h+var_60]; int
lea rcx, [rsp+248h+var_90]; int
lea r8, [rsp+248h+var_C0]; int
mov r9, rbp; int
lea rax, [rsp+248h+var_210]
push rax; int
lea rax, [rsp+250h+var_1E0]
push rax; void *
lea rax, [rsp+258h+var_1B0]
push rax
lea rax, [rsp+260h+var_180]
push rax; __int128
lea rax, [rsp+268h+var_150]
push rax; int
lea rax, [rsp+270h+var_120]
push rax; void *
call _ZN6google8protobuf7strings19SubstituteAndAppendEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKcRKNS1_8internal13SubstituteArgESE_SE_SE_SE_SE_SE_SE_SE_SE_; google::protobuf::strings::SubstituteAndAppend(std::string *,char const*,google::protobuf::strings::internal::SubstituteArg const&,google::protobuf::strings::internal::SubstituteArg const&,google::protobuf::strings::internal::SubstituteArg const&,google::protobuf::strings::internal::SubstituteArg const&,google::protobuf::strings::internal::SubstituteArg const&,google::protobuf::strings::internal::SubstituteArg const&,google::protobuf::strings::internal::SubstituteArg const&,google::protobuf::strings::internal::SubstituteArg const&,google::protobuf::strings::internal::SubstituteArg const&,google::protobuf::strings::internal::SubstituteArg const&)
add rsp, 30h
add r14, 20h ; ' '
cmp r14, r15
jnz loc_2225F
mov r14, [rsp+248h+var_248]
lea r13, [rsp+248h+var_220]
loc_22375:
mov rdi, rsp
mov rbx, [rdi+8]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, [rsp+248h+var_230]; void *
cmp rdi, r13
jz short loc_22390
call __ZdlPv; operator delete(void *)
loc_22390:
cmp r14, rbx
setnz al
add rsp, 218h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_223AA:
mov rbx, rax
mov rdi, rsp
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, [rsp+arg_10]; void *
lea rax, [rsp+arg_20]
cmp rdi, rax
jz short loc_223C9
call __ZdlPv; operator delete(void *)
loc_223C9:
mov rdi, rbx
call __Unwind_Resume
|
bool google::protobuf::`anonymous namespace'::FormatLineOptions(int a1, int a2, long long a3, int a4)
{
char Options; // al
long long v6; // r14
long long v7; // r15
long long v8; // rbx
__int128 v10; // [rsp-20h] [rbp-268h]
long long v11; // [rsp+0h] [rbp-248h] BYREF
long long v12; // [rsp+8h] [rbp-240h]
int v13; // [rsp+10h] [rbp-238h]
void *v14; // [rsp+18h] [rbp-230h] BYREF
int v15; // [rsp+20h] [rbp-228h]
int v16; // [rsp+28h] [rbp-220h] BYREF
int v17; // [rsp+30h] [rbp-218h]
int v18[2]; // [rsp+38h] [rbp-210h] BYREF
int v19; // [rsp+40h] [rbp-208h]
int v20; // [rsp+48h] [rbp-200h]
int v21; // [rsp+50h] [rbp-1F8h]
int v22; // [rsp+58h] [rbp-1F0h]
int v23; // [rsp+60h] [rbp-1E8h]
int v24[2]; // [rsp+68h] [rbp-1E0h] BYREF
int v25; // [rsp+70h] [rbp-1D8h]
int v26; // [rsp+78h] [rbp-1D0h]
int v27; // [rsp+80h] [rbp-1C8h]
int v28; // [rsp+88h] [rbp-1C0h]
int v29; // [rsp+90h] [rbp-1B8h]
long long v30; // [rsp+98h] [rbp-1B0h] BYREF
int v31; // [rsp+A0h] [rbp-1A8h]
char v32; // [rsp+A8h] [rbp-1A0h]
long long v33; // [rsp+C8h] [rbp-180h] BYREF
int v34; // [rsp+D0h] [rbp-178h]
int v35[2]; // [rsp+F8h] [rbp-150h] BYREF
int v36; // [rsp+100h] [rbp-148h]
long long v37; // [rsp+128h] [rbp-120h] BYREF
int v38; // [rsp+130h] [rbp-118h]
int v39[2]; // [rsp+158h] [rbp-F0h] BYREF
int v40; // [rsp+160h] [rbp-E8h]
int v41[2]; // [rsp+188h] [rbp-C0h] BYREF
int v42; // [rsp+190h] [rbp-B8h]
int v43[2]; // [rsp+1B8h] [rbp-90h] BYREF
int v44; // [rsp+1C0h] [rbp-88h]
int v45[2]; // [rsp+1E8h] [rbp-60h] BYREF
int v46; // [rsp+1F0h] [rbp-58h]
v14 = &v16;
std::string::_M_construct(&v14, 2 * a1, 32LL);
Options = google::protobuf::`anonymous namespace'::RetrieveOptions(
a1,
a2,
0,
0,
0,
(_DWORD)v14,
v15,
v16,
v17,
v18[0],
v19,
v20,
v21,
v22,
v23,
v24[0],
v25,
v26,
v27,
v28,
v29,
v30,
v31,
v32);
v6 = v11;
if ( Options )
{
v7 = v12;
if ( v11 != v12 )
{
do
{
*(_QWORD *)v45 = v14;
v46 = v15;
*(_QWORD *)v43 = *(_QWORD *)v6;
v44 = *(_DWORD *)(v6 + 8);
*(_QWORD *)v41 = 0LL;
v42 = -1;
*(_QWORD *)v39 = 0LL;
v40 = -1;
v37 = 0LL;
v38 = -1;
*(_QWORD *)v35 = 0LL;
v36 = -1;
v33 = 0LL;
v34 = -1;
v30 = 0LL;
v31 = -1;
*((_QWORD *)&v10 + 1) = &v30;
*(_QWORD *)&v10 = &v33;
google::protobuf::strings::SubstituteAndAppend(
a4,
(int)"$0option $1;\n",
(int)v45,
(int)v43,
(int)v41,
(int)v39,
&v37,
(int)v35,
v10,
v24,
(int)v18,
v11,
v12,
v13,
(int)v14,
v15,
v16,
v17,
0,
-1,
v20,
v21,
v22,
v23,
0,
-1,
v26);
v6 += 32LL;
}
while ( v6 != v7 );
v6 = v11;
}
}
v8 = v12;
std::vector<std::string>::~vector((long long)&v11);
if ( v14 != &v16 )
operator delete(v14);
return v6 != v8;
}
|
FormatLineOptions:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x218
MOV RBX,RCX
MOV R14,RDX
MOV R15,RSI
MOV R12D,EDI
LEA EAX,[R12 + R12*0x1]
MOVSXD RSI,EAX
LEA R13,[RSP + 0x28]
MOV qword ptr [R13 + -0x10],R13
LEA RDI,[RSP + 0x18]
MOV EDX,0x20
CALL 0x0010f3c0
XORPS XMM0,XMM0
MOV RCX,RSP
MOVAPS xmmword ptr [RCX],XMM0
MOV qword ptr [RCX + 0x10],0x0
LAB_00122226:
MOV EDI,R12D
MOV RSI,R15
MOV RDX,R14
CALL 0x0013b627
MOV R14,qword ptr [RSP]
TEST AL,AL
JZ 0x00122375
MOV R15,qword ptr [RSP + 0x8]
CMP R14,R15
JZ 0x00122375
XOR R12D,R12D
MOV R13D,0xffffffff
LEA RBP,[RSP + 0x158]
LAB_0012225f:
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x1e8],RAX
MOV EAX,dword ptr [RSP + 0x20]
MOV dword ptr [RSP + 0x1f0],EAX
MOV RAX,qword ptr [R14]
MOV qword ptr [RSP + 0x1b8],RAX
MOV EAX,dword ptr [R14 + 0x8]
MOV dword ptr [RSP + 0x1c0],EAX
MOV qword ptr [RSP + 0x188],R12
MOV dword ptr [RSP + 0x190],R13D
MOV qword ptr [RSP + 0x158],R12
MOV dword ptr [RSP + 0x160],R13D
MOV qword ptr [RSP + 0x128],R12
MOV dword ptr [RSP + 0x130],R13D
MOV qword ptr [RSP + 0xf8],R12
MOV dword ptr [RSP + 0x100],R13D
MOV qword ptr [RSP + 0xc8],R12
MOV dword ptr [RSP + 0xd0],R13D
MOV qword ptr [RSP + 0x98],R12
MOV dword ptr [RSP + 0xa0],R13D
MOV qword ptr [RSP + 0x68],R12
MOV dword ptr [RSP + 0x70],R13D
MOV qword ptr [RSP + 0x38],R12
MOV dword ptr [RSP + 0x40],R13D
LAB_00122301:
MOV RDI,RBX
LEA RSI,[0x1b8632]
LEA RDX,[RSP + 0x1e8]
LEA RCX,[RSP + 0x1b8]
LEA R8,[RSP + 0x188]
MOV R9,RBP
LEA RAX,[RSP + 0x38]
PUSH RAX
LEA RAX,[RSP + 0x70]
PUSH RAX
LEA RAX,[RSP + 0xa8]
PUSH RAX
LEA RAX,[RSP + 0xe0]
PUSH RAX
LEA RAX,[RSP + 0x118]
PUSH RAX
LEA RAX,[RSP + 0x150]
PUSH RAX
CALL 0x0017b9bd
ADD RSP,0x30
LAB_0012235f:
ADD R14,0x20
CMP R14,R15
JNZ 0x0012225f
MOV R14,qword ptr [RSP]
LEA R13,[RSP + 0x28]
LAB_00122375:
MOV RDI,RSP
MOV RBX,qword ptr [RDI + 0x8]
CALL 0x00111e36
MOV RDI,qword ptr [RSP + 0x18]
CMP RDI,R13
JZ 0x00122390
CALL 0x0010f330
LAB_00122390:
CMP R14,RBX
SETNZ AL
ADD RSP,0x218
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* google::protobuf::(anonymous namespace)::FormatLineOptions(int, google::protobuf::Message const&,
google::protobuf::DescriptorPool const*, std::__cxx11::string*) */
bool google::protobuf::(anonymous_namespace)::FormatLineOptions
(int param_1,Message *param_2,DescriptorPool *param_3,string *param_4)
{
int8 *puVar1;
char cVar2;
int8 *puVar3;
int8 *local_248;
int8 *puStack_240;
int8 local_238;
int1 *local_230;
int4 local_228;
int1 local_220 [16];
int8 local_210;
int4 local_208;
int8 local_1e0;
int4 local_1d8;
int8 local_1b0;
int4 local_1a8;
int8 local_180;
int4 local_178;
int8 local_150;
int4 local_148;
int8 local_120;
int4 local_118;
int8 local_f0;
int4 local_e8;
int8 local_c0;
int4 local_b8;
int8 local_90;
int4 local_88;
int1 *local_60;
int4 local_58;
local_230 = local_220;
std::__cxx11::string::_M_construct((ulong)&local_230,(char)param_1 * '\x02');
local_248 = (int8 *)0x0;
puStack_240 = (int8 *)0x0;
local_238 = 0;
/* try { // try from 00122226 to 00122233 has its CatchHandler @ 001223a8 */
cVar2 = RetrieveOptions(param_1,param_2,param_3,(vector *)&local_248);
puVar1 = puStack_240;
if ((cVar2 != '\0') && (local_248 != puStack_240)) {
puVar3 = local_248;
do {
local_60 = local_230;
local_58 = local_228;
local_90 = *puVar3;
local_88 = *(int4 *)(puVar3 + 1);
local_c0 = 0;
local_b8 = 0xffffffff;
local_f0 = 0;
local_e8 = 0xffffffff;
local_120 = 0;
local_118 = 0xffffffff;
local_150 = 0;
local_148 = 0xffffffff;
local_180 = 0;
local_178 = 0xffffffff;
local_1b0 = 0;
local_1a8 = 0xffffffff;
local_1e0 = 0;
local_1d8 = 0xffffffff;
local_210 = 0;
local_208 = 0xffffffff;
/* try { // try from 00122301 to 0012235e has its CatchHandler @ 001223aa */
strings::SubstituteAndAppend
(param_4,"$0option $1;\n",(SubstituteArg *)&local_60,(SubstituteArg *)&local_90,
(SubstituteArg *)&local_c0,(SubstituteArg *)&local_f0,(SubstituteArg *)&local_120,
(SubstituteArg *)&local_150,(SubstituteArg *)&local_180,(SubstituteArg *)&local_1b0
,(SubstituteArg *)&local_1e0,(SubstituteArg *)&local_210);
puVar3 = puVar3 + 4;
} while (puVar3 != puVar1);
}
puVar3 = puStack_240;
puVar1 = local_248;
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_248);
if (local_230 != local_220) {
operator_delete(local_230);
}
return puVar1 != puVar3;
}
|
|
7,664 |
my_xml_scan
|
eloqsql/strings/xml.c
|
static int my_xml_scan(MY_XML_PARSER *p,MY_XML_ATTR *a)
{
int lex;
for (; ( p->cur < p->end) && my_xml_is_space(p->cur[0]) ; p->cur++);
if (p->cur >= p->end)
{
a->beg=p->end;
a->end=p->end;
lex=MY_XML_EOF;
goto ret;
}
a->beg=p->cur;
a->end=p->cur;
if (!my_xml_parser_prefix_cmp(p, C_STRING_WITH_LEN("<!--")))
{
for (; p->cur < p->end; p->cur++)
{
if (!my_xml_parser_prefix_cmp(p, C_STRING_WITH_LEN("-->")))
{
p->cur+= 3;
break;
}
}
a->end=p->cur;
lex=MY_XML_COMMENT;
}
else if (!my_xml_parser_prefix_cmp(p, C_STRING_WITH_LEN("<![CDATA[")))
{
p->cur+= 9;
for (; p->cur < p->end - 2 ; p->cur++)
{
if (p->cur[0] == ']' && p->cur[1] == ']' && p->cur[2] == '>')
{
p->cur+= 3;
a->end= p->cur;
break;
}
}
lex= MY_XML_CDATA;
}
else if (strchr("?=/<>!",p->cur[0]))
{
p->cur++;
a->end=p->cur;
lex=a->beg[0];
}
else if ( (p->cur[0] == '"') || (p->cur[0] == '\'') )
{
/*
"string" or 'string' found.
Scan until the closing quote/doublequote, or until the END-OF-INPUT.
*/
p->cur++;
for (; ( p->cur < p->end ) && (p->cur[0] != a->beg[0]); p->cur++)
{}
a->end=p->cur;
if (p->cur < p->end) /* Closing quote or doublequote has been found */
p->cur++;
a->beg++;
if (!(p->flags & MY_XML_FLAG_SKIP_TEXT_NORMALIZATION))
my_xml_norm_text(a);
lex=MY_XML_STRING;
}
else if (my_xml_is_id0(p->cur[0]))
{
p->cur++;
while (p->cur < p->end && my_xml_is_id1(p->cur[0]))
p->cur++;
a->end=p->cur;
my_xml_norm_text(a);
lex=MY_XML_IDENT;
}
else
lex= MY_XML_UNKNOWN;
#if 0
printf("LEX=%s[%d]\n",lex2str(lex),a->end-a->beg);
#endif
ret:
return lex;
}
|
O0
|
c
|
my_xml_scan:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rcx
movq -0x8(%rbp), %rdx
xorl %eax, %eax
cmpq 0x138(%rdx), %rcx
movb %al, -0x15(%rbp)
jae 0x85ed4
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x30e7cc(%rip), %rax # 0x394690
movsbl (%rax,%rcx), %eax
andl $0x8, %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x15(%rbp)
movb -0x15(%rbp), %al
testb $0x1, %al
jne 0x85edd
jmp 0x85ef7
jmp 0x85edf
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x130(%rax)
jmp 0x85e90
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rax
movq -0x8(%rbp), %rcx
cmpq 0x138(%rcx), %rax
jb 0x85f40
movq -0x8(%rbp), %rax
movq 0x138(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq 0x138(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movl $0x45, -0x14(%rbp)
jmp 0x86330
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rdi
leaq 0x6401(%rip), %rsi # 0x8c371
movl $0x4, %edx
callq 0x86b70
cmpb $0x0, %al
jne 0x86006
jmp 0x85f84
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rax
movq -0x8(%rbp), %rcx
cmpq 0x138(%rcx), %rax
jae 0x85fe7
movq -0x8(%rbp), %rdi
leaq 0x63cf(%rip), %rsi # 0x8c376
movl $0x3, %edx
callq 0x86b70
cmpb $0x0, %al
jne 0x85fcd
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rcx
addq $0x3, %rcx
movq %rcx, 0x130(%rax)
jmp 0x85fe7
jmp 0x85fcf
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x130(%rax)
jmp 0x85f84
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movl $0x43, -0x14(%rbp)
jmp 0x8632e
movq -0x8(%rbp), %rdi
leaq 0x6369(%rip), %rsi # 0x8c37a
movl $0x9, %edx
callq 0x86b70
cmpb $0x0, %al
jne 0x860eb
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rcx
addq $0x9, %rcx
movq %rcx, 0x130(%rax)
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x138(%rcx), %rcx
addq $-0x2, %rcx
cmpq %rcx, %rax
jae 0x860df
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rax
movsbl (%rax), %eax
cmpl $0x5d, %eax
jne 0x860c2
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rax
movsbl 0x1(%rax), %eax
cmpl $0x5d, %eax
jne 0x860c2
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rax
movsbl 0x2(%rax), %eax
cmpl $0x3e, %eax
jne 0x860c2
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rcx
addq $0x3, %rcx
movq %rcx, 0x130(%rax)
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x860df
jmp 0x860c4
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x130(%rax)
jmp 0x86039
movl $0x44, -0x14(%rbp)
jmp 0x8632c
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rax
movsbl (%rax), %esi
leaq 0x6284(%rip), %rdi # 0x8c384
callq 0x24100
cmpq $0x0, %rax
je 0x86146
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x130(%rax)
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
movl %eax, -0x14(%rbp)
jmp 0x8632a
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rax
movsbl (%rax), %eax
cmpl $0x22, %eax
je 0x86170
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rax
movsbl (%rax), %eax
cmpl $0x27, %eax
jne 0x86258
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x130(%rax)
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rcx
movq -0x8(%rbp), %rdx
xorl %eax, %eax
cmpq 0x138(%rdx), %rcx
movb %al, -0x16(%rbp)
jae 0x861c3
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rax
movsbl (%rax), %eax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movsbl (%rcx), %ecx
cmpl %ecx, %eax
setne %al
movb %al, -0x16(%rbp)
movb -0x16(%rbp), %al
testb $0x1, %al
jne 0x861cc
jmp 0x861e6
jmp 0x861ce
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x130(%rax)
jmp 0x86186
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rax
movq -0x8(%rbp), %rcx
cmpq 0x138(%rcx), %rax
jae 0x86227
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x130(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movl (%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x8624c
movq -0x10(%rbp), %rdi
callq 0x868a0
movl $0x53, -0x14(%rbp)
jmp 0x86328
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x30e421(%rip), %rax # 0x394690
movsbl (%rax,%rcx), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x8631f
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x130(%rax)
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rcx
movq -0x8(%rbp), %rdx
xorl %eax, %eax
cmpq 0x138(%rdx), %rcx
movb %al, -0x17(%rbp)
jae 0x862d9
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x30e3c7(%rip), %rax # 0x394690
movsbl (%rax,%rcx), %eax
andl $0x2, %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x17(%rbp)
movb -0x17(%rbp), %al
testb $0x1, %al
jne 0x862e2
jmp 0x862fa
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x130(%rax)
jmp 0x86295
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rdi
callq 0x868a0
movl $0x49, -0x14(%rbp)
jmp 0x86326
movl $0x55, -0x14(%rbp)
jmp 0x86328
jmp 0x8632a
jmp 0x8632c
jmp 0x8632e
jmp 0x86330
movl -0x14(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
|
my_xml_scan:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
loc_85E90:
mov rax, [rbp+var_8]
mov rcx, [rax+130h]
mov rdx, [rbp+var_8]
xor eax, eax
cmp rcx, [rdx+138h]
mov [rbp+var_15], al
jnb short loc_85ED4
mov rax, [rbp+var_8]
mov rax, [rax+130h]
movzx eax, byte ptr [rax]
mov ecx, eax
lea rax, my_xml_ctype
movsx eax, byte ptr [rax+rcx]
and eax, 8
cmp eax, 0
setnz al
mov [rbp+var_15], al
loc_85ED4:
mov al, [rbp+var_15]
test al, 1
jnz short loc_85EDD
jmp short loc_85EF7
loc_85EDD:
jmp short $+2
loc_85EDF:
mov rax, [rbp+var_8]
mov rcx, [rax+130h]
add rcx, 1
mov [rax+130h], rcx
jmp short loc_85E90
loc_85EF7:
mov rax, [rbp+var_8]
mov rax, [rax+130h]
mov rcx, [rbp+var_8]
cmp rax, [rcx+138h]
jb short loc_85F40
mov rax, [rbp+var_8]
mov rcx, [rax+138h]
mov rax, [rbp+var_10]
mov [rax], rcx
mov rax, [rbp+var_8]
mov rcx, [rax+138h]
mov rax, [rbp+var_10]
mov [rax+8], rcx
mov [rbp+var_14], 45h ; 'E'
jmp loc_86330
loc_85F40:
mov rax, [rbp+var_8]
mov rcx, [rax+130h]
mov rax, [rbp+var_10]
mov [rax], rcx
mov rax, [rbp+var_8]
mov rcx, [rax+130h]
mov rax, [rbp+var_10]
mov [rax+8], rcx
mov rdi, [rbp+var_8]
lea rsi, asc_8C371; "<!--"
mov edx, 4
call my_xml_parser_prefix_cmp
cmp al, 0
jnz loc_86006
jmp short $+2
loc_85F84:
mov rax, [rbp+var_8]
mov rax, [rax+130h]
mov rcx, [rbp+var_8]
cmp rax, [rcx+138h]
jnb short loc_85FE7
mov rdi, [rbp+var_8]
lea rsi, asc_8C376; "-->"
mov edx, 3
call my_xml_parser_prefix_cmp
cmp al, 0
jnz short loc_85FCD
mov rax, [rbp+var_8]
mov rcx, [rax+130h]
add rcx, 3
mov [rax+130h], rcx
jmp short loc_85FE7
loc_85FCD:
jmp short $+2
loc_85FCF:
mov rax, [rbp+var_8]
mov rcx, [rax+130h]
add rcx, 1
mov [rax+130h], rcx
jmp short loc_85F84
loc_85FE7:
mov rax, [rbp+var_8]
mov rcx, [rax+130h]
mov rax, [rbp+var_10]
mov [rax+8], rcx
mov [rbp+var_14], 43h ; 'C'
jmp loc_8632E
loc_86006:
mov rdi, [rbp+var_8]
lea rsi, aCdata; "<![CDATA["
mov edx, 9
call my_xml_parser_prefix_cmp
cmp al, 0
jnz loc_860EB
mov rax, [rbp+var_8]
mov rcx, [rax+130h]
add rcx, 9
mov [rax+130h], rcx
loc_86039:
mov rax, [rbp+var_8]
mov rax, [rax+130h]
mov rcx, [rbp+var_8]
mov rcx, [rcx+138h]
add rcx, 0FFFFFFFFFFFFFFFEh
cmp rax, rcx
jnb loc_860DF
mov rax, [rbp+var_8]
mov rax, [rax+130h]
movsx eax, byte ptr [rax]
cmp eax, 5Dh ; ']'
jnz short loc_860C2
mov rax, [rbp+var_8]
mov rax, [rax+130h]
movsx eax, byte ptr [rax+1]
cmp eax, 5Dh ; ']'
jnz short loc_860C2
mov rax, [rbp+var_8]
mov rax, [rax+130h]
movsx eax, byte ptr [rax+2]
cmp eax, 3Eh ; '>'
jnz short loc_860C2
mov rax, [rbp+var_8]
mov rcx, [rax+130h]
add rcx, 3
mov [rax+130h], rcx
mov rax, [rbp+var_8]
mov rcx, [rax+130h]
mov rax, [rbp+var_10]
mov [rax+8], rcx
jmp short loc_860DF
loc_860C2:
jmp short $+2
loc_860C4:
mov rax, [rbp+var_8]
mov rcx, [rax+130h]
add rcx, 1
mov [rax+130h], rcx
jmp loc_86039
loc_860DF:
mov [rbp+var_14], 44h ; 'D'
jmp loc_8632C
loc_860EB:
mov rax, [rbp+var_8]
mov rax, [rax+130h]
movsx esi, byte ptr [rax]
lea rdi, asc_8C384; "?=/<>!"
call _strchr
cmp rax, 0
jz short loc_86146
mov rax, [rbp+var_8]
mov rcx, [rax+130h]
add rcx, 1
mov [rax+130h], rcx
mov rax, [rbp+var_8]
mov rcx, [rax+130h]
mov rax, [rbp+var_10]
mov [rax+8], rcx
mov rax, [rbp+var_10]
mov rax, [rax]
movsx eax, byte ptr [rax]
mov [rbp+var_14], eax
jmp loc_8632A
loc_86146:
mov rax, [rbp+var_8]
mov rax, [rax+130h]
movsx eax, byte ptr [rax]
cmp eax, 22h ; '"'
jz short loc_86170
mov rax, [rbp+var_8]
mov rax, [rax+130h]
movsx eax, byte ptr [rax]
cmp eax, 27h ; '''
jnz loc_86258
loc_86170:
mov rax, [rbp+var_8]
mov rcx, [rax+130h]
add rcx, 1
mov [rax+130h], rcx
loc_86186:
mov rax, [rbp+var_8]
mov rcx, [rax+130h]
mov rdx, [rbp+var_8]
xor eax, eax
cmp rcx, [rdx+138h]
mov [rbp+var_16], al
jnb short loc_861C3
mov rax, [rbp+var_8]
mov rax, [rax+130h]
movsx eax, byte ptr [rax]
mov rcx, [rbp+var_10]
mov rcx, [rcx]
movsx ecx, byte ptr [rcx]
cmp eax, ecx
setnz al
mov [rbp+var_16], al
loc_861C3:
mov al, [rbp+var_16]
test al, 1
jnz short loc_861CC
jmp short loc_861E6
loc_861CC:
jmp short $+2
loc_861CE:
mov rax, [rbp+var_8]
mov rcx, [rax+130h]
add rcx, 1
mov [rax+130h], rcx
jmp short loc_86186
loc_861E6:
mov rax, [rbp+var_8]
mov rcx, [rax+130h]
mov rax, [rbp+var_10]
mov [rax+8], rcx
mov rax, [rbp+var_8]
mov rax, [rax+130h]
mov rcx, [rbp+var_8]
cmp rax, [rcx+138h]
jnb short loc_86227
mov rax, [rbp+var_8]
mov rcx, [rax+130h]
add rcx, 1
mov [rax+130h], rcx
loc_86227:
mov rax, [rbp+var_10]
mov rcx, [rax]
add rcx, 1
mov [rax], rcx
mov rax, [rbp+var_8]
mov eax, [rax]
and eax, 2
cmp eax, 0
jnz short loc_8624C
mov rdi, [rbp+var_10]
call my_xml_norm_text
loc_8624C:
mov [rbp+var_14], 53h ; 'S'
jmp loc_86328
loc_86258:
mov rax, [rbp+var_8]
mov rax, [rax+130h]
movzx eax, byte ptr [rax]
mov ecx, eax
lea rax, my_xml_ctype
movsx eax, byte ptr [rax+rcx]
and eax, 1
cmp eax, 0
jz loc_8631F
mov rax, [rbp+var_8]
mov rcx, [rax+130h]
add rcx, 1
mov [rax+130h], rcx
loc_86295:
mov rax, [rbp+var_8]
mov rcx, [rax+130h]
mov rdx, [rbp+var_8]
xor eax, eax
cmp rcx, [rdx+138h]
mov [rbp+var_17], al
jnb short loc_862D9
mov rax, [rbp+var_8]
mov rax, [rax+130h]
movzx eax, byte ptr [rax]
mov ecx, eax
lea rax, my_xml_ctype
movsx eax, byte ptr [rax+rcx]
and eax, 2
cmp eax, 0
setnz al
mov [rbp+var_17], al
loc_862D9:
mov al, [rbp+var_17]
test al, 1
jnz short loc_862E2
jmp short loc_862FA
loc_862E2:
mov rax, [rbp+var_8]
mov rcx, [rax+130h]
add rcx, 1
mov [rax+130h], rcx
jmp short loc_86295
loc_862FA:
mov rax, [rbp+var_8]
mov rcx, [rax+130h]
mov rax, [rbp+var_10]
mov [rax+8], rcx
mov rdi, [rbp+var_10]
call my_xml_norm_text
mov [rbp+var_14], 49h ; 'I'
jmp short loc_86326
loc_8631F:
mov [rbp+var_14], 55h ; 'U'
loc_86326:
jmp short $+2
loc_86328:
jmp short $+2
loc_8632A:
jmp short $+2
loc_8632C:
jmp short $+2
loc_8632E:
jmp short $+2
loc_86330:
mov eax, [rbp+var_14]
add rsp, 20h
pop rbp
retn
|
long long my_xml_scan(long long a1, char **a2)
{
bool v3; // [rsp+9h] [rbp-17h]
bool v4; // [rsp+Ah] [rbp-16h]
bool v5; // [rsp+Bh] [rbp-15h]
while ( 1 )
{
v5 = 0;
if ( *(_QWORD *)(a1 + 304) < *(_QWORD *)(a1 + 312) )
v5 = (my_xml_ctype[**(unsigned __int8 **)(a1 + 304)] & 8) != 0;
if ( !v5 )
break;
++*(_QWORD *)(a1 + 304);
}
if ( *(_QWORD *)(a1 + 304) < *(_QWORD *)(a1 + 312) )
{
*a2 = *(char **)(a1 + 304);
a2[1] = *(char **)(a1 + 304);
if ( (unsigned __int8)my_xml_parser_prefix_cmp(a1, "<!--", 4LL) )
{
if ( (unsigned __int8)my_xml_parser_prefix_cmp(a1, "<![CDATA[", 9LL) )
{
if ( strchr("?=/<>!", (unsigned int)**(char **)(a1 + 304)) )
{
a2[1] = (char *)++*(_QWORD *)(a1 + 304);
return (unsigned int)**a2;
}
else if ( **(_BYTE **)(a1 + 304) == 34 || **(_BYTE **)(a1 + 304) == 39 )
{
++*(_QWORD *)(a1 + 304);
while ( 1 )
{
v4 = 0;
if ( *(_QWORD *)(a1 + 304) < *(_QWORD *)(a1 + 312) )
v4 = **(char **)(a1 + 304) != **a2;
if ( !v4 )
break;
++*(_QWORD *)(a1 + 304);
}
a2[1] = *(char **)(a1 + 304);
if ( *(_QWORD *)(a1 + 304) < *(_QWORD *)(a1 + 312) )
++*(_QWORD *)(a1 + 304);
++*a2;
if ( (*(_DWORD *)a1 & 2) == 0 )
my_xml_norm_text(a2);
return 83;
}
else if ( (my_xml_ctype[**(unsigned __int8 **)(a1 + 304)] & 1) != 0 )
{
++*(_QWORD *)(a1 + 304);
while ( 1 )
{
v3 = 0;
if ( *(_QWORD *)(a1 + 304) < *(_QWORD *)(a1 + 312) )
v3 = (my_xml_ctype[**(unsigned __int8 **)(a1 + 304)] & 2) != 0;
if ( !v3 )
break;
++*(_QWORD *)(a1 + 304);
}
a2[1] = *(char **)(a1 + 304);
my_xml_norm_text(a2);
return 73;
}
else
{
return 85;
}
}
else
{
for ( *(_QWORD *)(a1 + 304) += 9LL;
*(_QWORD *)(a1 + 304) < (unsigned long long)(*(_QWORD *)(a1 + 312) - 2LL);
++*(_QWORD *)(a1 + 304) )
{
if ( **(_BYTE **)(a1 + 304) == 93
&& *(_BYTE *)(*(_QWORD *)(a1 + 304) + 1LL) == 93
&& *(_BYTE *)(*(_QWORD *)(a1 + 304) + 2LL) == 62 )
{
*(_QWORD *)(a1 + 304) += 3LL;
a2[1] = *(char **)(a1 + 304);
break;
}
}
return 68;
}
}
else
{
while ( *(_QWORD *)(a1 + 304) < *(_QWORD *)(a1 + 312) )
{
if ( !(unsigned __int8)my_xml_parser_prefix_cmp(a1, "-->", 3LL) )
{
*(_QWORD *)(a1 + 304) += 3LL;
break;
}
++*(_QWORD *)(a1 + 304);
}
a2[1] = *(char **)(a1 + 304);
return 67;
}
}
else
{
*a2 = *(char **)(a1 + 312);
a2[1] = *(char **)(a1 + 312);
return 69;
}
}
|
my_xml_scan:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
LAB_00185e90:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x130]
MOV RDX,qword ptr [RBP + -0x8]
XOR EAX,EAX
CMP RCX,qword ptr [RDX + 0x138]
MOV byte ptr [RBP + -0x15],AL
JNC 0x00185ed4
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x130]
MOVZX EAX,byte ptr [RAX]
MOV ECX,EAX
LEA RAX,[0x494690]
MOVSX EAX,byte ptr [RAX + RCX*0x1]
AND EAX,0x8
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x15],AL
LAB_00185ed4:
MOV AL,byte ptr [RBP + -0x15]
TEST AL,0x1
JNZ 0x00185edd
JMP 0x00185ef7
LAB_00185edd:
JMP 0x00185edf
LAB_00185edf:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x130]
ADD RCX,0x1
MOV qword ptr [RAX + 0x130],RCX
JMP 0x00185e90
LAB_00185ef7:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x130]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RCX + 0x138]
JC 0x00185f40
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x138]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x138]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV dword ptr [RBP + -0x14],0x45
JMP 0x00186330
LAB_00185f40:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x130]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x130]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x18c371]
MOV EDX,0x4
CALL 0x00186b70
CMP AL,0x0
JNZ 0x00186006
JMP 0x00185f84
LAB_00185f84:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x130]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RCX + 0x138]
JNC 0x00185fe7
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x18c376]
MOV EDX,0x3
CALL 0x00186b70
CMP AL,0x0
JNZ 0x00185fcd
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x130]
ADD RCX,0x3
MOV qword ptr [RAX + 0x130],RCX
JMP 0x00185fe7
LAB_00185fcd:
JMP 0x00185fcf
LAB_00185fcf:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x130]
ADD RCX,0x1
MOV qword ptr [RAX + 0x130],RCX
JMP 0x00185f84
LAB_00185fe7:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x130]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV dword ptr [RBP + -0x14],0x43
JMP 0x0018632e
LAB_00186006:
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x18c37a]
MOV EDX,0x9
CALL 0x00186b70
CMP AL,0x0
JNZ 0x001860eb
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x130]
ADD RCX,0x9
MOV qword ptr [RAX + 0x130],RCX
LAB_00186039:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x130]
MOV RCX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RCX + 0x138]
ADD RCX,-0x2
CMP RAX,RCX
JNC 0x001860df
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x130]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x5d
JNZ 0x001860c2
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x130]
MOVSX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x5d
JNZ 0x001860c2
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x130]
MOVSX EAX,byte ptr [RAX + 0x2]
CMP EAX,0x3e
JNZ 0x001860c2
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x130]
ADD RCX,0x3
MOV qword ptr [RAX + 0x130],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x130]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],RCX
JMP 0x001860df
LAB_001860c2:
JMP 0x001860c4
LAB_001860c4:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x130]
ADD RCX,0x1
MOV qword ptr [RAX + 0x130],RCX
JMP 0x00186039
LAB_001860df:
MOV dword ptr [RBP + -0x14],0x44
JMP 0x0018632c
LAB_001860eb:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x130]
MOVSX ESI,byte ptr [RAX]
LEA RDI,[0x18c384]
CALL 0x00124100
CMP RAX,0x0
JZ 0x00186146
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x130]
ADD RCX,0x1
MOV qword ptr [RAX + 0x130],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x130]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOVSX EAX,byte ptr [RAX]
MOV dword ptr [RBP + -0x14],EAX
JMP 0x0018632a
LAB_00186146:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x130]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x22
JZ 0x00186170
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x130]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x27
JNZ 0x00186258
LAB_00186170:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x130]
ADD RCX,0x1
MOV qword ptr [RAX + 0x130],RCX
LAB_00186186:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x130]
MOV RDX,qword ptr [RBP + -0x8]
XOR EAX,EAX
CMP RCX,qword ptr [RDX + 0x138]
MOV byte ptr [RBP + -0x16],AL
JNC 0x001861c3
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x130]
MOVSX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX]
MOVSX ECX,byte ptr [RCX]
CMP EAX,ECX
SETNZ AL
MOV byte ptr [RBP + -0x16],AL
LAB_001861c3:
MOV AL,byte ptr [RBP + -0x16]
TEST AL,0x1
JNZ 0x001861cc
JMP 0x001861e6
LAB_001861cc:
JMP 0x001861ce
LAB_001861ce:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x130]
ADD RCX,0x1
MOV qword ptr [RAX + 0x130],RCX
JMP 0x00186186
LAB_001861e6:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x130]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x130]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RCX + 0x138]
JNC 0x00186227
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x130]
ADD RCX,0x1
MOV qword ptr [RAX + 0x130],RCX
LAB_00186227:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
ADD RCX,0x1
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX]
AND EAX,0x2
CMP EAX,0x0
JNZ 0x0018624c
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001868a0
LAB_0018624c:
MOV dword ptr [RBP + -0x14],0x53
JMP 0x00186328
LAB_00186258:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x130]
MOVZX EAX,byte ptr [RAX]
MOV ECX,EAX
LEA RAX,[0x494690]
MOVSX EAX,byte ptr [RAX + RCX*0x1]
AND EAX,0x1
CMP EAX,0x0
JZ 0x0018631f
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x130]
ADD RCX,0x1
MOV qword ptr [RAX + 0x130],RCX
LAB_00186295:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x130]
MOV RDX,qword ptr [RBP + -0x8]
XOR EAX,EAX
CMP RCX,qword ptr [RDX + 0x138]
MOV byte ptr [RBP + -0x17],AL
JNC 0x001862d9
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x130]
MOVZX EAX,byte ptr [RAX]
MOV ECX,EAX
LEA RAX,[0x494690]
MOVSX EAX,byte ptr [RAX + RCX*0x1]
AND EAX,0x2
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x17],AL
LAB_001862d9:
MOV AL,byte ptr [RBP + -0x17]
TEST AL,0x1
JNZ 0x001862e2
JMP 0x001862fa
LAB_001862e2:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x130]
ADD RCX,0x1
MOV qword ptr [RAX + 0x130],RCX
JMP 0x00186295
LAB_001862fa:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x130]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001868a0
MOV dword ptr [RBP + -0x14],0x49
JMP 0x00186326
LAB_0018631f:
MOV dword ptr [RBP + -0x14],0x55
LAB_00186326:
JMP 0x00186328
LAB_00186328:
JMP 0x0018632a
LAB_0018632a:
JMP 0x0018632c
LAB_0018632c:
JMP 0x0018632e
LAB_0018632e:
JMP 0x00186330
LAB_00186330:
MOV EAX,dword ptr [RBP + -0x14]
ADD RSP,0x20
POP RBP
RET
|
int my_xml_scan(uint *param_1,long *param_2)
{
char cVar1;
char *pcVar2;
bool bVar3;
int local_1c;
while( true ) {
bVar3 = false;
if (*(ulong *)(param_1 + 0x4c) < *(ulong *)(param_1 + 0x4e)) {
bVar3 = (my_xml_ctype[**(byte **)(param_1 + 0x4c)] & 8) != 0;
}
if (!bVar3) break;
*(long *)(param_1 + 0x4c) = *(long *)(param_1 + 0x4c) + 1;
}
if (*(ulong *)(param_1 + 0x4c) < *(ulong *)(param_1 + 0x4e)) {
*param_2 = *(long *)(param_1 + 0x4c);
param_2[1] = *(long *)(param_1 + 0x4c);
cVar1 = my_xml_parser_prefix_cmp(param_1,&DAT_0018c371,4);
if (cVar1 == '\0') {
while (*(ulong *)(param_1 + 0x4c) < *(ulong *)(param_1 + 0x4e)) {
cVar1 = my_xml_parser_prefix_cmp(param_1,&DAT_0018c376,3);
if (cVar1 == '\0') {
*(long *)(param_1 + 0x4c) = *(long *)(param_1 + 0x4c) + 3;
break;
}
*(long *)(param_1 + 0x4c) = *(long *)(param_1 + 0x4c) + 1;
}
param_2[1] = *(long *)(param_1 + 0x4c);
local_1c = 0x43;
}
else {
cVar1 = my_xml_parser_prefix_cmp(param_1,"<![CDATA[",9);
if (cVar1 == '\0') {
*(long *)(param_1 + 0x4c) = *(long *)(param_1 + 0x4c) + 9;
while (*(ulong *)(param_1 + 0x4c) < *(long *)(param_1 + 0x4e) - 2U) {
if (((**(char **)(param_1 + 0x4c) == ']') &&
(*(char *)(*(long *)(param_1 + 0x4c) + 1) == ']')) &&
(*(char *)(*(long *)(param_1 + 0x4c) + 2) == '>')) {
*(long *)(param_1 + 0x4c) = *(long *)(param_1 + 0x4c) + 3;
param_2[1] = *(long *)(param_1 + 0x4c);
break;
}
*(long *)(param_1 + 0x4c) = *(long *)(param_1 + 0x4c) + 1;
}
local_1c = 0x44;
}
else {
pcVar2 = strchr("?=/<>!",(int)**(char **)(param_1 + 0x4c));
if (pcVar2 == (char *)0x0) {
if ((**(char **)(param_1 + 0x4c) == '\"') || (**(char **)(param_1 + 0x4c) == '\'')) {
*(long *)(param_1 + 0x4c) = *(long *)(param_1 + 0x4c) + 1;
while( true ) {
bVar3 = false;
if (*(ulong *)(param_1 + 0x4c) < *(ulong *)(param_1 + 0x4e)) {
bVar3 = **(char **)(param_1 + 0x4c) != *(char *)*param_2;
}
if (!bVar3) break;
*(long *)(param_1 + 0x4c) = *(long *)(param_1 + 0x4c) + 1;
}
param_2[1] = *(long *)(param_1 + 0x4c);
if (*(ulong *)(param_1 + 0x4c) < *(ulong *)(param_1 + 0x4e)) {
*(long *)(param_1 + 0x4c) = *(long *)(param_1 + 0x4c) + 1;
}
*param_2 = *param_2 + 1;
if ((*param_1 & 2) == 0) {
my_xml_norm_text(param_2);
}
local_1c = 0x53;
}
else if ((my_xml_ctype[**(byte **)(param_1 + 0x4c)] & 1) == 0) {
local_1c = 0x55;
}
else {
*(long *)(param_1 + 0x4c) = *(long *)(param_1 + 0x4c) + 1;
while( true ) {
bVar3 = false;
if (*(ulong *)(param_1 + 0x4c) < *(ulong *)(param_1 + 0x4e)) {
bVar3 = (my_xml_ctype[**(byte **)(param_1 + 0x4c)] & 2) != 0;
}
if (!bVar3) break;
*(long *)(param_1 + 0x4c) = *(long *)(param_1 + 0x4c) + 1;
}
param_2[1] = *(long *)(param_1 + 0x4c);
my_xml_norm_text(param_2);
local_1c = 0x49;
}
}
else {
*(long *)(param_1 + 0x4c) = *(long *)(param_1 + 0x4c) + 1;
param_2[1] = *(long *)(param_1 + 0x4c);
local_1c = (int)*(char *)*param_2;
}
}
}
}
else {
*param_2 = *(long *)(param_1 + 0x4e);
param_2[1] = *(long *)(param_1 + 0x4e);
local_1c = 0x45;
}
return local_1c;
}
|
|
7,665 |
lunasvg::Element::children() const
|
dmazzella[P]pylunasvg/lunasvg/source/lunasvg.cpp
|
NodeList Element::children() const
{
if(m_node == nullptr)
return NodeList();
NodeList children;
for(const auto& child : element()->children())
children.push_back(child.get());
return children;
}
|
O0
|
cpp
|
lunasvg::Element::children() const:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x68(%rbp)
movq %rdi, %rax
movq %rax, -0x60(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
cmpq $0x0, (%rax)
jne 0xdc0a
movq -0x68(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0xb1d0
movq -0x68(%rbp), %rdi
callq 0xe930
jmp 0xdcd8
movq -0x68(%rbp), %rdi
movb $0x0, -0x11(%rbp)
callq 0xe930
movq -0x58(%rbp), %rdi
xorl %esi, %esi
callq 0xd470
movq %rax, -0x70(%rbp)
jmp 0xdc28
movq -0x70(%rbp), %rdi
callq 0xe950
movq %rax, -0x78(%rbp)
jmp 0xdc37
movq -0x78(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0xe970
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rdi
callq 0xe9a0
movq %rax, -0x40(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0xe9d0
testb $0x1, %al
jne 0xdc6c
jmp 0xdcc3
leaq -0x38(%rbp), %rdi
callq 0xea00
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdi
callq 0xea60
movq %rax, %rsi
leaq -0x50(%rbp), %rdi
callq 0xd110
jmp 0xdc90
movq -0x68(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0xea30
jmp 0xdc9f
jmp 0xdca1
leaq -0x38(%rbp), %rdi
callq 0xea90
jmp 0xdc59
movq -0x68(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0xeab0
jmp 0xdce5
movb $0x1, -0x11(%rbp)
testb $0x1, -0x11(%rbp)
jne 0xdcd6
movq -0x68(%rbp), %rdi
callq 0xeab0
jmp 0xdcd8
movq -0x60(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
movq -0x28(%rbp), %rdi
callq 0xb6c0
nop
|
_ZNK7lunasvg7Element8childrenEv:
push rbp
mov rbp, rsp
sub rsp, 80h
mov [rbp+var_68], rdi
mov rax, rdi
mov [rbp+var_60], rax
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_10]
mov [rbp+var_58], rax
cmp qword ptr [rax], 0
jnz short loc_DC0A
mov rdi, [rbp+var_68]
xor esi, esi
mov edx, 18h
call _memset
mov rdi, [rbp+var_68]
call _ZNSt6vectorIN7lunasvg4NodeESaIS1_EEC2Ev; std::vector<lunasvg::Node>::vector(void)
jmp loc_DCD8
loc_DC0A:
mov rdi, [rbp+var_68]
mov [rbp+var_11], 0
call _ZNSt6vectorIN7lunasvg4NodeESaIS1_EEC2Ev; std::vector<lunasvg::Node>::vector(void)
mov rdi, [rbp+var_58]; this
xor esi, esi; bool
call _ZNK7lunasvg7Element7elementEb; lunasvg::Element::element(bool)
mov [rbp+var_70], rax
jmp short $+2
loc_DC28:
mov rdi, [rbp+var_70]
call _ZNK7lunasvg10SVGElement8childrenB5cxx11Ev; lunasvg::SVGElement::children(void)
mov [rbp+var_78], rax
jmp short $+2
loc_DC37:
mov rax, [rbp+var_78]
mov [rbp+var_20], rax
mov rdi, [rbp+var_20]
call _ZNKSt7__cxx114listISt10unique_ptrIN7lunasvg7SVGNodeESt14default_deleteIS3_EESaIS6_EE5beginEv; std::list<std::unique_ptr<lunasvg::SVGNode>>::begin(void)
mov [rbp+var_38], rax
mov rdi, [rbp+var_20]
call _ZNKSt7__cxx114listISt10unique_ptrIN7lunasvg7SVGNodeESt14default_deleteIS3_EESaIS6_EE3endEv; std::list<std::unique_ptr<lunasvg::SVGNode>>::end(void)
mov [rbp+var_40], rax
loc_DC59:
lea rdi, [rbp+var_38]
lea rsi, [rbp+var_40]
call _ZStneRKSt20_List_const_iteratorISt10unique_ptrIN7lunasvg7SVGNodeESt14default_deleteIS2_EEES8_; std::operator!=(std::_List_const_iterator<std::unique_ptr<lunasvg::SVGNode>> const&,std::_List_const_iterator<std::unique_ptr<lunasvg::SVGNode>> const&)
test al, 1
jnz short loc_DC6C
jmp short loc_DCC3
loc_DC6C:
lea rdi, [rbp+var_38]
call _ZNKSt20_List_const_iteratorISt10unique_ptrIN7lunasvg7SVGNodeESt14default_deleteIS2_EEEdeEv; std::_List_const_iterator<std::unique_ptr<lunasvg::SVGNode>>::operator*(void)
mov [rbp+var_48], rax
mov rdi, [rbp+var_48]
call _ZNKSt10unique_ptrIN7lunasvg7SVGNodeESt14default_deleteIS1_EE3getEv; std::unique_ptr<lunasvg::SVGNode>::get(void)
mov rsi, rax
lea rdi, [rbp+var_50]
call _ZN7lunasvg4NodeC2EPNS_7SVGNodeE; lunasvg::Node::Node(lunasvg::SVGNode *)
jmp short $+2
loc_DC90:
mov rdi, [rbp+var_68]
lea rsi, [rbp+var_50]
call _ZNSt6vectorIN7lunasvg4NodeESaIS1_EE9push_backEOS1_; std::vector<lunasvg::Node>::push_back(lunasvg::Node&&)
jmp short $+2
loc_DC9F:
jmp short $+2
loc_DCA1:
lea rdi, [rbp+var_38]
call _ZNSt20_List_const_iteratorISt10unique_ptrIN7lunasvg7SVGNodeESt14default_deleteIS2_EEEppEv; std::_List_const_iterator<std::unique_ptr<lunasvg::SVGNode>>::operator++(void)
jmp short loc_DC59
mov rdi, [rbp+var_68]
mov rcx, rax
mov eax, edx
mov [rbp+var_28], rcx
mov [rbp+var_2C], eax
call _ZNSt6vectorIN7lunasvg4NodeESaIS1_EED2Ev; std::vector<lunasvg::Node>::~vector()
jmp short loc_DCE5
loc_DCC3:
mov [rbp+var_11], 1
test [rbp+var_11], 1
jnz short loc_DCD6
mov rdi, [rbp+var_68]
call _ZNSt6vectorIN7lunasvg4NodeESaIS1_EED2Ev; std::vector<lunasvg::Node>::~vector()
loc_DCD6:
jmp short $+2
loc_DCD8:
mov rax, [rbp+var_60]
add rsp, 80h
pop rbp
retn
loc_DCE5:
mov rdi, [rbp+var_28]
call __Unwind_Resume
|
lunasvg::Element * lunasvg::Element::children(lunasvg::Element *this, lunasvg::SVGNode **a2)
{
lunasvg::SVGNode *v2; // rax
lunasvg::SVGNode *v4; // [rsp+10h] [rbp-70h]
_BYTE v5[8]; // [rsp+30h] [rbp-50h] BYREF
long long v6; // [rsp+38h] [rbp-48h]
long long v7; // [rsp+40h] [rbp-40h] BYREF
long long v8; // [rsp+48h] [rbp-38h] BYREF
long long v9; // [rsp+60h] [rbp-20h]
char v10; // [rsp+6Fh] [rbp-11h]
lunasvg::SVGNode **v11; // [rsp+70h] [rbp-10h]
lunasvg::Element *v12; // [rsp+78h] [rbp-8h]
v12 = this;
v11 = a2;
if ( *a2 )
{
v10 = 0;
std::vector<lunasvg::Node>::vector(this);
v4 = lunasvg::Element::element(a2, 0);
v9 = lunasvg::SVGElement::children[abi:cxx11](v4);
v8 = std::list<std::unique_ptr<lunasvg::SVGNode>>::begin(v9);
v7 = std::list<std::unique_ptr<lunasvg::SVGNode>>::end(v9);
while ( (std::operator!=(&v8, &v7) & 1) != 0 )
{
v6 = std::_List_const_iterator<std::unique_ptr<lunasvg::SVGNode>>::operator*(&v8);
v2 = (lunasvg::SVGNode *)std::unique_ptr<lunasvg::SVGNode>::get(v6);
lunasvg::Node::Node((lunasvg::Node *)v5, v2);
std::vector<lunasvg::Node>::push_back(this, v5);
std::_List_const_iterator<std::unique_ptr<lunasvg::SVGNode>>::operator++(&v8);
}
v10 = 1;
}
else
{
memset(this, 0LL, 24LL);
std::vector<lunasvg::Node>::vector(this);
}
return this;
}
|
children:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV qword ptr [RBP + -0x68],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0x60],RAX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x58],RAX
CMP qword ptr [RAX],0x0
JNZ 0x0010dc0a
MOV RDI,qword ptr [RBP + -0x68]
XOR ESI,ESI
MOV EDX,0x18
CALL 0x0010b1d0
MOV RDI,qword ptr [RBP + -0x68]
CALL 0x0010e930
JMP 0x0010dcd8
LAB_0010dc0a:
MOV RDI,qword ptr [RBP + -0x68]
MOV byte ptr [RBP + -0x11],0x0
CALL 0x0010e930
MOV RDI,qword ptr [RBP + -0x58]
LAB_0010dc1b:
XOR ESI,ESI
CALL 0x0010d470
MOV qword ptr [RBP + -0x70],RAX
JMP 0x0010dc28
LAB_0010dc28:
MOV RDI,qword ptr [RBP + -0x70]
CALL 0x0010e950
MOV qword ptr [RBP + -0x78],RAX
JMP 0x0010dc37
LAB_0010dc37:
MOV RAX,qword ptr [RBP + -0x78]
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x0010e970
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x0010e9a0
MOV qword ptr [RBP + -0x40],RAX
LAB_0010dc59:
LEA RDI,[RBP + -0x38]
LEA RSI,[RBP + -0x40]
CALL 0x0010e9d0
TEST AL,0x1
JNZ 0x0010dc6c
JMP 0x0010dcc3
LAB_0010dc6c:
LEA RDI,[RBP + -0x38]
CALL 0x0010ea00
MOV qword ptr [RBP + -0x48],RAX
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x0010ea60
MOV RSI,RAX
LEA RDI,[RBP + -0x50]
CALL 0x0010d110
JMP 0x0010dc90
LAB_0010dc90:
MOV RDI,qword ptr [RBP + -0x68]
LEA RSI,[RBP + -0x50]
CALL 0x0010ea30
LAB_0010dc9d:
JMP 0x0010dc9f
LAB_0010dc9f:
JMP 0x0010dca1
LAB_0010dca1:
LEA RDI,[RBP + -0x38]
CALL 0x0010ea90
JMP 0x0010dc59
LAB_0010dcc3:
MOV byte ptr [RBP + -0x11],0x1
TEST byte ptr [RBP + -0x11],0x1
JNZ 0x0010dcd6
MOV RDI,qword ptr [RBP + -0x68]
CALL 0x0010eab0
LAB_0010dcd6:
JMP 0x0010dcd8
LAB_0010dcd8:
MOV RAX,qword ptr [RBP + -0x60]
ADD RSP,0x80
POP RBP
RET
|
/* WARNING: Removing unreachable block (ram,0x0010dccd) */
/* lunasvg::Element::children() const */
vector<lunasvg::Node,std::allocator<lunasvg::Node>> * lunasvg::Element::children(void)
{
SVGElement *this;
ulong uVar1;
SVGNode *pSVar2;
Element *in_RSI;
vector<lunasvg::Node,std::allocator<lunasvg::Node>> *in_RDI;
Node local_58 [8];
unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>> *local_50;
int8 local_48;
int8 local_40 [3];
list<std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>,std::allocator<std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>>>
*local_28;
int1 local_19;
if (*(long *)in_RSI == 0) {
memset(in_RDI,0,0x18);
std::vector<lunasvg::Node,std::allocator<lunasvg::Node>>::vector(in_RDI);
}
else {
local_19 = 0;
std::vector<lunasvg::Node,std::allocator<lunasvg::Node>>::vector(in_RDI);
/* try { // try from 0010dc1b to 0010dc9c has its CatchHandler @ 0010dcac */
this = (SVGElement *)element(in_RSI,false);
local_28 = (list<std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>,std::allocator<std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>>>
*)SVGElement::children_abi_cxx11_(this);
local_40[0] = std::__cxx11::
list<std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>,std::allocator<std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>>>
::begin(local_28);
local_48 = std::__cxx11::
list<std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>,std::allocator<std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>>>
::end(local_28);
while (uVar1 = std::operator!=((_List_const_iterator *)local_40,
(_List_const_iterator *)&local_48), (uVar1 & 1) != 0) {
local_50 = (unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>> *)
std::
_List_const_iterator<std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>>
::operator*((_List_const_iterator<std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>>
*)local_40);
pSVar2 = (SVGNode *)
std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>::get
(local_50);
Node::Node(local_58,pSVar2);
std::vector<lunasvg::Node,std::allocator<lunasvg::Node>>::push_back(in_RDI,local_58);
std::
_List_const_iterator<std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>>
::operator++((_List_const_iterator<std::unique_ptr<lunasvg::SVGNode,std::default_delete<lunasvg::SVGNode>>>
*)local_40);
}
}
return in_RDI;
}
|
|
7,666 |
lunasvg::Element::children() const
|
dmazzella[P]pylunasvg/lunasvg/source/lunasvg.cpp
|
NodeList Element::children() const
{
if(m_node == nullptr)
return NodeList();
NodeList children;
for(const auto& child : element()->children())
children.push_back(child.get());
return children;
}
|
O2
|
cpp
|
lunasvg::Element::children() const:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rsi), %r15
xorps %xmm0, %xmm0
testq %r15, %r15
je 0xb77d
andq $0x0, 0x10(%rbx)
movups %xmm0, (%rbx)
addq $0x58, %r15
movq %rsp, %r14
movq %r15, %r12
movq (%r12), %r12
cmpq %r15, %r12
je 0xb785
movq 0x10(%r12), %rsi
movq %r14, %rdi
callq 0xb13e
movq %rbx, %rdi
movq %r14, %rsi
callq 0xc070
jmp 0xb75a
movups %xmm0, (%rbx)
andq $0x0, 0x10(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0xc03c
movq %r14, %rdi
callq 0xa560
nop
|
_ZNK7lunasvg7Element8childrenEv:
push r15
push r14
push r12
push rbx
push rax
mov rbx, rdi
mov r15, [rsi]
xorps xmm0, xmm0
test r15, r15
jz short loc_B77D
and qword ptr [rbx+10h], 0
movups xmmword ptr [rbx], xmm0
add r15, 58h ; 'X'
mov r14, rsp
mov r12, r15
loc_B75A:
mov r12, [r12]
cmp r12, r15
jz short loc_B785
mov rsi, [r12+10h]
mov rdi, r14
call _ZN7lunasvg4NodeC2EPNS_7SVGNodeE; lunasvg::Node::Node(lunasvg::SVGNode *)
mov rdi, rbx
mov rsi, r14
call _ZNSt6vectorIN7lunasvg4NodeESaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<lunasvg::Node>::emplace_back<lunasvg::Node>(lunasvg::Node &&)
jmp short loc_B75A
loc_B77D:
movups xmmword ptr [rbx], xmm0
and qword ptr [rbx+10h], 0
loc_B785:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
mov r14, rax
mov rdi, rbx
call _ZNSt12_Vector_baseIN7lunasvg4NodeESaIS1_EED2Ev; std::_Vector_base<lunasvg::Node>::~_Vector_base()
mov rdi, r14
call __Unwind_Resume
|
lunasvg::Element * lunasvg::Element::children(lunasvg::Element *this, long long *a2)
{
long long v2; // rax
long long v3; // r15
long long **v4; // r15
long long **v5; // r12
_QWORD v7[5]; // [rsp-8h] [rbp-28h] BYREF
v7[0] = v2;
v3 = *a2;
if ( *a2 )
{
*((_QWORD *)this + 2) = 0LL;
*(_OWORD *)this = 0LL;
v4 = (long long **)(v3 + 88);
v5 = v4;
while ( 1 )
{
v5 = (long long **)*v5;
if ( v5 == v4 )
break;
lunasvg::Node::Node((lunasvg::Node *)v7, (lunasvg::SVGNode *)v5[2]);
std::vector<lunasvg::Node>::emplace_back<lunasvg::Node>(this, v7, 0.0);
}
}
else
{
*(_OWORD *)this = 0LL;
*((_QWORD *)this + 2) = 0LL;
}
return this;
}
|
children:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV R15,qword ptr [RSI]
XORPS XMM0,XMM0
TEST R15,R15
JZ 0x0010b77d
AND qword ptr [RBX + 0x10],0x0
MOVUPS xmmword ptr [RBX],XMM0
ADD R15,0x58
MOV R14,RSP
MOV R12,R15
LAB_0010b75a:
MOV R12,qword ptr [R12]
CMP R12,R15
JZ 0x0010b785
MOV RSI,qword ptr [R12 + 0x10]
LAB_0010b768:
MOV RDI,R14
CALL 0x0010b13e
MOV RDI,RBX
MOV RSI,R14
CALL 0x0010c070
LAB_0010b77b:
JMP 0x0010b75a
LAB_0010b77d:
MOVUPS xmmword ptr [RBX],XMM0
AND qword ptr [RBX + 0x10],0x0
LAB_0010b785:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* lunasvg::Element::children() const */
void lunasvg::Element::children(void)
{
long lVar1;
long *in_RSI;
vector<lunasvg::Node,std::allocator<lunasvg::Node>> *in_RDI;
long *plVar2;
long *plVar3;
Node aNStack_28 [8];
lVar1 = *in_RSI;
if (lVar1 == 0) {
*(int8 *)in_RDI = 0;
*(int8 *)(in_RDI + 8) = 0;
*(int8 *)(in_RDI + 0x10) = 0;
}
else {
*(int8 *)(in_RDI + 0x10) = 0;
*(int8 *)in_RDI = 0;
*(int8 *)(in_RDI + 8) = 0;
plVar3 = (long *)(lVar1 + 0x58);
plVar2 = plVar3;
while (plVar2 = (long *)*plVar2, plVar2 != plVar3) {
/* try { // try from 0010b768 to 0010b77a has its CatchHandler @ 0010b794 */
Node::Node(aNStack_28,(SVGNode *)plVar2[2]);
std::vector<lunasvg::Node,std::allocator<lunasvg::Node>>::emplace_back<lunasvg::Node>
(in_RDI,aNStack_28);
}
}
return;
}
|
|
7,667 |
fs_create_directory_with_parents(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
monkey531[P]llama/common/common.cpp
|
bool fs_create_directory_with_parents(const std::string & path) {
#ifdef _WIN32
std::wstring_convert<std::codecvt_utf8<wchar_t>> converter;
std::wstring wpath = converter.from_bytes(path);
// if the path already exists, check whether it's a directory
const DWORD attributes = GetFileAttributesW(wpath.c_str());
if ((attributes != INVALID_FILE_ATTRIBUTES) && (attributes & FILE_ATTRIBUTE_DIRECTORY)) {
return true;
}
size_t pos_slash = 0;
// process path from front to back, procedurally creating directories
while ((pos_slash = path.find('\\', pos_slash)) != std::string::npos) {
const std::wstring subpath = wpath.substr(0, pos_slash);
const wchar_t * test = subpath.c_str();
const bool success = CreateDirectoryW(test, NULL);
if (!success) {
const DWORD error = GetLastError();
// if the path already exists, ensure that it's a directory
if (error == ERROR_ALREADY_EXISTS) {
const DWORD attributes = GetFileAttributesW(subpath.c_str());
if (attributes == INVALID_FILE_ATTRIBUTES || !(attributes & FILE_ATTRIBUTE_DIRECTORY)) {
return false;
}
} else {
return false;
}
}
pos_slash += 1;
}
return true;
#else
// if the path already exists, check whether it's a directory
struct stat info;
if (stat(path.c_str(), &info) == 0) {
return S_ISDIR(info.st_mode);
}
size_t pos_slash = 1; // skip leading slashes for directory creation
// process path from front to back, procedurally creating directories
while ((pos_slash = path.find('/', pos_slash)) != std::string::npos) {
const std::string subpath = path.substr(0, pos_slash);
struct stat info;
// if the path already exists, ensure that it's a directory
if (stat(subpath.c_str(), &info) == 0) {
if (!S_ISDIR(info.st_mode)) {
return false;
}
} else {
// create parent directories
const int ret = mkdir(subpath.c_str(), 0755);
if (ret != 0) {
return false;
}
}
pos_slash += 1;
}
return true;
#endif // _WIN32
}
|
O1
|
cpp
|
fs_create_directory_with_parents(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 $0x148, %rsp # imm = 0x148
movq %rdi, %rbx
movq (%rdi), %rdi
leaq 0xb8(%rsp), %rsi
callq 0x196c0
testl %eax, %eax
je 0x4fed9
movl $0x1, %r14d
leaq 0x18(%rsp), %r13
leaq 0x8(%rsp), %r15
leaq 0x28(%rsp), %r12
movq %rbx, %rdi
movl $0x2f, %esi
movq %r14, %rdx
callq 0x199e0
movq %rax, %r14
cmpq $-0x1, %rax
sete %al
je 0x4feed
movq %r15, %rdi
movq %rbx, %rsi
xorl %edx, %edx
movq %r14, %rcx
callq 0x197f0
movq 0x8(%rsp), %rdi
movq %r12, %rsi
callq 0x196c0
testl %eax, %eax
je 0x4fe9d
movq 0x8(%rsp), %rdi
movl $0x1ed, %esi # imm = 0x1ED
callq 0x19390
testl %eax, %eax
je 0x4feaf
xorl %ebp, %ebp
jmp 0x4feb5
movl 0x40(%rsp), %eax
movl $0xf000, %ecx # imm = 0xF000
andl %ecx, %eax
cmpl $0x4000, %eax # imm = 0x4000
jne 0x4fe99
incq %r14
movb $0x1, %bpl
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x4fecc
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x197a0
testb %bpl, %bpl
jne 0x4fe45
xorl %eax, %eax
jmp 0x4feed
movl $0xf000, %eax # imm = 0xF000
andl 0xd0(%rsp), %eax
cmpl $0x4000, %eax # imm = 0x4000
sete %al
addq $0x148, %rsp # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
_Z32fs_create_directory_with_parentsRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 148h
mov rbx, rdi
mov rdi, [rdi]
lea rsi, [rsp+178h+var_C0]
call _stat
test eax, eax
jz loc_4FED9
mov r14d, 1
lea r13, [rsp+178h+var_160]
lea r15, [rsp+178h+var_170]
lea r12, [rsp+178h+var_150]
loc_4FE45:
mov rdi, rbx
mov esi, 2Fh ; '/'
mov rdx, r14
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong)
mov r14, rax
cmp rax, 0FFFFFFFFFFFFFFFFh
setz al
jz loc_4FEED
mov rdi, r15
mov rsi, rbx
xor edx, edx
mov rcx, r14
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
mov rdi, [rsp+178h+var_170]
mov rsi, r12
call _stat
test eax, eax
jz short loc_4FE9D
mov rdi, [rsp+178h+var_170]
mov esi, 1EDh
call _mkdir
test eax, eax
jz short loc_4FEAF
loc_4FE99:
xor ebp, ebp
jmp short loc_4FEB5
loc_4FE9D:
mov eax, [rsp+178h+var_138]
mov ecx, 0F000h
and eax, ecx
cmp eax, 4000h
jnz short loc_4FE99
loc_4FEAF:
inc r14
mov bpl, 1
loc_4FEB5:
mov rdi, [rsp+178h+var_170]; void *
cmp rdi, r13
jz short loc_4FECC
mov rsi, [rsp+178h+var_160]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4FECC:
test bpl, bpl
jnz loc_4FE45
xor eax, eax
jmp short loc_4FEED
loc_4FED9:
mov eax, 0F000h
and eax, [rsp+178h+var_A8]
cmp eax, 4000h
setz al
loc_4FEED:
add rsp, 148h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
bool fs_create_directory_with_parents(_QWORD *a1)
{
long long v1; // r14
bool result; // al
char v3; // bp
void *v4; // [rsp+8h] [rbp-170h] BYREF
long long v5; // [rsp+18h] [rbp-160h] BYREF
_BYTE v6[24]; // [rsp+28h] [rbp-150h] BYREF
int v7; // [rsp+40h] [rbp-138h]
_BYTE v8[24]; // [rsp+B8h] [rbp-C0h] BYREF
int v9; // [rsp+D0h] [rbp-A8h]
if ( (unsigned int)stat(*a1, v8) )
{
v1 = 1LL;
while ( 1 )
{
v1 = std::string::find(a1, 47LL, v1);
result = v1 == -1;
if ( v1 == -1 )
return result;
std::string::substr(&v4, a1, 0LL, v1);
if ( (unsigned int)stat(v4, v6) )
{
if ( !(unsigned int)mkdir(v4, 493LL) )
goto LABEL_8;
}
else if ( (v7 & 0xF000) == 0x4000 )
{
LABEL_8:
++v1;
v3 = 1;
goto LABEL_9;
}
v3 = 0;
LABEL_9:
if ( v4 != &v5 )
operator delete(v4, v5 + 1);
if ( !v3 )
return 0;
}
}
return (v9 & 0xF000) == 0x4000;
}
|
fs_create_directory_with_parents:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x148
MOV RBX,RDI
MOV RDI,qword ptr [RDI]
LEA RSI,[RSP + 0xb8]
CALL 0x001196c0
TEST EAX,EAX
JZ 0x0014fed9
MOV R14D,0x1
LEA R13,[RSP + 0x18]
LEA R15,[RSP + 0x8]
LEA R12,[RSP + 0x28]
LAB_0014fe45:
MOV RDI,RBX
MOV ESI,0x2f
MOV RDX,R14
CALL 0x001199e0
MOV R14,RAX
CMP RAX,-0x1
SETZ AL
JZ 0x0014feed
MOV RDI,R15
MOV RSI,RBX
XOR EDX,EDX
MOV RCX,R14
CALL 0x001197f0
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,R12
CALL 0x001196c0
TEST EAX,EAX
JZ 0x0014fe9d
MOV RDI,qword ptr [RSP + 0x8]
MOV ESI,0x1ed
CALL 0x00119390
TEST EAX,EAX
JZ 0x0014feaf
LAB_0014fe99:
XOR EBP,EBP
JMP 0x0014feb5
LAB_0014fe9d:
MOV EAX,dword ptr [RSP + 0x40]
MOV ECX,0xf000
AND EAX,ECX
CMP EAX,0x4000
JNZ 0x0014fe99
LAB_0014feaf:
INC R14
MOV BPL,0x1
LAB_0014feb5:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R13
JZ 0x0014fecc
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001197a0
LAB_0014fecc:
TEST BPL,BPL
JNZ 0x0014fe45
XOR EAX,EAX
JMP 0x0014feed
LAB_0014fed9:
MOV EAX,0xf000
AND EAX,dword ptr [RSP + 0xd0]
CMP EAX,0x4000
SETZ AL
LAB_0014feed:
ADD RSP,0x148
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* fs_create_directory_with_parents(std::__cxx11::string const&) */
bool fs_create_directory_with_parents(string *param_1)
{
int iVar1;
long lVar2;
bool bVar3;
long *local_170 [2];
long local_160 [2];
stat local_150;
stat local_c0;
iVar1 = stat(*(char **)param_1,&local_c0);
if (iVar1 == 0) {
bVar3 = (local_c0.st_mode & 0xf000) == 0x4000;
}
else {
do {
lVar2 = std::__cxx11::string::find((char)param_1,0x2f);
if (lVar2 == -1) {
return lVar2 == -1;
}
std::__cxx11::string::substr((ulong)local_170,(ulong)param_1);
iVar1 = stat((char *)local_170[0],&local_150);
if (iVar1 == 0) {
if ((local_150.st_mode & 0xf000) != 0x4000) goto LAB_0014fe99;
LAB_0014feaf:
bVar3 = true;
}
else {
iVar1 = mkdir((char *)local_170[0],0x1ed);
if (iVar1 == 0) goto LAB_0014feaf;
LAB_0014fe99:
bVar3 = false;
}
if (local_170[0] != local_160) {
operator_delete(local_170[0],local_160[0] + 1);
}
} while (bVar3);
bVar3 = false;
}
return bVar3;
}
|
|
7,668 |
ma_ft_store
|
eloqsql/storage/maria/ma_ft_update.c
|
static int _ma_ft_store(MARIA_HA *info, uint keynr, uchar *keybuf,
FT_WORD *wlist, my_off_t filepos)
{
DBUG_ENTER("_ma_ft_store");
for (; wlist->pos; wlist++)
{
MARIA_KEY key;
_ma_ft_make_key(info, &key, keynr, keybuf, wlist, filepos);
if (_ma_ck_write(info, &key))
DBUG_RETURN(1);
}
DBUG_RETURN(0);
}
|
O0
|
c
|
ma_ft_store:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x28(%rbp), %rax
cmpq $0x0, (%rax)
je 0x7909d
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %edx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
movq -0x30(%rbp), %r9
leaq -0x50(%rbp), %rsi
callq 0x78e30
movq -0x10(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x68330
cmpb $0x0, %al
je 0x7908d
jmp 0x79084
movl $0x1, -0x4(%rbp)
jmp 0x790a6
jmp 0x7908f
movq -0x28(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x28(%rbp)
jmp 0x7904b
jmp 0x7909f
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nop
|
_ma_ft_store:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
loc_7904B:
mov rax, [rbp+var_28]
cmp qword ptr [rax], 0
jz short loc_7909D
mov rdi, [rbp+var_10]
mov edx, [rbp+var_14]
mov rcx, [rbp+var_20]
mov r8, [rbp+var_28]
mov r9, [rbp+var_30]
lea rsi, [rbp+var_50]
call _ma_ft_make_key
mov rdi, [rbp+var_10]
lea rsi, [rbp+var_50]
call _ma_ck_write
cmp al, 0
jz short loc_7908D
jmp short $+2
loc_79084:
mov [rbp+var_4], 1
jmp short loc_790A6
loc_7908D:
jmp short $+2
loc_7908F:
mov rax, [rbp+var_28]
add rax, 18h
mov [rbp+var_28], rax
jmp short loc_7904B
loc_7909D:
jmp short $+2
loc_7909F:
mov [rbp+var_4], 0
loc_790A6:
mov eax, [rbp+var_4]
add rsp, 50h
pop rbp
retn
|
long long ma_ft_store(_DWORD *a1, unsigned int a2, _BYTE *a3, _QWORD *a4, long long a5)
{
_BYTE v6[32]; // [rsp+0h] [rbp-50h] BYREF
long long v7; // [rsp+20h] [rbp-30h]
_QWORD *v8; // [rsp+28h] [rbp-28h]
_BYTE *v9; // [rsp+30h] [rbp-20h]
unsigned int v10; // [rsp+3Ch] [rbp-14h]
_DWORD *v11; // [rsp+40h] [rbp-10h]
v11 = a1;
v10 = a2;
v9 = a3;
v8 = a4;
v7 = a5;
while ( *v8 )
{
ma_ft_make_key(v11, (long long)v6, v10, v9, (long long)v8, v7);
if ( ma_ck_write((long long)v11, (long long)v6) )
return 1;
v8 += 3;
}
return 0;
}
|
_ma_ft_store:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
LAB_0017904b:
MOV RAX,qword ptr [RBP + -0x28]
CMP qword ptr [RAX],0x0
JZ 0x0017909d
MOV RDI,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x14]
MOV RCX,qword ptr [RBP + -0x20]
MOV R8,qword ptr [RBP + -0x28]
MOV R9,qword ptr [RBP + -0x30]
LEA RSI,[RBP + -0x50]
CALL 0x00178e30
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[RBP + -0x50]
CALL 0x00168330
CMP AL,0x0
JZ 0x0017908d
JMP 0x00179084
LAB_00179084:
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001790a6
LAB_0017908d:
JMP 0x0017908f
LAB_0017908f:
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x18
MOV qword ptr [RBP + -0x28],RAX
JMP 0x0017904b
LAB_0017909d:
JMP 0x0017909f
LAB_0017909f:
MOV dword ptr [RBP + -0x4],0x0
LAB_001790a6:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x50
POP RBP
RET
|
int4
_ma_ft_store(int8 param_1,int4 param_2,int8 param_3,long *param_4,
int8 param_5)
{
char cVar1;
int1 local_58 [32];
int8 local_38;
long *local_30;
int8 local_28;
int4 local_1c;
int8 local_18;
local_38 = param_5;
local_30 = param_4;
local_28 = param_3;
local_1c = param_2;
local_18 = param_1;
while( true ) {
if (*local_30 == 0) {
return 0;
}
_ma_ft_make_key(local_18,local_58,local_1c,local_28,local_30,local_38);
cVar1 = _ma_ck_write(local_18,local_58);
if (cVar1 != '\0') break;
local_30 = local_30 + 3;
}
return 1;
}
|
|
7,669 |
ggml_diag_mask_inf_impl
|
7CodeWizard[P]stablediffusion/ggml/src/ggml.c
|
static struct ggml_tensor * ggml_diag_mask_inf_impl(
struct ggml_context * ctx,
struct ggml_tensor * a,
int n_past,
bool inplace) {
bool is_node = false;
if (a->grad) {
is_node = true;
}
struct ggml_tensor * result = inplace ? ggml_view_tensor(ctx, a) : ggml_dup_tensor(ctx, a);
int32_t params[] = { n_past };
ggml_set_op_params(result, params, sizeof(params));
result->op = GGML_OP_DIAG_MASK_INF;
result->grad = is_node ? ggml_dup_tensor(ctx, result) : NULL;
result->src[0] = a;
return result;
}
|
O2
|
c
|
ggml_diag_mask_inf_impl:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x98(%rsi), %r12
testl %ecx, %ecx
je 0x6ca2f
callq 0x69922
jmp 0x6ca34
callq 0x68a65
movq %rax, %r15
leaq 0xc(%rsp), %rsi
movl %ebp, (%rsi)
pushq $0x4
popq %rdx
movq %rax, %rdi
callq 0x6ab3d
movl $0x25, 0x50(%r15)
testq %r12, %r12
je 0x6ca63
movq %r14, %rdi
movq %r15, %rsi
callq 0x68a65
jmp 0x6ca65
xorl %eax, %eax
movq %rax, 0x98(%r15)
movq %rbx, 0xa0(%r15)
movq %r15, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
ggml_diag_mask_inf_impl:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 10h
mov ebp, edx
mov rbx, rsi
mov r14, rdi
mov r12, [rsi+98h]
test ecx, ecx
jz short loc_6CA2F
call ggml_view_tensor
jmp short loc_6CA34
loc_6CA2F:
call ggml_dup_tensor
loc_6CA34:
mov r15, rax
lea rsi, [rsp+38h+var_2C]
mov [rsi], ebp
push 4
pop rdx
mov rdi, rax
call ggml_set_op_params
mov dword ptr [r15+50h], 25h ; '%'
test r12, r12
jz short loc_6CA63
mov rdi, r14
mov rsi, r15
call ggml_dup_tensor
jmp short loc_6CA65
loc_6CA63:
xor eax, eax
loc_6CA65:
mov [r15+98h], rax
mov [r15+0A0h], rbx
mov rax, r15
add rsp, 10h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
long long ggml_diag_mask_inf_impl(
long long a1,
long long a2,
int a3,
int a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
double a9,
double a10,
__m128 a11,
__m128 a12)
{
long long v13; // r12
long long v14; // rax
long long v15; // r15
long long v16; // rax
int v18[11]; // [rsp+Ch] [rbp-2Ch] BYREF
v13 = *(_QWORD *)(a2 + 152);
if ( a4 )
v14 = ggml_view_tensor(a1, a2, a5, a6, a7, a8, a9, a10, a11, a12);
else
v14 = ggml_dup_tensor(a1, (unsigned int *)a2);
v15 = v14;
v18[0] = a3;
ggml_set_op_params(v14, (long long)v18, 4LL);
*(_DWORD *)(v15 + 80) = 37;
if ( v13 )
v16 = ggml_dup_tensor(a1, (unsigned int *)v15);
else
v16 = 0LL;
*(_QWORD *)(v15 + 152) = v16;
*(_QWORD *)(v15 + 160) = a2;
return v15;
}
|
ggml_diag_mask_inf_impl:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV EBP,EDX
MOV RBX,RSI
MOV R14,RDI
MOV R12,qword ptr [RSI + 0x98]
TEST ECX,ECX
JZ 0x0016ca2f
CALL 0x00169922
JMP 0x0016ca34
LAB_0016ca2f:
CALL 0x00168a65
LAB_0016ca34:
MOV R15,RAX
LEA RSI,[RSP + 0xc]
MOV dword ptr [RSI],EBP
PUSH 0x4
POP RDX
MOV RDI,RAX
CALL 0x0016ab3d
MOV dword ptr [R15 + 0x50],0x25
TEST R12,R12
JZ 0x0016ca63
MOV RDI,R14
MOV RSI,R15
CALL 0x00168a65
JMP 0x0016ca65
LAB_0016ca63:
XOR EAX,EAX
LAB_0016ca65:
MOV qword ptr [R15 + 0x98],RAX
MOV qword ptr [R15 + 0xa0],RBX
MOV RAX,R15
ADD RSP,0x10
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
long ggml_diag_mask_inf_impl(int8 param_1,long param_2,int4 param_3,int param_4)
{
long lVar1;
long lVar2;
int8 uVar3;
int4 local_2c;
lVar1 = *(long *)(param_2 + 0x98);
if (param_4 == 0) {
lVar2 = ggml_dup_tensor();
}
else {
lVar2 = ggml_view_tensor();
}
local_2c = param_3;
ggml_set_op_params(lVar2,&local_2c,4);
*(int4 *)(lVar2 + 0x50) = 0x25;
if (lVar1 == 0) {
uVar3 = 0;
}
else {
uVar3 = ggml_dup_tensor(param_1,lVar2);
}
*(int8 *)(lVar2 + 0x98) = uVar3;
*(long *)(lVar2 + 0xa0) = param_2;
return lVar2;
}
|
|
7,670 |
ggml_diag_mask_inf_impl
|
7CodeWizard[P]stablediffusion/ggml/src/ggml.c
|
static struct ggml_tensor * ggml_diag_mask_inf_impl(
struct ggml_context * ctx,
struct ggml_tensor * a,
int n_past,
bool inplace) {
bool is_node = false;
if (a->grad) {
is_node = true;
}
struct ggml_tensor * result = inplace ? ggml_view_tensor(ctx, a) : ggml_dup_tensor(ctx, a);
int32_t params[] = { n_past };
ggml_set_op_params(result, params, sizeof(params));
result->op = GGML_OP_DIAG_MASK_INF;
result->grad = is_node ? ggml_dup_tensor(ctx, result) : NULL;
result->src[0] = a;
return result;
}
|
O3
|
c
|
ggml_diag_mask_inf_impl:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x98(%rsi), %r12
testl %ecx, %ecx
je 0x926e2
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8f880
jmp 0x926fb
movl (%rbx), %esi
leaq 0x10(%rbx), %rcx
movq %r14, %rdi
movl $0x4, %edx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x8d64f
movq %rax, %r15
leaq 0xc(%rsp), %rsi
movl %ebp, (%rsi)
movl $0x4, %edx
movq %rax, %rdi
callq 0x90cc8
movl $0x25, 0x50(%r15)
testq %r12, %r12
je 0x9273b
movl (%r15), %esi
leaq 0x10(%r15), %rcx
movq %r14, %rdi
movl $0x4, %edx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x8d64f
jmp 0x9273d
xorl %eax, %eax
movq %rax, 0x98(%r15)
movq %rbx, 0xa0(%r15)
movq %r15, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
ggml_diag_mask_inf_impl:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 10h
mov ebp, edx
mov rbx, rsi
mov r14, rdi
mov r12, [rsi+98h]
test ecx, ecx
jz short loc_926E2
mov rdi, r14
mov rsi, rbx
call ggml_view_tensor
jmp short loc_926FB
loc_926E2:
mov esi, [rbx]
lea rcx, [rbx+10h]
mov rdi, r14
mov edx, 4
xor r8d, r8d
xor r9d, r9d
call ggml_new_tensor_impl
loc_926FB:
mov r15, rax
lea rsi, [rsp+38h+var_2C]
mov [rsi], ebp
mov edx, 4
mov rdi, rax
call ggml_set_op_params
mov dword ptr [r15+50h], 25h ; '%'
test r12, r12
jz short loc_9273B
mov esi, [r15]
lea rcx, [r15+10h]
mov rdi, r14
mov edx, 4
xor r8d, r8d
xor r9d, r9d
call ggml_new_tensor_impl
jmp short loc_9273D
loc_9273B:
xor eax, eax
loc_9273D:
mov [r15+98h], rax
mov [r15+0A0h], rbx
mov rax, r15
add rsp, 10h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
long long ggml_diag_mask_inf_impl(
long long a1,
long long a2,
int a3,
int a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
double a9,
double a10,
__m128 a11,
__m128 a12)
{
long long v13; // r12
long long v14; // rax
long long v15; // r15
long long v16; // rax
int v18[11]; // [rsp+Ch] [rbp-2Ch] BYREF
v13 = *(_QWORD *)(a2 + 152);
if ( a4 )
v14 = ggml_view_tensor(a1, a2, a5, a6, a7, a8, a9, a10, a11, a12);
else
v14 = ggml_new_tensor_impl(a1, *(_DWORD *)a2, 4, (_QWORD *)(a2 + 16), 0LL, 0LL, a5, a6);
v15 = v14;
v18[0] = a3;
ggml_set_op_params(v14, (long long)v18, 4LL);
*(_DWORD *)(v15 + 80) = 37;
if ( v13 )
v16 = ggml_new_tensor_impl(a1, *(_DWORD *)v15, 4, (_QWORD *)(v15 + 16), 0LL, 0LL, a5, a6);
else
v16 = 0LL;
*(_QWORD *)(v15 + 152) = v16;
*(_QWORD *)(v15 + 160) = a2;
return v15;
}
| |||
7,671 |
MyCTX_gcm::init(evp_cipher_st const*, int, unsigned char const*, unsigned int, unsigned char const*, unsigned int)
|
eloqsql/mysys_ssl/my_crypt.cc
|
int init(const EVP_CIPHER *cipher, int encrypt, const uchar *key, uint klen,
const uchar *iv, uint ivlen)
{
compile_time_assert(MY_AES_CTX_SIZE >= sizeof(MyCTX_gcm));
int res= MyCTX::init(cipher, encrypt, key, klen, iv, ivlen);
int real_ivlen= EVP_CIPHER_CTX_iv_length(ctx);
aad= iv + real_ivlen;
aadlen= ivlen - real_ivlen;
return res;
}
|
O3
|
cpp
|
MyCTX_gcm::init(evp_cipher_st const*, int, unsigned char const*, unsigned int, unsigned char const*, unsigned int):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r14
movq %rdi, %rbx
movl 0x10(%rbp), %r12d
testq %rsi, %rsi
je 0x2f94b
movl %edx, %r9d
movq 0xc8(%rbx), %rdi
xorl %r13d, %r13d
xorl %edx, %edx
movq %r14, %r8
callq 0x2a720
cmpl $0x1, %eax
pushq $-0x65
popq %r15
cmovel %r13d, %r15d
movq 0xc8(%rbx), %rdi
callq 0x2a380
cltq
addq %rax, %r14
movq %r14, 0xd0(%rbx)
subl %eax, %r12d
movl %r12d, 0xd8(%rbx)
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $-0x66
popq %r15
jmp 0x2f917
nop
|
_ZN9MyCTX_gcm4initEPK13evp_cipher_stiPKhjS4_j:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, r9
mov rbx, rdi
mov r12d, [rbp+arg_0]
test rsi, rsi
jz short loc_2F94B
mov r9d, edx
mov rdi, [rbx+0C8h]
xor r13d, r13d
xor edx, edx
mov r8, r14
call _EVP_CipherInit_ex
cmp eax, 1
push 0FFFFFFFFFFFFFF9Bh
pop r15
cmovz r15d, r13d
loc_2F917:
mov rdi, [rbx+0C8h]
call _EVP_CIPHER_CTX_get_iv_length
cdqe
add r14, rax
mov [rbx+0D0h], r14
sub r12d, eax
mov [rbx+0D8h], r12d
mov eax, r15d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_2F94B:
push 0FFFFFFFFFFFFFF9Ah
pop r15
jmp short loc_2F917
|
long long MyCTX_gcm::init(long long a1, long long a2, unsigned int a3, long long a4, long long a5, long long a6, int a7)
{
long long v7; // rax
unsigned int v9; // r15d
int iv_length; // eax
if ( a2 )
{
v9 = -101;
if ( (unsigned int)EVP_CipherInit_ex(*(_QWORD *)(a1 + 200), a2, 0LL, a4, a6, a3, v7) == 1 )
v9 = 0;
}
else
{
v9 = -102;
}
iv_length = EVP_CIPHER_CTX_get_iv_length(*(_QWORD *)(a1 + 200));
*(_QWORD *)(a1 + 208) = iv_length + a6;
*(_DWORD *)(a1 + 216) = a7 - iv_length;
return v9;
}
|
init:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,R9
MOV RBX,RDI
MOV R12D,dword ptr [RBP + 0x10]
TEST RSI,RSI
JZ 0x0012f94b
MOV R9D,EDX
MOV RDI,qword ptr [RBX + 0xc8]
XOR R13D,R13D
XOR EDX,EDX
MOV R8,R14
CALL 0x0012a720
CMP EAX,0x1
PUSH -0x65
POP R15
CMOVZ R15D,R13D
LAB_0012f917:
MOV RDI,qword ptr [RBX + 0xc8]
CALL 0x0012a380
CDQE
ADD R14,RAX
MOV qword ptr [RBX + 0xd0],R14
SUB R12D,EAX
MOV dword ptr [RBX + 0xd8],R12D
MOV EAX,R15D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0012f94b:
PUSH -0x66
POP R15
JMP 0x0012f917
|
/* MyCTX_gcm::init(evp_cipher_st const*, int, unsigned char const*, unsigned int, unsigned char
const*, unsigned int) */
int4 __thiscall
MyCTX_gcm::init(MyCTX_gcm *this,evp_cipher_st *param_1,int param_2,uchar *param_3,uint param_4,
uchar *param_5,uint param_6)
{
int iVar1;
int4 uVar2;
if (param_1 == (evp_cipher_st *)0x0) {
uVar2 = 0xffffff9a;
}
else {
iVar1 = EVP_CipherInit_ex(*(EVP_CIPHER_CTX **)(this + 200),param_1,(ENGINE *)0x0,param_3,param_5
,param_2);
uVar2 = 0xffffff9b;
if (iVar1 == 1) {
uVar2 = 0;
}
}
iVar1 = EVP_CIPHER_CTX_get_iv_length(*(int8 *)(this + 200));
*(uchar **)(this + 0xd0) = param_5 + iVar1;
*(uint *)(this + 0xd8) = param_6 - iVar1;
return uVar2;
}
|
|
7,672 |
dummy_fallback_auth_client
|
eloqsql/libmariadb/plugins/auth/my_auth.c
|
static int dummy_fallback_auth_client(MYSQL_PLUGIN_VIO *vio, MYSQL *mysql __attribute__((unused)))
{
char last_error[MYSQL_ERRMSG_SIZE];
unsigned int i, last_errno= ((MCPVIO_EXT *)vio)->mysql->net.last_errno;
if (last_errno)
{
strncpy(last_error, ((MCPVIO_EXT *)vio)->mysql->net.last_error,
sizeof(last_error) - 1);
last_error[sizeof(last_error) - 1]= 0;
}
/* safety-wise we only do 10 round-trips */
for (i=0; i < 10; i++)
{
uchar *pkt;
if (vio->read_packet(vio, &pkt) < 0)
break;
if (vio->write_packet(vio, 0, 0))
break;
}
if (last_errno)
{
MYSQL *mysql= ((MCPVIO_EXT *)vio)->mysql;
strncpy(mysql->net.last_error, last_error,
sizeof(mysql->net.last_error) - 1);
mysql->net.last_error[sizeof(mysql->net.last_error) - 1]= 0;
}
return CR_ERROR;
}
|
O0
|
c
|
dummy_fallback_auth_client:
pushq %rbp
movq %rsp, %rbp
subq $0x240, %rsp # imm = 0x240
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x218(%rbp)
movq %rsi, -0x220(%rbp)
movq -0x218(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x90(%rax), %eax
movl %eax, -0x228(%rbp)
cmpl $0x0, -0x228(%rbp)
je 0x3f84d
leaq -0x210(%rbp), %rdi
movq -0x218(%rbp), %rax
movq 0x18(%rax), %rsi
addq $0x97, %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x13210
movb $0x0, -0x11(%rbp)
movl $0x0, -0x224(%rbp)
cmpl $0xa, -0x224(%rbp)
jae 0x3f8b5
movq -0x218(%rbp), %rax
movq (%rax), %rax
movq -0x218(%rbp), %rdi
leaq -0x230(%rbp), %rsi
callq *%rax
cmpl $0x0, %eax
jge 0x3f881
jmp 0x3f8b5
movq -0x218(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x218(%rbp), %rdi
xorl %ecx, %ecx
movl %ecx, %esi
xorl %edx, %edx
callq *%rax
cmpl $0x0, %eax
je 0x3f8a2
jmp 0x3f8b5
jmp 0x3f8a4
movl -0x224(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x224(%rbp)
jmp 0x3f857
cmpl $0x0, -0x228(%rbp)
je 0x3f8fd
movq -0x218(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x238(%rbp)
movq -0x238(%rbp), %rdi
addq $0x97, %rdi
leaq -0x210(%rbp), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x13210
movq -0x238(%rbp), %rax
movb $0x0, 0x296(%rax)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x3f91a
xorl %eax, %eax
addq $0x240, %rsp # imm = 0x240
popq %rbp
retq
callq 0x134b0
nop
|
dummy_fallback_auth_client:
push rbp
mov rbp, rsp
sub rsp, 240h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_218], rdi
mov [rbp+var_220], rsi
mov rax, [rbp+var_218]
mov rax, [rax+18h]
mov eax, [rax+90h]
mov [rbp+var_228], eax
cmp [rbp+var_228], 0
jz short loc_3F84D
lea rdi, [rbp+var_210]
mov rax, [rbp+var_218]
mov rsi, [rax+18h]
add rsi, 97h
mov edx, 1FFh
call _strncpy
mov [rbp+var_11], 0
loc_3F84D:
mov [rbp+var_224], 0
loc_3F857:
cmp [rbp+var_224], 0Ah
jnb short loc_3F8B5
mov rax, [rbp+var_218]
mov rax, [rax]
mov rdi, [rbp+var_218]
lea rsi, [rbp+var_230]
call rax
cmp eax, 0
jge short loc_3F881
jmp short loc_3F8B5
loc_3F881:
mov rax, [rbp+var_218]
mov rax, [rax+8]
mov rdi, [rbp+var_218]
xor ecx, ecx
mov esi, ecx
xor edx, edx
call rax
cmp eax, 0
jz short loc_3F8A2
jmp short loc_3F8B5
loc_3F8A2:
jmp short $+2
loc_3F8A4:
mov eax, [rbp+var_224]
add eax, 1
mov [rbp+var_224], eax
jmp short loc_3F857
loc_3F8B5:
cmp [rbp+var_228], 0
jz short loc_3F8FD
mov rax, [rbp+var_218]
mov rax, [rax+18h]
mov [rbp+var_238], rax
mov rdi, [rbp+var_238]
add rdi, 97h
lea rsi, [rbp+var_210]
mov edx, 1FFh
call _strncpy
mov rax, [rbp+var_238]
mov byte ptr [rax+296h], 0
loc_3F8FD:
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_3F91A
xor eax, eax
add rsp, 240h
pop rbp
retn
loc_3F91A:
call ___stack_chk_fail
|
long long dummy_fallback_auth_client(long long a1, long long a2)
{
long long v3; // [rsp+8h] [rbp-238h]
_BYTE v4[8]; // [rsp+10h] [rbp-230h] BYREF
int v5; // [rsp+18h] [rbp-228h]
unsigned int i; // [rsp+1Ch] [rbp-224h]
long long v7; // [rsp+20h] [rbp-220h]
long long v8; // [rsp+28h] [rbp-218h]
_BYTE v9[520]; // [rsp+30h] [rbp-210h] BYREF
unsigned long long v10; // [rsp+238h] [rbp-8h]
v10 = __readfsqword(0x28u);
v8 = a1;
v7 = a2;
v5 = *(_DWORD *)(*(_QWORD *)(a1 + 24) + 144LL);
if ( v5 )
{
strncpy(v9, *(_QWORD *)(v8 + 24) + 151LL, 511LL);
v9[511] = 0;
}
for ( i = 0;
i < 0xA
&& (*(int ( **)(long long, _BYTE *))v8)(v8, v4) >= 0
&& !(*(unsigned int ( **)(long long, _QWORD, _QWORD))(v8 + 8))(v8, 0LL, 0LL);
++i )
{
;
}
if ( v5 )
{
v3 = *(_QWORD *)(v8 + 24);
strncpy(v3 + 151, v9, 511LL);
*(_BYTE *)(v3 + 662) = 0;
}
return 0LL;
}
|
dummy_fallback_auth_client:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x240
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x218],RDI
MOV qword ptr [RBP + -0x220],RSI
MOV RAX,qword ptr [RBP + -0x218]
MOV RAX,qword ptr [RAX + 0x18]
MOV EAX,dword ptr [RAX + 0x90]
MOV dword ptr [RBP + -0x228],EAX
CMP dword ptr [RBP + -0x228],0x0
JZ 0x0013f84d
LEA RDI,[RBP + -0x210]
MOV RAX,qword ptr [RBP + -0x218]
MOV RSI,qword ptr [RAX + 0x18]
ADD RSI,0x97
MOV EDX,0x1ff
CALL 0x00113210
MOV byte ptr [RBP + -0x11],0x0
LAB_0013f84d:
MOV dword ptr [RBP + -0x224],0x0
LAB_0013f857:
CMP dword ptr [RBP + -0x224],0xa
JNC 0x0013f8b5
MOV RAX,qword ptr [RBP + -0x218]
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RBP + -0x218]
LEA RSI,[RBP + -0x230]
CALL RAX
CMP EAX,0x0
JGE 0x0013f881
JMP 0x0013f8b5
LAB_0013f881:
MOV RAX,qword ptr [RBP + -0x218]
MOV RAX,qword ptr [RAX + 0x8]
MOV RDI,qword ptr [RBP + -0x218]
XOR ECX,ECX
MOV ESI,ECX
XOR EDX,EDX
CALL RAX
CMP EAX,0x0
JZ 0x0013f8a2
JMP 0x0013f8b5
LAB_0013f8a2:
JMP 0x0013f8a4
LAB_0013f8a4:
MOV EAX,dword ptr [RBP + -0x224]
ADD EAX,0x1
MOV dword ptr [RBP + -0x224],EAX
JMP 0x0013f857
LAB_0013f8b5:
CMP dword ptr [RBP + -0x228],0x0
JZ 0x0013f8fd
MOV RAX,qword ptr [RBP + -0x218]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x238],RAX
MOV RDI,qword ptr [RBP + -0x238]
ADD RDI,0x97
LEA RSI,[RBP + -0x210]
MOV EDX,0x1ff
CALL 0x00113210
MOV RAX,qword ptr [RBP + -0x238]
MOV byte ptr [RAX + 0x296],0x0
LAB_0013f8fd:
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0013f91a
XOR EAX,EAX
ADD RSP,0x240
POP RBP
RET
LAB_0013f91a:
CALL 0x001134b0
|
int8 dummy_fallback_auth_client(int8 *param_1,int8 param_2)
{
long lVar1;
int iVar2;
long in_FS_OFFSET;
int1 local_238 [8];
int local_230;
uint local_22c;
int8 local_228;
int8 *local_220;
char local_218 [511];
int1 local_19;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_230 = *(int *)(param_1[3] + 0x90);
local_228 = param_2;
local_220 = param_1;
if (local_230 != 0) {
strncpy(local_218,(char *)(param_1[3] + 0x97),0x1ff);
local_19 = 0;
}
local_22c = 0;
while (((local_22c < 10 && (iVar2 = (*(code *)*local_220)(local_220,local_238), -1 < iVar2)) &&
(iVar2 = (*(code *)local_220[1])(local_220,0,0), iVar2 == 0))) {
local_22c = local_22c + 1;
}
if (local_230 != 0) {
lVar1 = local_220[3];
strncpy((char *)(lVar1 + 0x97),local_218,0x1ff);
*(int1 *)(lVar1 + 0x296) = 0;
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return 0;
}
|
|
7,673 |
maria_rtree_find_first
|
eloqsql/storage/maria/ma_rt_index.c
|
int maria_rtree_find_first(MARIA_HA *info, MARIA_KEY *key, uint32 search_flag)
{
my_off_t root;
uint nod_cmp_flag;
MARIA_KEYDEF *keyinfo= key->keyinfo;
/*
At the moment index can only properly handle the
MBR_INTERSECT, so we use it for all sorts of queries.
TODO: better searsh for CONTAINS/WITHIN.
*/
search_flag= nod_cmp_flag= MBR_INTERSECT;
if ((root= info->s->state.key_root[keyinfo->key_nr]) == HA_OFFSET_ERROR)
{
my_errno= HA_ERR_END_OF_FILE;
return -1;
}
/*
Save searched key, include data pointer.
The data pointer is required if the search_flag contains MBR_DATA.
(minimum bounding rectangle)
*/
memcpy(info->first_mbr_key, key->data, key->data_length + key->ref_length);
info->last_rkey_length= key->data_length;
info->maria_rtree_recursion_depth= -1;
info->keyread_buff_used= 1;
/*
TODO better search for CONTAINS/WITHIN.
nod_cmp_flag= ((search_flag & (MBR_EQUAL | MBR_WITHIN)) ?
MBR_WITHIN : MBR_INTERSECT);
*/
return maria_rtree_find_req(info, keyinfo, search_flag, nod_cmp_flag, root,
0);
}
|
O3
|
c
|
maria_rtree_find_first:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x8(%rsi), %rbx
movq (%rdi), %rax
movq 0x118(%rax), %rax
movzbl 0xa5(%rbx), %ecx
movq (%rax,%rcx,8), %r12
cmpq $-0x1, %r12
je 0x6ad62
movq %rsi, %r15
movq %rdi, %r14
movq 0x398(%rdi), %rdi
movq (%rsi), %rsi
movl 0x14(%r15), %edx
addl 0x10(%r15), %edx
callq 0x29080
movl 0x10(%r15), %eax
movl %eax, 0x630(%r14)
movl $0xffffffff, 0x6f0(%r14) # imm = 0xFFFFFFFF
movb $0x1, 0x685(%r14)
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x6ad7b
callq 0xa1a0a
movl $0x89, (%rax)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
maria_rtree_find_first:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov rbx, [rsi+8]
mov rax, [rdi]
mov rax, [rax+118h]
movzx ecx, byte ptr [rbx+0A5h]
mov r12, [rax+rcx*8]
cmp r12, 0FFFFFFFFFFFFFFFFh
jz short loc_6AD62
mov r15, rsi
mov r14, rdi
mov rdi, [rdi+398h]
mov rsi, [rsi]
mov edx, [r15+14h]
add edx, [r15+10h]
call _memcpy
mov eax, [r15+10h]
mov [r14+630h], eax
mov dword ptr [r14+6F0h], 0FFFFFFFFh
mov byte ptr [r14+685h], 1
mov rdi, r14
mov rsi, rbx
mov rdx, r12
xor ecx, ecx
pop rbx
pop r12
pop r14
pop r15
pop rbp
jmp short maria_rtree_find_req
loc_6AD62:
call _my_thread_var
mov dword ptr [rax], 89h
mov eax, 0FFFFFFFFh
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
long long maria_rtree_find_first(long long a1, const char *a2)
{
long long v2; // rbx
long long v3; // r12
v2 = *((_QWORD *)a2 + 1);
v3 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 280LL) + 8LL * *(unsigned __int8 *)(v2 + 165));
if ( v3 == -1 )
{
*(_DWORD *)my_thread_var(a1, a2) = 137;
return 0xFFFFFFFFLL;
}
else
{
memcpy(*(_QWORD *)(a1 + 920), *(_QWORD *)a2, (unsigned int)(*((_DWORD *)a2 + 4) + *((_DWORD *)a2 + 5)));
*(_DWORD *)(a1 + 1584) = *((_DWORD *)a2 + 4);
*(_DWORD *)(a1 + 1776) = -1;
*(_BYTE *)(a1 + 1669) = 1;
return maria_rtree_find_req(a1, v2, v3, 0LL);
}
}
|
maria_rtree_find_first:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,qword ptr [RSI + 0x8]
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0x118]
MOVZX ECX,byte ptr [RBX + 0xa5]
MOV R12,qword ptr [RAX + RCX*0x8]
CMP R12,-0x1
JZ 0x0016ad62
MOV R15,RSI
MOV R14,RDI
MOV RDI,qword ptr [RDI + 0x398]
MOV RSI,qword ptr [RSI]
MOV EDX,dword ptr [R15 + 0x14]
ADD EDX,dword ptr [R15 + 0x10]
CALL 0x00129080
MOV EAX,dword ptr [R15 + 0x10]
MOV dword ptr [R14 + 0x630],EAX
MOV dword ptr [R14 + 0x6f0],0xffffffff
MOV byte ptr [R14 + 0x685],0x1
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R12
XOR ECX,ECX
POP RBX
POP R12
POP R14
POP R15
POP RBP
JMP 0x0016ad7b
LAB_0016ad62:
CALL 0x001a1a0a
MOV dword ptr [RAX],0x89
MOV EAX,0xffffffff
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
int8 maria_rtree_find_first(long *param_1,int8 *param_2)
{
long lVar1;
long lVar2;
int8 uVar3;
int4 *puVar4;
lVar1 = param_2[1];
lVar2 = *(long *)(*(long *)(*param_1 + 0x118) + (ulong)*(byte *)(lVar1 + 0xa5) * 8);
if (lVar2 != -1) {
memcpy((void *)param_1[0x73],(void *)*param_2,
(ulong)(uint)(*(int *)((long)param_2 + 0x14) + *(int *)(param_2 + 2)));
*(int4 *)(param_1 + 0xc6) = *(int4 *)(param_2 + 2);
*(int4 *)(param_1 + 0xde) = 0xffffffff;
*(int1 *)((long)param_1 + 0x685) = 1;
uVar3 = maria_rtree_find_req(param_1,lVar1,lVar2,0);
return uVar3;
}
puVar4 = (int4 *)_my_thread_var();
*puVar4 = 0x89;
return 0xffffffff;
}
|
|
7,674 |
ma_set_trn_for_table
|
eloqsql/storage/maria/ma_trnman.h
|
static inline void _ma_set_trn_for_table(MARIA_HA *tbl, TRN *newtrn)
{
DBUG_PRINT("info",("table: %p trn: %p -> %p",
tbl, tbl->trn, newtrn));
/* check that we are not calling this twice in a row */
DBUG_ASSERT(newtrn->used_instances != (void*) tbl);
tbl->trn= newtrn;
/* Link into used list */
if (newtrn->used_instances)
((MARIA_HA*) newtrn->used_instances)->trn_prev= &tbl->trn_next;
tbl->trn_next= (MARIA_HA*) newtrn->used_instances;
tbl->trn_prev= (MARIA_HA**) &newtrn->used_instances;
newtrn->used_instances= tbl;
}
|
O0
|
c
|
ma_set_trn_for_table:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
jmp 0x9f1ce
jmp 0x9f1d0
jmp 0x9f1d2
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0x9f1fd
movq -0x8(%rbp), %rcx
addq $0x10, %rcx
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rcx
addq $0x60, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x60(%rax)
popq %rbp
retq
nopl (%rax,%rax)
|
_ma_set_trn_for_table:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
jmp short $+2
loc_9F1CE:
jmp short $+2
loc_9F1D0:
jmp short $+2
loc_9F1D2:
mov rcx, [rbp+var_10]
mov rax, [rbp+var_8]
mov [rax+8], rcx
mov rax, [rbp+var_10]
cmp qword ptr [rax+60h], 0
jz short loc_9F1FD
mov rcx, [rbp+var_8]
add rcx, 10h
mov rax, [rbp+var_10]
mov rax, [rax+60h]
mov [rax+18h], rcx
loc_9F1FD:
mov rax, [rbp+var_10]
mov rcx, [rax+60h]
mov rax, [rbp+var_8]
mov [rax+10h], rcx
mov rcx, [rbp+var_10]
add rcx, 60h ; '`'
mov rax, [rbp+var_8]
mov [rax+18h], rcx
mov rcx, [rbp+var_8]
mov rax, [rbp+var_10]
mov [rax+60h], rcx
pop rbp
retn
|
long long ma_set_trn_for_table(_QWORD *a1, long long a2)
{
long long result; // rax
a1[1] = a2;
if ( *(_QWORD *)(a2 + 96) )
*(_QWORD *)(*(_QWORD *)(a2 + 96) + 24LL) = a1 + 2;
a1[2] = *(_QWORD *)(a2 + 96);
a1[3] = a2 + 96;
result = a2;
*(_QWORD *)(a2 + 96) = a1;
return result;
}
|
_ma_set_trn_for_table:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
JMP 0x0019f1ce
LAB_0019f1ce:
JMP 0x0019f1d0
LAB_0019f1d0:
JMP 0x0019f1d2
LAB_0019f1d2:
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x60],0x0
JZ 0x0019f1fd
MOV RCX,qword ptr [RBP + -0x8]
ADD RCX,0x10
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x60]
MOV qword ptr [RAX + 0x18],RCX
LAB_0019f1fd:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x60]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x10],RCX
MOV RCX,qword ptr [RBP + -0x10]
ADD RCX,0x60
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x18],RCX
MOV RCX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x60],RCX
POP RBP
RET
|
void _ma_set_trn_for_table(long param_1,long param_2)
{
*(long *)(param_1 + 8) = param_2;
if (*(long *)(param_2 + 0x60) != 0) {
*(long *)(*(long *)(param_2 + 0x60) + 0x18) = param_1 + 0x10;
}
*(int8 *)(param_1 + 0x10) = *(int8 *)(param_2 + 0x60);
*(long *)(param_1 + 0x18) = param_2 + 0x60;
*(long *)(param_2 + 0x60) = param_1;
return;
}
|
|
7,675 |
cpu_get_num_math()
|
monkey531[P]llama/common/common.cpp
|
int32_t cpu_get_num_math() {
#if defined(__x86_64__) && defined(__linux__) && !defined(__ANDROID__)
int n_cpu = sysconf(_SC_NPROCESSORS_ONLN);
if (n_cpu < 1) {
return cpu_get_num_physical_cores();
}
if (is_hybrid_cpu()) {
cpu_set_t affinity;
if (!pthread_getaffinity_np(pthread_self(), sizeof(affinity), &affinity)) {
int result = cpu_count_math_cpus(n_cpu);
pthread_setaffinity_np(pthread_self(), sizeof(affinity), &affinity);
if (result > 0) {
return result;
}
}
}
#endif
return cpu_get_num_physical_cores();
}
|
O3
|
cpp
|
cpu_get_num_math():
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x100, %rsp # imm = 0x100
movl $0x54, %edi
callq 0x1b6b0
movq %rax, %rbx
testl %ebx, %ebx
jle 0x7520d
movl $0x7, %eax
xorl %ecx, %ecx
movq %rbx, %rsi
cpuid
xchgq %rbx, %rsi
testw %dx, %dx
jns 0x75236
callq 0x1b8e0
movq %rax, %r14
leaq 0x80(%rsp), %rdx
movl $0x80, %esi
movq %rax, %rdi
callq 0x1c290
testl %eax, %eax
jne 0x75236
xorl %r15d, %r15d
movq %rsp, %r12
xorl %ebp, %ebp
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
cmpl $0x3ff, %r15d # imm = 0x3FF
ja 0x751af
movl $0x1, %eax
movl %r15d, %ecx
shlq %cl, %rax
movl %r15d, %ecx
shrl $0x6, %ecx
orq %rax, (%rsp,%rcx,8)
movl $0x80, %esi
movq %r14, %rdi
movq %r12, %rdx
callq 0x1c230
testl %eax, %eax
jne 0x75221
xorl %ecx, %ecx
movl $0x1a, %eax
movq %rbx, %rsi
cpuid
xchgq %rbx, %rsi
andl $0xff000000, %eax # imm = 0xFF000000
xorl %ecx, %ecx
cmpl $0x20000000, %eax # imm = 0x20000000
setne %cl
addl %ecx, %ebp
addl %ecx, %r15d
incl %r15d
cmpl %ebx, %r15d
jl 0x75167
leaq 0x80(%rsp), %rdx
movl $0x80, %esi
movq %r14, %rdi
callq 0x1c230
testl %ebp, %ebp
jne 0x7523d
jmp 0x75236
addq $0x100, %rsp # imm = 0x100
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x74d8c
leaq 0x80(%rsp), %rdx
movl $0x80, %esi
movq %r14, %rdi
callq 0x1c230
callq 0x74d8c
movl %eax, %ebp
movl %ebp, %eax
addq $0x100, %rsp # imm = 0x100
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
_Z16cpu_get_num_mathv:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 100h
mov edi, 54h ; 'T'
call _sysconf
mov rbx, rax
test ebx, ebx
jle loc_7520D
mov eax, 7
xor ecx, ecx
mov rsi, rbx
cpuid
xchg rsi, rbx
test dx, dx
jns loc_75236
call _pthread_self
mov r14, rax
lea rdx, [rsp+128h+var_A8]
mov esi, 80h
mov rdi, rax
call _pthread_getaffinity_np
test eax, eax
jnz loc_75236
xor r15d, r15d
mov r12, rsp
xor ebp, ebp
loc_75167:
xorps xmm0, xmm0
movaps [rsp+128h+var_B8], xmm0
movaps [rsp+128h+var_C8], xmm0
movaps [rsp+128h+var_D8], xmm0
movaps [rsp+128h+var_E8], xmm0
movaps [rsp+128h+var_F8], xmm0
movaps [rsp+128h+var_108], xmm0
movaps [rsp+128h+var_118], xmm0
movaps [rsp+128h+var_128], xmm0
cmp r15d, 3FFh
ja short loc_751AF
mov eax, 1
mov ecx, r15d
shl rax, cl
mov ecx, r15d
shr ecx, 6
or qword ptr [rsp+rcx*8+128h+var_128], rax
loc_751AF:
mov esi, 80h
mov rdi, r14
mov rdx, r12
call _pthread_setaffinity_np
test eax, eax
jnz short loc_75221
xor ecx, ecx
mov eax, 1Ah
mov rsi, rbx
cpuid
xchg rsi, rbx
and eax, 0FF000000h
xor ecx, ecx
cmp eax, 20000000h
setnz cl
add ebp, ecx
add r15d, ecx
inc r15d
cmp r15d, ebx
jl loc_75167
lea rdx, [rsp+128h+var_A8]
mov esi, 80h
mov rdi, r14
call _pthread_setaffinity_np
test ebp, ebp
jnz short loc_7523D
jmp short loc_75236
loc_7520D:
add rsp, 100h
pop rbx
pop r12
pop r14
pop r15
pop rbp
jmp _Z26cpu_get_num_physical_coresv; cpu_get_num_physical_cores(void)
loc_75221:
lea rdx, [rsp+128h+var_A8]
mov esi, 80h
mov rdi, r14
call _pthread_setaffinity_np
loc_75236:
call _Z26cpu_get_num_physical_coresv; cpu_get_num_physical_cores(void)
mov ebp, eax
loc_7523D:
mov eax, ebp
add rsp, 100h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
long long cpu_get_num_math(void)
{
long long v0; // rbx
long long v2; // rsi
long long v7; // rbx
long long v8; // rsi
long long v9; // rt0
long long v10; // r14
unsigned int v11; // r15d
unsigned int v12; // ebp
long long v13; // rcx
long long v14; // r8
long long v15; // r9
long long v17; // rsi
long long v22; // rcx
__int128 v24; // [rsp+0h] [rbp-128h] BYREF
__int128 v25; // [rsp+10h] [rbp-118h]
__int128 v26; // [rsp+20h] [rbp-108h]
__int128 v27; // [rsp+30h] [rbp-F8h]
__int128 v28; // [rsp+40h] [rbp-E8h]
__int128 v29; // [rsp+50h] [rbp-D8h]
__int128 v30; // [rsp+60h] [rbp-C8h]
__int128 v31; // [rsp+70h] [rbp-B8h]
_BYTE v32[168]; // [rsp+80h] [rbp-A8h] BYREF
v0 = sysconf(84LL);
if ( (int)v0 <= 0 )
return cpu_get_num_physical_cores();
_RAX = 7LL;
v2 = v0;
__asm { cpuid }
v9 = v2;
v8 = _RBX;
v7 = v9;
if ( (_RDX & 0x8000u) != 0LL )
{
v10 = pthread_self(84LL, v8, _RDX, _RCX);
if ( !(unsigned int)pthread_getaffinity_np(v10, 128LL, v32) )
{
v11 = 0;
v12 = 0;
do
{
v31 = 0LL;
v30 = 0LL;
v29 = 0LL;
v28 = 0LL;
v27 = 0LL;
v26 = 0LL;
v25 = 0LL;
v24 = 0LL;
if ( v11 <= 0x3FF )
*((_QWORD *)&v24 + (v11 >> 6)) |= 1LL << v11;
if ( (unsigned int)((long long ( *)(long long, long long, __int128 *))pthread_setaffinity_np)(
v10,
128LL,
&v24) )
{
pthread_setaffinity_np(
v10,
128LL,
v32,
v13,
v14,
v15,
v24,
*((_QWORD *)&v24 + 1),
v25,
*((_QWORD *)&v25 + 1),
v26,
*((_QWORD *)&v26 + 1),
v27,
*((_QWORD *)&v27 + 1),
v28,
*((_QWORD *)&v28 + 1),
v29,
*((_QWORD *)&v29 + 1),
v30,
*((_QWORD *)&v30 + 1),
v31,
*((_QWORD *)&v31 + 1));
return (unsigned int)cpu_get_num_physical_cores();
}
_RAX = 26LL;
v17 = v7;
__asm { cpuid }
v7 = v17;
v22 = (_RAX & 0xFF000000) != 0x20000000;
v12 += v22;
v11 += v22 + 1;
}
while ( (int)v11 < (int)v17 );
pthread_setaffinity_np(
v10,
128LL,
v32,
v22,
v14,
v15,
v24,
*((_QWORD *)&v24 + 1),
v25,
*((_QWORD *)&v25 + 1),
v26,
*((_QWORD *)&v26 + 1),
v27,
*((_QWORD *)&v27 + 1),
v28,
*((_QWORD *)&v28 + 1),
v29,
*((_QWORD *)&v29 + 1),
v30,
*((_QWORD *)&v30 + 1),
v31,
*((_QWORD *)&v31 + 1));
if ( v12 )
return v12;
}
}
return (unsigned int)cpu_get_num_physical_cores();
}
|
cpu_get_num_math:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x100
MOV EDI,0x54
CALL 0x0011b6b0
MOV RBX,RAX
TEST EBX,EBX
JLE 0x0017520d
MOV EAX,0x7
XOR ECX,ECX
MOV RSI,RBX
CPUID
XCHG RBX,RSI
TEST DX,DX
JNS 0x00175236
CALL 0x0011b8e0
MOV R14,RAX
LEA RDX,[RSP + 0x80]
MOV ESI,0x80
MOV RDI,RAX
CALL 0x0011c290
TEST EAX,EAX
JNZ 0x00175236
XOR R15D,R15D
MOV R12,RSP
XOR EBP,EBP
LAB_00175167:
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x70],XMM0
MOVAPS xmmword ptr [RSP + 0x60],XMM0
MOVAPS xmmword ptr [RSP + 0x50],XMM0
MOVAPS xmmword ptr [RSP + 0x40],XMM0
MOVAPS xmmword ptr [RSP + 0x30],XMM0
MOVAPS xmmword ptr [RSP + 0x20],XMM0
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOVAPS xmmword ptr [RSP],XMM0
CMP R15D,0x3ff
JA 0x001751af
MOV EAX,0x1
MOV ECX,R15D
SHL RAX,CL
MOV ECX,R15D
SHR ECX,0x6
OR qword ptr [RSP + RCX*0x8],RAX
LAB_001751af:
MOV ESI,0x80
MOV RDI,R14
MOV RDX,R12
CALL 0x0011c230
TEST EAX,EAX
JNZ 0x00175221
XOR ECX,ECX
MOV EAX,0x1a
MOV RSI,RBX
CPUID
XCHG RBX,RSI
AND EAX,0xff000000
XOR ECX,ECX
CMP EAX,0x20000000
SETNZ CL
ADD EBP,ECX
ADD R15D,ECX
INC R15D
CMP R15D,EBX
JL 0x00175167
LEA RDX,[RSP + 0x80]
MOV ESI,0x80
MOV RDI,R14
CALL 0x0011c230
TEST EBP,EBP
JNZ 0x0017523d
JMP 0x00175236
LAB_0017520d:
ADD RSP,0x100
POP RBX
POP R12
POP R14
POP R15
POP RBP
JMP 0x00174d8c
LAB_00175221:
LEA RDX,[RSP + 0x80]
MOV ESI,0x80
MOV RDI,R14
CALL 0x0011c230
LAB_00175236:
CALL 0x00174d8c
MOV EBP,EAX
LAB_0017523d:
MOV EAX,EBP
ADD RSP,0x100
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Removing unreachable block (ram,0x001751cd) */
/* WARNING: Removing unreachable block (ram,0x0017512c) */
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* cpu_get_num_math() */
ulong cpu_get_num_math(void)
{
long lVar1;
uint *puVar2;
uint uVar3;
int iVar4;
long lVar5;
pthread_t __th;
ulong uVar6;
uint uVar7;
uint uVar8;
cpu_set_t local_128;
cpu_set_t local_a8;
lVar5 = sysconf(0x54);
if ((int)lVar5 < 1) {
uVar6 = cpu_get_num_physical_cores();
return uVar6;
}
lVar1 = cpuid_Extended_Feature_Enumeration_info(7);
if ((short)*(int4 *)(lVar1 + 8) < 0) {
__th = pthread_self();
iVar4 = pthread_getaffinity_np(__th,0x80,&local_a8);
if (iVar4 == 0) {
uVar8 = 0;
uVar7 = 0;
do {
local_128.__bits[0xe] = 0;
local_128.__bits[0xf] = 0;
local_128.__bits[0xc] = 0;
local_128.__bits[0xd] = 0;
local_128.__bits[10] = 0;
local_128.__bits[0xb] = 0;
local_128.__bits[8] = 0;
local_128.__bits[9] = 0;
local_128.__bits[6] = 0;
local_128.__bits[7] = 0;
local_128.__bits[4] = 0;
local_128.__bits[5] = 0;
local_128.__bits[2] = 0;
local_128.__bits[3] = 0;
local_128.__bits[0] = 0;
local_128.__bits[1] = 0;
if (uVar8 < 0x400) {
local_128.__bits[uVar8 >> 6] = local_128.__bits[uVar8 >> 6] | 1L << ((byte)uVar8 & 0x3f);
}
iVar4 = pthread_setaffinity_np(__th,0x80,&local_128);
if (iVar4 != 0) {
pthread_setaffinity_np(__th,0x80,&local_a8);
goto LAB_00175236;
}
puVar2 = (uint *)cpuid(0x1a);
uVar3 = (uint)((*puVar2 & 0xff000000) != 0x20000000);
uVar7 = uVar7 + uVar3;
uVar8 = uVar8 + uVar3 + 1;
} while ((int)uVar8 < (int)lVar5);
pthread_setaffinity_np(__th,0x80,&local_a8);
if (uVar7 != 0) goto LAB_0017523d;
}
}
LAB_00175236:
uVar7 = cpu_get_num_physical_cores();
LAB_0017523d:
return (ulong)uVar7;
}
|
|
7,676 |
ma_write_keypage
|
eloqsql/storage/maria/ma_page.c
|
my_bool _ma_write_keypage(MARIA_PAGE *page, enum pagecache_page_lock lock,
int level)
{
MARIA_SHARE *share= page->info->s;
uint block_size= share->block_size;
uchar *buff= page->buff;
my_bool res;
MARIA_PINNED_PAGE page_link;
DBUG_ENTER("_ma_write_keypage");
/*
The following ensures that for transactional tables we have logged
all changes that changes the page size (as the logging code sets
page->org_size)
*/
DBUG_ASSERT(!share->now_transactional || page->size == page->org_size);
#ifdef EXTRA_DEBUG /* Safety check */
{
uint page_length, nod_flag;
page_length= _ma_get_page_used(share, buff);
nod_flag= _ma_test_if_nod(share, buff);
DBUG_ASSERT(page->size == page_length);
DBUG_ASSERT(page->size <= share->max_index_block_size);
DBUG_ASSERT(page->flag == _ma_get_keypage_flag(share, buff));
if (page->pos < share->base.keystart ||
page->pos+block_size > share->state.state.key_file_length ||
(page->pos & (maria_block_size-1)))
{
DBUG_PRINT("error",("Trying to write inside key status region: "
"key_start: %lu length: %lu page_pos: %lu",
(long) share->base.keystart,
(long) share->state.state.key_file_length,
(long) page->pos));
my_errno=EINVAL;
DBUG_ASSERT(0);
DBUG_RETURN(1);
}
DBUG_PRINT("page",("write page at: %lu",(ulong) (page->pos / block_size)));
DBUG_DUMP("buff", buff, page_length);
DBUG_ASSERT(page_length >= share->keypage_header + nod_flag +
page->keyinfo->minlength || maria_in_recovery);
}
#endif
/* Verify that keynr is correct */
DBUG_ASSERT(_ma_get_keynr(share, buff) == page->keyinfo->key_nr);
#if defined(EXTRA_DEBUG) && defined(HAVE_valgrind) && defined(WHEN_DEBUGGING)
MEM_CHECK_DEFINED(buff, block_size);
#endif
page_cleanup(share, page);
{
PAGECACHE_BLOCK_LINK **link;
enum pagecache_page_pin pin;
if (lock == PAGECACHE_LOCK_LEFT_WRITELOCKED)
{
pin= PAGECACHE_PIN_LEFT_PINNED;
link= &page_link.link;
}
else if (lock == PAGECACHE_LOCK_WRITE_UNLOCK)
{
pin= PAGECACHE_UNPIN;
/*
We unlock this page so link should be 0 to prevent it usage
even accidentally
*/
link= NULL;
}
else
{
pin= PAGECACHE_PIN;
link= &page_link.link;
}
res= pagecache_write(share->pagecache,
&share->kfile,
(pgcache_page_no_t) (page->pos / block_size),
level, buff, share->page_type,
lock, pin, PAGECACHE_WRITE_DELAY, link,
LSN_IMPOSSIBLE);
}
if (lock == PAGECACHE_LOCK_WRITE)
{
/* It was not locked before, we have to unlock it when we unpin pages */
page_link.unlock= PAGECACHE_LOCK_WRITE_UNLOCK;
page_link.changed= 1;
push_dynamic(&page->info->pinned_pages, (void*) &page_link);
}
DBUG_RETURN(res);
}
|
O0
|
c
|
ma_write_keypage:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x90, %rsp
movq %rdi, -0x18(%rbp)
movl %esi, -0x1c(%rbp)
movl %edx, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movl 0x7bc(%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0x44c01
jmp 0x44c03
jmp 0x44c05
jmp 0x44c07
jmp 0x44c09
cmpl $0x2, -0x1c(%rbp)
jne 0x44c20
movl $0x0, -0x64(%rbp)
leaq -0x58(%rbp), %rax
movq %rax, -0x60(%rbp)
jmp 0x44c48
cmpl $0x6, -0x1c(%rbp)
jne 0x44c37
movl $0x3, -0x64(%rbp)
movq $0x0, -0x60(%rbp)
jmp 0x44c46
movl $0x2, -0x64(%rbp)
leaq -0x58(%rbp), %rax
movq %rax, -0x60(%rbp)
jmp 0x44c48
movq -0x28(%rbp), %rax
movq 0x600(%rax), %rdi
movq -0x28(%rbp), %rsi
addq $0x750, %rsi # imm = 0x750
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x2c(%rbp), %ecx
xorl %edx, %edx
divq %rcx
movq %rax, %rdx
movl -0x20(%rbp), %ecx
movq -0x38(%rbp), %r8
movq -0x28(%rbp), %rax
movl 0x7d4(%rax), %r9d
movl -0x1c(%rbp), %ebx
movl -0x64(%rbp), %r11d
movq -0x60(%rbp), %r10
movq -0x28(%rbp), %rax
movq 0x600(%rax), %rax
movl 0x80(%rax), %eax
xorl %r14d, %r14d
xorl %r14d, %r14d
movl %ebx, (%rsp)
movl %r11d, 0x8(%rsp)
movl $0x0, 0x10(%rsp)
movq %r10, 0x18(%rsp)
movq $0x0, 0x20(%rsp)
movl $0x0, 0x28(%rsp)
movl %eax, 0x30(%rsp)
callq 0xb6310
movb %al, -0x39(%rbp)
cmpl $0x4, -0x1c(%rbp)
jne 0x44cff
movl $0x6, -0x50(%rbp)
movb $0x1, -0x48(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
addq $0x2e8, %rdi # imm = 0x2E8
leaq -0x58(%rbp), %rsi
callq 0x104e50
jmp 0x44d01
movb -0x39(%rbp), %al
movb %al, -0x65(%rbp)
movb -0x65(%rbp), %al
addq $0x90, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_ma_write_keypage:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 90h
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov [rbp+var_20], edx
mov rax, [rbp+var_18]
mov rax, [rax]
mov rax, [rax]
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
mov eax, [rax+7BCh]
mov [rbp+var_2C], eax
mov rax, [rbp+var_18]
mov rax, [rax+10h]
mov [rbp+var_38], rax
jmp short $+2
loc_44C01:
jmp short $+2
loc_44C03:
jmp short $+2
loc_44C05:
jmp short $+2
loc_44C07:
jmp short $+2
loc_44C09:
cmp [rbp+var_1C], 2
jnz short loc_44C20
mov [rbp+var_64], 0
lea rax, [rbp+var_58]
mov [rbp+var_60], rax
jmp short loc_44C48
loc_44C20:
cmp [rbp+var_1C], 6
jnz short loc_44C37
mov [rbp+var_64], 3
mov [rbp+var_60], 0
jmp short loc_44C46
loc_44C37:
mov [rbp+var_64], 2
lea rax, [rbp+var_58]
mov [rbp+var_60], rax
loc_44C46:
jmp short $+2
loc_44C48:
mov rax, [rbp+var_28]
mov rdi, [rax+600h]
mov rsi, [rbp+var_28]
add rsi, 750h
mov rax, [rbp+var_18]
mov rax, [rax+18h]
mov ecx, [rbp+var_2C]
xor edx, edx
div rcx
mov rdx, rax
mov ecx, [rbp+var_20]
mov r8, [rbp+var_38]
mov rax, [rbp+var_28]
mov r9d, [rax+7D4h]
mov ebx, [rbp+var_1C]
mov r11d, [rbp+var_64]
mov r10, [rbp+var_60]
mov rax, [rbp+var_28]
mov rax, [rax+600h]
mov eax, [rax+80h]
xor r14d, r14d
xor r14d, r14d
mov [rsp+0A0h+var_A0], ebx
mov [rsp+0A0h+var_98], r11d
mov [rsp+0A0h+var_90], 0
mov [rsp+0A0h+var_88], r10
mov [rsp+0A0h+var_80], 0
mov [rsp+0A0h+var_78], 0
mov [rsp+0A0h+var_70], eax
call pagecache_write_part
mov [rbp+var_39], al
cmp [rbp+var_1C], 4
jnz short loc_44CFF
mov [rbp+var_50], 6
mov [rbp+var_48], 1
mov rax, [rbp+var_18]
mov rdi, [rax]
add rdi, 2E8h
lea rsi, [rbp+var_58]
call insert_dynamic
loc_44CFF:
jmp short $+2
loc_44D01:
mov al, [rbp+var_39]
mov [rbp+var_65], al
mov al, [rbp+var_65]
add rsp, 90h
pop rbx
pop r14
pop rbp
retn
|
char ma_write_keypage(long long **a1, int a2, int a3)
{
char v3; // al
char v5[8]; // [rsp+48h] [rbp-58h] BYREF
int v6; // [rsp+50h] [rbp-50h]
char v7; // [rsp+58h] [rbp-48h]
char v8; // [rsp+67h] [rbp-39h]
long long *v9; // [rsp+68h] [rbp-38h]
unsigned int v10; // [rsp+74h] [rbp-2Ch]
long long v11; // [rsp+78h] [rbp-28h]
int v12; // [rsp+80h] [rbp-20h]
int v13; // [rsp+84h] [rbp-1Ch]
long long **v14; // [rsp+88h] [rbp-18h]
v14 = a1;
v13 = a2;
v12 = a3;
v11 = **a1;
v10 = *(_DWORD *)(v11 + 1980);
v9 = a1[2];
if ( a2 == 2 )
{
v3 = pagecache_write_part(
*(_QWORD *)(v11 + 1536),
(int)v11 + 1872,
(unsigned long long)v14[3] / v10,
v12,
(_DWORD)v9,
*(_DWORD *)(v11 + 2004),
2,
0,
0,
(long long)v5,
0LL,
0,
*(_DWORD *)(*(_QWORD *)(v11 + 1536) + 128LL));
}
else if ( v13 == 6 )
{
v3 = pagecache_write_part(
*(_QWORD *)(v11 + 1536),
(int)v11 + 1872,
(unsigned long long)v14[3] / v10,
v12,
(_DWORD)v9,
*(_DWORD *)(v11 + 2004),
6,
3,
0,
0LL,
0LL,
0,
*(_DWORD *)(*(_QWORD *)(v11 + 1536) + 128LL));
}
else
{
v3 = pagecache_write_part(
*(_QWORD *)(v11 + 1536),
(int)v11 + 1872,
(unsigned long long)v14[3] / v10,
v12,
(_DWORD)v9,
*(_DWORD *)(v11 + 2004),
v13,
2,
0,
(long long)v5,
0LL,
0,
*(_DWORD *)(*(_QWORD *)(v11 + 1536) + 128LL));
}
v8 = v3;
if ( v13 == 4 )
{
v6 = 6;
v7 = 1;
insert_dynamic(*v14 + 93, v5);
}
return v8;
}
|
_ma_write_keypage:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x90
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV dword ptr [RBP + -0x20],EDX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX + 0x7bc]
MOV dword ptr [RBP + -0x2c],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x38],RAX
JMP 0x00144c01
LAB_00144c01:
JMP 0x00144c03
LAB_00144c03:
JMP 0x00144c05
LAB_00144c05:
JMP 0x00144c07
LAB_00144c07:
JMP 0x00144c09
LAB_00144c09:
CMP dword ptr [RBP + -0x1c],0x2
JNZ 0x00144c20
MOV dword ptr [RBP + -0x64],0x0
LEA RAX,[RBP + -0x58]
MOV qword ptr [RBP + -0x60],RAX
JMP 0x00144c48
LAB_00144c20:
CMP dword ptr [RBP + -0x1c],0x6
JNZ 0x00144c37
MOV dword ptr [RBP + -0x64],0x3
MOV qword ptr [RBP + -0x60],0x0
JMP 0x00144c46
LAB_00144c37:
MOV dword ptr [RBP + -0x64],0x2
LEA RAX,[RBP + -0x58]
MOV qword ptr [RBP + -0x60],RAX
LAB_00144c46:
JMP 0x00144c48
LAB_00144c48:
MOV RAX,qword ptr [RBP + -0x28]
MOV RDI,qword ptr [RAX + 0x600]
MOV RSI,qword ptr [RBP + -0x28]
ADD RSI,0x750
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x18]
MOV ECX,dword ptr [RBP + -0x2c]
XOR EDX,EDX
DIV RCX
MOV RDX,RAX
MOV ECX,dword ptr [RBP + -0x20]
MOV R8,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x28]
MOV R9D,dword ptr [RAX + 0x7d4]
MOV EBX,dword ptr [RBP + -0x1c]
MOV R11D,dword ptr [RBP + -0x64]
MOV R10,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x600]
MOV EAX,dword ptr [RAX + 0x80]
XOR R14D,R14D
XOR R14D,R14D
MOV dword ptr [RSP],EBX
MOV dword ptr [RSP + 0x8],R11D
MOV dword ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x18],R10
MOV qword ptr [RSP + 0x20],0x0
MOV dword ptr [RSP + 0x28],0x0
MOV dword ptr [RSP + 0x30],EAX
CALL 0x001b6310
MOV byte ptr [RBP + -0x39],AL
CMP dword ptr [RBP + -0x1c],0x4
JNZ 0x00144cff
MOV dword ptr [RBP + -0x50],0x6
MOV byte ptr [RBP + -0x48],0x1
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RAX]
ADD RDI,0x2e8
LEA RSI,[RBP + -0x58]
CALL 0x00204e50
LAB_00144cff:
JMP 0x00144d01
LAB_00144d01:
MOV AL,byte ptr [RBP + -0x39]
MOV byte ptr [RBP + -0x65],AL
MOV AL,byte ptr [RBP + -0x65]
ADD RSP,0x90
POP RBX
POP R14
POP RBP
RET
|
int1 _ma_write_keypage(long *param_1,int param_2,int4 param_3)
{
int4 local_6c;
int1 *local_68;
int1 local_60 [8];
int4 local_58;
int1 local_50;
int1 local_41;
long local_40;
uint local_34;
long local_30;
int4 local_28;
int local_24;
long *local_20;
local_30 = *(long *)*param_1;
local_34 = *(uint *)(local_30 + 0x7bc);
local_40 = param_1[2];
if (param_2 == 2) {
local_6c = 0;
local_68 = local_60;
}
else if (param_2 == 6) {
local_6c = 3;
local_68 = (int1 *)0x0;
}
else {
local_6c = 2;
local_68 = local_60;
}
local_28 = param_3;
local_24 = param_2;
local_20 = param_1;
local_41 = pagecache_write_part
(*(int8 *)(local_30 + 0x600),local_30 + 0x750,
(ulong)param_1[3] / (ulong)local_34,param_3,local_40,
*(int4 *)(local_30 + 0x7d4),param_2,local_6c,0,local_68,0,0,
*(int4 *)(*(long *)(local_30 + 0x600) + 0x80));
if (local_24 == 4) {
local_58 = 6;
local_50 = 1;
insert_dynamic(*local_20 + 0x2e8,local_60);
}
return local_41;
}
|
|
7,677 |
ggml_backend_cpu_set_threadpool
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.cpp
|
void ggml_backend_cpu_set_threadpool(ggml_backend_t backend_cpu, ggml_threadpool_t threadpool) {
GGML_ASSERT(ggml_backend_is_cpu(backend_cpu));
struct ggml_backend_cpu_context * ctx = (struct ggml_backend_cpu_context *)backend_cpu->context;
if (ctx->threadpool && ctx->threadpool != threadpool) {
// already had a different threadpool, pause/suspend it before switching
ggml_threadpool_pause(ctx->threadpool);
}
ctx->threadpool = threadpool;
}
|
O2
|
cpp
|
ggml_backend_cpu_set_threadpool:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x8690
testb %al, %al
je 0x25c0d
movq 0x78(%r14), %r14
movq 0x8(%r14), %rdi
testq %rdi, %rdi
sete %al
cmpq %rbx, %rdi
sete %cl
orb %al, %cl
jne 0x25c01
callq 0x8660
movq %rbx, 0x8(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x102c9(%rip), %rdi # 0x35edd
leaq 0xdb9e(%rip), %rdx # 0x337b9
leaq 0x1031c(%rip), %rcx # 0x35f3e
movl $0xe1, %esi
xorl %eax, %eax
callq 0x8b10
|
ggml_backend_cpu_set_threadpool:
push r14
push rbx
push rax
mov rbx, rsi
mov r14, rdi
call _ggml_backend_is_cpu
test al, al
jz short loc_25C0D
mov r14, [r14+78h]
mov rdi, [r14+8]
test rdi, rdi
setz al
cmp rdi, rbx
setz cl
or cl, al
jnz short loc_25C01
call _ggml_threadpool_pause
loc_25C01:
mov [r14+8], rbx
add rsp, 8
pop rbx
pop r14
retn
loc_25C0D:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlBackendIsC_0; "ggml_backend_is_cpu(backend_cpu)"
mov esi, 0E1h
xor eax, eax
call _ggml_abort
|
char ggml_backend_cpu_set_threadpool(_QWORD *a1, long long a2)
{
long long v2; // r14
long long v3; // rdi
char result; // al
double v5; // xmm0_8
if ( (unsigned __int8)ggml_backend_is_cpu(a1) )
{
v2 = a1[15];
v3 = *(_QWORD *)(v2 + 8);
result = v3 == 0;
if ( v3 != 0 && v3 != a2 )
result = ggml_threadpool_pause(v3);
*(_QWORD *)(v2 + 8) = a2;
}
else
{
v5 = ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.cpp",
225LL,
"GGML_ASSERT(%s) failed",
"ggml_backend_is_cpu(backend_cpu)");
return ggml_backend_cpu_set_abort_callback(v5);
}
return result;
}
|
ggml_backend_cpu_set_threadpool:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
CALL 0x00108690
TEST AL,AL
JZ 0x00125c0d
MOV R14,qword ptr [R14 + 0x78]
MOV RDI,qword ptr [R14 + 0x8]
TEST RDI,RDI
SETZ AL
CMP RDI,RBX
SETZ CL
OR CL,AL
JNZ 0x00125c01
CALL 0x00108660
LAB_00125c01:
MOV qword ptr [R14 + 0x8],RBX
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_00125c0d:
LEA RDI,[0x135edd]
LEA RDX,[0x1337b9]
LEA RCX,[0x135f3e]
MOV ESI,0xe1
XOR EAX,EAX
CALL 0x00108b10
|
void ggml_backend_cpu_set_threadpool(long param_1,long param_2)
{
long lVar1;
long lVar2;
char cVar3;
cVar3 = ggml_backend_is_cpu();
if (cVar3 != '\0') {
lVar1 = *(long *)(param_1 + 0x78);
lVar2 = *(long *)(lVar1 + 8);
if (lVar2 != param_2 && lVar2 != 0) {
ggml_threadpool_pause();
}
*(long *)(lVar1 + 8) = param_2;
return;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.cpp"
,0xe1,"GGML_ASSERT(%s) failed","ggml_backend_is_cpu(backend_cpu)");
}
|
|
7,678 |
ggml_backend_cpu_set_threadpool
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.cpp
|
void ggml_backend_cpu_set_threadpool(ggml_backend_t backend_cpu, ggml_threadpool_t threadpool) {
GGML_ASSERT(ggml_backend_is_cpu(backend_cpu));
struct ggml_backend_cpu_context * ctx = (struct ggml_backend_cpu_context *)backend_cpu->context;
if (ctx->threadpool && ctx->threadpool != threadpool) {
// already had a different threadpool, pause/suspend it before switching
ggml_threadpool_pause(ctx->threadpool);
}
ctx->threadpool = threadpool;
}
|
O3
|
cpp
|
ggml_backend_cpu_set_threadpool:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x284c1
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rdi
leaq 0x211d1(%rip), %rsi # 0x49660
callq 0x8540
testb %al, %al
je 0x284c1
movq 0x78(%r14), %r14
movq 0x8(%r14), %rdi
testq %rdi, %rdi
sete %al
cmpq %rbx, %rdi
sete %cl
orb %al, %cl
jne 0x284b5
callq 0x85a0
movq %rbx, 0x8(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x10b1e(%rip), %rdi # 0x38fe6
leaq 0xe3fa(%rip), %rdx # 0x368c9
leaq 0x10b71(%rip), %rcx # 0x39047
movl $0xe1, %esi
xorl %eax, %eax
callq 0x89c0
|
ggml_backend_cpu_set_threadpool:
push r14
push rbx
push rax
test rdi, rdi
jz short loc_284C1
mov rbx, rsi
mov r14, rdi
mov rdi, [rdi]
lea rsi, _ZZL21ggml_backend_cpu_guidvE4guid; ggml_backend_cpu_guid(void)::guid
call _ggml_guid_matches
test al, al
jz short loc_284C1
mov r14, [r14+78h]
mov rdi, [r14+8]
test rdi, rdi
setz al
cmp rdi, rbx
setz cl
or cl, al
jnz short loc_284B5
call _ggml_threadpool_pause
loc_284B5:
mov [r14+8], rbx
add rsp, 8
pop rbx
pop r14
retn
loc_284C1:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlBackendIsC_0; "ggml_backend_is_cpu(backend_cpu)"
mov esi, 0E1h
xor eax, eax
call _ggml_abort
|
char ggml_backend_cpu_set_threadpool(_QWORD *a1, long long a2)
{
long long v2; // r14
long long v3; // rdi
char result; // al
double v5; // xmm0_8
if ( a1 && (unsigned __int8)ggml_guid_matches(*a1, &ggml_backend_cpu_guid(void)::guid) )
{
v2 = a1[15];
v3 = *(_QWORD *)(v2 + 8);
result = v3 == 0;
if ( v3 != 0 && v3 != a2 )
result = ggml_threadpool_pause(v3);
*(_QWORD *)(v2 + 8) = a2;
}
else
{
v5 = ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.cpp",
225LL,
"GGML_ASSERT(%s) failed",
"ggml_backend_is_cpu(backend_cpu)");
return ggml_backend_cpu_set_abort_callback(v5);
}
return result;
}
|
ggml_backend_cpu_set_threadpool:
PUSH R14
PUSH RBX
PUSH RAX
TEST RDI,RDI
JZ 0x001284c1
MOV RBX,RSI
MOV R14,RDI
MOV RDI,qword ptr [RDI]
LEA RSI,[0x149660]
CALL 0x00108540
TEST AL,AL
JZ 0x001284c1
MOV R14,qword ptr [R14 + 0x78]
MOV RDI,qword ptr [R14 + 0x8]
TEST RDI,RDI
SETZ AL
CMP RDI,RBX
SETZ CL
OR CL,AL
JNZ 0x001284b5
CALL 0x001085a0
LAB_001284b5:
MOV qword ptr [R14 + 0x8],RBX
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_001284c1:
LEA RDI,[0x138fe6]
LEA RDX,[0x1368c9]
LEA RCX,[0x139047]
MOV ESI,0xe1
XOR EAX,EAX
CALL 0x001089c0
|
void ggml_backend_cpu_set_threadpool(int8 *param_1,long param_2)
{
long lVar1;
long lVar2;
char cVar3;
if (param_1 != (int8 *)0x0) {
cVar3 = ggml_guid_matches(*param_1,ggml_backend_cpu_guid()::guid);
if (cVar3 != '\0') {
lVar1 = param_1[0xf];
lVar2 = *(long *)(lVar1 + 8);
if (lVar2 != param_2 && lVar2 != 0) {
ggml_threadpool_pause();
}
*(long *)(lVar1 + 8) = param_2;
return;
}
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.cpp"
,0xe1,"GGML_ASSERT(%s) failed","ggml_backend_is_cpu(backend_cpu)");
}
|
|
7,679 |
downheap
|
eloqsql/mysys/queues.c
|
void _downheap(QUEUE *queue, uint idx)
{
uchar *element= queue->root[idx];
uint next_index,
elements= queue->elements,
half_queue= elements >> 1,
offset_to_key= queue->offset_to_key,
offset_to_queue_pos= queue->offset_to_queue_pos;
while (idx <= half_queue)
{
next_index= idx+idx;
if (next_index < elements &&
(queue->compare(queue->first_cmp_arg,
queue->root[next_index]+offset_to_key,
queue->root[next_index+1]+offset_to_key) *
queue->max_at_top) > 0)
next_index++;
if ((queue->compare(queue->first_cmp_arg,
queue->root[next_index]+offset_to_key,
element+offset_to_key) * queue->max_at_top) >= 0)
break;
queue->root[idx]= queue->root[next_index];
if (offset_to_queue_pos)
(*(uint*) (queue->root[idx] + offset_to_queue_pos-1))= idx;
idx= next_index;
}
queue->root[idx]=element;
if (offset_to_queue_pos)
(*(uint*) (element + offset_to_queue_pos-1))= idx;
}
|
O0
|
c
|
downheap:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl -0xc(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
shrl %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %eax
movl %eax, -0x2c(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x24(%rbp), %eax
ja 0x8ec4d
movl -0xc(%rbp), %eax
addl -0xc(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x20(%rbp), %eax
jae 0x8ebc9
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x8(%rcx), %rdi
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
movl -0x1c(%rbp), %edx
movq (%rcx,%rdx,8), %rsi
movl -0x28(%rbp), %ecx
addq %rcx, %rsi
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
movl -0x1c(%rbp), %edx
addl $0x1, %edx
movl %edx, %edx
movq (%rcx,%rdx,8), %rdx
movl -0x28(%rbp), %ecx
addq %rcx, %rdx
callq *%rax
movq -0x8(%rbp), %rcx
imull 0x24(%rcx), %eax
cmpl $0x0, %eax
jle 0x8ebc9
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x8(%rcx), %rdi
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
movl -0x1c(%rbp), %edx
movq (%rcx,%rdx,8), %rsi
movl -0x28(%rbp), %ecx
addq %rcx, %rsi
movq -0x18(%rbp), %rdx
movl -0x28(%rbp), %ecx
addq %rcx, %rdx
callq *%rax
movq -0x8(%rbp), %rcx
imull 0x24(%rcx), %eax
cmpl $0x0, %eax
jl 0x8ec08
jmp 0x8ec4d
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl -0x1c(%rbp), %ecx
movq (%rax,%rcx,8), %rdx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl -0xc(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
cmpl $0x0, -0x2c(%rbp)
je 0x8ec42
movl -0xc(%rbp), %edx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl -0xc(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl -0x2c(%rbp), %ecx
movl %edx, -0x1(%rax,%rcx)
movl -0x1c(%rbp), %eax
movl %eax, -0xc(%rbp)
jmp 0x8eb57
movq -0x18(%rbp), %rdx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl -0xc(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
cmpl $0x0, -0x2c(%rbp)
je 0x8ec73
movl -0xc(%rbp), %edx
movq -0x18(%rbp), %rax
movl -0x2c(%rbp), %ecx
movl %edx, -0x1(%rax,%rcx)
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
|
_downheap:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov rax, [rbp+var_8]
mov rax, [rax]
mov ecx, [rbp+var_C]
mov rax, [rax+rcx*8]
mov [rbp+var_18], rax
mov rax, [rbp+var_8]
mov eax, [rax+10h]
mov [rbp+var_20], eax
mov eax, [rbp+var_20]
shr eax, 1
mov [rbp+var_24], eax
mov rax, [rbp+var_8]
mov eax, [rax+18h]
mov [rbp+var_28], eax
mov rax, [rbp+var_8]
mov eax, [rax+1Ch]
mov [rbp+var_2C], eax
loc_8EB57:
mov eax, [rbp+var_C]
cmp eax, [rbp+var_24]
ja loc_8EC4D
mov eax, [rbp+var_C]
add eax, [rbp+var_C]
mov [rbp+var_1C], eax
mov eax, [rbp+var_1C]
cmp eax, [rbp+var_20]
jnb short loc_8EBC9
mov rax, [rbp+var_8]
mov rax, [rax+28h]
mov rcx, [rbp+var_8]
mov rdi, [rcx+8]
mov rcx, [rbp+var_8]
mov rcx, [rcx]
mov edx, [rbp+var_1C]
mov rsi, [rcx+rdx*8]
mov ecx, [rbp+var_28]
add rsi, rcx
mov rcx, [rbp+var_8]
mov rcx, [rcx]
mov edx, [rbp+var_1C]
add edx, 1
mov edx, edx
mov rdx, [rcx+rdx*8]
mov ecx, [rbp+var_28]
add rdx, rcx
call rax
mov rcx, [rbp+var_8]
imul eax, [rcx+24h]
cmp eax, 0
jle short loc_8EBC9
mov eax, [rbp+var_1C]
add eax, 1
mov [rbp+var_1C], eax
loc_8EBC9:
mov rax, [rbp+var_8]
mov rax, [rax+28h]
mov rcx, [rbp+var_8]
mov rdi, [rcx+8]
mov rcx, [rbp+var_8]
mov rcx, [rcx]
mov edx, [rbp+var_1C]
mov rsi, [rcx+rdx*8]
mov ecx, [rbp+var_28]
add rsi, rcx
mov rdx, [rbp+var_18]
mov ecx, [rbp+var_28]
add rdx, rcx
call rax
mov rcx, [rbp+var_8]
imul eax, [rcx+24h]
cmp eax, 0
jl short loc_8EC08
jmp short loc_8EC4D
loc_8EC08:
mov rax, [rbp+var_8]
mov rax, [rax]
mov ecx, [rbp+var_1C]
mov rdx, [rax+rcx*8]
mov rax, [rbp+var_8]
mov rax, [rax]
mov ecx, [rbp+var_C]
mov [rax+rcx*8], rdx
cmp [rbp+var_2C], 0
jz short loc_8EC42
mov edx, [rbp+var_C]
mov rax, [rbp+var_8]
mov rax, [rax]
mov ecx, [rbp+var_C]
mov rax, [rax+rcx*8]
mov ecx, [rbp+var_2C]
mov [rax+rcx-1], edx
loc_8EC42:
mov eax, [rbp+var_1C]
mov [rbp+var_C], eax
jmp loc_8EB57
loc_8EC4D:
mov rdx, [rbp+var_18]
mov rax, [rbp+var_8]
mov rax, [rax]
mov ecx, [rbp+var_C]
mov [rax+rcx*8], rdx
cmp [rbp+var_2C], 0
jz short loc_8EC73
mov edx, [rbp+var_C]
mov rax, [rbp+var_18]
mov ecx, [rbp+var_2C]
mov [rax+rcx-1], edx
loc_8EC73:
add rsp, 30h
pop rbp
retn
|
long long downheap(long long *a1, unsigned int a2)
{
long long result; // rax
unsigned int v3; // [rsp+4h] [rbp-2Ch]
unsigned int v4; // [rsp+8h] [rbp-28h]
unsigned int v5; // [rsp+10h] [rbp-20h]
unsigned int v6; // [rsp+14h] [rbp-1Ch]
long long v7; // [rsp+18h] [rbp-18h]
unsigned int v8; // [rsp+24h] [rbp-Ch]
v8 = a2;
v7 = *(_QWORD *)(*a1 + 8LL * a2);
v5 = *((_DWORD *)a1 + 4);
v4 = *((_DWORD *)a1 + 6);
v3 = *((_DWORD *)a1 + 7);
while ( v8 <= v5 >> 1 )
{
v6 = 2 * v8;
if ( 2 * v8 < v5
&& (int)(*((_DWORD *)a1 + 9)
* ((long long ( *)(long long, _QWORD, _QWORD))a1[5])(
a1[1],
v4 + *(_QWORD *)(*a1 + 8LL * v6),
v4 + *(_QWORD *)(*a1 + 8LL * (v6 + 1)))) > 0 )
{
++v6;
}
if ( (int)(*((_DWORD *)a1 + 9)
* ((long long ( *)(long long, _QWORD, long long))a1[5])(
a1[1],
v4 + *(_QWORD *)(*a1 + 8LL * v6),
v4 + v7)) >= 0 )
break;
*(_QWORD *)(*a1 + 8LL * v8) = *(_QWORD *)(*a1 + 8LL * v6);
if ( v3 )
*(_DWORD *)(*(_QWORD *)(*a1 + 8LL * v8) + v3 - 1LL) = v8;
v8 = v6;
}
result = *a1;
*(_QWORD *)(*a1 + 8LL * v8) = v7;
if ( v3 )
{
result = v7;
*(_DWORD *)(v7 + v3 - 1) = v8;
}
return result;
}
|
_downheap:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RBP + -0xc]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x10]
MOV dword ptr [RBP + -0x20],EAX
MOV EAX,dword ptr [RBP + -0x20]
SHR EAX,0x1
MOV dword ptr [RBP + -0x24],EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x18]
MOV dword ptr [RBP + -0x28],EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x1c]
MOV dword ptr [RBP + -0x2c],EAX
LAB_0018eb57:
MOV EAX,dword ptr [RBP + -0xc]
CMP EAX,dword ptr [RBP + -0x24]
JA 0x0018ec4d
MOV EAX,dword ptr [RBP + -0xc]
ADD EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x1c],EAX
MOV EAX,dword ptr [RBP + -0x1c]
CMP EAX,dword ptr [RBP + -0x20]
JNC 0x0018ebc9
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x28]
MOV RCX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RCX + 0x8]
MOV RCX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RCX]
MOV EDX,dword ptr [RBP + -0x1c]
MOV RSI,qword ptr [RCX + RDX*0x8]
MOV ECX,dword ptr [RBP + -0x28]
ADD RSI,RCX
MOV RCX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RCX]
MOV EDX,dword ptr [RBP + -0x1c]
ADD EDX,0x1
MOV EDX,EDX
MOV RDX,qword ptr [RCX + RDX*0x8]
MOV ECX,dword ptr [RBP + -0x28]
ADD RDX,RCX
CALL RAX
MOV RCX,qword ptr [RBP + -0x8]
IMUL EAX,dword ptr [RCX + 0x24]
CMP EAX,0x0
JLE 0x0018ebc9
MOV EAX,dword ptr [RBP + -0x1c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x1c],EAX
LAB_0018ebc9:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x28]
MOV RCX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RCX + 0x8]
MOV RCX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RCX]
MOV EDX,dword ptr [RBP + -0x1c]
MOV RSI,qword ptr [RCX + RDX*0x8]
MOV ECX,dword ptr [RBP + -0x28]
ADD RSI,RCX
MOV RDX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0x28]
ADD RDX,RCX
CALL RAX
MOV RCX,qword ptr [RBP + -0x8]
IMUL EAX,dword ptr [RCX + 0x24]
CMP EAX,0x0
JL 0x0018ec08
JMP 0x0018ec4d
LAB_0018ec08:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RBP + -0x1c]
MOV RDX,qword ptr [RAX + RCX*0x8]
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RBP + -0xc]
MOV qword ptr [RAX + RCX*0x8],RDX
CMP dword ptr [RBP + -0x2c],0x0
JZ 0x0018ec42
MOV EDX,dword ptr [RBP + -0xc]
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RBP + -0xc]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV ECX,dword ptr [RBP + -0x2c]
MOV dword ptr [RAX + RCX*0x1 + -0x1],EDX
LAB_0018ec42:
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0xc],EAX
JMP 0x0018eb57
LAB_0018ec4d:
MOV RDX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RBP + -0xc]
MOV qword ptr [RAX + RCX*0x8],RDX
CMP dword ptr [RBP + -0x2c],0x0
JZ 0x0018ec73
MOV EDX,dword ptr [RBP + -0xc]
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0x2c]
MOV dword ptr [RAX + RCX*0x1 + -0x1],EDX
LAB_0018ec73:
ADD RSP,0x30
POP RBP
RET
|
void _downheap(long *param_1,uint param_2)
{
uint uVar1;
uint uVar2;
uint uVar3;
long lVar4;
int iVar5;
uint local_24;
uint local_14;
lVar4 = *(long *)(*param_1 + (ulong)param_2 * 8);
uVar1 = *(uint *)(param_1 + 2);
uVar2 = *(uint *)(param_1 + 3);
uVar3 = *(uint *)((long)param_1 + 0x1c);
local_14 = param_2;
while (local_14 <= uVar1 >> 1) {
local_24 = local_14 * 2;
if ((local_24 < uVar1) &&
(iVar5 = (*(code *)param_1[5])
(param_1[1],*(long *)(*param_1 + (ulong)local_24 * 8) + (ulong)uVar2,
*(long *)(*param_1 + (ulong)(local_24 + 1) * 8) + (ulong)uVar2),
0 < iVar5 * *(int *)((long)param_1 + 0x24))) {
local_24 = local_24 + 1;
}
iVar5 = (*(code *)param_1[5])
(param_1[1],*(long *)(*param_1 + (ulong)local_24 * 8) + (ulong)uVar2,
lVar4 + (ulong)uVar2);
if (-1 < iVar5 * *(int *)((long)param_1 + 0x24)) break;
*(int8 *)(*param_1 + (ulong)local_14 * 8) =
*(int8 *)(*param_1 + (ulong)local_24 * 8);
if (uVar3 != 0) {
*(uint *)(*(long *)(*param_1 + (ulong)local_14 * 8) + -1 + (ulong)uVar3) = local_14;
}
local_14 = local_24;
}
*(long *)(*param_1 + (ulong)local_14 * 8) = lVar4;
if (uVar3 != 0) {
*(uint *)(lVar4 + -1 + (ulong)uVar3) = local_14;
}
return;
}
|
|
7,680 |
POINTonE2_from_Jacobian
|
corpus-core[P]colibri-stateless/build_O1/_deps/blst-src/src/e2.c
|
static void POINTonE2_from_Jacobian(POINTonE2 *out, const POINTonE2 *in)
{
vec384x Z, ZZ;
limb_t inf = vec_is_zero(in->Z, sizeof(in->Z));
reciprocal_fp2(Z, in->Z); /* 1/Z */
sqr_fp2(ZZ, Z);
mul_fp2(out->X, in->X, ZZ); /* X = X/Z^2 */
mul_fp2(ZZ, ZZ, Z);
mul_fp2(out->Y, in->Y, ZZ); /* Y = Y/Z^3 */
vec_select(out->Z, in->Z, BLS12_381_G2.Z,
sizeof(BLS12_381_G2.Z), inf); /* Z = inf ? 0 : 1 */
}
|
O1
|
c
|
POINTonE2_from_Jacobian:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rsi, %r12
movq %rdi, %rbx
movl $0xc0, %eax
leaq (%rsi,%rax), %r14
movq %r14, -0x30(%rbp)
movl $0x60, %esi
movq %r14, %rdi
callq 0x30680
movq %rax, %r15
leaq -0x90(%rbp), %rdi
movq %r14, %rsi
callq 0x22441
leaq 0x23a69(%rip), %r14 # 0x3fb20
leaq -0xf0(%rbp), %r13
movabsq $-0x760c000300030003, %rcx # imm = 0x89F3FFFCFFFCFFFD
movq %r13, %rdi
leaq -0x90(%rbp), %rsi
movq %r14, %rdx
callq 0x33a20
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %r14, %rcx
movabsq $-0x760c000300030003, %r8 # imm = 0x89F3FFFCFFFCFFFD
callq 0x338e0
movq %r13, %rdi
movq %r13, %rsi
leaq -0x90(%rbp), %rdx
movq %r14, %rcx
movabsq $-0x760c000300030003, %r8 # imm = 0x89F3FFFCFFFCFFFD
callq 0x338e0
leaq 0x60(%rbx), %rdi
addq $0x60, %r12
movq %r12, %rsi
movq %r13, %rdx
movq %r14, %rcx
movabsq $-0x760c000300030003, %r8 # imm = 0x89F3FFFCFFFCFFFD
callq 0x338e0
movl $0xc0, %eax
addq %rax, %rbx
leaq 0x2379d(%rip), %rdx # 0x3f8e0
addq %rax, %rdx
movq %rbx, %rdi
movq -0x30(%rbp), %rsi
movq %r15, %rcx
callq 0x30060
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
POINTonE2_from_Jacobian:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0C8h
mov r12, rsi
mov rbx, rdi
mov eax, 0C0h
lea r14, [rsi+rax]
mov [rbp+var_30], r14
mov esi, 60h ; '`'
mov rdi, r14
call vec_is_zero_16x
mov r15, rax
lea rdi, [rbp+var_90]
mov rsi, r14
call reciprocal_fp2
lea r14, BLS12_381_P
lea r13, [rbp+var_F0]
mov rcx, 89F3FFFCFFFCFFFDh
mov rdi, r13
lea rsi, [rbp+var_90]
mov rdx, r14
call sqr_mont_384x
mov rdi, rbx
mov rsi, r12
mov rdx, r13
mov rcx, r14
mov r8, 89F3FFFCFFFCFFFDh
call mul_mont_384x
mov rdi, r13
mov rsi, r13
lea rdx, [rbp+var_90]
mov rcx, r14
mov r8, 89F3FFFCFFFCFFFDh
call mul_mont_384x
lea rdi, [rbx+60h]
add r12, 60h ; '`'
mov rsi, r12
mov rdx, r13
mov rcx, r14
mov r8, 89F3FFFCFFFCFFFDh
call mul_mont_384x
mov eax, 0C0h
add rbx, rax
lea rdx, BLS12_381_G2
add rdx, rax
mov rdi, rbx
mov rsi, [rbp+var_30]
mov rcx, r15
call vec_select_96
add rsp, 0C8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long POINTonE2_from_Jacobian(long long a1, long long a2)
{
long long is_zero_16x; // r15
_BYTE v4[96]; // [rsp+0h] [rbp-F0h] BYREF
_BYTE v5[96]; // [rsp+60h] [rbp-90h] BYREF
long long v6; // [rsp+C0h] [rbp-30h]
v6 = a2 + 192;
is_zero_16x = vec_is_zero_16x(a2 + 192, 96LL);
reciprocal_fp2(v5, a2 + 192);
sqr_mont_384x(v4, v5, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
mul_mont_384x(a1, a2, v4, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
mul_mont_384x(v4, v4, v5, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
mul_mont_384x(a1 + 96, a2 + 96, v4, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
return vec_select_96(a1 + 192, v6, (char *)&BLS12_381_G2 + 192, is_zero_16x);
}
|
POINTonE2_from_Jacobian:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xc8
MOV R12,RSI
MOV RBX,RDI
MOV EAX,0xc0
LEA R14,[RSI + RAX*0x1]
MOV qword ptr [RBP + -0x30],R14
MOV ESI,0x60
MOV RDI,R14
CALL 0x00130680
MOV R15,RAX
LEA RDI,[RBP + -0x90]
MOV RSI,R14
CALL 0x00122441
LEA R14,[0x13fb20]
LEA R13,[RBP + -0xf0]
MOV RCX,-0x760c000300030003
MOV RDI,R13
LEA RSI,[RBP + -0x90]
MOV RDX,R14
CALL 0x00133a20
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R13
MOV RCX,R14
MOV R8,-0x760c000300030003
CALL 0x001338e0
MOV RDI,R13
MOV RSI,R13
LEA RDX,[RBP + -0x90]
MOV RCX,R14
MOV R8,-0x760c000300030003
CALL 0x001338e0
LEA RDI,[RBX + 0x60]
ADD R12,0x60
MOV RSI,R12
MOV RDX,R13
MOV RCX,R14
MOV R8,-0x760c000300030003
CALL 0x001338e0
MOV EAX,0xc0
ADD RBX,RAX
LEA RDX,[0x13f8e0]
ADD RDX,RAX
MOV RDI,RBX
MOV RSI,qword ptr [RBP + -0x30]
MOV RCX,R15
CALL 0x00130060
ADD RSP,0xc8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void POINTonE2_from_Jacobian(long param_1,long param_2)
{
long lVar1;
int8 uVar2;
int1 local_f8 [96];
int1 local_98 [96];
long local_38;
lVar1 = param_2 + 0xc0;
local_38 = lVar1;
uVar2 = vec_is_zero_16x(lVar1,0x60);
reciprocal_fp2(local_98,lVar1);
sqr_mont_384x(local_f8,local_98,BLS12_381_P,0x89f3fffcfffcfffd);
mul_mont_384x(param_1,param_2,local_f8,BLS12_381_P,0x89f3fffcfffcfffd);
mul_mont_384x(local_f8,local_f8,local_98,BLS12_381_P,0x89f3fffcfffcfffd);
mul_mont_384x(param_1 + 0x60,param_2 + 0x60,local_f8,BLS12_381_P,0x89f3fffcfffcfffd);
vec_select_96(param_1 + 0xc0,local_38,0x13f9a0,uVar2);
return;
}
|
|
7,681 |
js_define_var
|
bluesky950520[P]quickjs/quickjs.c
|
static __exception int js_define_var(JSParseState *s, JSAtom name, int tok)
{
JSFunctionDef *fd = s->cur_func;
JSVarDefEnum var_def_type;
if (name == JS_ATOM_yield && fd->func_kind == JS_FUNC_GENERATOR) {
return js_parse_error(s, "yield is a reserved identifier");
}
if ((name == JS_ATOM_arguments || name == JS_ATOM_eval)
&& fd->is_strict_mode) {
return js_parse_error(s, "invalid variable name in strict mode");
}
if (tok == TOK_LET || tok == TOK_CONST) {
if (name == JS_ATOM_let)
return js_parse_error(s, "invalid lexical variable name 'let'");
// |undefined| is allowed as an identifier except at the global
// scope of a classic script; sloppy or strict doesn't matter
if (name == JS_ATOM_undefined
&& fd->scope_level == 1
&& fd->is_global_var
&& !fd->module) {
return js_parse_error(s, "'undefined' already declared");
}
}
switch(tok) {
case TOK_LET:
var_def_type = JS_VAR_DEF_LET;
break;
case TOK_CONST:
var_def_type = JS_VAR_DEF_CONST;
break;
case TOK_VAR:
var_def_type = JS_VAR_DEF_VAR;
break;
case TOK_CATCH:
var_def_type = JS_VAR_DEF_CATCH;
break;
default:
abort();
}
if (define_var(s, fd, name, var_def_type) < 0)
return -1;
return 0;
}
|
O1
|
c
|
js_define_var:
pushq %rax
movl %esi, %eax
movq 0x90(%rdi), %rsi
cmpl $0x4e, %eax
je 0x69ffb
cmpl $0x3b, %eax
je 0x69ffb
cmpl $0x2d, %eax
jne 0x6a005
cmpb $0x1, 0x84(%rsi)
jne 0x69ff1
leaq 0x3b3d2(%rip), %rsi # 0xa53c1
jmp 0x6a032
cmpl $0x4e, %eax
je 0x69ffb
cmpl $0x3b, %eax
jne 0x6a005
cmpw $0x0, 0x84(%rsi)
js 0x6a02b
cmpl $-0x38, %edx
jle 0x6a05e
cmpl $-0x2f, %edx
je 0x6a018
cmpl $-0x37, %edx
jne 0x6a09f
cmpl $0x46, %eax
je 0x6a040
cmpl $0x27, %eax
jne 0x6a059
leaq 0x3b3dc(%rip), %rsi # 0xa5405
jmp 0x6a032
leaq 0x3b3ae(%rip), %rsi # 0xa53e0
xorl %eax, %eax
callq 0x33d45
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
jmp 0x6a07e
cmpl $0x1, 0xe8(%rsi)
jne 0x6a059
cmpl $0x0, 0x40(%rsi)
je 0x6a059
cmpq $0x0, 0x220(%rsi)
je 0x6a096
cmpl $-0x38, %edx
jg 0x6a080
cmpl $-0x4f, %edx
je 0x6a06f
cmpl $-0x3d, %edx
jne 0x6a09f
movl $0x5, %ecx
jmp 0x6a074
movl $0x6, %ecx
movl %eax, %edx
callq 0x66ec2
sarl $0x1f, %eax
popq %rcx
retq
movl $0x1, %ecx
cmpl $-0x2f, %edx
je 0x6a074
cmpl $-0x37, %edx
jne 0x6a09f
movl $0x2, %ecx
jmp 0x6a074
leaq 0x3b38c(%rip), %rsi # 0xa5429
jmp 0x6a032
callq 0xe090
|
js_define_var:
push rax
mov eax, esi
mov rsi, [rdi+90h]
cmp eax, 4Eh ; 'N'
jz short loc_69FFB
cmp eax, 3Bh ; ';'
jz short loc_69FFB
cmp eax, 2Dh ; '-'
jnz short loc_6A005
cmp byte ptr [rsi+84h], 1
jnz short loc_69FF1
lea rsi, aYieldIsAReserv; "yield is a reserved identifier"
jmp short loc_6A032
loc_69FF1:
cmp eax, 4Eh ; 'N'
jz short loc_69FFB
cmp eax, 3Bh ; ';'
jnz short loc_6A005
loc_69FFB:
cmp word ptr [rsi+84h], 0
js short loc_6A02B
loc_6A005:
cmp edx, 0FFFFFFC8h
jle short loc_6A05E
cmp edx, 0FFFFFFD1h
jz short loc_6A018
cmp edx, 0FFFFFFC9h
jnz loc_6A09F
loc_6A018:
cmp eax, 46h ; 'F'
jz short loc_6A040
cmp eax, 27h ; '''
jnz short loc_6A059
lea rsi, aInvalidLexical; "invalid lexical variable name 'let'"
jmp short loc_6A032
loc_6A02B:
lea rsi, aInvalidVariabl; "invalid variable name in strict mode"
loc_6A032:
xor eax, eax
call js_parse_error
mov eax, 0FFFFFFFFh
jmp short loc_6A07E
loc_6A040:
cmp dword ptr [rsi+0E8h], 1
jnz short loc_6A059
cmp dword ptr [rsi+40h], 0
jz short loc_6A059
cmp qword ptr [rsi+220h], 0
jz short loc_6A096
loc_6A059:
cmp edx, 0FFFFFFC8h
jg short loc_6A080
loc_6A05E:
cmp edx, 0FFFFFFB1h
jz short loc_6A06F
cmp edx, 0FFFFFFC3h
jnz short loc_6A09F
mov ecx, 5
jmp short loc_6A074
loc_6A06F:
mov ecx, 6
loc_6A074:
mov edx, eax
call define_var
sar eax, 1Fh
loc_6A07E:
pop rcx
retn
loc_6A080:
mov ecx, 1
cmp edx, 0FFFFFFD1h
jz short loc_6A074
cmp edx, 0FFFFFFC9h
jnz short loc_6A09F
mov ecx, 2
jmp short loc_6A074
loc_6A096:
lea rsi, aUndefinedAlrea; "'undefined' already declared"
jmp short loc_6A032
loc_6A09F:
call _abort
|
long long js_define_var(
long long *a1,
unsigned int a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
char v14; // al
long long v16; // rsi
const char *v17; // rsi
int v19; // ecx
char v20; // [rsp-8h] [rbp-8h]
v20 = v14;
v16 = a1[18];
if ( a2 == 78 || a2 == 59 )
{
if ( *(__int16 *)(v16 + 132) < 0 )
{
v17 = "invalid variable name in strict mode";
goto LABEL_15;
}
}
else if ( a2 == 45 && *(_BYTE *)(v16 + 132) == 1 )
{
v17 = "yield is a reserved identifier";
LABEL_15:
js_parse_error(a1, (long long)v17, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v20);
return 0xFFFFFFFFLL;
}
if ( (int)a3 <= -56 )
{
if ( (_DWORD)a3 == -79 )
{
v19 = 6;
return (unsigned int)((int)define_var(
a1,
v16,
a2,
v19,
a7,
a8,
a9,
a10,
*(double *)a11.m128_u64,
*(double *)a12.m128_u64,
a13,
a14) >> 31);
}
if ( (_DWORD)a3 == -61 )
{
v19 = 5;
return (unsigned int)((int)define_var(
a1,
v16,
a2,
v19,
a7,
a8,
a9,
a10,
*(double *)a11.m128_u64,
*(double *)a12.m128_u64,
a13,
a14) >> 31);
}
LABEL_28:
abort((const char *)a1, v16);
}
if ( (_DWORD)a3 != -47 && (_DWORD)a3 != -55 )
goto LABEL_28;
if ( a2 == 70 )
{
if ( *(_DWORD *)(v16 + 232) == 1 && *(_DWORD *)(v16 + 64) && !*(_QWORD *)(v16 + 544) )
{
v17 = "'undefined' already declared";
goto LABEL_15;
}
}
else if ( a2 == 39 )
{
v17 = "invalid lexical variable name 'let'";
goto LABEL_15;
}
v19 = 1;
if ( (_DWORD)a3 != -47 )
v19 = 2;
return (unsigned int)((int)define_var(
a1,
v16,
a2,
v19,
a7,
a8,
a9,
a10,
*(double *)a11.m128_u64,
*(double *)a12.m128_u64,
a13,
a14) >> 31);
}
|
js_define_var:
PUSH RAX
MOV EAX,ESI
MOV RSI,qword ptr [RDI + 0x90]
CMP EAX,0x4e
JZ 0x00169ffb
CMP EAX,0x3b
JZ 0x00169ffb
CMP EAX,0x2d
JNZ 0x0016a005
CMP byte ptr [RSI + 0x84],0x1
JNZ 0x00169ff1
LEA RSI,[0x1a53c1]
JMP 0x0016a032
LAB_00169ff1:
CMP EAX,0x4e
JZ 0x00169ffb
CMP EAX,0x3b
JNZ 0x0016a005
LAB_00169ffb:
CMP word ptr [RSI + 0x84],0x0
JS 0x0016a02b
LAB_0016a005:
CMP EDX,-0x38
JLE 0x0016a05e
CMP EDX,-0x2f
JZ 0x0016a018
CMP EDX,-0x37
JNZ 0x0016a09f
LAB_0016a018:
CMP EAX,0x46
JZ 0x0016a040
CMP EAX,0x27
JNZ 0x0016a059
LEA RSI,[0x1a5405]
JMP 0x0016a032
LAB_0016a02b:
LEA RSI,[0x1a53e0]
LAB_0016a032:
XOR EAX,EAX
CALL 0x00133d45
MOV EAX,0xffffffff
JMP 0x0016a07e
LAB_0016a040:
CMP dword ptr [RSI + 0xe8],0x1
JNZ 0x0016a059
CMP dword ptr [RSI + 0x40],0x0
JZ 0x0016a059
CMP qword ptr [RSI + 0x220],0x0
JZ 0x0016a096
LAB_0016a059:
CMP EDX,-0x38
JG 0x0016a080
LAB_0016a05e:
CMP EDX,-0x4f
JZ 0x0016a06f
CMP EDX,-0x3d
JNZ 0x0016a09f
MOV ECX,0x5
JMP 0x0016a074
LAB_0016a06f:
MOV ECX,0x6
LAB_0016a074:
MOV EDX,EAX
CALL 0x00166ec2
SAR EAX,0x1f
LAB_0016a07e:
POP RCX
RET
LAB_0016a080:
MOV ECX,0x1
CMP EDX,-0x2f
JZ 0x0016a074
CMP EDX,-0x37
JNZ 0x0016a09f
MOV ECX,0x2
JMP 0x0016a074
LAB_0016a096:
LEA RSI,[0x1a5429]
JMP 0x0016a032
LAB_0016a09f:
CALL 0x0010e090
|
int js_define_var(long param_1,int param_2,int param_3)
{
long lVar1;
int iVar2;
int8 uVar3;
char *pcVar4;
lVar1 = *(long *)(param_1 + 0x90);
if ((param_2 == 0x4e) || (param_2 == 0x3b)) {
if (*(short *)(lVar1 + 0x84) < 0) {
pcVar4 = "invalid variable name in strict mode";
goto LAB_0016a032;
}
}
else if ((param_2 == 0x2d) && (*(char *)(lVar1 + 0x84) == '\x01')) {
pcVar4 = "yield is a reserved identifier";
goto LAB_0016a032;
}
if (-0x38 < param_3) {
if ((param_3 != -0x2f) && (param_3 != -0x37)) goto LAB_0016a09f;
if (param_2 == 0x46) {
if (((*(int *)(lVar1 + 0xe8) == 1) && (*(int *)(lVar1 + 0x40) != 0)) &&
(*(long *)(lVar1 + 0x220) == 0)) {
pcVar4 = "\'int\' already declared";
goto LAB_0016a032;
}
}
else if (param_2 == 0x27) {
pcVar4 = "invalid lexical variable name \'let\'";
LAB_0016a032:
js_parse_error(param_1,pcVar4);
return -1;
}
if (-0x38 < param_3) {
uVar3 = 1;
if (param_3 != -0x2f) {
if (param_3 != -0x37) goto LAB_0016a09f;
uVar3 = 2;
}
goto LAB_0016a074;
}
}
if (param_3 == -0x4f) {
uVar3 = 6;
}
else {
if (param_3 != -0x3d) {
LAB_0016a09f:
/* WARNING: Subroutine does not return */
abort();
}
uVar3 = 5;
}
LAB_0016a074:
iVar2 = define_var(param_1,lVar1,param_2,uVar3);
return iVar2 >> 0x1f;
}
|
|
7,682 |
free_root
|
eloqsql/mysys/my_alloc.c
|
void free_root(MEM_ROOT *root, myf MyFlags)
{
reg1 USED_MEM *next,*old;
DBUG_ENTER("free_root");
DBUG_PRINT("enter",("root: %p flags: %lu", root, MyFlags));
#if !(defined(HAVE_valgrind) && defined(EXTRA_DEBUG))
/*
There is no point in using mark_blocks_free when using valgrind as
it will not reclaim any memory
*/
if (MyFlags & MY_MARK_BLOCKS_FREE)
{
mark_blocks_free(root);
DBUG_VOID_RETURN;
}
#endif
if (!(MyFlags & MY_KEEP_PREALLOC))
root->pre_alloc=0;
for (next=root->used; next ;)
{
old=next; next= next->next ;
if (old != root->pre_alloc)
my_free(old);
}
for (next=root->free ; next ;)
{
old=next; next= next->next;
if (old != root->pre_alloc)
my_free(old);
}
root->used=root->free=0;
if (root->pre_alloc)
{
root->free=root->pre_alloc;
root->free->left=root->pre_alloc->size-ALIGN_SIZE(sizeof(USED_MEM));
TRASH_MEM(root->pre_alloc);
root->free->next=0;
}
root->block_num= 4;
root->first_block_usage= 0;
DBUG_VOID_RETURN;
}
|
O3
|
c
|
free_root:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
testb $0x2, %sil
jne 0x4d904
testb $0x1, %sil
jne 0x4d89d
movq $0x0, 0x10(%rbx)
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x4d8bc
movq (%rdi), %r14
cmpq 0x10(%rbx), %rdi
je 0x4d8b4
callq 0x45546
movq %r14, %rdi
testq %r14, %r14
jne 0x4d8a6
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x4d8da
movq (%rdi), %r14
cmpq 0x10(%rbx), %rdi
je 0x4d8d2
callq 0x45546
movq %r14, %rdi
testq %r14, %r14
jne 0x4d8c4
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0x4d94e
movq %rax, (%rbx)
movq 0x10(%rax), %rcx
addq $-0x18, %rcx
movq %rcx, 0x8(%rax)
movq (%rbx), %rax
movq $0x0, (%rax)
jmp 0x4d94e
movq (%rbx), %rax
movq %rbx, %rcx
testq %rax, %rax
je 0x4d923
movq %rax, %rcx
movq (%rax), %rax
movq 0x10(%rcx), %rdx
addq $-0x18, %rdx
movq %rdx, 0x8(%rcx)
jmp 0x4d90a
movq 0x8(%rbx), %rax
movq %rax, (%rcx)
testq %rax, %rax
je 0x4d946
movq (%rax), %rcx
movq 0x10(%rax), %rdx
addq $-0x18, %rdx
movq %rdx, 0x8(%rax)
movq %rcx, %rax
testq %rcx, %rcx
jne 0x4d92f
movq $0x0, 0x8(%rbx)
movq $0x4, 0x28(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
|
free_root:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rdi
test sil, 2
jnz short loc_4D904
test sil, 1
jnz short loc_4D89D
mov qword ptr [rbx+10h], 0
loc_4D89D:
mov rdi, [rbx+8]
test rdi, rdi
jz short loc_4D8BC
loc_4D8A6:
mov r14, [rdi]
cmp rdi, [rbx+10h]
jz short loc_4D8B4
call my_free
loc_4D8B4:
mov rdi, r14
test r14, r14
jnz short loc_4D8A6
loc_4D8BC:
mov rdi, [rbx]
test rdi, rdi
jz short loc_4D8DA
loc_4D8C4:
mov r14, [rdi]
cmp rdi, [rbx+10h]
jz short loc_4D8D2
call my_free
loc_4D8D2:
mov rdi, r14
test r14, r14
jnz short loc_4D8C4
loc_4D8DA:
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
mov rax, [rbx+10h]
test rax, rax
jz short loc_4D94E
mov [rbx], rax
mov rcx, [rax+10h]
add rcx, 0FFFFFFFFFFFFFFE8h
mov [rax+8], rcx
mov rax, [rbx]
mov qword ptr [rax], 0
jmp short loc_4D94E
loc_4D904:
mov rax, [rbx]
mov rcx, rbx
loc_4D90A:
test rax, rax
jz short loc_4D923
mov rcx, rax
mov rax, [rax]
mov rdx, [rcx+10h]
add rdx, 0FFFFFFFFFFFFFFE8h
mov [rcx+8], rdx
jmp short loc_4D90A
loc_4D923:
mov rax, [rbx+8]
mov [rcx], rax
test rax, rax
jz short loc_4D946
loc_4D92F:
mov rcx, [rax]
mov rdx, [rax+10h]
add rdx, 0FFFFFFFFFFFFFFE8h
mov [rax+8], rdx
mov rax, rcx
test rcx, rcx
jnz short loc_4D92F
loc_4D946:
mov qword ptr [rbx+8], 0
loc_4D94E:
mov qword ptr [rbx+28h], 4
pop rbx
pop r14
pop rbp
retn
|
_QWORD * free_root(_QWORD *a1, char a2)
{
_QWORD *v3; // rdi
_QWORD *v4; // r14
_QWORD *v5; // rdi
_QWORD *v6; // r14
_QWORD *result; // rax
_QWORD *v8; // rax
_QWORD *v9; // rcx
_QWORD *v10; // rcx
if ( (a2 & 2) != 0 )
{
v8 = (_QWORD *)*a1;
v9 = a1;
while ( v8 )
{
v9 = v8;
v8 = (_QWORD *)*v8;
v9[1] = v9[2] - 24LL;
}
result = (_QWORD *)a1[1];
*v9 = result;
if ( result )
{
do
{
v10 = (_QWORD *)*result;
result[1] = result[2] - 24LL;
result = v10;
}
while ( v10 );
}
a1[1] = 0LL;
}
else
{
if ( (a2 & 1) == 0 )
a1[2] = 0LL;
v3 = (_QWORD *)a1[1];
if ( v3 )
{
do
{
v4 = (_QWORD *)*v3;
if ( v3 != (_QWORD *)a1[2] )
my_free((long long)v3);
v3 = v4;
}
while ( v4 );
}
v5 = (_QWORD *)*a1;
if ( *a1 )
{
do
{
v6 = (_QWORD *)*v5;
if ( v5 != (_QWORD *)a1[2] )
my_free((long long)v5);
v5 = v6;
}
while ( v6 );
}
*(_OWORD *)a1 = 0LL;
result = (_QWORD *)a1[2];
if ( result )
{
*a1 = result;
result[1] = result[2] - 24LL;
result = (_QWORD *)*a1;
*(_QWORD *)*a1 = 0LL;
}
}
a1[5] = 4LL;
return result;
}
|
free_root:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RDI
TEST SIL,0x2
JNZ 0x0014d904
TEST SIL,0x1
JNZ 0x0014d89d
MOV qword ptr [RBX + 0x10],0x0
LAB_0014d89d:
MOV RDI,qword ptr [RBX + 0x8]
TEST RDI,RDI
JZ 0x0014d8bc
LAB_0014d8a6:
MOV R14,qword ptr [RDI]
CMP RDI,qword ptr [RBX + 0x10]
JZ 0x0014d8b4
CALL 0x00145546
LAB_0014d8b4:
MOV RDI,R14
TEST R14,R14
JNZ 0x0014d8a6
LAB_0014d8bc:
MOV RDI,qword ptr [RBX]
TEST RDI,RDI
JZ 0x0014d8da
LAB_0014d8c4:
MOV R14,qword ptr [RDI]
CMP RDI,qword ptr [RBX + 0x10]
JZ 0x0014d8d2
CALL 0x00145546
LAB_0014d8d2:
MOV RDI,R14
TEST R14,R14
JNZ 0x0014d8c4
LAB_0014d8da:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
MOV RAX,qword ptr [RBX + 0x10]
TEST RAX,RAX
JZ 0x0014d94e
MOV qword ptr [RBX],RAX
MOV RCX,qword ptr [RAX + 0x10]
ADD RCX,-0x18
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBX]
MOV qword ptr [RAX],0x0
JMP 0x0014d94e
LAB_0014d904:
MOV RAX,qword ptr [RBX]
MOV RCX,RBX
LAB_0014d90a:
TEST RAX,RAX
JZ 0x0014d923
MOV RCX,RAX
MOV RAX,qword ptr [RAX]
MOV RDX,qword ptr [RCX + 0x10]
ADD RDX,-0x18
MOV qword ptr [RCX + 0x8],RDX
JMP 0x0014d90a
LAB_0014d923:
MOV RAX,qword ptr [RBX + 0x8]
MOV qword ptr [RCX],RAX
TEST RAX,RAX
JZ 0x0014d946
LAB_0014d92f:
MOV RCX,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x10]
ADD RDX,-0x18
MOV qword ptr [RAX + 0x8],RDX
MOV RAX,RCX
TEST RCX,RCX
JNZ 0x0014d92f
LAB_0014d946:
MOV qword ptr [RBX + 0x8],0x0
LAB_0014d94e:
MOV qword ptr [RBX + 0x28],0x4
POP RBX
POP R14
POP RBP
RET
|
void free_root(long *param_1,byte param_2)
{
int8 *puVar1;
long lVar2;
int8 *puVar3;
long *plVar4;
long *plVar5;
long *plVar6;
bool bVar7;
if ((param_2 & 2) == 0) {
if ((param_2 & 1) == 0) {
param_1[2] = 0;
}
puVar3 = (int8 *)param_1[1];
while (puVar3 != (int8 *)0x0) {
puVar1 = (int8 *)*puVar3;
bVar7 = puVar3 != (int8 *)param_1[2];
puVar3 = puVar1;
if (bVar7) {
my_free();
}
}
puVar3 = (int8 *)*param_1;
while (puVar3 != (int8 *)0x0) {
puVar1 = (int8 *)*puVar3;
bVar7 = puVar3 != (int8 *)param_1[2];
puVar3 = puVar1;
if (bVar7) {
my_free();
}
}
*param_1 = 0;
param_1[1] = 0;
lVar2 = param_1[2];
if (lVar2 != 0) {
*param_1 = lVar2;
*(long *)(lVar2 + 8) = *(long *)(lVar2 + 0x10) + -0x18;
*(int8 *)*param_1 = 0;
}
}
else {
plVar4 = (long *)*param_1;
plVar6 = param_1;
while (plVar5 = plVar4, plVar5 != (long *)0x0) {
plVar5[1] = plVar5[2] + -0x18;
plVar4 = (long *)*plVar5;
plVar6 = plVar5;
}
puVar3 = (int8 *)param_1[1];
*plVar6 = (long)puVar3;
while (puVar3 != (int8 *)0x0) {
puVar3[1] = puVar3[2] + -0x18;
puVar3 = (int8 *)*puVar3;
}
param_1[1] = 0;
}
param_1[5] = 4;
return;
}
|
|
7,683 |
exec_REDO_LOGREC_REDO_REPAIR_TABLE
|
eloqsql/storage/maria/ma_recovery.c
|
prototype_redo_exec_hook(REDO_REPAIR_TABLE)
{
int error= 1;
MARIA_HA *info;
HA_CHECK param;
char *name;
my_bool quick_repair;
DBUG_ENTER("exec_REDO_LOGREC_REDO_REPAIR_TABLE");
/* We try to get table first, so that we get the table in in the trace log */
info= get_MARIA_HA_from_REDO_record(rec);
if (skip_DDLs)
{
/*
REPAIR is not exactly a DDL, but it manipulates files without logging
insertions into them.
*/
tprint(tracef, "we skip DDLs\n");
DBUG_RETURN(0);
}
if (!info)
{
/* no such table, don't need to warn */
DBUG_RETURN(0);
}
if (maria_is_crashed(info))
{
tprint(tracef, "we skip repairing crashed table\n");
DBUG_RETURN(0);
}
/*
Otherwise, the mapping is newer than the table, and our record is newer
than the mapping, so we can repair.
*/
tprint(tracef, " repairing...\n");
maria_chk_init(¶m);
param.isam_file_name= name= info->s->open_file_name.str;
param.testflag= uint8korr(rec->header + FILEID_STORE_SIZE);
param.tmpdir= maria_tmpdir;
param.max_trid= max_long_trid;
DBUG_ASSERT(maria_tmpdir);
info->s->state.key_map= uint8korr(rec->header + FILEID_STORE_SIZE + 8);
quick_repair= MY_TEST(param.testflag & T_QUICK);
if (param.testflag & T_REP_PARALLEL)
{
if (maria_repair_parallel(¶m, info, name, quick_repair))
goto end;
}
else if (param.testflag & T_REP_BY_SORT)
{
if (maria_repair_by_sort(¶m, info, name, quick_repair))
goto end;
}
else if (maria_repair(¶m, info, name, quick_repair))
goto end;
if (_ma_update_state_lsns(info->s, rec->lsn, trnman_get_min_safe_trid(),
TRUE, !(param.testflag & T_NO_CREATE_RENAME_LSN)))
goto end;
error= 0;
end:
DBUG_RETURN(error);
}
|
O0
|
c
|
exec_REDO_LOGREC_REDO_REPAIR_TABLE:
pushq %rbp
movq %rsp, %rbp
subq $0x20d90, %rsp # imm = 0x20D90
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x20d58(%rbp)
movl $0x1, -0x20d5c(%rbp)
movq -0x20d58(%rbp), %rdi
callq 0xc17f0
movq %rax, -0x20d68(%rbp)
cmpb $0x0, 0xc1e6b1(%rip) # 0xcdc9d4
je 0xbe34c
leaq 0xc1e7ec(%rip), %rax # 0xcdcb18
movq (%rax), %rdi
leaq 0xcf0d9(%rip), %rsi # 0x18d40f
movb $0x0, %al
callq 0xc2dd0
movl $0x0, -0x20d4c(%rbp)
jmp 0xbe58c
cmpq $0x0, -0x20d68(%rbp)
jne 0xbe367
jmp 0xbe358
movl $0x0, -0x20d4c(%rbp)
jmp 0xbe58c
movq -0x20d68(%rbp), %rax
movq (%rax), %rax
movl 0x170(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0xbe3a6
leaq 0xc1e792(%rip), %rax # 0xcdcb18
movq (%rax), %rdi
leaq 0xcf527(%rip), %rsi # 0x18d8b7
movb $0x0, %al
callq 0xc2dd0
movl $0x0, -0x20d4c(%rbp)
jmp 0xbe58c
leaq 0xc1e76b(%rip), %rax # 0xcdcb18
movq (%rax), %rdi
leaq 0xcf521(%rip), %rsi # 0x18d8d8
movb $0x0, %al
callq 0xc2dd0
leaq -0x20d48(%rbp), %rdi
callq 0x793e0
movq -0x20d68(%rbp), %rax
movq (%rax), %rax
movq 0x5e0(%rax), %rax
movq %rax, -0x20d70(%rbp)
movq %rax, -0x20d48(%rbp)
movq -0x20d58(%rbp), %rax
movq 0x1a(%rax), %rax
movq %rax, -0x20238(%rbp)
leaq 0x41bba6(%rip), %rax # 0x4d9fa8
movq (%rax), %rax
movq %rax, -0x20d40(%rbp)
movq 0xc1e58d(%rip), %rax # 0xcdc9a0
movq %rax, -0x20230(%rbp)
jmp 0xbe41c
movq -0x20d58(%rbp), %rax
movq 0x22(%rax), %rcx
movq -0x20d68(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x140(%rax)
movq -0x20238(%rbp), %rdx
andq $0x8000, %rdx # imm = 0x8000
xorl %eax, %eax
movl $0x1, %ecx
cmpq $0x0, %rdx
cmovnel %ecx, %eax
movb %al, -0x20d71(%rbp)
movq -0x20238(%rbp), %rax
andq $0x80000, %rax # imm = 0x80000
cmpq $0x0, %rax
je 0xbe49a
movq -0x20d68(%rbp), %rsi
movq -0x20d70(%rbp), %rdx
leaq -0x20d48(%rbp), %rdi
movsbl -0x20d71(%rbp), %ecx
callq 0x87dc0
cmpl $0x0, %eax
je 0xbe498
jmp 0xbe57e
jmp 0xbe506
movq -0x20238(%rbp), %rax
andq $0x40000, %rax # imm = 0x40000
cmpq $0x0, %rax
je 0xbe4da
movq -0x20d68(%rbp), %rsi
movq -0x20d70(%rbp), %rdx
leaq -0x20d48(%rbp), %rdi
movsbl -0x20d71(%rbp), %ecx
callq 0x85b70
cmpl $0x0, %eax
je 0xbe4d8
jmp 0xbe57e
jmp 0xbe504
movq -0x20d68(%rbp), %rsi
movq -0x20d70(%rbp), %rdx
leaq -0x20d48(%rbp), %rdi
movsbl -0x20d71(%rbp), %ecx
callq 0x7f1f0
cmpl $0x0, %eax
je 0xbe502
jmp 0xbe57e
jmp 0xbe504
jmp 0xbe506
movq -0x20d68(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20d88(%rbp)
movq -0x20d58(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20d80(%rbp)
movb $0x0, %al
callq 0x93e30
movq -0x20d88(%rbp), %rdi
movq -0x20d80(%rbp), %rsi
movq %rax, %rdx
movabsq $0x400000000, %rax # imm = 0x400000000
andq -0x20238(%rbp), %rax
cmpq $0x0, %rax
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movl $0x1, %ecx
movsbl %al, %r8d
callq 0x78b60
cmpl $0x0, %eax
je 0xbe574
jmp 0xbe57e
movl $0x0, -0x20d5c(%rbp)
jmp 0xbe580
movl -0x20d5c(%rbp), %eax
movl %eax, -0x20d4c(%rbp)
movl -0x20d4c(%rbp), %eax
movl %eax, -0x20d8c(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0xbe5b9
movl -0x20d8c(%rbp), %eax
addq $0x20d90, %rsp # imm = 0x20D90
popq %rbp
retq
callq 0x2c290
nop
|
exec_REDO_LOGREC_REDO_REPAIR_TABLE:
push rbp
mov rbp, rsp
sub rsp, 20D90h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_20D58], rdi
mov [rbp+var_20D5C], 1
mov rdi, [rbp+var_20D58]
call get_MARIA_HA_from_REDO_record
mov [rbp+var_20D68], rax
cmp cs:skip_DDLs, 0
jz short loc_BE34C
lea rax, tracef
mov rdi, [rax]
lea rsi, aWeSkipDdls; "we skip DDLs\n"
mov al, 0
call tprint
mov [rbp+var_20D4C], 0
jmp loc_BE58C
loc_BE34C:
cmp [rbp+var_20D68], 0
jnz short loc_BE367
jmp short $+2
loc_BE358:
mov [rbp+var_20D4C], 0
jmp loc_BE58C
loc_BE367:
mov rax, [rbp+var_20D68]
mov rax, [rax]
mov eax, [rax+170h]
and eax, 2
cmp eax, 0
jz short loc_BE3A6
lea rax, tracef
mov rdi, [rax]
lea rsi, aWeSkipRepairin; "we skip repairing crashed table\n"
mov al, 0
call tprint
mov [rbp+var_20D4C], 0
jmp loc_BE58C
loc_BE3A6:
lea rax, tracef
mov rdi, [rax]
lea rsi, aRepairing; " repairing...\n"
mov al, 0
call tprint
lea rdi, [rbp+var_20D48]
call maria_chk_init
mov rax, [rbp+var_20D68]
mov rax, [rax]
mov rax, [rax+5E0h]
mov [rbp+var_20D70], rax
mov [rbp+var_20D48], rax
mov rax, [rbp+var_20D58]
mov rax, [rax+1Ah]
mov [rbp+var_20238], rax
lea rax, maria_tmpdir
mov rax, [rax]
mov [rbp+var_20D40], rax
mov rax, cs:max_long_trid
mov [rbp+var_20230], rax
jmp short $+2
loc_BE41C:
mov rax, [rbp+var_20D58]
mov rcx, [rax+22h]
mov rax, [rbp+var_20D68]
mov rax, [rax]
mov [rax+140h], rcx
mov rdx, [rbp+var_20238]
and rdx, 8000h
xor eax, eax
mov ecx, 1
cmp rdx, 0
cmovnz eax, ecx
mov [rbp+var_20D71], al
mov rax, [rbp+var_20238]
and rax, 80000h
cmp rax, 0
jz short loc_BE49A
mov rsi, [rbp+var_20D68]
mov rdx, [rbp+var_20D70]
lea rdi, [rbp+var_20D48]
movsx ecx, [rbp+var_20D71]
call maria_repair_parallel
cmp eax, 0
jz short loc_BE498
jmp loc_BE57E
loc_BE498:
jmp short loc_BE506
loc_BE49A:
mov rax, [rbp+var_20238]
and rax, 40000h
cmp rax, 0
jz short loc_BE4DA
mov rsi, [rbp+var_20D68]
mov rdx, [rbp+var_20D70]
lea rdi, [rbp+var_20D48]
movsx ecx, [rbp+var_20D71]
call maria_repair_by_sort
cmp eax, 0
jz short loc_BE4D8
jmp loc_BE57E
loc_BE4D8:
jmp short loc_BE504
loc_BE4DA:
mov rsi, [rbp+var_20D68]
mov rdx, [rbp+var_20D70]
lea rdi, [rbp+var_20D48]
movsx ecx, [rbp+var_20D71]
call maria_repair
cmp eax, 0
jz short loc_BE502
jmp short loc_BE57E
loc_BE502:
jmp short $+2
loc_BE504:
jmp short $+2
loc_BE506:
mov rax, [rbp+var_20D68]
mov rax, [rax]
mov [rbp+var_20D88], rax
mov rax, [rbp+var_20D58]
mov rax, [rax]
mov [rbp+var_20D80], rax
mov al, 0
call trnman_get_min_safe_trid
mov rdi, [rbp+var_20D88]
mov rsi, [rbp+var_20D80]
mov rdx, rax
mov rax, 400000000h
and rax, [rbp+var_20238]
cmp rax, 0
setnz al
xor al, 0FFh
and al, 1
movzx eax, al
mov ecx, 1
movsx r8d, al
call _ma_update_state_lsns
cmp eax, 0
jz short loc_BE574
jmp short loc_BE57E
loc_BE574:
mov [rbp+var_20D5C], 0
loc_BE57E:
jmp short $+2
loc_BE580:
mov eax, [rbp+var_20D5C]
mov [rbp+var_20D4C], eax
loc_BE58C:
mov eax, [rbp+var_20D4C]
mov [rbp+var_20D8C], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_BE5B9
mov eax, [rbp+var_20D8C]
add rsp, 20D90h
pop rbp
retn
loc_BE5B9:
call ___stack_chk_fail
|
long long exec_REDO_LOGREC_REDO_REPAIR_TABLE(
long long *a1,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
double a6,
double a7,
__m128 a8,
__m128 a9)
{
int v9; // edx
int v10; // ecx
int v11; // r8d
int v12; // r9d
double v13; // xmm4_8
double v14; // xmm5_8
char v15; // al
long long min_safe_trid; // rax
long long v18; // [rsp+8h] [rbp-20D88h]
long long v19; // [rsp+10h] [rbp-20D80h]
const char *v20; // [rsp+20h] [rbp-20D70h]
long long *MARIA_HA_from_REDO_record; // [rsp+28h] [rbp-20D68h]
unsigned int v22; // [rsp+34h] [rbp-20D5Ch]
_QWORD v24[354]; // [rsp+48h] [rbp-20D48h] BYREF
long long v25; // [rsp+B58h] [rbp-20238h]
long long v26; // [rsp+B60h] [rbp-20230h]
unsigned long long v27; // [rsp+20D88h] [rbp-8h]
v27 = __readfsqword(0x28u);
v22 = 1;
MARIA_HA_from_REDO_record = (long long *)get_MARIA_HA_from_REDO_record(a1);
if ( !skip_DDLs )
{
if ( !MARIA_HA_from_REDO_record )
return 0;
if ( (*(_DWORD *)(*MARIA_HA_from_REDO_record + 368) & 2) != 0 )
{
tprint(tracef, (unsigned int)"we skip repairing crashed table\n", v9, v10, v11, v12);
return 0;
}
tprint(tracef, (unsigned int)" repairing...\n", v9, v10, v11, v12);
maria_chk_init((long long)v24);
v20 = *(const char **)(*MARIA_HA_from_REDO_record + 1504);
v24[0] = v20;
v25 = *(long long *)((char *)a1 + 26);
v24[1] = maria_tmpdir;
v26 = max_long_trid;
*(_QWORD *)(*MARIA_HA_from_REDO_record + 320) = *(long long *)((char *)a1 + 34);
v15 = (v25 & 0x8000u) != 0LL;
if ( (v25 & 0x80000) != 0 )
{
if ( !(unsigned int)maria_repair_parallel(
(long long)v24,
MARIA_HA_from_REDO_record,
v20,
v15,
a2,
a3,
a4,
a5,
v13,
v14,
a8,
a9) )
goto LABEL_14;
}
else if ( (v25 & 0x40000) != 0 )
{
if ( !(unsigned int)maria_repair_by_sort(
(long long)v24,
MARIA_HA_from_REDO_record,
v20,
v15,
a2,
a3,
a4,
a5,
v13,
v14,
a8,
a9) )
{
LABEL_14:
v18 = *MARIA_HA_from_REDO_record;
v19 = *a1;
min_safe_trid = trnman_get_min_safe_trid();
if ( !(unsigned int)ma_update_state_lsns(v18, v19, min_safe_trid, 1, (v25 & 0x400000000LL) == 0) )
return 0;
}
}
else if ( !(unsigned int)maria_repair(
(long long)v24,
MARIA_HA_from_REDO_record,
v20,
v15,
a2,
a3,
a4,
a5,
v13,
v14,
a8,
a9) )
{
goto LABEL_14;
}
return v22;
}
tprint(tracef, (unsigned int)"we skip DDLs\n", v9, v10, v11, v12);
return 0;
}
|
exec_REDO_LOGREC_REDO_REPAIR_TABLE:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20d90
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x20d58],RDI
MOV dword ptr [RBP + -0x20d5c],0x1
MOV RDI,qword ptr [RBP + -0x20d58]
CALL 0x001c17f0
MOV qword ptr [RBP + -0x20d68],RAX
CMP byte ptr [0x00ddc9d4],0x0
JZ 0x001be34c
LEA RAX,[0xddcb18]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x28d40f]
MOV AL,0x0
CALL 0x001c2dd0
MOV dword ptr [RBP + -0x20d4c],0x0
JMP 0x001be58c
LAB_001be34c:
CMP qword ptr [RBP + -0x20d68],0x0
JNZ 0x001be367
JMP 0x001be358
LAB_001be358:
MOV dword ptr [RBP + -0x20d4c],0x0
JMP 0x001be58c
LAB_001be367:
MOV RAX,qword ptr [RBP + -0x20d68]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x170]
AND EAX,0x2
CMP EAX,0x0
JZ 0x001be3a6
LEA RAX,[0xddcb18]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x28d8b7]
MOV AL,0x0
CALL 0x001c2dd0
MOV dword ptr [RBP + -0x20d4c],0x0
JMP 0x001be58c
LAB_001be3a6:
LEA RAX,[0xddcb18]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x28d8d8]
MOV AL,0x0
CALL 0x001c2dd0
LEA RDI,[RBP + -0x20d48]
CALL 0x001793e0
MOV RAX,qword ptr [RBP + -0x20d68]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x5e0]
MOV qword ptr [RBP + -0x20d70],RAX
MOV qword ptr [RBP + -0x20d48],RAX
MOV RAX,qword ptr [RBP + -0x20d58]
MOV RAX,qword ptr [RAX + 0x1a]
MOV qword ptr [RBP + -0x20238],RAX
LEA RAX,[0x5d9fa8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20d40],RAX
MOV RAX,qword ptr [0x00ddc9a0]
MOV qword ptr [RBP + -0x20230],RAX
JMP 0x001be41c
LAB_001be41c:
MOV RAX,qword ptr [RBP + -0x20d58]
MOV RCX,qword ptr [RAX + 0x22]
MOV RAX,qword ptr [RBP + -0x20d68]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RAX + 0x140],RCX
MOV RDX,qword ptr [RBP + -0x20238]
AND RDX,0x8000
XOR EAX,EAX
MOV ECX,0x1
CMP RDX,0x0
CMOVNZ EAX,ECX
MOV byte ptr [RBP + -0x20d71],AL
MOV RAX,qword ptr [RBP + -0x20238]
AND RAX,0x80000
CMP RAX,0x0
JZ 0x001be49a
MOV RSI,qword ptr [RBP + -0x20d68]
MOV RDX,qword ptr [RBP + -0x20d70]
LEA RDI,[RBP + -0x20d48]
MOVSX ECX,byte ptr [RBP + -0x20d71]
CALL 0x00187dc0
CMP EAX,0x0
JZ 0x001be498
JMP 0x001be57e
LAB_001be498:
JMP 0x001be506
LAB_001be49a:
MOV RAX,qword ptr [RBP + -0x20238]
AND RAX,0x40000
CMP RAX,0x0
JZ 0x001be4da
MOV RSI,qword ptr [RBP + -0x20d68]
MOV RDX,qword ptr [RBP + -0x20d70]
LEA RDI,[RBP + -0x20d48]
MOVSX ECX,byte ptr [RBP + -0x20d71]
CALL 0x00185b70
CMP EAX,0x0
JZ 0x001be4d8
JMP 0x001be57e
LAB_001be4d8:
JMP 0x001be504
LAB_001be4da:
MOV RSI,qword ptr [RBP + -0x20d68]
MOV RDX,qword ptr [RBP + -0x20d70]
LEA RDI,[RBP + -0x20d48]
MOVSX ECX,byte ptr [RBP + -0x20d71]
CALL 0x0017f1f0
CMP EAX,0x0
JZ 0x001be502
JMP 0x001be57e
LAB_001be502:
JMP 0x001be504
LAB_001be504:
JMP 0x001be506
LAB_001be506:
MOV RAX,qword ptr [RBP + -0x20d68]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20d88],RAX
MOV RAX,qword ptr [RBP + -0x20d58]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20d80],RAX
MOV AL,0x0
CALL 0x00193e30
MOV RDI,qword ptr [RBP + -0x20d88]
MOV RSI,qword ptr [RBP + -0x20d80]
MOV RDX,RAX
MOV RAX,0x400000000
AND RAX,qword ptr [RBP + -0x20238]
CMP RAX,0x0
SETNZ AL
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
MOV ECX,0x1
MOVSX R8D,AL
CALL 0x00178b60
CMP EAX,0x0
JZ 0x001be574
JMP 0x001be57e
LAB_001be574:
MOV dword ptr [RBP + -0x20d5c],0x0
LAB_001be57e:
JMP 0x001be580
LAB_001be580:
MOV EAX,dword ptr [RBP + -0x20d5c]
MOV dword ptr [RBP + -0x20d4c],EAX
LAB_001be58c:
MOV EAX,dword ptr [RBP + -0x20d4c]
MOV dword ptr [RBP + -0x20d8c],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001be5b9
MOV EAX,dword ptr [RBP + -0x20d8c]
ADD RSP,0x20d90
POP RBP
RET
LAB_001be5b9:
CALL 0x0012c290
|
int4 exec_REDO_LOGREC_REDO_REPAIR_TABLE(int8 *param_1)
{
long lVar1;
long lVar2;
int8 uVar3;
int iVar4;
long *plVar5;
int8 uVar6;
long in_FS_OFFSET;
bool bVar7;
int4 uStack_20d64;
int4 uStack_20d54;
int8 uStack_20d50;
int8 uStack_20d48;
ulong uStack_20240;
int8 uStack_20238;
lVar1 = *(long *)(in_FS_OFFSET + 0x28);
uStack_20d64 = 1;
plVar5 = (long *)get_MARIA_HA_from_REDO_record(param_1);
if (skip_DDLs == '\0') {
if (plVar5 == (long *)0x0) {
uStack_20d54 = 0;
}
else if ((*(uint *)(*plVar5 + 0x170) & 2) == 0) {
tprint(tracef," repairing...\n");
maria_chk_init(&uStack_20d50);
uStack_20d50 = *(int8 *)(*plVar5 + 0x5e0);
uStack_20240 = *(ulong *)((long)param_1 + 0x1a);
uStack_20d48 = maria_tmpdir;
uStack_20238 = max_long_trid;
*(int8 *)(*plVar5 + 0x140) = *(int8 *)((long)param_1 + 0x22);
bVar7 = (uStack_20240 & 0x8000) != 0;
if ((uStack_20240 & 0x80000) == 0) {
if ((uStack_20240 & 0x40000) == 0) {
iVar4 = maria_repair(&uStack_20d50,plVar5,uStack_20d50,bVar7);
}
else {
iVar4 = maria_repair_by_sort(&uStack_20d50,plVar5,uStack_20d50,bVar7);
}
}
else {
iVar4 = maria_repair_parallel(&uStack_20d50,plVar5,uStack_20d50,bVar7);
}
if (iVar4 == 0) {
lVar2 = *plVar5;
uVar3 = *param_1;
uVar6 = trnman_get_min_safe_trid();
iVar4 = _ma_update_state_lsns
(lVar2,uVar3,uVar6,1,((uStack_20240 & 0x400000000) != 0 ^ 0xffU) & 1);
if (iVar4 == 0) {
uStack_20d64 = 0;
}
}
uStack_20d54 = uStack_20d64;
}
else {
tprint(tracef,"we skip repairing crashed table\n");
uStack_20d54 = 0;
}
}
else {
tprint(tracef,"we skip DDLs\n");
uStack_20d54 = 0;
}
if (*(long *)(in_FS_OFFSET + 0x28) == lVar1) {
return uStack_20d54;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
7,684 |
CLI::detail::ltrim(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
|
MikePodsytnik[P]TCRtrie/build_O2/_deps/cli11-src/include/CLI/impl/StringTools_inl.hpp
|
CLI11_INLINE std::string <rim(std::string &str) {
auto it = std::find_if(str.begin(), str.end(), [](char ch) { return !std::isspace<char>(ch, std::locale()); });
str.erase(str.begin(), it);
return str;
}
|
O2
|
cpp
|
CLI::detail::ltrim(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&):
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
movq 0x8(%rbx), %rsi
addq %rdi, %rsi
callq 0x13dff
movq (%rbx), %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0x70c0
movq %rbx, %rax
popq %rbx
retq
|
_ZN3CLI6detail5ltrimERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbx
mov rbx, rdi
mov rdi, [rdi]
mov rsi, [rbx+8]
add rsi, rdi
call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS0_5__ops10_Iter_predIZN3CLI6detail5ltrimERS8_EUlcE_EEET_SH_SH_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<char *,std::string>,__gnu_cxx::__ops::_Iter_pred<CLI::detail::ltrim(std::string&)::{lambda(char)#1}>>(__gnu_cxx::__normal_iterator<char *,std::string>,__gnu_cxx::__normal_iterator<char *,std::string>,__gnu_cxx::__ops::_Iter_pred<CLI::detail::ltrim(std::string&)::{lambda(char)#1}>,std::random_access_iterator_tag)
mov rsi, [rbx]
mov rdi, rbx
mov rdx, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5eraseEN9__gnu_cxx17__normal_iteratorIPKcS4_EES9_; std::string::erase(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>)
mov rax, rbx
pop rbx
retn
|
_QWORD * CLI::detail::ltrim(_QWORD *a1)
{
long long v1; // rax
v1 = std::__find_if<__gnu_cxx::__normal_iterator<char *,std::string>,__gnu_cxx::__ops::_Iter_pred<CLI::detail::ltrim(std::string&)::{lambda(char)#1}>>(
*a1,
*a1 + a1[1]);
std::string::erase(a1, *a1, v1);
return a1;
}
|
ltrim:
PUSH RBX
MOV RBX,RDI
MOV RDI,qword ptr [RDI]
MOV RSI,qword ptr [RBX + 0x8]
ADD RSI,RDI
CALL 0x00113dff
MOV RSI,qword ptr [RBX]
MOV RDI,RBX
MOV RDX,RAX
CALL 0x001070c0
MOV RAX,RBX
POP RBX
RET
|
/* CLI::detail::ltrim(std::__cxx11::string&) */
string * CLI::detail::ltrim(string *param_1)
{
int8 uVar1;
uVar1 = std::
__find_if<__gnu_cxx::__normal_iterator<char*,std::__cxx11::string>,__gnu_cxx::__ops::_Iter_pred<CLI::detail::ltrim(std::__cxx11::string&)::_lambda(char)_1_>>
(*(long *)param_1,*(long *)(param_1 + 8) + *(long *)param_1);
std::__cxx11::string::erase(param_1,*(int8 *)param_1,uVar1);
return param_1;
}
|
|
7,685 |
pagecache_file_set_null_hooks
|
eloqsql/storage/maria/ma_pagecache.c
|
void pagecache_file_set_null_hooks(PAGECACHE_FILE *file)
{
file->pre_read_hook= null_pre_hook;
file->post_read_hook= null_post_read_hook;
file->pre_write_hook= null_pre_hook;
file->post_write_hook= null_post_write_hook;
file->flush_log_callback= null_pre_hook;
file->callback_data= NULL;
file->head_blocks= file->big_block_size= 0;
}
|
O3
|
c
|
pagecache_file_set_null_hooks:
pushq %rbp
movq %rsp, %rbp
leaq 0x32(%rip), %rax # 0x34730
movq %rax, 0x18(%rdi)
leaq 0x2f(%rip), %rcx # 0x34738
movq %rcx, 0x20(%rdi)
movq %rax, 0x28(%rdi)
leaq 0x2b(%rip), %rcx # 0x34743
movq %rcx, 0x30(%rdi)
movq %rax, 0x38(%rdi)
movq $0x0, 0x40(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
popq %rbp
retq
|
pagecache_file_set_null_hooks:
push rbp
mov rbp, rsp
lea rax, null_pre_hook
mov [rdi+18h], rax
lea rcx, null_post_read_hook
mov [rdi+20h], rcx
mov [rdi+28h], rax
lea rcx, null_post_write_hook
mov [rdi+30h], rcx
mov [rdi+38h], rax
mov qword ptr [rdi+40h], 0
xorps xmm0, xmm0
movups xmmword ptr [rdi], xmm0
pop rbp
retn
|
long long ( * pagecache_file_set_null_hooks(long long a1))()
{
long long ( *result)(); // rax
result = null_pre_hook;
*(_QWORD *)(a1 + 24) = null_pre_hook;
*(_QWORD *)(a1 + 32) = null_post_read_hook;
*(_QWORD *)(a1 + 40) = null_pre_hook;
*(_QWORD *)(a1 + 48) = null_post_write_hook;
*(_QWORD *)(a1 + 56) = null_pre_hook;
*(_QWORD *)(a1 + 64) = 0LL;
*(_OWORD *)a1 = 0LL;
return result;
}
|
pagecache_file_set_null_hooks:
PUSH RBP
MOV RBP,RSP
LEA RAX,[0x134730]
MOV qword ptr [RDI + 0x18],RAX
LEA RCX,[0x134738]
MOV qword ptr [RDI + 0x20],RCX
MOV qword ptr [RDI + 0x28],RAX
LEA RCX,[0x134743]
MOV qword ptr [RDI + 0x30],RCX
MOV qword ptr [RDI + 0x38],RAX
MOV qword ptr [RDI + 0x40],0x0
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI],XMM0
POP RBP
RET
|
void pagecache_file_set_null_hooks(int8 *param_1)
{
param_1[3] = null_pre_hook;
param_1[4] = null_post_read_hook;
param_1[5] = null_pre_hook;
param_1[6] = null_post_write_hook;
param_1[7] = null_pre_hook;
param_1[8] = 0;
*param_1 = 0;
param_1[1] = 0;
return;
}
|
|
7,686 |
minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const
|
monkey531[P]llama/common/minja.hpp
|
Value do_evaluate(const std::shared_ptr<Context> & context) const override {
if (!left) throw std::runtime_error("BinaryOpExpr.left is null");
if (!right) throw std::runtime_error("BinaryOpExpr.right is null");
auto l = left->evaluate(context);
auto do_eval = [&](const Value & l) -> Value {
if (op == Op::Is || op == Op::IsNot) {
auto t = dynamic_cast<VariableExpr*>(right.get());
if (!t) throw std::runtime_error("Right side of 'is' operator must be a variable");
auto eval = [&]() {
const auto & name = t->get_name();
if (name == "none") return l.is_null();
if (name == "boolean") return l.is_boolean();
if (name == "integer") return l.is_number_integer();
if (name == "float") return l.is_number_float();
if (name == "number") return l.is_number();
if (name == "string") return l.is_string();
if (name == "mapping") return l.is_object();
if (name == "iterable") return l.is_iterable();
if (name == "sequence") return l.is_array();
if (name == "defined") return !l.is_null();
throw std::runtime_error("Unknown type for 'is' operator: " + name);
};
auto value = eval();
return Value(op == Op::Is ? value : !value);
}
if (op == Op::And) {
if (!l.to_bool()) return Value(false);
return right->evaluate(context).to_bool();
} else if (op == Op::Or) {
if (l.to_bool()) return l;
return right->evaluate(context);
}
auto r = right->evaluate(context);
switch (op) {
case Op::StrConcat: return l.to_str() + r.to_str();
case Op::Add: return l + r;
case Op::Sub: return l - r;
case Op::Mul: return l * r;
case Op::Div: return l / r;
case Op::MulMul: return std::pow(l.get<double>(), r.get<double>());
case Op::DivDiv: return l.get<int64_t>() / r.get<int64_t>();
case Op::Mod: return l.get<int64_t>() % r.get<int64_t>();
case Op::Eq: return l == r;
case Op::Ne: return l != r;
case Op::Lt: return l < r;
case Op::Gt: return l > r;
case Op::Le: return l <= r;
case Op::Ge: return l >= r;
case Op::In: return (r.is_array() || r.is_object()) && r.contains(l);
case Op::NotIn: return !(r.is_array() && r.contains(l));
default: break;
}
throw std::runtime_error("Unknown binary operator");
};
if (l.is_callable()) {
return Value::callable([l, do_eval](const std::shared_ptr<Context> & context, ArgumentsValue & args) {
auto ll = l.call(context, args);
return do_eval(ll); //args[0].second);
});
} else {
return do_eval(l);
}
}
|
O1
|
cpp
|
minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rsi, %r15
movq 0x20(%rsi), %rsi
testq %rsi, %rsi
je 0x973e7
cmpq $0x0, 0x30(%r15)
je 0x97405
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x38(%rsp), %r12
movq %r12, %rdi
callq 0x87560
movq %r15, 0x8(%rsp)
movq %r14, 0x10(%rsp)
cmpq $0x0, 0x30(%r12)
je 0x97333
leaq 0x88(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x8f06e
movups 0x8(%rsp), %xmm0
leaq 0x88(%rsp), %rsi
movups %xmm0, 0x50(%rsi)
leaq 0x18(%rsp), %rdi
callq 0x975aa
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
callq 0x9753e
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0x972c3
leaq 0x18(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0xc8(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x59052
movq %r14, %rdi
callq 0x5e83e
movq -0x8(%r14), %rdi
testq %rdi, %rdi
je 0x972eb
callq 0x6e1aa
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x972fd
callq 0x6e1aa
movq 0xa0(%rsp), %rdi
testq %rdi, %rdi
je 0x9730f
callq 0x6e1aa
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x9735c
movq 0x97c65(%rip), %rax # 0x12ef88
cmpb $0x0, (%rax)
je 0x97347
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0x97351
leaq 0x8(%rsp), %rsi
leaq 0x38(%rsp), %rdx
movq %rbx, %rdi
callq 0x97694
jmp 0x9735c
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0x9735c
movq (%rdi), %rax
callq *0x18(%rax)
leaq 0x78(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x59052
movq %r14, %rdi
callq 0x5e83e
movq -0x8(%r14), %rdi
testq %rdi, %rdi
je 0x97381
callq 0x6e1aa
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x97390
callq 0x6e1aa
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x9739f
callq 0x6e1aa
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x973d5
movq 0x97bd8(%rip), %rax # 0x12ef88
cmpb $0x0, (%rax)
je 0x973c0
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0x973ca
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0x973d5
movq (%rdi), %rax
callq *0x18(%rax)
movq %rbx, %rax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl $0x10, %edi
callq 0x1b450
movq %rax, %r14
leaq 0x5cbb5(%rip), %rsi # 0xf3fb0
movq %rax, %rdi
callq 0x1b330
jmp 0x97421
movl $0x10, %edi
callq 0x1b450
movq %rax, %r14
leaq 0x5cbb1(%rip), %rsi # 0xf3fca
movq %rax, %rdi
callq 0x1b330
movq 0x97bc8(%rip), %rsi # 0x12eff0
movq 0x97b31(%rip), %rdx # 0x12ef60
movq %r14, %rdi
callq 0x1bf30
jmp 0x97482
jmp 0x97468
jmp 0x9743d
movq %rax, %rbx
movq %r14, %rdi
callq 0x1b690
jmp 0x9748f
movq %rax, %rbx
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0x97473
leaq 0x18(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x97473
movq %rax, %rdi
callq 0x22a45
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x97608
jmp 0x97485
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x87856
movq %rbx, %rdi
callq 0x1bfb0
nop
|
_ZNK5minja12BinaryOpExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE:
push r15
push r14
push r12
push rbx
sub rsp, 0E8h
mov r15, rsi
mov rsi, [rsi+20h]
test rsi, rsi
jz loc_973E7
cmp qword ptr [r15+30h], 0
jz loc_97405
mov r14, rdx
mov rbx, rdi
lea r12, [rsp+108h+var_D0]
mov rdi, r12
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
mov qword ptr [rsp+108h+var_100], r15
mov qword ptr [rsp+108h+var_100+8], r14
cmp qword ptr [r12+30h], 0
jz loc_97333
lea rdi, [rsp+108h+var_80]; this
lea rsi, [rsp+108h+var_D0]; minja::Value *
call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&)
movups xmm0, [rsp+108h+var_100]
lea rsi, [rsp+108h+var_80]
movups xmmword ptr [rsi+50h], xmm0
lea rdi, [rsp+108h+var_F0]
call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEEC2IZNKS0_12BinaryOpExpr11do_evaluateES6_EUlS6_S8_E_vEEOT_; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::function<minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1},void>(minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1} &&)
lea rsi, [rsp+108h+var_F0]
mov rdi, rbx
call _ZN5minja5Value8callableERKSt8functionIFS0_RKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueEEE; minja::Value::callable(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)> const&)
mov rax, [rsp+108h+var_E0]
test rax, rax
jz short loc_972C3
lea rdi, [rsp+108h+var_F0]
mov rsi, rdi
mov edx, 3
call rax
loc_972C3:
lea r14, [rsp+108h+var_40]
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [r14-8]
test rdi, rdi
jz short loc_972EB
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_972EB:
mov rdi, [rsp+108h+var_58]
test rdi, rdi
jz short loc_972FD
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_972FD:
mov rdi, [rsp+108h+var_68]
test rdi, rdi
jz short loc_9730F
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9730F:
mov rdi, [rsp+108h+var_78]
test rdi, rdi
jz short loc_9735C
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_97347
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_97351
loc_97333:
lea rsi, [rsp+108h+var_100]
lea rdx, [rsp+108h+var_D0]
mov rdi, rbx; this
call _ZZNK5minja12BinaryOpExpr11do_evaluateERKSt10shared_ptrINS_7ContextEEENKUlRKNS_5ValueEE_clES8_; minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(minja::Value const&)#1}::operator()(minja::Value const&)
jmp short loc_9735C
loc_97347:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_97351:
cmp eax, 1
jnz short loc_9735C
mov rax, [rdi]
call qword ptr [rax+18h]
loc_9735C:
lea r14, [rsp+108h+var_90]
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [r14-8]
test rdi, rdi
jz short loc_97381
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_97381:
mov rdi, [rsp+108h+var_A8]
test rdi, rdi
jz short loc_97390
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_97390:
mov rdi, [rsp+108h+var_B8]
test rdi, rdi
jz short loc_9739F
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9739F:
mov rdi, [rsp+108h+var_C8]
test rdi, rdi
jz short loc_973D5
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_973C0
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_973CA
loc_973C0:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_973CA:
cmp eax, 1
jnz short loc_973D5
mov rax, [rdi]
call qword ptr [rax+18h]
loc_973D5:
mov rax, rbx
add rsp, 0E8h
pop rbx
pop r12
pop r14
pop r15
retn
loc_973E7:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aBinaryopexprLe; "BinaryOpExpr.left is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short loc_97421
loc_97405:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aBinaryopexprRi; "BinaryOpExpr.right is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
loc_97421:
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp short loc_97482
jmp short loc_97468
jmp short $+2
loc_9743D:
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_9748F
mov rbx, rax
mov rax, [rsp+108h+var_E0]
test rax, rax
jz short loc_97473
lea rdi, [rsp+108h+var_F0]
mov rsi, rdi
mov edx, 3
call rax
jmp short loc_97473
loc_97468:
mov rdi, rax
call __clang_call_terminate
mov rbx, rax
loc_97473:
lea rdi, [rsp+108h+var_80]
call _ZZNK5minja12BinaryOpExpr11do_evaluateERKSt10shared_ptrINS_7ContextEEENUlS5_RNS_14ArgumentsValueEE_D2Ev; minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1}::~ArgumentsValue()
jmp short loc_97485
loc_97482:
mov rbx, rax
loc_97485:
lea rdi, [rsp+108h+var_D0]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_9748F:
mov rdi, rbx
call __Unwind_Resume
|
minja::Value * minja::BinaryOpExpr::do_evaluate(minja::Value *this, long long a2, long long a3)
{
void (***v4)(void); // rsi
int v7; // edx
int v8; // ecx
int v9; // r8d
int v10; // r9d
long long v11; // rdi
signed __int32 v12; // eax
long long v13; // rdi
signed __int32 v14; // eax
std::runtime_error *exception; // r14
__int128 v17; // [rsp+8h] [rbp-100h]
_BYTE v18[16]; // [rsp+18h] [rbp-F0h] BYREF
void ( *v19)(_BYTE *, _BYTE *, long long); // [rsp+28h] [rbp-E0h]
_BYTE v20[8]; // [rsp+38h] [rbp-D0h] BYREF
long long v21; // [rsp+40h] [rbp-C8h]
volatile signed __int32 *v22; // [rsp+50h] [rbp-B8h]
volatile signed __int32 *v23; // [rsp+60h] [rbp-A8h]
long long v24; // [rsp+68h] [rbp-A0h]
volatile signed __int32 *v25; // [rsp+70h] [rbp-98h]
char v26[16]; // [rsp+78h] [rbp-90h] BYREF
_BYTE v27[8]; // [rsp+88h] [rbp-80h] BYREF
long long v28; // [rsp+90h] [rbp-78h]
volatile signed __int32 *v29; // [rsp+A0h] [rbp-68h]
volatile signed __int32 *v30; // [rsp+B0h] [rbp-58h]
volatile signed __int32 *v31; // [rsp+C0h] [rbp-48h]
char v32[16]; // [rsp+C8h] [rbp-40h] BYREF
__int128 v33; // [rsp+D8h] [rbp-30h]
v4 = *(void (****)(void))(a2 + 32);
if ( !v4 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "BinaryOpExpr.left is null");
goto LABEL_34;
}
if ( !*(_QWORD *)(a2 + 48) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "BinaryOpExpr.right is null");
LABEL_34:
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::Expression::evaluate((long long)v20, v4);
*(_QWORD *)&v17 = a2;
*((_QWORD *)&v17 + 1) = a3;
if ( v24 )
{
minja::Value::Value((minja::Value *)v27, (const minja::Value *)v20);
v33 = v17;
std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::function<minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1},void>(v18);
minja::Value::callable((_DWORD)this, (unsigned int)v18, v7, v8, v9, v10);
if ( v19 )
v19(v18, v18, 3LL);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v32);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v32);
if ( v31 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v31);
if ( v30 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v30);
if ( v29 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v29);
v11 = v28;
if ( v28 )
{
if ( _libc_single_threaded )
{
v12 = *(_DWORD *)(v28 + 12);
*(_DWORD *)(v28 + 12) = v12 - 1;
}
else
{
v12 = _InterlockedExchangeAdd((volatile signed __int32 *)(v28 + 12), 0xFFFFFFFF);
}
if ( v12 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v11 + 24LL))(v11, 0LL);
}
}
else
{
minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)const::{lambda(minja::Value const&)#1}::operator()(this);
}
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v26);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v26);
if ( v25 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v25);
if ( v23 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v23);
if ( v22 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v22);
v13 = v21;
if ( v21 )
{
if ( _libc_single_threaded )
{
v14 = *(_DWORD *)(v21 + 12);
*(_DWORD *)(v21 + 12) = v14 - 1;
}
else
{
v14 = _InterlockedExchangeAdd((volatile signed __int32 *)(v21 + 12), 0xFFFFFFFF);
}
if ( v14 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v13 + 24LL))(v13, 0LL);
}
return this;
}
|
do_evaluate:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0xe8
MOV R15,RSI
MOV RSI,qword ptr [RSI + 0x20]
TEST RSI,RSI
JZ 0x001973e7
CMP qword ptr [R15 + 0x30],0x0
JZ 0x00197405
MOV R14,RDX
MOV RBX,RDI
LEA R12,[RSP + 0x38]
MOV RDI,R12
CALL 0x00187560
MOV qword ptr [RSP + 0x8],R15
MOV qword ptr [RSP + 0x10],R14
CMP qword ptr [R12 + 0x30],0x0
JZ 0x00197333
LAB_00197270:
LEA RDI,[RSP + 0x88]
LEA RSI,[RSP + 0x38]
CALL 0x0018f06e
MOVUPS XMM0,xmmword ptr [RSP + 0x8]
LEA RSI,[RSP + 0x88]
MOVUPS xmmword ptr [RSI + 0x50],XMM0
LAB_00197293:
LEA RDI,[RSP + 0x18]
CALL 0x001975aa
LAB_0019729d:
LEA RSI,[RSP + 0x18]
MOV RDI,RBX
CALL 0x0019753e
MOV RAX,qword ptr [RSP + 0x28]
TEST RAX,RAX
JZ 0x001972c3
LAB_001972b4:
LEA RDI,[RSP + 0x18]
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001972c3:
LEA R14,[RSP + 0xc8]
MOV RDI,R14
XOR ESI,ESI
CALL 0x00159052
MOV RDI,R14
CALL 0x0015e83e
MOV RDI,qword ptr [R14 + -0x8]
TEST RDI,RDI
JZ 0x001972eb
CALL 0x0016e1aa
LAB_001972eb:
MOV RDI,qword ptr [RSP + 0xb0]
TEST RDI,RDI
JZ 0x001972fd
CALL 0x0016e1aa
LAB_001972fd:
MOV RDI,qword ptr [RSP + 0xa0]
TEST RDI,RDI
JZ 0x0019730f
CALL 0x0016e1aa
LAB_0019730f:
MOV RDI,qword ptr [RSP + 0x90]
TEST RDI,RDI
JZ 0x0019735c
MOV RAX,qword ptr [0x0022ef88]
CMP byte ptr [RAX],0x0
JZ 0x00197347
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x00197351
LAB_00197333:
LEA RSI,[RSP + 0x8]
LEA RDX,[RSP + 0x38]
MOV RDI,RBX
CALL 0x00197694
LAB_00197345:
JMP 0x0019735c
LAB_00197347:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_00197351:
CMP EAX,0x1
JNZ 0x0019735c
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_0019735c:
LEA R14,[RSP + 0x78]
MOV RDI,R14
XOR ESI,ESI
CALL 0x00159052
MOV RDI,R14
CALL 0x0015e83e
MOV RDI,qword ptr [R14 + -0x8]
TEST RDI,RDI
JZ 0x00197381
CALL 0x0016e1aa
LAB_00197381:
MOV RDI,qword ptr [RSP + 0x60]
TEST RDI,RDI
JZ 0x00197390
CALL 0x0016e1aa
LAB_00197390:
MOV RDI,qword ptr [RSP + 0x50]
TEST RDI,RDI
JZ 0x0019739f
CALL 0x0016e1aa
LAB_0019739f:
MOV RDI,qword ptr [RSP + 0x40]
TEST RDI,RDI
JZ 0x001973d5
MOV RAX,qword ptr [0x0022ef88]
CMP byte ptr [RAX],0x0
JZ 0x001973c0
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x001973ca
LAB_001973c0:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_001973ca:
CMP EAX,0x1
JNZ 0x001973d5
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_001973d5:
MOV RAX,RBX
ADD RSP,0xe8
POP RBX
POP R12
POP R14
POP R15
RET
LAB_001973e7:
MOV EDI,0x10
CALL 0x0011b450
MOV R14,RAX
LAB_001973f4:
LEA RSI,[0x1f3fb0]
MOV RDI,RAX
CALL 0x0011b330
LAB_00197403:
JMP 0x00197421
LAB_00197405:
MOV EDI,0x10
CALL 0x0011b450
MOV R14,RAX
LAB_00197412:
LEA RSI,[0x1f3fca]
MOV RDI,RAX
CALL 0x0011b330
LAB_00197421:
MOV RSI,qword ptr [0x0022eff0]
MOV RDX,qword ptr [0x0022ef60]
MOV RDI,R14
CALL 0x0011bf30
|
/* minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const */
shared_ptr * minja::BinaryOpExpr::do_evaluate(shared_ptr *param_1)
{
int *piVar1;
int iVar2;
runtime_error *this;
int8 in_RDX;
long in_RSI;
long local_100;
int8 uStack_f8;
_lambda_std__shared_ptr<minja::Context>_const__minja__ArgumentsValue___1_ local_f0 [16];
code *local_e0;
Expression local_d0 [8];
long *local_c8;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_b8;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_a8;
long local_a0;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_98;
data local_90 [16];
Value local_80 [8];
long *local_78;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_68;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_58;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_48;
data local_40 [16];
long local_30;
int8 uStack_28;
if (*(shared_ptr **)(in_RSI + 0x20) == (shared_ptr *)0x0) {
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001973f4 to 00197402 has its CatchHandler @ 0019743d */
std::runtime_error::runtime_error(this,"BinaryOpExpr.left is null");
}
else {
if (*(long *)(in_RSI + 0x30) != 0) {
Expression::evaluate(local_d0,*(shared_ptr **)(in_RSI + 0x20));
if (local_a0 == 0) {
/* try { // try from 00197333 to 00197344 has its CatchHandler @ 00197437 */
const::{lambda(minja::Value_const&)#1}::operator()
((_lambda_minja__Value_const___1_ *)param_1,(Value *)&local_100);
}
else {
/* try { // try from 00197270 to 00197281 has its CatchHandler @ 00197482 */
local_100 = in_RSI;
uStack_f8 = in_RDX;
Value::Value(local_80,(Value *)local_d0);
local_30 = local_100;
uStack_28 = uStack_f8;
/* try { // try from 00197293 to 0019729c has its CatchHandler @ 00197470 */
std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)>::
function<minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context>const&)const::_lambda(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)_1_,void>
(local_f0);
/* try { // try from 0019729d to 001972a9 has its CatchHandler @ 0019744a */
Value::callable((Value *)param_1,local_f0);
if (local_e0 != (code *)0x0) {
/* try { // try from 001972b4 to 001972c2 has its CatchHandler @ 00197439 */
(*local_e0)(local_f0,local_f0,3);
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(local_40,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_40);
if (local_48 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_48);
}
if (local_58 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_58);
}
if (local_68 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_68);
}
if (local_78 != (long *)0x0) {
if (*PTR___libc_single_threaded_0022ef88 == '\0') {
LOCK();
piVar1 = (int *)((long)local_78 + 0xc);
iVar2 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar2 = *(int *)((long)local_78 + 0xc);
*(int *)((long)local_78 + 0xc) = iVar2 + -1;
}
if (iVar2 == 1) {
(**(code **)(*local_78 + 0x18))();
}
}
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(local_90,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_90);
if (local_98 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_98);
}
if (local_a8 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_a8);
}
if (local_b8 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_b8);
}
if (local_c8 != (long *)0x0) {
if (*PTR___libc_single_threaded_0022ef88 == '\0') {
LOCK();
piVar1 = (int *)((long)local_c8 + 0xc);
iVar2 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar2 = *(int *)((long)local_c8 + 0xc);
*(int *)((long)local_c8 + 0xc) = iVar2 + -1;
}
if (iVar2 == 1) {
(**(code **)(*local_c8 + 0x18))();
}
}
return param_1;
}
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00197412 to 00197420 has its CatchHandler @ 0019743b */
std::runtime_error::runtime_error(this,"BinaryOpExpr.right is null");
}
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_0022eff0,PTR__runtime_error_0022ef60);
}
|
|
7,687 |
my_getwd
|
eloqsql/mysys/my_getwd.c
|
int my_getwd(char * buf, size_t size, myf MyFlags)
{
char * pos;
DBUG_ENTER("my_getwd");
DBUG_PRINT("my",("buf:%p size: %u MyFlags %lu",
buf, (uint) size, MyFlags));
if (size < 1)
DBUG_RETURN(-1);
if (curr_dir[0]) /* Current pos is saved here */
(void) strmake(buf,&curr_dir[0],size-1);
else
{
#if defined(HAVE_GETCWD)
if (size < 2)
DBUG_RETURN(-1);
if (!getcwd(buf,(uint) (size-2)) && MyFlags & MY_WME)
{
my_errno=errno;
my_error(EE_GETWD,MYF(ME_BELL),errno);
DBUG_RETURN(-1);
}
#elif defined(HAVE_GETWD)
{
char pathname[MAXPATHLEN];
getwd(pathname);
strmake(buf,pathname,size-1);
}
#else
#error "No way to get current directory"
#endif
if (*((pos=strend(buf))-1) != FN_LIBCHAR) /* End with FN_LIBCHAR */
{
pos[0]= FN_LIBCHAR;
pos[1]=0;
}
(void) strmake(&curr_dir[0],buf, (size_t) (FN_REFLEN-1));
}
DBUG_RETURN(0);
}
|
O3
|
c
|
my_getwd:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl $0xffffffff, %ebx # imm = 0xFFFFFFFF
testq %rsi, %rsi
je 0x34001
movq %rdx, %r15
movq %rsi, %rdx
movq %rdi, %r14
leaq 0x33be70(%rip), %rax # 0x36fe10
cmpb $0x0, (%rax)
je 0x33fbb
decq %rdx
leaq 0x33be61(%rip), %rsi # 0x36fe10
movq %r14, %rdi
callq 0x62318
xorl %ebx, %ebx
jmp 0x34001
cmpq $0x1, %rdx
je 0x34001
addl $-0x2, %edx
movq %r14, %rdi
movq %rdx, %rsi
callq 0x251f0
testb $0x10, %r15b
je 0x3400e
testq %rax, %rax
jne 0x3400e
callq 0x25060
movq %rax, %r14
movl (%rax), %r15d
callq 0x2ed72
movl %r15d, (%rax)
movl (%r14), %edx
movl $0x4, %esi
movl $0x10, %edi
xorl %eax, %eax
callq 0x2c37b
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
callq 0x622d0
cmpb $0x2f, -0x1(%rax)
je 0x34021
movw $0x2f, (%rax)
leaq 0x33bde8(%rip), %rdi # 0x36fe10
movl $0x1ff, %edx # imm = 0x1FF
movq %r14, %rsi
jmp 0x33fb2
|
my_getwd:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov ebx, 0FFFFFFFFh
test rsi, rsi
jz short loc_34001
mov r15, rdx
mov rdx, rsi
mov r14, rdi
lea rax, curr_dir
cmp byte ptr [rax], 0
jz short loc_33FBB
dec rdx
lea rsi, curr_dir
mov rdi, r14
loc_33FB2:
call strmake
xor ebx, ebx
jmp short loc_34001
loc_33FBB:
cmp rdx, 1
jz short loc_34001
add edx, 0FFFFFFFEh
mov rdi, r14
mov rsi, rdx
call _getcwd
test r15b, 10h
jz short loc_3400E
test rax, rax
jnz short loc_3400E
call ___errno_location
mov r14, rax
mov r15d, [rax]
call _my_thread_var
mov [rax], r15d
mov edx, [r14]
mov esi, 4
mov edi, 10h
xor eax, eax
call my_error
loc_34001:
mov eax, ebx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_3400E:
mov rdi, r14
call strend
cmp byte ptr [rax-1], 2Fh ; '/'
jz short loc_34021
mov word ptr [rax], 2Fh ; '/'
loc_34021:
lea rdi, curr_dir
mov edx, 1FFh
mov rsi, r14
jmp short loc_33FB2
|
long long my_getwd(_BYTE *a1, long long a2, char a3)
{
unsigned int v3; // ebx
_BYTE *v5; // r14
long long v6; // rdx
_BYTE *v7; // rsi
long long v8; // rax
unsigned int *v9; // r14
unsigned int v10; // r15d
_WORD *v12; // rax
v3 = -1;
if ( a2 )
{
v5 = a1;
if ( curr_dir[0] )
{
v6 = a2 - 1;
v7 = curr_dir;
}
else
{
if ( a2 == 1 )
return v3;
v8 = getcwd(a1, (unsigned int)(a2 - 2));
if ( (a3 & 0x10) != 0 && !v8 )
{
v9 = (unsigned int *)__errno_location(a1);
v10 = *v9;
*(_DWORD *)my_thread_var() = v10;
my_error(0x10u, 4LL, *v9);
return v3;
}
v12 = (_WORD *)strend(a1);
if ( *((_BYTE *)v12 - 1) != 47 )
*v12 = 47;
a1 = curr_dir;
v6 = 511LL;
v7 = v5;
}
strmake(a1, v7, v6);
return 0;
}
return v3;
}
|
my_getwd:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EBX,0xffffffff
TEST RSI,RSI
JZ 0x00134001
MOV R15,RDX
MOV RDX,RSI
MOV R14,RDI
LEA RAX,[0x46fe10]
CMP byte ptr [RAX],0x0
JZ 0x00133fbb
DEC RDX
LEA RSI,[0x46fe10]
MOV RDI,R14
LAB_00133fb2:
CALL 0x00162318
XOR EBX,EBX
JMP 0x00134001
LAB_00133fbb:
CMP RDX,0x1
JZ 0x00134001
ADD EDX,-0x2
MOV RDI,R14
MOV RSI,RDX
CALL 0x001251f0
TEST R15B,0x10
JZ 0x0013400e
TEST RAX,RAX
JNZ 0x0013400e
CALL 0x00125060
MOV R14,RAX
MOV R15D,dword ptr [RAX]
CALL 0x0012ed72
MOV dword ptr [RAX],R15D
MOV EDX,dword ptr [R14]
MOV ESI,0x4
MOV EDI,0x10
XOR EAX,EAX
CALL 0x0012c37b
LAB_00134001:
MOV EAX,EBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0013400e:
MOV RDI,R14
CALL 0x001622d0
CMP byte ptr [RAX + -0x1],0x2f
JZ 0x00134021
MOV word ptr [RAX],0x2f
LAB_00134021:
LEA RDI,[0x46fe10]
MOV EDX,0x1ff
MOV RSI,R14
JMP 0x00133fb2
|
int8 my_getwd(char *param_1,long param_2,ulong param_3)
{
int iVar1;
char *pcVar2;
int *piVar3;
int *piVar4;
int2 *puVar5;
char *pcVar6;
if (param_2 == 0) {
return 0xffffffff;
}
if (curr_dir == '\0') {
if (param_2 == 1) {
return 0xffffffff;
}
pcVar2 = getcwd(param_1,(ulong)((int)param_2 - 2));
if (((param_3 & 0x10) != 0) && (pcVar2 == (char *)0x0)) {
piVar3 = __errno_location();
iVar1 = *piVar3;
piVar4 = (int *)_my_thread_var();
*piVar4 = iVar1;
my_error(0x10,4,*piVar3);
return 0xffffffff;
}
puVar5 = (int2 *)strend(param_1);
if (*(char *)((long)puVar5 + -1) != '/') {
*puVar5 = 0x2f;
}
pcVar6 = &curr_dir;
param_2 = 0x1ff;
pcVar2 = param_1;
}
else {
param_2 = param_2 + -1;
pcVar2 = &curr_dir;
pcVar6 = param_1;
}
strmake(pcVar6,pcVar2,param_2);
return 0;
}
|
|
7,688 |
dns_get_section
|
xtate/src/proto/proto-dns.c
|
dns_section_t dns_get_section(uint16_t index, dns_header_t *header) {
if (index < header->ans_count) {
return DNS_SECTION_ANSWER;
} else if (index < header->ans_count + header->auth_count) {
return DNS_SECTION_AUTHORITY;
} else {
return DNS_SECTION_ADDITIONAL;
}
}
|
O3
|
c
|
dns_get_section:
movzwl 0xe(%rsi), %ecx
movl $0x1, %eax
cmpw %di, %cx
ja 0x32403
movzwl %di, %eax
movzwl 0x10(%rsi), %edx
addl %ecx, %edx
cmpl %edx, %eax
movl $0x3, %eax
sbbl $0x0, %eax
retq
|
dns_get_section:
movzx ecx, word ptr [rsi+0Eh]
mov eax, 1
cmp cx, di
ja short locret_32403
movzx eax, di
movzx edx, word ptr [rsi+10h]
add edx, ecx
cmp eax, edx
mov eax, 3
sbb eax, 0
locret_32403:
retn
|
unsigned long long dns_get_section(unsigned __int16 a1, long long a2)
{
int v2; // ecx
unsigned long long result; // rax
v2 = *(unsigned __int16 *)(a2 + 14);
result = 1LL;
if ( (unsigned __int16)v2 <= a1 )
return ((a1 | 0x300000000LL) - (unsigned long long)(v2 + (unsigned int)*(unsigned __int16 *)(a2 + 16))) >> 32;
return result;
}
|
dns_get_section:
MOVZX ECX,word ptr [RSI + 0xe]
MOV EAX,0x1
CMP CX,DI
JA 0x00132403
MOVZX EAX,DI
MOVZX EDX,word ptr [RSI + 0x10]
ADD EDX,ECX
CMP EAX,EDX
MOV EAX,0x3
SBB EAX,0x0
LAB_00132403:
RET
|
int dns_get_section(ushort param_1,long param_2)
{
int iVar1;
iVar1 = 1;
if (*(ushort *)(param_2 + 0xe) <= param_1) {
iVar1 = 3 - (uint)((uint)param_1 <
(uint)*(ushort *)(param_2 + 0x10) + (uint)*(ushort *)(param_2 + 0xe));
}
return iVar1;
}
|
|
7,689 |
Employee::institute[abi:cxx11]() const
|
slashdotted[P]corsocpp_tp_2025/S9/Employee.cpp
|
std::string Employee::institute() const
{
return m_institute;
}
|
O1
|
cpp
|
Employee::institute[abi:cxx11]() const:
pushq %rbx
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
movq 0x28(%rsi), %rax
movq 0x30(%rsi), %rdx
addq %rax, %rdx
movq %rax, %rsi
callq 0x1d80
movq %rbx, %rax
popq %rbx
retq
nop
|
_ZNK8Employee9instituteB5cxx11Ev:
push rbx
mov rbx, rdi
lea rax, [rdi+10h]
mov [rdi], rax
mov rax, [rsi+28h]
mov rdx, [rsi+30h]
add rdx, rax
mov rsi, rax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
mov rax, rbx
pop rbx
retn
|
_QWORD * Employee::institute[abi:cxx11](_QWORD *a1, long long a2)
{
*a1 = a1 + 2;
std::string::_M_construct<char *>(a1, *(_BYTE **)(a2 + 40), *(_QWORD *)(a2 + 40) + *(_QWORD *)(a2 + 48));
return a1;
}
|
institute[abi:cxx11]:
PUSH RBX
MOV RBX,RDI
LEA RAX,[RDI + 0x10]
MOV qword ptr [RDI],RAX
MOV RAX,qword ptr [RSI + 0x28]
MOV RDX,qword ptr [RSI + 0x30]
ADD RDX,RAX
MOV RSI,RAX
CALL 0x00101d80
MOV RAX,RBX
POP RBX
RET
|
/* Employee::institute[abi:cxx11]() const */
void Employee::institute_abi_cxx11_(void)
{
long in_RSI;
long *in_RDI;
*in_RDI = (long)(in_RDI + 2);
std::__cxx11::string::_M_construct<char*>
(in_RDI,*(long *)(in_RSI + 0x28),*(long *)(in_RSI + 0x30) + *(long *)(in_RSI + 0x28));
return;
}
|
|
7,690 |
Employee::institute[abi:cxx11]() const
|
slashdotted[P]corsocpp_tp_2025/S9/Employee.cpp
|
std::string Employee::institute() const
{
return m_institute;
}
|
O3
|
cpp
|
Employee::institute[abi:cxx11]() const:
pushq %rbx
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
movq 0x28(%rsi), %rax
movq 0x30(%rsi), %rdx
addq %rax, %rdx
movq %rax, %rsi
callq 0x1d80
movq %rbx, %rax
popq %rbx
retq
nop
|
_ZNK8Employee9instituteB5cxx11Ev:
push rbx
mov rbx, rdi
lea rax, [rdi+10h]
mov [rdi], rax
mov rax, [rsi+28h]
mov rdx, [rsi+30h]
add rdx, rax
mov rsi, rax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
mov rax, rbx
pop rbx
retn
|
_QWORD * Employee::institute[abi:cxx11](_QWORD *a1, long long a2)
{
*a1 = a1 + 2;
std::string::_M_construct<char *>((long long)a1, *(_BYTE **)(a2 + 40), *(_QWORD *)(a2 + 40) + *(_QWORD *)(a2 + 48));
return a1;
}
|
institute[abi:cxx11]:
PUSH RBX
MOV RBX,RDI
LEA RAX,[RDI + 0x10]
MOV qword ptr [RDI],RAX
MOV RAX,qword ptr [RSI + 0x28]
MOV RDX,qword ptr [RSI + 0x30]
ADD RDX,RAX
MOV RSI,RAX
CALL 0x00101d80
MOV RAX,RBX
POP RBX
RET
|
/* Employee::institute[abi:cxx11]() const */
void Employee::institute_abi_cxx11_(void)
{
long in_RSI;
long *in_RDI;
*in_RDI = (long)(in_RDI + 2);
std::__cxx11::string::_M_construct<char*>
(in_RDI,*(long *)(in_RSI + 0x28),*(long *)(in_RSI + 0x30) + *(long *)(in_RSI + 0x28));
return;
}
|
|
7,691 |
mysql_close_options
|
eloqsql/libmariadb/libmariadb/mariadb_lib.c
|
static void mysql_close_options(MYSQL *mysql)
{
if (mysql->options.init_command)
{
char **begin= (char **)mysql->options.init_command->buffer;
char **end= begin + mysql->options.init_command->elements;
for (;begin < end; begin++)
free(*begin);
ma_delete_dynamic(mysql->options.init_command);
free(mysql->options.init_command);
}
free(mysql->options.user);
free(mysql->options.host);
free(mysql->options.password);
free(mysql->options.unix_socket);
free(mysql->options.db);
free(mysql->options.my_cnf_file);
free(mysql->options.my_cnf_group);
free(mysql->options.charset_dir);
free(mysql->options.charset_name);
free(mysql->options.bind_address);
free(mysql->options.ssl_key);
free(mysql->options.ssl_cert);
free(mysql->options.ssl_ca);
free(mysql->options.ssl_capath);
free(mysql->options.ssl_cipher);
if (mysql->options.extension)
{
struct mysql_async_context *ctxt;
if ((ctxt = mysql->options.extension->async_context))
{
my_context_destroy(&ctxt->async_context);
free(ctxt);
mysql->options.extension->async_context= 0;
}
free(mysql->options.extension->plugin_dir);
free(mysql->options.extension->default_auth);
free(mysql->options.extension->db_driver);
free(mysql->options.extension->ssl_crl);
free(mysql->options.extension->ssl_crlpath);
free(mysql->options.extension->tls_fp);
free(mysql->options.extension->tls_fp_list);
free(mysql->options.extension->tls_pw);
free(mysql->options.extension->tls_version);
free(mysql->options.extension->url);
free(mysql->options.extension->connection_handler);
free(mysql->options.extension->proxy_header);
if(ma_hashtbl_inited(&mysql->options.extension->connect_attrs))
ma_hashtbl_free(&mysql->options.extension->connect_attrs);
if (ma_hashtbl_inited(&mysql->options.extension->userdata))
ma_hashtbl_free(&mysql->options.extension->userdata);
free(mysql->options.extension->restricted_auth);
free(mysql->options.extension->rpl_host);
}
free(mysql->options.extension);
/* clear all pointer */
memset(&mysql->options, 0, sizeof(mysql->options));
}
|
O3
|
c
|
mysql_close_options:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x3d8(%rdi), %rdi
testq %rdi, %rdi
je 0x1c74d
movl 0x8(%rdi), %eax
testq %rax, %rax
je 0x1c73c
movq (%rdi), %r14
leaq (%r14,%rax,8), %r15
movq (%r14), %rdi
callq 0x13570
addq $0x8, %r14
cmpq %r15, %r14
jb 0x1c724
movq 0x3d8(%rbx), %rdi
callq 0x3256c
movq 0x3d8(%rbx), %rdi
callq 0x13570
movq 0x3b8(%rbx), %rdi
callq 0x13570
movq 0x3b0(%rbx), %rdi
callq 0x13570
movq 0x3c0(%rbx), %rdi
callq 0x13570
movq 0x3c8(%rbx), %rdi
callq 0x13570
movq 0x3d0(%rbx), %rdi
callq 0x13570
movq 0x3e0(%rbx), %rdi
callq 0x13570
movq 0x3e8(%rbx), %rdi
callq 0x13570
movq 0x3f0(%rbx), %rdi
callq 0x13570
movq 0x3f8(%rbx), %rdi
callq 0x13570
movq 0x448(%rbx), %rdi
callq 0x13570
movq 0x400(%rbx), %rdi
callq 0x13570
movq 0x408(%rbx), %rdi
callq 0x13570
movq 0x410(%rbx), %rdi
callq 0x13570
movq 0x418(%rbx), %rdi
callq 0x13570
movq 0x420(%rbx), %rdi
callq 0x13570
movq 0x480(%rbx), %rax
testq %rax, %rax
je 0x1c974
movq 0x28(%rax), %r14
testq %r14, %r14
je 0x1c841
leaq 0x38(%r14), %rdi
callq 0x30551
movq %r14, %rdi
callq 0x13570
movq 0x480(%rbx), %rax
movq $0x0, 0x28(%rax)
movq 0x480(%rbx), %rax
movq (%rax), %rdi
callq 0x13570
movq 0x480(%rbx), %rax
movq 0x8(%rax), %rdi
callq 0x13570
movq 0x480(%rbx), %rax
movq 0x88(%rax), %rdi
callq 0x13570
movq 0x480(%rbx), %rax
movq 0x10(%rax), %rdi
callq 0x13570
movq 0x480(%rbx), %rax
movq 0x18(%rax), %rdi
callq 0x13570
movq 0x480(%rbx), %rax
movq 0x90(%rax), %rdi
callq 0x13570
movq 0x480(%rbx), %rax
movq 0x98(%rax), %rdi
callq 0x13570
movq 0x480(%rbx), %rax
movq 0xa0(%rax), %rdi
callq 0x13570
movq 0x480(%rbx), %rax
movq 0xc0(%rax), %rdi
callq 0x13570
movq 0x480(%rbx), %rax
movq 0xb0(%rax), %rdi
callq 0x13570
movq 0x480(%rbx), %rax
movq 0xd0(%rax), %rdi
callq 0x13570
movq 0x480(%rbx), %rax
movq 0x130(%rax), %rdi
callq 0x13570
movq 0x480(%rbx), %rdi
cmpq $0x0, 0x48(%rdi)
je 0x1c92f
addq $0x30, %rdi
callq 0x32735
movq 0x480(%rbx), %rdi
cmpq $0x0, 0xf8(%rdi)
je 0x1c94c
addq $0xe0, %rdi
callq 0x32735
movq 0x480(%rbx), %rdi
movq 0x150(%rdi), %rdi
callq 0x13570
movq 0x480(%rbx), %rax
movq 0x158(%rax), %rdi
callq 0x13570
movq 0x480(%rbx), %rdi
jmp 0x1c976
xorl %edi, %edi
addq $0x390, %rbx # imm = 0x390
callq 0x13570
movl $0xf8, %edx
movq %rbx, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x13260
|
mysql_close_options:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rdi
mov rdi, [rdi+3D8h]
test rdi, rdi
jz short loc_1C74D
mov eax, [rdi+8]
test rax, rax
jz short loc_1C73C
mov r14, [rdi]
lea r15, [r14+rax*8]
loc_1C724:
mov rdi, [r14]
call _free
add r14, 8
cmp r14, r15
jb short loc_1C724
mov rdi, [rbx+3D8h]
loc_1C73C:
call ma_delete_dynamic
mov rdi, [rbx+3D8h]
call _free
loc_1C74D:
mov rdi, [rbx+3B8h]
call _free
mov rdi, [rbx+3B0h]
call _free
mov rdi, [rbx+3C0h]
call _free
mov rdi, [rbx+3C8h]
call _free
mov rdi, [rbx+3D0h]
call _free
mov rdi, [rbx+3E0h]
call _free
mov rdi, [rbx+3E8h]
call _free
mov rdi, [rbx+3F0h]
call _free
mov rdi, [rbx+3F8h]
call _free
mov rdi, [rbx+448h]
call _free
mov rdi, [rbx+400h]
call _free
mov rdi, [rbx+408h]
call _free
mov rdi, [rbx+410h]
call _free
mov rdi, [rbx+418h]
call _free
mov rdi, [rbx+420h]
call _free
mov rax, [rbx+480h]
test rax, rax
jz loc_1C974
mov r14, [rax+28h]
test r14, r14
jz short loc_1C841
lea rdi, [r14+38h]
call my_context_destroy
mov rdi, r14
call _free
mov rax, [rbx+480h]
mov qword ptr [rax+28h], 0
mov rax, [rbx+480h]
loc_1C841:
mov rdi, [rax]
call _free
mov rax, [rbx+480h]
mov rdi, [rax+8]
call _free
mov rax, [rbx+480h]
mov rdi, [rax+88h]
call _free
mov rax, [rbx+480h]
mov rdi, [rax+10h]
call _free
mov rax, [rbx+480h]
mov rdi, [rax+18h]
call _free
mov rax, [rbx+480h]
mov rdi, [rax+90h]
call _free
mov rax, [rbx+480h]
mov rdi, [rax+98h]
call _free
mov rax, [rbx+480h]
mov rdi, [rax+0A0h]
call _free
mov rax, [rbx+480h]
mov rdi, [rax+0C0h]
call _free
mov rax, [rbx+480h]
mov rdi, [rax+0B0h]
call _free
mov rax, [rbx+480h]
mov rdi, [rax+0D0h]
call _free
mov rax, [rbx+480h]
mov rdi, [rax+130h]
call _free
mov rdi, [rbx+480h]
cmp qword ptr [rdi+48h], 0
jz short loc_1C92F
add rdi, 30h ; '0'
call ma_hashtbl_free
mov rdi, [rbx+480h]
loc_1C92F:
cmp qword ptr [rdi+0F8h], 0
jz short loc_1C94C
add rdi, 0E0h
call ma_hashtbl_free
mov rdi, [rbx+480h]
loc_1C94C:
mov rdi, [rdi+150h]
call _free
mov rax, [rbx+480h]
mov rdi, [rax+158h]
call _free
mov rdi, [rbx+480h]
jmp short loc_1C976
loc_1C974:
xor edi, edi
loc_1C976:
add rbx, 390h
call _free
mov edx, 0F8h
mov rdi, rbx
xor esi, esi
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
jmp _memset
|
long long mysql_close_options(_QWORD *a1)
{
long long v2; // rdi
_QWORD *v3; // r14
unsigned long long v4; // r15
_QWORD *v5; // rax
long long v6; // r14
_QWORD *v7; // rdi
long long v8; // rdi
v2 = a1[123];
if ( v2 )
{
if ( *(_DWORD *)(v2 + 8) )
{
v3 = *(_QWORD **)v2;
v4 = *(_QWORD *)v2 + 8LL * *(unsigned int *)(v2 + 8);
do
free(*v3++);
while ( (unsigned long long)v3 < v4 );
v2 = a1[123];
}
ma_delete_dynamic(v2);
free(a1[123]);
}
free(a1[119]);
free(a1[118]);
free(a1[120]);
free(a1[121]);
free(a1[122]);
free(a1[124]);
free(a1[125]);
free(a1[126]);
free(a1[127]);
free(a1[137]);
free(a1[128]);
free(a1[129]);
free(a1[130]);
free(a1[131]);
free(a1[132]);
v5 = (_QWORD *)a1[144];
if ( v5 )
{
v6 = v5[5];
if ( v6 )
{
my_context_destroy(v6 + 56);
free(v6);
*(_QWORD *)(a1[144] + 40LL) = 0LL;
v5 = (_QWORD *)a1[144];
}
free(*v5);
free(*(_QWORD *)(a1[144] + 8LL));
free(*(_QWORD *)(a1[144] + 136LL));
free(*(_QWORD *)(a1[144] + 16LL));
free(*(_QWORD *)(a1[144] + 24LL));
free(*(_QWORD *)(a1[144] + 144LL));
free(*(_QWORD *)(a1[144] + 152LL));
free(*(_QWORD *)(a1[144] + 160LL));
free(*(_QWORD *)(a1[144] + 192LL));
free(*(_QWORD *)(a1[144] + 176LL));
free(*(_QWORD *)(a1[144] + 208LL));
free(*(_QWORD *)(a1[144] + 304LL));
v7 = (_QWORD *)a1[144];
if ( v7[9] )
{
ma_hashtbl_free(v7 + 6);
v7 = (_QWORD *)a1[144];
}
if ( v7[31] )
{
ma_hashtbl_free(v7 + 28);
v7 = (_QWORD *)a1[144];
}
free(v7[42]);
free(*(_QWORD *)(a1[144] + 344LL));
v8 = a1[144];
}
else
{
v8 = 0LL;
}
free(v8);
return memset(a1 + 114, 0LL, 248LL);
}
|
mysql_close_options:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x3d8]
TEST RDI,RDI
JZ 0x0011c74d
MOV EAX,dword ptr [RDI + 0x8]
TEST RAX,RAX
JZ 0x0011c73c
MOV R14,qword ptr [RDI]
LEA R15,[R14 + RAX*0x8]
LAB_0011c724:
MOV RDI,qword ptr [R14]
CALL 0x00113570
ADD R14,0x8
CMP R14,R15
JC 0x0011c724
MOV RDI,qword ptr [RBX + 0x3d8]
LAB_0011c73c:
CALL 0x0013256c
MOV RDI,qword ptr [RBX + 0x3d8]
CALL 0x00113570
LAB_0011c74d:
MOV RDI,qword ptr [RBX + 0x3b8]
CALL 0x00113570
MOV RDI,qword ptr [RBX + 0x3b0]
CALL 0x00113570
MOV RDI,qword ptr [RBX + 0x3c0]
CALL 0x00113570
MOV RDI,qword ptr [RBX + 0x3c8]
CALL 0x00113570
MOV RDI,qword ptr [RBX + 0x3d0]
CALL 0x00113570
MOV RDI,qword ptr [RBX + 0x3e0]
CALL 0x00113570
MOV RDI,qword ptr [RBX + 0x3e8]
CALL 0x00113570
MOV RDI,qword ptr [RBX + 0x3f0]
CALL 0x00113570
MOV RDI,qword ptr [RBX + 0x3f8]
CALL 0x00113570
MOV RDI,qword ptr [RBX + 0x448]
CALL 0x00113570
MOV RDI,qword ptr [RBX + 0x400]
CALL 0x00113570
MOV RDI,qword ptr [RBX + 0x408]
CALL 0x00113570
MOV RDI,qword ptr [RBX + 0x410]
CALL 0x00113570
MOV RDI,qword ptr [RBX + 0x418]
CALL 0x00113570
MOV RDI,qword ptr [RBX + 0x420]
CALL 0x00113570
MOV RAX,qword ptr [RBX + 0x480]
TEST RAX,RAX
JZ 0x0011c974
MOV R14,qword ptr [RAX + 0x28]
TEST R14,R14
JZ 0x0011c841
LEA RDI,[R14 + 0x38]
CALL 0x00130551
MOV RDI,R14
CALL 0x00113570
MOV RAX,qword ptr [RBX + 0x480]
MOV qword ptr [RAX + 0x28],0x0
MOV RAX,qword ptr [RBX + 0x480]
LAB_0011c841:
MOV RDI,qword ptr [RAX]
CALL 0x00113570
MOV RAX,qword ptr [RBX + 0x480]
MOV RDI,qword ptr [RAX + 0x8]
CALL 0x00113570
MOV RAX,qword ptr [RBX + 0x480]
MOV RDI,qword ptr [RAX + 0x88]
CALL 0x00113570
MOV RAX,qword ptr [RBX + 0x480]
MOV RDI,qword ptr [RAX + 0x10]
CALL 0x00113570
MOV RAX,qword ptr [RBX + 0x480]
MOV RDI,qword ptr [RAX + 0x18]
CALL 0x00113570
MOV RAX,qword ptr [RBX + 0x480]
MOV RDI,qword ptr [RAX + 0x90]
CALL 0x00113570
MOV RAX,qword ptr [RBX + 0x480]
MOV RDI,qword ptr [RAX + 0x98]
CALL 0x00113570
MOV RAX,qword ptr [RBX + 0x480]
MOV RDI,qword ptr [RAX + 0xa0]
CALL 0x00113570
MOV RAX,qword ptr [RBX + 0x480]
MOV RDI,qword ptr [RAX + 0xc0]
CALL 0x00113570
MOV RAX,qword ptr [RBX + 0x480]
MOV RDI,qword ptr [RAX + 0xb0]
CALL 0x00113570
MOV RAX,qword ptr [RBX + 0x480]
MOV RDI,qword ptr [RAX + 0xd0]
CALL 0x00113570
MOV RAX,qword ptr [RBX + 0x480]
MOV RDI,qword ptr [RAX + 0x130]
CALL 0x00113570
MOV RDI,qword ptr [RBX + 0x480]
CMP qword ptr [RDI + 0x48],0x0
JZ 0x0011c92f
ADD RDI,0x30
CALL 0x00132735
MOV RDI,qword ptr [RBX + 0x480]
LAB_0011c92f:
CMP qword ptr [RDI + 0xf8],0x0
JZ 0x0011c94c
ADD RDI,0xe0
CALL 0x00132735
MOV RDI,qword ptr [RBX + 0x480]
LAB_0011c94c:
MOV RDI,qword ptr [RDI + 0x150]
CALL 0x00113570
MOV RAX,qword ptr [RBX + 0x480]
MOV RDI,qword ptr [RAX + 0x158]
CALL 0x00113570
MOV RDI,qword ptr [RBX + 0x480]
JMP 0x0011c976
LAB_0011c974:
XOR EDI,EDI
LAB_0011c976:
ADD RBX,0x390
CALL 0x00113570
MOV EDX,0xf8
MOV RDI,RBX
XOR ESI,ESI
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
JMP 0x00113260
|
void mysql_close_options(long param_1)
{
int8 *puVar1;
long *plVar2;
long lVar3;
void *pvVar4;
int8 *puVar5;
plVar2 = *(long **)(param_1 + 0x3d8);
if (plVar2 != (long *)0x0) {
if ((ulong)*(uint *)(plVar2 + 1) != 0) {
puVar5 = (int8 *)*plVar2;
puVar1 = puVar5 + *(uint *)(plVar2 + 1);
do {
free((void *)*puVar5);
puVar5 = puVar5 + 1;
} while (puVar5 < puVar1);
plVar2 = *(long **)(param_1 + 0x3d8);
}
ma_delete_dynamic(plVar2);
free(*(void **)(param_1 + 0x3d8));
}
free(*(void **)(param_1 + 0x3b8));
free(*(void **)(param_1 + 0x3b0));
free(*(void **)(param_1 + 0x3c0));
free(*(void **)(param_1 + 0x3c8));
free(*(void **)(param_1 + 0x3d0));
free(*(void **)(param_1 + 0x3e0));
free(*(void **)(param_1 + 1000));
free(*(void **)(param_1 + 0x3f0));
free(*(void **)(param_1 + 0x3f8));
free(*(void **)(param_1 + 0x448));
free(*(void **)(param_1 + 0x400));
free(*(void **)(param_1 + 0x408));
free(*(void **)(param_1 + 0x410));
free(*(void **)(param_1 + 0x418));
free(*(void **)(param_1 + 0x420));
puVar1 = *(int8 **)(param_1 + 0x480);
if (puVar1 == (int8 *)0x0) {
pvVar4 = (void *)0x0;
}
else {
pvVar4 = (void *)puVar1[5];
if (pvVar4 != (void *)0x0) {
my_context_destroy((long)pvVar4 + 0x38);
free(pvVar4);
*(int8 *)(*(long *)(param_1 + 0x480) + 0x28) = 0;
puVar1 = *(int8 **)(param_1 + 0x480);
}
free((void *)*puVar1);
free(*(void **)(*(long *)(param_1 + 0x480) + 8));
free(*(void **)(*(long *)(param_1 + 0x480) + 0x88));
free(*(void **)(*(long *)(param_1 + 0x480) + 0x10));
free(*(void **)(*(long *)(param_1 + 0x480) + 0x18));
free(*(void **)(*(long *)(param_1 + 0x480) + 0x90));
free(*(void **)(*(long *)(param_1 + 0x480) + 0x98));
free(*(void **)(*(long *)(param_1 + 0x480) + 0xa0));
free(*(void **)(*(long *)(param_1 + 0x480) + 0xc0));
free(*(void **)(*(long *)(param_1 + 0x480) + 0xb0));
free(*(void **)(*(long *)(param_1 + 0x480) + 0xd0));
free(*(void **)(*(long *)(param_1 + 0x480) + 0x130));
lVar3 = *(long *)(param_1 + 0x480);
if (*(long *)(lVar3 + 0x48) != 0) {
ma_hashtbl_free(lVar3 + 0x30);
lVar3 = *(long *)(param_1 + 0x480);
}
if (*(long *)(lVar3 + 0xf8) != 0) {
ma_hashtbl_free(lVar3 + 0xe0);
lVar3 = *(long *)(param_1 + 0x480);
}
free(*(void **)(lVar3 + 0x150));
free(*(void **)(*(long *)(param_1 + 0x480) + 0x158));
pvVar4 = *(void **)(param_1 + 0x480);
}
free(pvVar4);
memset((void *)(param_1 + 0x390),0,0xf8);
return;
}
|
|
7,692 |
serial_cpp::IOException::IOException(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, char const*)
|
ami-iit[P]serial_cpp/include/serial_cpp/serial.h
|
explicit IOException (std::string file, int line, const char * description)
: file_(file), line_(line), errno_(0) {
std::stringstream ss;
ss << "IO Exception: " << description;
ss << ", file " << file_ << ", line " << line_ << ".";
e_what_ = ss.str();
}
|
O0
|
c
|
serial_cpp::IOException::IOException(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, char const*):
pushq %rbp
movq %rsp, %rbp
subq $0x220, %rsp # imm = 0x220
movq %rsi, -0x1e8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x1f0(%rbp)
callq 0xce60
movq -0x1f0(%rbp), %rdi
movq -0x1e8(%rbp), %rsi
leaq 0xa50a(%rip), %rax # 0x16d50
movq %rax, (%rdi)
addq $0x8, %rdi
movq %rdi, -0x1e0(%rbp)
callq 0x3160
jmp 0xc85b
movq -0x1f0(%rbp), %rdi
movl -0x14(%rbp), %eax
movl %eax, 0x28(%rdi)
addq $0x30, %rdi
movq %rdi, -0x1f8(%rbp)
callq 0x34b0
movq -0x1f0(%rbp), %rax
movl $0x0, 0x50(%rax)
leaq -0x1b8(%rbp), %rdi
callq 0x3220
jmp 0xc894
leaq -0x1a8(%rbp), %rdi
leaq 0x3fe9(%rip), %rsi # 0x1088b
callq 0x3310
movq %rax, -0x200(%rbp)
jmp 0xc8b0
movq -0x200(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x3310
jmp 0xc8c2
leaq -0x1a8(%rbp), %rdi
leaq 0x3fca(%rip), %rsi # 0x1089a
callq 0x3310
movq %rax, -0x208(%rbp)
jmp 0xc8de
movq -0x208(%rbp), %rdi
movq -0x1f0(%rbp), %rsi
addq $0x8, %rsi
callq 0x32c0
movq %rax, -0x210(%rbp)
jmp 0xc8fe
movq -0x210(%rbp), %rdi
leaq 0x3f96(%rip), %rsi # 0x108a2
callq 0x3310
movq %rax, -0x218(%rbp)
jmp 0xc91a
movq -0x218(%rbp), %rdi
movq -0x1f0(%rbp), %rax
movl 0x28(%rax), %esi
callq 0x35c0
movq %rax, -0x220(%rbp)
jmp 0xc939
movq -0x220(%rbp), %rdi
leaq 0x3f42(%rip), %rsi # 0x10889
callq 0x3310
jmp 0xc94e
leaq -0x1d8(%rbp), %rdi
leaq -0x1b8(%rbp), %rsi
callq 0x3300
jmp 0xc963
movq -0x1f0(%rbp), %rdi
addq $0x30, %rdi
leaq -0x1d8(%rbp), %rsi
callq 0x3410
leaq -0x1d8(%rbp), %rdi
callq 0x31e0
leaq -0x1b8(%rbp), %rdi
callq 0x3260
addq $0x220, %rsp # imm = 0x220
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0xc9e7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0xc9cf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x1b8(%rbp), %rdi
callq 0x3260
movq -0x1f8(%rbp), %rdi
callq 0x31e0
movq -0x1e0(%rbp), %rdi
callq 0x31e0
movq -0x1f0(%rbp), %rdi
callq 0x3630
movq -0x28(%rbp), %rdi
callq 0x35d0
nopl (%rax)
|
_ZN10serial_cpp11IOExceptionC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiPKc:
push rbp
mov rbp, rsp
sub rsp, 220h
mov [rbp+var_1E8], rsi
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov [rbp+var_20], rcx
mov rdi, [rbp+var_8]; this
mov [rbp+var_1F0], rdi
call _ZNSt9exceptionC2Ev; std::exception::exception(void)
mov rdi, [rbp+var_1F0]
mov rsi, [rbp+var_1E8]
lea rax, off_16D50
mov [rdi], rax
add rdi, 8
mov [rbp+var_1E0], rdi
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_; std::string::basic_string(std::string const&)
jmp short $+2
loc_C85B:
mov rdi, [rbp+var_1F0]
mov eax, [rbp+var_14]
mov [rdi+28h], eax
add rdi, 30h ; '0'
mov [rbp+var_1F8], rdi
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void)
mov rax, [rbp+var_1F0]
mov dword ptr [rax+50h], 0
lea rdi, [rbp+var_1B8]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void)
jmp short $+2
loc_C894:
lea rdi, [rbp+var_1A8]
lea rsi, aIoException; "IO Exception: "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_200], rax
jmp short $+2
loc_C8B0:
mov rdi, [rbp+var_200]
mov rsi, [rbp+var_20]
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_C8C2:
lea rdi, [rbp+var_1A8]
lea rsi, aFile; ", file "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_208], rax
jmp short $+2
loc_C8DE:
mov rdi, [rbp+var_208]
mov rsi, [rbp+var_1F0]
add rsi, 8
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov [rbp+var_210], rax
jmp short $+2
loc_C8FE:
mov rdi, [rbp+var_210]
lea rsi, aLine; ", line "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_218], rax
jmp short $+2
loc_C91A:
mov rdi, [rbp+var_218]
mov rax, [rbp+var_1F0]
mov esi, [rax+28h]
call __ZNSolsEi; std::ostream::operator<<(int)
mov [rbp+var_220], rax
jmp short $+2
loc_C939:
mov rdi, [rbp+var_220]
lea rsi, aFailed+7; "."
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_C94E:
lea rdi, [rbp+var_1D8]
lea rsi, [rbp+var_1B8]
call __ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(void)
jmp short $+2
loc_C963:
mov rdi, [rbp+var_1F0]
add rdi, 30h ; '0'
lea rsi, [rbp+var_1D8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
lea rdi, [rbp+var_1D8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_1B8]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
add rsp, 220h
pop rbp
retn
mov rcx, rax
mov eax, edx
mov [rbp+var_28], rcx
mov [rbp+var_2C], eax
jmp short loc_C9E7
mov rcx, rax
mov eax, edx
mov [rbp+var_28], rcx
mov [rbp+var_2C], eax
jmp short loc_C9CF
mov rcx, rax
mov eax, edx
mov [rbp+var_28], rcx
mov [rbp+var_2C], eax
lea rdi, [rbp+var_1B8]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
loc_C9CF:
mov rdi, [rbp+var_1F8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rdi, [rbp+var_1E0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_C9E7:
mov rdi, [rbp+var_1F0]; this
call __ZNSt9exceptionD2Ev; std::exception::~exception()
mov rdi, [rbp+var_28]
call __Unwind_Resume
|
long long serial_cpp::IOException::IOException(std::exception *a1, long long a2, int a3, long long a4)
{
long long v5; // [rsp+0h] [rbp-220h]
long long v6; // [rsp+8h] [rbp-218h]
long long v7; // [rsp+10h] [rbp-210h]
long long v8; // [rsp+18h] [rbp-208h]
long long v9; // [rsp+20h] [rbp-200h]
_BYTE v10[32]; // [rsp+48h] [rbp-1D8h] BYREF
_BYTE v11[16]; // [rsp+68h] [rbp-1B8h] BYREF
_BYTE v12[380]; // [rsp+78h] [rbp-1A8h] BYREF
long long v13; // [rsp+200h] [rbp-20h]
int v14; // [rsp+20Ch] [rbp-14h]
long long v15; // [rsp+210h] [rbp-10h]
std::exception *v16; // [rsp+218h] [rbp-8h]
v16 = a1;
v15 = a2;
v14 = a3;
v13 = a4;
std::exception::exception(a1);
*(_QWORD *)a1 = off_16D50;
std::string::basic_string((char *)a1 + 8, a2);
*((_DWORD *)a1 + 10) = v14;
std::string::basic_string((char *)a1 + 48);
*((_DWORD *)a1 + 20) = 0;
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v11);
v9 = std::operator<<<std::char_traits<char>>(v12, "IO Exception: ");
std::operator<<<std::char_traits<char>>(v9, v13);
v8 = std::operator<<<std::char_traits<char>>(v12, ", file ");
v7 = std::operator<<<char>(v8, (char *)a1 + 8);
v6 = std::operator<<<std::char_traits<char>>(v7, ", line ");
v5 = std::ostream::operator<<(v6, *((unsigned int *)a1 + 10));
std::operator<<<std::char_traits<char>>(v5, ".");
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(v10, v11);
std::string::operator=((char *)a1 + 48, v10);
std::string::~string(v10);
return std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(v11);
}
|
IOException:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x220
MOV qword ptr [RBP + -0x1e8],RSI
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 RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x1f0],RDI
CALL 0x0010ce60
MOV RDI,qword ptr [RBP + -0x1f0]
MOV RSI,qword ptr [RBP + -0x1e8]
LEA RAX,[0x116d50]
MOV qword ptr [RDI],RAX
ADD RDI,0x8
MOV qword ptr [RBP + -0x1e0],RDI
LAB_0010c854:
CALL 0x00103160
JMP 0x0010c85b
LAB_0010c85b:
MOV RDI,qword ptr [RBP + -0x1f0]
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RDI + 0x28],EAX
ADD RDI,0x30
MOV qword ptr [RBP + -0x1f8],RDI
CALL 0x001034b0
MOV RAX,qword ptr [RBP + -0x1f0]
MOV dword ptr [RAX + 0x50],0x0
LAB_0010c886:
LEA RDI,[RBP + -0x1b8]
CALL 0x00103220
JMP 0x0010c894
LAB_0010c894:
LEA RDI,[RBP + -0x1a8]
LAB_0010c89b:
LEA RSI,[0x11088b]
CALL 0x00103310
MOV qword ptr [RBP + -0x200],RAX
JMP 0x0010c8b0
LAB_0010c8b0:
MOV RDI,qword ptr [RBP + -0x200]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x00103310
JMP 0x0010c8c2
LAB_0010c8c2:
LEA RDI,[RBP + -0x1a8]
LEA RSI,[0x11089a]
CALL 0x00103310
MOV qword ptr [RBP + -0x208],RAX
JMP 0x0010c8de
LAB_0010c8de:
MOV RDI,qword ptr [RBP + -0x208]
MOV RSI,qword ptr [RBP + -0x1f0]
ADD RSI,0x8
CALL 0x001032c0
MOV qword ptr [RBP + -0x210],RAX
JMP 0x0010c8fe
LAB_0010c8fe:
MOV RDI,qword ptr [RBP + -0x210]
LEA RSI,[0x1108a2]
CALL 0x00103310
MOV qword ptr [RBP + -0x218],RAX
JMP 0x0010c91a
LAB_0010c91a:
MOV RDI,qword ptr [RBP + -0x218]
MOV RAX,qword ptr [RBP + -0x1f0]
MOV ESI,dword ptr [RAX + 0x28]
CALL 0x001035c0
MOV qword ptr [RBP + -0x220],RAX
JMP 0x0010c939
LAB_0010c939:
MOV RDI,qword ptr [RBP + -0x220]
LEA RSI,[0x110889]
CALL 0x00103310
JMP 0x0010c94e
LAB_0010c94e:
LEA RDI,[RBP + -0x1d8]
LEA RSI,[RBP + -0x1b8]
CALL 0x00103300
LAB_0010c961:
JMP 0x0010c963
LAB_0010c963:
MOV RDI,qword ptr [RBP + -0x1f0]
ADD RDI,0x30
LEA RSI,[RBP + -0x1d8]
CALL 0x00103410
LEA RDI,[RBP + -0x1d8]
CALL 0x001031e0
LEA RDI,[RBP + -0x1b8]
CALL 0x00103260
ADD RSP,0x220
POP RBP
RET
|
/* serial_cpp::IOException::IOException(std::__cxx11::string, int, char const*) */
void __thiscall
serial_cpp::IOException::IOException
(IOException *this,string *param_2,int4 param_3,char *param_4)
{
ostream *poVar1;
string local_1e0 [32];
stringstream local_1c0 [16];
ostream local_1b0 [392];
char *local_28;
int4 local_1c;
string *local_18;
IOException *local_10;
local_28 = param_4;
local_1c = param_3;
local_18 = param_2;
local_10 = this;
std::exception::exception((exception *)this);
*(int ***)this = &PTR__IOException_00116d50;
/* try { // try from 0010c854 to 0010c858 has its CatchHandler @ 0010c99b */
std::__cxx11::string::string((string *)(this + 8),param_2);
*(int4 *)(this + 0x28) = local_1c;
std::__cxx11::string::string((string *)(this + 0x30));
*(int4 *)(this + 0x50) = 0;
/* try { // try from 0010c886 to 0010c891 has its CatchHandler @ 0010c9a9 */
std::__cxx11::stringstream::stringstream(local_1c0);
/* try { // try from 0010c89b to 0010c960 has its CatchHandler @ 0010c9b7 */
poVar1 = std::operator<<(local_1b0,"IO Exception: ");
std::operator<<(poVar1,local_28);
poVar1 = std::operator<<(local_1b0,", file ");
poVar1 = std::operator<<(poVar1,(string *)(this + 8));
poVar1 = std::operator<<(poVar1,", line ");
poVar1 = (ostream *)std::ostream::operator<<(poVar1,*(int *)(this + 0x28));
std::operator<<(poVar1,".");
std::__cxx11::stringstream::str();
std::__cxx11::string::operator=((string *)(this + 0x30),local_1e0);
std::__cxx11::string::~string(local_1e0);
std::__cxx11::stringstream::~stringstream(local_1c0);
return;
}
|
|
7,693 |
test_sslenforce
|
eloqsql/libmariadb/unittest/libmariadb/misc.c
|
static int test_sslenforce(MYSQL *unused __attribute__((unused)))
{
MYSQL *mysql;
FILE *fp= NULL;
const char *env= getenv("MYSQL_TMP_DIR");
char cnf_file1[FN_REFLEN + 1];
SKIP_NOTLS;
SKIP_SKYSQL;
if (travis_test)
return SKIP;
if (!env)
env= "/tmp";
setenv("HOME", env, 1);
snprintf(cnf_file1, FN_REFLEN, "%s%c.my.cnf", env, FN_LIBCHAR);
FAIL_IF(!access(cnf_file1, R_OK), "access");
mysql= mysql_init(NULL);
fp= fopen(cnf_file1, "w");
FAIL_IF(!fp, "fopen");
/* Mix dash and underscore */
fprintf(fp, "[client]\nssl_enforce=1\n");
fclose(fp);
mysql_options(mysql, MYSQL_READ_DEFAULT_GROUP, "");
my_test_connect(mysql, hostname, username, password,
schema, port, socketname, 0);
remove(cnf_file1);
FAIL_IF(!mysql_get_ssl_cipher(mysql), "no secure connection");
mysql_close(mysql);
return OK;
}
|
O3
|
c
|
test_sslenforce:
pushq %rbp
movq %rsp, %rbp
leaq 0x2468a(%rip), %rdi # 0x39a40
callq 0x135b0
leaq 0x24767(%rip), %rdi # 0x39b29
xorl %eax, %eax
callq 0x1970b
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
popq %rbp
retq
|
test_sslenforce:
push rbp
mov rbp, rsp
lea rdi, aMysqlTmpDir; "MYSQL_TMP_DIR"
call _getenv
lea rdi, aTlsNotSupporte; "TLS not supported"
xor eax, eax
call diag
mov eax, 0FFFFFFFFh
pop rbp
retn
|
long long test_sslenforce(long long a1, int a2)
{
int v2; // edx
int v3; // ecx
int v4; // r8d
int v5; // r9d
getenv("MYSQL_TMP_DIR");
diag((unsigned int)"TLS not supported", a2, v2, v3, v4, v5);
return 0xFFFFFFFFLL;
}
|
test_sslenforce:
PUSH RBP
MOV RBP,RSP
LEA RDI,[0x139a40]
CALL 0x001135b0
LEA RDI,[0x139b29]
XOR EAX,EAX
CALL 0x0011970b
MOV EAX,0xffffffff
POP RBP
RET
|
int8 test_sslenforce(void)
{
getenv("MYSQL_TMP_DIR");
diag("TLS not supported");
return 0xffffffff;
}
|
|
7,694 |
trnman_recreate_trn_from_recovery
|
eloqsql/storage/maria/trnman.c
|
TRN *trnman_recreate_trn_from_recovery(uint16 shortid, TrID longid)
{
TrID old_trid_generator= global_trid_generator;
TRN *trn;
DBUG_ASSERT(maria_in_recovery && !maria_multi_threaded);
global_trid_generator= longid-1; /* force a correct trid in the new trn */
if (unlikely((trn= trnman_new_trn(NULL)) == NULL))
return NULL;
/* deallocate excessive allocations of trnman_new_trn() */
global_trid_generator= old_trid_generator;
set_if_bigger(global_trid_generator, longid);
short_trid_to_active_trn[trn->short_id]= 0;
DBUG_ASSERT(short_trid_to_active_trn[shortid] == NULL);
short_trid_to_active_trn[shortid]= trn;
trn->short_id= shortid;
return trn;
}
|
O0
|
c
|
trnman_recreate_trn_from_recovery:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movw %di, %ax
movw %ax, -0xa(%rbp)
movq %rsi, -0x18(%rbp)
movq 0x42a856(%rip), %rax # 0x478050
movq %rax, -0x20(%rbp)
jmp 0x4d800
movq -0x18(%rbp), %rax
subq $0x1, %rax
movq %rax, 0x42a841(%rip) # 0x478050
xorl %eax, %eax
movl %eax, %edi
callq 0x4c6a0
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
sete %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x4d845
movq $0x0, -0x8(%rbp)
jmp 0x4d8b0
movq -0x20(%rbp), %rax
movq %rax, 0x42a800(%rip) # 0x478050
movq 0x42a7f9(%rip), %rax # 0x478050
cmpq -0x18(%rbp), %rax
jae 0x4d868
movq -0x18(%rbp), %rax
movq %rax, 0x42a7e8(%rip) # 0x478050
jmp 0x4d86a
movq 0x42a4ff(%rip), %rax # 0x477d70
movq -0x28(%rbp), %rcx
movzwl 0xac(%rcx), %ecx
movq $0x0, (%rax,%rcx,8)
jmp 0x4d886
movq -0x28(%rbp), %rdx
movq 0x42a4df(%rip), %rax # 0x477d70
movzwl -0xa(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
movw -0xa(%rbp), %cx
movq -0x28(%rbp), %rax
movw %cx, 0xac(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
trnman_recreate_trn_from_recovery:
push rbp
mov rbp, rsp
sub rsp, 30h
mov ax, di
mov [rbp+var_A], ax
mov [rbp+var_18], rsi
mov rax, cs:global_trid_generator
mov [rbp+var_20], rax
jmp short $+2
loc_4D800:
mov rax, [rbp+var_18]
sub rax, 1
mov cs:global_trid_generator, rax
xor eax, eax
mov edi, eax
call trnman_new_trn
mov [rbp+var_28], rax
cmp rax, 0
setz 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_4D845
mov [rbp+var_8], 0
jmp short loc_4D8B0
loc_4D845:
mov rax, [rbp+var_20]
mov cs:global_trid_generator, rax
mov rax, cs:global_trid_generator
cmp rax, [rbp+var_18]
jnb short loc_4D868
mov rax, [rbp+var_18]
mov cs:global_trid_generator, rax
loc_4D868:
jmp short $+2
loc_4D86A:
mov rax, cs:short_trid_to_active_trn
mov rcx, [rbp+var_28]
movzx ecx, word ptr [rcx+0ACh]
mov qword ptr [rax+rcx*8], 0
jmp short $+2
loc_4D886:
mov rdx, [rbp+var_28]
mov rax, cs:short_trid_to_active_trn
movzx ecx, [rbp+var_A]
mov [rax+rcx*8], rdx
mov cx, [rbp+var_A]
mov rax, [rbp+var_28]
mov [rax+0ACh], cx
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
loc_4D8B0:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
|
long long trnman_recreate_trn_from_recovery(unsigned __int16 a1, unsigned long long a2)
{
long long v3; // [rsp+8h] [rbp-28h]
unsigned long long v4; // [rsp+10h] [rbp-20h]
v4 = global_trid_generator;
global_trid_generator = a2 - 1;
v3 = trnman_new_trn(0LL);
if ( !v3 )
return 0LL;
global_trid_generator = v4;
if ( v4 < a2 )
global_trid_generator = a2;
*(_QWORD *)(short_trid_to_active_trn + 8LL * *(unsigned __int16 *)(v3 + 172)) = 0LL;
*(_QWORD *)(short_trid_to_active_trn + 8LL * a1) = v3;
*(_WORD *)(v3 + 172) = a1;
return v3;
}
|
trnman_recreate_trn_from_recovery:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV AX,DI
MOV word ptr [RBP + -0xa],AX
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [0x00578050]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0014d800
LAB_0014d800:
MOV RAX,qword ptr [RBP + -0x18]
SUB RAX,0x1
MOV qword ptr [0x00578050],RAX
XOR EAX,EAX
MOV EDI,EAX
CALL 0x0014c6a0
MOV qword ptr [RBP + -0x28],RAX
CMP RAX,0x0
SETZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x0014d845
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0014d8b0
LAB_0014d845:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [0x00578050],RAX
MOV RAX,qword ptr [0x00578050]
CMP RAX,qword ptr [RBP + -0x18]
JNC 0x0014d868
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [0x00578050],RAX
LAB_0014d868:
JMP 0x0014d86a
LAB_0014d86a:
MOV RAX,qword ptr [0x00577d70]
MOV RCX,qword ptr [RBP + -0x28]
MOVZX ECX,word ptr [RCX + 0xac]
MOV qword ptr [RAX + RCX*0x8],0x0
JMP 0x0014d886
LAB_0014d886:
MOV RDX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [0x00577d70]
MOVZX ECX,word ptr [RBP + -0xa]
MOV qword ptr [RAX + RCX*0x8],RDX
MOV CX,word ptr [RBP + -0xa]
MOV RAX,qword ptr [RBP + -0x28]
MOV word ptr [RAX + 0xac],CX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
LAB_0014d8b0:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
long trnman_recreate_trn_from_recovery(ushort param_1,ulong param_2)
{
ulong uVar1;
int8 local_10;
uVar1 = global_trid_generator;
global_trid_generator = param_2 - 1;
local_10 = trnman_new_trn(0);
if (local_10 == 0) {
local_10 = 0;
}
else {
global_trid_generator = uVar1;
if (uVar1 < param_2) {
global_trid_generator = param_2;
}
*(int8 *)(short_trid_to_active_trn + (ulong)*(ushort *)(local_10 + 0xac) * 8) = 0;
*(long *)(short_trid_to_active_trn + (ulong)param_1 * 8) = local_10;
*(ushort *)(local_10 + 0xac) = param_1;
}
return local_10;
}
|
|
7,695 |
trnman_recreate_trn_from_recovery
|
eloqsql/storage/maria/trnman.c
|
TRN *trnman_recreate_trn_from_recovery(uint16 shortid, TrID longid)
{
TrID old_trid_generator= global_trid_generator;
TRN *trn;
DBUG_ASSERT(maria_in_recovery && !maria_multi_threaded);
global_trid_generator= longid-1; /* force a correct trid in the new trn */
if (unlikely((trn= trnman_new_trn(NULL)) == NULL))
return NULL;
/* deallocate excessive allocations of trnman_new_trn() */
global_trid_generator= old_trid_generator;
set_if_bigger(global_trid_generator, longid);
short_trid_to_active_trn[trn->short_id]= 0;
DBUG_ASSERT(short_trid_to_active_trn[shortid] == NULL);
short_trid_to_active_trn[shortid]= trn;
trn->short_id= shortid;
return trn;
}
|
O3
|
c
|
trnman_recreate_trn_from_recovery:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movl %edi, %ebx
movq 0x3d2f73(%rip), %r15 # 0x3fd450
leaq -0x1(%rsi), %rax
movq %rax, 0x3d2f68(%rip) # 0x3fd450
xorl %edi, %edi
callq 0x46a50
testq %rax, %rax
je 0x2a523
cmpq %r14, %r15
cmovaq %r15, %r14
movq %r14, 0x3d2f4e(%rip) # 0x3fd450
movq 0x3d2c67(%rip), %rcx # 0x3fd170
movzwl 0xac(%rax), %edx
andq $0x0, (%rcx,%rdx,8)
movzwl %bx, %edx
movq %rax, (%rcx,%rdx,8)
movw %dx, 0xac(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
trnman_recreate_trn_from_recovery:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov r14, rsi
mov ebx, edi
mov r15, cs:global_trid_generator
lea rax, [rsi-1]
mov cs:global_trid_generator, rax
xor edi, edi
call trnman_new_trn
test rax, rax
jz short loc_2A523
cmp r15, r14
cmova r14, r15
mov cs:global_trid_generator, r14
mov rcx, cs:short_trid_to_active_trn
movzx edx, word ptr [rax+0ACh]
and qword ptr [rcx+rdx*8], 0
movzx edx, bx
mov [rcx+rdx*8], rax
mov [rax+0ACh], dx
loc_2A523:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long trnman_recreate_trn_from_recovery(unsigned __int16 a1, unsigned long long a2)
{
long long v2; // r14
unsigned long long v3; // r15
long long result; // rax
long long v5; // rcx
v2 = a2;
v3 = global_trid_generator;
global_trid_generator = a2 - 1;
result = trnman_new_trn(0LL);
if ( result )
{
if ( v3 > a2 )
v2 = v3;
global_trid_generator = v2;
v5 = short_trid_to_active_trn;
*(_QWORD *)(short_trid_to_active_trn + 8LL * *(unsigned __int16 *)(result + 172)) = 0LL;
*(_QWORD *)(v5 + 8LL * a1) = result;
*(_WORD *)(result + 172) = a1;
}
return result;
}
|
trnman_recreate_trn_from_recovery:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV EBX,EDI
MOV R15,qword ptr [0x004fd450]
LEA RAX,[RSI + -0x1]
MOV qword ptr [0x004fd450],RAX
XOR EDI,EDI
CALL 0x00146a50
TEST RAX,RAX
JZ 0x0012a523
CMP R15,R14
CMOVA R14,R15
MOV qword ptr [0x004fd450],R14
MOV RCX,qword ptr [0x004fd170]
MOVZX EDX,word ptr [RAX + 0xac]
AND qword ptr [RCX + RDX*0x8],0x0
MOVZX EDX,BX
MOV qword ptr [RCX + RDX*0x8],RAX
MOV word ptr [RAX + 0xac],DX
LAB_0012a523:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
void trnman_recreate_trn_from_recovery(ushort param_1,ulong param_2)
{
long lVar1;
ulong uVar2;
long lVar3;
uVar2 = global_trid_generator;
global_trid_generator = param_2 - 1;
lVar3 = trnman_new_trn(0);
lVar1 = short_trid_to_active_trn;
if (lVar3 != 0) {
global_trid_generator = param_2;
if (param_2 < uVar2) {
global_trid_generator = uVar2;
}
*(int8 *)(short_trid_to_active_trn + (ulong)*(ushort *)(lVar3 + 0xac) * 8) = 0;
*(long *)(lVar1 + (ulong)param_1 * 8) = lVar3;
*(ushort *)(lVar3 + 0xac) = param_1;
}
return;
}
|
|
7,696 |
JS_WriteObject2
|
bluesky950520[P]quickjs/quickjs.c
|
uint8_t *JS_WriteObject2(JSContext *ctx, size_t *psize, JSValue obj,
int flags, JSSABTab *psab_tab)
{
BCWriterState ss, *s = &ss;
memset(s, 0, sizeof(*s));
s->ctx = ctx;
s->allow_bytecode = ((flags & JS_WRITE_OBJ_BYTECODE) != 0);
s->allow_sab = ((flags & JS_WRITE_OBJ_SAB) != 0);
s->allow_reference = ((flags & JS_WRITE_OBJ_REFERENCE) != 0);
s->allow_source = ((flags & JS_WRITE_OBJ_STRIP_SOURCE) == 0);
s->allow_debug = ((flags & JS_WRITE_OBJ_STRIP_DEBUG) == 0);
/* XXX: could use a different version when bytecode is included */
if (s->allow_bytecode)
s->first_atom = JS_ATOM_END;
else
s->first_atom = 1;
js_dbuf_init(ctx, &s->dbuf);
js_object_list_init(&s->object_list);
if (JS_WriteObjectRec(s, obj))
goto fail;
if (JS_WriteObjectAtoms(s))
goto fail;
js_object_list_end(ctx, &s->object_list);
js_free(ctx, s->atom_to_idx);
js_free(ctx, s->idx_to_atom);
*psize = s->dbuf.size;
if (psab_tab) {
psab_tab->tab = s->sab_tab;
psab_tab->len = s->sab_tab_len;
} else {
js_free(ctx, s->sab_tab);
}
return s->dbuf.buf;
fail:
js_object_list_end(ctx, &s->object_list);
js_free(ctx, s->atom_to_idx);
js_free(ctx, s->idx_to_atom);
dbuf_free(&s->dbuf);
*psize = 0;
if (psab_tab) {
psab_tab->tab = NULL;
psab_tab->len = 0;
}
return NULL;
}
|
O0
|
c
|
JS_WriteObject2:
subq $0xd8, %rsp
movq %rdx, 0xc0(%rsp)
movq %rcx, 0xc8(%rsp)
movq %rdi, 0xb8(%rsp)
movq %rsi, 0xb0(%rsp)
movl %r8d, 0xac(%rsp)
movq %r9, 0xa0(%rsp)
leaq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rdi
xorl %esi, %esi
movl $0x90, %edx
callq 0xe340
movq 0xb8(%rsp), %rcx
movq 0x8(%rsp), %rax
movq %rcx, (%rax)
movl 0xac(%rsp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %edx
movq 0x8(%rsp), %rax
movl 0x38(%rax), %ecx
andl $0xff, %edx
andl $0xffffff00, %ecx # imm = 0xFFFFFF00
orl %edx, %ecx
movl %ecx, 0x38(%rax)
movl 0xac(%rsp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %edx
movq 0x8(%rsp), %rax
movl 0x38(%rax), %ecx
andl $0xff, %edx
shll $0x8, %edx
andl $0xffff00ff, %ecx # imm = 0xFFFF00FF
orl %edx, %ecx
movl %ecx, 0x38(%rax)
movl 0xac(%rsp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %edx
movq 0x8(%rsp), %rax
movl 0x38(%rax), %ecx
andl $0xff, %edx
shll $0x10, %edx
andl $0xff00ffff, %ecx # imm = 0xFF00FFFF
orl %edx, %ecx
movl %ecx, 0x38(%rax)
movl 0xac(%rsp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %edx
movq 0x8(%rsp), %rax
movl 0x38(%rax), %ecx
andl $0x1, %edx
shll $0x18, %edx
andl $0xfeffffff, %ecx # imm = 0xFEFFFFFF
orl %edx, %ecx
movl %ecx, 0x38(%rax)
movl 0xac(%rsp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %edx
movq 0x8(%rsp), %rax
movl 0x38(%rax), %ecx
andl $0x1, %edx
shll $0x19, %edx
andl $0xfdffffff, %ecx # imm = 0xFDFFFFFF
orl %edx, %ecx
movl %ecx, 0x38(%rax)
movq 0x8(%rsp), %rax
movl 0x38(%rax), %eax
shll $0x18, %eax
sarl $0x18, %eax
cmpl $0x0, %eax
je 0x49d9f
movq 0x8(%rsp), %rax
movl $0xe0, 0x3c(%rax)
jmp 0x49dab
movq 0x8(%rsp), %rax
movl $0x1, 0x3c(%rax)
movq 0xb8(%rsp), %rdi
movq 0x8(%rsp), %rsi
addq $0x8, %rsi
callq 0x49f70
movq 0x8(%rsp), %rdi
addq $0x70, %rdi
callq 0x49fa0
movq 0x8(%rsp), %rdi
movq 0xc0(%rsp), %rsi
movq 0xc8(%rsp), %rdx
callq 0x49fc0
cmpl $0x0, %eax
je 0x49df3
jmp 0x49ebf
movq 0x8(%rsp), %rdi
callq 0x4a660
cmpl $0x0, %eax
je 0x49e07
jmp 0x49ebf
movq 0xb8(%rsp), %rdi
movq 0x8(%rsp), %rsi
addq $0x70, %rsi
callq 0x4a840
movq 0xb8(%rsp), %rdi
movq 0x8(%rsp), %rax
movq 0x40(%rax), %rsi
callq 0x20af0
movq 0xb8(%rsp), %rdi
movq 0x8(%rsp), %rax
movq 0x50(%rax), %rsi
callq 0x20af0
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rcx
movq 0xb0(%rsp), %rax
movq %rcx, (%rax)
cmpq $0x0, 0xa0(%rsp)
je 0x49e93
movq 0x8(%rsp), %rax
movq 0x60(%rax), %rcx
movq 0xa0(%rsp), %rax
movq %rcx, (%rax)
movq 0x8(%rsp), %rax
movslq 0x68(%rax), %rcx
movq 0xa0(%rsp), %rax
movq %rcx, 0x8(%rax)
jmp 0x49ea9
movq 0xb8(%rsp), %rdi
movq 0x8(%rsp), %rax
movq 0x60(%rax), %rsi
callq 0x20af0
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0xd0(%rsp)
jmp 0x49f54
movq 0xb8(%rsp), %rdi
movq 0x8(%rsp), %rsi
addq $0x70, %rsi
callq 0x4a840
movq 0xb8(%rsp), %rdi
movq 0x8(%rsp), %rax
movq 0x40(%rax), %rsi
callq 0x20af0
movq 0xb8(%rsp), %rdi
movq 0x8(%rsp), %rax
movq 0x50(%rax), %rsi
callq 0x20af0
movq 0x8(%rsp), %rdi
addq $0x8, %rdi
callq 0x1d670
movq 0xb0(%rsp), %rax
movq $0x0, (%rax)
cmpq $0x0, 0xa0(%rsp)
je 0x49f48
movq 0xa0(%rsp), %rax
movq $0x0, (%rax)
movq 0xa0(%rsp), %rax
movq $0x0, 0x8(%rax)
movq $0x0, 0xd0(%rsp)
movq 0xd0(%rsp), %rax
addq $0xd8, %rsp
retq
nopw %cs:(%rax,%rax)
|
JS_WriteObject2:
sub rsp, 0D8h
mov [rsp+0D8h+var_18], rdx
mov [rsp+0D8h+var_10], rcx
mov [rsp+0D8h+var_20], rdi
mov [rsp+0D8h+var_28], rsi
mov [rsp+0D8h+var_2C], r8d
mov [rsp+0D8h+var_38], r9
lea rax, [rsp+0D8h+var_C8]
mov [rsp+0D8h+var_D0], rax
mov rdi, [rsp+0D8h+var_D0]
xor esi, esi
mov edx, 90h
call _memset
mov rcx, [rsp+0D8h+var_20]
mov rax, [rsp+0D8h+var_D0]
mov [rax], rcx
mov eax, [rsp+0D8h+var_2C]
and eax, 1
cmp eax, 0
setnz al
and al, 1
movzx edx, al
mov rax, [rsp+0D8h+var_D0]
mov ecx, [rax+38h]
and edx, 0FFh
and ecx, 0FFFFFF00h
or ecx, edx
mov [rax+38h], ecx
mov eax, [rsp+0D8h+var_2C]
and eax, 4
cmp eax, 0
setnz al
and al, 1
movzx edx, al
mov rax, [rsp+0D8h+var_D0]
mov ecx, [rax+38h]
and edx, 0FFh
shl edx, 8
and ecx, 0FFFF00FFh
or ecx, edx
mov [rax+38h], ecx
mov eax, [rsp+0D8h+var_2C]
and eax, 8
cmp eax, 0
setnz al
and al, 1
movzx edx, al
mov rax, [rsp+0D8h+var_D0]
mov ecx, [rax+38h]
and edx, 0FFh
shl edx, 10h
and ecx, 0FF00FFFFh
or ecx, edx
mov [rax+38h], ecx
mov eax, [rsp+0D8h+var_2C]
and eax, 10h
cmp eax, 0
setz al
and al, 1
movzx edx, al
mov rax, [rsp+0D8h+var_D0]
mov ecx, [rax+38h]
and edx, 1
shl edx, 18h
and ecx, 0FEFFFFFFh
or ecx, edx
mov [rax+38h], ecx
mov eax, [rsp+0D8h+var_2C]
and eax, 20h
cmp eax, 0
setz al
and al, 1
movzx edx, al
mov rax, [rsp+0D8h+var_D0]
mov ecx, [rax+38h]
and edx, 1
shl edx, 19h
and ecx, 0FDFFFFFFh
or ecx, edx
mov [rax+38h], ecx
mov rax, [rsp+0D8h+var_D0]
mov eax, [rax+38h]
shl eax, 18h
sar eax, 18h
cmp eax, 0
jz short loc_49D9F
mov rax, [rsp+0D8h+var_D0]
mov dword ptr [rax+3Ch], 0E0h
jmp short loc_49DAB
loc_49D9F:
mov rax, [rsp+0D8h+var_D0]
mov dword ptr [rax+3Ch], 1
loc_49DAB:
mov rdi, [rsp+0D8h+var_20]
mov rsi, [rsp+0D8h+var_D0]
add rsi, 8
call js_dbuf_init
mov rdi, [rsp+0D8h+var_D0]
add rdi, 70h ; 'p'
call js_object_list_init
mov rdi, [rsp+0D8h+var_D0]
mov rsi, [rsp+0D8h+var_18]
mov rdx, [rsp+0D8h+var_10]
call JS_WriteObjectRec
cmp eax, 0
jz short loc_49DF3
jmp loc_49EBF
loc_49DF3:
mov rdi, [rsp+0D8h+var_D0]
call JS_WriteObjectAtoms
cmp eax, 0
jz short loc_49E07
jmp loc_49EBF
loc_49E07:
mov rdi, [rsp+0D8h+var_20]
mov rsi, [rsp+0D8h+var_D0]
add rsi, 70h ; 'p'
call js_object_list_end
mov rdi, [rsp+0D8h+var_20]
mov rax, [rsp+0D8h+var_D0]
mov rsi, [rax+40h]
call js_free
mov rdi, [rsp+0D8h+var_20]
mov rax, [rsp+0D8h+var_D0]
mov rsi, [rax+50h]
call js_free
mov rax, [rsp+0D8h+var_D0]
mov rcx, [rax+10h]
mov rax, [rsp+0D8h+var_28]
mov [rax], rcx
cmp [rsp+0D8h+var_38], 0
jz short loc_49E93
mov rax, [rsp+0D8h+var_D0]
mov rcx, [rax+60h]
mov rax, [rsp+0D8h+var_38]
mov [rax], rcx
mov rax, [rsp+0D8h+var_D0]
movsxd rcx, dword ptr [rax+68h]
mov rax, [rsp+0D8h+var_38]
mov [rax+8], rcx
jmp short loc_49EA9
loc_49E93:
mov rdi, [rsp+0D8h+var_20]
mov rax, [rsp+0D8h+var_D0]
mov rsi, [rax+60h]
call js_free
loc_49EA9:
mov rax, [rsp+0D8h+var_D0]
mov rax, [rax+8]
mov [rsp+0D8h+var_8], rax
jmp loc_49F54
loc_49EBF:
mov rdi, [rsp+0D8h+var_20]
mov rsi, [rsp+0D8h+var_D0]
add rsi, 70h ; 'p'
call js_object_list_end
mov rdi, [rsp+0D8h+var_20]
mov rax, [rsp+0D8h+var_D0]
mov rsi, [rax+40h]
call js_free
mov rdi, [rsp+0D8h+var_20]
mov rax, [rsp+0D8h+var_D0]
mov rsi, [rax+50h]
call js_free
mov rdi, [rsp+0D8h+var_D0]
add rdi, 8
call dbuf_free
mov rax, [rsp+0D8h+var_28]
mov qword ptr [rax], 0
cmp [rsp+0D8h+var_38], 0
jz short loc_49F48
mov rax, [rsp+0D8h+var_38]
mov qword ptr [rax], 0
mov rax, [rsp+0D8h+var_38]
mov qword ptr [rax+8], 0
loc_49F48:
mov [rsp+0D8h+var_8], 0
loc_49F54:
mov rax, [rsp+0D8h+var_8]
add rsp, 0D8h
retn
|
long long JS_WriteObject2(long long a1, _QWORD *a2, long long a3, long long a4, int a5, _QWORD *a6)
{
long long v7; // [rsp+10h] [rbp-C8h] BYREF
_QWORD v8[6]; // [rsp+18h] [rbp-C0h] BYREF
unsigned int v9; // [rsp+48h] [rbp-90h]
int v10; // [rsp+4Ch] [rbp-8Ch]
long long v11; // [rsp+50h] [rbp-88h]
long long v12; // [rsp+60h] [rbp-78h]
long long v13; // [rsp+70h] [rbp-68h]
int v14; // [rsp+78h] [rbp-60h]
_BYTE v15[32]; // [rsp+80h] [rbp-58h] BYREF
_QWORD *v16; // [rsp+A0h] [rbp-38h]
int v17; // [rsp+ACh] [rbp-2Ch]
_QWORD *v18; // [rsp+B0h] [rbp-28h]
long long v19; // [rsp+B8h] [rbp-20h]
long long v20; // [rsp+C0h] [rbp-18h]
long long v21; // [rsp+C8h] [rbp-10h]
v20 = a3;
v21 = a4;
v19 = a1;
v18 = a2;
v17 = a5;
v16 = a6;
memset(&v7, 0LL, 144LL);
v7 = v19;
v9 = ((v17 & 1) != 0) | v9 & 0xFFFFFF00;
v9 = (((v17 & 4) != 0) << 8) | v9 & 0xFFFF00FF;
v9 = (((v17 & 8) != 0) << 16) | v9 & 0xFF00FFFF;
v9 = (((v17 & 0x10) == 0) << 24) | v9 & 0xFEFFFFFF;
v9 = (((v17 & 0x20) == 0) << 25) | v9 & 0xFDFFFFFF;
if ( (_BYTE)v9 )
v10 = 224;
else
v10 = 1;
js_dbuf_init(v19, v8);
js_object_list_init(v15);
if ( (unsigned int)JS_WriteObjectRec(&v7, v20, v21) || (unsigned int)JS_WriteObjectAtoms(&v7) )
{
js_object_list_end(v19, v15);
js_free(v19, v11);
js_free(v19, v12);
dbuf_free((long long)v8);
*v18 = 0LL;
if ( v16 )
{
*v16 = 0LL;
v16[1] = 0LL;
}
return 0LL;
}
else
{
js_object_list_end(v19, v15);
js_free(v19, v11);
js_free(v19, v12);
*v18 = v8[1];
if ( v16 )
{
*v16 = v13;
v16[1] = v14;
}
else
{
js_free(v19, v13);
}
return v8[0];
}
}
|
JS_WriteObject2:
SUB RSP,0xd8
MOV qword ptr [RSP + 0xc0],RDX
MOV qword ptr [RSP + 0xc8],RCX
MOV qword ptr [RSP + 0xb8],RDI
MOV qword ptr [RSP + 0xb0],RSI
MOV dword ptr [RSP + 0xac],R8D
MOV qword ptr [RSP + 0xa0],R9
LEA RAX,[RSP + 0x10]
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x8]
XOR ESI,ESI
MOV EDX,0x90
CALL 0x0010e340
MOV RCX,qword ptr [RSP + 0xb8]
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RAX],RCX
MOV EAX,dword ptr [RSP + 0xac]
AND EAX,0x1
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EDX,AL
MOV RAX,qword ptr [RSP + 0x8]
MOV ECX,dword ptr [RAX + 0x38]
AND EDX,0xff
AND ECX,0xffffff00
OR ECX,EDX
MOV dword ptr [RAX + 0x38],ECX
MOV EAX,dword ptr [RSP + 0xac]
AND EAX,0x4
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EDX,AL
MOV RAX,qword ptr [RSP + 0x8]
MOV ECX,dword ptr [RAX + 0x38]
AND EDX,0xff
SHL EDX,0x8
AND ECX,0xffff00ff
OR ECX,EDX
MOV dword ptr [RAX + 0x38],ECX
MOV EAX,dword ptr [RSP + 0xac]
AND EAX,0x8
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EDX,AL
MOV RAX,qword ptr [RSP + 0x8]
MOV ECX,dword ptr [RAX + 0x38]
AND EDX,0xff
SHL EDX,0x10
AND ECX,0xff00ffff
OR ECX,EDX
MOV dword ptr [RAX + 0x38],ECX
MOV EAX,dword ptr [RSP + 0xac]
AND EAX,0x10
CMP EAX,0x0
SETZ AL
AND AL,0x1
MOVZX EDX,AL
MOV RAX,qword ptr [RSP + 0x8]
MOV ECX,dword ptr [RAX + 0x38]
AND EDX,0x1
SHL EDX,0x18
AND ECX,0xfeffffff
OR ECX,EDX
MOV dword ptr [RAX + 0x38],ECX
MOV EAX,dword ptr [RSP + 0xac]
AND EAX,0x20
CMP EAX,0x0
SETZ AL
AND AL,0x1
MOVZX EDX,AL
MOV RAX,qword ptr [RSP + 0x8]
MOV ECX,dword ptr [RAX + 0x38]
AND EDX,0x1
SHL EDX,0x19
AND ECX,0xfdffffff
OR ECX,EDX
MOV dword ptr [RAX + 0x38],ECX
MOV RAX,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RAX + 0x38]
SHL EAX,0x18
SAR EAX,0x18
CMP EAX,0x0
JZ 0x00149d9f
MOV RAX,qword ptr [RSP + 0x8]
MOV dword ptr [RAX + 0x3c],0xe0
JMP 0x00149dab
LAB_00149d9f:
MOV RAX,qword ptr [RSP + 0x8]
MOV dword ptr [RAX + 0x3c],0x1
LAB_00149dab:
MOV RDI,qword ptr [RSP + 0xb8]
MOV RSI,qword ptr [RSP + 0x8]
ADD RSI,0x8
CALL 0x00149f70
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x70
CALL 0x00149fa0
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RSP + 0xc0]
MOV RDX,qword ptr [RSP + 0xc8]
CALL 0x00149fc0
CMP EAX,0x0
JZ 0x00149df3
JMP 0x00149ebf
LAB_00149df3:
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x0014a660
CMP EAX,0x0
JZ 0x00149e07
JMP 0x00149ebf
LAB_00149e07:
MOV RDI,qword ptr [RSP + 0xb8]
MOV RSI,qword ptr [RSP + 0x8]
ADD RSI,0x70
CALL 0x0014a840
MOV RDI,qword ptr [RSP + 0xb8]
MOV RAX,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RAX + 0x40]
CALL 0x00120af0
MOV RDI,qword ptr [RSP + 0xb8]
MOV RAX,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RAX + 0x50]
CALL 0x00120af0
MOV RAX,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RSP + 0xb0]
MOV qword ptr [RAX],RCX
CMP qword ptr [RSP + 0xa0],0x0
JZ 0x00149e93
MOV RAX,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RAX + 0x60]
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RSP + 0x8]
MOVSXD RCX,dword ptr [RAX + 0x68]
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RAX + 0x8],RCX
JMP 0x00149ea9
LAB_00149e93:
MOV RDI,qword ptr [RSP + 0xb8]
MOV RAX,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RAX + 0x60]
CALL 0x00120af0
LAB_00149ea9:
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0xd0],RAX
JMP 0x00149f54
LAB_00149ebf:
MOV RDI,qword ptr [RSP + 0xb8]
MOV RSI,qword ptr [RSP + 0x8]
ADD RSI,0x70
CALL 0x0014a840
MOV RDI,qword ptr [RSP + 0xb8]
MOV RAX,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RAX + 0x40]
CALL 0x00120af0
MOV RDI,qword ptr [RSP + 0xb8]
MOV RAX,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RAX + 0x50]
CALL 0x00120af0
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x8
CALL 0x0011d670
MOV RAX,qword ptr [RSP + 0xb0]
MOV qword ptr [RAX],0x0
CMP qword ptr [RSP + 0xa0],0x0
JZ 0x00149f48
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RAX],0x0
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RAX + 0x8],0x0
LAB_00149f48:
MOV qword ptr [RSP + 0xd0],0x0
LAB_00149f54:
MOV RAX,qword ptr [RSP + 0xd0]
ADD RSP,0xd8
RET
|
int8
JS_WriteObject2(int8 param_1,int8 *param_2,int8 param_3,int8 param_4,
uint param_5,int8 *param_6)
{
int iVar1;
bool bVar2;
int8 local_c8;
int8 local_c0;
int8 local_b8;
uint local_90;
int4 local_8c;
int8 local_88;
int8 local_78;
int8 local_68;
int local_60;
int1 auStack_58 [32];
int8 *local_38;
uint local_2c;
int8 *local_28;
int8 local_20;
int8 local_18;
int8 local_10;
int8 local_8;
local_38 = param_6;
local_2c = param_5;
local_28 = param_2;
local_20 = param_1;
local_18 = param_3;
local_10 = param_4;
memset(&local_c8,0,0x90);
local_c8 = local_20;
bVar2 = (local_2c & 1) != 0;
local_90 = local_90 & 0xfc000000 | (uint)bVar2 | (uint)((local_2c & 4) != 0) << 8 |
(uint)((local_2c & 8) != 0) << 0x10 | (uint)((local_2c & 0x10) == 0) << 0x18 |
(uint)((local_2c & 0x20) == 0) << 0x19;
if (bVar2) {
local_8c = 0xe0;
}
else {
local_8c = 1;
}
js_dbuf_init(local_20,&local_c0);
js_object_list_init(auStack_58);
iVar1 = JS_WriteObjectRec(&local_c8,local_18,local_10);
if ((iVar1 == 0) && (iVar1 = JS_WriteObjectAtoms(&local_c8), iVar1 == 0)) {
js_object_list_end(local_20,auStack_58);
js_free(local_20,local_88);
js_free(local_20,local_78);
*local_28 = local_b8;
if (local_38 == (int8 *)0x0) {
js_free(local_20,local_68);
}
else {
*local_38 = local_68;
local_38[1] = (long)local_60;
}
local_8 = local_c0;
}
else {
js_object_list_end(local_20,auStack_58);
js_free(local_20,local_88);
js_free(local_20,local_78);
dbuf_free(&local_c0);
*local_28 = 0;
if (local_38 != (int8 *)0x0) {
*local_38 = 0;
local_38[1] = 0;
}
local_8 = 0;
}
return local_8;
}
|
|
7,697 |
JS_WriteObject2
|
bluesky950520[P]quickjs/quickjs.c
|
uint8_t *JS_WriteObject2(JSContext *ctx, size_t *psize, JSValue obj,
int flags, JSSABTab *psab_tab)
{
BCWriterState ss, *s = &ss;
memset(s, 0, sizeof(*s));
s->ctx = ctx;
s->allow_bytecode = ((flags & JS_WRITE_OBJ_BYTECODE) != 0);
s->allow_sab = ((flags & JS_WRITE_OBJ_SAB) != 0);
s->allow_reference = ((flags & JS_WRITE_OBJ_REFERENCE) != 0);
s->allow_source = ((flags & JS_WRITE_OBJ_STRIP_SOURCE) == 0);
s->allow_debug = ((flags & JS_WRITE_OBJ_STRIP_DEBUG) == 0);
/* XXX: could use a different version when bytecode is included */
if (s->allow_bytecode)
s->first_atom = JS_ATOM_END;
else
s->first_atom = 1;
js_dbuf_init(ctx, &s->dbuf);
js_object_list_init(&s->object_list);
if (JS_WriteObjectRec(s, obj))
goto fail;
if (JS_WriteObjectAtoms(s))
goto fail;
js_object_list_end(ctx, &s->object_list);
js_free(ctx, s->atom_to_idx);
js_free(ctx, s->idx_to_atom);
*psize = s->dbuf.size;
if (psab_tab) {
psab_tab->tab = s->sab_tab;
psab_tab->len = s->sab_tab_len;
} else {
js_free(ctx, s->sab_tab);
}
return s->dbuf.buf;
fail:
js_object_list_end(ctx, &s->object_list);
js_free(ctx, s->atom_to_idx);
js_free(ctx, s->idx_to_atom);
dbuf_free(&s->dbuf);
*psize = 0;
if (psab_tab) {
psab_tab->tab = NULL;
psab_tab->len = 0;
}
return NULL;
}
|
O3
|
c
|
JS_WriteObject2:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %r9, %r13
movl %r8d, %r14d
movq %rcx, (%rsp)
movq %rdx, %rbp
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x60(%rsp), %r12
movl $0x88, %edx
movq %r12, %rdi
xorl %esi, %esi
callq 0xe340
movq %r15, -0x8(%r12)
movl %r14d, %eax
andl $0x1, %eax
movl %r14d, %ecx
andl $0x4, %ecx
shll $0x6, %ecx
movl %r14d, %edx
andl $0x8, %edx
shll $0xd, %edx
orl %ecx, %edx
andl $0x30, %r14d
shll $0x14, %r14d
orl %edx, %r14d
orl %eax, %r14d
xorl $0x3000000, %r14d # imm = 0x3000000
movl %r14d, 0x30(%r12)
testl %eax, %eax
movl $0x1, %eax
movl $0xe0, %ecx
cmovel %eax, %ecx
movl %ecx, 0x34(%r12)
movq 0x18(%r15), %rsi
leaq 0x1466e(%rip), %rdx # 0x462bc
movq %r12, %rdi
callq 0x1b01f
xorps %xmm0, %xmm0
movups %xmm0, 0x78(%r12)
movups %xmm0, 0x68(%r12)
leaq 0x58(%rsp), %rdi
movq %rbp, %rsi
movq (%rsp), %rdx
callq 0x31ee0
testl %eax, %eax
jne 0x31d98
movq %r15, 0x10(%rsp)
movq %rbx, 0x18(%rsp)
movq %r13, (%rsp)
movq 0x58(%rsp), %rax
movq 0x18(%rax), %r13
movups (%r12), %xmm0
movups 0x10(%r12), %xmm1
movups 0x20(%r12), %xmm2
movaps %xmm2, 0x40(%rsp)
movaps %xmm1, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
leaq 0x14600(%rip), %rdx # 0x462bc
movq %r12, %rdi
movq %r13, %rsi
callq 0x1b01f
movq %r12, %rdi
movl $0x13, %esi
callq 0x1b1c5
movl 0xb0(%rsp), %esi
movq %r12, %rdi
callq 0x46793
cmpl $0x0, 0xb0(%rsp)
jle 0x31d62
xorl %r15d, %r15d
leaq 0x58(%rsp), %rbp
leaq 0xc(%rsp), %r14
movq 0xa8(%rsp), %rax
movslq (%rax,%r15,4), %rbx
cmpq $0xdf, %rbx
jle 0x31d34
movq 0x68(%r13), %rax
movq (%rax,%rbx,8), %rbx
movq 0x4(%rbx), %rsi
shrq $0x3e, %rsi
movq %r12, %rdi
callq 0x1b1c5
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x462c1
jmp 0x31d52
movq %r12, %rdi
xorl %esi, %esi
callq 0x1b1c5
movl %ebx, 0xc(%rsp)
movl $0x4, %edx
movq %r12, %rdi
movq %r14, %rsi
callq 0x1b116
incq %r15
movslq 0xb0(%rsp), %rax
cmpq %rax, %r15
jl 0x31cfa
movslq 0x68(%rsp), %r14
leaq 0x20(%rsp), %rdi
movq 0x8(%rdi), %rsi
addq %r14, %rsi
callq 0x1b069
testl %eax, %eax
je 0x31e08
leaq 0x20(%rsp), %rdi
callq 0x1b31f
movq (%rsp), %r13
movq 0x18(%rsp), %rbx
movq 0x10(%rsp), %r15
movq 0xc8(%rsp), %rsi
movq %r15, %rdi
callq 0x1c845
movq 0xd8(%rsp), %rsi
movq %r15, %rdi
callq 0x1c845
movq 0x98(%rsp), %rsi
movq %r15, %rdi
callq 0x1c845
movq 0xa8(%rsp), %rsi
movq %r15, %rdi
callq 0x1c845
movq %r12, %rdi
callq 0x1b31f
movq $0x0, (%rbx)
testq %r13, %r13
je 0x31df4
xorps %xmm0, %xmm0
movups %xmm0, (%r13)
xorl %eax, %eax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
leaq (%rsi,%r14), %rdi
callq 0xe710
movq 0x20(%rsp), %rdi
movq 0x60(%rsp), %rsi
movq %r14, %rdx
callq 0xe5a0
addq %r14, 0x28(%rsp)
movq %r12, %rdi
callq 0x1b31f
movaps 0x20(%rsp), %xmm0
movaps 0x30(%rsp), %xmm1
movaps 0x40(%rsp), %xmm2
movups %xmm2, 0x20(%r12)
movups %xmm1, 0x10(%r12)
movups %xmm0, (%r12)
movq 0xc8(%rsp), %rsi
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x1c845
movq 0xd8(%rsp), %rsi
movq %rbx, %rdi
callq 0x1c845
movq 0x98(%rsp), %rsi
movq %rbx, %rdi
callq 0x1c845
movq 0xa8(%rsp), %rsi
movq %rbx, %rdi
callq 0x1c845
movq 0x68(%rsp), %rax
movq 0x18(%rsp), %rcx
movq %rax, (%rcx)
movq 0xb8(%rsp), %rsi
movq (%rsp), %rcx
testq %rcx, %rcx
je 0x31ece
movq %rsi, (%rcx)
movslq 0xc0(%rsp), %rax
movq %rax, 0x8(%rcx)
jmp 0x31ed6
movq %rbx, %rdi
callq 0x1c845
movq 0x60(%rsp), %rax
jmp 0x31df6
|
JS_WriteObject2:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0E8h
mov r13, r9
mov r14d, r8d
mov [rsp+118h+var_118], rcx
mov rbp, rdx
mov rbx, rsi
mov r15, rdi
lea r12, [rsp+118h+var_B8]
mov edx, 88h
mov rdi, r12
xor esi, esi
call _memset
mov [r12-8], r15
mov eax, r14d
and eax, 1
mov ecx, r14d
and ecx, 4
shl ecx, 6
mov edx, r14d
and edx, 8
shl edx, 0Dh
or edx, ecx
and r14d, 30h
shl r14d, 14h
or r14d, edx
or r14d, eax
xor r14d, 3000000h
mov [r12+30h], r14d
test eax, eax
mov eax, 1
mov ecx, 0E0h
cmovz ecx, eax
mov [r12+34h], ecx
mov rsi, [r15+18h]
lea rdx, js_dbuf_realloc
mov rdi, r12
call dbuf_init2
xorps xmm0, xmm0
movups xmmword ptr [r12+78h], xmm0
movups xmmword ptr [r12+68h], xmm0
lea rdi, [rsp+118h+var_C0]
mov rsi, rbp
mov rdx, [rsp+118h+var_118]
call JS_WriteObjectRec
test eax, eax
jnz loc_31D98
mov [rsp+118h+var_108], r15
mov [rsp+118h+var_100], rbx
mov [rsp+118h+var_118], r13
mov rax, [rsp+118h+var_C0]
mov r13, [rax+18h]
movups xmm0, xmmword ptr [r12]
movups xmm1, xmmword ptr [r12+10h]
movups xmm2, xmmword ptr [r12+20h]
movaps [rsp+118h+var_D8], xmm2
movaps [rsp+118h+var_E8], xmm1
movaps [rsp+118h+var_F8], xmm0
lea rdx, js_dbuf_realloc
mov rdi, r12
mov rsi, r13
call dbuf_init2
mov rdi, r12
mov esi, 13h
call dbuf_putc
mov esi, [rsp+118h+var_68]
mov rdi, r12
call dbuf_put_leb128
cmp [rsp+118h+var_68], 0
jle short loc_31D62
xor r15d, r15d
lea rbp, [rsp+118h+var_C0]
lea r14, [rsp+118h+var_10C]
loc_31CFA:
mov rax, [rsp+118h+var_70]
movsxd rbx, dword ptr [rax+r15*4]
cmp rbx, 0DFh
jle short loc_31D34
mov rax, [r13+68h]
mov rbx, [rax+rbx*8]
mov rsi, [rbx+4]
shr rsi, 3Eh
mov rdi, r12
call dbuf_putc
mov rdi, rbp
mov rsi, rbx
call JS_WriteString
jmp short loc_31D52
loc_31D34:
mov rdi, r12
xor esi, esi
call dbuf_putc
mov [rsp+118h+var_10C], ebx
mov edx, 4
mov rdi, r12
mov rsi, r14
call dbuf_put
loc_31D52:
inc r15
movsxd rax, [rsp+118h+var_68]
cmp r15, rax
jl short loc_31CFA
loc_31D62:
movsxd r14, dword ptr [rsp+118h+var_B0]
lea rdi, [rsp+118h+var_F8]
mov rsi, [rdi+8]
add rsi, r14
call dbuf_realloc
test eax, eax
jz loc_31E08
lea rdi, [rsp+118h+var_F8]
call dbuf_free
mov r13, [rsp+118h+var_118]
mov rbx, [rsp+118h+var_100]
mov r15, [rsp+118h+var_108]
loc_31D98:
mov rsi, [rsp+118h+var_50]
mov rdi, r15
call js_free
mov rsi, [rsp+118h+var_40]
mov rdi, r15
call js_free
mov rsi, [rsp+118h+var_80]
mov rdi, r15
call js_free
mov rsi, [rsp+118h+var_70]
mov rdi, r15
call js_free
mov rdi, r12
call dbuf_free
mov qword ptr [rbx], 0
test r13, r13
jz short loc_31DF4
xorps xmm0, xmm0
movups xmmword ptr [r13+0], xmm0
loc_31DF4:
xor eax, eax
loc_31DF6:
add rsp, 0E8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_31E08:
mov rsi, qword ptr [rsp+118h+var_F8]
mov rdx, qword ptr [rsp+118h+var_F8+8]
lea rdi, [rsi+r14]
call _memmove
mov rdi, qword ptr [rsp+118h+var_F8]
mov rsi, [rsp+118h+var_B8]
mov rdx, r14
call _memcpy
add qword ptr [rsp+118h+var_F8+8], r14
mov rdi, r12
call dbuf_free
movaps xmm0, [rsp+118h+var_F8]
movaps xmm1, [rsp+118h+var_E8]
movaps xmm2, [rsp+118h+var_D8]
movups xmmword ptr [r12+20h], xmm2
movups xmmword ptr [r12+10h], xmm1
movups xmmword ptr [r12], xmm0
mov rsi, [rsp+118h+var_50]
mov rbx, [rsp+118h+var_108]
mov rdi, rbx
call js_free
mov rsi, [rsp+118h+var_40]
mov rdi, rbx
call js_free
mov rsi, [rsp+118h+var_80]
mov rdi, rbx
call js_free
mov rsi, [rsp+118h+var_70]
mov rdi, rbx
call js_free
mov rax, [rsp+118h+var_B0]
mov rcx, [rsp+118h+var_100]
mov [rcx], rax
mov rsi, [rsp+118h+var_60]
mov rcx, [rsp+118h+var_118]
test rcx, rcx
jz short loc_31ECE
mov [rcx], rsi
movsxd rax, [rsp+118h+var_58]
mov [rcx+8], rax
jmp short loc_31ED6
loc_31ECE:
mov rdi, rbx
call js_free
loc_31ED6:
mov rax, [rsp+118h+var_B8]
jmp loc_31DF6
|
long long JS_WriteObject2(long long a1, _QWORD *a2, long long a3, long long a4, char a5, _OWORD *a6)
{
_QWORD *v9; // rbx
long long v10; // r15
int v11; // ecx
long long v12; // r13
long long i; // r15
long long v14; // rbx
long long v15; // rbx
long long v16; // r14
long long v18; // rbx
_QWORD *v20; // [rsp+0h] [rbp-118h]
int v21; // [rsp+Ch] [rbp-10Ch] BYREF
long long v22; // [rsp+10h] [rbp-108h]
_QWORD *v23; // [rsp+18h] [rbp-100h]
__int128 v24; // [rsp+20h] [rbp-F8h] BYREF
__int128 v25; // [rsp+30h] [rbp-E8h]
__int128 v26; // [rsp+40h] [rbp-D8h]
long long v27; // [rsp+58h] [rbp-C0h] BYREF
__int128 v28; // [rsp+60h] [rbp-B8h] BYREF
__int128 v29; // [rsp+70h] [rbp-A8h]
__int128 v30; // [rsp+80h] [rbp-98h]
int v31; // [rsp+90h] [rbp-88h]
int v32; // [rsp+94h] [rbp-84h]
long long v33; // [rsp+98h] [rbp-80h]
long long v34; // [rsp+A8h] [rbp-70h]
int v35; // [rsp+B0h] [rbp-68h]
long long v36; // [rsp+B8h] [rbp-60h]
int v37; // [rsp+C0h] [rbp-58h]
__int128 v38; // [rsp+C8h] [rbp-50h]
__int128 v39; // [rsp+D8h] [rbp-40h]
v9 = a2;
v10 = a1;
memset(&v28, 0LL, 136LL);
v27 = a1;
v31 = (a5 & 1 | ((a5 & 4) << 6) | ((a5 & 8) << 13) | ((a5 & 0x30) << 20)) ^ 0x3000000;
v11 = 224;
if ( (a5 & 1) == 0 )
v11 = 1;
v32 = v11;
dbuf_init2((long long)&v28, *(_QWORD *)(a1 + 24), js_dbuf_realloc);
v39 = 0LL;
v38 = 0LL;
if ( (unsigned int)JS_WriteObjectRec(&v27, a3, a4) )
goto LABEL_12;
v22 = a1;
v23 = a2;
v20 = a6;
v12 = *(_QWORD *)(v27 + 24);
v26 = v30;
v25 = v29;
v24 = v28;
dbuf_init2((long long)&v28, v12, js_dbuf_realloc);
dbuf_putc(&v28, 19);
dbuf_put_leb128(&v28, (unsigned int)v35);
if ( v35 > 0 )
{
for ( i = 0LL; i < v35; ++i )
{
v14 = *(int *)(v34 + 4 * i);
if ( v14 <= 223 )
{
dbuf_putc(&v28, 0);
v21 = v14;
dbuf_put(&v28, (long long)&v21, 4LL);
}
else
{
v15 = *(_QWORD *)(*(_QWORD *)(v12 + 104) + 8 * v14);
dbuf_putc(&v28, *(_QWORD *)(v15 + 4) >> 62);
JS_WriteString(&v27, v15);
}
}
}
v16 = SDWORD2(v28);
if ( (unsigned int)dbuf_realloc((long long)&v24, SDWORD2(v28) + *((_QWORD *)&v24 + 1)) )
{
dbuf_free((long long)&v24);
a6 = v20;
v9 = v23;
v10 = v22;
LABEL_12:
js_free(v10, v38);
js_free(v10, v39);
js_free(v10, v33);
js_free(v10, v34);
dbuf_free((long long)&v28);
*v9 = 0LL;
if ( a6 )
*a6 = 0LL;
return 0LL;
}
memmove(v24 + v16, v24, *((_QWORD *)&v24 + 1));
memcpy(v24, v28, v16);
*((_QWORD *)&v24 + 1) += v16;
dbuf_free((long long)&v28);
v30 = v26;
v29 = v25;
v28 = v24;
v18 = v22;
js_free(v22, v38);
js_free(v18, v39);
js_free(v18, v33);
js_free(v18, v34);
*v23 = *((_QWORD *)&v28 + 1);
if ( v20 )
{
*v20 = v36;
v20[1] = v37;
}
else
{
js_free(v18, v36);
}
return v28;
}
|
JS_WriteObject2:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xe8
MOV R13,R9
MOV R14D,R8D
MOV qword ptr [RSP],RCX
MOV RBP,RDX
MOV RBX,RSI
MOV R15,RDI
LEA R12,[RSP + 0x60]
MOV EDX,0x88
MOV RDI,R12
XOR ESI,ESI
CALL 0x0010e340
MOV qword ptr [R12 + -0x8],R15
MOV EAX,R14D
AND EAX,0x1
MOV ECX,R14D
AND ECX,0x4
SHL ECX,0x6
MOV EDX,R14D
AND EDX,0x8
SHL EDX,0xd
OR EDX,ECX
AND R14D,0x30
SHL R14D,0x14
OR R14D,EDX
OR R14D,EAX
XOR R14D,0x3000000
MOV dword ptr [R12 + 0x30],R14D
TEST EAX,EAX
MOV EAX,0x1
MOV ECX,0xe0
CMOVZ ECX,EAX
MOV dword ptr [R12 + 0x34],ECX
MOV RSI,qword ptr [R15 + 0x18]
LEA RDX,[0x1462bc]
MOV RDI,R12
CALL 0x0011b01f
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R12 + 0x78],XMM0
MOVUPS xmmword ptr [R12 + 0x68],XMM0
LEA RDI,[RSP + 0x58]
MOV RSI,RBP
MOV RDX,qword ptr [RSP]
CALL 0x00131ee0
TEST EAX,EAX
JNZ 0x00131d98
MOV qword ptr [RSP + 0x10],R15
MOV qword ptr [RSP + 0x18],RBX
MOV qword ptr [RSP],R13
MOV RAX,qword ptr [RSP + 0x58]
MOV R13,qword ptr [RAX + 0x18]
MOVUPS XMM0,xmmword ptr [R12]
MOVUPS XMM1,xmmword ptr [R12 + 0x10]
MOVUPS XMM2,xmmword ptr [R12 + 0x20]
MOVAPS xmmword ptr [RSP + 0x40],XMM2
MOVAPS xmmword ptr [RSP + 0x30],XMM1
MOVAPS xmmword ptr [RSP + 0x20],XMM0
LEA RDX,[0x1462bc]
MOV RDI,R12
MOV RSI,R13
CALL 0x0011b01f
MOV RDI,R12
MOV ESI,0x13
CALL 0x0011b1c5
MOV ESI,dword ptr [RSP + 0xb0]
MOV RDI,R12
CALL 0x00146793
CMP dword ptr [RSP + 0xb0],0x0
JLE 0x00131d62
XOR R15D,R15D
LEA RBP,[RSP + 0x58]
LEA R14,[RSP + 0xc]
LAB_00131cfa:
MOV RAX,qword ptr [RSP + 0xa8]
MOVSXD RBX,dword ptr [RAX + R15*0x4]
CMP RBX,0xdf
JLE 0x00131d34
MOV RAX,qword ptr [R13 + 0x68]
MOV RBX,qword ptr [RAX + RBX*0x8]
MOV RSI,qword ptr [RBX + 0x4]
SHR RSI,0x3e
MOV RDI,R12
CALL 0x0011b1c5
MOV RDI,RBP
MOV RSI,RBX
CALL 0x001462c1
JMP 0x00131d52
LAB_00131d34:
MOV RDI,R12
XOR ESI,ESI
CALL 0x0011b1c5
MOV dword ptr [RSP + 0xc],EBX
MOV EDX,0x4
MOV RDI,R12
MOV RSI,R14
CALL 0x0011b116
LAB_00131d52:
INC R15
MOVSXD RAX,dword ptr [RSP + 0xb0]
CMP R15,RAX
JL 0x00131cfa
LAB_00131d62:
MOVSXD R14,dword ptr [RSP + 0x68]
LEA RDI,[RSP + 0x20]
MOV RSI,qword ptr [RDI + 0x8]
ADD RSI,R14
CALL 0x0011b069
TEST EAX,EAX
JZ 0x00131e08
LEA RDI,[RSP + 0x20]
CALL 0x0011b31f
MOV R13,qword ptr [RSP]
MOV RBX,qword ptr [RSP + 0x18]
MOV R15,qword ptr [RSP + 0x10]
LAB_00131d98:
MOV RSI,qword ptr [RSP + 0xc8]
MOV RDI,R15
CALL 0x0011c845
MOV RSI,qword ptr [RSP + 0xd8]
MOV RDI,R15
CALL 0x0011c845
MOV RSI,qword ptr [RSP + 0x98]
MOV RDI,R15
CALL 0x0011c845
MOV RSI,qword ptr [RSP + 0xa8]
MOV RDI,R15
CALL 0x0011c845
MOV RDI,R12
CALL 0x0011b31f
MOV qword ptr [RBX],0x0
TEST R13,R13
JZ 0x00131df4
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R13],XMM0
LAB_00131df4:
XOR EAX,EAX
LAB_00131df6:
ADD RSP,0xe8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00131e08:
MOV RSI,qword ptr [RSP + 0x20]
MOV RDX,qword ptr [RSP + 0x28]
LEA RDI,[RSI + R14*0x1]
CALL 0x0010e710
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x60]
MOV RDX,R14
CALL 0x0010e5a0
ADD qword ptr [RSP + 0x28],R14
MOV RDI,R12
CALL 0x0011b31f
MOVAPS XMM0,xmmword ptr [RSP + 0x20]
MOVAPS XMM1,xmmword ptr [RSP + 0x30]
MOVAPS XMM2,xmmword ptr [RSP + 0x40]
MOVUPS xmmword ptr [R12 + 0x20],XMM2
MOVUPS xmmword ptr [R12 + 0x10],XMM1
MOVUPS xmmword ptr [R12],XMM0
MOV RSI,qword ptr [RSP + 0xc8]
MOV RBX,qword ptr [RSP + 0x10]
MOV RDI,RBX
CALL 0x0011c845
MOV RSI,qword ptr [RSP + 0xd8]
MOV RDI,RBX
CALL 0x0011c845
MOV RSI,qword ptr [RSP + 0x98]
MOV RDI,RBX
CALL 0x0011c845
MOV RSI,qword ptr [RSP + 0xa8]
MOV RDI,RBX
CALL 0x0011c845
MOV RAX,qword ptr [RSP + 0x68]
MOV RCX,qword ptr [RSP + 0x18]
MOV qword ptr [RCX],RAX
MOV RSI,qword ptr [RSP + 0xb8]
MOV RCX,qword ptr [RSP]
TEST RCX,RCX
JZ 0x00131ece
MOV qword ptr [RCX],RSI
MOVSXD RAX,dword ptr [RSP + 0xc0]
MOV qword ptr [RCX + 0x8],RAX
JMP 0x00131ed6
LAB_00131ece:
MOV RDI,RBX
CALL 0x0011c845
LAB_00131ed6:
MOV RAX,qword ptr [RSP + 0x60]
JMP 0x00131df6
|
int8
JS_WriteObject2(long param_1,int8 *param_2,int8 param_3,int8 param_4,uint param_5,
int8 *param_6)
{
long lVar1;
int iVar2;
size_t __n;
long lVar3;
int local_10c;
long local_108;
int8 *local_100;
int4 local_f8;
int4 uStack_f4;
int8 uStack_f0;
int4 local_e8;
int4 uStack_e4;
int4 uStack_e0;
int4 uStack_dc;
int4 local_d8;
int4 uStack_d4;
int4 uStack_d0;
int4 uStack_cc;
long local_c0;
int4 local_b8;
int4 uStack_b4;
int iStack_b0;
int4 uStack_ac;
int4 local_a8;
int4 uStack_a4;
int4 uStack_a0;
int4 uStack_9c;
int4 local_98;
int4 uStack_94;
int4 uStack_90;
int4 uStack_8c;
uint local_88;
int4 local_84;
int8 local_80;
long local_70;
int local_68;
int8 local_60;
int local_58;
int8 local_50;
int8 uStack_48;
int8 local_40;
int8 uStack_38;
memset(&local_b8,0,0x88);
local_88 = ((param_5 & 0x30) << 0x14 | (param_5 & 8) << 0xd | (param_5 & 4) << 6 | param_5 & 1) ^
0x3000000;
local_84 = 0xe0;
if ((param_5 & 1) == 0) {
local_84 = 1;
}
local_c0 = param_1;
dbuf_init2(&local_b8,*(int8 *)(param_1 + 0x18),js_dbuf_realloc);
local_40 = 0;
uStack_38 = 0;
local_50 = 0;
uStack_48 = 0;
iVar2 = JS_WriteObjectRec(&local_c0,param_3,param_4);
if (iVar2 == 0) {
lVar1 = *(long *)(local_c0 + 0x18);
local_d8 = local_98;
uStack_d4 = uStack_94;
uStack_d0 = uStack_90;
uStack_cc = uStack_8c;
local_e8 = local_a8;
uStack_e4 = uStack_a4;
uStack_e0 = uStack_a0;
uStack_dc = uStack_9c;
local_f8 = local_b8;
uStack_f4 = uStack_b4;
uStack_f0 = CONCAT44(uStack_ac,iStack_b0);
local_108 = param_1;
local_100 = param_2;
dbuf_init2(&local_b8,lVar1,js_dbuf_realloc);
dbuf_putc(&local_b8,0x13);
dbuf_put_leb128(&local_b8,local_68);
if (0 < local_68) {
lVar3 = 0;
do {
iVar2 = *(int *)(local_70 + lVar3 * 4);
if ((long)iVar2 < 0xe0) {
dbuf_putc(&local_b8,0);
local_10c = iVar2;
dbuf_put(&local_b8,&local_10c,4);
}
else {
dbuf_putc(&local_b8,
*(ulong *)(*(long *)(*(long *)(lVar1 + 0x68) + (long)iVar2 * 8) + 4) >> 0x3e);
JS_WriteString(&local_c0);
}
lVar3 = lVar3 + 1;
} while (lVar3 < local_68);
}
__n = (size_t)iStack_b0;
iVar2 = dbuf_realloc(&local_f8,uStack_f0 + __n);
if (iVar2 == 0) {
memmove((void *)((long)CONCAT44(uStack_f4,local_f8) + __n),
(void *)CONCAT44(uStack_f4,local_f8),uStack_f0);
memcpy((void *)CONCAT44(uStack_f4,local_f8),(void *)CONCAT44(uStack_b4,local_b8),__n);
uStack_f0 = uStack_f0 + __n;
dbuf_free(&local_b8);
lVar1 = local_108;
local_98 = local_d8;
uStack_94 = uStack_d4;
uStack_90 = uStack_d0;
uStack_8c = uStack_cc;
local_a8 = local_e8;
uStack_a4 = uStack_e4;
uStack_a0 = uStack_e0;
uStack_9c = uStack_dc;
local_b8 = local_f8;
uStack_b4 = uStack_f4;
iStack_b0 = (int4)uStack_f0;
uStack_ac = uStack_f0._4_4_;
js_free(local_108,local_50);
js_free(lVar1,local_40);
js_free(lVar1,local_80);
js_free(lVar1,local_70);
*local_100 = CONCAT44(uStack_ac,iStack_b0);
if (param_6 == (int8 *)0x0) {
js_free(lVar1);
}
else {
*param_6 = local_60;
param_6[1] = (long)local_58;
}
return CONCAT44(uStack_b4,local_b8);
}
dbuf_free(&local_f8);
param_2 = local_100;
param_1 = local_108;
}
js_free(param_1,local_50);
js_free(param_1,local_40);
js_free(param_1,local_80);
js_free(param_1,local_70);
dbuf_free(&local_b8);
*param_2 = 0;
if (param_6 != (int8 *)0x0) {
*param_6 = 0;
param_6[1] = 0;
}
return 0;
}
|
|
7,698 |
unlink_block
|
eloqsql/storage/maria/ma_pagecache.c
|
static void unlink_block(PAGECACHE *pagecache, PAGECACHE_BLOCK_LINK *block)
{
DBUG_ENTER("unlink_block");
DBUG_PRINT("pagecache", ("unlink %p", block));
DBUG_ASSERT(block->next_used != NULL);
if (block->next_used == block)
{
/* The list contains only one member */
pagecache->used_last= pagecache->used_ins= NULL;
}
else
{
block->next_used->prev_used= block->prev_used;
*block->prev_used= block->next_used;
if (pagecache->used_last == block)
pagecache->used_last= STRUCT_PTR(PAGECACHE_BLOCK_LINK,
next_used, block->prev_used);
if (pagecache->used_ins == block)
pagecache->used_ins= STRUCT_PTR(PAGECACHE_BLOCK_LINK,
next_used, block->prev_used);
}
block->next_used= NULL;
KEYCACHE_THREAD_TRACE("unlink_block");
#if defined(PAGECACHE_DEBUG)
KEYCACHE_DBUG_ASSERT(pagecache->blocks_available != 0);
pagecache->blocks_available--;
KEYCACHE_DBUG_PRINT("pagecache",
("unlinked block: %p (%u) status: %x #requests: %u #available: %u",
block, PCBLOCK_NUMBER(pagecache, block),
block->status,
block->requests, pagecache->blocks_available));
PCBLOCK_INFO(block);
#endif
DBUG_VOID_RETURN;
}
|
O0
|
c
|
unlink_block:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
jmp 0x4145e
jmp 0x41460
jmp 0x41462
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0x4148f
movq -0x8(%rbp), %rax
movq $0x0, 0xc0(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0xb8(%rax)
jmp 0x414fe
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq 0xb8(%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0x414d8
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0xb8(%rax)
movq -0x8(%rbp), %rax
movq 0xc0(%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0x414fc
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0xc0(%rax)
jmp 0x414fe
movq -0x10(%rbp), %rax
movq $0x0, (%rax)
jmp 0x4150b
popq %rbp
retq
nopl (%rax)
|
unlink_block:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
jmp short $+2
loc_4145E:
jmp short $+2
loc_41460:
jmp short $+2
loc_41462:
mov rax, [rbp+var_10]
mov rax, [rax]
cmp rax, [rbp+var_10]
jnz short loc_4148F
mov rax, [rbp+var_8]
mov qword ptr [rax+0C0h], 0
mov rax, [rbp+var_8]
mov qword ptr [rax+0B8h], 0
jmp short loc_414FE
loc_4148F:
mov rax, [rbp+var_10]
mov rcx, [rax+8]
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rax+8], rcx
mov rax, [rbp+var_10]
mov rcx, [rax]
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov [rax], rcx
mov rax, [rbp+var_8]
mov rax, [rax+0B8h]
cmp rax, [rbp+var_10]
jnz short loc_414D8
mov rax, [rbp+var_10]
mov rcx, [rax+8]
mov rax, [rbp+var_8]
mov [rax+0B8h], rcx
loc_414D8:
mov rax, [rbp+var_8]
mov rax, [rax+0C0h]
cmp rax, [rbp+var_10]
jnz short loc_414FC
mov rax, [rbp+var_10]
mov rcx, [rax+8]
mov rax, [rbp+var_8]
mov [rax+0C0h], rcx
loc_414FC:
jmp short $+2
loc_414FE:
mov rax, [rbp+var_10]
mov qword ptr [rax], 0
jmp short $+2
loc_4150B:
pop rbp
retn
|
_QWORD * unlink_block(long long a1, _QWORD *a2)
{
_QWORD *result; // rax
if ( (_QWORD *)*a2 == a2 )
{
*(_QWORD *)(a1 + 192) = 0LL;
*(_QWORD *)(a1 + 184) = 0LL;
}
else
{
*(_QWORD *)(*a2 + 8LL) = a2[1];
*(_QWORD *)a2[1] = *a2;
if ( *(_QWORD **)(a1 + 184) == a2 )
*(_QWORD *)(a1 + 184) = a2[1];
if ( *(_QWORD **)(a1 + 192) == a2 )
*(_QWORD *)(a1 + 192) = a2[1];
}
result = a2;
*a2 = 0LL;
return result;
}
|
unlink_block:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
JMP 0x0014145e
LAB_0014145e:
JMP 0x00141460
LAB_00141460:
JMP 0x00141462
LAB_00141462:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
CMP RAX,qword ptr [RBP + -0x10]
JNZ 0x0014148f
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0xc0],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0xb8],0x0
JMP 0x001414fe
LAB_0014148f:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0xb8]
CMP RAX,qword ptr [RBP + -0x10]
JNZ 0x001414d8
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0xb8],RCX
LAB_001414d8:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0xc0]
CMP RAX,qword ptr [RBP + -0x10]
JNZ 0x001414fc
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0xc0],RCX
LAB_001414fc:
JMP 0x001414fe
LAB_001414fe:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],0x0
JMP 0x0014150b
LAB_0014150b:
POP RBP
RET
|
void unlink_block(long param_1,long *param_2)
{
if ((long *)*param_2 == param_2) {
*(int8 *)(param_1 + 0xc0) = 0;
*(int8 *)(param_1 + 0xb8) = 0;
}
else {
*(long *)(*param_2 + 8) = param_2[1];
*(long *)param_2[1] = *param_2;
if (*(long **)(param_1 + 0xb8) == param_2) {
*(long *)(param_1 + 0xb8) = param_2[1];
}
if (*(long **)(param_1 + 0xc0) == param_2) {
*(long *)(param_1 + 0xc0) = param_2[1];
}
}
*param_2 = 0;
return;
}
|
|
7,699 |
unlink_block
|
eloqsql/storage/maria/ma_pagecache.c
|
static void unlink_block(PAGECACHE *pagecache, PAGECACHE_BLOCK_LINK *block)
{
DBUG_ENTER("unlink_block");
DBUG_PRINT("pagecache", ("unlink %p", block));
DBUG_ASSERT(block->next_used != NULL);
if (block->next_used == block)
{
/* The list contains only one member */
pagecache->used_last= pagecache->used_ins= NULL;
}
else
{
block->next_used->prev_used= block->prev_used;
*block->prev_used= block->next_used;
if (pagecache->used_last == block)
pagecache->used_last= STRUCT_PTR(PAGECACHE_BLOCK_LINK,
next_used, block->prev_used);
if (pagecache->used_ins == block)
pagecache->used_ins= STRUCT_PTR(PAGECACHE_BLOCK_LINK,
next_used, block->prev_used);
}
block->next_used= NULL;
KEYCACHE_THREAD_TRACE("unlink_block");
#if defined(PAGECACHE_DEBUG)
KEYCACHE_DBUG_ASSERT(pagecache->blocks_available != 0);
pagecache->blocks_available--;
KEYCACHE_DBUG_PRINT("pagecache",
("unlinked block: %p (%u) status: %x #requests: %u #available: %u",
block, PCBLOCK_NUMBER(pagecache, block),
block->status,
block->requests, pagecache->blocks_available));
PCBLOCK_INFO(block);
#endif
DBUG_VOID_RETURN;
}
|
O3
|
c
|
unlink_block:
movq (%rsi), %rax
cmpq %rsi, %rax
je 0x3e376
pushq %rbp
movq %rsp, %rbp
movq 0x8(%rsi), %rcx
movq %rcx, 0x8(%rax)
movq (%rsi), %rax
movq %rax, (%rcx)
cmpq %rsi, 0xb8(%rdi)
jne 0x3e35f
movq 0x8(%rsi), %rax
movq %rax, 0xb8(%rdi)
cmpq %rsi, 0xc0(%rdi)
jne 0x3e373
movq 0x8(%rsi), %rax
movq %rax, 0xc0(%rdi)
popq %rbp
jmp 0x3e380
xorps %xmm0, %xmm0
movups %xmm0, 0xb8(%rdi)
movq $0x0, (%rsi)
retq
|
unlink_block:
mov rax, [rsi]
cmp rax, rsi
jz short loc_3E376
push rbp
mov rbp, rsp
mov rcx, [rsi+8]
mov [rax+8], rcx
mov rax, [rsi]
mov [rcx], rax
cmp [rdi+0B8h], rsi
jnz short loc_3E35F
mov rax, [rsi+8]
mov [rdi+0B8h], rax
loc_3E35F:
cmp [rdi+0C0h], rsi
jnz short loc_3E373
mov rax, [rsi+8]
mov [rdi+0C0h], rax
loc_3E373:
pop rbp
jmp short loc_3E380
loc_3E376:
xorps xmm0, xmm0
movups xmmword ptr [rdi+0B8h], xmm0
loc_3E380:
mov qword ptr [rsi], 0
retn
|
_QWORD * unlink_block(long long a1, _QWORD *a2)
{
_QWORD *result; // rax
_QWORD *v3; // rcx
result = (_QWORD *)*a2;
if ( (_QWORD *)*a2 == a2 )
{
*(_OWORD *)(a1 + 184) = 0LL;
}
else
{
v3 = (_QWORD *)a2[1];
result[1] = v3;
result = (_QWORD *)*a2;
*v3 = *a2;
if ( *(_QWORD **)(a1 + 184) == a2 )
{
result = (_QWORD *)a2[1];
*(_QWORD *)(a1 + 184) = result;
}
if ( *(_QWORD **)(a1 + 192) == a2 )
{
result = (_QWORD *)a2[1];
*(_QWORD *)(a1 + 192) = result;
}
}
*a2 = 0LL;
return result;
}
|
unlink_block:
MOV RAX,qword ptr [RSI]
CMP RAX,RSI
JZ 0x0013e376
PUSH RBP
MOV RBP,RSP
MOV RCX,qword ptr [RSI + 0x8]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RSI]
MOV qword ptr [RCX],RAX
CMP qword ptr [RDI + 0xb8],RSI
JNZ 0x0013e35f
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RDI + 0xb8],RAX
LAB_0013e35f:
CMP qword ptr [RDI + 0xc0],RSI
JNZ 0x0013e373
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RDI + 0xc0],RAX
LAB_0013e373:
POP RBP
JMP 0x0013e380
LAB_0013e376:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0xb8],XMM0
LAB_0013e380:
MOV qword ptr [RSI],0x0
RET
|
void unlink_block(long param_1,int8 *param_2)
{
int8 *puVar1;
if ((int8 *)*param_2 == param_2) {
*(int8 *)(param_1 + 0xb8) = 0;
*(int8 *)(param_1 + 0xc0) = 0;
}
else {
puVar1 = (int8 *)param_2[1];
((int8 *)*param_2)[1] = puVar1;
*puVar1 = *param_2;
if (*(int8 **)(param_1 + 0xb8) == param_2) {
*(int8 *)(param_1 + 0xb8) = param_2[1];
}
if (*(int8 **)(param_1 + 0xc0) == param_2) {
*(int8 *)(param_1 + 0xc0) = param_2[1];
}
}
*param_2 = 0;
return;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.